@rindo/core 1.8.12 → 1.17.4

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.
Files changed (545) hide show
  1. package/bin/rindo +53 -19
  2. package/cli/index.cjs.js +524 -0
  3. package/cli/index.d.ts +15 -0
  4. package/cli/index.js +500 -0
  5. package/cli/package.json +9 -0
  6. package/compiler/package.json +8 -6
  7. package/compiler/rindo.d.ts +111 -0
  8. package/compiler/rindo.js +62852 -6655
  9. package/compiler/rindo.min.js +17 -0
  10. package/dependencies.json +80 -0
  11. package/dev-server/client/app-error.d.ts +18 -0
  12. package/dev-server/client/events.d.ts +6 -0
  13. package/dev-server/client/hmr-components.d.ts +1 -0
  14. package/dev-server/client/hmr-external-styles.d.ts +1 -0
  15. package/dev-server/client/hmr-images.d.ts +1 -0
  16. package/dev-server/client/hmr-inline-styles.d.ts +1 -0
  17. package/dev-server/client/hmr-util.d.ts +9 -0
  18. package/dev-server/client/hmr-window.d.ts +10 -0
  19. package/dev-server/client/index.d.ts +6 -0
  20. package/dev-server/client/index.js +785 -0
  21. package/dev-server/client/logger.d.ts +5 -0
  22. package/dev-server/client/package.json +8 -0
  23. package/dev-server/client/progress.d.ts +3 -0
  24. package/dev-server/client/status.d.ts +4 -0
  25. package/dev-server/connector.html +6 -0
  26. package/dev-server/content-type-db.json +1 -0
  27. package/dev-server/index.d.ts +6 -0
  28. package/dev-server/index.js +260 -0
  29. package/dev-server/open-in-editor-api.js +1 -0
  30. package/dev-server/package.json +8 -0
  31. package/dev-server/server-worker.js +1570 -0
  32. package/{dist/dev-server → dev-server}/static/favicon.ico +0 -0
  33. package/{dist/dev-server → dev-server}/templates/directory-index.html +132 -132
  34. package/dev-server/templates/initial-load.html +160 -0
  35. package/{dist/sys/node → dev-server}/visualstudio.vbs +0 -0
  36. package/dev-server/ws.js +1 -0
  37. package/{dist/sys/node → dev-server}/xdg-open +0 -0
  38. package/internal/app-data/index.cjs.js +88 -0
  39. package/internal/app-data/index.d.ts +3 -0
  40. package/internal/{client/build-conditionals.mjs → app-data/index.js} +24 -21
  41. package/internal/app-data/package.json +9 -0
  42. package/internal/client/css-shim.js +4 -0
  43. package/internal/client/{dom.rindo-client.mjs → dom.js} +73 -137
  44. package/{dist/client/index.mjs → internal/client/index.js} +736 -736
  45. package/internal/client/package.json +7 -0
  46. package/internal/client/patch.js +136 -0
  47. package/internal/client/polyfills/core-js.js +11 -10
  48. package/internal/client/polyfills/css-shim.js +1 -656
  49. package/internal/client/polyfills/dom.js +79 -146
  50. package/internal/client/polyfills/es5-html-element.js +1 -18
  51. package/internal/client/polyfills/index.js +6 -7
  52. package/internal/client/{shadow-css.rindo-client.mjs → shadow-css.js} +14 -17
  53. package/internal/hydrate/index.js +1073 -0
  54. package/internal/hydrate/package.json +7 -0
  55. package/internal/hydrate/runner.d.ts +205 -0
  56. package/internal/hydrate/runner.js +748 -0
  57. package/internal/hydrate/shadow-css.js +146 -0
  58. package/internal/index.d.ts +4 -18
  59. package/internal/index.js +1 -1
  60. package/internal/package.json +8 -6
  61. package/internal/rindo-core/index.d.ts +2 -0
  62. package/{dist → internal/rindo-core}/index.js +0 -0
  63. package/internal/rindo-ext-modules.d.ts +39 -0
  64. package/internal/rindo-private.d.ts +2183 -0
  65. package/internal/rindo-public-compiler.d.ts +2094 -0
  66. package/{dist/declarations/docs.d.ts → internal/rindo-public-docs.d.ts} +13 -1
  67. package/internal/rindo-public-runtime.d.ts +1552 -0
  68. package/internal/testing/index.js +1032 -0
  69. package/internal/testing/package.json +7 -0
  70. package/internal/testing/shadow-css.js +146 -0
  71. package/mock-doc/index.cjs.js +4500 -0
  72. package/mock-doc/index.d.ts +905 -0
  73. package/mock-doc/index.js +4464 -2
  74. package/mock-doc/package.json +9 -10
  75. package/package.json +84 -137
  76. package/readme.md +3 -82
  77. package/screenshot/compare/build/app.css +1 -1
  78. package/screenshot/compare/build/app.esm.js +1 -1
  79. package/screenshot/compare/build/app.js +27 -812
  80. package/{dist/compiler/polyfills.d.ts → screenshot/compare/build/index.esm.js} +0 -0
  81. package/screenshot/compare/build/{p-113f7459.js → p-081b0641.js} +1 -1
  82. package/screenshot/compare/build/p-227a1e18.entry.js +1 -0
  83. package/screenshot/compare/build/p-2c298727.entry.js +1 -0
  84. package/screenshot/compare/build/p-5479268c.entry.js +1 -0
  85. package/screenshot/compare/build/p-573ec8a4.entry.js +1 -0
  86. package/screenshot/compare/build/p-6ba08604.entry.js +1 -0
  87. package/screenshot/compare/build/p-6bc63295.entry.js +1 -0
  88. package/screenshot/compare/build/p-7a3759fd.entry.js +1 -0
  89. package/screenshot/compare/build/{p-ejpsp3kx.js → p-7b4e3ba7.js} +1 -1
  90. package/screenshot/compare/build/p-988eb362.css +1 -0
  91. package/screenshot/compare/build/p-9b6a9315.js +1 -0
  92. package/screenshot/compare/build/p-b4cc611c.entry.js +1 -0
  93. package/screenshot/compare/build/p-d1bf53f5.entry.js +1 -0
  94. package/screenshot/compare/build/{p-efb0eac6.js → p-e2efe0df.js} +1 -1
  95. package/screenshot/compare/build/p-e8ca6d97.entry.js +1 -0
  96. package/screenshot/compare/build/p-ec2f13e0.entry.js +1 -0
  97. package/screenshot/compare/build/p-f0b99977.entry.js +1 -0
  98. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -0
  99. package/screenshot/compare/build/p-fbbae598.js +1 -0
  100. package/screenshot/compare/host.config.json +14 -14
  101. package/screenshot/compare/index.html +1 -1
  102. package/{dist/screenshot → screenshot}/connector-base.d.ts +1 -1
  103. package/{dist/screenshot → screenshot}/connector-local.d.ts +1 -1
  104. package/screenshot/connector.js +2 -3
  105. package/{dist/screenshot → screenshot}/index.d.ts +1 -1
  106. package/screenshot/index.js +642 -2
  107. package/screenshot/local-connector.js +2 -3
  108. package/screenshot/package.json +8 -13
  109. package/{dist/screenshot → screenshot}/pixel-match.d.ts +0 -0
  110. package/screenshot/pixel-match.js +22 -6
  111. package/screenshot/screenshot-compare.d.ts +3 -0
  112. package/{dist/screenshot → screenshot}/screenshot-fs.d.ts +1 -1
  113. package/sys/node/autoprefixer.js +1 -0
  114. package/sys/node/glob.js +1 -0
  115. package/sys/node/graceful-fs.js +1 -0
  116. package/sys/node/index.d.ts +18 -0
  117. package/sys/node/index.js +1402 -2
  118. package/sys/node/node-fetch.js +1 -0
  119. package/sys/node/package.json +8 -5
  120. package/sys/node/prompts.js +1 -0
  121. package/sys/node/worker.js +33 -0
  122. package/{dist/testing → testing}/index.d.ts +5 -6
  123. package/testing/index.js +3903 -2
  124. package/testing/jest/jest-config.d.ts +92 -0
  125. package/{dist/testing → testing}/jest/jest-environment.d.ts +4 -2
  126. package/{dist/testing → testing}/jest/jest-preprocessor.d.ts +1 -0
  127. package/{dist/testing → testing}/jest/jest-runner.d.ts +1 -1
  128. package/{dist/testing → testing}/jest/jest-screenshot.d.ts +1 -1
  129. package/{dist/testing → testing}/jest/jest-serializer.d.ts +1 -1
  130. package/{dist/testing → testing}/jest/jest-setup-test-framework.d.ts +0 -0
  131. package/testing/jest-environment.js +3 -3
  132. package/testing/jest-preprocessor.js +3 -3
  133. package/testing/jest-preset.js +20 -28
  134. package/testing/jest-runner.js +3 -3
  135. package/testing/jest-setuptestframework.js +3 -3
  136. package/{dist/testing → testing}/matchers/attributes.d.ts +0 -0
  137. package/{dist/testing → testing}/matchers/class-list.d.ts +0 -0
  138. package/{dist/testing → testing}/matchers/events.d.ts +9 -1
  139. package/{dist/testing → testing}/matchers/html.d.ts +0 -0
  140. package/{dist/testing → testing}/matchers/index.d.ts +3 -1
  141. package/{dist/testing → testing}/matchers/screenshot.d.ts +1 -1
  142. package/{dist/testing → testing}/matchers/text.d.ts +0 -0
  143. package/testing/mock-fetch.d.ts +11 -0
  144. package/testing/mocks.d.ts +14 -0
  145. package/testing/package.json +8 -6
  146. package/testing/puppeteer/index.d.ts +2 -0
  147. package/{dist/testing → testing}/puppeteer/puppeteer-browser.d.ts +2 -2
  148. package/{dist/testing → testing}/puppeteer/puppeteer-declarations.d.ts +9 -9
  149. package/{dist/testing → testing}/puppeteer/puppeteer-element.d.ts +5 -3
  150. package/testing/puppeteer/puppeteer-emulate.d.ts +2 -0
  151. package/{dist/testing → testing}/puppeteer/puppeteer-events.d.ts +7 -7
  152. package/testing/puppeteer/puppeteer-page.d.ts +2 -0
  153. package/testing/puppeteer/puppeteer-screenshot.d.ts +4 -0
  154. package/testing/reset-build-conditionals.d.ts +2 -0
  155. package/testing/spec-page.d.ts +2 -0
  156. package/testing/test-transpile.d.ts +2 -0
  157. package/{dist/testing → testing}/testing-logger.d.ts +10 -8
  158. package/testing/testing-sys.d.ts +1 -0
  159. package/{dist/testing → testing}/testing-utils.d.ts +3 -2
  160. package/testing/testing.d.ts +2 -0
  161. package/build-conditionals/index.d.ts +0 -2
  162. package/build-conditionals/index.mjs +0 -66
  163. package/build-conditionals/package.json +0 -6
  164. package/compiler/index.js +0 -2
  165. package/dist/cli/index.js +0 -6068
  166. package/dist/client/css-shim-14a9812e.js +0 -656
  167. package/dist/client/css-shim-69821662.js +0 -658
  168. package/dist/client/declarations/rindo.core.d.ts +0 -1347
  169. package/dist/client/dom-68c8fe31.js +0 -139
  170. package/dist/client/dom-af01458a.js +0 -137
  171. package/dist/client/index.js +0 -2937
  172. package/dist/client/polyfills/core-js.js +0 -10
  173. package/dist/client/polyfills/css-shim.js +0 -656
  174. package/dist/client/polyfills/dom.js +0 -146
  175. package/dist/client/polyfills/es5-html-element.js +0 -18
  176. package/dist/client/polyfills/index.js +0 -35
  177. package/dist/client/polyfills/promise.js +0 -9
  178. package/dist/client/polyfills/system.js +0 -6
  179. package/dist/client/shadow-css-6ef31c68.js +0 -386
  180. package/dist/client/shadow-css-8fd1a9e4.js +0 -388
  181. package/dist/compiler/app-core/app-es5-disabled.d.ts +0 -2
  182. package/dist/compiler/app-core/app-polyfills.d.ts +0 -3
  183. package/dist/compiler/app-core/build-conditionals.d.ts +0 -6
  184. package/dist/compiler/app-core/bundle-app-core.d.ts +0 -6
  185. package/dist/compiler/app-core/component-styles.d.ts +0 -4
  186. package/dist/compiler/app-core/format-component-runtime-meta.d.ts +0 -4
  187. package/dist/compiler/app-core/optimize-module.d.ts +0 -7
  188. package/dist/compiler/browser/build-conditionals-client.d.ts +0 -3
  189. package/dist/compiler/browser/compile-options.d.ts +0 -12
  190. package/dist/compiler/browser/compile.d.ts +0 -2
  191. package/dist/compiler/browser/create-compiler.d.ts +0 -14
  192. package/dist/compiler/browser/index.d.ts +0 -11
  193. package/dist/compiler/build/build-ctx.d.ts +0 -74
  194. package/dist/compiler/build/build-finish.d.ts +0 -3
  195. package/dist/compiler/build/build-hmr.d.ts +0 -2
  196. package/dist/compiler/build/build-results.d.ts +0 -2
  197. package/dist/compiler/build/build-stats.d.ts +0 -3
  198. package/dist/compiler/build/build.d.ts +0 -2
  199. package/dist/compiler/build/cache-stats.d.ts +0 -4
  200. package/dist/compiler/build/compiler-build-id.d.ts +0 -6
  201. package/dist/compiler/build/compiler-ctx.d.ts +0 -44
  202. package/dist/compiler/build/init-index-html.d.ts +0 -2
  203. package/dist/compiler/build/validate-files.d.ts +0 -2
  204. package/dist/compiler/build/write-build.d.ts +0 -2
  205. package/dist/compiler/cache.d.ts +0 -22
  206. package/dist/compiler/compiler.d.ts +0 -27
  207. package/dist/compiler/component-hydrate/bundle-hydrate-factory.d.ts +0 -3
  208. package/dist/compiler/component-hydrate/generate-hydrate-app.d.ts +0 -2
  209. package/dist/compiler/component-hydrate/hydrate-factory-closure.d.ts +0 -2
  210. package/dist/compiler/component-hydrate/update-to-hydrate-components.d.ts +0 -2
  211. package/dist/compiler/component-hydrate/write-hydrate-outputs.d.ts +0 -3
  212. package/dist/compiler/component-lazy/generate-cjs.d.ts +0 -3
  213. package/dist/compiler/component-lazy/generate-esm-browser.d.ts +0 -3
  214. package/dist/compiler/component-lazy/generate-esm.d.ts +0 -3
  215. package/dist/compiler/component-lazy/generate-lazy-app.d.ts +0 -3
  216. package/dist/compiler/component-lazy/generate-lazy-module.d.ts +0 -4
  217. package/dist/compiler/component-lazy/generate-system.d.ts +0 -3
  218. package/dist/compiler/component-lazy/update-to-lazy-component.d.ts +0 -2
  219. package/dist/compiler/component-lazy/write-lazy-entry-module.d.ts +0 -2
  220. package/dist/compiler/component-native/update-to-native-component.d.ts +0 -2
  221. package/dist/compiler/config/config-reload.d.ts +0 -3
  222. package/dist/compiler/config/config-utils.d.ts +0 -4
  223. package/dist/compiler/config/validate-config.d.ts +0 -4
  224. package/dist/compiler/config/validate-copy.d.ts +0 -2
  225. package/dist/compiler/config/validate-dev-server.d.ts +0 -2
  226. package/dist/compiler/config/validate-docs.d.ts +0 -2
  227. package/dist/compiler/config/validate-namespace.d.ts +0 -3
  228. package/dist/compiler/config/validate-output-stats.d.ts +0 -2
  229. package/dist/compiler/config/validate-outputs-angular.d.ts +0 -2
  230. package/dist/compiler/config/validate-outputs-custom.d.ts +0 -2
  231. package/dist/compiler/config/validate-outputs-dist-module.d.ts +0 -2
  232. package/dist/compiler/config/validate-outputs-dist.d.ts +0 -2
  233. package/dist/compiler/config/validate-outputs-hydrate-script.d.ts +0 -2
  234. package/dist/compiler/config/validate-outputs-www.d.ts +0 -2
  235. package/dist/compiler/config/validate-outputs.d.ts +0 -2
  236. package/dist/compiler/config/validate-paths.d.ts +0 -2
  237. package/dist/compiler/config/validate-plugins.d.ts +0 -2
  238. package/dist/compiler/config/validate-prerender.d.ts +0 -2
  239. package/dist/compiler/config/validate-rollup-config.d.ts +0 -2
  240. package/dist/compiler/config/validate-service-worker.d.ts +0 -2
  241. package/dist/compiler/config/validate-testing.d.ts +0 -2
  242. package/dist/compiler/config/validate-workers.d.ts +0 -2
  243. package/dist/compiler/copy/assets-copy-tasks.d.ts +0 -3
  244. package/dist/compiler/copy/hashed-copy.d.ts +0 -2
  245. package/dist/compiler/copy/local-copy-tasks.d.ts +0 -3
  246. package/dist/compiler/docs/constants.d.ts +0 -2
  247. package/dist/compiler/docs/custom/index.d.ts +0 -2
  248. package/dist/compiler/docs/docs.d.ts +0 -2
  249. package/dist/compiler/docs/generate-doc-data.d.ts +0 -3
  250. package/dist/compiler/docs/json/index.d.ts +0 -3
  251. package/dist/compiler/docs/readme/docs-util.d.ts +0 -13
  252. package/dist/compiler/docs/readme/index.d.ts +0 -3
  253. package/dist/compiler/docs/readme/markdown-css-props.d.ts +0 -2
  254. package/dist/compiler/docs/readme/markdown-dependencies.d.ts +0 -2
  255. package/dist/compiler/docs/readme/markdown-events.d.ts +0 -2
  256. package/dist/compiler/docs/readme/markdown-methods.d.ts +0 -2
  257. package/dist/compiler/docs/readme/markdown-props.d.ts +0 -2
  258. package/dist/compiler/docs/readme/markdown-slots.d.ts +0 -2
  259. package/dist/compiler/docs/readme/markdown-usage.d.ts +0 -6
  260. package/dist/compiler/docs/readme/output-docs.d.ts +0 -3
  261. package/dist/compiler/docs/style-docs.d.ts +0 -2
  262. package/dist/compiler/docs/vscode/index.d.ts +0 -2
  263. package/dist/compiler/entries/component-bundles.d.ts +0 -3
  264. package/dist/compiler/entries/component-graph.d.ts +0 -2
  265. package/dist/compiler/entries/default-bundles.d.ts +0 -3
  266. package/dist/compiler/entries/entry-modules.d.ts +0 -6
  267. package/dist/compiler/entries/resolve-component-dependencies.d.ts +0 -2
  268. package/dist/compiler/events.d.ts +0 -15
  269. package/dist/compiler/fs-watch/fs-watch-init.d.ts +0 -2
  270. package/dist/compiler/fs-watch/fs-watch-log.d.ts +0 -2
  271. package/dist/compiler/fs-watch/fs-watch-rebuild.d.ts +0 -7
  272. package/dist/compiler/html/inject-module-preloads.d.ts +0 -3
  273. package/dist/compiler/html/inject-sw-script.d.ts +0 -4
  274. package/dist/compiler/html/inline-esm-import.d.ts +0 -2
  275. package/dist/compiler/html/inline-style-sheets.d.ts +0 -2
  276. package/dist/compiler/html/update-global-styles-link.d.ts +0 -2
  277. package/dist/compiler/html/used-components.d.ts +0 -2
  278. package/dist/compiler/html/utils.d.ts +0 -2
  279. package/dist/compiler/html/validate-manifest-json.d.ts +0 -2
  280. package/dist/compiler/index.d.ts +0 -10
  281. package/dist/compiler/index.js +0 -18008
  282. package/dist/compiler/output-targets/empty-dir.d.ts +0 -6
  283. package/dist/compiler/output-targets/index.d.ts +0 -2
  284. package/dist/compiler/output-targets/output-angular.d.ts +0 -4
  285. package/dist/compiler/output-targets/output-app.d.ts +0 -4
  286. package/dist/compiler/output-targets/output-collection.d.ts +0 -3
  287. package/dist/compiler/output-targets/output-copy.d.ts +0 -2
  288. package/dist/compiler/output-targets/output-custom.d.ts +0 -2
  289. package/dist/compiler/output-targets/output-docs.d.ts +0 -2
  290. package/dist/compiler/output-targets/output-hydrate.d.ts +0 -2
  291. package/dist/compiler/output-targets/output-lazy-loader.d.ts +0 -2
  292. package/dist/compiler/output-targets/output-module.d.ts +0 -4
  293. package/dist/compiler/output-targets/output-prerender.d.ts +0 -2
  294. package/dist/compiler/output-targets/output-service-workers.d.ts +0 -2
  295. package/dist/compiler/output-targets/output-types.d.ts +0 -2
  296. package/dist/compiler/output-targets/output-utils.d.ts +0 -54
  297. package/dist/compiler/output-targets/output-www.d.ts +0 -2
  298. package/dist/compiler/plugin/plugin.d.ts +0 -6
  299. package/dist/compiler/prerender/crawl-urls.d.ts +0 -3
  300. package/dist/compiler/prerender/host-config.d.ts +0 -12
  301. package/dist/compiler/prerender/prerender-config.d.ts +0 -2
  302. package/dist/compiler/prerender/prerender-main.d.ts +0 -2
  303. package/dist/compiler/prerender/prerender-queue.d.ts +0 -3
  304. package/dist/compiler/prerender/prerender-template-html.d.ts +0 -2
  305. package/dist/compiler/prerender/prerendered-write-path.d.ts +0 -2
  306. package/dist/compiler/prerender/robots-txt.d.ts +0 -2
  307. package/dist/compiler/prerender/sitemap-xml.d.ts +0 -3
  308. package/dist/compiler/rollup-plugins/component-entry.d.ts +0 -3
  309. package/dist/compiler/rollup-plugins/css-transformer.d.ts +0 -3
  310. package/dist/compiler/rollup-plugins/global-scripts.d.ts +0 -4
  311. package/dist/compiler/rollup-plugins/image-plugin.d.ts +0 -3
  312. package/dist/compiler/rollup-plugins/in-memory-fs-read.d.ts +0 -3
  313. package/dist/compiler/rollup-plugins/loader.d.ts +0 -4
  314. package/dist/compiler/rollup-plugins/plugin-helper.d.ts +0 -5
  315. package/dist/compiler/rollup-plugins/rindo-build-conditionals.d.ts +0 -7
  316. package/dist/compiler/rollup-plugins/rindo-client.d.ts +0 -3
  317. package/dist/compiler/rollup-plugins/rindo-external-runtime.d.ts +0 -2
  318. package/dist/compiler/rollup-plugins/rindo-hydrate.d.ts +0 -3
  319. package/dist/compiler/rollup-plugins/rindo-public-plugin.d.ts +0 -2
  320. package/dist/compiler/service-worker/generate-sw.d.ts +0 -7
  321. package/dist/compiler/service-worker/service-worker-util.d.ts +0 -2
  322. package/dist/compiler/style/cached-styles.d.ts +0 -5
  323. package/dist/compiler/style/component-styles.d.ts +0 -2
  324. package/dist/compiler/style/css-imports.d.ts +0 -9
  325. package/dist/compiler/style/css-to-esm.d.ts +0 -5
  326. package/dist/compiler/style/generate-styles.d.ts +0 -2
  327. package/dist/compiler/style/global-styles.d.ts +0 -3
  328. package/dist/compiler/style/normalize-styles.d.ts +0 -2
  329. package/dist/compiler/style/optimize-css.d.ts +0 -2
  330. package/dist/compiler/style/scope-css.d.ts +0 -3
  331. package/dist/compiler/style/style-utils.d.ts +0 -10
  332. package/dist/compiler/transformers/add-component-meta-proxy.d.ts +0 -3
  333. package/dist/compiler/transformers/add-component-meta-static.d.ts +0 -4
  334. package/dist/compiler/transformers/add-imports.d.ts +0 -3
  335. package/dist/compiler/transformers/collections/add-external-import.d.ts +0 -2
  336. package/dist/compiler/transformers/collections/parse-collection-components.d.ts +0 -2
  337. package/dist/compiler/transformers/collections/parse-collection-deprecated.d.ts +0 -2
  338. package/dist/compiler/transformers/collections/parse-collection-manifest.d.ts +0 -7
  339. package/dist/compiler/transformers/collections/parse-collection-module.d.ts +0 -2
  340. package/dist/compiler/transformers/component-build-conditionals.d.ts +0 -2
  341. package/dist/compiler/transformers/component-hydrate/hydrate-component.d.ts +0 -3
  342. package/dist/compiler/transformers/component-hydrate/hydrate-runtime-cmp-meta.d.ts +0 -3
  343. package/dist/compiler/transformers/component-hydrate/tranform-to-hydrate-component.d.ts +0 -2
  344. package/dist/compiler/transformers/component-lazy/lazy-component.d.ts +0 -3
  345. package/dist/compiler/transformers/component-lazy/lazy-constructor.d.ts +0 -3
  346. package/dist/compiler/transformers/component-lazy/lazy-element-getter.d.ts +0 -3
  347. package/dist/compiler/transformers/component-lazy/transform-lazy-component.d.ts +0 -4
  348. package/dist/compiler/transformers/component-native/native-component.d.ts +0 -3
  349. package/dist/compiler/transformers/component-native/native-connected-callback.d.ts +0 -3
  350. package/dist/compiler/transformers/component-native/native-constructor.d.ts +0 -3
  351. package/dist/compiler/transformers/component-native/native-element-getter.d.ts +0 -3
  352. package/dist/compiler/transformers/component-native/native-static-style.d.ts +0 -3
  353. package/dist/compiler/transformers/component-native/tranform-to-native-component.d.ts +0 -4
  354. package/dist/compiler/transformers/core-runtime-apis.d.ts +0 -30
  355. package/dist/compiler/transformers/create-event.d.ts +0 -3
  356. package/dist/compiler/transformers/decorators-to-static/component-decorator.d.ts +0 -3
  357. package/dist/compiler/transformers/decorators-to-static/convert-decorators.d.ts +0 -3
  358. package/dist/compiler/transformers/decorators-to-static/decorator-utils.d.ts +0 -10
  359. package/dist/compiler/transformers/decorators-to-static/element-decorator.d.ts +0 -3
  360. package/dist/compiler/transformers/decorators-to-static/event-decorator.d.ts +0 -4
  361. package/dist/compiler/transformers/decorators-to-static/listen-decorator.d.ts +0 -6
  362. package/dist/compiler/transformers/decorators-to-static/method-decorator.d.ts +0 -3
  363. package/dist/compiler/transformers/decorators-to-static/prop-decorator.d.ts +0 -4
  364. package/dist/compiler/transformers/decorators-to-static/state-decorator.d.ts +0 -3
  365. package/dist/compiler/transformers/decorators-to-static/style-to-static.d.ts +0 -3
  366. package/dist/compiler/transformers/decorators-to-static/watch-decorator.d.ts +0 -3
  367. package/dist/compiler/transformers/define-custom-element.d.ts +0 -3
  368. package/dist/compiler/transformers/host-data-transform.d.ts +0 -3
  369. package/dist/compiler/transformers/legacy-props.d.ts +0 -3
  370. package/dist/compiler/transformers/remove-static-meta-properties.d.ts +0 -2
  371. package/dist/compiler/transformers/reserved-public-members.d.ts +0 -3
  372. package/dist/compiler/transformers/rindo-import-path.d.ts +0 -3
  373. package/dist/compiler/transformers/static-to-meta/call-expression.d.ts +0 -3
  374. package/dist/compiler/transformers/static-to-meta/class-methods.d.ts +0 -3
  375. package/dist/compiler/transformers/static-to-meta/component.d.ts +0 -3
  376. package/dist/compiler/transformers/static-to-meta/element-ref.d.ts +0 -2
  377. package/dist/compiler/transformers/static-to-meta/encapsulation.d.ts +0 -3
  378. package/dist/compiler/transformers/static-to-meta/events.d.ts +0 -3
  379. package/dist/compiler/transformers/static-to-meta/import.d.ts +0 -3
  380. package/dist/compiler/transformers/static-to-meta/listeners.d.ts +0 -3
  381. package/dist/compiler/transformers/static-to-meta/methods.d.ts +0 -3
  382. package/dist/compiler/transformers/static-to-meta/props.d.ts +0 -3
  383. package/dist/compiler/transformers/static-to-meta/states.d.ts +0 -3
  384. package/dist/compiler/transformers/static-to-meta/string-literal.d.ts +0 -3
  385. package/dist/compiler/transformers/static-to-meta/styles.d.ts +0 -3
  386. package/dist/compiler/transformers/static-to-meta/vdom.d.ts +0 -3
  387. package/dist/compiler/transformers/static-to-meta/visitor.d.ts +0 -3
  388. package/dist/compiler/transformers/static-to-meta/watchers.d.ts +0 -3
  389. package/dist/compiler/transformers/style-imports.d.ts +0 -3
  390. package/dist/compiler/transformers/transform-utils.d.ts +0 -31
  391. package/dist/compiler/transformers/update-component-class.d.ts +0 -3
  392. package/dist/compiler/transformers/update-rindo-core-import.d.ts +0 -3
  393. package/dist/compiler/transformers/watcher-meta-transform.d.ts +0 -3
  394. package/dist/compiler/transpile/compiler-options.d.ts +0 -4
  395. package/dist/compiler/transpile/transpile-app.d.ts +0 -2
  396. package/dist/compiler/transpile/transpile-module.d.ts +0 -5
  397. package/dist/compiler/transpile/transpile-service.d.ts +0 -3
  398. package/dist/compiler/transpile/transpile-to-es5-main.d.ts +0 -2
  399. package/dist/compiler/transpile/validate-types-main.d.ts +0 -2
  400. package/dist/compiler/types/generate-app-types.d.ts +0 -2
  401. package/dist/compiler/types/generate-component-types.d.ts +0 -8
  402. package/dist/compiler/types/generate-event-types.d.ts +0 -2
  403. package/dist/compiler/types/generate-method-types.d.ts +0 -2
  404. package/dist/compiler/types/generate-prop-types.d.ts +0 -2
  405. package/dist/compiler/types/generate-types.d.ts +0 -2
  406. package/dist/compiler/types/rindo-types.d.ts +0 -3
  407. package/dist/compiler/types/types-utils.d.ts +0 -4
  408. package/dist/compiler/types/update-import-refs.d.ts +0 -11
  409. package/dist/compiler/types/validate-package-json.d.ts +0 -9
  410. package/dist/declarations/assets.d.ts +0 -17
  411. package/dist/declarations/browser-compile.d.ts +0 -47
  412. package/dist/declarations/build-conditionals.d.ts +0 -91
  413. package/dist/declarations/build-events.d.ts +0 -19
  414. package/dist/declarations/build.d.ts +0 -247
  415. package/dist/declarations/cache.d.ts +0 -11
  416. package/dist/declarations/collection-manifest.d.ts +0 -106
  417. package/dist/declarations/collection.d.ts +0 -139
  418. package/dist/declarations/compiler.d.ts +0 -53
  419. package/dist/declarations/component-compiler-meta.d.ts +0 -198
  420. package/dist/declarations/component-constructor.d.ts +0 -61
  421. package/dist/declarations/component-interfaces.d.ts +0 -123
  422. package/dist/declarations/config.d.ts +0 -409
  423. package/dist/declarations/css-var-shim.d.ts +0 -9
  424. package/dist/declarations/decorators.d.ts +0 -150
  425. package/dist/declarations/dev-server.d.ts +0 -135
  426. package/dist/declarations/diagnostics.d.ts +0 -21
  427. package/dist/declarations/entry.d.ts +0 -28
  428. package/dist/declarations/events.d.ts +0 -13
  429. package/dist/declarations/file-system.d.ts +0 -91
  430. package/dist/declarations/fs-watch.d.ts +0 -15
  431. package/dist/declarations/host-element.d.ts +0 -53
  432. package/dist/declarations/hydrate.d.ts +0 -99
  433. package/dist/declarations/in-memory-fs.d.ts +0 -59
  434. package/dist/declarations/index.d.ts +0 -45
  435. package/dist/declarations/jsdoc.d.ts +0 -16
  436. package/dist/declarations/jsx.d.ts +0 -1050
  437. package/dist/declarations/logger.d.ts +0 -25
  438. package/dist/declarations/minify-js.d.ts +0 -11
  439. package/dist/declarations/module.d.ts +0 -35
  440. package/dist/declarations/optimize-css.d.ts +0 -12
  441. package/dist/declarations/output-targets.d.ts +0 -189
  442. package/dist/declarations/plugin.d.ts +0 -23
  443. package/dist/declarations/prerender.d.ts +0 -79
  444. package/dist/declarations/render.d.ts +0 -62
  445. package/dist/declarations/runtime.d.ts +0 -92
  446. package/dist/declarations/screenshots.d.ts +0 -192
  447. package/dist/declarations/server.d.ts +0 -19
  448. package/dist/declarations/style.d.ts +0 -35
  449. package/dist/declarations/system.d.ts +0 -174
  450. package/dist/declarations/testing.d.ts +0 -523
  451. package/dist/declarations/transpile.d.ts +0 -24
  452. package/dist/declarations/types.d.ts +0 -24
  453. package/dist/declarations/vdom.d.ts +0 -55
  454. package/dist/declarations/worker.d.ts +0 -33
  455. package/dist/dev-server/content-type-db.json +0 -1
  456. package/dist/dev-server/index.js +0 -887
  457. package/dist/dev-server/static/app-error.css +0 -257
  458. package/dist/dev-server/static/dev-server-client.html +0 -13
  459. package/dist/dev-server/templates/initial-load.html +0 -160
  460. package/dist/hydrate/index.d.ts +0 -101
  461. package/dist/hydrate/index.mjs +0 -1281
  462. package/dist/hydrate/platform.mjs +0 -347
  463. package/dist/index.d.ts +0 -99
  464. package/dist/mock-doc/index.d.ts +0 -851
  465. package/dist/mock-doc/index.js +0 -3982
  466. package/dist/mock-doc/index.mjs +0 -3954
  467. package/dist/runtime/index.js +0 -2576
  468. package/dist/runtime/index.mjs +0 -2521
  469. package/dist/runtime/shadow-css-6ef31c68.js +0 -386
  470. package/dist/runtime/shadow-css-8fd1a9e4.js +0 -388
  471. package/dist/screenshot/index.js +0 -520
  472. package/dist/sys/node/graceful-fs.js +0 -975
  473. package/dist/sys/node/index.js +0 -33545
  474. package/dist/sys/node/node-fetch.js +0 -1779
  475. package/dist/sys/node/open-in-editor.js +0 -734
  476. package/dist/sys/node/sys-worker.js +0 -67035
  477. package/dist/sys/node/websocket.js +0 -3728
  478. package/dist/testing/build-conditionals.d.ts +0 -4
  479. package/dist/testing/build-conditionals.js +0 -43
  480. package/dist/testing/core.d.ts +0 -35
  481. package/dist/testing/core.js +0 -52
  482. package/dist/testing/index.js +0 -40511
  483. package/dist/testing/jest/jest-config.d.ts +0 -4
  484. package/dist/testing/mock-fetch.d.ts +0 -46
  485. package/dist/testing/mocks.d.ts +0 -12
  486. package/dist/testing/platform.d.ts +0 -23
  487. package/dist/testing/platform.js +0 -321
  488. package/dist/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  489. package/dist/testing/puppeteer/puppeteer-find.d.ts +0 -5
  490. package/dist/testing/puppeteer/puppeteer-page.d.ts +0 -2
  491. package/dist/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  492. package/dist/testing/spec-page.d.ts +0 -5
  493. package/dist/testing/task-queue.d.ts +0 -15
  494. package/dist/testing/test-transpile.d.ts +0 -5
  495. package/dist/testing/testing-fs.d.ts +0 -31
  496. package/dist/testing/testing-sys.d.ts +0 -19
  497. package/dist/testing/testing.d.ts +0 -12
  498. package/dist/utils/index.js +0 -1575
  499. package/dist/utils/index.mjs +0 -1511
  500. package/internal/client/css-shim.rindo-client.mjs +0 -656
  501. package/internal/client/index.mjs +0 -2859
  502. package/internal/client/polyfills/promise.js +0 -9
  503. package/internal/images.d.ts +0 -5
  504. package/runtime/package.json +0 -5
  505. package/screenshot/compare/build/p-020f8d73.js +0 -1
  506. package/screenshot/compare/build/p-09qdknbg.system.entry.js +0 -1
  507. package/screenshot/compare/build/p-0a13mpsc.system.entry.js +0 -1
  508. package/screenshot/compare/build/p-168ec2c4.system.js +0 -1
  509. package/screenshot/compare/build/p-2ab1fdf1.system.js +0 -1
  510. package/screenshot/compare/build/p-2pxcsgrj.entry.js +0 -1
  511. package/screenshot/compare/build/p-42fb7034.system.js +0 -1
  512. package/screenshot/compare/build/p-54d9d7c2.system.js +0 -1
  513. package/screenshot/compare/build/p-67c1f911.js +0 -1
  514. package/screenshot/compare/build/p-68613371.system.js +0 -1
  515. package/screenshot/compare/build/p-7dvsjpu0.entry.js +0 -1
  516. package/screenshot/compare/build/p-aa67fb06.js +0 -1
  517. package/screenshot/compare/build/p-aeb3cec1.system.js +0 -1
  518. package/screenshot/compare/build/p-b6e44a24.js +0 -1
  519. package/screenshot/compare/build/p-c1c25b8a.js +0 -1
  520. package/screenshot/compare/build/p-c9bopbjy.system.entry.js +0 -1
  521. package/screenshot/compare/build/p-c9iqz1pp.system.entry.js +0 -1
  522. package/screenshot/compare/build/p-dizjz8rg.entry.js +0 -1
  523. package/screenshot/compare/build/p-dnta0rwp.system.entry.js +0 -1
  524. package/screenshot/compare/build/p-e9670d22.system.js +0 -1
  525. package/screenshot/compare/build/p-ei9jkpd0.system.entry.js +0 -1
  526. package/screenshot/compare/build/p-ejwcppol.entry.js +0 -1
  527. package/screenshot/compare/build/p-f6612d5d.system.js +0 -1
  528. package/screenshot/compare/build/p-foiivsfc.css +0 -1
  529. package/screenshot/compare/build/p-gpjjyogx.entry.js +0 -1
  530. package/screenshot/compare/build/p-howklem2.system.entry.js +0 -1
  531. package/screenshot/compare/build/p-knv9wvoc.entry.js +0 -1
  532. package/screenshot/compare/build/p-nsqsfhhy.entry.js +0 -1
  533. package/screenshot/compare/build/p-ojt278pp.entry.js +0 -1
  534. package/screenshot/compare/build/p-oywass99.entry.js +0 -1
  535. package/screenshot/compare/build/p-q3ujhub6.entry.js +0 -1
  536. package/screenshot/compare/build/p-qw4xnmxv.entry.js +0 -1
  537. package/screenshot/compare/build/p-t1wvevhc.system.entry.js +0 -1
  538. package/screenshot/compare/build/p-tnjarrex.system.entry.js +0 -1
  539. package/screenshot/compare/build/p-vhfpd6kk.system.entry.js +0 -1
  540. package/screenshot/compare/build/p-vk6rhemd.system.entry.js +0 -1
  541. package/screenshot/compare/build/p-w6bnm16k.entry.js +0 -1
  542. package/screenshot/compare/build/p-xje6d7zl.system.entry.js +0 -1
  543. package/screenshot/compare/build/p-y5jlrcha.system.entry.js +0 -1
  544. package/screenshot/compare/build/p-yh170wkt.entry.js +0 -1
  545. package/testing/jest.preprocessor.js +0 -7
@@ -1,3954 +0,0 @@
1
- const CONTENT_REF_ID = 'r';
2
- const ORG_LOCATION_ID = 'o';
3
- const SLOT_NODE_ID = 's';
4
- const TEXT_NODE_ID = 't';
5
- const XLINK_NS = 'http://www.w3.org/1999/xlink';
6
-
7
- class MockAttributeMap {
8
- constructor(caseInsensitive = false) {
9
- this.caseInsensitive = caseInsensitive;
10
- this.items = [];
11
- }
12
- get length() {
13
- return this.items.length;
14
- }
15
- item(index) {
16
- return this.items[index] || null;
17
- }
18
- setNamedItem(attr) {
19
- attr.namespaceURI = null;
20
- this.setNamedItemNS(attr);
21
- }
22
- setNamedItemNS(attr) {
23
- if (attr != null && attr.value != null) {
24
- attr.value = String(attr.value);
25
- }
26
- const existingAttr = this.items.find(a => a.name === attr.name && a.namespaceURI === attr.namespaceURI);
27
- if (existingAttr != null) {
28
- existingAttr.value = attr.value;
29
- }
30
- else {
31
- this.items.push(attr);
32
- }
33
- }
34
- getNamedItem(attrName) {
35
- if (this.caseInsensitive) {
36
- attrName = attrName.toLowerCase();
37
- }
38
- return this.getNamedItemNS(null, attrName);
39
- }
40
- getNamedItemNS(namespaceURI, attrName) {
41
- namespaceURI = getNamespaceURI(namespaceURI);
42
- return this.items.find(attr => attr.name === attrName && getNamespaceURI(attr.namespaceURI) === namespaceURI) || null;
43
- }
44
- removeNamedItem(attr) {
45
- this.removeNamedItemNS(attr);
46
- }
47
- removeNamedItemNS(attr) {
48
- for (let i = 0, ii = this.items.length; i < ii; i++) {
49
- if (this.items[i].name === attr.name && this.items[i].namespaceURI === attr.namespaceURI) {
50
- this.items.splice(i, 1);
51
- break;
52
- }
53
- }
54
- }
55
- }
56
- function getNamespaceURI(namespaceURI) {
57
- return namespaceURI === XLINK_NS ? null : namespaceURI;
58
- }
59
- function cloneAttributes(srcAttrs, sortByName = false) {
60
- const dstAttrs = new MockAttributeMap(srcAttrs.caseInsensitive);
61
- if (srcAttrs != null) {
62
- const attrLen = srcAttrs.length;
63
- if (sortByName && attrLen > 1) {
64
- const sortedAttrs = [];
65
- for (let i = 0; i < attrLen; i++) {
66
- const srcAttr = srcAttrs.item(i);
67
- const dstAttr = new MockAttr(srcAttr.name, srcAttr.value, srcAttr.namespaceURI);
68
- sortedAttrs.push(dstAttr);
69
- }
70
- sortedAttrs.sort(sortAttributes).forEach(attr => {
71
- dstAttrs.setNamedItemNS(attr);
72
- });
73
- }
74
- else {
75
- for (let i = 0; i < attrLen; i++) {
76
- const srcAttr = srcAttrs.item(i);
77
- const dstAttr = new MockAttr(srcAttr.name, srcAttr.value, srcAttr.namespaceURI);
78
- dstAttrs.setNamedItemNS(dstAttr);
79
- }
80
- }
81
- }
82
- return dstAttrs;
83
- }
84
- function sortAttributes(a, b) {
85
- if (a.name < b.name)
86
- return -1;
87
- if (a.name > b.name)
88
- return 1;
89
- return 0;
90
- }
91
- class MockAttr {
92
- constructor(attrName, attrValue, namespaceURI = null) {
93
- this._name = attrName;
94
- this._value = String(attrValue);
95
- this._namespaceURI = namespaceURI;
96
- }
97
- get name() {
98
- return this._name;
99
- }
100
- set name(value) {
101
- this._name = value;
102
- }
103
- get value() {
104
- return this._value;
105
- }
106
- set value(value) {
107
- this._value = String(value);
108
- }
109
- get nodeName() {
110
- return this._name;
111
- }
112
- set nodeName(value) {
113
- this._name = value;
114
- }
115
- get nodeValue() {
116
- return this._value;
117
- }
118
- set nodeValue(value) {
119
- this._value = String(value);
120
- }
121
- get namespaceURI() {
122
- return this._namespaceURI;
123
- }
124
- set namespaceURI(namespaceURI) {
125
- this._namespaceURI = namespaceURI;
126
- }
127
- }
128
-
129
- class MockCustomElementRegistry {
130
- constructor(win) {
131
- this.win = win;
132
- }
133
- define(tagName, cstr, options) {
134
- if (tagName.toLowerCase() !== tagName) {
135
- throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': "${tagName}" is not a valid custom element name`);
136
- }
137
- if (this.__registry == null) {
138
- this.__registry = new Map();
139
- }
140
- this.__registry.set(tagName, { cstr, options });
141
- if (this.__whenDefined != null) {
142
- const whenDefinedResolveFns = this.__whenDefined.get(tagName);
143
- if (whenDefinedResolveFns != null) {
144
- whenDefinedResolveFns.forEach(whenDefinedResolveFn => {
145
- whenDefinedResolveFn();
146
- });
147
- whenDefinedResolveFns.length = 0;
148
- this.__whenDefined.delete(tagName);
149
- }
150
- }
151
- const doc = this.win.document;
152
- if (doc != null) {
153
- const hosts = doc.querySelectorAll(tagName);
154
- hosts.forEach(host => {
155
- if (upgradedElements.has(host) === false) {
156
- tempDisableCallbacks.add(doc);
157
- const upgradedCmp = createCustomElement(this, doc, tagName);
158
- for (let i = 0; i < host.childNodes.length; i++) {
159
- const childNode = host.childNodes[i];
160
- childNode.remove();
161
- upgradedCmp.appendChild(childNode);
162
- }
163
- tempDisableCallbacks.delete(doc);
164
- if (proxyElements.has(host)) {
165
- proxyElements.set(host, upgradedCmp);
166
- }
167
- }
168
- fireConnectedCallback(host);
169
- });
170
- }
171
- }
172
- get(tagName) {
173
- if (this.__registry != null) {
174
- const def = this.__registry.get(tagName.toLowerCase());
175
- if (def != null) {
176
- return def.cstr;
177
- }
178
- }
179
- return undefined;
180
- }
181
- upgrade(_rootNode) {
182
- //
183
- }
184
- clear() {
185
- if (this.__registry != null) {
186
- this.__registry.clear();
187
- }
188
- if (this.__whenDefined != null) {
189
- this.__whenDefined.clear();
190
- }
191
- }
192
- whenDefined(tagName) {
193
- tagName = tagName.toLowerCase();
194
- if (this.__registry != null && this.__registry.has(tagName) === true) {
195
- return Promise.resolve();
196
- }
197
- return new Promise(resolve => {
198
- if (this.__whenDefined == null) {
199
- this.__whenDefined = new Map();
200
- }
201
- let whenDefinedResolveFns = this.__whenDefined.get(tagName);
202
- if (whenDefinedResolveFns == null) {
203
- whenDefinedResolveFns = [];
204
- this.__whenDefined.set(tagName, whenDefinedResolveFns);
205
- }
206
- whenDefinedResolveFns.push(resolve);
207
- });
208
- }
209
- }
210
- function createCustomElement(customElements, ownerDocument, tagName) {
211
- const Cstr = customElements.get(tagName);
212
- if (Cstr != null) {
213
- const cmp = new Cstr(ownerDocument);
214
- cmp.nodeName = tagName.toUpperCase();
215
- upgradedElements.add(cmp);
216
- return cmp;
217
- }
218
- const host = new Proxy({}, {
219
- get(obj, prop) {
220
- const elm = proxyElements.get(host);
221
- if (elm != null) {
222
- return elm[prop];
223
- }
224
- return obj[prop];
225
- },
226
- set(obj, prop, val) {
227
- const elm = proxyElements.get(host);
228
- if (elm != null) {
229
- elm[prop] = val;
230
- }
231
- else {
232
- obj[prop] = val;
233
- }
234
- return true;
235
- },
236
- has(obj, prop) {
237
- const elm = proxyElements.get(host);
238
- if (prop in elm) {
239
- return true;
240
- }
241
- if (prop in obj) {
242
- return true;
243
- }
244
- return false;
245
- }
246
- });
247
- const elm = new MockHTMLElement(ownerDocument, tagName);
248
- proxyElements.set(host, elm);
249
- return host;
250
- }
251
- const proxyElements = new WeakMap();
252
- const upgradedElements = new WeakSet();
253
- function connectNode(ownerDocument, node) {
254
- node.ownerDocument = ownerDocument;
255
- if (node.nodeType === 1 /* ELEMENT_NODE */) {
256
- if (ownerDocument != null && node.nodeName.includes('-')) {
257
- const win = ownerDocument.defaultView;
258
- if (win != null && win.customElements != null) {
259
- if (typeof node.connectedCallback === 'function' && node.isConnected) {
260
- fireConnectedCallback(node);
261
- }
262
- }
263
- const shadowRoot = node.shadowRoot;
264
- if (shadowRoot != null) {
265
- shadowRoot.childNodes.forEach(childNode => {
266
- connectNode(ownerDocument, childNode);
267
- });
268
- }
269
- }
270
- node.childNodes.forEach(childNode => {
271
- connectNode(ownerDocument, childNode);
272
- });
273
- }
274
- else {
275
- node.childNodes.forEach(childNode => {
276
- childNode.ownerDocument = ownerDocument;
277
- });
278
- }
279
- }
280
- function fireConnectedCallback(node) {
281
- if (typeof node.connectedCallback === 'function') {
282
- if (tempDisableCallbacks.has(node.ownerDocument) === false) {
283
- try {
284
- node.connectedCallback();
285
- }
286
- catch (e) {
287
- console.error(e);
288
- }
289
- }
290
- }
291
- }
292
- function disconnectNode(node) {
293
- if (node.nodeType === 1 /* ELEMENT_NODE */) {
294
- if (node.nodeName.includes('-') === true && typeof node.disconnectedCallback === 'function') {
295
- if (tempDisableCallbacks.has(node.ownerDocument) === false) {
296
- try {
297
- node.disconnectedCallback();
298
- }
299
- catch (e) {
300
- console.error(e);
301
- }
302
- }
303
- }
304
- node.childNodes.forEach(disconnectNode);
305
- }
306
- }
307
- function attributeChanged(node, attrName, oldValue, newValue) {
308
- attrName = attrName.toLowerCase();
309
- const observedAttributes = node.constructor.observedAttributes;
310
- if (Array.isArray(observedAttributes) === true && observedAttributes.some(obs => obs.toLowerCase() === attrName) === true) {
311
- try {
312
- node.attributeChangedCallback(attrName, oldValue, newValue);
313
- }
314
- catch (e) {
315
- console.error(e);
316
- }
317
- }
318
- }
319
- function checkAttributeChanged(node) {
320
- return (node.nodeName.includes('-') === true && typeof node.attributeChangedCallback === 'function');
321
- }
322
- const tempDisableCallbacks = new Set();
323
-
324
- function unwrapExports (x) {
325
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
326
- }
327
-
328
- function createCommonjsModule(fn, module) {
329
- return module = { exports: {} }, fn(module, module.exports), module.exports;
330
- }
331
-
332
- var parse_1 = createCommonjsModule(function (module, exports) {
333
- Object.defineProperty(exports, "__esModule", { value: true });
334
- exports.default = parse;
335
- var reName = /^(?:\\.|[\w\-\u00b0-\uFFFF])+/, reEscape = /\\([\da-f]{1,6}\s?|(\s)|.)/gi,
336
- //modified version of https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L87
337
- reAttr = /^\s*((?:\\.|[\w\u00b0-\uFFFF-])+)\s*(?:(\S?)=\s*(?:(['"])([^]*?)\3|(#?(?:\\.|[\w\u00b0-\uFFFF-])*)|)|)\s*(i)?\]/;
338
- var actionTypes = {
339
- undefined: "exists",
340
- "": "equals",
341
- "~": "element",
342
- "^": "start",
343
- $: "end",
344
- "*": "any",
345
- "!": "not",
346
- "|": "hyphen"
347
- };
348
- var Traversals = {
349
- ">": "child",
350
- "<": "parent",
351
- "~": "sibling",
352
- "+": "adjacent"
353
- };
354
- var attribSelectors = {
355
- "#": ["id", "equals"],
356
- ".": ["class", "element"]
357
- };
358
- //pseudos, whose data-property is parsed as well
359
- var unpackPseudos = new Set(["has", "not", "matches"]);
360
- var stripQuotesFromPseudos = new Set(["contains", "icontains"]);
361
- var quotes = new Set(['"', "'"]);
362
- //unescape function taken from https://github.com/jquery/sizzle/blob/master/src/sizzle.js#L152
363
- function funescape(_, escaped, escapedWhitespace) {
364
- var high = parseInt(escaped, 16) - 0x10000;
365
- // NaN means non-codepoint
366
- return high !== high || escapedWhitespace
367
- ? escaped
368
- : high < 0
369
- ? // BMP codepoint
370
- String.fromCharCode(high + 0x10000)
371
- : // Supplemental Plane codepoint (surrogate pair)
372
- String.fromCharCode((high >> 10) | 0xd800, (high & 0x3ff) | 0xdc00);
373
- }
374
- function unescapeCSS(str) {
375
- return str.replace(reEscape, funescape);
376
- }
377
- function isWhitespace(c) {
378
- return c === " " || c === "\n" || c === "\t" || c === "\f" || c === "\r";
379
- }
380
- function parse(selector, options) {
381
- var subselects = [];
382
- selector = parseSelector(subselects, selector + "", options);
383
- if (selector !== "") {
384
- throw new Error("Unmatched selector: " + selector);
385
- }
386
- return subselects;
387
- }
388
- function parseSelector(subselects, selector, options) {
389
- var tokens = [], sawWS = false;
390
- function getName() {
391
- var match = selector.match(reName);
392
- if (!match) {
393
- throw new Error("Expected name, found " + selector);
394
- }
395
- var sub = match[0];
396
- selector = selector.substr(sub.length);
397
- return unescapeCSS(sub);
398
- }
399
- function stripWhitespace(start) {
400
- while (isWhitespace(selector.charAt(start)))
401
- start++;
402
- selector = selector.substr(start);
403
- }
404
- function isEscaped(pos) {
405
- var slashCount = 0;
406
- while (selector.charAt(--pos) === "\\")
407
- slashCount++;
408
- return (slashCount & 1) === 1;
409
- }
410
- stripWhitespace(0);
411
- while (selector !== "") {
412
- var firstChar = selector.charAt(0);
413
- if (isWhitespace(firstChar)) {
414
- sawWS = true;
415
- stripWhitespace(1);
416
- }
417
- else if (firstChar in Traversals) {
418
- tokens.push({ type: Traversals[firstChar] });
419
- sawWS = false;
420
- stripWhitespace(1);
421
- }
422
- else if (firstChar === ",") {
423
- if (tokens.length === 0) {
424
- throw new Error("Empty sub-selector");
425
- }
426
- subselects.push(tokens);
427
- tokens = [];
428
- sawWS = false;
429
- stripWhitespace(1);
430
- }
431
- else {
432
- if (sawWS) {
433
- if (tokens.length > 0) {
434
- tokens.push({ type: "descendant" });
435
- }
436
- sawWS = false;
437
- }
438
- if (firstChar === "*") {
439
- selector = selector.substr(1);
440
- tokens.push({ type: "universal" });
441
- }
442
- else if (firstChar in attribSelectors) {
443
- var _a = attribSelectors[firstChar], name_1 = _a[0], action = _a[1];
444
- selector = selector.substr(1);
445
- tokens.push({
446
- type: "attribute",
447
- name: name_1,
448
- action: action,
449
- value: getName(),
450
- ignoreCase: false
451
- });
452
- }
453
- else if (firstChar === "[") {
454
- selector = selector.substr(1);
455
- var data = selector.match(reAttr);
456
- if (!data) {
457
- throw new Error("Malformed attribute selector: " + selector);
458
- }
459
- selector = selector.substr(data[0].length);
460
- var name_2 = unescapeCSS(data[1]);
461
- if (!options ||
462
- ("lowerCaseAttributeNames" in options
463
- ? options.lowerCaseAttributeNames
464
- : !options.xmlMode)) {
465
- name_2 = name_2.toLowerCase();
466
- }
467
- tokens.push({
468
- type: "attribute",
469
- name: name_2,
470
- action: actionTypes[data[2]],
471
- value: unescapeCSS(data[4] || data[5] || ""),
472
- ignoreCase: !!data[6]
473
- });
474
- }
475
- else if (firstChar === ":") {
476
- if (selector.charAt(1) === ":") {
477
- selector = selector.substr(2);
478
- tokens.push({
479
- type: "pseudo-element",
480
- name: getName().toLowerCase()
481
- });
482
- continue;
483
- }
484
- selector = selector.substr(1);
485
- var name_3 = getName().toLowerCase();
486
- var data = null;
487
- if (selector.charAt(0) === "(") {
488
- if (unpackPseudos.has(name_3)) {
489
- var quot = selector.charAt(1);
490
- var quoted = quotes.has(quot);
491
- selector = selector.substr(quoted ? 2 : 1);
492
- data = [];
493
- selector = parseSelector(data, selector, options);
494
- if (quoted) {
495
- if (selector.charAt(0) !== quot) {
496
- throw new Error("Unmatched quotes in :" + name_3);
497
- }
498
- else {
499
- selector = selector.substr(1);
500
- }
501
- }
502
- if (selector.charAt(0) !== ")") {
503
- throw new Error("Missing closing parenthesis in :" + name_3 + " (" + selector + ")");
504
- }
505
- selector = selector.substr(1);
506
- }
507
- else {
508
- var pos = 1, counter = 1;
509
- for (; counter > 0 && pos < selector.length; pos++) {
510
- if (selector.charAt(pos) === "(" && !isEscaped(pos))
511
- counter++;
512
- else if (selector.charAt(pos) === ")" &&
513
- !isEscaped(pos))
514
- counter--;
515
- }
516
- if (counter) {
517
- throw new Error("Parenthesis not matched");
518
- }
519
- data = selector.substr(1, pos - 2);
520
- selector = selector.substr(pos);
521
- if (stripQuotesFromPseudos.has(name_3)) {
522
- var quot = data.charAt(0);
523
- if (quot === data.slice(-1) && quotes.has(quot)) {
524
- data = data.slice(1, -1);
525
- }
526
- data = unescapeCSS(data);
527
- }
528
- }
529
- }
530
- tokens.push({ type: "pseudo", name: name_3, data: data });
531
- }
532
- else if (reName.test(selector)) {
533
- var name_4 = getName();
534
- if (!options ||
535
- ("lowerCaseTags" in options
536
- ? options.lowerCaseTags
537
- : !options.xmlMode)) {
538
- name_4 = name_4.toLowerCase();
539
- }
540
- tokens.push({ type: "tag", name: name_4 });
541
- }
542
- else {
543
- if (tokens.length &&
544
- tokens[tokens.length - 1].type === "descendant") {
545
- tokens.pop();
546
- }
547
- addToken(subselects, tokens);
548
- return selector;
549
- }
550
- }
551
- }
552
- addToken(subselects, tokens);
553
- return selector;
554
- }
555
- function addToken(subselects, tokens) {
556
- if (subselects.length > 0 && tokens.length === 0) {
557
- throw new Error("Empty sub-selector");
558
- }
559
- subselects.push(tokens);
560
- }
561
- });
562
-
563
- unwrapExports(parse_1);
564
-
565
- var stringify_1 = createCommonjsModule(function (module, exports) {
566
- Object.defineProperty(exports, "__esModule", { value: true });
567
- var actionTypes = {
568
- equals: "",
569
- element: "~",
570
- start: "^",
571
- end: "$",
572
- any: "*",
573
- not: "!",
574
- hyphen: "|"
575
- };
576
- var simpleSelectors = {
577
- child: " > ",
578
- parent: " < ",
579
- sibling: " ~ ",
580
- adjacent: " + ",
581
- descendant: " ",
582
- universal: "*"
583
- };
584
- function stringify(token) {
585
- return token.map(stringifySubselector).join(", ");
586
- }
587
- exports.default = stringify;
588
- function stringifySubselector(token) {
589
- return token.map(stringifyToken).join("");
590
- }
591
- function stringifyToken(token) {
592
- if (token.type in simpleSelectors)
593
- return simpleSelectors[token.type];
594
- if (token.type === "tag")
595
- return escapeName(token.name);
596
- if (token.type === "pseudo-element")
597
- return "::" + escapeName(token.name);
598
- if (token.type === "attribute") {
599
- if (token.action === "exists")
600
- return "[" + escapeName(token.name) + "]";
601
- if (token.name === "id" &&
602
- token.action === "equals" &&
603
- !token.ignoreCase)
604
- return "#" + escapeName(token.value);
605
- if (token.name === "class" &&
606
- token.action === "element" &&
607
- !token.ignoreCase)
608
- return "." + escapeName(token.value);
609
- return ("[" +
610
- escapeName(token.name) +
611
- actionTypes[token.action] +
612
- "='" +
613
- escapeName(token.value) +
614
- "'" +
615
- (token.ignoreCase ? "i" : "") +
616
- "]");
617
- }
618
- if (token.type === "pseudo") {
619
- if (token.data === null)
620
- return ":" + escapeName(token.name);
621
- if (typeof token.data === "string") {
622
- return ":" + escapeName(token.name) + "(" + token.data + ")";
623
- }
624
- return ":" + escapeName(token.name) + "(" + stringify(token.data) + ")";
625
- }
626
- throw new Error("Unknown type");
627
- }
628
- function escapeName(str) {
629
- //TODO
630
- return str;
631
- }
632
- });
633
-
634
- unwrapExports(stringify_1);
635
-
636
- var lib = createCommonjsModule(function (module, exports) {
637
- function __export(m) {
638
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
639
- }
640
- Object.defineProperty(exports, "__esModule", { value: true });
641
- __export(parse_1);
642
- var parse_1$1 = parse_1;
643
- exports.parse = parse_1$1.default;
644
-
645
- exports.stringify = stringify_1.default;
646
- });
647
-
648
- unwrapExports(lib);
649
- var lib_1 = lib.parse;
650
- var lib_2 = lib.stringify;
651
-
652
- function closest(selector, elm) {
653
- while (elm != null) {
654
- if (elm.matches(selector)) {
655
- return elm;
656
- }
657
- elm = elm.parentNode;
658
- }
659
- return null;
660
- }
661
- function matches(selector, elm) {
662
- const selectors = lib_1(selector);
663
- return matchesSelectors(selectors, elm);
664
- }
665
- function selectOne(selector, elm) {
666
- const selectors = lib_1(selector);
667
- return selectOneRecursion(selectors, elm);
668
- }
669
- function selectOneRecursion(selectors, elm) {
670
- const children = elm.children;
671
- for (let i = 0, ii = children.length; i < ii; i++) {
672
- if (matchesSelectors(selectors, children[i]) === true) {
673
- return children[i];
674
- }
675
- const childMatch = selectOneRecursion(selectors, children[i]);
676
- if (childMatch != null) {
677
- return childMatch;
678
- }
679
- }
680
- return null;
681
- }
682
- function selectAll(selector, elm) {
683
- const selectors = lib_1(selector);
684
- const foundElms = [];
685
- selectAllRecursion(selectors, elm, foundElms);
686
- return foundElms;
687
- }
688
- function selectAllRecursion(selectors, elm, found) {
689
- const children = elm.children;
690
- for (let i = 0, ii = children.length; i < ii; i++) {
691
- if (matchesSelectors(selectors, children[i]) === true) {
692
- found.push(children[i]);
693
- }
694
- selectAllRecursion(selectors, children[i], found);
695
- }
696
- }
697
- function matchesSelectors(selectors, elm) {
698
- for (let i = 0, ii = selectors.length; i < ii; i++) {
699
- if (matchesEverySelector(selectors[i], elm) === true) {
700
- return true;
701
- }
702
- }
703
- return false;
704
- }
705
- function matchesEverySelector(selectorData, elm) {
706
- for (let i = 0, ii = selectorData.length; i < ii; i++) {
707
- if (matchesSelector(selectorData[i], elm) === false) {
708
- return false;
709
- }
710
- }
711
- return true;
712
- }
713
- function matchesSelector(selectorData, elm) {
714
- switch (selectorData.type) {
715
- case 'tag':
716
- return elm.nodeName.toLowerCase() === selectorData.name.toLowerCase();
717
- case 'attribute':
718
- if (selectorData.name === 'class') {
719
- return elm.classList.contains(selectorData.value);
720
- }
721
- if (selectorData.action === 'exists') {
722
- return elm.hasAttribute(selectorData.name);
723
- }
724
- if (selectorData.action === 'equals') {
725
- return elm.getAttribute(selectorData.name) === selectorData.value;
726
- }
727
- return false;
728
- case 'child':
729
- // TODO
730
- return true;
731
- }
732
- return false;
733
- }
734
-
735
- class CSSStyleDeclaration {
736
- constructor() {
737
- this._styles = new Map();
738
- }
739
- setProperty(prop, value) {
740
- prop = jsCaseToCssCase(prop);
741
- if (value == null || value === '') {
742
- this._styles.delete(prop);
743
- }
744
- else {
745
- this._styles.set(prop, String(value));
746
- }
747
- }
748
- getPropertyValue(prop) {
749
- prop = jsCaseToCssCase(prop);
750
- return String(this._styles.get(prop) || '');
751
- }
752
- removeProperty(prop) {
753
- prop = jsCaseToCssCase(prop);
754
- this._styles.delete(prop);
755
- }
756
- get length() {
757
- return this._styles.size;
758
- }
759
- get cssText() {
760
- const cssText = [];
761
- this._styles.forEach((value, prop) => {
762
- cssText.push(`${prop}: ${value};`);
763
- });
764
- return cssText.join(' ').trim();
765
- }
766
- set cssText(cssText) {
767
- if (cssText == null || cssText === '') {
768
- this._styles.clear();
769
- return;
770
- }
771
- cssText.split(';').forEach(rule => {
772
- rule = rule.trim();
773
- if (rule.length > 0) {
774
- const splt = rule.split(':');
775
- if (splt.length > 1) {
776
- const prop = splt[0].trim();
777
- const value = splt[1].trim();
778
- if (prop !== '' && value !== '') {
779
- this._styles.set(jsCaseToCssCase(prop), value);
780
- }
781
- }
782
- }
783
- });
784
- }
785
- }
786
- function createCSSStyleDeclaration() {
787
- return new Proxy(new CSSStyleDeclaration(), cssProxyHandler);
788
- }
789
- const cssProxyHandler = {
790
- get(cssStyle, prop) {
791
- if (prop in cssStyle) {
792
- return cssStyle[prop];
793
- }
794
- prop = cssCaseToJsCase(prop);
795
- return cssStyle.getPropertyValue(prop);
796
- },
797
- set(cssStyle, prop, value) {
798
- if (prop in cssStyle) {
799
- cssStyle[prop] = value;
800
- }
801
- else {
802
- cssStyle.setProperty(prop, value);
803
- }
804
- return true;
805
- }
806
- };
807
- function cssCaseToJsCase(str) {
808
- // font-size to fontSize
809
- if (str.length > 1 && str.includes('-') === true) {
810
- str = str.toLowerCase().split('-').map(segment => segment.charAt(0).toUpperCase() + segment.slice(1)).join('');
811
- str = str.substr(0, 1).toLowerCase() + str.substr(1);
812
- }
813
- return str;
814
- }
815
- function jsCaseToCssCase(str) {
816
- // fontSize to font-size
817
- if (str.length > 1 && (str.includes('-') === false && /[A-Z]/.test(str) === true)) {
818
- str = str.replace(/([A-Z])/g, g => ' ' + g[0]).trim().replace(/ /g, '-').toLowerCase();
819
- }
820
- return str;
821
- }
822
-
823
- function dataset(elm) {
824
- const ds = {};
825
- const attributes = elm.attributes;
826
- const attrLen = attributes.length;
827
- for (let i = 0; i < attrLen; i++) {
828
- const attr = attributes.item(i);
829
- const nodeName = attr.nodeName;
830
- if (nodeName.startsWith('data-')) {
831
- ds[dashToPascalCase(nodeName)] = attr.nodeValue;
832
- }
833
- }
834
- return new Proxy(ds, {
835
- get(_obj, camelCaseProp) {
836
- return ds[camelCaseProp];
837
- },
838
- set(_obj, camelCaseProp, value) {
839
- const dataAttr = toDataAttribute(camelCaseProp);
840
- elm.setAttribute(dataAttr, value);
841
- return true;
842
- }
843
- });
844
- }
845
- function toDataAttribute(str) {
846
- return 'data-' + String(str).replace(/([A-Z0-9])/g, g => ' ' + g[0]).trim().replace(/ /g, '-').toLowerCase();
847
- }
848
- function dashToPascalCase(str) {
849
- str = String(str).substr(5);
850
- return str.split('-').map((segment, index) => {
851
- if (index === 0) {
852
- return segment.charAt(0).toLowerCase() + segment.slice(1);
853
- }
854
- return segment.charAt(0).toUpperCase() + segment.slice(1);
855
- }).join('');
856
- }
857
-
858
- class MockClassList {
859
- constructor(elm) {
860
- this.elm = elm;
861
- }
862
- add(...classNames) {
863
- const clsNames = getItems(this.elm);
864
- let updated = false;
865
- classNames.forEach(className => {
866
- className = String(className);
867
- validateClass(className);
868
- if (clsNames.includes(className) === false) {
869
- clsNames.push(className);
870
- updated = true;
871
- }
872
- });
873
- if (updated) {
874
- this.elm.setAttributeNS(null, 'class', clsNames.join(' '));
875
- }
876
- }
877
- remove(...classNames) {
878
- const clsNames = getItems(this.elm);
879
- let updated = false;
880
- classNames.forEach(className => {
881
- className = String(className);
882
- validateClass(className);
883
- const index = clsNames.indexOf(className);
884
- if (index > -1) {
885
- clsNames.splice(index, 1);
886
- updated = true;
887
- }
888
- });
889
- if (updated) {
890
- this.elm.setAttributeNS(null, 'class', clsNames.filter(c => c.length > 0).join(' '));
891
- }
892
- }
893
- contains(className) {
894
- className = String(className);
895
- return getItems(this.elm).includes(className);
896
- }
897
- toggle(className) {
898
- className = String(className);
899
- if (this.contains(className) === true) {
900
- this.remove(className);
901
- }
902
- else {
903
- this.add(className);
904
- }
905
- }
906
- get length() {
907
- return getItems(this.elm).length;
908
- }
909
- item(index) {
910
- return getItems(this.elm)[index];
911
- }
912
- toString() {
913
- return getItems(this.elm).join(' ');
914
- }
915
- }
916
- function validateClass(className) {
917
- if (className === '') {
918
- throw new Error('The token provided must not be empty.');
919
- }
920
- if (/\s/.test(className)) {
921
- throw new Error(`The token provided ('${className}') contains HTML space characters, which are not valid in tokens.`);
922
- }
923
- }
924
- function getItems(elm) {
925
- const className = elm.getAttribute('class');
926
- if (typeof className === 'string' && className.length > 0) {
927
- return className.trim().split(' ').filter(c => c.length > 0);
928
- }
929
- return [];
930
- }
931
-
932
- class MockEvent {
933
- constructor(type, eventInitDict) {
934
- this.bubbles = false;
935
- this.cancelBubble = false;
936
- this.cancelable = false;
937
- this.composed = false;
938
- this.currentTarget = null;
939
- this.defaultPrevented = false;
940
- this.srcElement = null;
941
- this.target = null;
942
- if (typeof type !== 'string') {
943
- throw new Error(`Event type required`);
944
- }
945
- this.type = type;
946
- this.timeStamp = Date.now();
947
- if (eventInitDict != null) {
948
- Object.assign(this, eventInitDict);
949
- }
950
- }
951
- preventDefault() {
952
- this.defaultPrevented = true;
953
- }
954
- stopPropagation() {
955
- this.cancelBubble = true;
956
- }
957
- stopImmediatePropagation() {
958
- this.cancelBubble = true;
959
- }
960
- }
961
- class MockCustomEvent extends MockEvent {
962
- constructor(type, customEventInitDic) {
963
- super(type);
964
- this.detail = null;
965
- if (customEventInitDic != null) {
966
- Object.assign(this, customEventInitDic);
967
- }
968
- }
969
- }
970
- class MockKeyboardEvent extends MockEvent {
971
- constructor(type, keyboardEventInitDic) {
972
- super(type);
973
- this.code = '';
974
- this.key = '';
975
- this.altKey = false;
976
- this.ctrlKey = false;
977
- this.metaKey = false;
978
- this.shiftKey = false;
979
- this.location = 0;
980
- this.repeat = false;
981
- if (keyboardEventInitDic != null) {
982
- Object.assign(this, keyboardEventInitDic);
983
- }
984
- }
985
- }
986
- class MockMouseEvent extends MockEvent {
987
- constructor(type, mouseEventInitDic) {
988
- super(type);
989
- this.screenX = 0;
990
- this.screenY = 0;
991
- this.clientX = 0;
992
- this.clientY = 0;
993
- this.ctrlKey = false;
994
- this.shiftKey = false;
995
- this.altKey = false;
996
- this.metaKey = false;
997
- this.button = 0;
998
- this.buttons = 0;
999
- this.relatedTarget = null;
1000
- if (mouseEventInitDic != null) {
1001
- Object.assign(this, mouseEventInitDic);
1002
- }
1003
- }
1004
- }
1005
- class MockEventListener {
1006
- constructor(type, handler) {
1007
- this.type = type;
1008
- this.handler = handler;
1009
- }
1010
- }
1011
- function addEventListener(elm, type, handler) {
1012
- const target = elm;
1013
- if (target.__listeners == null) {
1014
- target.__listeners = [];
1015
- }
1016
- target.__listeners.push(new MockEventListener(type, handler));
1017
- }
1018
- function removeEventListener(elm, type, handler) {
1019
- const target = elm;
1020
- if (target != null && Array.isArray(target.__listeners) === true) {
1021
- const elmListener = target.__listeners.find(e => e.type === type && e.handler === handler);
1022
- if (elmListener != null) {
1023
- const index = target.__listeners.indexOf(elmListener);
1024
- target.__listeners.splice(index, 1);
1025
- }
1026
- }
1027
- }
1028
- function resetEventListeners(target) {
1029
- if (target != null && target.__listeners != null) {
1030
- target.__listeners = null;
1031
- }
1032
- }
1033
- function triggerEventListener(elm, ev) {
1034
- if (elm == null || ev.cancelBubble === true) {
1035
- return;
1036
- }
1037
- const target = elm;
1038
- ev.currentTarget = elm;
1039
- if (Array.isArray(target.__listeners) === true) {
1040
- const listeners = target.__listeners.filter(e => e.type === ev.type);
1041
- listeners.forEach(listener => {
1042
- try {
1043
- listener.handler.call(target, ev);
1044
- }
1045
- catch (err) {
1046
- console.error(err);
1047
- }
1048
- });
1049
- }
1050
- if (ev.bubbles === false) {
1051
- return;
1052
- }
1053
- if (elm.nodeName === "#document" /* DOCUMENT_NODE */) {
1054
- triggerEventListener(elm.defaultView, ev);
1055
- }
1056
- else {
1057
- triggerEventListener(elm.parentElement, ev);
1058
- }
1059
- }
1060
- function dispatchEvent(currentTarget, ev) {
1061
- ev.target = currentTarget;
1062
- triggerEventListener(currentTarget, ev);
1063
- return true;
1064
- }
1065
-
1066
- function serializeNodeToHtml(elm, opts = {}) {
1067
- const output = {
1068
- currentLineWidth: 0,
1069
- indent: 0,
1070
- isWithinBody: false,
1071
- text: [],
1072
- };
1073
- if (opts.prettyHtml) {
1074
- if (typeof opts.indentSpaces !== 'number') {
1075
- opts.indentSpaces = 2;
1076
- }
1077
- if (typeof opts.newLines !== 'boolean') {
1078
- opts.newLines = true;
1079
- }
1080
- opts.approximateLineWidth = -1;
1081
- }
1082
- else {
1083
- opts.prettyHtml = false;
1084
- if (typeof opts.newLines !== 'boolean') {
1085
- opts.newLines = false;
1086
- }
1087
- if (typeof opts.indentSpaces !== 'number') {
1088
- opts.indentSpaces = 0;
1089
- }
1090
- }
1091
- if (typeof opts.approximateLineWidth !== 'number') {
1092
- opts.approximateLineWidth = -1;
1093
- }
1094
- if (typeof opts.removeEmptyAttributes !== 'boolean') {
1095
- opts.removeEmptyAttributes = true;
1096
- }
1097
- if (typeof opts.removeAttributeQuotes !== 'boolean') {
1098
- opts.removeAttributeQuotes = false;
1099
- }
1100
- if (typeof opts.removeBooleanAttributeQuotes !== 'boolean') {
1101
- opts.removeBooleanAttributeQuotes = false;
1102
- }
1103
- if (typeof opts.removeHtmlComments !== 'boolean') {
1104
- opts.removeHtmlComments = false;
1105
- }
1106
- if (typeof opts.serializeShadowRoot !== 'boolean') {
1107
- opts.serializeShadowRoot = false;
1108
- }
1109
- if (opts.outerHtml) {
1110
- serializeToHtml(elm, opts, output, false);
1111
- }
1112
- else {
1113
- for (let i = 0, ii = elm.childNodes.length; i < ii; i++) {
1114
- serializeToHtml(elm.childNodes[i], opts, output, false);
1115
- }
1116
- }
1117
- if (output.text[0] === '\n') {
1118
- output.text.shift();
1119
- }
1120
- if (output.text[output.text.length - 1] === '\n') {
1121
- output.text.pop();
1122
- }
1123
- return output.text.join('');
1124
- }
1125
- function serializeToHtml(node, opts, output, isShadowRoot) {
1126
- if (node.nodeType === 1 /* ELEMENT_NODE */ || isShadowRoot) {
1127
- const tagName = isShadowRoot ? 'mock:shadow-root' : getTagName(node);
1128
- if (tagName === 'body') {
1129
- output.isWithinBody = true;
1130
- }
1131
- const ignoreTag = (opts.excludeTags != null && opts.excludeTags.includes(tagName));
1132
- if (ignoreTag === false) {
1133
- if (opts.newLines) {
1134
- output.text.push('\n');
1135
- output.currentLineWidth = 0;
1136
- }
1137
- if (opts.indentSpaces > 0) {
1138
- for (let i = 0; i < output.indent; i++) {
1139
- output.text.push(' ');
1140
- }
1141
- output.currentLineWidth += output.indent;
1142
- }
1143
- output.text.push('<' + tagName);
1144
- output.currentLineWidth += (tagName.length + 1);
1145
- const attrsLength = node.attributes.length;
1146
- const attributes = (opts.prettyHtml && attrsLength > 1) ?
1147
- cloneAttributes(node.attributes, true) :
1148
- node.attributes;
1149
- for (let i = 0; i < attrsLength; i++) {
1150
- const attr = attributes.item(i);
1151
- const attrName = attr.name;
1152
- if (attrName === 'style') {
1153
- continue;
1154
- }
1155
- let attrValue = attr.value;
1156
- if (opts.removeEmptyAttributes && attrValue === '' && REMOVE_EMPTY_ATTR.has(attrName)) {
1157
- continue;
1158
- }
1159
- const attrNamespaceURI = attr.namespaceURI;
1160
- if (attrNamespaceURI == null) {
1161
- output.currentLineWidth += (attrName.length + 1);
1162
- if (opts.approximateLineWidth > 0 && output.currentLineWidth > opts.approximateLineWidth) {
1163
- output.text.push('\n' + attrName);
1164
- output.currentLineWidth = 0;
1165
- }
1166
- else {
1167
- output.text.push(' ' + attrName);
1168
- }
1169
- }
1170
- else if (attrNamespaceURI === 'http://www.w3.org/XML/1998/namespace') {
1171
- output.text.push(' xml:' + attrName);
1172
- output.currentLineWidth += (attrName.length + 5);
1173
- }
1174
- else if (attrNamespaceURI === 'http://www.w3.org/2000/xmlns/') {
1175
- if (attrName !== 'xmlns') {
1176
- output.text.push(' xmlns:' + attrName);
1177
- output.currentLineWidth += (attrName.length + 7);
1178
- }
1179
- else {
1180
- output.text.push(' ' + attrName);
1181
- output.currentLineWidth += (attrName.length + 1);
1182
- }
1183
- }
1184
- else if (attrNamespaceURI === XLINK_NS) {
1185
- output.text.push(' xlink:' + attrName);
1186
- output.currentLineWidth += (attrName.length + 7);
1187
- }
1188
- else {
1189
- output.text.push(' ' + attrNamespaceURI + ':' + attrName);
1190
- output.currentLineWidth += (attrNamespaceURI.length + attrName.length + 2);
1191
- }
1192
- if (opts.prettyHtml && attrName === 'class') {
1193
- attrValue = attr.value = attrValue.split(' ').filter(t => t !== '').sort().join(' ').trim();
1194
- }
1195
- if (attrValue === '') {
1196
- if (opts.removeBooleanAttributeQuotes && BOOLEAN_ATTR.has(attrName)) {
1197
- continue;
1198
- }
1199
- if (opts.removeEmptyAttributes && attrName.startsWith('data-')) {
1200
- continue;
1201
- }
1202
- }
1203
- if (opts.removeAttributeQuotes && CAN_REMOVE_ATTR_QUOTES.test(attrValue)) {
1204
- output.text.push('=' + escapeString(attrValue, true));
1205
- output.currentLineWidth += (attrValue.length + 1);
1206
- }
1207
- else {
1208
- output.text.push('="' + escapeString(attrValue, true) + '"');
1209
- output.currentLineWidth += (attrValue.length + 3);
1210
- }
1211
- }
1212
- if (node.hasAttribute('style')) {
1213
- const cssText = node.style.cssText;
1214
- if (opts.approximateLineWidth > 0 && (output.currentLineWidth + cssText.length + 10) > opts.approximateLineWidth) {
1215
- output.text.push(`\nstyle="${cssText}">`);
1216
- output.currentLineWidth = 0;
1217
- }
1218
- else {
1219
- output.text.push(` style="${cssText}">`);
1220
- output.currentLineWidth += (cssText.length + 10);
1221
- }
1222
- }
1223
- else {
1224
- output.text.push('>');
1225
- output.currentLineWidth += 1;
1226
- }
1227
- }
1228
- if (EMPTY_ELEMENTS.has(tagName) === false) {
1229
- if (opts.serializeShadowRoot && node.shadowRoot != null) {
1230
- output.indent = output.indent + opts.indentSpaces;
1231
- serializeToHtml(node.shadowRoot, opts, output, true);
1232
- output.indent = output.indent - opts.indentSpaces;
1233
- if (opts.newLines && (node.childNodes.length === 0 || (node.childNodes.length === 1 && node.childNodes[0].nodeType === 3 /* TEXT_NODE */ && node.childNodes[0].nodeValue.trim() === ''))) {
1234
- output.text.push('\n');
1235
- output.currentLineWidth = 0;
1236
- for (let i = 0; i < output.indent; i++) {
1237
- output.text.push(' ');
1238
- }
1239
- output.currentLineWidth += output.indent;
1240
- }
1241
- }
1242
- if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
1243
- const childNodes = tagName === 'template' ? node.content.childNodes : (node.childNodes);
1244
- const childNodeLength = childNodes.length;
1245
- if (childNodeLength > 0) {
1246
- if (childNodeLength === 1 && childNodes[0].nodeType === 3 /* TEXT_NODE */ && (typeof childNodes[0].nodeValue !== 'string' || childNodes[0].nodeValue.trim() === '')) ;
1247
- else {
1248
- if (opts.indentSpaces > 0 && ignoreTag === false) {
1249
- output.indent = output.indent + opts.indentSpaces;
1250
- }
1251
- for (let i = 0; i < childNodeLength; i++) {
1252
- serializeToHtml(childNodes[i], opts, output, false);
1253
- }
1254
- if (ignoreTag === false) {
1255
- if (opts.newLines) {
1256
- output.text.push('\n');
1257
- output.currentLineWidth = 0;
1258
- }
1259
- if (opts.indentSpaces > 0) {
1260
- output.indent = output.indent - opts.indentSpaces;
1261
- for (let i = 0; i < output.indent; i++) {
1262
- output.text.push(' ');
1263
- }
1264
- output.currentLineWidth += output.indent;
1265
- }
1266
- }
1267
- }
1268
- }
1269
- if (ignoreTag === false) {
1270
- output.text.push('</' + tagName + '>');
1271
- output.currentLineWidth += (tagName.length + 3);
1272
- }
1273
- }
1274
- }
1275
- if (opts.approximateLineWidth > 0 && STRUCTURE_ELEMENTS.has(tagName)) {
1276
- output.text.push('\n');
1277
- output.currentLineWidth = 0;
1278
- }
1279
- if (tagName === 'body') {
1280
- output.isWithinBody = false;
1281
- }
1282
- }
1283
- else if (node.nodeType === 3 /* TEXT_NODE */) {
1284
- let textContent = node.nodeValue;
1285
- if (typeof textContent === 'string') {
1286
- const trimmedTextContent = textContent.trim();
1287
- if (trimmedTextContent === '') {
1288
- // this text node is whitespace only
1289
- if (isWithinWhitespaceSensitive(node)) {
1290
- // whitespace matters within this element
1291
- // just add the exact text we were given
1292
- output.text.push(textContent);
1293
- output.currentLineWidth += textContent.length;
1294
- }
1295
- else if (opts.approximateLineWidth > 0 && !output.isWithinBody) ;
1296
- else if (!opts.prettyHtml) {
1297
- // this text node is only whitespace, and it's not
1298
- // within a whitespace sensitive element like <pre> or <code>
1299
- // so replace the entire white space with a single new line
1300
- output.currentLineWidth += 1;
1301
- if (opts.approximateLineWidth > 0 && output.currentLineWidth > opts.approximateLineWidth) {
1302
- // good enough for a new line
1303
- // for perf these are all just estimates
1304
- // we don't care to ensure exact line lengths
1305
- output.text.push('\n');
1306
- output.currentLineWidth = 0;
1307
- }
1308
- else {
1309
- // let's keep it all on the same line yet
1310
- output.text.push(' ');
1311
- }
1312
- }
1313
- }
1314
- else {
1315
- // this text node has text content
1316
- if (opts.newLines) {
1317
- output.text.push('\n');
1318
- output.currentLineWidth = 0;
1319
- }
1320
- if (opts.indentSpaces > 0) {
1321
- for (let i = 0; i < output.indent; i++) {
1322
- output.text.push(' ');
1323
- }
1324
- output.currentLineWidth += output.indent;
1325
- }
1326
- let textContentLength = textContent.length;
1327
- if (textContentLength > 0) {
1328
- // this text node has text content
1329
- const parentTagName = (node.parentNode != null && node.parentNode.nodeType === 1 /* ELEMENT_NODE */ ? node.parentNode.nodeName : null);
1330
- if (NON_ESCAPABLE_CONTENT.has(parentTagName)) {
1331
- // this text node cannot have its content escaped since it's going
1332
- // into an element like <style> or <script>
1333
- if (isWithinWhitespaceSensitive(node)) {
1334
- output.text.push(textContent);
1335
- }
1336
- else {
1337
- output.text.push(trimmedTextContent);
1338
- textContentLength = trimmedTextContent.length;
1339
- }
1340
- output.currentLineWidth += textContentLength;
1341
- }
1342
- else {
1343
- // this text node is going into a normal element and html can be escaped
1344
- if (opts.prettyHtml) {
1345
- // pretty print the text node
1346
- output.text.push(escapeString(textContent.replace(/\s\s+/g, ' ').trim(), false));
1347
- output.currentLineWidth += textContentLength;
1348
- }
1349
- else {
1350
- // not pretty printing the text node
1351
- if (isWithinWhitespaceSensitive(node)) {
1352
- output.currentLineWidth += textContentLength;
1353
- }
1354
- else {
1355
- // this element is not a whitespace sensitive one, like <pre> or <code> so
1356
- // any whitespace at the start and end can be cleaned up to just be one space
1357
- if (/\s/.test(textContent.charAt(0))) {
1358
- textContent = ' ' + textContent.trimLeft();
1359
- }
1360
- textContentLength = textContent.length;
1361
- if (textContentLength > 1) {
1362
- if (/\s/.test(textContent.charAt(textContentLength - 1))) {
1363
- if (opts.approximateLineWidth > 0 && (output.currentLineWidth + textContentLength) > opts.approximateLineWidth) {
1364
- textContent = textContent.trimRight() + '\n';
1365
- output.currentLineWidth = 0;
1366
- }
1367
- else {
1368
- textContent = textContent.trimRight() + ' ';
1369
- }
1370
- }
1371
- }
1372
- output.currentLineWidth += textContentLength;
1373
- }
1374
- output.text.push(escapeString(textContent, false));
1375
- }
1376
- }
1377
- }
1378
- }
1379
- }
1380
- }
1381
- else if (node.nodeType === 8 /* COMMENT_NODE */) {
1382
- const nodeValue = node.nodeValue;
1383
- if (opts.removeHtmlComments) {
1384
- const isHydrateAnnotation = nodeValue.startsWith(CONTENT_REF_ID + '.') || nodeValue.startsWith(ORG_LOCATION_ID + '.') || nodeValue.startsWith(SLOT_NODE_ID + '.') || nodeValue.startsWith(TEXT_NODE_ID + '.');
1385
- if (!isHydrateAnnotation) {
1386
- return;
1387
- }
1388
- }
1389
- if (opts.newLines) {
1390
- output.text.push('\n');
1391
- output.currentLineWidth = 0;
1392
- }
1393
- if (opts.indentSpaces > 0) {
1394
- for (let i = 0; i < output.indent; i++) {
1395
- output.text.push(' ');
1396
- }
1397
- output.currentLineWidth += output.indent;
1398
- }
1399
- output.text.push('<!--' + nodeValue + '-->');
1400
- output.currentLineWidth += (nodeValue.length + 7);
1401
- }
1402
- else if (node.nodeType === 10 /* DOCUMENT_TYPE_NODE */) {
1403
- output.text.push('<!doctype html>');
1404
- }
1405
- }
1406
- const AMP_REGEX = /&/g;
1407
- const NBSP_REGEX = /\u00a0/g;
1408
- const DOUBLE_QUOTE_REGEX = /"/g;
1409
- const LT_REGEX = /</g;
1410
- const GT_REGEX = />/g;
1411
- const CAN_REMOVE_ATTR_QUOTES = /^[^ \t\n\f\r"'`=<>\/\\-]+$/;
1412
- function getTagName(element) {
1413
- if (element.namespaceURI === 'http://www.w3.org/1999/xhtml') {
1414
- return element.nodeName.toLowerCase();
1415
- }
1416
- else {
1417
- return element.nodeName;
1418
- }
1419
- }
1420
- function escapeString(str, attrMode) {
1421
- str = str.replace(AMP_REGEX, '&amp;').replace(NBSP_REGEX, '&nbsp;');
1422
- if (attrMode) {
1423
- return str.replace(DOUBLE_QUOTE_REGEX, '&quot;');
1424
- }
1425
- return str.replace(LT_REGEX, '&lt;').replace(GT_REGEX, '&gt;');
1426
- }
1427
- function isWithinWhitespaceSensitive(node) {
1428
- while (node != null) {
1429
- if (WHITESPACE_SENSITIVE.has(node.nodeName)) {
1430
- return true;
1431
- }
1432
- node = node.parentNode;
1433
- }
1434
- return false;
1435
- }
1436
- /*@__PURE__*/ const NON_ESCAPABLE_CONTENT = new Set(['STYLE', 'SCRIPT', 'IFRAME', 'NOSCRIPT', 'XMP', 'NOEMBED', 'NOFRAMES', 'PLAINTEXT']);
1437
- /*@__PURE__*/ const WHITESPACE_SENSITIVE = new Set(['CODE', 'OUTPUT', 'PLAINTEXT', 'PRE', 'TEMPLATE', 'TEXTAREA']);
1438
- /*@__PURE__*/ const EMPTY_ELEMENTS = new Set(['area', 'base', 'basefont', 'bgsound', 'br', 'col', 'embed', 'frame', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'trace', 'wbr']);
1439
- /*@__PURE__*/ const REMOVE_EMPTY_ATTR = new Set(['class', 'dir', 'id', 'lang', 'name', 'title']);
1440
- /*@__PURE__*/ const BOOLEAN_ATTR = new Set(['allowfullscreen', 'async', 'autofocus', 'autoplay', 'checked', 'compact', 'controls', 'declare', 'default', 'defaultchecked', 'defaultmuted', 'defaultselected', 'defer', 'disabled', 'enabled', 'formnovalidate', 'hidden', 'indeterminate', 'inert', 'ismap', 'itemscope', 'loop', 'multiple', 'muted', 'nohref', 'nomodule', 'noresize', 'noshade', 'novalidate', 'nowrap', 'open', 'pauseonexit', 'readonly', 'required', 'reversed', 'scoped', 'seamless', 'selected', 'sortable', 'truespeed', 'typemustmatch', 'visible']);
1441
- /*@__PURE__*/ const STRUCTURE_ELEMENTS = new Set(['html', 'body', 'head', 'iframe', 'meta', 'link', 'base', 'title', 'script', 'style']);
1442
-
1443
- const parse5=/*@__PURE__*/function(e){const t=[65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111];var n="�",s={EOF:-1,NULL:0,TABULATION:9,CARRIAGE_RETURN:13,LINE_FEED:10,FORM_FEED:12,SPACE:32,EXCLAMATION_MARK:33,QUOTATION_MARK:34,NUMBER_SIGN:35,AMPERSAND:38,APOSTROPHE:39,HYPHEN_MINUS:45,SOLIDUS:47,DIGIT_0:48,DIGIT_9:57,SEMICOLON:59,LESS_THAN_SIGN:60,EQUALS_SIGN:61,GREATER_THAN_SIGN:62,QUESTION_MARK:63,LATIN_CAPITAL_A:65,LATIN_CAPITAL_F:70,LATIN_CAPITAL_X:88,LATIN_CAPITAL_Z:90,RIGHT_SQUARE_BRACKET:93,GRAVE_ACCENT:96,LATIN_SMALL_A:97,LATIN_SMALL_F:102,LATIN_SMALL_X:120,LATIN_SMALL_Z:122,REPLACEMENT_CHARACTER:65533},r={DASH_DASH_STRING:[45,45],DOCTYPE_STRING:[68,79,67,84,89,80,69],CDATA_START_STRING:[91,67,68,65,84,65,91],SCRIPT_STRING:[115,99,114,105,112,116],PUBLIC_STRING:[80,85,66,76,73,67],SYSTEM_STRING:[83,89,83,84,69,77]},i=function(e){return e>=55296&&e<=57343},T=function(e){return e>=56320&&e<=57343},o=function(e,t){return 1024*(e-55296)+9216+t},E=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},a=function(e){return e>=64976&&e<=65007||t.indexOf(e)>-1},_="control-character-in-input-stream",h="noncharacter-in-input-stream",A="surrogate-in-input-stream",c="non-void-html-element-start-tag-with-trailing-solidus",l="end-tag-with-attributes",m="end-tag-with-trailing-solidus",N="unexpected-solidus-in-tag",p="unexpected-null-character",u="unexpected-question-mark-instead-of-tag-name",O="invalid-first-character-of-tag-name",S="unexpected-equals-sign-before-attribute-name",C="missing-end-tag-name",d="unexpected-character-in-attribute-name",R="unknown-named-character-reference",I="missing-semicolon-after-character-reference",f="unexpected-character-after-doctype-system-identifier",M="unexpected-character-in-unquoted-attribute-value",L="eof-before-tag-name",D="eof-in-tag",g="missing-attribute-value",P="missing-whitespace-between-attributes",k="missing-whitespace-after-doctype-public-keyword",H="missing-whitespace-between-doctype-public-and-system-identifiers",U="missing-whitespace-after-doctype-system-keyword",F="missing-quote-before-doctype-public-identifier",B="missing-quote-before-doctype-system-identifier",G="missing-doctype-public-identifier",K="missing-doctype-system-identifier",b="abrupt-doctype-public-identifier",Y="abrupt-doctype-system-identifier",x="cdata-in-html-content",v="incorrectly-opened-comment",y="eof-in-script-html-comment-like-text",w="eof-in-doctype",Q="nested-comment",X="abrupt-closing-of-empty-comment",W="eof-in-comment",V="incorrectly-closed-comment",j="eof-in-cdata",z="absence-of-digits-in-numeric-character-reference",q="null-character-reference",J="surrogate-character-reference",Z="character-reference-outside-unicode-range",$="control-character-reference",ee="noncharacter-character-reference",te="missing-whitespace-before-doctype-name",ne="missing-doctype-name",se="invalid-character-sequence-after-doctype-name",re="duplicate-attribute",ie="non-conforming-doctype",Te="missing-doctype",oe="misplaced-doctype",Ee="end-tag-without-matching-open-element",ae="closing-of-element-with-open-child-elements",_e="disallowed-content-in-noscript-in-head",he="open-elements-left-after-eof",Ae="abandoned-head-element-child",ce="misplaced-start-tag-for-head-element",le="nested-noscript-in-head",me="eof-in-element-that-can-contain-only-text";const Ne=s;var pe=class{constructor(){this.html=null,this.pos=-1,this.lastGapPos=-1,this.lastCharPos=-1,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=65536;}_err(){}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos;}_processSurrogate(e){if(this.pos!==this.lastCharPos){const t=this.html.charCodeAt(this.pos+1);if(T(t))return this.pos++,this._addGap(),o(e,t)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,Ne.EOF;return this._err(A),e}dropParsedChunk(){this.pos>this.bufferWaterline&&(this.lastCharPos-=this.pos,this.html=this.html.substring(this.pos),this.pos=0,this.lastGapPos=-1,this.gapStack=[]);}write(e,t){this.html?this.html+=e:this.html=e,this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1,this.lastChunkWritten=t;}insertHtmlAtCurrentPos(e){this.html=this.html.substring(0,this.pos+1)+e+this.html.substring(this.pos+1,this.html.length),this.lastCharPos=this.html.length-1,this.endOfChunkHit=!1;}advance(){if(this.pos++,this.pos>this.lastCharPos)return this.endOfChunkHit=!this.lastChunkWritten,Ne.EOF;let e=this.html.charCodeAt(this.pos);if(this.skipNextNewLine&&e===Ne.LINE_FEED)return this.skipNextNewLine=!1,this._addGap(),this.advance();if(e===Ne.CARRIAGE_RETURN)return this.skipNextNewLine=!0,Ne.LINE_FEED;return this.skipNextNewLine=!1,i(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===Ne.LINE_FEED||e===Ne.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e}_checkForProblematicCharacters(e){E(e)?this._err(_):a(e)&&this._err(h);}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--;}},ue=new Uint16Array([4,52,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,106,303,412,810,1432,1701,1796,1987,2114,2360,2420,2484,3170,3251,4140,4393,4575,4610,5106,5512,5728,6117,6274,6315,6345,6427,6516,7002,7910,8733,9323,9870,10170,10631,10893,11318,11386,11467,12773,13092,14474,14922,15448,15542,16419,17666,18166,18611,19004,19095,19298,19397,4,16,69,77,97,98,99,102,103,108,109,110,111,112,114,115,116,117,140,150,158,169,176,194,199,210,216,222,226,242,256,266,283,294,108,105,103,5,198,1,59,148,1,198,80,5,38,1,59,156,1,38,99,117,116,101,5,193,1,59,167,1,193,114,101,118,101,59,1,258,4,2,105,121,182,191,114,99,5,194,1,59,189,1,194,59,1,1040,114,59,3,55349,56580,114,97,118,101,5,192,1,59,208,1,192,112,104,97,59,1,913,97,99,114,59,1,256,100,59,1,10835,4,2,103,112,232,237,111,110,59,1,260,102,59,3,55349,56632,112,108,121,70,117,110,99,116,105,111,110,59,1,8289,105,110,103,5,197,1,59,264,1,197,4,2,99,115,272,277,114,59,3,55349,56476,105,103,110,59,1,8788,105,108,100,101,5,195,1,59,292,1,195,109,108,5,196,1,59,301,1,196,4,8,97,99,101,102,111,114,115,117,321,350,354,383,388,394,400,405,4,2,99,114,327,336,107,115,108,97,115,104,59,1,8726,4,2,118,119,342,345,59,1,10983,101,100,59,1,8966,121,59,1,1041,4,3,99,114,116,362,369,379,97,117,115,101,59,1,8757,110,111,117,108,108,105,115,59,1,8492,97,59,1,914,114,59,3,55349,56581,112,102,59,3,55349,56633,101,118,101,59,1,728,99,114,59,1,8492,109,112,101,113,59,1,8782,4,14,72,79,97,99,100,101,102,104,105,108,111,114,115,117,442,447,456,504,542,547,569,573,577,616,678,784,790,796,99,121,59,1,1063,80,89,5,169,1,59,454,1,169,4,3,99,112,121,464,470,497,117,116,101,59,1,262,4,2,59,105,476,478,1,8914,116,97,108,68,105,102,102,101,114,101,110,116,105,97,108,68,59,1,8517,108,101,121,115,59,1,8493,4,4,97,101,105,111,514,520,530,535,114,111,110,59,1,268,100,105,108,5,199,1,59,528,1,199,114,99,59,1,264,110,105,110,116,59,1,8752,111,116,59,1,266,4,2,100,110,553,560,105,108,108,97,59,1,184,116,101,114,68,111,116,59,1,183,114,59,1,8493,105,59,1,935,114,99,108,101,4,4,68,77,80,84,591,596,603,609,111,116,59,1,8857,105,110,117,115,59,1,8854,108,117,115,59,1,8853,105,109,101,115,59,1,8855,111,4,2,99,115,623,646,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8754,101,67,117,114,108,121,4,2,68,81,658,671,111,117,98,108,101,81,117,111,116,101,59,1,8221,117,111,116,101,59,1,8217,4,4,108,110,112,117,688,701,736,753,111,110,4,2,59,101,696,698,1,8759,59,1,10868,4,3,103,105,116,709,717,722,114,117,101,110,116,59,1,8801,110,116,59,1,8751,111,117,114,73,110,116,101,103,114,97,108,59,1,8750,4,2,102,114,742,745,59,1,8450,111,100,117,99,116,59,1,8720,110,116,101,114,67,108,111,99,107,119,105,115,101,67,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8755,111,115,115,59,1,10799,99,114,59,3,55349,56478,112,4,2,59,67,803,805,1,8915,97,112,59,1,8781,4,11,68,74,83,90,97,99,101,102,105,111,115,834,850,855,860,865,888,903,916,921,1011,1415,4,2,59,111,840,842,1,8517,116,114,97,104,100,59,1,10513,99,121,59,1,1026,99,121,59,1,1029,99,121,59,1,1039,4,3,103,114,115,873,879,883,103,101,114,59,1,8225,114,59,1,8609,104,118,59,1,10980,4,2,97,121,894,900,114,111,110,59,1,270,59,1,1044,108,4,2,59,116,910,912,1,8711,97,59,1,916,114,59,3,55349,56583,4,2,97,102,927,998,4,2,99,109,933,992,114,105,116,105,99,97,108,4,4,65,68,71,84,950,957,978,985,99,117,116,101,59,1,180,111,4,2,116,117,964,967,59,1,729,98,108,101,65,99,117,116,101,59,1,733,114,97,118,101,59,1,96,105,108,100,101,59,1,732,111,110,100,59,1,8900,102,101,114,101,110,116,105,97,108,68,59,1,8518,4,4,112,116,117,119,1021,1026,1048,1249,102,59,3,55349,56635,4,3,59,68,69,1034,1036,1041,1,168,111,116,59,1,8412,113,117,97,108,59,1,8784,98,108,101,4,6,67,68,76,82,85,86,1065,1082,1101,1189,1211,1236,111,110,116,111,117,114,73,110,116,101,103,114,97,108,59,1,8751,111,4,2,116,119,1089,1092,59,1,168,110,65,114,114,111,119,59,1,8659,4,2,101,111,1107,1141,102,116,4,3,65,82,84,1117,1124,1136,114,114,111,119,59,1,8656,105,103,104,116,65,114,114,111,119,59,1,8660,101,101,59,1,10980,110,103,4,2,76,82,1149,1177,101,102,116,4,2,65,82,1158,1165,114,114,111,119,59,1,10232,105,103,104,116,65,114,114,111,119,59,1,10234,105,103,104,116,65,114,114,111,119,59,1,10233,105,103,104,116,4,2,65,84,1199,1206,114,114,111,119,59,1,8658,101,101,59,1,8872,112,4,2,65,68,1218,1225,114,114,111,119,59,1,8657,111,119,110,65,114,114,111,119,59,1,8661,101,114,116,105,99,97,108,66,97,114,59,1,8741,110,4,6,65,66,76,82,84,97,1264,1292,1299,1352,1391,1408,114,114,111,119,4,3,59,66,85,1276,1278,1283,1,8595,97,114,59,1,10515,112,65,114,114,111,119,59,1,8693,114,101,118,101,59,1,785,101,102,116,4,3,82,84,86,1310,1323,1334,105,103,104,116,86,101,99,116,111,114,59,1,10576,101,101,86,101,99,116,111,114,59,1,10590,101,99,116,111,114,4,2,59,66,1345,1347,1,8637,97,114,59,1,10582,105,103,104,116,4,2,84,86,1362,1373,101,101,86,101,99,116,111,114,59,1,10591,101,99,116,111,114,4,2,59,66,1384,1386,1,8641,97,114,59,1,10583,101,101,4,2,59,65,1399,1401,1,8868,114,114,111,119,59,1,8615,114,114,111,119,59,1,8659,4,2,99,116,1421,1426,114,59,3,55349,56479,114,111,107,59,1,272,4,16,78,84,97,99,100,102,103,108,109,111,112,113,115,116,117,120,1466,1470,1478,1489,1515,1520,1525,1536,1544,1593,1609,1617,1650,1664,1668,1677,71,59,1,330,72,5,208,1,59,1476,1,208,99,117,116,101,5,201,1,59,1487,1,201,4,3,97,105,121,1497,1503,1512,114,111,110,59,1,282,114,99,5,202,1,59,1510,1,202,59,1,1069,111,116,59,1,278,114,59,3,55349,56584,114,97,118,101,5,200,1,59,1534,1,200,101,109,101,110,116,59,1,8712,4,2,97,112,1550,1555,99,114,59,1,274,116,121,4,2,83,86,1563,1576,109,97,108,108,83,113,117,97,114,101,59,1,9723,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9643,4,2,103,112,1599,1604,111,110,59,1,280,102,59,3,55349,56636,115,105,108,111,110,59,1,917,117,4,2,97,105,1624,1640,108,4,2,59,84,1631,1633,1,10869,105,108,100,101,59,1,8770,108,105,98,114,105,117,109,59,1,8652,4,2,99,105,1656,1660,114,59,1,8496,109,59,1,10867,97,59,1,919,109,108,5,203,1,59,1675,1,203,4,2,105,112,1683,1689,115,116,115,59,1,8707,111,110,101,110,116,105,97,108,69,59,1,8519,4,5,99,102,105,111,115,1713,1717,1722,1762,1791,121,59,1,1060,114,59,3,55349,56585,108,108,101,100,4,2,83,86,1732,1745,109,97,108,108,83,113,117,97,114,101,59,1,9724,101,114,121,83,109,97,108,108,83,113,117,97,114,101,59,1,9642,4,3,112,114,117,1770,1775,1781,102,59,3,55349,56637,65,108,108,59,1,8704,114,105,101,114,116,114,102,59,1,8497,99,114,59,1,8497,4,12,74,84,97,98,99,100,102,103,111,114,115,116,1822,1827,1834,1848,1855,1877,1882,1887,1890,1896,1978,1984,99,121,59,1,1027,5,62,1,59,1832,1,62,109,109,97,4,2,59,100,1843,1845,1,915,59,1,988,114,101,118,101,59,1,286,4,3,101,105,121,1863,1869,1874,100,105,108,59,1,290,114,99,59,1,284,59,1,1043,111,116,59,1,288,114,59,3,55349,56586,59,1,8921,112,102,59,3,55349,56638,101,97,116,101,114,4,6,69,70,71,76,83,84,1915,1933,1944,1953,1959,1971,113,117,97,108,4,2,59,76,1925,1927,1,8805,101,115,115,59,1,8923,117,108,108,69,113,117,97,108,59,1,8807,114,101,97,116,101,114,59,1,10914,101,115,115,59,1,8823,108,97,110,116,69,113,117,97,108,59,1,10878,105,108,100,101,59,1,8819,99,114,59,3,55349,56482,59,1,8811,4,8,65,97,99,102,105,111,115,117,2005,2012,2026,2032,2036,2049,2073,2089,82,68,99,121,59,1,1066,4,2,99,116,2018,2023,101,107,59,1,711,59,1,94,105,114,99,59,1,292,114,59,1,8460,108,98,101,114,116,83,112,97,99,101,59,1,8459,4,2,112,114,2055,2059,102,59,1,8461,105,122,111,110,116,97,108,76,105,110,101,59,1,9472,4,2,99,116,2079,2083,114,59,1,8459,114,111,107,59,1,294,109,112,4,2,68,69,2097,2107,111,119,110,72,117,109,112,59,1,8782,113,117,97,108,59,1,8783,4,14,69,74,79,97,99,100,102,103,109,110,111,115,116,117,2144,2149,2155,2160,2171,2189,2194,2198,2209,2245,2307,2329,2334,2341,99,121,59,1,1045,108,105,103,59,1,306,99,121,59,1,1025,99,117,116,101,5,205,1,59,2169,1,205,4,2,105,121,2177,2186,114,99,5,206,1,59,2184,1,206,59,1,1048,111,116,59,1,304,114,59,1,8465,114,97,118,101,5,204,1,59,2207,1,204,4,3,59,97,112,2217,2219,2238,1,8465,4,2,99,103,2225,2229,114,59,1,298,105,110,97,114,121,73,59,1,8520,108,105,101,115,59,1,8658,4,2,116,118,2251,2281,4,2,59,101,2257,2259,1,8748,4,2,103,114,2265,2271,114,97,108,59,1,8747,115,101,99,116,105,111,110,59,1,8898,105,115,105,98,108,101,4,2,67,84,2293,2300,111,109,109,97,59,1,8291,105,109,101,115,59,1,8290,4,3,103,112,116,2315,2320,2325,111,110,59,1,302,102,59,3,55349,56640,97,59,1,921,99,114,59,1,8464,105,108,100,101,59,1,296,4,2,107,109,2347,2352,99,121,59,1,1030,108,5,207,1,59,2358,1,207,4,5,99,102,111,115,117,2372,2386,2391,2397,2414,4,2,105,121,2378,2383,114,99,59,1,308,59,1,1049,114,59,3,55349,56589,112,102,59,3,55349,56641,4,2,99,101,2403,2408,114,59,3,55349,56485,114,99,121,59,1,1032,107,99,121,59,1,1028,4,7,72,74,97,99,102,111,115,2436,2441,2446,2452,2467,2472,2478,99,121,59,1,1061,99,121,59,1,1036,112,112,97,59,1,922,4,2,101,121,2458,2464,100,105,108,59,1,310,59,1,1050,114,59,3,55349,56590,112,102,59,3,55349,56642,99,114,59,3,55349,56486,4,11,74,84,97,99,101,102,108,109,111,115,116,2508,2513,2520,2562,2585,2981,2986,3004,3011,3146,3167,99,121,59,1,1033,5,60,1,59,2518,1,60,4,5,99,109,110,112,114,2532,2538,2544,2548,2558,117,116,101,59,1,313,98,100,97,59,1,923,103,59,1,10218,108,97,99,101,116,114,102,59,1,8466,114,59,1,8606,4,3,97,101,121,2570,2576,2582,114,111,110,59,1,317,100,105,108,59,1,315,59,1,1051,4,2,102,115,2591,2907,116,4,10,65,67,68,70,82,84,85,86,97,114,2614,2663,2672,2728,2735,2760,2820,2870,2888,2895,4,2,110,114,2620,2633,103,108,101,66,114,97,99,107,101,116,59,1,10216,114,111,119,4,3,59,66,82,2644,2646,2651,1,8592,97,114,59,1,8676,105,103,104,116,65,114,114,111,119,59,1,8646,101,105,108,105,110,103,59,1,8968,111,4,2,117,119,2679,2692,98,108,101,66,114,97,99,107,101,116,59,1,10214,110,4,2,84,86,2699,2710,101,101,86,101,99,116,111,114,59,1,10593,101,99,116,111,114,4,2,59,66,2721,2723,1,8643,97,114,59,1,10585,108,111,111,114,59,1,8970,105,103,104,116,4,2,65,86,2745,2752,114,114,111,119,59,1,8596,101,99,116,111,114,59,1,10574,4,2,101,114,2766,2792,101,4,3,59,65,86,2775,2777,2784,1,8867,114,114,111,119,59,1,8612,101,99,116,111,114,59,1,10586,105,97,110,103,108,101,4,3,59,66,69,2806,2808,2813,1,8882,97,114,59,1,10703,113,117,97,108,59,1,8884,112,4,3,68,84,86,2829,2841,2852,111,119,110,86,101,99,116,111,114,59,1,10577,101,101,86,101,99,116,111,114,59,1,10592,101,99,116,111,114,4,2,59,66,2863,2865,1,8639,97,114,59,1,10584,101,99,116,111,114,4,2,59,66,2881,2883,1,8636,97,114,59,1,10578,114,114,111,119,59,1,8656,105,103,104,116,97,114,114,111,119,59,1,8660,115,4,6,69,70,71,76,83,84,2922,2936,2947,2956,2962,2974,113,117,97,108,71,114,101,97,116,101,114,59,1,8922,117,108,108,69,113,117,97,108,59,1,8806,114,101,97,116,101,114,59,1,8822,101,115,115,59,1,10913,108,97,110,116,69,113,117,97,108,59,1,10877,105,108,100,101,59,1,8818,114,59,3,55349,56591,4,2,59,101,2992,2994,1,8920,102,116,97,114,114,111,119,59,1,8666,105,100,111,116,59,1,319,4,3,110,112,119,3019,3110,3115,103,4,4,76,82,108,114,3030,3058,3070,3098,101,102,116,4,2,65,82,3039,3046,114,114,111,119,59,1,10229,105,103,104,116,65,114,114,111,119,59,1,10231,105,103,104,116,65,114,114,111,119,59,1,10230,101,102,116,4,2,97,114,3079,3086,114,114,111,119,59,1,10232,105,103,104,116,97,114,114,111,119,59,1,10234,105,103,104,116,97,114,114,111,119,59,1,10233,102,59,3,55349,56643,101,114,4,2,76,82,3123,3134,101,102,116,65,114,114,111,119,59,1,8601,105,103,104,116,65,114,114,111,119,59,1,8600,4,3,99,104,116,3154,3158,3161,114,59,1,8466,59,1,8624,114,111,107,59,1,321,59,1,8810,4,8,97,99,101,102,105,111,115,117,3188,3192,3196,3222,3227,3237,3243,3248,112,59,1,10501,121,59,1,1052,4,2,100,108,3202,3213,105,117,109,83,112,97,99,101,59,1,8287,108,105,110,116,114,102,59,1,8499,114,59,3,55349,56592,110,117,115,80,108,117,115,59,1,8723,112,102,59,3,55349,56644,99,114,59,1,8499,59,1,924,4,9,74,97,99,101,102,111,115,116,117,3271,3276,3283,3306,3422,3427,4120,4126,4137,99,121,59,1,1034,99,117,116,101,59,1,323,4,3,97,101,121,3291,3297,3303,114,111,110,59,1,327,100,105,108,59,1,325,59,1,1053,4,3,103,115,119,3314,3380,3415,97,116,105,118,101,4,3,77,84,86,3327,3340,3365,101,100,105,117,109,83,112,97,99,101,59,1,8203,104,105,4,2,99,110,3348,3357,107,83,112,97,99,101,59,1,8203,83,112,97,99,101,59,1,8203,101,114,121,84,104,105,110,83,112,97,99,101,59,1,8203,116,101,100,4,2,71,76,3389,3405,114,101,97,116,101,114,71,114,101,97,116,101,114,59,1,8811,101,115,115,76,101,115,115,59,1,8810,76,105,110,101,59,1,10,114,59,3,55349,56593,4,4,66,110,112,116,3437,3444,3460,3464,114,101,97,107,59,1,8288,66,114,101,97,107,105,110,103,83,112,97,99,101,59,1,160,102,59,1,8469,4,13,59,67,68,69,71,72,76,78,80,82,83,84,86,3492,3494,3517,3536,3578,3657,3685,3784,3823,3860,3915,4066,4107,1,10988,4,2,111,117,3500,3510,110,103,114,117,101,110,116,59,1,8802,112,67,97,112,59,1,8813,111,117,98,108,101,86,101,114,116,105,99,97,108,66,97,114,59,1,8742,4,3,108,113,120,3544,3552,3571,101,109,101,110,116,59,1,8713,117,97,108,4,2,59,84,3561,3563,1,8800,105,108,100,101,59,3,8770,824,105,115,116,115,59,1,8708,114,101,97,116,101,114,4,7,59,69,70,71,76,83,84,3600,3602,3609,3621,3631,3637,3650,1,8815,113,117,97,108,59,1,8817,117,108,108,69,113,117,97,108,59,3,8807,824,114,101,97,116,101,114,59,3,8811,824,101,115,115,59,1,8825,108,97,110,116,69,113,117,97,108,59,3,10878,824,105,108,100,101,59,1,8821,117,109,112,4,2,68,69,3666,3677,111,119,110,72,117,109,112,59,3,8782,824,113,117,97,108,59,3,8783,824,101,4,2,102,115,3692,3724,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3709,3711,3717,1,8938,97,114,59,3,10703,824,113,117,97,108,59,1,8940,115,4,6,59,69,71,76,83,84,3739,3741,3748,3757,3764,3777,1,8814,113,117,97,108,59,1,8816,114,101,97,116,101,114,59,1,8824,101,115,115,59,3,8810,824,108,97,110,116,69,113,117,97,108,59,3,10877,824,105,108,100,101,59,1,8820,101,115,116,101,100,4,2,71,76,3795,3812,114,101,97,116,101,114,71,114,101,97,116,101,114,59,3,10914,824,101,115,115,76,101,115,115,59,3,10913,824,114,101,99,101,100,101,115,4,3,59,69,83,3838,3840,3848,1,8832,113,117,97,108,59,3,10927,824,108,97,110,116,69,113,117,97,108,59,1,8928,4,2,101,105,3866,3881,118,101,114,115,101,69,108,101,109,101,110,116,59,1,8716,103,104,116,84,114,105,97,110,103,108,101,4,3,59,66,69,3900,3902,3908,1,8939,97,114,59,3,10704,824,113,117,97,108,59,1,8941,4,2,113,117,3921,3973,117,97,114,101,83,117,4,2,98,112,3933,3952,115,101,116,4,2,59,69,3942,3945,3,8847,824,113,117,97,108,59,1,8930,101,114,115,101,116,4,2,59,69,3963,3966,3,8848,824,113,117,97,108,59,1,8931,4,3,98,99,112,3981,4e3,4045,115,101,116,4,2,59,69,3990,3993,3,8834,8402,113,117,97,108,59,1,8840,99,101,101,100,115,4,4,59,69,83,84,4015,4017,4025,4037,1,8833,113,117,97,108,59,3,10928,824,108,97,110,116,69,113,117,97,108,59,1,8929,105,108,100,101,59,3,8831,824,101,114,115,101,116,4,2,59,69,4056,4059,3,8835,8402,113,117,97,108,59,1,8841,105,108,100,101,4,4,59,69,70,84,4080,4082,4089,4100,1,8769,113,117,97,108,59,1,8772,117,108,108,69,113,117,97,108,59,1,8775,105,108,100,101,59,1,8777,101,114,116,105,99,97,108,66,97,114,59,1,8740,99,114,59,3,55349,56489,105,108,100,101,5,209,1,59,4135,1,209,59,1,925,4,14,69,97,99,100,102,103,109,111,112,114,115,116,117,118,4170,4176,4187,4205,4212,4217,4228,4253,4259,4292,4295,4316,4337,4346,108,105,103,59,1,338,99,117,116,101,5,211,1,59,4185,1,211,4,2,105,121,4193,4202,114,99,5,212,1,59,4200,1,212,59,1,1054,98,108,97,99,59,1,336,114,59,3,55349,56594,114,97,118,101,5,210,1,59,4226,1,210,4,3,97,101,105,4236,4241,4246,99,114,59,1,332,103,97,59,1,937,99,114,111,110,59,1,927,112,102,59,3,55349,56646,101,110,67,117,114,108,121,4,2,68,81,4272,4285,111,117,98,108,101,81,117,111,116,101,59,1,8220,117,111,116,101,59,1,8216,59,1,10836,4,2,99,108,4301,4306,114,59,3,55349,56490,97,115,104,5,216,1,59,4314,1,216,105,4,2,108,109,4323,4332,100,101,5,213,1,59,4330,1,213,101,115,59,1,10807,109,108,5,214,1,59,4344,1,214,101,114,4,2,66,80,4354,4380,4,2,97,114,4360,4364,114,59,1,8254,97,99,4,2,101,107,4372,4375,59,1,9182,101,116,59,1,9140,97,114,101,110,116,104,101,115,105,115,59,1,9180,4,9,97,99,102,104,105,108,111,114,115,4413,4422,4426,4431,4435,4438,4448,4471,4561,114,116,105,97,108,68,59,1,8706,121,59,1,1055,114,59,3,55349,56595,105,59,1,934,59,1,928,117,115,77,105,110,117,115,59,1,177,4,2,105,112,4454,4467,110,99,97,114,101,112,108,97,110,101,59,1,8460,102,59,1,8473,4,4,59,101,105,111,4481,4483,4526,4531,1,10939,99,101,100,101,115,4,4,59,69,83,84,4498,4500,4507,4519,1,8826,113,117,97,108,59,1,10927,108,97,110,116,69,113,117,97,108,59,1,8828,105,108,100,101,59,1,8830,109,101,59,1,8243,4,2,100,112,4537,4543,117,99,116,59,1,8719,111,114,116,105,111,110,4,2,59,97,4555,4557,1,8759,108,59,1,8733,4,2,99,105,4567,4572,114,59,3,55349,56491,59,1,936,4,4,85,102,111,115,4585,4594,4599,4604,79,84,5,34,1,59,4592,1,34,114,59,3,55349,56596,112,102,59,1,8474,99,114,59,3,55349,56492,4,12,66,69,97,99,101,102,104,105,111,114,115,117,4636,4642,4650,4681,4704,4763,4767,4771,5047,5069,5081,5094,97,114,114,59,1,10512,71,5,174,1,59,4648,1,174,4,3,99,110,114,4658,4664,4668,117,116,101,59,1,340,103,59,1,10219,114,4,2,59,116,4675,4677,1,8608,108,59,1,10518,4,3,97,101,121,4689,4695,4701,114,111,110,59,1,344,100,105,108,59,1,342,59,1,1056,4,2,59,118,4710,4712,1,8476,101,114,115,101,4,2,69,85,4722,4748,4,2,108,113,4728,4736,101,109,101,110,116,59,1,8715,117,105,108,105,98,114,105,117,109,59,1,8651,112,69,113,117,105,108,105,98,114,105,117,109,59,1,10607,114,59,1,8476,111,59,1,929,103,104,116,4,8,65,67,68,70,84,85,86,97,4792,4840,4849,4905,4912,4972,5022,5040,4,2,110,114,4798,4811,103,108,101,66,114,97,99,107,101,116,59,1,10217,114,111,119,4,3,59,66,76,4822,4824,4829,1,8594,97,114,59,1,8677,101,102,116,65,114,114,111,119,59,1,8644,101,105,108,105,110,103,59,1,8969,111,4,2,117,119,4856,4869,98,108,101,66,114,97,99,107,101,116,59,1,10215,110,4,2,84,86,4876,4887,101,101,86,101,99,116,111,114,59,1,10589,101,99,116,111,114,4,2,59,66,4898,4900,1,8642,97,114,59,1,10581,108,111,111,114,59,1,8971,4,2,101,114,4918,4944,101,4,3,59,65,86,4927,4929,4936,1,8866,114,114,111,119,59,1,8614,101,99,116,111,114,59,1,10587,105,97,110,103,108,101,4,3,59,66,69,4958,4960,4965,1,8883,97,114,59,1,10704,113,117,97,108,59,1,8885,112,4,3,68,84,86,4981,4993,5004,111,119,110,86,101,99,116,111,114,59,1,10575,101,101,86,101,99,116,111,114,59,1,10588,101,99,116,111,114,4,2,59,66,5015,5017,1,8638,97,114,59,1,10580,101,99,116,111,114,4,2,59,66,5033,5035,1,8640,97,114,59,1,10579,114,114,111,119,59,1,8658,4,2,112,117,5053,5057,102,59,1,8477,110,100,73,109,112,108,105,101,115,59,1,10608,105,103,104,116,97,114,114,111,119,59,1,8667,4,2,99,104,5087,5091,114,59,1,8475,59,1,8625,108,101,68,101,108,97,121,101,100,59,1,10740,4,13,72,79,97,99,102,104,105,109,111,113,115,116,117,5134,5150,5157,5164,5198,5203,5259,5265,5277,5283,5374,5380,5385,4,2,67,99,5140,5146,72,99,121,59,1,1065,121,59,1,1064,70,84,99,121,59,1,1068,99,117,116,101,59,1,346,4,5,59,97,101,105,121,5176,5178,5184,5190,5195,1,10940,114,111,110,59,1,352,100,105,108,59,1,350,114,99,59,1,348,59,1,1057,114,59,3,55349,56598,111,114,116,4,4,68,76,82,85,5216,5227,5238,5250,111,119,110,65,114,114,111,119,59,1,8595,101,102,116,65,114,114,111,119,59,1,8592,105,103,104,116,65,114,114,111,119,59,1,8594,112,65,114,114,111,119,59,1,8593,103,109,97,59,1,931,97,108,108,67,105,114,99,108,101,59,1,8728,112,102,59,3,55349,56650,4,2,114,117,5289,5293,116,59,1,8730,97,114,101,4,4,59,73,83,85,5306,5308,5322,5367,1,9633,110,116,101,114,115,101,99,116,105,111,110,59,1,8851,117,4,2,98,112,5329,5347,115,101,116,4,2,59,69,5338,5340,1,8847,113,117,97,108,59,1,8849,101,114,115,101,116,4,2,59,69,5358,5360,1,8848,113,117,97,108,59,1,8850,110,105,111,110,59,1,8852,99,114,59,3,55349,56494,97,114,59,1,8902,4,4,98,99,109,112,5395,5420,5475,5478,4,2,59,115,5401,5403,1,8912,101,116,4,2,59,69,5411,5413,1,8912,113,117,97,108,59,1,8838,4,2,99,104,5426,5468,101,101,100,115,4,4,59,69,83,84,5440,5442,5449,5461,1,8827,113,117,97,108,59,1,10928,108,97,110,116,69,113,117,97,108,59,1,8829,105,108,100,101,59,1,8831,84,104,97,116,59,1,8715,59,1,8721,4,3,59,101,115,5486,5488,5507,1,8913,114,115,101,116,4,2,59,69,5498,5500,1,8835,113,117,97,108,59,1,8839,101,116,59,1,8913,4,11,72,82,83,97,99,102,104,105,111,114,115,5536,5546,5552,5567,5579,5602,5607,5655,5695,5701,5711,79,82,78,5,222,1,59,5544,1,222,65,68,69,59,1,8482,4,2,72,99,5558,5563,99,121,59,1,1035,121,59,1,1062,4,2,98,117,5573,5576,59,1,9,59,1,932,4,3,97,101,121,5587,5593,5599,114,111,110,59,1,356,100,105,108,59,1,354,59,1,1058,114,59,3,55349,56599,4,2,101,105,5613,5631,4,2,114,116,5619,5627,101,102,111,114,101,59,1,8756,97,59,1,920,4,2,99,110,5637,5647,107,83,112,97,99,101,59,3,8287,8202,83,112,97,99,101,59,1,8201,108,100,101,4,4,59,69,70,84,5668,5670,5677,5688,1,8764,113,117,97,108,59,1,8771,117,108,108,69,113,117,97,108,59,1,8773,105,108,100,101,59,1,8776,112,102,59,3,55349,56651,105,112,108,101,68,111,116,59,1,8411,4,2,99,116,5717,5722,114,59,3,55349,56495,114,111,107,59,1,358,4,14,97,98,99,100,102,103,109,110,111,112,114,115,116,117,5758,5789,5805,5823,5830,5835,5846,5852,5921,5937,6089,6095,6101,6108,4,2,99,114,5764,5774,117,116,101,5,218,1,59,5772,1,218,114,4,2,59,111,5781,5783,1,8607,99,105,114,59,1,10569,114,4,2,99,101,5796,5800,121,59,1,1038,118,101,59,1,364,4,2,105,121,5811,5820,114,99,5,219,1,59,5818,1,219,59,1,1059,98,108,97,99,59,1,368,114,59,3,55349,56600,114,97,118,101,5,217,1,59,5844,1,217,97,99,114,59,1,362,4,2,100,105,5858,5905,101,114,4,2,66,80,5866,5892,4,2,97,114,5872,5876,114,59,1,95,97,99,4,2,101,107,5884,5887,59,1,9183,101,116,59,1,9141,97,114,101,110,116,104,101,115,105,115,59,1,9181,111,110,4,2,59,80,5913,5915,1,8899,108,117,115,59,1,8846,4,2,103,112,5927,5932,111,110,59,1,370,102,59,3,55349,56652,4,8,65,68,69,84,97,100,112,115,5955,5985,5996,6009,6026,6033,6044,6075,114,114,111,119,4,3,59,66,68,5967,5969,5974,1,8593,97,114,59,1,10514,111,119,110,65,114,114,111,119,59,1,8645,111,119,110,65,114,114,111,119,59,1,8597,113,117,105,108,105,98,114,105,117,109,59,1,10606,101,101,4,2,59,65,6017,6019,1,8869,114,114,111,119,59,1,8613,114,114,111,119,59,1,8657,111,119,110,97,114,114,111,119,59,1,8661,101,114,4,2,76,82,6052,6063,101,102,116,65,114,114,111,119,59,1,8598,105,103,104,116,65,114,114,111,119,59,1,8599,105,4,2,59,108,6082,6084,1,978,111,110,59,1,933,105,110,103,59,1,366,99,114,59,3,55349,56496,105,108,100,101,59,1,360,109,108,5,220,1,59,6115,1,220,4,9,68,98,99,100,101,102,111,115,118,6137,6143,6148,6152,6166,6250,6255,6261,6267,97,115,104,59,1,8875,97,114,59,1,10987,121,59,1,1042,97,115,104,4,2,59,108,6161,6163,1,8873,59,1,10982,4,2,101,114,6172,6175,59,1,8897,4,3,98,116,121,6183,6188,6238,97,114,59,1,8214,4,2,59,105,6194,6196,1,8214,99,97,108,4,4,66,76,83,84,6209,6214,6220,6231,97,114,59,1,8739,105,110,101,59,1,124,101,112,97,114,97,116,111,114,59,1,10072,105,108,100,101,59,1,8768,84,104,105,110,83,112,97,99,101,59,1,8202,114,59,3,55349,56601,112,102,59,3,55349,56653,99,114,59,3,55349,56497,100,97,115,104,59,1,8874,4,5,99,101,102,111,115,6286,6292,6298,6303,6309,105,114,99,59,1,372,100,103,101,59,1,8896,114,59,3,55349,56602,112,102,59,3,55349,56654,99,114,59,3,55349,56498,4,4,102,105,111,115,6325,6330,6333,6339,114,59,3,55349,56603,59,1,926,112,102,59,3,55349,56655,99,114,59,3,55349,56499,4,9,65,73,85,97,99,102,111,115,117,6365,6370,6375,6380,6391,6405,6410,6416,6422,99,121,59,1,1071,99,121,59,1,1031,99,121,59,1,1070,99,117,116,101,5,221,1,59,6389,1,221,4,2,105,121,6397,6402,114,99,59,1,374,59,1,1067,114,59,3,55349,56604,112,102,59,3,55349,56656,99,114,59,3,55349,56500,109,108,59,1,376,4,8,72,97,99,100,101,102,111,115,6445,6450,6457,6472,6477,6501,6505,6510,99,121,59,1,1046,99,117,116,101,59,1,377,4,2,97,121,6463,6469,114,111,110,59,1,381,59,1,1047,111,116,59,1,379,4,2,114,116,6483,6497,111,87,105,100,116,104,83,112,97,99,101,59,1,8203,97,59,1,918,114,59,1,8488,112,102,59,1,8484,99,114,59,3,55349,56501,4,16,97,98,99,101,102,103,108,109,110,111,112,114,115,116,117,119,6550,6561,6568,6612,6622,6634,6645,6672,6699,6854,6870,6923,6933,6963,6974,6983,99,117,116,101,5,225,1,59,6559,1,225,114,101,118,101,59,1,259,4,6,59,69,100,105,117,121,6582,6584,6588,6591,6600,6609,1,8766,59,3,8766,819,59,1,8767,114,99,5,226,1,59,6598,1,226,116,101,5,180,1,59,6607,1,180,59,1,1072,108,105,103,5,230,1,59,6620,1,230,4,2,59,114,6628,6630,1,8289,59,3,55349,56606,114,97,118,101,5,224,1,59,6643,1,224,4,2,101,112,6651,6667,4,2,102,112,6657,6663,115,121,109,59,1,8501,104,59,1,8501,104,97,59,1,945,4,2,97,112,6678,6692,4,2,99,108,6684,6688,114,59,1,257,103,59,1,10815,5,38,1,59,6697,1,38,4,2,100,103,6705,6737,4,5,59,97,100,115,118,6717,6719,6724,6727,6734,1,8743,110,100,59,1,10837,59,1,10844,108,111,112,101,59,1,10840,59,1,10842,4,7,59,101,108,109,114,115,122,6753,6755,6758,6762,6814,6835,6848,1,8736,59,1,10660,101,59,1,8736,115,100,4,2,59,97,6770,6772,1,8737,4,8,97,98,99,100,101,102,103,104,6790,6793,6796,6799,6802,6805,6808,6811,59,1,10664,59,1,10665,59,1,10666,59,1,10667,59,1,10668,59,1,10669,59,1,10670,59,1,10671,116,4,2,59,118,6821,6823,1,8735,98,4,2,59,100,6830,6832,1,8894,59,1,10653,4,2,112,116,6841,6845,104,59,1,8738,59,1,197,97,114,114,59,1,9084,4,2,103,112,6860,6865,111,110,59,1,261,102,59,3,55349,56658,4,7,59,69,97,101,105,111,112,6886,6888,6891,6897,6900,6904,6908,1,8776,59,1,10864,99,105,114,59,1,10863,59,1,8778,100,59,1,8779,115,59,1,39,114,111,120,4,2,59,101,6917,6919,1,8776,113,59,1,8778,105,110,103,5,229,1,59,6931,1,229,4,3,99,116,121,6941,6946,6949,114,59,3,55349,56502,59,1,42,109,112,4,2,59,101,6957,6959,1,8776,113,59,1,8781,105,108,100,101,5,227,1,59,6972,1,227,109,108,5,228,1,59,6981,1,228,4,2,99,105,6989,6997,111,110,105,110,116,59,1,8755,110,116,59,1,10769,4,16,78,97,98,99,100,101,102,105,107,108,110,111,112,114,115,117,7036,7041,7119,7135,7149,7155,7219,7224,7347,7354,7463,7489,7786,7793,7814,7866,111,116,59,1,10989,4,2,99,114,7047,7094,107,4,4,99,101,112,115,7058,7064,7073,7080,111,110,103,59,1,8780,112,115,105,108,111,110,59,1,1014,114,105,109,101,59,1,8245,105,109,4,2,59,101,7088,7090,1,8765,113,59,1,8909,4,2,118,119,7100,7105,101,101,59,1,8893,101,100,4,2,59,103,7113,7115,1,8965,101,59,1,8965,114,107,4,2,59,116,7127,7129,1,9141,98,114,107,59,1,9142,4,2,111,121,7141,7146,110,103,59,1,8780,59,1,1073,113,117,111,59,1,8222,4,5,99,109,112,114,116,7167,7181,7188,7193,7199,97,117,115,4,2,59,101,7176,7178,1,8757,59,1,8757,112,116,121,118,59,1,10672,115,105,59,1,1014,110,111,117,59,1,8492,4,3,97,104,119,7207,7210,7213,59,1,946,59,1,8502,101,101,110,59,1,8812,114,59,3,55349,56607,103,4,7,99,111,115,116,117,118,119,7241,7262,7288,7305,7328,7335,7340,4,3,97,105,117,7249,7253,7258,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,4,3,100,112,116,7270,7275,7281,111,116,59,1,10752,108,117,115,59,1,10753,105,109,101,115,59,1,10754,4,2,113,116,7294,7300,99,117,112,59,1,10758,97,114,59,1,9733,114,105,97,110,103,108,101,4,2,100,117,7318,7324,111,119,110,59,1,9661,112,59,1,9651,112,108,117,115,59,1,10756,101,101,59,1,8897,101,100,103,101,59,1,8896,97,114,111,119,59,1,10509,4,3,97,107,111,7362,7436,7458,4,2,99,110,7368,7432,107,4,3,108,115,116,7377,7386,7394,111,122,101,110,103,101,59,1,10731,113,117,97,114,101,59,1,9642,114,105,97,110,103,108,101,4,4,59,100,108,114,7411,7413,7419,7425,1,9652,111,119,110,59,1,9662,101,102,116,59,1,9666,105,103,104,116,59,1,9656,107,59,1,9251,4,2,49,51,7442,7454,4,2,50,52,7448,7451,59,1,9618,59,1,9617,52,59,1,9619,99,107,59,1,9608,4,2,101,111,7469,7485,4,2,59,113,7475,7478,3,61,8421,117,105,118,59,3,8801,8421,116,59,1,8976,4,4,112,116,119,120,7499,7504,7517,7523,102,59,3,55349,56659,4,2,59,116,7510,7512,1,8869,111,109,59,1,8869,116,105,101,59,1,8904,4,12,68,72,85,86,98,100,104,109,112,116,117,118,7549,7571,7597,7619,7655,7660,7682,7708,7715,7721,7728,7750,4,4,76,82,108,114,7559,7562,7565,7568,59,1,9559,59,1,9556,59,1,9558,59,1,9555,4,5,59,68,85,100,117,7583,7585,7588,7591,7594,1,9552,59,1,9574,59,1,9577,59,1,9572,59,1,9575,4,4,76,82,108,114,7607,7610,7613,7616,59,1,9565,59,1,9562,59,1,9564,59,1,9561,4,7,59,72,76,82,104,108,114,7635,7637,7640,7643,7646,7649,7652,1,9553,59,1,9580,59,1,9571,59,1,9568,59,1,9579,59,1,9570,59,1,9567,111,120,59,1,10697,4,4,76,82,108,114,7670,7673,7676,7679,59,1,9557,59,1,9554,59,1,9488,59,1,9484,4,5,59,68,85,100,117,7694,7696,7699,7702,7705,1,9472,59,1,9573,59,1,9576,59,1,9516,59,1,9524,105,110,117,115,59,1,8863,108,117,115,59,1,8862,105,109,101,115,59,1,8864,4,4,76,82,108,114,7738,7741,7744,7747,59,1,9563,59,1,9560,59,1,9496,59,1,9492,4,7,59,72,76,82,104,108,114,7766,7768,7771,7774,7777,7780,7783,1,9474,59,1,9578,59,1,9569,59,1,9566,59,1,9532,59,1,9508,59,1,9500,114,105,109,101,59,1,8245,4,2,101,118,7799,7804,118,101,59,1,728,98,97,114,5,166,1,59,7812,1,166,4,4,99,101,105,111,7824,7829,7834,7846,114,59,3,55349,56503,109,105,59,1,8271,109,4,2,59,101,7841,7843,1,8765,59,1,8909,108,4,3,59,98,104,7855,7857,7860,1,92,59,1,10693,115,117,98,59,1,10184,4,2,108,109,7872,7885,108,4,2,59,101,7879,7881,1,8226,116,59,1,8226,112,4,3,59,69,101,7894,7896,7899,1,8782,59,1,10926,4,2,59,113,7905,7907,1,8783,59,1,8783,4,15,97,99,100,101,102,104,105,108,111,114,115,116,117,119,121,7942,8021,8075,8080,8121,8126,8157,8279,8295,8430,8446,8485,8491,8707,8726,4,3,99,112,114,7950,7956,8007,117,116,101,59,1,263,4,6,59,97,98,99,100,115,7970,7972,7977,7984,7998,8003,1,8745,110,100,59,1,10820,114,99,117,112,59,1,10825,4,2,97,117,7990,7994,112,59,1,10827,112,59,1,10823,111,116,59,1,10816,59,3,8745,65024,4,2,101,111,8013,8017,116,59,1,8257,110,59,1,711,4,4,97,101,105,117,8031,8046,8056,8061,4,2,112,114,8037,8041,115,59,1,10829,111,110,59,1,269,100,105,108,5,231,1,59,8054,1,231,114,99,59,1,265,112,115,4,2,59,115,8069,8071,1,10828,109,59,1,10832,111,116,59,1,267,4,3,100,109,110,8088,8097,8104,105,108,5,184,1,59,8095,1,184,112,116,121,118,59,1,10674,116,5,162,2,59,101,8112,8114,1,162,114,100,111,116,59,1,183,114,59,3,55349,56608,4,3,99,101,105,8134,8138,8154,121,59,1,1095,99,107,4,2,59,109,8146,8148,1,10003,97,114,107,59,1,10003,59,1,967,114,4,7,59,69,99,101,102,109,115,8174,8176,8179,8258,8261,8268,8273,1,9675,59,1,10691,4,3,59,101,108,8187,8189,8193,1,710,113,59,1,8791,101,4,2,97,100,8200,8223,114,114,111,119,4,2,108,114,8210,8216,101,102,116,59,1,8634,105,103,104,116,59,1,8635,4,5,82,83,97,99,100,8235,8238,8241,8246,8252,59,1,174,59,1,9416,115,116,59,1,8859,105,114,99,59,1,8858,97,115,104,59,1,8861,59,1,8791,110,105,110,116,59,1,10768,105,100,59,1,10991,99,105,114,59,1,10690,117,98,115,4,2,59,117,8288,8290,1,9827,105,116,59,1,9827,4,4,108,109,110,112,8305,8326,8376,8400,111,110,4,2,59,101,8313,8315,1,58,4,2,59,113,8321,8323,1,8788,59,1,8788,4,2,109,112,8332,8344,97,4,2,59,116,8339,8341,1,44,59,1,64,4,3,59,102,108,8352,8354,8358,1,8705,110,59,1,8728,101,4,2,109,120,8365,8371,101,110,116,59,1,8705,101,115,59,1,8450,4,2,103,105,8382,8395,4,2,59,100,8388,8390,1,8773,111,116,59,1,10861,110,116,59,1,8750,4,3,102,114,121,8408,8412,8417,59,3,55349,56660,111,100,59,1,8720,5,169,2,59,115,8424,8426,1,169,114,59,1,8471,4,2,97,111,8436,8441,114,114,59,1,8629,115,115,59,1,10007,4,2,99,117,8452,8457,114,59,3,55349,56504,4,2,98,112,8463,8474,4,2,59,101,8469,8471,1,10959,59,1,10961,4,2,59,101,8480,8482,1,10960,59,1,10962,100,111,116,59,1,8943,4,7,100,101,108,112,114,118,119,8507,8522,8536,8550,8600,8697,8702,97,114,114,4,2,108,114,8516,8519,59,1,10552,59,1,10549,4,2,112,115,8528,8532,114,59,1,8926,99,59,1,8927,97,114,114,4,2,59,112,8545,8547,1,8630,59,1,10557,4,6,59,98,99,100,111,115,8564,8566,8573,8587,8592,8596,1,8746,114,99,97,112,59,1,10824,4,2,97,117,8579,8583,112,59,1,10822,112,59,1,10826,111,116,59,1,8845,114,59,1,10821,59,3,8746,65024,4,4,97,108,114,118,8610,8623,8663,8672,114,114,4,2,59,109,8618,8620,1,8631,59,1,10556,121,4,3,101,118,119,8632,8651,8656,113,4,2,112,115,8639,8645,114,101,99,59,1,8926,117,99,99,59,1,8927,101,101,59,1,8910,101,100,103,101,59,1,8911,101,110,5,164,1,59,8670,1,164,101,97,114,114,111,119,4,2,108,114,8684,8690,101,102,116,59,1,8630,105,103,104,116,59,1,8631,101,101,59,1,8910,101,100,59,1,8911,4,2,99,105,8713,8721,111,110,105,110,116,59,1,8754,110,116,59,1,8753,108,99,116,121,59,1,9005,4,19,65,72,97,98,99,100,101,102,104,105,106,108,111,114,115,116,117,119,122,8773,8778,8783,8821,8839,8854,8887,8914,8930,8944,9036,9041,9058,9197,9227,9258,9281,9297,9305,114,114,59,1,8659,97,114,59,1,10597,4,4,103,108,114,115,8793,8799,8805,8809,103,101,114,59,1,8224,101,116,104,59,1,8504,114,59,1,8595,104,4,2,59,118,8816,8818,1,8208,59,1,8867,4,2,107,108,8827,8834,97,114,111,119,59,1,10511,97,99,59,1,733,4,2,97,121,8845,8851,114,111,110,59,1,271,59,1,1076,4,3,59,97,111,8862,8864,8880,1,8518,4,2,103,114,8870,8876,103,101,114,59,1,8225,114,59,1,8650,116,115,101,113,59,1,10871,4,3,103,108,109,8895,8902,8907,5,176,1,59,8900,1,176,116,97,59,1,948,112,116,121,118,59,1,10673,4,2,105,114,8920,8926,115,104,116,59,1,10623,59,3,55349,56609,97,114,4,2,108,114,8938,8941,59,1,8643,59,1,8642,4,5,97,101,103,115,118,8956,8986,8989,8996,9001,109,4,3,59,111,115,8965,8967,8983,1,8900,110,100,4,2,59,115,8975,8977,1,8900,117,105,116,59,1,9830,59,1,9830,59,1,168,97,109,109,97,59,1,989,105,110,59,1,8946,4,3,59,105,111,9009,9011,9031,1,247,100,101,5,247,2,59,111,9020,9022,1,247,110,116,105,109,101,115,59,1,8903,110,120,59,1,8903,99,121,59,1,1106,99,4,2,111,114,9048,9053,114,110,59,1,8990,111,112,59,1,8973,4,5,108,112,116,117,119,9070,9076,9081,9130,9144,108,97,114,59,1,36,102,59,3,55349,56661,4,5,59,101,109,112,115,9093,9095,9109,9116,9122,1,729,113,4,2,59,100,9102,9104,1,8784,111,116,59,1,8785,105,110,117,115,59,1,8760,108,117,115,59,1,8724,113,117,97,114,101,59,1,8865,98,108,101,98,97,114,119,101,100,103,101,59,1,8966,110,4,3,97,100,104,9153,9160,9172,114,114,111,119,59,1,8595,111,119,110,97,114,114,111,119,115,59,1,8650,97,114,112,111,111,110,4,2,108,114,9184,9190,101,102,116,59,1,8643,105,103,104,116,59,1,8642,4,2,98,99,9203,9211,107,97,114,111,119,59,1,10512,4,2,111,114,9217,9222,114,110,59,1,8991,111,112,59,1,8972,4,3,99,111,116,9235,9248,9252,4,2,114,121,9241,9245,59,3,55349,56505,59,1,1109,108,59,1,10742,114,111,107,59,1,273,4,2,100,114,9264,9269,111,116,59,1,8945,105,4,2,59,102,9276,9278,1,9663,59,1,9662,4,2,97,104,9287,9292,114,114,59,1,8693,97,114,59,1,10607,97,110,103,108,101,59,1,10662,4,2,99,105,9311,9315,121,59,1,1119,103,114,97,114,114,59,1,10239,4,18,68,97,99,100,101,102,103,108,109,110,111,112,113,114,115,116,117,120,9361,9376,9398,9439,9444,9447,9462,9495,9531,9585,9598,9614,9659,9755,9771,9792,9808,9826,4,2,68,111,9367,9372,111,116,59,1,10871,116,59,1,8785,4,2,99,115,9382,9392,117,116,101,5,233,1,59,9390,1,233,116,101,114,59,1,10862,4,4,97,105,111,121,9408,9414,9430,9436,114,111,110,59,1,283,114,4,2,59,99,9421,9423,1,8790,5,234,1,59,9428,1,234,108,111,110,59,1,8789,59,1,1101,111,116,59,1,279,59,1,8519,4,2,68,114,9453,9458,111,116,59,1,8786,59,3,55349,56610,4,3,59,114,115,9470,9472,9482,1,10906,97,118,101,5,232,1,59,9480,1,232,4,2,59,100,9488,9490,1,10902,111,116,59,1,10904,4,4,59,105,108,115,9505,9507,9515,9518,1,10905,110,116,101,114,115,59,1,9191,59,1,8467,4,2,59,100,9524,9526,1,10901,111,116,59,1,10903,4,3,97,112,115,9539,9544,9564,99,114,59,1,275,116,121,4,3,59,115,118,9554,9556,9561,1,8709,101,116,59,1,8709,59,1,8709,112,4,2,49,59,9571,9583,4,2,51,52,9577,9580,59,1,8196,59,1,8197,1,8195,4,2,103,115,9591,9594,59,1,331,112,59,1,8194,4,2,103,112,9604,9609,111,110,59,1,281,102,59,3,55349,56662,4,3,97,108,115,9622,9635,9640,114,4,2,59,115,9629,9631,1,8917,108,59,1,10723,117,115,59,1,10865,105,4,3,59,108,118,9649,9651,9656,1,949,111,110,59,1,949,59,1,1013,4,4,99,115,117,118,9669,9686,9716,9747,4,2,105,111,9675,9680,114,99,59,1,8790,108,111,110,59,1,8789,4,2,105,108,9692,9696,109,59,1,8770,97,110,116,4,2,103,108,9705,9710,116,114,59,1,10902,101,115,115,59,1,10901,4,3,97,101,105,9724,9729,9734,108,115,59,1,61,115,116,59,1,8799,118,4,2,59,68,9741,9743,1,8801,68,59,1,10872,112,97,114,115,108,59,1,10725,4,2,68,97,9761,9766,111,116,59,1,8787,114,114,59,1,10609,4,3,99,100,105,9779,9783,9788,114,59,1,8495,111,116,59,1,8784,109,59,1,8770,4,2,97,104,9798,9801,59,1,951,5,240,1,59,9806,1,240,4,2,109,114,9814,9822,108,5,235,1,59,9820,1,235,111,59,1,8364,4,3,99,105,112,9834,9838,9843,108,59,1,33,115,116,59,1,8707,4,2,101,111,9849,9859,99,116,97,116,105,111,110,59,1,8496,110,101,110,116,105,97,108,101,59,1,8519,4,12,97,99,101,102,105,106,108,110,111,112,114,115,9896,9910,9914,9921,9954,9960,9967,9989,9994,10027,10036,10164,108,108,105,110,103,100,111,116,115,101,113,59,1,8786,121,59,1,1092,109,97,108,101,59,1,9792,4,3,105,108,114,9929,9935,9950,108,105,103,59,1,64259,4,2,105,108,9941,9945,103,59,1,64256,105,103,59,1,64260,59,3,55349,56611,108,105,103,59,1,64257,108,105,103,59,3,102,106,4,3,97,108,116,9975,9979,9984,116,59,1,9837,105,103,59,1,64258,110,115,59,1,9649,111,102,59,1,402,4,2,112,114,1e4,10005,102,59,3,55349,56663,4,2,97,107,10011,10016,108,108,59,1,8704,4,2,59,118,10022,10024,1,8916,59,1,10969,97,114,116,105,110,116,59,1,10765,4,2,97,111,10042,10159,4,2,99,115,10048,10155,4,6,49,50,51,52,53,55,10062,10102,10114,10135,10139,10151,4,6,50,51,52,53,54,56,10076,10083,10086,10093,10096,10099,5,189,1,59,10081,1,189,59,1,8531,5,188,1,59,10091,1,188,59,1,8533,59,1,8537,59,1,8539,4,2,51,53,10108,10111,59,1,8532,59,1,8534,4,3,52,53,56,10122,10129,10132,5,190,1,59,10127,1,190,59,1,8535,59,1,8540,53,59,1,8536,4,2,54,56,10145,10148,59,1,8538,59,1,8541,56,59,1,8542,108,59,1,8260,119,110,59,1,8994,99,114,59,3,55349,56507,4,17,69,97,98,99,100,101,102,103,105,106,108,110,111,114,115,116,118,10206,10217,10247,10254,10268,10273,10358,10363,10374,10380,10385,10406,10458,10464,10470,10497,10610,4,2,59,108,10212,10214,1,8807,59,1,10892,4,3,99,109,112,10225,10231,10244,117,116,101,59,1,501,109,97,4,2,59,100,10239,10241,1,947,59,1,989,59,1,10886,114,101,118,101,59,1,287,4,2,105,121,10260,10265,114,99,59,1,285,59,1,1075,111,116,59,1,289,4,4,59,108,113,115,10283,10285,10288,10308,1,8805,59,1,8923,4,3,59,113,115,10296,10298,10301,1,8805,59,1,8807,108,97,110,116,59,1,10878,4,4,59,99,100,108,10318,10320,10324,10345,1,10878,99,59,1,10921,111,116,4,2,59,111,10332,10334,1,10880,4,2,59,108,10340,10342,1,10882,59,1,10884,4,2,59,101,10351,10354,3,8923,65024,115,59,1,10900,114,59,3,55349,56612,4,2,59,103,10369,10371,1,8811,59,1,8921,109,101,108,59,1,8503,99,121,59,1,1107,4,4,59,69,97,106,10395,10397,10400,10403,1,8823,59,1,10898,59,1,10917,59,1,10916,4,4,69,97,101,115,10416,10419,10434,10453,59,1,8809,112,4,2,59,112,10426,10428,1,10890,114,111,120,59,1,10890,4,2,59,113,10440,10442,1,10888,4,2,59,113,10448,10450,1,10888,59,1,8809,105,109,59,1,8935,112,102,59,3,55349,56664,97,118,101,59,1,96,4,2,99,105,10476,10480,114,59,1,8458,109,4,3,59,101,108,10489,10491,10494,1,8819,59,1,10894,59,1,10896,5,62,6,59,99,100,108,113,114,10512,10514,10527,10532,10538,10545,1,62,4,2,99,105,10520,10523,59,1,10919,114,59,1,10874,111,116,59,1,8919,80,97,114,59,1,10645,117,101,115,116,59,1,10876,4,5,97,100,101,108,115,10557,10574,10579,10599,10605,4,2,112,114,10563,10570,112,114,111,120,59,1,10886,114,59,1,10616,111,116,59,1,8919,113,4,2,108,113,10586,10592,101,115,115,59,1,8923,108,101,115,115,59,1,10892,101,115,115,59,1,8823,105,109,59,1,8819,4,2,101,110,10616,10626,114,116,110,101,113,113,59,3,8809,65024,69,59,3,8809,65024,4,10,65,97,98,99,101,102,107,111,115,121,10653,10658,10713,10718,10724,10760,10765,10786,10850,10875,114,114,59,1,8660,4,4,105,108,109,114,10668,10674,10678,10684,114,115,112,59,1,8202,102,59,1,189,105,108,116,59,1,8459,4,2,100,114,10690,10695,99,121,59,1,1098,4,3,59,99,119,10703,10705,10710,1,8596,105,114,59,1,10568,59,1,8621,97,114,59,1,8463,105,114,99,59,1,293,4,3,97,108,114,10732,10748,10754,114,116,115,4,2,59,117,10741,10743,1,9829,105,116,59,1,9829,108,105,112,59,1,8230,99,111,110,59,1,8889,114,59,3,55349,56613,115,4,2,101,119,10772,10779,97,114,111,119,59,1,10533,97,114,111,119,59,1,10534,4,5,97,109,111,112,114,10798,10803,10809,10839,10844,114,114,59,1,8703,116,104,116,59,1,8763,107,4,2,108,114,10816,10827,101,102,116,97,114,114,111,119,59,1,8617,105,103,104,116,97,114,114,111,119,59,1,8618,102,59,3,55349,56665,98,97,114,59,1,8213,4,3,99,108,116,10858,10863,10869,114,59,3,55349,56509,97,115,104,59,1,8463,114,111,107,59,1,295,4,2,98,112,10881,10887,117,108,108,59,1,8259,104,101,110,59,1,8208,4,15,97,99,101,102,103,105,106,109,110,111,112,113,115,116,117,10925,10936,10958,10977,10990,11001,11039,11045,11101,11192,11220,11226,11237,11285,11299,99,117,116,101,5,237,1,59,10934,1,237,4,3,59,105,121,10944,10946,10955,1,8291,114,99,5,238,1,59,10953,1,238,59,1,1080,4,2,99,120,10964,10968,121,59,1,1077,99,108,5,161,1,59,10975,1,161,4,2,102,114,10983,10986,59,1,8660,59,3,55349,56614,114,97,118,101,5,236,1,59,10999,1,236,4,4,59,105,110,111,11011,11013,11028,11034,1,8520,4,2,105,110,11019,11024,110,116,59,1,10764,116,59,1,8749,102,105,110,59,1,10716,116,97,59,1,8489,108,105,103,59,1,307,4,3,97,111,112,11053,11092,11096,4,3,99,103,116,11061,11065,11088,114,59,1,299,4,3,101,108,112,11073,11076,11082,59,1,8465,105,110,101,59,1,8464,97,114,116,59,1,8465,104,59,1,305,102,59,1,8887,101,100,59,1,437,4,5,59,99,102,111,116,11113,11115,11121,11136,11142,1,8712,97,114,101,59,1,8453,105,110,4,2,59,116,11129,11131,1,8734,105,101,59,1,10717,100,111,116,59,1,305,4,5,59,99,101,108,112,11154,11156,11161,11179,11186,1,8747,97,108,59,1,8890,4,2,103,114,11167,11173,101,114,115,59,1,8484,99,97,108,59,1,8890,97,114,104,107,59,1,10775,114,111,100,59,1,10812,4,4,99,103,112,116,11202,11206,11211,11216,121,59,1,1105,111,110,59,1,303,102,59,3,55349,56666,97,59,1,953,114,111,100,59,1,10812,117,101,115,116,5,191,1,59,11235,1,191,4,2,99,105,11243,11248,114,59,3,55349,56510,110,4,5,59,69,100,115,118,11261,11263,11266,11271,11282,1,8712,59,1,8953,111,116,59,1,8949,4,2,59,118,11277,11279,1,8948,59,1,8947,59,1,8712,4,2,59,105,11291,11293,1,8290,108,100,101,59,1,297,4,2,107,109,11305,11310,99,121,59,1,1110,108,5,239,1,59,11316,1,239,4,6,99,102,109,111,115,117,11332,11346,11351,11357,11363,11380,4,2,105,121,11338,11343,114,99,59,1,309,59,1,1081,114,59,3,55349,56615,97,116,104,59,1,567,112,102,59,3,55349,56667,4,2,99,101,11369,11374,114,59,3,55349,56511,114,99,121,59,1,1112,107,99,121,59,1,1108,4,8,97,99,102,103,104,106,111,115,11404,11418,11433,11438,11445,11450,11455,11461,112,112,97,4,2,59,118,11413,11415,1,954,59,1,1008,4,2,101,121,11424,11430,100,105,108,59,1,311,59,1,1082,114,59,3,55349,56616,114,101,101,110,59,1,312,99,121,59,1,1093,99,121,59,1,1116,112,102,59,3,55349,56668,99,114,59,3,55349,56512,4,23,65,66,69,72,97,98,99,100,101,102,103,104,106,108,109,110,111,112,114,115,116,117,118,11515,11538,11544,11555,11560,11721,11780,11818,11868,12136,12160,12171,12203,12208,12246,12275,12327,12509,12523,12569,12641,12732,12752,4,3,97,114,116,11523,11528,11532,114,114,59,1,8666,114,59,1,8656,97,105,108,59,1,10523,97,114,114,59,1,10510,4,2,59,103,11550,11552,1,8806,59,1,10891,97,114,59,1,10594,4,9,99,101,103,109,110,112,113,114,116,11580,11586,11594,11600,11606,11624,11627,11636,11694,117,116,101,59,1,314,109,112,116,121,118,59,1,10676,114,97,110,59,1,8466,98,100,97,59,1,955,103,4,3,59,100,108,11615,11617,11620,1,10216,59,1,10641,101,59,1,10216,59,1,10885,117,111,5,171,1,59,11634,1,171,114,4,8,59,98,102,104,108,112,115,116,11655,11657,11669,11673,11677,11681,11685,11690,1,8592,4,2,59,102,11663,11665,1,8676,115,59,1,10527,115,59,1,10525,107,59,1,8617,112,59,1,8619,108,59,1,10553,105,109,59,1,10611,108,59,1,8610,4,3,59,97,101,11702,11704,11709,1,10923,105,108,59,1,10521,4,2,59,115,11715,11717,1,10925,59,3,10925,65024,4,3,97,98,114,11729,11734,11739,114,114,59,1,10508,114,107,59,1,10098,4,2,97,107,11745,11758,99,4,2,101,107,11752,11755,59,1,123,59,1,91,4,2,101,115,11764,11767,59,1,10635,108,4,2,100,117,11774,11777,59,1,10639,59,1,10637,4,4,97,101,117,121,11790,11796,11811,11815,114,111,110,59,1,318,4,2,100,105,11802,11807,105,108,59,1,316,108,59,1,8968,98,59,1,123,59,1,1083,4,4,99,113,114,115,11828,11832,11845,11864,97,59,1,10550,117,111,4,2,59,114,11840,11842,1,8220,59,1,8222,4,2,100,117,11851,11857,104,97,114,59,1,10599,115,104,97,114,59,1,10571,104,59,1,8626,4,5,59,102,103,113,115,11880,11882,12008,12011,12031,1,8804,116,4,5,97,104,108,114,116,11895,11913,11935,11947,11996,114,114,111,119,4,2,59,116,11905,11907,1,8592,97,105,108,59,1,8610,97,114,112,111,111,110,4,2,100,117,11925,11931,111,119,110,59,1,8637,112,59,1,8636,101,102,116,97,114,114,111,119,115,59,1,8647,105,103,104,116,4,3,97,104,115,11959,11974,11984,114,114,111,119,4,2,59,115,11969,11971,1,8596,59,1,8646,97,114,112,111,111,110,115,59,1,8651,113,117,105,103,97,114,114,111,119,59,1,8621,104,114,101,101,116,105,109,101,115,59,1,8907,59,1,8922,4,3,59,113,115,12019,12021,12024,1,8804,59,1,8806,108,97,110,116,59,1,10877,4,5,59,99,100,103,115,12043,12045,12049,12070,12083,1,10877,99,59,1,10920,111,116,4,2,59,111,12057,12059,1,10879,4,2,59,114,12065,12067,1,10881,59,1,10883,4,2,59,101,12076,12079,3,8922,65024,115,59,1,10899,4,5,97,100,101,103,115,12095,12103,12108,12126,12131,112,112,114,111,120,59,1,10885,111,116,59,1,8918,113,4,2,103,113,12115,12120,116,114,59,1,8922,103,116,114,59,1,10891,116,114,59,1,8822,105,109,59,1,8818,4,3,105,108,114,12144,12150,12156,115,104,116,59,1,10620,111,111,114,59,1,8970,59,3,55349,56617,4,2,59,69,12166,12168,1,8822,59,1,10897,4,2,97,98,12177,12198,114,4,2,100,117,12184,12187,59,1,8637,4,2,59,108,12193,12195,1,8636,59,1,10602,108,107,59,1,9604,99,121,59,1,1113,4,5,59,97,99,104,116,12220,12222,12227,12235,12241,1,8810,114,114,59,1,8647,111,114,110,101,114,59,1,8990,97,114,100,59,1,10603,114,105,59,1,9722,4,2,105,111,12252,12258,100,111,116,59,1,320,117,115,116,4,2,59,97,12267,12269,1,9136,99,104,101,59,1,9136,4,4,69,97,101,115,12285,12288,12303,12322,59,1,8808,112,4,2,59,112,12295,12297,1,10889,114,111,120,59,1,10889,4,2,59,113,12309,12311,1,10887,4,2,59,113,12317,12319,1,10887,59,1,8808,105,109,59,1,8934,4,8,97,98,110,111,112,116,119,122,12345,12359,12364,12421,12446,12467,12474,12490,4,2,110,114,12351,12355,103,59,1,10220,114,59,1,8701,114,107,59,1,10214,103,4,3,108,109,114,12373,12401,12409,101,102,116,4,2,97,114,12382,12389,114,114,111,119,59,1,10229,105,103,104,116,97,114,114,111,119,59,1,10231,97,112,115,116,111,59,1,10236,105,103,104,116,97,114,114,111,119,59,1,10230,112,97,114,114,111,119,4,2,108,114,12433,12439,101,102,116,59,1,8619,105,103,104,116,59,1,8620,4,3,97,102,108,12454,12458,12462,114,59,1,10629,59,3,55349,56669,117,115,59,1,10797,105,109,101,115,59,1,10804,4,2,97,98,12480,12485,115,116,59,1,8727,97,114,59,1,95,4,3,59,101,102,12498,12500,12506,1,9674,110,103,101,59,1,9674,59,1,10731,97,114,4,2,59,108,12517,12519,1,40,116,59,1,10643,4,5,97,99,104,109,116,12535,12540,12548,12561,12564,114,114,59,1,8646,111,114,110,101,114,59,1,8991,97,114,4,2,59,100,12556,12558,1,8651,59,1,10605,59,1,8206,114,105,59,1,8895,4,6,97,99,104,105,113,116,12583,12589,12594,12597,12614,12635,113,117,111,59,1,8249,114,59,3,55349,56513,59,1,8624,109,4,3,59,101,103,12606,12608,12611,1,8818,59,1,10893,59,1,10895,4,2,98,117,12620,12623,59,1,91,111,4,2,59,114,12630,12632,1,8216,59,1,8218,114,111,107,59,1,322,5,60,8,59,99,100,104,105,108,113,114,12660,12662,12675,12680,12686,12692,12698,12705,1,60,4,2,99,105,12668,12671,59,1,10918,114,59,1,10873,111,116,59,1,8918,114,101,101,59,1,8907,109,101,115,59,1,8905,97,114,114,59,1,10614,117,101,115,116,59,1,10875,4,2,80,105,12711,12716,97,114,59,1,10646,4,3,59,101,102,12724,12726,12729,1,9667,59,1,8884,59,1,9666,114,4,2,100,117,12739,12746,115,104,97,114,59,1,10570,104,97,114,59,1,10598,4,2,101,110,12758,12768,114,116,110,101,113,113,59,3,8808,65024,69,59,3,8808,65024,4,14,68,97,99,100,101,102,104,105,108,110,111,112,115,117,12803,12809,12893,12908,12914,12928,12933,12937,13011,13025,13032,13049,13052,13069,68,111,116,59,1,8762,4,4,99,108,112,114,12819,12827,12849,12887,114,5,175,1,59,12825,1,175,4,2,101,116,12833,12836,59,1,9794,4,2,59,101,12842,12844,1,10016,115,101,59,1,10016,4,2,59,115,12855,12857,1,8614,116,111,4,4,59,100,108,117,12869,12871,12877,12883,1,8614,111,119,110,59,1,8615,101,102,116,59,1,8612,112,59,1,8613,107,101,114,59,1,9646,4,2,111,121,12899,12905,109,109,97,59,1,10793,59,1,1084,97,115,104,59,1,8212,97,115,117,114,101,100,97,110,103,108,101,59,1,8737,114,59,3,55349,56618,111,59,1,8487,4,3,99,100,110,12945,12954,12985,114,111,5,181,1,59,12952,1,181,4,4,59,97,99,100,12964,12966,12971,12976,1,8739,115,116,59,1,42,105,114,59,1,10992,111,116,5,183,1,59,12983,1,183,117,115,4,3,59,98,100,12995,12997,13e3,1,8722,59,1,8863,4,2,59,117,13006,13008,1,8760,59,1,10794,4,2,99,100,13017,13021,112,59,1,10971,114,59,1,8230,112,108,117,115,59,1,8723,4,2,100,112,13038,13044,101,108,115,59,1,8871,102,59,3,55349,56670,59,1,8723,4,2,99,116,13058,13063,114,59,3,55349,56514,112,111,115,59,1,8766,4,3,59,108,109,13077,13079,13087,1,956,116,105,109,97,112,59,1,8888,97,112,59,1,8888,4,24,71,76,82,86,97,98,99,100,101,102,103,104,105,106,108,109,111,112,114,115,116,117,118,119,13142,13165,13217,13229,13247,13330,13359,13414,13420,13508,13513,13579,13602,13626,13631,13762,13767,13855,13936,13995,14214,14285,14312,14432,4,2,103,116,13148,13152,59,3,8921,824,4,2,59,118,13158,13161,3,8811,8402,59,3,8811,824,4,3,101,108,116,13173,13200,13204,102,116,4,2,97,114,13181,13188,114,114,111,119,59,1,8653,105,103,104,116,97,114,114,111,119,59,1,8654,59,3,8920,824,4,2,59,118,13210,13213,3,8810,8402,59,3,8810,824,105,103,104,116,97,114,114,111,119,59,1,8655,4,2,68,100,13235,13241,97,115,104,59,1,8879,97,115,104,59,1,8878,4,5,98,99,110,112,116,13259,13264,13270,13275,13308,108,97,59,1,8711,117,116,101,59,1,324,103,59,3,8736,8402,4,5,59,69,105,111,112,13287,13289,13293,13298,13302,1,8777,59,3,10864,824,100,59,3,8779,824,115,59,1,329,114,111,120,59,1,8777,117,114,4,2,59,97,13316,13318,1,9838,108,4,2,59,115,13325,13327,1,9838,59,1,8469,4,2,115,117,13336,13344,112,5,160,1,59,13342,1,160,109,112,4,2,59,101,13352,13355,3,8782,824,59,3,8783,824,4,5,97,101,111,117,121,13371,13385,13391,13407,13411,4,2,112,114,13377,13380,59,1,10819,111,110,59,1,328,100,105,108,59,1,326,110,103,4,2,59,100,13399,13401,1,8775,111,116,59,3,10861,824,112,59,1,10818,59,1,1085,97,115,104,59,1,8211,4,7,59,65,97,100,113,115,120,13436,13438,13443,13466,13472,13478,13494,1,8800,114,114,59,1,8663,114,4,2,104,114,13450,13454,107,59,1,10532,4,2,59,111,13460,13462,1,8599,119,59,1,8599,111,116,59,3,8784,824,117,105,118,59,1,8802,4,2,101,105,13484,13489,97,114,59,1,10536,109,59,3,8770,824,105,115,116,4,2,59,115,13503,13505,1,8708,59,1,8708,114,59,3,55349,56619,4,4,69,101,115,116,13523,13527,13563,13568,59,3,8807,824,4,3,59,113,115,13535,13537,13559,1,8817,4,3,59,113,115,13545,13547,13551,1,8817,59,3,8807,824,108,97,110,116,59,3,10878,824,59,3,10878,824,105,109,59,1,8821,4,2,59,114,13574,13576,1,8815,59,1,8815,4,3,65,97,112,13587,13592,13597,114,114,59,1,8654,114,114,59,1,8622,97,114,59,1,10994,4,3,59,115,118,13610,13612,13623,1,8715,4,2,59,100,13618,13620,1,8956,59,1,8954,59,1,8715,99,121,59,1,1114,4,7,65,69,97,100,101,115,116,13647,13652,13656,13661,13665,13737,13742,114,114,59,1,8653,59,3,8806,824,114,114,59,1,8602,114,59,1,8229,4,4,59,102,113,115,13675,13677,13703,13725,1,8816,116,4,2,97,114,13684,13691,114,114,111,119,59,1,8602,105,103,104,116,97,114,114,111,119,59,1,8622,4,3,59,113,115,13711,13713,13717,1,8816,59,3,8806,824,108,97,110,116,59,3,10877,824,4,2,59,115,13731,13734,3,10877,824,59,1,8814,105,109,59,1,8820,4,2,59,114,13748,13750,1,8814,105,4,2,59,101,13757,13759,1,8938,59,1,8940,105,100,59,1,8740,4,2,112,116,13773,13778,102,59,3,55349,56671,5,172,3,59,105,110,13787,13789,13829,1,172,110,4,4,59,69,100,118,13800,13802,13806,13812,1,8713,59,3,8953,824,111,116,59,3,8949,824,4,3,97,98,99,13820,13823,13826,59,1,8713,59,1,8951,59,1,8950,105,4,2,59,118,13836,13838,1,8716,4,3,97,98,99,13846,13849,13852,59,1,8716,59,1,8958,59,1,8957,4,3,97,111,114,13863,13892,13899,114,4,4,59,97,115,116,13874,13876,13883,13888,1,8742,108,108,101,108,59,1,8742,108,59,3,11005,8421,59,3,8706,824,108,105,110,116,59,1,10772,4,3,59,99,101,13907,13909,13914,1,8832,117,101,59,1,8928,4,2,59,99,13920,13923,3,10927,824,4,2,59,101,13929,13931,1,8832,113,59,3,10927,824,4,4,65,97,105,116,13946,13951,13971,13982,114,114,59,1,8655,114,114,4,3,59,99,119,13961,13963,13967,1,8603,59,3,10547,824,59,3,8605,824,103,104,116,97,114,114,111,119,59,1,8603,114,105,4,2,59,101,13990,13992,1,8939,59,1,8941,4,7,99,104,105,109,112,113,117,14011,14036,14060,14080,14085,14090,14106,4,4,59,99,101,114,14021,14023,14028,14032,1,8833,117,101,59,1,8929,59,3,10928,824,59,3,55349,56515,111,114,116,4,2,109,112,14045,14050,105,100,59,1,8740,97,114,97,108,108,101,108,59,1,8742,109,4,2,59,101,14067,14069,1,8769,4,2,59,113,14075,14077,1,8772,59,1,8772,105,100,59,1,8740,97,114,59,1,8742,115,117,4,2,98,112,14098,14102,101,59,1,8930,101,59,1,8931,4,3,98,99,112,14114,14157,14171,4,4,59,69,101,115,14124,14126,14130,14133,1,8836,59,3,10949,824,59,1,8840,101,116,4,2,59,101,14141,14144,3,8834,8402,113,4,2,59,113,14151,14153,1,8840,59,3,10949,824,99,4,2,59,101,14164,14166,1,8833,113,59,3,10928,824,4,4,59,69,101,115,14181,14183,14187,14190,1,8837,59,3,10950,824,59,1,8841,101,116,4,2,59,101,14198,14201,3,8835,8402,113,4,2,59,113,14208,14210,1,8841,59,3,10950,824,4,4,103,105,108,114,14224,14228,14238,14242,108,59,1,8825,108,100,101,5,241,1,59,14236,1,241,103,59,1,8824,105,97,110,103,108,101,4,2,108,114,14254,14269,101,102,116,4,2,59,101,14263,14265,1,8938,113,59,1,8940,105,103,104,116,4,2,59,101,14279,14281,1,8939,113,59,1,8941,4,2,59,109,14291,14293,1,957,4,3,59,101,115,14301,14303,14308,1,35,114,111,59,1,8470,112,59,1,8199,4,9,68,72,97,100,103,105,108,114,115,14332,14338,14344,14349,14355,14369,14376,14408,14426,97,115,104,59,1,8877,97,114,114,59,1,10500,112,59,3,8781,8402,97,115,104,59,1,8876,4,2,101,116,14361,14365,59,3,8805,8402,59,3,62,8402,110,102,105,110,59,1,10718,4,3,65,101,116,14384,14389,14393,114,114,59,1,10498,59,3,8804,8402,4,2,59,114,14399,14402,3,60,8402,105,101,59,3,8884,8402,4,2,65,116,14414,14419,114,114,59,1,10499,114,105,101,59,3,8885,8402,105,109,59,3,8764,8402,4,3,65,97,110,14440,14445,14468,114,114,59,1,8662,114,4,2,104,114,14452,14456,107,59,1,10531,4,2,59,111,14462,14464,1,8598,119,59,1,8598,101,97,114,59,1,10535,4,18,83,97,99,100,101,102,103,104,105,108,109,111,112,114,115,116,117,118,14512,14515,14535,14560,14597,14603,14618,14643,14657,14662,14701,14741,14747,14769,14851,14877,14907,14916,59,1,9416,4,2,99,115,14521,14531,117,116,101,5,243,1,59,14529,1,243,116,59,1,8859,4,2,105,121,14541,14557,114,4,2,59,99,14548,14550,1,8858,5,244,1,59,14555,1,244,59,1,1086,4,5,97,98,105,111,115,14572,14577,14583,14587,14591,115,104,59,1,8861,108,97,99,59,1,337,118,59,1,10808,116,59,1,8857,111,108,100,59,1,10684,108,105,103,59,1,339,4,2,99,114,14609,14614,105,114,59,1,10687,59,3,55349,56620,4,3,111,114,116,14626,14630,14640,110,59,1,731,97,118,101,5,242,1,59,14638,1,242,59,1,10689,4,2,98,109,14649,14654,97,114,59,1,10677,59,1,937,110,116,59,1,8750,4,4,97,99,105,116,14672,14677,14693,14698,114,114,59,1,8634,4,2,105,114,14683,14687,114,59,1,10686,111,115,115,59,1,10683,110,101,59,1,8254,59,1,10688,4,3,97,101,105,14709,14714,14719,99,114,59,1,333,103,97,59,1,969,4,3,99,100,110,14727,14733,14736,114,111,110,59,1,959,59,1,10678,117,115,59,1,8854,112,102,59,3,55349,56672,4,3,97,101,108,14755,14759,14764,114,59,1,10679,114,112,59,1,10681,117,115,59,1,8853,4,7,59,97,100,105,111,115,118,14785,14787,14792,14831,14837,14841,14848,1,8744,114,114,59,1,8635,4,4,59,101,102,109,14802,14804,14817,14824,1,10845,114,4,2,59,111,14811,14813,1,8500,102,59,1,8500,5,170,1,59,14822,1,170,5,186,1,59,14829,1,186,103,111,102,59,1,8886,114,59,1,10838,108,111,112,101,59,1,10839,59,1,10843,4,3,99,108,111,14859,14863,14873,114,59,1,8500,97,115,104,5,248,1,59,14871,1,248,108,59,1,8856,105,4,2,108,109,14884,14893,100,101,5,245,1,59,14891,1,245,101,115,4,2,59,97,14901,14903,1,8855,115,59,1,10806,109,108,5,246,1,59,14914,1,246,98,97,114,59,1,9021,4,12,97,99,101,102,104,105,108,109,111,114,115,117,14948,14992,14996,15033,15038,15068,15090,15189,15192,15222,15427,15441,114,4,4,59,97,115,116,14959,14961,14976,14989,1,8741,5,182,2,59,108,14968,14970,1,182,108,101,108,59,1,8741,4,2,105,108,14982,14986,109,59,1,10995,59,1,11005,59,1,8706,121,59,1,1087,114,4,5,99,105,109,112,116,15009,15014,15019,15024,15027,110,116,59,1,37,111,100,59,1,46,105,108,59,1,8240,59,1,8869,101,110,107,59,1,8241,114,59,3,55349,56621,4,3,105,109,111,15046,15057,15063,4,2,59,118,15052,15054,1,966,59,1,981,109,97,116,59,1,8499,110,101,59,1,9742,4,3,59,116,118,15076,15078,15087,1,960,99,104,102,111,114,107,59,1,8916,59,1,982,4,2,97,117,15096,15119,110,4,2,99,107,15103,15115,107,4,2,59,104,15110,15112,1,8463,59,1,8462,118,59,1,8463,115,4,9,59,97,98,99,100,101,109,115,116,15140,15142,15148,15151,15156,15168,15171,15179,15184,1,43,99,105,114,59,1,10787,59,1,8862,105,114,59,1,10786,4,2,111,117,15162,15165,59,1,8724,59,1,10789,59,1,10866,110,5,177,1,59,15177,1,177,105,109,59,1,10790,119,111,59,1,10791,59,1,177,4,3,105,112,117,15200,15208,15213,110,116,105,110,116,59,1,10773,102,59,3,55349,56673,110,100,5,163,1,59,15220,1,163,4,10,59,69,97,99,101,105,110,111,115,117,15244,15246,15249,15253,15258,15334,15347,15367,15416,15421,1,8826,59,1,10931,112,59,1,10935,117,101,59,1,8828,4,2,59,99,15264,15266,1,10927,4,6,59,97,99,101,110,115,15280,15282,15290,15299,15303,15329,1,8826,112,112,114,111,120,59,1,10935,117,114,108,121,101,113,59,1,8828,113,59,1,10927,4,3,97,101,115,15311,15319,15324,112,112,114,111,120,59,1,10937,113,113,59,1,10933,105,109,59,1,8936,105,109,59,1,8830,109,101,4,2,59,115,15342,15344,1,8242,59,1,8473,4,3,69,97,115,15355,15358,15362,59,1,10933,112,59,1,10937,105,109,59,1,8936,4,3,100,102,112,15375,15378,15404,59,1,8719,4,3,97,108,115,15386,15392,15398,108,97,114,59,1,9006,105,110,101,59,1,8978,117,114,102,59,1,8979,4,2,59,116,15410,15412,1,8733,111,59,1,8733,105,109,59,1,8830,114,101,108,59,1,8880,4,2,99,105,15433,15438,114,59,3,55349,56517,59,1,968,110,99,115,112,59,1,8200,4,6,102,105,111,112,115,117,15462,15467,15472,15478,15485,15491,114,59,3,55349,56622,110,116,59,1,10764,112,102,59,3,55349,56674,114,105,109,101,59,1,8279,99,114,59,3,55349,56518,4,3,97,101,111,15499,15520,15534,116,4,2,101,105,15506,15515,114,110,105,111,110,115,59,1,8461,110,116,59,1,10774,115,116,4,2,59,101,15528,15530,1,63,113,59,1,8799,116,5,34,1,59,15540,1,34,4,21,65,66,72,97,98,99,100,101,102,104,105,108,109,110,111,112,114,115,116,117,120,15586,15609,15615,15620,15796,15855,15893,15931,15977,16001,16039,16183,16204,16222,16228,16285,16312,16318,16363,16408,16416,4,3,97,114,116,15594,15599,15603,114,114,59,1,8667,114,59,1,8658,97,105,108,59,1,10524,97,114,114,59,1,10511,97,114,59,1,10596,4,7,99,100,101,110,113,114,116,15636,15651,15656,15664,15687,15696,15770,4,2,101,117,15642,15646,59,3,8765,817,116,101,59,1,341,105,99,59,1,8730,109,112,116,121,118,59,1,10675,103,4,4,59,100,101,108,15675,15677,15680,15683,1,10217,59,1,10642,59,1,10661,101,59,1,10217,117,111,5,187,1,59,15694,1,187,114,4,11,59,97,98,99,102,104,108,112,115,116,119,15721,15723,15727,15739,15742,15746,15750,15754,15758,15763,15767,1,8594,112,59,1,10613,4,2,59,102,15733,15735,1,8677,115,59,1,10528,59,1,10547,115,59,1,10526,107,59,1,8618,112,59,1,8620,108,59,1,10565,105,109,59,1,10612,108,59,1,8611,59,1,8605,4,2,97,105,15776,15781,105,108,59,1,10522,111,4,2,59,110,15788,15790,1,8758,97,108,115,59,1,8474,4,3,97,98,114,15804,15809,15814,114,114,59,1,10509,114,107,59,1,10099,4,2,97,107,15820,15833,99,4,2,101,107,15827,15830,59,1,125,59,1,93,4,2,101,115,15839,15842,59,1,10636,108,4,2,100,117,15849,15852,59,1,10638,59,1,10640,4,4,97,101,117,121,15865,15871,15886,15890,114,111,110,59,1,345,4,2,100,105,15877,15882,105,108,59,1,343,108,59,1,8969,98,59,1,125,59,1,1088,4,4,99,108,113,115,15903,15907,15914,15927,97,59,1,10551,100,104,97,114,59,1,10601,117,111,4,2,59,114,15922,15924,1,8221,59,1,8221,104,59,1,8627,4,3,97,99,103,15939,15966,15970,108,4,4,59,105,112,115,15950,15952,15957,15963,1,8476,110,101,59,1,8475,97,114,116,59,1,8476,59,1,8477,116,59,1,9645,5,174,1,59,15975,1,174,4,3,105,108,114,15985,15991,15997,115,104,116,59,1,10621,111,111,114,59,1,8971,59,3,55349,56623,4,2,97,111,16007,16028,114,4,2,100,117,16014,16017,59,1,8641,4,2,59,108,16023,16025,1,8640,59,1,10604,4,2,59,118,16034,16036,1,961,59,1,1009,4,3,103,110,115,16047,16167,16171,104,116,4,6,97,104,108,114,115,116,16063,16081,16103,16130,16143,16155,114,114,111,119,4,2,59,116,16073,16075,1,8594,97,105,108,59,1,8611,97,114,112,111,111,110,4,2,100,117,16093,16099,111,119,110,59,1,8641,112,59,1,8640,101,102,116,4,2,97,104,16112,16120,114,114,111,119,115,59,1,8644,97,114,112,111,111,110,115,59,1,8652,105,103,104,116,97,114,114,111,119,115,59,1,8649,113,117,105,103,97,114,114,111,119,59,1,8605,104,114,101,101,116,105,109,101,115,59,1,8908,103,59,1,730,105,110,103,100,111,116,115,101,113,59,1,8787,4,3,97,104,109,16191,16196,16201,114,114,59,1,8644,97,114,59,1,8652,59,1,8207,111,117,115,116,4,2,59,97,16214,16216,1,9137,99,104,101,59,1,9137,109,105,100,59,1,10990,4,4,97,98,112,116,16238,16252,16257,16278,4,2,110,114,16244,16248,103,59,1,10221,114,59,1,8702,114,107,59,1,10215,4,3,97,102,108,16265,16269,16273,114,59,1,10630,59,3,55349,56675,117,115,59,1,10798,105,109,101,115,59,1,10805,4,2,97,112,16291,16304,114,4,2,59,103,16298,16300,1,41,116,59,1,10644,111,108,105,110,116,59,1,10770,97,114,114,59,1,8649,4,4,97,99,104,113,16328,16334,16339,16342,113,117,111,59,1,8250,114,59,3,55349,56519,59,1,8625,4,2,98,117,16348,16351,59,1,93,111,4,2,59,114,16358,16360,1,8217,59,1,8217,4,3,104,105,114,16371,16377,16383,114,101,101,59,1,8908,109,101,115,59,1,8906,105,4,4,59,101,102,108,16394,16396,16399,16402,1,9657,59,1,8885,59,1,9656,116,114,105,59,1,10702,108,117,104,97,114,59,1,10600,59,1,8478,4,19,97,98,99,100,101,102,104,105,108,109,111,112,113,114,115,116,117,119,122,16459,16466,16472,16572,16590,16672,16687,16746,16844,16850,16924,16963,16988,17115,17121,17154,17206,17614,17656,99,117,116,101,59,1,347,113,117,111,59,1,8218,4,10,59,69,97,99,101,105,110,112,115,121,16494,16496,16499,16513,16518,16531,16536,16556,16564,16569,1,8827,59,1,10932,4,2,112,114,16505,16508,59,1,10936,111,110,59,1,353,117,101,59,1,8829,4,2,59,100,16524,16526,1,10928,105,108,59,1,351,114,99,59,1,349,4,3,69,97,115,16544,16547,16551,59,1,10934,112,59,1,10938,105,109,59,1,8937,111,108,105,110,116,59,1,10771,105,109,59,1,8831,59,1,1089,111,116,4,3,59,98,101,16582,16584,16587,1,8901,59,1,8865,59,1,10854,4,7,65,97,99,109,115,116,120,16606,16611,16634,16642,16646,16652,16668,114,114,59,1,8664,114,4,2,104,114,16618,16622,107,59,1,10533,4,2,59,111,16628,16630,1,8600,119,59,1,8600,116,5,167,1,59,16640,1,167,105,59,1,59,119,97,114,59,1,10537,109,4,2,105,110,16659,16665,110,117,115,59,1,8726,59,1,8726,116,59,1,10038,114,4,2,59,111,16679,16682,3,55349,56624,119,110,59,1,8994,4,4,97,99,111,121,16697,16702,16716,16739,114,112,59,1,9839,4,2,104,121,16708,16713,99,121,59,1,1097,59,1,1096,114,116,4,2,109,112,16724,16729,105,100,59,1,8739,97,114,97,108,108,101,108,59,1,8741,5,173,1,59,16744,1,173,4,2,103,109,16752,16770,109,97,4,3,59,102,118,16762,16764,16767,1,963,59,1,962,59,1,962,4,8,59,100,101,103,108,110,112,114,16788,16790,16795,16806,16817,16828,16832,16838,1,8764,111,116,59,1,10858,4,2,59,113,16801,16803,1,8771,59,1,8771,4,2,59,69,16812,16814,1,10910,59,1,10912,4,2,59,69,16823,16825,1,10909,59,1,10911,101,59,1,8774,108,117,115,59,1,10788,97,114,114,59,1,10610,97,114,114,59,1,8592,4,4,97,101,105,116,16860,16883,16891,16904,4,2,108,115,16866,16878,108,115,101,116,109,105,110,117,115,59,1,8726,104,112,59,1,10803,112,97,114,115,108,59,1,10724,4,2,100,108,16897,16900,59,1,8739,101,59,1,8995,4,2,59,101,16910,16912,1,10922,4,2,59,115,16918,16920,1,10924,59,3,10924,65024,4,3,102,108,112,16932,16938,16958,116,99,121,59,1,1100,4,2,59,98,16944,16946,1,47,4,2,59,97,16952,16954,1,10692,114,59,1,9023,102,59,3,55349,56676,97,4,2,100,114,16970,16985,101,115,4,2,59,117,16978,16980,1,9824,105,116,59,1,9824,59,1,8741,4,3,99,115,117,16996,17028,17089,4,2,97,117,17002,17015,112,4,2,59,115,17009,17011,1,8851,59,3,8851,65024,112,4,2,59,115,17022,17024,1,8852,59,3,8852,65024,117,4,2,98,112,17035,17062,4,3,59,101,115,17043,17045,17048,1,8847,59,1,8849,101,116,4,2,59,101,17056,17058,1,8847,113,59,1,8849,4,3,59,101,115,17070,17072,17075,1,8848,59,1,8850,101,116,4,2,59,101,17083,17085,1,8848,113,59,1,8850,4,3,59,97,102,17097,17099,17112,1,9633,114,4,2,101,102,17106,17109,59,1,9633,59,1,9642,59,1,9642,97,114,114,59,1,8594,4,4,99,101,109,116,17131,17136,17142,17148,114,59,3,55349,56520,116,109,110,59,1,8726,105,108,101,59,1,8995,97,114,102,59,1,8902,4,2,97,114,17160,17172,114,4,2,59,102,17167,17169,1,9734,59,1,9733,4,2,97,110,17178,17202,105,103,104,116,4,2,101,112,17188,17197,112,115,105,108,111,110,59,1,1013,104,105,59,1,981,115,59,1,175,4,5,98,99,109,110,112,17218,17351,17420,17423,17427,4,9,59,69,100,101,109,110,112,114,115,17238,17240,17243,17248,17261,17267,17279,17285,17291,1,8834,59,1,10949,111,116,59,1,10941,4,2,59,100,17254,17256,1,8838,111,116,59,1,10947,117,108,116,59,1,10945,4,2,69,101,17273,17276,59,1,10955,59,1,8842,108,117,115,59,1,10943,97,114,114,59,1,10617,4,3,101,105,117,17299,17335,17339,116,4,3,59,101,110,17308,17310,17322,1,8834,113,4,2,59,113,17317,17319,1,8838,59,1,10949,101,113,4,2,59,113,17330,17332,1,8842,59,1,10955,109,59,1,10951,4,2,98,112,17345,17348,59,1,10965,59,1,10963,99,4,6,59,97,99,101,110,115,17366,17368,17376,17385,17389,17415,1,8827,112,112,114,111,120,59,1,10936,117,114,108,121,101,113,59,1,8829,113,59,1,10928,4,3,97,101,115,17397,17405,17410,112,112,114,111,120,59,1,10938,113,113,59,1,10934,105,109,59,1,8937,105,109,59,1,8831,59,1,8721,103,59,1,9834,4,13,49,50,51,59,69,100,101,104,108,109,110,112,115,17455,17462,17469,17476,17478,17481,17496,17509,17524,17530,17536,17548,17554,5,185,1,59,17460,1,185,5,178,1,59,17467,1,178,5,179,1,59,17474,1,179,1,8835,59,1,10950,4,2,111,115,17487,17491,116,59,1,10942,117,98,59,1,10968,4,2,59,100,17502,17504,1,8839,111,116,59,1,10948,115,4,2,111,117,17516,17520,108,59,1,10185,98,59,1,10967,97,114,114,59,1,10619,117,108,116,59,1,10946,4,2,69,101,17542,17545,59,1,10956,59,1,8843,108,117,115,59,1,10944,4,3,101,105,117,17562,17598,17602,116,4,3,59,101,110,17571,17573,17585,1,8835,113,4,2,59,113,17580,17582,1,8839,59,1,10950,101,113,4,2,59,113,17593,17595,1,8843,59,1,10956,109,59,1,10952,4,2,98,112,17608,17611,59,1,10964,59,1,10966,4,3,65,97,110,17622,17627,17650,114,114,59,1,8665,114,4,2,104,114,17634,17638,107,59,1,10534,4,2,59,111,17644,17646,1,8601,119,59,1,8601,119,97,114,59,1,10538,108,105,103,5,223,1,59,17664,1,223,4,13,97,98,99,100,101,102,104,105,111,112,114,115,119,17694,17709,17714,17737,17742,17749,17754,17860,17905,17957,17964,18090,18122,4,2,114,117,17700,17706,103,101,116,59,1,8982,59,1,964,114,107,59,1,9140,4,3,97,101,121,17722,17728,17734,114,111,110,59,1,357,100,105,108,59,1,355,59,1,1090,111,116,59,1,8411,108,114,101,99,59,1,8981,114,59,3,55349,56625,4,4,101,105,107,111,17764,17805,17836,17851,4,2,114,116,17770,17786,101,4,2,52,102,17777,17780,59,1,8756,111,114,101,59,1,8756,97,4,3,59,115,118,17795,17797,17802,1,952,121,109,59,1,977,59,1,977,4,2,99,110,17811,17831,107,4,2,97,115,17818,17826,112,112,114,111,120,59,1,8776,105,109,59,1,8764,115,112,59,1,8201,4,2,97,115,17842,17846,112,59,1,8776,105,109,59,1,8764,114,110,5,254,1,59,17858,1,254,4,3,108,109,110,17868,17873,17901,100,101,59,1,732,101,115,5,215,3,59,98,100,17884,17886,17898,1,215,4,2,59,97,17892,17894,1,8864,114,59,1,10801,59,1,10800,116,59,1,8749,4,3,101,112,115,17913,17917,17953,97,59,1,10536,4,4,59,98,99,102,17927,17929,17934,17939,1,8868,111,116,59,1,9014,105,114,59,1,10993,4,2,59,111,17945,17948,3,55349,56677,114,107,59,1,10970,97,59,1,10537,114,105,109,101,59,1,8244,4,3,97,105,112,17972,17977,18082,100,101,59,1,8482,4,7,97,100,101,109,112,115,116,17993,18051,18056,18059,18066,18072,18076,110,103,108,101,4,5,59,100,108,113,114,18009,18011,18017,18032,18035,1,9653,111,119,110,59,1,9663,101,102,116,4,2,59,101,18026,18028,1,9667,113,59,1,8884,59,1,8796,105,103,104,116,4,2,59,101,18045,18047,1,9657,113,59,1,8885,111,116,59,1,9708,59,1,8796,105,110,117,115,59,1,10810,108,117,115,59,1,10809,98,59,1,10701,105,109,101,59,1,10811,101,122,105,117,109,59,1,9186,4,3,99,104,116,18098,18111,18116,4,2,114,121,18104,18108,59,3,55349,56521,59,1,1094,99,121,59,1,1115,114,111,107,59,1,359,4,2,105,111,18128,18133,120,116,59,1,8812,104,101,97,100,4,2,108,114,18143,18154,101,102,116,97,114,114,111,119,59,1,8606,105,103,104,116,97,114,114,111,119,59,1,8608,4,18,65,72,97,98,99,100,102,103,104,108,109,111,112,114,115,116,117,119,18204,18209,18214,18234,18250,18268,18292,18308,18319,18343,18379,18397,18413,18504,18547,18553,18584,18603,114,114,59,1,8657,97,114,59,1,10595,4,2,99,114,18220,18230,117,116,101,5,250,1,59,18228,1,250,114,59,1,8593,114,4,2,99,101,18241,18245,121,59,1,1118,118,101,59,1,365,4,2,105,121,18256,18265,114,99,5,251,1,59,18263,1,251,59,1,1091,4,3,97,98,104,18276,18281,18287,114,114,59,1,8645,108,97,99,59,1,369,97,114,59,1,10606,4,2,105,114,18298,18304,115,104,116,59,1,10622,59,3,55349,56626,114,97,118,101,5,249,1,59,18317,1,249,4,2,97,98,18325,18338,114,4,2,108,114,18332,18335,59,1,8639,59,1,8638,108,107,59,1,9600,4,2,99,116,18349,18374,4,2,111,114,18355,18369,114,110,4,2,59,101,18363,18365,1,8988,114,59,1,8988,111,112,59,1,8975,114,105,59,1,9720,4,2,97,108,18385,18390,99,114,59,1,363,5,168,1,59,18395,1,168,4,2,103,112,18403,18408,111,110,59,1,371,102,59,3,55349,56678,4,6,97,100,104,108,115,117,18427,18434,18445,18470,18475,18494,114,114,111,119,59,1,8593,111,119,110,97,114,114,111,119,59,1,8597,97,114,112,111,111,110,4,2,108,114,18457,18463,101,102,116,59,1,8639,105,103,104,116,59,1,8638,117,115,59,1,8846,105,4,3,59,104,108,18484,18486,18489,1,965,59,1,978,111,110,59,1,965,112,97,114,114,111,119,115,59,1,8648,4,3,99,105,116,18512,18537,18542,4,2,111,114,18518,18532,114,110,4,2,59,101,18526,18528,1,8989,114,59,1,8989,111,112,59,1,8974,110,103,59,1,367,114,105,59,1,9721,99,114,59,3,55349,56522,4,3,100,105,114,18561,18566,18572,111,116,59,1,8944,108,100,101,59,1,361,105,4,2,59,102,18579,18581,1,9653,59,1,9652,4,2,97,109,18590,18595,114,114,59,1,8648,108,5,252,1,59,18601,1,252,97,110,103,108,101,59,1,10663,4,15,65,66,68,97,99,100,101,102,108,110,111,112,114,115,122,18643,18648,18661,18667,18847,18851,18857,18904,18909,18915,18931,18937,18943,18949,18996,114,114,59,1,8661,97,114,4,2,59,118,18656,18658,1,10984,59,1,10985,97,115,104,59,1,8872,4,2,110,114,18673,18679,103,114,116,59,1,10652,4,7,101,107,110,112,114,115,116,18695,18704,18711,18720,18742,18754,18810,112,115,105,108,111,110,59,1,1013,97,112,112,97,59,1,1008,111,116,104,105,110,103,59,1,8709,4,3,104,105,114,18728,18732,18735,105,59,1,981,59,1,982,111,112,116,111,59,1,8733,4,2,59,104,18748,18750,1,8597,111,59,1,1009,4,2,105,117,18760,18766,103,109,97,59,1,962,4,2,98,112,18772,18791,115,101,116,110,101,113,4,2,59,113,18784,18787,3,8842,65024,59,3,10955,65024,115,101,116,110,101,113,4,2,59,113,18803,18806,3,8843,65024,59,3,10956,65024,4,2,104,114,18816,18822,101,116,97,59,1,977,105,97,110,103,108,101,4,2,108,114,18834,18840,101,102,116,59,1,8882,105,103,104,116,59,1,8883,121,59,1,1074,97,115,104,59,1,8866,4,3,101,108,114,18865,18884,18890,4,3,59,98,101,18873,18875,18880,1,8744,97,114,59,1,8891,113,59,1,8794,108,105,112,59,1,8942,4,2,98,116,18896,18901,97,114,59,1,124,59,1,124,114,59,3,55349,56627,116,114,105,59,1,8882,115,117,4,2,98,112,18923,18927,59,3,8834,8402,59,3,8835,8402,112,102,59,3,55349,56679,114,111,112,59,1,8733,116,114,105,59,1,8883,4,2,99,117,18955,18960,114,59,3,55349,56523,4,2,98,112,18966,18981,110,4,2,69,101,18973,18977,59,3,10955,65024,59,3,8842,65024,110,4,2,69,101,18988,18992,59,3,10956,65024,59,3,8843,65024,105,103,122,97,103,59,1,10650,4,7,99,101,102,111,112,114,115,19020,19026,19061,19066,19072,19075,19089,105,114,99,59,1,373,4,2,100,105,19032,19055,4,2,98,103,19038,19043,97,114,59,1,10847,101,4,2,59,113,19050,19052,1,8743,59,1,8793,101,114,112,59,1,8472,114,59,3,55349,56628,112,102,59,3,55349,56680,59,1,8472,4,2,59,101,19081,19083,1,8768,97,116,104,59,1,8768,99,114,59,3,55349,56524,4,14,99,100,102,104,105,108,109,110,111,114,115,117,118,119,19125,19146,19152,19157,19173,19176,19192,19197,19202,19236,19252,19269,19286,19291,4,3,97,105,117,19133,19137,19142,112,59,1,8898,114,99,59,1,9711,112,59,1,8899,116,114,105,59,1,9661,114,59,3,55349,56629,4,2,65,97,19163,19168,114,114,59,1,10234,114,114,59,1,10231,59,1,958,4,2,65,97,19182,19187,114,114,59,1,10232,114,114,59,1,10229,97,112,59,1,10236,105,115,59,1,8955,4,3,100,112,116,19210,19215,19230,111,116,59,1,10752,4,2,102,108,19221,19225,59,3,55349,56681,117,115,59,1,10753,105,109,101,59,1,10754,4,2,65,97,19242,19247,114,114,59,1,10233,114,114,59,1,10230,4,2,99,113,19258,19263,114,59,3,55349,56525,99,117,112,59,1,10758,4,2,112,116,19275,19281,108,117,115,59,1,10756,114,105,59,1,9651,101,101,59,1,8897,101,100,103,101,59,1,8896,4,8,97,99,101,102,105,111,115,117,19316,19335,19349,19357,19362,19367,19373,19379,99,4,2,117,121,19323,19332,116,101,5,253,1,59,19330,1,253,59,1,1103,4,2,105,121,19341,19346,114,99,59,1,375,59,1,1099,110,5,165,1,59,19355,1,165,114,59,3,55349,56630,99,121,59,1,1111,112,102,59,3,55349,56682,99,114,59,3,55349,56526,4,2,99,109,19385,19389,121,59,1,1102,108,5,255,1,59,19395,1,255,4,10,97,99,100,101,102,104,105,111,115,119,19419,19426,19441,19446,19462,19467,19472,19480,19486,19492,99,117,116,101,59,1,378,4,2,97,121,19432,19438,114,111,110,59,1,382,59,1,1079,111,116,59,1,380,4,2,101,116,19452,19458,116,114,102,59,1,8488,97,59,1,950,114,59,3,55349,56631,99,121,59,1,1078,103,114,97,114,114,59,1,8669,112,102,59,3,55349,56683,99,114,59,3,55349,56527,4,2,106,110,19498,19501,59,1,8205,106,59,1,8204]);const Oe=s,Se=r,Ce={128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376},de="DATA_STATE";function Re(e){return e===Oe.SPACE||e===Oe.LINE_FEED||e===Oe.TABULATION||e===Oe.FORM_FEED}function Ie(e){return e>=Oe.DIGIT_0&&e<=Oe.DIGIT_9}function fe(e){return e>=Oe.LATIN_CAPITAL_A&&e<=Oe.LATIN_CAPITAL_Z}function Me(e){return e>=Oe.LATIN_SMALL_A&&e<=Oe.LATIN_SMALL_Z}function Le(e){return Me(e)||fe(e)}function De(e){return Le(e)||Ie(e)}function ge(e){return e>=Oe.LATIN_CAPITAL_A&&e<=Oe.LATIN_CAPITAL_F}function Pe(e){return e>=Oe.LATIN_SMALL_A&&e<=Oe.LATIN_SMALL_F}function ke(e){return e+32}function He(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function Ue(e){return String.fromCharCode(ke(e))}function Fe(e,t){const n=ue[++e];let s=++e,r=s+n-1;for(;s<=r;){const e=s+r>>>1,i=ue[e];if(i<t)s=e+1;else{if(!(i>t))return ue[e+n];r=e-1;}}return -1}class Be{constructor(){this.preprocessor=new pe,this.tokenQueue=[],this.allowCDATA=!1,this.state=de,this.returnState="",this.charRefCode=-1,this.tempBuff=[],this.lastStartTagName="",this.consumedAfterSnapshot=-1,this.active=!1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr=null;}_err(){}_errOnNextCodePoint(e){this._consume(),this._err(e),this._unconsume();}getNextToken(){for(;!this.tokenQueue.length&&this.active;){this.consumedAfterSnapshot=0;const e=this._consume();this._ensureHibernation()||this[this.state](e);}return this.tokenQueue.shift()}write(e,t){this.active=!0,this.preprocessor.write(e,t);}insertHtmlAtCurrentPos(e){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(e);}_ensureHibernation(){if(this.preprocessor.endOfChunkHit){for(;this.consumedAfterSnapshot>0;this.consumedAfterSnapshot--)this.preprocessor.retreat();return this.active=!1,this.tokenQueue.push({type:Be.HIBERNATION_TOKEN}),!0}return !1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_unconsume(){this.consumedAfterSnapshot--,this.preprocessor.retreat();}_reconsumeInState(e){this.state=e,this._unconsume();}_consumeSequenceIfMatch(e,t,n){let s=0,r=!0;const i=e.length;let T=0,o=t,E=void 0;for(;T<i;T++){if(T>0&&(o=this._consume(),s++),o===Oe.EOF){r=!1;break}if(E=e[T],o!==E&&(n||o!==ke(E))){r=!1;break}}if(!r)for(;s--;)this._unconsume();return r}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==Se.SCRIPT_STRING.length)return !1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==Se.SCRIPT_STRING[e])return !1;return !0}_createStartTagToken(){this.currentToken={type:Be.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]};}_createEndTagToken(){this.currentToken={type:Be.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]};}_createCommentToken(){this.currentToken={type:Be.COMMENT_TOKEN,data:""};}_createDoctypeToken(e){this.currentToken={type:Be.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null};}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t};}_createEOFToken(){this.currentToken={type:Be.EOF_TOKEN};}_createAttr(e){this.currentAttr={name:e,value:""};}_leaveAttrName(e){null===Be.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err(re),this.state=e;}_leaveAttrValue(e){this.state=e;}_emitCurrentToken(){this._emitCurrentCharacterToken();const e=this.currentToken;this.currentToken=null,e.type===Be.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===Be.END_TAG_TOKEN&&(e.attrs.length>0&&this._err(l),e.selfClosing&&this._err(m)),this.tokenQueue.push(e);}_emitCurrentCharacterToken(){this.currentCharacterToken&&(this.tokenQueue.push(this.currentCharacterToken),this.currentCharacterToken=null);}_emitEOFToken(){this._createEOFToken(),this._emitCurrentToken();}_appendCharToCurrentCharacterToken(e,t){this.currentCharacterToken&&this.currentCharacterToken.type!==e&&this._emitCurrentCharacterToken(),this.currentCharacterToken?this.currentCharacterToken.chars+=t:this._createCharacterToken(e,t);}_emitCodePoint(e){let t=Be.CHARACTER_TOKEN;Re(e)?t=Be.WHITESPACE_CHARACTER_TOKEN:e===Oe.NULL&&(t=Be.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,He(e));}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t]);}_emitChars(e){this._appendCharToCurrentCharacterToken(Be.CHARACTER_TOKEN,e);}_matchNamedCharacterReference(e){let t=null,n=1,s=Fe(0,e);for(this.tempBuff.push(e);s>-1;){const e=ue[s],r=e<7;r&&1&e&&(t=2&e?[ue[++s],ue[++s]]:[ue[++s]],n=0);const i=this._consume();if(this.tempBuff.push(i),n++,i===Oe.EOF)break;s=r?4&e?Fe(s,i):-1:i===e?++s:-1;}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return "ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE"===this.returnState||"ATTRIBUTE_VALUE_UNQUOTED_STATE"===this.returnState}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===Oe.EQUALS_SIGN||De(e)}return !1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=He(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[];}[de](e){this.preprocessor.dropParsedChunk(),e===Oe.LESS_THAN_SIGN?this.state="TAG_OPEN_STATE":e===Oe.AMPERSAND?(this.returnState=de,this.state="CHARACTER_REFERENCE_STATE"):e===Oe.NULL?(this._err(p),this._emitCodePoint(e)):e===Oe.EOF?this._emitEOFToken():this._emitCodePoint(e);}RCDATA_STATE(e){this.preprocessor.dropParsedChunk(),e===Oe.AMPERSAND?(this.returnState="RCDATA_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===Oe.LESS_THAN_SIGN?this.state="RCDATA_LESS_THAN_SIGN_STATE":e===Oe.NULL?(this._err(p),this._emitChars(n)):e===Oe.EOF?this._emitEOFToken():this._emitCodePoint(e);}RAWTEXT_STATE(e){this.preprocessor.dropParsedChunk(),e===Oe.LESS_THAN_SIGN?this.state="RAWTEXT_LESS_THAN_SIGN_STATE":e===Oe.NULL?(this._err(p),this._emitChars(n)):e===Oe.EOF?this._emitEOFToken():this._emitCodePoint(e);}SCRIPT_DATA_STATE(e){this.preprocessor.dropParsedChunk(),e===Oe.LESS_THAN_SIGN?this.state="SCRIPT_DATA_LESS_THAN_SIGN_STATE":e===Oe.NULL?(this._err(p),this._emitChars(n)):e===Oe.EOF?this._emitEOFToken():this._emitCodePoint(e);}PLAINTEXT_STATE(e){this.preprocessor.dropParsedChunk(),e===Oe.NULL?(this._err(p),this._emitChars(n)):e===Oe.EOF?this._emitEOFToken():this._emitCodePoint(e);}TAG_OPEN_STATE(e){e===Oe.EXCLAMATION_MARK?this.state="MARKUP_DECLARATION_OPEN_STATE":e===Oe.SOLIDUS?this.state="END_TAG_OPEN_STATE":Le(e)?(this._createStartTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===Oe.QUESTION_MARK?(this._err(u),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE")):e===Oe.EOF?(this._err(L),this._emitChars("<"),this._emitEOFToken()):(this._err(O),this._emitChars("<"),this._reconsumeInState(de));}END_TAG_OPEN_STATE(e){Le(e)?(this._createEndTagToken(),this._reconsumeInState("TAG_NAME_STATE")):e===Oe.GREATER_THAN_SIGN?(this._err(C),this.state=de):e===Oe.EOF?(this._err(L),this._emitChars("</"),this._emitEOFToken()):(this._err(O),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"));}TAG_NAME_STATE(e){Re(e)?this.state="BEFORE_ATTRIBUTE_NAME_STATE":e===Oe.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):fe(e)?this.currentToken.tagName+=Ue(e):e===Oe.NULL?(this._err(p),this.currentToken.tagName+=n):e===Oe.EOF?(this._err(D),this._emitEOFToken()):this.currentToken.tagName+=He(e);}RCDATA_LESS_THAN_SIGN_STATE(e){e===Oe.SOLIDUS?(this.tempBuff=[],this.state="RCDATA_END_TAG_OPEN_STATE"):(this._emitChars("<"),this._reconsumeInState("RCDATA_STATE"));}RCDATA_END_TAG_OPEN_STATE(e){Le(e)?(this._createEndTagToken(),this._reconsumeInState("RCDATA_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("RCDATA_STATE"));}RCDATA_END_TAG_NAME_STATE(e){if(fe(e))this.currentToken.tagName+=Ue(e),this.tempBuff.push(e);else if(Me(e))this.currentToken.tagName+=He(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Re(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===Oe.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===Oe.GREATER_THAN_SIGN)return this.state=de,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RCDATA_STATE");}}RAWTEXT_LESS_THAN_SIGN_STATE(e){e===Oe.SOLIDUS?(this.tempBuff=[],this.state="RAWTEXT_END_TAG_OPEN_STATE"):(this._emitChars("<"),this._reconsumeInState("RAWTEXT_STATE"));}RAWTEXT_END_TAG_OPEN_STATE(e){Le(e)?(this._createEndTagToken(),this._reconsumeInState("RAWTEXT_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("RAWTEXT_STATE"));}RAWTEXT_END_TAG_NAME_STATE(e){if(fe(e))this.currentToken.tagName+=Ue(e),this.tempBuff.push(e);else if(Me(e))this.currentToken.tagName+=He(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Re(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===Oe.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===Oe.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=de)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("RAWTEXT_STATE");}}SCRIPT_DATA_LESS_THAN_SIGN_STATE(e){e===Oe.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_END_TAG_OPEN_STATE"):e===Oe.EXCLAMATION_MARK?(this.state="SCRIPT_DATA_ESCAPE_START_STATE",this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_STATE"));}SCRIPT_DATA_END_TAG_OPEN_STATE(e){Le(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("SCRIPT_DATA_STATE"));}SCRIPT_DATA_END_TAG_NAME_STATE(e){if(fe(e))this.currentToken.tagName+=Ue(e),this.tempBuff.push(e);else if(Me(e))this.currentToken.tagName+=He(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Re(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===Oe.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===Oe.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=de)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_STATE");}}SCRIPT_DATA_ESCAPE_START_STATE(e){e===Oe.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPE_START_DASH_STATE",this._emitChars("-")):this._reconsumeInState("SCRIPT_DATA_STATE");}SCRIPT_DATA_ESCAPE_START_DASH_STATE(e){e===Oe.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):this._reconsumeInState("SCRIPT_DATA_STATE");}SCRIPT_DATA_ESCAPED_STATE(e){e===Oe.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_STATE",this._emitChars("-")):e===Oe.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===Oe.NULL?(this._err(p),this._emitChars(n)):e===Oe.EOF?(this._err(y),this._emitEOFToken()):this._emitCodePoint(e);}SCRIPT_DATA_ESCAPED_DASH_STATE(e){e===Oe.HYPHEN_MINUS?(this.state="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===Oe.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===Oe.NULL?(this._err(p),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(n)):e===Oe.EOF?(this._err(y),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e));}SCRIPT_DATA_ESCAPED_DASH_DASH_STATE(e){e===Oe.HYPHEN_MINUS?this._emitChars("-"):e===Oe.LESS_THAN_SIGN?this.state="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE":e===Oe.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===Oe.NULL?(this._err(p),this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitChars(n)):e===Oe.EOF?(this._err(y),this._emitEOFToken()):(this.state="SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e));}SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE(e){e===Oe.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE"):Le(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE")):(this._emitChars("<"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"));}SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE(e){Le(e)?(this._createEndTagToken(),this._reconsumeInState("SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE")):(this._emitChars("</"),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE"));}SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE(e){if(fe(e))this.currentToken.tagName+=Ue(e),this.tempBuff.push(e);else if(Me(e))this.currentToken.tagName+=He(e),this.tempBuff.push(e);else{if(this.lastStartTagName===this.currentToken.tagName){if(Re(e))return void(this.state="BEFORE_ATTRIBUTE_NAME_STATE");if(e===Oe.SOLIDUS)return void(this.state="SELF_CLOSING_START_TAG_STATE");if(e===Oe.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=de)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE");}}SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE(e){Re(e)||e===Oe.SOLIDUS||e===Oe.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_DOUBLE_ESCAPED_STATE":"SCRIPT_DATA_ESCAPED_STATE",this._emitCodePoint(e)):fe(e)?(this.tempBuff.push(ke(e)),this._emitCodePoint(e)):Me(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_ESCAPED_STATE");}SCRIPT_DATA_DOUBLE_ESCAPED_STATE(e){e===Oe.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",this._emitChars("-")):e===Oe.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===Oe.NULL?(this._err(p),this._emitChars(n)):e===Oe.EOF?(this._err(y),this._emitEOFToken()):this._emitCodePoint(e);}SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE(e){e===Oe.HYPHEN_MINUS?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",this._emitChars("-")):e===Oe.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===Oe.NULL?(this._err(p),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(n)):e===Oe.EOF?(this._err(y),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e));}SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE(e){e===Oe.HYPHEN_MINUS?this._emitChars("-"):e===Oe.LESS_THAN_SIGN?(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",this._emitChars("<")):e===Oe.GREATER_THAN_SIGN?(this.state="SCRIPT_DATA_STATE",this._emitChars(">")):e===Oe.NULL?(this._err(p),this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitChars(n)):e===Oe.EOF?(this._err(y),this._emitEOFToken()):(this.state="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e));}SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE(e){e===Oe.SOLIDUS?(this.tempBuff=[],this.state="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",this._emitChars("/")):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE");}SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE(e){Re(e)||e===Oe.SOLIDUS||e===Oe.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?"SCRIPT_DATA_ESCAPED_STATE":"SCRIPT_DATA_DOUBLE_ESCAPED_STATE",this._emitCodePoint(e)):fe(e)?(this.tempBuff.push(ke(e)),this._emitCodePoint(e)):Me(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState("SCRIPT_DATA_DOUBLE_ESCAPED_STATE");}BEFORE_ATTRIBUTE_NAME_STATE(e){Re(e)||(e===Oe.SOLIDUS||e===Oe.GREATER_THAN_SIGN||e===Oe.EOF?this._reconsumeInState("AFTER_ATTRIBUTE_NAME_STATE"):e===Oe.EQUALS_SIGN?(this._err(S),this._createAttr("="),this.state="ATTRIBUTE_NAME_STATE"):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")));}ATTRIBUTE_NAME_STATE(e){Re(e)||e===Oe.SOLIDUS||e===Oe.GREATER_THAN_SIGN||e===Oe.EOF?(this._leaveAttrName("AFTER_ATTRIBUTE_NAME_STATE"),this._unconsume()):e===Oe.EQUALS_SIGN?this._leaveAttrName("BEFORE_ATTRIBUTE_VALUE_STATE"):fe(e)?this.currentAttr.name+=Ue(e):e===Oe.QUOTATION_MARK||e===Oe.APOSTROPHE||e===Oe.LESS_THAN_SIGN?(this._err(d),this.currentAttr.name+=He(e)):e===Oe.NULL?(this._err(p),this.currentAttr.name+=n):this.currentAttr.name+=He(e);}AFTER_ATTRIBUTE_NAME_STATE(e){Re(e)||(e===Oe.SOLIDUS?this.state="SELF_CLOSING_START_TAG_STATE":e===Oe.EQUALS_SIGN?this.state="BEFORE_ATTRIBUTE_VALUE_STATE":e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(D),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState("ATTRIBUTE_NAME_STATE")));}BEFORE_ATTRIBUTE_VALUE_STATE(e){Re(e)||(e===Oe.QUOTATION_MARK?this.state="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE":e===Oe.APOSTROPHE?this.state="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE":e===Oe.GREATER_THAN_SIGN?(this._err(g),this.state=de,this._emitCurrentToken()):this._reconsumeInState("ATTRIBUTE_VALUE_UNQUOTED_STATE"));}ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE(e){e===Oe.QUOTATION_MARK?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===Oe.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===Oe.NULL?(this._err(p),this.currentAttr.value+=n):e===Oe.EOF?(this._err(D),this._emitEOFToken()):this.currentAttr.value+=He(e);}ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE(e){e===Oe.APOSTROPHE?this.state="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE":e===Oe.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===Oe.NULL?(this._err(p),this.currentAttr.value+=n):e===Oe.EOF?(this._err(D),this._emitEOFToken()):this.currentAttr.value+=He(e);}ATTRIBUTE_VALUE_UNQUOTED_STATE(e){Re(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===Oe.AMPERSAND?(this.returnState="ATTRIBUTE_VALUE_UNQUOTED_STATE",this.state="CHARACTER_REFERENCE_STATE"):e===Oe.GREATER_THAN_SIGN?(this._leaveAttrValue(de),this._emitCurrentToken()):e===Oe.NULL?(this._err(p),this.currentAttr.value+=n):e===Oe.QUOTATION_MARK||e===Oe.APOSTROPHE||e===Oe.LESS_THAN_SIGN||e===Oe.EQUALS_SIGN||e===Oe.GRAVE_ACCENT?(this._err(M),this.currentAttr.value+=He(e)):e===Oe.EOF?(this._err(D),this._emitEOFToken()):this.currentAttr.value+=He(e);}AFTER_ATTRIBUTE_VALUE_QUOTED_STATE(e){Re(e)?this._leaveAttrValue("BEFORE_ATTRIBUTE_NAME_STATE"):e===Oe.SOLIDUS?this._leaveAttrValue("SELF_CLOSING_START_TAG_STATE"):e===Oe.GREATER_THAN_SIGN?(this._leaveAttrValue(de),this._emitCurrentToken()):e===Oe.EOF?(this._err(D),this._emitEOFToken()):(this._err(P),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"));}SELF_CLOSING_START_TAG_STATE(e){e===Oe.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(D),this._emitEOFToken()):(this._err(N),this._reconsumeInState("BEFORE_ATTRIBUTE_NAME_STATE"));}BOGUS_COMMENT_STATE(e){e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===Oe.NULL?(this._err(p),this.currentToken.data+=n):this.currentToken.data+=He(e);}MARKUP_DECLARATION_OPEN_STATE(e){this._consumeSequenceIfMatch(Se.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state="COMMENT_START_STATE"):this._consumeSequenceIfMatch(Se.DOCTYPE_STRING,e,!1)?this.state="DOCTYPE_STATE":this._consumeSequenceIfMatch(Se.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state="CDATA_SECTION_STATE":(this._err(x),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state="BOGUS_COMMENT_STATE"):this._ensureHibernation()||(this._err(v),this._createCommentToken(),this._reconsumeInState("BOGUS_COMMENT_STATE"));}COMMENT_START_STATE(e){e===Oe.HYPHEN_MINUS?this.state="COMMENT_START_DASH_STATE":e===Oe.GREATER_THAN_SIGN?(this._err(X),this.state=de,this._emitCurrentToken()):this._reconsumeInState("COMMENT_STATE");}COMMENT_START_DASH_STATE(e){e===Oe.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===Oe.GREATER_THAN_SIGN?(this._err(X),this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(W),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"));}COMMENT_STATE(e){e===Oe.HYPHEN_MINUS?this.state="COMMENT_END_DASH_STATE":e===Oe.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state="COMMENT_LESS_THAN_SIGN_STATE"):e===Oe.NULL?(this._err(p),this.currentToken.data+=n):e===Oe.EOF?(this._err(W),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=He(e);}COMMENT_LESS_THAN_SIGN_STATE(e){e===Oe.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state="COMMENT_LESS_THAN_SIGN_BANG_STATE"):e===Oe.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState("COMMENT_STATE");}COMMENT_LESS_THAN_SIGN_BANG_STATE(e){e===Oe.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE":this._reconsumeInState("COMMENT_STATE");}COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE(e){e===Oe.HYPHEN_MINUS?this.state="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE":this._reconsumeInState("COMMENT_END_DASH_STATE");}COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE(e){e!==Oe.GREATER_THAN_SIGN&&e!==Oe.EOF&&this._err(Q),this._reconsumeInState("COMMENT_END_STATE");}COMMENT_END_DASH_STATE(e){e===Oe.HYPHEN_MINUS?this.state="COMMENT_END_STATE":e===Oe.EOF?(this._err(W),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState("COMMENT_STATE"));}COMMENT_END_STATE(e){e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):e===Oe.EXCLAMATION_MARK?this.state="COMMENT_END_BANG_STATE":e===Oe.HYPHEN_MINUS?this.currentToken.data+="-":e===Oe.EOF?(this._err(W),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState("COMMENT_STATE"));}COMMENT_END_BANG_STATE(e){e===Oe.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state="COMMENT_END_DASH_STATE"):e===Oe.GREATER_THAN_SIGN?(this._err(V),this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(W),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState("COMMENT_STATE"));}DOCTYPE_STATE(e){Re(e)?this.state="BEFORE_DOCTYPE_NAME_STATE":e===Oe.GREATER_THAN_SIGN?this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"):e===Oe.EOF?(this._err(w),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(te),this._reconsumeInState("BEFORE_DOCTYPE_NAME_STATE"));}BEFORE_DOCTYPE_NAME_STATE(e){Re(e)||(fe(e)?(this._createDoctypeToken(Ue(e)),this.state="DOCTYPE_NAME_STATE"):e===Oe.NULL?(this._err(p),this._createDoctypeToken(n),this.state="DOCTYPE_NAME_STATE"):e===Oe.GREATER_THAN_SIGN?(this._err(ne),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=de):e===Oe.EOF?(this._err(w),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(He(e)),this.state="DOCTYPE_NAME_STATE"));}DOCTYPE_NAME_STATE(e){Re(e)?this.state="AFTER_DOCTYPE_NAME_STATE":e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):fe(e)?this.currentToken.name+=Ue(e):e===Oe.NULL?(this._err(p),this.currentToken.name+=n):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=He(e);}AFTER_DOCTYPE_NAME_STATE(e){Re(e)||(e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(Se.PUBLIC_STRING,e,!1)?this.state="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE":this._consumeSequenceIfMatch(Se.SYSTEM_STRING,e,!1)?this.state="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE":this._ensureHibernation()||(this._err(se),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")));}AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE(e){Re(e)?this.state="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===Oe.QUOTATION_MARK?(this._err(k),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===Oe.APOSTROPHE?(this._err(k),this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===Oe.GREATER_THAN_SIGN?(this._err(G),this.currentToken.forceQuirks=!0,this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(F),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"));}BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){Re(e)||(e===Oe.QUOTATION_MARK?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===Oe.APOSTROPHE?(this.currentToken.publicId="",this.state="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE"):e===Oe.GREATER_THAN_SIGN?(this._err(G),this.currentToken.forceQuirks=!0,this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(F),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")));}DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===Oe.QUOTATION_MARK?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===Oe.NULL?(this._err(p),this.currentToken.publicId+=n):e===Oe.GREATER_THAN_SIGN?(this._err(b),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=de):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=He(e);}DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===Oe.APOSTROPHE?this.state="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE":e===Oe.NULL?(this._err(p),this.currentToken.publicId+=n):e===Oe.GREATER_THAN_SIGN?(this._err(b),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=de):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=He(e);}AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE(e){Re(e)?this.state="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE":e===Oe.GREATER_THAN_SIGN?(this.state=de,this._emitCurrentToken()):e===Oe.QUOTATION_MARK?(this._err(H),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===Oe.APOSTROPHE?(this._err(H),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(B),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"));}BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE(e){Re(e)||(e===Oe.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=de):e===Oe.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===Oe.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(B),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")));}AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE(e){Re(e)?this.state="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===Oe.QUOTATION_MARK?(this._err(U),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===Oe.APOSTROPHE?(this._err(U),this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===Oe.GREATER_THAN_SIGN?(this._err(K),this.currentToken.forceQuirks=!0,this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(B),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE"));}BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){Re(e)||(e===Oe.QUOTATION_MARK?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE"):e===Oe.APOSTROPHE?(this.currentToken.systemId="",this.state="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE"):e===Oe.GREATER_THAN_SIGN?(this._err(K),this.currentToken.forceQuirks=!0,this.state=de,this._emitCurrentToken()):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(B),this.currentToken.forceQuirks=!0,this._reconsumeInState("BOGUS_DOCTYPE_STATE")));}DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE(e){e===Oe.QUOTATION_MARK?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===Oe.NULL?(this._err(p),this.currentToken.systemId+=n):e===Oe.GREATER_THAN_SIGN?(this._err(Y),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=de):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=He(e);}DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE(e){e===Oe.APOSTROPHE?this.state="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE":e===Oe.NULL?(this._err(p),this.currentToken.systemId+=n):e===Oe.GREATER_THAN_SIGN?(this._err(Y),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=de):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=He(e);}AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE(e){Re(e)||(e===Oe.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=de):e===Oe.EOF?(this._err(w),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(f),this._reconsumeInState("BOGUS_DOCTYPE_STATE")));}BOGUS_DOCTYPE_STATE(e){e===Oe.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=de):e===Oe.NULL?this._err(p):e===Oe.EOF&&(this._emitCurrentToken(),this._emitEOFToken());}CDATA_SECTION_STATE(e){e===Oe.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_BRACKET_STATE":e===Oe.EOF?(this._err(j),this._emitEOFToken()):this._emitCodePoint(e);}CDATA_SECTION_BRACKET_STATE(e){e===Oe.RIGHT_SQUARE_BRACKET?this.state="CDATA_SECTION_END_STATE":(this._emitChars("]"),this._reconsumeInState("CDATA_SECTION_STATE"));}CDATA_SECTION_END_STATE(e){e===Oe.GREATER_THAN_SIGN?this.state=de:e===Oe.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState("CDATA_SECTION_STATE"));}CHARACTER_REFERENCE_STATE(e){this.tempBuff=[Oe.AMPERSAND],e===Oe.NUMBER_SIGN?(this.tempBuff.push(e),this.state="NUMERIC_CHARACTER_REFERENCE_STATE"):De(e)?this._reconsumeInState("NAMED_CHARACTER_REFERENCE_STATE"):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState));}NAMED_CHARACTER_REFERENCE_STATE(e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[Oe.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===Oe.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(I),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState;}else this._flushCodePointsConsumedAsCharacterReference(),this.state="AMBIGUOS_AMPERSAND_STATE";}AMBIGUOS_AMPERSAND_STATE(e){De(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=He(e):this._emitCodePoint(e):(e===Oe.SEMICOLON&&this._err(R),this._reconsumeInState(this.returnState));}NUMERIC_CHARACTER_REFERENCE_STATE(e){this.charRefCode=0,e===Oe.LATIN_SMALL_X||e===Oe.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE"):this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_START_STATE");}HEXADEMICAL_CHARACTER_REFERENCE_START_STATE(e){!function(e){return Ie(e)||ge(e)||Pe(e)}(e)?(this._err(z),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState("HEXADEMICAL_CHARACTER_REFERENCE_STATE");}DECIMAL_CHARACTER_REFERENCE_START_STATE(e){Ie(e)?this._reconsumeInState("DECIMAL_CHARACTER_REFERENCE_STATE"):(this._err(z),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState));}HEXADEMICAL_CHARACTER_REFERENCE_STATE(e){ge(e)?this.charRefCode=16*this.charRefCode+e-55:Pe(e)?this.charRefCode=16*this.charRefCode+e-87:Ie(e)?this.charRefCode=16*this.charRefCode+e-48:e===Oe.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(I),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"));}DECIMAL_CHARACTER_REFERENCE_STATE(e){Ie(e)?this.charRefCode=10*this.charRefCode+e-48:e===Oe.SEMICOLON?this.state="NUMERIC_CHARACTER_REFERENCE_END_STATE":(this._err(I),this._reconsumeInState("NUMERIC_CHARACTER_REFERENCE_END_STATE"));}NUMERIC_CHARACTER_REFERENCE_END_STATE(){if(this.charRefCode===Oe.NULL)this._err(q),this.charRefCode=Oe.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err(Z),this.charRefCode=Oe.REPLACEMENT_CHARACTER;else if(i(this.charRefCode))this._err(J),this.charRefCode=Oe.REPLACEMENT_CHARACTER;else if(a(this.charRefCode))this._err(ee);else if(E(this.charRefCode)||this.charRefCode===Oe.CARRIAGE_RETURN){this._err($);const e=Ce[this.charRefCode];e&&(this.charRefCode=e);}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState);}}Be.CHARACTER_TOKEN="CHARACTER_TOKEN",Be.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",Be.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",Be.START_TAG_TOKEN="START_TAG_TOKEN",Be.END_TAG_TOKEN="END_TAG_TOKEN",Be.COMMENT_TOKEN="COMMENT_TOKEN",Be.DOCTYPE_TOKEN="DOCTYPE_TOKEN",Be.EOF_TOKEN="EOF_TOKEN",Be.HIBERNATION_TOKEN="HIBERNATION_TOKEN",Be.MODE={DATA:de,RCDATA:"RCDATA_STATE",RAWTEXT:"RAWTEXT_STATE",SCRIPT_DATA:"SCRIPT_DATA_STATE",PLAINTEXT:"PLAINTEXT_STATE"},Be.getTokenAttr=function(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null};var Ge=Be;function Ke(e,t){return e(t={exports:{}},t.exports),t.exports}var be=Ke((function(e,t){const n=t.NAMESPACES={HTML:"http://www.w3.org/1999/xhtml",MATHML:"http://www.w3.org/1998/Math/MathML",SVG:"http://www.w3.org/2000/svg",XLINK:"http://www.w3.org/1999/xlink",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"};t.ATTRS={TYPE:"type",ACTION:"action",ENCODING:"encoding",PROMPT:"prompt",NAME:"name",COLOR:"color",FACE:"face",SIZE:"size"},t.DOCUMENT_MODE={NO_QUIRKS:"no-quirks",QUIRKS:"quirks",LIMITED_QUIRKS:"limited-quirks"};const s=t.TAG_NAMES={A:"a",ADDRESS:"address",ANNOTATION_XML:"annotation-xml",APPLET:"applet",AREA:"area",ARTICLE:"article",ASIDE:"aside",B:"b",BASE:"base",BASEFONT:"basefont",BGSOUND:"bgsound",BIG:"big",BLOCKQUOTE:"blockquote",BODY:"body",BR:"br",BUTTON:"button",CAPTION:"caption",CENTER:"center",CODE:"code",COL:"col",COLGROUP:"colgroup",DD:"dd",DESC:"desc",DETAILS:"details",DIALOG:"dialog",DIR:"dir",DIV:"div",DL:"dl",DT:"dt",EM:"em",EMBED:"embed",FIELDSET:"fieldset",FIGCAPTION:"figcaption",FIGURE:"figure",FONT:"font",FOOTER:"footer",FOREIGN_OBJECT:"foreignObject",FORM:"form",FRAME:"frame",FRAMESET:"frameset",H1:"h1",H2:"h2",H3:"h3",H4:"h4",H5:"h5",H6:"h6",HEAD:"head",HEADER:"header",HGROUP:"hgroup",HR:"hr",HTML:"html",I:"i",IMG:"img",IMAGE:"image",INPUT:"input",IFRAME:"iframe",KEYGEN:"keygen",LABEL:"label",LI:"li",LINK:"link",LISTING:"listing",MAIN:"main",MALIGNMARK:"malignmark",MARQUEE:"marquee",MATH:"math",MENU:"menu",META:"meta",MGLYPH:"mglyph",MI:"mi",MO:"mo",MN:"mn",MS:"ms",MTEXT:"mtext",NAV:"nav",NOBR:"nobr",NOFRAMES:"noframes",NOEMBED:"noembed",NOSCRIPT:"noscript",OBJECT:"object",OL:"ol",OPTGROUP:"optgroup",OPTION:"option",P:"p",PARAM:"param",PLAINTEXT:"plaintext",PRE:"pre",RB:"rb",RP:"rp",RT:"rt",RTC:"rtc",RUBY:"ruby",S:"s",SCRIPT:"script",SECTION:"section",SELECT:"select",SOURCE:"source",SMALL:"small",SPAN:"span",STRIKE:"strike",STRONG:"strong",STYLE:"style",SUB:"sub",SUMMARY:"summary",SUP:"sup",TABLE:"table",TBODY:"tbody",TEMPLATE:"template",TEXTAREA:"textarea",TFOOT:"tfoot",TD:"td",TH:"th",THEAD:"thead",TITLE:"title",TR:"tr",TRACK:"track",TT:"tt",U:"u",UL:"ul",SVG:"svg",VAR:"var",WBR:"wbr",XMP:"xmp"};t.SPECIAL_ELEMENTS={[n.HTML]:{[s.ADDRESS]:!0,[s.APPLET]:!0,[s.AREA]:!0,[s.ARTICLE]:!0,[s.ASIDE]:!0,[s.BASE]:!0,[s.BASEFONT]:!0,[s.BGSOUND]:!0,[s.BLOCKQUOTE]:!0,[s.BODY]:!0,[s.BR]:!0,[s.BUTTON]:!0,[s.CAPTION]:!0,[s.CENTER]:!0,[s.COL]:!0,[s.COLGROUP]:!0,[s.DD]:!0,[s.DETAILS]:!0,[s.DIR]:!0,[s.DIV]:!0,[s.DL]:!0,[s.DT]:!0,[s.EMBED]:!0,[s.FIELDSET]:!0,[s.FIGCAPTION]:!0,[s.FIGURE]:!0,[s.FOOTER]:!0,[s.FORM]:!0,[s.FRAME]:!0,[s.FRAMESET]:!0,[s.H1]:!0,[s.H2]:!0,[s.H3]:!0,[s.H4]:!0,[s.H5]:!0,[s.H6]:!0,[s.HEAD]:!0,[s.HEADER]:!0,[s.HGROUP]:!0,[s.HR]:!0,[s.HTML]:!0,[s.IFRAME]:!0,[s.IMG]:!0,[s.INPUT]:!0,[s.LI]:!0,[s.LINK]:!0,[s.LISTING]:!0,[s.MAIN]:!0,[s.MARQUEE]:!0,[s.MENU]:!0,[s.META]:!0,[s.NAV]:!0,[s.NOEMBED]:!0,[s.NOFRAMES]:!0,[s.NOSCRIPT]:!0,[s.OBJECT]:!0,[s.OL]:!0,[s.P]:!0,[s.PARAM]:!0,[s.PLAINTEXT]:!0,[s.PRE]:!0,[s.SCRIPT]:!0,[s.SECTION]:!0,[s.SELECT]:!0,[s.SOURCE]:!0,[s.STYLE]:!0,[s.SUMMARY]:!0,[s.TABLE]:!0,[s.TBODY]:!0,[s.TD]:!0,[s.TEMPLATE]:!0,[s.TEXTAREA]:!0,[s.TFOOT]:!0,[s.TH]:!0,[s.THEAD]:!0,[s.TITLE]:!0,[s.TR]:!0,[s.TRACK]:!0,[s.UL]:!0,[s.WBR]:!0,[s.XMP]:!0},[n.MATHML]:{[s.MI]:!0,[s.MO]:!0,[s.MN]:!0,[s.MS]:!0,[s.MTEXT]:!0,[s.ANNOTATION_XML]:!0},[n.SVG]:{[s.TITLE]:!0,[s.FOREIGN_OBJECT]:!0,[s.DESC]:!0}};}));be.NAMESPACES,be.ATTRS,be.DOCUMENT_MODE,be.TAG_NAMES,be.SPECIAL_ELEMENTS;const Ye=be.TAG_NAMES,xe=be.NAMESPACES;function ve(e){switch(e.length){case 1:return e===Ye.P;case 2:return e===Ye.RB||e===Ye.RP||e===Ye.RT||e===Ye.DD||e===Ye.DT||e===Ye.LI;case 3:return e===Ye.RTC;case 6:return e===Ye.OPTION;case 8:return e===Ye.OPTGROUP}return !1}function ye(e){switch(e.length){case 1:return e===Ye.P;case 2:return e===Ye.RB||e===Ye.RP||e===Ye.RT||e===Ye.DD||e===Ye.DT||e===Ye.LI||e===Ye.TD||e===Ye.TH||e===Ye.TR;case 3:return e===Ye.RTC;case 5:return e===Ye.TBODY||e===Ye.TFOOT||e===Ye.THEAD;case 6:return e===Ye.OPTION;case 7:return e===Ye.CAPTION;case 8:return e===Ye.OPTGROUP||e===Ye.COLGROUP}return !1}function we(e,t){switch(e.length){case 2:if(e===Ye.TD||e===Ye.TH)return t===xe.HTML;if(e===Ye.MI||e===Ye.MO||e===Ye.MN||e===Ye.MS)return t===xe.MATHML;break;case 4:if(e===Ye.HTML)return t===xe.HTML;if(e===Ye.DESC)return t===xe.SVG;break;case 5:if(e===Ye.TABLE)return t===xe.HTML;if(e===Ye.MTEXT)return t===xe.MATHML;if(e===Ye.TITLE)return t===xe.SVG;break;case 6:return (e===Ye.APPLET||e===Ye.OBJECT)&&t===xe.HTML;case 7:return (e===Ye.CAPTION||e===Ye.MARQUEE)&&t===xe.HTML;case 8:return e===Ye.TEMPLATE&&t===xe.HTML;case 13:return e===Ye.FOREIGN_OBJECT&&t===xe.SVG;case 14:return e===Ye.ANNOTATION_XML&&t===xe.MATHML}return !1}var Qe=class{constructor(e,t){this.stackTop=-1,this.items=[],this.current=e,this.currentTagName=null,this.currentTmplContent=null,this.tmplCount=0,this.treeAdapter=t;}_indexOf(e){let t=-1;for(let n=this.stackTop;n>=0;n--)if(this.items[n]===e){t=n;break}return t}_isInTemplate(){return this.currentTagName===Ye.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===xe.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagName=this.current&&this.treeAdapter.getTagName(this.current),this.currentTmplContent=this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):null;}push(e){this.items[++this.stackTop]=e,this._updateCurrentElement(),this._isInTemplate()&&this.tmplCount++;}pop(){this.stackTop--,this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this._updateCurrentElement();}replace(e,t){const n=this._indexOf(e);this.items[n]=t,n===this.stackTop&&this._updateCurrentElement();}insertAfter(e,t){const n=this._indexOf(e)+1;this.items.splice(n,0,t),n===++this.stackTop&&this._updateCurrentElement();}popUntilTagNamePopped(e){for(;this.stackTop>-1;){const t=this.currentTagName,n=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),t===e&&n===xe.HTML)break}}popUntilElementPopped(e){for(;this.stackTop>-1;){const t=this.current;if(this.pop(),t===e)break}}popUntilNumberedHeaderPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Ye.H1||e===Ye.H2||e===Ye.H3||e===Ye.H4||e===Ye.H5||e===Ye.H6&&t===xe.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Ye.TD||e===Ye.TH&&t===xe.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement();}clearBackToTableContext(){for(;this.currentTagName!==Ye.TABLE&&this.currentTagName!==Ye.TEMPLATE&&this.currentTagName!==Ye.HTML||this.treeAdapter.getNamespaceURI(this.current)!==xe.HTML;)this.pop();}clearBackToTableBodyContext(){for(;this.currentTagName!==Ye.TBODY&&this.currentTagName!==Ye.TFOOT&&this.currentTagName!==Ye.THEAD&&this.currentTagName!==Ye.TEMPLATE&&this.currentTagName!==Ye.HTML||this.treeAdapter.getNamespaceURI(this.current)!==xe.HTML;)this.pop();}clearBackToTableRowContext(){for(;this.currentTagName!==Ye.TR&&this.currentTagName!==Ye.TEMPLATE&&this.currentTagName!==Ye.HTML||this.treeAdapter.getNamespaceURI(this.current)!==xe.HTML;)this.pop();}remove(e){for(let t=this.stackTop;t>=0;t--)if(this.items[t]===e){this.items.splice(t,1),this.stackTop--,this._updateCurrentElement();break}}tryPeekProperlyNestedBodyElement(){const e=this.items[1];return e&&this.treeAdapter.getTagName(e)===Ye.BODY?e:null}contains(e){return this._indexOf(e)>-1}getCommonAncestor(e){let t=this._indexOf(e);return --t>=0?this.items[t]:null}isRootHtmlElementCurrent(){return 0===this.stackTop&&this.currentTagName===Ye.HTML}hasInScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),s=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&s===xe.HTML)return !0;if(we(n,s))return !1}return !0}hasNumberedHeaderInScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]),n=this.treeAdapter.getNamespaceURI(this.items[e]);if((t===Ye.H1||t===Ye.H2||t===Ye.H3||t===Ye.H4||t===Ye.H5||t===Ye.H6)&&n===xe.HTML)return !0;if(we(t,n))return !1}return !0}hasInListItemScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),s=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&s===xe.HTML)return !0;if((n===Ye.UL||n===Ye.OL)&&s===xe.HTML||we(n,s))return !1}return !0}hasInButtonScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]),s=this.treeAdapter.getNamespaceURI(this.items[t]);if(n===e&&s===xe.HTML)return !0;if(n===Ye.BUTTON&&s===xe.HTML||we(n,s))return !1}return !0}hasInTableScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===xe.HTML){if(n===e)return !0;if(n===Ye.TABLE||n===Ye.TEMPLATE||n===Ye.HTML)return !1}}return !0}hasTableBodyContextInTableScope(){for(let e=this.stackTop;e>=0;e--){const t=this.treeAdapter.getTagName(this.items[e]);if(this.treeAdapter.getNamespaceURI(this.items[e])===xe.HTML){if(t===Ye.TBODY||t===Ye.THEAD||t===Ye.TFOOT)return !0;if(t===Ye.TABLE||t===Ye.HTML)return !1}}return !0}hasInSelectScope(e){for(let t=this.stackTop;t>=0;t--){const n=this.treeAdapter.getTagName(this.items[t]);if(this.treeAdapter.getNamespaceURI(this.items[t])===xe.HTML){if(n===e)return !0;if(n!==Ye.OPTION&&n!==Ye.OPTGROUP)return !1}}return !0}generateImpliedEndTags(){for(;ve(this.currentTagName);)this.pop();}generateImpliedEndTagsThoroughly(){for(;ye(this.currentTagName);)this.pop();}generateImpliedEndTagsWithExclusion(e){for(;ve(this.currentTagName)&&this.currentTagName!==e;)this.pop();}};class Xe{constructor(e){this.length=0,this.entries=[],this.treeAdapter=e,this.bookmark=null;}_getNoahArkConditionCandidates(e){const t=[];if(this.length>=3){const n=this.treeAdapter.getAttrList(e).length,s=this.treeAdapter.getTagName(e),r=this.treeAdapter.getNamespaceURI(e);for(let e=this.length-1;e>=0;e--){const i=this.entries[e];if(i.type===Xe.MARKER_ENTRY)break;const T=i.element,o=this.treeAdapter.getAttrList(T);this.treeAdapter.getTagName(T)===s&&this.treeAdapter.getNamespaceURI(T)===r&&o.length===n&&t.push({idx:e,attrs:o});}}return t.length<3?[]:t}_ensureNoahArkCondition(e){const t=this._getNoahArkConditionCandidates(e);let n=t.length;if(n){const s=this.treeAdapter.getAttrList(e),r=s.length,i=Object.create(null);for(let e=0;e<r;e++){const t=s[e];i[t.name]=t.value;}for(let e=0;e<r;e++)for(let s=0;s<n;s++){const r=t[s].attrs[e];if(i[r.name]!==r.value&&(t.splice(s,1),n--),t.length<3)return}for(let e=n-1;e>=2;e--)this.entries.splice(t[e].idx,1),this.length--;}}insertMarker(){this.entries.push({type:Xe.MARKER_ENTRY}),this.length++;}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:Xe.ELEMENT_ENTRY,element:e,token:t}),this.length++;}insertElementAfterBookmark(e,t){let n=this.length-1;for(;n>=0&&this.entries[n]!==this.bookmark;n--);this.entries.splice(n+1,0,{type:Xe.ELEMENT_ENTRY,element:e,token:t}),this.length++;}removeEntry(e){for(let t=this.length-1;t>=0;t--)if(this.entries[t]===e){this.entries.splice(t,1),this.length--;break}}clearToLastMarker(){for(;this.length;){const e=this.entries.pop();if(this.length--,e.type===Xe.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===Xe.MARKER_ENTRY)return null;if(this.treeAdapter.getTagName(n.element)===e)return n}return null}getElementEntry(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===Xe.ELEMENT_ENTRY&&n.element===e)return n}return null}}Xe.MARKER_ENTRY="MARKER_ENTRY",Xe.ELEMENT_ENTRY="ELEMENT_ENTRY";var We=Xe;class Ve{constructor(e){const t={},n=this._getOverriddenMethods(this,t);for(const s of Object.keys(n))"function"==typeof n[s]&&(t[s]=e[s],e[s]=n[s]);}_getOverriddenMethods(){throw new Error("Not implemented")}}Ve.install=function(e,t,n){e.__mixins||(e.__mixins=[]);for(let n=0;n<e.__mixins.length;n++)if(e.__mixins[n].constructor===t)return e.__mixins[n];const s=new t(e,n);return e.__mixins.push(s),s};var je=Ve;var ze=class extends je{constructor(e){super(e),this.preprocessor=e,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.offset=0,this.col=0,this.line=1;}_getOverriddenMethods(e,t){return {advance(){const n=this.pos+1,s=this.html[n];return e.isEol&&(e.isEol=!1,e.line++,e.lineStartPos=n),("\n"===s||"\r"===s&&"\n"!==this.html[n+1])&&(e.isEol=!0),e.col=n-e.lineStartPos+1,e.offset=e.droppedBufferSize+n,t.advance.call(this)},retreat(){t.retreat.call(this),e.isEol=!1,e.col=this.pos-e.lineStartPos+1;},dropParsedChunk(){const n=this.pos;t.dropParsedChunk.call(this);const s=n-this.pos;e.lineStartPos-=s,e.droppedBufferSize+=s,e.offset=e.droppedBufferSize+this.pos;}}}};var qe=class extends je{constructor(e){super(e),this.tokenizer=e,this.posTracker=je.install(e.preprocessor,ze),this.currentAttrLocation=null,this.ctLoc=null;}_getCurrentLocation(){return {startLine:this.posTracker.line,startCol:this.posTracker.col,startOffset:this.posTracker.offset,endLine:-1,endCol:-1,endOffset:-1}}_attachCurrentAttrLocationInfo(){this.currentAttrLocation.endLine=this.posTracker.line,this.currentAttrLocation.endCol=this.posTracker.col,this.currentAttrLocation.endOffset=this.posTracker.offset;const e=this.tokenizer.currentToken,t=this.tokenizer.currentAttr;e.location.attrs||(e.location.attrs=Object.create(null)),e.location.attrs[t.name]=this.currentAttrLocation;}_getOverriddenMethods(e,t){const n={_createStartTagToken(){t._createStartTagToken.call(this),this.currentToken.location=e.ctLoc;},_createEndTagToken(){t._createEndTagToken.call(this),this.currentToken.location=e.ctLoc;},_createCommentToken(){t._createCommentToken.call(this),this.currentToken.location=e.ctLoc;},_createDoctypeToken(n){t._createDoctypeToken.call(this,n),this.currentToken.location=e.ctLoc;},_createCharacterToken(n,s){t._createCharacterToken.call(this,n,s),this.currentCharacterToken.location=e.ctLoc;},_createEOFToken(){t._createEOFToken.call(this),this.currentToken.location=e._getCurrentLocation();},_createAttr(n){t._createAttr.call(this,n),e.currentAttrLocation=e._getCurrentLocation();},_leaveAttrName(n){t._leaveAttrName.call(this,n),e._attachCurrentAttrLocationInfo();},_leaveAttrValue(n){t._leaveAttrValue.call(this,n),e._attachCurrentAttrLocationInfo();},_emitCurrentToken(){const n=this.currentToken.location;this.currentCharacterToken&&(this.currentCharacterToken.location.endLine=n.startLine,this.currentCharacterToken.location.endCol=n.startCol,this.currentCharacterToken.location.endOffset=n.startOffset),this.currentToken.type===Ge.EOF_TOKEN?(n.endLine=n.startLine,n.endCol=n.startCol,n.endOffset=n.startOffset):(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col+1,n.endOffset=e.posTracker.offset+1),t._emitCurrentToken.call(this);},_emitCurrentCharacterToken(){const n=this.currentCharacterToken&&this.currentCharacterToken.location;n&&-1===n.endOffset&&(n.endLine=e.posTracker.line,n.endCol=e.posTracker.col,n.endOffset=e.posTracker.offset),t._emitCurrentCharacterToken.call(this);}};return Object.keys(Ge.MODE).forEach(s=>{const r=Ge.MODE[s];n[r]=function(n){e.ctLoc=e._getCurrentLocation(),t[r].call(this,n);};}),n}};var Je=class extends je{constructor(e,t){super(e),this.onItemPop=t.onItemPop;}_getOverriddenMethods(e,t){return {pop(){e.onItemPop(this.current),t.pop.call(this);},popAllUpToHtmlElement(){for(let t=this.stackTop;t>0;t--)e.onItemPop(this.items[t]);t.popAllUpToHtmlElement.call(this);},remove(n){e.onItemPop(this.current),t.remove.call(this,n);}}}};const Ze=be.TAG_NAMES;var $e=class extends je{constructor(e){super(e),this.parser=e,this.treeAdapter=this.parser.treeAdapter,this.posTracker=null,this.lastStartTagToken=null,this.lastFosterParentingLocation=null,this.currentToken=null;}_setStartLocation(e){let t=null;this.lastStartTagToken&&(t=Object.assign({},this.lastStartTagToken.location),t.startTag=this.lastStartTagToken.location),this.treeAdapter.setNodeSourceCodeLocation(e,t);}_setEndLocation(e,t){const n=this.treeAdapter.getNodeSourceCodeLocation(e);if(n&&t.location){const s=t.location,r=this.treeAdapter.getTagName(e);t.type===Ge.END_TAG_TOKEN&&r===t.tagName?(n.endTag=Object.assign({},s),n.endLine=s.endLine,n.endCol=s.endCol,n.endOffset=s.endOffset):(n.endLine=s.startLine,n.endCol=s.startCol,n.endOffset=s.startOffset);}}_getOverriddenMethods(e,t){return {_bootstrap(n,s){t._bootstrap.call(this,n,s),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const r=je.install(this.tokenizer,qe);e.posTracker=r.posTracker,je.install(this.openElements,Je,{onItemPop:function(t){e._setEndLocation(t,e.currentToken);}});},_runParsingLoop(n){t._runParsingLoop.call(this,n);for(let t=this.openElements.stackTop;t>=0;t--)e._setEndLocation(this.openElements.items[t],e.currentToken);},_processTokenInForeignContent(n){e.currentToken=n,t._processTokenInForeignContent.call(this,n);},_processToken(n){if(e.currentToken=n,t._processToken.call(this,n),n.type===Ge.END_TAG_TOKEN&&(n.tagName===Ze.HTML||n.tagName===Ze.BODY&&this.openElements.hasInScope(Ze.BODY)))for(let t=this.openElements.stackTop;t>=0;t--){const s=this.openElements.items[t];if(this.treeAdapter.getTagName(s)===n.tagName){e._setEndLocation(s,n);break}}},_setDocumentType(e){t._setDocumentType.call(this,e);const n=this.treeAdapter.getChildNodes(this.document),s=n.length;for(let t=0;t<s;t++){const s=n[t];if(this.treeAdapter.isDocumentTypeNode(s)){this.treeAdapter.setNodeSourceCodeLocation(s,e.location);break}}},_attachElementToTree(n){e._setStartLocation(n),e.lastStartTagToken=null,t._attachElementToTree.call(this,n);},_appendElement(n,s){e.lastStartTagToken=n,t._appendElement.call(this,n,s);},_insertElement(n,s){e.lastStartTagToken=n,t._insertElement.call(this,n,s);},_insertTemplate(n){e.lastStartTagToken=n,t._insertTemplate.call(this,n);const s=this.treeAdapter.getTemplateContent(this.openElements.current);this.treeAdapter.setNodeSourceCodeLocation(s,null);},_insertFakeRootElement(){t._insertFakeRootElement.call(this),this.treeAdapter.setNodeSourceCodeLocation(this.openElements.current,null);},_appendCommentNode(e,n){t._appendCommentNode.call(this,e,n);const s=this.treeAdapter.getChildNodes(n),r=s[s.length-1];this.treeAdapter.setNodeSourceCodeLocation(r,e.location);},_findFosterParentingLocation(){return e.lastFosterParentingLocation=t._findFosterParentingLocation.call(this),e.lastFosterParentingLocation},_insertCharacters(n){t._insertCharacters.call(this,n);const s=this._shouldFosterParentOnInsertion(),r=s&&e.lastFosterParentingLocation.parent||this.openElements.currentTmplContent||this.openElements.current,i=this.treeAdapter.getChildNodes(r),T=s&&e.lastFosterParentingLocation.beforeElement?i.indexOf(e.lastFosterParentingLocation.beforeElement)-1:i.length-1,o=i[T],E=this.treeAdapter.getNodeSourceCodeLocation(o);E?(E.endLine=n.location.endLine,E.endCol=n.location.endCol,E.endOffset=n.location.endOffset):this.treeAdapter.setNodeSourceCodeLocation(o,n.location);}}}};var et=class extends je{constructor(e,t){super(e),this.posTracker=null,this.onParseError=t.onParseError;}_setErrorLocation(e){e.startLine=e.endLine=this.posTracker.line,e.startCol=e.endCol=this.posTracker.col,e.startOffset=e.endOffset=this.posTracker.offset;}_reportError(e){const t={code:e,startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1};this._setErrorLocation(t),this.onParseError(t);}_getOverriddenMethods(e){return {_err(t){e._reportError(t);}}}};var tt=class extends et{constructor(e,t){super(e,t),this.posTracker=je.install(e,ze),this.lastErrOffset=-1;}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e));}};var nt=class extends et{constructor(e,t){super(e,t);const n=je.install(e.preprocessor,tt,t);this.posTracker=n.posTracker;}};var st=class extends et{constructor(e,t){super(e,t),this.opts=t,this.ctLoc=null,this.locBeforeToken=!1;}_setErrorLocation(e){this.ctLoc&&(e.startLine=this.ctLoc.startLine,e.startCol=this.ctLoc.startCol,e.startOffset=this.ctLoc.startOffset,e.endLine=this.locBeforeToken?this.ctLoc.startLine:this.ctLoc.endLine,e.endCol=this.locBeforeToken?this.ctLoc.startCol:this.ctLoc.endCol,e.endOffset=this.locBeforeToken?this.ctLoc.startOffset:this.ctLoc.endOffset);}_getOverriddenMethods(e,t){return {_bootstrap(n,s){t._bootstrap.call(this,n,s),je.install(this.tokenizer,nt,e.opts),je.install(this.tokenizer,qe);},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n);},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t);}}}},rt=Ke((function(e,t){const{DOCUMENT_MODE:n}=be;t.createDocument=function(){return {nodeName:"#document",mode:n.NO_QUIRKS,childNodes:[]}},t.createDocumentFragment=function(){return {nodeName:"#document-fragment",childNodes:[]}},t.createElement=function(e,t,n){return {nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},t.createCommentNode=function(e){return {nodeName:"#comment",data:e,parentNode:null}};const s=function(e){return {nodeName:"#text",value:e,parentNode:null}},r=t.appendChild=function(e,t){e.childNodes.push(t),t.parentNode=e;},i=t.insertBefore=function(e,t,n){const s=e.childNodes.indexOf(n);e.childNodes.splice(s,0,t),t.parentNode=e;};t.setTemplateContent=function(e,t){e.content=t;},t.getTemplateContent=function(e){return e.content},t.setDocumentType=function(e,t,n,s){let i=null;for(let t=0;t<e.childNodes.length;t++)if("#documentType"===e.childNodes[t].nodeName){i=e.childNodes[t];break}i?(i.name=t,i.publicId=n,i.systemId=s):r(e,{nodeName:"#documentType",name:t,publicId:n,systemId:s});},t.setDocumentMode=function(e,t){e.mode=t;},t.getDocumentMode=function(e){return e.mode},t.detachNode=function(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null;}},t.insertText=function(e,t){if(e.childNodes.length){const n=e.childNodes[e.childNodes.length-1];if("#text"===n.nodeName)return void(n.value+=t)}r(e,s(t));},t.insertTextBefore=function(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&"#text"===r.nodeName?r.value+=t:i(e,s(t),n);},t.adoptAttributes=function(e,t){const n=[];for(let t=0;t<e.attrs.length;t++)n.push(e.attrs[t].name);for(let s=0;s<t.length;s++)-1===n.indexOf(t[s].name)&&e.attrs.push(t[s]);},t.getFirstChild=function(e){return e.childNodes[0]},t.getChildNodes=function(e){return e.childNodes},t.getParentNode=function(e){return e.parentNode},t.getAttrList=function(e){return e.attrs},t.getTagName=function(e){return e.tagName},t.getNamespaceURI=function(e){return e.namespaceURI},t.getTextNodeContent=function(e){return e.value},t.getCommentNodeContent=function(e){return e.data},t.getDocumentTypeNodeName=function(e){return e.name},t.getDocumentTypeNodePublicId=function(e){return e.publicId},t.getDocumentTypeNodeSystemId=function(e){return e.systemId},t.isTextNode=function(e){return "#text"===e.nodeName},t.isCommentNode=function(e){return "#comment"===e.nodeName},t.isDocumentTypeNode=function(e){return "#documentType"===e.nodeName},t.isElementNode=function(e){return !!e.tagName},t.setNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=t;},t.getNodeSourceCodeLocation=function(e){return e.sourceCodeLocation};}));rt.createDocument,rt.createDocumentFragment,rt.createElement,rt.createCommentNode,rt.appendChild,rt.insertBefore,rt.setTemplateContent,rt.getTemplateContent,rt.setDocumentType,rt.setDocumentMode,rt.getDocumentMode,rt.detachNode,rt.insertText,rt.insertTextBefore,rt.adoptAttributes,rt.getFirstChild,rt.getChildNodes,rt.getParentNode,rt.getAttrList,rt.getTagName,rt.getNamespaceURI,rt.getTextNodeContent,rt.getCommentNodeContent,rt.getDocumentTypeNodeName,rt.getDocumentTypeNodePublicId,rt.getDocumentTypeNodeSystemId,rt.isTextNode,rt.isCommentNode,rt.isDocumentTypeNode,rt.isElementNode,rt.setNodeSourceCodeLocation,rt.getNodeSourceCodeLocation;const{DOCUMENT_MODE:it}=be,Tt=["+//silmaril//dtd html pro v0r11 19970101//en","-//advasoft ltd//dtd html 3.0 aswedit + extensions//en","-//as//dtd html 3.0 aswedit + extensions//en","-//ietf//dtd html 2.0 level 1//en","-//ietf//dtd html 2.0 level 2//en","-//ietf//dtd html 2.0 strict level 1//en","-//ietf//dtd html 2.0 strict level 2//en","-//ietf//dtd html 2.0 strict//en","-//ietf//dtd html 2.0//en","-//ietf//dtd html 2.1e//en","-//ietf//dtd html 3.0//en","-//ietf//dtd html 3.0//en//","-//ietf//dtd html 3.2 final//en","-//ietf//dtd html 3.2//en","-//ietf//dtd html 3//en","-//ietf//dtd html level 0//en","-//ietf//dtd html level 0//en//2.0","-//ietf//dtd html level 1//en","-//ietf//dtd html level 1//en//2.0","-//ietf//dtd html level 2//en","-//ietf//dtd html level 2//en//2.0","-//ietf//dtd html level 3//en","-//ietf//dtd html level 3//en//3.0","-//ietf//dtd html strict level 0//en","-//ietf//dtd html strict level 0//en//2.0","-//ietf//dtd html strict level 1//en","-//ietf//dtd html strict level 1//en//2.0","-//ietf//dtd html strict level 2//en","-//ietf//dtd html strict level 2//en//2.0","-//ietf//dtd html strict level 3//en","-//ietf//dtd html strict level 3//en//3.0","-//ietf//dtd html strict//en","-//ietf//dtd html strict//en//2.0","-//ietf//dtd html strict//en//3.0","-//ietf//dtd html//en","-//ietf//dtd html//en//2.0","-//ietf//dtd html//en//3.0","-//metrius//dtd metrius presentational//en","-//microsoft//dtd internet explorer 2.0 html strict//en","-//microsoft//dtd internet explorer 2.0 html//en","-//microsoft//dtd internet explorer 2.0 tables//en","-//microsoft//dtd internet explorer 3.0 html strict//en","-//microsoft//dtd internet explorer 3.0 html//en","-//microsoft//dtd internet explorer 3.0 tables//en","-//netscape comm. corp.//dtd html//en","-//netscape comm. corp.//dtd strict html//en","-//o'reilly and associates//dtd html 2.0//en","-//o'reilly and associates//dtd html extended 1.0//en","-//spyglass//dtd html 2.0 extended//en","-//sq//dtd html 2.0 hotmetal + extensions//en","-//sun microsystems corp.//dtd hotjava html//en","-//sun microsystems corp.//dtd hotjava strict html//en","-//w3c//dtd html 3 1995-03-24//en","-//w3c//dtd html 3.2 draft//en","-//w3c//dtd html 3.2 final//en","-//w3c//dtd html 3.2//en","-//w3c//dtd html 3.2s draft//en","-//w3c//dtd html 4.0 frameset//en","-//w3c//dtd html 4.0 transitional//en","-//w3c//dtd html experimental 19960712//en","-//w3c//dtd html experimental 970421//en","-//w3c//dtd w3 html//en","-//w3o//dtd w3 html 3.0//en","-//w3o//dtd w3 html 3.0//en//","-//webtechs//dtd mozilla html 2.0//en","-//webtechs//dtd mozilla html//en"],ot=Tt.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),Et=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],at=["-//W3C//DTD XHTML 1.0 Frameset//","-//W3C//DTD XHTML 1.0 Transitional//"],_t=at.concat(["-//W3C//DTD HTML 4.01 Frameset//","-//W3C//DTD HTML 4.01 Transitional//"]);function ht(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return !0;return !1}var At=function(e){return "html"===e.name&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)},ct=function(e){if("html"!==e.name)return it.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return it.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),Et.indexOf(n)>-1)return it.QUIRKS;let e=null===t?ot:Tt;if(ht(n,e))return it.QUIRKS;if(e=null===t?at:_t,ht(n,e))return it.LIMITED_QUIRKS}return it.NO_QUIRKS},lt=Ke((function(e,t){const n=be.TAG_NAMES,s=be.NAMESPACES,r=be.ATTRS,i="text/html",T="application/xhtml+xml",o={attributename:"attributeName",attributetype:"attributeType",basefrequency:"baseFrequency",baseprofile:"baseProfile",calcmode:"calcMode",clippathunits:"clipPathUnits",diffuseconstant:"diffuseConstant",edgemode:"edgeMode",filterunits:"filterUnits",glyphref:"glyphRef",gradienttransform:"gradientTransform",gradientunits:"gradientUnits",kernelmatrix:"kernelMatrix",kernelunitlength:"kernelUnitLength",keypoints:"keyPoints",keysplines:"keySplines",keytimes:"keyTimes",lengthadjust:"lengthAdjust",limitingconeangle:"limitingConeAngle",markerheight:"markerHeight",markerunits:"markerUnits",markerwidth:"markerWidth",maskcontentunits:"maskContentUnits",maskunits:"maskUnits",numoctaves:"numOctaves",pathlength:"pathLength",patterncontentunits:"patternContentUnits",patterntransform:"patternTransform",patternunits:"patternUnits",pointsatx:"pointsAtX",pointsaty:"pointsAtY",pointsatz:"pointsAtZ",preservealpha:"preserveAlpha",preserveaspectratio:"preserveAspectRatio",primitiveunits:"primitiveUnits",refx:"refX",refy:"refY",repeatcount:"repeatCount",repeatdur:"repeatDur",requiredextensions:"requiredExtensions",requiredfeatures:"requiredFeatures",specularconstant:"specularConstant",specularexponent:"specularExponent",spreadmethod:"spreadMethod",startoffset:"startOffset",stddeviation:"stdDeviation",stitchtiles:"stitchTiles",surfacescale:"surfaceScale",systemlanguage:"systemLanguage",tablevalues:"tableValues",targetx:"targetX",targety:"targetY",textlength:"textLength",viewbox:"viewBox",viewtarget:"viewTarget",xchannelselector:"xChannelSelector",ychannelselector:"yChannelSelector",zoomandpan:"zoomAndPan"},E={"xlink:actuate":{prefix:"xlink",name:"actuate",namespace:s.XLINK},"xlink:arcrole":{prefix:"xlink",name:"arcrole",namespace:s.XLINK},"xlink:href":{prefix:"xlink",name:"href",namespace:s.XLINK},"xlink:role":{prefix:"xlink",name:"role",namespace:s.XLINK},"xlink:show":{prefix:"xlink",name:"show",namespace:s.XLINK},"xlink:title":{prefix:"xlink",name:"title",namespace:s.XLINK},"xlink:type":{prefix:"xlink",name:"type",namespace:s.XLINK},"xml:base":{prefix:"xml",name:"base",namespace:s.XML},"xml:lang":{prefix:"xml",name:"lang",namespace:s.XML},"xml:space":{prefix:"xml",name:"space",namespace:s.XML},xmlns:{prefix:"",name:"xmlns",namespace:s.XMLNS},"xmlns:xlink":{prefix:"xmlns",name:"xlink",namespace:s.XMLNS}},a=t.SVG_TAG_NAMES_ADJUSTMENT_MAP={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient",textpath:"textPath"},_={[n.B]:!0,[n.BIG]:!0,[n.BLOCKQUOTE]:!0,[n.BODY]:!0,[n.BR]:!0,[n.CENTER]:!0,[n.CODE]:!0,[n.DD]:!0,[n.DIV]:!0,[n.DL]:!0,[n.DT]:!0,[n.EM]:!0,[n.EMBED]:!0,[n.H1]:!0,[n.H2]:!0,[n.H3]:!0,[n.H4]:!0,[n.H5]:!0,[n.H6]:!0,[n.HEAD]:!0,[n.HR]:!0,[n.I]:!0,[n.IMG]:!0,[n.LI]:!0,[n.LISTING]:!0,[n.MENU]:!0,[n.META]:!0,[n.NOBR]:!0,[n.OL]:!0,[n.P]:!0,[n.PRE]:!0,[n.RUBY]:!0,[n.S]:!0,[n.SMALL]:!0,[n.SPAN]:!0,[n.STRONG]:!0,[n.STRIKE]:!0,[n.SUB]:!0,[n.SUP]:!0,[n.TABLE]:!0,[n.TT]:!0,[n.U]:!0,[n.UL]:!0,[n.VAR]:!0};t.causesExit=function(e){const t=e.tagName;return !!(t===n.FONT&&(null!==Ge.getTokenAttr(e,r.COLOR)||null!==Ge.getTokenAttr(e,r.SIZE)||null!==Ge.getTokenAttr(e,r.FACE)))||_[t]},t.adjustTokenMathMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++)if("definitionurl"===e.attrs[t].name){e.attrs[t].name="definitionURL";break}},t.adjustTokenSVGAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=o[e.attrs[t].name];n&&(e.attrs[t].name=n);}},t.adjustTokenXMLAttrs=function(e){for(let t=0;t<e.attrs.length;t++){const n=E[e.attrs[t].name];n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace);}},t.adjustTokenSVGTagName=function(e){const t=a[e.tagName];t&&(e.tagName=t);},t.isIntegrationPoint=function(e,t,o,E){return !(E&&E!==s.HTML||!function(e,t,o){if(t===s.MATHML&&e===n.ANNOTATION_XML)for(let e=0;e<o.length;e++)if(o[e].name===r.ENCODING){const t=o[e].value.toLowerCase();return t===i||t===T}return t===s.SVG&&(e===n.FOREIGN_OBJECT||e===n.DESC||e===n.TITLE)}(e,t,o))||!(E&&E!==s.MATHML||!function(e,t){return t===s.MATHML&&(e===n.MI||e===n.MO||e===n.MN||e===n.MS||e===n.MTEXT)}(e,t))};}));lt.SVG_TAG_NAMES_ADJUSTMENT_MAP,lt.causesExit,lt.adjustTokenMathMLAttrs,lt.adjustTokenSVGAttrs,lt.adjustTokenXMLAttrs,lt.adjustTokenSVGTagName,lt.isIntegrationPoint;const mt=be.TAG_NAMES,Nt=be.NAMESPACES,pt=be.ATTRS,ut={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:rt},Ot="IN_TABLE_MODE",St={[mt.TR]:"IN_ROW_MODE",[mt.TBODY]:"IN_TABLE_BODY_MODE",[mt.THEAD]:"IN_TABLE_BODY_MODE",[mt.TFOOT]:"IN_TABLE_BODY_MODE",[mt.CAPTION]:"IN_CAPTION_MODE",[mt.COLGROUP]:"IN_COLUMN_GROUP_MODE",[mt.TABLE]:Ot,[mt.BODY]:"IN_BODY_MODE",[mt.FRAMESET]:"IN_FRAMESET_MODE"},Ct={[mt.CAPTION]:Ot,[mt.COLGROUP]:Ot,[mt.TBODY]:Ot,[mt.TFOOT]:Ot,[mt.THEAD]:Ot,[mt.COL]:"IN_COLUMN_GROUP_MODE",[mt.TR]:"IN_TABLE_BODY_MODE",[mt.TD]:"IN_ROW_MODE",[mt.TH]:"IN_ROW_MODE"},dt={INITIAL_MODE:{[Ge.CHARACTER_TOKEN]:Kt,[Ge.NULL_CHARACTER_TOKEN]:Kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:kt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?be.DOCUMENT_MODE.QUIRKS:ct(t);At(t)||e._err(ie);e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode="BEFORE_HTML_MODE";},[Ge.START_TAG_TOKEN]:Kt,[Ge.END_TAG_TOKEN]:Kt,[Ge.EOF_TOKEN]:Kt},BEFORE_HTML_MODE:{[Ge.CHARACTER_TOKEN]:bt,[Ge.NULL_CHARACTER_TOKEN]:bt,[Ge.WHITESPACE_CHARACTER_TOKEN]:kt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){t.tagName===mt.HTML?(e._insertElement(t,Nt.HTML),e.insertionMode="BEFORE_HEAD_MODE"):bt(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==mt.HTML&&n!==mt.HEAD&&n!==mt.BODY&&n!==mt.BR||bt(e,t);},[Ge.EOF_TOKEN]:bt},BEFORE_HEAD_MODE:{[Ge.CHARACTER_TOKEN]:Yt,[Ge.NULL_CHARACTER_TOKEN]:Yt,[Ge.WHITESPACE_CHARACTER_TOKEN]:kt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:Ht,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.HEAD?(e._insertElement(t,Nt.HTML),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE"):Yt(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HEAD||n===mt.BODY||n===mt.HTML||n===mt.BR?Yt(e,t):e._err(Ee);},[Ge.EOF_TOKEN]:Yt},IN_HEAD_MODE:{[Ge.CHARACTER_TOKEN]:yt,[Ge.NULL_CHARACTER_TOKEN]:yt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:Ht,[Ge.START_TAG_TOKEN]:xt,[Ge.END_TAG_TOKEN]:vt,[Ge.EOF_TOKEN]:yt},IN_HEAD_NO_SCRIPT_MODE:{[Ge.CHARACTER_TOKEN]:wt,[Ge.NULL_CHARACTER_TOKEN]:wt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:Ht,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.BASEFONT||n===mt.BGSOUND||n===mt.HEAD||n===mt.LINK||n===mt.META||n===mt.NOFRAMES||n===mt.STYLE?xt(e,t):n===mt.NOSCRIPT?e._err(le):wt(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.NOSCRIPT?(e.openElements.pop(),e.insertionMode="IN_HEAD_MODE"):n===mt.BR?wt(e,t):e._err(Ee);},[Ge.EOF_TOKEN]:wt},AFTER_HEAD_MODE:{[Ge.CHARACTER_TOKEN]:Qt,[Ge.NULL_CHARACTER_TOKEN]:Qt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:Ht,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.BODY?(e._insertElement(t,Nt.HTML),e.framesetOk=!1,e.insertionMode="IN_BODY_MODE"):n===mt.FRAMESET?(e._insertElement(t,Nt.HTML),e.insertionMode="IN_FRAMESET_MODE"):n===mt.BASE||n===mt.BASEFONT||n===mt.BGSOUND||n===mt.LINK||n===mt.META||n===mt.NOFRAMES||n===mt.SCRIPT||n===mt.STYLE||n===mt.TEMPLATE||n===mt.TITLE?(e._err(Ae),e.openElements.push(e.headElement),xt(e,t),e.openElements.remove(e.headElement)):n===mt.HEAD?e._err(ce):Qt(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.BODY||n===mt.HTML||n===mt.BR?Qt(e,t):n===mt.TEMPLATE?vt(e,t):e._err(Ee);},[Ge.EOF_TOKEN]:Qt},IN_BODY_MODE:{[Ge.CHARACTER_TOKEN]:Wt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:sn,[Ge.END_TAG_TOKEN]:En,[Ge.EOF_TOKEN]:an},TEXT_MODE:{[Ge.CHARACTER_TOKEN]:Bt,[Ge.NULL_CHARACTER_TOKEN]:Bt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:kt,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:kt,[Ge.END_TAG_TOKEN]:function(e,t){t.tagName===mt.SCRIPT&&(e.pendingScript=e.openElements.current);e.openElements.pop(),e.insertionMode=e.originalInsertionMode;},[Ge.EOF_TOKEN]:function(e,t){e._err(me),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t);}},[Ot]:{[Ge.CHARACTER_TOKEN]:_n,[Ge.NULL_CHARACTER_TOKEN]:_n,[Ge.WHITESPACE_CHARACTER_TOKEN]:_n,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:hn,[Ge.END_TAG_TOKEN]:An,[Ge.EOF_TOKEN]:an},IN_TABLE_TEXT_MODE:{[Ge.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0;},[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t);},[Ge.COMMENT_TOKEN]:ln,[Ge.DOCTYPE_TOKEN]:ln,[Ge.START_TAG_TOKEN]:ln,[Ge.END_TAG_TOKEN]:ln,[Ge.EOF_TOKEN]:ln},IN_CAPTION_MODE:{[Ge.CHARACTER_TOKEN]:Wt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.CAPTION||n===mt.COL||n===mt.COLGROUP||n===mt.TBODY||n===mt.TD||n===mt.TFOOT||n===mt.TH||n===mt.THEAD||n===mt.TR?e.openElements.hasInTableScope(mt.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(mt.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ot,e._processToken(t)):sn(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.CAPTION||n===mt.TABLE?e.openElements.hasInTableScope(mt.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(mt.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=Ot,n===mt.TABLE&&e._processToken(t)):n!==mt.BODY&&n!==mt.COL&&n!==mt.COLGROUP&&n!==mt.HTML&&n!==mt.TBODY&&n!==mt.TD&&n!==mt.TFOOT&&n!==mt.TH&&n!==mt.THEAD&&n!==mt.TR&&En(e,t);},[Ge.EOF_TOKEN]:an},IN_COLUMN_GROUP_MODE:{[Ge.CHARACTER_TOKEN]:mn,[Ge.NULL_CHARACTER_TOKEN]:mn,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.COL?(e._appendElement(t,Nt.HTML),t.ackSelfClosing=!0):n===mt.TEMPLATE?xt(e,t):mn(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.COLGROUP?e.openElements.currentTagName===mt.COLGROUP&&(e.openElements.pop(),e.insertionMode=Ot):n===mt.TEMPLATE?vt(e,t):n!==mt.COL&&mn(e,t);},[Ge.EOF_TOKEN]:an},IN_TABLE_BODY_MODE:{[Ge.CHARACTER_TOKEN]:_n,[Ge.NULL_CHARACTER_TOKEN]:_n,[Ge.WHITESPACE_CHARACTER_TOKEN]:_n,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,Nt.HTML),e.insertionMode="IN_ROW_MODE"):n===mt.TH||n===mt.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(mt.TR),e.insertionMode="IN_ROW_MODE",e._processToken(t)):n===mt.CAPTION||n===mt.COL||n===mt.COLGROUP||n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Ot,e._processToken(t)):hn(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Ot):n===mt.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=Ot,e._processToken(t)):(n!==mt.BODY&&n!==mt.CAPTION&&n!==mt.COL&&n!==mt.COLGROUP||n!==mt.HTML&&n!==mt.TD&&n!==mt.TH&&n!==mt.TR)&&An(e,t);},[Ge.EOF_TOKEN]:an},IN_ROW_MODE:{[Ge.CHARACTER_TOKEN]:_n,[Ge.NULL_CHARACTER_TOKEN]:_n,[Ge.WHITESPACE_CHARACTER_TOKEN]:_n,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.TH||n===mt.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,Nt.HTML),e.insertionMode="IN_CELL_MODE",e.activeFormattingElements.insertMarker()):n===mt.CAPTION||n===mt.COL||n===mt.COLGROUP||n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD||n===mt.TR?e.openElements.hasInTableScope(mt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):hn(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.TR?e.openElements.hasInTableScope(mt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE"):n===mt.TABLE?e.openElements.hasInTableScope(mt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(mt.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t)):(n!==mt.BODY&&n!==mt.CAPTION&&n!==mt.COL&&n!==mt.COLGROUP||n!==mt.HTML&&n!==mt.TD&&n!==mt.TH)&&An(e,t);},[Ge.EOF_TOKEN]:an},IN_CELL_MODE:{[Ge.CHARACTER_TOKEN]:Wt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.CAPTION||n===mt.COL||n===mt.COLGROUP||n===mt.TBODY||n===mt.TD||n===mt.TFOOT||n===mt.TH||n===mt.THEAD||n===mt.TR?(e.openElements.hasInTableScope(mt.TD)||e.openElements.hasInTableScope(mt.TH))&&(e._closeTableCell(),e._processToken(t)):sn(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.TD||n===mt.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode="IN_ROW_MODE"):n===mt.TABLE||n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD||n===mt.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==mt.BODY&&n!==mt.CAPTION&&n!==mt.COL&&n!==mt.COLGROUP&&n!==mt.HTML&&En(e,t);},[Ge.EOF_TOKEN]:an},IN_SELECT_MODE:{[Ge.CHARACTER_TOKEN]:Bt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:Nn,[Ge.END_TAG_TOKEN]:pn,[Ge.EOF_TOKEN]:an},IN_SELECT_IN_TABLE_MODE:{[Ge.CHARACTER_TOKEN]:Bt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.CAPTION||n===mt.TABLE||n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD||n===mt.TR||n===mt.TD||n===mt.TH?(e.openElements.popUntilTagNamePopped(mt.SELECT),e._resetInsertionMode(),e._processToken(t)):Nn(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.CAPTION||n===mt.TABLE||n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD||n===mt.TR||n===mt.TD||n===mt.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(mt.SELECT),e._resetInsertionMode(),e._processToken(t)):pn(e,t);},[Ge.EOF_TOKEN]:an},IN_TEMPLATE_MODE:{[Ge.CHARACTER_TOKEN]:Wt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===mt.BASE||n===mt.BASEFONT||n===mt.BGSOUND||n===mt.LINK||n===mt.META||n===mt.NOFRAMES||n===mt.SCRIPT||n===mt.STYLE||n===mt.TEMPLATE||n===mt.TITLE)xt(e,t);else{const s=Ct[n]||"IN_BODY_MODE";e._popTmplInsertionMode(),e._pushTmplInsertionMode(s),e.insertionMode=s,e._processToken(t);}},[Ge.END_TAG_TOKEN]:function(e,t){t.tagName===mt.TEMPLATE&&vt(e,t);},[Ge.EOF_TOKEN]:un},AFTER_BODY_MODE:{[Ge.CHARACTER_TOKEN]:On,[Ge.NULL_CHARACTER_TOKEN]:On,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0]);},[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){t.tagName===mt.HTML?sn(e,t):On(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){t.tagName===mt.HTML?e.fragmentContext||(e.insertionMode="AFTER_AFTER_BODY_MODE"):On(e,t);},[Ge.EOF_TOKEN]:Gt},IN_FRAMESET_MODE:{[Ge.CHARACTER_TOKEN]:kt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.FRAMESET?e._insertElement(t,Nt.HTML):n===mt.FRAME?(e._appendElement(t,Nt.HTML),t.ackSelfClosing=!0):n===mt.NOFRAMES&&xt(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){t.tagName!==mt.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===mt.FRAMESET||(e.insertionMode="AFTER_FRAMESET_MODE"));},[Ge.EOF_TOKEN]:Gt},AFTER_FRAMESET_MODE:{[Ge.CHARACTER_TOKEN]:kt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Bt,[Ge.COMMENT_TOKEN]:Ut,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.NOFRAMES&&xt(e,t);},[Ge.END_TAG_TOKEN]:function(e,t){t.tagName===mt.HTML&&(e.insertionMode="AFTER_AFTER_FRAMESET_MODE");},[Ge.EOF_TOKEN]:Gt},AFTER_AFTER_BODY_MODE:{[Ge.CHARACTER_TOKEN]:Sn,[Ge.NULL_CHARACTER_TOKEN]:Sn,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:Ft,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){t.tagName===mt.HTML?sn(e,t):Sn(e,t);},[Ge.END_TAG_TOKEN]:Sn,[Ge.EOF_TOKEN]:Gt},AFTER_AFTER_FRAMESET_MODE:{[Ge.CHARACTER_TOKEN]:kt,[Ge.NULL_CHARACTER_TOKEN]:kt,[Ge.WHITESPACE_CHARACTER_TOKEN]:Xt,[Ge.COMMENT_TOKEN]:Ft,[Ge.DOCTYPE_TOKEN]:kt,[Ge.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.NOFRAMES&&xt(e,t);},[Ge.END_TAG_TOKEN]:kt,[Ge.EOF_TOKEN]:Gt}};var Rt=class{constructor(e){this.options=function(e,t){return [e,t=t||Object.create(null)].reduce((e,t)=>(Object.keys(t).forEach(n=>{e[n]=t[n];}),e),Object.create(null))}(ut,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&je.install(this,$e),this.options.onParseError&&je.install(this,st,{onParseError:this.options.onParseError});}parse(e){const t=this.treeAdapter.createDocument();return this._bootstrap(t,null),this.tokenizer.write(e,!0),this._runParsingLoop(null),t}parseFragment(e,t){t||(t=this.treeAdapter.createElement(mt.TEMPLATE,Nt.HTML,[]));const n=this.treeAdapter.createElement("documentmock",Nt.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===mt.TEMPLATE&&this._pushTmplInsertionMode("IN_TEMPLATE_MODE"),this._initTokenizerForFragmentParsing(),this._insertFakeRootElement(),this._resetInsertionMode(),this._findFormInFragmentContext(),this.tokenizer.write(e,!0),this._runParsingLoop(null);const s=this.treeAdapter.getFirstChild(n),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(s,r),r}_bootstrap(e,t){this.tokenizer=new Ge(this.options),this.stopped=!1,this.insertionMode="INITIAL_MODE",this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new Qe(this.document,this.treeAdapter),this.activeFormattingElements=new We(this.treeAdapter),this.tmplInsertionModeStack=[],this.tmplInsertionModeStackTop=-1,this.currentTmplInsertionMode=null,this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1;}_err(){}_runParsingLoop(e){for(;!this.stopped;){this._setupTokenizerCDATAMode();const t=this.tokenizer.getNextToken();if(t.type===Ge.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===Ge.WHITESPACE_CHARACTER_TOKEN&&"\n"===t.chars[0])){if(1===t.chars.length)continue;t.chars=t.chars.substr(1);}if(this._processInputToken(t),e&&this.pendingScript)break}}runParsingLoopForCurrentChunk(e,t){if(this._runParsingLoop(t),t&&this.pendingScript){const e=this.pendingScript;return this.pendingScript=null,void t(e)}e&&e();}_setupTokenizerCDATAMode(){const e=this._getAdjustedCurrentElement();this.tokenizer.allowCDATA=e&&e!==this.document&&this.treeAdapter.getNamespaceURI(e)!==Nt.HTML&&!this._isIntegrationPoint(e);}_switchToTextParsing(e,t){this._insertElement(e,Nt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode="TEXT_MODE";}switchToPlaintextParsing(){this.insertionMode="TEXT_MODE",this.originalInsertionMode="IN_BODY_MODE",this.tokenizer.state=Ge.MODE.PLAINTEXT;}_getAdjustedCurrentElement(){return 0===this.openElements.stackTop&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let e=this.fragmentContext;do{if(this.treeAdapter.getTagName(e)===mt.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e);}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===Nt.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===mt.TITLE||e===mt.TEXTAREA?this.tokenizer.state=Ge.MODE.RCDATA:e===mt.STYLE||e===mt.XMP||e===mt.IFRAME||e===mt.NOEMBED||e===mt.NOFRAMES||e===mt.NOSCRIPT?this.tokenizer.state=Ge.MODE.RAWTEXT:e===mt.SCRIPT?this.tokenizer.state=Ge.MODE.SCRIPT_DATA:e===mt.PLAINTEXT&&(this.tokenizer.state=Ge.MODE.PLAINTEXT);}}_setDocumentType(e){const t=e.name||"",n=e.publicId||"",s=e.systemId||"";this.treeAdapter.setDocumentType(this.document,t,n,s);}_attachElementToTree(e){if(this._shouldFosterParentOnInsertion())this._fosterParentElement(e);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.appendChild(t,e);}}_appendElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n);}_insertElement(e,t){const n=this.treeAdapter.createElement(e.tagName,t,e.attrs);this._attachElementToTree(n),this.openElements.push(n);}_insertFakeElement(e){const t=this.treeAdapter.createElement(e,Nt.HTML,[]);this._attachElementToTree(t),this.openElements.push(t);}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,Nt.HTML,e.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(t,n),this._attachElementToTree(t),this.openElements.push(t);}_insertFakeRootElement(){const e=this.treeAdapter.createElement(mt.HTML,Nt.HTML,[]);this.treeAdapter.appendChild(this.openElements.current,e),this.openElements.push(e);}_appendCommentNode(e,t){const n=this.treeAdapter.createCommentNode(e.data);this.treeAdapter.appendChild(t,n);}_insertCharacters(e){if(this._shouldFosterParentOnInsertion())this._fosterParentText(e.chars);else{const t=this.openElements.currentTmplContent||this.openElements.current;this.treeAdapter.insertText(t,e.chars);}}_adoptNodes(e,t){for(let n=this.treeAdapter.getFirstChild(e);n;n=this.treeAdapter.getFirstChild(e))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(t,n);}_shouldProcessTokenInForeignContent(e){const t=this._getAdjustedCurrentElement();if(!t||t===this.document)return !1;const n=this.treeAdapter.getNamespaceURI(t);if(n===Nt.HTML)return !1;if(this.treeAdapter.getTagName(t)===mt.ANNOTATION_XML&&n===Nt.MATHML&&e.type===Ge.START_TAG_TOKEN&&e.tagName===mt.SVG)return !1;const s=e.type===Ge.CHARACTER_TOKEN||e.type===Ge.NULL_CHARACTER_TOKEN||e.type===Ge.WHITESPACE_CHARACTER_TOKEN;return (!(e.type===Ge.START_TAG_TOKEN&&e.tagName!==mt.MGLYPH&&e.tagName!==mt.MALIGNMARK)&&!s||!this._isIntegrationPoint(t,Nt.MATHML))&&((e.type!==Ge.START_TAG_TOKEN&&!s||!this._isIntegrationPoint(t,Nt.HTML))&&e.type!==Ge.EOF_TOKEN)}_processToken(e){dt[this.insertionMode][e.type](this,e);}_processTokenInBodyMode(e){dt.IN_BODY_MODE[e.type](this,e);}_processTokenInForeignContent(e){e.type===Ge.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1;}(this,e):e.type===Ge.NULL_CHARACTER_TOKEN?function(e,t){t.chars=n,e._insertCharacters(t);}(this,e):e.type===Ge.WHITESPACE_CHARACTER_TOKEN?Bt(this,e):e.type===Ge.COMMENT_TOKEN?Ut(this,e):e.type===Ge.START_TAG_TOKEN?function(e,t){if(lt.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==Nt.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t);}else{const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===Nt.MATHML?lt.adjustTokenMathMLAttrs(t):s===Nt.SVG&&(lt.adjustTokenSVGTagName(t),lt.adjustTokenSVGAttrs(t)),lt.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0;}}(this,e):e.type===Ge.END_TAG_TOKEN&&function(e,t){for(let n=e.openElements.stackTop;n>0;n--){const s=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(s)===Nt.HTML){e._processToken(t);break}if(e.treeAdapter.getTagName(s).toLowerCase()===t.tagName){e.openElements.popUntilElementPopped(s);break}}}(this,e);}_processInputToken(e){this._shouldProcessTokenInForeignContent(e)?this._processTokenInForeignContent(e):this._processToken(e),e.type===Ge.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err(c);}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e),r=this.treeAdapter.getAttrList(e);return lt.isIntegrationPoint(n,s,r,t)}_reconstructActiveFormattingElements(){const e=this.activeFormattingElements.length;if(e){let t=e,n=null;do{if(t--,n=this.activeFormattingElements.entries[t],n.type===We.MARKER_ENTRY||this.openElements.contains(n.element)){t++;break}}while(t>0);for(let s=t;s<e;s++)n=this.activeFormattingElements.entries[s],this._insertElement(n.token,this.treeAdapter.getNamespaceURI(n.element)),n.element=this.openElements.current;}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode="IN_ROW_MODE";}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(mt.P),this.openElements.popUntilTagNamePopped(mt.P);}_resetInsertionMode(){for(let e=this.openElements.stackTop,t=!1;e>=0;e--){let n=this.openElements.items[e];0===e&&(t=!0,this.fragmentContext&&(n=this.fragmentContext));const s=this.treeAdapter.getTagName(n),r=St[s];if(r){this.insertionMode=r;break}if(!(t||s!==mt.TD&&s!==mt.TH)){this.insertionMode="IN_CELL_MODE";break}if(!t&&s===mt.HEAD){this.insertionMode="IN_HEAD_MODE";break}if(s===mt.SELECT){this._resetInsertionModeForSelect(e);break}if(s===mt.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(s===mt.HTML){this.insertionMode=this.headElement?"AFTER_HEAD_MODE":"BEFORE_HEAD_MODE";break}if(t){this.insertionMode="IN_BODY_MODE";break}}}_resetInsertionModeForSelect(e){if(e>0)for(let t=e-1;t>0;t--){const e=this.openElements.items[t],n=this.treeAdapter.getTagName(e);if(n===mt.TEMPLATE)break;if(n===mt.TABLE)return void(this.insertionMode="IN_SELECT_IN_TABLE_MODE")}this.insertionMode="IN_SELECT_MODE";}_pushTmplInsertionMode(e){this.tmplInsertionModeStack.push(e),this.tmplInsertionModeStackTop++,this.currentTmplInsertionMode=e;}_popTmplInsertionMode(){this.tmplInsertionModeStack.pop(),this.tmplInsertionModeStackTop--,this.currentTmplInsertionMode=this.tmplInsertionModeStack[this.tmplInsertionModeStackTop];}_isElementCausesFosterParenting(e){const t=this.treeAdapter.getTagName(e);return t===mt.TABLE||t===mt.TBODY||t===mt.TFOOT||t===mt.THEAD||t===mt.TR}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.current)}_findFosterParentingLocation(){const e={parent:null,beforeElement:null};for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t],s=this.treeAdapter.getTagName(n),r=this.treeAdapter.getNamespaceURI(n);if(s===mt.TEMPLATE&&r===Nt.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(s===mt.TABLE){e.parent=this.treeAdapter.getParentNode(n),e.parent?e.beforeElement=n:e.parent=this.openElements.items[t-1];break}}return e.parent||(e.parent=this.openElements.items[0]),e}_fosterParentElement(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertBefore(t.parent,e,t.beforeElement):this.treeAdapter.appendChild(t.parent,e);}_fosterParentText(e){const t=this._findFosterParentingLocation();t.beforeElement?this.treeAdapter.insertTextBefore(t.parent,e,t.beforeElement):this.treeAdapter.insertText(t.parent,e);}_isSpecialElement(e){const t=this.treeAdapter.getTagName(e),n=this.treeAdapter.getNamespaceURI(e);return be.SPECIAL_ELEMENTS[n][t]}};function It(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagName)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):on(e,t),n}function ft(e,t){let n=null;for(let s=e.openElements.stackTop;s>=0;s--){const r=e.openElements.items[s];if(r===t.element)break;e._isSpecialElement(r)&&(n=r);}return n||(e.openElements.popUntilElementPopped(t.element),e.activeFormattingElements.removeEntry(t)),n}function Mt(e,t,n){let s=t,r=e.openElements.getCommonAncestor(t);for(let i=0,T=r;T!==n;i++,T=r){r=e.openElements.getCommonAncestor(T);const n=e.activeFormattingElements.getElementEntry(T),o=n&&i>=3;!n||o?(o&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(T)):(T=Lt(e,n),s===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(T,s),s=T);}return s}function Lt(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),s=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,s),t.element=s,s}function Dt(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else{const s=e.treeAdapter.getTagName(t),r=e.treeAdapter.getNamespaceURI(t);s===mt.TEMPLATE&&r===Nt.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n);}}function gt(e,t,n){const s=e.treeAdapter.getNamespaceURI(n.element),r=n.token,i=e.treeAdapter.createElement(r.tagName,s,r.attrs);e._adoptNodes(t,i),e.treeAdapter.appendChild(t,i),e.activeFormattingElements.insertElementAfterBookmark(i,n.token),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,i);}function Pt(e,t){let n;for(let s=0;s<8&&(n=It(e,t),n);s++){const t=ft(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const s=Mt(e,t,n.element),r=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(s),Dt(e,r,s),gt(e,t,n);}}function kt(){}function Ht(e){e._err(oe);}function Ut(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current);}function Ft(e,t){e._appendCommentNode(t,e.document);}function Bt(e,t){e._insertCharacters(t);}function Gt(e){e.stopped=!0;}function Kt(e,t){e._err(Te,{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,be.DOCUMENT_MODE.QUIRKS),e.insertionMode="BEFORE_HTML_MODE",e._processToken(t);}function bt(e,t){e._insertFakeRootElement(),e.insertionMode="BEFORE_HEAD_MODE",e._processToken(t);}function Yt(e,t){e._insertFakeElement(mt.HEAD),e.headElement=e.openElements.current,e.insertionMode="IN_HEAD_MODE",e._processToken(t);}function xt(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.BASE||n===mt.BASEFONT||n===mt.BGSOUND||n===mt.LINK||n===mt.META?(e._appendElement(t,Nt.HTML),t.ackSelfClosing=!0):n===mt.TITLE?e._switchToTextParsing(t,Ge.MODE.RCDATA):n===mt.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,Ge.MODE.RAWTEXT):(e._insertElement(t,Nt.HTML),e.insertionMode="IN_HEAD_NO_SCRIPT_MODE"):n===mt.NOFRAMES||n===mt.STYLE?e._switchToTextParsing(t,Ge.MODE.RAWTEXT):n===mt.SCRIPT?e._switchToTextParsing(t,Ge.MODE.SCRIPT_DATA):n===mt.TEMPLATE?(e._insertTemplate(t,Nt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode="IN_TEMPLATE_MODE",e._pushTmplInsertionMode("IN_TEMPLATE_MODE")):n===mt.HEAD?e._err(ce):yt(e,t);}function vt(e,t){const n=t.tagName;n===mt.HEAD?(e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE"):n===mt.BODY||n===mt.BR||n===mt.HTML?yt(e,t):n===mt.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==mt.TEMPLATE&&e._err(ae),e.openElements.popUntilTagNamePopped(mt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(Ee);}function yt(e,t){e.openElements.pop(),e.insertionMode="AFTER_HEAD_MODE",e._processToken(t);}function wt(e,t){const n=t.type===Ge.EOF_TOKEN?he:_e;e._err(n),e.openElements.pop(),e.insertionMode="IN_HEAD_MODE",e._processToken(t);}function Qt(e,t){e._insertFakeElement(mt.BODY),e.insertionMode="IN_BODY_MODE",e._processToken(t);}function Xt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t);}function Wt(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1;}function Vt(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML);}function jt(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;}function zt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}function qt(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;}function Jt(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Nt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;}function Zt(e,t){e._appendElement(t,Nt.HTML),t.ackSelfClosing=!0;}function $t(e,t){e._switchToTextParsing(t,Ge.MODE.RAWTEXT);}function en(e,t){e.openElements.currentTagName===mt.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML);}function tn(e,t){e.openElements.hasInScope(mt.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,Nt.HTML);}function nn(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML);}function sn(e,t){const n=t.tagName;switch(n.length){case 1:n===mt.I||n===mt.S||n===mt.B||n===mt.U?zt(e,t):n===mt.P?Vt(e,t):n===mt.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(mt.A);n&&(Pt(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}(e,t):nn(e,t);break;case 2:n===mt.DL||n===mt.OL||n===mt.UL?Vt(e,t):n===mt.H1||n===mt.H2||n===mt.H3||n===mt.H4||n===mt.H5||n===mt.H6?function(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==mt.H1&&n!==mt.H2&&n!==mt.H3&&n!==mt.H4&&n!==mt.H5&&n!==mt.H6||e.openElements.pop(),e._insertElement(t,Nt.HTML);}(e,t):n===mt.LI||n===mt.DD||n===mt.DT?function(e,t){e.framesetOk=!1;const n=t.tagName;for(let t=e.openElements.stackTop;t>=0;t--){const s=e.openElements.items[t],r=e.treeAdapter.getTagName(s);let i=null;if(n===mt.LI&&r===mt.LI?i=mt.LI:n!==mt.DD&&n!==mt.DT||r!==mt.DD&&r!==mt.DT||(i=r),i){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(r!==mt.ADDRESS&&r!==mt.DIV&&r!==mt.P&&e._isSpecialElement(s))break}e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML);}(e,t):n===mt.EM||n===mt.TT?zt(e,t):n===mt.BR?Jt(e,t):n===mt.HR?function(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._appendElement(t,Nt.HTML),e.framesetOk=!1,e.ackSelfClosing=!0;}(e,t):n===mt.RB?tn(e,t):n===mt.RT||n===mt.RP?function(e,t){e.openElements.hasInScope(mt.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(mt.RTC),e._insertElement(t,Nt.HTML);}(e,t):n!==mt.TH&&n!==mt.TD&&n!==mt.TR&&nn(e,t);break;case 3:n===mt.DIV||n===mt.DIR||n===mt.NAV?Vt(e,t):n===mt.PRE?jt(e,t):n===mt.BIG?zt(e,t):n===mt.IMG||n===mt.WBR?Jt(e,t):n===mt.XMP?function(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ge.MODE.RAWTEXT);}(e,t):n===mt.SVG?function(e,t){e._reconstructActiveFormattingElements(),lt.adjustTokenSVGAttrs(t),lt.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,Nt.SVG):e._insertElement(t,Nt.SVG),t.ackSelfClosing=!0;}(e,t):n===mt.RTC?tn(e,t):n!==mt.COL&&nn(e,t);break;case 4:n===mt.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);}(e,t):n===mt.BASE||n===mt.LINK||n===mt.META?xt(e,t):n===mt.BODY?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&0===e.openElements.tmplCount&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs));}(e,t):n===mt.MAIN||n===mt.MENU?Vt(e,t):n===mt.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML),n||(e.formElement=e.openElements.current));}(e,t):n===mt.CODE||n===mt.FONT?zt(e,t):n===mt.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(mt.NOBR)&&(Pt(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,Nt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}(e,t):n===mt.AREA?Jt(e,t):n===mt.MATH?function(e,t){e._reconstructActiveFormattingElements(),lt.adjustTokenMathMLAttrs(t),lt.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,Nt.MATHML):e._insertElement(t,Nt.MATHML),t.ackSelfClosing=!0;}(e,t):n===mt.MENU?function(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML);}(e,t):n!==mt.HEAD&&nn(e,t);break;case 5:n===mt.STYLE||n===mt.TITLE?xt(e,t):n===mt.ASIDE?Vt(e,t):n===mt.SMALL?zt(e,t):n===mt.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==be.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML),e.framesetOk=!1,e.insertionMode=Ot;}(e,t):n===mt.EMBED?Jt(e,t):n===mt.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,Nt.HTML);const n=Ge.getTokenAttr(t,pt.TYPE);n&&"hidden"===n.toLowerCase()||(e.framesetOk=!1),t.ackSelfClosing=!0;}(e,t):n===mt.PARAM||n===mt.TRACK?Zt(e,t):n===mt.IMAGE?function(e,t){t.tagName=mt.IMG,Jt(e,t);}(e,t):n!==mt.FRAME&&n!==mt.TBODY&&n!==mt.TFOOT&&n!==mt.THEAD&&nn(e,t);break;case 6:n===mt.SCRIPT?xt(e,t):n===mt.CENTER||n===mt.FIGURE||n===mt.FOOTER||n===mt.HEADER||n===mt.HGROUP||n===mt.DIALOG?Vt(e,t):n===mt.BUTTON?function(e,t){e.openElements.hasInScope(mt.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(mt.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML),e.framesetOk=!1;}(e,t):n===mt.STRIKE||n===mt.STRONG?zt(e,t):n===mt.APPLET||n===mt.OBJECT?qt(e,t):n===mt.KEYGEN?Jt(e,t):n===mt.SOURCE?Zt(e,t):n===mt.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ge.MODE.RAWTEXT);}(e,t):n===mt.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,Nt.HTML),e.framesetOk=!1,e.insertionMode===Ot||"IN_CAPTION_MODE"===e.insertionMode||"IN_TABLE_BODY_MODE"===e.insertionMode||"IN_ROW_MODE"===e.insertionMode||"IN_CELL_MODE"===e.insertionMode?e.insertionMode="IN_SELECT_IN_TABLE_MODE":e.insertionMode="IN_SELECT_MODE";}(e,t):n===mt.OPTION?en(e,t):nn(e,t);break;case 7:n===mt.BGSOUND?xt(e,t):n===mt.DETAILS||n===mt.ADDRESS||n===mt.ARTICLE||n===mt.SECTION||n===mt.SUMMARY?Vt(e,t):n===mt.LISTING?jt(e,t):n===mt.MARQUEE?qt(e,t):n===mt.NOEMBED?$t(e,t):n!==mt.CAPTION&&nn(e,t);break;case 8:n===mt.BASEFONT?xt(e,t):n===mt.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,Nt.HTML),e.insertionMode="IN_FRAMESET_MODE");}(e,t):n===mt.FIELDSET?Vt(e,t):n===mt.TEXTAREA?function(e,t){e._insertElement(t,Nt.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ge.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode="TEXT_MODE";}(e,t):n===mt.TEMPLATE?xt(e,t):n===mt.NOSCRIPT?e.options.scriptingEnabled?$t(e,t):nn(e,t):n===mt.OPTGROUP?en(e,t):n!==mt.COLGROUP&&nn(e,t);break;case 9:n===mt.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(mt.P)&&e._closePElement(),e._insertElement(t,Nt.HTML),e.tokenizer.state=Ge.MODE.PLAINTEXT;}(e,t):nn(e,t);break;case 10:n===mt.BLOCKQUOTE||n===mt.FIGCAPTION?Vt(e,t):nn(e,t);break;default:nn(e,t);}}function rn(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));}function Tn(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker());}function on(e,t){const n=t.tagName;for(let t=e.openElements.stackTop;t>0;t--){const s=e.openElements.items[t];if(e.treeAdapter.getTagName(s)===n){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilElementPopped(s);break}if(e._isSpecialElement(s))break}}function En(e,t){const n=t.tagName;switch(n.length){case 1:n===mt.A||n===mt.B||n===mt.I||n===mt.S||n===mt.U?Pt(e,t):n===mt.P?function(e){e.openElements.hasInButtonScope(mt.P)||e._insertFakeElement(mt.P),e._closePElement();}(e):on(e,t);break;case 2:n===mt.DL||n===mt.UL||n===mt.OL?rn(e,t):n===mt.LI?function(e){e.openElements.hasInListItemScope(mt.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(mt.LI),e.openElements.popUntilTagNamePopped(mt.LI));}(e):n===mt.DD||n===mt.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n));}(e,t):n===mt.H1||n===mt.H2||n===mt.H3||n===mt.H4||n===mt.H5||n===mt.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());}(e):n===mt.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(mt.BR),e.openElements.pop(),e.framesetOk=!1;}(e):n===mt.EM||n===mt.TT?Pt(e,t):on(e,t);break;case 3:n===mt.BIG?Pt(e,t):n===mt.DIR||n===mt.DIV||n===mt.NAV||n===mt.PRE?rn(e,t):on(e,t);break;case 4:n===mt.BODY?function(e){e.openElements.hasInScope(mt.BODY)&&(e.insertionMode="AFTER_BODY_MODE");}(e):n===mt.HTML?function(e,t){e.openElements.hasInScope(mt.BODY)&&(e.insertionMode="AFTER_BODY_MODE",e._processToken(t));}(e,t):n===mt.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(mt.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(mt.FORM):e.openElements.remove(n));}(e):n===mt.CODE||n===mt.FONT||n===mt.NOBR?Pt(e,t):n===mt.MAIN||n===mt.MENU?rn(e,t):on(e,t);break;case 5:n===mt.ASIDE?rn(e,t):n===mt.SMALL?Pt(e,t):on(e,t);break;case 6:n===mt.CENTER||n===mt.FIGURE||n===mt.FOOTER||n===mt.HEADER||n===mt.HGROUP||n===mt.DIALOG?rn(e,t):n===mt.APPLET||n===mt.OBJECT?Tn(e,t):n===mt.STRIKE||n===mt.STRONG?Pt(e,t):on(e,t);break;case 7:n===mt.ADDRESS||n===mt.ARTICLE||n===mt.DETAILS||n===mt.SECTION||n===mt.SUMMARY||n===mt.LISTING?rn(e,t):n===mt.MARQUEE?Tn(e,t):on(e,t);break;case 8:n===mt.FIELDSET?rn(e,t):n===mt.TEMPLATE?vt(e,t):on(e,t);break;case 10:n===mt.BLOCKQUOTE||n===mt.FIGCAPTION?rn(e,t):on(e,t);break;default:on(e,t);}}function an(e,t){e.tmplInsertionModeStackTop>-1?un(e,t):e.stopped=!0;}function _n(e,t){const n=e.openElements.currentTagName;n===mt.TABLE||n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD||n===mt.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode="IN_TABLE_TEXT_MODE",e._processToken(t)):cn(e,t);}function hn(e,t){const n=t.tagName;switch(n.length){case 2:n===mt.TD||n===mt.TH||n===mt.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(mt.TBODY),e.insertionMode="IN_TABLE_BODY_MODE",e._processToken(t);}(e,t):cn(e,t);break;case 3:n===mt.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(mt.COLGROUP),e.insertionMode="IN_COLUMN_GROUP_MODE",e._processToken(t);}(e,t):cn(e,t);break;case 4:n===mt.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,Nt.HTML),e.formElement=e.openElements.current,e.openElements.pop());}(e,t):cn(e,t);break;case 5:n===mt.TABLE?function(e,t){e.openElements.hasInTableScope(mt.TABLE)&&(e.openElements.popUntilTagNamePopped(mt.TABLE),e._resetInsertionMode(),e._processToken(t));}(e,t):n===mt.STYLE?xt(e,t):n===mt.TBODY||n===mt.TFOOT||n===mt.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Nt.HTML),e.insertionMode="IN_TABLE_BODY_MODE";}(e,t):n===mt.INPUT?function(e,t){const n=Ge.getTokenAttr(t,pt.TYPE);n&&"hidden"===n.toLowerCase()?e._appendElement(t,Nt.HTML):cn(e,t),t.ackSelfClosing=!0;}(e,t):cn(e,t);break;case 6:n===mt.SCRIPT?xt(e,t):cn(e,t);break;case 7:n===mt.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,Nt.HTML),e.insertionMode="IN_CAPTION_MODE";}(e,t):cn(e,t);break;case 8:n===mt.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,Nt.HTML),e.insertionMode="IN_COLUMN_GROUP_MODE";}(e,t):n===mt.TEMPLATE?xt(e,t):cn(e,t);break;default:cn(e,t);}}function An(e,t){const n=t.tagName;n===mt.TABLE?e.openElements.hasInTableScope(mt.TABLE)&&(e.openElements.popUntilTagNamePopped(mt.TABLE),e._resetInsertionMode()):n===mt.TEMPLATE?vt(e,t):n!==mt.BODY&&n!==mt.CAPTION&&n!==mt.COL&&n!==mt.COLGROUP&&n!==mt.HTML&&n!==mt.TBODY&&n!==mt.TD&&n!==mt.TFOOT&&n!==mt.TH&&n!==mt.THEAD&&n!==mt.TR&&cn(e,t);}function cn(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n;}function ln(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)cn(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t);}function mn(e,t){e.openElements.currentTagName===mt.COLGROUP&&(e.openElements.pop(),e.insertionMode=Ot,e._processToken(t));}function Nn(e,t){const n=t.tagName;n===mt.HTML?sn(e,t):n===mt.OPTION?(e.openElements.currentTagName===mt.OPTION&&e.openElements.pop(),e._insertElement(t,Nt.HTML)):n===mt.OPTGROUP?(e.openElements.currentTagName===mt.OPTION&&e.openElements.pop(),e.openElements.currentTagName===mt.OPTGROUP&&e.openElements.pop(),e._insertElement(t,Nt.HTML)):n===mt.INPUT||n===mt.KEYGEN||n===mt.TEXTAREA||n===mt.SELECT?e.openElements.hasInSelectScope(mt.SELECT)&&(e.openElements.popUntilTagNamePopped(mt.SELECT),e._resetInsertionMode(),n!==mt.SELECT&&e._processToken(t)):n!==mt.SCRIPT&&n!==mt.TEMPLATE||xt(e,t);}function pn(e,t){const n=t.tagName;if(n===mt.OPTGROUP){const t=e.openElements.items[e.openElements.stackTop-1],n=t&&e.treeAdapter.getTagName(t);e.openElements.currentTagName===mt.OPTION&&n===mt.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===mt.OPTGROUP&&e.openElements.pop();}else n===mt.OPTION?e.openElements.currentTagName===mt.OPTION&&e.openElements.pop():n===mt.SELECT&&e.openElements.hasInSelectScope(mt.SELECT)?(e.openElements.popUntilTagNamePopped(mt.SELECT),e._resetInsertionMode()):n===mt.TEMPLATE&&vt(e,t);}function un(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(mt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0;}function On(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t);}function Sn(e,t){e.insertionMode="IN_BODY_MODE",e._processToken(t);}be.TAG_NAMES,be.NAMESPACES;return e.parse=function(e,t){return new Rt(t).parse(e)},e.parseFragment=function(e,t,n){return "string"==typeof e&&(n=t,t=e,e=null),new Rt(n).parseFragment(t,e)},e}({});function parse(e,t){return parse5.parse(e,t)}function parseFragment(e,t){return parse5.parseFragment(e,t)}
1444
-
1445
- const docParser = new WeakMap();
1446
- function parseDocumentUtil(ownerDocument, html) {
1447
- const doc = parse(html.trim(), getParser(ownerDocument));
1448
- doc.documentElement = doc.firstElementChild;
1449
- doc.head = doc.documentElement.firstElementChild;
1450
- doc.body = doc.head.nextElementSibling;
1451
- return doc;
1452
- }
1453
- function parseFragmentUtil(ownerDocument, html) {
1454
- if (typeof html === 'string') {
1455
- html = html.trim();
1456
- }
1457
- else {
1458
- html = '';
1459
- }
1460
- const frag = parseFragment(html, getParser(ownerDocument));
1461
- return frag;
1462
- }
1463
- function getParser(ownerDocument) {
1464
- let parseOptions = docParser.get(ownerDocument);
1465
- if (parseOptions != null) {
1466
- return parseOptions;
1467
- }
1468
- const treeAdapter = {
1469
- createDocument() {
1470
- const doc = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
1471
- doc['x-mode'] = 'no-quirks';
1472
- return doc;
1473
- },
1474
- createDocumentFragment() {
1475
- return ownerDocument.createDocumentFragment();
1476
- },
1477
- createElement(tagName, namespaceURI, attrs) {
1478
- const elm = ownerDocument.createElementNS(namespaceURI, tagName);
1479
- for (let i = 0; i < attrs.length; i++) {
1480
- const attr = attrs[i];
1481
- if (attr.namespace == null || attr.namespace === 'http://www.w3.org/1999/xhtml') {
1482
- elm.setAttribute(attr.name, attr.value);
1483
- }
1484
- else {
1485
- elm.setAttributeNS(attr.namespace, attr.name, attr.value);
1486
- }
1487
- }
1488
- return elm;
1489
- },
1490
- createCommentNode(data) {
1491
- return ownerDocument.createComment(data);
1492
- },
1493
- appendChild(parentNode, newNode) {
1494
- parentNode.appendChild(newNode);
1495
- },
1496
- insertBefore(parentNode, newNode, referenceNode) {
1497
- parentNode.insertBefore(newNode, referenceNode);
1498
- },
1499
- setTemplateContent(templateElement, contentElement) {
1500
- templateElement.content = contentElement;
1501
- },
1502
- getTemplateContent(templateElement) {
1503
- return templateElement.content;
1504
- },
1505
- setDocumentType(doc, name, publicId, systemId) {
1506
- let doctypeNode = doc.childNodes.find(n => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
1507
- if (doctypeNode == null) {
1508
- doctypeNode = ownerDocument.createDocumentTypeNode();
1509
- doc.insertBefore(doctypeNode, doc.firstChild);
1510
- }
1511
- doctypeNode.nodeValue = '!DOCTYPE';
1512
- doctypeNode['x-name'] = name;
1513
- doctypeNode['x-publicId'] = publicId;
1514
- doctypeNode['x-systemId'] = systemId;
1515
- },
1516
- setDocumentMode(doc, mode) {
1517
- doc['x-mode'] = mode;
1518
- },
1519
- getDocumentMode(doc) {
1520
- return doc['x-mode'];
1521
- },
1522
- detachNode(node) {
1523
- node.remove();
1524
- },
1525
- insertText(parentNode, text) {
1526
- const lastChild = parentNode.lastChild;
1527
- if (lastChild != null && lastChild.nodeType === 3 /* TEXT_NODE */) {
1528
- lastChild.nodeValue += text;
1529
- }
1530
- else {
1531
- parentNode.appendChild(ownerDocument.createTextNode(text));
1532
- }
1533
- },
1534
- insertTextBefore(parentNode, text, referenceNode) {
1535
- const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
1536
- if (prevNode != null && prevNode.nodeType === 3 /* TEXT_NODE */) {
1537
- prevNode.nodeValue += text;
1538
- }
1539
- else {
1540
- parentNode.insertBefore(ownerDocument.createTextNode(text), referenceNode);
1541
- }
1542
- },
1543
- adoptAttributes(recipient, attrs) {
1544
- for (let i = 0; i < attrs.length; i++) {
1545
- const attr = attrs[i];
1546
- if (recipient.hasAttributeNS(attr.namespace, attr.name) === false) {
1547
- recipient.setAttributeNS(attr.namespace, attr.name, attr.value);
1548
- }
1549
- }
1550
- },
1551
- getFirstChild(node) {
1552
- return node.childNodes[0];
1553
- },
1554
- getChildNodes(node) {
1555
- return node.childNodes;
1556
- },
1557
- getParentNode(node) {
1558
- return node.parentNode;
1559
- },
1560
- getAttrList(element) {
1561
- const attrs = element.attributes.items.map(attr => {
1562
- return {
1563
- name: attr.name,
1564
- value: attr.value,
1565
- namespace: attr.namespaceURI,
1566
- prefix: null
1567
- };
1568
- });
1569
- return attrs;
1570
- },
1571
- getTagName(element) {
1572
- if (element.namespaceURI === 'http://www.w3.org/1999/xhtml') {
1573
- return element.nodeName.toLowerCase();
1574
- }
1575
- else {
1576
- return element.nodeName;
1577
- }
1578
- },
1579
- getNamespaceURI(element) {
1580
- return element.namespaceURI;
1581
- },
1582
- getTextNodeContent(textNode) {
1583
- return textNode.nodeValue;
1584
- },
1585
- getCommentNodeContent(commentNode) {
1586
- return commentNode.nodeValue;
1587
- },
1588
- getDocumentTypeNodeName(doctypeNode) {
1589
- return doctypeNode['x-name'];
1590
- },
1591
- getDocumentTypeNodePublicId(doctypeNode) {
1592
- return doctypeNode['x-publicId'];
1593
- },
1594
- getDocumentTypeNodeSystemId(doctypeNode) {
1595
- return doctypeNode['x-systemId'];
1596
- },
1597
- isTextNode(node) {
1598
- return node.nodeType === 3 /* TEXT_NODE */;
1599
- },
1600
- isCommentNode(node) {
1601
- return node.nodeType === 8 /* COMMENT_NODE */;
1602
- },
1603
- isDocumentTypeNode(node) {
1604
- return node.nodeType === 10 /* DOCUMENT_TYPE_NODE */;
1605
- },
1606
- isElementNode(node) {
1607
- return node.nodeType === 1 /* ELEMENT_NODE */;
1608
- }
1609
- };
1610
- parseOptions = {
1611
- treeAdapter: treeAdapter
1612
- };
1613
- docParser.set(ownerDocument, parseOptions);
1614
- return parseOptions;
1615
- }
1616
-
1617
- class MockNode {
1618
- constructor(ownerDocument, nodeType, nodeName, nodeValue) {
1619
- this.ownerDocument = ownerDocument;
1620
- this.nodeType = nodeType;
1621
- this.nodeName = nodeName;
1622
- this.nodeValue = nodeValue;
1623
- this.parentNode = null;
1624
- this.childNodes = [];
1625
- }
1626
- appendChild(newNode) {
1627
- if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
1628
- const nodes = newNode.childNodes.slice();
1629
- for (const child of nodes) {
1630
- this.appendChild(child);
1631
- }
1632
- }
1633
- else {
1634
- newNode.remove();
1635
- newNode.parentNode = this;
1636
- this.childNodes.push(newNode);
1637
- connectNode(this.ownerDocument, newNode);
1638
- }
1639
- return newNode;
1640
- }
1641
- append(...items) {
1642
- items.forEach(item => {
1643
- const isNode = typeof item === 'object' && item !== null && 'nodeType' in item;
1644
- this.appendChild(isNode ? item : this.ownerDocument.createTextNode(String(item)));
1645
- });
1646
- }
1647
- prepend(...items) {
1648
- const firstChild = this.firstChild;
1649
- items.forEach(item => {
1650
- const isNode = typeof item === 'object' && item !== null && 'nodeType' in item;
1651
- this.insertBefore(isNode ? item : this.ownerDocument.createTextNode(String(item)), firstChild);
1652
- });
1653
- }
1654
- cloneNode(deep) {
1655
- throw new Error(`invalid node type to clone: ${this.nodeType}, deep: ${deep}`);
1656
- }
1657
- compareDocumentPosition(_other) {
1658
- // unimplemented
1659
- // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
1660
- return -1;
1661
- }
1662
- get firstChild() {
1663
- return this.childNodes[0] || null;
1664
- }
1665
- insertBefore(newNode, referenceNode) {
1666
- if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
1667
- for (let i = 0, ii = newNode.childNodes.length; i < ii; i++) {
1668
- insertBefore(this, newNode.childNodes[i], referenceNode);
1669
- }
1670
- }
1671
- else {
1672
- insertBefore(this, newNode, referenceNode);
1673
- }
1674
- return newNode;
1675
- }
1676
- get isConnected() {
1677
- let node = this;
1678
- while (node != null) {
1679
- if (node.nodeType === 9 /* DOCUMENT_NODE */) {
1680
- return true;
1681
- }
1682
- node = node.parentNode;
1683
- if (node != null && node.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
1684
- node = node.host;
1685
- }
1686
- }
1687
- return false;
1688
- }
1689
- isSameNode(node) {
1690
- return this === node;
1691
- }
1692
- get lastChild() {
1693
- return this.childNodes[this.childNodes.length - 1] || null;
1694
- }
1695
- get nextSibling() {
1696
- if (this.parentNode != null) {
1697
- const index = this.parentNode.childNodes.indexOf(this) + 1;
1698
- return this.parentNode.childNodes[index] || null;
1699
- }
1700
- return null;
1701
- }
1702
- get parentElement() {
1703
- return this.parentNode || null;
1704
- }
1705
- set parentElement(value) {
1706
- this.parentNode = value;
1707
- }
1708
- get previousSibling() {
1709
- if (this.parentNode != null) {
1710
- const index = this.parentNode.childNodes.indexOf(this) - 1;
1711
- return this.parentNode.childNodes[index] || null;
1712
- }
1713
- return null;
1714
- }
1715
- contains(otherNode) {
1716
- return this.childNodes.includes(otherNode);
1717
- }
1718
- removeChild(childNode) {
1719
- const index = this.childNodes.indexOf(childNode);
1720
- if (index > -1) {
1721
- this.childNodes.splice(index, 1);
1722
- if (this.nodeType === 1 /* ELEMENT_NODE */) {
1723
- const wasConnected = this.isConnected;
1724
- childNode.parentNode = null;
1725
- if (wasConnected === true) {
1726
- disconnectNode(childNode);
1727
- }
1728
- }
1729
- else {
1730
- childNode.parentNode = null;
1731
- }
1732
- }
1733
- else {
1734
- throw new Error(`node not found within childNodes during removeChild`);
1735
- }
1736
- return childNode;
1737
- }
1738
- remove() {
1739
- if (this.parentNode != null) {
1740
- this.parentNode.removeChild(this);
1741
- }
1742
- }
1743
- replaceChild(newChild, oldChild) {
1744
- if (oldChild.parentNode === this) {
1745
- this.insertBefore(newChild, oldChild);
1746
- oldChild.remove();
1747
- return newChild;
1748
- }
1749
- return null;
1750
- }
1751
- get textContent() {
1752
- return this.nodeValue;
1753
- }
1754
- set textContent(value) {
1755
- this.nodeValue = String(value);
1756
- }
1757
- }
1758
- MockNode.ELEMENT_NODE = 1;
1759
- MockNode.TEXT_NODE = 3;
1760
- MockNode.PROCESSING_INSTRUCTION_NODE = 7;
1761
- MockNode.COMMENT_NODE = 8;
1762
- MockNode.DOCUMENT_NODE = 9;
1763
- MockNode.DOCUMENT_TYPE_NODE = 10;
1764
- MockNode.DOCUMENT_FRAGMENT_NODE = 11;
1765
- class MockNodeList {
1766
- constructor(ownerDocument, childNodes, length) {
1767
- this.ownerDocument = ownerDocument;
1768
- this.childNodes = childNodes;
1769
- this.length = length;
1770
- }
1771
- }
1772
- class MockElement extends MockNode {
1773
- constructor(ownerDocument, nodeName) {
1774
- super(ownerDocument, 1 /* ELEMENT_NODE */, typeof nodeName === 'string' ? nodeName : null, null);
1775
- this.namespaceURI = null;
1776
- }
1777
- addEventListener(type, handler) {
1778
- addEventListener(this, type, handler);
1779
- }
1780
- attachShadow(_opts) {
1781
- const shadowRoot = this.ownerDocument.createDocumentFragment();
1782
- this.shadowRoot = shadowRoot;
1783
- return shadowRoot;
1784
- }
1785
- get shadowRoot() {
1786
- return this.__shadowRoot || null;
1787
- }
1788
- set shadowRoot(shadowRoot) {
1789
- if (shadowRoot != null) {
1790
- shadowRoot.host = this;
1791
- this.__shadowRoot = shadowRoot;
1792
- }
1793
- else {
1794
- delete this.__shadowRoot;
1795
- }
1796
- }
1797
- get attributes() {
1798
- if (this.__attributeMap == null) {
1799
- this.__attributeMap = new MockAttributeMap();
1800
- }
1801
- return this.__attributeMap;
1802
- }
1803
- set attributes(attrs) {
1804
- this.__attributeMap = attrs;
1805
- }
1806
- get children() {
1807
- return this.childNodes.filter(n => n.nodeType === 1 /* ELEMENT_NODE */);
1808
- }
1809
- get childElementCount() {
1810
- return this.childNodes.filter(n => n.nodeType === 1 /* ELEMENT_NODE */).length;
1811
- }
1812
- get className() { return this.getAttributeNS(null, 'class') || ''; }
1813
- set className(value) { this.setAttributeNS(null, 'class', value); }
1814
- get classList() {
1815
- return new MockClassList(this);
1816
- }
1817
- click() {
1818
- dispatchEvent(this, new MockEvent('click', { bubbles: true, cancelable: true, composed: true }));
1819
- }
1820
- cloneNode(_deep) {
1821
- // implemented on MockElement.prototype from within element.ts
1822
- return null;
1823
- }
1824
- closest(selector) {
1825
- return closest(selector, this);
1826
- }
1827
- get dataset() {
1828
- return dataset(this);
1829
- }
1830
- get dir() { return this.getAttributeNS(null, 'dir') || ''; }
1831
- set dir(value) { this.setAttributeNS(null, 'dir', value); }
1832
- dispatchEvent(ev) {
1833
- return dispatchEvent(this, ev);
1834
- }
1835
- get firstElementChild() {
1836
- return this.children[0] || null;
1837
- }
1838
- getAttribute(attrName) {
1839
- if (attrName === 'style') {
1840
- if (this.__style != null && this.__style.length > 0) {
1841
- return this.style.cssText;
1842
- }
1843
- return null;
1844
- }
1845
- const attr = this.attributes.getNamedItem(attrName);
1846
- if (attr != null) {
1847
- return attr.value;
1848
- }
1849
- return null;
1850
- }
1851
- getAttributeNS(namespaceURI, attrName) {
1852
- const attr = this.attributes.getNamedItemNS(namespaceURI, attrName);
1853
- if (attr != null) {
1854
- return attr.value;
1855
- }
1856
- return null;
1857
- }
1858
- getBoundingClientRect() {
1859
- return { bottom: 0, height: 0, left: 0, right: 0, top: 0, width: 0, x: 0, y: 0 };
1860
- }
1861
- getRootNode(opts) {
1862
- const isComposed = (opts != null && opts.composed === true);
1863
- let node = this;
1864
- while (node.parentNode != null) {
1865
- node = node.parentNode;
1866
- if (isComposed === true && node.parentNode == null && node.host != null) {
1867
- node = node.host;
1868
- }
1869
- }
1870
- return node;
1871
- }
1872
- hasChildNodes() {
1873
- return (this.childNodes.length > 0);
1874
- }
1875
- get id() { return this.getAttributeNS(null, 'id') || ''; }
1876
- set id(value) { this.setAttributeNS(null, 'id', value); }
1877
- get innerHTML() {
1878
- if (this.childNodes.length === 0) {
1879
- return '';
1880
- }
1881
- return serializeNodeToHtml(this, {
1882
- newLines: false,
1883
- indentSpaces: 0
1884
- });
1885
- }
1886
- set innerHTML(html) {
1887
- if (NON_ESCAPABLE_CONTENT.has(this.nodeName) === true) {
1888
- setTextContent(this, html);
1889
- }
1890
- else {
1891
- for (let i = this.childNodes.length - 1; i >= 0; i--) {
1892
- this.removeChild(this.childNodes[i]);
1893
- }
1894
- if (typeof html === 'string') {
1895
- const frag = parseFragmentUtil(this.ownerDocument, html);
1896
- while (frag.childNodes.length > 0) {
1897
- this.appendChild(frag.childNodes[0]);
1898
- }
1899
- }
1900
- }
1901
- }
1902
- get innerText() {
1903
- const text = [];
1904
- getTextContent(this.childNodes, text);
1905
- return text.join('');
1906
- }
1907
- set innerText(value) {
1908
- setTextContent(this, value);
1909
- }
1910
- hasAttribute(attrName) {
1911
- if (attrName === 'style') {
1912
- return (this.__style != null && this.__style.length > 0);
1913
- }
1914
- return this.getAttribute(attrName) !== null;
1915
- }
1916
- hasAttributeNS(namespaceURI, name) {
1917
- return this.getAttributeNS(namespaceURI, name) !== null;
1918
- }
1919
- get hidden() { return this.hasAttributeNS(null, 'hidden'); }
1920
- set hidden(isHidden) {
1921
- if (isHidden === true) {
1922
- this.setAttributeNS(null, 'hidden', '');
1923
- }
1924
- else {
1925
- this.removeAttributeNS(null, 'hidden');
1926
- }
1927
- }
1928
- get lang() { return this.getAttributeNS(null, 'lang') || ''; }
1929
- set lang(value) { this.setAttributeNS(null, 'lang', value); }
1930
- get lastElementChild() {
1931
- const children = this.children;
1932
- return children[children.length - 1] || null;
1933
- }
1934
- matches(selector) {
1935
- return matches(selector, this);
1936
- }
1937
- get nextElementSibling() {
1938
- const parentElement = this.parentElement;
1939
- if (parentElement != null && (parentElement.nodeType === 1 /* ELEMENT_NODE */ || parentElement.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */ || parentElement.nodeType === 9 /* DOCUMENT_NODE */)) {
1940
- const children = parentElement.children;
1941
- const index = children.indexOf(this) + 1;
1942
- return parentElement.children[index] || null;
1943
- }
1944
- return null;
1945
- }
1946
- get outerHTML() {
1947
- return serializeNodeToHtml(this, {
1948
- newLines: false,
1949
- outerHtml: true,
1950
- indentSpaces: 0
1951
- });
1952
- }
1953
- get previousElementSibling() {
1954
- const parentElement = this.parentElement;
1955
- if (parentElement != null && (parentElement.nodeType === 1 /* ELEMENT_NODE */ || parentElement.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */ || parentElement.nodeType === 9 /* DOCUMENT_NODE */)) {
1956
- const children = parentElement.children;
1957
- const index = children.indexOf(this) - 1;
1958
- return parentElement.children[index] || null;
1959
- }
1960
- return null;
1961
- }
1962
- getElementsByClassName(classNames) {
1963
- const classes = classNames.trim().split(' ').filter(c => c.length > 0);
1964
- return getElementsByClassName(this, classes);
1965
- }
1966
- getElementsByTagName(tagName) {
1967
- return getElementsByTagName(this, tagName.toLowerCase());
1968
- }
1969
- querySelector(selector) {
1970
- return selectOne(selector, this);
1971
- }
1972
- querySelectorAll(selector) {
1973
- return selectAll(selector, this);
1974
- }
1975
- removeAttribute(attrName) {
1976
- if (attrName === 'style') {
1977
- delete this.__style;
1978
- }
1979
- else {
1980
- const attr = this.attributes.getNamedItem(attrName);
1981
- if (attr != null) {
1982
- this.attributes.removeNamedItemNS(attr);
1983
- if (checkAttributeChanged(this) === true) {
1984
- attributeChanged(this, attrName, attr.value, null);
1985
- }
1986
- }
1987
- }
1988
- }
1989
- removeAttributeNS(namespaceURI, attrName) {
1990
- const attr = this.attributes.getNamedItemNS(namespaceURI, attrName);
1991
- if (attr != null) {
1992
- this.attributes.removeNamedItemNS(attr);
1993
- if (checkAttributeChanged(this) === true) {
1994
- attributeChanged(this, attrName, attr.value, null);
1995
- }
1996
- }
1997
- }
1998
- removeEventListener(type, handler) {
1999
- removeEventListener(this, type, handler);
2000
- }
2001
- setAttribute(attrName, value) {
2002
- if (attrName === 'style') {
2003
- this.style = value;
2004
- }
2005
- else {
2006
- const attributes = this.attributes;
2007
- let attr = attributes.getNamedItem(attrName);
2008
- const checkAttrChanged = checkAttributeChanged(this);
2009
- if (attr != null) {
2010
- if (checkAttrChanged === true) {
2011
- const oldValue = attr.value;
2012
- attr.value = value;
2013
- if (oldValue !== attr.value) {
2014
- attributeChanged(this, attr.name, oldValue, attr.value);
2015
- }
2016
- }
2017
- else {
2018
- attr.value = value;
2019
- }
2020
- }
2021
- else {
2022
- if (attributes.caseInsensitive) {
2023
- attrName = attrName.toLowerCase();
2024
- }
2025
- attr = new MockAttr(attrName, value);
2026
- attributes.items.push(attr);
2027
- if (checkAttrChanged === true) {
2028
- attributeChanged(this, attrName, null, attr.value);
2029
- }
2030
- }
2031
- }
2032
- }
2033
- setAttributeNS(namespaceURI, attrName, value) {
2034
- const attributes = this.attributes;
2035
- let attr = attributes.getNamedItemNS(namespaceURI, attrName);
2036
- const checkAttrChanged = checkAttributeChanged(this);
2037
- if (attr != null) {
2038
- if (checkAttrChanged === true) {
2039
- const oldValue = attr.value;
2040
- attr.value = value;
2041
- if (oldValue !== attr.value) {
2042
- attributeChanged(this, attr.name, oldValue, attr.value);
2043
- }
2044
- }
2045
- else {
2046
- attr.value = value;
2047
- }
2048
- }
2049
- else {
2050
- attr = new MockAttr(attrName, value, namespaceURI);
2051
- attributes.items.push(attr);
2052
- if (checkAttrChanged === true) {
2053
- attributeChanged(this, attrName, null, attr.value);
2054
- }
2055
- }
2056
- }
2057
- get style() {
2058
- if (this.__style == null) {
2059
- this.__style = createCSSStyleDeclaration();
2060
- }
2061
- return this.__style;
2062
- }
2063
- set style(val) {
2064
- if (typeof val === 'string') {
2065
- if (this.__style == null) {
2066
- this.__style = createCSSStyleDeclaration();
2067
- }
2068
- this.__style.cssText = val;
2069
- }
2070
- else {
2071
- this.__style = val;
2072
- }
2073
- }
2074
- get tabIndex() { return parseInt(this.getAttributeNS(null, 'tabindex') || '-1', 10); }
2075
- set tabIndex(value) { this.setAttributeNS(null, 'tabindex', value); }
2076
- get tagName() { return this.nodeName; }
2077
- set tagName(value) { this.nodeName = value; }
2078
- get textContent() {
2079
- const text = [];
2080
- getTextContent(this.childNodes, text);
2081
- return text.join('');
2082
- }
2083
- set textContent(value) {
2084
- setTextContent(this, value);
2085
- }
2086
- get title() { return this.getAttributeNS(null, 'title') || ''; }
2087
- set title(value) { this.setAttributeNS(null, 'title', value); }
2088
- onanimationstart() { }
2089
- onanimationend() { }
2090
- onanimationiteration() { }
2091
- onabort() { }
2092
- onauxclick() { }
2093
- onbeforecopy() { }
2094
- onbeforecut() { }
2095
- onbeforepaste() { }
2096
- onblur() { }
2097
- oncancel() { }
2098
- oncanplay() { }
2099
- oncanplaythrough() { }
2100
- onchange() { }
2101
- onclick() { }
2102
- onclose() { }
2103
- oncontextmenu() { }
2104
- oncopy() { }
2105
- oncuechange() { }
2106
- oncut() { }
2107
- ondblclick() { }
2108
- ondrag() { }
2109
- ondragend() { }
2110
- ondragenter() { }
2111
- ondragleave() { }
2112
- ondragover() { }
2113
- ondragstart() { }
2114
- ondrop() { }
2115
- ondurationchange() { }
2116
- onemptied() { }
2117
- onended() { }
2118
- onerror() { }
2119
- onfocus() { }
2120
- onformdata() { }
2121
- onfullscreenchange() { }
2122
- onfullscreenerror() { }
2123
- ongotpointercapture() { }
2124
- oninput() { }
2125
- oninvalid() { }
2126
- onkeydown() { }
2127
- onkeypress() { }
2128
- onkeyup() { }
2129
- onload() { }
2130
- onloadeddata() { }
2131
- onloadedmetadata() { }
2132
- onloadstart() { }
2133
- onlostpointercapture() { }
2134
- onmousedown() { }
2135
- onmouseenter() { }
2136
- onmouseleave() { }
2137
- onmousemove() { }
2138
- onmouseout() { }
2139
- onmouseover() { }
2140
- onmouseup() { }
2141
- onmousewheel() { }
2142
- onpaste() { }
2143
- onpause() { }
2144
- onplay() { }
2145
- onplaying() { }
2146
- onpointercancel() { }
2147
- onpointerdown() { }
2148
- onpointerenter() { }
2149
- onpointerleave() { }
2150
- onpointermove() { }
2151
- onpointerout() { }
2152
- onpointerover() { }
2153
- onpointerup() { }
2154
- onprogress() { }
2155
- onratechange() { }
2156
- onreset() { }
2157
- onresize() { }
2158
- onscroll() { }
2159
- onsearch() { }
2160
- onseeked() { }
2161
- onseeking() { }
2162
- onselect() { }
2163
- onselectstart() { }
2164
- onstalled() { }
2165
- onsubmit() { }
2166
- onsuspend() { }
2167
- ontimeupdate() { }
2168
- ontoggle() { }
2169
- onvolumechange() { }
2170
- onwaiting() { }
2171
- onwebkitfullscreenchange() { }
2172
- onwebkitfullscreenerror() { }
2173
- onwheel() { }
2174
- toString(opts) {
2175
- return serializeNodeToHtml(this, opts);
2176
- }
2177
- }
2178
- function getElementsByClassName(elm, classNames, foundElms = []) {
2179
- const children = elm.children;
2180
- for (let i = 0, ii = children.length; i < ii; i++) {
2181
- const childElm = children[i];
2182
- for (let j = 0, jj = classNames.length; j < jj; j++) {
2183
- if (childElm.classList.contains(classNames[j])) {
2184
- foundElms.push(childElm);
2185
- }
2186
- }
2187
- getElementsByClassName(childElm, classNames, foundElms);
2188
- }
2189
- return foundElms;
2190
- }
2191
- function getElementsByTagName(elm, tagName, foundElms = []) {
2192
- const children = elm.children;
2193
- for (let i = 0, ii = children.length; i < ii; i++) {
2194
- const childElm = children[i];
2195
- if (childElm.nodeName.toLowerCase() === tagName) {
2196
- foundElms.push(childElm);
2197
- }
2198
- getElementsByTagName(childElm, tagName, foundElms);
2199
- }
2200
- return foundElms;
2201
- }
2202
- function resetElement(elm) {
2203
- resetEventListeners(elm);
2204
- delete elm.__attributeMap;
2205
- delete elm.__shadowRoot;
2206
- delete elm.__style;
2207
- }
2208
- function insertBefore(parentNode, newNode, referenceNode) {
2209
- if (newNode !== referenceNode) {
2210
- newNode.remove();
2211
- newNode.parentNode = parentNode;
2212
- newNode.ownerDocument = parentNode.ownerDocument;
2213
- if (referenceNode != null) {
2214
- const index = parentNode.childNodes.indexOf(referenceNode);
2215
- if (index > -1) {
2216
- parentNode.childNodes.splice(index, 0, newNode);
2217
- }
2218
- else {
2219
- throw new Error(`referenceNode not found in parentNode.childNodes`);
2220
- }
2221
- }
2222
- else {
2223
- parentNode.childNodes.push(newNode);
2224
- }
2225
- connectNode(parentNode.ownerDocument, newNode);
2226
- }
2227
- return newNode;
2228
- }
2229
- class MockHTMLElement extends MockElement {
2230
- constructor(ownerDocument, nodeName) {
2231
- super(ownerDocument, typeof nodeName === 'string' ? nodeName.toUpperCase() : null);
2232
- this.namespaceURI = 'http://www.w3.org/1999/xhtml';
2233
- }
2234
- get tagName() { return this.nodeName; }
2235
- set tagName(value) { this.nodeName = value; }
2236
- get attributes() {
2237
- if (this.__attributeMap == null) {
2238
- this.__attributeMap = new MockAttributeMap(true);
2239
- }
2240
- return this.__attributeMap;
2241
- }
2242
- set attributes(attrs) {
2243
- this.__attributeMap = attrs;
2244
- }
2245
- }
2246
- class MockTextNode extends MockNode {
2247
- constructor(ownerDocument, text) {
2248
- super(ownerDocument, 3 /* TEXT_NODE */, "#text" /* TEXT_NODE */, text);
2249
- }
2250
- cloneNode(_deep) {
2251
- return new MockTextNode(null, this.nodeValue);
2252
- }
2253
- get textContent() {
2254
- return this.nodeValue;
2255
- }
2256
- set textContent(text) {
2257
- this.nodeValue = text;
2258
- }
2259
- get data() {
2260
- return this.nodeValue;
2261
- }
2262
- set data(text) {
2263
- this.nodeValue = text;
2264
- }
2265
- get wholeText() {
2266
- if (this.parentNode != null) {
2267
- const text = [];
2268
- for (let i = 0, ii = this.parentNode.childNodes.length; i < ii; i++) {
2269
- const childNode = this.parentNode.childNodes[i];
2270
- if (childNode.nodeType === 3 /* TEXT_NODE */) {
2271
- text.push(childNode.nodeValue);
2272
- }
2273
- }
2274
- return text.join('');
2275
- }
2276
- return this.nodeValue;
2277
- }
2278
- }
2279
- function getTextContent(childNodes, text) {
2280
- for (let i = 0, ii = childNodes.length; i < ii; i++) {
2281
- const childNode = childNodes[i];
2282
- if (childNode.nodeType === 3 /* TEXT_NODE */) {
2283
- text.push(childNode.nodeValue);
2284
- }
2285
- else if (childNode.nodeType === 1 /* ELEMENT_NODE */) {
2286
- getTextContent(childNode.childNodes, text);
2287
- }
2288
- }
2289
- }
2290
- function setTextContent(elm, text) {
2291
- for (let i = elm.childNodes.length - 1; i >= 0; i--) {
2292
- elm.removeChild(elm.childNodes[i]);
2293
- }
2294
- const textNode = new MockTextNode(elm.ownerDocument, text);
2295
- elm.appendChild(textNode);
2296
- }
2297
-
2298
- class MockComment extends MockNode {
2299
- constructor(ownerDocument, data) {
2300
- super(ownerDocument, 8 /* COMMENT_NODE */, "#comment" /* COMMENT_NODE */, data);
2301
- }
2302
- cloneNode(_deep) {
2303
- return new MockComment(null, this.nodeValue);
2304
- }
2305
- get textContent() {
2306
- return this.nodeValue;
2307
- }
2308
- set textContent(text) {
2309
- this.nodeValue = text;
2310
- }
2311
- }
2312
-
2313
- class MockDocumentFragment extends MockHTMLElement {
2314
- constructor(ownerDocument) {
2315
- super(ownerDocument, null);
2316
- this.nodeName = "#document-fragment" /* DOCUMENT_FRAGMENT_NODE */;
2317
- this.nodeType = 11 /* DOCUMENT_FRAGMENT_NODE */;
2318
- }
2319
- getElementById(id) {
2320
- return getElementById(this, id);
2321
- }
2322
- cloneNode(deep) {
2323
- const cloned = new MockDocumentFragment(null);
2324
- if (deep) {
2325
- for (let i = 0, ii = this.childNodes.length; i < ii; i++) {
2326
- const childNode = this.childNodes[i];
2327
- if (childNode.nodeType === 1 /* ELEMENT_NODE */ || childNode.nodeType === 3 /* TEXT_NODE */ || childNode.nodeType === 8 /* COMMENT_NODE */) {
2328
- const clonedChildNode = this.childNodes[i].cloneNode(true);
2329
- cloned.appendChild(clonedChildNode);
2330
- }
2331
- }
2332
- }
2333
- return cloned;
2334
- }
2335
- }
2336
-
2337
- class MockDocumentTypeNode extends MockHTMLElement {
2338
- constructor(ownerDocument) {
2339
- super(ownerDocument, '!DOCTYPE');
2340
- this.nodeType = 10 /* DOCUMENT_TYPE_NODE */;
2341
- this.setAttribute('html', '');
2342
- }
2343
- }
2344
-
2345
- class MockCSSRule {
2346
- constructor(parentStyleSheet) {
2347
- this.parentStyleSheet = parentStyleSheet;
2348
- this.cssText = '';
2349
- this.type = 0;
2350
- }
2351
- }
2352
- class MockCSSStyleSheet {
2353
- constructor(ownerNode) {
2354
- this.type = 'text/css';
2355
- this.parentStyleSheet = null;
2356
- this.cssRules = [];
2357
- this.ownerNode = ownerNode;
2358
- }
2359
- get rules() {
2360
- return this.cssRules;
2361
- }
2362
- set rules(rules) {
2363
- this.cssRules = rules;
2364
- }
2365
- deleteRule(index) {
2366
- if (index >= 0 && index < this.cssRules.length) {
2367
- this.cssRules.splice(index, 1);
2368
- updateStyleTextNode(this.ownerNode);
2369
- }
2370
- }
2371
- insertRule(rule, index = 0) {
2372
- if (typeof index !== 'number') {
2373
- index = 0;
2374
- }
2375
- if (index < 0) {
2376
- index = 0;
2377
- }
2378
- if (index > this.cssRules.length) {
2379
- index = this.cssRules.length;
2380
- }
2381
- const cssRule = new MockCSSRule(this);
2382
- cssRule.cssText = rule;
2383
- this.cssRules.splice(index, 0, cssRule);
2384
- updateStyleTextNode(this.ownerNode);
2385
- return index;
2386
- }
2387
- }
2388
- function getStyleElementText(styleElm) {
2389
- const output = [];
2390
- for (let i = 0; i < styleElm.childNodes.length; i++) {
2391
- output.push(styleElm.childNodes[i].nodeValue);
2392
- }
2393
- return output.join('');
2394
- }
2395
- function setStyleElementText(styleElm, text) {
2396
- // keeping the innerHTML and the sheet.cssRules connected
2397
- // is not technically correct, but since we're doing
2398
- // SSR we'll need to turn any assigned cssRules into
2399
- // real text, not just properties that aren't rendered
2400
- const sheet = styleElm.sheet;
2401
- sheet.cssRules.length = 0;
2402
- sheet.insertRule(text);
2403
- updateStyleTextNode(styleElm);
2404
- }
2405
- function updateStyleTextNode(styleElm) {
2406
- const childNodeLen = styleElm.childNodes.length;
2407
- if (childNodeLen > 1) {
2408
- for (let i = childNodeLen - 1; i >= 1; i--) {
2409
- styleElm.removeChild(styleElm.childNodes[i]);
2410
- }
2411
- }
2412
- else if (childNodeLen < 1) {
2413
- styleElm.appendChild(styleElm.ownerDocument.createTextNode(''));
2414
- }
2415
- const textNode = styleElm.childNodes[0];
2416
- textNode.nodeValue = styleElm.sheet.cssRules.map(r => r.cssText).join('\n');
2417
- }
2418
-
2419
- const URL_ = /*@__PURE__*/(function(){
2420
- if (typeof URL === 'function') {
2421
- return URL;
2422
- }
2423
- const requireFunc = typeof __webpack_require__ === 'function' ? __non_webpack_require__ : require;
2424
- if (typeof requireFunc === 'function') {
2425
- try {
2426
- return requireFunc('url').URL;
2427
- } catch (e) {}
2428
- }
2429
- return function() {}
2430
- })();
2431
-
2432
- function createElement(ownerDocument, tagName) {
2433
- if (typeof tagName !== 'string' || tagName === '' || !(/^[a-z0-9-_:]+$/i.test(tagName))) {
2434
- throw new Error(`The tag name provided (${tagName}) is not a valid name.`);
2435
- }
2436
- tagName = tagName.toLowerCase();
2437
- switch (tagName) {
2438
- case 'a':
2439
- return new MockAnchorElement(ownerDocument);
2440
- case 'base':
2441
- return new MockBaseElement(ownerDocument);
2442
- case 'button':
2443
- return new MockButtonElement(ownerDocument);
2444
- case 'canvas':
2445
- return new MockCanvasElement(ownerDocument);
2446
- case 'form':
2447
- return new MockFormElement(ownerDocument);
2448
- case 'img':
2449
- return new MockImageElement(ownerDocument);
2450
- case 'input':
2451
- return new MockInputElement(ownerDocument);
2452
- case 'link':
2453
- return new MockLinkElement(ownerDocument);
2454
- case 'meta':
2455
- return new MockMetaElement(ownerDocument);
2456
- case 'script':
2457
- return new MockScriptElement(ownerDocument);
2458
- case 'style':
2459
- return new MockStyleElement(ownerDocument);
2460
- case 'template':
2461
- return new MockTemplateElement(ownerDocument);
2462
- case 'title':
2463
- return new MockTitleElement(ownerDocument);
2464
- }
2465
- if (ownerDocument != null && tagName.includes('-')) {
2466
- const win = ownerDocument.defaultView;
2467
- if (win != null && win.customElements != null) {
2468
- return createCustomElement(win.customElements, ownerDocument, tagName);
2469
- }
2470
- }
2471
- return new MockHTMLElement(ownerDocument, tagName);
2472
- }
2473
- function createElementNS(ownerDocument, namespaceURI, tagName) {
2474
- if (namespaceURI === 'http://www.w3.org/1999/xhtml') {
2475
- return createElement(ownerDocument, tagName);
2476
- }
2477
- else if (namespaceURI === 'http://www.w3.org/2000/svg') {
2478
- return new MockSVGElement(ownerDocument, tagName);
2479
- }
2480
- else {
2481
- return new MockElement(ownerDocument, tagName);
2482
- }
2483
- }
2484
- class MockAnchorElement extends MockHTMLElement {
2485
- constructor(ownerDocument) {
2486
- super(ownerDocument, 'a');
2487
- }
2488
- get href() {
2489
- return fullUrl(this, 'href');
2490
- }
2491
- set href(value) {
2492
- this.setAttribute('href', value);
2493
- }
2494
- }
2495
- class MockButtonElement extends MockHTMLElement {
2496
- constructor(ownerDocument) {
2497
- super(ownerDocument, 'button');
2498
- }
2499
- }
2500
- patchPropAttributes(MockButtonElement.prototype, {
2501
- type: String
2502
- }, {
2503
- type: 'submit'
2504
- });
2505
- class MockImageElement extends MockHTMLElement {
2506
- constructor(ownerDocument) {
2507
- super(ownerDocument, 'img');
2508
- }
2509
- get src() {
2510
- return fullUrl(this, 'src');
2511
- }
2512
- set src(value) {
2513
- this.setAttribute('src', value);
2514
- }
2515
- }
2516
- patchPropAttributes(MockImageElement.prototype, {
2517
- height: Number,
2518
- width: Number
2519
- });
2520
- class MockInputElement extends MockHTMLElement {
2521
- constructor(ownerDocument) {
2522
- super(ownerDocument, 'input');
2523
- }
2524
- get list() {
2525
- const listId = this.getAttribute('list');
2526
- if (listId) {
2527
- return this.ownerDocument.getElementById(listId);
2528
- }
2529
- return null;
2530
- }
2531
- }
2532
- patchPropAttributes(MockInputElement.prototype, {
2533
- accept: String,
2534
- autocomplete: String,
2535
- autofocus: Boolean,
2536
- capture: String,
2537
- checked: Boolean,
2538
- disabled: Boolean,
2539
- form: String,
2540
- formaction: String,
2541
- formenctype: String,
2542
- formmethod: String,
2543
- formnovalidate: String,
2544
- formtarget: String,
2545
- height: Number,
2546
- inputmode: String,
2547
- max: String,
2548
- maxLength: Number,
2549
- min: String,
2550
- minLength: Number,
2551
- multiple: Boolean,
2552
- name: String,
2553
- pattern: String,
2554
- placeholder: String,
2555
- required: Boolean,
2556
- readOnly: Boolean,
2557
- size: Number,
2558
- spellCheck: Boolean,
2559
- src: String,
2560
- step: String,
2561
- type: String,
2562
- value: String,
2563
- width: Number
2564
- }, {
2565
- type: 'text'
2566
- });
2567
- class MockFormElement extends MockHTMLElement {
2568
- constructor(ownerDocument) {
2569
- super(ownerDocument, 'form');
2570
- }
2571
- }
2572
- patchPropAttributes(MockFormElement.prototype, {
2573
- name: String
2574
- });
2575
- class MockLinkElement extends MockHTMLElement {
2576
- constructor(ownerDocument) {
2577
- super(ownerDocument, 'link');
2578
- }
2579
- get href() {
2580
- return fullUrl(this, 'href');
2581
- }
2582
- set href(value) {
2583
- this.setAttribute('href', value);
2584
- }
2585
- }
2586
- patchPropAttributes(MockLinkElement.prototype, {
2587
- crossorigin: String,
2588
- media: String,
2589
- rel: String,
2590
- type: String
2591
- });
2592
- class MockMetaElement extends MockHTMLElement {
2593
- constructor(ownerDocument) {
2594
- super(ownerDocument, 'meta');
2595
- }
2596
- }
2597
- patchPropAttributes(MockMetaElement.prototype, {
2598
- charset: String,
2599
- content: String,
2600
- name: String
2601
- });
2602
- class MockScriptElement extends MockHTMLElement {
2603
- constructor(ownerDocument) {
2604
- super(ownerDocument, 'script');
2605
- }
2606
- get src() {
2607
- return fullUrl(this, 'src');
2608
- }
2609
- set src(value) {
2610
- this.setAttribute('src', value);
2611
- }
2612
- }
2613
- patchPropAttributes(MockScriptElement.prototype, {
2614
- type: String
2615
- });
2616
- class MockStyleElement extends MockHTMLElement {
2617
- constructor(ownerDocument) {
2618
- super(ownerDocument, 'style');
2619
- this.sheet = new MockCSSStyleSheet(this);
2620
- }
2621
- get innerHTML() {
2622
- return getStyleElementText(this);
2623
- }
2624
- set innerHTML(value) {
2625
- setStyleElementText(this, value);
2626
- }
2627
- get innerText() {
2628
- return getStyleElementText(this);
2629
- }
2630
- set innerText(value) {
2631
- setStyleElementText(this, value);
2632
- }
2633
- get textContent() {
2634
- return getStyleElementText(this);
2635
- }
2636
- set textContent(value) {
2637
- setStyleElementText(this, value);
2638
- }
2639
- }
2640
- class MockSVGElement extends MockElement {
2641
- // SVGElement properties and methods
2642
- get ownerSVGElement() { return null; }
2643
- get viewportElement() { return null; }
2644
- focus() { }
2645
- onunload() { }
2646
- // SVGGeometryElement properties and methods
2647
- get pathLength() { return 0; }
2648
- isPointInFill(_pt) { return false; }
2649
- isPointInStroke(_pt) { return false; }
2650
- getTotalLength() { return 0; }
2651
- }
2652
- class MockBaseElement extends MockHTMLElement {
2653
- constructor(ownerDocument) {
2654
- super(ownerDocument, 'base');
2655
- }
2656
- get href() {
2657
- return fullUrl(this, 'href');
2658
- }
2659
- set href(value) {
2660
- this.setAttribute('href', value);
2661
- }
2662
- }
2663
- class MockTemplateElement extends MockHTMLElement {
2664
- constructor(ownerDocument) {
2665
- super(ownerDocument, 'template');
2666
- this.content = new MockDocumentFragment(ownerDocument);
2667
- }
2668
- get innerHTML() {
2669
- return this.content.innerHTML;
2670
- }
2671
- set innerHTML(html) {
2672
- this.content.innerHTML = html;
2673
- }
2674
- cloneNode(deep) {
2675
- const cloned = new MockTemplateElement(null);
2676
- cloned.attributes = cloneAttributes(this.attributes);
2677
- const styleCssText = this.getAttribute('style');
2678
- if (styleCssText != null && styleCssText.length > 0) {
2679
- cloned.setAttribute('style', styleCssText);
2680
- }
2681
- cloned.content = this.content.cloneNode(deep);
2682
- if (deep) {
2683
- for (let i = 0, ii = this.childNodes.length; i < ii; i++) {
2684
- const clonedChildNode = this.childNodes[i].cloneNode(true);
2685
- cloned.appendChild(clonedChildNode);
2686
- }
2687
- }
2688
- return cloned;
2689
- }
2690
- }
2691
- class MockTitleElement extends MockHTMLElement {
2692
- constructor(ownerDocument) {
2693
- super(ownerDocument, 'title');
2694
- }
2695
- get text() {
2696
- return this.textContent;
2697
- }
2698
- set text(value) {
2699
- this.textContent = value;
2700
- }
2701
- }
2702
- class MockCanvasElement extends MockHTMLElement {
2703
- constructor(ownerDocument) {
2704
- super(ownerDocument, 'canvas');
2705
- }
2706
- getContext() {
2707
- return {
2708
- fillRect: function () { return; },
2709
- clearRect: function () { return; },
2710
- getImageData: function (_, __, w, h) {
2711
- return {
2712
- data: new Array(w * h * 4)
2713
- };
2714
- },
2715
- putImageData: function () { return; },
2716
- createImageData: function () { return []; },
2717
- setTransform: function () { return; },
2718
- drawImage: function () { return; },
2719
- save: function () { return; },
2720
- fillText: function () { return; },
2721
- restore: function () { return; },
2722
- beginPath: function () { return; },
2723
- moveTo: function () { return; },
2724
- lineTo: function () { return; },
2725
- closePath: function () { return; },
2726
- stroke: function () { return; },
2727
- translate: function () { return; },
2728
- scale: function () { return; },
2729
- rotate: function () { return; },
2730
- arc: function () { return; },
2731
- fill: function () { return; },
2732
- measureText: function () {
2733
- return { width: 0 };
2734
- },
2735
- transform: function () { return; },
2736
- rect: function () { return; },
2737
- clip: function () { return; },
2738
- };
2739
- }
2740
- }
2741
- function fullUrl(elm, attrName) {
2742
- const val = elm.getAttribute(attrName) || '';
2743
- if (elm.ownerDocument != null) {
2744
- const win = elm.ownerDocument.defaultView;
2745
- if (win != null) {
2746
- const loc = win.location;
2747
- if (loc != null) {
2748
- const url = new URL_(val, loc.href);
2749
- return url.href;
2750
- }
2751
- }
2752
- }
2753
- return val.replace(/\'|\"/g, '').trim();
2754
- }
2755
- function patchPropAttributes(prototype, attrs, defaults = {}) {
2756
- Object.keys(attrs).forEach(propName => {
2757
- const attr = attrs[propName];
2758
- const defaultValue = defaults[propName];
2759
- if (attr === Boolean) {
2760
- Object.defineProperty(prototype, propName, {
2761
- get() {
2762
- return this.hasAttribute(propName);
2763
- },
2764
- set(value) {
2765
- if (value) {
2766
- this.setAttribute(propName, '');
2767
- }
2768
- else {
2769
- this.removeAttribute(propName);
2770
- }
2771
- }
2772
- });
2773
- }
2774
- else if (attr === Number) {
2775
- Object.defineProperty(prototype, propName, {
2776
- get() {
2777
- const value = this.getAttribute(propName);
2778
- return (value
2779
- ? parseInt(value, 10)
2780
- : defaultValue === undefined ? 0 : defaultValue);
2781
- },
2782
- set(value) {
2783
- this.setAttribute(propName, value);
2784
- }
2785
- });
2786
- }
2787
- else {
2788
- Object.defineProperty(prototype, propName, {
2789
- get() {
2790
- return this.hasAttribute(propName)
2791
- ? this.getAttribute(propName)
2792
- : defaultValue || '';
2793
- },
2794
- set(value) {
2795
- this.setAttribute(propName, value);
2796
- }
2797
- });
2798
- }
2799
- });
2800
- }
2801
- MockElement.prototype.cloneNode = function (deep) {
2802
- // because we're creating elements, which extending specific HTML base classes there
2803
- // is a MockElement circular reference that bundling has trouble dealing with so
2804
- // the fix is to add cloneNode() to MockElement's prototype after the HTML classes
2805
- const cloned = createElement(this.ownerDocument, this.nodeName);
2806
- cloned.attributes = cloneAttributes(this.attributes);
2807
- const styleCssText = this.getAttribute('style');
2808
- if (styleCssText != null && styleCssText.length > 0) {
2809
- cloned.setAttribute('style', styleCssText);
2810
- }
2811
- if (deep) {
2812
- for (let i = 0, ii = this.childNodes.length; i < ii; i++) {
2813
- const clonedChildNode = this.childNodes[i].cloneNode(true);
2814
- cloned.appendChild(clonedChildNode);
2815
- }
2816
- }
2817
- return cloned;
2818
- };
2819
-
2820
- let sharedDocument;
2821
- function parseHtmlToDocument(html, ownerDocument = null) {
2822
- if (ownerDocument == null) {
2823
- if (sharedDocument == null) {
2824
- sharedDocument = new MockDocument();
2825
- }
2826
- ownerDocument = sharedDocument;
2827
- }
2828
- return parseDocumentUtil(ownerDocument, html);
2829
- }
2830
- function parseHtmlToFragment(html, ownerDocument = null) {
2831
- if (ownerDocument == null) {
2832
- if (sharedDocument == null) {
2833
- sharedDocument = new MockDocument();
2834
- }
2835
- ownerDocument = sharedDocument;
2836
- }
2837
- return parseFragmentUtil(ownerDocument, html);
2838
- }
2839
-
2840
- function setupGlobal(gbl) {
2841
- if (gbl.window == null) {
2842
- const win = gbl.window = new MockWindow();
2843
- WINDOW_FUNCTIONS.forEach(fnName => {
2844
- if (!(fnName in gbl)) {
2845
- gbl[fnName] = win[fnName].bind(win);
2846
- }
2847
- });
2848
- WINDOW_PROPS.forEach(propName => {
2849
- if (!(propName in gbl)) {
2850
- Object.defineProperty(gbl, propName, {
2851
- get() { return win[propName]; },
2852
- set(val) { win[propName] = val; },
2853
- configurable: true,
2854
- enumerable: true
2855
- });
2856
- }
2857
- });
2858
- GLOBAL_CONSTRUCTORS.forEach(([cstrName]) => {
2859
- gbl[cstrName] = win[cstrName];
2860
- });
2861
- }
2862
- return gbl.window;
2863
- }
2864
- function teardownGlobal(gbl) {
2865
- const win = gbl.window;
2866
- if (win && typeof win.close === 'function') {
2867
- win.close();
2868
- }
2869
- }
2870
- function patchWindow(winToBePatched) {
2871
- const mockWin = new MockWindow(false);
2872
- WINDOW_FUNCTIONS.forEach(fnName => {
2873
- if (typeof winToBePatched[fnName] !== 'function') {
2874
- winToBePatched[fnName] = mockWin[fnName].bind(mockWin);
2875
- }
2876
- });
2877
- WINDOW_PROPS.forEach(propName => {
2878
- if (winToBePatched === undefined) {
2879
- Object.defineProperty(winToBePatched, propName, {
2880
- get() { return mockWin[propName]; },
2881
- set(val) { mockWin[propName] = val; },
2882
- configurable: true,
2883
- enumerable: true
2884
- });
2885
- }
2886
- });
2887
- }
2888
- function addGlobalsToWindowPrototype(mockWinPrototype) {
2889
- GLOBAL_CONSTRUCTORS.forEach(([cstrName, Cstr]) => {
2890
- Object.defineProperty(mockWinPrototype, cstrName, {
2891
- get() {
2892
- return (this['__' + cstrName]) || Cstr;
2893
- },
2894
- set(cstr) {
2895
- this['__' + cstrName] = cstr;
2896
- },
2897
- configurable: true,
2898
- enumerable: true,
2899
- });
2900
- });
2901
- }
2902
- const WINDOW_FUNCTIONS = [
2903
- 'addEventListener',
2904
- 'alert',
2905
- 'blur',
2906
- 'cancelAnimationFrame',
2907
- 'cancelIdleCallback',
2908
- 'clearInterval',
2909
- 'clearTimeout',
2910
- 'close',
2911
- 'confirm',
2912
- 'dispatchEvent',
2913
- 'focus',
2914
- 'getComputedStyle',
2915
- 'matchMedia',
2916
- 'open',
2917
- 'prompt',
2918
- 'removeEventListener',
2919
- 'requestAnimationFrame',
2920
- 'requestIdleCallback',
2921
- 'URL'
2922
- ];
2923
- const WINDOW_PROPS = [
2924
- 'customElements',
2925
- 'devicePixelRatio',
2926
- 'document',
2927
- 'history',
2928
- 'innerHeight',
2929
- 'innerWidth',
2930
- 'localStorage',
2931
- 'location',
2932
- 'navigator',
2933
- 'pageXOffset',
2934
- 'pageYOffset',
2935
- 'performance',
2936
- 'screenLeft',
2937
- 'screenTop',
2938
- 'screenX',
2939
- 'screenY',
2940
- 'scrollX',
2941
- 'scrollY',
2942
- 'sessionStorage',
2943
- 'CSS',
2944
- 'CustomEvent',
2945
- 'Event',
2946
- 'Element',
2947
- 'HTMLElement',
2948
- 'Node',
2949
- 'NodeList',
2950
- 'KeyboardEvent',
2951
- 'MouseEvent'
2952
- ];
2953
- const GLOBAL_CONSTRUCTORS = [
2954
- ['CustomEvent', MockCustomEvent],
2955
- ['Event', MockEvent],
2956
- ['KeyboardEvent', MockKeyboardEvent],
2957
- ['MouseEvent', MockMouseEvent],
2958
- ['HTMLAnchorElement', MockAnchorElement],
2959
- ['HTMLBaseElement', MockBaseElement],
2960
- ['HTMLButtonElement', MockButtonElement],
2961
- ['HTMLCanvasElement', MockCanvasElement],
2962
- ['HTMLFormElement', MockFormElement],
2963
- ['HTMLImageElement', MockImageElement],
2964
- ['HTMLInputElement', MockInputElement],
2965
- ['HTMLLinkElement', MockLinkElement],
2966
- ['HTMLMetaElement', MockMetaElement],
2967
- ['HTMLScriptElement', MockScriptElement],
2968
- ['HTMLStyleElement', MockStyleElement],
2969
- ['HTMLTemplateElement', MockTemplateElement],
2970
- ['HTMLTitleElement', MockTitleElement],
2971
- ];
2972
-
2973
- const consoleNoop = () => { };
2974
- function createConsole() {
2975
- return {
2976
- debug: consoleNoop,
2977
- error: consoleNoop,
2978
- info: consoleNoop,
2979
- log: consoleNoop,
2980
- warn: consoleNoop,
2981
- dir: consoleNoop,
2982
- dirxml: consoleNoop,
2983
- table: consoleNoop,
2984
- trace: consoleNoop,
2985
- group: consoleNoop,
2986
- groupCollapsed: consoleNoop,
2987
- groupEnd: consoleNoop,
2988
- clear: consoleNoop,
2989
- count: consoleNoop,
2990
- countReset: consoleNoop,
2991
- assert: consoleNoop,
2992
- profile: consoleNoop,
2993
- profileEnd: consoleNoop,
2994
- time: consoleNoop,
2995
- timeLog: consoleNoop,
2996
- timeEnd: consoleNoop,
2997
- timeStamp: consoleNoop,
2998
- context: consoleNoop,
2999
- memory: consoleNoop
3000
- };
3001
- }
3002
-
3003
- class MockHistory {
3004
- constructor() {
3005
- this.items = [];
3006
- }
3007
- get length() {
3008
- return this.items.length;
3009
- }
3010
- back() {
3011
- this.go(-1);
3012
- }
3013
- forward() {
3014
- this.go(1);
3015
- }
3016
- go(_value) {
3017
- //
3018
- }
3019
- pushState(_state, _title, _url) {
3020
- //
3021
- }
3022
- replaceState(_state, _title, _url) {
3023
- //
3024
- }
3025
- }
3026
-
3027
- class MockIntersectionObserver {
3028
- constructor() { }
3029
- disconnect() { }
3030
- observe() { }
3031
- takeRecords() {
3032
- return [];
3033
- }
3034
- unobserve() { }
3035
- }
3036
-
3037
- class MockLocation {
3038
- constructor() {
3039
- this.ancestorOrigins = null;
3040
- this.protocol = '';
3041
- this.host = '';
3042
- this.hostname = '';
3043
- this.port = '';
3044
- this.pathname = '';
3045
- this.search = '';
3046
- this.hash = '';
3047
- this.username = '';
3048
- this.password = '';
3049
- this.origin = '';
3050
- this._href = '';
3051
- }
3052
- get href() {
3053
- return this._href;
3054
- }
3055
- set href(value) {
3056
- const url = new URL_(value, 'http://mockdoc-rindojs.web.app');
3057
- this._href = url.href;
3058
- this.protocol = url.protocol;
3059
- this.host = url.host;
3060
- this.port = url.port;
3061
- this.pathname = url.pathname;
3062
- this.search = url.search;
3063
- this.hash = url.hash;
3064
- this.username = url.username;
3065
- this.password = url.password;
3066
- this.origin = url.origin;
3067
- }
3068
- assign(_url) {
3069
- //
3070
- }
3071
- reload(_forcedReload) {
3072
- //
3073
- }
3074
- replace(_url) {
3075
- //
3076
- }
3077
- toString() {
3078
- return this.href;
3079
- }
3080
- }
3081
-
3082
- class MockNavigator {
3083
- constructor() {
3084
- this.appCodeName = 'MockNavigator';
3085
- this.appName = 'MockNavigator';
3086
- this.appVersion = 'MockNavigator';
3087
- this.platform = 'MockNavigator';
3088
- this.userAgent = 'MockNavigator';
3089
- }
3090
- }
3091
-
3092
- /**
3093
- * https://developer.mozilla.org/en-US/docs/Web/API/Performance
3094
- */
3095
- class MockPerformance {
3096
- constructor() {
3097
- this.timeOrigin = Date.now();
3098
- }
3099
- addEventListener() {
3100
- //
3101
- }
3102
- clearMarks() {
3103
- //
3104
- }
3105
- clearMeasures() {
3106
- //
3107
- }
3108
- clearResourceTimings() {
3109
- //
3110
- }
3111
- dispatchEvent() {
3112
- return true;
3113
- }
3114
- getEntries() {
3115
- return [];
3116
- }
3117
- getEntriesByName() {
3118
- return [];
3119
- }
3120
- getEntriesByType() {
3121
- return [];
3122
- }
3123
- mark() {
3124
- //
3125
- }
3126
- measure() {
3127
- //
3128
- }
3129
- get navigation() {
3130
- return {};
3131
- }
3132
- now() {
3133
- return Date.now() - this.timeOrigin;
3134
- }
3135
- get onresourcetimingbufferfull() {
3136
- return null;
3137
- }
3138
- removeEventListener() {
3139
- //
3140
- }
3141
- setResourceTimingBufferSize() {
3142
- //
3143
- }
3144
- get timing() {
3145
- return {};
3146
- }
3147
- toJSON() {
3148
- //
3149
- }
3150
- }
3151
- function resetPerformance(perf) {
3152
- if (perf != null) {
3153
- try {
3154
- perf.timeOrigin = Date.now();
3155
- }
3156
- catch (e) { }
3157
- }
3158
- }
3159
-
3160
- class MockStorage {
3161
- constructor() {
3162
- this.items = new Map();
3163
- }
3164
- key(_value) {
3165
- //
3166
- }
3167
- getItem(key) {
3168
- key = String(key);
3169
- if (this.items.has(key)) {
3170
- return this.items.get(key);
3171
- }
3172
- return null;
3173
- }
3174
- setItem(key, value) {
3175
- if (value == null) {
3176
- value = 'null';
3177
- }
3178
- this.items.set(String(key), String(value));
3179
- }
3180
- removeItem(key) {
3181
- this.items.delete(String(key));
3182
- }
3183
- clear() {
3184
- this.items.clear();
3185
- }
3186
- }
3187
-
3188
- const nativeClearInterval = clearInterval;
3189
- const nativeClearTimeout = clearTimeout;
3190
- const nativeSetInterval = setInterval;
3191
- const nativeSetTimeout = setTimeout;
3192
- const nativeURL = URL_;
3193
- class MockWindow {
3194
- constructor(html = null) {
3195
- if (html !== false) {
3196
- this.document = new MockDocument(html, this);
3197
- }
3198
- else {
3199
- this.document = null;
3200
- }
3201
- this.performance = new MockPerformance();
3202
- this.customElements = new MockCustomElementRegistry(this);
3203
- this.console = createConsole();
3204
- resetWindowDefaults(this);
3205
- resetWindowDimensions(this);
3206
- }
3207
- addEventListener(type, handler) {
3208
- addEventListener(this, type, handler);
3209
- }
3210
- alert(msg) {
3211
- if (this.console) {
3212
- this.console.debug(msg);
3213
- }
3214
- else {
3215
- console.debug(msg);
3216
- }
3217
- }
3218
- blur() { }
3219
- cancelAnimationFrame(id) {
3220
- this.__clearTimeout(id);
3221
- }
3222
- cancelIdleCallback(id) {
3223
- this.__clearTimeout(id);
3224
- }
3225
- clearInterval(id) {
3226
- this.__clearInterval(id);
3227
- }
3228
- clearTimeout(id) {
3229
- this.__clearTimeout(id);
3230
- }
3231
- close() {
3232
- resetWindow(this);
3233
- }
3234
- confirm() {
3235
- return false;
3236
- }
3237
- get CSS() {
3238
- return {
3239
- supports: () => true
3240
- };
3241
- }
3242
- dispatchEvent(ev) {
3243
- return dispatchEvent(this, ev);
3244
- }
3245
- get Element() {
3246
- if (this.__elementCstr == null) {
3247
- const ownerDocument = this.document;
3248
- this.__elementCstr = class extends MockElement {
3249
- constructor() {
3250
- super(ownerDocument, '');
3251
- throw (new Error('Illegal constructor: cannot construct Element'));
3252
- }
3253
- };
3254
- }
3255
- return this.__elementCstr;
3256
- }
3257
- focus() { }
3258
- getComputedStyle(_) {
3259
- return {
3260
- cssText: '',
3261
- length: 0,
3262
- parentRule: null,
3263
- getPropertyPriority() {
3264
- return null;
3265
- },
3266
- getPropertyValue() {
3267
- return '';
3268
- },
3269
- item() {
3270
- return null;
3271
- },
3272
- removeProperty() {
3273
- return null;
3274
- },
3275
- setProperty() {
3276
- return null;
3277
- }
3278
- };
3279
- }
3280
- get globalThis() {
3281
- return this;
3282
- }
3283
- get history() {
3284
- if (this.__history == null) {
3285
- this.__history = new MockHistory();
3286
- }
3287
- return this.__history;
3288
- }
3289
- set history(hsty) {
3290
- this.__history = hsty;
3291
- }
3292
- get JSON() {
3293
- return JSON;
3294
- }
3295
- get HTMLElement() {
3296
- if (this.__htmlElementCstr == null) {
3297
- const ownerDocument = this.document;
3298
- this.__htmlElementCstr = class extends MockHTMLElement {
3299
- constructor() {
3300
- super(ownerDocument, '');
3301
- const observedAttributes = this.constructor.observedAttributes;
3302
- if (Array.isArray(observedAttributes) && typeof this.attributeChangedCallback === 'function') {
3303
- observedAttributes.forEach(attrName => {
3304
- const attrValue = this.getAttribute(attrName);
3305
- if (attrValue != null) {
3306
- this.attributeChangedCallback(attrName, null, attrValue);
3307
- }
3308
- });
3309
- }
3310
- }
3311
- };
3312
- }
3313
- return this.__htmlElementCstr;
3314
- }
3315
- get IntersectionObserver() {
3316
- return MockIntersectionObserver;
3317
- }
3318
- get localStorage() {
3319
- if (this.__localStorage == null) {
3320
- this.__localStorage = new MockStorage();
3321
- }
3322
- return this.__localStorage;
3323
- }
3324
- set localStorage(locStorage) {
3325
- this.__localStorage = locStorage;
3326
- }
3327
- get location() {
3328
- if (this.__location == null) {
3329
- this.__location = new MockLocation();
3330
- }
3331
- return this.__location;
3332
- }
3333
- set location(val) {
3334
- if (typeof val === 'string') {
3335
- if (this.__location == null) {
3336
- this.__location = new MockLocation();
3337
- }
3338
- this.__location.href = val;
3339
- }
3340
- else {
3341
- this.__location = val;
3342
- }
3343
- }
3344
- matchMedia() {
3345
- return {
3346
- matches: false
3347
- };
3348
- }
3349
- get Node() {
3350
- if (this.__nodeCstr == null) {
3351
- const ownerDocument = this.document;
3352
- this.__nodeCstr = class extends MockNode {
3353
- constructor() {
3354
- super(ownerDocument, 0, 'test', '');
3355
- throw (new Error('Illegal constructor: cannot construct Node'));
3356
- }
3357
- };
3358
- }
3359
- return this.__nodeCstr;
3360
- }
3361
- get NodeList() {
3362
- if (this.__nodeListCstr == null) {
3363
- const ownerDocument = this.document;
3364
- this.__nodeListCstr = class extends MockNodeList {
3365
- constructor() {
3366
- super(ownerDocument, [], 0);
3367
- throw (new Error('Illegal constructor: cannot construct NodeList'));
3368
- }
3369
- };
3370
- }
3371
- return this.__nodeListCstr;
3372
- }
3373
- get navigator() {
3374
- if (this.__navigator == null) {
3375
- this.__navigator = new MockNavigator();
3376
- }
3377
- return this.__navigator;
3378
- }
3379
- set navigator(nav) {
3380
- this.__navigator = nav;
3381
- }
3382
- get parent() {
3383
- return null;
3384
- }
3385
- prompt() {
3386
- return '';
3387
- }
3388
- open() {
3389
- return null;
3390
- }
3391
- get origin() {
3392
- return this.location.origin;
3393
- }
3394
- removeEventListener(type, handler) {
3395
- removeEventListener(this, type, handler);
3396
- }
3397
- requestAnimationFrame(callback) {
3398
- return this.setTimeout(() => {
3399
- callback(Date.now());
3400
- }, 0);
3401
- }
3402
- requestIdleCallback(callback) {
3403
- return this.setTimeout(() => {
3404
- callback({
3405
- didTimeout: false,
3406
- timeRemaining: () => 0
3407
- });
3408
- }, 0);
3409
- }
3410
- scroll(_x, _y) { }
3411
- scrollBy(_x, _y) { }
3412
- scrollTo(_x, _y) { }
3413
- get self() {
3414
- return this;
3415
- }
3416
- get sessionStorage() {
3417
- if (this.__sessionStorage == null) {
3418
- this.__sessionStorage = new MockStorage();
3419
- }
3420
- return this.__sessionStorage;
3421
- }
3422
- set sessionStorage(locStorage) {
3423
- this.__sessionStorage = locStorage;
3424
- }
3425
- setInterval(callback, ms, ...args) {
3426
- if (this.__timeouts == null) {
3427
- this.__timeouts = new Set();
3428
- }
3429
- ms = Math.min(ms, this.__maxTimeout);
3430
- if (this.__allowInterval) {
3431
- const intervalId = this.__setInterval(() => {
3432
- this.__timeouts.delete(intervalId);
3433
- try {
3434
- callback(...args);
3435
- }
3436
- catch (e) {
3437
- if (this.console) {
3438
- this.console.error(e);
3439
- }
3440
- else {
3441
- console.error(e);
3442
- }
3443
- }
3444
- }, ms);
3445
- this.__timeouts.add(intervalId);
3446
- return intervalId;
3447
- }
3448
- const timeoutId = this.__setTimeout(() => {
3449
- this.__timeouts.delete(timeoutId);
3450
- try {
3451
- callback(...args);
3452
- }
3453
- catch (e) {
3454
- if (this.console) {
3455
- this.console.error(e);
3456
- }
3457
- else {
3458
- console.error(e);
3459
- }
3460
- }
3461
- }, ms);
3462
- this.__timeouts.add(timeoutId);
3463
- return timeoutId;
3464
- }
3465
- setTimeout(callback, ms, ...args) {
3466
- if (this.__timeouts == null) {
3467
- this.__timeouts = new Set();
3468
- }
3469
- ms = Math.min(ms, this.__maxTimeout);
3470
- const timeoutId = this.__setTimeout(() => {
3471
- this.__timeouts.delete(timeoutId);
3472
- try {
3473
- callback(...args);
3474
- }
3475
- catch (e) {
3476
- if (this.console) {
3477
- this.console.error(e);
3478
- }
3479
- else {
3480
- console.error(e);
3481
- }
3482
- }
3483
- }, ms);
3484
- this.__timeouts.add(timeoutId);
3485
- return timeoutId;
3486
- }
3487
- get top() {
3488
- return this;
3489
- }
3490
- get window() {
3491
- return this;
3492
- }
3493
- onanimationstart() { }
3494
- onanimationend() { }
3495
- onanimationiteration() { }
3496
- onabort() { }
3497
- onauxclick() { }
3498
- onbeforecopy() { }
3499
- onbeforecut() { }
3500
- onbeforepaste() { }
3501
- onblur() { }
3502
- oncancel() { }
3503
- oncanplay() { }
3504
- oncanplaythrough() { }
3505
- onchange() { }
3506
- onclick() { }
3507
- onclose() { }
3508
- oncontextmenu() { }
3509
- oncopy() { }
3510
- oncuechange() { }
3511
- oncut() { }
3512
- ondblclick() { }
3513
- ondrag() { }
3514
- ondragend() { }
3515
- ondragenter() { }
3516
- ondragleave() { }
3517
- ondragover() { }
3518
- ondragstart() { }
3519
- ondrop() { }
3520
- ondurationchange() { }
3521
- onemptied() { }
3522
- onended() { }
3523
- onerror() { }
3524
- onfocus() { }
3525
- onformdata() { }
3526
- onfullscreenchange() { }
3527
- onfullscreenerror() { }
3528
- ongotpointercapture() { }
3529
- oninput() { }
3530
- oninvalid() { }
3531
- onkeydown() { }
3532
- onkeypress() { }
3533
- onkeyup() { }
3534
- onload() { }
3535
- onloadeddata() { }
3536
- onloadedmetadata() { }
3537
- onloadstart() { }
3538
- onlostpointercapture() { }
3539
- onmousedown() { }
3540
- onmouseenter() { }
3541
- onmouseleave() { }
3542
- onmousemove() { }
3543
- onmouseout() { }
3544
- onmouseover() { }
3545
- onmouseup() { }
3546
- onmousewheel() { }
3547
- onpaste() { }
3548
- onpause() { }
3549
- onplay() { }
3550
- onplaying() { }
3551
- onpointercancel() { }
3552
- onpointerdown() { }
3553
- onpointerenter() { }
3554
- onpointerleave() { }
3555
- onpointermove() { }
3556
- onpointerout() { }
3557
- onpointerover() { }
3558
- onpointerup() { }
3559
- onprogress() { }
3560
- onratechange() { }
3561
- onreset() { }
3562
- onresize() { }
3563
- onscroll() { }
3564
- onsearch() { }
3565
- onseeked() { }
3566
- onseeking() { }
3567
- onselect() { }
3568
- onselectstart() { }
3569
- onstalled() { }
3570
- onsubmit() { }
3571
- onsuspend() { }
3572
- ontimeupdate() { }
3573
- ontoggle() { }
3574
- onvolumechange() { }
3575
- onwaiting() { }
3576
- onwebkitfullscreenchange() { }
3577
- onwebkitfullscreenerror() { }
3578
- onwheel() { }
3579
- }
3580
- addGlobalsToWindowPrototype(MockWindow.prototype);
3581
- function resetWindowDefaults(win) {
3582
- win.__clearInterval = nativeClearInterval;
3583
- win.__clearTimeout = nativeClearTimeout;
3584
- win.__setInterval = nativeSetInterval;
3585
- win.__setTimeout = nativeSetTimeout;
3586
- win.__maxTimeout = 30000;
3587
- win.__allowInterval = true;
3588
- win.URL = nativeURL;
3589
- }
3590
- function cloneWindow(srcWin) {
3591
- if (srcWin == null) {
3592
- return null;
3593
- }
3594
- const clonedWin = new MockWindow(false);
3595
- if (srcWin.document != null) {
3596
- const clonedDoc = new MockDocument(false, clonedWin);
3597
- clonedWin.document = clonedDoc;
3598
- clonedDoc.documentElement = srcWin.document.documentElement.cloneNode(true);
3599
- }
3600
- else {
3601
- clonedWin.document = new MockDocument(null, clonedWin);
3602
- }
3603
- return clonedWin;
3604
- }
3605
- function cloneDocument(srcDoc) {
3606
- if (srcDoc == null) {
3607
- return null;
3608
- }
3609
- const dstWin = cloneWindow(srcDoc.defaultView);
3610
- return dstWin.document;
3611
- }
3612
- /**
3613
- * Constrain setTimeout() to 1ms, but still async. Also
3614
- * only allow setInterval() to fire once, also constrained to 1ms.
3615
- */
3616
- function constrainTimeouts(win) {
3617
- win.__allowInterval = false;
3618
- win.__maxTimeout = 0;
3619
- }
3620
- function resetWindow(win) {
3621
- if (win != null) {
3622
- if (win.__timeouts) {
3623
- win.__timeouts.forEach(timeoutId => {
3624
- nativeClearInterval(timeoutId);
3625
- nativeClearTimeout(timeoutId);
3626
- });
3627
- win.__timeouts.clear();
3628
- }
3629
- if (win.customElements && win.customElements.clear) {
3630
- win.customElements.clear();
3631
- }
3632
- resetDocument(win.document);
3633
- resetPerformance(win.performance);
3634
- for (const key in win) {
3635
- if (win.hasOwnProperty(key) && key !== 'document' && key !== 'performance' && key !== 'customElements') {
3636
- delete win[key];
3637
- }
3638
- }
3639
- resetWindowDefaults(win);
3640
- resetWindowDimensions(win);
3641
- resetEventListeners(win);
3642
- if (win.document != null) {
3643
- try {
3644
- win.document.defaultView = win;
3645
- }
3646
- catch (e) { }
3647
- }
3648
- }
3649
- }
3650
- function resetWindowDimensions(win) {
3651
- try {
3652
- win.devicePixelRatio = 1;
3653
- win.innerHeight = 768;
3654
- win.innerWidth = 1366;
3655
- win.pageXOffset = 0;
3656
- win.pageYOffset = 0;
3657
- win.screenLeft = 0;
3658
- win.screenTop = 0;
3659
- win.screenX = 0;
3660
- win.screenY = 0;
3661
- win.scrollX = 0;
3662
- win.scrollY = 0;
3663
- win.screen = {
3664
- availHeight: win.innerHeight,
3665
- availLeft: 0,
3666
- availTop: 0,
3667
- availWidth: win.innerWidth,
3668
- colorDepth: 24,
3669
- height: win.innerHeight,
3670
- keepAwake: false,
3671
- orientation: {
3672
- angle: 0,
3673
- type: 'portrait-primary'
3674
- },
3675
- pixelDepth: 24,
3676
- width: win.innerWidth
3677
- };
3678
- }
3679
- catch (e) { }
3680
- }
3681
-
3682
- class MockDocument extends MockHTMLElement {
3683
- constructor(html = null, win = null) {
3684
- super(null, null);
3685
- this.nodeName = "#document" /* DOCUMENT_NODE */;
3686
- this.nodeType = 9 /* DOCUMENT_NODE */;
3687
- this.defaultView = win;
3688
- this.cookie = '';
3689
- this.referrer = '';
3690
- this.appendChild(this.createDocumentTypeNode());
3691
- if (typeof html === 'string') {
3692
- const parsedDoc = parseDocumentUtil(this, html);
3693
- const documentElement = parsedDoc.children.find(elm => elm.nodeName === 'HTML');
3694
- if (documentElement != null) {
3695
- this.appendChild(documentElement);
3696
- setOwnerDocument(documentElement, this);
3697
- }
3698
- }
3699
- else if (html !== false) {
3700
- const documentElement = new MockHTMLElement(this, 'html');
3701
- this.appendChild(documentElement);
3702
- documentElement.appendChild(new MockHTMLElement(this, 'head'));
3703
- documentElement.appendChild(new MockHTMLElement(this, 'body'));
3704
- }
3705
- }
3706
- get location() {
3707
- if (this.defaultView != null) {
3708
- return this.defaultView.location;
3709
- }
3710
- return null;
3711
- }
3712
- set location(val) {
3713
- if (this.defaultView != null) {
3714
- this.defaultView.location = val;
3715
- }
3716
- }
3717
- get baseURI() {
3718
- const baseNode = this.head.childNodes.find(node => node.nodeName === 'BASE');
3719
- if (baseNode) {
3720
- return baseNode.href;
3721
- }
3722
- return this.URL;
3723
- }
3724
- get URL() {
3725
- return this.location.href;
3726
- }
3727
- get styleSheets() {
3728
- return this.querySelectorAll('style');
3729
- }
3730
- get scripts() {
3731
- return this.querySelectorAll('script');
3732
- }
3733
- get forms() {
3734
- return this.querySelectorAll('form');
3735
- }
3736
- get images() {
3737
- return this.querySelectorAll('img');
3738
- }
3739
- get scrollingElement() {
3740
- return this.documentElement;
3741
- }
3742
- get documentElement() {
3743
- for (let i = this.childNodes.length - 1; i >= 0; i--) {
3744
- if (this.childNodes[i].nodeName === 'HTML') {
3745
- return this.childNodes[i];
3746
- }
3747
- }
3748
- const documentElement = new MockHTMLElement(this, 'html');
3749
- this.appendChild(documentElement);
3750
- return documentElement;
3751
- }
3752
- set documentElement(documentElement) {
3753
- for (let i = this.childNodes.length - 1; i >= 0; i--) {
3754
- if (this.childNodes[i].nodeType !== 10 /* DOCUMENT_TYPE_NODE */) {
3755
- this.childNodes[i].remove();
3756
- }
3757
- }
3758
- if (documentElement != null) {
3759
- this.appendChild(documentElement);
3760
- setOwnerDocument(documentElement, this);
3761
- }
3762
- }
3763
- get head() {
3764
- const documentElement = this.documentElement;
3765
- for (let i = 0; i < documentElement.childNodes.length; i++) {
3766
- if (documentElement.childNodes[i].nodeName === 'HEAD') {
3767
- return documentElement.childNodes[i];
3768
- }
3769
- }
3770
- const head = new MockHTMLElement(this, 'head');
3771
- documentElement.insertBefore(head, documentElement.firstChild);
3772
- return head;
3773
- }
3774
- set head(head) {
3775
- const documentElement = this.documentElement;
3776
- for (let i = documentElement.childNodes.length - 1; i >= 0; i--) {
3777
- if (documentElement.childNodes[i].nodeName === 'HEAD') {
3778
- documentElement.childNodes[i].remove();
3779
- }
3780
- }
3781
- if (head != null) {
3782
- documentElement.insertBefore(head, documentElement.firstChild);
3783
- setOwnerDocument(head, this);
3784
- }
3785
- }
3786
- get body() {
3787
- const documentElement = this.documentElement;
3788
- for (let i = documentElement.childNodes.length - 1; i >= 0; i--) {
3789
- if (documentElement.childNodes[i].nodeName === 'BODY') {
3790
- return documentElement.childNodes[i];
3791
- }
3792
- }
3793
- const body = new MockHTMLElement(this, 'body');
3794
- documentElement.appendChild(body);
3795
- return body;
3796
- }
3797
- set body(body) {
3798
- const documentElement = this.documentElement;
3799
- for (let i = documentElement.childNodes.length - 1; i >= 0; i--) {
3800
- if (documentElement.childNodes[i].nodeName === 'BODY') {
3801
- documentElement.childNodes[i].remove();
3802
- }
3803
- }
3804
- if (body != null) {
3805
- documentElement.appendChild(body);
3806
- setOwnerDocument(body, this);
3807
- }
3808
- }
3809
- appendChild(newNode) {
3810
- newNode.remove();
3811
- newNode.parentNode = this;
3812
- this.childNodes.push(newNode);
3813
- return newNode;
3814
- }
3815
- createComment(data) {
3816
- return new MockComment(this, data);
3817
- }
3818
- createAttribute(attrName) {
3819
- return new MockAttr(attrName.toLowerCase(), '');
3820
- }
3821
- createAttributeNS(namespaceURI, attrName) {
3822
- return new MockAttr(attrName, '', namespaceURI);
3823
- }
3824
- createElement(tagName) {
3825
- if (tagName === "#document" /* DOCUMENT_NODE */) {
3826
- const doc = new MockDocument(false);
3827
- doc.nodeName = tagName;
3828
- doc.parentNode = null;
3829
- return doc;
3830
- }
3831
- return createElement(this, tagName);
3832
- }
3833
- createElementNS(namespaceURI, tagName) {
3834
- const elmNs = createElementNS(this, namespaceURI, tagName);
3835
- elmNs.namespaceURI = namespaceURI;
3836
- return elmNs;
3837
- }
3838
- createTextNode(text) {
3839
- return new MockTextNode(this, text);
3840
- }
3841
- createDocumentFragment() {
3842
- return new MockDocumentFragment(this);
3843
- }
3844
- createDocumentTypeNode() {
3845
- return new MockDocumentTypeNode(this);
3846
- }
3847
- getElementById(id) {
3848
- return getElementById(this, id);
3849
- }
3850
- getElementsByName(elmName) {
3851
- return getElementsByName(this, elmName.toLowerCase());
3852
- }
3853
- get title() {
3854
- const title = this.head.childNodes.find(elm => elm.nodeName === 'TITLE');
3855
- if (title != null) {
3856
- return title.textContent;
3857
- }
3858
- return '';
3859
- }
3860
- set title(value) {
3861
- const head = this.head;
3862
- let title = head.childNodes.find(elm => elm.nodeName === 'TITLE');
3863
- if (title == null) {
3864
- title = this.createElement('title');
3865
- head.appendChild(title);
3866
- }
3867
- title.textContent = value;
3868
- }
3869
- }
3870
- function createDocument(html = null) {
3871
- return new MockWindow(html).document;
3872
- }
3873
- function createFragment(html) {
3874
- return parseHtmlToFragment(html, null);
3875
- }
3876
- function resetDocument(doc) {
3877
- if (doc != null) {
3878
- resetEventListeners(doc);
3879
- const documentElement = doc.documentElement;
3880
- if (documentElement != null) {
3881
- resetElement(documentElement);
3882
- for (let i = 0, ii = documentElement.childNodes.length; i < ii; i++) {
3883
- const childNode = documentElement.childNodes[i];
3884
- resetElement(childNode);
3885
- childNode.childNodes.length = 0;
3886
- }
3887
- }
3888
- for (const key in doc) {
3889
- if (doc.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
3890
- delete doc[key];
3891
- }
3892
- }
3893
- try {
3894
- doc.nodeName = "#document" /* DOCUMENT_NODE */;
3895
- }
3896
- catch (e) { }
3897
- try {
3898
- doc.nodeType = 9 /* DOCUMENT_NODE */;
3899
- }
3900
- catch (e) { }
3901
- try {
3902
- doc.cookie = '';
3903
- }
3904
- catch (e) { }
3905
- try {
3906
- doc.referrer = '';
3907
- }
3908
- catch (e) { }
3909
- }
3910
- }
3911
- const DOC_KEY_KEEPERS = new Set([
3912
- 'nodeName',
3913
- 'nodeType',
3914
- 'nodeValue',
3915
- 'ownerDocument',
3916
- 'parentNode',
3917
- 'childNodes',
3918
- '_shadowRoot'
3919
- ]);
3920
- function getElementById(elm, id) {
3921
- const children = elm.children;
3922
- for (let i = 0, ii = children.length; i < ii; i++) {
3923
- const childElm = children[i];
3924
- if (childElm.id === id) {
3925
- return childElm;
3926
- }
3927
- const childElmFound = getElementById(childElm, id);
3928
- if (childElmFound != null) {
3929
- return childElmFound;
3930
- }
3931
- }
3932
- return null;
3933
- }
3934
- function getElementsByName(elm, elmName, foundElms = []) {
3935
- const children = elm.children;
3936
- for (let i = 0, ii = children.length; i < ii; i++) {
3937
- const childElm = children[i];
3938
- if (childElm.name && childElm.name.toLowerCase() === elmName) {
3939
- foundElms.push(childElm);
3940
- }
3941
- getElementsByName(childElm, elmName, foundElms);
3942
- }
3943
- return foundElms;
3944
- }
3945
- function setOwnerDocument(elm, ownerDocument) {
3946
- for (let i = 0, ii = elm.childNodes.length; i < ii; i++) {
3947
- elm.childNodes[i].ownerDocument = ownerDocument;
3948
- if (elm.childNodes[i].nodeType === 1 /* ELEMENT_NODE */) {
3949
- setOwnerDocument(elm.childNodes[i], ownerDocument);
3950
- }
3951
- }
3952
- }
3953
-
3954
- export { MockAttr, MockAttributeMap, MockComment, MockCustomEvent, MockDocument, MockElement, MockHTMLElement, MockKeyboardEvent, MockMouseEvent, MockNode, MockTextNode, MockWindow, cloneAttributes, cloneDocument, cloneWindow, constrainTimeouts, createDocument, createFragment, parseHtmlToDocument, parseHtmlToFragment, patchWindow, resetDocument, serializeNodeToHtml, setupGlobal, teardownGlobal };