@format.dev/compile 0.0.0 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -20
- package/bin/format-compile +3 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/defineProperty.mjs +14 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPrimitive.mjs +16 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/toPropertyKey.mjs +11 -0
- package/dist/_virtual/_@oxc-project_runtime@0.103.0/helpers/typeof.mjs +12 -0
- package/dist/_virtual/rolldown_runtime.mjs +46 -0
- package/dist/node_modules/.pnpm/@babel_parser@7.29.8/node_modules/@babel/parser/lib/index.mjs +12606 -0
- package/dist/node_modules/.pnpm/@babel_parser@7.29.8/node_modules/@babel/parser/lib/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs +4866 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/dist/compiler-core.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_compiler-core@3.5.41/node_modules/@vue/compiler-core/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs +663 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_compiler-dom@3.5.41/node_modules/@vue/compiler-dom/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_compiler-ssr@3.5.41/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.mjs +846 -0
- package/dist/node_modules/.pnpm/@vue_compiler-ssr@3.5.41/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs +1600 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/dist/reactivity.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_reactivity@3.5.41/node_modules/@vue/reactivity/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs +5619 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/dist/runtime-core.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_runtime-core@3.5.41/node_modules/@vue/runtime-core/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs +1479 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_runtime-dom@3.5.41/node_modules/@vue/runtime-dom/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/dist/server-renderer.cjs.mjs +510 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/dist/server-renderer.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_server-renderer@3.5.41/node_modules/@vue/server-renderer/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/dist/shared.cjs.mjs +499 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/dist/shared.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/index.mjs +13 -0
- package/dist/node_modules/.pnpm/@vue_shared@3.5.41/node_modules/@vue/shared/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.mjs +79 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode-codepoint.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode.mjs +471 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/decode.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.mjs +16 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-html.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.mjs +16 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/generated/decode-data-xml.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.mjs +30 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/bin-trie-flags.mjs.map +1 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.mjs +24 -0
- package/dist/node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/commonjs/internal/decode-shared.mjs.map +1 -0
- package/dist/node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs +253 -0
- package/dist/node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/umd/estree-walker.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.mjs +5246 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server-legacy.node.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.node.development.mjs +5616 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom-server.node.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.mjs +183 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/cjs/react-dom.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.mjs +13 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.node.mjs +21 -0
- package/dist/node_modules/.pnpm/react-dom@19.2.8_react@19.2.8/node_modules/react-dom/server.node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.mjs +766 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/cjs/react.development.mjs.map +1 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/index.mjs +13 -0
- package/dist/node_modules/.pnpm/react@19.2.8/node_modules/react/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs +100 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs +73 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs +41 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs +68 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs +77 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs +89 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs +788 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs +295 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs +293 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs +352 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.mjs.map +1 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs +17 -0
- package/dist/node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/dist/vue.cjs.mjs +67 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/dist/vue.cjs.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index.mjs +13 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index2.mjs +10 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/index2.mjs.map +1 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/server-renderer/index.mjs +10 -0
- package/dist/node_modules/.pnpm/vue@3.5.41_typescript@5.9.3/node_modules/vue/server-renderer/index.mjs.map +1 -0
- package/dist/server/cli/bin.d.mts +1 -0
- package/dist/server/cli/bin.mjs +8 -0
- package/dist/server/cli/bin.mjs.map +1 -0
- package/dist/server/cli/cli-spec.mjs +150 -0
- package/dist/server/cli/cli-spec.mjs.map +1 -0
- package/dist/server/cli/index.d.mts +16 -0
- package/dist/server/cli/index.d.mts.map +1 -0
- package/dist/server/cli/index.mjs +64 -0
- package/dist/server/cli/index.mjs.map +1 -0
- package/dist/server/compile/adaptors/html-partials.d.mts +24 -0
- package/dist/server/compile/adaptors/html-partials.d.mts.map +1 -0
- package/dist/server/compile/adaptors/html-partials.mjs +50 -0
- package/dist/server/compile/adaptors/html-partials.mjs.map +1 -0
- package/dist/server/compile/adaptors/html.d.mts +15 -0
- package/dist/server/compile/adaptors/html.d.mts.map +1 -0
- package/dist/server/compile/adaptors/html.mjs +39 -0
- package/dist/server/compile/adaptors/html.mjs.map +1 -0
- package/dist/server/compile/adaptors/node-require.d.mts +6 -0
- package/dist/server/compile/adaptors/node-require.d.mts.map +1 -0
- package/dist/server/compile/adaptors/node-require.mjs +35 -0
- package/dist/server/compile/adaptors/node-require.mjs.map +1 -0
- package/dist/server/compile/adaptors/react-browser.d.mts +20 -0
- package/dist/server/compile/adaptors/react-browser.d.mts.map +1 -0
- package/dist/server/compile/adaptors/react-browser.mjs +19 -0
- package/dist/server/compile/adaptors/react-browser.mjs.map +1 -0
- package/dist/server/compile/adaptors/react-node.d.mts +17 -0
- package/dist/server/compile/adaptors/react-node.d.mts.map +1 -0
- package/dist/server/compile/adaptors/react-node.mjs +50 -0
- package/dist/server/compile/adaptors/react-node.mjs.map +1 -0
- package/dist/server/compile/adaptors/types.d.mts +14 -0
- package/dist/server/compile/adaptors/types.d.mts.map +1 -0
- package/dist/server/compile/adaptors/types.mjs +1 -0
- package/dist/server/compile/adaptors/vue-browser.d.mts +16 -0
- package/dist/server/compile/adaptors/vue-browser.d.mts.map +1 -0
- package/dist/server/compile/adaptors/vue-browser.mjs +16 -0
- package/dist/server/compile/adaptors/vue-browser.mjs.map +1 -0
- package/dist/server/compile/adaptors/vue-node.d.mts +17 -0
- package/dist/server/compile/adaptors/vue-node.d.mts.map +1 -0
- package/dist/server/compile/adaptors/vue-node.mjs +50 -0
- package/dist/server/compile/adaptors/vue-node.mjs.map +1 -0
- package/dist/server/compile/build-entry-module.d.mts +20 -0
- package/dist/server/compile/build-entry-module.d.mts.map +1 -0
- package/dist/server/compile/build-entry-module.mjs +56 -0
- package/dist/server/compile/build-entry-module.mjs.map +1 -0
- package/dist/server/compile/bundle-name.d.mts +5 -0
- package/dist/server/compile/bundle-name.d.mts.map +1 -0
- package/dist/server/compile/bundle-name.mjs +13 -0
- package/dist/server/compile/bundle-name.mjs.map +1 -0
- package/dist/server/compile/compile-cache.d.mts +23 -0
- package/dist/server/compile/compile-cache.d.mts.map +1 -0
- package/dist/server/compile/compile-cache.mjs +102 -0
- package/dist/server/compile/compile-cache.mjs.map +1 -0
- package/dist/server/compile/compile.d.mts +100 -0
- package/dist/server/compile/compile.d.mts.map +1 -0
- package/dist/server/compile/compile.mjs +735 -0
- package/dist/server/compile/compile.mjs.map +1 -0
- package/dist/server/compile/constants.d.mts +11 -0
- package/dist/server/compile/constants.d.mts.map +1 -0
- package/dist/server/compile/constants.mjs +12 -0
- package/dist/server/compile/constants.mjs.map +1 -0
- package/dist/server/compile/create-renderer.d.mts +16 -0
- package/dist/server/compile/create-renderer.d.mts.map +1 -0
- package/dist/server/compile/create-renderer.mjs +59 -0
- package/dist/server/compile/create-renderer.mjs.map +1 -0
- package/dist/server/compile/decode-style-entities.d.mts +12 -0
- package/dist/server/compile/decode-style-entities.d.mts.map +1 -0
- package/dist/server/compile/decode-style-entities.mjs +32 -0
- package/dist/server/compile/decode-style-entities.mjs.map +1 -0
- package/dist/server/compile/defaults.d.mts +18 -0
- package/dist/server/compile/defaults.d.mts.map +1 -0
- package/dist/server/compile/defaults.mjs +128 -0
- package/dist/server/compile/defaults.mjs.map +1 -0
- package/dist/server/compile/dependency-closure.d.mts +10 -0
- package/dist/server/compile/dependency-closure.d.mts.map +1 -0
- package/dist/server/compile/dependency-closure.mjs +79 -0
- package/dist/server/compile/dependency-closure.mjs.map +1 -0
- package/dist/server/compile/document-assets.d.mts +103 -0
- package/dist/server/compile/document-assets.d.mts.map +1 -0
- package/dist/server/compile/document-assets.mjs +184 -0
- package/dist/server/compile/document-assets.mjs.map +1 -0
- package/dist/server/compile/finalize-document-html.d.mts +53 -0
- package/dist/server/compile/finalize-document-html.d.mts.map +1 -0
- package/dist/server/compile/finalize-document-html.mjs +132 -0
- package/dist/server/compile/finalize-document-html.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorHtml.mjs +6 -0
- package/dist/server/compile/generated/adaptorHtml.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorReactBrowser.mjs +6 -0
- package/dist/server/compile/generated/adaptorReactBrowser.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorReactNode.mjs +6 -0
- package/dist/server/compile/generated/adaptorReactNode.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorVueBrowser.mjs +6 -0
- package/dist/server/compile/generated/adaptorVueBrowser.mjs.map +1 -0
- package/dist/server/compile/generated/adaptorVueNode.mjs +6 -0
- package/dist/server/compile/generated/adaptorVueNode.mjs.map +1 -0
- package/dist/server/compile/generated/createRenderer.mjs +6 -0
- package/dist/server/compile/generated/createRenderer.mjs.map +1 -0
- package/dist/server/compile/generated/decodeStyleEntities.mjs +6 -0
- package/dist/server/compile/generated/decodeStyleEntities.mjs.map +1 -0
- package/dist/server/compile/generated/sanitizeHtml.mjs +6 -0
- package/dist/server/compile/generated/sanitizeHtml.mjs.map +1 -0
- package/dist/server/compile/generated/validate.mjs +6 -0
- package/dist/server/compile/generated/validate.mjs.map +1 -0
- package/dist/server/compile/generated/virtualStyles.mjs +6 -0
- package/dist/server/compile/generated/virtualStyles.mjs.map +1 -0
- package/dist/server/compile/get-renderer.d.mts +18 -0
- package/dist/server/compile/get-renderer.d.mts.map +1 -0
- package/dist/server/compile/get-renderer.mjs +31 -0
- package/dist/server/compile/get-renderer.mjs.map +1 -0
- package/dist/server/compile/index.d.mts +2 -0
- package/dist/server/compile/index.mjs +3 -0
- package/dist/server/compile/make-config.d.mts +39 -0
- package/dist/server/compile/make-config.d.mts.map +1 -0
- package/dist/server/compile/make-config.mjs +272 -0
- package/dist/server/compile/make-config.mjs.map +1 -0
- package/dist/server/compile/package-json.d.mts +5 -0
- package/dist/server/compile/package-json.d.mts.map +1 -0
- package/dist/server/compile/package-json.mjs +33 -0
- package/dist/server/compile/package-json.mjs.map +1 -0
- package/dist/server/compile/producer-agreement.d.mts +82 -0
- package/dist/server/compile/producer-agreement.d.mts.map +1 -0
- package/dist/server/compile/producer-agreement.mjs +143 -0
- package/dist/server/compile/producer-agreement.mjs.map +1 -0
- package/dist/server/compile/producer-release.d.mts +19 -0
- package/dist/server/compile/producer-release.d.mts.map +1 -0
- package/dist/server/compile/producer-release.mjs +27 -0
- package/dist/server/compile/producer-release.mjs.map +1 -0
- package/dist/server/compile/render-error.d.mts +37 -0
- package/dist/server/compile/render-error.d.mts.map +1 -0
- package/dist/server/compile/render-error.mjs +55 -0
- package/dist/server/compile/render-error.mjs.map +1 -0
- package/dist/server/compile/sanitize/shared.d.mts +19 -0
- package/dist/server/compile/sanitize/shared.d.mts.map +1 -0
- package/dist/server/compile/sanitize/shared.mjs +131 -0
- package/dist/server/compile/sanitize/shared.mjs.map +1 -0
- package/dist/server/compile/sanitize-html.d.mts +5 -0
- package/dist/server/compile/sanitize-html.d.mts.map +1 -0
- package/dist/server/compile/sanitize-html.mjs +65 -0
- package/dist/server/compile/sanitize-html.mjs.map +1 -0
- package/dist/server/compile/structured-log.d.mts +22 -0
- package/dist/server/compile/structured-log.d.mts.map +1 -0
- package/dist/server/compile/structured-log.mjs +31 -0
- package/dist/server/compile/structured-log.mjs.map +1 -0
- package/dist/server/compile/virtual-styles.d.mts +5 -0
- package/dist/server/compile/virtual-styles.d.mts.map +1 -0
- package/dist/server/compile/virtual-styles.mjs +19 -0
- package/dist/server/compile/virtual-styles.mjs.map +1 -0
- package/dist/server/compile/wrapper-source.d.mts +55 -0
- package/dist/server/compile/wrapper-source.d.mts.map +1 -0
- package/dist/server/compile/wrapper-source.mjs +187 -0
- package/dist/server/compile/wrapper-source.mjs.map +1 -0
- package/dist/server/constants.d.mts +17 -0
- package/dist/server/constants.d.mts.map +1 -0
- package/dist/server/constants.mjs +41 -0
- package/dist/server/constants.mjs.map +1 -0
- package/dist/server/errors.d.mts +21 -0
- package/dist/server/errors.d.mts.map +1 -0
- package/dist/server/errors.mjs +24 -0
- package/dist/server/errors.mjs.map +1 -0
- package/dist/server/index.d.mts +4 -0
- package/dist/server/index.mjs +4 -0
- package/dist/server/integrations/nextjs/generate-entry.d.mts +19 -0
- package/dist/server/integrations/nextjs/generate-entry.d.mts.map +1 -0
- package/dist/server/integrations/nextjs/generate-entry.mjs +246 -0
- package/dist/server/integrations/nextjs/generate-entry.mjs.map +1 -0
- package/dist/server/integrations/nextjs/index.d.mts +8 -0
- package/dist/server/integrations/nextjs/index.d.mts.map +1 -0
- package/dist/server/integrations/nextjs/index.mjs +90 -0
- package/dist/server/integrations/nextjs/index.mjs.map +1 -0
- package/dist/server/integrations/nextjs/watcher.d.mts +9 -0
- package/dist/server/integrations/nextjs/watcher.d.mts.map +1 -0
- package/dist/server/integrations/nextjs/watcher.mjs +45 -0
- package/dist/server/integrations/nextjs/watcher.mjs.map +1 -0
- package/dist/server/integrations/unplugin/esbuild.d.mts +2 -0
- package/dist/server/integrations/unplugin/esbuild.mjs +3 -0
- package/dist/server/integrations/unplugin/index.d.mts +69 -0
- package/dist/server/integrations/unplugin/index.d.mts.map +1 -0
- package/dist/server/integrations/unplugin/index.mjs +539 -0
- package/dist/server/integrations/unplugin/index.mjs.map +1 -0
- package/dist/server/integrations/unplugin/rollup.d.mts +2 -0
- package/dist/server/integrations/unplugin/rollup.mjs +3 -0
- package/dist/server/integrations/unplugin/utils.d.mts +12 -0
- package/dist/server/integrations/unplugin/utils.d.mts.map +1 -0
- package/dist/server/integrations/unplugin/utils.mjs +46 -0
- package/dist/server/integrations/unplugin/utils.mjs.map +1 -0
- package/dist/server/integrations/unplugin/vite.d.mts +2 -0
- package/dist/server/integrations/unplugin/vite.mjs +3 -0
- package/dist/server/integrations/unplugin/webpack.d.mts +2 -0
- package/dist/server/integrations/unplugin/webpack.mjs +3 -0
- package/dist/server/project/documents.d.mts +21 -0
- package/dist/server/project/documents.d.mts.map +1 -0
- package/dist/server/project/documents.mjs +114 -0
- package/dist/server/project/documents.mjs.map +1 -0
- package/dist/server/project/format-env-types.d.mts +19 -0
- package/dist/server/project/format-env-types.d.mts.map +1 -0
- package/dist/server/project/format-env-types.mjs +64 -0
- package/dist/server/project/format-env-types.mjs.map +1 -0
- package/dist/server/project/paths.d.mts +21 -0
- package/dist/server/project/paths.d.mts.map +1 -0
- package/dist/server/project/paths.mjs +31 -0
- package/dist/server/project/paths.mjs.map +1 -0
- package/dist/server/project/user-project-dir.d.mts +7 -0
- package/dist/server/project/user-project-dir.d.mts.map +1 -0
- package/dist/server/project/user-project-dir.mjs +16 -0
- package/dist/server/project/user-project-dir.mjs.map +1 -0
- package/dist/server/render-worker/client.d.mts +83 -0
- package/dist/server/render-worker/client.d.mts.map +1 -0
- package/dist/server/render-worker/client.mjs +359 -0
- package/dist/server/render-worker/client.mjs.map +1 -0
- package/dist/server/render-worker/document-css.d.mts +27 -0
- package/dist/server/render-worker/document-css.d.mts.map +1 -0
- package/dist/server/render-worker/document-css.mjs +37 -0
- package/dist/server/render-worker/document-css.mjs.map +1 -0
- package/dist/server/render-worker/env.d.mts +11 -0
- package/dist/server/render-worker/env.d.mts.map +1 -0
- package/dist/server/render-worker/env.mjs +26 -0
- package/dist/server/render-worker/env.mjs.map +1 -0
- package/dist/server/render-worker/error.d.mts +17 -0
- package/dist/server/render-worker/error.d.mts.map +1 -0
- package/dist/server/render-worker/error.mjs +40 -0
- package/dist/server/render-worker/error.mjs.map +1 -0
- package/dist/server/render-worker/host.d.mts +1 -0
- package/dist/server/render-worker/host.mjs +181 -0
- package/dist/server/render-worker/host.mjs.map +1 -0
- package/dist/server/render-worker/index.d.mts +4 -0
- package/dist/server/render-worker/index.mjs +4 -0
- package/dist/server/render-worker/sandbox.d.mts +25 -0
- package/dist/server/render-worker/sandbox.d.mts.map +1 -0
- package/dist/server/render-worker/sandbox.mjs +60 -0
- package/dist/server/render-worker/sandbox.mjs.map +1 -0
- package/dist/server/render-worker/types.d.mts +59 -0
- package/dist/server/render-worker/types.d.mts.map +1 -0
- package/dist/server/render-worker/types.mjs +1 -0
- package/dist/server/runtime-state.d.mts +12 -0
- package/dist/server/runtime-state.d.mts.map +1 -0
- package/dist/server/runtime-state.mjs +24 -0
- package/dist/server/runtime-state.mjs.map +1 -0
- package/dist/server/utils/check-dir.d.mts +12 -0
- package/dist/server/utils/check-dir.d.mts.map +1 -0
- package/dist/server/utils/check-dir.mjs +30 -0
- package/dist/server/utils/check-dir.mjs.map +1 -0
- package/dist/server/utils/dependencies.d.mts +11 -0
- package/dist/server/utils/dependencies.d.mts.map +1 -0
- package/dist/server/utils/dependencies.mjs +34 -0
- package/dist/server/utils/dependencies.mjs.map +1 -0
- package/dist/server/utils/env-var.d.mts +6 -0
- package/dist/server/utils/env-var.d.mts.map +1 -0
- package/dist/server/utils/env-var.mjs +28 -0
- package/dist/server/utils/env-var.mjs.map +1 -0
- package/dist/server/utils/format-for-log.d.mts +5 -0
- package/dist/server/utils/format-for-log.d.mts.map +1 -0
- package/dist/server/utils/format-for-log.mjs +17 -0
- package/dist/server/utils/format-for-log.mjs.map +1 -0
- package/dist/server/utils/index.d.mts +8 -0
- package/dist/server/utils/index.mjs +9 -0
- package/dist/server/utils/load-config.d.mts +13 -0
- package/dist/server/utils/load-config.d.mts.map +1 -0
- package/dist/server/utils/load-config.mjs +65 -0
- package/dist/server/utils/load-config.mjs.map +1 -0
- package/dist/server/utils/log.d.mts +36 -0
- package/dist/server/utils/log.d.mts.map +1 -0
- package/dist/server/utils/log.mjs +125 -0
- package/dist/server/utils/log.mjs.map +1 -0
- package/dist/server/utils/read-file.d.mts +5 -0
- package/dist/server/utils/read-file.d.mts.map +1 -0
- package/dist/server/utils/read-file.mjs +14 -0
- package/dist/server/utils/read-file.mjs.map +1 -0
- package/dist/server/utils/resolve-path-with-extensions.d.mts +21 -0
- package/dist/server/utils/resolve-path-with-extensions.d.mts.map +1 -0
- package/dist/server/utils/resolve-path-with-extensions.mjs +39 -0
- package/dist/server/utils/resolve-path-with-extensions.mjs.map +1 -0
- package/dist/server/utils/schema.d.mts +7 -0
- package/dist/server/utils/schema.d.mts.map +1 -0
- package/dist/server/utils/schema.mjs +21 -0
- package/dist/server/utils/schema.mjs.map +1 -0
- package/dist/server/utils/standard-schema-validate.d.mts +13 -0
- package/dist/server/utils/standard-schema-validate.d.mts.map +1 -0
- package/dist/server/utils/standard-schema-validate.mjs +21 -0
- package/dist/server/utils/standard-schema-validate.mjs.map +1 -0
- package/dist/server/utils/suggest-similar.d.mts +9 -0
- package/dist/server/utils/suggest-similar.d.mts.map +1 -0
- package/dist/server/utils/suggest-similar.mjs +39 -0
- package/dist/server/utils/suggest-similar.mjs.map +1 -0
- package/dist/server/utils/warn-lockstep.d.mts +13 -0
- package/dist/server/utils/warn-lockstep.d.mts.map +1 -0
- package/dist/server/utils/warn-lockstep.mjs +23 -0
- package/dist/server/utils/warn-lockstep.mjs.map +1 -0
- package/dist/server/vite/create-config.d.mts +35 -0
- package/dist/server/vite/create-config.d.mts.map +1 -0
- package/dist/server/vite/create-config.mjs +64 -0
- package/dist/server/vite/create-config.mjs.map +1 -0
- package/dist/server/vite/plugins/collect-css.d.mts +8 -0
- package/dist/server/vite/plugins/collect-css.d.mts.map +1 -0
- package/dist/server/vite/plugins/collect-css.mjs +21 -0
- package/dist/server/vite/plugins/collect-css.mjs.map +1 -0
- package/dist/server/vite/plugins/get-styles.d.mts +14 -0
- package/dist/server/vite/plugins/get-styles.d.mts.map +1 -0
- package/dist/server/vite/plugins/get-styles.mjs +88 -0
- package/dist/server/vite/plugins/get-styles.mjs.map +1 -0
- package/dist/server/vite/plugins/html-loader.d.mts +18 -0
- package/dist/server/vite/plugins/html-loader.d.mts.map +1 -0
- package/dist/server/vite/plugins/html-loader.mjs +88 -0
- package/dist/server/vite/plugins/html-loader.mjs.map +1 -0
- package/dist/server/vite/plugins/postcss/import-url.d.mts +14 -0
- package/dist/server/vite/plugins/postcss/import-url.d.mts.map +1 -0
- package/dist/server/vite/plugins/postcss/import-url.mjs +163 -0
- package/dist/server/vite/plugins/postcss/import-url.mjs.map +1 -0
- package/dist/server/vite/plugins/styles-pre-processor.d.mts +7 -0
- package/dist/server/vite/plugins/styles-pre-processor.d.mts.map +1 -0
- package/dist/server/vite/plugins/styles-pre-processor.mjs +64 -0
- package/dist/server/vite/plugins/styles-pre-processor.mjs.map +1 -0
- package/dist/server/vite/plugins/utils.d.mts +9 -0
- package/dist/server/vite/plugins/utils.d.mts.map +1 -0
- package/dist/server/vite/plugins/utils.mjs +14 -0
- package/dist/server/vite/plugins/utils.mjs.map +1 -0
- package/dist/shared/constants.d.mts +11 -0
- package/dist/shared/constants.d.mts.map +1 -0
- package/dist/shared/constants.mjs +12 -0
- package/dist/shared/constants.mjs.map +1 -0
- package/dist/shared/env.d.mts +6 -0
- package/dist/shared/env.d.mts.map +1 -0
- package/dist/shared/env.mjs +11 -0
- package/dist/shared/env.mjs.map +1 -0
- package/dist/shared/http.d.mts +15 -0
- package/dist/shared/http.d.mts.map +1 -0
- package/dist/shared/http.mjs +54 -0
- package/dist/shared/http.mjs.map +1 -0
- package/dist/shared/types/document.d.mts +17 -0
- package/dist/shared/types/document.d.mts.map +1 -0
- package/dist/shared/types/document.mjs +1 -0
- package/dist/shared/types/index.d.mts +7 -0
- package/dist/shared/types/index.mjs +4 -0
- package/dist/shared/types/log.d.mts +10 -0
- package/dist/shared/types/log.d.mts.map +1 -0
- package/dist/shared/types/log.mjs +12 -0
- package/dist/shared/types/log.mjs.map +1 -0
- package/dist/shared/types/public/cli.d.mts +33 -0
- package/dist/shared/types/public/cli.d.mts.map +1 -0
- package/dist/shared/types/public/cli.mjs +1 -0
- package/dist/shared/types/public/compile.d.mts +45 -0
- package/dist/shared/types/public/compile.d.mts.map +1 -0
- package/dist/shared/types/public/compile.mjs +29 -0
- package/dist/shared/types/public/compile.mjs.map +1 -0
- package/dist/shared/types/public/config.d.mts +94 -0
- package/dist/shared/types/public/config.d.mts.map +1 -0
- package/dist/shared/types/public/config.mjs +20 -0
- package/dist/shared/types/public/config.mjs.map +1 -0
- package/dist/shared/types/public/index.d.mts +6 -0
- package/dist/shared/types/public/index.mjs +4 -0
- package/dist/shared/types/public/nextjs.d.mts +111 -0
- package/dist/shared/types/public/nextjs.d.mts.map +1 -0
- package/dist/shared/types/public/nextjs.mjs +1 -0
- package/dist/shared/types/public/renderer.d.mts +2 -0
- package/dist/shared/types/public/renderer.mjs +1 -0
- package/dist/shared/types/public/unplugin.d.mts +65 -0
- package/dist/shared/types/public/unplugin.d.mts.map +1 -0
- package/dist/shared/types/public/unplugin.mjs +1 -0
- package/dist/shared/types/server.d.mts +5 -0
- package/dist/shared/types/server.d.mts.map +1 -0
- package/dist/shared/types/server.mjs +1 -0
- package/dist/shared/types/state.d.mts +15 -0
- package/dist/shared/types/state.d.mts.map +1 -0
- package/dist/shared/types/state.mjs +1 -0
- package/dist/shared/types/system.d.mts +18 -0
- package/dist/shared/types/system.d.mts.map +1 -0
- package/dist/shared/types/system.mjs +1 -0
- package/package.json +146 -34
- package/types/next.d.ts +6 -0
- package/index.d.ts +0 -2
- package/index.js +0 -3
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
//#region src/server/compile/generated/sanitizeHtml.mjs?raw
|
|
2
|
+
var sanitizeHtml_default = "//#region rolldown:runtime\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);\nvar __exportAll = (all$2, symbols) => {\n let target = {};\n for (var name in all$2) {\n __defProp(target, name, {\n get: all$2[name],\n enumerable: true\n });\n }\n if (symbols) {\n __defProp(target, Symbol.toStringTag, { value: \"Module\" });\n }\n return target;\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (var keys$1 = __getOwnPropNames(from), i = 0, n = keys$1.length, key$1; i < n; i++) {\n key$1 = keys$1[i];\n if (!__hasOwnProp.call(to, key$1) && key$1 !== except) {\n __defProp(to, key$1, {\n get: ((k) => from[k]).bind(null, key$1),\n enumerable: !(desc = __getOwnPropDesc(from, key$1)) || desc.enumerable\n });\n }\n }\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n value: mod,\n enumerable: true\n}) : target, mod));\n\n//#endregion\n//#region ../utils/dist/dom.js\nconst STUDIO_FORBID_TAGS = [\n \"html\",\n \"head\",\n \"body\",\n \"title\",\n \"base\",\n \"meta\",\n \"script\",\n \"noscript\",\n \"iframe\",\n \"embed\",\n \"object\",\n \"param\",\n \"picture\",\n \"source\",\n \"track\",\n \"audio\",\n \"video\",\n \"canvas\",\n \"dialog\",\n \"meter\",\n \"fencedframe\",\n \"keygen\",\n \"geolocation\",\n \"applet\",\n \"frame\",\n \"frameset\",\n \"bgsound\",\n \"noframes\",\n \"noembed\",\n \"content\",\n \"shadow\",\n \"isindex\",\n \"marquee\"\n];\nconst FORM_TAGS = [\n \"form\",\n \"input\",\n \"button\",\n \"textarea\",\n \"select\",\n \"option\",\n \"optgroup\",\n \"datalist\"\n];\nconst FORBID_TAGS = [...STUDIO_FORBID_TAGS, ...FORM_TAGS];\n\n//#endregion\n//#region ../../node_modules/.pnpm/bail@2.0.2/node_modules/bail/index.js\n/**\n* Throw a given error.\n*\n* @param {Error|null|undefined} [error]\n* Maybe error.\n* @returns {asserts error is null|undefined}\n*/\nfunction bail(error) {\n if (error) throw error;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/extend@3.0.2/node_modules/extend/index.js\nvar require_extend = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n var hasOwn = Object.prototype.hasOwnProperty;\n var toStr = Object.prototype.toString;\n var defineProperty = Object.defineProperty;\n var gOPD = Object.getOwnPropertyDescriptor;\n var isArray = function isArray(arr) {\n if (typeof Array.isArray === \"function\") return Array.isArray(arr);\n return toStr.call(arr) === \"[object Array]\";\n };\n var isPlainObject = function isPlainObject$1(obj) {\n if (!obj || toStr.call(obj) !== \"[object Object]\") return false;\n var hasOwnConstructor = hasOwn.call(obj, \"constructor\");\n var hasIsPrototypeOf = obj.constructor && obj.constructor.prototype && hasOwn.call(obj.constructor.prototype, \"isPrototypeOf\");\n if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) return false;\n var key$1;\n for (key$1 in obj);\n return typeof key$1 === \"undefined\" || hasOwn.call(obj, key$1);\n };\n var setProperty = function setProperty(target, options) {\n if (defineProperty && options.name === \"__proto__\") defineProperty(target, options.name, {\n enumerable: true,\n configurable: true,\n value: options.newValue,\n writable: true\n });\n else target[options.name] = options.newValue;\n };\n var getProperty = function getProperty(obj, name) {\n if (name === \"__proto__\") {\n if (!hasOwn.call(obj, name)) return;\n else if (gOPD) return gOPD(obj, name).value;\n }\n return obj[name];\n };\n module.exports = function extend$1() {\n var options, name, src, copy, copyIsArray, clone;\n var target = arguments[0];\n var i = 1;\n var length = arguments.length;\n var deep = false;\n if (typeof target === \"boolean\") {\n deep = target;\n target = arguments[1] || {};\n i = 2;\n }\n if (target == null || typeof target !== \"object\" && typeof target !== \"function\") target = {};\n for (; i < length; ++i) {\n options = arguments[i];\n if (options != null) for (name in options) {\n src = getProperty(target, name);\n copy = getProperty(options, name);\n if (target !== copy) {\n if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) {\n if (copyIsArray) {\n copyIsArray = false;\n clone = src && isArray(src) ? src : [];\n } else clone = src && isPlainObject(src) ? src : {};\n setProperty(target, {\n name,\n newValue: extend$1(deep, clone, copy)\n });\n } else if (typeof copy !== \"undefined\") setProperty(target, {\n name,\n newValue: copy\n });\n }\n }\n }\n return target;\n };\n}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/devlop@1.1.0/node_modules/devlop/lib/default.js\nfunction ok() {}\n\n//#endregion\n//#region ../../node_modules/.pnpm/is-plain-obj@4.1.0/node_modules/is-plain-obj/index.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null) return false;\n const prototype = Object.getPrototypeOf(value);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/trough@2.2.0/node_modules/trough/lib/index.js\n/**\n* @typedef {(error?: Error | null | undefined, ...output: Array<any>) => void} Callback\n* Callback.\n*\n* @typedef {(...input: Array<any>) => any} Middleware\n* Ware.\n*\n* @typedef Pipeline\n* Pipeline.\n* @property {Run} run\n* Run the pipeline.\n* @property {Use} use\n* Add middleware.\n*\n* @typedef {(...input: Array<any>) => void} Run\n* Call all middleware.\n*\n* Calls `done` on completion with either an error or the output of the\n* last middleware.\n*\n* > 👉 **Note**: as the length of input defines whether async functions get a\n* > `next` function,\n* > it’s recommended to keep `input` at one value normally.\n\n*\n* @typedef {(fn: Middleware) => Pipeline} Use\n* Add middleware.\n*/\n/**\n* Create new middleware.\n*\n* @returns {Pipeline}\n* Pipeline.\n*/\nfunction trough() {\n /** @type {Array<Middleware>} */\n const fns = [];\n /** @type {Pipeline} */\n const pipeline = {\n run,\n use\n };\n return pipeline;\n /** @type {Run} */\n function run(...values) {\n let middlewareIndex = -1;\n /** @type {Callback} */\n const callback = values.pop();\n if (typeof callback !== \"function\") throw new TypeError(\"Expected function as last argument, not \" + callback);\n next$1(null, ...values);\n /**\n * Run the next `fn`, or we’re done.\n *\n * @param {Error | null | undefined} error\n * @param {Array<any>} output\n */\n function next$1(error, ...output) {\n const fn = fns[++middlewareIndex];\n let index$1 = -1;\n if (error) {\n callback(error);\n return;\n }\n while (++index$1 < values.length) if (output[index$1] === null || output[index$1] === void 0) output[index$1] = values[index$1];\n values = output;\n if (fn) wrap(fn, next$1)(...output);\n else callback(null, ...output);\n }\n }\n /** @type {Use} */\n function use(middelware) {\n if (typeof middelware !== \"function\") throw new TypeError(\"Expected `middelware` to be a function, not \" + middelware);\n fns.push(middelware);\n return pipeline;\n }\n}\n/**\n* Wrap `middleware` into a uniform interface.\n*\n* You can pass all input to the resulting function.\n* `callback` is then called with the output of `middleware`.\n*\n* If `middleware` accepts more arguments than the later given in input,\n* an extra `done` function is passed to it after that input,\n* which must be called by `middleware`.\n*\n* The first value in `input` is the main input value.\n* All other input values are the rest input values.\n* The values given to `callback` are the input values,\n* merged with every non-nullish output value.\n*\n* * if `middleware` throws an error,\n* returns a promise that is rejected,\n* or calls the given `done` function with an error,\n* `callback` is called with that error\n* * if `middleware` returns a value or returns a promise that is resolved,\n* that value is the main output value\n* * if `middleware` calls `done`,\n* all non-nullish values except for the first one (the error) overwrite the\n* output values\n*\n* @param {Middleware} middleware\n* Function to wrap.\n* @param {Callback} callback\n* Callback called with the output of `middleware`.\n* @returns {Run}\n* Wrapped middleware.\n*/\nfunction wrap(middleware, callback) {\n /** @type {boolean} */\n let called;\n return wrapped;\n /**\n * Call `middleware`.\n * @this {any}\n * @param {Array<any>} parameters\n * @returns {void}\n */\n function wrapped(...parameters) {\n const fnExpectsCallback = middleware.length > parameters.length;\n /** @type {any} */\n let result;\n if (fnExpectsCallback) parameters.push(done);\n try {\n result = middleware.apply(this, parameters);\n } catch (error) {\n const exception = error;\n if (fnExpectsCallback && called) throw exception;\n return done(exception);\n }\n if (!fnExpectsCallback) if (result && result.then && typeof result.then === \"function\") result.then(then, done);\n else if (result instanceof Error) done(result);\n else then(result);\n }\n /**\n * Call `callback`, only once.\n *\n * @type {Callback}\n */\n function done(error, ...output) {\n if (!called) {\n called = true;\n callback(error, ...output);\n }\n }\n /**\n * Call `done` with one value.\n *\n * @param {any} [value]\n */\n function then(value) {\n done(null, value);\n }\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/unist-util-stringify-position@4.0.0/node_modules/unist-util-stringify-position/lib/index.js\n/**\n* @typedef {import('unist').Node} Node\n* @typedef {import('unist').Point} Point\n* @typedef {import('unist').Position} Position\n*/\n/**\n* @typedef NodeLike\n* @property {string} type\n* @property {PositionLike | null | undefined} [position]\n*\n* @typedef PointLike\n* @property {number | null | undefined} [line]\n* @property {number | null | undefined} [column]\n* @property {number | null | undefined} [offset]\n*\n* @typedef PositionLike\n* @property {PointLike | null | undefined} [start]\n* @property {PointLike | null | undefined} [end]\n*/\n/**\n* Serialize the positional info of a point, position (start and end points),\n* or node.\n*\n* @param {Node | NodeLike | Point | PointLike | Position | PositionLike | null | undefined} [value]\n* Node, position, or point.\n* @returns {string}\n* Pretty printed positional info of a node (`string`).\n*\n* In the format of a range `ls:cs-le:ce` (when given `node` or `position`)\n* or a point `l:c` (when given `point`), where `l` stands for line, `c` for\n* column, `s` for `start`, and `e` for end.\n* An empty string (`''`) is returned if the given value is neither `node`,\n* `position`, nor `point`.\n*/\nfunction stringifyPosition(value) {\n if (!value || typeof value !== \"object\") return \"\";\n if (\"position\" in value || \"type\" in value) return position$2(value.position);\n if (\"start\" in value || \"end\" in value) return position$2(value);\n if (\"line\" in value || \"column\" in value) return point$2(value);\n return \"\";\n}\n/**\n* @param {Point | PointLike | null | undefined} point\n* @returns {string}\n*/\nfunction point$2(point$3) {\n return index(point$3 && point$3.line) + \":\" + index(point$3 && point$3.column);\n}\n/**\n* @param {Position | PositionLike | null | undefined} pos\n* @returns {string}\n*/\nfunction position$2(pos) {\n return point$2(pos && pos.start) + \"-\" + point$2(pos && pos.end);\n}\n/**\n* @param {number | null | undefined} value\n* @returns {number}\n*/\nfunction index(value) {\n return value && typeof value === \"number\" ? value : 1;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile-message@4.0.3/node_modules/vfile-message/lib/index.js\n/**\n* @import {Node, Point, Position} from 'unist'\n*/\n/**\n* @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n*\n* @typedef Options\n* Configuration.\n* @property {Array<Node> | null | undefined} [ancestors]\n* Stack of (inclusive) ancestor nodes surrounding the message (optional).\n* @property {Error | null | undefined} [cause]\n* Original error cause of the message (optional).\n* @property {Point | Position | null | undefined} [place]\n* Place of message (optional).\n* @property {string | null | undefined} [ruleId]\n* Category of message (optional, example: `'my-rule'`).\n* @property {string | null | undefined} [source]\n* Namespace of who sent the message (optional, example: `'my-package'`).\n*/\n/**\n* Message.\n*/\nvar VFileMessage = class extends Error {\n /**\n * Create a message for `reason`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {Options | null | undefined} [options]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | Options | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns\n * Instance of `VFileMessage`.\n */\n constructor(causeOrReason, optionsOrParentOrPlace, origin) {\n super();\n if (typeof optionsOrParentOrPlace === \"string\") {\n origin = optionsOrParentOrPlace;\n optionsOrParentOrPlace = void 0;\n }\n /** @type {string} */\n let reason = \"\";\n /** @type {Options} */\n let options = {};\n let legacyCause = false;\n if (optionsOrParentOrPlace) if (\"line\" in optionsOrParentOrPlace && \"column\" in optionsOrParentOrPlace) options = { place: optionsOrParentOrPlace };\n else if (\"start\" in optionsOrParentOrPlace && \"end\" in optionsOrParentOrPlace) options = { place: optionsOrParentOrPlace };\n else if (\"type\" in optionsOrParentOrPlace) options = {\n ancestors: [optionsOrParentOrPlace],\n place: optionsOrParentOrPlace.position\n };\n else options = { ...optionsOrParentOrPlace };\n if (typeof causeOrReason === \"string\") reason = causeOrReason;\n else if (!options.cause && causeOrReason) {\n legacyCause = true;\n reason = causeOrReason.message;\n options.cause = causeOrReason;\n }\n if (!options.ruleId && !options.source && typeof origin === \"string\") {\n const index$1 = origin.indexOf(\":\");\n if (index$1 === -1) options.ruleId = origin;\n else {\n options.source = origin.slice(0, index$1);\n options.ruleId = origin.slice(index$1 + 1);\n }\n }\n if (!options.place && options.ancestors && options.ancestors) {\n const parent = options.ancestors[options.ancestors.length - 1];\n if (parent) options.place = parent.position;\n }\n const start = options.place && \"start\" in options.place ? options.place.start : options.place;\n /**\n * Stack of ancestor nodes surrounding the message.\n *\n * @type {Array<Node> | undefined}\n */\n this.ancestors = options.ancestors || void 0;\n /**\n * Original error cause of the message.\n *\n * @type {Error | undefined}\n */\n this.cause = options.cause || void 0;\n /**\n * Starting column of message.\n *\n * @type {number | undefined}\n */\n this.column = start ? start.column : void 0;\n /**\n * State of problem.\n *\n * * `true` — error, file not usable\n * * `false` — warning, change may be needed\n * * `undefined` — change likely not needed\n *\n * @type {boolean | null | undefined}\n */\n this.fatal = void 0;\n /**\n * Path of a file (used throughout the `VFile` ecosystem).\n *\n * @type {string | undefined}\n */\n this.file = \"\";\n /**\n * Reason for message.\n *\n * @type {string}\n */\n this.message = reason;\n /**\n * Starting line of error.\n *\n * @type {number | undefined}\n */\n this.line = start ? start.line : void 0;\n /**\n * Serialized positional info of message.\n *\n * On normal errors, this would be something like `ParseError`, buit in\n * `VFile` messages we use this space to show where an error happened.\n */\n this.name = stringifyPosition(options.place) || \"1:1\";\n /**\n * Place of message.\n *\n * @type {Point | Position | undefined}\n */\n this.place = options.place || void 0;\n /**\n * Reason for message, should use markdown.\n *\n * @type {string}\n */\n this.reason = this.message;\n /**\n * Category of message (example: `'my-rule'`).\n *\n * @type {string | undefined}\n */\n this.ruleId = options.ruleId || void 0;\n /**\n * Namespace of message (example: `'my-package'`).\n *\n * @type {string | undefined}\n */\n this.source = options.source || void 0;\n /**\n * Stack of message.\n *\n * This is used by normal errors to show where something happened in\n * programming code, irrelevant for `VFile` messages,\n *\n * @type {string}\n */\n this.stack = legacyCause && options.cause && typeof options.cause.stack === \"string\" ? options.cause.stack : \"\";\n /**\n * Specify the source value that’s being reported, which is deemed\n * incorrect.\n *\n * @type {string | undefined}\n */\n this.actual = void 0;\n /**\n * Suggest acceptable values that can be used instead of `actual`.\n *\n * @type {Array<string> | undefined}\n */\n this.expected = void 0;\n /**\n * Long form description of the message (you should use markdown).\n *\n * @type {string | undefined}\n */\n this.note = void 0;\n /**\n * Link to docs for the message.\n *\n * > 👉 **Note**: this must be an absolute URL that can be passed as `x`\n * > to `new URL(x)`.\n *\n * @type {string | undefined}\n */\n this.url = void 0;\n }\n};\nVFileMessage.prototype.file = \"\";\nVFileMessage.prototype.name = \"\";\nVFileMessage.prototype.reason = \"\";\nVFileMessage.prototype.message = \"\";\nVFileMessage.prototype.stack = \"\";\nVFileMessage.prototype.column = void 0;\nVFileMessage.prototype.line = void 0;\nVFileMessage.prototype.ancestors = void 0;\nVFileMessage.prototype.cause = void 0;\nVFileMessage.prototype.fatal = void 0;\nVFileMessage.prototype.place = void 0;\nVFileMessage.prototype.ruleId = void 0;\nVFileMessage.prototype.source = void 0;\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minpath.browser.js\nconst minpath = {\n basename,\n dirname,\n extname,\n join,\n sep: \"/\"\n};\n/**\n* Get the basename from a path.\n*\n* @param {string} path\n* File path.\n* @param {string | null | undefined} [extname]\n* Extension to strip.\n* @returns {string}\n* Stem or basename.\n*/\nfunction basename(path, extname$1) {\n if (extname$1 !== void 0 && typeof extname$1 !== \"string\") throw new TypeError(\"\\\"ext\\\" argument must be a string\");\n assertPath$1(path);\n let start = 0;\n let end = -1;\n let index$1 = path.length;\n /** @type {boolean | undefined} */\n let seenNonSlash;\n if (extname$1 === void 0 || extname$1.length === 0 || extname$1.length > path.length) {\n while (index$1--) if (path.codePointAt(index$1) === 47) {\n if (seenNonSlash) {\n start = index$1 + 1;\n break;\n }\n } else if (end < 0) {\n seenNonSlash = true;\n end = index$1 + 1;\n }\n return end < 0 ? \"\" : path.slice(start, end);\n }\n if (extname$1 === path) return \"\";\n let firstNonSlashEnd = -1;\n let extnameIndex = extname$1.length - 1;\n while (index$1--) if (path.codePointAt(index$1) === 47) {\n if (seenNonSlash) {\n start = index$1 + 1;\n break;\n }\n } else {\n if (firstNonSlashEnd < 0) {\n seenNonSlash = true;\n firstNonSlashEnd = index$1 + 1;\n }\n if (extnameIndex > -1) if (path.codePointAt(index$1) === extname$1.codePointAt(extnameIndex--)) {\n if (extnameIndex < 0) end = index$1;\n } else {\n extnameIndex = -1;\n end = firstNonSlashEnd;\n }\n }\n if (start === end) end = firstNonSlashEnd;\n else if (end < 0) end = path.length;\n return path.slice(start, end);\n}\n/**\n* Get the dirname from a path.\n*\n* @param {string} path\n* File path.\n* @returns {string}\n* File path.\n*/\nfunction dirname(path) {\n assertPath$1(path);\n if (path.length === 0) return \".\";\n let end = -1;\n let index$1 = path.length;\n /** @type {boolean | undefined} */\n let unmatchedSlash;\n while (--index$1) if (path.codePointAt(index$1) === 47) {\n if (unmatchedSlash) {\n end = index$1;\n break;\n }\n } else if (!unmatchedSlash) unmatchedSlash = true;\n return end < 0 ? path.codePointAt(0) === 47 ? \"/\" : \".\" : end === 1 && path.codePointAt(0) === 47 ? \"//\" : path.slice(0, end);\n}\n/**\n* Get an extname from a path.\n*\n* @param {string} path\n* File path.\n* @returns {string}\n* Extname.\n*/\nfunction extname(path) {\n assertPath$1(path);\n let index$1 = path.length;\n let end = -1;\n let startPart = 0;\n let startDot = -1;\n let preDotState = 0;\n /** @type {boolean | undefined} */\n let unmatchedSlash;\n while (index$1--) {\n const code = path.codePointAt(index$1);\n if (code === 47) {\n if (unmatchedSlash) {\n startPart = index$1 + 1;\n break;\n }\n continue;\n }\n if (end < 0) {\n unmatchedSlash = true;\n end = index$1 + 1;\n }\n if (code === 46) {\n if (startDot < 0) startDot = index$1;\n else if (preDotState !== 1) preDotState = 1;\n } else if (startDot > -1) preDotState = -1;\n }\n if (startDot < 0 || end < 0 || preDotState === 0 || preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) return \"\";\n return path.slice(startDot, end);\n}\n/**\n* Join segments from a path.\n*\n* @param {Array<string>} segments\n* Path segments.\n* @returns {string}\n* File path.\n*/\nfunction join(...segments) {\n let index$1 = -1;\n /** @type {string | undefined} */\n let joined;\n while (++index$1 < segments.length) {\n assertPath$1(segments[index$1]);\n if (segments[index$1]) joined = joined === void 0 ? segments[index$1] : joined + \"/\" + segments[index$1];\n }\n return joined === void 0 ? \".\" : normalize$1(joined);\n}\n/**\n* Normalize a basic file path.\n*\n* @param {string} path\n* File path.\n* @returns {string}\n* File path.\n*/\nfunction normalize$1(path) {\n assertPath$1(path);\n const absolute = path.codePointAt(0) === 47;\n let value = normalizeString(path, !absolute);\n if (value.length === 0 && !absolute) value = \".\";\n if (value.length > 0 && path.codePointAt(path.length - 1) === 47) value += \"/\";\n return absolute ? \"/\" + value : value;\n}\n/**\n* Resolve `.` and `..` elements in a path with directory names.\n*\n* @param {string} path\n* File path.\n* @param {boolean} allowAboveRoot\n* Whether `..` can move above root.\n* @returns {string}\n* File path.\n*/\nfunction normalizeString(path, allowAboveRoot) {\n let result = \"\";\n let lastSegmentLength = 0;\n let lastSlash = -1;\n let dots = 0;\n let index$1 = -1;\n /** @type {number | undefined} */\n let code;\n /** @type {number} */\n let lastSlashIndex;\n while (++index$1 <= path.length) {\n if (index$1 < path.length) code = path.codePointAt(index$1);\n else if (code === 47) break;\n else code = 47;\n if (code === 47) {\n if (lastSlash === index$1 - 1 || dots === 1) {} else if (lastSlash !== index$1 - 1 && dots === 2) {\n if (result.length < 2 || lastSegmentLength !== 2 || result.codePointAt(result.length - 1) !== 46 || result.codePointAt(result.length - 2) !== 46) {\n if (result.length > 2) {\n lastSlashIndex = result.lastIndexOf(\"/\");\n if (lastSlashIndex !== result.length - 1) {\n if (lastSlashIndex < 0) {\n result = \"\";\n lastSegmentLength = 0;\n } else {\n result = result.slice(0, lastSlashIndex);\n lastSegmentLength = result.length - 1 - result.lastIndexOf(\"/\");\n }\n lastSlash = index$1;\n dots = 0;\n continue;\n }\n } else if (result.length > 0) {\n result = \"\";\n lastSegmentLength = 0;\n lastSlash = index$1;\n dots = 0;\n continue;\n }\n }\n if (allowAboveRoot) {\n result = result.length > 0 ? result + \"/..\" : \"..\";\n lastSegmentLength = 2;\n }\n } else {\n if (result.length > 0) result += \"/\" + path.slice(lastSlash + 1, index$1);\n else result = path.slice(lastSlash + 1, index$1);\n lastSegmentLength = index$1 - lastSlash - 1;\n }\n lastSlash = index$1;\n dots = 0;\n } else if (code === 46 && dots > -1) dots++;\n else dots = -1;\n }\n return result;\n}\n/**\n* Make sure `path` is a string.\n*\n* @param {string} path\n* File path.\n* @returns {asserts path is string}\n* Nothing.\n*/\nfunction assertPath$1(path) {\n if (typeof path !== \"string\") throw new TypeError(\"Path must be a string. Received \" + JSON.stringify(path));\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minproc.browser.js\nconst minproc = { cwd };\nfunction cwd() {\n return \"/\";\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.shared.js\n/**\n* Checks if a value has the shape of a WHATWG URL object.\n*\n* Using a symbol or instanceof would not be able to recognize URL objects\n* coming from other implementations (e.g. in Electron), so instead we are\n* checking some well known properties for a lack of a better test.\n*\n* We use `href` and `protocol` as they are the only properties that are\n* easy to retrieve and calculate due to the lazy nature of the getters.\n*\n* We check for auth attribute to distinguish legacy url instance with\n* WHATWG URL instance.\n*\n* @param {unknown} fileUrlOrPath\n* File path or URL.\n* @returns {fileUrlOrPath is URL}\n* Whether it’s a URL.\n*/\nfunction isUrl(fileUrlOrPath) {\n return Boolean(fileUrlOrPath !== null && typeof fileUrlOrPath === \"object\" && \"href\" in fileUrlOrPath && fileUrlOrPath.href && \"protocol\" in fileUrlOrPath && fileUrlOrPath.protocol && fileUrlOrPath.auth === void 0);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/minurl.browser.js\n/**\n* @param {URL | string} path\n* File URL.\n* @returns {string}\n* File URL.\n*/\nfunction urlToPath(path) {\n if (typeof path === \"string\") path = new URL(path);\n else if (!isUrl(path)) {\n /** @type {NodeJS.ErrnoException} */\n const error = /* @__PURE__ */ new TypeError(\"The \\\"path\\\" argument must be of type string or an instance of URL. Received `\" + path + \"`\");\n error.code = \"ERR_INVALID_ARG_TYPE\";\n throw error;\n }\n if (path.protocol !== \"file:\") {\n /** @type {NodeJS.ErrnoException} */\n const error = /* @__PURE__ */ new TypeError(\"The URL must be of scheme file\");\n error.code = \"ERR_INVALID_URL_SCHEME\";\n throw error;\n }\n return getPathFromURLPosix(path);\n}\n/**\n* Get a path from a POSIX URL.\n*\n* @param {URL} url\n* URL.\n* @returns {string}\n* File path.\n*/\nfunction getPathFromURLPosix(url) {\n if (url.hostname !== \"\") {\n /** @type {NodeJS.ErrnoException} */\n const error = /* @__PURE__ */ new TypeError(\"File URL host must be \\\"localhost\\\" or empty on darwin\");\n error.code = \"ERR_INVALID_FILE_URL_HOST\";\n throw error;\n }\n const pathname = url.pathname;\n let index$1 = -1;\n while (++index$1 < pathname.length) if (pathname.codePointAt(index$1) === 37 && pathname.codePointAt(index$1 + 1) === 50) {\n const third = pathname.codePointAt(index$1 + 2);\n if (third === 70 || third === 102) {\n /** @type {NodeJS.ErrnoException} */\n const error = /* @__PURE__ */ new TypeError(\"File URL path must not include encoded / characters\");\n error.code = \"ERR_INVALID_FILE_URL_PATH\";\n throw error;\n }\n }\n return decodeURIComponent(pathname);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile@6.0.3/node_modules/vfile/lib/index.js\n/**\n* @import {Node, Point, Position} from 'unist'\n* @import {Options as MessageOptions} from 'vfile-message'\n* @import {Compatible, Data, Map, Options, Value} from 'vfile'\n*/\n/**\n* @typedef {object & {type: string, position?: Position | undefined}} NodeLike\n*/\n/**\n* Order of setting (least specific to most), we need this because otherwise\n* `{stem: 'a', path: '~/b.js'}` would throw, as a path is needed before a\n* stem can be set.\n*/\nconst order = [\n \"history\",\n \"path\",\n \"basename\",\n \"stem\",\n \"extname\",\n \"dirname\"\n];\nvar VFile = class {\n /**\n * Create a new virtual file.\n *\n * `options` is treated as:\n *\n * * `string` or `Uint8Array` — `{value: options}`\n * * `URL` — `{path: options}`\n * * `VFile` — shallow copies its data over to the new file\n * * `object` — all fields are shallow copied over to the new file\n *\n * Path related fields are set in the following order (least specific to\n * most specific): `history`, `path`, `basename`, `stem`, `extname`,\n * `dirname`.\n *\n * You cannot set `dirname` or `extname` without setting either `history`,\n * `path`, `basename`, or `stem` too.\n *\n * @param {Compatible | null | undefined} [value]\n * File value.\n * @returns\n * New instance.\n */\n constructor(value) {\n /** @type {Options | VFile} */\n let options;\n if (!value) options = {};\n else if (isUrl(value)) options = { path: value };\n else if (typeof value === \"string\" || isUint8Array$1(value)) options = { value };\n else options = value;\n /**\n * Base of `path` (default: `process.cwd()` or `'/'` in browsers).\n *\n * @type {string}\n */\n this.cwd = \"cwd\" in options ? \"\" : minproc.cwd();\n /**\n * Place to store custom info (default: `{}`).\n *\n * It’s OK to store custom data directly on the file but moving it to\n * `data` is recommended.\n *\n * @type {Data}\n */\n this.data = {};\n /**\n * List of file paths the file moved between.\n *\n * The first is the original path and the last is the current path.\n *\n * @type {Array<string>}\n */\n this.history = [];\n /**\n * List of messages associated with the file.\n *\n * @type {Array<VFileMessage>}\n */\n this.messages = [];\n /**\n * Raw value.\n *\n * @type {Value}\n */\n this.value;\n /**\n * Source map.\n *\n * This type is equivalent to the `RawSourceMap` type from the `source-map`\n * module.\n *\n * @type {Map | null | undefined}\n */\n this.map;\n /**\n * Custom, non-string, compiled, representation.\n *\n * This is used by unified to store non-string results.\n * One example is when turning markdown into React nodes.\n *\n * @type {unknown}\n */\n this.result;\n /**\n * Whether a file was saved to disk.\n *\n * This is used by vfile reporters.\n *\n * @type {boolean}\n */\n this.stored;\n let index$1 = -1;\n while (++index$1 < order.length) {\n const field$1 = order[index$1];\n if (field$1 in options && options[field$1] !== void 0 && options[field$1] !== null) this[field$1] = field$1 === \"history\" ? [...options[field$1]] : options[field$1];\n }\n /** @type {string} */\n let field;\n for (field in options) if (!order.includes(field)) this[field] = options[field];\n }\n /**\n * Get the basename (including extname) (example: `'index.min.js'`).\n *\n * @returns {string | undefined}\n * Basename.\n */\n get basename() {\n return typeof this.path === \"string\" ? minpath.basename(this.path) : void 0;\n }\n /**\n * Set basename (including extname) (`'index.min.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} basename\n * Basename.\n * @returns {undefined}\n * Nothing.\n */\n set basename(basename$1) {\n assertNonEmpty(basename$1, \"basename\");\n assertPart(basename$1, \"basename\");\n this.path = minpath.join(this.dirname || \"\", basename$1);\n }\n /**\n * Get the parent path (example: `'~'`).\n *\n * @returns {string | undefined}\n * Dirname.\n */\n get dirname() {\n return typeof this.path === \"string\" ? minpath.dirname(this.path) : void 0;\n }\n /**\n * Set the parent path (example: `'~'`).\n *\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} dirname\n * Dirname.\n * @returns {undefined}\n * Nothing.\n */\n set dirname(dirname$1) {\n assertPath(this.basename, \"dirname\");\n this.path = minpath.join(dirname$1 || \"\", this.basename);\n }\n /**\n * Get the extname (including dot) (example: `'.js'`).\n *\n * @returns {string | undefined}\n * Extname.\n */\n get extname() {\n return typeof this.path === \"string\" ? minpath.extname(this.path) : void 0;\n }\n /**\n * Set the extname (including dot) (example: `'.js'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be set if there’s no `path` yet.\n *\n * @param {string | undefined} extname\n * Extname.\n * @returns {undefined}\n * Nothing.\n */\n set extname(extname$1) {\n assertPart(extname$1, \"extname\");\n assertPath(this.dirname, \"extname\");\n if (extname$1) {\n if (extname$1.codePointAt(0) !== 46) throw new Error(\"`extname` must start with `.`\");\n if (extname$1.includes(\".\", 1)) throw new Error(\"`extname` cannot contain multiple dots\");\n }\n this.path = minpath.join(this.dirname, this.stem + (extname$1 || \"\"));\n }\n /**\n * Get the full path (example: `'~/index.min.js'`).\n *\n * @returns {string}\n * Path.\n */\n get path() {\n return this.history[this.history.length - 1];\n }\n /**\n * Set the full path (example: `'~/index.min.js'`).\n *\n * Cannot be nullified.\n * You can set a file URL (a `URL` object with a `file:` protocol) which will\n * be turned into a path with `url.fileURLToPath`.\n *\n * @param {URL | string} path\n * Path.\n * @returns {undefined}\n * Nothing.\n */\n set path(path) {\n if (isUrl(path)) path = urlToPath(path);\n assertNonEmpty(path, \"path\");\n if (this.path !== path) this.history.push(path);\n }\n /**\n * Get the stem (basename w/o extname) (example: `'index.min'`).\n *\n * @returns {string | undefined}\n * Stem.\n */\n get stem() {\n return typeof this.path === \"string\" ? minpath.basename(this.path, this.extname) : void 0;\n }\n /**\n * Set the stem (basename w/o extname) (example: `'index.min'`).\n *\n * Cannot contain path separators (`'/'` on unix, macOS, and browsers, `'\\'`\n * on windows).\n * Cannot be nullified (use `file.path = file.dirname` instead).\n *\n * @param {string} stem\n * Stem.\n * @returns {undefined}\n * Nothing.\n */\n set stem(stem) {\n assertNonEmpty(stem, \"stem\");\n assertPart(stem, \"stem\");\n this.path = minpath.join(this.dirname || \"\", stem + (this.extname || \"\"));\n }\n /**\n * Create a fatal message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `true` (error; file not usable)\n * and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {never}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {never}\n * Never.\n * @throws {VFileMessage}\n * Message.\n */\n fail(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);\n message.fatal = true;\n throw message;\n }\n /**\n * Create an info message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `undefined` (info; change\n * likely not needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n info(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = this.message(causeOrReason, optionsOrParentOrPlace, origin);\n message.fatal = void 0;\n return message;\n }\n /**\n * Create a message for `reason` associated with the file.\n *\n * The `fatal` field of the message is set to `false` (warning; change may be\n * needed) and the `file` field is set to the current file path.\n * The message is added to the `messages` field on `file`.\n *\n * > 🪦 **Note**: also has obsolete signatures.\n *\n * @overload\n * @param {string} reason\n * @param {MessageOptions | null | undefined} [options]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {string} reason\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Node | NodeLike | null | undefined} parent\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {Point | Position | null | undefined} place\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @overload\n * @param {Error | VFileMessage} cause\n * @param {string | null | undefined} [origin]\n * @returns {VFileMessage}\n *\n * @param {Error | VFileMessage | string} causeOrReason\n * Reason for message, should use markdown.\n * @param {Node | NodeLike | MessageOptions | Point | Position | string | null | undefined} [optionsOrParentOrPlace]\n * Configuration (optional).\n * @param {string | null | undefined} [origin]\n * Place in code where the message originates (example:\n * `'my-package:my-rule'` or `'my-rule'`).\n * @returns {VFileMessage}\n * Message.\n */\n message(causeOrReason, optionsOrParentOrPlace, origin) {\n const message = new VFileMessage(causeOrReason, optionsOrParentOrPlace, origin);\n if (this.path) {\n message.name = this.path + \":\" + message.name;\n message.file = this.path;\n }\n message.fatal = false;\n this.messages.push(message);\n return message;\n }\n /**\n * Serialize the file.\n *\n * > **Note**: which encodings are supported depends on the engine.\n * > For info on Node.js, see:\n * > <https://nodejs.org/api/util.html#whatwg-supported-encodings>.\n *\n * @param {string | null | undefined} [encoding='utf8']\n * Character encoding to understand `value` as when it’s a `Uint8Array`\n * (default: `'utf-8'`).\n * @returns {string}\n * Serialized file.\n */\n toString(encoding) {\n if (this.value === void 0) return \"\";\n if (typeof this.value === \"string\") return this.value;\n return new TextDecoder(encoding || void 0).decode(this.value);\n }\n};\n/**\n* Assert that `part` is not a path (as in, does not contain `path.sep`).\n*\n* @param {string | null | undefined} part\n* File path part.\n* @param {string} name\n* Part name.\n* @returns {undefined}\n* Nothing.\n*/\nfunction assertPart(part, name) {\n if (part && part.includes(minpath.sep)) throw new Error(\"`\" + name + \"` cannot be a path: did not expect `\" + minpath.sep + \"`\");\n}\n/**\n* Assert that `part` is not empty.\n*\n* @param {string | undefined} part\n* Thing.\n* @param {string} name\n* Part name.\n* @returns {asserts part is string}\n* Nothing.\n*/\nfunction assertNonEmpty(part, name) {\n if (!part) throw new Error(\"`\" + name + \"` cannot be empty\");\n}\n/**\n* Assert `path` exists.\n*\n* @param {string | undefined} path\n* Path.\n* @param {string} name\n* Dependency name.\n* @returns {asserts path is string}\n* Nothing.\n*/\nfunction assertPath(path, name) {\n if (!path) throw new Error(\"Setting `\" + name + \"` requires `path` to be set too\");\n}\n/**\n* Assert `value` is an `Uint8Array`.\n*\n* @param {unknown} value\n* thing.\n* @returns {value is Uint8Array}\n* Whether `value` is an `Uint8Array`.\n*/\nfunction isUint8Array$1(value) {\n return Boolean(value && typeof value === \"object\" && \"byteLength\" in value && \"byteOffset\" in value);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/callable-instance.js\nconst CallableInstance = (function(property) {\n const proto$1 = this.constructor.prototype;\n const value = proto$1[property];\n /** @type {(...parameters: Array<unknown>) => unknown} */\n const apply = function() {\n return value.apply(apply, arguments);\n };\n Object.setPrototypeOf(apply, proto$1);\n return apply;\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.js\n/**\n* @typedef {import('trough').Pipeline} Pipeline\n*\n* @typedef {import('unist').Node} Node\n*\n* @typedef {import('vfile').Compatible} Compatible\n* @typedef {import('vfile').Value} Value\n*\n* @typedef {import('../index.js').CompileResultMap} CompileResultMap\n* @typedef {import('../index.js').Data} Data\n* @typedef {import('../index.js').Settings} Settings\n*/\n/**\n* @typedef {CompileResultMap[keyof CompileResultMap]} CompileResults\n* Acceptable results from compilers.\n*\n* To register custom results, add them to\n* {@linkcode CompileResultMap}.\n*/\n/**\n* @template {Node} [Tree=Node]\n* The node that the compiler receives (default: `Node`).\n* @template {CompileResults} [Result=CompileResults]\n* The thing that the compiler yields (default: `CompileResults`).\n* @callback Compiler\n* A **compiler** handles the compiling of a syntax tree to something else\n* (in most cases, text) (TypeScript type).\n*\n* It is used in the stringify phase and called with a {@linkcode Node}\n* and {@linkcode VFile} representation of the document to compile.\n* It should return the textual representation of the given tree (typically\n* `string`).\n*\n* > **Note**: unified typically compiles by serializing: most compilers\n* > return `string` (or `Uint8Array`).\n* > Some compilers, such as the one configured with\n* > [`rehype-react`][rehype-react], return other values (in this case, a\n* > React tree).\n* > If you’re using a compiler that doesn’t serialize, expect different\n* > result values.\n* >\n* > To register custom results in TypeScript, add them to\n* > {@linkcode CompileResultMap}.\n*\n* [rehype-react]: https://github.com/rehypejs/rehype-react\n* @param {Tree} tree\n* Tree to compile.\n* @param {VFile} file\n* File associated with `tree`.\n* @returns {Result}\n* New content: compiled text (`string` or `Uint8Array`, for `file.value`) or\n* something else (for `file.result`).\n*/\n/**\n* @template {Node} [Tree=Node]\n* The node that the parser yields (default: `Node`)\n* @callback Parser\n* A **parser** handles the parsing of text to a syntax tree.\n*\n* It is used in the parse phase and is called with a `string` and\n* {@linkcode VFile} of the document to parse.\n* It must return the syntax tree representation of the given file\n* ({@linkcode Node}).\n* @param {string} document\n* Document to parse.\n* @param {VFile} file\n* File associated with `document`.\n* @returns {Tree}\n* Node representing the given file.\n*/\n/**\n* @typedef {(\n* Plugin<Array<any>, any, any> |\n* PluginTuple<Array<any>, any, any> |\n* Preset\n* )} Pluggable\n* Union of the different ways to add plugins and settings.\n*/\n/**\n* @typedef {Array<Pluggable>} PluggableList\n* List of plugins and presets.\n*/\n/**\n* @template {Array<unknown>} [PluginParameters=[]]\n* Arguments passed to the plugin (default: `[]`, the empty tuple).\n* @template {Node | string | undefined} [Input=Node]\n* Value that is expected as input (default: `Node`).\n*\n* * If the plugin returns a {@linkcode Transformer}, this\n* should be the node it expects.\n* * If the plugin sets a {@linkcode Parser}, this should be\n* `string`.\n* * If the plugin sets a {@linkcode Compiler}, this should be the\n* node it expects.\n* @template [Output=Input]\n* Value that is yielded as output (default: `Input`).\n*\n* * If the plugin returns a {@linkcode Transformer}, this\n* should be the node that that yields.\n* * If the plugin sets a {@linkcode Parser}, this should be the\n* node that it yields.\n* * If the plugin sets a {@linkcode Compiler}, this should be\n* result it yields.\n* @typedef {(\n* (this: Processor, ...parameters: PluginParameters) =>\n* Input extends string ? // Parser.\n* Output extends Node | undefined ? undefined | void : never :\n* Output extends CompileResults ? // Compiler.\n* Input extends Node | undefined ? undefined | void : never :\n* Transformer<\n* Input extends Node ? Input : Node,\n* Output extends Node ? Output : Node\n* > | undefined | void\n* )} Plugin\n* Single plugin.\n*\n* Plugins configure the processors they are applied on in the following\n* ways:\n*\n* * they change the processor, such as the parser, the compiler, or by\n* configuring data\n* * they specify how to handle trees and files\n*\n* In practice, they are functions that can receive options and configure the\n* processor (`this`).\n*\n* > **Note**: plugins are called when the processor is *frozen*, not when\n* > they are applied.\n*/\n/**\n* Tuple of a plugin and its configuration.\n*\n* The first item is a plugin, the rest are its parameters.\n*\n* @template {Array<unknown>} [TupleParameters=[]]\n* Arguments passed to the plugin (default: `[]`, the empty tuple).\n* @template {Node | string | undefined} [Input=undefined]\n* Value that is expected as input (optional).\n*\n* * If the plugin returns a {@linkcode Transformer}, this\n* should be the node it expects.\n* * If the plugin sets a {@linkcode Parser}, this should be\n* `string`.\n* * If the plugin sets a {@linkcode Compiler}, this should be the\n* node it expects.\n* @template [Output=undefined] (optional).\n* Value that is yielded as output.\n*\n* * If the plugin returns a {@linkcode Transformer}, this\n* should be the node that that yields.\n* * If the plugin sets a {@linkcode Parser}, this should be the\n* node that it yields.\n* * If the plugin sets a {@linkcode Compiler}, this should be\n* result it yields.\n* @typedef {(\n* [\n* plugin: Plugin<TupleParameters, Input, Output>,\n* ...parameters: TupleParameters\n* ]\n* )} PluginTuple\n*/\n/**\n* @typedef Preset\n* Sharable configuration.\n*\n* They can contain plugins and settings.\n* @property {PluggableList | undefined} [plugins]\n* List of plugins and presets (optional).\n* @property {Settings | undefined} [settings]\n* Shared settings for parsers and compilers (optional).\n*/\n/**\n* @template {VFile} [File=VFile]\n* The file that the callback receives (default: `VFile`).\n* @callback ProcessCallback\n* Callback called when the process is done.\n*\n* Called with either an error or a result.\n* @param {Error | undefined} [error]\n* Fatal error (optional).\n* @param {File | undefined} [file]\n* Processed file (optional).\n* @returns {undefined}\n* Nothing.\n*/\n/**\n* @template {Node} [Tree=Node]\n* The tree that the callback receives (default: `Node`).\n* @callback RunCallback\n* Callback called when transformers are done.\n*\n* Called with either an error or results.\n* @param {Error | undefined} [error]\n* Fatal error (optional).\n* @param {Tree | undefined} [tree]\n* Transformed tree (optional).\n* @param {VFile | undefined} [file]\n* File (optional).\n* @returns {undefined}\n* Nothing.\n*/\n/**\n* @template {Node} [Output=Node]\n* Node type that the transformer yields (default: `Node`).\n* @callback TransformCallback\n* Callback passed to transforms.\n*\n* If the signature of a `transformer` accepts a third argument, the\n* transformer may perform asynchronous operations, and must call it.\n* @param {Error | undefined} [error]\n* Fatal error to stop the process (optional).\n* @param {Output | undefined} [tree]\n* New, changed, tree (optional).\n* @param {VFile | undefined} [file]\n* New, changed, file (optional).\n* @returns {undefined}\n* Nothing.\n*/\n/**\n* @template {Node} [Input=Node]\n* Node type that the transformer expects (default: `Node`).\n* @template {Node} [Output=Input]\n* Node type that the transformer yields (default: `Input`).\n* @callback Transformer\n* Transformers handle syntax trees and files.\n*\n* They are functions that are called each time a syntax tree and file are\n* passed through the run phase.\n* When an error occurs in them (either because it’s thrown, returned,\n* rejected, or passed to `next`), the process stops.\n*\n* The run phase is handled by [`trough`][trough], see its documentation for\n* the exact semantics of these functions.\n*\n* > **Note**: you should likely ignore `next`: don’t accept it.\n* > it supports callback-style async work.\n* > But promises are likely easier to reason about.\n*\n* [trough]: https://github.com/wooorm/trough#function-fninput-next\n* @param {Input} tree\n* Tree to handle.\n* @param {VFile} file\n* File to handle.\n* @param {TransformCallback<Output>} next\n* Callback.\n* @returns {(\n* Promise<Output | undefined | void> |\n* Promise<never> | // For some reason this is needed separately.\n* Output |\n* Error |\n* undefined |\n* void\n* )}\n* If you accept `next`, nothing.\n* Otherwise:\n*\n* * `Error` — fatal error to stop the process\n* * `Promise<undefined>` or `undefined` — the next transformer keeps using\n* same tree\n* * `Promise<Node>` or `Node` — new, changed, tree\n*/\n/**\n* @template {Node | undefined} ParseTree\n* Output of `parse`.\n* @template {Node | undefined} HeadTree\n* Input for `run`.\n* @template {Node | undefined} TailTree\n* Output for `run`.\n* @template {Node | undefined} CompileTree\n* Input of `stringify`.\n* @template {CompileResults | undefined} CompileResult\n* Output of `stringify`.\n* @template {Node | string | undefined} Input\n* Input of plugin.\n* @template Output\n* Output of plugin (optional).\n* @typedef {(\n* Input extends string\n* ? Output extends Node | undefined\n* ? // Parser.\n* Processor<\n* Output extends undefined ? ParseTree : Output,\n* HeadTree,\n* TailTree,\n* CompileTree,\n* CompileResult\n* >\n* : // Unknown.\n* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n* : Output extends CompileResults\n* ? Input extends Node | undefined\n* ? // Compiler.\n* Processor<\n* ParseTree,\n* HeadTree,\n* TailTree,\n* Input extends undefined ? CompileTree : Input,\n* Output extends undefined ? CompileResult : Output\n* >\n* : // Unknown.\n* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n* : Input extends Node | undefined\n* ? Output extends Node | undefined\n* ? // Transform.\n* Processor<\n* ParseTree,\n* HeadTree extends undefined ? Input : HeadTree,\n* Output extends undefined ? TailTree : Output,\n* CompileTree,\n* CompileResult\n* >\n* : // Unknown.\n* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n* : // Unknown.\n* Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>\n* )} UsePlugin\n* Create a processor based on the input/output of a {@link Plugin plugin}.\n*/\n/**\n* @template {CompileResults | undefined} Result\n* Node type that the transformer yields.\n* @typedef {(\n* Result extends Value | undefined ?\n* VFile :\n* VFile & {result: Result}\n* )} VFileWithOutput\n* Type to generate a {@linkcode VFile} corresponding to a compiler result.\n*\n* If a result that is not acceptable on a `VFile` is used, that will\n* be stored on the `result` field of {@linkcode VFile}.\n*/\nvar import_extend = /* @__PURE__ */ __toESM(require_extend(), 1);\nconst own$5 = {}.hasOwnProperty;\n/**\n* @template {Node | undefined} [ParseTree=undefined]\n* Output of `parse` (optional).\n* @template {Node | undefined} [HeadTree=undefined]\n* Input for `run` (optional).\n* @template {Node | undefined} [TailTree=undefined]\n* Output for `run` (optional).\n* @template {Node | undefined} [CompileTree=undefined]\n* Input of `stringify` (optional).\n* @template {CompileResults | undefined} [CompileResult=undefined]\n* Output of `stringify` (optional).\n* @extends {CallableInstance<[], Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>>}\n*/\nvar Processor = class Processor extends CallableInstance {\n /**\n * Create a processor.\n */\n constructor() {\n super(\"copy\");\n /**\n * Compiler to use (deprecated).\n *\n * @deprecated\n * Use `compiler` instead.\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.Compiler = void 0;\n /**\n * Parser to use (deprecated).\n *\n * @deprecated\n * Use `parser` instead.\n * @type {(\n * Parser<ParseTree extends undefined ? Node : ParseTree> |\n * undefined\n * )}\n */\n this.Parser = void 0;\n /**\n * Internal list of configured plugins.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Array<PluginTuple<Array<unknown>>>}\n */\n this.attachers = [];\n /**\n * Compiler to use.\n *\n * @type {(\n * Compiler<\n * CompileTree extends undefined ? Node : CompileTree,\n * CompileResult extends undefined ? CompileResults : CompileResult\n * > |\n * undefined\n * )}\n */\n this.compiler = void 0;\n /**\n * Internal state to track where we are while freezing.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {number}\n */\n this.freezeIndex = -1;\n /**\n * Internal state to track whether we’re frozen.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {boolean | undefined}\n */\n this.frozen = void 0;\n /**\n * Internal state.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Data}\n */\n this.namespace = {};\n /**\n * Parser to use.\n *\n * @type {(\n * Parser<ParseTree extends undefined ? Node : ParseTree> |\n * undefined\n * )}\n */\n this.parser = void 0;\n /**\n * Internal list of configured transformers.\n *\n * @deprecated\n * This is a private internal property and should not be used.\n * @type {Pipeline}\n */\n this.transformers = trough();\n }\n /**\n * Copy a processor.\n *\n * @deprecated\n * This is a private internal method and should not be used.\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * New *unfrozen* processor ({@linkcode Processor}) that is\n * configured to work the same as its ancestor.\n * When the descendant processor is configured in the future it does not\n * affect the ancestral processor.\n */\n copy() {\n const destination = new Processor();\n let index$1 = -1;\n while (++index$1 < this.attachers.length) {\n const attacher = this.attachers[index$1];\n destination.use(...attacher);\n }\n destination.data((0, import_extend.default)(true, {}, this.namespace));\n return destination;\n }\n /**\n * Configure the processor with info available to all plugins.\n * Information is stored in an object.\n *\n * Typically, options can be given to a specific plugin, but sometimes it\n * makes sense to have information shared with several plugins.\n * For example, a list of HTML elements that are self-closing, which is\n * needed during all phases.\n *\n * > **Note**: setting information cannot occur on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * > **Note**: to register custom data in TypeScript, augment the\n * > {@linkcode Data} interface.\n *\n * @example\n * This example show how to get and set info:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * const processor = unified().data('alpha', 'bravo')\n *\n * processor.data('alpha') // => 'bravo'\n *\n * processor.data() // => {alpha: 'bravo'}\n *\n * processor.data({charlie: 'delta'})\n *\n * processor.data() // => {charlie: 'delta'}\n * ```\n *\n * @template {keyof Data} Key\n *\n * @overload\n * @returns {Data}\n *\n * @overload\n * @param {Data} dataset\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {Key} key\n * @returns {Data[Key]}\n *\n * @overload\n * @param {Key} key\n * @param {Data[Key]} value\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @param {Data | Key} [key]\n * Key to get or set, or entire dataset to set, or nothing to get the\n * entire dataset (optional).\n * @param {Data[Key]} [value]\n * Value to set (optional).\n * @returns {unknown}\n * The current processor when setting, the value at `key` when getting, or\n * the entire dataset when getting without key.\n */\n data(key$1, value) {\n if (typeof key$1 === \"string\") {\n if (arguments.length === 2) {\n assertUnfrozen(\"data\", this.frozen);\n this.namespace[key$1] = value;\n return this;\n }\n return own$5.call(this.namespace, key$1) && this.namespace[key$1] || void 0;\n }\n if (key$1) {\n assertUnfrozen(\"data\", this.frozen);\n this.namespace = key$1;\n return this;\n }\n return this.namespace;\n }\n /**\n * Freeze a processor.\n *\n * Frozen processors are meant to be extended and not to be configured\n * directly.\n *\n * When a processor is frozen it cannot be unfrozen.\n * New processors working the same way can be created by calling the\n * processor.\n *\n * It’s possible to freeze processors explicitly by calling `.freeze()`.\n * Processors freeze automatically when `.parse()`, `.run()`, `.runSync()`,\n * `.stringify()`, `.process()`, or `.processSync()` are called.\n *\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * The current processor.\n */\n freeze() {\n if (this.frozen) return this;\n const self$1 = this;\n while (++this.freezeIndex < this.attachers.length) {\n const [attacher, ...options] = this.attachers[this.freezeIndex];\n if (options[0] === false) continue;\n if (options[0] === true) options[0] = void 0;\n const transformer = attacher.call(self$1, ...options);\n if (typeof transformer === \"function\") this.transformers.use(transformer);\n }\n this.frozen = true;\n this.freezeIndex = Number.POSITIVE_INFINITY;\n return this;\n }\n /**\n * Parse text to a syntax tree.\n *\n * > **Note**: `parse` freezes the processor if not already *frozen*.\n *\n * > **Note**: `parse` performs the parse phase, not the run phase or other\n * > phases.\n *\n * @param {Compatible | undefined} [file]\n * file to parse (optional); typically `string` or `VFile`; any value\n * accepted as `x` in `new VFile(x)`.\n * @returns {ParseTree extends undefined ? Node : ParseTree}\n * Syntax tree representing `file`.\n */\n parse(file) {\n this.freeze();\n const realFile = vfile(file);\n const parser = this.parser || this.Parser;\n assertParser(\"parse\", parser);\n return parser(String(realFile), realFile);\n }\n /**\n * Process the given file as configured on the processor.\n *\n * > **Note**: `process` freezes the processor if not already *frozen*.\n *\n * > **Note**: `process` performs the parse, run, and stringify phases.\n *\n * @overload\n * @param {Compatible | undefined} file\n * @param {ProcessCallback<VFileWithOutput<CompileResult>>} done\n * @returns {undefined}\n *\n * @overload\n * @param {Compatible | undefined} [file]\n * @returns {Promise<VFileWithOutput<CompileResult>>}\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`]; any value accepted as\n * `x` in `new VFile(x)`.\n * @param {ProcessCallback<VFileWithOutput<CompileResult>> | undefined} [done]\n * Callback (optional).\n * @returns {Promise<VFile> | undefined}\n * Nothing if `done` is given.\n * Otherwise a promise, rejected with a fatal error or resolved with the\n * processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n process(file, done) {\n const self$1 = this;\n this.freeze();\n assertParser(\"process\", this.parser || this.Parser);\n assertCompiler(\"process\", this.compiler || this.Compiler);\n return done ? executor(void 0, done) : new Promise(executor);\n /**\n * @param {((file: VFileWithOutput<CompileResult>) => undefined | void) | undefined} resolve\n * @param {(error: Error | undefined) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n const realFile = vfile(file);\n const parseTree = self$1.parse(realFile);\n self$1.run(parseTree, realFile, function(error, tree, file$1) {\n if (error || !tree || !file$1) return realDone(error);\n const compileTree = tree;\n const compileResult = self$1.stringify(compileTree, file$1);\n if (looksLikeAValue(compileResult)) file$1.value = compileResult;\n else file$1.result = compileResult;\n realDone(error, file$1);\n });\n /**\n * @param {Error | undefined} error\n * @param {VFileWithOutput<CompileResult> | undefined} [file]\n * @returns {undefined}\n */\n function realDone(error, file$1) {\n if (error || !file$1) reject(error);\n else if (resolve) resolve(file$1);\n else {\n /* @__PURE__ */ ok(done, \"`done` is defined if `resolve` is not\");\n done(void 0, file$1);\n }\n }\n }\n }\n /**\n * Process the given file as configured on the processor.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `processSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `processSync` performs the parse, run, and stringify phases.\n *\n * @param {Compatible | undefined} [file]\n * File (optional); typically `string` or `VFile`; any value accepted as\n * `x` in `new VFile(x)`.\n * @returns {VFileWithOutput<CompileResult>}\n * The processed file.\n *\n * The parsed, transformed, and compiled value is available at\n * `file.value` (see note).\n *\n * > **Note**: unified typically compiles by serializing: most\n * > compilers return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n processSync(file) {\n /** @type {boolean} */\n let complete = false;\n /** @type {VFileWithOutput<CompileResult> | undefined} */\n let result;\n this.freeze();\n assertParser(\"processSync\", this.parser || this.Parser);\n assertCompiler(\"processSync\", this.compiler || this.Compiler);\n this.process(file, realDone);\n assertDone(\"processSync\", \"process\", complete);\n /* @__PURE__ */ ok(result, \"we either bailed on an error or have a tree\");\n return result;\n /**\n * @type {ProcessCallback<VFileWithOutput<CompileResult>>}\n */\n function realDone(error, file$1) {\n complete = true;\n bail(error);\n result = file$1;\n }\n }\n /**\n * Run *transformers* on a syntax tree.\n *\n * > **Note**: `run` freezes the processor if not already *frozen*.\n *\n * > **Note**: `run` performs the run phase, not other phases.\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} file\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} done\n * @returns {undefined}\n *\n * @overload\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * @param {Compatible | undefined} [file]\n * @returns {Promise<TailTree extends undefined ? Node : TailTree>}\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {(\n * RunCallback<TailTree extends undefined ? Node : TailTree> |\n * Compatible\n * )} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @param {RunCallback<TailTree extends undefined ? Node : TailTree>} [done]\n * Callback (optional).\n * @returns {Promise<TailTree extends undefined ? Node : TailTree> | undefined}\n * Nothing if `done` is given.\n * Otherwise, a promise rejected with a fatal error or resolved with the\n * transformed tree.\n */\n run(tree, file, done) {\n assertNode(tree);\n this.freeze();\n const transformers = this.transformers;\n if (!done && typeof file === \"function\") {\n done = file;\n file = void 0;\n }\n return done ? executor(void 0, done) : new Promise(executor);\n /**\n * @param {(\n * ((tree: TailTree extends undefined ? Node : TailTree) => undefined | void) |\n * undefined\n * )} resolve\n * @param {(error: Error) => undefined | void} reject\n * @returns {undefined}\n */\n function executor(resolve, reject) {\n /* @__PURE__ */ ok(typeof file !== \"function\", \"`file` can’t be a `done` anymore, we checked\");\n const realFile = vfile(file);\n transformers.run(tree, realFile, realDone);\n /**\n * @param {Error | undefined} error\n * @param {Node} outputTree\n * @param {VFile} file\n * @returns {undefined}\n */\n function realDone(error, outputTree, file$1) {\n const resultingTree = outputTree || tree;\n if (error) reject(error);\n else if (resolve) resolve(resultingTree);\n else {\n /* @__PURE__ */ ok(done, \"`done` is defined if `resolve` is not\");\n done(void 0, resultingTree, file$1);\n }\n }\n }\n }\n /**\n * Run *transformers* on a syntax tree.\n *\n * An error is thrown if asynchronous transforms are configured.\n *\n * > **Note**: `runSync` freezes the processor if not already *frozen*.\n *\n * > **Note**: `runSync` performs the run phase, not other phases.\n *\n * @param {HeadTree extends undefined ? Node : HeadTree} tree\n * Tree to transform and inspect.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {TailTree extends undefined ? Node : TailTree}\n * Transformed tree.\n */\n runSync(tree, file) {\n /** @type {boolean} */\n let complete = false;\n /** @type {(TailTree extends undefined ? Node : TailTree) | undefined} */\n let result;\n this.run(tree, file, realDone);\n assertDone(\"runSync\", \"run\", complete);\n /* @__PURE__ */ ok(result, \"we either bailed on an error or have a tree\");\n return result;\n /**\n * @type {RunCallback<TailTree extends undefined ? Node : TailTree>}\n */\n function realDone(error, tree$1) {\n bail(error);\n result = tree$1;\n complete = true;\n }\n }\n /**\n * Compile a syntax tree.\n *\n * > **Note**: `stringify` freezes the processor if not already *frozen*.\n *\n * > **Note**: `stringify` performs the stringify phase, not the run phase\n * > or other phases.\n *\n * @param {CompileTree extends undefined ? Node : CompileTree} tree\n * Tree to compile.\n * @param {Compatible | undefined} [file]\n * File associated with `node` (optional); any value accepted as `x` in\n * `new VFile(x)`.\n * @returns {CompileResult extends undefined ? Value : CompileResult}\n * Textual representation of the tree (see note).\n *\n * > **Note**: unified typically compiles by serializing: most compilers\n * > return `string` (or `Uint8Array`).\n * > Some compilers, such as the one configured with\n * > [`rehype-react`][rehype-react], return other values (in this case, a\n * > React tree).\n * > If you’re using a compiler that doesn’t serialize, expect different\n * > result values.\n * >\n * > To register custom results in TypeScript, add them to\n * > {@linkcode CompileResultMap}.\n *\n * [rehype-react]: https://github.com/rehypejs/rehype-react\n */\n stringify(tree, file) {\n this.freeze();\n const realFile = vfile(file);\n const compiler = this.compiler || this.Compiler;\n assertCompiler(\"stringify\", compiler);\n assertNode(tree);\n return compiler(tree, realFile);\n }\n /**\n * Configure the processor to use a plugin, a list of usable values, or a\n * preset.\n *\n * If the processor is already using a plugin, the previous plugin\n * configuration is changed based on the options that are passed in.\n * In other words, the plugin is not added a second time.\n *\n * > **Note**: `use` cannot be called on *frozen* processors.\n * > Call the processor first to create a new unfrozen processor.\n *\n * @example\n * There are many ways to pass plugins to `.use()`.\n * This example gives an overview:\n *\n * ```js\n * import {unified} from 'unified'\n *\n * unified()\n * // Plugin with options:\n * .use(pluginA, {x: true, y: true})\n * // Passing the same plugin again merges configuration (to `{x: true, y: false, z: true}`):\n * .use(pluginA, {y: false, z: true})\n * // Plugins:\n * .use([pluginB, pluginC])\n * // Two plugins, the second with options:\n * .use([pluginD, [pluginE, {}]])\n * // Preset with plugins and settings:\n * .use({plugins: [pluginF, [pluginG, {}]], settings: {position: false}})\n * // Settings only:\n * .use({settings: {position: false}})\n * ```\n *\n * @template {Array<unknown>} [Parameters=[]]\n * @template {Node | string | undefined} [Input=undefined]\n * @template [Output=Input]\n *\n * @overload\n * @param {Preset | null | undefined} [preset]\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {PluggableList} list\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n *\n * @overload\n * @param {Plugin<Parameters, Input, Output>} plugin\n * @param {...(Parameters | [boolean])} parameters\n * @returns {UsePlugin<ParseTree, HeadTree, TailTree, CompileTree, CompileResult, Input, Output>}\n *\n * @param {PluggableList | Plugin | Preset | null | undefined} value\n * Usable value.\n * @param {...unknown} parameters\n * Parameters, when a plugin is given as a usable value.\n * @returns {Processor<ParseTree, HeadTree, TailTree, CompileTree, CompileResult>}\n * Current processor.\n */\n use(value, ...parameters) {\n const attachers = this.attachers;\n const namespace = this.namespace;\n assertUnfrozen(\"use\", this.frozen);\n if (value === null || value === void 0) {} else if (typeof value === \"function\") addPlugin(value, parameters);\n else if (typeof value === \"object\") if (Array.isArray(value)) addList(value);\n else addPreset(value);\n else throw new TypeError(\"Expected usable value, not `\" + value + \"`\");\n return this;\n /**\n * @param {Pluggable} value\n * @returns {undefined}\n */\n function add(value$1) {\n if (typeof value$1 === \"function\") addPlugin(value$1, []);\n else if (typeof value$1 === \"object\") if (Array.isArray(value$1)) {\n const [plugin, ...parameters$1] = value$1;\n addPlugin(plugin, parameters$1);\n } else addPreset(value$1);\n else throw new TypeError(\"Expected usable value, not `\" + value$1 + \"`\");\n }\n /**\n * @param {Preset} result\n * @returns {undefined}\n */\n function addPreset(result) {\n if (!(\"plugins\" in result) && !(\"settings\" in result)) throw new Error(\"Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither\");\n addList(result.plugins);\n if (result.settings) namespace.settings = (0, import_extend.default)(true, namespace.settings, result.settings);\n }\n /**\n * @param {PluggableList | null | undefined} plugins\n * @returns {undefined}\n */\n function addList(plugins) {\n let index$1 = -1;\n if (plugins === null || plugins === void 0) {} else if (Array.isArray(plugins)) while (++index$1 < plugins.length) {\n const thing = plugins[index$1];\n add(thing);\n }\n else throw new TypeError(\"Expected a list of plugins, not `\" + plugins + \"`\");\n }\n /**\n * @param {Plugin} plugin\n * @param {Array<unknown>} parameters\n * @returns {undefined}\n */\n function addPlugin(plugin, parameters$1) {\n let index$1 = -1;\n let entryIndex = -1;\n while (++index$1 < attachers.length) if (attachers[index$1][0] === plugin) {\n entryIndex = index$1;\n break;\n }\n if (entryIndex === -1) attachers.push([plugin, ...parameters$1]);\n else if (parameters$1.length > 0) {\n let [primary, ...rest] = parameters$1;\n const currentPrimary = attachers[entryIndex][1];\n if (isPlainObject(currentPrimary) && isPlainObject(primary)) primary = (0, import_extend.default)(true, currentPrimary, primary);\n attachers[entryIndex] = [\n plugin,\n primary,\n ...rest\n ];\n }\n }\n }\n};\n/**\n* Create a new processor.\n*\n* @example\n* This example shows how a new processor can be created (from `remark`) and linked\n* to **stdin**(4) and **stdout**(4).\n*\n* ```js\n* import process from 'node:process'\n* import concatStream from 'concat-stream'\n* import {remark} from 'remark'\n*\n* process.stdin.pipe(\n* concatStream(function (buf) {\n* process.stdout.write(String(remark().processSync(buf)))\n* })\n* )\n* ```\n*\n* @returns\n* New *unfrozen* processor (`processor`).\n*\n* This processor is configured to work the same as its ancestor.\n* When the descendant processor is configured in the future it does not\n* affect the ancestral processor.\n*/\nconst unified = new Processor().freeze();\n/**\n* Assert a parser is available.\n*\n* @param {string} name\n* @param {unknown} value\n* @returns {asserts value is Parser}\n*/\nfunction assertParser(name, value) {\n if (typeof value !== \"function\") throw new TypeError(\"Cannot `\" + name + \"` without `parser`\");\n}\n/**\n* Assert a compiler is available.\n*\n* @param {string} name\n* @param {unknown} value\n* @returns {asserts value is Compiler}\n*/\nfunction assertCompiler(name, value) {\n if (typeof value !== \"function\") throw new TypeError(\"Cannot `\" + name + \"` without `compiler`\");\n}\n/**\n* Assert the processor is not frozen.\n*\n* @param {string} name\n* @param {unknown} frozen\n* @returns {asserts frozen is false}\n*/\nfunction assertUnfrozen(name, frozen) {\n if (frozen) throw new Error(\"Cannot call `\" + name + \"` on a frozen processor.\\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.\");\n}\n/**\n* Assert `node` is a unist node.\n*\n* @param {unknown} node\n* @returns {asserts node is Node}\n*/\nfunction assertNode(node) {\n if (!isPlainObject(node) || typeof node.type !== \"string\") throw new TypeError(\"Expected node, got `\" + node + \"`\");\n}\n/**\n* Assert that `complete` is `true`.\n*\n* @param {string} name\n* @param {string} asyncName\n* @param {unknown} complete\n* @returns {asserts complete is true}\n*/\nfunction assertDone(name, asyncName, complete) {\n if (!complete) throw new Error(\"`\" + name + \"` finished async. Use `\" + asyncName + \"` instead\");\n}\n/**\n* @param {Compatible | undefined} [value]\n* @returns {VFile}\n*/\nfunction vfile(value) {\n return looksLikeAVFile(value) ? value : new VFile(value);\n}\n/**\n* @param {Compatible | undefined} [value]\n* @returns {value is VFile}\n*/\nfunction looksLikeAVFile(value) {\n return Boolean(value && typeof value === \"object\" && \"message\" in value && \"messages\" in value);\n}\n/**\n* @param {unknown} [value]\n* @returns {value is Value}\n*/\nfunction looksLikeAValue(value) {\n return typeof value === \"string\" || isUint8Array(value);\n}\n/**\n* Assert `value` is an `Uint8Array`.\n*\n* @param {unknown} value\n* thing.\n* @returns {value is Uint8Array}\n* Whether `value` is an `Uint8Array`.\n*/\nfunction isUint8Array(value) {\n return Boolean(value && typeof value === \"object\" && \"byteLength\" in value && \"byteOffset\" in value);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/@ungap+structured-clone@1.3.3/node_modules/@ungap/structured-clone/esm/types.js\nconst VOID = -1;\nconst PRIMITIVE = 0;\nconst ARRAY = 1;\nconst OBJECT = 2;\nconst DATE = 3;\nconst REGEXP = 4;\nconst MAP = 5;\nconst SET = 6;\nconst ERROR = 7;\nconst BIGINT = 8;\n\n//#endregion\n//#region ../../node_modules/.pnpm/@ungap+structured-clone@1.3.3/node_modules/@ungap/structured-clone/esm/deserialize.js\nconst env = typeof self === \"object\" ? self : globalThis;\nconst guard = (name, init) => {\n switch (name) {\n case \"Function\":\n case \"SharedWorker\":\n case \"Worker\":\n case \"eval\":\n case \"setInterval\":\n case \"setTimeout\": throw new TypeError(\"unable to deserialize \" + name);\n }\n return new env[name](init);\n};\nconst deserializer = ($$1, _) => {\n const as = (out, index$1) => {\n $$1.set(index$1, out);\n return out;\n };\n const unpair = (index$1) => {\n if ($$1.has(index$1)) return $$1.get(index$1);\n const [type, value] = _[index$1];\n switch (type) {\n case PRIMITIVE:\n case VOID: return as(value, index$1);\n case ARRAY: {\n const arr = as([], index$1);\n for (const index$2 of value) arr.push(unpair(index$2));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index$1);\n for (const [key$1, index$2] of value) object[unpair(key$1)] = unpair(index$2);\n return object;\n }\n case DATE: return as(new Date(value), index$1);\n case REGEXP: {\n const { source, flags } = value;\n return as(new RegExp(source, flags), index$1);\n }\n case MAP: {\n const map = as(/* @__PURE__ */ new Map(), index$1);\n for (const [key$1, index$2] of value) map.set(unpair(key$1), unpair(index$2));\n return map;\n }\n case SET: {\n const set = as(/* @__PURE__ */ new Set(), index$1);\n for (const index$2 of value) set.add(unpair(index$2));\n return set;\n }\n case ERROR: {\n const { name, message } = value;\n return as(typeof env[name] === \"function\" ? guard(name, message) : new Error(message), index$1);\n }\n case BIGINT: return as(BigInt(value), index$1);\n case \"BigInt\": return as(Object(BigInt(value)), index$1);\n case \"ArrayBuffer\": return as(new Uint8Array(value).buffer, value);\n case \"DataView\": {\n const { buffer } = new Uint8Array(value);\n return as(new DataView(buffer), value);\n }\n }\n return as(guard(type, value), index$1);\n };\n return unpair;\n};\n/**\n* @typedef {Array<string,any>} Record a type representation\n*/\n/**\n* Returns a deserialized value from a serialized array of Records.\n* @param {Record[]} serialized a previously serialized value.\n* @returns {any}\n*/\nconst deserialize = (serialized) => deserializer(/* @__PURE__ */ new Map(), serialized)(0);\n\n//#endregion\n//#region ../../node_modules/.pnpm/@ungap+structured-clone@1.3.3/node_modules/@ungap/structured-clone/esm/serialize.js\nconst EMPTY = \"\";\nconst { toString } = {};\nconst { keys } = Object;\nconst typeOf = (value) => {\n const type = typeof value;\n if (type !== \"object\" || !value) return [PRIMITIVE, type];\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case \"Array\": return [ARRAY, EMPTY];\n case \"Object\": return [OBJECT, EMPTY];\n case \"Date\": return [DATE, EMPTY];\n case \"RegExp\": return [REGEXP, EMPTY];\n case \"Map\": return [MAP, EMPTY];\n case \"Set\": return [SET, EMPTY];\n case \"DataView\": return [ARRAY, asString];\n }\n if (asString.includes(\"Array\")) return [ARRAY, asString];\n if (value instanceof Error) return [ERROR, value.name || \"Error\"];\n return [OBJECT, asString];\n};\nconst shouldSkip = ([TYPE, type]) => TYPE === PRIMITIVE && (type === \"function\" || type === \"symbol\");\nconst serializer = (strict, json, $$1, _) => {\n const as = (out, value) => {\n const index$1 = _.push(out) - 1;\n $$1.set(value, index$1);\n return index$1;\n };\n const pair = (value) => {\n if ($$1.has(value)) return $$1.get(value);\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case \"bigint\":\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case \"function\":\n case \"symbol\":\n if (strict) throw new TypeError(\"unable to serialize \" + type);\n entry = null;\n break;\n case \"undefined\": return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type) {\n let spread = value;\n if (type === \"DataView\") spread = new Uint8Array(value.buffer);\n else if (type === \"ArrayBuffer\") spread = new Uint8Array(value);\n return as([type, [...spread]], value);\n }\n const arr = [];\n const index$1 = as([TYPE, arr], value);\n for (const entry of value) arr.push(pair(entry));\n return index$1;\n }\n case OBJECT: {\n if (type) switch (type) {\n case \"BigInt\": return as([type, value.toString()], value);\n case \"Boolean\":\n case \"Number\":\n case \"String\": return as([type, value.valueOf()], value);\n }\n if (json && \"toJSON\" in value) return pair(value.toJSON());\n const entries = [];\n const index$1 = as([TYPE, entries], value);\n for (const key$1 of keys(value)) if (strict || !shouldSkip(typeOf(value[key$1]))) entries.push([pair(key$1), pair(value[key$1])]);\n return index$1;\n }\n case DATE: return as([TYPE, isNaN(value.getTime()) ? EMPTY : value.toISOString()], value);\n case REGEXP: {\n const { source, flags } = value;\n return as([TYPE, {\n source,\n flags\n }], value);\n }\n case MAP: {\n const entries = [];\n const index$1 = as([TYPE, entries], value);\n for (const [key$1, entry] of value) if (strict || !(shouldSkip(typeOf(key$1)) || shouldSkip(typeOf(entry)))) entries.push([pair(key$1), pair(entry)]);\n return index$1;\n }\n case SET: {\n const entries = [];\n const index$1 = as([TYPE, entries], value);\n for (const entry of value) if (strict || !shouldSkip(typeOf(entry))) entries.push(pair(entry));\n return index$1;\n }\n }\n const { message } = value;\n return as([TYPE, {\n name: type,\n message\n }], value);\n };\n return pair;\n};\n/**\n* @typedef {Array<string,any>} Record a type representation\n*/\n/**\n* Returns an array of serialized Records.\n* @param {any} value a serializable value.\n* @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n* if `true`, will not throw errors on incompatible types, and behave more\n* like JSON stringify would behave. Symbol and Function will be discarded.\n* @returns {Record[]}\n*/\nconst serialize = (value, { json, lossy } = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, /* @__PURE__ */ new Map(), _)(value), _;\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/@ungap+structured-clone@1.3.3/node_modules/@ungap/structured-clone/esm/index.js\n/**\n* @typedef {Array<string,any>} Record a type representation\n*/\n/**\n* Returns an array of serialized Records.\n* @param {any} any a serializable value.\n* @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n* a transfer option (ignored when polyfilled) and/or non standard fields that\n* fallback to the polyfill if present.\n* @returns {Record[]}\n*/\nvar esm_default = typeof structuredClone === \"function\" ? (any, options) => options && (\"json\" in options || \"lossy\" in options) ? deserialize(serialize(any, options)) : structuredClone(any) : (any, options) => deserialize(serialize(any, options));\n\n//#endregion\n//#region ../../node_modules/.pnpm/unist-util-position@5.0.0/node_modules/unist-util-position/lib/index.js\n/**\n* @typedef {import('unist').Node} Node\n* @typedef {import('unist').Point} Point\n* @typedef {import('unist').Position} Position\n*/\n/**\n* @typedef NodeLike\n* @property {string} type\n* @property {PositionLike | null | undefined} [position]\n*\n* @typedef PositionLike\n* @property {PointLike | null | undefined} [start]\n* @property {PointLike | null | undefined} [end]\n*\n* @typedef PointLike\n* @property {number | null | undefined} [line]\n* @property {number | null | undefined} [column]\n* @property {number | null | undefined} [offset]\n*/\n/**\n* Get the ending point of `node`.\n*\n* @param node\n* Node.\n* @returns\n* Point.\n*/\nconst pointEnd = point$1(\"end\");\n/**\n* Get the starting point of `node`.\n*\n* @param node\n* Node.\n* @returns\n* Point.\n*/\nconst pointStart = point$1(\"start\");\n/**\n* Get the positional info of `node`.\n*\n* @param {'end' | 'start'} type\n* Side.\n* @returns\n* Getter.\n*/\nfunction point$1(type) {\n return point$3;\n /**\n * Get the point info of `node` at a bound side.\n *\n * @param {Node | NodeLike | null | undefined} [node]\n * @returns {Point | undefined}\n */\n function point$3(node) {\n const point$4 = node && node.position && node.position[type] || {};\n if (typeof point$4.line === \"number\" && point$4.line > 0 && typeof point$4.column === \"number\" && point$4.column > 0) return {\n line: point$4.line,\n column: point$4.column,\n offset: typeof point$4.offset === \"number\" && point$4.offset > -1 ? point$4.offset : void 0\n };\n }\n}\n/**\n* Get the positional info of `node`.\n*\n* @param {Node | NodeLike | null | undefined} [node]\n* Node.\n* @returns {Position | undefined}\n* Position.\n*/\nfunction position$1(node) {\n const start = pointStart(node);\n const end = pointEnd(node);\n if (start && end) return {\n start,\n end\n };\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/schema.js\n/**\n* @import {Schema} from 'hast-util-sanitize'\n*/\nconst aria$1 = [\n \"ariaDescribedBy\",\n \"ariaLabel\",\n \"ariaLabelledBy\"\n];\n/**\n* Default schema.\n*\n* Follows GitHub style sanitation.\n*\n* @type {Schema}\n*/\nconst defaultSchema = {\n ancestors: {\n tbody: [\"table\"],\n td: [\"table\"],\n th: [\"table\"],\n thead: [\"table\"],\n tfoot: [\"table\"],\n tr: [\"table\"]\n },\n attributes: {\n a: [\n ...aria$1,\n \"dataFootnoteBackref\",\n \"dataFootnoteRef\",\n [\"className\", \"data-footnote-backref\"],\n \"href\"\n ],\n blockquote: [\"cite\"],\n code: [[\"className\", /^language-./]],\n del: [\"cite\"],\n div: [\"itemScope\", \"itemType\"],\n dl: [...aria$1],\n h2: [[\"className\", \"sr-only\"]],\n img: [\n ...aria$1,\n \"longDesc\",\n \"src\"\n ],\n input: [[\"disabled\", true], [\"type\", \"checkbox\"]],\n ins: [\"cite\"],\n li: [[\"className\", \"task-list-item\"]],\n ol: [...aria$1, [\"className\", \"contains-task-list\"]],\n q: [\"cite\"],\n section: [\"dataFootnotes\", [\"className\", \"footnotes\"]],\n source: [\"srcSet\"],\n summary: [...aria$1],\n table: [...aria$1],\n ul: [...aria$1, [\"className\", \"contains-task-list\"]],\n \"*\": [\n \"abbr\",\n \"accept\",\n \"acceptCharset\",\n \"accessKey\",\n \"action\",\n \"align\",\n \"alt\",\n \"axis\",\n \"border\",\n \"cellPadding\",\n \"cellSpacing\",\n \"char\",\n \"charOff\",\n \"charSet\",\n \"checked\",\n \"clear\",\n \"colSpan\",\n \"color\",\n \"cols\",\n \"compact\",\n \"coords\",\n \"dateTime\",\n \"dir\",\n \"encType\",\n \"frame\",\n \"hSpace\",\n \"headers\",\n \"height\",\n \"hrefLang\",\n \"htmlFor\",\n \"id\",\n \"isMap\",\n \"itemProp\",\n \"label\",\n \"lang\",\n \"maxLength\",\n \"media\",\n \"method\",\n \"multiple\",\n \"name\",\n \"noHref\",\n \"noShade\",\n \"noWrap\",\n \"open\",\n \"prompt\",\n \"readOnly\",\n \"rev\",\n \"rowSpan\",\n \"rows\",\n \"rules\",\n \"scope\",\n \"selected\",\n \"shape\",\n \"size\",\n \"span\",\n \"start\",\n \"summary\",\n \"tabIndex\",\n \"title\",\n \"useMap\",\n \"vAlign\",\n \"value\",\n \"width\"\n ]\n },\n clobber: [\n \"ariaDescribedBy\",\n \"ariaLabelledBy\",\n \"id\",\n \"name\"\n ],\n clobberPrefix: \"user-content-\",\n protocols: {\n cite: [\"http\", \"https\"],\n href: [\n \"http\",\n \"https\",\n \"irc\",\n \"ircs\",\n \"mailto\",\n \"xmpp\"\n ],\n longDesc: [\"http\", \"https\"],\n src: [\"http\", \"https\"]\n },\n required: { input: {\n disabled: true,\n type: \"checkbox\"\n } },\n strip: [\"script\"],\n tagNames: [\n \"a\",\n \"b\",\n \"blockquote\",\n \"br\",\n \"code\",\n \"dd\",\n \"del\",\n \"details\",\n \"div\",\n \"dl\",\n \"dt\",\n \"em\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"hr\",\n \"i\",\n \"img\",\n \"input\",\n \"ins\",\n \"kbd\",\n \"li\",\n \"ol\",\n \"p\",\n \"picture\",\n \"pre\",\n \"q\",\n \"rp\",\n \"rt\",\n \"ruby\",\n \"s\",\n \"samp\",\n \"section\",\n \"source\",\n \"span\",\n \"strike\",\n \"strong\",\n \"sub\",\n \"summary\",\n \"sup\",\n \"table\",\n \"tbody\",\n \"td\",\n \"tfoot\",\n \"th\",\n \"thead\",\n \"tr\",\n \"tt\",\n \"ul\",\n \"var\"\n ]\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-sanitize@5.0.2/node_modules/hast-util-sanitize/lib/index.js\n/**\n* @import {\n* Comment,\n* Doctype,\n* ElementContent,\n* Element,\n* Nodes,\n* Properties,\n* RootContent,\n* Root,\n* Text\n* } from 'hast'\n*/\n/**\n* @typedef {[string, ...Array<Exclude<Properties[keyof Properties], Array<any>> | RegExp>] | string} PropertyDefinition\n* Definition for a property.\n*\n* @typedef Schema\n* Schema that defines what nodes and properties are allowed.\n*\n* The default schema is `defaultSchema`, which follows how GitHub cleans.\n* If any top-level key is missing in the given schema, the corresponding\n* value of the default schema is used.\n*\n* To extend the standard schema with a few changes, clone `defaultSchema`\n* like so:\n*\n* ```js\n* import deepmerge from 'deepmerge'\n* import {h} from 'hastscript'\n* import {defaultSchema, sanitize} from 'hast-util-sanitize'\n*\n* // This allows `className` on all elements.\n* const schema = deepmerge(defaultSchema, {attributes: {'*': ['className']}})\n*\n* const tree = sanitize(h('div', {className: ['foo']}), schema)\n*\n* // `tree` still has `className`.\n* console.log(tree)\n* // {\n* // type: 'element',\n* // tagName: 'div',\n* // properties: {className: ['foo']},\n* // children: []\n* // }\n* ```\n* @property {boolean | null | undefined} [allowComments=false]\n* Whether to allow comment nodes (default: `false`).\n*\n* For example:\n*\n* ```js\n* allowComments: true\n* ```\n* @property {boolean | null | undefined} [allowDoctypes=false]\n* Whether to allow doctype nodes (default: `false`).\n*\n* For example:\n*\n* ```js\n* allowDoctypes: true\n* ```\n* @property {Record<string, Array<string>> | null | undefined} [ancestors]\n* Map of tag names to a list of tag names which are required ancestors\n* (default: `defaultSchema.ancestors`).\n*\n* Elements with these tag names will be ignored if they occur outside of one\n* of their allowed parents.\n*\n* For example:\n*\n* ```js\n* ancestors: {\n* tbody: ['table'],\n* // …\n* tr: ['table']\n* }\n* ```\n* @property {Record<string, Array<PropertyDefinition>> | null | undefined} [attributes]\n* Map of tag names to allowed property names (default:\n* `defaultSchema.attributes`).\n*\n* The special key `'*'` as a tag name defines property names allowed on all\n* elements.\n*\n* The special value `'data*'` as a property name can be used to allow all\n* `data` properties.\n*\n* For example:\n*\n* ```js\n* attributes: {\n* 'ariaDescribedBy', 'ariaLabel', 'ariaLabelledBy', …, 'href'\n* // …\n* '*': [\n* 'abbr',\n* 'accept',\n* 'acceptCharset',\n* // …\n* 'vAlign',\n* 'value',\n* 'width'\n* ]\n* }\n* ```\n*\n* Instead of a single string in the array, which allows any property value\n* for the field, you can use an array to allow several values.\n* For example, `input: ['type']` allows `type` set to any value on `input`s.\n* But `input: [['type', 'checkbox', 'radio']]` allows `type` when set to\n* `'checkbox'` or `'radio'`.\n*\n* You can use regexes, so for example `span: [['className', /^hljs-/]]`\n* allows any class that starts with `hljs-` on `span`s.\n*\n* When comma- or space-separated values are used (such as `className`), each\n* value in is checked individually.\n* For example, to allow certain classes on `span`s for syntax highlighting,\n* use `span: [['className', 'number', 'operator', 'token']]`.\n* This will allow `'number'`, `'operator'`, and `'token'` classes, but drop\n* others.\n* @property {Array<string> | null | undefined} [clobber]\n* List of property names that clobber (default: `defaultSchema.clobber`).\n*\n* For example:\n*\n* ```js\n* clobber: ['ariaDescribedBy', 'ariaLabelledBy', 'id', 'name']\n* ```\n* @property {string | null | undefined} [clobberPrefix]\n* Prefix to use before clobbering properties (default:\n* `defaultSchema.clobberPrefix`).\n*\n* For example:\n*\n* ```js\n* clobberPrefix: 'user-content-'\n* ```\n* @property {Record<string, Array<string> | null | undefined> | null | undefined} [protocols]\n* Map of *property names* to allowed protocols (default:\n* `defaultSchema.protocols`).\n*\n* This defines URLs that are always allowed to have local URLs (relative to\n* the current website, such as `this`, `#this`, `/this`, or `?this`), and\n* only allowed to have remote URLs (such as `https://example.com`) if they\n* use a known protocol.\n*\n* For example:\n*\n* ```js\n* protocols: {\n* cite: ['http', 'https'],\n* // …\n* src: ['http', 'https']\n* }\n* ```\n* @property {Record<string, Record<string, Properties[keyof Properties]>> | null | undefined} [required]\n* Map of tag names to required property names with a default value\n* (default: `defaultSchema.required`).\n*\n* This defines properties that must be set.\n* If a field does not exist (after the element was made safe), these will be\n* added with the given value.\n*\n* For example:\n*\n* ```js\n* required: {\n* input: {disabled: true, type: 'checkbox'}\n* }\n* ```\n*\n* > 👉 **Note**: properties are first checked based on `schema.attributes`,\n* > then on `schema.required`.\n* > That means properties could be removed by `attributes` and then added\n* > again with `required`.\n* @property {Array<string> | null | undefined} [strip]\n* List of tag names to strip from the tree (default: `defaultSchema.strip`).\n*\n* By default, unsafe elements (those not in `schema.tagNames`) are replaced\n* by what they contain.\n* This option can drop their contents.\n*\n* For example:\n*\n* ```js\n* strip: ['script']\n* ```\n* @property {Array<string> | null | undefined} [tagNames]\n* List of allowed tag names (default: `defaultSchema.tagNames`).\n*\n* For example:\n*\n* ```js\n* tagNames: [\n* 'a',\n* 'b',\n* // …\n* 'ul',\n* 'var'\n* ]\n* ```\n*\n* @typedef State\n* Info passed around.\n* @property {Readonly<Schema>} schema\n* Schema.\n* @property {Array<string>} stack\n* Tag names of ancestors.\n*/\nconst own$4 = {}.hasOwnProperty;\n/**\n* Sanitize a tree.\n*\n* @param {Readonly<Nodes>} node\n* Unsafe tree.\n* @param {Readonly<Schema> | null | undefined} [options]\n* Configuration (default: `defaultSchema`).\n* @returns {Nodes}\n* New, safe tree.\n*/\nfunction sanitize(node, options) {\n /** @type {Nodes} */\n let result = {\n type: \"root\",\n children: []\n };\n const replace = transform({\n schema: options ? {\n ...defaultSchema,\n ...options\n } : defaultSchema,\n stack: []\n }, node);\n if (replace) if (Array.isArray(replace)) if (replace.length === 1) result = replace[0];\n else result.children = replace;\n else result = replace;\n return result;\n}\n/**\n* Sanitize `node`.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<unknown>} node\n* Unsafe node.\n* @returns {Array<ElementContent> | Nodes | undefined}\n* Safe result.\n*/\nfunction transform(state, node) {\n if (node && typeof node === \"object\") {\n const unsafe = node;\n switch (typeof unsafe.type === \"string\" ? unsafe.type : \"\") {\n case \"comment\": return comment$1(state, unsafe);\n case \"doctype\": return doctype$1(state, unsafe);\n case \"element\": return element$2(state, unsafe);\n case \"root\": return root$1(state, unsafe);\n case \"text\": return text$1(state, unsafe);\n default:\n }\n }\n}\n/**\n* Make a safe comment.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe\n* Unsafe comment-like value.\n* @returns {Comment | undefined}\n* Safe comment (if with `allowComments`).\n*/\nfunction comment$1(state, unsafe) {\n if (state.schema.allowComments) {\n const result = typeof unsafe.value === \"string\" ? unsafe.value : \"\";\n const index$1 = result.indexOf(\"-->\");\n /** @type {Comment} */\n const node = {\n type: \"comment\",\n value: index$1 < 0 ? result : result.slice(0, index$1)\n };\n patch$1(node, unsafe);\n return node;\n }\n}\n/**\n* Make a safe doctype.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe\n* Unsafe doctype-like value.\n* @returns {Doctype | undefined}\n* Safe doctype (if with `allowDoctypes`).\n*/\nfunction doctype$1(state, unsafe) {\n if (state.schema.allowDoctypes) {\n /** @type {Doctype} */\n const node = { type: \"doctype\" };\n patch$1(node, unsafe);\n return node;\n }\n}\n/**\n* Make a safe element.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe\n* Unsafe element-like value.\n* @returns {Array<ElementContent> | Element | undefined}\n* Safe element.\n*/\nfunction element$2(state, unsafe) {\n const name = typeof unsafe.tagName === \"string\" ? unsafe.tagName : \"\";\n state.stack.push(name);\n const content = children(state, unsafe.children);\n const properties_ = properties(state, unsafe.properties);\n state.stack.pop();\n let safeElement = false;\n if (name && name !== \"*\" && (!state.schema.tagNames || state.schema.tagNames.includes(name))) {\n safeElement = true;\n if (state.schema.ancestors && own$4.call(state.schema.ancestors, name)) {\n const ancestors = state.schema.ancestors[name];\n let index$1 = -1;\n safeElement = false;\n while (++index$1 < ancestors.length) if (state.stack.includes(ancestors[index$1])) safeElement = true;\n }\n }\n if (!safeElement) return state.schema.strip && !state.schema.strip.includes(name) ? content : void 0;\n /** @type {Element} */\n const node = {\n type: \"element\",\n tagName: name,\n properties: properties_,\n children: content\n };\n patch$1(node, unsafe);\n return node;\n}\n/**\n* Make a safe root.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe\n* Unsafe root-like value.\n* @returns {Root}\n* Safe root.\n*/\nfunction root$1(state, unsafe) {\n /** @type {Root} */\n const node = {\n type: \"root\",\n children: children(state, unsafe.children)\n };\n patch$1(node, unsafe);\n return node;\n}\n/**\n* Make a safe text.\n*\n* @param {State} _\n* Info passed around.\n* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe\n* Unsafe text-like value.\n* @returns {Text}\n* Safe text.\n*/\nfunction text$1(_, unsafe) {\n /** @type {Text} */\n const node = {\n type: \"text\",\n value: typeof unsafe.value === \"string\" ? unsafe.value : \"\"\n };\n patch$1(node, unsafe);\n return node;\n}\n/**\n* Make children safe.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<unknown>} children\n* Unsafe value.\n* @returns {Array<Nodes>}\n* Safe children.\n*/\nfunction children(state, children$1) {\n /** @type {Array<Nodes>} */\n const results = [];\n if (Array.isArray(children$1)) {\n const childrenUnknown = children$1;\n let index$1 = -1;\n while (++index$1 < childrenUnknown.length) {\n const value = transform(state, childrenUnknown[index$1]);\n if (value) if (Array.isArray(value)) results.push(...value);\n else results.push(value);\n }\n }\n return results;\n}\n/**\n* Make element properties safe.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<unknown>} properties\n* Unsafe value.\n* @returns {Properties}\n* Safe value.\n*/\nfunction properties(state, properties$1) {\n const tagName = state.stack[state.stack.length - 1];\n const attributes = state.schema.attributes;\n const required = state.schema.required;\n const specific = attributes && own$4.call(attributes, tagName) ? attributes[tagName] : void 0;\n const defaults = attributes && own$4.call(attributes, \"*\") ? attributes[\"*\"] : void 0;\n const properties_ = properties$1 && typeof properties$1 === \"object\" ? properties$1 : {};\n /** @type {Properties} */\n const result = {};\n /** @type {string} */\n let key$1;\n for (key$1 in properties_) if (own$4.call(properties_, key$1)) {\n const unsafe = properties_[key$1];\n let safe = propertyValue(state, findDefinition(specific, key$1), key$1, unsafe);\n if (safe === null || safe === void 0) safe = propertyValue(state, findDefinition(defaults, key$1), key$1, unsafe);\n if (safe !== null && safe !== void 0) result[key$1] = safe;\n }\n if (required && own$4.call(required, tagName)) {\n const properties$2 = required[tagName];\n for (key$1 in properties$2) if (own$4.call(properties$2, key$1) && !own$4.call(result, key$1)) result[key$1] = properties$2[key$1];\n }\n return result;\n}\n/**\n* Sanitize a property value.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<PropertyDefinition> | undefined} definition\n* Definition.\n* @param {string} key\n* Field name.\n* @param {Readonly<unknown>} value\n* Unsafe value (but an array).\n* @returns {Array<number | string> | boolean | number | string | undefined}\n* Safe value.\n*/\nfunction propertyValue(state, definition, key$1, value) {\n return definition ? Array.isArray(value) ? propertyValueMany(state, definition, key$1, value) : propertyValuePrimitive(state, definition, key$1, value) : void 0;\n}\n/**\n* Sanitize a property value which is a list.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<PropertyDefinition>} definition\n* Definition.\n* @param {string} key\n* Field name.\n* @param {Readonly<Array<Readonly<unknown>>>} values\n* Unsafe value (but an array).\n* @returns {Array<number | string>}\n* Safe value.\n*/\nfunction propertyValueMany(state, definition, key$1, values) {\n let index$1 = -1;\n /** @type {Array<number | string>} */\n const result = [];\n while (++index$1 < values.length) {\n const value = propertyValuePrimitive(state, definition, key$1, values[index$1]);\n if (typeof value === \"number\" || typeof value === \"string\") result.push(value);\n }\n return result;\n}\n/**\n* Sanitize a property value which is a primitive.\n*\n* @param {State} state\n* Info passed around.\n* @param {Readonly<PropertyDefinition>} definition\n* Definition.\n* @param {string} key\n* Field name.\n* @param {Readonly<unknown>} value\n* Unsafe value (but not an array).\n* @returns {boolean | number | string | undefined}\n* Safe value.\n*/\nfunction propertyValuePrimitive(state, definition, key$1, value) {\n if (typeof value !== \"boolean\" && typeof value !== \"number\" && typeof value !== \"string\") return;\n if (!safeProtocol(state, key$1, value)) return;\n if (typeof definition === \"object\" && definition.length > 1) {\n let ok$1 = false;\n let index$1 = 0;\n while (++index$1 < definition.length) {\n const allowed = definition[index$1];\n if (allowed && typeof allowed === \"object\" && \"flags\" in allowed) {\n if (allowed.test(String(value))) {\n ok$1 = true;\n break;\n }\n } else if (allowed === value) {\n ok$1 = true;\n break;\n }\n }\n if (!ok$1) return;\n }\n return state.schema.clobber && state.schema.clobberPrefix && state.schema.clobber.includes(key$1) ? state.schema.clobberPrefix + value : value;\n}\n/**\n* Check whether `value` is a safe URL.\n*\n* @param {State} state\n* Info passed around.\n* @param {string} key\n* Field name.\n* @param {Readonly<unknown>} value\n* Unsafe value.\n* @returns {boolean}\n* Whether it’s a safe value.\n*/\nfunction safeProtocol(state, key$1, value) {\n const protocols = state.schema.protocols && own$4.call(state.schema.protocols, key$1) ? state.schema.protocols[key$1] : void 0;\n if (!protocols || protocols.length === 0) return true;\n const url = String(value);\n const colon = url.indexOf(\":\");\n const questionMark = url.indexOf(\"?\");\n const numberSign = url.indexOf(\"#\");\n const slash = url.indexOf(\"/\");\n if (colon < 0 || slash > -1 && colon > slash || questionMark > -1 && colon > questionMark || numberSign > -1 && colon > numberSign) return true;\n let index$1 = -1;\n while (++index$1 < protocols.length) {\n const protocol = protocols[index$1];\n if (colon === protocol.length && url.slice(0, protocol.length) === protocol) return true;\n }\n return false;\n}\n/**\n* Add data and position.\n*\n* @param {Nodes} node\n* Node to patch safe data and position on.\n* @param {Readonly<Record<string, Readonly<unknown>>>} unsafe\n* Unsafe node-like value.\n* @returns {undefined}\n* Nothing.\n*/\nfunction patch$1(node, unsafe) {\n const cleanPosition = position$1(unsafe);\n if (unsafe.data) node.data = esm_default(unsafe.data);\n if (cleanPosition) node.position = cleanPosition;\n}\n/**\n*\n* @param {Readonly<Array<PropertyDefinition>> | undefined} definitions\n* @param {string} key\n* @returns {Readonly<PropertyDefinition> | undefined}\n*/\nfunction findDefinition(definitions, key$1) {\n /** @type {PropertyDefinition | undefined} */\n let dataDefault;\n let index$1 = -1;\n if (definitions) while (++index$1 < definitions.length) {\n const entry = definitions[index$1];\n const name = typeof entry === \"string\" ? entry : entry[0];\n if (name === key$1) return entry;\n if (name === \"data*\") dataDefault = entry;\n }\n if (key$1.length > 4 && key$1.slice(0, 4).toLowerCase() === \"data\") return dataDefault;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/rehype-sanitize@6.0.0/node_modules/rehype-sanitize/lib/index.js\n/**\n* @typedef {import('hast').Root} Root\n* @typedef {import('hast-util-sanitize').Schema} Schema\n*/\n/**\n* Sanitize HTML.\n*\n* @param {Schema | null | undefined} [options]\n* Configuration (optional).\n* @returns\n* Transform.\n*/\nfunction rehypeSanitize(options) {\n /**\n * @param {Root} tree\n * Tree.\n * @returns {Root}\n * New tree.\n */\n return function(tree) {\n return sanitize(tree, options);\n };\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/html-void-elements@3.0.0/node_modules/html-void-elements/index.js\n/**\n* List of HTML void tag names.\n*\n* @type {Array<string>}\n*/\nconst htmlVoidElements = [\n \"area\",\n \"base\",\n \"basefont\",\n \"bgsound\",\n \"br\",\n \"col\",\n \"command\",\n \"embed\",\n \"frame\",\n \"hr\",\n \"image\",\n \"img\",\n \"input\",\n \"keygen\",\n \"link\",\n \"meta\",\n \"param\",\n \"source\",\n \"track\",\n \"wbr\"\n];\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/schema.js\n/**\n* @import {Schema as SchemaType, Space} from 'property-information'\n*/\n/** @type {SchemaType} */\nvar Schema = class {\n /**\n * @param {SchemaType['property']} property\n * Property.\n * @param {SchemaType['normal']} normal\n * Normal.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Schema.\n */\n constructor(property, normal, space) {\n this.normal = normal;\n this.property = property;\n if (space) this.space = space;\n }\n};\nSchema.prototype.normal = {};\nSchema.prototype.property = {};\nSchema.prototype.space = void 0;\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/merge.js\n/**\n* @import {Info, Space} from 'property-information'\n*/\n/**\n* @param {ReadonlyArray<Schema>} definitions\n* Definitions.\n* @param {Space | undefined} [space]\n* Space.\n* @returns {Schema}\n* Schema.\n*/\nfunction merge(definitions, space) {\n /** @type {Record<string, Info>} */\n const property = {};\n /** @type {Record<string, string>} */\n const normal = {};\n for (const definition of definitions) {\n Object.assign(property, definition.property);\n Object.assign(normal, definition.normal);\n }\n return new Schema(property, normal, space);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/normalize.js\n/**\n* Get the cleaned case insensitive form of an attribute or property.\n*\n* @param {string} value\n* An attribute-like or property-like name.\n* @returns {string}\n* Value that can be used to look up the properly cased property on a\n* `Schema`.\n*/\nfunction normalize(value) {\n return value.toLowerCase();\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/info.js\n/**\n* @import {Info as InfoType} from 'property-information'\n*/\n/** @type {InfoType} */\nvar Info = class {\n /**\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @returns\n * Info.\n */\n constructor(property, attribute) {\n this.attribute = attribute;\n this.property = property;\n }\n};\nInfo.prototype.attribute = \"\";\nInfo.prototype.booleanish = false;\nInfo.prototype.boolean = false;\nInfo.prototype.commaOrSpaceSeparated = false;\nInfo.prototype.commaSeparated = false;\nInfo.prototype.defined = false;\nInfo.prototype.mustUseProperty = false;\nInfo.prototype.number = false;\nInfo.prototype.overloadedBoolean = false;\nInfo.prototype.property = \"\";\nInfo.prototype.spaceSeparated = false;\nInfo.prototype.space = void 0;\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/types.js\nvar types_exports = /* @__PURE__ */ __exportAll({\n boolean: () => boolean,\n booleanish: () => booleanish,\n commaOrSpaceSeparated: () => commaOrSpaceSeparated,\n commaSeparated: () => commaSeparated,\n number: () => number,\n overloadedBoolean: () => overloadedBoolean,\n spaceSeparated: () => spaceSeparated\n});\nlet powers = 0;\nconst boolean = increment();\nconst booleanish = increment();\nconst overloadedBoolean = increment();\nconst number = increment();\nconst spaceSeparated = increment();\nconst commaSeparated = increment();\nconst commaOrSpaceSeparated = increment();\nfunction increment() {\n return 2 ** ++powers;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/defined-info.js\n/**\n* @import {Space} from 'property-information'\n*/\nconst checks = Object.keys(types_exports);\nvar DefinedInfo = class extends Info {\n /**\n * @constructor\n * @param {string} property\n * Property.\n * @param {string} attribute\n * Attribute.\n * @param {number | null | undefined} [mask]\n * Mask.\n * @param {Space | undefined} [space]\n * Space.\n * @returns\n * Info.\n */\n constructor(property, attribute, mask, space) {\n let index$1 = -1;\n super(property, attribute);\n mark(this, \"space\", space);\n if (typeof mask === \"number\") while (++index$1 < checks.length) {\n const check = checks[index$1];\n mark(this, checks[index$1], (mask & types_exports[check]) === types_exports[check]);\n }\n }\n};\nDefinedInfo.prototype.defined = true;\n/**\n* @template {keyof DefinedInfo} Key\n* Key type.\n* @param {DefinedInfo} values\n* Info.\n* @param {Key} key\n* Key.\n* @param {DefinedInfo[Key]} value\n* Value.\n* @returns {undefined}\n* Nothing.\n*/\nfunction mark(values, key$1, value) {\n if (value) values[key$1] = value;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/create.js\n/**\n* @import {Info, Space} from 'property-information'\n*/\n/**\n* @typedef Definition\n* Definition of a schema.\n* @property {Record<string, string> | undefined} [attributes]\n* Normalzed names to special attribute case.\n* @property {ReadonlyArray<string> | undefined} [mustUseProperty]\n* Normalized names that must be set as properties.\n* @property {Record<string, number | null>} properties\n* Property names to their types.\n* @property {Space | undefined} [space]\n* Space.\n* @property {Transform} transform\n* Transform a property name.\n*/\n/**\n* @callback Transform\n* Transform.\n* @param {Record<string, string>} attributes\n* Attributes.\n* @param {string} property\n* Property.\n* @returns {string}\n* Attribute.\n*/\n/**\n* @param {Definition} definition\n* Definition.\n* @returns {Schema}\n* Schema.\n*/\nfunction create(definition) {\n /** @type {Record<string, Info>} */\n const properties$1 = {};\n /** @type {Record<string, string>} */\n const normals = {};\n for (const [property, value] of Object.entries(definition.properties)) {\n const info = new DefinedInfo(property, definition.transform(definition.attributes || {}, property), value, definition.space);\n if (definition.mustUseProperty && definition.mustUseProperty.includes(property)) info.mustUseProperty = true;\n properties$1[property] = info;\n normals[normalize(property)] = property;\n normals[normalize(info.attribute)] = property;\n }\n return new Schema(properties$1, normals, definition.space);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/aria.js\nconst aria = create({\n properties: {\n ariaActiveDescendant: null,\n ariaAtomic: booleanish,\n ariaAutoComplete: null,\n ariaBusy: booleanish,\n ariaChecked: booleanish,\n ariaColCount: number,\n ariaColIndex: number,\n ariaColSpan: number,\n ariaControls: spaceSeparated,\n ariaCurrent: null,\n ariaDescribedBy: spaceSeparated,\n ariaDetails: null,\n ariaDisabled: booleanish,\n ariaDropEffect: spaceSeparated,\n ariaErrorMessage: null,\n ariaExpanded: booleanish,\n ariaFlowTo: spaceSeparated,\n ariaGrabbed: booleanish,\n ariaHasPopup: null,\n ariaHidden: booleanish,\n ariaInvalid: null,\n ariaKeyShortcuts: null,\n ariaLabel: null,\n ariaLabelledBy: spaceSeparated,\n ariaLevel: number,\n ariaLive: null,\n ariaModal: booleanish,\n ariaMultiLine: booleanish,\n ariaMultiSelectable: booleanish,\n ariaOrientation: null,\n ariaOwns: spaceSeparated,\n ariaPlaceholder: null,\n ariaPosInSet: number,\n ariaPressed: booleanish,\n ariaReadOnly: booleanish,\n ariaRelevant: null,\n ariaRequired: booleanish,\n ariaRoleDescription: spaceSeparated,\n ariaRowCount: number,\n ariaRowIndex: number,\n ariaRowSpan: number,\n ariaSelected: booleanish,\n ariaSetSize: number,\n ariaSort: null,\n ariaValueMax: number,\n ariaValueMin: number,\n ariaValueNow: number,\n ariaValueText: null,\n role: null\n },\n transform(_, property) {\n return property === \"role\" ? property : \"aria-\" + property.slice(4).toLowerCase();\n }\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/case-sensitive-transform.js\n/**\n* @param {Record<string, string>} attributes\n* Attributes.\n* @param {string} attribute\n* Attribute.\n* @returns {string}\n* Transformed attribute.\n*/\nfunction caseSensitiveTransform(attributes, attribute) {\n return attribute in attributes ? attributes[attribute] : attribute;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/util/case-insensitive-transform.js\n/**\n* @param {Record<string, string>} attributes\n* Attributes.\n* @param {string} property\n* Property.\n* @returns {string}\n* Transformed property.\n*/\nfunction caseInsensitiveTransform(attributes, property) {\n return caseSensitiveTransform(attributes, property.toLowerCase());\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/html.js\nconst html$3 = create({\n attributes: {\n acceptcharset: \"accept-charset\",\n classname: \"class\",\n htmlfor: \"for\",\n httpequiv: \"http-equiv\"\n },\n mustUseProperty: [\n \"checked\",\n \"multiple\",\n \"muted\",\n \"selected\"\n ],\n properties: {\n abbr: null,\n accept: commaSeparated,\n acceptCharset: spaceSeparated,\n accessKey: spaceSeparated,\n action: null,\n allow: null,\n allowFullScreen: boolean,\n allowPaymentRequest: boolean,\n allowUserMedia: boolean,\n alpha: boolean,\n alt: null,\n as: null,\n async: boolean,\n autoCapitalize: null,\n autoComplete: spaceSeparated,\n autoFocus: boolean,\n autoPlay: boolean,\n blocking: spaceSeparated,\n capture: null,\n charSet: null,\n checked: boolean,\n cite: null,\n className: spaceSeparated,\n closedBy: null,\n colorSpace: null,\n cols: number,\n colSpan: number,\n command: null,\n commandFor: null,\n content: null,\n contentEditable: booleanish,\n controls: boolean,\n controlsList: spaceSeparated,\n coords: number | commaSeparated,\n crossOrigin: null,\n data: null,\n dateTime: null,\n decoding: null,\n default: boolean,\n defer: boolean,\n dir: null,\n dirName: null,\n disabled: boolean,\n download: overloadedBoolean,\n draggable: booleanish,\n encType: null,\n enterKeyHint: null,\n fetchPriority: null,\n form: null,\n formAction: null,\n formEncType: null,\n formMethod: null,\n formNoValidate: boolean,\n formTarget: null,\n headers: spaceSeparated,\n height: number,\n hidden: overloadedBoolean,\n high: number,\n href: null,\n hrefLang: null,\n htmlFor: spaceSeparated,\n httpEquiv: spaceSeparated,\n id: null,\n imageSizes: null,\n imageSrcSet: null,\n inert: boolean,\n inputMode: null,\n integrity: null,\n is: null,\n isMap: boolean,\n itemId: null,\n itemProp: spaceSeparated,\n itemRef: spaceSeparated,\n itemScope: boolean,\n itemType: spaceSeparated,\n kind: null,\n label: null,\n lang: null,\n language: null,\n list: null,\n loading: null,\n loop: boolean,\n low: number,\n manifest: null,\n max: null,\n maxLength: number,\n media: null,\n method: null,\n min: null,\n minLength: number,\n multiple: boolean,\n muted: boolean,\n name: null,\n nonce: null,\n noModule: boolean,\n noValidate: boolean,\n onAbort: null,\n onAfterPrint: null,\n onAuxClick: null,\n onBeforeMatch: null,\n onBeforePrint: null,\n onBeforeToggle: null,\n onBeforeUnload: null,\n onBlur: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onContextLost: null,\n onContextMenu: null,\n onContextRestored: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFormData: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLanguageChange: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadEnd: null,\n onLoadStart: null,\n onMessage: null,\n onMessageError: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRejectionHandled: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onScrollEnd: null,\n onSecurityPolicyViolation: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onSlotChange: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnhandledRejection: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onWheel: null,\n open: boolean,\n optimum: number,\n pattern: null,\n ping: spaceSeparated,\n placeholder: null,\n playsInline: boolean,\n popover: null,\n popoverTarget: null,\n popoverTargetAction: null,\n poster: null,\n preload: null,\n readOnly: boolean,\n referrerPolicy: null,\n rel: spaceSeparated,\n required: boolean,\n reversed: boolean,\n rows: number,\n rowSpan: number,\n sandbox: spaceSeparated,\n scope: null,\n scoped: boolean,\n seamless: boolean,\n selected: boolean,\n shadowRootClonable: boolean,\n shadowRootCustomElementRegistry: boolean,\n shadowRootDelegatesFocus: boolean,\n shadowRootMode: null,\n shadowRootSerializable: boolean,\n shape: null,\n size: number,\n sizes: null,\n slot: null,\n span: number,\n spellCheck: booleanish,\n src: null,\n srcDoc: null,\n srcLang: null,\n srcSet: null,\n start: number,\n step: null,\n style: null,\n tabIndex: number,\n target: null,\n title: null,\n translate: null,\n type: null,\n typeMustMatch: boolean,\n useMap: null,\n value: booleanish,\n width: number,\n wrap: null,\n writingSuggestions: null,\n align: null,\n aLink: null,\n archive: spaceSeparated,\n axis: null,\n background: null,\n bgColor: null,\n border: number,\n borderColor: null,\n bottomMargin: number,\n cellPadding: null,\n cellSpacing: null,\n char: null,\n charOff: null,\n classId: null,\n clear: null,\n code: null,\n codeBase: null,\n codeType: null,\n color: null,\n compact: boolean,\n declare: boolean,\n event: null,\n face: null,\n frame: null,\n frameBorder: null,\n hSpace: number,\n leftMargin: number,\n link: null,\n longDesc: null,\n lowSrc: null,\n marginHeight: number,\n marginWidth: number,\n noResize: boolean,\n noHref: boolean,\n noShade: boolean,\n noWrap: boolean,\n object: null,\n profile: null,\n prompt: null,\n rev: null,\n rightMargin: number,\n rules: null,\n scheme: null,\n scrolling: booleanish,\n standby: null,\n summary: null,\n text: null,\n topMargin: number,\n valueType: null,\n version: null,\n vAlign: null,\n vLink: null,\n vSpace: number,\n allowTransparency: null,\n autoCorrect: null,\n autoSave: null,\n credentialless: boolean,\n disablePictureInPicture: boolean,\n disableRemotePlayback: boolean,\n exportParts: commaSeparated,\n part: spaceSeparated,\n prefix: null,\n property: null,\n results: number,\n security: null,\n unselectable: null\n },\n space: \"html\",\n transform: caseInsensitiveTransform\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/svg.js\nconst svg$1 = create({\n attributes: {\n accentHeight: \"accent-height\",\n alignmentBaseline: \"alignment-baseline\",\n arabicForm: \"arabic-form\",\n baselineShift: \"baseline-shift\",\n capHeight: \"cap-height\",\n className: \"class\",\n clipPath: \"clip-path\",\n clipRule: \"clip-rule\",\n colorInterpolation: \"color-interpolation\",\n colorInterpolationFilters: \"color-interpolation-filters\",\n colorProfile: \"color-profile\",\n colorRendering: \"color-rendering\",\n crossOrigin: \"crossorigin\",\n dataType: \"datatype\",\n dominantBaseline: \"dominant-baseline\",\n enableBackground: \"enable-background\",\n fillOpacity: \"fill-opacity\",\n fillRule: \"fill-rule\",\n floodColor: \"flood-color\",\n floodOpacity: \"flood-opacity\",\n fontFamily: \"font-family\",\n fontSize: \"font-size\",\n fontSizeAdjust: \"font-size-adjust\",\n fontStretch: \"font-stretch\",\n fontStyle: \"font-style\",\n fontVariant: \"font-variant\",\n fontWeight: \"font-weight\",\n glyphName: \"glyph-name\",\n glyphOrientationHorizontal: \"glyph-orientation-horizontal\",\n glyphOrientationVertical: \"glyph-orientation-vertical\",\n hrefLang: \"hreflang\",\n horizAdvX: \"horiz-adv-x\",\n horizOriginX: \"horiz-origin-x\",\n horizOriginY: \"horiz-origin-y\",\n imageRendering: \"image-rendering\",\n letterSpacing: \"letter-spacing\",\n lightingColor: \"lighting-color\",\n markerEnd: \"marker-end\",\n markerMid: \"marker-mid\",\n markerStart: \"marker-start\",\n maskType: \"mask-type\",\n navDown: \"nav-down\",\n navDownLeft: \"nav-down-left\",\n navDownRight: \"nav-down-right\",\n navLeft: \"nav-left\",\n navNext: \"nav-next\",\n navPrev: \"nav-prev\",\n navRight: \"nav-right\",\n navUp: \"nav-up\",\n navUpLeft: \"nav-up-left\",\n navUpRight: \"nav-up-right\",\n onAbort: \"onabort\",\n onActivate: \"onactivate\",\n onAfterPrint: \"onafterprint\",\n onBeforePrint: \"onbeforeprint\",\n onBegin: \"onbegin\",\n onCancel: \"oncancel\",\n onCanPlay: \"oncanplay\",\n onCanPlayThrough: \"oncanplaythrough\",\n onChange: \"onchange\",\n onClick: \"onclick\",\n onClose: \"onclose\",\n onCopy: \"oncopy\",\n onCueChange: \"oncuechange\",\n onCut: \"oncut\",\n onDblClick: \"ondblclick\",\n onDrag: \"ondrag\",\n onDragEnd: \"ondragend\",\n onDragEnter: \"ondragenter\",\n onDragExit: \"ondragexit\",\n onDragLeave: \"ondragleave\",\n onDragOver: \"ondragover\",\n onDragStart: \"ondragstart\",\n onDrop: \"ondrop\",\n onDurationChange: \"ondurationchange\",\n onEmptied: \"onemptied\",\n onEnd: \"onend\",\n onEnded: \"onended\",\n onError: \"onerror\",\n onFocus: \"onfocus\",\n onFocusIn: \"onfocusin\",\n onFocusOut: \"onfocusout\",\n onHashChange: \"onhashchange\",\n onInput: \"oninput\",\n onInvalid: \"oninvalid\",\n onKeyDown: \"onkeydown\",\n onKeyPress: \"onkeypress\",\n onKeyUp: \"onkeyup\",\n onLoad: \"onload\",\n onLoadedData: \"onloadeddata\",\n onLoadedMetadata: \"onloadedmetadata\",\n onLoadStart: \"onloadstart\",\n onMessage: \"onmessage\",\n onMouseDown: \"onmousedown\",\n onMouseEnter: \"onmouseenter\",\n onMouseLeave: \"onmouseleave\",\n onMouseMove: \"onmousemove\",\n onMouseOut: \"onmouseout\",\n onMouseOver: \"onmouseover\",\n onMouseUp: \"onmouseup\",\n onMouseWheel: \"onmousewheel\",\n onOffline: \"onoffline\",\n onOnline: \"ononline\",\n onPageHide: \"onpagehide\",\n onPageShow: \"onpageshow\",\n onPaste: \"onpaste\",\n onPause: \"onpause\",\n onPlay: \"onplay\",\n onPlaying: \"onplaying\",\n onPopState: \"onpopstate\",\n onProgress: \"onprogress\",\n onRateChange: \"onratechange\",\n onRepeat: \"onrepeat\",\n onReset: \"onreset\",\n onResize: \"onresize\",\n onScroll: \"onscroll\",\n onSeeked: \"onseeked\",\n onSeeking: \"onseeking\",\n onSelect: \"onselect\",\n onShow: \"onshow\",\n onStalled: \"onstalled\",\n onStorage: \"onstorage\",\n onSubmit: \"onsubmit\",\n onSuspend: \"onsuspend\",\n onTimeUpdate: \"ontimeupdate\",\n onToggle: \"ontoggle\",\n onUnload: \"onunload\",\n onVolumeChange: \"onvolumechange\",\n onWaiting: \"onwaiting\",\n onZoom: \"onzoom\",\n overlinePosition: \"overline-position\",\n overlineThickness: \"overline-thickness\",\n paintOrder: \"paint-order\",\n panose1: \"panose-1\",\n pointerEvents: \"pointer-events\",\n referrerPolicy: \"referrerpolicy\",\n renderingIntent: \"rendering-intent\",\n shapeRendering: \"shape-rendering\",\n stopColor: \"stop-color\",\n stopOpacity: \"stop-opacity\",\n strikethroughPosition: \"strikethrough-position\",\n strikethroughThickness: \"strikethrough-thickness\",\n strokeDashArray: \"stroke-dasharray\",\n strokeDashOffset: \"stroke-dashoffset\",\n strokeLineCap: \"stroke-linecap\",\n strokeLineJoin: \"stroke-linejoin\",\n strokeMiterLimit: \"stroke-miterlimit\",\n strokeOpacity: \"stroke-opacity\",\n strokeWidth: \"stroke-width\",\n tabIndex: \"tabindex\",\n textAnchor: \"text-anchor\",\n textDecoration: \"text-decoration\",\n textRendering: \"text-rendering\",\n transformOrigin: \"transform-origin\",\n typeOf: \"typeof\",\n underlinePosition: \"underline-position\",\n underlineThickness: \"underline-thickness\",\n unicodeBidi: \"unicode-bidi\",\n unicodeRange: \"unicode-range\",\n unitsPerEm: \"units-per-em\",\n vAlphabetic: \"v-alphabetic\",\n vHanging: \"v-hanging\",\n vIdeographic: \"v-ideographic\",\n vMathematical: \"v-mathematical\",\n vectorEffect: \"vector-effect\",\n vertAdvY: \"vert-adv-y\",\n vertOriginX: \"vert-origin-x\",\n vertOriginY: \"vert-origin-y\",\n wordSpacing: \"word-spacing\",\n writingMode: \"writing-mode\",\n xHeight: \"x-height\",\n playbackOrder: \"playbackorder\",\n timelineBegin: \"timelinebegin\"\n },\n properties: {\n about: commaOrSpaceSeparated,\n accentHeight: number,\n accumulate: null,\n additive: null,\n alignmentBaseline: null,\n alphabetic: number,\n amplitude: number,\n arabicForm: null,\n ascent: number,\n attributeName: null,\n attributeType: null,\n azimuth: number,\n bandwidth: null,\n baselineShift: null,\n baseFrequency: null,\n baseProfile: null,\n bbox: null,\n begin: null,\n bias: number,\n by: null,\n calcMode: null,\n capHeight: number,\n className: spaceSeparated,\n clip: null,\n clipPath: null,\n clipPathUnits: null,\n clipRule: null,\n color: null,\n colorInterpolation: null,\n colorInterpolationFilters: null,\n colorProfile: null,\n colorRendering: null,\n content: null,\n contentScriptType: null,\n contentStyleType: null,\n crossOrigin: null,\n cursor: null,\n cx: null,\n cy: null,\n d: null,\n dataType: null,\n defaultAction: null,\n descent: number,\n diffuseConstant: number,\n direction: null,\n display: null,\n dur: null,\n divisor: number,\n dominantBaseline: null,\n download: boolean,\n dx: null,\n dy: null,\n edgeMode: null,\n editable: null,\n elevation: number,\n enableBackground: null,\n end: null,\n event: null,\n exponent: number,\n externalResourcesRequired: null,\n fill: null,\n fillOpacity: number,\n fillRule: null,\n filter: null,\n filterRes: null,\n filterUnits: null,\n floodColor: null,\n floodOpacity: null,\n focusable: null,\n focusHighlight: null,\n fontFamily: null,\n fontSize: null,\n fontSizeAdjust: null,\n fontStretch: null,\n fontStyle: null,\n fontVariant: null,\n fontWeight: null,\n format: null,\n fr: null,\n from: null,\n fx: null,\n fy: null,\n g1: commaSeparated,\n g2: commaSeparated,\n glyphName: commaSeparated,\n glyphOrientationHorizontal: null,\n glyphOrientationVertical: null,\n glyphRef: null,\n gradientTransform: null,\n gradientUnits: null,\n handler: null,\n hanging: number,\n hatchContentUnits: null,\n hatchUnits: null,\n height: null,\n href: null,\n hrefLang: null,\n horizAdvX: number,\n horizOriginX: number,\n horizOriginY: number,\n id: null,\n ideographic: number,\n imageRendering: null,\n initialVisibility: null,\n in: null,\n in2: null,\n intercept: number,\n k: number,\n k1: number,\n k2: number,\n k3: number,\n k4: number,\n kernelMatrix: commaOrSpaceSeparated,\n kernelUnitLength: null,\n keyPoints: null,\n keySplines: null,\n keyTimes: null,\n kerning: null,\n lang: null,\n lengthAdjust: null,\n letterSpacing: null,\n lightingColor: null,\n limitingConeAngle: number,\n local: null,\n markerEnd: null,\n markerMid: null,\n markerStart: null,\n markerHeight: null,\n markerUnits: null,\n markerWidth: null,\n mask: null,\n maskContentUnits: null,\n maskType: null,\n maskUnits: null,\n mathematical: null,\n max: null,\n media: null,\n mediaCharacterEncoding: null,\n mediaContentEncodings: null,\n mediaSize: number,\n mediaTime: null,\n method: null,\n min: null,\n mode: null,\n name: null,\n navDown: null,\n navDownLeft: null,\n navDownRight: null,\n navLeft: null,\n navNext: null,\n navPrev: null,\n navRight: null,\n navUp: null,\n navUpLeft: null,\n navUpRight: null,\n numOctaves: null,\n observer: null,\n offset: null,\n onAbort: null,\n onActivate: null,\n onAfterPrint: null,\n onBeforePrint: null,\n onBegin: null,\n onCancel: null,\n onCanPlay: null,\n onCanPlayThrough: null,\n onChange: null,\n onClick: null,\n onClose: null,\n onCopy: null,\n onCueChange: null,\n onCut: null,\n onDblClick: null,\n onDrag: null,\n onDragEnd: null,\n onDragEnter: null,\n onDragExit: null,\n onDragLeave: null,\n onDragOver: null,\n onDragStart: null,\n onDrop: null,\n onDurationChange: null,\n onEmptied: null,\n onEnd: null,\n onEnded: null,\n onError: null,\n onFocus: null,\n onFocusIn: null,\n onFocusOut: null,\n onHashChange: null,\n onInput: null,\n onInvalid: null,\n onKeyDown: null,\n onKeyPress: null,\n onKeyUp: null,\n onLoad: null,\n onLoadedData: null,\n onLoadedMetadata: null,\n onLoadStart: null,\n onMessage: null,\n onMouseDown: null,\n onMouseEnter: null,\n onMouseLeave: null,\n onMouseMove: null,\n onMouseOut: null,\n onMouseOver: null,\n onMouseUp: null,\n onMouseWheel: null,\n onOffline: null,\n onOnline: null,\n onPageHide: null,\n onPageShow: null,\n onPaste: null,\n onPause: null,\n onPlay: null,\n onPlaying: null,\n onPopState: null,\n onProgress: null,\n onRateChange: null,\n onRepeat: null,\n onReset: null,\n onResize: null,\n onScroll: null,\n onSeeked: null,\n onSeeking: null,\n onSelect: null,\n onShow: null,\n onStalled: null,\n onStorage: null,\n onSubmit: null,\n onSuspend: null,\n onTimeUpdate: null,\n onToggle: null,\n onUnload: null,\n onVolumeChange: null,\n onWaiting: null,\n onZoom: null,\n opacity: null,\n operator: null,\n order: null,\n orient: null,\n orientation: null,\n origin: null,\n overflow: null,\n overlay: null,\n overlinePosition: number,\n overlineThickness: number,\n paintOrder: null,\n panose1: null,\n path: null,\n pathLength: number,\n patternContentUnits: null,\n patternTransform: null,\n patternUnits: null,\n phase: null,\n ping: spaceSeparated,\n pitch: null,\n playbackOrder: null,\n pointerEvents: null,\n points: null,\n pointsAtX: number,\n pointsAtY: number,\n pointsAtZ: number,\n preserveAlpha: null,\n preserveAspectRatio: null,\n primitiveUnits: null,\n propagate: null,\n property: commaOrSpaceSeparated,\n r: null,\n radius: null,\n referrerPolicy: null,\n refX: null,\n refY: null,\n rel: commaOrSpaceSeparated,\n rev: commaOrSpaceSeparated,\n renderingIntent: null,\n repeatCount: null,\n repeatDur: null,\n requiredExtensions: commaOrSpaceSeparated,\n requiredFeatures: commaOrSpaceSeparated,\n requiredFonts: commaOrSpaceSeparated,\n requiredFormats: commaOrSpaceSeparated,\n resource: null,\n restart: null,\n result: null,\n rotate: null,\n rx: null,\n ry: null,\n scale: null,\n seed: null,\n shapeRendering: null,\n side: null,\n slope: null,\n snapshotTime: null,\n specularConstant: number,\n specularExponent: number,\n spreadMethod: null,\n spacing: null,\n startOffset: null,\n stdDeviation: null,\n stemh: null,\n stemv: null,\n stitchTiles: null,\n stopColor: null,\n stopOpacity: null,\n strikethroughPosition: number,\n strikethroughThickness: number,\n string: null,\n stroke: null,\n strokeDashArray: commaOrSpaceSeparated,\n strokeDashOffset: null,\n strokeLineCap: null,\n strokeLineJoin: null,\n strokeMiterLimit: number,\n strokeOpacity: number,\n strokeWidth: null,\n style: null,\n surfaceScale: number,\n syncBehavior: null,\n syncBehaviorDefault: null,\n syncMaster: null,\n syncTolerance: null,\n syncToleranceDefault: null,\n systemLanguage: commaOrSpaceSeparated,\n tabIndex: number,\n tableValues: null,\n target: null,\n targetX: number,\n targetY: number,\n textAnchor: null,\n textDecoration: null,\n textRendering: null,\n textLength: null,\n timelineBegin: null,\n title: null,\n transformBehavior: null,\n type: null,\n typeOf: commaOrSpaceSeparated,\n to: null,\n transform: null,\n transformOrigin: null,\n u1: null,\n u2: null,\n underlinePosition: number,\n underlineThickness: number,\n unicode: null,\n unicodeBidi: null,\n unicodeRange: null,\n unitsPerEm: number,\n values: null,\n vAlphabetic: number,\n vMathematical: number,\n vectorEffect: null,\n vHanging: number,\n vIdeographic: number,\n version: null,\n vertAdvY: number,\n vertOriginX: number,\n vertOriginY: number,\n viewBox: null,\n viewTarget: null,\n visibility: null,\n width: null,\n widths: null,\n wordSpacing: null,\n writingMode: null,\n x: null,\n x1: null,\n x2: null,\n xChannelSelector: null,\n xHeight: number,\n y: null,\n y1: null,\n y2: null,\n yChannelSelector: null,\n z: null,\n zoomAndPan: null\n },\n space: \"svg\",\n transform: caseSensitiveTransform\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/xlink.js\nconst xlink = create({\n properties: {\n xLinkActuate: null,\n xLinkArcRole: null,\n xLinkHref: null,\n xLinkRole: null,\n xLinkShow: null,\n xLinkTitle: null,\n xLinkType: null\n },\n space: \"xlink\",\n transform(_, property) {\n return \"xlink:\" + property.slice(5).toLowerCase();\n }\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/xmlns.js\nconst xmlns = create({\n attributes: { xmlnsxlink: \"xmlns:xlink\" },\n properties: {\n xmlnsXLink: null,\n xmlns: null\n },\n space: \"xmlns\",\n transform: caseInsensitiveTransform\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/xml.js\nconst xml = create({\n properties: {\n xmlBase: null,\n xmlLang: null,\n xmlSpace: null\n },\n space: \"xml\",\n transform(_, property) {\n return \"xml:\" + property.slice(3).toLowerCase();\n }\n});\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/lib/find.js\n/**\n* @import {Schema} from 'property-information'\n*/\nconst cap = /[A-Z]/g;\nconst dash = /-[a-z]/g;\nconst valid = /^data[-\\w.:]+$/i;\n/**\n* Look up info on a property.\n*\n* In most cases the given `schema` contains info on the property.\n* All standard,\n* most legacy,\n* and some non-standard properties are supported.\n* For these cases,\n* the returned `Info` has hints about the value of the property.\n*\n* `name` can also be a valid data attribute or property,\n* in which case an `Info` object with the correctly cased `attribute` and\n* `property` is returned.\n*\n* `name` can be an unknown attribute,\n* in which case an `Info` object with `attribute` and `property` set to the\n* given name is returned.\n* It is not recommended to provide unsupported legacy or recently specced\n* properties.\n*\n*\n* @param {Schema} schema\n* Schema;\n* either the `html` or `svg` export.\n* @param {string} value\n* An attribute-like or property-like name;\n* it will be passed through `normalize` to hopefully find the correct info.\n* @returns {Info}\n* Info.\n*/\nfunction find(schema, value) {\n const normal = normalize(value);\n let property = value;\n let Type = Info;\n if (normal in schema.normal) return schema.property[schema.normal[normal]];\n if (normal.length > 4 && normal.slice(0, 4) === \"data\" && valid.test(value)) {\n if (value.charAt(4) === \"-\") {\n const rest = value.slice(5).replace(dash, camelcase);\n property = \"data\" + rest.charAt(0).toUpperCase() + rest.slice(1);\n } else {\n const rest = value.slice(4);\n if (!dash.test(rest)) {\n let dashes = rest.replace(cap, kebab);\n if (dashes.charAt(0) !== \"-\") dashes = \"-\" + dashes;\n value = \"data\" + dashes;\n }\n }\n Type = DefinedInfo;\n }\n return new Type(property, value);\n}\n/**\n* @param {string} $0\n* Value.\n* @returns {string}\n* Kebab.\n*/\nfunction kebab($0) {\n return \"-\" + $0.toLowerCase();\n}\n/**\n* @param {string} $0\n* Value.\n* @returns {string}\n* Camel.\n*/\nfunction camelcase($0) {\n return $0.charAt(1).toUpperCase();\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/property-information@7.2.0/node_modules/property-information/index.js\nconst html$2 = merge([\n aria,\n html$3,\n xlink,\n xmlns,\n xml\n], \"html\");\nconst svg = merge([\n aria,\n svg$1,\n xlink,\n xmlns,\n xml\n], \"svg\");\n\n//#endregion\n//#region ../../node_modules/.pnpm/zwitch@2.0.4/node_modules/zwitch/index.js\n/**\n* @callback Handler\n* Handle a value, with a certain ID field set to a certain value.\n* The ID field is passed to `zwitch`, and it’s value is this function’s\n* place on the `handlers` record.\n* @param {...any} parameters\n* Arbitrary parameters passed to the zwitch.\n* The first will be an object with a certain ID field set to a certain value.\n* @returns {any}\n* Anything!\n*/\n/**\n* @callback UnknownHandler\n* Handle values that do have a certain ID field, but it’s set to a value\n* that is not listed in the `handlers` record.\n* @param {unknown} value\n* An object with a certain ID field set to an unknown value.\n* @param {...any} rest\n* Arbitrary parameters passed to the zwitch.\n* @returns {any}\n* Anything!\n*/\n/**\n* @callback InvalidHandler\n* Handle values that do not have a certain ID field.\n* @param {unknown} value\n* Any unknown value.\n* @param {...any} rest\n* Arbitrary parameters passed to the zwitch.\n* @returns {void|null|undefined|never}\n* This should crash or return nothing.\n*/\n/**\n* @template {InvalidHandler} [Invalid=InvalidHandler]\n* @template {UnknownHandler} [Unknown=UnknownHandler]\n* @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n* @typedef Options\n* Configuration (required).\n* @property {Invalid} [invalid]\n* Handler to use for invalid values.\n* @property {Unknown} [unknown]\n* Handler to use for unknown values.\n* @property {Handlers} [handlers]\n* Handlers to use.\n*/\nconst own$3 = {}.hasOwnProperty;\n/**\n* Handle values based on a field.\n*\n* @template {InvalidHandler} [Invalid=InvalidHandler]\n* @template {UnknownHandler} [Unknown=UnknownHandler]\n* @template {Record<string, Handler>} [Handlers=Record<string, Handler>]\n* @param {string} key\n* Field to switch on.\n* @param {Options<Invalid, Unknown, Handlers>} [options]\n* Configuration (required).\n* @returns {{unknown: Unknown, invalid: Invalid, handlers: Handlers, (...parameters: Parameters<Handlers[keyof Handlers]>): ReturnType<Handlers[keyof Handlers]>, (...parameters: Parameters<Unknown>): ReturnType<Unknown>}}\n*/\nfunction zwitch(key$1, options) {\n const settings = options || {};\n /**\n * Handle one value.\n *\n * Based on the bound `key`, a respective handler will be called.\n * If `value` is not an object, or doesn’t have a `key` property, the special\n * “invalid” handler will be called.\n * If `value` has an unknown `key`, the special “unknown” handler will be\n * called.\n *\n * All arguments, and the context object, are passed through to the handler,\n * and it’s result is returned.\n *\n * @this {unknown}\n * Any context object.\n * @param {unknown} [value]\n * Any value.\n * @param {...unknown} parameters\n * Arbitrary parameters passed to the zwitch.\n * @property {Handler} invalid\n * Handle for values that do not have a certain ID field.\n * @property {Handler} unknown\n * Handle values that do have a certain ID field, but it’s set to a value\n * that is not listed in the `handlers` record.\n * @property {Handlers} handlers\n * Record of handlers.\n * @returns {unknown}\n * Anything.\n */\n function one$2(value, ...parameters) {\n /** @type {Handler|undefined} */\n let fn = one$2.invalid;\n const handlers = one$2.handlers;\n if (value && own$3.call(value, key$1)) {\n const id = String(value[key$1]);\n fn = own$3.call(handlers, id) ? handlers[id] : one$2.unknown;\n }\n if (fn) return fn.call(this, value, ...parameters);\n }\n one$2.handlers = settings.handlers || {};\n one$2.invalid = settings.invalid;\n one$2.unknown = settings.unknown;\n return one$2;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/core.js\n/**\n* @typedef CoreOptions\n* @property {ReadonlyArray<string>} [subset=[]]\n* Whether to only escape the given subset of characters.\n* @property {boolean} [escapeOnly=false]\n* Whether to only escape possibly dangerous characters.\n* Those characters are `\"`, `&`, `'`, `<`, `>`, and `` ` ``.\n*\n* @typedef FormatOptions\n* @property {(code: number, next: number, options: CoreWithFormatOptions) => string} format\n* Format strategy.\n*\n* @typedef {CoreOptions & FormatOptions & import('./util/format-smart.js').FormatSmartOptions} CoreWithFormatOptions\n*/\nconst defaultSubsetRegex = /[\"&'<>`]/g;\nconst surrogatePairsRegex = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\nconst controlCharactersRegex = /[\\x01-\\t\\v\\f\\x0E-\\x1F\\x7F\\x81\\x8D\\x8F\\x90\\x9D\\xA0-\\uFFFF]/g;\nconst regexEscapeRegex = /[|\\\\{}()[\\]^$+*?.]/g;\n/** @type {WeakMap<ReadonlyArray<string>, RegExp>} */\nconst subsetToRegexCache = /* @__PURE__ */ new WeakMap();\n/**\n* Encode certain characters in `value`.\n*\n* @param {string} value\n* @param {CoreWithFormatOptions} options\n* @returns {string}\n*/\nfunction core(value, options) {\n value = value.replace(options.subset ? charactersToExpressionCached(options.subset) : defaultSubsetRegex, basic);\n if (options.subset || options.escapeOnly) return value;\n return value.replace(surrogatePairsRegex, surrogate).replace(controlCharactersRegex, basic);\n /**\n * @param {string} pair\n * @param {number} index\n * @param {string} all\n */\n function surrogate(pair, index$1, all$2) {\n return options.format((pair.charCodeAt(0) - 55296) * 1024 + pair.charCodeAt(1) - 56320 + 65536, all$2.charCodeAt(index$1 + 2), options);\n }\n /**\n * @param {string} character\n * @param {number} index\n * @param {string} all\n */\n function basic(character, index$1, all$2) {\n return options.format(character.charCodeAt(0), all$2.charCodeAt(index$1 + 1), options);\n }\n}\n/**\n* A wrapper function that caches the result of `charactersToExpression` with a WeakMap.\n* This can improve performance when tooling calls `charactersToExpression` repeatedly\n* with the same subset.\n*\n* @param {ReadonlyArray<string>} subset\n* @returns {RegExp}\n*/\nfunction charactersToExpressionCached(subset) {\n let cached = subsetToRegexCache.get(subset);\n if (!cached) {\n cached = charactersToExpression(subset);\n subsetToRegexCache.set(subset, cached);\n }\n return cached;\n}\n/**\n* @param {ReadonlyArray<string>} subset\n* @returns {RegExp}\n*/\nfunction charactersToExpression(subset) {\n /** @type {Array<string>} */\n const groups = [];\n let index$1 = -1;\n while (++index$1 < subset.length) groups.push(subset[index$1].replace(regexEscapeRegex, \"\\\\$&\"));\n return new RegExp(\"(?:\" + groups.join(\"|\") + \")\", \"g\");\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-hexadecimal.js\nconst hexadecimalRegex = /[\\dA-Fa-f]/;\n/**\n* Configurable ways to encode characters as hexadecimal references.\n*\n* @param {number} code\n* @param {number} next\n* @param {boolean|undefined} omit\n* @returns {string}\n*/\nfunction toHexadecimal(code, next$1, omit) {\n const value = \"&#x\" + code.toString(16).toUpperCase();\n return omit && next$1 && !hexadecimalRegex.test(String.fromCharCode(next$1)) ? value : value + \";\";\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-decimal.js\nconst decimalRegex = /\\d/;\n/**\n* Configurable ways to encode characters as decimal references.\n*\n* @param {number} code\n* @param {number} next\n* @param {boolean|undefined} omit\n* @returns {string}\n*/\nfunction toDecimal(code, next$1, omit) {\n const value = \"&#\" + String(code);\n return omit && next$1 && !decimalRegex.test(String.fromCharCode(next$1)) ? value : value + \";\";\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/character-entities-legacy@3.0.0/node_modules/character-entities-legacy/index.js\n/**\n* List of legacy HTML named character references that don’t need a trailing semicolon.\n*\n* @type {Array<string>}\n*/\nconst characterEntitiesLegacy = [\n \"AElig\",\n \"AMP\",\n \"Aacute\",\n \"Acirc\",\n \"Agrave\",\n \"Aring\",\n \"Atilde\",\n \"Auml\",\n \"COPY\",\n \"Ccedil\",\n \"ETH\",\n \"Eacute\",\n \"Ecirc\",\n \"Egrave\",\n \"Euml\",\n \"GT\",\n \"Iacute\",\n \"Icirc\",\n \"Igrave\",\n \"Iuml\",\n \"LT\",\n \"Ntilde\",\n \"Oacute\",\n \"Ocirc\",\n \"Ograve\",\n \"Oslash\",\n \"Otilde\",\n \"Ouml\",\n \"QUOT\",\n \"REG\",\n \"THORN\",\n \"Uacute\",\n \"Ucirc\",\n \"Ugrave\",\n \"Uuml\",\n \"Yacute\",\n \"aacute\",\n \"acirc\",\n \"acute\",\n \"aelig\",\n \"agrave\",\n \"amp\",\n \"aring\",\n \"atilde\",\n \"auml\",\n \"brvbar\",\n \"ccedil\",\n \"cedil\",\n \"cent\",\n \"copy\",\n \"curren\",\n \"deg\",\n \"divide\",\n \"eacute\",\n \"ecirc\",\n \"egrave\",\n \"eth\",\n \"euml\",\n \"frac12\",\n \"frac14\",\n \"frac34\",\n \"gt\",\n \"iacute\",\n \"icirc\",\n \"iexcl\",\n \"igrave\",\n \"iquest\",\n \"iuml\",\n \"laquo\",\n \"lt\",\n \"macr\",\n \"micro\",\n \"middot\",\n \"nbsp\",\n \"not\",\n \"ntilde\",\n \"oacute\",\n \"ocirc\",\n \"ograve\",\n \"ordf\",\n \"ordm\",\n \"oslash\",\n \"otilde\",\n \"ouml\",\n \"para\",\n \"plusmn\",\n \"pound\",\n \"quot\",\n \"raquo\",\n \"reg\",\n \"sect\",\n \"shy\",\n \"sup1\",\n \"sup2\",\n \"sup3\",\n \"szlig\",\n \"thorn\",\n \"times\",\n \"uacute\",\n \"ucirc\",\n \"ugrave\",\n \"uml\",\n \"uuml\",\n \"yacute\",\n \"yen\",\n \"yuml\"\n];\n\n//#endregion\n//#region ../../node_modules/.pnpm/character-entities-html4@2.1.0/node_modules/character-entities-html4/index.js\n/**\n* Map of named character references from HTML 4.\n*\n* @type {Record<string, string>}\n*/\nconst characterEntitiesHtml4 = {\n nbsp: \"\\xA0\",\n iexcl: \"¡\",\n cent: \"¢\",\n pound: \"£\",\n curren: \"¤\",\n yen: \"¥\",\n brvbar: \"¦\",\n sect: \"§\",\n uml: \"¨\",\n copy: \"©\",\n ordf: \"ª\",\n laquo: \"«\",\n not: \"¬\",\n shy: \"\",\n reg: \"®\",\n macr: \"¯\",\n deg: \"°\",\n plusmn: \"±\",\n sup2: \"²\",\n sup3: \"³\",\n acute: \"´\",\n micro: \"µ\",\n para: \"¶\",\n middot: \"·\",\n cedil: \"¸\",\n sup1: \"¹\",\n ordm: \"º\",\n raquo: \"»\",\n frac14: \"¼\",\n frac12: \"½\",\n frac34: \"¾\",\n iquest: \"¿\",\n Agrave: \"À\",\n Aacute: \"Á\",\n Acirc: \"Â\",\n Atilde: \"Ã\",\n Auml: \"Ä\",\n Aring: \"Å\",\n AElig: \"Æ\",\n Ccedil: \"Ç\",\n Egrave: \"È\",\n Eacute: \"É\",\n Ecirc: \"Ê\",\n Euml: \"Ë\",\n Igrave: \"Ì\",\n Iacute: \"Í\",\n Icirc: \"Î\",\n Iuml: \"Ï\",\n ETH: \"Ð\",\n Ntilde: \"Ñ\",\n Ograve: \"Ò\",\n Oacute: \"Ó\",\n Ocirc: \"Ô\",\n Otilde: \"Õ\",\n Ouml: \"Ö\",\n times: \"×\",\n Oslash: \"Ø\",\n Ugrave: \"Ù\",\n Uacute: \"Ú\",\n Ucirc: \"Û\",\n Uuml: \"Ü\",\n Yacute: \"Ý\",\n THORN: \"Þ\",\n szlig: \"ß\",\n agrave: \"à\",\n aacute: \"á\",\n acirc: \"â\",\n atilde: \"ã\",\n auml: \"ä\",\n aring: \"å\",\n aelig: \"æ\",\n ccedil: \"ç\",\n egrave: \"è\",\n eacute: \"é\",\n ecirc: \"ê\",\n euml: \"ë\",\n igrave: \"ì\",\n iacute: \"í\",\n icirc: \"î\",\n iuml: \"ï\",\n eth: \"ð\",\n ntilde: \"ñ\",\n ograve: \"ò\",\n oacute: \"ó\",\n ocirc: \"ô\",\n otilde: \"õ\",\n ouml: \"ö\",\n divide: \"÷\",\n oslash: \"ø\",\n ugrave: \"ù\",\n uacute: \"ú\",\n ucirc: \"û\",\n uuml: \"ü\",\n yacute: \"ý\",\n thorn: \"þ\",\n yuml: \"ÿ\",\n fnof: \"ƒ\",\n Alpha: \"Α\",\n Beta: \"Β\",\n Gamma: \"Γ\",\n Delta: \"Δ\",\n Epsilon: \"Ε\",\n Zeta: \"Ζ\",\n Eta: \"Η\",\n Theta: \"Θ\",\n Iota: \"Ι\",\n Kappa: \"Κ\",\n Lambda: \"Λ\",\n Mu: \"Μ\",\n Nu: \"Ν\",\n Xi: \"Ξ\",\n Omicron: \"Ο\",\n Pi: \"Π\",\n Rho: \"Ρ\",\n Sigma: \"Σ\",\n Tau: \"Τ\",\n Upsilon: \"Υ\",\n Phi: \"Φ\",\n Chi: \"Χ\",\n Psi: \"Ψ\",\n Omega: \"Ω\",\n alpha: \"α\",\n beta: \"β\",\n gamma: \"γ\",\n delta: \"δ\",\n epsilon: \"ε\",\n zeta: \"ζ\",\n eta: \"η\",\n theta: \"θ\",\n iota: \"ι\",\n kappa: \"κ\",\n lambda: \"λ\",\n mu: \"μ\",\n nu: \"ν\",\n xi: \"ξ\",\n omicron: \"ο\",\n pi: \"π\",\n rho: \"ρ\",\n sigmaf: \"ς\",\n sigma: \"σ\",\n tau: \"τ\",\n upsilon: \"υ\",\n phi: \"φ\",\n chi: \"χ\",\n psi: \"ψ\",\n omega: \"ω\",\n thetasym: \"ϑ\",\n upsih: \"ϒ\",\n piv: \"ϖ\",\n bull: \"•\",\n hellip: \"…\",\n prime: \"′\",\n Prime: \"″\",\n oline: \"‾\",\n frasl: \"⁄\",\n weierp: \"℘\",\n image: \"ℑ\",\n real: \"ℜ\",\n trade: \"™\",\n alefsym: \"ℵ\",\n larr: \"←\",\n uarr: \"↑\",\n rarr: \"→\",\n darr: \"↓\",\n harr: \"↔\",\n crarr: \"↵\",\n lArr: \"⇐\",\n uArr: \"⇑\",\n rArr: \"⇒\",\n dArr: \"⇓\",\n hArr: \"⇔\",\n forall: \"∀\",\n part: \"∂\",\n exist: \"∃\",\n empty: \"∅\",\n nabla: \"∇\",\n isin: \"∈\",\n notin: \"∉\",\n ni: \"∋\",\n prod: \"∏\",\n sum: \"∑\",\n minus: \"−\",\n lowast: \"∗\",\n radic: \"√\",\n prop: \"∝\",\n infin: \"∞\",\n ang: \"∠\",\n and: \"∧\",\n or: \"∨\",\n cap: \"∩\",\n cup: \"∪\",\n int: \"∫\",\n there4: \"∴\",\n sim: \"∼\",\n cong: \"≅\",\n asymp: \"≈\",\n ne: \"≠\",\n equiv: \"≡\",\n le: \"≤\",\n ge: \"≥\",\n sub: \"⊂\",\n sup: \"⊃\",\n nsub: \"⊄\",\n sube: \"⊆\",\n supe: \"⊇\",\n oplus: \"⊕\",\n otimes: \"⊗\",\n perp: \"⊥\",\n sdot: \"⋅\",\n lceil: \"⌈\",\n rceil: \"⌉\",\n lfloor: \"⌊\",\n rfloor: \"⌋\",\n lang: \"〈\",\n rang: \"〉\",\n loz: \"◊\",\n spades: \"♠\",\n clubs: \"♣\",\n hearts: \"♥\",\n diams: \"♦\",\n quot: \"\\\"\",\n amp: \"&\",\n lt: \"<\",\n gt: \">\",\n OElig: \"Œ\",\n oelig: \"œ\",\n Scaron: \"Š\",\n scaron: \"š\",\n Yuml: \"Ÿ\",\n circ: \"ˆ\",\n tilde: \"˜\",\n ensp: \" \",\n emsp: \" \",\n thinsp: \" \",\n zwnj: \"\",\n zwj: \"\",\n lrm: \"\",\n rlm: \"\",\n ndash: \"–\",\n mdash: \"—\",\n lsquo: \"‘\",\n rsquo: \"’\",\n sbquo: \"‚\",\n ldquo: \"“\",\n rdquo: \"”\",\n bdquo: \"„\",\n dagger: \"†\",\n Dagger: \"‡\",\n permil: \"‰\",\n lsaquo: \"‹\",\n rsaquo: \"›\",\n euro: \"€\"\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/constant/dangerous.js\n/**\n* List of legacy (that don’t need a trailing `;`) named references which could,\n* depending on what follows them, turn into a different meaning\n*\n* @type {Array<string>}\n*/\nconst dangerous = [\n \"cent\",\n \"copy\",\n \"divide\",\n \"gt\",\n \"lt\",\n \"not\",\n \"para\",\n \"times\"\n];\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/to-named.js\nconst own$2 = {}.hasOwnProperty;\n/**\n* `characterEntitiesHtml4` but inverted.\n*\n* @type {Record<string, string>}\n*/\nconst characters = {};\n/** @type {string} */\nlet key;\nfor (key in characterEntitiesHtml4) if (own$2.call(characterEntitiesHtml4, key)) characters[characterEntitiesHtml4[key]] = key;\nconst notAlphanumericRegex = /[^\\dA-Za-z]/;\n/**\n* Configurable ways to encode characters as named references.\n*\n* @param {number} code\n* @param {number} next\n* @param {boolean|undefined} omit\n* @param {boolean|undefined} attribute\n* @returns {string}\n*/\nfunction toNamed(code, next$1, omit, attribute) {\n const character = String.fromCharCode(code);\n if (own$2.call(characters, character)) {\n const name = characters[character];\n const value = \"&\" + name;\n if (omit && characterEntitiesLegacy.includes(name) && !dangerous.includes(name) && (!attribute || next$1 && next$1 !== 61 && notAlphanumericRegex.test(String.fromCharCode(next$1)))) return value;\n return value + \";\";\n }\n return \"\";\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/util/format-smart.js\n/**\n* @typedef FormatSmartOptions\n* @property {boolean} [useNamedReferences=false]\n* Prefer named character references (`&`) where possible.\n* @property {boolean} [useShortestReferences=false]\n* Prefer the shortest possible reference, if that results in less bytes.\n* **Note**: `useNamedReferences` can be omitted when using `useShortestReferences`.\n* @property {boolean} [omitOptionalSemicolons=false]\n* Whether to omit semicolons when possible.\n* **Note**: This creates what HTML calls “parse errors” but is otherwise still valid HTML — don’t use this except when building a minifier.\n* Omitting semicolons is possible for certain named and numeric references in some cases.\n* @property {boolean} [attribute=false]\n* Create character references which don’t fail in attributes.\n* **Note**: `attribute` only applies when operating dangerously with\n* `omitOptionalSemicolons: true`.\n*/\n/**\n* Configurable ways to encode a character yielding pretty or small results.\n*\n* @param {number} code\n* @param {number} next\n* @param {FormatSmartOptions} options\n* @returns {string}\n*/\nfunction formatSmart(code, next$1, options) {\n let numeric = toHexadecimal(code, next$1, options.omitOptionalSemicolons);\n /** @type {string|undefined} */\n let named;\n if (options.useNamedReferences || options.useShortestReferences) named = toNamed(code, next$1, options.omitOptionalSemicolons, options.attribute);\n if ((options.useShortestReferences || !named) && options.useShortestReferences) {\n const decimal = toDecimal(code, next$1, options.omitOptionalSemicolons);\n if (decimal.length < numeric.length) numeric = decimal;\n }\n return named && (!options.useShortestReferences || named.length < numeric.length) ? named : numeric;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/stringify-entities@4.0.4/node_modules/stringify-entities/lib/index.js\n/**\n* @typedef {import('./core.js').CoreOptions & import('./util/format-smart.js').FormatSmartOptions} Options\n* @typedef {import('./core.js').CoreOptions} LightOptions\n*/\n/**\n* Encode special characters in `value`.\n*\n* @param {string} value\n* Value to encode.\n* @param {Options} [options]\n* Configuration.\n* @returns {string}\n* Encoded value.\n*/\nfunction stringifyEntities(value, options) {\n return core(value, Object.assign({ format: formatSmart }, options));\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/comment.js\n/**\n* @import {Comment, Parents} from 'hast'\n* @import {State} from '../index.js'\n*/\nconst htmlCommentRegex = /^>|^->|<!--|-->|--!>|<!-$/g;\nconst bogusCommentEntitySubset = [\">\"];\nconst commentEntitySubset = [\"<\", \">\"];\n/**\n* Serialize a comment.\n*\n* @param {Comment} node\n* Node to handle.\n* @param {number | undefined} _1\n* Index of `node` in `parent.\n* @param {Parents | undefined} _2\n* Parent of `node`.\n* @param {State} state\n* Info passed around about the current state.\n* @returns {string}\n* Serialized node.\n*/\nfunction comment(node, _1, _2, state) {\n return state.settings.bogusComments ? \"<?\" + stringifyEntities(node.value, Object.assign({}, state.settings.characterReferences, { subset: bogusCommentEntitySubset })) + \">\" : \"<!--\" + node.value.replace(htmlCommentRegex, encode) + \"-->\";\n /**\n * @param {string} $0\n */\n function encode($0) {\n return stringifyEntities($0, Object.assign({}, state.settings.characterReferences, { subset: commentEntitySubset }));\n }\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/doctype.js\n/**\n* @import {Doctype, Parents} from 'hast'\n* @import {State} from '../index.js'\n*/\n/**\n* Serialize a doctype.\n*\n* @param {Doctype} _1\n* Node to handle.\n* @param {number | undefined} _2\n* Index of `node` in `parent.\n* @param {Parents | undefined} _3\n* Parent of `node`.\n* @param {State} state\n* Info passed around about the current state.\n* @returns {string}\n* Serialized node.\n*/\nfunction doctype(_1, _2, _3, state) {\n return \"<!\" + (state.settings.upperDoctype ? \"DOCTYPE\" : \"doctype\") + (state.settings.tightDoctype ? \"\" : \" \") + \"html>\";\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/ccount@2.0.1/node_modules/ccount/index.js\n/**\n* Count how often a character (or substring) is used in a string.\n*\n* @param {string} value\n* Value to search in.\n* @param {string} character\n* Character (or substring) to look for.\n* @return {number}\n* Number of times `character` occurred in `value`.\n*/\nfunction ccount(value, character) {\n const source = String(value);\n if (typeof character !== \"string\") throw new TypeError(\"Expected character\");\n let count = 0;\n let index$1 = source.indexOf(character);\n while (index$1 !== -1) {\n count++;\n index$1 = source.indexOf(character, index$1 + character.length);\n }\n return count;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/comma-separated-tokens@2.0.3/node_modules/comma-separated-tokens/index.js\n/**\n* @typedef Options\n* Configuration for `stringify`.\n* @property {boolean} [padLeft=true]\n* Whether to pad a space before a token.\n* @property {boolean} [padRight=false]\n* Whether to pad a space after a token.\n*/\n/**\n* @typedef {Options} StringifyOptions\n* Please use `StringifyOptions` instead.\n*/\n/**\n* Parse comma-separated tokens to an array.\n*\n* @param {string} value\n* Comma-separated tokens.\n* @returns {Array<string>}\n* List of tokens.\n*/\nfunction parse$1(value) {\n /** @type {Array<string>} */\n const tokens = [];\n const input = String(value || \"\");\n let index$1 = input.indexOf(\",\");\n let start = 0;\n /** @type {boolean} */\n let end = false;\n while (!end) {\n if (index$1 === -1) {\n index$1 = input.length;\n end = true;\n }\n const token = input.slice(start, index$1).trim();\n if (token || !end) tokens.push(token);\n start = index$1 + 1;\n index$1 = input.indexOf(\",\", start);\n }\n return tokens;\n}\n/**\n* Serialize an array of strings or numbers to comma-separated tokens.\n*\n* @param {Array<string|number>} values\n* List of tokens.\n* @param {Options} [options]\n* Configuration for `stringify` (optional).\n* @returns {string}\n* Comma-separated tokens.\n*/\nfunction stringify$1(values, options) {\n const settings = options || {};\n return (values[values.length - 1] === \"\" ? [...values, \"\"] : values).join((settings.padRight ? \" \" : \"\") + \",\" + (settings.padLeft === false ? \"\" : \" \")).trim();\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/space-separated-tokens@2.0.2/node_modules/space-separated-tokens/index.js\n/**\n* Parse space-separated tokens to an array of strings.\n*\n* @param {string} value\n* Space-separated tokens.\n* @returns {Array<string>}\n* List of tokens.\n*/\nfunction parse(value) {\n const input = String(value || \"\").trim();\n return input ? input.split(/[ \\t\\n\\r\\f]+/g) : [];\n}\n/**\n* Serialize an array of strings as space separated-tokens.\n*\n* @param {Array<string|number>} values\n* List of tokens.\n* @returns {string}\n* Space-separated tokens.\n*/\nfunction stringify(values) {\n return values.join(\" \").trim();\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-whitespace@3.0.0/node_modules/hast-util-whitespace/lib/index.js\n/**\n* @typedef {import('hast').Nodes} Nodes\n*/\nconst re = /[ \\t\\n\\f\\r]/g;\n/**\n* Check if the given value is *inter-element whitespace*.\n*\n* @param {Nodes | string} thing\n* Thing to check (`Node` or `string`).\n* @returns {boolean}\n* Whether the `value` is inter-element whitespace (`boolean`): consisting of\n* zero or more of space, tab (`\\t`), line feed (`\\n`), carriage return\n* (`\\r`), or form feed (`\\f`); if a node is passed it must be a `Text` node,\n* whose `value` field is checked.\n*/\nfunction whitespace(thing) {\n return typeof thing === \"object\" ? thing.type === \"text\" ? empty(thing.value) : false : empty(thing);\n}\n/**\n* @param {string} value\n* @returns {boolean}\n*/\nfunction empty(value) {\n return value.replace(re, \"\") === \"\";\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/util/siblings.js\n/**\n* @import {Parents, RootContent} from 'hast'\n*/\nconst siblingAfter = siblings(1);\nconst siblingBefore = siblings(-1);\n/** @type {Array<RootContent>} */\nconst emptyChildren$1 = [];\n/**\n* Factory to check siblings in a direction.\n*\n* @param {number} increment\n*/\nfunction siblings(increment$1) {\n return sibling;\n /**\n * Find applicable siblings in a direction.\n *\n * @template {Parents} Parent\n * Parent type.\n * @param {Parent | undefined} parent\n * Parent.\n * @param {number | undefined} index\n * Index of child in `parent`.\n * @param {boolean | undefined} [includeWhitespace=false]\n * Whether to include whitespace (default: `false`).\n * @returns {Parent extends {children: Array<infer Child>} ? Child | undefined : never}\n * Child of parent.\n */\n function sibling(parent, index$1, includeWhitespace) {\n const siblings$1 = parent ? parent.children : emptyChildren$1;\n let offset = (index$1 || 0) + increment$1;\n let next$1 = siblings$1[offset];\n if (!includeWhitespace) while (next$1 && whitespace(next$1)) {\n offset += increment$1;\n next$1 = siblings$1[offset];\n }\n return next$1;\n }\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/omission.js\n/**\n* @import {Element, Parents} from 'hast'\n*/\n/**\n* @callback OmitHandle\n* Check if a tag can be omitted.\n* @param {Element} element\n* Element to check.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether to omit a tag.\n*\n*/\nconst own$1 = {}.hasOwnProperty;\n/**\n* Factory to check if a given node can have a tag omitted.\n*\n* @param {Record<string, OmitHandle>} handlers\n* Omission handlers, where each key is a tag name, and each value is the\n* corresponding handler.\n* @returns {OmitHandle}\n* Whether to omit a tag of an element.\n*/\nfunction omission(handlers) {\n return omit;\n /**\n * Check if a given node can have a tag omitted.\n *\n * @type {OmitHandle}\n */\n function omit(node, index$1, parent) {\n return own$1.call(handlers, node.tagName) && handlers[node.tagName](node, index$1, parent);\n }\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/closing.js\n/**\n* @import {Element, Parents} from 'hast'\n*/\nconst closing = omission({\n body: body$1,\n caption: headOrColgroupOrCaption,\n colgroup: headOrColgroupOrCaption,\n dd,\n dt,\n head: headOrColgroupOrCaption,\n html: html$1,\n li,\n optgroup,\n option,\n p,\n rp: rubyElement,\n rt: rubyElement,\n tbody: tbody$1,\n td: cells,\n tfoot,\n th: cells,\n thead,\n tr\n});\n/**\n* Macro for `</head>`, `</colgroup>`, and `</caption>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction headOrColgroupOrCaption(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1, true);\n return !next$1 || next$1.type !== \"comment\" && !(next$1.type === \"text\" && whitespace(next$1.value.charAt(0)));\n}\n/**\n* Whether to omit `</html>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction html$1(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type !== \"comment\";\n}\n/**\n* Whether to omit `</body>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction body$1(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type !== \"comment\";\n}\n/**\n* Whether to omit `</p>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction p(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return next$1 ? next$1.type === \"element\" && (next$1.tagName === \"address\" || next$1.tagName === \"article\" || next$1.tagName === \"aside\" || next$1.tagName === \"blockquote\" || next$1.tagName === \"details\" || next$1.tagName === \"div\" || next$1.tagName === \"dl\" || next$1.tagName === \"fieldset\" || next$1.tagName === \"figcaption\" || next$1.tagName === \"figure\" || next$1.tagName === \"footer\" || next$1.tagName === \"form\" || next$1.tagName === \"h1\" || next$1.tagName === \"h2\" || next$1.tagName === \"h3\" || next$1.tagName === \"h4\" || next$1.tagName === \"h5\" || next$1.tagName === \"h6\" || next$1.tagName === \"header\" || next$1.tagName === \"hgroup\" || next$1.tagName === \"hr\" || next$1.tagName === \"main\" || next$1.tagName === \"menu\" || next$1.tagName === \"nav\" || next$1.tagName === \"ol\" || next$1.tagName === \"p\" || next$1.tagName === \"pre\" || next$1.tagName === \"section\" || next$1.tagName === \"table\" || next$1.tagName === \"ul\") : !parent || !(parent.type === \"element\" && (parent.tagName === \"a\" || parent.tagName === \"audio\" || parent.tagName === \"del\" || parent.tagName === \"ins\" || parent.tagName === \"map\" || parent.tagName === \"noscript\" || parent.tagName === \"video\"));\n}\n/**\n* Whether to omit `</li>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction li(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && next$1.tagName === \"li\";\n}\n/**\n* Whether to omit `</dt>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction dt(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return Boolean(next$1 && next$1.type === \"element\" && (next$1.tagName === \"dt\" || next$1.tagName === \"dd\"));\n}\n/**\n* Whether to omit `</dd>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction dd(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && (next$1.tagName === \"dt\" || next$1.tagName === \"dd\");\n}\n/**\n* Whether to omit `</rt>` or `</rp>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction rubyElement(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && (next$1.tagName === \"rp\" || next$1.tagName === \"rt\");\n}\n/**\n* Whether to omit `</optgroup>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction optgroup(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && next$1.tagName === \"optgroup\";\n}\n/**\n* Whether to omit `</option>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction option(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && (next$1.tagName === \"option\" || next$1.tagName === \"optgroup\");\n}\n/**\n* Whether to omit `</thead>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction thead(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return Boolean(next$1 && next$1.type === \"element\" && (next$1.tagName === \"tbody\" || next$1.tagName === \"tfoot\"));\n}\n/**\n* Whether to omit `</tbody>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction tbody$1(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && (next$1.tagName === \"tbody\" || next$1.tagName === \"tfoot\");\n}\n/**\n* Whether to omit `</tfoot>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction tfoot(_, index$1, parent) {\n return !siblingAfter(parent, index$1);\n}\n/**\n* Whether to omit `</tr>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction tr(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && next$1.tagName === \"tr\";\n}\n/**\n* Whether to omit `</td>` or `</th>`.\n*\n* @param {Element} _\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the closing tag can be omitted.\n*/\nfunction cells(_, index$1, parent) {\n const next$1 = siblingAfter(parent, index$1);\n return !next$1 || next$1.type === \"element\" && (next$1.tagName === \"td\" || next$1.tagName === \"th\");\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/omission/opening.js\n/**\n* @import {Element, Parents} from 'hast'\n*/\nconst opening = omission({\n body,\n colgroup,\n head,\n html,\n tbody\n});\n/**\n* Whether to omit `<html>`.\n*\n* @param {Element} node\n* Element.\n* @returns {boolean}\n* Whether the opening tag can be omitted.\n*/\nfunction html(node) {\n const head$1 = siblingAfter(node, -1);\n return !head$1 || head$1.type !== \"comment\";\n}\n/**\n* Whether to omit `<head>`.\n*\n* @param {Element} node\n* Element.\n* @returns {boolean}\n* Whether the opening tag can be omitted.\n*/\nfunction head(node) {\n /** @type {Set<string>} */\n const seen = /* @__PURE__ */ new Set();\n for (const child$1 of node.children) if (child$1.type === \"element\" && (child$1.tagName === \"base\" || child$1.tagName === \"title\")) {\n if (seen.has(child$1.tagName)) return false;\n seen.add(child$1.tagName);\n }\n const child = node.children[0];\n return !child || child.type === \"element\";\n}\n/**\n* Whether to omit `<body>`.\n*\n* @param {Element} node\n* Element.\n* @returns {boolean}\n* Whether the opening tag can be omitted.\n*/\nfunction body(node) {\n const head$1 = siblingAfter(node, -1, true);\n return !head$1 || head$1.type !== \"comment\" && !(head$1.type === \"text\" && whitespace(head$1.value.charAt(0))) && !(head$1.type === \"element\" && (head$1.tagName === \"meta\" || head$1.tagName === \"link\" || head$1.tagName === \"script\" || head$1.tagName === \"style\" || head$1.tagName === \"template\"));\n}\n/**\n* Whether to omit `<colgroup>`.\n* The spec describes some logic for the opening tag, but it’s easier to\n* implement in the closing tag, to the same effect, so we handle it there\n* instead.\n*\n* @param {Element} node\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the opening tag can be omitted.\n*/\nfunction colgroup(node, index$1, parent) {\n const previous = siblingBefore(parent, index$1);\n const head$1 = siblingAfter(node, -1, true);\n if (parent && previous && previous.type === \"element\" && previous.tagName === \"colgroup\" && closing(previous, parent.children.indexOf(previous), parent)) return false;\n return Boolean(head$1 && head$1.type === \"element\" && head$1.tagName === \"col\");\n}\n/**\n* Whether to omit `<tbody>`.\n*\n* @param {Element} node\n* Element.\n* @param {number | undefined} index\n* Index of element in parent.\n* @param {Parents | undefined} parent\n* Parent of element.\n* @returns {boolean}\n* Whether the opening tag can be omitted.\n*/\nfunction tbody(node, index$1, parent) {\n const previous = siblingBefore(parent, index$1);\n const head$1 = siblingAfter(node, -1);\n if (parent && previous && previous.type === \"element\" && (previous.tagName === \"thead\" || previous.tagName === \"tbody\") && closing(previous, parent.children.indexOf(previous), parent)) return false;\n return Boolean(head$1 && head$1.type === \"element\" && head$1.tagName === \"tr\");\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/element.js\n/**\n* @import {Element, Parents, Properties} from 'hast'\n* @import {State} from '../index.js'\n*/\n/**\n* Maps of subsets.\n*\n* Each value is a matrix of tuples.\n* The value at `0` causes parse errors, the value at `1` is valid.\n* Of both, the value at `0` is unsafe, and the value at `1` is safe.\n*\n* @type {Record<'double' | 'name' | 'single' | 'unquoted', Array<[Array<string>, Array<string>]>>}\n*/\nconst constants = {\n name: [[\" \\n\\f\\r &/=>\".split(\"\"), \" \\n\\f\\r \\\"&'/=>`\".split(\"\")], [\"\\0 \\n\\f\\r \\\"&'/<=>\".split(\"\"), \"\\0 \\n\\f\\r \\\"&'/<=>`\".split(\"\")]],\n unquoted: [[\" \\n\\f\\r &>\".split(\"\"), \"\\0 \\n\\f\\r \\\"&'<=>`\".split(\"\")], [\"\\0 \\n\\f\\r \\\"&'<=>`\".split(\"\"), \"\\0 \\n\\f\\r \\\"&'<=>`\".split(\"\")]],\n single: [[\"&'\".split(\"\"), \"\\\"&'`\".split(\"\")], [\"\\0&'\".split(\"\"), \"\\0\\\"&'`\".split(\"\")]],\n double: [[\"\\\"&\".split(\"\"), \"\\\"&'`\".split(\"\")], [\"\\0\\\"&\".split(\"\"), \"\\0\\\"&'`\".split(\"\")]]\n};\n/**\n* Serialize an element node.\n*\n* @param {Element} node\n* Node to handle.\n* @param {number | undefined} index\n* Index of `node` in `parent.\n* @param {Parents | undefined} parent\n* Parent of `node`.\n* @param {State} state\n* Info passed around about the current state.\n* @returns {string}\n* Serialized node.\n*/\nfunction element$1(node, index$1, parent, state) {\n const schema = state.schema;\n const omit = schema.space === \"svg\" ? false : state.settings.omitOptionalTags;\n let selfClosing = schema.space === \"svg\" ? state.settings.closeEmptyElements : state.settings.voids.includes(node.tagName.toLowerCase());\n /** @type {Array<string>} */\n const parts = [];\n /** @type {string} */\n let last;\n if (schema.space === \"html\" && node.tagName === \"svg\") state.schema = svg;\n const attributes = serializeAttributes(state, node.properties);\n const content = state.all(schema.space === \"html\" && node.tagName === \"template\" ? node.content : node);\n state.schema = schema;\n if (content) selfClosing = false;\n if (attributes || !omit || !opening(node, index$1, parent)) {\n parts.push(\"<\", node.tagName, attributes ? \" \" + attributes : \"\");\n if (selfClosing && (schema.space === \"svg\" || state.settings.closeSelfClosing)) {\n last = attributes.charAt(attributes.length - 1);\n if (!state.settings.tightSelfClosing || last === \"/\" || last && last !== \"\\\"\" && last !== \"'\") parts.push(\" \");\n parts.push(\"/\");\n }\n parts.push(\">\");\n }\n parts.push(content);\n if (!selfClosing && (!omit || !closing(node, index$1, parent))) parts.push(\"</\" + node.tagName + \">\");\n return parts.join(\"\");\n}\n/**\n* @param {State} state\n* @param {Properties | null | undefined} properties\n* @returns {string}\n*/\nfunction serializeAttributes(state, properties$1) {\n /** @type {Array<string>} */\n const values = [];\n let index$1 = -1;\n /** @type {string} */\n let key$1;\n if (properties$1) {\n for (key$1 in properties$1) if (properties$1[key$1] !== null && properties$1[key$1] !== void 0) {\n const value = serializeAttribute(state, key$1, properties$1[key$1]);\n if (value) values.push(value);\n }\n }\n while (++index$1 < values.length) {\n const last = state.settings.tightAttributes ? values[index$1].charAt(values[index$1].length - 1) : void 0;\n if (index$1 !== values.length - 1 && last !== \"\\\"\" && last !== \"'\") values[index$1] += \" \";\n }\n return values.join(\"\");\n}\n/**\n* @param {State} state\n* @param {string} key\n* @param {Properties[keyof Properties]} value\n* @returns {string}\n*/\nfunction serializeAttribute(state, key$1, value) {\n const info = find(state.schema, key$1);\n const x = state.settings.allowParseErrors && state.schema.space === \"html\" ? 0 : 1;\n const y = state.settings.allowDangerousCharacters ? 0 : 1;\n let quote = state.quote;\n /** @type {string | undefined} */\n let result;\n if (info.overloadedBoolean && (value === info.attribute || value === \"\")) value = true;\n else if ((info.boolean || info.overloadedBoolean) && (typeof value !== \"string\" || value === info.attribute || value === \"\")) value = Boolean(value);\n if (value === null || value === void 0 || value === false || typeof value === \"number\" && Number.isNaN(value)) return \"\";\n const name = stringifyEntities(info.attribute, Object.assign({}, state.settings.characterReferences, { subset: constants.name[x][y] }));\n if (value === true) return name;\n value = Array.isArray(value) ? (info.commaSeparated ? stringify$1 : stringify)(value, { padLeft: !state.settings.tightCommaSeparatedLists }) : String(value);\n if (state.settings.collapseEmptyAttributes && !value) return name;\n if (state.settings.preferUnquoted) result = stringifyEntities(value, Object.assign({}, state.settings.characterReferences, {\n attribute: true,\n subset: constants.unquoted[x][y]\n }));\n if (result !== value) {\n if (state.settings.quoteSmart && ccount(value, quote) > ccount(value, state.alternative)) quote = state.alternative;\n result = quote + stringifyEntities(value, Object.assign({}, state.settings.characterReferences, {\n subset: (quote === \"'\" ? constants.single : constants.double)[x][y],\n attribute: true\n })) + quote;\n }\n return name + (result ? \"=\" + result : result);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/text.js\n/**\n* @import {Parents, Text} from 'hast'\n* @import {Raw} from 'mdast-util-to-hast'\n* @import {State} from '../index.js'\n*/\nconst textEntitySubset = [\"<\", \"&\"];\n/**\n* Serialize a text node.\n*\n* @param {Raw | Text} node\n* Node to handle.\n* @param {number | undefined} _\n* Index of `node` in `parent.\n* @param {Parents | undefined} parent\n* Parent of `node`.\n* @param {State} state\n* Info passed around about the current state.\n* @returns {string}\n* Serialized node.\n*/\nfunction text(node, _, parent, state) {\n return parent && parent.type === \"element\" && (parent.tagName === \"script\" || parent.tagName === \"style\") ? node.value : stringifyEntities(node.value, Object.assign({}, state.settings.characterReferences, { subset: textEntitySubset }));\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/raw.js\n/**\n* @import {Parents} from 'hast'\n* @import {Raw} from 'mdast-util-to-hast'\n* @import {State} from '../index.js'\n*/\n/**\n* Serialize a raw node.\n*\n* @param {Raw} node\n* Node to handle.\n* @param {number | undefined} index\n* Index of `node` in `parent.\n* @param {Parents | undefined} parent\n* Parent of `node`.\n* @param {State} state\n* Info passed around about the current state.\n* @returns {string}\n* Serialized node.\n*/\nfunction raw(node, index$1, parent, state) {\n return state.settings.allowDangerousHtml ? node.value : text(node, index$1, parent, state);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/root.js\n/**\n* @import {Parents, Root} from 'hast'\n* @import {State} from '../index.js'\n*/\n/**\n* Serialize a root.\n*\n* @param {Root} node\n* Node to handle.\n* @param {number | undefined} _1\n* Index of `node` in `parent.\n* @param {Parents | undefined} _2\n* Parent of `node`.\n* @param {State} state\n* Info passed around about the current state.\n* @returns {string}\n* Serialized node.\n*/\nfunction root(node, _1, _2, state) {\n return state.all(node);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/handle/index.js\n/**\n* @import {Nodes, Parents} from 'hast'\n* @import {State} from '../index.js'\n*/\n/**\n* @type {(node: Nodes, index: number | undefined, parent: Parents | undefined, state: State) => string}\n*/\nconst handle = zwitch(\"type\", {\n invalid,\n unknown,\n handlers: {\n comment,\n doctype,\n element: element$1,\n raw,\n root,\n text\n }\n});\n/**\n* Fail when a non-node is found in the tree.\n*\n* @param {unknown} node\n* Unknown value.\n* @returns {never}\n* Never.\n*/\nfunction invalid(node) {\n throw new Error(\"Expected node, not `\" + node + \"`\");\n}\n/**\n* Fail when a node with an unknown type is found in the tree.\n*\n* @param {unknown} node_\n* Unknown node.\n* @returns {never}\n* Never.\n*/\nfunction unknown(node_) {\n const node = node_;\n throw new Error(\"Cannot compile unknown node `\" + node.type + \"`\");\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-to-html@9.0.5/node_modules/hast-util-to-html/lib/index.js\n/**\n* @import {Nodes, Parents, RootContent} from 'hast'\n* @import {Schema} from 'property-information'\n* @import {Options as StringifyEntitiesOptions} from 'stringify-entities'\n*/\n/**\n* @typedef {Omit<StringifyEntitiesOptions, 'attribute' | 'escapeOnly' | 'subset'>} CharacterReferences\n*\n* @typedef Options\n* Configuration.\n* @property {boolean | null | undefined} [allowDangerousCharacters=false]\n* Do not encode some characters which cause XSS vulnerabilities in older\n* browsers (default: `false`).\n*\n* > ⚠️ **Danger**: only set this if you completely trust the content.\n* @property {boolean | null | undefined} [allowDangerousHtml=false]\n* Allow `raw` nodes and insert them as raw HTML (default: `false`).\n*\n* When `false`, `Raw` nodes are encoded.\n*\n* > ⚠️ **Danger**: only set this if you completely trust the content.\n* @property {boolean | null | undefined} [allowParseErrors=false]\n* Do not encode characters which cause parse errors (even though they work),\n* to save bytes (default: `false`).\n*\n* Not used in the SVG space.\n*\n* > 👉 **Note**: intentionally creates parse errors in markup (how parse\n* > errors are handled is well defined, so this works but isn’t pretty).\n* @property {boolean | null | undefined} [bogusComments=false]\n* Use “bogus comments” instead of comments to save byes: `<?charlie>`\n* instead of `<!--charlie-->` (default: `false`).\n*\n* > 👉 **Note**: intentionally creates parse errors in markup (how parse\n* > errors are handled is well defined, so this works but isn’t pretty).\n* @property {CharacterReferences | null | undefined} [characterReferences]\n* Configure how to serialize character references (optional).\n* @property {boolean | null | undefined} [closeEmptyElements=false]\n* Close SVG elements without any content with slash (`/`) on the opening tag\n* instead of an end tag: `<circle />` instead of `<circle></circle>`\n* (default: `false`).\n*\n* See `tightSelfClosing` to control whether a space is used before the\n* slash.\n*\n* Not used in the HTML space.\n* @property {boolean | null | undefined} [closeSelfClosing=false]\n* Close self-closing nodes with an extra slash (`/`): `<img />` instead of\n* `<img>` (default: `false`).\n*\n* See `tightSelfClosing` to control whether a space is used before the\n* slash.\n*\n* Not used in the SVG space.\n* @property {boolean | null | undefined} [collapseEmptyAttributes=false]\n* Collapse empty attributes: get `class` instead of `class=\"\"` (default:\n* `false`).\n*\n* Not used in the SVG space.\n*\n* > 👉 **Note**: boolean attributes (such as `hidden`) are always collapsed.\n* @property {boolean | null | undefined} [omitOptionalTags=false]\n* Omit optional opening and closing tags (default: `false`).\n*\n* For example, in `<ol><li>one</li><li>two</li></ol>`, both `</li>` closing\n* tags can be omitted.\n* The first because it’s followed by another `li`, the last because it’s\n* followed by nothing.\n*\n* Not used in the SVG space.\n* @property {boolean | null | undefined} [preferUnquoted=false]\n* Leave attributes unquoted if that results in less bytes (default: `false`).\n*\n* Not used in the SVG space.\n* @property {boolean | null | undefined} [quoteSmart=false]\n* Use the other quote if that results in less bytes (default: `false`).\n* @property {Quote | null | undefined} [quote='\"']\n* Preferred quote to use (default: `'\"'`).\n* @property {Space | null | undefined} [space='html']\n* When an `<svg>` element is found in the HTML space, this package already\n* automatically switches to and from the SVG space when entering and exiting\n* it (default: `'html'`).\n*\n* > 👉 **Note**: hast is not XML.\n* > It supports SVG as embedded in HTML.\n* > It does not support the features available in XML.\n* > Passing SVG might break but fragments of modern SVG should be fine.\n* > Use [`xast`][xast] if you need to support SVG as XML.\n* @property {boolean | null | undefined} [tightAttributes=false]\n* Join attributes together, without whitespace, if possible: get\n* `class=\"a b\"title=\"c d\"` instead of `class=\"a b\" title=\"c d\"` to save\n* bytes (default: `false`).\n*\n* Not used in the SVG space.\n*\n* > 👉 **Note**: intentionally creates parse errors in markup (how parse\n* > errors are handled is well defined, so this works but isn’t pretty).\n* @property {boolean | null | undefined} [tightCommaSeparatedLists=false]\n* Join known comma-separated attribute values with just a comma (`,`),\n* instead of padding them on the right as well (`,␠`, where `␠` represents a\n* space) (default: `false`).\n* @property {boolean | null | undefined} [tightDoctype=false]\n* Drop unneeded spaces in doctypes: `<!doctypehtml>` instead of\n* `<!doctype html>` to save bytes (default: `false`).\n*\n* > 👉 **Note**: intentionally creates parse errors in markup (how parse\n* > errors are handled is well defined, so this works but isn’t pretty).\n* @property {boolean | null | undefined} [tightSelfClosing=false]\n* Do not use an extra space when closing self-closing elements: `<img/>`\n* instead of `<img />` (default: `false`).\n*\n* > 👉 **Note**: only used if `closeSelfClosing: true` or\n* > `closeEmptyElements: true`.\n* @property {boolean | null | undefined} [upperDoctype=false]\n* Use a `<!DOCTYPE…` instead of `<!doctype…` (default: `false`).\n*\n* Useless except for XHTML.\n* @property {ReadonlyArray<string> | null | undefined} [voids]\n* Tag names of elements to serialize without closing tag (default: `html-void-elements`).\n*\n* Not used in the SVG space.\n*\n* > 👉 **Note**: It’s highly unlikely that you want to pass this, because\n* > hast is not for XML, and HTML will not add more void elements.\n*\n* @typedef {'\"' | \"'\"} Quote\n* HTML quotes for attribute values.\n*\n* @typedef {Omit<Required<{[key in keyof Options]: Exclude<Options[key], null | undefined>}>, 'space' | 'quote'>} Settings\n*\n* @typedef {'html' | 'svg'} Space\n* Namespace.\n*\n* @typedef State\n* Info passed around about the current state.\n* @property {(node: Parents | undefined) => string} all\n* Serialize the children of a parent node.\n* @property {Quote} alternative\n* Alternative quote.\n* @property {(node: Nodes, index: number | undefined, parent: Parents | undefined) => string} one\n* Serialize one node.\n* @property {Quote} quote\n* Preferred quote.\n* @property {Schema} schema\n* Current schema.\n* @property {Settings} settings\n* User configuration.\n*/\n/** @type {Options} */\nconst emptyOptions = {};\n/** @type {CharacterReferences} */\nconst emptyCharacterReferences = {};\n/** @type {Array<never>} */\nconst emptyChildren = [];\n/**\n* Serialize hast as HTML.\n*\n* @param {Array<RootContent> | Nodes} tree\n* Tree to serialize.\n* @param {Options | null | undefined} [options]\n* Configuration (optional).\n* @returns {string}\n* Serialized HTML.\n*/\nfunction toHtml(tree, options) {\n const options_ = options || emptyOptions;\n const quote = options_.quote || \"\\\"\";\n const alternative = quote === \"\\\"\" ? \"'\" : \"\\\"\";\n if (quote !== \"\\\"\" && quote !== \"'\") throw new Error(\"Invalid quote `\" + quote + \"`, expected `'` or `\\\"`\");\n return {\n one: one$1,\n all: all$1,\n settings: {\n omitOptionalTags: options_.omitOptionalTags || false,\n allowParseErrors: options_.allowParseErrors || false,\n allowDangerousCharacters: options_.allowDangerousCharacters || false,\n quoteSmart: options_.quoteSmart || false,\n preferUnquoted: options_.preferUnquoted || false,\n tightAttributes: options_.tightAttributes || false,\n upperDoctype: options_.upperDoctype || false,\n tightDoctype: options_.tightDoctype || false,\n bogusComments: options_.bogusComments || false,\n tightCommaSeparatedLists: options_.tightCommaSeparatedLists || false,\n tightSelfClosing: options_.tightSelfClosing || false,\n collapseEmptyAttributes: options_.collapseEmptyAttributes || false,\n allowDangerousHtml: options_.allowDangerousHtml || false,\n voids: options_.voids || htmlVoidElements,\n characterReferences: options_.characterReferences || emptyCharacterReferences,\n closeSelfClosing: options_.closeSelfClosing || false,\n closeEmptyElements: options_.closeEmptyElements || false\n },\n schema: options_.space === \"svg\" ? svg : html$2,\n quote,\n alternative\n }.one(Array.isArray(tree) ? {\n type: \"root\",\n children: tree\n } : tree, void 0, void 0);\n}\n/**\n* Serialize a node.\n*\n* @this {State}\n* Info passed around about the current state.\n* @param {Nodes} node\n* Node to handle.\n* @param {number | undefined} index\n* Index of `node` in `parent.\n* @param {Parents | undefined} parent\n* Parent of `node`.\n* @returns {string}\n* Serialized node.\n*/\nfunction one$1(node, index$1, parent) {\n return handle(node, index$1, parent, this);\n}\n/**\n* Serialize all children of `parent`.\n*\n* @this {State}\n* Info passed around about the current state.\n* @param {Parents | undefined} parent\n* Parent whose children to serialize.\n* @returns {string}\n*/\nfunction all$1(parent) {\n /** @type {Array<string>} */\n const results = [];\n const children$1 = parent && parent.children || emptyChildren;\n let index$1 = -1;\n while (++index$1 < children$1.length) results[index$1] = this.one(children$1[index$1], index$1, parent);\n return results.join(\"\");\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/rehype-stringify@10.0.1/node_modules/rehype-stringify/lib/index.js\n/**\n* @import {Root} from 'hast'\n* @import {Options} from 'hast-util-to-html'\n* @import {Compiler, Processor} from 'unified'\n*/\n/**\n* Plugin to add support for serializing as HTML.\n*\n* @param {Options | null | undefined} [options]\n* Configuration (optional).\n* @returns {undefined}\n* Nothing.\n*/\nfunction rehypeStringify(options) {\n /** @type {Processor<undefined, undefined, undefined, Root, string>} */\n const self$1 = this;\n const settings = {\n ...self$1.data(\"settings\"),\n ...options\n };\n self$1.compiler = compiler;\n /**\n * @type {Compiler<Root, string>}\n */\n function compiler(tree) {\n return toHtml(tree, settings);\n }\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/unicode.js\nconst UNDEFINED_CODE_POINTS = new Set([\n 65534,\n 65535,\n 131070,\n 131071,\n 196606,\n 196607,\n 262142,\n 262143,\n 327678,\n 327679,\n 393214,\n 393215,\n 458750,\n 458751,\n 524286,\n 524287,\n 589822,\n 589823,\n 655358,\n 655359,\n 720894,\n 720895,\n 786430,\n 786431,\n 851966,\n 851967,\n 917502,\n 917503,\n 983038,\n 983039,\n 1048574,\n 1048575,\n 1114110,\n 1114111\n]);\nconst REPLACEMENT_CHARACTER = \"�\";\nvar CODE_POINTS;\n(function(CODE_POINTS$1) {\n CODE_POINTS$1[CODE_POINTS$1[\"EOF\"] = -1] = \"EOF\";\n CODE_POINTS$1[CODE_POINTS$1[\"NULL\"] = 0] = \"NULL\";\n CODE_POINTS$1[CODE_POINTS$1[\"TABULATION\"] = 9] = \"TABULATION\";\n CODE_POINTS$1[CODE_POINTS$1[\"CARRIAGE_RETURN\"] = 13] = \"CARRIAGE_RETURN\";\n CODE_POINTS$1[CODE_POINTS$1[\"LINE_FEED\"] = 10] = \"LINE_FEED\";\n CODE_POINTS$1[CODE_POINTS$1[\"FORM_FEED\"] = 12] = \"FORM_FEED\";\n CODE_POINTS$1[CODE_POINTS$1[\"SPACE\"] = 32] = \"SPACE\";\n CODE_POINTS$1[CODE_POINTS$1[\"EXCLAMATION_MARK\"] = 33] = \"EXCLAMATION_MARK\";\n CODE_POINTS$1[CODE_POINTS$1[\"QUOTATION_MARK\"] = 34] = \"QUOTATION_MARK\";\n CODE_POINTS$1[CODE_POINTS$1[\"AMPERSAND\"] = 38] = \"AMPERSAND\";\n CODE_POINTS$1[CODE_POINTS$1[\"APOSTROPHE\"] = 39] = \"APOSTROPHE\";\n CODE_POINTS$1[CODE_POINTS$1[\"HYPHEN_MINUS\"] = 45] = \"HYPHEN_MINUS\";\n CODE_POINTS$1[CODE_POINTS$1[\"SOLIDUS\"] = 47] = \"SOLIDUS\";\n CODE_POINTS$1[CODE_POINTS$1[\"DIGIT_0\"] = 48] = \"DIGIT_0\";\n CODE_POINTS$1[CODE_POINTS$1[\"DIGIT_9\"] = 57] = \"DIGIT_9\";\n CODE_POINTS$1[CODE_POINTS$1[\"SEMICOLON\"] = 59] = \"SEMICOLON\";\n CODE_POINTS$1[CODE_POINTS$1[\"LESS_THAN_SIGN\"] = 60] = \"LESS_THAN_SIGN\";\n CODE_POINTS$1[CODE_POINTS$1[\"EQUALS_SIGN\"] = 61] = \"EQUALS_SIGN\";\n CODE_POINTS$1[CODE_POINTS$1[\"GREATER_THAN_SIGN\"] = 62] = \"GREATER_THAN_SIGN\";\n CODE_POINTS$1[CODE_POINTS$1[\"QUESTION_MARK\"] = 63] = \"QUESTION_MARK\";\n CODE_POINTS$1[CODE_POINTS$1[\"LATIN_CAPITAL_A\"] = 65] = \"LATIN_CAPITAL_A\";\n CODE_POINTS$1[CODE_POINTS$1[\"LATIN_CAPITAL_Z\"] = 90] = \"LATIN_CAPITAL_Z\";\n CODE_POINTS$1[CODE_POINTS$1[\"RIGHT_SQUARE_BRACKET\"] = 93] = \"RIGHT_SQUARE_BRACKET\";\n CODE_POINTS$1[CODE_POINTS$1[\"GRAVE_ACCENT\"] = 96] = \"GRAVE_ACCENT\";\n CODE_POINTS$1[CODE_POINTS$1[\"LATIN_SMALL_A\"] = 97] = \"LATIN_SMALL_A\";\n CODE_POINTS$1[CODE_POINTS$1[\"LATIN_SMALL_Z\"] = 122] = \"LATIN_SMALL_Z\";\n})(CODE_POINTS || (CODE_POINTS = {}));\nconst SEQUENCES = {\n DASH_DASH: \"--\",\n CDATA_START: \"[CDATA[\",\n DOCTYPE: \"doctype\",\n SCRIPT: \"script\",\n PUBLIC: \"public\",\n SYSTEM: \"system\"\n};\nfunction isSurrogate(cp) {\n return cp >= 55296 && cp <= 57343;\n}\nfunction isSurrogatePair(cp) {\n return cp >= 56320 && cp <= 57343;\n}\nfunction getSurrogatePairCodePoint(cp1, cp2) {\n return (cp1 - 55296) * 1024 + 9216 + cp2;\n}\nfunction isControlCodePoint(cp) {\n return cp !== 32 && cp !== 10 && cp !== 13 && cp !== 9 && cp !== 12 && cp >= 1 && cp <= 31 || cp >= 127 && cp <= 159;\n}\nfunction isUndefinedCodePoint(cp) {\n return cp >= 64976 && cp <= 65007 || UNDEFINED_CODE_POINTS.has(cp);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/error-codes.js\nvar ERR;\n(function(ERR$1) {\n ERR$1[\"controlCharacterInInputStream\"] = \"control-character-in-input-stream\";\n ERR$1[\"noncharacterInInputStream\"] = \"noncharacter-in-input-stream\";\n ERR$1[\"surrogateInInputStream\"] = \"surrogate-in-input-stream\";\n ERR$1[\"nonVoidHtmlElementStartTagWithTrailingSolidus\"] = \"non-void-html-element-start-tag-with-trailing-solidus\";\n ERR$1[\"endTagWithAttributes\"] = \"end-tag-with-attributes\";\n ERR$1[\"endTagWithTrailingSolidus\"] = \"end-tag-with-trailing-solidus\";\n ERR$1[\"unexpectedSolidusInTag\"] = \"unexpected-solidus-in-tag\";\n ERR$1[\"unexpectedNullCharacter\"] = \"unexpected-null-character\";\n ERR$1[\"unexpectedQuestionMarkInsteadOfTagName\"] = \"unexpected-question-mark-instead-of-tag-name\";\n ERR$1[\"invalidFirstCharacterOfTagName\"] = \"invalid-first-character-of-tag-name\";\n ERR$1[\"unexpectedEqualsSignBeforeAttributeName\"] = \"unexpected-equals-sign-before-attribute-name\";\n ERR$1[\"missingEndTagName\"] = \"missing-end-tag-name\";\n ERR$1[\"unexpectedCharacterInAttributeName\"] = \"unexpected-character-in-attribute-name\";\n ERR$1[\"unknownNamedCharacterReference\"] = \"unknown-named-character-reference\";\n ERR$1[\"missingSemicolonAfterCharacterReference\"] = \"missing-semicolon-after-character-reference\";\n ERR$1[\"unexpectedCharacterAfterDoctypeSystemIdentifier\"] = \"unexpected-character-after-doctype-system-identifier\";\n ERR$1[\"unexpectedCharacterInUnquotedAttributeValue\"] = \"unexpected-character-in-unquoted-attribute-value\";\n ERR$1[\"eofBeforeTagName\"] = \"eof-before-tag-name\";\n ERR$1[\"eofInTag\"] = \"eof-in-tag\";\n ERR$1[\"missingAttributeValue\"] = \"missing-attribute-value\";\n ERR$1[\"missingWhitespaceBetweenAttributes\"] = \"missing-whitespace-between-attributes\";\n ERR$1[\"missingWhitespaceAfterDoctypePublicKeyword\"] = \"missing-whitespace-after-doctype-public-keyword\";\n ERR$1[\"missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers\"] = \"missing-whitespace-between-doctype-public-and-system-identifiers\";\n ERR$1[\"missingWhitespaceAfterDoctypeSystemKeyword\"] = \"missing-whitespace-after-doctype-system-keyword\";\n ERR$1[\"missingQuoteBeforeDoctypePublicIdentifier\"] = \"missing-quote-before-doctype-public-identifier\";\n ERR$1[\"missingQuoteBeforeDoctypeSystemIdentifier\"] = \"missing-quote-before-doctype-system-identifier\";\n ERR$1[\"missingDoctypePublicIdentifier\"] = \"missing-doctype-public-identifier\";\n ERR$1[\"missingDoctypeSystemIdentifier\"] = \"missing-doctype-system-identifier\";\n ERR$1[\"abruptDoctypePublicIdentifier\"] = \"abrupt-doctype-public-identifier\";\n ERR$1[\"abruptDoctypeSystemIdentifier\"] = \"abrupt-doctype-system-identifier\";\n ERR$1[\"cdataInHtmlContent\"] = \"cdata-in-html-content\";\n ERR$1[\"incorrectlyOpenedComment\"] = \"incorrectly-opened-comment\";\n ERR$1[\"eofInScriptHtmlCommentLikeText\"] = \"eof-in-script-html-comment-like-text\";\n ERR$1[\"eofInDoctype\"] = \"eof-in-doctype\";\n ERR$1[\"nestedComment\"] = \"nested-comment\";\n ERR$1[\"abruptClosingOfEmptyComment\"] = \"abrupt-closing-of-empty-comment\";\n ERR$1[\"eofInComment\"] = \"eof-in-comment\";\n ERR$1[\"incorrectlyClosedComment\"] = \"incorrectly-closed-comment\";\n ERR$1[\"eofInCdata\"] = \"eof-in-cdata\";\n ERR$1[\"absenceOfDigitsInNumericCharacterReference\"] = \"absence-of-digits-in-numeric-character-reference\";\n ERR$1[\"nullCharacterReference\"] = \"null-character-reference\";\n ERR$1[\"surrogateCharacterReference\"] = \"surrogate-character-reference\";\n ERR$1[\"characterReferenceOutsideUnicodeRange\"] = \"character-reference-outside-unicode-range\";\n ERR$1[\"controlCharacterReference\"] = \"control-character-reference\";\n ERR$1[\"noncharacterCharacterReference\"] = \"noncharacter-character-reference\";\n ERR$1[\"missingWhitespaceBeforeDoctypeName\"] = \"missing-whitespace-before-doctype-name\";\n ERR$1[\"missingDoctypeName\"] = \"missing-doctype-name\";\n ERR$1[\"invalidCharacterSequenceAfterDoctypeName\"] = \"invalid-character-sequence-after-doctype-name\";\n ERR$1[\"duplicateAttribute\"] = \"duplicate-attribute\";\n ERR$1[\"nonConformingDoctype\"] = \"non-conforming-doctype\";\n ERR$1[\"missingDoctype\"] = \"missing-doctype\";\n ERR$1[\"misplacedDoctype\"] = \"misplaced-doctype\";\n ERR$1[\"endTagWithoutMatchingOpenElement\"] = \"end-tag-without-matching-open-element\";\n ERR$1[\"closingOfElementWithOpenChildElements\"] = \"closing-of-element-with-open-child-elements\";\n ERR$1[\"disallowedContentInNoscriptInHead\"] = \"disallowed-content-in-noscript-in-head\";\n ERR$1[\"openElementsLeftAfterEof\"] = \"open-elements-left-after-eof\";\n ERR$1[\"abandonedHeadElementChild\"] = \"abandoned-head-element-child\";\n ERR$1[\"misplacedStartTagForHeadElement\"] = \"misplaced-start-tag-for-head-element\";\n ERR$1[\"nestedNoscriptInHead\"] = \"nested-noscript-in-head\";\n ERR$1[\"eofInElementThatCanContainOnlyText\"] = \"eof-in-element-that-can-contain-only-text\";\n})(ERR || (ERR = {}));\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/preprocessor.js\nconst DEFAULT_BUFFER_WATERLINE = 65536;\nvar Preprocessor = class {\n constructor(handler) {\n this.handler = handler;\n this.html = \"\";\n this.pos = -1;\n this.lastGapPos = -2;\n this.gapStack = [];\n this.skipNextNewLine = false;\n this.lastChunkWritten = false;\n this.endOfChunkHit = false;\n this.bufferWaterline = DEFAULT_BUFFER_WATERLINE;\n this.isEol = false;\n this.lineStartPos = 0;\n this.droppedBufferSize = 0;\n this.line = 1;\n this.lastErrOffset = -1;\n }\n /** The column on the current line. If we just saw a gap (eg. a surrogate pair), return the index before. */\n get col() {\n return this.pos - this.lineStartPos + Number(this.lastGapPos !== this.pos);\n }\n get offset() {\n return this.droppedBufferSize + this.pos;\n }\n getError(code, cpOffset) {\n const { line, col, offset } = this;\n const startCol = col + cpOffset;\n const startOffset = offset + cpOffset;\n return {\n code,\n startLine: line,\n endLine: line,\n startCol,\n endCol: startCol,\n startOffset,\n endOffset: startOffset\n };\n }\n _err(code) {\n if (this.handler.onParseError && this.lastErrOffset !== this.offset) {\n this.lastErrOffset = this.offset;\n this.handler.onParseError(this.getError(code, 0));\n }\n }\n _addGap() {\n this.gapStack.push(this.lastGapPos);\n this.lastGapPos = this.pos;\n }\n _processSurrogate(cp) {\n if (this.pos !== this.html.length - 1) {\n const nextCp = this.html.charCodeAt(this.pos + 1);\n if (isSurrogatePair(nextCp)) {\n this.pos++;\n this._addGap();\n return getSurrogatePairCodePoint(cp, nextCp);\n }\n } else if (!this.lastChunkWritten) {\n this.endOfChunkHit = true;\n return CODE_POINTS.EOF;\n }\n this._err(ERR.surrogateInInputStream);\n return cp;\n }\n willDropParsedChunk() {\n return this.pos > this.bufferWaterline;\n }\n dropParsedChunk() {\n if (this.willDropParsedChunk()) {\n this.html = this.html.substring(this.pos);\n this.lineStartPos -= this.pos;\n this.droppedBufferSize += this.pos;\n this.pos = 0;\n this.lastGapPos = -2;\n this.gapStack.length = 0;\n }\n }\n write(chunk, isLastChunk) {\n if (this.html.length > 0) this.html += chunk;\n else this.html = chunk;\n this.endOfChunkHit = false;\n this.lastChunkWritten = isLastChunk;\n }\n insertHtmlAtCurrentPos(chunk) {\n this.html = this.html.substring(0, this.pos + 1) + chunk + this.html.substring(this.pos + 1);\n this.endOfChunkHit = false;\n }\n startsWith(pattern, caseSensitive) {\n if (this.pos + pattern.length > this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return false;\n }\n if (caseSensitive) return this.html.startsWith(pattern, this.pos);\n for (let i = 0; i < pattern.length; i++) if ((this.html.charCodeAt(this.pos + i) | 32) !== pattern.charCodeAt(i)) return false;\n return true;\n }\n peek(offset) {\n const pos = this.pos + offset;\n if (pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return CODE_POINTS.EOF;\n }\n const code = this.html.charCodeAt(pos);\n return code === CODE_POINTS.CARRIAGE_RETURN ? CODE_POINTS.LINE_FEED : code;\n }\n advance() {\n this.pos++;\n if (this.isEol) {\n this.isEol = false;\n this.line++;\n this.lineStartPos = this.pos;\n }\n if (this.pos >= this.html.length) {\n this.endOfChunkHit = !this.lastChunkWritten;\n return CODE_POINTS.EOF;\n }\n let cp = this.html.charCodeAt(this.pos);\n if (cp === CODE_POINTS.CARRIAGE_RETURN) {\n this.isEol = true;\n this.skipNextNewLine = true;\n return CODE_POINTS.LINE_FEED;\n }\n if (cp === CODE_POINTS.LINE_FEED) {\n this.isEol = true;\n if (this.skipNextNewLine) {\n this.line--;\n this.skipNextNewLine = false;\n this._addGap();\n return this.advance();\n }\n }\n this.skipNextNewLine = false;\n if (isSurrogate(cp)) cp = this._processSurrogate(cp);\n if (!(this.handler.onParseError === null || cp > 31 && cp < 127 || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.CARRIAGE_RETURN || cp > 159 && cp < 64976)) this._checkForProblematicCharacters(cp);\n return cp;\n }\n _checkForProblematicCharacters(cp) {\n if (isControlCodePoint(cp)) this._err(ERR.controlCharacterInInputStream);\n else if (isUndefinedCodePoint(cp)) this._err(ERR.noncharacterInInputStream);\n }\n retreat(count) {\n this.pos -= count;\n while (this.pos < this.lastGapPos) {\n this.lastGapPos = this.gapStack.pop();\n this.pos--;\n }\n this.isEol = false;\n }\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/token.js\nvar TokenType;\n(function(TokenType$1) {\n TokenType$1[TokenType$1[\"CHARACTER\"] = 0] = \"CHARACTER\";\n TokenType$1[TokenType$1[\"NULL_CHARACTER\"] = 1] = \"NULL_CHARACTER\";\n TokenType$1[TokenType$1[\"WHITESPACE_CHARACTER\"] = 2] = \"WHITESPACE_CHARACTER\";\n TokenType$1[TokenType$1[\"START_TAG\"] = 3] = \"START_TAG\";\n TokenType$1[TokenType$1[\"END_TAG\"] = 4] = \"END_TAG\";\n TokenType$1[TokenType$1[\"COMMENT\"] = 5] = \"COMMENT\";\n TokenType$1[TokenType$1[\"DOCTYPE\"] = 6] = \"DOCTYPE\";\n TokenType$1[TokenType$1[\"EOF\"] = 7] = \"EOF\";\n TokenType$1[TokenType$1[\"HIBERNATION\"] = 8] = \"HIBERNATION\";\n})(TokenType || (TokenType = {}));\nfunction getTokenAttr(token, attrName) {\n for (let i = token.attrs.length - 1; i >= 0; i--) if (token.attrs[i].name === attrName) return token.attrs[i].value;\n return null;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode-codepoint.js\nconst decodeMap = new Map([\n [0, 65533],\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* 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* @param codePoint Unicode code point to convert.\n*/\nfunction replaceCodePoint(codePoint) {\n if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533;\n return decodeMap.get(codePoint) ?? codePoint;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/decode-shared.js\n/**\n* Shared base64 decode helper for generated decode data.\n* Assumes global atob is available.\n* @param input Input string to encode or decode.\n*/\nfunction decodeBase64(input) {\n const binary = atob(input);\n const evenLength = binary.length & -2;\n const out = new Uint16Array(evenLength / 2);\n for (let index$1 = 0, outIndex = 0; index$1 < evenLength; index$1 += 2) {\n const lo = binary.charCodeAt(index$1);\n const hi = binary.charCodeAt(index$1 + 1);\n out[outIndex++] = lo | hi << 8;\n }\n return out;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/generated/decode-data-html.js\n/** Packed HTML decode trie data. */\nconst htmlDecodeTree = /* @__PURE__ */ decodeBase64(\"QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABl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5jAAABdXm2LrsudABlADuA/QD9QE9kAAFpecAuwy5yAGMAd2FLZG4AO4ClAKVAcgAA4DXYNt1jAHkAV2RwAGYAAOA12GrdYwByAADgNdjO3AABY23dLt8ueQBOZGwAO4D/AP9AAAVhY2RlZmhpb3N38y73Lv8uAi8MLxAvEy8YLx0vIi9jInV0ZQB6YQABYXn7Lv4u8iFvbn5hN2RvAHQAfGEAAWV0Bi8KL3QAcgDmAB8QYQC2Y3IAAOA12DfdYwB5ADZk5yJyYXJyAKDdIXAAZgAA4DXYa91jAHIAAOA12M/cAAFqbiYvKC8AoA0gagAAoAwg\");\n\n//#endregion\n//#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/internal/bin-trie-flags.js\n/**\n* Bit flags & masks for the binary trie encoding used for entity decoding.\n*\n* Bit layout (16 bits total):\n* 15..14 VALUE_LENGTH (+1 encoding; 0 => no value)\n* 13 FLAG13. If valueLength>0: semicolon required flag (implicit ';').\n* If valueLength==0: compact run flag.\n* 12..7 BRANCH_LENGTH Branch length (0 => single branch in 6..0 if jumpOffset==char) OR run length (when compact run)\n* 6..0 JUMP_TABLE Jump offset (jump table) OR single-branch char code OR first run char\n*/\nvar BinTrieFlags;\n(function(BinTrieFlags$1) {\n BinTrieFlags$1[BinTrieFlags$1[\"VALUE_LENGTH\"] = 49152] = \"VALUE_LENGTH\";\n BinTrieFlags$1[BinTrieFlags$1[\"FLAG13\"] = 8192] = \"FLAG13\";\n BinTrieFlags$1[BinTrieFlags$1[\"BRANCH_LENGTH\"] = 8064] = \"BRANCH_LENGTH\";\n BinTrieFlags$1[BinTrieFlags$1[\"JUMP_TABLE\"] = 127] = \"JUMP_TABLE\";\n})(BinTrieFlags || (BinTrieFlags = {}));\n\n//#endregion\n//#region \\0@oxc-project+runtime@0.103.0/helpers/typeof.js\nfunction _typeof(o) {\n \"@babel/helpers - typeof\";\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o$1) {\n return typeof o$1;\n } : function(o$1) {\n return o$1 && \"function\" == typeof Symbol && o$1.constructor === Symbol && o$1 !== Symbol.prototype ? \"symbol\" : typeof o$1;\n }, _typeof(o);\n}\n\n//#endregion\n//#region \\0@oxc-project+runtime@0.103.0/helpers/toPrimitive.js\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\n\n//#endregion\n//#region \\0@oxc-project+runtime@0.103.0/helpers/toPropertyKey.js\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n\n//#endregion\n//#region \\0@oxc-project+runtime@0.103.0/helpers/defineProperty.js\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/entities@8.0.0/node_modules/entities/dist/decode.js\nvar CharCodes;\n(function(CharCodes$1) {\n CharCodes$1[CharCodes$1[\"NUM\"] = 35] = \"NUM\";\n CharCodes$1[CharCodes$1[\"SEMI\"] = 59] = \"SEMI\";\n CharCodes$1[CharCodes$1[\"EQUALS\"] = 61] = \"EQUALS\";\n CharCodes$1[CharCodes$1[\"ZERO\"] = 48] = \"ZERO\";\n CharCodes$1[CharCodes$1[\"NINE\"] = 57] = \"NINE\";\n CharCodes$1[CharCodes$1[\"LOWER_A\"] = 97] = \"LOWER_A\";\n CharCodes$1[CharCodes$1[\"LOWER_F\"] = 102] = \"LOWER_F\";\n CharCodes$1[CharCodes$1[\"LOWER_X\"] = 120] = \"LOWER_X\";\n CharCodes$1[CharCodes$1[\"LOWER_Z\"] = 122] = \"LOWER_Z\";\n CharCodes$1[CharCodes$1[\"UPPER_A\"] = 65] = \"UPPER_A\";\n CharCodes$1[CharCodes$1[\"UPPER_F\"] = 70] = \"UPPER_F\";\n CharCodes$1[CharCodes$1[\"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 = 32;\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 || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_F;\n}\nfunction isAsciiAlphaNumeric$1(code) {\n return code >= CharCodes.UPPER_A && code <= CharCodes.UPPER_Z || code >= CharCodes.LOWER_A && code <= CharCodes.LOWER_Z || 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* @param code Code point to decode.\n*/\nfunction isEntityInAttributeInvalidEnd(code) {\n return code === CharCodes.EQUALS || isAsciiAlphaNumeric$1(code);\n}\nvar EntityDecoderState;\n(function(EntityDecoderState$1) {\n EntityDecoderState$1[EntityDecoderState$1[\"EntityStart\"] = 0] = \"EntityStart\";\n EntityDecoderState$1[EntityDecoderState$1[\"NumericStart\"] = 1] = \"NumericStart\";\n EntityDecoderState$1[EntityDecoderState$1[\"NumericDecimal\"] = 2] = \"NumericDecimal\";\n EntityDecoderState$1[EntityDecoderState$1[\"NumericHex\"] = 3] = \"NumericHex\";\n EntityDecoderState$1[EntityDecoderState$1[\"NamedEntity\"] = 4] = \"NamedEntity\";\n})(EntityDecoderState || (EntityDecoderState = {}));\n/**\n* Decoding mode for named entities.\n*/\nvar DecodingMode;\n(function(DecodingMode$1) {\n /** Entities in text nodes that can end with any character. */\n DecodingMode$1[DecodingMode$1[\"Legacy\"] = 0] = \"Legacy\";\n /** Only allow entities terminated with a semicolon. */\n DecodingMode$1[DecodingMode$1[\"Strict\"] = 1] = \"Strict\";\n /** Entities in attributes have limitations on ending characters. */\n DecodingMode$1[DecodingMode$1[\"Attribute\"] = 2] = \"Attribute\";\n})(DecodingMode || (DecodingMode = {}));\n/**\n* Token decoder with support of writing partial entities.\n*/\nvar EntityDecoder = class {\n constructor(decodeTree, emitCodePoint, errors) {\n _defineProperty(this, \"decodeTree\", void 0);\n _defineProperty(this, \"emitCodePoint\", void 0);\n _defineProperty(this, \"errors\", void 0);\n _defineProperty(\n this,\n /** The current state of the decoder. */\n \"state\",\n EntityDecoderState.EntityStart\n );\n _defineProperty(\n this,\n /** Characters that were consumed while parsing an entity. */\n \"consumed\",\n 1\n );\n _defineProperty(\n this,\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 \"result\",\n 0\n );\n _defineProperty(\n this,\n /** The current index in the decode tree. */\n \"treeIndex\",\n 0\n );\n _defineProperty(\n this,\n /** The number of characters that were consumed in excess. */\n \"excess\",\n 1\n );\n _defineProperty(\n this,\n /** The mode in which the decoder is operating. */\n \"decodeMode\",\n DecodingMode.Strict\n );\n _defineProperty(\n this,\n /** The number of characters that have been consumed in the current run. */\n \"runConsumed\",\n 0\n );\n this.decodeTree = decodeTree;\n this.emitCodePoint = emitCodePoint;\n this.errors = errors;\n }\n /**\n * Resets the instance to make it reusable.\n * @param decodeMode Entity decoding mode to use.\n */\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 this.runConsumed = 0;\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 * @param input 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(input, offset) {\n switch (this.state) {\n case EntityDecoderState.EntityStart:\n if (input.charCodeAt(offset) === CharCodes.NUM) {\n this.state = EntityDecoderState.NumericStart;\n this.consumed += 1;\n return this.stateNumericStart(input, offset + 1);\n }\n this.state = EntityDecoderState.NamedEntity;\n return this.stateNamedEntity(input, offset);\n case EntityDecoderState.NumericStart: return this.stateNumericStart(input, offset);\n case EntityDecoderState.NumericDecimal: return this.stateNumericDecimal(input, offset);\n case EntityDecoderState.NumericHex: return this.stateNumericHex(input, offset);\n case EntityDecoderState.NamedEntity: return this.stateNamedEntity(input, offset);\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 * @param input 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(input, offset) {\n if (offset >= input.length) return -1;\n if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {\n this.state = EntityDecoderState.NumericHex;\n this.consumed += 1;\n return this.stateNumericHex(input, offset + 1);\n }\n this.state = EntityDecoderState.NumericDecimal;\n return this.stateNumericDecimal(input, offset);\n }\n /**\n * Parses a hexadecimal numeric entity.\n *\n * Equivalent to the `Hexademical character reference state` in the HTML spec.\n * @param input 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(input, offset) {\n while (offset < input.length) {\n const char = input.charCodeAt(offset);\n if (isNumber(char) || isHexadecimalCharacter(char)) {\n const digit = char <= CharCodes.NINE ? char - CharCodes.ZERO : (char | TO_LOWER_BIT) - CharCodes.LOWER_A + 10;\n this.result = this.result * 16 + digit;\n this.consumed++;\n offset++;\n } else return this.emitNumericEntity(char, 3);\n }\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 * @param input 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(input, offset) {\n while (offset < input.length) {\n const char = input.charCodeAt(offset);\n if (isNumber(char)) {\n this.result = this.result * 10 + (char - CharCodes.ZERO);\n this.consumed++;\n offset++;\n } else return this.emitNumericEntity(char, 2);\n }\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 * @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 if (this.consumed <= expectedLength) {\n this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n }\n if (lastCp === CharCodes.SEMI) this.consumed += 1;\n else if (this.decodeMode === DecodingMode.Strict) return 0;\n this.emitCodePoint(replaceCodePoint(this.result), this.consumed);\n if (this.errors) {\n if (lastCp !== CharCodes.SEMI) this.errors.missingSemicolonAfterCharacterReference();\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 * @param input 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(input, offset) {\n const { decodeTree } = this;\n let current = decodeTree[this.treeIndex];\n let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n while (offset < input.length) {\n if (valueLength === 0 && (current & BinTrieFlags.FLAG13) !== 0) {\n const runLength = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n if (this.runConsumed === 0) {\n const firstChar = current & BinTrieFlags.JUMP_TABLE;\n if (input.charCodeAt(offset) !== firstChar) return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();\n offset++;\n this.excess++;\n this.runConsumed++;\n }\n while (this.runConsumed < runLength) {\n if (offset >= input.length) return -1;\n const charIndexInPacked = this.runConsumed - 1;\n const packedWord = decodeTree[this.treeIndex + 1 + (charIndexInPacked >> 1)];\n const expectedChar = charIndexInPacked % 2 === 0 ? packedWord & 255 : packedWord >> 8 & 255;\n if (input.charCodeAt(offset) !== expectedChar) {\n this.runConsumed = 0;\n return this.result === 0 ? 0 : this.emitNotTerminatedNamedEntity();\n }\n offset++;\n this.excess++;\n this.runConsumed++;\n }\n this.runConsumed = 0;\n this.treeIndex += 1 + (runLength >> 1);\n current = decodeTree[this.treeIndex];\n valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n }\n if (offset >= input.length) break;\n const char = input.charCodeAt(offset);\n if (char === CharCodes.SEMI && valueLength !== 0 && (current & BinTrieFlags.FLAG13) !== 0) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);\n if (this.treeIndex < 0) return this.result === 0 || this.decodeMode === DecodingMode.Attribute && (valueLength === 0 || isEntityInAttributeInvalidEnd(char)) ? 0 : this.emitNotTerminatedNamedEntity();\n current = decodeTree[this.treeIndex];\n valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;\n if (valueLength !== 0) {\n if (char === CharCodes.SEMI) return this.emitNamedEntityData(this.treeIndex, valueLength, this.consumed + this.excess);\n if (this.decodeMode !== DecodingMode.Strict && (current & BinTrieFlags.FLAG13) === 0) {\n this.result = this.treeIndex;\n this.consumed += this.excess;\n this.excess = 0;\n }\n }\n offset++;\n this.excess++;\n }\n return -1;\n }\n /**\n * Emit a named entity that was not terminated with a semicolon.\n * @returns The number of characters consumed.\n */\n emitNotTerminatedNamedEntity() {\n const { result, decodeTree } = this;\n const valueLength = (decodeTree[result] & BinTrieFlags.VALUE_LENGTH) >> 14;\n this.emitNamedEntityData(result, valueLength, this.consumed);\n this.errors?.missingSemicolonAfterCharacterReference();\n return this.consumed;\n }\n /**\n * Emit a named entity.\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 * @returns The number of characters consumed.\n */\n emitNamedEntityData(result, valueLength, consumed) {\n const { decodeTree } = this;\n this.emitCodePoint(valueLength === 1 ? decodeTree[result] & ~(BinTrieFlags.VALUE_LENGTH | BinTrieFlags.FLAG13) : decodeTree[result + 1], consumed);\n if (valueLength === 3) this.emitCodePoint(decodeTree[result + 2], consumed);\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 * @returns The number of characters consumed.\n */\n end() {\n switch (this.state) {\n case EntityDecoderState.NamedEntity: return this.result !== 0 && (this.decodeMode !== DecodingMode.Attribute || this.result === this.treeIndex) ? this.emitNotTerminatedNamedEntity() : 0;\n case EntityDecoderState.NumericDecimal: return this.emitNumericEntity(0, 2);\n case EntityDecoderState.NumericHex: return this.emitNumericEntity(0, 3);\n case EntityDecoderState.NumericStart:\n this.errors?.absenceOfDigitsInNumericCharacterReference(this.consumed);\n return 0;\n case EntityDecoderState.EntityStart: return 0;\n }\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* @param decodeTree The trie.\n* @param current The current node.\n* @param nodeIndex Index immediately after the current node header.\n* @param char The current character.\n* @returns The index of the next node, or -1 if no branch is taken.\n*/\nfunction determineBranch(decodeTree, current, nodeIndex, char) {\n const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;\n const jumpOffset = current & BinTrieFlags.JUMP_TABLE;\n if (branchCount === 0) return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;\n if (jumpOffset) {\n const value = char - jumpOffset;\n return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIndex + value] - 1;\n }\n const packedKeySlots = branchCount + 1 >> 1;\n let lo = 0;\n let hi = branchCount - 1;\n while (lo <= hi) {\n const mid = lo + hi >>> 1;\n const midKey = decodeTree[nodeIndex + (mid >> 1)] >> (mid & 1) * 8 & 255;\n if (midKey < char) lo = mid + 1;\n else if (midKey > char) hi = mid - 1;\n else return decodeTree[nodeIndex + packedKeySlots + mid];\n }\n return -1;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/html.js\n/** All valid namespaces in HTML. */\nvar NS;\n(function(NS$1) {\n NS$1[\"HTML\"] = \"http://www.w3.org/1999/xhtml\";\n NS$1[\"MATHML\"] = \"http://www.w3.org/1998/Math/MathML\";\n NS$1[\"SVG\"] = \"http://www.w3.org/2000/svg\";\n NS$1[\"XLINK\"] = \"http://www.w3.org/1999/xlink\";\n NS$1[\"XML\"] = \"http://www.w3.org/XML/1998/namespace\";\n NS$1[\"XMLNS\"] = \"http://www.w3.org/2000/xmlns/\";\n})(NS || (NS = {}));\nvar ATTRS;\n(function(ATTRS$1) {\n ATTRS$1[\"TYPE\"] = \"type\";\n ATTRS$1[\"ACTION\"] = \"action\";\n ATTRS$1[\"ENCODING\"] = \"encoding\";\n ATTRS$1[\"PROMPT\"] = \"prompt\";\n ATTRS$1[\"NAME\"] = \"name\";\n ATTRS$1[\"COLOR\"] = \"color\";\n ATTRS$1[\"FACE\"] = \"face\";\n ATTRS$1[\"SIZE\"] = \"size\";\n})(ATTRS || (ATTRS = {}));\n/**\n* The mode of the document.\n*\n* @see {@link https://dom.spec.whatwg.org/#concept-document-limited-quirks}\n*/\nvar DOCUMENT_MODE;\n(function(DOCUMENT_MODE$1) {\n DOCUMENT_MODE$1[\"NO_QUIRKS\"] = \"no-quirks\";\n DOCUMENT_MODE$1[\"QUIRKS\"] = \"quirks\";\n DOCUMENT_MODE$1[\"LIMITED_QUIRKS\"] = \"limited-quirks\";\n})(DOCUMENT_MODE || (DOCUMENT_MODE = {}));\nvar TAG_NAMES;\n(function(TAG_NAMES$1) {\n TAG_NAMES$1[\"A\"] = \"a\";\n TAG_NAMES$1[\"ADDRESS\"] = \"address\";\n TAG_NAMES$1[\"ANNOTATION_XML\"] = \"annotation-xml\";\n TAG_NAMES$1[\"APPLET\"] = \"applet\";\n TAG_NAMES$1[\"AREA\"] = \"area\";\n TAG_NAMES$1[\"ARTICLE\"] = \"article\";\n TAG_NAMES$1[\"ASIDE\"] = \"aside\";\n TAG_NAMES$1[\"B\"] = \"b\";\n TAG_NAMES$1[\"BASE\"] = \"base\";\n TAG_NAMES$1[\"BASEFONT\"] = \"basefont\";\n TAG_NAMES$1[\"BGSOUND\"] = \"bgsound\";\n TAG_NAMES$1[\"BIG\"] = \"big\";\n TAG_NAMES$1[\"BLOCKQUOTE\"] = \"blockquote\";\n TAG_NAMES$1[\"BODY\"] = \"body\";\n TAG_NAMES$1[\"BR\"] = \"br\";\n TAG_NAMES$1[\"BUTTON\"] = \"button\";\n TAG_NAMES$1[\"CAPTION\"] = \"caption\";\n TAG_NAMES$1[\"CENTER\"] = \"center\";\n TAG_NAMES$1[\"CODE\"] = \"code\";\n TAG_NAMES$1[\"COL\"] = \"col\";\n TAG_NAMES$1[\"COLGROUP\"] = \"colgroup\";\n TAG_NAMES$1[\"DD\"] = \"dd\";\n TAG_NAMES$1[\"DESC\"] = \"desc\";\n TAG_NAMES$1[\"DETAILS\"] = \"details\";\n TAG_NAMES$1[\"DIALOG\"] = \"dialog\";\n TAG_NAMES$1[\"DIR\"] = \"dir\";\n TAG_NAMES$1[\"DIV\"] = \"div\";\n TAG_NAMES$1[\"DL\"] = \"dl\";\n TAG_NAMES$1[\"DT\"] = \"dt\";\n TAG_NAMES$1[\"EM\"] = \"em\";\n TAG_NAMES$1[\"EMBED\"] = \"embed\";\n TAG_NAMES$1[\"FIELDSET\"] = \"fieldset\";\n TAG_NAMES$1[\"FIGCAPTION\"] = \"figcaption\";\n TAG_NAMES$1[\"FIGURE\"] = \"figure\";\n TAG_NAMES$1[\"FONT\"] = \"font\";\n TAG_NAMES$1[\"FOOTER\"] = \"footer\";\n TAG_NAMES$1[\"FOREIGN_OBJECT\"] = \"foreignObject\";\n TAG_NAMES$1[\"FORM\"] = \"form\";\n TAG_NAMES$1[\"FRAME\"] = \"frame\";\n TAG_NAMES$1[\"FRAMESET\"] = \"frameset\";\n TAG_NAMES$1[\"H1\"] = \"h1\";\n TAG_NAMES$1[\"H2\"] = \"h2\";\n TAG_NAMES$1[\"H3\"] = \"h3\";\n TAG_NAMES$1[\"H4\"] = \"h4\";\n TAG_NAMES$1[\"H5\"] = \"h5\";\n TAG_NAMES$1[\"H6\"] = \"h6\";\n TAG_NAMES$1[\"HEAD\"] = \"head\";\n TAG_NAMES$1[\"HEADER\"] = \"header\";\n TAG_NAMES$1[\"HGROUP\"] = \"hgroup\";\n TAG_NAMES$1[\"HR\"] = \"hr\";\n TAG_NAMES$1[\"HTML\"] = \"html\";\n TAG_NAMES$1[\"I\"] = \"i\";\n TAG_NAMES$1[\"IMG\"] = \"img\";\n TAG_NAMES$1[\"IMAGE\"] = \"image\";\n TAG_NAMES$1[\"INPUT\"] = \"input\";\n TAG_NAMES$1[\"IFRAME\"] = \"iframe\";\n TAG_NAMES$1[\"KEYGEN\"] = \"keygen\";\n TAG_NAMES$1[\"LABEL\"] = \"label\";\n TAG_NAMES$1[\"LI\"] = \"li\";\n TAG_NAMES$1[\"LINK\"] = \"link\";\n TAG_NAMES$1[\"LISTING\"] = \"listing\";\n TAG_NAMES$1[\"MAIN\"] = \"main\";\n TAG_NAMES$1[\"MALIGNMARK\"] = \"malignmark\";\n TAG_NAMES$1[\"MARQUEE\"] = \"marquee\";\n TAG_NAMES$1[\"MATH\"] = \"math\";\n TAG_NAMES$1[\"MENU\"] = \"menu\";\n TAG_NAMES$1[\"META\"] = \"meta\";\n TAG_NAMES$1[\"MGLYPH\"] = \"mglyph\";\n TAG_NAMES$1[\"MI\"] = \"mi\";\n TAG_NAMES$1[\"MO\"] = \"mo\";\n TAG_NAMES$1[\"MN\"] = \"mn\";\n TAG_NAMES$1[\"MS\"] = \"ms\";\n TAG_NAMES$1[\"MTEXT\"] = \"mtext\";\n TAG_NAMES$1[\"NAV\"] = \"nav\";\n TAG_NAMES$1[\"NOBR\"] = \"nobr\";\n TAG_NAMES$1[\"NOFRAMES\"] = \"noframes\";\n TAG_NAMES$1[\"NOEMBED\"] = \"noembed\";\n TAG_NAMES$1[\"NOSCRIPT\"] = \"noscript\";\n TAG_NAMES$1[\"OBJECT\"] = \"object\";\n TAG_NAMES$1[\"OL\"] = \"ol\";\n TAG_NAMES$1[\"OPTGROUP\"] = \"optgroup\";\n TAG_NAMES$1[\"OPTION\"] = \"option\";\n TAG_NAMES$1[\"P\"] = \"p\";\n TAG_NAMES$1[\"PARAM\"] = \"param\";\n TAG_NAMES$1[\"PLAINTEXT\"] = \"plaintext\";\n TAG_NAMES$1[\"PRE\"] = \"pre\";\n TAG_NAMES$1[\"RB\"] = \"rb\";\n TAG_NAMES$1[\"RP\"] = \"rp\";\n TAG_NAMES$1[\"RT\"] = \"rt\";\n TAG_NAMES$1[\"RTC\"] = \"rtc\";\n TAG_NAMES$1[\"RUBY\"] = \"ruby\";\n TAG_NAMES$1[\"S\"] = \"s\";\n TAG_NAMES$1[\"SCRIPT\"] = \"script\";\n TAG_NAMES$1[\"SEARCH\"] = \"search\";\n TAG_NAMES$1[\"SECTION\"] = \"section\";\n TAG_NAMES$1[\"SELECT\"] = \"select\";\n TAG_NAMES$1[\"SOURCE\"] = \"source\";\n TAG_NAMES$1[\"SMALL\"] = \"small\";\n TAG_NAMES$1[\"SPAN\"] = \"span\";\n TAG_NAMES$1[\"STRIKE\"] = \"strike\";\n TAG_NAMES$1[\"STRONG\"] = \"strong\";\n TAG_NAMES$1[\"STYLE\"] = \"style\";\n TAG_NAMES$1[\"SUB\"] = \"sub\";\n TAG_NAMES$1[\"SUMMARY\"] = \"summary\";\n TAG_NAMES$1[\"SUP\"] = \"sup\";\n TAG_NAMES$1[\"TABLE\"] = \"table\";\n TAG_NAMES$1[\"TBODY\"] = \"tbody\";\n TAG_NAMES$1[\"TEMPLATE\"] = \"template\";\n TAG_NAMES$1[\"TEXTAREA\"] = \"textarea\";\n TAG_NAMES$1[\"TFOOT\"] = \"tfoot\";\n TAG_NAMES$1[\"TD\"] = \"td\";\n TAG_NAMES$1[\"TH\"] = \"th\";\n TAG_NAMES$1[\"THEAD\"] = \"thead\";\n TAG_NAMES$1[\"TITLE\"] = \"title\";\n TAG_NAMES$1[\"TR\"] = \"tr\";\n TAG_NAMES$1[\"TRACK\"] = \"track\";\n TAG_NAMES$1[\"TT\"] = \"tt\";\n TAG_NAMES$1[\"U\"] = \"u\";\n TAG_NAMES$1[\"UL\"] = \"ul\";\n TAG_NAMES$1[\"SVG\"] = \"svg\";\n TAG_NAMES$1[\"VAR\"] = \"var\";\n TAG_NAMES$1[\"WBR\"] = \"wbr\";\n TAG_NAMES$1[\"XMP\"] = \"xmp\";\n})(TAG_NAMES || (TAG_NAMES = {}));\n/**\n* Tag IDs are numeric IDs for known tag names.\n*\n* We use tag IDs to improve the performance of tag name comparisons.\n*/\nvar TAG_ID;\n(function(TAG_ID$1) {\n TAG_ID$1[TAG_ID$1[\"UNKNOWN\"] = 0] = \"UNKNOWN\";\n TAG_ID$1[TAG_ID$1[\"A\"] = 1] = \"A\";\n TAG_ID$1[TAG_ID$1[\"ADDRESS\"] = 2] = \"ADDRESS\";\n TAG_ID$1[TAG_ID$1[\"ANNOTATION_XML\"] = 3] = \"ANNOTATION_XML\";\n TAG_ID$1[TAG_ID$1[\"APPLET\"] = 4] = \"APPLET\";\n TAG_ID$1[TAG_ID$1[\"AREA\"] = 5] = \"AREA\";\n TAG_ID$1[TAG_ID$1[\"ARTICLE\"] = 6] = \"ARTICLE\";\n TAG_ID$1[TAG_ID$1[\"ASIDE\"] = 7] = \"ASIDE\";\n TAG_ID$1[TAG_ID$1[\"B\"] = 8] = \"B\";\n TAG_ID$1[TAG_ID$1[\"BASE\"] = 9] = \"BASE\";\n TAG_ID$1[TAG_ID$1[\"BASEFONT\"] = 10] = \"BASEFONT\";\n TAG_ID$1[TAG_ID$1[\"BGSOUND\"] = 11] = \"BGSOUND\";\n TAG_ID$1[TAG_ID$1[\"BIG\"] = 12] = \"BIG\";\n TAG_ID$1[TAG_ID$1[\"BLOCKQUOTE\"] = 13] = \"BLOCKQUOTE\";\n TAG_ID$1[TAG_ID$1[\"BODY\"] = 14] = \"BODY\";\n TAG_ID$1[TAG_ID$1[\"BR\"] = 15] = \"BR\";\n TAG_ID$1[TAG_ID$1[\"BUTTON\"] = 16] = \"BUTTON\";\n TAG_ID$1[TAG_ID$1[\"CAPTION\"] = 17] = \"CAPTION\";\n TAG_ID$1[TAG_ID$1[\"CENTER\"] = 18] = \"CENTER\";\n TAG_ID$1[TAG_ID$1[\"CODE\"] = 19] = \"CODE\";\n TAG_ID$1[TAG_ID$1[\"COL\"] = 20] = \"COL\";\n TAG_ID$1[TAG_ID$1[\"COLGROUP\"] = 21] = \"COLGROUP\";\n TAG_ID$1[TAG_ID$1[\"DD\"] = 22] = \"DD\";\n TAG_ID$1[TAG_ID$1[\"DESC\"] = 23] = \"DESC\";\n TAG_ID$1[TAG_ID$1[\"DETAILS\"] = 24] = \"DETAILS\";\n TAG_ID$1[TAG_ID$1[\"DIALOG\"] = 25] = \"DIALOG\";\n TAG_ID$1[TAG_ID$1[\"DIR\"] = 26] = \"DIR\";\n TAG_ID$1[TAG_ID$1[\"DIV\"] = 27] = \"DIV\";\n TAG_ID$1[TAG_ID$1[\"DL\"] = 28] = \"DL\";\n TAG_ID$1[TAG_ID$1[\"DT\"] = 29] = \"DT\";\n TAG_ID$1[TAG_ID$1[\"EM\"] = 30] = \"EM\";\n TAG_ID$1[TAG_ID$1[\"EMBED\"] = 31] = \"EMBED\";\n TAG_ID$1[TAG_ID$1[\"FIELDSET\"] = 32] = \"FIELDSET\";\n TAG_ID$1[TAG_ID$1[\"FIGCAPTION\"] = 33] = \"FIGCAPTION\";\n TAG_ID$1[TAG_ID$1[\"FIGURE\"] = 34] = \"FIGURE\";\n TAG_ID$1[TAG_ID$1[\"FONT\"] = 35] = \"FONT\";\n TAG_ID$1[TAG_ID$1[\"FOOTER\"] = 36] = \"FOOTER\";\n TAG_ID$1[TAG_ID$1[\"FOREIGN_OBJECT\"] = 37] = \"FOREIGN_OBJECT\";\n TAG_ID$1[TAG_ID$1[\"FORM\"] = 38] = \"FORM\";\n TAG_ID$1[TAG_ID$1[\"FRAME\"] = 39] = \"FRAME\";\n TAG_ID$1[TAG_ID$1[\"FRAMESET\"] = 40] = \"FRAMESET\";\n TAG_ID$1[TAG_ID$1[\"H1\"] = 41] = \"H1\";\n TAG_ID$1[TAG_ID$1[\"H2\"] = 42] = \"H2\";\n TAG_ID$1[TAG_ID$1[\"H3\"] = 43] = \"H3\";\n TAG_ID$1[TAG_ID$1[\"H4\"] = 44] = \"H4\";\n TAG_ID$1[TAG_ID$1[\"H5\"] = 45] = \"H5\";\n TAG_ID$1[TAG_ID$1[\"H6\"] = 46] = \"H6\";\n TAG_ID$1[TAG_ID$1[\"HEAD\"] = 47] = \"HEAD\";\n TAG_ID$1[TAG_ID$1[\"HEADER\"] = 48] = \"HEADER\";\n TAG_ID$1[TAG_ID$1[\"HGROUP\"] = 49] = \"HGROUP\";\n TAG_ID$1[TAG_ID$1[\"HR\"] = 50] = \"HR\";\n TAG_ID$1[TAG_ID$1[\"HTML\"] = 51] = \"HTML\";\n TAG_ID$1[TAG_ID$1[\"I\"] = 52] = \"I\";\n TAG_ID$1[TAG_ID$1[\"IMG\"] = 53] = \"IMG\";\n TAG_ID$1[TAG_ID$1[\"IMAGE\"] = 54] = \"IMAGE\";\n TAG_ID$1[TAG_ID$1[\"INPUT\"] = 55] = \"INPUT\";\n TAG_ID$1[TAG_ID$1[\"IFRAME\"] = 56] = \"IFRAME\";\n TAG_ID$1[TAG_ID$1[\"KEYGEN\"] = 57] = \"KEYGEN\";\n TAG_ID$1[TAG_ID$1[\"LABEL\"] = 58] = \"LABEL\";\n TAG_ID$1[TAG_ID$1[\"LI\"] = 59] = \"LI\";\n TAG_ID$1[TAG_ID$1[\"LINK\"] = 60] = \"LINK\";\n TAG_ID$1[TAG_ID$1[\"LISTING\"] = 61] = \"LISTING\";\n TAG_ID$1[TAG_ID$1[\"MAIN\"] = 62] = \"MAIN\";\n TAG_ID$1[TAG_ID$1[\"MALIGNMARK\"] = 63] = \"MALIGNMARK\";\n TAG_ID$1[TAG_ID$1[\"MARQUEE\"] = 64] = \"MARQUEE\";\n TAG_ID$1[TAG_ID$1[\"MATH\"] = 65] = \"MATH\";\n TAG_ID$1[TAG_ID$1[\"MENU\"] = 66] = \"MENU\";\n TAG_ID$1[TAG_ID$1[\"META\"] = 67] = \"META\";\n TAG_ID$1[TAG_ID$1[\"MGLYPH\"] = 68] = \"MGLYPH\";\n TAG_ID$1[TAG_ID$1[\"MI\"] = 69] = \"MI\";\n TAG_ID$1[TAG_ID$1[\"MO\"] = 70] = \"MO\";\n TAG_ID$1[TAG_ID$1[\"MN\"] = 71] = \"MN\";\n TAG_ID$1[TAG_ID$1[\"MS\"] = 72] = \"MS\";\n TAG_ID$1[TAG_ID$1[\"MTEXT\"] = 73] = \"MTEXT\";\n TAG_ID$1[TAG_ID$1[\"NAV\"] = 74] = \"NAV\";\n TAG_ID$1[TAG_ID$1[\"NOBR\"] = 75] = \"NOBR\";\n TAG_ID$1[TAG_ID$1[\"NOFRAMES\"] = 76] = \"NOFRAMES\";\n TAG_ID$1[TAG_ID$1[\"NOEMBED\"] = 77] = \"NOEMBED\";\n TAG_ID$1[TAG_ID$1[\"NOSCRIPT\"] = 78] = \"NOSCRIPT\";\n TAG_ID$1[TAG_ID$1[\"OBJECT\"] = 79] = \"OBJECT\";\n TAG_ID$1[TAG_ID$1[\"OL\"] = 80] = \"OL\";\n TAG_ID$1[TAG_ID$1[\"OPTGROUP\"] = 81] = \"OPTGROUP\";\n TAG_ID$1[TAG_ID$1[\"OPTION\"] = 82] = \"OPTION\";\n TAG_ID$1[TAG_ID$1[\"P\"] = 83] = \"P\";\n TAG_ID$1[TAG_ID$1[\"PARAM\"] = 84] = \"PARAM\";\n TAG_ID$1[TAG_ID$1[\"PLAINTEXT\"] = 85] = \"PLAINTEXT\";\n TAG_ID$1[TAG_ID$1[\"PRE\"] = 86] = \"PRE\";\n TAG_ID$1[TAG_ID$1[\"RB\"] = 87] = \"RB\";\n TAG_ID$1[TAG_ID$1[\"RP\"] = 88] = \"RP\";\n TAG_ID$1[TAG_ID$1[\"RT\"] = 89] = \"RT\";\n TAG_ID$1[TAG_ID$1[\"RTC\"] = 90] = \"RTC\";\n TAG_ID$1[TAG_ID$1[\"RUBY\"] = 91] = \"RUBY\";\n TAG_ID$1[TAG_ID$1[\"S\"] = 92] = \"S\";\n TAG_ID$1[TAG_ID$1[\"SCRIPT\"] = 93] = \"SCRIPT\";\n TAG_ID$1[TAG_ID$1[\"SEARCH\"] = 94] = \"SEARCH\";\n TAG_ID$1[TAG_ID$1[\"SECTION\"] = 95] = \"SECTION\";\n TAG_ID$1[TAG_ID$1[\"SELECT\"] = 96] = \"SELECT\";\n TAG_ID$1[TAG_ID$1[\"SOURCE\"] = 97] = \"SOURCE\";\n TAG_ID$1[TAG_ID$1[\"SMALL\"] = 98] = \"SMALL\";\n TAG_ID$1[TAG_ID$1[\"SPAN\"] = 99] = \"SPAN\";\n TAG_ID$1[TAG_ID$1[\"STRIKE\"] = 100] = \"STRIKE\";\n TAG_ID$1[TAG_ID$1[\"STRONG\"] = 101] = \"STRONG\";\n TAG_ID$1[TAG_ID$1[\"STYLE\"] = 102] = \"STYLE\";\n TAG_ID$1[TAG_ID$1[\"SUB\"] = 103] = \"SUB\";\n TAG_ID$1[TAG_ID$1[\"SUMMARY\"] = 104] = \"SUMMARY\";\n TAG_ID$1[TAG_ID$1[\"SUP\"] = 105] = \"SUP\";\n TAG_ID$1[TAG_ID$1[\"TABLE\"] = 106] = \"TABLE\";\n TAG_ID$1[TAG_ID$1[\"TBODY\"] = 107] = \"TBODY\";\n TAG_ID$1[TAG_ID$1[\"TEMPLATE\"] = 108] = \"TEMPLATE\";\n TAG_ID$1[TAG_ID$1[\"TEXTAREA\"] = 109] = \"TEXTAREA\";\n TAG_ID$1[TAG_ID$1[\"TFOOT\"] = 110] = \"TFOOT\";\n TAG_ID$1[TAG_ID$1[\"TD\"] = 111] = \"TD\";\n TAG_ID$1[TAG_ID$1[\"TH\"] = 112] = \"TH\";\n TAG_ID$1[TAG_ID$1[\"THEAD\"] = 113] = \"THEAD\";\n TAG_ID$1[TAG_ID$1[\"TITLE\"] = 114] = \"TITLE\";\n TAG_ID$1[TAG_ID$1[\"TR\"] = 115] = \"TR\";\n TAG_ID$1[TAG_ID$1[\"TRACK\"] = 116] = \"TRACK\";\n TAG_ID$1[TAG_ID$1[\"TT\"] = 117] = \"TT\";\n TAG_ID$1[TAG_ID$1[\"U\"] = 118] = \"U\";\n TAG_ID$1[TAG_ID$1[\"UL\"] = 119] = \"UL\";\n TAG_ID$1[TAG_ID$1[\"SVG\"] = 120] = \"SVG\";\n TAG_ID$1[TAG_ID$1[\"VAR\"] = 121] = \"VAR\";\n TAG_ID$1[TAG_ID$1[\"WBR\"] = 122] = \"WBR\";\n TAG_ID$1[TAG_ID$1[\"XMP\"] = 123] = \"XMP\";\n})(TAG_ID || (TAG_ID = {}));\nconst TAG_NAME_TO_ID = new Map([\n [TAG_NAMES.A, TAG_ID.A],\n [TAG_NAMES.ADDRESS, TAG_ID.ADDRESS],\n [TAG_NAMES.ANNOTATION_XML, TAG_ID.ANNOTATION_XML],\n [TAG_NAMES.APPLET, TAG_ID.APPLET],\n [TAG_NAMES.AREA, TAG_ID.AREA],\n [TAG_NAMES.ARTICLE, TAG_ID.ARTICLE],\n [TAG_NAMES.ASIDE, TAG_ID.ASIDE],\n [TAG_NAMES.B, TAG_ID.B],\n [TAG_NAMES.BASE, TAG_ID.BASE],\n [TAG_NAMES.BASEFONT, TAG_ID.BASEFONT],\n [TAG_NAMES.BGSOUND, TAG_ID.BGSOUND],\n [TAG_NAMES.BIG, TAG_ID.BIG],\n [TAG_NAMES.BLOCKQUOTE, TAG_ID.BLOCKQUOTE],\n [TAG_NAMES.BODY, TAG_ID.BODY],\n [TAG_NAMES.BR, TAG_ID.BR],\n [TAG_NAMES.BUTTON, TAG_ID.BUTTON],\n [TAG_NAMES.CAPTION, TAG_ID.CAPTION],\n [TAG_NAMES.CENTER, TAG_ID.CENTER],\n [TAG_NAMES.CODE, TAG_ID.CODE],\n [TAG_NAMES.COL, TAG_ID.COL],\n [TAG_NAMES.COLGROUP, TAG_ID.COLGROUP],\n [TAG_NAMES.DD, TAG_ID.DD],\n [TAG_NAMES.DESC, TAG_ID.DESC],\n [TAG_NAMES.DETAILS, TAG_ID.DETAILS],\n [TAG_NAMES.DIALOG, TAG_ID.DIALOG],\n [TAG_NAMES.DIR, TAG_ID.DIR],\n [TAG_NAMES.DIV, TAG_ID.DIV],\n [TAG_NAMES.DL, TAG_ID.DL],\n [TAG_NAMES.DT, TAG_ID.DT],\n [TAG_NAMES.EM, TAG_ID.EM],\n [TAG_NAMES.EMBED, TAG_ID.EMBED],\n [TAG_NAMES.FIELDSET, TAG_ID.FIELDSET],\n [TAG_NAMES.FIGCAPTION, TAG_ID.FIGCAPTION],\n [TAG_NAMES.FIGURE, TAG_ID.FIGURE],\n [TAG_NAMES.FONT, TAG_ID.FONT],\n [TAG_NAMES.FOOTER, TAG_ID.FOOTER],\n [TAG_NAMES.FOREIGN_OBJECT, TAG_ID.FOREIGN_OBJECT],\n [TAG_NAMES.FORM, TAG_ID.FORM],\n [TAG_NAMES.FRAME, TAG_ID.FRAME],\n [TAG_NAMES.FRAMESET, TAG_ID.FRAMESET],\n [TAG_NAMES.H1, TAG_ID.H1],\n [TAG_NAMES.H2, TAG_ID.H2],\n [TAG_NAMES.H3, TAG_ID.H3],\n [TAG_NAMES.H4, TAG_ID.H4],\n [TAG_NAMES.H5, TAG_ID.H5],\n [TAG_NAMES.H6, TAG_ID.H6],\n [TAG_NAMES.HEAD, TAG_ID.HEAD],\n [TAG_NAMES.HEADER, TAG_ID.HEADER],\n [TAG_NAMES.HGROUP, TAG_ID.HGROUP],\n [TAG_NAMES.HR, TAG_ID.HR],\n [TAG_NAMES.HTML, TAG_ID.HTML],\n [TAG_NAMES.I, TAG_ID.I],\n [TAG_NAMES.IMG, TAG_ID.IMG],\n [TAG_NAMES.IMAGE, TAG_ID.IMAGE],\n [TAG_NAMES.INPUT, TAG_ID.INPUT],\n [TAG_NAMES.IFRAME, TAG_ID.IFRAME],\n [TAG_NAMES.KEYGEN, TAG_ID.KEYGEN],\n [TAG_NAMES.LABEL, TAG_ID.LABEL],\n [TAG_NAMES.LI, TAG_ID.LI],\n [TAG_NAMES.LINK, TAG_ID.LINK],\n [TAG_NAMES.LISTING, TAG_ID.LISTING],\n [TAG_NAMES.MAIN, TAG_ID.MAIN],\n [TAG_NAMES.MALIGNMARK, TAG_ID.MALIGNMARK],\n [TAG_NAMES.MARQUEE, TAG_ID.MARQUEE],\n [TAG_NAMES.MATH, TAG_ID.MATH],\n [TAG_NAMES.MENU, TAG_ID.MENU],\n [TAG_NAMES.META, TAG_ID.META],\n [TAG_NAMES.MGLYPH, TAG_ID.MGLYPH],\n [TAG_NAMES.MI, TAG_ID.MI],\n [TAG_NAMES.MO, TAG_ID.MO],\n [TAG_NAMES.MN, TAG_ID.MN],\n [TAG_NAMES.MS, TAG_ID.MS],\n [TAG_NAMES.MTEXT, TAG_ID.MTEXT],\n [TAG_NAMES.NAV, TAG_ID.NAV],\n [TAG_NAMES.NOBR, TAG_ID.NOBR],\n [TAG_NAMES.NOFRAMES, TAG_ID.NOFRAMES],\n [TAG_NAMES.NOEMBED, TAG_ID.NOEMBED],\n [TAG_NAMES.NOSCRIPT, TAG_ID.NOSCRIPT],\n [TAG_NAMES.OBJECT, TAG_ID.OBJECT],\n [TAG_NAMES.OL, TAG_ID.OL],\n [TAG_NAMES.OPTGROUP, TAG_ID.OPTGROUP],\n [TAG_NAMES.OPTION, TAG_ID.OPTION],\n [TAG_NAMES.P, TAG_ID.P],\n [TAG_NAMES.PARAM, TAG_ID.PARAM],\n [TAG_NAMES.PLAINTEXT, TAG_ID.PLAINTEXT],\n [TAG_NAMES.PRE, TAG_ID.PRE],\n [TAG_NAMES.RB, TAG_ID.RB],\n [TAG_NAMES.RP, TAG_ID.RP],\n [TAG_NAMES.RT, TAG_ID.RT],\n [TAG_NAMES.RTC, TAG_ID.RTC],\n [TAG_NAMES.RUBY, TAG_ID.RUBY],\n [TAG_NAMES.S, TAG_ID.S],\n [TAG_NAMES.SCRIPT, TAG_ID.SCRIPT],\n [TAG_NAMES.SEARCH, TAG_ID.SEARCH],\n [TAG_NAMES.SECTION, TAG_ID.SECTION],\n [TAG_NAMES.SELECT, TAG_ID.SELECT],\n [TAG_NAMES.SOURCE, TAG_ID.SOURCE],\n [TAG_NAMES.SMALL, TAG_ID.SMALL],\n [TAG_NAMES.SPAN, TAG_ID.SPAN],\n [TAG_NAMES.STRIKE, TAG_ID.STRIKE],\n [TAG_NAMES.STRONG, TAG_ID.STRONG],\n [TAG_NAMES.STYLE, TAG_ID.STYLE],\n [TAG_NAMES.SUB, TAG_ID.SUB],\n [TAG_NAMES.SUMMARY, TAG_ID.SUMMARY],\n [TAG_NAMES.SUP, TAG_ID.SUP],\n [TAG_NAMES.TABLE, TAG_ID.TABLE],\n [TAG_NAMES.TBODY, TAG_ID.TBODY],\n [TAG_NAMES.TEMPLATE, TAG_ID.TEMPLATE],\n [TAG_NAMES.TEXTAREA, TAG_ID.TEXTAREA],\n [TAG_NAMES.TFOOT, TAG_ID.TFOOT],\n [TAG_NAMES.TD, TAG_ID.TD],\n [TAG_NAMES.TH, TAG_ID.TH],\n [TAG_NAMES.THEAD, TAG_ID.THEAD],\n [TAG_NAMES.TITLE, TAG_ID.TITLE],\n [TAG_NAMES.TR, TAG_ID.TR],\n [TAG_NAMES.TRACK, TAG_ID.TRACK],\n [TAG_NAMES.TT, TAG_ID.TT],\n [TAG_NAMES.U, TAG_ID.U],\n [TAG_NAMES.UL, TAG_ID.UL],\n [TAG_NAMES.SVG, TAG_ID.SVG],\n [TAG_NAMES.VAR, TAG_ID.VAR],\n [TAG_NAMES.WBR, TAG_ID.WBR],\n [TAG_NAMES.XMP, TAG_ID.XMP]\n]);\nfunction getTagID(tagName) {\n var _a;\n return (_a = TAG_NAME_TO_ID.get(tagName)) !== null && _a !== void 0 ? _a : TAG_ID.UNKNOWN;\n}\nconst $ = TAG_ID;\nconst SPECIAL_ELEMENTS = {\n [NS.HTML]: new Set([\n $.ADDRESS,\n $.APPLET,\n $.AREA,\n $.ARTICLE,\n $.ASIDE,\n $.BASE,\n $.BASEFONT,\n $.BGSOUND,\n $.BLOCKQUOTE,\n $.BODY,\n $.BR,\n $.BUTTON,\n $.CAPTION,\n $.CENTER,\n $.COL,\n $.COLGROUP,\n $.DD,\n $.DETAILS,\n $.DIR,\n $.DIV,\n $.DL,\n $.DT,\n $.EMBED,\n $.FIELDSET,\n $.FIGCAPTION,\n $.FIGURE,\n $.FOOTER,\n $.FORM,\n $.FRAME,\n $.FRAMESET,\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6,\n $.HEAD,\n $.HEADER,\n $.HGROUP,\n $.HR,\n $.HTML,\n $.IFRAME,\n $.IMG,\n $.INPUT,\n $.LI,\n $.LINK,\n $.LISTING,\n $.MAIN,\n $.MARQUEE,\n $.MENU,\n $.META,\n $.NAV,\n $.NOEMBED,\n $.NOFRAMES,\n $.NOSCRIPT,\n $.OBJECT,\n $.OL,\n $.P,\n $.PARAM,\n $.PLAINTEXT,\n $.PRE,\n $.SCRIPT,\n $.SECTION,\n $.SELECT,\n $.SOURCE,\n $.STYLE,\n $.SUMMARY,\n $.TABLE,\n $.TBODY,\n $.TD,\n $.TEMPLATE,\n $.TEXTAREA,\n $.TFOOT,\n $.TH,\n $.THEAD,\n $.TITLE,\n $.TR,\n $.TRACK,\n $.UL,\n $.WBR,\n $.XMP\n ]),\n [NS.MATHML]: new Set([\n $.MI,\n $.MO,\n $.MN,\n $.MS,\n $.MTEXT,\n $.ANNOTATION_XML\n ]),\n [NS.SVG]: new Set([\n $.TITLE,\n $.FOREIGN_OBJECT,\n $.DESC\n ]),\n [NS.XLINK]: /* @__PURE__ */ new Set(),\n [NS.XML]: /* @__PURE__ */ new Set(),\n [NS.XMLNS]: /* @__PURE__ */ new Set()\n};\nconst NUMBERED_HEADERS = new Set([\n $.H1,\n $.H2,\n $.H3,\n $.H4,\n $.H5,\n $.H6\n]);\nconst UNESCAPED_TEXT = new Set([\n TAG_NAMES.STYLE,\n TAG_NAMES.SCRIPT,\n TAG_NAMES.XMP,\n TAG_NAMES.IFRAME,\n TAG_NAMES.NOEMBED,\n TAG_NAMES.NOFRAMES,\n TAG_NAMES.PLAINTEXT\n]);\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tokenizer/index.js\nvar State;\n(function(State$1) {\n State$1[State$1[\"DATA\"] = 0] = \"DATA\";\n State$1[State$1[\"RCDATA\"] = 1] = \"RCDATA\";\n State$1[State$1[\"RAWTEXT\"] = 2] = \"RAWTEXT\";\n State$1[State$1[\"SCRIPT_DATA\"] = 3] = \"SCRIPT_DATA\";\n State$1[State$1[\"PLAINTEXT\"] = 4] = \"PLAINTEXT\";\n State$1[State$1[\"TAG_OPEN\"] = 5] = \"TAG_OPEN\";\n State$1[State$1[\"END_TAG_OPEN\"] = 6] = \"END_TAG_OPEN\";\n State$1[State$1[\"TAG_NAME\"] = 7] = \"TAG_NAME\";\n State$1[State$1[\"RCDATA_LESS_THAN_SIGN\"] = 8] = \"RCDATA_LESS_THAN_SIGN\";\n State$1[State$1[\"RCDATA_END_TAG_OPEN\"] = 9] = \"RCDATA_END_TAG_OPEN\";\n State$1[State$1[\"RCDATA_END_TAG_NAME\"] = 10] = \"RCDATA_END_TAG_NAME\";\n State$1[State$1[\"RAWTEXT_LESS_THAN_SIGN\"] = 11] = \"RAWTEXT_LESS_THAN_SIGN\";\n State$1[State$1[\"RAWTEXT_END_TAG_OPEN\"] = 12] = \"RAWTEXT_END_TAG_OPEN\";\n State$1[State$1[\"RAWTEXT_END_TAG_NAME\"] = 13] = \"RAWTEXT_END_TAG_NAME\";\n State$1[State$1[\"SCRIPT_DATA_LESS_THAN_SIGN\"] = 14] = \"SCRIPT_DATA_LESS_THAN_SIGN\";\n State$1[State$1[\"SCRIPT_DATA_END_TAG_OPEN\"] = 15] = \"SCRIPT_DATA_END_TAG_OPEN\";\n State$1[State$1[\"SCRIPT_DATA_END_TAG_NAME\"] = 16] = \"SCRIPT_DATA_END_TAG_NAME\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPE_START\"] = 17] = \"SCRIPT_DATA_ESCAPE_START\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPE_START_DASH\"] = 18] = \"SCRIPT_DATA_ESCAPE_START_DASH\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPED\"] = 19] = \"SCRIPT_DATA_ESCAPED\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPED_DASH\"] = 20] = \"SCRIPT_DATA_ESCAPED_DASH\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPED_DASH_DASH\"] = 21] = \"SCRIPT_DATA_ESCAPED_DASH_DASH\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\"] = 22] = \"SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\"] = 23] = \"SCRIPT_DATA_ESCAPED_END_TAG_OPEN\";\n State$1[State$1[\"SCRIPT_DATA_ESCAPED_END_TAG_NAME\"] = 24] = \"SCRIPT_DATA_ESCAPED_END_TAG_NAME\";\n State$1[State$1[\"SCRIPT_DATA_DOUBLE_ESCAPE_START\"] = 25] = \"SCRIPT_DATA_DOUBLE_ESCAPE_START\";\n State$1[State$1[\"SCRIPT_DATA_DOUBLE_ESCAPED\"] = 26] = \"SCRIPT_DATA_DOUBLE_ESCAPED\";\n State$1[State$1[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\"] = 27] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH\";\n State$1[State$1[\"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\"] = 28] = \"SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH\";\n State$1[State$1[\"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\"] = 29] = \"SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN\";\n State$1[State$1[\"SCRIPT_DATA_DOUBLE_ESCAPE_END\"] = 30] = \"SCRIPT_DATA_DOUBLE_ESCAPE_END\";\n State$1[State$1[\"BEFORE_ATTRIBUTE_NAME\"] = 31] = \"BEFORE_ATTRIBUTE_NAME\";\n State$1[State$1[\"ATTRIBUTE_NAME\"] = 32] = \"ATTRIBUTE_NAME\";\n State$1[State$1[\"AFTER_ATTRIBUTE_NAME\"] = 33] = \"AFTER_ATTRIBUTE_NAME\";\n State$1[State$1[\"BEFORE_ATTRIBUTE_VALUE\"] = 34] = \"BEFORE_ATTRIBUTE_VALUE\";\n State$1[State$1[\"ATTRIBUTE_VALUE_DOUBLE_QUOTED\"] = 35] = \"ATTRIBUTE_VALUE_DOUBLE_QUOTED\";\n State$1[State$1[\"ATTRIBUTE_VALUE_SINGLE_QUOTED\"] = 36] = \"ATTRIBUTE_VALUE_SINGLE_QUOTED\";\n State$1[State$1[\"ATTRIBUTE_VALUE_UNQUOTED\"] = 37] = \"ATTRIBUTE_VALUE_UNQUOTED\";\n State$1[State$1[\"AFTER_ATTRIBUTE_VALUE_QUOTED\"] = 38] = \"AFTER_ATTRIBUTE_VALUE_QUOTED\";\n State$1[State$1[\"SELF_CLOSING_START_TAG\"] = 39] = \"SELF_CLOSING_START_TAG\";\n State$1[State$1[\"BOGUS_COMMENT\"] = 40] = \"BOGUS_COMMENT\";\n State$1[State$1[\"MARKUP_DECLARATION_OPEN\"] = 41] = \"MARKUP_DECLARATION_OPEN\";\n State$1[State$1[\"COMMENT_START\"] = 42] = \"COMMENT_START\";\n State$1[State$1[\"COMMENT_START_DASH\"] = 43] = \"COMMENT_START_DASH\";\n State$1[State$1[\"COMMENT\"] = 44] = \"COMMENT\";\n State$1[State$1[\"COMMENT_LESS_THAN_SIGN\"] = 45] = \"COMMENT_LESS_THAN_SIGN\";\n State$1[State$1[\"COMMENT_LESS_THAN_SIGN_BANG\"] = 46] = \"COMMENT_LESS_THAN_SIGN_BANG\";\n State$1[State$1[\"COMMENT_LESS_THAN_SIGN_BANG_DASH\"] = 47] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH\";\n State$1[State$1[\"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\"] = 48] = \"COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH\";\n State$1[State$1[\"COMMENT_END_DASH\"] = 49] = \"COMMENT_END_DASH\";\n State$1[State$1[\"COMMENT_END\"] = 50] = \"COMMENT_END\";\n State$1[State$1[\"COMMENT_END_BANG\"] = 51] = \"COMMENT_END_BANG\";\n State$1[State$1[\"DOCTYPE\"] = 52] = \"DOCTYPE\";\n State$1[State$1[\"BEFORE_DOCTYPE_NAME\"] = 53] = \"BEFORE_DOCTYPE_NAME\";\n State$1[State$1[\"DOCTYPE_NAME\"] = 54] = \"DOCTYPE_NAME\";\n State$1[State$1[\"AFTER_DOCTYPE_NAME\"] = 55] = \"AFTER_DOCTYPE_NAME\";\n State$1[State$1[\"AFTER_DOCTYPE_PUBLIC_KEYWORD\"] = 56] = \"AFTER_DOCTYPE_PUBLIC_KEYWORD\";\n State$1[State$1[\"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\"] = 57] = \"BEFORE_DOCTYPE_PUBLIC_IDENTIFIER\";\n State$1[State$1[\"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\"] = 58] = \"DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED\";\n State$1[State$1[\"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\"] = 59] = \"DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED\";\n State$1[State$1[\"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\"] = 60] = \"AFTER_DOCTYPE_PUBLIC_IDENTIFIER\";\n State$1[State$1[\"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\"] = 61] = \"BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS\";\n State$1[State$1[\"AFTER_DOCTYPE_SYSTEM_KEYWORD\"] = 62] = \"AFTER_DOCTYPE_SYSTEM_KEYWORD\";\n State$1[State$1[\"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\"] = 63] = \"BEFORE_DOCTYPE_SYSTEM_IDENTIFIER\";\n State$1[State$1[\"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\"] = 64] = \"DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED\";\n State$1[State$1[\"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\"] = 65] = \"DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED\";\n State$1[State$1[\"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\"] = 66] = \"AFTER_DOCTYPE_SYSTEM_IDENTIFIER\";\n State$1[State$1[\"BOGUS_DOCTYPE\"] = 67] = \"BOGUS_DOCTYPE\";\n State$1[State$1[\"CDATA_SECTION\"] = 68] = \"CDATA_SECTION\";\n State$1[State$1[\"CDATA_SECTION_BRACKET\"] = 69] = \"CDATA_SECTION_BRACKET\";\n State$1[State$1[\"CDATA_SECTION_END\"] = 70] = \"CDATA_SECTION_END\";\n State$1[State$1[\"CHARACTER_REFERENCE\"] = 71] = \"CHARACTER_REFERENCE\";\n State$1[State$1[\"AMBIGUOUS_AMPERSAND\"] = 72] = \"AMBIGUOUS_AMPERSAND\";\n})(State || (State = {}));\nconst TokenizerMode = {\n DATA: State.DATA,\n RCDATA: State.RCDATA,\n RAWTEXT: State.RAWTEXT,\n SCRIPT_DATA: State.SCRIPT_DATA,\n PLAINTEXT: State.PLAINTEXT,\n CDATA_SECTION: State.CDATA_SECTION\n};\nfunction isAsciiDigit(cp) {\n return cp >= CODE_POINTS.DIGIT_0 && cp <= CODE_POINTS.DIGIT_9;\n}\nfunction isAsciiUpper(cp) {\n return cp >= CODE_POINTS.LATIN_CAPITAL_A && cp <= CODE_POINTS.LATIN_CAPITAL_Z;\n}\nfunction isAsciiLower(cp) {\n return cp >= CODE_POINTS.LATIN_SMALL_A && cp <= CODE_POINTS.LATIN_SMALL_Z;\n}\nfunction isAsciiLetter(cp) {\n return isAsciiLower(cp) || isAsciiUpper(cp);\n}\nfunction isAsciiAlphaNumeric(cp) {\n return isAsciiLetter(cp) || isAsciiDigit(cp);\n}\nfunction toAsciiLower(cp) {\n return cp + 32;\n}\nfunction isWhitespace(cp) {\n return cp === CODE_POINTS.SPACE || cp === CODE_POINTS.LINE_FEED || cp === CODE_POINTS.TABULATION || cp === CODE_POINTS.FORM_FEED;\n}\nfunction isScriptDataDoubleEscapeSequenceEnd(cp) {\n return isWhitespace(cp) || cp === CODE_POINTS.SOLIDUS || cp === CODE_POINTS.GREATER_THAN_SIGN;\n}\nfunction getErrorForNumericCharacterReference(code) {\n if (code === CODE_POINTS.NULL) return ERR.nullCharacterReference;\n else if (code > 1114111) return ERR.characterReferenceOutsideUnicodeRange;\n else if (isSurrogate(code)) return ERR.surrogateCharacterReference;\n else if (isUndefinedCodePoint(code)) return ERR.noncharacterCharacterReference;\n else if (isControlCodePoint(code) || code === CODE_POINTS.CARRIAGE_RETURN) return ERR.controlCharacterReference;\n return null;\n}\nvar Tokenizer = class {\n constructor(options, handler) {\n this.options = options;\n this.handler = handler;\n this.paused = false;\n /** Ensures that the parsing loop isn't run multiple times at once. */\n this.inLoop = false;\n /**\n * Indicates that the current adjusted node exists, is not an element in the HTML namespace,\n * and that it is not an integration point for either MathML or HTML.\n *\n * @see {@link https://html.spec.whatwg.org/multipage/parsing.html#tree-construction}\n */\n this.inForeignNode = false;\n this.lastStartTagName = \"\";\n this.active = false;\n this.state = State.DATA;\n this.returnState = State.DATA;\n this.entityStartPos = 0;\n this.consumedAfterSnapshot = -1;\n this.currentCharacterToken = null;\n this.currentToken = null;\n this.currentAttr = {\n name: \"\",\n value: \"\"\n };\n this.preprocessor = new Preprocessor(handler);\n this.currentLocation = this.getCurrentLocation(-1);\n this.entityDecoder = new EntityDecoder(htmlDecodeTree, (cp, consumed) => {\n this.preprocessor.pos = this.entityStartPos + consumed - 1;\n this._flushCodePointConsumedAsCharacterReference(cp);\n }, handler.onParseError ? {\n missingSemicolonAfterCharacterReference: () => {\n this._err(ERR.missingSemicolonAfterCharacterReference, 1);\n },\n absenceOfDigitsInNumericCharacterReference: (consumed) => {\n this._err(ERR.absenceOfDigitsInNumericCharacterReference, this.entityStartPos - this.preprocessor.pos + consumed);\n },\n validateNumericCharacterReference: (code) => {\n const error = getErrorForNumericCharacterReference(code);\n if (error) this._err(error, 1);\n }\n } : void 0);\n }\n _err(code, cpOffset = 0) {\n var _a, _b;\n (_b = (_a = this.handler).onParseError) === null || _b === void 0 || _b.call(_a, this.preprocessor.getError(code, cpOffset));\n }\n getCurrentLocation(offset) {\n if (!this.options.sourceCodeLocationInfo) return null;\n return {\n startLine: this.preprocessor.line,\n startCol: this.preprocessor.col - offset,\n startOffset: this.preprocessor.offset - offset,\n endLine: -1,\n endCol: -1,\n endOffset: -1\n };\n }\n _runParsingLoop() {\n if (this.inLoop) return;\n this.inLoop = true;\n while (this.active && !this.paused) {\n this.consumedAfterSnapshot = 0;\n const cp = this._consume();\n if (!this._ensureHibernation()) this._callState(cp);\n }\n this.inLoop = false;\n }\n pause() {\n this.paused = true;\n }\n resume(writeCallback) {\n if (!this.paused) throw new Error(\"Parser was already resumed\");\n this.paused = false;\n if (this.inLoop) return;\n this._runParsingLoop();\n if (!this.paused) writeCallback === null || writeCallback === void 0 || writeCallback();\n }\n write(chunk, isLastChunk, writeCallback) {\n this.active = true;\n this.preprocessor.write(chunk, isLastChunk);\n this._runParsingLoop();\n if (!this.paused) writeCallback === null || writeCallback === void 0 || writeCallback();\n }\n insertHtmlAtCurrentPos(chunk) {\n this.active = true;\n this.preprocessor.insertHtmlAtCurrentPos(chunk);\n this._runParsingLoop();\n }\n _ensureHibernation() {\n if (this.preprocessor.endOfChunkHit) {\n this.preprocessor.retreat(this.consumedAfterSnapshot);\n this.consumedAfterSnapshot = 0;\n this.active = false;\n return true;\n }\n return false;\n }\n _consume() {\n this.consumedAfterSnapshot++;\n return this.preprocessor.advance();\n }\n _advanceBy(count) {\n this.consumedAfterSnapshot += count;\n for (let i = 0; i < count; i++) this.preprocessor.advance();\n }\n _consumeSequenceIfMatch(pattern, caseSensitive) {\n if (this.preprocessor.startsWith(pattern, caseSensitive)) {\n this._advanceBy(pattern.length - 1);\n return true;\n }\n return false;\n }\n _createStartTagToken() {\n this.currentToken = {\n type: TokenType.START_TAG,\n tagName: \"\",\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(1)\n };\n }\n _createEndTagToken() {\n this.currentToken = {\n type: TokenType.END_TAG,\n tagName: \"\",\n tagID: TAG_ID.UNKNOWN,\n selfClosing: false,\n ackSelfClosing: false,\n attrs: [],\n location: this.getCurrentLocation(2)\n };\n }\n _createCommentToken(offset) {\n this.currentToken = {\n type: TokenType.COMMENT,\n data: \"\",\n location: this.getCurrentLocation(offset)\n };\n }\n _createDoctypeToken(initialName) {\n this.currentToken = {\n type: TokenType.DOCTYPE,\n name: initialName,\n forceQuirks: false,\n publicId: null,\n systemId: null,\n location: this.currentLocation\n };\n }\n _createCharacterToken(type, chars) {\n this.currentCharacterToken = {\n type,\n chars,\n location: this.currentLocation\n };\n }\n _createAttr(attrNameFirstCh) {\n this.currentAttr = {\n name: attrNameFirstCh,\n value: \"\"\n };\n this.currentLocation = this.getCurrentLocation(0);\n }\n _leaveAttrName() {\n var _a;\n var _b;\n const token = this.currentToken;\n if (getTokenAttr(token, this.currentAttr.name) === null) {\n token.attrs.push(this.currentAttr);\n if (token.location && this.currentLocation) {\n const attrLocations = (_a = (_b = token.location).attrs) !== null && _a !== void 0 ? _a : _b.attrs = Object.create(null);\n attrLocations[this.currentAttr.name] = this.currentLocation;\n this._leaveAttrValue();\n }\n } else this._err(ERR.duplicateAttribute);\n }\n _leaveAttrValue() {\n if (this.currentLocation) {\n this.currentLocation.endLine = this.preprocessor.line;\n this.currentLocation.endCol = this.preprocessor.col;\n this.currentLocation.endOffset = this.preprocessor.offset;\n }\n }\n prepareToken(ct) {\n this._emitCurrentCharacterToken(ct.location);\n this.currentToken = null;\n if (ct.location) {\n ct.location.endLine = this.preprocessor.line;\n ct.location.endCol = this.preprocessor.col + 1;\n ct.location.endOffset = this.preprocessor.offset + 1;\n }\n this.currentLocation = this.getCurrentLocation(-1);\n }\n emitCurrentTagToken() {\n const ct = this.currentToken;\n this.prepareToken(ct);\n ct.tagID = getTagID(ct.tagName);\n if (ct.type === TokenType.START_TAG) {\n this.lastStartTagName = ct.tagName;\n this.handler.onStartTag(ct);\n } else {\n if (ct.attrs.length > 0) this._err(ERR.endTagWithAttributes);\n if (ct.selfClosing) this._err(ERR.endTagWithTrailingSolidus);\n this.handler.onEndTag(ct);\n }\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentComment(ct) {\n this.prepareToken(ct);\n this.handler.onComment(ct);\n this.preprocessor.dropParsedChunk();\n }\n emitCurrentDoctype(ct) {\n this.prepareToken(ct);\n this.handler.onDoctype(ct);\n this.preprocessor.dropParsedChunk();\n }\n _emitCurrentCharacterToken(nextLocation) {\n if (this.currentCharacterToken) {\n if (nextLocation && this.currentCharacterToken.location) {\n this.currentCharacterToken.location.endLine = nextLocation.startLine;\n this.currentCharacterToken.location.endCol = nextLocation.startCol;\n this.currentCharacterToken.location.endOffset = nextLocation.startOffset;\n }\n switch (this.currentCharacterToken.type) {\n case TokenType.CHARACTER:\n this.handler.onCharacter(this.currentCharacterToken);\n break;\n case TokenType.NULL_CHARACTER:\n this.handler.onNullCharacter(this.currentCharacterToken);\n break;\n case TokenType.WHITESPACE_CHARACTER:\n this.handler.onWhitespaceCharacter(this.currentCharacterToken);\n break;\n }\n this.currentCharacterToken = null;\n }\n }\n _emitEOFToken() {\n const location$1 = this.getCurrentLocation(0);\n if (location$1) {\n location$1.endLine = location$1.startLine;\n location$1.endCol = location$1.startCol;\n location$1.endOffset = location$1.startOffset;\n }\n this._emitCurrentCharacterToken(location$1);\n this.handler.onEof({\n type: TokenType.EOF,\n location: location$1\n });\n this.active = false;\n }\n _appendCharToCurrentCharacterToken(type, ch) {\n if (this.currentCharacterToken) if (this.currentCharacterToken.type === type) {\n this.currentCharacterToken.chars += ch;\n return;\n } else {\n this.currentLocation = this.getCurrentLocation(0);\n this._emitCurrentCharacterToken(this.currentLocation);\n this.preprocessor.dropParsedChunk();\n }\n this._createCharacterToken(type, ch);\n }\n _emitCodePoint(cp) {\n const type = isWhitespace(cp) ? TokenType.WHITESPACE_CHARACTER : cp === CODE_POINTS.NULL ? TokenType.NULL_CHARACTER : TokenType.CHARACTER;\n this._appendCharToCurrentCharacterToken(type, cp < 65536 ? String.fromCharCode(cp) : String.fromCodePoint(cp));\n }\n _emitChars(ch) {\n this._appendCharToCurrentCharacterToken(TokenType.CHARACTER, ch);\n }\n _startCharacterReference() {\n this.returnState = this.state;\n this.state = State.CHARACTER_REFERENCE;\n this.entityStartPos = this.preprocessor.pos;\n this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute() ? DecodingMode.Attribute : DecodingMode.Legacy);\n }\n _isCharacterReferenceInAttribute() {\n return this.returnState === State.ATTRIBUTE_VALUE_DOUBLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_SINGLE_QUOTED || this.returnState === State.ATTRIBUTE_VALUE_UNQUOTED;\n }\n _flushCodePointConsumedAsCharacterReference(cp) {\n if (this._isCharacterReferenceInAttribute()) this.currentAttr.value += String.fromCodePoint(cp);\n else this._emitCodePoint(cp);\n }\n _callState(cp) {\n switch (this.state) {\n case State.DATA:\n this._stateData(cp);\n break;\n case State.RCDATA:\n this._stateRcdata(cp);\n break;\n case State.RAWTEXT:\n this._stateRawtext(cp);\n break;\n case State.SCRIPT_DATA:\n this._stateScriptData(cp);\n break;\n case State.PLAINTEXT:\n this._statePlaintext(cp);\n break;\n case State.TAG_OPEN:\n this._stateTagOpen(cp);\n break;\n case State.END_TAG_OPEN:\n this._stateEndTagOpen(cp);\n break;\n case State.TAG_NAME:\n this._stateTagName(cp);\n break;\n case State.RCDATA_LESS_THAN_SIGN:\n this._stateRcdataLessThanSign(cp);\n break;\n case State.RCDATA_END_TAG_OPEN:\n this._stateRcdataEndTagOpen(cp);\n break;\n case State.RCDATA_END_TAG_NAME:\n this._stateRcdataEndTagName(cp);\n break;\n case State.RAWTEXT_LESS_THAN_SIGN:\n this._stateRawtextLessThanSign(cp);\n break;\n case State.RAWTEXT_END_TAG_OPEN:\n this._stateRawtextEndTagOpen(cp);\n break;\n case State.RAWTEXT_END_TAG_NAME:\n this._stateRawtextEndTagName(cp);\n break;\n case State.SCRIPT_DATA_LESS_THAN_SIGN:\n this._stateScriptDataLessThanSign(cp);\n break;\n case State.SCRIPT_DATA_END_TAG_OPEN:\n this._stateScriptDataEndTagOpen(cp);\n break;\n case State.SCRIPT_DATA_END_TAG_NAME:\n this._stateScriptDataEndTagName(cp);\n break;\n case State.SCRIPT_DATA_ESCAPE_START:\n this._stateScriptDataEscapeStart(cp);\n break;\n case State.SCRIPT_DATA_ESCAPE_START_DASH:\n this._stateScriptDataEscapeStartDash(cp);\n break;\n case State.SCRIPT_DATA_ESCAPED:\n this._stateScriptDataEscaped(cp);\n break;\n case State.SCRIPT_DATA_ESCAPED_DASH:\n this._stateScriptDataEscapedDash(cp);\n break;\n case State.SCRIPT_DATA_ESCAPED_DASH_DASH:\n this._stateScriptDataEscapedDashDash(cp);\n break;\n case State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:\n this._stateScriptDataEscapedLessThanSign(cp);\n break;\n case State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:\n this._stateScriptDataEscapedEndTagOpen(cp);\n break;\n case State.SCRIPT_DATA_ESCAPED_END_TAG_NAME:\n this._stateScriptDataEscapedEndTagName(cp);\n break;\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_START:\n this._stateScriptDataDoubleEscapeStart(cp);\n break;\n case State.SCRIPT_DATA_DOUBLE_ESCAPED:\n this._stateScriptDataDoubleEscaped(cp);\n break;\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:\n this._stateScriptDataDoubleEscapedDash(cp);\n break;\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:\n this._stateScriptDataDoubleEscapedDashDash(cp);\n break;\n case State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:\n this._stateScriptDataDoubleEscapedLessThanSign(cp);\n break;\n case State.SCRIPT_DATA_DOUBLE_ESCAPE_END:\n this._stateScriptDataDoubleEscapeEnd(cp);\n break;\n case State.BEFORE_ATTRIBUTE_NAME:\n this._stateBeforeAttributeName(cp);\n break;\n case State.ATTRIBUTE_NAME:\n this._stateAttributeName(cp);\n break;\n case State.AFTER_ATTRIBUTE_NAME:\n this._stateAfterAttributeName(cp);\n break;\n case State.BEFORE_ATTRIBUTE_VALUE:\n this._stateBeforeAttributeValue(cp);\n break;\n case State.ATTRIBUTE_VALUE_DOUBLE_QUOTED:\n this._stateAttributeValueDoubleQuoted(cp);\n break;\n case State.ATTRIBUTE_VALUE_SINGLE_QUOTED:\n this._stateAttributeValueSingleQuoted(cp);\n break;\n case State.ATTRIBUTE_VALUE_UNQUOTED:\n this._stateAttributeValueUnquoted(cp);\n break;\n case State.AFTER_ATTRIBUTE_VALUE_QUOTED:\n this._stateAfterAttributeValueQuoted(cp);\n break;\n case State.SELF_CLOSING_START_TAG:\n this._stateSelfClosingStartTag(cp);\n break;\n case State.BOGUS_COMMENT:\n this._stateBogusComment(cp);\n break;\n case State.MARKUP_DECLARATION_OPEN:\n this._stateMarkupDeclarationOpen(cp);\n break;\n case State.COMMENT_START:\n this._stateCommentStart(cp);\n break;\n case State.COMMENT_START_DASH:\n this._stateCommentStartDash(cp);\n break;\n case State.COMMENT:\n this._stateComment(cp);\n break;\n case State.COMMENT_LESS_THAN_SIGN:\n this._stateCommentLessThanSign(cp);\n break;\n case State.COMMENT_LESS_THAN_SIGN_BANG:\n this._stateCommentLessThanSignBang(cp);\n break;\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH:\n this._stateCommentLessThanSignBangDash(cp);\n break;\n case State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:\n this._stateCommentLessThanSignBangDashDash(cp);\n break;\n case State.COMMENT_END_DASH:\n this._stateCommentEndDash(cp);\n break;\n case State.COMMENT_END:\n this._stateCommentEnd(cp);\n break;\n case State.COMMENT_END_BANG:\n this._stateCommentEndBang(cp);\n break;\n case State.DOCTYPE:\n this._stateDoctype(cp);\n break;\n case State.BEFORE_DOCTYPE_NAME:\n this._stateBeforeDoctypeName(cp);\n break;\n case State.DOCTYPE_NAME:\n this._stateDoctypeName(cp);\n break;\n case State.AFTER_DOCTYPE_NAME:\n this._stateAfterDoctypeName(cp);\n break;\n case State.AFTER_DOCTYPE_PUBLIC_KEYWORD:\n this._stateAfterDoctypePublicKeyword(cp);\n break;\n case State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:\n this._stateBeforeDoctypePublicIdentifier(cp);\n break;\n case State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:\n this._stateDoctypePublicIdentifierDoubleQuoted(cp);\n break;\n case State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:\n this._stateDoctypePublicIdentifierSingleQuoted(cp);\n break;\n case State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:\n this._stateAfterDoctypePublicIdentifier(cp);\n break;\n case State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:\n this._stateBetweenDoctypePublicAndSystemIdentifiers(cp);\n break;\n case State.AFTER_DOCTYPE_SYSTEM_KEYWORD:\n this._stateAfterDoctypeSystemKeyword(cp);\n break;\n case State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:\n this._stateBeforeDoctypeSystemIdentifier(cp);\n break;\n case State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:\n this._stateDoctypeSystemIdentifierDoubleQuoted(cp);\n break;\n case State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:\n this._stateDoctypeSystemIdentifierSingleQuoted(cp);\n break;\n case State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:\n this._stateAfterDoctypeSystemIdentifier(cp);\n break;\n case State.BOGUS_DOCTYPE:\n this._stateBogusDoctype(cp);\n break;\n case State.CDATA_SECTION:\n this._stateCdataSection(cp);\n break;\n case State.CDATA_SECTION_BRACKET:\n this._stateCdataSectionBracket(cp);\n break;\n case State.CDATA_SECTION_END:\n this._stateCdataSectionEnd(cp);\n break;\n case State.CHARACTER_REFERENCE:\n this._stateCharacterReference();\n break;\n case State.AMBIGUOUS_AMPERSAND:\n this._stateAmbiguousAmpersand(cp);\n break;\n default: throw new Error(\"Unknown state\");\n }\n }\n _stateData(cp) {\n switch (cp) {\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.TAG_OPEN;\n break;\n case CODE_POINTS.AMPERSAND:\n this._startCharacterReference();\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitCodePoint(cp);\n break;\n case CODE_POINTS.EOF:\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateRcdata(cp) {\n switch (cp) {\n case CODE_POINTS.AMPERSAND:\n this._startCharacterReference();\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.RCDATA_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateRawtext(cp) {\n switch (cp) {\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.RAWTEXT_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateScriptData(cp) {\n switch (cp) {\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _statePlaintext(cp) {\n switch (cp) {\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createStartTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n } else switch (cp) {\n case CODE_POINTS.EXCLAMATION_MARK:\n this.state = State.MARKUP_DECLARATION_OPEN;\n break;\n case CODE_POINTS.SOLIDUS:\n this.state = State.END_TAG_OPEN;\n break;\n case CODE_POINTS.QUESTION_MARK:\n this._err(ERR.unexpectedQuestionMarkInsteadOfTagName);\n this._createCommentToken(1);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofBeforeTagName);\n this._emitChars(\"<\");\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._emitChars(\"<\");\n this.state = State.DATA;\n this._stateData(cp);\n }\n }\n _stateEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this._createEndTagToken();\n this.state = State.TAG_NAME;\n this._stateTagName(cp);\n } else switch (cp) {\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.missingEndTagName);\n this.state = State.DATA;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofBeforeTagName);\n this._emitChars(\"</\");\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.invalidFirstCharacterOfTagName);\n this._createCommentToken(2);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n }\n }\n _stateTagName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n case CODE_POINTS.SOLIDUS:\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.tagName += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default: token.tagName += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n _stateRcdataLessThanSign(cp) {\n if (cp === CODE_POINTS.SOLIDUS) this.state = State.RCDATA_END_TAG_OPEN;\n else {\n this._emitChars(\"<\");\n this.state = State.RCDATA;\n this._stateRcdata(cp);\n }\n }\n _stateRcdataEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.RCDATA_END_TAG_NAME;\n this._stateRcdataEndTagName(cp);\n } else {\n this._emitChars(\"</\");\n this.state = State.RCDATA;\n this._stateRcdata(cp);\n }\n }\n handleSpecialEndTag(_cp) {\n if (!this.preprocessor.startsWith(this.lastStartTagName, false)) return !this._ensureHibernation();\n this._createEndTagToken();\n const token = this.currentToken;\n token.tagName = this.lastStartTagName;\n switch (this.preprocessor.peek(this.lastStartTagName.length)) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this._advanceBy(this.lastStartTagName.length);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n return false;\n case CODE_POINTS.SOLIDUS:\n this._advanceBy(this.lastStartTagName.length);\n this.state = State.SELF_CLOSING_START_TAG;\n return false;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._advanceBy(this.lastStartTagName.length);\n this.emitCurrentTagToken();\n this.state = State.DATA;\n return false;\n default: return !this._ensureHibernation();\n }\n }\n _stateRcdataEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars(\"</\");\n this.state = State.RCDATA;\n this._stateRcdata(cp);\n }\n }\n _stateRawtextLessThanSign(cp) {\n if (cp === CODE_POINTS.SOLIDUS) this.state = State.RAWTEXT_END_TAG_OPEN;\n else {\n this._emitChars(\"<\");\n this.state = State.RAWTEXT;\n this._stateRawtext(cp);\n }\n }\n _stateRawtextEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.RAWTEXT_END_TAG_NAME;\n this._stateRawtextEndTagName(cp);\n } else {\n this._emitChars(\"</\");\n this.state = State.RAWTEXT;\n this._stateRawtext(cp);\n }\n }\n _stateRawtextEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars(\"</\");\n this.state = State.RAWTEXT;\n this._stateRawtext(cp);\n }\n }\n _stateScriptDataLessThanSign(cp) {\n switch (cp) {\n case CODE_POINTS.SOLIDUS:\n this.state = State.SCRIPT_DATA_END_TAG_OPEN;\n break;\n case CODE_POINTS.EXCLAMATION_MARK:\n this.state = State.SCRIPT_DATA_ESCAPE_START;\n this._emitChars(\"<!\");\n break;\n default:\n this._emitChars(\"<\");\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n _stateScriptDataEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.SCRIPT_DATA_END_TAG_NAME;\n this._stateScriptDataEndTagName(cp);\n } else {\n this._emitChars(\"</\");\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n _stateScriptDataEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars(\"</\");\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n _stateScriptDataEscapeStart(cp) {\n if (cp === CODE_POINTS.HYPHEN_MINUS) {\n this.state = State.SCRIPT_DATA_ESCAPE_START_DASH;\n this._emitChars(\"-\");\n } else {\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n _stateScriptDataEscapeStartDash(cp) {\n if (cp === CODE_POINTS.HYPHEN_MINUS) {\n this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;\n this._emitChars(\"-\");\n } else {\n this.state = State.SCRIPT_DATA;\n this._stateScriptData(cp);\n }\n }\n _stateScriptDataEscaped(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.SCRIPT_DATA_ESCAPED_DASH;\n this._emitChars(\"-\");\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateScriptDataEscapedDash(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.SCRIPT_DATA_ESCAPED_DASH_DASH;\n this._emitChars(\"-\");\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n default:\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n _stateScriptDataEscapedDashDash(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this._emitChars(\"-\");\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.SCRIPT_DATA;\n this._emitChars(\">\");\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n default:\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n _stateScriptDataEscapedLessThanSign(cp) {\n if (cp === CODE_POINTS.SOLIDUS) this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_OPEN;\n else if (isAsciiLetter(cp)) {\n this._emitChars(\"<\");\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_START;\n this._stateScriptDataDoubleEscapeStart(cp);\n } else {\n this._emitChars(\"<\");\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n _stateScriptDataEscapedEndTagOpen(cp) {\n if (isAsciiLetter(cp)) {\n this.state = State.SCRIPT_DATA_ESCAPED_END_TAG_NAME;\n this._stateScriptDataEscapedEndTagName(cp);\n } else {\n this._emitChars(\"</\");\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n _stateScriptDataEscapedEndTagName(cp) {\n if (this.handleSpecialEndTag(cp)) {\n this._emitChars(\"</\");\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n _stateScriptDataDoubleEscapeStart(cp) {\n if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {\n this._emitCodePoint(cp);\n for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) this._emitCodePoint(this._consume());\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n } else if (!this._ensureHibernation()) {\n this.state = State.SCRIPT_DATA_ESCAPED;\n this._stateScriptDataEscaped(cp);\n }\n }\n _stateScriptDataDoubleEscaped(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH;\n this._emitChars(\"-\");\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n this._emitChars(\"<\");\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateScriptDataDoubleEscapedDash(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH;\n this._emitChars(\"-\");\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n this._emitChars(\"<\");\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n default:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n _stateScriptDataDoubleEscapedDashDash(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this._emitChars(\"-\");\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN;\n this._emitChars(\"<\");\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.SCRIPT_DATA;\n this._emitChars(\">\");\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitChars(REPLACEMENT_CHARACTER);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInScriptHtmlCommentLikeText);\n this._emitEOFToken();\n break;\n default:\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._emitCodePoint(cp);\n }\n }\n _stateScriptDataDoubleEscapedLessThanSign(cp) {\n if (cp === CODE_POINTS.SOLIDUS) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPE_END;\n this._emitChars(\"/\");\n } else {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n _stateScriptDataDoubleEscapeEnd(cp) {\n if (this.preprocessor.startsWith(SEQUENCES.SCRIPT, false) && isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))) {\n this._emitCodePoint(cp);\n for (let i = 0; i < SEQUENCES.SCRIPT.length; i++) this._emitCodePoint(this._consume());\n this.state = State.SCRIPT_DATA_ESCAPED;\n } else if (!this._ensureHibernation()) {\n this.state = State.SCRIPT_DATA_DOUBLE_ESCAPED;\n this._stateScriptDataDoubleEscaped(cp);\n }\n }\n _stateBeforeAttributeName(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.SOLIDUS:\n case CODE_POINTS.GREATER_THAN_SIGN:\n case CODE_POINTS.EOF:\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n case CODE_POINTS.EQUALS_SIGN:\n this._err(ERR.unexpectedEqualsSignBeforeAttributeName);\n this._createAttr(\"=\");\n this.state = State.ATTRIBUTE_NAME;\n break;\n default:\n this._createAttr(\"\");\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n _stateAttributeName(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n case CODE_POINTS.SOLIDUS:\n case CODE_POINTS.GREATER_THAN_SIGN:\n case CODE_POINTS.EOF:\n this._leaveAttrName();\n this.state = State.AFTER_ATTRIBUTE_NAME;\n this._stateAfterAttributeName(cp);\n break;\n case CODE_POINTS.EQUALS_SIGN:\n this._leaveAttrName();\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n case CODE_POINTS.QUOTATION_MARK:\n case CODE_POINTS.APOSTROPHE:\n case CODE_POINTS.LESS_THAN_SIGN:\n this._err(ERR.unexpectedCharacterInAttributeName);\n this.currentAttr.name += String.fromCodePoint(cp);\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.name += REPLACEMENT_CHARACTER;\n break;\n default: this.currentAttr.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n _stateAfterAttributeName(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.SOLIDUS:\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n case CODE_POINTS.EQUALS_SIGN:\n this.state = State.BEFORE_ATTRIBUTE_VALUE;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default:\n this._createAttr(\"\");\n this.state = State.ATTRIBUTE_NAME;\n this._stateAttributeName(cp);\n }\n }\n _stateBeforeAttributeValue(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.QUOTATION_MARK:\n this.state = State.ATTRIBUTE_VALUE_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n this.state = State.ATTRIBUTE_VALUE_SINGLE_QUOTED;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.missingAttributeValue);\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n default:\n this.state = State.ATTRIBUTE_VALUE_UNQUOTED;\n this._stateAttributeValueUnquoted(cp);\n }\n }\n _stateAttributeValueDoubleQuoted(cp) {\n switch (cp) {\n case CODE_POINTS.QUOTATION_MARK:\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n case CODE_POINTS.AMPERSAND:\n this._startCharacterReference();\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default: this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n _stateAttributeValueSingleQuoted(cp) {\n switch (cp) {\n case CODE_POINTS.APOSTROPHE:\n this.state = State.AFTER_ATTRIBUTE_VALUE_QUOTED;\n break;\n case CODE_POINTS.AMPERSAND:\n this._startCharacterReference();\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default: this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n _stateAttributeValueUnquoted(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n case CODE_POINTS.AMPERSAND:\n this._startCharacterReference();\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this.currentAttr.value += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.QUOTATION_MARK:\n case CODE_POINTS.APOSTROPHE:\n case CODE_POINTS.LESS_THAN_SIGN:\n case CODE_POINTS.EQUALS_SIGN:\n case CODE_POINTS.GRAVE_ACCENT:\n this._err(ERR.unexpectedCharacterInUnquotedAttributeValue);\n this.currentAttr.value += String.fromCodePoint(cp);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default: this.currentAttr.value += String.fromCodePoint(cp);\n }\n }\n _stateAfterAttributeValueQuoted(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this._leaveAttrValue();\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n break;\n case CODE_POINTS.SOLIDUS:\n this._leaveAttrValue();\n this.state = State.SELF_CLOSING_START_TAG;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._leaveAttrValue();\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingWhitespaceBetweenAttributes);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n _stateSelfClosingStartTag(cp) {\n switch (cp) {\n case CODE_POINTS.GREATER_THAN_SIGN: {\n const token = this.currentToken;\n token.selfClosing = true;\n this.state = State.DATA;\n this.emitCurrentTagToken();\n break;\n }\n case CODE_POINTS.EOF:\n this._err(ERR.eofInTag);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.unexpectedSolidusInTag);\n this.state = State.BEFORE_ATTRIBUTE_NAME;\n this._stateBeforeAttributeName(cp);\n }\n }\n _stateBogusComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n case CODE_POINTS.EOF:\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n default: token.data += String.fromCodePoint(cp);\n }\n }\n _stateMarkupDeclarationOpen(cp) {\n if (this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH, true)) {\n this._createCommentToken(SEQUENCES.DASH_DASH.length + 1);\n this.state = State.COMMENT_START;\n } else if (this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE, false)) {\n this.currentLocation = this.getCurrentLocation(SEQUENCES.DOCTYPE.length + 1);\n this.state = State.DOCTYPE;\n } else if (this._consumeSequenceIfMatch(SEQUENCES.CDATA_START, true)) if (this.inForeignNode) this.state = State.CDATA_SECTION;\n else {\n this._err(ERR.cdataInHtmlContent);\n this._createCommentToken(SEQUENCES.CDATA_START.length + 1);\n this.currentToken.data = \"[CDATA[\";\n this.state = State.BOGUS_COMMENT;\n }\n else if (!this._ensureHibernation()) {\n this._err(ERR.incorrectlyOpenedComment);\n this._createCommentToken(2);\n this.state = State.BOGUS_COMMENT;\n this._stateBogusComment(cp);\n }\n }\n _stateCommentStart(cp) {\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.COMMENT_START_DASH;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN: {\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n const token = this.currentToken;\n this.emitCurrentComment(token);\n break;\n }\n default:\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateCommentStartDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.COMMENT_END;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.abruptClosingOfEmptyComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n default:\n token.data += \"-\";\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateComment(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.COMMENT_END_DASH;\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n token.data += \"<\";\n this.state = State.COMMENT_LESS_THAN_SIGN;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.data += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n default: token.data += String.fromCodePoint(cp);\n }\n }\n _stateCommentLessThanSign(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.EXCLAMATION_MARK:\n token.data += \"!\";\n this.state = State.COMMENT_LESS_THAN_SIGN_BANG;\n break;\n case CODE_POINTS.LESS_THAN_SIGN:\n token.data += \"<\";\n break;\n default:\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateCommentLessThanSignBang(cp) {\n if (cp === CODE_POINTS.HYPHEN_MINUS) this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH;\n else {\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateCommentLessThanSignBangDash(cp) {\n if (cp === CODE_POINTS.HYPHEN_MINUS) this.state = State.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH;\n else {\n this.state = State.COMMENT_END_DASH;\n this._stateCommentEndDash(cp);\n }\n }\n _stateCommentLessThanSignBangDashDash(cp) {\n if (cp !== CODE_POINTS.GREATER_THAN_SIGN && cp !== CODE_POINTS.EOF) this._err(ERR.nestedComment);\n this.state = State.COMMENT_END;\n this._stateCommentEnd(cp);\n }\n _stateCommentEndDash(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n this.state = State.COMMENT_END;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n default:\n token.data += \"-\";\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateCommentEnd(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n case CODE_POINTS.EXCLAMATION_MARK:\n this.state = State.COMMENT_END_BANG;\n break;\n case CODE_POINTS.HYPHEN_MINUS:\n token.data += \"-\";\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n default:\n token.data += \"--\";\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateCommentEndBang(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.HYPHEN_MINUS:\n token.data += \"--!\";\n this.state = State.COMMENT_END_DASH;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.incorrectlyClosedComment);\n this.state = State.DATA;\n this.emitCurrentComment(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInComment);\n this.emitCurrentComment(token);\n this._emitEOFToken();\n break;\n default:\n token.data += \"--!\";\n this.state = State.COMMENT;\n this._stateComment(cp);\n }\n }\n _stateDoctype(cp) {\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this.state = State.BEFORE_DOCTYPE_NAME;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n break;\n case CODE_POINTS.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default:\n this._err(ERR.missingWhitespaceBeforeDoctypeName);\n this.state = State.BEFORE_DOCTYPE_NAME;\n this._stateBeforeDoctypeName(cp);\n }\n }\n _stateBeforeDoctypeName(cp) {\n if (isAsciiUpper(cp)) {\n this._createDoctypeToken(String.fromCharCode(toAsciiLower(cp)));\n this.state = State.DOCTYPE_NAME;\n } else switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n this._createDoctypeToken(REPLACEMENT_CHARACTER);\n this.state = State.DOCTYPE_NAME;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN: {\n this._err(ERR.missingDoctypeName);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n }\n case CODE_POINTS.EOF: {\n this._err(ERR.eofInDoctype);\n this._createDoctypeToken(null);\n const token = this.currentToken;\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n }\n default:\n this._createDoctypeToken(String.fromCodePoint(cp));\n this.state = State.DOCTYPE_NAME;\n }\n }\n _stateDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this.state = State.AFTER_DOCTYPE_NAME;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.name += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default: token.name += String.fromCodePoint(isAsciiUpper(cp) ? toAsciiLower(cp) : cp);\n }\n }\n _stateAfterDoctypeName(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default: if (this._consumeSequenceIfMatch(SEQUENCES.PUBLIC, false)) this.state = State.AFTER_DOCTYPE_PUBLIC_KEYWORD;\n else if (this._consumeSequenceIfMatch(SEQUENCES.SYSTEM, false)) this.state = State.AFTER_DOCTYPE_SYSTEM_KEYWORD;\n else if (!this._ensureHibernation()) {\n this._err(ERR.invalidCharacterSequenceAfterDoctypeName);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n }\n _stateAfterDoctypePublicKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this.state = State.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n case CODE_POINTS.QUOTATION_MARK:\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = \"\";\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword);\n token.publicId = \"\";\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateBeforeDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.QUOTATION_MARK:\n token.publicId = \"\";\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n token.publicId = \"\";\n this.state = State.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.missingDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateDoctypePublicIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.QUOTATION_MARK:\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default: token.publicId += String.fromCodePoint(cp);\n }\n }\n _stateDoctypePublicIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.APOSTROPHE:\n this.state = State.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.publicId += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.abruptDoctypePublicIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default: token.publicId += String.fromCodePoint(cp);\n }\n }\n _stateAfterDoctypePublicIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this.state = State.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.QUOTATION_MARK:\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers);\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateBetweenDoctypePublicAndSystemIdentifiers(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.QUOTATION_MARK:\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateAfterDoctypeSystemKeyword(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED:\n this.state = State.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n case CODE_POINTS.QUOTATION_MARK:\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword);\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateBeforeDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.QUOTATION_MARK:\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;\n break;\n case CODE_POINTS.APOSTROPHE:\n token.systemId = \"\";\n this.state = State.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.missingDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.DATA;\n this.emitCurrentDoctype(token);\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateDoctypeSystemIdentifierDoubleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.QUOTATION_MARK:\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default: token.systemId += String.fromCodePoint(cp);\n }\n }\n _stateDoctypeSystemIdentifierSingleQuoted(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.APOSTROPHE:\n this.state = State.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n token.systemId += REPLACEMENT_CHARACTER;\n break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this._err(ERR.abruptDoctypeSystemIdentifier);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default: token.systemId += String.fromCodePoint(cp);\n }\n }\n _stateAfterDoctypeSystemIdentifier(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.SPACE:\n case CODE_POINTS.LINE_FEED:\n case CODE_POINTS.TABULATION:\n case CODE_POINTS.FORM_FEED: break;\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInDoctype);\n token.forceQuirks = true;\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier);\n this.state = State.BOGUS_DOCTYPE;\n this._stateBogusDoctype(cp);\n }\n }\n _stateBogusDoctype(cp) {\n const token = this.currentToken;\n switch (cp) {\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.emitCurrentDoctype(token);\n this.state = State.DATA;\n break;\n case CODE_POINTS.NULL:\n this._err(ERR.unexpectedNullCharacter);\n break;\n case CODE_POINTS.EOF:\n this.emitCurrentDoctype(token);\n this._emitEOFToken();\n break;\n default:\n }\n }\n _stateCdataSection(cp) {\n switch (cp) {\n case CODE_POINTS.RIGHT_SQUARE_BRACKET:\n this.state = State.CDATA_SECTION_BRACKET;\n break;\n case CODE_POINTS.EOF:\n this._err(ERR.eofInCdata);\n this._emitEOFToken();\n break;\n default: this._emitCodePoint(cp);\n }\n }\n _stateCdataSectionBracket(cp) {\n if (cp === CODE_POINTS.RIGHT_SQUARE_BRACKET) this.state = State.CDATA_SECTION_END;\n else {\n this._emitChars(\"]\");\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n _stateCdataSectionEnd(cp) {\n switch (cp) {\n case CODE_POINTS.GREATER_THAN_SIGN:\n this.state = State.DATA;\n break;\n case CODE_POINTS.RIGHT_SQUARE_BRACKET:\n this._emitChars(\"]\");\n break;\n default:\n this._emitChars(\"]]\");\n this.state = State.CDATA_SECTION;\n this._stateCdataSection(cp);\n }\n }\n _stateCharacterReference() {\n let length = this.entityDecoder.write(this.preprocessor.html, this.preprocessor.pos);\n if (length < 0) if (this.preprocessor.lastChunkWritten) length = this.entityDecoder.end();\n else {\n this.active = false;\n this.preprocessor.pos = this.preprocessor.html.length - 1;\n this.consumedAfterSnapshot = 0;\n this.preprocessor.endOfChunkHit = true;\n return;\n }\n if (length === 0) {\n this.preprocessor.pos = this.entityStartPos;\n this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND);\n this.state = !this._isCharacterReferenceInAttribute() && isAsciiAlphaNumeric(this.preprocessor.peek(1)) ? State.AMBIGUOUS_AMPERSAND : this.returnState;\n } else this.state = this.returnState;\n }\n _stateAmbiguousAmpersand(cp) {\n if (isAsciiAlphaNumeric(cp)) this._flushCodePointConsumedAsCharacterReference(cp);\n else {\n if (cp === CODE_POINTS.SEMICOLON) this._err(ERR.unknownNamedCharacterReference);\n this.state = this.returnState;\n this._callState(cp);\n }\n }\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/open-element-stack.js\nconst IMPLICIT_END_TAG_REQUIRED = new Set([\n TAG_ID.DD,\n TAG_ID.DT,\n TAG_ID.LI,\n TAG_ID.OPTGROUP,\n TAG_ID.OPTION,\n TAG_ID.P,\n TAG_ID.RB,\n TAG_ID.RP,\n TAG_ID.RT,\n TAG_ID.RTC\n]);\nconst IMPLICIT_END_TAG_REQUIRED_THOROUGHLY = new Set([\n ...IMPLICIT_END_TAG_REQUIRED,\n TAG_ID.CAPTION,\n TAG_ID.COLGROUP,\n TAG_ID.TBODY,\n TAG_ID.TD,\n TAG_ID.TFOOT,\n TAG_ID.TH,\n TAG_ID.THEAD,\n TAG_ID.TR\n]);\nconst SCOPING_ELEMENTS_HTML = new Set([\n TAG_ID.APPLET,\n TAG_ID.CAPTION,\n TAG_ID.HTML,\n TAG_ID.MARQUEE,\n TAG_ID.OBJECT,\n TAG_ID.TABLE,\n TAG_ID.TD,\n TAG_ID.TEMPLATE,\n TAG_ID.TH\n]);\nconst SCOPING_ELEMENTS_HTML_LIST = new Set([\n ...SCOPING_ELEMENTS_HTML,\n TAG_ID.OL,\n TAG_ID.UL\n]);\nconst SCOPING_ELEMENTS_HTML_BUTTON = new Set([...SCOPING_ELEMENTS_HTML, TAG_ID.BUTTON]);\nconst SCOPING_ELEMENTS_MATHML = new Set([\n TAG_ID.ANNOTATION_XML,\n TAG_ID.MI,\n TAG_ID.MN,\n TAG_ID.MO,\n TAG_ID.MS,\n TAG_ID.MTEXT\n]);\nconst SCOPING_ELEMENTS_SVG = new Set([\n TAG_ID.DESC,\n TAG_ID.FOREIGN_OBJECT,\n TAG_ID.TITLE\n]);\nconst TABLE_ROW_CONTEXT = new Set([\n TAG_ID.TR,\n TAG_ID.TEMPLATE,\n TAG_ID.HTML\n]);\nconst TABLE_BODY_CONTEXT = new Set([\n TAG_ID.TBODY,\n TAG_ID.TFOOT,\n TAG_ID.THEAD,\n TAG_ID.TEMPLATE,\n TAG_ID.HTML\n]);\nconst TABLE_CONTEXT = new Set([\n TAG_ID.TABLE,\n TAG_ID.TEMPLATE,\n TAG_ID.HTML\n]);\nconst TABLE_CELLS = new Set([TAG_ID.TD, TAG_ID.TH]);\nvar OpenElementStack = class {\n get currentTmplContentOrNode() {\n return this._isInTemplate() ? this.treeAdapter.getTemplateContent(this.current) : this.current;\n }\n constructor(document, treeAdapter, handler) {\n this.treeAdapter = treeAdapter;\n this.handler = handler;\n this.items = [];\n this.tagIDs = [];\n this.stackTop = -1;\n this.tmplCount = 0;\n this.currentTagId = TAG_ID.UNKNOWN;\n this.current = document;\n }\n _indexOf(element$3) {\n return this.items.lastIndexOf(element$3, this.stackTop);\n }\n _isInTemplate() {\n return this.currentTagId === TAG_ID.TEMPLATE && this.treeAdapter.getNamespaceURI(this.current) === NS.HTML;\n }\n _updateCurrentElement() {\n this.current = this.items[this.stackTop];\n this.currentTagId = this.tagIDs[this.stackTop];\n }\n push(element$3, tagID) {\n this.stackTop++;\n this.items[this.stackTop] = element$3;\n this.current = element$3;\n this.tagIDs[this.stackTop] = tagID;\n this.currentTagId = tagID;\n if (this._isInTemplate()) this.tmplCount++;\n this.handler.onItemPush(element$3, tagID, true);\n }\n pop() {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) this.tmplCount--;\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, true);\n }\n replace(oldElement, newElement) {\n const idx = this._indexOf(oldElement);\n this.items[idx] = newElement;\n if (idx === this.stackTop) this.current = newElement;\n }\n insertAfter(referenceElement, newElement, newElementID) {\n const insertionIdx = this._indexOf(referenceElement) + 1;\n this.items.splice(insertionIdx, 0, newElement);\n this.tagIDs.splice(insertionIdx, 0, newElementID);\n this.stackTop++;\n if (insertionIdx === this.stackTop) this._updateCurrentElement();\n if (this.current && this.currentTagId !== void 0) this.handler.onItemPush(this.current, this.currentTagId, insertionIdx === this.stackTop);\n }\n popUntilTagNamePopped(tagName) {\n let targetIdx = this.stackTop + 1;\n do\n targetIdx = this.tagIDs.lastIndexOf(tagName, targetIdx - 1);\n while (targetIdx > 0 && this.treeAdapter.getNamespaceURI(this.items[targetIdx]) !== NS.HTML);\n this.shortenToLength(Math.max(targetIdx, 0));\n }\n shortenToLength(idx) {\n while (this.stackTop >= idx) {\n const popped = this.current;\n if (this.tmplCount > 0 && this._isInTemplate()) this.tmplCount -= 1;\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(popped, this.stackTop < idx);\n }\n }\n popUntilElementPopped(element$3) {\n const idx = this._indexOf(element$3);\n this.shortenToLength(Math.max(idx, 0));\n }\n popUntilPopped(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(Math.max(idx, 0));\n }\n popUntilNumberedHeaderPopped() {\n this.popUntilPopped(NUMBERED_HEADERS, NS.HTML);\n }\n popUntilTableCellPopped() {\n this.popUntilPopped(TABLE_CELLS, NS.HTML);\n }\n popAllUpToHtmlElement() {\n this.tmplCount = 0;\n this.shortenToLength(1);\n }\n _indexOfTagNames(tagNames, namespace) {\n for (let i = this.stackTop; i >= 0; i--) if (tagNames.has(this.tagIDs[i]) && this.treeAdapter.getNamespaceURI(this.items[i]) === namespace) return i;\n return -1;\n }\n clearBackTo(tagNames, targetNS) {\n const idx = this._indexOfTagNames(tagNames, targetNS);\n this.shortenToLength(idx + 1);\n }\n clearBackToTableContext() {\n this.clearBackTo(TABLE_CONTEXT, NS.HTML);\n }\n clearBackToTableBodyContext() {\n this.clearBackTo(TABLE_BODY_CONTEXT, NS.HTML);\n }\n clearBackToTableRowContext() {\n this.clearBackTo(TABLE_ROW_CONTEXT, NS.HTML);\n }\n remove(element$3) {\n const idx = this._indexOf(element$3);\n if (idx >= 0) if (idx === this.stackTop) this.pop();\n else {\n this.items.splice(idx, 1);\n this.tagIDs.splice(idx, 1);\n this.stackTop--;\n this._updateCurrentElement();\n this.handler.onItemPop(element$3, false);\n }\n }\n tryPeekProperlyNestedBodyElement() {\n return this.stackTop >= 1 && this.tagIDs[1] === TAG_ID.BODY ? this.items[1] : null;\n }\n contains(element$3) {\n return this._indexOf(element$3) > -1;\n }\n getCommonAncestor(element$3) {\n const elementIdx = this._indexOf(element$3) - 1;\n return elementIdx >= 0 ? this.items[elementIdx] : null;\n }\n isRootHtmlElementCurrent() {\n return this.stackTop === 0 && this.tagIDs[0] === TAG_ID.HTML;\n }\n hasInDynamicScope(tagName, htmlScope) {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n switch (this.treeAdapter.getNamespaceURI(this.items[i])) {\n case NS.HTML:\n if (tn === tagName) return true;\n if (htmlScope.has(tn)) return false;\n break;\n case NS.SVG:\n if (SCOPING_ELEMENTS_SVG.has(tn)) return false;\n break;\n case NS.MATHML:\n if (SCOPING_ELEMENTS_MATHML.has(tn)) return false;\n break;\n }\n }\n return true;\n }\n hasInScope(tagName) {\n return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML);\n }\n hasInListItemScope(tagName) {\n return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_LIST);\n }\n hasInButtonScope(tagName) {\n return this.hasInDynamicScope(tagName, SCOPING_ELEMENTS_HTML_BUTTON);\n }\n hasNumberedHeaderInScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n const tn = this.tagIDs[i];\n switch (this.treeAdapter.getNamespaceURI(this.items[i])) {\n case NS.HTML:\n if (NUMBERED_HEADERS.has(tn)) return true;\n if (SCOPING_ELEMENTS_HTML.has(tn)) return false;\n break;\n case NS.SVG:\n if (SCOPING_ELEMENTS_SVG.has(tn)) return false;\n break;\n case NS.MATHML:\n if (SCOPING_ELEMENTS_MATHML.has(tn)) return false;\n break;\n }\n }\n return true;\n }\n hasInTableScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) continue;\n switch (this.tagIDs[i]) {\n case tagName: return true;\n case TAG_ID.TABLE:\n case TAG_ID.HTML: return false;\n }\n }\n return true;\n }\n hasTableBodyContextInTableScope() {\n for (let i = this.stackTop; i >= 0; i--) {\n if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) continue;\n switch (this.tagIDs[i]) {\n case TAG_ID.TBODY:\n case TAG_ID.THEAD:\n case TAG_ID.TFOOT: return true;\n case TAG_ID.TABLE:\n case TAG_ID.HTML: return false;\n }\n }\n return true;\n }\n hasInSelectScope(tagName) {\n for (let i = this.stackTop; i >= 0; i--) {\n if (this.treeAdapter.getNamespaceURI(this.items[i]) !== NS.HTML) continue;\n switch (this.tagIDs[i]) {\n case tagName: return true;\n case TAG_ID.OPTION:\n case TAG_ID.OPTGROUP: break;\n default: return false;\n }\n }\n return true;\n }\n generateImpliedEndTags() {\n while (this.currentTagId !== void 0 && IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId)) this.pop();\n }\n generateImpliedEndTagsThoroughly() {\n while (this.currentTagId !== void 0 && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) this.pop();\n }\n generateImpliedEndTagsWithExclusion(exclusionId) {\n while (this.currentTagId !== void 0 && this.currentTagId !== exclusionId && IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId)) this.pop();\n }\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/formatting-element-list.js\nconst NOAH_ARK_CAPACITY = 3;\nvar EntryType;\n(function(EntryType$1) {\n EntryType$1[EntryType$1[\"Marker\"] = 0] = \"Marker\";\n EntryType$1[EntryType$1[\"Element\"] = 1] = \"Element\";\n})(EntryType || (EntryType = {}));\nconst MARKER = { type: EntryType.Marker };\nvar FormattingElementList = class {\n constructor(treeAdapter) {\n this.treeAdapter = treeAdapter;\n this.entries = [];\n this.bookmark = null;\n }\n _getNoahArkConditionCandidates(newElement, neAttrs) {\n const candidates = [];\n const neAttrsLength = neAttrs.length;\n const neTagName = this.treeAdapter.getTagName(newElement);\n const neNamespaceURI = this.treeAdapter.getNamespaceURI(newElement);\n for (let i = 0; i < this.entries.length; i++) {\n const entry = this.entries[i];\n if (entry.type === EntryType.Marker) break;\n const { element: element$3 } = entry;\n if (this.treeAdapter.getTagName(element$3) === neTagName && this.treeAdapter.getNamespaceURI(element$3) === neNamespaceURI) {\n const elementAttrs = this.treeAdapter.getAttrList(element$3);\n if (elementAttrs.length === neAttrsLength) candidates.push({\n idx: i,\n attrs: elementAttrs\n });\n }\n }\n return candidates;\n }\n _ensureNoahArkCondition(newElement) {\n if (this.entries.length < NOAH_ARK_CAPACITY) return;\n const neAttrs = this.treeAdapter.getAttrList(newElement);\n const candidates = this._getNoahArkConditionCandidates(newElement, neAttrs);\n if (candidates.length < NOAH_ARK_CAPACITY) return;\n const neAttrsMap = new Map(neAttrs.map((neAttr) => [neAttr.name, neAttr.value]));\n let validCandidates = 0;\n for (let i = 0; i < candidates.length; i++) {\n const candidate = candidates[i];\n if (candidate.attrs.every((cAttr) => neAttrsMap.get(cAttr.name) === cAttr.value)) {\n validCandidates += 1;\n if (validCandidates >= NOAH_ARK_CAPACITY) this.entries.splice(candidate.idx, 1);\n }\n }\n }\n insertMarker() {\n this.entries.unshift(MARKER);\n }\n pushElement(element$3, token) {\n this._ensureNoahArkCondition(element$3);\n this.entries.unshift({\n type: EntryType.Element,\n element: element$3,\n token\n });\n }\n insertElementAfterBookmark(element$3, token) {\n const bookmarkIdx = this.entries.indexOf(this.bookmark);\n this.entries.splice(bookmarkIdx, 0, {\n type: EntryType.Element,\n element: element$3,\n token\n });\n }\n removeEntry(entry) {\n const entryIndex = this.entries.indexOf(entry);\n if (entryIndex !== -1) this.entries.splice(entryIndex, 1);\n }\n /**\n * Clears the list of formatting elements up to the last marker.\n *\n * @see https://html.spec.whatwg.org/multipage/parsing.html#clear-the-list-of-active-formatting-elements-up-to-the-last-marker\n */\n clearToLastMarker() {\n const markerIdx = this.entries.indexOf(MARKER);\n if (markerIdx === -1) this.entries.length = 0;\n else this.entries.splice(0, markerIdx + 1);\n }\n getElementEntryInScopeWithTagName(tagName) {\n const entry = this.entries.find((entry$1) => entry$1.type === EntryType.Marker || this.treeAdapter.getTagName(entry$1.element) === tagName);\n return entry && entry.type === EntryType.Element ? entry : null;\n }\n getElementEntry(element$3) {\n return this.entries.find((entry) => entry.type === EntryType.Element && entry.element === element$3);\n }\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/tree-adapters/default.js\nconst defaultTreeAdapter = {\n createDocument() {\n return {\n nodeName: \"#document\",\n mode: DOCUMENT_MODE.NO_QUIRKS,\n childNodes: []\n };\n },\n createDocumentFragment() {\n return {\n nodeName: \"#document-fragment\",\n childNodes: []\n };\n },\n createElement(tagName, namespaceURI, attrs) {\n return {\n nodeName: tagName,\n tagName,\n attrs,\n namespaceURI,\n childNodes: [],\n parentNode: null\n };\n },\n createCommentNode(data) {\n return {\n nodeName: \"#comment\",\n data,\n parentNode: null\n };\n },\n createTextNode(value) {\n return {\n nodeName: \"#text\",\n value,\n parentNode: null\n };\n },\n appendChild(parentNode, newNode) {\n parentNode.childNodes.push(newNode);\n newNode.parentNode = parentNode;\n },\n insertBefore(parentNode, newNode, referenceNode) {\n const insertionIdx = parentNode.childNodes.indexOf(referenceNode);\n parentNode.childNodes.splice(insertionIdx, 0, newNode);\n newNode.parentNode = parentNode;\n },\n setTemplateContent(templateElement, contentElement) {\n templateElement.content = contentElement;\n },\n getTemplateContent(templateElement) {\n return templateElement.content;\n },\n setDocumentType(document, name, publicId, systemId) {\n const doctypeNode = document.childNodes.find((node) => node.nodeName === \"#documentType\");\n if (doctypeNode) {\n doctypeNode.name = name;\n doctypeNode.publicId = publicId;\n doctypeNode.systemId = systemId;\n } else {\n const node = {\n nodeName: \"#documentType\",\n name,\n publicId,\n systemId,\n parentNode: null\n };\n defaultTreeAdapter.appendChild(document, node);\n }\n },\n setDocumentMode(document, mode) {\n document.mode = mode;\n },\n getDocumentMode(document) {\n return document.mode;\n },\n detachNode(node) {\n if (node.parentNode) {\n const idx = node.parentNode.childNodes.indexOf(node);\n node.parentNode.childNodes.splice(idx, 1);\n node.parentNode = null;\n }\n },\n insertText(parentNode, text$2) {\n if (parentNode.childNodes.length > 0) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.length - 1];\n if (defaultTreeAdapter.isTextNode(prevNode)) {\n prevNode.value += text$2;\n return;\n }\n }\n defaultTreeAdapter.appendChild(parentNode, defaultTreeAdapter.createTextNode(text$2));\n },\n insertTextBefore(parentNode, text$2, referenceNode) {\n const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];\n if (prevNode && defaultTreeAdapter.isTextNode(prevNode)) prevNode.value += text$2;\n else defaultTreeAdapter.insertBefore(parentNode, defaultTreeAdapter.createTextNode(text$2), referenceNode);\n },\n adoptAttributes(recipient, attrs) {\n const recipientAttrsMap = new Set(recipient.attrs.map((attr) => attr.name));\n for (let j = 0; j < attrs.length; j++) if (!recipientAttrsMap.has(attrs[j].name)) recipient.attrs.push(attrs[j]);\n },\n getFirstChild(node) {\n return node.childNodes[0];\n },\n getChildNodes(node) {\n return node.childNodes;\n },\n getParentNode(node) {\n return node.parentNode;\n },\n getAttrList(element$3) {\n return element$3.attrs;\n },\n getTagName(element$3) {\n return element$3.tagName;\n },\n getNamespaceURI(element$3) {\n return element$3.namespaceURI;\n },\n getTextNodeContent(textNode) {\n return textNode.value;\n },\n getCommentNodeContent(commentNode) {\n return commentNode.data;\n },\n getDocumentTypeNodeName(doctypeNode) {\n return doctypeNode.name;\n },\n getDocumentTypeNodePublicId(doctypeNode) {\n return doctypeNode.publicId;\n },\n getDocumentTypeNodeSystemId(doctypeNode) {\n return doctypeNode.systemId;\n },\n isTextNode(node) {\n return node.nodeName === \"#text\";\n },\n isCommentNode(node) {\n return node.nodeName === \"#comment\";\n },\n isDocumentTypeNode(node) {\n return node.nodeName === \"#documentType\";\n },\n isElementNode(node) {\n return Object.prototype.hasOwnProperty.call(node, \"tagName\");\n },\n setNodeSourceCodeLocation(node, location$1) {\n node.sourceCodeLocation = location$1;\n },\n getNodeSourceCodeLocation(node) {\n return node.sourceCodeLocation;\n },\n updateNodeSourceCodeLocation(node, endLocation) {\n node.sourceCodeLocation = {\n ...node.sourceCodeLocation,\n ...endLocation\n };\n }\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/doctype.js\nconst VALID_DOCTYPE_NAME = \"html\";\nconst VALID_SYSTEM_ID = \"about:legacy-compat\";\nconst QUIRKS_MODE_SYSTEM_ID = \"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd\";\nconst QUIRKS_MODE_PUBLIC_ID_PREFIXES = [\n \"+//silmaril//dtd html pro v0r11 19970101//\",\n \"-//as//dtd html 3.0 aswedit + extensions//\",\n \"-//advasoft ltd//dtd html 3.0 aswedit + extensions//\",\n \"-//ietf//dtd html 2.0 level 1//\",\n \"-//ietf//dtd html 2.0 level 2//\",\n \"-//ietf//dtd html 2.0 strict level 1//\",\n \"-//ietf//dtd html 2.0 strict level 2//\",\n \"-//ietf//dtd html 2.0 strict//\",\n \"-//ietf//dtd html 2.0//\",\n \"-//ietf//dtd html 2.1e//\",\n \"-//ietf//dtd html 3.0//\",\n \"-//ietf//dtd html 3.2 final//\",\n \"-//ietf//dtd html 3.2//\",\n \"-//ietf//dtd html 3//\",\n \"-//ietf//dtd html level 0//\",\n \"-//ietf//dtd html level 1//\",\n \"-//ietf//dtd html level 2//\",\n \"-//ietf//dtd html level 3//\",\n \"-//ietf//dtd html strict level 0//\",\n \"-//ietf//dtd html strict level 1//\",\n \"-//ietf//dtd html strict level 2//\",\n \"-//ietf//dtd html strict level 3//\",\n \"-//ietf//dtd html strict//\",\n \"-//ietf//dtd html//\",\n \"-//metrius//dtd metrius presentational//\",\n \"-//microsoft//dtd internet explorer 2.0 html strict//\",\n \"-//microsoft//dtd internet explorer 2.0 html//\",\n \"-//microsoft//dtd internet explorer 2.0 tables//\",\n \"-//microsoft//dtd internet explorer 3.0 html strict//\",\n \"-//microsoft//dtd internet explorer 3.0 html//\",\n \"-//microsoft//dtd internet explorer 3.0 tables//\",\n \"-//netscape comm. corp.//dtd html//\",\n \"-//netscape comm. corp.//dtd strict html//\",\n \"-//o'reilly and associates//dtd html 2.0//\",\n \"-//o'reilly and associates//dtd html extended 1.0//\",\n \"-//o'reilly and associates//dtd html extended relaxed 1.0//\",\n \"-//sq//dtd html 2.0 hotmetal + extensions//\",\n \"-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//\",\n \"-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//\",\n \"-//spyglass//dtd html 2.0 extended//\",\n \"-//sun microsystems corp.//dtd hotjava html//\",\n \"-//sun microsystems corp.//dtd hotjava strict html//\",\n \"-//w3c//dtd html 3 1995-03-24//\",\n \"-//w3c//dtd html 3.2 draft//\",\n \"-//w3c//dtd html 3.2 final//\",\n \"-//w3c//dtd html 3.2//\",\n \"-//w3c//dtd html 3.2s draft//\",\n \"-//w3c//dtd html 4.0 frameset//\",\n \"-//w3c//dtd html 4.0 transitional//\",\n \"-//w3c//dtd html experimental 19960712//\",\n \"-//w3c//dtd html experimental 970421//\",\n \"-//w3c//dtd w3 html//\",\n \"-//w3o//dtd w3 html 3.0//\",\n \"-//webtechs//dtd mozilla html 2.0//\",\n \"-//webtechs//dtd mozilla html//\"\n];\nconst QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...QUIRKS_MODE_PUBLIC_ID_PREFIXES,\n \"-//w3c//dtd html 4.01 frameset//\",\n \"-//w3c//dtd html 4.01 transitional//\"\n];\nconst QUIRKS_MODE_PUBLIC_IDS = new Set([\n \"-//w3o//dtd w3 html strict 3.0//en//\",\n \"-/w3c/dtd html 4.0 transitional/en\",\n \"html\"\n]);\nconst LIMITED_QUIRKS_PUBLIC_ID_PREFIXES = [\"-//w3c//dtd xhtml 1.0 frameset//\", \"-//w3c//dtd xhtml 1.0 transitional//\"];\nconst LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES = [\n ...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,\n \"-//w3c//dtd html 4.01 frameset//\",\n \"-//w3c//dtd html 4.01 transitional//\"\n];\nfunction hasPrefix(publicId, prefixes) {\n return prefixes.some((prefix) => publicId.startsWith(prefix));\n}\nfunction isConforming(token) {\n return token.name === VALID_DOCTYPE_NAME && token.publicId === null && (token.systemId === null || token.systemId === VALID_SYSTEM_ID);\n}\nfunction getDocumentMode(token) {\n if (token.name !== VALID_DOCTYPE_NAME) return DOCUMENT_MODE.QUIRKS;\n const { systemId } = token;\n if (systemId && systemId.toLowerCase() === QUIRKS_MODE_SYSTEM_ID) return DOCUMENT_MODE.QUIRKS;\n let { publicId } = token;\n if (publicId !== null) {\n publicId = publicId.toLowerCase();\n if (QUIRKS_MODE_PUBLIC_IDS.has(publicId)) return DOCUMENT_MODE.QUIRKS;\n let prefixes = systemId === null ? QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES : QUIRKS_MODE_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) return DOCUMENT_MODE.QUIRKS;\n prefixes = systemId === null ? LIMITED_QUIRKS_PUBLIC_ID_PREFIXES : LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES;\n if (hasPrefix(publicId, prefixes)) return DOCUMENT_MODE.LIMITED_QUIRKS;\n }\n return DOCUMENT_MODE.NO_QUIRKS;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/common/foreign-content.js\nconst MIME_TYPES = {\n TEXT_HTML: \"text/html\",\n APPLICATION_XML: \"application/xhtml+xml\"\n};\nconst DEFINITION_URL_ATTR = \"definitionurl\";\nconst ADJUSTED_DEFINITION_URL_ATTR = \"definitionURL\";\nconst SVG_ATTRS_ADJUSTMENT_MAP = new Map([\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((attr) => [attr.toLowerCase(), attr]));\nconst XML_ATTRS_ADJUSTMENT_MAP = new Map([\n [\"xlink:actuate\", {\n prefix: \"xlink\",\n name: \"actuate\",\n namespace: NS.XLINK\n }],\n [\"xlink:arcrole\", {\n prefix: \"xlink\",\n name: \"arcrole\",\n namespace: NS.XLINK\n }],\n [\"xlink:href\", {\n prefix: \"xlink\",\n name: \"href\",\n namespace: NS.XLINK\n }],\n [\"xlink:role\", {\n prefix: \"xlink\",\n name: \"role\",\n namespace: NS.XLINK\n }],\n [\"xlink:show\", {\n prefix: \"xlink\",\n name: \"show\",\n namespace: NS.XLINK\n }],\n [\"xlink:title\", {\n prefix: \"xlink\",\n name: \"title\",\n namespace: NS.XLINK\n }],\n [\"xlink:type\", {\n prefix: \"xlink\",\n name: \"type\",\n namespace: NS.XLINK\n }],\n [\"xml:lang\", {\n prefix: \"xml\",\n name: \"lang\",\n namespace: NS.XML\n }],\n [\"xml:space\", {\n prefix: \"xml\",\n name: \"space\",\n namespace: NS.XML\n }],\n [\"xmlns\", {\n prefix: \"\",\n name: \"xmlns\",\n namespace: NS.XMLNS\n }],\n [\"xmlns:xlink\", {\n prefix: \"xmlns\",\n name: \"xlink\",\n namespace: NS.XMLNS\n }]\n]);\nconst SVG_TAG_NAMES_ADJUSTMENT_MAP = 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 \"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((tn) => [tn.toLowerCase(), tn]));\nconst EXITS_FOREIGN_CONTENT = new Set([\n TAG_ID.B,\n TAG_ID.BIG,\n TAG_ID.BLOCKQUOTE,\n TAG_ID.BODY,\n TAG_ID.BR,\n TAG_ID.CENTER,\n TAG_ID.CODE,\n TAG_ID.DD,\n TAG_ID.DIV,\n TAG_ID.DL,\n TAG_ID.DT,\n TAG_ID.EM,\n TAG_ID.EMBED,\n TAG_ID.H1,\n TAG_ID.H2,\n TAG_ID.H3,\n TAG_ID.H4,\n TAG_ID.H5,\n TAG_ID.H6,\n TAG_ID.HEAD,\n TAG_ID.HR,\n TAG_ID.I,\n TAG_ID.IMG,\n TAG_ID.LI,\n TAG_ID.LISTING,\n TAG_ID.MENU,\n TAG_ID.META,\n TAG_ID.NOBR,\n TAG_ID.OL,\n TAG_ID.P,\n TAG_ID.PRE,\n TAG_ID.RUBY,\n TAG_ID.S,\n TAG_ID.SMALL,\n TAG_ID.SPAN,\n TAG_ID.STRONG,\n TAG_ID.STRIKE,\n TAG_ID.SUB,\n TAG_ID.SUP,\n TAG_ID.TABLE,\n TAG_ID.TT,\n TAG_ID.U,\n TAG_ID.UL,\n TAG_ID.VAR\n]);\nfunction causesExit(startTagToken) {\n const tn = startTagToken.tagID;\n return tn === TAG_ID.FONT && startTagToken.attrs.some(({ name }) => name === ATTRS.COLOR || name === ATTRS.SIZE || name === ATTRS.FACE) || EXITS_FOREIGN_CONTENT.has(tn);\n}\nfunction adjustTokenMathMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) if (token.attrs[i].name === DEFINITION_URL_ATTR) {\n token.attrs[i].name = ADJUSTED_DEFINITION_URL_ATTR;\n break;\n }\n}\nfunction adjustTokenSVGAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrName = SVG_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrName != null) token.attrs[i].name = adjustedAttrName;\n }\n}\nfunction adjustTokenXMLAttrs(token) {\n for (let i = 0; i < token.attrs.length; i++) {\n const adjustedAttrEntry = XML_ATTRS_ADJUSTMENT_MAP.get(token.attrs[i].name);\n if (adjustedAttrEntry) {\n token.attrs[i].prefix = adjustedAttrEntry.prefix;\n token.attrs[i].name = adjustedAttrEntry.name;\n token.attrs[i].namespace = adjustedAttrEntry.namespace;\n }\n }\n}\nfunction adjustTokenSVGTagName(token) {\n const adjustedTagName = SVG_TAG_NAMES_ADJUSTMENT_MAP.get(token.tagName);\n if (adjustedTagName != null) {\n token.tagName = adjustedTagName;\n token.tagID = getTagID(token.tagName);\n }\n}\nfunction isMathMLTextIntegrationPoint(tn, ns) {\n return ns === NS.MATHML && (tn === TAG_ID.MI || tn === TAG_ID.MO || tn === TAG_ID.MN || tn === TAG_ID.MS || tn === TAG_ID.MTEXT);\n}\nfunction isHtmlIntegrationPoint(tn, ns, attrs) {\n if (ns === NS.MATHML && tn === TAG_ID.ANNOTATION_XML) {\n for (let i = 0; i < attrs.length; i++) if (attrs[i].name === ATTRS.ENCODING) {\n const value = attrs[i].value.toLowerCase();\n return value === MIME_TYPES.TEXT_HTML || value === MIME_TYPES.APPLICATION_XML;\n }\n }\n return ns === NS.SVG && (tn === TAG_ID.FOREIGN_OBJECT || tn === TAG_ID.DESC || tn === TAG_ID.TITLE);\n}\nfunction isIntegrationPoint(tn, ns, attrs, foreignNS) {\n return (!foreignNS || foreignNS === NS.HTML) && isHtmlIntegrationPoint(tn, ns, attrs) || (!foreignNS || foreignNS === NS.MATHML) && isMathMLTextIntegrationPoint(tn, ns);\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/parser/index.js\nconst HIDDEN_INPUT_TYPE = \"hidden\";\nconst AA_OUTER_LOOP_ITER = 8;\nconst AA_INNER_LOOP_ITER = 3;\nvar InsertionMode;\n(function(InsertionMode$1) {\n InsertionMode$1[InsertionMode$1[\"INITIAL\"] = 0] = \"INITIAL\";\n InsertionMode$1[InsertionMode$1[\"BEFORE_HTML\"] = 1] = \"BEFORE_HTML\";\n InsertionMode$1[InsertionMode$1[\"BEFORE_HEAD\"] = 2] = \"BEFORE_HEAD\";\n InsertionMode$1[InsertionMode$1[\"IN_HEAD\"] = 3] = \"IN_HEAD\";\n InsertionMode$1[InsertionMode$1[\"IN_HEAD_NO_SCRIPT\"] = 4] = \"IN_HEAD_NO_SCRIPT\";\n InsertionMode$1[InsertionMode$1[\"AFTER_HEAD\"] = 5] = \"AFTER_HEAD\";\n InsertionMode$1[InsertionMode$1[\"IN_BODY\"] = 6] = \"IN_BODY\";\n InsertionMode$1[InsertionMode$1[\"TEXT\"] = 7] = \"TEXT\";\n InsertionMode$1[InsertionMode$1[\"IN_TABLE\"] = 8] = \"IN_TABLE\";\n InsertionMode$1[InsertionMode$1[\"IN_TABLE_TEXT\"] = 9] = \"IN_TABLE_TEXT\";\n InsertionMode$1[InsertionMode$1[\"IN_CAPTION\"] = 10] = \"IN_CAPTION\";\n InsertionMode$1[InsertionMode$1[\"IN_COLUMN_GROUP\"] = 11] = \"IN_COLUMN_GROUP\";\n InsertionMode$1[InsertionMode$1[\"IN_TABLE_BODY\"] = 12] = \"IN_TABLE_BODY\";\n InsertionMode$1[InsertionMode$1[\"IN_ROW\"] = 13] = \"IN_ROW\";\n InsertionMode$1[InsertionMode$1[\"IN_CELL\"] = 14] = \"IN_CELL\";\n InsertionMode$1[InsertionMode$1[\"IN_SELECT\"] = 15] = \"IN_SELECT\";\n InsertionMode$1[InsertionMode$1[\"IN_SELECT_IN_TABLE\"] = 16] = \"IN_SELECT_IN_TABLE\";\n InsertionMode$1[InsertionMode$1[\"IN_TEMPLATE\"] = 17] = \"IN_TEMPLATE\";\n InsertionMode$1[InsertionMode$1[\"AFTER_BODY\"] = 18] = \"AFTER_BODY\";\n InsertionMode$1[InsertionMode$1[\"IN_FRAMESET\"] = 19] = \"IN_FRAMESET\";\n InsertionMode$1[InsertionMode$1[\"AFTER_FRAMESET\"] = 20] = \"AFTER_FRAMESET\";\n InsertionMode$1[InsertionMode$1[\"AFTER_AFTER_BODY\"] = 21] = \"AFTER_AFTER_BODY\";\n InsertionMode$1[InsertionMode$1[\"AFTER_AFTER_FRAMESET\"] = 22] = \"AFTER_AFTER_FRAMESET\";\n})(InsertionMode || (InsertionMode = {}));\nconst BASE_LOC = {\n startLine: -1,\n startCol: -1,\n startOffset: -1,\n endLine: -1,\n endCol: -1,\n endOffset: -1\n};\nconst TABLE_STRUCTURE_TAGS = new Set([\n TAG_ID.TABLE,\n TAG_ID.TBODY,\n TAG_ID.TFOOT,\n TAG_ID.THEAD,\n TAG_ID.TR\n]);\nconst defaultParserOptions = {\n scriptingEnabled: true,\n sourceCodeLocationInfo: false,\n treeAdapter: defaultTreeAdapter,\n onParseError: null\n};\nvar Parser = class {\n constructor(options, document, fragmentContext = null, scriptHandler = null) {\n this.fragmentContext = fragmentContext;\n this.scriptHandler = scriptHandler;\n this.currentToken = null;\n this.stopped = false;\n /** @internal */\n this.insertionMode = InsertionMode.INITIAL;\n /** @internal */\n this.originalInsertionMode = InsertionMode.INITIAL;\n /** @internal */\n this.headElement = null;\n /** @internal */\n this.formElement = null;\n /** Indicates that the current node is not an element in the HTML namespace */\n this.currentNotInHTML = false;\n /**\n * The template insertion mode stack is maintained from the left.\n * Ie. the topmost element will always have index 0.\n *\n * @internal\n */\n this.tmplInsertionModeStack = [];\n /** @internal */\n this.pendingCharacterTokens = [];\n /** @internal */\n this.hasNonWhitespacePendingCharacterToken = false;\n /** @internal */\n this.framesetOk = true;\n /** @internal */\n this.skipNextNewLine = false;\n /** @internal */\n this.fosterParentingEnabled = false;\n this.options = {\n ...defaultParserOptions,\n ...options\n };\n this.treeAdapter = this.options.treeAdapter;\n this.onParseError = this.options.onParseError;\n if (this.onParseError) this.options.sourceCodeLocationInfo = true;\n this.document = document !== null && document !== void 0 ? document : this.treeAdapter.createDocument();\n this.tokenizer = new Tokenizer(this.options, this);\n this.activeFormattingElements = new FormattingElementList(this.treeAdapter);\n this.fragmentContextID = fragmentContext ? getTagID(this.treeAdapter.getTagName(fragmentContext)) : TAG_ID.UNKNOWN;\n this._setContextModes(fragmentContext !== null && fragmentContext !== void 0 ? fragmentContext : this.document, this.fragmentContextID);\n this.openElements = new OpenElementStack(this.document, this.treeAdapter, this);\n }\n static parse(html$4, options) {\n const parser = new this(options);\n parser.tokenizer.write(html$4, true);\n return parser.document;\n }\n static getFragmentParser(fragmentContext, options) {\n const opts = {\n ...defaultParserOptions,\n ...options\n };\n fragmentContext !== null && fragmentContext !== void 0 || (fragmentContext = opts.treeAdapter.createElement(TAG_NAMES.TEMPLATE, NS.HTML, []));\n const documentMock = opts.treeAdapter.createElement(\"documentmock\", NS.HTML, []);\n const parser = new this(opts, documentMock, fragmentContext);\n if (parser.fragmentContextID === TAG_ID.TEMPLATE) parser.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);\n parser._initTokenizerForFragmentParsing();\n parser._insertFakeRootElement();\n parser._resetInsertionMode();\n parser._findFormInFragmentContext();\n return parser;\n }\n getFragment() {\n const rootElement = this.treeAdapter.getFirstChild(this.document);\n const fragment = this.treeAdapter.createDocumentFragment();\n this._adoptNodes(rootElement, fragment);\n return fragment;\n }\n /** @internal */\n _err(token, code, beforeToken) {\n var _a;\n if (!this.onParseError) return;\n const loc = (_a = token.location) !== null && _a !== void 0 ? _a : BASE_LOC;\n const err = {\n code,\n startLine: loc.startLine,\n startCol: loc.startCol,\n startOffset: loc.startOffset,\n endLine: beforeToken ? loc.startLine : loc.endLine,\n endCol: beforeToken ? loc.startCol : loc.endCol,\n endOffset: beforeToken ? loc.startOffset : loc.endOffset\n };\n this.onParseError(err);\n }\n /** @internal */\n onItemPush(node, tid, isTop) {\n var _a, _b;\n (_b = (_a = this.treeAdapter).onItemPush) === null || _b === void 0 || _b.call(_a, node);\n if (isTop && this.openElements.stackTop > 0) this._setContextModes(node, tid);\n }\n /** @internal */\n onItemPop(node, isTop) {\n var _a, _b;\n if (this.options.sourceCodeLocationInfo) this._setEndLocation(node, this.currentToken);\n (_b = (_a = this.treeAdapter).onItemPop) === null || _b === void 0 || _b.call(_a, node, this.openElements.current);\n if (isTop) {\n let current;\n let currentTagId;\n if (this.openElements.stackTop === 0 && this.fragmentContext) {\n current = this.fragmentContext;\n currentTagId = this.fragmentContextID;\n } else ({current, currentTagId} = this.openElements);\n this._setContextModes(current, currentTagId);\n }\n }\n _setContextModes(current, tid) {\n const isHTML = current === this.document || current && this.treeAdapter.getNamespaceURI(current) === NS.HTML;\n this.currentNotInHTML = !isHTML;\n this.tokenizer.inForeignNode = !isHTML && current !== void 0 && tid !== void 0 && !this._isIntegrationPoint(tid, current);\n }\n /** @protected */\n _switchToTextParsing(currentToken, nextTokenizerState) {\n this._insertElement(currentToken, NS.HTML);\n this.tokenizer.state = nextTokenizerState;\n this.originalInsertionMode = this.insertionMode;\n this.insertionMode = InsertionMode.TEXT;\n }\n switchToPlaintextParsing() {\n this.insertionMode = InsertionMode.TEXT;\n this.originalInsertionMode = InsertionMode.IN_BODY;\n this.tokenizer.state = TokenizerMode.PLAINTEXT;\n }\n /** @protected */\n _getAdjustedCurrentElement() {\n return this.openElements.stackTop === 0 && this.fragmentContext ? this.fragmentContext : this.openElements.current;\n }\n /** @protected */\n _findFormInFragmentContext() {\n let node = this.fragmentContext;\n while (node) {\n if (this.treeAdapter.getTagName(node) === TAG_NAMES.FORM) {\n this.formElement = node;\n break;\n }\n node = this.treeAdapter.getParentNode(node);\n }\n }\n _initTokenizerForFragmentParsing() {\n if (!this.fragmentContext || this.treeAdapter.getNamespaceURI(this.fragmentContext) !== NS.HTML) return;\n switch (this.fragmentContextID) {\n case TAG_ID.TITLE:\n case TAG_ID.TEXTAREA:\n this.tokenizer.state = TokenizerMode.RCDATA;\n break;\n case TAG_ID.STYLE:\n case TAG_ID.XMP:\n case TAG_ID.IFRAME:\n case TAG_ID.NOEMBED:\n case TAG_ID.NOFRAMES:\n case TAG_ID.NOSCRIPT:\n this.tokenizer.state = TokenizerMode.RAWTEXT;\n break;\n case TAG_ID.SCRIPT:\n this.tokenizer.state = TokenizerMode.SCRIPT_DATA;\n break;\n case TAG_ID.PLAINTEXT:\n this.tokenizer.state = TokenizerMode.PLAINTEXT;\n break;\n default:\n }\n }\n /** @protected */\n _setDocumentType(token) {\n const name = token.name || \"\";\n const publicId = token.publicId || \"\";\n const systemId = token.systemId || \"\";\n this.treeAdapter.setDocumentType(this.document, name, publicId, systemId);\n if (token.location) {\n const docTypeNode = this.treeAdapter.getChildNodes(this.document).find((node) => this.treeAdapter.isDocumentTypeNode(node));\n if (docTypeNode) this.treeAdapter.setNodeSourceCodeLocation(docTypeNode, token.location);\n }\n }\n /** @protected */\n _attachElementToTree(element$3, location$1) {\n if (this.options.sourceCodeLocationInfo) {\n const loc = location$1 && {\n ...location$1,\n startTag: location$1\n };\n this.treeAdapter.setNodeSourceCodeLocation(element$3, loc);\n }\n if (this._shouldFosterParentOnInsertion()) this._fosterParentElement(element$3);\n else {\n const parent = this.openElements.currentTmplContentOrNode;\n this.treeAdapter.appendChild(parent !== null && parent !== void 0 ? parent : this.document, element$3);\n }\n }\n /**\n * For self-closing tags. Add an element to the tree, but skip adding it\n * to the stack.\n */\n /** @protected */\n _appendElement(token, namespaceURI) {\n const element$3 = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n this._attachElementToTree(element$3, token.location);\n }\n /** @protected */\n _insertElement(token, namespaceURI) {\n const element$3 = this.treeAdapter.createElement(token.tagName, namespaceURI, token.attrs);\n this._attachElementToTree(element$3, token.location);\n this.openElements.push(element$3, token.tagID);\n }\n /** @protected */\n _insertFakeElement(tagName, tagID) {\n const element$3 = this.treeAdapter.createElement(tagName, NS.HTML, []);\n this._attachElementToTree(element$3, null);\n this.openElements.push(element$3, tagID);\n }\n /** @protected */\n _insertTemplate(token) {\n const tmpl = this.treeAdapter.createElement(token.tagName, NS.HTML, token.attrs);\n const content = this.treeAdapter.createDocumentFragment();\n this.treeAdapter.setTemplateContent(tmpl, content);\n this._attachElementToTree(tmpl, token.location);\n this.openElements.push(tmpl, token.tagID);\n if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(content, null);\n }\n /** @protected */\n _insertFakeRootElement() {\n const element$3 = this.treeAdapter.createElement(TAG_NAMES.HTML, NS.HTML, []);\n if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(element$3, null);\n this.treeAdapter.appendChild(this.openElements.current, element$3);\n this.openElements.push(element$3, TAG_ID.HTML);\n }\n /** @protected */\n _appendCommentNode(token, parent) {\n const commentNode = this.treeAdapter.createCommentNode(token.data);\n this.treeAdapter.appendChild(parent, commentNode);\n if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(commentNode, token.location);\n }\n /** @protected */\n _insertCharacters(token) {\n let parent;\n let beforeElement;\n if (this._shouldFosterParentOnInsertion()) {\n ({parent, beforeElement} = this._findFosterParentingLocation());\n if (beforeElement) this.treeAdapter.insertTextBefore(parent, token.chars, beforeElement);\n else this.treeAdapter.insertText(parent, token.chars);\n } else {\n parent = this.openElements.currentTmplContentOrNode;\n this.treeAdapter.insertText(parent, token.chars);\n }\n if (!token.location) return;\n const siblings$1 = this.treeAdapter.getChildNodes(parent);\n const textNode = siblings$1[(beforeElement ? siblings$1.lastIndexOf(beforeElement) : siblings$1.length) - 1];\n if (this.treeAdapter.getNodeSourceCodeLocation(textNode)) {\n const { endLine, endCol, endOffset } = token.location;\n this.treeAdapter.updateNodeSourceCodeLocation(textNode, {\n endLine,\n endCol,\n endOffset\n });\n } else if (this.options.sourceCodeLocationInfo) this.treeAdapter.setNodeSourceCodeLocation(textNode, token.location);\n }\n /** @protected */\n _adoptNodes(donor, recipient) {\n for (let child = this.treeAdapter.getFirstChild(donor); child; child = this.treeAdapter.getFirstChild(donor)) {\n this.treeAdapter.detachNode(child);\n this.treeAdapter.appendChild(recipient, child);\n }\n }\n /** @protected */\n _setEndLocation(element$3, closingToken) {\n if (this.treeAdapter.getNodeSourceCodeLocation(element$3) && closingToken.location) {\n const ctLoc = closingToken.location;\n const tn = this.treeAdapter.getTagName(element$3);\n const endLoc = closingToken.type === TokenType.END_TAG && tn === closingToken.tagName ? {\n endTag: { ...ctLoc },\n endLine: ctLoc.endLine,\n endCol: ctLoc.endCol,\n endOffset: ctLoc.endOffset\n } : {\n endLine: ctLoc.startLine,\n endCol: ctLoc.startCol,\n endOffset: ctLoc.startOffset\n };\n this.treeAdapter.updateNodeSourceCodeLocation(element$3, endLoc);\n }\n }\n shouldProcessStartTagTokenInForeignContent(token) {\n if (!this.currentNotInHTML) return false;\n let current;\n let currentTagId;\n if (this.openElements.stackTop === 0 && this.fragmentContext) {\n current = this.fragmentContext;\n currentTagId = this.fragmentContextID;\n } else ({current, currentTagId} = this.openElements);\n if (token.tagID === TAG_ID.SVG && this.treeAdapter.getTagName(current) === TAG_NAMES.ANNOTATION_XML && this.treeAdapter.getNamespaceURI(current) === NS.MATHML) return false;\n return this.tokenizer.inForeignNode || (token.tagID === TAG_ID.MGLYPH || token.tagID === TAG_ID.MALIGNMARK) && currentTagId !== void 0 && !this._isIntegrationPoint(currentTagId, current, NS.HTML);\n }\n /** @protected */\n _processToken(token) {\n switch (token.type) {\n case TokenType.CHARACTER:\n this.onCharacter(token);\n break;\n case TokenType.NULL_CHARACTER:\n this.onNullCharacter(token);\n break;\n case TokenType.COMMENT:\n this.onComment(token);\n break;\n case TokenType.DOCTYPE:\n this.onDoctype(token);\n break;\n case TokenType.START_TAG:\n this._processStartTag(token);\n break;\n case TokenType.END_TAG:\n this.onEndTag(token);\n break;\n case TokenType.EOF:\n this.onEof(token);\n break;\n case TokenType.WHITESPACE_CHARACTER:\n this.onWhitespaceCharacter(token);\n break;\n }\n }\n /** @protected */\n _isIntegrationPoint(tid, element$3, foreignNS) {\n const ns = this.treeAdapter.getNamespaceURI(element$3);\n const attrs = this.treeAdapter.getAttrList(element$3);\n return isIntegrationPoint(tid, ns, attrs, foreignNS);\n }\n /** @protected */\n _reconstructActiveFormattingElements() {\n const listLength = this.activeFormattingElements.entries.length;\n if (listLength) {\n const endIndex = this.activeFormattingElements.entries.findIndex((entry) => entry.type === EntryType.Marker || this.openElements.contains(entry.element));\n const unopenIdx = endIndex === -1 ? listLength - 1 : endIndex - 1;\n for (let i = unopenIdx; i >= 0; i--) {\n const entry = this.activeFormattingElements.entries[i];\n this._insertElement(entry.token, this.treeAdapter.getNamespaceURI(entry.element));\n entry.element = this.openElements.current;\n }\n }\n }\n /** @protected */\n _closeTableCell() {\n this.openElements.generateImpliedEndTags();\n this.openElements.popUntilTableCellPopped();\n this.activeFormattingElements.clearToLastMarker();\n this.insertionMode = InsertionMode.IN_ROW;\n }\n /** @protected */\n _closePElement() {\n this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P);\n this.openElements.popUntilTagNamePopped(TAG_ID.P);\n }\n /** @protected */\n _resetInsertionMode() {\n for (let i = this.openElements.stackTop; i >= 0; i--) switch (i === 0 && this.fragmentContext ? this.fragmentContextID : this.openElements.tagIDs[i]) {\n case TAG_ID.TR:\n this.insertionMode = InsertionMode.IN_ROW;\n return;\n case TAG_ID.TBODY:\n case TAG_ID.THEAD:\n case TAG_ID.TFOOT:\n this.insertionMode = InsertionMode.IN_TABLE_BODY;\n return;\n case TAG_ID.CAPTION:\n this.insertionMode = InsertionMode.IN_CAPTION;\n return;\n case TAG_ID.COLGROUP:\n this.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n return;\n case TAG_ID.TABLE:\n this.insertionMode = InsertionMode.IN_TABLE;\n return;\n case TAG_ID.BODY:\n this.insertionMode = InsertionMode.IN_BODY;\n return;\n case TAG_ID.FRAMESET:\n this.insertionMode = InsertionMode.IN_FRAMESET;\n return;\n case TAG_ID.SELECT:\n this._resetInsertionModeForSelect(i);\n return;\n case TAG_ID.TEMPLATE:\n this.insertionMode = this.tmplInsertionModeStack[0];\n return;\n case TAG_ID.HTML:\n this.insertionMode = this.headElement ? InsertionMode.AFTER_HEAD : InsertionMode.BEFORE_HEAD;\n return;\n case TAG_ID.TD:\n case TAG_ID.TH:\n if (i > 0) {\n this.insertionMode = InsertionMode.IN_CELL;\n return;\n }\n break;\n case TAG_ID.HEAD:\n if (i > 0) {\n this.insertionMode = InsertionMode.IN_HEAD;\n return;\n }\n break;\n }\n this.insertionMode = InsertionMode.IN_BODY;\n }\n /** @protected */\n _resetInsertionModeForSelect(selectIdx) {\n if (selectIdx > 0) for (let i = selectIdx - 1; i > 0; i--) {\n const tn = this.openElements.tagIDs[i];\n if (tn === TAG_ID.TEMPLATE) break;\n else if (tn === TAG_ID.TABLE) {\n this.insertionMode = InsertionMode.IN_SELECT_IN_TABLE;\n return;\n }\n }\n this.insertionMode = InsertionMode.IN_SELECT;\n }\n /** @protected */\n _isElementCausesFosterParenting(tn) {\n return TABLE_STRUCTURE_TAGS.has(tn);\n }\n /** @protected */\n _shouldFosterParentOnInsertion() {\n return this.fosterParentingEnabled && this.openElements.currentTagId !== void 0 && this._isElementCausesFosterParenting(this.openElements.currentTagId);\n }\n /** @protected */\n _findFosterParentingLocation() {\n for (let i = this.openElements.stackTop; i >= 0; i--) {\n const openElement = this.openElements.items[i];\n switch (this.openElements.tagIDs[i]) {\n case TAG_ID.TEMPLATE:\n if (this.treeAdapter.getNamespaceURI(openElement) === NS.HTML) return {\n parent: this.treeAdapter.getTemplateContent(openElement),\n beforeElement: null\n };\n break;\n case TAG_ID.TABLE: {\n const parent = this.treeAdapter.getParentNode(openElement);\n if (parent) return {\n parent,\n beforeElement: openElement\n };\n return {\n parent: this.openElements.items[i - 1],\n beforeElement: null\n };\n }\n default:\n }\n }\n return {\n parent: this.openElements.items[0],\n beforeElement: null\n };\n }\n /** @protected */\n _fosterParentElement(element$3) {\n const location$1 = this._findFosterParentingLocation();\n if (location$1.beforeElement) this.treeAdapter.insertBefore(location$1.parent, element$3, location$1.beforeElement);\n else this.treeAdapter.appendChild(location$1.parent, element$3);\n }\n /** @protected */\n _isSpecialElement(element$3, id) {\n return SPECIAL_ELEMENTS[this.treeAdapter.getNamespaceURI(element$3)].has(id);\n }\n /** @internal */\n onCharacter(token) {\n this.skipNextNewLine = false;\n if (this.tokenizer.inForeignNode) {\n characterInForeignContent(this, token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n tokenInInitialMode(this, token);\n break;\n case InsertionMode.BEFORE_HTML:\n tokenBeforeHtml(this, token);\n break;\n case InsertionMode.BEFORE_HEAD:\n tokenBeforeHead(this, token);\n break;\n case InsertionMode.IN_HEAD:\n tokenInHead(this, token);\n break;\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n tokenInHeadNoScript(this, token);\n break;\n case InsertionMode.AFTER_HEAD:\n tokenAfterHead(this, token);\n break;\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_TEMPLATE:\n characterInBody(this, token);\n break;\n case InsertionMode.TEXT:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE:\n this._insertCharacters(token);\n break;\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n characterInTable(this, token);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n characterInTableText(this, token);\n break;\n case InsertionMode.IN_COLUMN_GROUP:\n tokenInColumnGroup(this, token);\n break;\n case InsertionMode.AFTER_BODY:\n tokenAfterBody(this, token);\n break;\n case InsertionMode.AFTER_AFTER_BODY:\n tokenAfterAfterBody(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onNullCharacter(token) {\n this.skipNextNewLine = false;\n if (this.tokenizer.inForeignNode) {\n nullCharacterInForeignContent(this, token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n tokenInInitialMode(this, token);\n break;\n case InsertionMode.BEFORE_HTML:\n tokenBeforeHtml(this, token);\n break;\n case InsertionMode.BEFORE_HEAD:\n tokenBeforeHead(this, token);\n break;\n case InsertionMode.IN_HEAD:\n tokenInHead(this, token);\n break;\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n tokenInHeadNoScript(this, token);\n break;\n case InsertionMode.AFTER_HEAD:\n tokenAfterHead(this, token);\n break;\n case InsertionMode.TEXT:\n this._insertCharacters(token);\n break;\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n characterInTable(this, token);\n break;\n case InsertionMode.IN_COLUMN_GROUP:\n tokenInColumnGroup(this, token);\n break;\n case InsertionMode.AFTER_BODY:\n tokenAfterBody(this, token);\n break;\n case InsertionMode.AFTER_AFTER_BODY:\n tokenAfterAfterBody(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onComment(token) {\n this.skipNextNewLine = false;\n if (this.currentNotInHTML) {\n appendComment(this, token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n case InsertionMode.BEFORE_HTML:\n case InsertionMode.BEFORE_HEAD:\n case InsertionMode.IN_HEAD:\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n case InsertionMode.AFTER_HEAD:\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_COLUMN_GROUP:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE:\n case InsertionMode.IN_TEMPLATE:\n case InsertionMode.IN_FRAMESET:\n case InsertionMode.AFTER_FRAMESET:\n appendComment(this, token);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n tokenInTableText(this, token);\n break;\n case InsertionMode.AFTER_BODY:\n appendCommentToRootHtmlElement(this, token);\n break;\n case InsertionMode.AFTER_AFTER_BODY:\n case InsertionMode.AFTER_AFTER_FRAMESET:\n appendCommentToDocument(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onDoctype(token) {\n this.skipNextNewLine = false;\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n doctypeInInitialMode(this, token);\n break;\n case InsertionMode.BEFORE_HEAD:\n case InsertionMode.IN_HEAD:\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n case InsertionMode.AFTER_HEAD:\n this._err(token, ERR.misplacedDoctype);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n tokenInTableText(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onStartTag(token) {\n this.skipNextNewLine = false;\n this.currentToken = token;\n this._processStartTag(token);\n if (token.selfClosing && !token.ackSelfClosing) this._err(token, ERR.nonVoidHtmlElementStartTagWithTrailingSolidus);\n }\n /**\n * Processes a given start tag.\n *\n * `onStartTag` checks if a self-closing tag was recognized. When a token\n * is moved inbetween multiple insertion modes, this check for self-closing\n * could lead to false positives. To avoid this, `_processStartTag` is used\n * for nested calls.\n *\n * @param token The token to process.\n * @protected\n */\n _processStartTag(token) {\n if (this.shouldProcessStartTagTokenInForeignContent(token)) startTagInForeignContent(this, token);\n else this._startTagOutsideForeignContent(token);\n }\n /** @protected */\n _startTagOutsideForeignContent(token) {\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n tokenInInitialMode(this, token);\n break;\n case InsertionMode.BEFORE_HTML:\n startTagBeforeHtml(this, token);\n break;\n case InsertionMode.BEFORE_HEAD:\n startTagBeforeHead(this, token);\n break;\n case InsertionMode.IN_HEAD:\n startTagInHead(this, token);\n break;\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n startTagInHeadNoScript(this, token);\n break;\n case InsertionMode.AFTER_HEAD:\n startTagAfterHead(this, token);\n break;\n case InsertionMode.IN_BODY:\n startTagInBody(this, token);\n break;\n case InsertionMode.IN_TABLE:\n startTagInTable(this, token);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n tokenInTableText(this, token);\n break;\n case InsertionMode.IN_CAPTION:\n startTagInCaption(this, token);\n break;\n case InsertionMode.IN_COLUMN_GROUP:\n startTagInColumnGroup(this, token);\n break;\n case InsertionMode.IN_TABLE_BODY:\n startTagInTableBody(this, token);\n break;\n case InsertionMode.IN_ROW:\n startTagInRow(this, token);\n break;\n case InsertionMode.IN_CELL:\n startTagInCell(this, token);\n break;\n case InsertionMode.IN_SELECT:\n startTagInSelect(this, token);\n break;\n case InsertionMode.IN_SELECT_IN_TABLE:\n startTagInSelectInTable(this, token);\n break;\n case InsertionMode.IN_TEMPLATE:\n startTagInTemplate(this, token);\n break;\n case InsertionMode.AFTER_BODY:\n startTagAfterBody(this, token);\n break;\n case InsertionMode.IN_FRAMESET:\n startTagInFrameset(this, token);\n break;\n case InsertionMode.AFTER_FRAMESET:\n startTagAfterFrameset(this, token);\n break;\n case InsertionMode.AFTER_AFTER_BODY:\n startTagAfterAfterBody(this, token);\n break;\n case InsertionMode.AFTER_AFTER_FRAMESET:\n startTagAfterAfterFrameset(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onEndTag(token) {\n this.skipNextNewLine = false;\n this.currentToken = token;\n if (this.currentNotInHTML) endTagInForeignContent(this, token);\n else this._endTagOutsideForeignContent(token);\n }\n /** @protected */\n _endTagOutsideForeignContent(token) {\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n tokenInInitialMode(this, token);\n break;\n case InsertionMode.BEFORE_HTML:\n endTagBeforeHtml(this, token);\n break;\n case InsertionMode.BEFORE_HEAD:\n endTagBeforeHead(this, token);\n break;\n case InsertionMode.IN_HEAD:\n endTagInHead(this, token);\n break;\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n endTagInHeadNoScript(this, token);\n break;\n case InsertionMode.AFTER_HEAD:\n endTagAfterHead(this, token);\n break;\n case InsertionMode.IN_BODY:\n endTagInBody(this, token);\n break;\n case InsertionMode.TEXT:\n endTagInText(this, token);\n break;\n case InsertionMode.IN_TABLE:\n endTagInTable(this, token);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n tokenInTableText(this, token);\n break;\n case InsertionMode.IN_CAPTION:\n endTagInCaption(this, token);\n break;\n case InsertionMode.IN_COLUMN_GROUP:\n endTagInColumnGroup(this, token);\n break;\n case InsertionMode.IN_TABLE_BODY:\n endTagInTableBody(this, token);\n break;\n case InsertionMode.IN_ROW:\n endTagInRow(this, token);\n break;\n case InsertionMode.IN_CELL:\n endTagInCell(this, token);\n break;\n case InsertionMode.IN_SELECT:\n endTagInSelect(this, token);\n break;\n case InsertionMode.IN_SELECT_IN_TABLE:\n endTagInSelectInTable(this, token);\n break;\n case InsertionMode.IN_TEMPLATE:\n endTagInTemplate(this, token);\n break;\n case InsertionMode.AFTER_BODY:\n endTagAfterBody(this, token);\n break;\n case InsertionMode.IN_FRAMESET:\n endTagInFrameset(this, token);\n break;\n case InsertionMode.AFTER_FRAMESET:\n endTagAfterFrameset(this, token);\n break;\n case InsertionMode.AFTER_AFTER_BODY:\n tokenAfterAfterBody(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onEof(token) {\n switch (this.insertionMode) {\n case InsertionMode.INITIAL:\n tokenInInitialMode(this, token);\n break;\n case InsertionMode.BEFORE_HTML:\n tokenBeforeHtml(this, token);\n break;\n case InsertionMode.BEFORE_HEAD:\n tokenBeforeHead(this, token);\n break;\n case InsertionMode.IN_HEAD:\n tokenInHead(this, token);\n break;\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n tokenInHeadNoScript(this, token);\n break;\n case InsertionMode.AFTER_HEAD:\n tokenAfterHead(this, token);\n break;\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_COLUMN_GROUP:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE:\n eofInBody(this, token);\n break;\n case InsertionMode.TEXT:\n eofInText(this, token);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n tokenInTableText(this, token);\n break;\n case InsertionMode.IN_TEMPLATE:\n eofInTemplate(this, token);\n break;\n case InsertionMode.AFTER_BODY:\n case InsertionMode.IN_FRAMESET:\n case InsertionMode.AFTER_FRAMESET:\n case InsertionMode.AFTER_AFTER_BODY:\n case InsertionMode.AFTER_AFTER_FRAMESET:\n stopParsing(this, token);\n break;\n default:\n }\n }\n /** @internal */\n onWhitespaceCharacter(token) {\n if (this.skipNextNewLine) {\n this.skipNextNewLine = false;\n if (token.chars.charCodeAt(0) === CODE_POINTS.LINE_FEED) {\n if (token.chars.length === 1) return;\n token.chars = token.chars.substr(1);\n }\n }\n if (this.tokenizer.inForeignNode) {\n this._insertCharacters(token);\n return;\n }\n switch (this.insertionMode) {\n case InsertionMode.IN_HEAD:\n case InsertionMode.IN_HEAD_NO_SCRIPT:\n case InsertionMode.AFTER_HEAD:\n case InsertionMode.TEXT:\n case InsertionMode.IN_COLUMN_GROUP:\n case InsertionMode.IN_SELECT:\n case InsertionMode.IN_SELECT_IN_TABLE:\n case InsertionMode.IN_FRAMESET:\n case InsertionMode.AFTER_FRAMESET:\n this._insertCharacters(token);\n break;\n case InsertionMode.IN_BODY:\n case InsertionMode.IN_CAPTION:\n case InsertionMode.IN_CELL:\n case InsertionMode.IN_TEMPLATE:\n case InsertionMode.AFTER_BODY:\n case InsertionMode.AFTER_AFTER_BODY:\n case InsertionMode.AFTER_AFTER_FRAMESET:\n whitespaceCharacterInBody(this, token);\n break;\n case InsertionMode.IN_TABLE:\n case InsertionMode.IN_TABLE_BODY:\n case InsertionMode.IN_ROW:\n characterInTable(this, token);\n break;\n case InsertionMode.IN_TABLE_TEXT:\n whitespaceCharacterInTableText(this, token);\n break;\n default:\n }\n }\n};\nfunction aaObtainFormattingElementEntry(p$1, token) {\n let formattingElementEntry = p$1.activeFormattingElements.getElementEntryInScopeWithTagName(token.tagName);\n if (formattingElementEntry) {\n if (!p$1.openElements.contains(formattingElementEntry.element)) {\n p$1.activeFormattingElements.removeEntry(formattingElementEntry);\n formattingElementEntry = null;\n } else if (!p$1.openElements.hasInScope(token.tagID)) formattingElementEntry = null;\n } else genericEndTagInBody(p$1, token);\n return formattingElementEntry;\n}\nfunction aaObtainFurthestBlock(p$1, formattingElementEntry) {\n let furthestBlock = null;\n let idx = p$1.openElements.stackTop;\n for (; idx >= 0; idx--) {\n const element$3 = p$1.openElements.items[idx];\n if (element$3 === formattingElementEntry.element) break;\n if (p$1._isSpecialElement(element$3, p$1.openElements.tagIDs[idx])) furthestBlock = element$3;\n }\n if (!furthestBlock) {\n p$1.openElements.shortenToLength(Math.max(idx, 0));\n p$1.activeFormattingElements.removeEntry(formattingElementEntry);\n }\n return furthestBlock;\n}\nfunction aaInnerLoop(p$1, furthestBlock, formattingElement) {\n let lastElement = furthestBlock;\n let nextElement = p$1.openElements.getCommonAncestor(furthestBlock);\n for (let i = 0, element$3 = nextElement; element$3 !== formattingElement; i++, element$3 = nextElement) {\n nextElement = p$1.openElements.getCommonAncestor(element$3);\n const elementEntry = p$1.activeFormattingElements.getElementEntry(element$3);\n const counterOverflow = elementEntry && i >= AA_INNER_LOOP_ITER;\n if (!elementEntry || counterOverflow) {\n if (counterOverflow) p$1.activeFormattingElements.removeEntry(elementEntry);\n p$1.openElements.remove(element$3);\n } else {\n element$3 = aaRecreateElementFromEntry(p$1, elementEntry);\n if (lastElement === furthestBlock) p$1.activeFormattingElements.bookmark = elementEntry;\n p$1.treeAdapter.detachNode(lastElement);\n p$1.treeAdapter.appendChild(element$3, lastElement);\n lastElement = element$3;\n }\n }\n return lastElement;\n}\nfunction aaRecreateElementFromEntry(p$1, elementEntry) {\n const ns = p$1.treeAdapter.getNamespaceURI(elementEntry.element);\n const newElement = p$1.treeAdapter.createElement(elementEntry.token.tagName, ns, elementEntry.token.attrs);\n p$1.openElements.replace(elementEntry.element, newElement);\n elementEntry.element = newElement;\n return newElement;\n}\nfunction aaInsertLastNodeInCommonAncestor(p$1, commonAncestor, lastElement) {\n const tid = getTagID(p$1.treeAdapter.getTagName(commonAncestor));\n if (p$1._isElementCausesFosterParenting(tid)) p$1._fosterParentElement(lastElement);\n else {\n const ns = p$1.treeAdapter.getNamespaceURI(commonAncestor);\n if (tid === TAG_ID.TEMPLATE && ns === NS.HTML) commonAncestor = p$1.treeAdapter.getTemplateContent(commonAncestor);\n p$1.treeAdapter.appendChild(commonAncestor, lastElement);\n }\n}\nfunction aaReplaceFormattingElement(p$1, furthestBlock, formattingElementEntry) {\n const ns = p$1.treeAdapter.getNamespaceURI(formattingElementEntry.element);\n const { token } = formattingElementEntry;\n const newElement = p$1.treeAdapter.createElement(token.tagName, ns, token.attrs);\n p$1._adoptNodes(furthestBlock, newElement);\n p$1.treeAdapter.appendChild(furthestBlock, newElement);\n p$1.activeFormattingElements.insertElementAfterBookmark(newElement, token);\n p$1.activeFormattingElements.removeEntry(formattingElementEntry);\n p$1.openElements.remove(formattingElementEntry.element);\n p$1.openElements.insertAfter(furthestBlock, newElement, token.tagID);\n}\nfunction callAdoptionAgency(p$1, token) {\n for (let i = 0; i < AA_OUTER_LOOP_ITER; i++) {\n const formattingElementEntry = aaObtainFormattingElementEntry(p$1, token);\n if (!formattingElementEntry) break;\n const furthestBlock = aaObtainFurthestBlock(p$1, formattingElementEntry);\n if (!furthestBlock) break;\n p$1.activeFormattingElements.bookmark = formattingElementEntry;\n const lastElement = aaInnerLoop(p$1, furthestBlock, formattingElementEntry.element);\n const commonAncestor = p$1.openElements.getCommonAncestor(formattingElementEntry.element);\n p$1.treeAdapter.detachNode(lastElement);\n if (commonAncestor) aaInsertLastNodeInCommonAncestor(p$1, commonAncestor, lastElement);\n aaReplaceFormattingElement(p$1, furthestBlock, formattingElementEntry);\n }\n}\nfunction appendComment(p$1, token) {\n p$1._appendCommentNode(token, p$1.openElements.currentTmplContentOrNode);\n}\nfunction appendCommentToRootHtmlElement(p$1, token) {\n p$1._appendCommentNode(token, p$1.openElements.items[0]);\n}\nfunction appendCommentToDocument(p$1, token) {\n p$1._appendCommentNode(token, p$1.document);\n}\nfunction stopParsing(p$1, token) {\n p$1.stopped = true;\n if (token.location) {\n const target = p$1.fragmentContext ? 0 : 2;\n for (let i = p$1.openElements.stackTop; i >= target; i--) p$1._setEndLocation(p$1.openElements.items[i], token);\n if (!p$1.fragmentContext && p$1.openElements.stackTop >= 0) {\n const htmlElement = p$1.openElements.items[0];\n const htmlLocation = p$1.treeAdapter.getNodeSourceCodeLocation(htmlElement);\n if (htmlLocation && !htmlLocation.endTag) {\n p$1._setEndLocation(htmlElement, token);\n if (p$1.openElements.stackTop >= 1) {\n const bodyElement = p$1.openElements.items[1];\n const bodyLocation = p$1.treeAdapter.getNodeSourceCodeLocation(bodyElement);\n if (bodyLocation && !bodyLocation.endTag) p$1._setEndLocation(bodyElement, token);\n }\n }\n }\n }\n}\nfunction doctypeInInitialMode(p$1, token) {\n p$1._setDocumentType(token);\n const mode = token.forceQuirks ? DOCUMENT_MODE.QUIRKS : getDocumentMode(token);\n if (!isConforming(token)) p$1._err(token, ERR.nonConformingDoctype);\n p$1.treeAdapter.setDocumentMode(p$1.document, mode);\n p$1.insertionMode = InsertionMode.BEFORE_HTML;\n}\nfunction tokenInInitialMode(p$1, token) {\n p$1._err(token, ERR.missingDoctype, true);\n p$1.treeAdapter.setDocumentMode(p$1.document, DOCUMENT_MODE.QUIRKS);\n p$1.insertionMode = InsertionMode.BEFORE_HTML;\n p$1._processToken(token);\n}\nfunction startTagBeforeHtml(p$1, token) {\n if (token.tagID === TAG_ID.HTML) {\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.BEFORE_HEAD;\n } else tokenBeforeHtml(p$1, token);\n}\nfunction endTagBeforeHtml(p$1, token) {\n const tn = token.tagID;\n if (tn === TAG_ID.HTML || tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.BR) tokenBeforeHtml(p$1, token);\n}\nfunction tokenBeforeHtml(p$1, token) {\n p$1._insertFakeRootElement();\n p$1.insertionMode = InsertionMode.BEFORE_HEAD;\n p$1._processToken(token);\n}\nfunction startTagBeforeHead(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.HEAD:\n p$1._insertElement(token, NS.HTML);\n p$1.headElement = p$1.openElements.current;\n p$1.insertionMode = InsertionMode.IN_HEAD;\n break;\n default: tokenBeforeHead(p$1, token);\n }\n}\nfunction endTagBeforeHead(p$1, token) {\n const tn = token.tagID;\n if (tn === TAG_ID.HEAD || tn === TAG_ID.BODY || tn === TAG_ID.HTML || tn === TAG_ID.BR) tokenBeforeHead(p$1, token);\n else p$1._err(token, ERR.endTagWithoutMatchingOpenElement);\n}\nfunction tokenBeforeHead(p$1, token) {\n p$1._insertFakeElement(TAG_NAMES.HEAD, TAG_ID.HEAD);\n p$1.headElement = p$1.openElements.current;\n p$1.insertionMode = InsertionMode.IN_HEAD;\n p$1._processToken(token);\n}\nfunction startTagInHead(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.BASE:\n case TAG_ID.BASEFONT:\n case TAG_ID.BGSOUND:\n case TAG_ID.LINK:\n case TAG_ID.META:\n p$1._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n case TAG_ID.TITLE:\n p$1._switchToTextParsing(token, TokenizerMode.RCDATA);\n break;\n case TAG_ID.NOSCRIPT:\n if (p$1.options.scriptingEnabled) p$1._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n else {\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_HEAD_NO_SCRIPT;\n }\n break;\n case TAG_ID.NOFRAMES:\n case TAG_ID.STYLE:\n p$1._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n break;\n case TAG_ID.SCRIPT:\n p$1._switchToTextParsing(token, TokenizerMode.SCRIPT_DATA);\n break;\n case TAG_ID.TEMPLATE:\n p$1._insertTemplate(token);\n p$1.activeFormattingElements.insertMarker();\n p$1.framesetOk = false;\n p$1.insertionMode = InsertionMode.IN_TEMPLATE;\n p$1.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);\n break;\n case TAG_ID.HEAD:\n p$1._err(token, ERR.misplacedStartTagForHeadElement);\n break;\n default: tokenInHead(p$1, token);\n }\n}\nfunction endTagInHead(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HEAD:\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.AFTER_HEAD;\n break;\n case TAG_ID.BODY:\n case TAG_ID.BR:\n case TAG_ID.HTML:\n tokenInHead(p$1, token);\n break;\n case TAG_ID.TEMPLATE:\n templateEndTagInHead(p$1, token);\n break;\n default: p$1._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n}\nfunction templateEndTagInHead(p$1, token) {\n if (p$1.openElements.tmplCount > 0) {\n p$1.openElements.generateImpliedEndTagsThoroughly();\n if (p$1.openElements.currentTagId !== TAG_ID.TEMPLATE) p$1._err(token, ERR.closingOfElementWithOpenChildElements);\n p$1.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);\n p$1.activeFormattingElements.clearToLastMarker();\n p$1.tmplInsertionModeStack.shift();\n p$1._resetInsertionMode();\n } else p$1._err(token, ERR.endTagWithoutMatchingOpenElement);\n}\nfunction tokenInHead(p$1, token) {\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.AFTER_HEAD;\n p$1._processToken(token);\n}\nfunction startTagInHeadNoScript(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.BASEFONT:\n case TAG_ID.BGSOUND:\n case TAG_ID.HEAD:\n case TAG_ID.LINK:\n case TAG_ID.META:\n case TAG_ID.NOFRAMES:\n case TAG_ID.STYLE:\n startTagInHead(p$1, token);\n break;\n case TAG_ID.NOSCRIPT:\n p$1._err(token, ERR.nestedNoscriptInHead);\n break;\n default: tokenInHeadNoScript(p$1, token);\n }\n}\nfunction endTagInHeadNoScript(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.NOSCRIPT:\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_HEAD;\n break;\n case TAG_ID.BR:\n tokenInHeadNoScript(p$1, token);\n break;\n default: p$1._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n}\nfunction tokenInHeadNoScript(p$1, token) {\n const errCode = token.type === TokenType.EOF ? ERR.openElementsLeftAfterEof : ERR.disallowedContentInNoscriptInHead;\n p$1._err(token, errCode);\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_HEAD;\n p$1._processToken(token);\n}\nfunction startTagAfterHead(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.BODY:\n p$1._insertElement(token, NS.HTML);\n p$1.framesetOk = false;\n p$1.insertionMode = InsertionMode.IN_BODY;\n break;\n case TAG_ID.FRAMESET:\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_FRAMESET;\n break;\n case TAG_ID.BASE:\n case TAG_ID.BASEFONT:\n case TAG_ID.BGSOUND:\n case TAG_ID.LINK:\n case TAG_ID.META:\n case TAG_ID.NOFRAMES:\n case TAG_ID.SCRIPT:\n case TAG_ID.STYLE:\n case TAG_ID.TEMPLATE:\n case TAG_ID.TITLE:\n p$1._err(token, ERR.abandonedHeadElementChild);\n p$1.openElements.push(p$1.headElement, TAG_ID.HEAD);\n startTagInHead(p$1, token);\n p$1.openElements.remove(p$1.headElement);\n break;\n case TAG_ID.HEAD:\n p$1._err(token, ERR.misplacedStartTagForHeadElement);\n break;\n default: tokenAfterHead(p$1, token);\n }\n}\nfunction endTagAfterHead(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.BODY:\n case TAG_ID.HTML:\n case TAG_ID.BR:\n tokenAfterHead(p$1, token);\n break;\n case TAG_ID.TEMPLATE:\n templateEndTagInHead(p$1, token);\n break;\n default: p$1._err(token, ERR.endTagWithoutMatchingOpenElement);\n }\n}\nfunction tokenAfterHead(p$1, token) {\n p$1._insertFakeElement(TAG_NAMES.BODY, TAG_ID.BODY);\n p$1.insertionMode = InsertionMode.IN_BODY;\n modeInBody(p$1, token);\n}\nfunction modeInBody(p$1, token) {\n switch (token.type) {\n case TokenType.CHARACTER:\n characterInBody(p$1, token);\n break;\n case TokenType.WHITESPACE_CHARACTER:\n whitespaceCharacterInBody(p$1, token);\n break;\n case TokenType.COMMENT:\n appendComment(p$1, token);\n break;\n case TokenType.START_TAG:\n startTagInBody(p$1, token);\n break;\n case TokenType.END_TAG:\n endTagInBody(p$1, token);\n break;\n case TokenType.EOF:\n eofInBody(p$1, token);\n break;\n default:\n }\n}\nfunction whitespaceCharacterInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertCharacters(token);\n}\nfunction characterInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertCharacters(token);\n p$1.framesetOk = false;\n}\nfunction htmlStartTagInBody(p$1, token) {\n if (p$1.openElements.tmplCount === 0) p$1.treeAdapter.adoptAttributes(p$1.openElements.items[0], token.attrs);\n}\nfunction bodyStartTagInBody(p$1, token) {\n const bodyElement = p$1.openElements.tryPeekProperlyNestedBodyElement();\n if (bodyElement && p$1.openElements.tmplCount === 0) {\n p$1.framesetOk = false;\n p$1.treeAdapter.adoptAttributes(bodyElement, token.attrs);\n }\n}\nfunction framesetStartTagInBody(p$1, token) {\n const bodyElement = p$1.openElements.tryPeekProperlyNestedBodyElement();\n if (p$1.framesetOk && bodyElement) {\n p$1.treeAdapter.detachNode(bodyElement);\n p$1.openElements.popAllUpToHtmlElement();\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_FRAMESET;\n }\n}\nfunction addressStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._insertElement(token, NS.HTML);\n}\nfunction numberedHeaderStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n if (p$1.openElements.currentTagId !== void 0 && NUMBERED_HEADERS.has(p$1.openElements.currentTagId)) p$1.openElements.pop();\n p$1._insertElement(token, NS.HTML);\n}\nfunction preStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._insertElement(token, NS.HTML);\n p$1.skipNextNewLine = true;\n p$1.framesetOk = false;\n}\nfunction formStartTagInBody(p$1, token) {\n const inTemplate = p$1.openElements.tmplCount > 0;\n if (!p$1.formElement || inTemplate) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._insertElement(token, NS.HTML);\n if (!inTemplate) p$1.formElement = p$1.openElements.current;\n }\n}\nfunction listItemStartTagInBody(p$1, token) {\n p$1.framesetOk = false;\n const tn = token.tagID;\n for (let i = p$1.openElements.stackTop; i >= 0; i--) {\n const elementId = p$1.openElements.tagIDs[i];\n if (tn === TAG_ID.LI && elementId === TAG_ID.LI || (tn === TAG_ID.DD || tn === TAG_ID.DT) && (elementId === TAG_ID.DD || elementId === TAG_ID.DT)) {\n p$1.openElements.generateImpliedEndTagsWithExclusion(elementId);\n p$1.openElements.popUntilTagNamePopped(elementId);\n break;\n }\n if (elementId !== TAG_ID.ADDRESS && elementId !== TAG_ID.DIV && elementId !== TAG_ID.P && p$1._isSpecialElement(p$1.openElements.items[i], elementId)) break;\n }\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._insertElement(token, NS.HTML);\n}\nfunction plaintextStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._insertElement(token, NS.HTML);\n p$1.tokenizer.state = TokenizerMode.PLAINTEXT;\n}\nfunction buttonStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInScope(TAG_ID.BUTTON)) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilTagNamePopped(TAG_ID.BUTTON);\n }\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n p$1.framesetOk = false;\n}\nfunction aStartTagInBody(p$1, token) {\n const activeElementEntry = p$1.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);\n if (activeElementEntry) {\n callAdoptionAgency(p$1, token);\n p$1.openElements.remove(activeElementEntry.element);\n p$1.activeFormattingElements.removeEntry(activeElementEntry);\n }\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n p$1.activeFormattingElements.pushElement(p$1.openElements.current, token);\n}\nfunction bStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n p$1.activeFormattingElements.pushElement(p$1.openElements.current, token);\n}\nfunction nobrStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n if (p$1.openElements.hasInScope(TAG_ID.NOBR)) {\n callAdoptionAgency(p$1, token);\n p$1._reconstructActiveFormattingElements();\n }\n p$1._insertElement(token, NS.HTML);\n p$1.activeFormattingElements.pushElement(p$1.openElements.current, token);\n}\nfunction appletStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n p$1.activeFormattingElements.insertMarker();\n p$1.framesetOk = false;\n}\nfunction tableStartTagInBody(p$1, token) {\n if (p$1.treeAdapter.getDocumentMode(p$1.document) !== DOCUMENT_MODE.QUIRKS && p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._insertElement(token, NS.HTML);\n p$1.framesetOk = false;\n p$1.insertionMode = InsertionMode.IN_TABLE;\n}\nfunction areaStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._appendElement(token, NS.HTML);\n p$1.framesetOk = false;\n token.ackSelfClosing = true;\n}\nfunction isHiddenInput(token) {\n const inputType = getTokenAttr(token, ATTRS.TYPE);\n return inputType != null && inputType.toLowerCase() === HIDDEN_INPUT_TYPE;\n}\nfunction inputStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._appendElement(token, NS.HTML);\n if (!isHiddenInput(token)) p$1.framesetOk = false;\n token.ackSelfClosing = true;\n}\nfunction paramStartTagInBody(p$1, token) {\n p$1._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n}\nfunction hrStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._appendElement(token, NS.HTML);\n p$1.framesetOk = false;\n token.ackSelfClosing = true;\n}\nfunction imageStartTagInBody(p$1, token) {\n token.tagName = TAG_NAMES.IMG;\n token.tagID = TAG_ID.IMG;\n areaStartTagInBody(p$1, token);\n}\nfunction textareaStartTagInBody(p$1, token) {\n p$1._insertElement(token, NS.HTML);\n p$1.skipNextNewLine = true;\n p$1.tokenizer.state = TokenizerMode.RCDATA;\n p$1.originalInsertionMode = p$1.insertionMode;\n p$1.framesetOk = false;\n p$1.insertionMode = InsertionMode.TEXT;\n}\nfunction xmpStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._closePElement();\n p$1._reconstructActiveFormattingElements();\n p$1.framesetOk = false;\n p$1._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n}\nfunction iframeStartTagInBody(p$1, token) {\n p$1.framesetOk = false;\n p$1._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n}\nfunction rawTextStartTagInBody(p$1, token) {\n p$1._switchToTextParsing(token, TokenizerMode.RAWTEXT);\n}\nfunction selectStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n p$1.framesetOk = false;\n p$1.insertionMode = p$1.insertionMode === InsertionMode.IN_TABLE || p$1.insertionMode === InsertionMode.IN_CAPTION || p$1.insertionMode === InsertionMode.IN_TABLE_BODY || p$1.insertionMode === InsertionMode.IN_ROW || p$1.insertionMode === InsertionMode.IN_CELL ? InsertionMode.IN_SELECT_IN_TABLE : InsertionMode.IN_SELECT;\n}\nfunction optgroupStartTagInBody(p$1, token) {\n if (p$1.openElements.currentTagId === TAG_ID.OPTION) p$1.openElements.pop();\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n}\nfunction rbStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInScope(TAG_ID.RUBY)) p$1.openElements.generateImpliedEndTags();\n p$1._insertElement(token, NS.HTML);\n}\nfunction rtStartTagInBody(p$1, token) {\n if (p$1.openElements.hasInScope(TAG_ID.RUBY)) p$1.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC);\n p$1._insertElement(token, NS.HTML);\n}\nfunction mathStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n adjustTokenMathMLAttrs(token);\n adjustTokenXMLAttrs(token);\n if (token.selfClosing) p$1._appendElement(token, NS.MATHML);\n else p$1._insertElement(token, NS.MATHML);\n token.ackSelfClosing = true;\n}\nfunction svgStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n adjustTokenSVGAttrs(token);\n adjustTokenXMLAttrs(token);\n if (token.selfClosing) p$1._appendElement(token, NS.SVG);\n else p$1._insertElement(token, NS.SVG);\n token.ackSelfClosing = true;\n}\nfunction genericStartTagInBody(p$1, token) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertElement(token, NS.HTML);\n}\nfunction startTagInBody(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.I:\n case TAG_ID.S:\n case TAG_ID.B:\n case TAG_ID.U:\n case TAG_ID.EM:\n case TAG_ID.TT:\n case TAG_ID.BIG:\n case TAG_ID.CODE:\n case TAG_ID.FONT:\n case TAG_ID.SMALL:\n case TAG_ID.STRIKE:\n case TAG_ID.STRONG:\n bStartTagInBody(p$1, token);\n break;\n case TAG_ID.A:\n aStartTagInBody(p$1, token);\n break;\n case TAG_ID.H1:\n case TAG_ID.H2:\n case TAG_ID.H3:\n case TAG_ID.H4:\n case TAG_ID.H5:\n case TAG_ID.H6:\n numberedHeaderStartTagInBody(p$1, token);\n break;\n case TAG_ID.P:\n case TAG_ID.DL:\n case TAG_ID.OL:\n case TAG_ID.UL:\n case TAG_ID.DIV:\n case TAG_ID.DIR:\n case TAG_ID.NAV:\n case TAG_ID.MAIN:\n case TAG_ID.MENU:\n case TAG_ID.ASIDE:\n case TAG_ID.CENTER:\n case TAG_ID.FIGURE:\n case TAG_ID.FOOTER:\n case TAG_ID.HEADER:\n case TAG_ID.HGROUP:\n case TAG_ID.DIALOG:\n case TAG_ID.DETAILS:\n case TAG_ID.ADDRESS:\n case TAG_ID.ARTICLE:\n case TAG_ID.SEARCH:\n case TAG_ID.SECTION:\n case TAG_ID.SUMMARY:\n case TAG_ID.FIELDSET:\n case TAG_ID.BLOCKQUOTE:\n case TAG_ID.FIGCAPTION:\n addressStartTagInBody(p$1, token);\n break;\n case TAG_ID.LI:\n case TAG_ID.DD:\n case TAG_ID.DT:\n listItemStartTagInBody(p$1, token);\n break;\n case TAG_ID.BR:\n case TAG_ID.IMG:\n case TAG_ID.WBR:\n case TAG_ID.AREA:\n case TAG_ID.EMBED:\n case TAG_ID.KEYGEN:\n areaStartTagInBody(p$1, token);\n break;\n case TAG_ID.HR:\n hrStartTagInBody(p$1, token);\n break;\n case TAG_ID.RB:\n case TAG_ID.RTC:\n rbStartTagInBody(p$1, token);\n break;\n case TAG_ID.RT:\n case TAG_ID.RP:\n rtStartTagInBody(p$1, token);\n break;\n case TAG_ID.PRE:\n case TAG_ID.LISTING:\n preStartTagInBody(p$1, token);\n break;\n case TAG_ID.XMP:\n xmpStartTagInBody(p$1, token);\n break;\n case TAG_ID.SVG:\n svgStartTagInBody(p$1, token);\n break;\n case TAG_ID.HTML:\n htmlStartTagInBody(p$1, token);\n break;\n case TAG_ID.BASE:\n case TAG_ID.LINK:\n case TAG_ID.META:\n case TAG_ID.STYLE:\n case TAG_ID.TITLE:\n case TAG_ID.SCRIPT:\n case TAG_ID.BGSOUND:\n case TAG_ID.BASEFONT:\n case TAG_ID.TEMPLATE:\n startTagInHead(p$1, token);\n break;\n case TAG_ID.BODY:\n bodyStartTagInBody(p$1, token);\n break;\n case TAG_ID.FORM:\n formStartTagInBody(p$1, token);\n break;\n case TAG_ID.NOBR:\n nobrStartTagInBody(p$1, token);\n break;\n case TAG_ID.MATH:\n mathStartTagInBody(p$1, token);\n break;\n case TAG_ID.TABLE:\n tableStartTagInBody(p$1, token);\n break;\n case TAG_ID.INPUT:\n inputStartTagInBody(p$1, token);\n break;\n case TAG_ID.PARAM:\n case TAG_ID.TRACK:\n case TAG_ID.SOURCE:\n paramStartTagInBody(p$1, token);\n break;\n case TAG_ID.IMAGE:\n imageStartTagInBody(p$1, token);\n break;\n case TAG_ID.BUTTON:\n buttonStartTagInBody(p$1, token);\n break;\n case TAG_ID.APPLET:\n case TAG_ID.OBJECT:\n case TAG_ID.MARQUEE:\n appletStartTagInBody(p$1, token);\n break;\n case TAG_ID.IFRAME:\n iframeStartTagInBody(p$1, token);\n break;\n case TAG_ID.SELECT:\n selectStartTagInBody(p$1, token);\n break;\n case TAG_ID.OPTION:\n case TAG_ID.OPTGROUP:\n optgroupStartTagInBody(p$1, token);\n break;\n case TAG_ID.NOEMBED:\n case TAG_ID.NOFRAMES:\n rawTextStartTagInBody(p$1, token);\n break;\n case TAG_ID.FRAMESET:\n framesetStartTagInBody(p$1, token);\n break;\n case TAG_ID.TEXTAREA:\n textareaStartTagInBody(p$1, token);\n break;\n case TAG_ID.NOSCRIPT:\n if (p$1.options.scriptingEnabled) rawTextStartTagInBody(p$1, token);\n else genericStartTagInBody(p$1, token);\n break;\n case TAG_ID.PLAINTEXT:\n plaintextStartTagInBody(p$1, token);\n break;\n case TAG_ID.COL:\n case TAG_ID.TH:\n case TAG_ID.TD:\n case TAG_ID.TR:\n case TAG_ID.HEAD:\n case TAG_ID.FRAME:\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n case TAG_ID.CAPTION:\n case TAG_ID.COLGROUP: break;\n default: genericStartTagInBody(p$1, token);\n }\n}\nfunction bodyEndTagInBody(p$1, token) {\n if (p$1.openElements.hasInScope(TAG_ID.BODY)) {\n p$1.insertionMode = InsertionMode.AFTER_BODY;\n if (p$1.options.sourceCodeLocationInfo) {\n const bodyElement = p$1.openElements.tryPeekProperlyNestedBodyElement();\n if (bodyElement) p$1._setEndLocation(bodyElement, token);\n }\n }\n}\nfunction htmlEndTagInBody(p$1, token) {\n if (p$1.openElements.hasInScope(TAG_ID.BODY)) {\n p$1.insertionMode = InsertionMode.AFTER_BODY;\n endTagAfterBody(p$1, token);\n }\n}\nfunction addressEndTagInBody(p$1, token) {\n const tn = token.tagID;\n if (p$1.openElements.hasInScope(tn)) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilTagNamePopped(tn);\n }\n}\nfunction formEndTagInBody(p$1) {\n const inTemplate = p$1.openElements.tmplCount > 0;\n const { formElement } = p$1;\n if (!inTemplate) p$1.formElement = null;\n if ((formElement || inTemplate) && p$1.openElements.hasInScope(TAG_ID.FORM)) {\n p$1.openElements.generateImpliedEndTags();\n if (inTemplate) p$1.openElements.popUntilTagNamePopped(TAG_ID.FORM);\n else if (formElement) p$1.openElements.remove(formElement);\n }\n}\nfunction pEndTagInBody(p$1) {\n if (!p$1.openElements.hasInButtonScope(TAG_ID.P)) p$1._insertFakeElement(TAG_NAMES.P, TAG_ID.P);\n p$1._closePElement();\n}\nfunction liEndTagInBody(p$1) {\n if (p$1.openElements.hasInListItemScope(TAG_ID.LI)) {\n p$1.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI);\n p$1.openElements.popUntilTagNamePopped(TAG_ID.LI);\n }\n}\nfunction ddEndTagInBody(p$1, token) {\n const tn = token.tagID;\n if (p$1.openElements.hasInScope(tn)) {\n p$1.openElements.generateImpliedEndTagsWithExclusion(tn);\n p$1.openElements.popUntilTagNamePopped(tn);\n }\n}\nfunction numberedHeaderEndTagInBody(p$1) {\n if (p$1.openElements.hasNumberedHeaderInScope()) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilNumberedHeaderPopped();\n }\n}\nfunction appletEndTagInBody(p$1, token) {\n const tn = token.tagID;\n if (p$1.openElements.hasInScope(tn)) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilTagNamePopped(tn);\n p$1.activeFormattingElements.clearToLastMarker();\n }\n}\nfunction brEndTagInBody(p$1) {\n p$1._reconstructActiveFormattingElements();\n p$1._insertFakeElement(TAG_NAMES.BR, TAG_ID.BR);\n p$1.openElements.pop();\n p$1.framesetOk = false;\n}\nfunction genericEndTagInBody(p$1, token) {\n const tn = token.tagName;\n const tid = token.tagID;\n for (let i = p$1.openElements.stackTop; i > 0; i--) {\n const element$3 = p$1.openElements.items[i];\n const elementId = p$1.openElements.tagIDs[i];\n if (tid === elementId && (tid !== TAG_ID.UNKNOWN || p$1.treeAdapter.getTagName(element$3) === tn)) {\n p$1.openElements.generateImpliedEndTagsWithExclusion(tid);\n if (p$1.openElements.stackTop >= i) p$1.openElements.shortenToLength(i);\n break;\n }\n if (p$1._isSpecialElement(element$3, elementId)) break;\n }\n}\nfunction endTagInBody(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.A:\n case TAG_ID.B:\n case TAG_ID.I:\n case TAG_ID.S:\n case TAG_ID.U:\n case TAG_ID.EM:\n case TAG_ID.TT:\n case TAG_ID.BIG:\n case TAG_ID.CODE:\n case TAG_ID.FONT:\n case TAG_ID.NOBR:\n case TAG_ID.SMALL:\n case TAG_ID.STRIKE:\n case TAG_ID.STRONG:\n callAdoptionAgency(p$1, token);\n break;\n case TAG_ID.P:\n pEndTagInBody(p$1);\n break;\n case TAG_ID.DL:\n case TAG_ID.UL:\n case TAG_ID.OL:\n case TAG_ID.DIR:\n case TAG_ID.DIV:\n case TAG_ID.NAV:\n case TAG_ID.PRE:\n case TAG_ID.MAIN:\n case TAG_ID.MENU:\n case TAG_ID.ASIDE:\n case TAG_ID.BUTTON:\n case TAG_ID.CENTER:\n case TAG_ID.FIGURE:\n case TAG_ID.FOOTER:\n case TAG_ID.HEADER:\n case TAG_ID.HGROUP:\n case TAG_ID.DIALOG:\n case TAG_ID.ADDRESS:\n case TAG_ID.ARTICLE:\n case TAG_ID.DETAILS:\n case TAG_ID.SEARCH:\n case TAG_ID.SECTION:\n case TAG_ID.SUMMARY:\n case TAG_ID.LISTING:\n case TAG_ID.FIELDSET:\n case TAG_ID.BLOCKQUOTE:\n case TAG_ID.FIGCAPTION:\n addressEndTagInBody(p$1, token);\n break;\n case TAG_ID.LI:\n liEndTagInBody(p$1);\n break;\n case TAG_ID.DD:\n case TAG_ID.DT:\n ddEndTagInBody(p$1, token);\n break;\n case TAG_ID.H1:\n case TAG_ID.H2:\n case TAG_ID.H3:\n case TAG_ID.H4:\n case TAG_ID.H5:\n case TAG_ID.H6:\n numberedHeaderEndTagInBody(p$1);\n break;\n case TAG_ID.BR:\n brEndTagInBody(p$1);\n break;\n case TAG_ID.BODY:\n bodyEndTagInBody(p$1, token);\n break;\n case TAG_ID.HTML:\n htmlEndTagInBody(p$1, token);\n break;\n case TAG_ID.FORM:\n formEndTagInBody(p$1);\n break;\n case TAG_ID.APPLET:\n case TAG_ID.OBJECT:\n case TAG_ID.MARQUEE:\n appletEndTagInBody(p$1, token);\n break;\n case TAG_ID.TEMPLATE:\n templateEndTagInHead(p$1, token);\n break;\n default: genericEndTagInBody(p$1, token);\n }\n}\nfunction eofInBody(p$1, token) {\n if (p$1.tmplInsertionModeStack.length > 0) eofInTemplate(p$1, token);\n else stopParsing(p$1, token);\n}\nfunction endTagInText(p$1, token) {\n var _a;\n if (token.tagID === TAG_ID.SCRIPT) (_a = p$1.scriptHandler) === null || _a === void 0 || _a.call(p$1, p$1.openElements.current);\n p$1.openElements.pop();\n p$1.insertionMode = p$1.originalInsertionMode;\n}\nfunction eofInText(p$1, token) {\n p$1._err(token, ERR.eofInElementThatCanContainOnlyText);\n p$1.openElements.pop();\n p$1.insertionMode = p$1.originalInsertionMode;\n p$1.onEof(token);\n}\nfunction characterInTable(p$1, token) {\n if (p$1.openElements.currentTagId !== void 0 && TABLE_STRUCTURE_TAGS.has(p$1.openElements.currentTagId)) {\n p$1.pendingCharacterTokens.length = 0;\n p$1.hasNonWhitespacePendingCharacterToken = false;\n p$1.originalInsertionMode = p$1.insertionMode;\n p$1.insertionMode = InsertionMode.IN_TABLE_TEXT;\n switch (token.type) {\n case TokenType.CHARACTER:\n characterInTableText(p$1, token);\n break;\n case TokenType.WHITESPACE_CHARACTER:\n whitespaceCharacterInTableText(p$1, token);\n break;\n }\n } else tokenInTable(p$1, token);\n}\nfunction captionStartTagInTable(p$1, token) {\n p$1.openElements.clearBackToTableContext();\n p$1.activeFormattingElements.insertMarker();\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_CAPTION;\n}\nfunction colgroupStartTagInTable(p$1, token) {\n p$1.openElements.clearBackToTableContext();\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n}\nfunction colStartTagInTable(p$1, token) {\n p$1.openElements.clearBackToTableContext();\n p$1._insertFakeElement(TAG_NAMES.COLGROUP, TAG_ID.COLGROUP);\n p$1.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n startTagInColumnGroup(p$1, token);\n}\nfunction tbodyStartTagInTable(p$1, token) {\n p$1.openElements.clearBackToTableContext();\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n}\nfunction tdStartTagInTable(p$1, token) {\n p$1.openElements.clearBackToTableContext();\n p$1._insertFakeElement(TAG_NAMES.TBODY, TAG_ID.TBODY);\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n startTagInTableBody(p$1, token);\n}\nfunction tableStartTagInTable(p$1, token) {\n if (p$1.openElements.hasInTableScope(TAG_ID.TABLE)) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.TABLE);\n p$1._resetInsertionMode();\n p$1._processStartTag(token);\n }\n}\nfunction inputStartTagInTable(p$1, token) {\n if (isHiddenInput(token)) p$1._appendElement(token, NS.HTML);\n else tokenInTable(p$1, token);\n token.ackSelfClosing = true;\n}\nfunction formStartTagInTable(p$1, token) {\n if (!p$1.formElement && p$1.openElements.tmplCount === 0) {\n p$1._insertElement(token, NS.HTML);\n p$1.formElement = p$1.openElements.current;\n p$1.openElements.pop();\n }\n}\nfunction startTagInTable(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.TD:\n case TAG_ID.TH:\n case TAG_ID.TR:\n tdStartTagInTable(p$1, token);\n break;\n case TAG_ID.STYLE:\n case TAG_ID.SCRIPT:\n case TAG_ID.TEMPLATE:\n startTagInHead(p$1, token);\n break;\n case TAG_ID.COL:\n colStartTagInTable(p$1, token);\n break;\n case TAG_ID.FORM:\n formStartTagInTable(p$1, token);\n break;\n case TAG_ID.TABLE:\n tableStartTagInTable(p$1, token);\n break;\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n tbodyStartTagInTable(p$1, token);\n break;\n case TAG_ID.INPUT:\n inputStartTagInTable(p$1, token);\n break;\n case TAG_ID.CAPTION:\n captionStartTagInTable(p$1, token);\n break;\n case TAG_ID.COLGROUP:\n colgroupStartTagInTable(p$1, token);\n break;\n default: tokenInTable(p$1, token);\n }\n}\nfunction endTagInTable(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.TABLE:\n if (p$1.openElements.hasInTableScope(TAG_ID.TABLE)) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.TABLE);\n p$1._resetInsertionMode();\n }\n break;\n case TAG_ID.TEMPLATE:\n templateEndTagInHead(p$1, token);\n break;\n case TAG_ID.BODY:\n case TAG_ID.CAPTION:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.HTML:\n case TAG_ID.TBODY:\n case TAG_ID.TD:\n case TAG_ID.TFOOT:\n case TAG_ID.TH:\n case TAG_ID.THEAD:\n case TAG_ID.TR: break;\n default: tokenInTable(p$1, token);\n }\n}\nfunction tokenInTable(p$1, token) {\n const savedFosterParentingState = p$1.fosterParentingEnabled;\n p$1.fosterParentingEnabled = true;\n modeInBody(p$1, token);\n p$1.fosterParentingEnabled = savedFosterParentingState;\n}\nfunction whitespaceCharacterInTableText(p$1, token) {\n p$1.pendingCharacterTokens.push(token);\n}\nfunction characterInTableText(p$1, token) {\n p$1.pendingCharacterTokens.push(token);\n p$1.hasNonWhitespacePendingCharacterToken = true;\n}\nfunction tokenInTableText(p$1, token) {\n let i = 0;\n if (p$1.hasNonWhitespacePendingCharacterToken) for (; i < p$1.pendingCharacterTokens.length; i++) tokenInTable(p$1, p$1.pendingCharacterTokens[i]);\n else for (; i < p$1.pendingCharacterTokens.length; i++) p$1._insertCharacters(p$1.pendingCharacterTokens[i]);\n p$1.insertionMode = p$1.originalInsertionMode;\n p$1._processToken(token);\n}\nconst TABLE_VOID_ELEMENTS = new Set([\n TAG_ID.CAPTION,\n TAG_ID.COL,\n TAG_ID.COLGROUP,\n TAG_ID.TBODY,\n TAG_ID.TD,\n TAG_ID.TFOOT,\n TAG_ID.TH,\n TAG_ID.THEAD,\n TAG_ID.TR\n]);\nfunction startTagInCaption(p$1, token) {\n const tn = token.tagID;\n if (TABLE_VOID_ELEMENTS.has(tn)) {\n if (p$1.openElements.hasInTableScope(TAG_ID.CAPTION)) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);\n p$1.activeFormattingElements.clearToLastMarker();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n startTagInTable(p$1, token);\n }\n } else startTagInBody(p$1, token);\n}\nfunction endTagInCaption(p$1, token) {\n const tn = token.tagID;\n switch (tn) {\n case TAG_ID.CAPTION:\n case TAG_ID.TABLE:\n if (p$1.openElements.hasInTableScope(TAG_ID.CAPTION)) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilTagNamePopped(TAG_ID.CAPTION);\n p$1.activeFormattingElements.clearToLastMarker();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n if (tn === TAG_ID.TABLE) endTagInTable(p$1, token);\n }\n break;\n case TAG_ID.BODY:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.HTML:\n case TAG_ID.TBODY:\n case TAG_ID.TD:\n case TAG_ID.TFOOT:\n case TAG_ID.TH:\n case TAG_ID.THEAD:\n case TAG_ID.TR: break;\n default: endTagInBody(p$1, token);\n }\n}\nfunction startTagInColumnGroup(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.COL:\n p$1._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n case TAG_ID.TEMPLATE:\n startTagInHead(p$1, token);\n break;\n default: tokenInColumnGroup(p$1, token);\n }\n}\nfunction endTagInColumnGroup(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.COLGROUP:\n if (p$1.openElements.currentTagId === TAG_ID.COLGROUP) {\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n }\n break;\n case TAG_ID.TEMPLATE:\n templateEndTagInHead(p$1, token);\n break;\n case TAG_ID.COL: break;\n default: tokenInColumnGroup(p$1, token);\n }\n}\nfunction tokenInColumnGroup(p$1, token) {\n if (p$1.openElements.currentTagId === TAG_ID.COLGROUP) {\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n p$1._processToken(token);\n }\n}\nfunction startTagInTableBody(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.TR:\n p$1.openElements.clearBackToTableBodyContext();\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_ROW;\n break;\n case TAG_ID.TH:\n case TAG_ID.TD:\n p$1.openElements.clearBackToTableBodyContext();\n p$1._insertFakeElement(TAG_NAMES.TR, TAG_ID.TR);\n p$1.insertionMode = InsertionMode.IN_ROW;\n startTagInRow(p$1, token);\n break;\n case TAG_ID.CAPTION:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n if (p$1.openElements.hasTableBodyContextInTableScope()) {\n p$1.openElements.clearBackToTableBodyContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n startTagInTable(p$1, token);\n }\n break;\n default: startTagInTable(p$1, token);\n }\n}\nfunction endTagInTableBody(p$1, token) {\n const tn = token.tagID;\n switch (token.tagID) {\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n if (p$1.openElements.hasInTableScope(tn)) {\n p$1.openElements.clearBackToTableBodyContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n }\n break;\n case TAG_ID.TABLE:\n if (p$1.openElements.hasTableBodyContextInTableScope()) {\n p$1.openElements.clearBackToTableBodyContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE;\n endTagInTable(p$1, token);\n }\n break;\n case TAG_ID.BODY:\n case TAG_ID.CAPTION:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.HTML:\n case TAG_ID.TD:\n case TAG_ID.TH:\n case TAG_ID.TR: break;\n default: endTagInTable(p$1, token);\n }\n}\nfunction startTagInRow(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.TH:\n case TAG_ID.TD:\n p$1.openElements.clearBackToTableRowContext();\n p$1._insertElement(token, NS.HTML);\n p$1.insertionMode = InsertionMode.IN_CELL;\n p$1.activeFormattingElements.insertMarker();\n break;\n case TAG_ID.CAPTION:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n case TAG_ID.TR:\n if (p$1.openElements.hasInTableScope(TAG_ID.TR)) {\n p$1.openElements.clearBackToTableRowContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n startTagInTableBody(p$1, token);\n }\n break;\n default: startTagInTable(p$1, token);\n }\n}\nfunction endTagInRow(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.TR:\n if (p$1.openElements.hasInTableScope(TAG_ID.TR)) {\n p$1.openElements.clearBackToTableRowContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n }\n break;\n case TAG_ID.TABLE:\n if (p$1.openElements.hasInTableScope(TAG_ID.TR)) {\n p$1.openElements.clearBackToTableRowContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n endTagInTableBody(p$1, token);\n }\n break;\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n if (p$1.openElements.hasInTableScope(token.tagID) || p$1.openElements.hasInTableScope(TAG_ID.TR)) {\n p$1.openElements.clearBackToTableRowContext();\n p$1.openElements.pop();\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n endTagInTableBody(p$1, token);\n }\n break;\n case TAG_ID.BODY:\n case TAG_ID.CAPTION:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.HTML:\n case TAG_ID.TD:\n case TAG_ID.TH: break;\n default: endTagInTable(p$1, token);\n }\n}\nfunction startTagInCell(p$1, token) {\n const tn = token.tagID;\n if (TABLE_VOID_ELEMENTS.has(tn)) {\n if (p$1.openElements.hasInTableScope(TAG_ID.TD) || p$1.openElements.hasInTableScope(TAG_ID.TH)) {\n p$1._closeTableCell();\n startTagInRow(p$1, token);\n }\n } else startTagInBody(p$1, token);\n}\nfunction endTagInCell(p$1, token) {\n const tn = token.tagID;\n switch (tn) {\n case TAG_ID.TD:\n case TAG_ID.TH:\n if (p$1.openElements.hasInTableScope(tn)) {\n p$1.openElements.generateImpliedEndTags();\n p$1.openElements.popUntilTagNamePopped(tn);\n p$1.activeFormattingElements.clearToLastMarker();\n p$1.insertionMode = InsertionMode.IN_ROW;\n }\n break;\n case TAG_ID.TABLE:\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n case TAG_ID.TR:\n if (p$1.openElements.hasInTableScope(tn)) {\n p$1._closeTableCell();\n endTagInRow(p$1, token);\n }\n break;\n case TAG_ID.BODY:\n case TAG_ID.CAPTION:\n case TAG_ID.COL:\n case TAG_ID.COLGROUP:\n case TAG_ID.HTML: break;\n default: endTagInBody(p$1, token);\n }\n}\nfunction startTagInSelect(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.OPTION:\n if (p$1.openElements.currentTagId === TAG_ID.OPTION) p$1.openElements.pop();\n p$1._insertElement(token, NS.HTML);\n break;\n case TAG_ID.OPTGROUP:\n if (p$1.openElements.currentTagId === TAG_ID.OPTION) p$1.openElements.pop();\n if (p$1.openElements.currentTagId === TAG_ID.OPTGROUP) p$1.openElements.pop();\n p$1._insertElement(token, NS.HTML);\n break;\n case TAG_ID.HR:\n if (p$1.openElements.currentTagId === TAG_ID.OPTION) p$1.openElements.pop();\n if (p$1.openElements.currentTagId === TAG_ID.OPTGROUP) p$1.openElements.pop();\n p$1._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n case TAG_ID.INPUT:\n case TAG_ID.KEYGEN:\n case TAG_ID.TEXTAREA:\n case TAG_ID.SELECT:\n if (p$1.openElements.hasInSelectScope(TAG_ID.SELECT)) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n p$1._resetInsertionMode();\n if (token.tagID !== TAG_ID.SELECT) p$1._processStartTag(token);\n }\n break;\n case TAG_ID.SCRIPT:\n case TAG_ID.TEMPLATE:\n startTagInHead(p$1, token);\n break;\n default:\n }\n}\nfunction endTagInSelect(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.OPTGROUP:\n if (p$1.openElements.stackTop > 0 && p$1.openElements.currentTagId === TAG_ID.OPTION && p$1.openElements.tagIDs[p$1.openElements.stackTop - 1] === TAG_ID.OPTGROUP) p$1.openElements.pop();\n if (p$1.openElements.currentTagId === TAG_ID.OPTGROUP) p$1.openElements.pop();\n break;\n case TAG_ID.OPTION:\n if (p$1.openElements.currentTagId === TAG_ID.OPTION) p$1.openElements.pop();\n break;\n case TAG_ID.SELECT:\n if (p$1.openElements.hasInSelectScope(TAG_ID.SELECT)) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n p$1._resetInsertionMode();\n }\n break;\n case TAG_ID.TEMPLATE:\n templateEndTagInHead(p$1, token);\n break;\n default:\n }\n}\nfunction startTagInSelectInTable(p$1, token) {\n const tn = token.tagID;\n if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n p$1._resetInsertionMode();\n p$1._processStartTag(token);\n } else startTagInSelect(p$1, token);\n}\nfunction endTagInSelectInTable(p$1, token) {\n const tn = token.tagID;\n if (tn === TAG_ID.CAPTION || tn === TAG_ID.TABLE || tn === TAG_ID.TBODY || tn === TAG_ID.TFOOT || tn === TAG_ID.THEAD || tn === TAG_ID.TR || tn === TAG_ID.TD || tn === TAG_ID.TH) {\n if (p$1.openElements.hasInTableScope(tn)) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.SELECT);\n p$1._resetInsertionMode();\n p$1.onEndTag(token);\n }\n } else endTagInSelect(p$1, token);\n}\nfunction startTagInTemplate(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.BASE:\n case TAG_ID.BASEFONT:\n case TAG_ID.BGSOUND:\n case TAG_ID.LINK:\n case TAG_ID.META:\n case TAG_ID.NOFRAMES:\n case TAG_ID.SCRIPT:\n case TAG_ID.STYLE:\n case TAG_ID.TEMPLATE:\n case TAG_ID.TITLE:\n startTagInHead(p$1, token);\n break;\n case TAG_ID.CAPTION:\n case TAG_ID.COLGROUP:\n case TAG_ID.TBODY:\n case TAG_ID.TFOOT:\n case TAG_ID.THEAD:\n p$1.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE;\n p$1.insertionMode = InsertionMode.IN_TABLE;\n startTagInTable(p$1, token);\n break;\n case TAG_ID.COL:\n p$1.tmplInsertionModeStack[0] = InsertionMode.IN_COLUMN_GROUP;\n p$1.insertionMode = InsertionMode.IN_COLUMN_GROUP;\n startTagInColumnGroup(p$1, token);\n break;\n case TAG_ID.TR:\n p$1.tmplInsertionModeStack[0] = InsertionMode.IN_TABLE_BODY;\n p$1.insertionMode = InsertionMode.IN_TABLE_BODY;\n startTagInTableBody(p$1, token);\n break;\n case TAG_ID.TD:\n case TAG_ID.TH:\n p$1.tmplInsertionModeStack[0] = InsertionMode.IN_ROW;\n p$1.insertionMode = InsertionMode.IN_ROW;\n startTagInRow(p$1, token);\n break;\n default:\n p$1.tmplInsertionModeStack[0] = InsertionMode.IN_BODY;\n p$1.insertionMode = InsertionMode.IN_BODY;\n startTagInBody(p$1, token);\n }\n}\nfunction endTagInTemplate(p$1, token) {\n if (token.tagID === TAG_ID.TEMPLATE) templateEndTagInHead(p$1, token);\n}\nfunction eofInTemplate(p$1, token) {\n if (p$1.openElements.tmplCount > 0) {\n p$1.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE);\n p$1.activeFormattingElements.clearToLastMarker();\n p$1.tmplInsertionModeStack.shift();\n p$1._resetInsertionMode();\n p$1.onEof(token);\n } else stopParsing(p$1, token);\n}\nfunction startTagAfterBody(p$1, token) {\n if (token.tagID === TAG_ID.HTML) startTagInBody(p$1, token);\n else tokenAfterBody(p$1, token);\n}\nfunction endTagAfterBody(p$1, token) {\n var _a;\n if (token.tagID === TAG_ID.HTML) {\n if (!p$1.fragmentContext) p$1.insertionMode = InsertionMode.AFTER_AFTER_BODY;\n if (p$1.options.sourceCodeLocationInfo && p$1.openElements.tagIDs[0] === TAG_ID.HTML) {\n p$1._setEndLocation(p$1.openElements.items[0], token);\n const bodyElement = p$1.openElements.items[1];\n if (bodyElement && !((_a = p$1.treeAdapter.getNodeSourceCodeLocation(bodyElement)) === null || _a === void 0 ? void 0 : _a.endTag)) p$1._setEndLocation(bodyElement, token);\n }\n } else tokenAfterBody(p$1, token);\n}\nfunction tokenAfterBody(p$1, token) {\n p$1.insertionMode = InsertionMode.IN_BODY;\n modeInBody(p$1, token);\n}\nfunction startTagInFrameset(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.FRAMESET:\n p$1._insertElement(token, NS.HTML);\n break;\n case TAG_ID.FRAME:\n p$1._appendElement(token, NS.HTML);\n token.ackSelfClosing = true;\n break;\n case TAG_ID.NOFRAMES:\n startTagInHead(p$1, token);\n break;\n default:\n }\n}\nfunction endTagInFrameset(p$1, token) {\n if (token.tagID === TAG_ID.FRAMESET && !p$1.openElements.isRootHtmlElementCurrent()) {\n p$1.openElements.pop();\n if (!p$1.fragmentContext && p$1.openElements.currentTagId !== TAG_ID.FRAMESET) p$1.insertionMode = InsertionMode.AFTER_FRAMESET;\n }\n}\nfunction startTagAfterFrameset(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.NOFRAMES:\n startTagInHead(p$1, token);\n break;\n default:\n }\n}\nfunction endTagAfterFrameset(p$1, token) {\n if (token.tagID === TAG_ID.HTML) p$1.insertionMode = InsertionMode.AFTER_AFTER_FRAMESET;\n}\nfunction startTagAfterAfterBody(p$1, token) {\n if (token.tagID === TAG_ID.HTML) startTagInBody(p$1, token);\n else tokenAfterAfterBody(p$1, token);\n}\nfunction tokenAfterAfterBody(p$1, token) {\n p$1.insertionMode = InsertionMode.IN_BODY;\n modeInBody(p$1, token);\n}\nfunction startTagAfterAfterFrameset(p$1, token) {\n switch (token.tagID) {\n case TAG_ID.HTML:\n startTagInBody(p$1, token);\n break;\n case TAG_ID.NOFRAMES:\n startTagInHead(p$1, token);\n break;\n default:\n }\n}\nfunction nullCharacterInForeignContent(p$1, token) {\n token.chars = REPLACEMENT_CHARACTER;\n p$1._insertCharacters(token);\n}\nfunction characterInForeignContent(p$1, token) {\n p$1._insertCharacters(token);\n p$1.framesetOk = false;\n}\nfunction popUntilHtmlOrIntegrationPoint(p$1) {\n while (p$1.treeAdapter.getNamespaceURI(p$1.openElements.current) !== NS.HTML && p$1.openElements.currentTagId !== void 0 && !p$1._isIntegrationPoint(p$1.openElements.currentTagId, p$1.openElements.current)) p$1.openElements.pop();\n}\nfunction startTagInForeignContent(p$1, token) {\n if (causesExit(token)) {\n popUntilHtmlOrIntegrationPoint(p$1);\n p$1._startTagOutsideForeignContent(token);\n } else {\n const current = p$1._getAdjustedCurrentElement();\n const currentNs = p$1.treeAdapter.getNamespaceURI(current);\n if (currentNs === NS.MATHML) adjustTokenMathMLAttrs(token);\n else if (currentNs === NS.SVG) {\n adjustTokenSVGTagName(token);\n adjustTokenSVGAttrs(token);\n }\n adjustTokenXMLAttrs(token);\n if (token.selfClosing) p$1._appendElement(token, currentNs);\n else p$1._insertElement(token, currentNs);\n token.ackSelfClosing = true;\n }\n}\nfunction endTagInForeignContent(p$1, token) {\n if (token.tagID === TAG_ID.P || token.tagID === TAG_ID.BR) {\n popUntilHtmlOrIntegrationPoint(p$1);\n p$1._endTagOutsideForeignContent(token);\n return;\n }\n for (let i = p$1.openElements.stackTop; i > 0; i--) {\n const element$3 = p$1.openElements.items[i];\n if (p$1.treeAdapter.getNamespaceURI(element$3) === NS.HTML) {\n p$1._endTagOutsideForeignContent(token);\n break;\n }\n const tagName = p$1.treeAdapter.getTagName(element$3);\n if (tagName.toLowerCase() === token.tagName) {\n token.tagName = tagName;\n p$1.openElements.shortenToLength(i);\n break;\n }\n }\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/serializer/index.js\nconst VOID_ELEMENTS = new Set([\n TAG_NAMES.AREA,\n TAG_NAMES.BASE,\n TAG_NAMES.BASEFONT,\n TAG_NAMES.BGSOUND,\n TAG_NAMES.BR,\n TAG_NAMES.COL,\n TAG_NAMES.EMBED,\n TAG_NAMES.FRAME,\n TAG_NAMES.HR,\n TAG_NAMES.IMG,\n TAG_NAMES.INPUT,\n TAG_NAMES.KEYGEN,\n TAG_NAMES.LINK,\n TAG_NAMES.META,\n TAG_NAMES.PARAM,\n TAG_NAMES.SOURCE,\n TAG_NAMES.TRACK,\n TAG_NAMES.WBR\n]);\n\n//#endregion\n//#region ../../node_modules/.pnpm/parse5@8.0.1/node_modules/parse5/dist/index.js\nfunction parseFragment(fragmentContext, html$4, options) {\n if (typeof fragmentContext === \"string\") {\n options = html$4;\n html$4 = fragmentContext;\n fragmentContext = null;\n }\n const parser = Parser.getFragmentParser(fragmentContext, options);\n parser.tokenizer.write(html$4, true);\n return parser.getFragment();\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-parse-selector@4.0.0/node_modules/hast-util-parse-selector/lib/index.js\n/**\n* @typedef {import('hast').Element} Element\n* @typedef {import('hast').Properties} Properties\n*/\n/**\n* @template {string} SimpleSelector\n* Selector type.\n* @template {string} DefaultTagName\n* Default tag name.\n* @typedef {(\n* SimpleSelector extends ''\n* ? DefaultTagName\n* : SimpleSelector extends `${infer TagName}.${infer Rest}`\n* ? ExtractTagName<TagName, DefaultTagName>\n* : SimpleSelector extends `${infer TagName}#${infer Rest}`\n* ? ExtractTagName<TagName, DefaultTagName>\n* : SimpleSelector extends string\n* ? SimpleSelector\n* : DefaultTagName\n* )} ExtractTagName\n* Extract tag name from a simple selector.\n*/\nconst search = /[#.]/g;\n/**\n* Create a hast element from a simple CSS selector.\n*\n* @template {string} Selector\n* Type of selector.\n* @template {string} [DefaultTagName='div']\n* Type of default tag name (default: `'div'`).\n* @param {Selector | null | undefined} [selector]\n* Simple CSS selector (optional).\n*\n* Can contain a tag name (`foo`), classes (`.bar`), and an ID (`#baz`).\n* Multiple classes are allowed.\n* Uses the last ID if multiple IDs are found.\n* @param {DefaultTagName | null | undefined} [defaultTagName='div']\n* Tag name to use if `selector` does not specify one (default: `'div'`).\n* @returns {Element & {tagName: ExtractTagName<Selector, DefaultTagName>}}\n* Built element.\n*/\nfunction parseSelector(selector, defaultTagName) {\n const value = selector || \"\";\n /** @type {Properties} */\n const props = {};\n let start = 0;\n /** @type {string | undefined} */\n let previous;\n /** @type {string | undefined} */\n let tagName;\n while (start < value.length) {\n search.lastIndex = start;\n const match = search.exec(value);\n const subvalue = value.slice(start, match ? match.index : value.length);\n if (subvalue) {\n if (!previous) tagName = subvalue;\n else if (previous === \"#\") props.id = subvalue;\n else if (Array.isArray(props.className)) props.className.push(subvalue);\n else props.className = [subvalue];\n start += subvalue.length;\n }\n if (match) {\n previous = match[0];\n start++;\n }\n }\n return {\n type: \"element\",\n tagName: tagName || defaultTagName || \"div\",\n properties: props,\n children: []\n };\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/create-h.js\n/**\n* @import {Element, Nodes, RootContent, Root} from 'hast'\n* @import {Info, Schema} from 'property-information'\n*/\n/**\n* @typedef {Array<Nodes | PrimitiveChild>} ArrayChildNested\n* List of children (deep).\n*/\n/**\n* @typedef {Array<ArrayChildNested | Nodes | PrimitiveChild>} ArrayChild\n* List of children.\n*/\n/**\n* @typedef {Array<number | string>} ArrayValue\n* List of property values for space- or comma separated values (such as `className`).\n*/\n/**\n* @typedef {ArrayChild | Nodes | PrimitiveChild} Child\n* Acceptable child value.\n*/\n/**\n* @typedef {number | string | null | undefined} PrimitiveChild\n* Primitive children, either ignored (nullish), or turned into text nodes.\n*/\n/**\n* @typedef {boolean | number | string | null | undefined} PrimitiveValue\n* Primitive property value.\n*/\n/**\n* @typedef {Record<string, PropertyValue | Style>} Properties\n* Acceptable value for element properties.\n*/\n/**\n* @typedef {ArrayValue | PrimitiveValue} PropertyValue\n* Primitive value or list value.\n*/\n/**\n* @typedef {Element | Root} Result\n* Result from a `h` (or `s`) call.\n*/\n/**\n* @typedef {number | string} StyleValue\n* Value for a CSS style field.\n*/\n/**\n* @typedef {Record<string, StyleValue>} Style\n* Supported value of a `style` prop.\n*/\n/**\n* @param {Schema} schema\n* Schema to use.\n* @param {string} defaultTagName\n* Default tag name.\n* @param {ReadonlyArray<string> | undefined} [caseSensitive]\n* Case-sensitive tag names (default: `undefined`).\n* @returns\n* `h`.\n*/\nfunction createH(schema, defaultTagName, caseSensitive) {\n const adjust = caseSensitive ? createAdjustMap(caseSensitive) : void 0;\n /**\n * Hyperscript compatible DSL for creating virtual hast trees.\n *\n * @overload\n * @param {null | undefined} [selector]\n * @param {...Child} children\n * @returns {Root}\n *\n * @overload\n * @param {string} selector\n * @param {Properties} properties\n * @param {...Child} children\n * @returns {Element}\n *\n * @overload\n * @param {string} selector\n * @param {...Child} children\n * @returns {Element}\n *\n * @param {string | null | undefined} [selector]\n * Selector.\n * @param {Child | Properties | null | undefined} [properties]\n * Properties (or first child) (default: `undefined`).\n * @param {...Child} children\n * Children.\n * @returns {Result}\n * Result.\n */\n function h$1(selector, properties$1, ...children$1) {\n /** @type {Result} */\n let node;\n if (selector === null || selector === void 0) {\n node = {\n type: \"root\",\n children: []\n };\n const child = properties$1;\n children$1.unshift(child);\n } else {\n node = parseSelector(selector, defaultTagName);\n const lower = node.tagName.toLowerCase();\n const adjusted = adjust ? adjust.get(lower) : void 0;\n node.tagName = adjusted || lower;\n if (isChild(properties$1)) children$1.unshift(properties$1);\n else for (const [key$1, value] of Object.entries(properties$1)) addProperty(schema, node.properties, key$1, value);\n }\n for (const child of children$1) addChild(node.children, child);\n if (node.type === \"element\" && node.tagName === \"template\") {\n node.content = {\n type: \"root\",\n children: node.children\n };\n node.children = [];\n }\n return node;\n }\n return h$1;\n}\n/**\n* Check if something is properties or a child.\n*\n* @param {Child | Properties} value\n* Value to check.\n* @returns {value is Child}\n* Whether `value` is definitely a child.\n*/\nfunction isChild(value) {\n if (value === null || typeof value !== \"object\" || Array.isArray(value)) return true;\n if (typeof value.type !== \"string\") return false;\n const record = value;\n const keys$1 = Object.keys(value);\n for (const key$1 of keys$1) {\n const value$1 = record[key$1];\n if (value$1 && typeof value$1 === \"object\") {\n if (!Array.isArray(value$1)) return true;\n const list = value$1;\n for (const item of list) if (typeof item !== \"number\" && typeof item !== \"string\") return true;\n }\n }\n if (\"children\" in value && Array.isArray(value.children)) return true;\n return false;\n}\n/**\n* @param {Schema} schema\n* Schema.\n* @param {Properties} properties\n* Properties object.\n* @param {string} key\n* Property name.\n* @param {PropertyValue | Style} value\n* Property value.\n* @returns {undefined}\n* Nothing.\n*/\nfunction addProperty(schema, properties$1, key$1, value) {\n const info = find(schema, key$1);\n /** @type {PropertyValue} */\n let result;\n if (value === null || value === void 0) return;\n if (typeof value === \"number\") {\n if (Number.isNaN(value)) return;\n result = value;\n } else if (typeof value === \"boolean\") result = value;\n else if (typeof value === \"string\") if (info.spaceSeparated) result = parse(value);\n else if (info.commaSeparated) result = parse$1(value);\n else if (info.commaOrSpaceSeparated) result = parse(parse$1(value).join(\" \"));\n else result = parsePrimitive(info, info.property, value);\n else if (Array.isArray(value)) result = [...value];\n else result = info.property === \"style\" ? style(value) : String(value);\n if (Array.isArray(result)) {\n /** @type {Array<number | string>} */\n const finalResult = [];\n for (const item of result) finalResult.push(parsePrimitive(info, info.property, item));\n result = finalResult;\n }\n if (info.property === \"className\" && Array.isArray(properties$1.className)) result = properties$1.className.concat(result);\n properties$1[info.property] = result;\n}\n/**\n* @param {Array<RootContent>} nodes\n* Children.\n* @param {Child} value\n* Child.\n* @returns {undefined}\n* Nothing.\n*/\nfunction addChild(nodes, value) {\n if (value === null || value === void 0) {} else if (typeof value === \"number\" || typeof value === \"string\") nodes.push({\n type: \"text\",\n value: String(value)\n });\n else if (Array.isArray(value)) for (const child of value) addChild(nodes, child);\n else if (typeof value === \"object\" && \"type\" in value) if (value.type === \"root\") addChild(nodes, value.children);\n else nodes.push(value);\n else throw new Error(\"Expected node, nodes, or string, got `\" + value + \"`\");\n}\n/**\n* Parse a single primitives.\n*\n* @param {Info} info\n* Property information.\n* @param {string} name\n* Property name.\n* @param {PrimitiveValue} value\n* Property value.\n* @returns {PrimitiveValue}\n* Property value.\n*/\nfunction parsePrimitive(info, name, value) {\n if (typeof value === \"string\") {\n if (info.number && value && !Number.isNaN(Number(value))) return Number(value);\n if ((info.boolean || info.overloadedBoolean) && (value === \"\" || normalize(value) === normalize(name))) return true;\n }\n return value;\n}\n/**\n* Serialize a `style` object as a string.\n*\n* @param {Style} styles\n* Style object.\n* @returns {string}\n* CSS string.\n*/\nfunction style(styles) {\n /** @type {Array<string>} */\n const result = [];\n for (const [key$1, value] of Object.entries(styles)) result.push([key$1, value].join(\": \"));\n return result.join(\"; \");\n}\n/**\n* Create a map to adjust casing.\n*\n* @param {ReadonlyArray<string>} values\n* List of properly cased keys.\n* @returns {Map<string, string>}\n* Map of lowercase keys to uppercase keys.\n*/\nfunction createAdjustMap(values) {\n /** @type {Map<string, string>} */\n const result = /* @__PURE__ */ new Map();\n for (const value of values) result.set(value.toLowerCase(), value);\n return result;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/svg-case-sensitive-tag-names.js\n/**\n* List of case-sensitive SVG tag names.\n*\n* @type {ReadonlyArray<string>}\n*/\nconst svgCaseSensitiveTagNames = [\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 \"solidColor\",\n \"textArea\",\n \"textPath\"\n];\n\n//#endregion\n//#region ../../node_modules/.pnpm/hastscript@9.0.1/node_modules/hastscript/lib/index.js\n/**\n* @typedef {import('./jsx-classic.js').Element} h.JSX.Element\n* @typedef {import('./jsx-classic.js').ElementChildrenAttribute} h.JSX.ElementChildrenAttribute\n* @typedef {import('./jsx-classic.js').IntrinsicAttributes} h.JSX.IntrinsicAttributes\n* @typedef {import('./jsx-classic.js').IntrinsicElements} h.JSX.IntrinsicElements\n*/\n/**\n* @typedef {import('./jsx-classic.js').Element} s.JSX.Element\n* @typedef {import('./jsx-classic.js').ElementChildrenAttribute} s.JSX.ElementChildrenAttribute\n* @typedef {import('./jsx-classic.js').IntrinsicAttributes} s.JSX.IntrinsicAttributes\n* @typedef {import('./jsx-classic.js').IntrinsicElements} s.JSX.IntrinsicElements\n*/\n/** @type {ReturnType<createH>} */\nconst h = createH(html$2, \"div\");\n/** @type {ReturnType<createH>} */\nconst s = createH(svg, \"g\", svgCaseSensitiveTagNames);\n\n//#endregion\n//#region ../../node_modules/.pnpm/vfile-location@5.0.3/node_modules/vfile-location/lib/index.js\n/**\n* @import {VFile, Value} from 'vfile'\n* @import {Location} from 'vfile-location'\n*/\n/**\n* Create an index of the given document to translate between line/column and\n* offset based positional info.\n*\n* Also implemented in Rust in [`wooorm/markdown-rs`][markdown-rs].\n*\n* [markdown-rs]: https://github.com/wooorm/markdown-rs/blob/main/src/util/location.rs\n*\n* @param {VFile | Value} file\n* File to index.\n* @returns {Location}\n* Accessors for index.\n*/\nfunction location(file) {\n const value = String(file);\n /**\n * List, where each index is a line number (0-based), and each value is the\n * byte index *after* where the line ends.\n *\n * @type {Array<number>}\n */\n const indices = [];\n return {\n toOffset,\n toPoint\n };\n /** @type {Location['toPoint']} */\n function toPoint(offset) {\n if (typeof offset === \"number\" && offset > -1 && offset <= value.length) {\n let index$1 = 0;\n while (true) {\n let end = indices[index$1];\n if (end === void 0) {\n const eol = next(value, indices[index$1 - 1]);\n end = eol === -1 ? value.length + 1 : eol + 1;\n indices[index$1] = end;\n }\n if (end > offset) return {\n line: index$1 + 1,\n column: offset - (index$1 > 0 ? indices[index$1 - 1] : 0) + 1,\n offset\n };\n index$1++;\n }\n }\n }\n /** @type {Location['toOffset']} */\n function toOffset(point$3) {\n if (point$3 && typeof point$3.line === \"number\" && typeof point$3.column === \"number\" && !Number.isNaN(point$3.line) && !Number.isNaN(point$3.column)) {\n while (indices.length < point$3.line) {\n const from = indices[indices.length - 1];\n const eol = next(value, from);\n const end = eol === -1 ? value.length + 1 : eol + 1;\n if (from === end) break;\n indices.push(end);\n }\n const offset = (point$3.line > 1 ? indices[point$3.line - 2] : 0) + point$3.column - 1;\n if (offset < indices[point$3.line - 1]) return offset;\n }\n }\n}\n/**\n* @param {string} value\n* @param {number} from\n*/\nfunction next(value, from) {\n const cr = value.indexOf(\"\\r\", from);\n const lf = value.indexOf(\"\\n\", from);\n if (lf === -1) return cr;\n if (cr === -1 || cr + 1 === lf) return lf;\n return cr < lf ? cr : lf;\n}\n\n//#endregion\n//#region ../../node_modules/.pnpm/web-namespaces@2.0.1/node_modules/web-namespaces/index.js\n/**\n* Map of web namespaces.\n*\n* @type {Record<string, string>}\n*/\nconst webNamespaces = {\n html: \"http://www.w3.org/1999/xhtml\",\n mathml: \"http://www.w3.org/1998/Math/MathML\",\n svg: \"http://www.w3.org/2000/svg\",\n xlink: \"http://www.w3.org/1999/xlink\",\n xml: \"http://www.w3.org/XML/1998/namespace\",\n xmlns: \"http://www.w3.org/2000/xmlns/\"\n};\n\n//#endregion\n//#region ../../node_modules/.pnpm/hast-util-from-parse5@8.0.3/node_modules/hast-util-from-parse5/lib/index.js\n/**\n* @import {ElementData, Element, Nodes, RootContent, Root} from 'hast'\n* @import {DefaultTreeAdapterMap, Token} from 'parse5'\n* @import {Schema} from 'property-information'\n* @import {Point, Position} from 'unist'\n* @import {VFile} from 'vfile'\n* @import {Options} from 'hast-util-from-parse5'\n*/\n/**\n* @typedef State\n* Info passed around about the current state.\n* @property {VFile | undefined} file\n* Corresponding file.\n* @property {boolean} location\n* Whether location info was found.\n* @property {Schema} schema\n* Current schema.\n* @property {boolean | undefined} verbose\n* Add extra positional info.\n*/\nconst own = {}.hasOwnProperty;\n/** @type {unknown} */\nconst proto = Object.prototype;\n/**\n* Transform a `parse5` AST to hast.\n*\n* @param {DefaultTreeAdapterMap['node']} tree\n* `parse5` tree to transform.\n* @param {Options | null | undefined} [options]\n* Configuration (optional).\n* @returns {Nodes}\n* hast tree.\n*/\nfunction fromParse5(tree, options) {\n const settings = options || {};\n return one({\n file: settings.file || void 0,\n location: false,\n schema: settings.space === \"svg\" ? svg : html$2,\n verbose: settings.verbose || false\n }, tree);\n}\n/**\n* Transform a node.\n*\n* @param {State} state\n* Info passed around about the current state.\n* @param {DefaultTreeAdapterMap['node']} node\n* p5 node.\n* @returns {Nodes}\n* hast node.\n*/\nfunction one(state, node) {\n /** @type {Nodes} */\n let result;\n switch (node.nodeName) {\n case \"#comment\": {\n const reference = node;\n result = {\n type: \"comment\",\n value: reference.data\n };\n patch(state, reference, result);\n return result;\n }\n case \"#document\":\n case \"#document-fragment\": {\n const reference = node;\n const quirksMode = \"mode\" in reference ? reference.mode === \"quirks\" || reference.mode === \"limited-quirks\" : false;\n result = {\n type: \"root\",\n children: all(state, node.childNodes),\n data: { quirksMode }\n };\n if (state.file && state.location) {\n const document = String(state.file);\n const loc = location(document);\n const start = loc.toPoint(0);\n const end = loc.toPoint(document.length);\n /* @__PURE__ */ ok(start, \"expected `start`\");\n /* @__PURE__ */ ok(end, \"expected `end`\");\n result.position = {\n start,\n end\n };\n }\n return result;\n }\n case \"#documentType\": {\n const reference = node;\n result = { type: \"doctype\" };\n patch(state, reference, result);\n return result;\n }\n case \"#text\": {\n const reference = node;\n result = {\n type: \"text\",\n value: reference.value\n };\n patch(state, reference, result);\n return result;\n }\n default:\n result = element(state, node);\n return result;\n }\n}\n/**\n* Transform children.\n*\n* @param {State} state\n* Info passed around about the current state.\n* @param {Array<DefaultTreeAdapterMap['node']>} nodes\n* Nodes.\n* @returns {Array<RootContent>}\n* hast nodes.\n*/\nfunction all(state, nodes) {\n let index$1 = -1;\n /** @type {Array<RootContent>} */\n const results = [];\n while (++index$1 < nodes.length) {\n const result = one(state, nodes[index$1]);\n results.push(result);\n }\n return results;\n}\n/**\n* Transform an element.\n*\n* @param {State} state\n* Info passed around about the current state.\n* @param {DefaultTreeAdapterMap['element']} node\n* `parse5` node to transform.\n* @returns {Element}\n* hast node.\n*/\nfunction element(state, node) {\n const schema = state.schema;\n state.schema = node.namespaceURI === webNamespaces.svg ? svg : html$2;\n let index$1 = -1;\n /** @type {Record<string, string>} */\n const properties$1 = {};\n while (++index$1 < node.attrs.length) {\n const attribute = node.attrs[index$1];\n const name = (attribute.prefix ? attribute.prefix + \":\" : \"\") + attribute.name;\n if (!own.call(proto, name)) properties$1[name] = attribute.value;\n }\n const result = (state.schema.space === \"svg\" ? s : h)(node.tagName, properties$1, all(state, node.childNodes));\n patch(state, node, result);\n if (result.tagName === \"template\") {\n const reference = node;\n const pos = reference.sourceCodeLocation;\n const startTag = pos && pos.startTag && position(pos.startTag);\n const endTag = pos && pos.endTag && position(pos.endTag);\n const content = one(state, reference.content);\n if (startTag && endTag && state.file) content.position = {\n start: startTag.end,\n end: endTag.start\n };\n result.content = content;\n }\n state.schema = schema;\n return result;\n}\n/**\n* Patch positional info from `from` onto `to`.\n*\n* @param {State} state\n* Info passed around about the current state.\n* @param {DefaultTreeAdapterMap['node']} from\n* p5 node.\n* @param {Nodes} to\n* hast node.\n* @returns {undefined}\n* Nothing.\n*/\nfunction patch(state, from, to) {\n if (\"sourceCodeLocation\" in from && from.sourceCodeLocation && state.file) {\n const position$3 = createLocation(state, to, from.sourceCodeLocation);\n if (position$3) {\n state.location = true;\n to.position = position$3;\n }\n }\n}\n/**\n* Create clean positional information.\n*\n* @param {State} state\n* Info passed around about the current state.\n* @param {Nodes} node\n* hast node.\n* @param {Token.ElementLocation} location\n* p5 location info.\n* @returns {Position | undefined}\n* Position, or nothing.\n*/\nfunction createLocation(state, node, location$1) {\n const result = position(location$1);\n if (node.type === \"element\") {\n const tail = node.children[node.children.length - 1];\n if (result && !location$1.endTag && tail && tail.position && tail.position.end) result.end = Object.assign({}, tail.position.end);\n if (state.verbose) {\n /** @type {Record<string, Position | undefined>} */\n const properties$1 = {};\n /** @type {string} */\n let key$1;\n if (location$1.attrs) {\n for (key$1 in location$1.attrs) if (own.call(location$1.attrs, key$1)) properties$1[find(state.schema, key$1).property] = position(location$1.attrs[key$1]);\n }\n /* @__PURE__ */ ok(location$1.startTag, \"a start tag should exist\");\n const opening$1 = position(location$1.startTag);\n const closing$1 = location$1.endTag ? position(location$1.endTag) : void 0;\n /** @type {ElementData['position']} */\n const data = { opening: opening$1 };\n if (closing$1) data.closing = closing$1;\n data.properties = properties$1;\n node.data = { position: data };\n }\n }\n return result;\n}\n/**\n* Turn a p5 location into a position.\n*\n* @param {Token.Location} loc\n* Location.\n* @returns {Position | undefined}\n* Position or nothing.\n*/\nfunction position(loc) {\n const start = point({\n line: loc.startLine,\n column: loc.startCol,\n offset: loc.startOffset\n });\n const end = point({\n line: loc.endLine,\n column: loc.endCol,\n offset: loc.endOffset\n });\n return start || end ? {\n start,\n end\n } : void 0;\n}\n/**\n* Filter out invalid points.\n*\n* @param {Point} point\n* Point with potentially `undefined` values.\n* @returns {Point | undefined}\n* Point or nothing.\n*/\nfunction point(point$3) {\n return point$3.line && point$3.column ? point$3 : void 0;\n}\n\n//#endregion\n//#region src/server/compile/sanitize/shared.ts\nfunction isDangerousProperty(key$1) {\n const lower = key$1.toLowerCase();\n return lower.startsWith(\"on\") || lower === \"srcdoc\";\n}\nconst DANGEROUS_URL_SCHEMES = [\n \"javascript:\",\n \"vbscript:\",\n \"data:\",\n \"file:\",\n \"blob:\"\n];\nconst NAVIGATIONAL_URL_PROPS = [\"href\", \"xlinkhref\"];\nfunction isDangerousUrl(value) {\n const normalized = [...value].filter((ch) => ch.charCodeAt(0) > 32).join(\"\").toLowerCase();\n return DANGEROUS_URL_SCHEMES.some((scheme) => normalized.startsWith(scheme));\n}\nfunction stripDangerousUrls(node, onStrip) {\n const props = node.properties;\n if (props) for (const key$1 of Object.keys(props)) {\n const isNavigational = NAVIGATIONAL_URL_PROPS.includes(key$1.toLowerCase());\n const value = props[key$1];\n if (isNavigational && typeof value === \"string\" && isDangerousUrl(value)) {\n delete props[key$1];\n onStrip?.();\n }\n }\n for (const child of node.children || []) stripDangerousUrls(child, onStrip);\n}\nfunction collectSchema(node, tagNames, attributes) {\n if (node.type === \"element\" && node.tagName) {\n const tag = node.tagName;\n tagNames.add(tag);\n const props = node.properties || {};\n let set = attributes.get(tag);\n if (!set) {\n set = /* @__PURE__ */ new Set();\n attributes.set(tag, set);\n }\n for (const key$1 of Object.keys(props)) if (!isDangerousProperty(key$1)) set.add(key$1);\n }\n for (const child of node.children || []) collectSchema(child, tagNames, attributes);\n}\nfunction buildObservedSchema(defaultSchema$1, tree, keepUnknownTags = false) {\n const tagNames = /* @__PURE__ */ new Set();\n const attributesByTag = /* @__PURE__ */ new Map();\n collectSchema(tree, tagNames, attributesByTag);\n const mergedAttributes = { ...defaultSchema$1.attributes };\n for (const [tag, attrs] of attributesByTag) {\n const base = mergedAttributes[tag];\n if (Array.isArray(base)) {\n const filtered = base.filter((entry) => {\n if (Array.isArray(entry) && typeof entry[0] === \"string\") return !attrs.has(entry[0]);\n return true;\n });\n mergedAttributes[tag] = [...new Set([...filtered, ...attrs])];\n } else mergedAttributes[tag] = [...attrs];\n }\n const ancestors = {};\n const protocols = { ...defaultSchema$1.protocols };\n delete protocols.href;\n protocols.src = [...protocols.src ?? [], \"data\"];\n return {\n ...defaultSchema$1,\n clobber: [],\n clobberPrefix: \"\",\n tagNames: [...new Set([...defaultSchema$1.tagNames ?? [], ...tagNames])],\n attributes: mergedAttributes,\n ancestors,\n protocols,\n ...keepUnknownTags ? { strip: [] } : {}\n };\n}\nfunction templateContentToChildren(node) {\n if (node.type === \"element\" && (node.tagName || \"\").toLowerCase() === \"template\" && node.content) {\n node.children = Array.isArray(node.content.children) ? node.content.children : [];\n delete node.content;\n }\n for (const child of node.children || []) templateContentToChildren(child);\n}\nfunction templateChildrenToContent(node) {\n if (node.type === \"element\" && (node.tagName || \"\").toLowerCase() === \"template\") {\n const kids = node.children || [];\n node.children = [];\n node.content = {\n type: \"root\",\n children: kids\n };\n for (const child of kids) templateChildrenToContent(child);\n return;\n }\n for (const child of node.children || []) templateChildrenToContent(child);\n}\nfunction parseHtmlFragment(html$4) {\n const tree = fromParse5(parseFragment(html$4, {\n sourceCodeLocationInfo: false,\n scriptingEnabled: false\n }));\n templateContentToChildren(tree);\n return tree;\n}\nfunction stringifyHtmlFragment(tree) {\n templateChildrenToContent(tree);\n const out = unified().use(rehypeStringify, { allowDangerousHtml: false }).stringify(tree);\n return String(out).trim();\n}\n\n//#endregion\n//#region src/server/compile/sanitize-html.ts\nfunction isLocalHref(href) {\n return !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(href) && !href.startsWith(\"//\");\n}\nfunction isForbiddenUrl(value) {\n return value.trim().toLowerCase().startsWith(\"javascript:\");\n}\nfunction isStylesheetLink(properties$1) {\n const rel = properties$1.rel;\n const href = typeof properties$1.href === \"string\" ? properties$1.href : \"\";\n const isStylesheet = (Array.isArray(rel) ? rel : typeof rel === \"string\" ? rel.split(/\\s+/) : []).some((v) => String(v).toLowerCase() === \"stylesheet\");\n const isCssHref = href.toLowerCase().includes(\".css\");\n return {\n href,\n ok: isStylesheet && isCssHref && isLocalHref(href)\n };\n}\nfunction stripDangerousProperties(properties$1) {\n for (const key$1 of Object.keys(properties$1)) if (key$1.toLowerCase().startsWith(\"on\")) delete properties$1[key$1];\n delete properties$1.srcdoc;\n for (const key$1 of [\n \"href\",\n \"src\",\n \"xlinkHref\"\n ]) {\n const value = properties$1[key$1];\n if (typeof value === \"string\" && isForbiddenUrl(value)) delete properties$1[key$1];\n }\n}\nfunction removeForbiddenNodes(node, forbiddenTags) {\n if (!node.children) return;\n const next$1 = [];\n for (const child of node.children) {\n if (child.type === \"element\") {\n const tag = (child.tagName || \"\").toLowerCase();\n if (forbiddenTags.has(tag)) continue;\n if (tag === \"link\") {\n const { ok: ok$1 } = isStylesheetLink(child.properties || {});\n if (!ok$1) continue;\n }\n if (child.properties) stripDangerousProperties(child.properties);\n }\n next$1.push(child);\n removeForbiddenNodes(child, forbiddenTags);\n }\n node.children = next$1;\n}\nconst forbiddenTagSet = new Set([...FORBID_TAGS, \"script\"].map((t) => t.toLowerCase()));\nfunction sanitizeHtml(html$4) {\n const tree = parseHtmlFragment(html$4);\n removeForbiddenNodes(tree, forbiddenTagSet);\n stripDangerousUrls(tree);\n const schema = buildObservedSchema(defaultSchema, tree);\n return stringifyHtmlFragment(unified().use(rehypeSanitize, schema).runSync(tree));\n}\nvar sanitize_html_default = sanitizeHtml;\n\n//#endregion\nexport { sanitize_html_default as default, sanitizeHtml };";
|
|
3
|
+
|
|
4
|
+
//#endregion
|
|
5
|
+
export { sanitizeHtml_default as default };
|
|
6
|
+
//# sourceMappingURL=sanitizeHtml.mjs.map
|