@rindo/core 1.8.12 → 2.5.2

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 (608) hide show
  1. package/LICENSE.md +27 -27
  2. package/bin/cli.ts +20 -0
  3. package/bin/rindo +51 -22
  4. package/cli/index.cjs +1263 -0
  5. package/cli/index.d.ts +15 -0
  6. package/cli/index.js +1237 -0
  7. package/cli/package.json +14 -0
  8. package/compiler/lib.d.ts +24 -0
  9. package/compiler/lib.dom.d.ts +20230 -0
  10. package/compiler/lib.dom.iterable.d.ts +351 -0
  11. package/compiler/lib.es2015.collection.d.ts +89 -0
  12. package/compiler/lib.es2015.core.d.ts +517 -0
  13. package/compiler/lib.es2015.d.ts +30 -0
  14. package/compiler/lib.es2015.generator.d.ts +79 -0
  15. package/compiler/lib.es2015.iterable.d.ts +505 -0
  16. package/compiler/lib.es2015.promise.d.ts +150 -0
  17. package/compiler/lib.es2015.proxy.d.ts +41 -0
  18. package/compiler/lib.es2015.reflect.d.ts +123 -0
  19. package/compiler/lib.es2015.symbol.d.ts +48 -0
  20. package/compiler/lib.es2015.symbol.wellknown.d.ts +324 -0
  21. package/compiler/lib.es2016.array.include.d.ts +118 -0
  22. package/compiler/lib.es2016.d.ts +22 -0
  23. package/compiler/lib.es2016.full.d.ts +25 -0
  24. package/compiler/lib.es2017.d.ts +26 -0
  25. package/compiler/lib.es2017.full.d.ts +25 -0
  26. package/compiler/lib.es2017.intl.d.ts +32 -0
  27. package/compiler/lib.es2017.object.d.ts +51 -0
  28. package/compiler/lib.es2017.sharedmemory.d.ts +137 -0
  29. package/compiler/lib.es2017.string.d.ts +47 -0
  30. package/compiler/lib.es2017.typedarrays.d.ts +55 -0
  31. package/compiler/lib.es2018.asyncgenerator.d.ts +79 -0
  32. package/compiler/lib.es2018.asynciterable.d.ts +45 -0
  33. package/compiler/lib.es2018.d.ts +26 -0
  34. package/compiler/lib.es2018.full.d.ts +25 -0
  35. package/compiler/lib.es2018.intl.d.ts +61 -0
  36. package/compiler/lib.es2018.promise.d.ts +32 -0
  37. package/compiler/lib.es2018.regexp.d.ts +39 -0
  38. package/compiler/lib.es2019.array.d.ts +85 -0
  39. package/compiler/lib.es2019.d.ts +25 -0
  40. package/compiler/lib.es2019.full.d.ts +25 -0
  41. package/compiler/lib.es2019.object.d.ts +35 -0
  42. package/compiler/lib.es2019.string.d.ts +33 -0
  43. package/compiler/lib.es2019.symbol.d.ts +26 -0
  44. package/compiler/lib.es2020.bigint.d.ts +728 -0
  45. package/compiler/lib.es2020.d.ts +27 -0
  46. package/compiler/lib.es2020.full.d.ts +25 -0
  47. package/compiler/lib.es2020.intl.d.ts +310 -0
  48. package/compiler/lib.es2020.promise.d.ts +50 -0
  49. package/compiler/lib.es2020.sharedmemory.d.ts +99 -0
  50. package/compiler/lib.es2020.string.d.ts +30 -0
  51. package/compiler/lib.es2020.symbol.wellknown.d.ts +39 -0
  52. package/compiler/lib.es5.d.ts +4435 -0
  53. package/compiler/lib.es6.d.ts +25 -0
  54. package/compiler/lib.esnext.d.ts +25 -0
  55. package/compiler/lib.esnext.full.d.ts +25 -0
  56. package/compiler/lib.esnext.intl.d.ts +32 -0
  57. package/compiler/lib.esnext.promise.d.ts +43 -0
  58. package/compiler/lib.esnext.string.d.ts +35 -0
  59. package/compiler/lib.esnext.weakref.d.ts +75 -0
  60. package/compiler/lib.scripthost.d.ts +327 -0
  61. package/compiler/lib.webworker.d.ts +6042 -0
  62. package/compiler/lib.webworker.importscripts.d.ts +26 -0
  63. package/compiler/lib.webworker.iterable.d.ts +166 -0
  64. package/compiler/package.json +8 -6
  65. package/compiler/rindo.d.ts +95 -0
  66. package/compiler/rindo.js +65051 -6657
  67. package/compiler/rindo.min.js +4 -0
  68. package/dependencies.json +103 -0
  69. package/dev-server/client/app-error.d.ts +18 -0
  70. package/dev-server/client/events.d.ts +6 -0
  71. package/dev-server/client/hmr-components.d.ts +1 -0
  72. package/dev-server/client/hmr-external-styles.d.ts +1 -0
  73. package/dev-server/client/hmr-images.d.ts +1 -0
  74. package/dev-server/client/hmr-inline-styles.d.ts +1 -0
  75. package/dev-server/client/hmr-util.d.ts +9 -0
  76. package/dev-server/client/hmr-window.d.ts +10 -0
  77. package/dev-server/client/index.d.ts +6 -0
  78. package/dev-server/client/index.js +808 -0
  79. package/dev-server/client/logger.d.ts +5 -0
  80. package/dev-server/client/package.json +8 -0
  81. package/dev-server/client/progress.d.ts +3 -0
  82. package/dev-server/client/status.d.ts +4 -0
  83. package/dev-server/connector.html +6 -0
  84. package/dev-server/index.d.ts +3 -0
  85. package/dev-server/index.js +264 -0
  86. package/dev-server/open-in-editor-api.js +1 -0
  87. package/dev-server/package.json +8 -0
  88. package/dev-server/server-process.js +1738 -0
  89. package/dev-server/server-worker-thread.js +39 -0
  90. package/{dist/dev-server → dev-server}/templates/directory-index.html +132 -132
  91. package/{dist/dev-server → dev-server}/templates/initial-load.html +160 -160
  92. package/dev-server/ws.js +1 -0
  93. package/internal/app-data/index.cjs +90 -0
  94. package/internal/app-data/index.d.ts +4 -0
  95. package/internal/{client/build-conditionals.mjs → app-data/index.js} +25 -21
  96. package/internal/app-data/package.json +15 -0
  97. package/internal/client/css-shim.js +4 -0
  98. package/internal/client/{dom.rindo-client.mjs → dom.js} +73 -137
  99. package/{dist/client/index.mjs → internal/client/index.js} +863 -789
  100. package/internal/client/package.json +8 -0
  101. package/internal/client/patch-browser.js +120 -0
  102. package/internal/client/patch-esm.js +23 -0
  103. package/internal/client/polyfills/core-js.js +11 -10
  104. package/internal/client/polyfills/css-shim.js +1 -656
  105. package/internal/client/polyfills/dom.js +79 -146
  106. package/internal/client/polyfills/es5-html-element.js +1 -18
  107. package/internal/client/polyfills/index.js +34 -35
  108. package/internal/client/{shadow-css.rindo-client.mjs → shadow-css.js} +20 -17
  109. package/internal/hydrate/index.js +1097 -0
  110. package/internal/hydrate/package.json +7 -0
  111. package/internal/hydrate/runner.d.ts +217 -0
  112. package/internal/hydrate/runner.js +777 -0
  113. package/internal/hydrate/shadow-css.js +146 -0
  114. package/internal/index.d.ts +4 -18
  115. package/internal/index.js +1 -1
  116. package/internal/package.json +9 -6
  117. package/internal/rindo-core/index.cjs +1 -0
  118. package/internal/rindo-core/index.d.ts +51 -0
  119. package/internal/rindo-core/index.js +15 -0
  120. package/internal/rindo-ext-modules.d.ts +41 -0
  121. package/internal/rindo-private.d.ts +2128 -0
  122. package/internal/rindo-public-compiler.d.ts +2170 -0
  123. package/{dist/declarations/docs.d.ts → internal/rindo-public-docs.d.ts} +13 -1
  124. package/internal/rindo-public-runtime.d.ts +1555 -0
  125. package/internal/testing/index.js +1055 -0
  126. package/internal/testing/package.json +7 -0
  127. package/internal/testing/shadow-css.js +146 -0
  128. package/mock-doc/index.cjs +4610 -0
  129. package/mock-doc/index.d.ts +916 -0
  130. package/mock-doc/index.js +4574 -2
  131. package/mock-doc/package.json +15 -10
  132. package/package.json +132 -186
  133. package/readme.md +21 -174
  134. package/screenshot/compare/build/app.css +1 -1
  135. package/screenshot/compare/build/app.esm.js +1 -1
  136. package/screenshot/compare/build/app.js +33 -818
  137. package/screenshot/compare/build/{p-113f7459.js → p-081b0641.js} +1 -1
  138. package/screenshot/compare/build/p-227a1e18.entry.js +1 -0
  139. package/screenshot/compare/build/p-2c298727.entry.js +1 -0
  140. package/screenshot/compare/build/p-5479268c.entry.js +1 -0
  141. package/screenshot/compare/build/p-573ec8a4.entry.js +1 -0
  142. package/screenshot/compare/build/p-6ba08604.entry.js +1 -0
  143. package/screenshot/compare/build/p-6bc63295.entry.js +1 -0
  144. package/screenshot/compare/build/p-7a3759fd.entry.js +1 -0
  145. package/screenshot/compare/build/{p-ejpsp3kx.js → p-7b4e3ba7.js} +1 -1
  146. package/screenshot/compare/build/p-988eb362.css +1 -0
  147. package/screenshot/compare/build/p-9b6a9315.js +1 -0
  148. package/screenshot/compare/build/p-b4cc611c.entry.js +1 -0
  149. package/screenshot/compare/build/p-d1bf53f5.entry.js +1 -0
  150. package/screenshot/compare/build/{p-efb0eac6.js → p-e2efe0df.js} +1 -1
  151. package/screenshot/compare/build/p-e8ca6d97.entry.js +1 -0
  152. package/screenshot/compare/build/p-ec2f13e0.entry.js +1 -0
  153. package/screenshot/compare/build/p-f0b99977.entry.js +1 -0
  154. package/screenshot/compare/build/p-f4745c2f.entry.js +1 -0
  155. package/screenshot/compare/build/p-fbbae598.js +1 -0
  156. package/screenshot/compare/host.config.json +14 -14
  157. package/screenshot/compare/index.html +1 -1
  158. package/{dist/screenshot → screenshot}/connector-base.d.ts +1 -1
  159. package/{dist/screenshot → screenshot}/connector-local.d.ts +1 -1
  160. package/screenshot/connector.js +2 -3
  161. package/{dist/screenshot → screenshot}/index.d.ts +1 -1
  162. package/screenshot/index.js +659 -2
  163. package/screenshot/local-connector.js +2 -3
  164. package/screenshot/package.json +15 -13
  165. package/screenshot/pixel-match.js +62 -49
  166. package/screenshot/screenshot-compare.d.ts +3 -0
  167. package/{dist/screenshot → screenshot}/screenshot-fs.d.ts +1 -1
  168. package/sys/deno/index.js +1785 -0
  169. package/sys/deno/node-compat.js +2654 -0
  170. package/sys/deno/worker.js +44 -0
  171. package/sys/node/autoprefixer.js +8 -0
  172. package/sys/node/glob.js +1 -0
  173. package/sys/node/graceful-fs.js +1 -0
  174. package/sys/node/index.d.ts +18 -0
  175. package/sys/node/index.js +1386 -2
  176. package/sys/node/node-fetch.js +1 -0
  177. package/sys/node/package.json +8 -5
  178. package/sys/node/prompts.js +1 -0
  179. package/sys/node/worker.js +52 -0
  180. package/{dist/testing → testing}/index.d.ts +5 -6
  181. package/testing/index.js +4017 -2
  182. package/testing/jest/jest-config.d.ts +5 -0
  183. package/{dist/testing → testing}/jest/jest-environment.d.ts +4 -2
  184. package/{dist/testing → testing}/jest/jest-preprocessor.d.ts +1 -0
  185. package/{dist/testing → testing}/jest/jest-runner.d.ts +1 -1
  186. package/{dist/testing → testing}/jest/jest-screenshot.d.ts +1 -1
  187. package/{dist/testing → testing}/jest/jest-serializer.d.ts +1 -1
  188. package/testing/jest-environment.js +3 -3
  189. package/testing/jest-preprocessor.js +3 -3
  190. package/testing/jest-preset.js +32 -40
  191. package/testing/jest-runner.js +3 -3
  192. package/testing/jest-setuptestframework.js +3 -3
  193. package/{dist/testing → testing}/matchers/events.d.ts +9 -1
  194. package/{dist/testing → testing}/matchers/index.d.ts +3 -1
  195. package/{dist/testing → testing}/matchers/screenshot.d.ts +1 -1
  196. package/testing/mock-fetch.d.ts +11 -0
  197. package/testing/mocks.d.ts +14 -0
  198. package/testing/package.json +8 -6
  199. package/testing/puppeteer/index.d.ts +2 -0
  200. package/{dist/testing → testing}/puppeteer/puppeteer-browser.d.ts +3 -3
  201. package/{dist/testing → testing}/puppeteer/puppeteer-declarations.d.ts +18 -18
  202. package/{dist/testing → testing}/puppeteer/puppeteer-element.d.ts +7 -5
  203. package/testing/puppeteer/puppeteer-emulate.d.ts +2 -0
  204. package/{dist/testing → testing}/puppeteer/puppeteer-events.d.ts +9 -9
  205. package/testing/puppeteer/puppeteer-page.d.ts +2 -0
  206. package/testing/puppeteer/puppeteer-screenshot.d.ts +4 -0
  207. package/testing/reset-build-conditionals.d.ts +2 -0
  208. package/testing/spec-page.d.ts +2 -0
  209. package/testing/test-transpile.d.ts +2 -0
  210. package/{dist/testing → testing}/testing-logger.d.ts +10 -8
  211. package/testing/testing-sys.d.ts +1 -0
  212. package/{dist/testing → testing}/testing-utils.d.ts +3 -2
  213. package/testing/testing.d.ts +2 -0
  214. package/build-conditionals/index.d.ts +0 -2
  215. package/build-conditionals/index.mjs +0 -66
  216. package/build-conditionals/package.json +0 -6
  217. package/compiler/index.js +0 -2
  218. package/dist/cli/index.js +0 -6068
  219. package/dist/client/css-shim-14a9812e.js +0 -656
  220. package/dist/client/css-shim-69821662.js +0 -658
  221. package/dist/client/declarations/rindo.core.d.ts +0 -1347
  222. package/dist/client/dom-68c8fe31.js +0 -139
  223. package/dist/client/dom-af01458a.js +0 -137
  224. package/dist/client/index.js +0 -2937
  225. package/dist/client/polyfills/core-js.js +0 -10
  226. package/dist/client/polyfills/css-shim.js +0 -656
  227. package/dist/client/polyfills/dom.js +0 -146
  228. package/dist/client/polyfills/es5-html-element.js +0 -18
  229. package/dist/client/polyfills/index.js +0 -35
  230. package/dist/client/polyfills/promise.js +0 -9
  231. package/dist/client/polyfills/system.js +0 -6
  232. package/dist/client/shadow-css-6ef31c68.js +0 -386
  233. package/dist/client/shadow-css-8fd1a9e4.js +0 -388
  234. package/dist/compiler/app-core/app-es5-disabled.d.ts +0 -2
  235. package/dist/compiler/app-core/app-polyfills.d.ts +0 -3
  236. package/dist/compiler/app-core/build-conditionals.d.ts +0 -6
  237. package/dist/compiler/app-core/bundle-app-core.d.ts +0 -6
  238. package/dist/compiler/app-core/component-styles.d.ts +0 -4
  239. package/dist/compiler/app-core/format-component-runtime-meta.d.ts +0 -4
  240. package/dist/compiler/app-core/optimize-module.d.ts +0 -7
  241. package/dist/compiler/browser/build-conditionals-client.d.ts +0 -3
  242. package/dist/compiler/browser/compile-options.d.ts +0 -12
  243. package/dist/compiler/browser/compile.d.ts +0 -2
  244. package/dist/compiler/browser/create-compiler.d.ts +0 -14
  245. package/dist/compiler/browser/index.d.ts +0 -11
  246. package/dist/compiler/build/build-ctx.d.ts +0 -74
  247. package/dist/compiler/build/build-finish.d.ts +0 -3
  248. package/dist/compiler/build/build-hmr.d.ts +0 -2
  249. package/dist/compiler/build/build-results.d.ts +0 -2
  250. package/dist/compiler/build/build-stats.d.ts +0 -3
  251. package/dist/compiler/build/build.d.ts +0 -2
  252. package/dist/compiler/build/cache-stats.d.ts +0 -4
  253. package/dist/compiler/build/compiler-build-id.d.ts +0 -6
  254. package/dist/compiler/build/compiler-ctx.d.ts +0 -44
  255. package/dist/compiler/build/init-index-html.d.ts +0 -2
  256. package/dist/compiler/build/validate-files.d.ts +0 -2
  257. package/dist/compiler/build/write-build.d.ts +0 -2
  258. package/dist/compiler/cache.d.ts +0 -22
  259. package/dist/compiler/compiler.d.ts +0 -27
  260. package/dist/compiler/component-hydrate/bundle-hydrate-factory.d.ts +0 -3
  261. package/dist/compiler/component-hydrate/generate-hydrate-app.d.ts +0 -2
  262. package/dist/compiler/component-hydrate/hydrate-factory-closure.d.ts +0 -2
  263. package/dist/compiler/component-hydrate/update-to-hydrate-components.d.ts +0 -2
  264. package/dist/compiler/component-hydrate/write-hydrate-outputs.d.ts +0 -3
  265. package/dist/compiler/component-lazy/generate-cjs.d.ts +0 -3
  266. package/dist/compiler/component-lazy/generate-esm-browser.d.ts +0 -3
  267. package/dist/compiler/component-lazy/generate-esm.d.ts +0 -3
  268. package/dist/compiler/component-lazy/generate-lazy-app.d.ts +0 -3
  269. package/dist/compiler/component-lazy/generate-lazy-module.d.ts +0 -4
  270. package/dist/compiler/component-lazy/generate-system.d.ts +0 -3
  271. package/dist/compiler/component-lazy/update-to-lazy-component.d.ts +0 -2
  272. package/dist/compiler/component-lazy/write-lazy-entry-module.d.ts +0 -2
  273. package/dist/compiler/component-native/update-to-native-component.d.ts +0 -2
  274. package/dist/compiler/config/config-reload.d.ts +0 -3
  275. package/dist/compiler/config/config-utils.d.ts +0 -4
  276. package/dist/compiler/config/validate-config.d.ts +0 -4
  277. package/dist/compiler/config/validate-copy.d.ts +0 -2
  278. package/dist/compiler/config/validate-dev-server.d.ts +0 -2
  279. package/dist/compiler/config/validate-docs.d.ts +0 -2
  280. package/dist/compiler/config/validate-namespace.d.ts +0 -3
  281. package/dist/compiler/config/validate-output-stats.d.ts +0 -2
  282. package/dist/compiler/config/validate-outputs-angular.d.ts +0 -2
  283. package/dist/compiler/config/validate-outputs-custom.d.ts +0 -2
  284. package/dist/compiler/config/validate-outputs-dist-module.d.ts +0 -2
  285. package/dist/compiler/config/validate-outputs-dist.d.ts +0 -2
  286. package/dist/compiler/config/validate-outputs-hydrate-script.d.ts +0 -2
  287. package/dist/compiler/config/validate-outputs-www.d.ts +0 -2
  288. package/dist/compiler/config/validate-outputs.d.ts +0 -2
  289. package/dist/compiler/config/validate-paths.d.ts +0 -2
  290. package/dist/compiler/config/validate-plugins.d.ts +0 -2
  291. package/dist/compiler/config/validate-prerender.d.ts +0 -2
  292. package/dist/compiler/config/validate-rollup-config.d.ts +0 -2
  293. package/dist/compiler/config/validate-service-worker.d.ts +0 -2
  294. package/dist/compiler/config/validate-testing.d.ts +0 -2
  295. package/dist/compiler/config/validate-workers.d.ts +0 -2
  296. package/dist/compiler/copy/assets-copy-tasks.d.ts +0 -3
  297. package/dist/compiler/copy/hashed-copy.d.ts +0 -2
  298. package/dist/compiler/copy/local-copy-tasks.d.ts +0 -3
  299. package/dist/compiler/docs/constants.d.ts +0 -2
  300. package/dist/compiler/docs/custom/index.d.ts +0 -2
  301. package/dist/compiler/docs/docs.d.ts +0 -2
  302. package/dist/compiler/docs/generate-doc-data.d.ts +0 -3
  303. package/dist/compiler/docs/json/index.d.ts +0 -3
  304. package/dist/compiler/docs/readme/docs-util.d.ts +0 -13
  305. package/dist/compiler/docs/readme/index.d.ts +0 -3
  306. package/dist/compiler/docs/readme/markdown-css-props.d.ts +0 -2
  307. package/dist/compiler/docs/readme/markdown-dependencies.d.ts +0 -2
  308. package/dist/compiler/docs/readme/markdown-events.d.ts +0 -2
  309. package/dist/compiler/docs/readme/markdown-methods.d.ts +0 -2
  310. package/dist/compiler/docs/readme/markdown-props.d.ts +0 -2
  311. package/dist/compiler/docs/readme/markdown-slots.d.ts +0 -2
  312. package/dist/compiler/docs/readme/markdown-usage.d.ts +0 -6
  313. package/dist/compiler/docs/readme/output-docs.d.ts +0 -3
  314. package/dist/compiler/docs/style-docs.d.ts +0 -2
  315. package/dist/compiler/docs/vscode/index.d.ts +0 -2
  316. package/dist/compiler/entries/component-bundles.d.ts +0 -3
  317. package/dist/compiler/entries/component-graph.d.ts +0 -2
  318. package/dist/compiler/entries/default-bundles.d.ts +0 -3
  319. package/dist/compiler/entries/entry-modules.d.ts +0 -6
  320. package/dist/compiler/entries/resolve-component-dependencies.d.ts +0 -2
  321. package/dist/compiler/events.d.ts +0 -15
  322. package/dist/compiler/fs-watch/fs-watch-init.d.ts +0 -2
  323. package/dist/compiler/fs-watch/fs-watch-log.d.ts +0 -2
  324. package/dist/compiler/fs-watch/fs-watch-rebuild.d.ts +0 -7
  325. package/dist/compiler/html/inject-module-preloads.d.ts +0 -3
  326. package/dist/compiler/html/inject-sw-script.d.ts +0 -4
  327. package/dist/compiler/html/inline-esm-import.d.ts +0 -2
  328. package/dist/compiler/html/inline-style-sheets.d.ts +0 -2
  329. package/dist/compiler/html/update-global-styles-link.d.ts +0 -2
  330. package/dist/compiler/html/used-components.d.ts +0 -2
  331. package/dist/compiler/html/utils.d.ts +0 -2
  332. package/dist/compiler/html/validate-manifest-json.d.ts +0 -2
  333. package/dist/compiler/index.d.ts +0 -10
  334. package/dist/compiler/index.js +0 -18008
  335. package/dist/compiler/output-targets/empty-dir.d.ts +0 -6
  336. package/dist/compiler/output-targets/index.d.ts +0 -2
  337. package/dist/compiler/output-targets/output-angular.d.ts +0 -4
  338. package/dist/compiler/output-targets/output-app.d.ts +0 -4
  339. package/dist/compiler/output-targets/output-collection.d.ts +0 -3
  340. package/dist/compiler/output-targets/output-copy.d.ts +0 -2
  341. package/dist/compiler/output-targets/output-custom.d.ts +0 -2
  342. package/dist/compiler/output-targets/output-docs.d.ts +0 -2
  343. package/dist/compiler/output-targets/output-hydrate.d.ts +0 -2
  344. package/dist/compiler/output-targets/output-lazy-loader.d.ts +0 -2
  345. package/dist/compiler/output-targets/output-module.d.ts +0 -4
  346. package/dist/compiler/output-targets/output-prerender.d.ts +0 -2
  347. package/dist/compiler/output-targets/output-service-workers.d.ts +0 -2
  348. package/dist/compiler/output-targets/output-types.d.ts +0 -2
  349. package/dist/compiler/output-targets/output-utils.d.ts +0 -54
  350. package/dist/compiler/output-targets/output-www.d.ts +0 -2
  351. package/dist/compiler/plugin/plugin.d.ts +0 -6
  352. package/dist/compiler/prerender/crawl-urls.d.ts +0 -3
  353. package/dist/compiler/prerender/host-config.d.ts +0 -12
  354. package/dist/compiler/prerender/prerender-config.d.ts +0 -2
  355. package/dist/compiler/prerender/prerender-main.d.ts +0 -2
  356. package/dist/compiler/prerender/prerender-queue.d.ts +0 -3
  357. package/dist/compiler/prerender/prerender-template-html.d.ts +0 -2
  358. package/dist/compiler/prerender/prerendered-write-path.d.ts +0 -2
  359. package/dist/compiler/prerender/robots-txt.d.ts +0 -2
  360. package/dist/compiler/prerender/sitemap-xml.d.ts +0 -3
  361. package/dist/compiler/rollup-plugins/component-entry.d.ts +0 -3
  362. package/dist/compiler/rollup-plugins/css-transformer.d.ts +0 -3
  363. package/dist/compiler/rollup-plugins/global-scripts.d.ts +0 -4
  364. package/dist/compiler/rollup-plugins/image-plugin.d.ts +0 -3
  365. package/dist/compiler/rollup-plugins/in-memory-fs-read.d.ts +0 -3
  366. package/dist/compiler/rollup-plugins/loader.d.ts +0 -4
  367. package/dist/compiler/rollup-plugins/plugin-helper.d.ts +0 -5
  368. package/dist/compiler/rollup-plugins/rindo-build-conditionals.d.ts +0 -7
  369. package/dist/compiler/rollup-plugins/rindo-client.d.ts +0 -3
  370. package/dist/compiler/rollup-plugins/rindo-external-runtime.d.ts +0 -2
  371. package/dist/compiler/rollup-plugins/rindo-hydrate.d.ts +0 -3
  372. package/dist/compiler/rollup-plugins/rindo-public-plugin.d.ts +0 -2
  373. package/dist/compiler/service-worker/generate-sw.d.ts +0 -7
  374. package/dist/compiler/service-worker/service-worker-util.d.ts +0 -2
  375. package/dist/compiler/style/cached-styles.d.ts +0 -5
  376. package/dist/compiler/style/component-styles.d.ts +0 -2
  377. package/dist/compiler/style/css-imports.d.ts +0 -9
  378. package/dist/compiler/style/css-to-esm.d.ts +0 -5
  379. package/dist/compiler/style/generate-styles.d.ts +0 -2
  380. package/dist/compiler/style/global-styles.d.ts +0 -3
  381. package/dist/compiler/style/normalize-styles.d.ts +0 -2
  382. package/dist/compiler/style/optimize-css.d.ts +0 -2
  383. package/dist/compiler/style/scope-css.d.ts +0 -3
  384. package/dist/compiler/style/style-utils.d.ts +0 -10
  385. package/dist/compiler/transformers/add-component-meta-proxy.d.ts +0 -3
  386. package/dist/compiler/transformers/add-component-meta-static.d.ts +0 -4
  387. package/dist/compiler/transformers/add-imports.d.ts +0 -3
  388. package/dist/compiler/transformers/collections/add-external-import.d.ts +0 -2
  389. package/dist/compiler/transformers/collections/parse-collection-components.d.ts +0 -2
  390. package/dist/compiler/transformers/collections/parse-collection-deprecated.d.ts +0 -2
  391. package/dist/compiler/transformers/collections/parse-collection-manifest.d.ts +0 -7
  392. package/dist/compiler/transformers/collections/parse-collection-module.d.ts +0 -2
  393. package/dist/compiler/transformers/component-build-conditionals.d.ts +0 -2
  394. package/dist/compiler/transformers/component-hydrate/hydrate-component.d.ts +0 -3
  395. package/dist/compiler/transformers/component-hydrate/hydrate-runtime-cmp-meta.d.ts +0 -3
  396. package/dist/compiler/transformers/component-hydrate/tranform-to-hydrate-component.d.ts +0 -2
  397. package/dist/compiler/transformers/component-lazy/lazy-component.d.ts +0 -3
  398. package/dist/compiler/transformers/component-lazy/lazy-constructor.d.ts +0 -3
  399. package/dist/compiler/transformers/component-lazy/lazy-element-getter.d.ts +0 -3
  400. package/dist/compiler/transformers/component-lazy/transform-lazy-component.d.ts +0 -4
  401. package/dist/compiler/transformers/component-native/native-component.d.ts +0 -3
  402. package/dist/compiler/transformers/component-native/native-connected-callback.d.ts +0 -3
  403. package/dist/compiler/transformers/component-native/native-constructor.d.ts +0 -3
  404. package/dist/compiler/transformers/component-native/native-element-getter.d.ts +0 -3
  405. package/dist/compiler/transformers/component-native/native-static-style.d.ts +0 -3
  406. package/dist/compiler/transformers/component-native/tranform-to-native-component.d.ts +0 -4
  407. package/dist/compiler/transformers/core-runtime-apis.d.ts +0 -30
  408. package/dist/compiler/transformers/create-event.d.ts +0 -3
  409. package/dist/compiler/transformers/decorators-to-static/component-decorator.d.ts +0 -3
  410. package/dist/compiler/transformers/decorators-to-static/convert-decorators.d.ts +0 -3
  411. package/dist/compiler/transformers/decorators-to-static/decorator-utils.d.ts +0 -10
  412. package/dist/compiler/transformers/decorators-to-static/element-decorator.d.ts +0 -3
  413. package/dist/compiler/transformers/decorators-to-static/event-decorator.d.ts +0 -4
  414. package/dist/compiler/transformers/decorators-to-static/listen-decorator.d.ts +0 -6
  415. package/dist/compiler/transformers/decorators-to-static/method-decorator.d.ts +0 -3
  416. package/dist/compiler/transformers/decorators-to-static/prop-decorator.d.ts +0 -4
  417. package/dist/compiler/transformers/decorators-to-static/state-decorator.d.ts +0 -3
  418. package/dist/compiler/transformers/decorators-to-static/style-to-static.d.ts +0 -3
  419. package/dist/compiler/transformers/decorators-to-static/watch-decorator.d.ts +0 -3
  420. package/dist/compiler/transformers/define-custom-element.d.ts +0 -3
  421. package/dist/compiler/transformers/host-data-transform.d.ts +0 -3
  422. package/dist/compiler/transformers/legacy-props.d.ts +0 -3
  423. package/dist/compiler/transformers/remove-static-meta-properties.d.ts +0 -2
  424. package/dist/compiler/transformers/reserved-public-members.d.ts +0 -3
  425. package/dist/compiler/transformers/rindo-import-path.d.ts +0 -3
  426. package/dist/compiler/transformers/static-to-meta/call-expression.d.ts +0 -3
  427. package/dist/compiler/transformers/static-to-meta/class-methods.d.ts +0 -3
  428. package/dist/compiler/transformers/static-to-meta/component.d.ts +0 -3
  429. package/dist/compiler/transformers/static-to-meta/element-ref.d.ts +0 -2
  430. package/dist/compiler/transformers/static-to-meta/encapsulation.d.ts +0 -3
  431. package/dist/compiler/transformers/static-to-meta/events.d.ts +0 -3
  432. package/dist/compiler/transformers/static-to-meta/import.d.ts +0 -3
  433. package/dist/compiler/transformers/static-to-meta/listeners.d.ts +0 -3
  434. package/dist/compiler/transformers/static-to-meta/methods.d.ts +0 -3
  435. package/dist/compiler/transformers/static-to-meta/props.d.ts +0 -3
  436. package/dist/compiler/transformers/static-to-meta/states.d.ts +0 -3
  437. package/dist/compiler/transformers/static-to-meta/string-literal.d.ts +0 -3
  438. package/dist/compiler/transformers/static-to-meta/styles.d.ts +0 -3
  439. package/dist/compiler/transformers/static-to-meta/vdom.d.ts +0 -3
  440. package/dist/compiler/transformers/static-to-meta/visitor.d.ts +0 -3
  441. package/dist/compiler/transformers/static-to-meta/watchers.d.ts +0 -3
  442. package/dist/compiler/transformers/style-imports.d.ts +0 -3
  443. package/dist/compiler/transformers/transform-utils.d.ts +0 -31
  444. package/dist/compiler/transformers/update-component-class.d.ts +0 -3
  445. package/dist/compiler/transformers/update-rindo-core-import.d.ts +0 -3
  446. package/dist/compiler/transformers/watcher-meta-transform.d.ts +0 -3
  447. package/dist/compiler/transpile/compiler-options.d.ts +0 -4
  448. package/dist/compiler/transpile/transpile-app.d.ts +0 -2
  449. package/dist/compiler/transpile/transpile-module.d.ts +0 -5
  450. package/dist/compiler/transpile/transpile-service.d.ts +0 -3
  451. package/dist/compiler/transpile/transpile-to-es5-main.d.ts +0 -2
  452. package/dist/compiler/transpile/validate-types-main.d.ts +0 -2
  453. package/dist/compiler/types/generate-app-types.d.ts +0 -2
  454. package/dist/compiler/types/generate-component-types.d.ts +0 -8
  455. package/dist/compiler/types/generate-event-types.d.ts +0 -2
  456. package/dist/compiler/types/generate-method-types.d.ts +0 -2
  457. package/dist/compiler/types/generate-prop-types.d.ts +0 -2
  458. package/dist/compiler/types/generate-types.d.ts +0 -2
  459. package/dist/compiler/types/rindo-types.d.ts +0 -3
  460. package/dist/compiler/types/types-utils.d.ts +0 -4
  461. package/dist/compiler/types/update-import-refs.d.ts +0 -11
  462. package/dist/compiler/types/validate-package-json.d.ts +0 -9
  463. package/dist/declarations/assets.d.ts +0 -17
  464. package/dist/declarations/browser-compile.d.ts +0 -47
  465. package/dist/declarations/build-conditionals.d.ts +0 -91
  466. package/dist/declarations/build-events.d.ts +0 -19
  467. package/dist/declarations/build.d.ts +0 -247
  468. package/dist/declarations/cache.d.ts +0 -11
  469. package/dist/declarations/collection-manifest.d.ts +0 -106
  470. package/dist/declarations/collection.d.ts +0 -139
  471. package/dist/declarations/compiler.d.ts +0 -53
  472. package/dist/declarations/component-compiler-meta.d.ts +0 -198
  473. package/dist/declarations/component-constructor.d.ts +0 -61
  474. package/dist/declarations/component-interfaces.d.ts +0 -123
  475. package/dist/declarations/config.d.ts +0 -409
  476. package/dist/declarations/css-var-shim.d.ts +0 -9
  477. package/dist/declarations/decorators.d.ts +0 -150
  478. package/dist/declarations/dev-server.d.ts +0 -135
  479. package/dist/declarations/diagnostics.d.ts +0 -21
  480. package/dist/declarations/entry.d.ts +0 -28
  481. package/dist/declarations/events.d.ts +0 -13
  482. package/dist/declarations/file-system.d.ts +0 -91
  483. package/dist/declarations/fs-watch.d.ts +0 -15
  484. package/dist/declarations/host-element.d.ts +0 -53
  485. package/dist/declarations/hydrate.d.ts +0 -99
  486. package/dist/declarations/in-memory-fs.d.ts +0 -59
  487. package/dist/declarations/index.d.ts +0 -45
  488. package/dist/declarations/jsdoc.d.ts +0 -16
  489. package/dist/declarations/jsx.d.ts +0 -1050
  490. package/dist/declarations/logger.d.ts +0 -25
  491. package/dist/declarations/minify-js.d.ts +0 -11
  492. package/dist/declarations/module.d.ts +0 -35
  493. package/dist/declarations/optimize-css.d.ts +0 -12
  494. package/dist/declarations/output-targets.d.ts +0 -189
  495. package/dist/declarations/plugin.d.ts +0 -23
  496. package/dist/declarations/prerender.d.ts +0 -79
  497. package/dist/declarations/render.d.ts +0 -62
  498. package/dist/declarations/runtime.d.ts +0 -92
  499. package/dist/declarations/screenshots.d.ts +0 -192
  500. package/dist/declarations/server.d.ts +0 -19
  501. package/dist/declarations/style.d.ts +0 -35
  502. package/dist/declarations/system.d.ts +0 -174
  503. package/dist/declarations/testing.d.ts +0 -523
  504. package/dist/declarations/transpile.d.ts +0 -24
  505. package/dist/declarations/types.d.ts +0 -24
  506. package/dist/declarations/vdom.d.ts +0 -55
  507. package/dist/declarations/worker.d.ts +0 -33
  508. package/dist/dev-server/content-type-db.json +0 -1
  509. package/dist/dev-server/index.js +0 -887
  510. package/dist/dev-server/static/app-error.css +0 -257
  511. package/dist/dev-server/static/dev-server-client.html +0 -13
  512. package/dist/hydrate/index.d.ts +0 -101
  513. package/dist/hydrate/index.mjs +0 -1281
  514. package/dist/hydrate/platform.mjs +0 -347
  515. package/dist/index.d.ts +0 -99
  516. package/dist/index.js +0 -1
  517. package/dist/mock-doc/index.d.ts +0 -851
  518. package/dist/mock-doc/index.js +0 -3982
  519. package/dist/mock-doc/index.mjs +0 -3954
  520. package/dist/runtime/index.js +0 -2576
  521. package/dist/runtime/index.mjs +0 -2521
  522. package/dist/runtime/shadow-css-6ef31c68.js +0 -386
  523. package/dist/runtime/shadow-css-8fd1a9e4.js +0 -388
  524. package/dist/screenshot/index.js +0 -520
  525. package/dist/sys/node/graceful-fs.js +0 -975
  526. package/dist/sys/node/index.js +0 -33545
  527. package/dist/sys/node/node-fetch.js +0 -1779
  528. package/dist/sys/node/open-in-editor.js +0 -734
  529. package/dist/sys/node/sys-worker.js +0 -67035
  530. package/dist/sys/node/websocket.js +0 -3728
  531. package/dist/testing/build-conditionals.d.ts +0 -4
  532. package/dist/testing/build-conditionals.js +0 -43
  533. package/dist/testing/core.d.ts +0 -35
  534. package/dist/testing/core.js +0 -52
  535. package/dist/testing/index.js +0 -40511
  536. package/dist/testing/jest/jest-config.d.ts +0 -4
  537. package/dist/testing/mock-fetch.d.ts +0 -46
  538. package/dist/testing/mocks.d.ts +0 -12
  539. package/dist/testing/platform.d.ts +0 -23
  540. package/dist/testing/platform.js +0 -321
  541. package/dist/testing/puppeteer/puppeteer-emulate.d.ts +0 -2
  542. package/dist/testing/puppeteer/puppeteer-find.d.ts +0 -5
  543. package/dist/testing/puppeteer/puppeteer-page.d.ts +0 -2
  544. package/dist/testing/puppeteer/puppeteer-screenshot.d.ts +0 -4
  545. package/dist/testing/spec-page.d.ts +0 -5
  546. package/dist/testing/task-queue.d.ts +0 -15
  547. package/dist/testing/test-transpile.d.ts +0 -5
  548. package/dist/testing/testing-fs.d.ts +0 -31
  549. package/dist/testing/testing-sys.d.ts +0 -19
  550. package/dist/testing/testing.d.ts +0 -12
  551. package/dist/utils/index.js +0 -1575
  552. package/dist/utils/index.mjs +0 -1511
  553. package/internal/client/css-shim.rindo-client.mjs +0 -656
  554. package/internal/client/index.mjs +0 -2859
  555. package/internal/client/polyfills/promise.js +0 -9
  556. package/internal/images.d.ts +0 -5
  557. package/runtime/package.json +0 -5
  558. package/screenshot/compare/build/p-020f8d73.js +0 -1
  559. package/screenshot/compare/build/p-09qdknbg.system.entry.js +0 -1
  560. package/screenshot/compare/build/p-0a13mpsc.system.entry.js +0 -1
  561. package/screenshot/compare/build/p-168ec2c4.system.js +0 -1
  562. package/screenshot/compare/build/p-2ab1fdf1.system.js +0 -1
  563. package/screenshot/compare/build/p-2pxcsgrj.entry.js +0 -1
  564. package/screenshot/compare/build/p-42fb7034.system.js +0 -1
  565. package/screenshot/compare/build/p-54d9d7c2.system.js +0 -1
  566. package/screenshot/compare/build/p-67c1f911.js +0 -1
  567. package/screenshot/compare/build/p-68613371.system.js +0 -1
  568. package/screenshot/compare/build/p-7dvsjpu0.entry.js +0 -1
  569. package/screenshot/compare/build/p-aa67fb06.js +0 -1
  570. package/screenshot/compare/build/p-aeb3cec1.system.js +0 -1
  571. package/screenshot/compare/build/p-b6e44a24.js +0 -1
  572. package/screenshot/compare/build/p-c1c25b8a.js +0 -1
  573. package/screenshot/compare/build/p-c9bopbjy.system.entry.js +0 -1
  574. package/screenshot/compare/build/p-c9iqz1pp.system.entry.js +0 -1
  575. package/screenshot/compare/build/p-dizjz8rg.entry.js +0 -1
  576. package/screenshot/compare/build/p-dnta0rwp.system.entry.js +0 -1
  577. package/screenshot/compare/build/p-e9670d22.system.js +0 -1
  578. package/screenshot/compare/build/p-ei9jkpd0.system.entry.js +0 -1
  579. package/screenshot/compare/build/p-ejwcppol.entry.js +0 -1
  580. package/screenshot/compare/build/p-f6612d5d.system.js +0 -1
  581. package/screenshot/compare/build/p-foiivsfc.css +0 -1
  582. package/screenshot/compare/build/p-gpjjyogx.entry.js +0 -1
  583. package/screenshot/compare/build/p-howklem2.system.entry.js +0 -1
  584. package/screenshot/compare/build/p-knv9wvoc.entry.js +0 -1
  585. package/screenshot/compare/build/p-nsqsfhhy.entry.js +0 -1
  586. package/screenshot/compare/build/p-ojt278pp.entry.js +0 -1
  587. package/screenshot/compare/build/p-oywass99.entry.js +0 -1
  588. package/screenshot/compare/build/p-q3ujhub6.entry.js +0 -1
  589. package/screenshot/compare/build/p-qw4xnmxv.entry.js +0 -1
  590. package/screenshot/compare/build/p-t1wvevhc.system.entry.js +0 -1
  591. package/screenshot/compare/build/p-tnjarrex.system.entry.js +0 -1
  592. package/screenshot/compare/build/p-vhfpd6kk.system.entry.js +0 -1
  593. package/screenshot/compare/build/p-vk6rhemd.system.entry.js +0 -1
  594. package/screenshot/compare/build/p-w6bnm16k.entry.js +0 -1
  595. package/screenshot/compare/build/p-xje6d7zl.system.entry.js +0 -1
  596. package/screenshot/compare/build/p-y5jlrcha.system.entry.js +0 -1
  597. package/screenshot/compare/build/p-yh170wkt.entry.js +0 -1
  598. package/testing/jest.preprocessor.js +0 -7
  599. /package/{dist/dev-server → dev-server}/static/favicon.ico +0 -0
  600. /package/{dist/sys/node → dev-server}/visualstudio.vbs +0 -0
  601. /package/{dist/sys/node → dev-server}/xdg-open +0 -0
  602. /package/{dist/compiler/polyfills.d.ts → screenshot/compare/build/index.esm.js} +0 -0
  603. /package/{dist/screenshot → screenshot}/pixel-match.d.ts +0 -0
  604. /package/{dist/testing → testing}/jest/jest-setup-test-framework.d.ts +0 -0
  605. /package/{dist/testing → testing}/matchers/attributes.d.ts +0 -0
  606. /package/{dist/testing → testing}/matchers/class-list.d.ts +0 -0
  607. /package/{dist/testing → testing}/matchers/html.d.ts +0 -0
  608. /package/{dist/testing → testing}/matchers/text.d.ts +0 -0
package/mock-doc/index.js CHANGED
@@ -1,2 +1,4574 @@
1
- /* @rindo/core/mock-doc */
2
- module.exports = require('../dist/mock-doc');
1
+ /*!
2
+ Rindo Mock Doc v2.5.2 | MIT Licensed | https://rindojs.web.app
3
+ */
4
+ const CONTENT_REF_ID = 'r';
5
+ const ORG_LOCATION_ID = 'o';
6
+ const SLOT_NODE_ID = 's';
7
+ const TEXT_NODE_ID = 't';
8
+ const XLINK_NS = 'http://www.w3.org/1999/xlink';
9
+
10
+ const attrHandler = {
11
+ get(obj, prop) {
12
+ if (prop in obj) {
13
+ return obj[prop];
14
+ }
15
+ if (typeof prop !== 'symbol' && !isNaN(prop)) {
16
+ return obj.__items[prop];
17
+ }
18
+ return undefined;
19
+ },
20
+ };
21
+ const createAttributeProxy = (caseInsensitive) => new Proxy(new MockAttributeMap(caseInsensitive), attrHandler);
22
+ class MockAttributeMap {
23
+ constructor(caseInsensitive = false) {
24
+ this.caseInsensitive = caseInsensitive;
25
+ this.__items = [];
26
+ }
27
+ get length() {
28
+ return this.__items.length;
29
+ }
30
+ item(index) {
31
+ return this.__items[index] || null;
32
+ }
33
+ setNamedItem(attr) {
34
+ attr.namespaceURI = null;
35
+ this.setNamedItemNS(attr);
36
+ }
37
+ setNamedItemNS(attr) {
38
+ if (attr != null && attr.value != null) {
39
+ attr.value = String(attr.value);
40
+ }
41
+ const existingAttr = this.__items.find(a => a.name === attr.name && a.namespaceURI === attr.namespaceURI);
42
+ if (existingAttr != null) {
43
+ existingAttr.value = attr.value;
44
+ }
45
+ else {
46
+ this.__items.push(attr);
47
+ }
48
+ }
49
+ getNamedItem(attrName) {
50
+ if (this.caseInsensitive) {
51
+ attrName = attrName.toLowerCase();
52
+ }
53
+ return this.getNamedItemNS(null, attrName);
54
+ }
55
+ getNamedItemNS(namespaceURI, attrName) {
56
+ namespaceURI = getNamespaceURI(namespaceURI);
57
+ return (this.__items.find(attr => attr.name === attrName && getNamespaceURI(attr.namespaceURI) === namespaceURI) || null);
58
+ }
59
+ removeNamedItem(attr) {
60
+ this.removeNamedItemNS(attr);
61
+ }
62
+ removeNamedItemNS(attr) {
63
+ for (let i = 0, ii = this.__items.length; i < ii; i++) {
64
+ if (this.__items[i].name === attr.name && this.__items[i].namespaceURI === attr.namespaceURI) {
65
+ this.__items.splice(i, 1);
66
+ break;
67
+ }
68
+ }
69
+ }
70
+ [Symbol.iterator]() {
71
+ let i = 0;
72
+ return {
73
+ next: () => ({
74
+ done: i === this.length,
75
+ value: this.item(i++),
76
+ }),
77
+ };
78
+ }
79
+ get [Symbol.toStringTag]() {
80
+ return 'MockAttributeMap';
81
+ }
82
+ }
83
+ function getNamespaceURI(namespaceURI) {
84
+ return namespaceURI === XLINK_NS ? null : namespaceURI;
85
+ }
86
+ function cloneAttributes(srcAttrs, sortByName = false) {
87
+ const dstAttrs = new MockAttributeMap(srcAttrs.caseInsensitive);
88
+ if (srcAttrs != null) {
89
+ const attrLen = srcAttrs.length;
90
+ if (sortByName && attrLen > 1) {
91
+ const sortedAttrs = [];
92
+ for (let i = 0; i < attrLen; i++) {
93
+ const srcAttr = srcAttrs.item(i);
94
+ const dstAttr = new MockAttr(srcAttr.name, srcAttr.value, srcAttr.namespaceURI);
95
+ sortedAttrs.push(dstAttr);
96
+ }
97
+ sortedAttrs.sort(sortAttributes).forEach(attr => {
98
+ dstAttrs.setNamedItemNS(attr);
99
+ });
100
+ }
101
+ else {
102
+ for (let i = 0; i < attrLen; i++) {
103
+ const srcAttr = srcAttrs.item(i);
104
+ const dstAttr = new MockAttr(srcAttr.name, srcAttr.value, srcAttr.namespaceURI);
105
+ dstAttrs.setNamedItemNS(dstAttr);
106
+ }
107
+ }
108
+ }
109
+ return dstAttrs;
110
+ }
111
+ function sortAttributes(a, b) {
112
+ if (a.name < b.name)
113
+ return -1;
114
+ if (a.name > b.name)
115
+ return 1;
116
+ return 0;
117
+ }
118
+ class MockAttr {
119
+ constructor(attrName, attrValue, namespaceURI = null) {
120
+ this._name = attrName;
121
+ this._value = String(attrValue);
122
+ this._namespaceURI = namespaceURI;
123
+ }
124
+ get name() {
125
+ return this._name;
126
+ }
127
+ set name(value) {
128
+ this._name = value;
129
+ }
130
+ get value() {
131
+ return this._value;
132
+ }
133
+ set value(value) {
134
+ this._value = String(value);
135
+ }
136
+ get nodeName() {
137
+ return this._name;
138
+ }
139
+ set nodeName(value) {
140
+ this._name = value;
141
+ }
142
+ get nodeValue() {
143
+ return this._value;
144
+ }
145
+ set nodeValue(value) {
146
+ this._value = String(value);
147
+ }
148
+ get namespaceURI() {
149
+ return this._namespaceURI;
150
+ }
151
+ set namespaceURI(namespaceURI) {
152
+ this._namespaceURI = namespaceURI;
153
+ }
154
+ }
155
+
156
+ class MockCustomElementRegistry {
157
+ constructor(win) {
158
+ this.win = win;
159
+ }
160
+ define(tagName, cstr, options) {
161
+ if (tagName.toLowerCase() !== tagName) {
162
+ throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': "${tagName}" is not a valid custom element name`);
163
+ }
164
+ if (this.__registry == null) {
165
+ this.__registry = new Map();
166
+ }
167
+ this.__registry.set(tagName, { cstr, options });
168
+ if (this.__whenDefined != null) {
169
+ const whenDefinedResolveFns = this.__whenDefined.get(tagName);
170
+ if (whenDefinedResolveFns != null) {
171
+ whenDefinedResolveFns.forEach(whenDefinedResolveFn => {
172
+ whenDefinedResolveFn();
173
+ });
174
+ whenDefinedResolveFns.length = 0;
175
+ this.__whenDefined.delete(tagName);
176
+ }
177
+ }
178
+ const doc = this.win.document;
179
+ if (doc != null) {
180
+ const hosts = doc.querySelectorAll(tagName);
181
+ hosts.forEach(host => {
182
+ if (upgradedElements.has(host) === false) {
183
+ tempDisableCallbacks.add(doc);
184
+ const upgradedCmp = createCustomElement(this, doc, tagName);
185
+ for (let i = 0; i < host.childNodes.length; i++) {
186
+ const childNode = host.childNodes[i];
187
+ childNode.remove();
188
+ upgradedCmp.appendChild(childNode);
189
+ }
190
+ tempDisableCallbacks.delete(doc);
191
+ if (proxyElements.has(host)) {
192
+ proxyElements.set(host, upgradedCmp);
193
+ }
194
+ }
195
+ fireConnectedCallback(host);
196
+ });
197
+ }
198
+ }
199
+ get(tagName) {
200
+ if (this.__registry != null) {
201
+ const def = this.__registry.get(tagName.toLowerCase());
202
+ if (def != null) {
203
+ return def.cstr;
204
+ }
205
+ }
206
+ return undefined;
207
+ }
208
+ upgrade(_rootNode) {
209
+ //
210
+ }
211
+ clear() {
212
+ if (this.__registry != null) {
213
+ this.__registry.clear();
214
+ }
215
+ if (this.__whenDefined != null) {
216
+ this.__whenDefined.clear();
217
+ }
218
+ }
219
+ whenDefined(tagName) {
220
+ tagName = tagName.toLowerCase();
221
+ if (this.__registry != null && this.__registry.has(tagName) === true) {
222
+ return Promise.resolve();
223
+ }
224
+ return new Promise(resolve => {
225
+ if (this.__whenDefined == null) {
226
+ this.__whenDefined = new Map();
227
+ }
228
+ let whenDefinedResolveFns = this.__whenDefined.get(tagName);
229
+ if (whenDefinedResolveFns == null) {
230
+ whenDefinedResolveFns = [];
231
+ this.__whenDefined.set(tagName, whenDefinedResolveFns);
232
+ }
233
+ whenDefinedResolveFns.push(resolve);
234
+ });
235
+ }
236
+ }
237
+ function createCustomElement(customElements, ownerDocument, tagName) {
238
+ const Cstr = customElements.get(tagName);
239
+ if (Cstr != null) {
240
+ const cmp = new Cstr(ownerDocument);
241
+ cmp.nodeName = tagName.toUpperCase();
242
+ upgradedElements.add(cmp);
243
+ return cmp;
244
+ }
245
+ const host = new Proxy({}, {
246
+ get(obj, prop) {
247
+ const elm = proxyElements.get(host);
248
+ if (elm != null) {
249
+ return elm[prop];
250
+ }
251
+ return obj[prop];
252
+ },
253
+ set(obj, prop, val) {
254
+ const elm = proxyElements.get(host);
255
+ if (elm != null) {
256
+ elm[prop] = val;
257
+ }
258
+ else {
259
+ obj[prop] = val;
260
+ }
261
+ return true;
262
+ },
263
+ has(obj, prop) {
264
+ const elm = proxyElements.get(host);
265
+ if (prop in elm) {
266
+ return true;
267
+ }
268
+ if (prop in obj) {
269
+ return true;
270
+ }
271
+ return false;
272
+ },
273
+ });
274
+ const elm = new MockHTMLElement(ownerDocument, tagName);
275
+ proxyElements.set(host, elm);
276
+ return host;
277
+ }
278
+ const proxyElements = new WeakMap();
279
+ const upgradedElements = new WeakSet();
280
+ function connectNode(ownerDocument, node) {
281
+ node.ownerDocument = ownerDocument;
282
+ if (node.nodeType === 1 /* ELEMENT_NODE */) {
283
+ if (ownerDocument != null && node.nodeName.includes('-')) {
284
+ const win = ownerDocument.defaultView;
285
+ if (win != null && typeof node.connectedCallback === 'function' && node.isConnected) {
286
+ fireConnectedCallback(node);
287
+ }
288
+ const shadowRoot = node.shadowRoot;
289
+ if (shadowRoot != null) {
290
+ shadowRoot.childNodes.forEach(childNode => {
291
+ connectNode(ownerDocument, childNode);
292
+ });
293
+ }
294
+ }
295
+ node.childNodes.forEach(childNode => {
296
+ connectNode(ownerDocument, childNode);
297
+ });
298
+ }
299
+ else {
300
+ node.childNodes.forEach(childNode => {
301
+ childNode.ownerDocument = ownerDocument;
302
+ });
303
+ }
304
+ }
305
+ function fireConnectedCallback(node) {
306
+ if (typeof node.connectedCallback === 'function') {
307
+ if (tempDisableCallbacks.has(node.ownerDocument) === false) {
308
+ try {
309
+ node.connectedCallback();
310
+ }
311
+ catch (e) {
312
+ console.error(e);
313
+ }
314
+ }
315
+ }
316
+ }
317
+ function disconnectNode(node) {
318
+ if (node.nodeType === 1 /* ELEMENT_NODE */) {
319
+ if (node.nodeName.includes('-') === true && typeof node.disconnectedCallback === 'function') {
320
+ if (tempDisableCallbacks.has(node.ownerDocument) === false) {
321
+ try {
322
+ node.disconnectedCallback();
323
+ }
324
+ catch (e) {
325
+ console.error(e);
326
+ }
327
+ }
328
+ }
329
+ node.childNodes.forEach(disconnectNode);
330
+ }
331
+ }
332
+ function attributeChanged(node, attrName, oldValue, newValue) {
333
+ attrName = attrName.toLowerCase();
334
+ const observedAttributes = node.constructor.observedAttributes;
335
+ if (Array.isArray(observedAttributes) === true &&
336
+ observedAttributes.some(obs => obs.toLowerCase() === attrName) === true) {
337
+ try {
338
+ node.attributeChangedCallback(attrName, oldValue, newValue);
339
+ }
340
+ catch (e) {
341
+ console.error(e);
342
+ }
343
+ }
344
+ }
345
+ function checkAttributeChanged(node) {
346
+ return node.nodeName.includes('-') === true && typeof node.attributeChangedCallback === 'function';
347
+ }
348
+ const tempDisableCallbacks = new Set();
349
+
350
+ function dataset(elm) {
351
+ const ds = {};
352
+ const attributes = elm.attributes;
353
+ const attrLen = attributes.length;
354
+ for (let i = 0; i < attrLen; i++) {
355
+ const attr = attributes.item(i);
356
+ const nodeName = attr.nodeName;
357
+ if (nodeName.startsWith('data-')) {
358
+ ds[dashToPascalCase(nodeName)] = attr.nodeValue;
359
+ }
360
+ }
361
+ return new Proxy(ds, {
362
+ get(_obj, camelCaseProp) {
363
+ return ds[camelCaseProp];
364
+ },
365
+ set(_obj, camelCaseProp, value) {
366
+ const dataAttr = toDataAttribute(camelCaseProp);
367
+ elm.setAttribute(dataAttr, value);
368
+ return true;
369
+ },
370
+ });
371
+ }
372
+ function toDataAttribute(str) {
373
+ return ('data-' +
374
+ String(str)
375
+ .replace(/([A-Z0-9])/g, g => ' ' + g[0])
376
+ .trim()
377
+ .replace(/ /g, '-')
378
+ .toLowerCase());
379
+ }
380
+ function dashToPascalCase(str) {
381
+ str = String(str).substr(5);
382
+ return str
383
+ .split('-')
384
+ .map((segment, index) => {
385
+ if (index === 0) {
386
+ return segment.charAt(0).toLowerCase() + segment.slice(1);
387
+ }
388
+ return segment.charAt(0).toUpperCase() + segment.slice(1);
389
+ })
390
+ .join('');
391
+ }
392
+
393
+ // Sizzle 2.3.6
394
+ const Sizzle = (function() {
395
+ const window = {
396
+ document: {
397
+ createElement() {
398
+ return {};
399
+ },
400
+ nodeType: 9,
401
+ documentElement: {
402
+ nodeType: 1,
403
+ nodeName: 'HTML'
404
+ }
405
+ }
406
+ };
407
+ const module = { exports: {} };
408
+
409
+ /*! Sizzle v2.3.6 | (c) JS Foundation and other contributors | js.foundation */
410
+ !function(e){var t,n,r,i,o,u,l,a,c,s,d,f,p,h,g,m,y,v,w,b="sizzle"+1*new Date,N=e.document,C=0,x=0,E=ae(),A=ae(),S=ae(),D=ae(),T=function(e,t){return e===t&&(d=!0),0},L={}.hasOwnProperty,q=[],I=q.pop,B=q.push,R=q.push,$=q.slice,k=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return -1},H="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",P="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",z="\\["+M+"*("+P+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+P+"))|)"+M+"*\\]",F=":("+P+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+z+")*)|.*)\\)|)",O=new RegExp(M+"+","g"),j=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),G=new RegExp("^"+M+"*,"+M+"*"),U=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),V=new RegExp(M+"|>"),X=new RegExp(F),J=new RegExp("^"+P+"$"),K={ID:new RegExp("^#("+P+")"),CLASS:new RegExp("^\\.("+P+")"),TAG:new RegExp("^("+P+"|[*])"),ATTR:new RegExp("^"+z),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+H+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Q=/HTML$/i,W=/^(?:input|select|textarea|button)$/i,Y=/^h\d$/i,Z=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){f();},ue=ve(function(e){return !0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{R.apply(q=$.call(N.childNodes),N.childNodes),q[N.childNodes.length].nodeType;}catch(e){R={apply:q.length?function(e,t){B.apply(e,$.call(t));}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1;}};}function le(e,t,r,i){var o,l,c,s,d,h,y,v=t&&t.ownerDocument,N=t?t.nodeType:9;if(r=r||[],"string"!=typeof e||!e||1!==N&&9!==N&&11!==N)return r;if(!i&&(f(t),t=t||p,g)){if(11!==N&&(d=_.exec(e)))if(o=d[1]){if(9===N){if(!(c=t.getElementById(o)))return r;if(c.id===o)return r.push(c),r}else if(v&&(c=v.getElementById(o))&&w(t,c)&&c.id===o)return r.push(c),r}else {if(d[2])return R.apply(r,t.getElementsByTagName(e)),r;if((o=d[3])&&n.getElementsByClassName&&t.getElementsByClassName)return R.apply(r,t.getElementsByClassName(o)),r}if(n.qsa&&!D[e+" "]&&(!m||!m.test(e))&&(1!==N||"object"!==t.nodeName.toLowerCase())){if(y=e,v=t,1===N&&(V.test(e)||U.test(e))){(v=ee.test(e)&&ge(t.parentNode)||t)===t&&n.scope||((s=t.getAttribute("id"))?s=s.replace(re,ie):t.setAttribute("id",s=b)),l=(h=u(e)).length;while(l--)h[l]=(s?"#"+s:":scope")+" "+ye(h[l]);y=h.join(",");}try{return R.apply(r,v.querySelectorAll(y)),r}catch(t){D(e,!0);}finally{s===b&&t.removeAttribute("id");}}}return a(e.replace(j,"$1"),t,r,i)}function ae(){var e=[];function t(n,i){return e.push(n+" ")>r.cacheLength&&delete t[e.shift()],t[n+" "]=i}return t}function ce(e){return e[b]=!0,e}function se(e){var t=p.createElement("fieldset");try{return !!e(t)}catch(e){return !1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null;}}function de(e,t){var n=e.split("|"),i=n.length;while(i--)r.attrHandle[n[i]]=t;}function fe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return -1;return e?1:-1}function pe(e){return function(t){return "form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&ue(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function he(e){return ce(function(t){return t=+t,ce(function(n,r){var i,o=e([],n.length,t),u=o.length;while(u--)n[i=o[u]]&&(n[i]=!(r[i]=n[i]));})})}function ge(e){return e&&void 0!==e.getElementsByTagName&&e}n=le.support={},o=le.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return !Q.test(t||n&&n.nodeName||"HTML")},f=le.setDocument=function(e){var t,i,u=e?e.ownerDocument||e:N;return u!=p&&9===u.nodeType&&u.documentElement?(p=u,h=p.documentElement,g=!o(p),N!=p&&(i=p.defaultView)&&i.top!==i&&(i.addEventListener?i.addEventListener("unload",oe,!1):i.attachEvent&&i.attachEvent("onunload",oe)),n.scope=se(function(e){return h.appendChild(e).appendChild(p.createElement("div")),void 0!==e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),n.attributes=se(function(e){return e.className="i",!e.getAttribute("className")}),n.getElementsByTagName=se(function(e){return e.appendChild(p.createComment("")),!e.getElementsByTagName("*").length}),n.getElementsByClassName=Z.test(p.getElementsByClassName),n.getById=se(function(e){return h.appendChild(e).id=b,!p.getElementsByName||!p.getElementsByName(b).length}),n.getById?(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n=t.getElementById(e);return n?[n]:[]}}):(r.filter.ID=function(e){var t=e.replace(te,ne);return function(e){var n=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}},r.find.ID=function(e,t){if(void 0!==t.getElementById&&g){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return [o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return [o]}return []}}),r.find.TAG=n.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):n.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},r.find.CLASS=n.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&g)return t.getElementsByClassName(e)},y=[],m=[],(n.qsa=Z.test(p.querySelectorAll))&&(se(function(e){var t;h.appendChild(e).innerHTML="<a id='"+b+"'></a><select id='"+b+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&m.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||m.push("\\["+M+"*(?:value|"+H+")"),e.querySelectorAll("[id~="+b+"-]").length||m.push("~="),(t=p.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||m.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||m.push(":checked"),e.querySelectorAll("a#"+b+"+*").length||m.push(".#.+[+~]"),e.querySelectorAll("\\\f"),m.push("[\\r\\n\\f]");}),se(function(e){e.innerHTML="<a href='' disabled='disabled'></a><select disabled='disabled'><option/></select>";var t=p.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&m.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&m.push(":enabled",":disabled"),h.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&m.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),m.push(",.*:");})),(n.matchesSelector=Z.test(v=h.matches||h.webkitMatchesSelector||h.mozMatchesSelector||h.oMatchesSelector||h.msMatchesSelector))&&se(function(e){n.disconnectedMatch=v.call(e,"*"),v.call(e,"[s!='']:x"),y.push("!=",F);}),m=m.length&&new RegExp(m.join("|")),y=y.length&&new RegExp(y.join("|")),t=Z.test(h.compareDocumentPosition),w=t||Z.test(h.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return !0;return !1},T=t?function(e,t){if(e===t)return d=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r||(1&(r=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!n.sortDetached&&t.compareDocumentPosition(e)===r?e==p||e.ownerDocument==N&&w(N,e)?-1:t==p||t.ownerDocument==N&&w(N,t)?1:s?k(s,e)-k(s,t):0:4&r?-1:1)}:function(e,t){if(e===t)return d=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,u=[e],l=[t];if(!i||!o)return e==p?-1:t==p?1:i?-1:o?1:s?k(s,e)-k(s,t):0;if(i===o)return fe(e,t);n=e;while(n=n.parentNode)u.unshift(n);n=t;while(n=n.parentNode)l.unshift(n);while(u[r]===l[r])r++;return r?fe(u[r],l[r]):u[r]==N?-1:l[r]==N?1:0},p):p},le.matches=function(e,t){return le(e,null,null,t)},le.matchesSelector=function(e,t){if(f(e),n.matchesSelector&&g&&!D[t+" "]&&(!y||!y.test(t))&&(!m||!m.test(t)))try{var r=v.call(e,t);if(r||n.disconnectedMatch||e.document&&11!==e.document.nodeType)return r}catch(e){D(t,!0);}return le(t,p,null,[e]).length>0},le.contains=function(e,t){return (e.ownerDocument||e)!=p&&f(e),w(e,t)},le.attr=function(e,t){(e.ownerDocument||e)!=p&&f(e);var i=r.attrHandle[t.toLowerCase()],o=i&&L.call(r.attrHandle,t.toLowerCase())?i(e,t,!g):void 0;return void 0!==o?o:n.attributes||!g?e.getAttribute(t):(o=e.getAttributeNode(t))&&o.specified?o.value:null},le.escape=function(e){return (e+"").replace(re,ie)},le.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},le.uniqueSort=function(e){var t,r=[],i=0,o=0;if(d=!n.detectDuplicates,s=!n.sortStable&&e.slice(0),e.sort(T),d){while(t=e[o++])t===e[o]&&(i=r.push(o));while(i--)e.splice(r[i],1);}return s=null,e},i=le.getText=function(e){var t,n="",r=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=i(e);}else if(3===o||4===o)return e.nodeValue}else while(t=e[r++])n+=i(t);return n},(r=le.selectors={cacheLength:50,createPseudo:ce,match:K,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||le.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&le.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return K.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=u(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return "*"===e?function(){return !0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=E[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&E(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=le.attr(r,e);return null==i?"!="===t:!t||(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i.replace(O," ")+" ").indexOf(n)>-1:"|="===t&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),u="last"!==e.slice(-4),l="of-type"===t;return 1===r&&0===i?function(e){return !!e.parentNode}:function(t,n,a){var c,s,d,f,p,h,g=o!==u?"nextSibling":"previousSibling",m=t.parentNode,y=l&&t.nodeName.toLowerCase(),v=!a&&!l,w=!1;if(m){if(o){while(g){f=t;while(f=f[g])if(l?f.nodeName.toLowerCase()===y:1===f.nodeType)return !1;h=g="only"===e&&!h&&"nextSibling";}return !0}if(h=[u?m.firstChild:m.lastChild],u&&v){w=(p=(c=(s=(d=(f=m)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===C&&c[1])&&c[2],f=p&&m.childNodes[p];while(f=++p&&f&&f[g]||(w=p=0)||h.pop())if(1===f.nodeType&&++w&&f===t){s[e]=[C,p,w];break}}else if(v&&(w=p=(c=(s=(d=(f=t)[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]||[])[0]===C&&c[1]),!1===w)while(f=++p&&f&&f[g]||(w=p=0)||h.pop())if((l?f.nodeName.toLowerCase()===y:1===f.nodeType)&&++w&&(v&&((s=(d=f[b]||(f[b]={}))[f.uniqueID]||(d[f.uniqueID]={}))[e]=[C,w]),f===t))break;return (w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(e,t){var n,i=r.pseudos[e]||r.setFilters[e.toLowerCase()]||le.error("unsupported pseudo: "+e);return i[b]?i(t):i.length>1?(n=[e,e,"",t],r.setFilters.hasOwnProperty(e.toLowerCase())?ce(function(e,n){var r,o=i(e,t),u=o.length;while(u--)e[r=k(e,o[u])]=!(n[r]=o[u]);}):function(e){return i(e,0,n)}):i}},pseudos:{not:ce(function(e){var t=[],n=[],r=l(e.replace(j,"$1"));return r[b]?ce(function(e,t,n,i){var o,u=r(e,null,i,[]),l=e.length;while(l--)(o=u[l])&&(e[l]=!(t[l]=o));}):function(e,i,o){return t[0]=e,r(t,null,o,n),t[0]=null,!n.pop()}}),has:ce(function(e){return function(t){return le(e,t).length>0}}),contains:ce(function(e){return e=e.replace(te,ne),function(t){return (t.textContent||i(t)).indexOf(e)>-1}}),lang:ce(function(e){return J.test(e||"")||le.error("unsupported lang: "+e),e=e.replace(te,ne).toLowerCase(),function(t){var n;do{if(n=g?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return (n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return !1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===h},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:pe(!1),disabled:pe(!0),checked:function(e){var t=e.nodeName.toLowerCase();return "input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return !1;return !0},parent:function(e){return !r.pseudos.empty(e)},header:function(e){return Y.test(e.nodeName)},input:function(e){return W.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return "input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return "input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:he(function(){return [0]}),last:he(function(e,t){return [t-1]}),eq:he(function(e,t,n){return [n<0?n+t:n]}),even:he(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:he(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:he(function(e,t,n){for(var r=n<0?n+t:n>t?t:n;--r>=0;)e.push(r);return e}),gt:he(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=r.pseudos.eq;for(t in {radio:!0,checkbox:!0,file:!0,password:!0,image:!0})r.pseudos[t]=function(e){return function(t){return "input"===t.nodeName.toLowerCase()&&t.type===e}}(t);for(t in {submit:!0,reset:!0})r.pseudos[t]=function(e){return function(t){var n=t.nodeName.toLowerCase();return ("input"===n||"button"===n)&&t.type===e}}(t);function me(){}me.prototype=r.filters=r.pseudos,r.setFilters=new me,u=le.tokenize=function(e,t){var n,i,o,u,l,a,c,s=A[e+" "];if(s)return t?0:s.slice(0);l=e,a=[],c=r.preFilter;while(l){n&&!(i=G.exec(l))||(i&&(l=l.slice(i[0].length)||l),a.push(o=[])),n=!1,(i=U.exec(l))&&(n=i.shift(),o.push({value:n,type:i[0].replace(j," ")}),l=l.slice(n.length));for(u in r.filter)!(i=K[u].exec(l))||c[u]&&!(i=c[u](i))||(n=i.shift(),o.push({value:n,type:u,matches:i}),l=l.slice(n.length));if(!n)break}return t?l.length:l?le.error(e):A(e,a).slice(0)};function ye(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function ve(e,t,n){var r=t.dir,i=t.next,o=i||r,u=n&&"parentNode"===o,l=x++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||u)return e(t,n,i);return !1}:function(t,n,a){var c,s,d,f=[C,l];if(a){while(t=t[r])if((1===t.nodeType||u)&&e(t,n,a))return !0}else while(t=t[r])if(1===t.nodeType||u)if(d=t[b]||(t[b]={}),s=d[t.uniqueID]||(d[t.uniqueID]={}),i&&i===t.nodeName.toLowerCase())t=t[r]||t;else {if((c=s[o])&&c[0]===C&&c[1]===l)return f[2]=c[2];if(s[o]=f,f[2]=e(t,n,a))return !0}return !1}}function we(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return !1;return !0}:e[0]}function be(e,t,n){for(var r=0,i=t.length;r<i;r++)le(e,t[r],n);return n}function Ne(e,t,n,r,i){for(var o,u=[],l=0,a=e.length,c=null!=t;l<a;l++)(o=e[l])&&(n&&!n(o,r,i)||(u.push(o),c&&t.push(l)));return u}function Ce(e,t,n,r,i,o){return r&&!r[b]&&(r=Ce(r)),i&&!i[b]&&(i=Ce(i,o)),ce(function(o,u,l,a){var c,s,d,f=[],p=[],h=u.length,g=o||be(t||"*",l.nodeType?[l]:l,[]),m=!e||!o&&t?g:Ne(g,f,e,l,a),y=n?i||(o?e:h||r)?[]:u:m;if(n&&n(m,y,l,a),r){c=Ne(y,p),r(c,[],l,a),s=c.length;while(s--)(d=c[s])&&(y[p[s]]=!(m[p[s]]=d));}if(o){if(i||e){if(i){c=[],s=y.length;while(s--)(d=y[s])&&c.push(m[s]=d);i(null,y=[],c,a);}s=y.length;while(s--)(d=y[s])&&(c=i?k(o,d):f[s])>-1&&(o[c]=!(u[c]=d));}}else y=Ne(y===u?y.splice(h,y.length):y),i?i(null,u,y,a):R.apply(u,y);})}function xe(e){for(var t,n,i,o=e.length,u=r.relative[e[0].type],l=u||r.relative[" "],a=u?1:0,s=ve(function(e){return e===t},l,!0),d=ve(function(e){return k(t,e)>-1},l,!0),f=[function(e,n,r){var i=!u&&(r||n!==c)||((t=n).nodeType?s(e,n,r):d(e,n,r));return t=null,i}];a<o;a++)if(n=r.relative[e[a].type])f=[ve(we(f),n)];else {if((n=r.filter[e[a].type].apply(null,e[a].matches))[b]){for(i=++a;i<o;i++)if(r.relative[e[i].type])break;return Ce(a>1&&we(f),a>1&&ye(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(j,"$1"),n,a<i&&xe(e.slice(a,i)),i<o&&xe(e=e.slice(i)),i<o&&ye(e))}f.push(n);}return we(f)}function Ee(e,t){var n=t.length>0,i=e.length>0,o=function(o,u,l,a,s){var d,h,m,y=0,v="0",w=o&&[],b=[],N=c,x=o||i&&r.find.TAG("*",s),E=C+=null==N?1:Math.random()||.1,A=x.length;for(s&&(c=u==p||u||s);v!==A&&null!=(d=x[v]);v++){if(i&&d){h=0,u||d.ownerDocument==p||(f(d),l=!g);while(m=e[h++])if(m(d,u||p,l)){a.push(d);break}s&&(C=E);}n&&((d=!m&&d)&&y--,o&&w.push(d));}if(y+=v,n&&v!==y){h=0;while(m=t[h++])m(w,b,u,l);if(o){if(y>0)while(v--)w[v]||b[v]||(b[v]=I.call(a));b=Ne(b);}R.apply(a,b),s&&!o&&b.length>0&&y+t.length>1&&le.uniqueSort(a);}return s&&(C=E,c=N),w};return n?ce(o):o}l=le.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){t||(t=u(e)),n=t.length;while(n--)(o=xe(t[n]))[b]?r.push(o):i.push(o);(o=S(e,Ee(i,r))).selector=e;}return o},a=le.select=function(e,t,n,i){var o,a,c,s,d,f="function"==typeof e&&e,p=!i&&u(e=f.selector||e);if(n=n||[],1===p.length){if((a=p[0]=p[0].slice(0)).length>2&&"ID"===(c=a[0]).type&&9===t.nodeType&&g&&r.relative[a[1].type]){if(!(t=(r.find.ID(c.matches[0].replace(te,ne),t)||[])[0]))return n;f&&(t=t.parentNode),e=e.slice(a.shift().value.length);}o=K.needsContext.test(e)?0:a.length;while(o--){if(c=a[o],r.relative[s=c.type])break;if((d=r.find[s])&&(i=d(c.matches[0].replace(te,ne),ee.test(a[0].type)&&ge(t.parentNode)||t))){if(a.splice(o,1),!(e=i.length&&ye(a)))return R.apply(n,i),n;break}}}return (f||l(e,p))(i,t,!g,n,!t||ee.test(e)&&ge(t.parentNode)||t),n},n.sortStable=b.split("").sort(T).join("")===b,n.detectDuplicates=!!d,f(),n.sortDetached=se(function(e){return 1&e.compareDocumentPosition(p.createElement("fieldset"))}),se(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||de("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),n.attributes&&se(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||de("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),se(function(e){return null==e.getAttribute("disabled")})||de(H,function(e,t,n){var r;if(!n)return !0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null});var Ae=e.Sizzle;le.noConflict=function(){return e.Sizzle===le&&(e.Sizzle=Ae),le},"function"==typeof define&&define.amd?define(function(){return le}):"undefined"!=typeof module&&module.exports?module.exports=le:e.Sizzle=le;}(window);
411
+ //# sourceMappingURL=sizzle.min.map
412
+
413
+ return module.exports;
414
+ })();
415
+
416
+ function matches(selector, elm) {
417
+ const r = Sizzle.matches(selector, [elm]);
418
+ return r.length > 0;
419
+ }
420
+ function selectOne(selector, elm) {
421
+ const r = Sizzle(selector, elm);
422
+ return r[0] || null;
423
+ }
424
+ function selectAll(selector, elm) {
425
+ return Sizzle(selector, elm);
426
+ }
427
+
428
+ class MockClassList {
429
+ constructor(elm) {
430
+ this.elm = elm;
431
+ }
432
+ add(...classNames) {
433
+ const clsNames = getItems(this.elm);
434
+ let updated = false;
435
+ classNames.forEach(className => {
436
+ className = String(className);
437
+ validateClass(className);
438
+ if (clsNames.includes(className) === false) {
439
+ clsNames.push(className);
440
+ updated = true;
441
+ }
442
+ });
443
+ if (updated) {
444
+ this.elm.setAttributeNS(null, 'class', clsNames.join(' '));
445
+ }
446
+ }
447
+ remove(...classNames) {
448
+ const clsNames = getItems(this.elm);
449
+ let updated = false;
450
+ classNames.forEach(className => {
451
+ className = String(className);
452
+ validateClass(className);
453
+ const index = clsNames.indexOf(className);
454
+ if (index > -1) {
455
+ clsNames.splice(index, 1);
456
+ updated = true;
457
+ }
458
+ });
459
+ if (updated) {
460
+ this.elm.setAttributeNS(null, 'class', clsNames.filter(c => c.length > 0).join(' '));
461
+ }
462
+ }
463
+ contains(className) {
464
+ className = String(className);
465
+ return getItems(this.elm).includes(className);
466
+ }
467
+ toggle(className) {
468
+ className = String(className);
469
+ if (this.contains(className) === true) {
470
+ this.remove(className);
471
+ }
472
+ else {
473
+ this.add(className);
474
+ }
475
+ }
476
+ get length() {
477
+ return getItems(this.elm).length;
478
+ }
479
+ item(index) {
480
+ return getItems(this.elm)[index];
481
+ }
482
+ toString() {
483
+ return getItems(this.elm).join(' ');
484
+ }
485
+ }
486
+ function validateClass(className) {
487
+ if (className === '') {
488
+ throw new Error('The token provided must not be empty.');
489
+ }
490
+ if (/\s/.test(className)) {
491
+ throw new Error(`The token provided ('${className}') contains HTML space characters, which are not valid in tokens.`);
492
+ }
493
+ }
494
+ function getItems(elm) {
495
+ const className = elm.getAttribute('class');
496
+ if (typeof className === 'string' && className.length > 0) {
497
+ return className
498
+ .trim()
499
+ .split(' ')
500
+ .filter(c => c.length > 0);
501
+ }
502
+ return [];
503
+ }
504
+
505
+ class MockCSSStyleDeclaration {
506
+ constructor() {
507
+ this._styles = new Map();
508
+ }
509
+ setProperty(prop, value) {
510
+ prop = jsCaseToCssCase(prop);
511
+ if (value == null || value === '') {
512
+ this._styles.delete(prop);
513
+ }
514
+ else {
515
+ this._styles.set(prop, String(value));
516
+ }
517
+ }
518
+ getPropertyValue(prop) {
519
+ prop = jsCaseToCssCase(prop);
520
+ return String(this._styles.get(prop) || '');
521
+ }
522
+ removeProperty(prop) {
523
+ prop = jsCaseToCssCase(prop);
524
+ this._styles.delete(prop);
525
+ }
526
+ get length() {
527
+ return this._styles.size;
528
+ }
529
+ get cssText() {
530
+ const cssText = [];
531
+ this._styles.forEach((value, prop) => {
532
+ cssText.push(`${prop}: ${value};`);
533
+ });
534
+ return cssText.join(' ').trim();
535
+ }
536
+ set cssText(cssText) {
537
+ if (cssText == null || cssText === '') {
538
+ this._styles.clear();
539
+ return;
540
+ }
541
+ cssText.split(';').forEach(rule => {
542
+ rule = rule.trim();
543
+ if (rule.length > 0) {
544
+ const splt = rule.split(':');
545
+ if (splt.length > 1) {
546
+ const prop = splt[0].trim();
547
+ const value = splt[1].trim();
548
+ if (prop !== '' && value !== '') {
549
+ this._styles.set(jsCaseToCssCase(prop), value);
550
+ }
551
+ }
552
+ }
553
+ });
554
+ }
555
+ }
556
+ function createCSSStyleDeclaration() {
557
+ return new Proxy(new MockCSSStyleDeclaration(), cssProxyHandler);
558
+ }
559
+ const cssProxyHandler = {
560
+ get(cssStyle, prop) {
561
+ if (prop in cssStyle) {
562
+ return cssStyle[prop];
563
+ }
564
+ prop = cssCaseToJsCase(prop);
565
+ return cssStyle.getPropertyValue(prop);
566
+ },
567
+ set(cssStyle, prop, value) {
568
+ if (prop in cssStyle) {
569
+ cssStyle[prop] = value;
570
+ }
571
+ else {
572
+ cssStyle.setProperty(prop, value);
573
+ }
574
+ return true;
575
+ },
576
+ };
577
+ function cssCaseToJsCase(str) {
578
+ // font-size to fontSize
579
+ if (str.length > 1 && str.includes('-') === true) {
580
+ str = str
581
+ .toLowerCase()
582
+ .split('-')
583
+ .map(segment => segment.charAt(0).toUpperCase() + segment.slice(1))
584
+ .join('');
585
+ str = str.substr(0, 1).toLowerCase() + str.substr(1);
586
+ }
587
+ return str;
588
+ }
589
+ function jsCaseToCssCase(str) {
590
+ // fontSize to font-size
591
+ if (str.length > 1 && str.includes('-') === false && /[A-Z]/.test(str) === true) {
592
+ str = str
593
+ .replace(/([A-Z])/g, g => ' ' + g[0])
594
+ .trim()
595
+ .replace(/ /g, '-')
596
+ .toLowerCase();
597
+ }
598
+ return str;
599
+ }
600
+
601
+ class MockEvent {
602
+ constructor(type, eventInitDict) {
603
+ this.bubbles = false;
604
+ this.cancelBubble = false;
605
+ this.cancelable = false;
606
+ this.composed = false;
607
+ this.currentTarget = null;
608
+ this.defaultPrevented = false;
609
+ this.srcElement = null;
610
+ this.target = null;
611
+ if (typeof type !== 'string') {
612
+ throw new Error(`Event type required`);
613
+ }
614
+ this.type = type;
615
+ this.timeStamp = Date.now();
616
+ if (eventInitDict != null) {
617
+ Object.assign(this, eventInitDict);
618
+ }
619
+ }
620
+ preventDefault() {
621
+ this.defaultPrevented = true;
622
+ }
623
+ stopPropagation() {
624
+ this.cancelBubble = true;
625
+ }
626
+ stopImmediatePropagation() {
627
+ this.cancelBubble = true;
628
+ }
629
+ }
630
+ class MockCustomEvent extends MockEvent {
631
+ constructor(type, customEventInitDic) {
632
+ super(type);
633
+ this.detail = null;
634
+ if (customEventInitDic != null) {
635
+ Object.assign(this, customEventInitDic);
636
+ }
637
+ }
638
+ }
639
+ class MockKeyboardEvent extends MockEvent {
640
+ constructor(type, keyboardEventInitDic) {
641
+ super(type);
642
+ this.code = '';
643
+ this.key = '';
644
+ this.altKey = false;
645
+ this.ctrlKey = false;
646
+ this.metaKey = false;
647
+ this.shiftKey = false;
648
+ this.location = 0;
649
+ this.repeat = false;
650
+ if (keyboardEventInitDic != null) {
651
+ Object.assign(this, keyboardEventInitDic);
652
+ }
653
+ }
654
+ }
655
+ class MockMouseEvent extends MockEvent {
656
+ constructor(type, mouseEventInitDic) {
657
+ super(type);
658
+ this.screenX = 0;
659
+ this.screenY = 0;
660
+ this.clientX = 0;
661
+ this.clientY = 0;
662
+ this.ctrlKey = false;
663
+ this.shiftKey = false;
664
+ this.altKey = false;
665
+ this.metaKey = false;
666
+ this.button = 0;
667
+ this.buttons = 0;
668
+ this.relatedTarget = null;
669
+ if (mouseEventInitDic != null) {
670
+ Object.assign(this, mouseEventInitDic);
671
+ }
672
+ }
673
+ }
674
+ class MockEventListener {
675
+ constructor(type, handler) {
676
+ this.type = type;
677
+ this.handler = handler;
678
+ }
679
+ }
680
+ function addEventListener(elm, type, handler) {
681
+ const target = elm;
682
+ if (target.__listeners == null) {
683
+ target.__listeners = [];
684
+ }
685
+ target.__listeners.push(new MockEventListener(type, handler));
686
+ }
687
+ function removeEventListener(elm, type, handler) {
688
+ const target = elm;
689
+ if (target != null && Array.isArray(target.__listeners) === true) {
690
+ const elmListener = target.__listeners.find(e => e.type === type && e.handler === handler);
691
+ if (elmListener != null) {
692
+ const index = target.__listeners.indexOf(elmListener);
693
+ target.__listeners.splice(index, 1);
694
+ }
695
+ }
696
+ }
697
+ function resetEventListeners(target) {
698
+ if (target != null && target.__listeners != null) {
699
+ target.__listeners = null;
700
+ }
701
+ }
702
+ function triggerEventListener(elm, ev) {
703
+ if (elm == null || ev.cancelBubble === true) {
704
+ return;
705
+ }
706
+ const target = elm;
707
+ ev.currentTarget = elm;
708
+ if (Array.isArray(target.__listeners) === true) {
709
+ const listeners = target.__listeners.filter(e => e.type === ev.type);
710
+ listeners.forEach(listener => {
711
+ try {
712
+ listener.handler.call(target, ev);
713
+ }
714
+ catch (err) {
715
+ console.error(err);
716
+ }
717
+ });
718
+ }
719
+ if (ev.bubbles === false) {
720
+ return;
721
+ }
722
+ if (elm.nodeName === "#document" /* DOCUMENT_NODE */) {
723
+ triggerEventListener(elm.defaultView, ev);
724
+ }
725
+ else {
726
+ triggerEventListener(elm.parentElement, ev);
727
+ }
728
+ }
729
+ function dispatchEvent(currentTarget, ev) {
730
+ ev.target = currentTarget;
731
+ triggerEventListener(currentTarget, ev);
732
+ return true;
733
+ }
734
+
735
+ function serializeNodeToHtml(elm, opts = {}) {
736
+ const output = {
737
+ currentLineWidth: 0,
738
+ indent: 0,
739
+ isWithinBody: false,
740
+ text: [],
741
+ };
742
+ if (opts.prettyHtml) {
743
+ if (typeof opts.indentSpaces !== 'number') {
744
+ opts.indentSpaces = 2;
745
+ }
746
+ if (typeof opts.newLines !== 'boolean') {
747
+ opts.newLines = true;
748
+ }
749
+ opts.approximateLineWidth = -1;
750
+ }
751
+ else {
752
+ opts.prettyHtml = false;
753
+ if (typeof opts.newLines !== 'boolean') {
754
+ opts.newLines = false;
755
+ }
756
+ if (typeof opts.indentSpaces !== 'number') {
757
+ opts.indentSpaces = 0;
758
+ }
759
+ }
760
+ if (typeof opts.approximateLineWidth !== 'number') {
761
+ opts.approximateLineWidth = -1;
762
+ }
763
+ if (typeof opts.removeEmptyAttributes !== 'boolean') {
764
+ opts.removeEmptyAttributes = true;
765
+ }
766
+ if (typeof opts.removeAttributeQuotes !== 'boolean') {
767
+ opts.removeAttributeQuotes = false;
768
+ }
769
+ if (typeof opts.removeBooleanAttributeQuotes !== 'boolean') {
770
+ opts.removeBooleanAttributeQuotes = false;
771
+ }
772
+ if (typeof opts.removeHtmlComments !== 'boolean') {
773
+ opts.removeHtmlComments = false;
774
+ }
775
+ if (typeof opts.serializeShadowRoot !== 'boolean') {
776
+ opts.serializeShadowRoot = false;
777
+ }
778
+ if (opts.outerHtml) {
779
+ serializeToHtml(elm, opts, output, false);
780
+ }
781
+ else {
782
+ for (let i = 0, ii = elm.childNodes.length; i < ii; i++) {
783
+ serializeToHtml(elm.childNodes[i], opts, output, false);
784
+ }
785
+ }
786
+ if (output.text[0] === '\n') {
787
+ output.text.shift();
788
+ }
789
+ if (output.text[output.text.length - 1] === '\n') {
790
+ output.text.pop();
791
+ }
792
+ return output.text.join('');
793
+ }
794
+ function serializeToHtml(node, opts, output, isShadowRoot) {
795
+ if (node.nodeType === 1 /* ELEMENT_NODE */ || isShadowRoot) {
796
+ const tagName = isShadowRoot ? 'mock:shadow-root' : getTagName(node);
797
+ if (tagName === 'body') {
798
+ output.isWithinBody = true;
799
+ }
800
+ const ignoreTag = opts.excludeTags != null && opts.excludeTags.includes(tagName);
801
+ if (ignoreTag === false) {
802
+ const isWithinWhitespaceSensitiveNode = opts.newLines || opts.indentSpaces > 0 ? isWithinWhitespaceSensitive(node) : false;
803
+ if (opts.newLines && !isWithinWhitespaceSensitiveNode) {
804
+ output.text.push('\n');
805
+ output.currentLineWidth = 0;
806
+ }
807
+ if (opts.indentSpaces > 0 && !isWithinWhitespaceSensitiveNode) {
808
+ for (let i = 0; i < output.indent; i++) {
809
+ output.text.push(' ');
810
+ }
811
+ output.currentLineWidth += output.indent;
812
+ }
813
+ output.text.push('<' + tagName);
814
+ output.currentLineWidth += tagName.length + 1;
815
+ const attrsLength = node.attributes.length;
816
+ const attributes = opts.prettyHtml && attrsLength > 1
817
+ ? cloneAttributes(node.attributes, true)
818
+ : node.attributes;
819
+ for (let i = 0; i < attrsLength; i++) {
820
+ const attr = attributes.item(i);
821
+ const attrName = attr.name;
822
+ if (attrName === 'style') {
823
+ continue;
824
+ }
825
+ let attrValue = attr.value;
826
+ if (opts.removeEmptyAttributes && attrValue === '' && REMOVE_EMPTY_ATTR.has(attrName)) {
827
+ continue;
828
+ }
829
+ const attrNamespaceURI = attr.namespaceURI;
830
+ if (attrNamespaceURI == null) {
831
+ output.currentLineWidth += attrName.length + 1;
832
+ if (opts.approximateLineWidth > 0 && output.currentLineWidth > opts.approximateLineWidth) {
833
+ output.text.push('\n' + attrName);
834
+ output.currentLineWidth = 0;
835
+ }
836
+ else {
837
+ output.text.push(' ' + attrName);
838
+ }
839
+ }
840
+ else if (attrNamespaceURI === 'http://www.w3.org/XML/1998/namespace') {
841
+ output.text.push(' xml:' + attrName);
842
+ output.currentLineWidth += attrName.length + 5;
843
+ }
844
+ else if (attrNamespaceURI === 'http://www.w3.org/2000/xmlns/') {
845
+ if (attrName !== 'xmlns') {
846
+ output.text.push(' xmlns:' + attrName);
847
+ output.currentLineWidth += attrName.length + 7;
848
+ }
849
+ else {
850
+ output.text.push(' ' + attrName);
851
+ output.currentLineWidth += attrName.length + 1;
852
+ }
853
+ }
854
+ else if (attrNamespaceURI === XLINK_NS) {
855
+ output.text.push(' xlink:' + attrName);
856
+ output.currentLineWidth += attrName.length + 7;
857
+ }
858
+ else {
859
+ output.text.push(' ' + attrNamespaceURI + ':' + attrName);
860
+ output.currentLineWidth += attrNamespaceURI.length + attrName.length + 2;
861
+ }
862
+ if (opts.prettyHtml && attrName === 'class') {
863
+ attrValue = attr.value = attrValue
864
+ .split(' ')
865
+ .filter(t => t !== '')
866
+ .sort()
867
+ .join(' ')
868
+ .trim();
869
+ }
870
+ if (attrValue === '') {
871
+ if (opts.removeBooleanAttributeQuotes && BOOLEAN_ATTR.has(attrName)) {
872
+ continue;
873
+ }
874
+ if (opts.removeEmptyAttributes && attrName.startsWith('data-')) {
875
+ continue;
876
+ }
877
+ }
878
+ if (opts.removeAttributeQuotes && CAN_REMOVE_ATTR_QUOTES.test(attrValue)) {
879
+ output.text.push('=' + escapeString(attrValue, true));
880
+ output.currentLineWidth += attrValue.length + 1;
881
+ }
882
+ else {
883
+ output.text.push('="' + escapeString(attrValue, true) + '"');
884
+ output.currentLineWidth += attrValue.length + 3;
885
+ }
886
+ }
887
+ if (node.hasAttribute('style')) {
888
+ const cssText = node.style.cssText;
889
+ if (opts.approximateLineWidth > 0 &&
890
+ output.currentLineWidth + cssText.length + 10 > opts.approximateLineWidth) {
891
+ output.text.push(`\nstyle="${cssText}">`);
892
+ output.currentLineWidth = 0;
893
+ }
894
+ else {
895
+ output.text.push(` style="${cssText}">`);
896
+ output.currentLineWidth += cssText.length + 10;
897
+ }
898
+ }
899
+ else {
900
+ output.text.push('>');
901
+ output.currentLineWidth += 1;
902
+ }
903
+ }
904
+ if (EMPTY_ELEMENTS.has(tagName) === false) {
905
+ if (opts.serializeShadowRoot && node.shadowRoot != null) {
906
+ output.indent = output.indent + opts.indentSpaces;
907
+ serializeToHtml(node.shadowRoot, opts, output, true);
908
+ output.indent = output.indent - opts.indentSpaces;
909
+ if (opts.newLines &&
910
+ (node.childNodes.length === 0 ||
911
+ (node.childNodes.length === 1 &&
912
+ node.childNodes[0].nodeType === 3 /* TEXT_NODE */ &&
913
+ node.childNodes[0].nodeValue.trim() === ''))) {
914
+ output.text.push('\n');
915
+ output.currentLineWidth = 0;
916
+ for (let i = 0; i < output.indent; i++) {
917
+ output.text.push(' ');
918
+ }
919
+ output.currentLineWidth += output.indent;
920
+ }
921
+ }
922
+ if (opts.excludeTagContent == null || opts.excludeTagContent.includes(tagName) === false) {
923
+ const childNodes = tagName === 'template' ? node.content.childNodes : node.childNodes;
924
+ const childNodeLength = childNodes.length;
925
+ if (childNodeLength > 0) {
926
+ if (childNodeLength === 1 &&
927
+ childNodes[0].nodeType === 3 /* TEXT_NODE */ &&
928
+ (typeof childNodes[0].nodeValue !== 'string' || childNodes[0].nodeValue.trim() === '')) ;
929
+ else {
930
+ const isWithinWhitespaceSensitiveNode = opts.newLines || opts.indentSpaces > 0 ? isWithinWhitespaceSensitive(node) : false;
931
+ if (!isWithinWhitespaceSensitiveNode && opts.indentSpaces > 0 && ignoreTag === false) {
932
+ output.indent = output.indent + opts.indentSpaces;
933
+ }
934
+ for (let i = 0; i < childNodeLength; i++) {
935
+ serializeToHtml(childNodes[i], opts, output, false);
936
+ }
937
+ if (ignoreTag === false) {
938
+ if (opts.newLines && !isWithinWhitespaceSensitiveNode) {
939
+ output.text.push('\n');
940
+ output.currentLineWidth = 0;
941
+ }
942
+ if (opts.indentSpaces > 0 && !isWithinWhitespaceSensitiveNode) {
943
+ output.indent = output.indent - opts.indentSpaces;
944
+ for (let i = 0; i < output.indent; i++) {
945
+ output.text.push(' ');
946
+ }
947
+ output.currentLineWidth += output.indent;
948
+ }
949
+ }
950
+ }
951
+ }
952
+ if (ignoreTag === false) {
953
+ output.text.push('</' + tagName + '>');
954
+ output.currentLineWidth += tagName.length + 3;
955
+ }
956
+ }
957
+ }
958
+ if (opts.approximateLineWidth > 0 && STRUCTURE_ELEMENTS.has(tagName)) {
959
+ output.text.push('\n');
960
+ output.currentLineWidth = 0;
961
+ }
962
+ if (tagName === 'body') {
963
+ output.isWithinBody = false;
964
+ }
965
+ }
966
+ else if (node.nodeType === 3 /* TEXT_NODE */) {
967
+ let textContent = node.nodeValue;
968
+ if (typeof textContent === 'string') {
969
+ const trimmedTextContent = textContent.trim();
970
+ if (trimmedTextContent === '') {
971
+ // this text node is whitespace only
972
+ if (isWithinWhitespaceSensitive(node)) {
973
+ // whitespace matters within this element
974
+ // just add the exact text we were given
975
+ output.text.push(textContent);
976
+ output.currentLineWidth += textContent.length;
977
+ }
978
+ else if (opts.approximateLineWidth > 0 && !output.isWithinBody) ;
979
+ else if (!opts.prettyHtml) {
980
+ // this text node is only whitespace, and it's not
981
+ // within a whitespace sensitive element like <pre> or <code>
982
+ // so replace the entire white space with a single new line
983
+ output.currentLineWidth += 1;
984
+ if (opts.approximateLineWidth > 0 && output.currentLineWidth > opts.approximateLineWidth) {
985
+ // good enough for a new line
986
+ // for perf these are all just estimates
987
+ // we don't care to ensure exact line lengths
988
+ output.text.push('\n');
989
+ output.currentLineWidth = 0;
990
+ }
991
+ else {
992
+ // let's keep it all on the same line yet
993
+ output.text.push(' ');
994
+ }
995
+ }
996
+ }
997
+ else {
998
+ // this text node has text content
999
+ const isWithinWhitespaceSensitiveNode = opts.newLines || opts.indentSpaces > 0 || opts.prettyHtml ? isWithinWhitespaceSensitive(node) : false;
1000
+ if (opts.newLines && !isWithinWhitespaceSensitiveNode) {
1001
+ output.text.push('\n');
1002
+ output.currentLineWidth = 0;
1003
+ }
1004
+ if (opts.indentSpaces > 0 && !isWithinWhitespaceSensitiveNode) {
1005
+ for (let i = 0; i < output.indent; i++) {
1006
+ output.text.push(' ');
1007
+ }
1008
+ output.currentLineWidth += output.indent;
1009
+ }
1010
+ let textContentLength = textContent.length;
1011
+ if (textContentLength > 0) {
1012
+ // this text node has text content
1013
+ const parentTagName = node.parentNode != null && node.parentNode.nodeType === 1 /* ELEMENT_NODE */
1014
+ ? node.parentNode.nodeName
1015
+ : null;
1016
+ if (NON_ESCAPABLE_CONTENT.has(parentTagName)) {
1017
+ // this text node cannot have its content escaped since it's going
1018
+ // into an element like <style> or <script>
1019
+ if (isWithinWhitespaceSensitive(node)) {
1020
+ output.text.push(textContent);
1021
+ }
1022
+ else {
1023
+ output.text.push(trimmedTextContent);
1024
+ textContentLength = trimmedTextContent.length;
1025
+ }
1026
+ output.currentLineWidth += textContentLength;
1027
+ }
1028
+ else {
1029
+ // this text node is going into a normal element and html can be escaped
1030
+ if (opts.prettyHtml && !isWithinWhitespaceSensitiveNode) {
1031
+ // pretty print the text node
1032
+ output.text.push(escapeString(textContent.replace(/\s\s+/g, ' ').trim(), false));
1033
+ output.currentLineWidth += textContentLength;
1034
+ }
1035
+ else {
1036
+ // not pretty printing the text node
1037
+ if (isWithinWhitespaceSensitive(node)) {
1038
+ output.currentLineWidth += textContentLength;
1039
+ }
1040
+ else {
1041
+ // this element is not a whitespace sensitive one, like <pre> or <code> so
1042
+ // any whitespace at the start and end can be cleaned up to just be one space
1043
+ if (/\s/.test(textContent.charAt(0))) {
1044
+ textContent = ' ' + textContent.trimLeft();
1045
+ }
1046
+ textContentLength = textContent.length;
1047
+ if (textContentLength > 1) {
1048
+ if (/\s/.test(textContent.charAt(textContentLength - 1))) {
1049
+ if (opts.approximateLineWidth > 0 &&
1050
+ output.currentLineWidth + textContentLength > opts.approximateLineWidth) {
1051
+ textContent = textContent.trimRight() + '\n';
1052
+ output.currentLineWidth = 0;
1053
+ }
1054
+ else {
1055
+ textContent = textContent.trimRight() + ' ';
1056
+ }
1057
+ }
1058
+ }
1059
+ output.currentLineWidth += textContentLength;
1060
+ }
1061
+ output.text.push(escapeString(textContent, false));
1062
+ }
1063
+ }
1064
+ }
1065
+ }
1066
+ }
1067
+ }
1068
+ else if (node.nodeType === 8 /* COMMENT_NODE */) {
1069
+ const nodeValue = node.nodeValue;
1070
+ if (opts.removeHtmlComments) {
1071
+ const isHydrateAnnotation = nodeValue.startsWith(CONTENT_REF_ID + '.') ||
1072
+ nodeValue.startsWith(ORG_LOCATION_ID + '.') ||
1073
+ nodeValue.startsWith(SLOT_NODE_ID + '.') ||
1074
+ nodeValue.startsWith(TEXT_NODE_ID + '.');
1075
+ if (!isHydrateAnnotation) {
1076
+ return;
1077
+ }
1078
+ }
1079
+ const isWithinWhitespaceSensitiveNode = opts.newLines || opts.indentSpaces > 0 ? isWithinWhitespaceSensitive(node) : false;
1080
+ if (opts.newLines && !isWithinWhitespaceSensitiveNode) {
1081
+ output.text.push('\n');
1082
+ output.currentLineWidth = 0;
1083
+ }
1084
+ if (opts.indentSpaces > 0 && !isWithinWhitespaceSensitiveNode) {
1085
+ for (let i = 0; i < output.indent; i++) {
1086
+ output.text.push(' ');
1087
+ }
1088
+ output.currentLineWidth += output.indent;
1089
+ }
1090
+ output.text.push('<!--' + nodeValue + '-->');
1091
+ output.currentLineWidth += nodeValue.length + 7;
1092
+ }
1093
+ else if (node.nodeType === 10 /* DOCUMENT_TYPE_NODE */) {
1094
+ output.text.push('<!doctype html>');
1095
+ }
1096
+ }
1097
+ const AMP_REGEX = /&/g;
1098
+ const NBSP_REGEX = /\u00a0/g;
1099
+ const DOUBLE_QUOTE_REGEX = /"/g;
1100
+ const LT_REGEX = /</g;
1101
+ const GT_REGEX = />/g;
1102
+ const CAN_REMOVE_ATTR_QUOTES = /^[^ \t\n\f\r"'`=<>\/\\-]+$/;
1103
+ function getTagName(element) {
1104
+ if (element.namespaceURI === 'http://www.w3.org/1999/xhtml') {
1105
+ return element.nodeName.toLowerCase();
1106
+ }
1107
+ else {
1108
+ return element.nodeName;
1109
+ }
1110
+ }
1111
+ function escapeString(str, attrMode) {
1112
+ str = str.replace(AMP_REGEX, '&amp;').replace(NBSP_REGEX, '&nbsp;');
1113
+ if (attrMode) {
1114
+ return str.replace(DOUBLE_QUOTE_REGEX, '&quot;');
1115
+ }
1116
+ return str.replace(LT_REGEX, '&lt;').replace(GT_REGEX, '&gt;');
1117
+ }
1118
+ function isWithinWhitespaceSensitive(node) {
1119
+ while (node != null) {
1120
+ if (WHITESPACE_SENSITIVE.has(node.nodeName)) {
1121
+ return true;
1122
+ }
1123
+ node = node.parentNode;
1124
+ }
1125
+ return false;
1126
+ }
1127
+ /*@__PURE__*/ const NON_ESCAPABLE_CONTENT = new Set([
1128
+ 'STYLE',
1129
+ 'SCRIPT',
1130
+ 'IFRAME',
1131
+ 'NOSCRIPT',
1132
+ 'XMP',
1133
+ 'NOEMBED',
1134
+ 'NOFRAMES',
1135
+ 'PLAINTEXT',
1136
+ ]);
1137
+ /*@__PURE__*/ const WHITESPACE_SENSITIVE = new Set([
1138
+ 'CODE',
1139
+ 'OUTPUT',
1140
+ 'PLAINTEXT',
1141
+ 'PRE',
1142
+ 'SCRIPT',
1143
+ 'TEMPLATE',
1144
+ 'TEXTAREA',
1145
+ ]);
1146
+ /*@__PURE__*/ const EMPTY_ELEMENTS = new Set([
1147
+ 'area',
1148
+ 'base',
1149
+ 'basefont',
1150
+ 'bgsound',
1151
+ 'br',
1152
+ 'col',
1153
+ 'embed',
1154
+ 'frame',
1155
+ 'hr',
1156
+ 'img',
1157
+ 'input',
1158
+ 'keygen',
1159
+ 'link',
1160
+ 'meta',
1161
+ 'param',
1162
+ 'source',
1163
+ 'trace',
1164
+ 'wbr',
1165
+ ]);
1166
+ /*@__PURE__*/ const REMOVE_EMPTY_ATTR = new Set(['class', 'dir', 'id', 'lang', 'name', 'title']);
1167
+ /*@__PURE__*/ const BOOLEAN_ATTR = new Set([
1168
+ 'allowfullscreen',
1169
+ 'async',
1170
+ 'autofocus',
1171
+ 'autoplay',
1172
+ 'checked',
1173
+ 'compact',
1174
+ 'controls',
1175
+ 'declare',
1176
+ 'default',
1177
+ 'defaultchecked',
1178
+ 'defaultmuted',
1179
+ 'defaultselected',
1180
+ 'defer',
1181
+ 'disabled',
1182
+ 'enabled',
1183
+ 'formnovalidate',
1184
+ 'hidden',
1185
+ 'indeterminate',
1186
+ 'inert',
1187
+ 'ismap',
1188
+ 'itemscope',
1189
+ 'loop',
1190
+ 'multiple',
1191
+ 'muted',
1192
+ 'nohref',
1193
+ 'nomodule',
1194
+ 'noresize',
1195
+ 'noshade',
1196
+ 'novalidate',
1197
+ 'nowrap',
1198
+ 'open',
1199
+ 'pauseonexit',
1200
+ 'readonly',
1201
+ 'required',
1202
+ 'reversed',
1203
+ 'scoped',
1204
+ 'seamless',
1205
+ 'selected',
1206
+ 'sortable',
1207
+ 'truespeed',
1208
+ 'typemustmatch',
1209
+ 'visible',
1210
+ ]);
1211
+ /*@__PURE__*/ const STRUCTURE_ELEMENTS = new Set([
1212
+ 'html',
1213
+ 'body',
1214
+ 'head',
1215
+ 'iframe',
1216
+ 'meta',
1217
+ 'link',
1218
+ 'base',
1219
+ 'title',
1220
+ 'script',
1221
+ 'style',
1222
+ ]);
1223
+
1224
+ // Parse5 6.0.1
1225
+ const e=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=function(e){return e>=55296&&e<=57343},i=function(e){return 32!==e&&10!==e&&13!==e&&9!==e&&12!==e&&e>=1&&e<=31||e>=127&&e<=159},o=function(e){return e>=64976&&e<=65007||t.indexOf(e)>-1},a="unexpected-null-character",T="invalid-first-character-of-tag-name",E="missing-semicolon-after-character-reference",h="eof-before-tag-name",c="eof-in-tag",_="missing-whitespace-after-doctype-public-keyword",l="missing-whitespace-between-doctype-public-and-system-identifiers",m="missing-whitespace-after-doctype-system-keyword",p="missing-quote-before-doctype-public-identifier",A="missing-quote-before-doctype-system-identifier",u="missing-doctype-public-identifier",N="missing-doctype-system-identifier",d="abrupt-doctype-public-identifier",C="abrupt-doctype-system-identifier",O="eof-in-script-html-comment-like-text",f="eof-in-doctype",S="abrupt-closing-of-empty-comment",R="eof-in-comment",I="absence-of-digits-in-numeric-character-reference",L="end-tag-without-matching-open-element",k="misplaced-start-tag-for-head-element";const M=s;var g=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 P=s,H={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]},D={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},F="DATA_STATE",U="RCDATA_STATE",G="RAWTEXT_STATE",B="SCRIPT_DATA_STATE",K="PLAINTEXT_STATE",b="TAG_OPEN_STATE",x="END_TAG_OPEN_STATE",y="TAG_NAME_STATE",v="RCDATA_LESS_THAN_SIGN_STATE",Y="RCDATA_END_TAG_OPEN_STATE",w="RCDATA_END_TAG_NAME_STATE",Q="RAWTEXT_LESS_THAN_SIGN_STATE",X="RAWTEXT_END_TAG_OPEN_STATE",W="RAWTEXT_END_TAG_NAME_STATE",V="SCRIPT_DATA_LESS_THAN_SIGN_STATE",j="SCRIPT_DATA_END_TAG_OPEN_STATE",z="SCRIPT_DATA_END_TAG_NAME_STATE",q="SCRIPT_DATA_ESCAPE_START_STATE",J="SCRIPT_DATA_ESCAPE_START_DASH_STATE",Z="SCRIPT_DATA_ESCAPED_STATE",$="SCRIPT_DATA_ESCAPED_DASH_STATE",ee="SCRIPT_DATA_ESCAPED_DASH_DASH_STATE",te="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN_STATE",ne="SCRIPT_DATA_ESCAPED_END_TAG_OPEN_STATE",se="SCRIPT_DATA_ESCAPED_END_TAG_NAME_STATE",re="SCRIPT_DATA_DOUBLE_ESCAPE_START_STATE",ie="SCRIPT_DATA_DOUBLE_ESCAPED_STATE",oe="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_STATE",ae="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH_STATE",Te="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN_STATE",Ee="SCRIPT_DATA_DOUBLE_ESCAPE_END_STATE",he="BEFORE_ATTRIBUTE_NAME_STATE",ce="ATTRIBUTE_NAME_STATE",_e="AFTER_ATTRIBUTE_NAME_STATE",le="BEFORE_ATTRIBUTE_VALUE_STATE",me="ATTRIBUTE_VALUE_DOUBLE_QUOTED_STATE",pe="ATTRIBUTE_VALUE_SINGLE_QUOTED_STATE",Ae="ATTRIBUTE_VALUE_UNQUOTED_STATE",ue="AFTER_ATTRIBUTE_VALUE_QUOTED_STATE",Ne="SELF_CLOSING_START_TAG_STATE",de="BOGUS_COMMENT_STATE",Ce="MARKUP_DECLARATION_OPEN_STATE",Oe="COMMENT_START_STATE",fe="COMMENT_START_DASH_STATE",Se="COMMENT_STATE",Re="COMMENT_LESS_THAN_SIGN_STATE",Ie="COMMENT_LESS_THAN_SIGN_BANG_STATE",Le="COMMENT_LESS_THAN_SIGN_BANG_DASH_STATE",ke="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH_STATE",Me="COMMENT_END_DASH_STATE",ge="COMMENT_END_STATE",Pe="COMMENT_END_BANG_STATE",He="DOCTYPE_STATE",De="BEFORE_DOCTYPE_NAME_STATE",Fe="DOCTYPE_NAME_STATE",Ue="AFTER_DOCTYPE_NAME_STATE",Ge="AFTER_DOCTYPE_PUBLIC_KEYWORD_STATE",Be="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER_STATE",Ke="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED_STATE",be="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED_STATE",xe="AFTER_DOCTYPE_PUBLIC_IDENTIFIER_STATE",ye="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS_STATE",ve="AFTER_DOCTYPE_SYSTEM_KEYWORD_STATE",Ye="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER_STATE",we="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED_STATE",Qe="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED_STATE",Xe="AFTER_DOCTYPE_SYSTEM_IDENTIFIER_STATE",We="BOGUS_DOCTYPE_STATE",Ve="CDATA_SECTION_STATE",je="CDATA_SECTION_BRACKET_STATE",ze="CDATA_SECTION_END_STATE",qe="CHARACTER_REFERENCE_STATE",Je="NAMED_CHARACTER_REFERENCE_STATE",Ze="AMBIGUOS_AMPERSAND_STATE",$e="NUMERIC_CHARACTER_REFERENCE_STATE",et="HEXADEMICAL_CHARACTER_REFERENCE_START_STATE",tt="DECIMAL_CHARACTER_REFERENCE_START_STATE",nt="HEXADEMICAL_CHARACTER_REFERENCE_STATE",st="DECIMAL_CHARACTER_REFERENCE_STATE",rt="NUMERIC_CHARACTER_REFERENCE_END_STATE";function it(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function ot(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function at(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function Tt(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function Et(e){return Tt(e)||at(e)}function ht(e){return Et(e)||ot(e)}function ct(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_F}function _t(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_F}function lt(e){return e+32}function mt(e){return e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(e>>>10&1023|55296)+String.fromCharCode(56320|1023&e))}function pt(e){return String.fromCharCode(lt(e))}function At(e,t){const n=g[++e];let s=++e,r=s+n-1;for(;s<=r;){const e=s+r>>>1,i=g[e];if(i<t)s=e+1;else {if(!(i>t))return g[e+n];r=e-1;}}return -1}class ut{constructor(){this.preprocessor=new 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(function(e){return e>=56320&&e<=57343}(t))return this.pos++,this._addGap(),1024*(e-55296)+9216+t}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,M.EOF;return this._err("surrogate-in-input-stream"),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,M.EOF;let e=this.html.charCodeAt(this.pos);return this.skipNextNewLine&&e===M.LINE_FEED?(this.skipNextNewLine=!1,this._addGap(),this.advance()):e===M.CARRIAGE_RETURN?(this.skipNextNewLine=!0,M.LINE_FEED):(this.skipNextNewLine=!1,r(e)&&(e=this._processSurrogate(e)),e>31&&e<127||e===M.LINE_FEED||e===M.CARRIAGE_RETURN||e>159&&e<64976||this._checkForProblematicCharacters(e),e)}_checkForProblematicCharacters(e){i(e)?this._err("control-character-in-input-stream"):o(e)&&this._err("noncharacter-in-input-stream");}retreat(){this.pos===this.lastGapPos&&(this.lastGapPos=this.gapStack.pop(),this.pos--),this.pos--;}},this.tokenQueue=[],this.allowCDATA=!1,this.state=F,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:ut.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 o,a=0,T=t;for(;a<i;a++){if(a>0&&(T=this._consume(),s++),T===P.EOF){r=!1;break}if(o=e[a],T!==o&&(n||T!==lt(o))){r=!1;break}}if(!r)for(;s--;)this._unconsume();return r}_isTempBufferEqualToScriptString(){if(this.tempBuff.length!==H.SCRIPT_STRING.length)return !1;for(let e=0;e<this.tempBuff.length;e++)if(this.tempBuff[e]!==H.SCRIPT_STRING[e])return !1;return !0}_createStartTagToken(){this.currentToken={type:ut.START_TAG_TOKEN,tagName:"",selfClosing:!1,ackSelfClosing:!1,attrs:[]};}_createEndTagToken(){this.currentToken={type:ut.END_TAG_TOKEN,tagName:"",selfClosing:!1,attrs:[]};}_createCommentToken(){this.currentToken={type:ut.COMMENT_TOKEN,data:""};}_createDoctypeToken(e){this.currentToken={type:ut.DOCTYPE_TOKEN,name:e,forceQuirks:!1,publicId:null,systemId:null};}_createCharacterToken(e,t){this.currentCharacterToken={type:e,chars:t};}_createEOFToken(){this.currentToken={type:ut.EOF_TOKEN};}_createAttr(e){this.currentAttr={name:e,value:""};}_leaveAttrName(e){null===ut.getTokenAttr(this.currentToken,this.currentAttr.name)?this.currentToken.attrs.push(this.currentAttr):this._err("duplicate-attribute"),this.state=e;}_leaveAttrValue(e){this.state=e;}_emitCurrentToken(){this._emitCurrentCharacterToken();const e=this.currentToken;this.currentToken=null,e.type===ut.START_TAG_TOKEN?this.lastStartTagName=e.tagName:e.type===ut.END_TAG_TOKEN&&(e.attrs.length>0&&this._err("end-tag-with-attributes"),e.selfClosing&&this._err("end-tag-with-trailing-solidus")),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=ut.CHARACTER_TOKEN;it(e)?t=ut.WHITESPACE_CHARACTER_TOKEN:e===P.NULL&&(t=ut.NULL_CHARACTER_TOKEN),this._appendCharToCurrentCharacterToken(t,mt(e));}_emitSeveralCodePoints(e){for(let t=0;t<e.length;t++)this._emitCodePoint(e[t]);}_emitChars(e){this._appendCharToCurrentCharacterToken(ut.CHARACTER_TOKEN,e);}_matchNamedCharacterReference(e){let t=null,n=1,s=At(0,e);for(this.tempBuff.push(e);s>-1;){const e=g[s],r=e<7;r&&1&e&&(t=2&e?[g[++s],g[++s]]:[g[++s]],n=0);const i=this._consume();if(this.tempBuff.push(i),n++,i===P.EOF)break;s=r?4&e?At(s,i):-1:i===e?++s:-1;}for(;n--;)this.tempBuff.pop(),this._unconsume();return t}_isCharacterReferenceInAttribute(){return this.returnState===me||this.returnState===pe||this.returnState===Ae}_isCharacterReferenceAttributeQuirk(e){if(!e&&this._isCharacterReferenceInAttribute()){const e=this._consume();return this._unconsume(),e===P.EQUALS_SIGN||ht(e)}return !1}_flushCodePointsConsumedAsCharacterReference(){if(this._isCharacterReferenceInAttribute())for(let e=0;e<this.tempBuff.length;e++)this.currentAttr.value+=mt(this.tempBuff[e]);else this._emitSeveralCodePoints(this.tempBuff);this.tempBuff=[];}[F](e){this.preprocessor.dropParsedChunk(),e===P.LESS_THAN_SIGN?this.state=b:e===P.AMPERSAND?(this.returnState=F,this.state=qe):e===P.NULL?(this._err(a),this._emitCodePoint(e)):e===P.EOF?this._emitEOFToken():this._emitCodePoint(e);}[U](e){this.preprocessor.dropParsedChunk(),e===P.AMPERSAND?(this.returnState=U,this.state=qe):e===P.LESS_THAN_SIGN?this.state=v:e===P.NULL?(this._err(a),this._emitChars(n)):e===P.EOF?this._emitEOFToken():this._emitCodePoint(e);}[G](e){this.preprocessor.dropParsedChunk(),e===P.LESS_THAN_SIGN?this.state=Q:e===P.NULL?(this._err(a),this._emitChars(n)):e===P.EOF?this._emitEOFToken():this._emitCodePoint(e);}[B](e){this.preprocessor.dropParsedChunk(),e===P.LESS_THAN_SIGN?this.state=V:e===P.NULL?(this._err(a),this._emitChars(n)):e===P.EOF?this._emitEOFToken():this._emitCodePoint(e);}[K](e){this.preprocessor.dropParsedChunk(),e===P.NULL?(this._err(a),this._emitChars(n)):e===P.EOF?this._emitEOFToken():this._emitCodePoint(e);}[b](e){e===P.EXCLAMATION_MARK?this.state=Ce:e===P.SOLIDUS?this.state=x:Et(e)?(this._createStartTagToken(),this._reconsumeInState(y)):e===P.QUESTION_MARK?(this._err("unexpected-question-mark-instead-of-tag-name"),this._createCommentToken(),this._reconsumeInState(de)):e===P.EOF?(this._err(h),this._emitChars("<"),this._emitEOFToken()):(this._err(T),this._emitChars("<"),this._reconsumeInState(F));}[x](e){Et(e)?(this._createEndTagToken(),this._reconsumeInState(y)):e===P.GREATER_THAN_SIGN?(this._err("missing-end-tag-name"),this.state=F):e===P.EOF?(this._err(h),this._emitChars("</"),this._emitEOFToken()):(this._err(T),this._createCommentToken(),this._reconsumeInState(de));}[y](e){it(e)?this.state=he:e===P.SOLIDUS?this.state=Ne:e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):at(e)?this.currentToken.tagName+=pt(e):e===P.NULL?(this._err(a),this.currentToken.tagName+=n):e===P.EOF?(this._err(c),this._emitEOFToken()):this.currentToken.tagName+=mt(e);}[v](e){e===P.SOLIDUS?(this.tempBuff=[],this.state=Y):(this._emitChars("<"),this._reconsumeInState(U));}[Y](e){Et(e)?(this._createEndTagToken(),this._reconsumeInState(w)):(this._emitChars("</"),this._reconsumeInState(U));}[w](e){if(at(e))this.currentToken.tagName+=pt(e),this.tempBuff.push(e);else if(Tt(e))this.currentToken.tagName+=mt(e),this.tempBuff.push(e);else {if(this.lastStartTagName===this.currentToken.tagName){if(it(e))return void(this.state=he);if(e===P.SOLIDUS)return void(this.state=Ne);if(e===P.GREATER_THAN_SIGN)return this.state=F,void this._emitCurrentToken()}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(U);}}[Q](e){e===P.SOLIDUS?(this.tempBuff=[],this.state=X):(this._emitChars("<"),this._reconsumeInState(G));}[X](e){Et(e)?(this._createEndTagToken(),this._reconsumeInState(W)):(this._emitChars("</"),this._reconsumeInState(G));}[W](e){if(at(e))this.currentToken.tagName+=pt(e),this.tempBuff.push(e);else if(Tt(e))this.currentToken.tagName+=mt(e),this.tempBuff.push(e);else {if(this.lastStartTagName===this.currentToken.tagName){if(it(e))return void(this.state=he);if(e===P.SOLIDUS)return void(this.state=Ne);if(e===P.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=F)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(G);}}[V](e){e===P.SOLIDUS?(this.tempBuff=[],this.state=j):e===P.EXCLAMATION_MARK?(this.state=q,this._emitChars("<!")):(this._emitChars("<"),this._reconsumeInState(B));}[j](e){Et(e)?(this._createEndTagToken(),this._reconsumeInState(z)):(this._emitChars("</"),this._reconsumeInState(B));}[z](e){if(at(e))this.currentToken.tagName+=pt(e),this.tempBuff.push(e);else if(Tt(e))this.currentToken.tagName+=mt(e),this.tempBuff.push(e);else {if(this.lastStartTagName===this.currentToken.tagName){if(it(e))return void(this.state=he);if(e===P.SOLIDUS)return void(this.state=Ne);if(e===P.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=F)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(B);}}[q](e){e===P.HYPHEN_MINUS?(this.state=J,this._emitChars("-")):this._reconsumeInState(B);}[J](e){e===P.HYPHEN_MINUS?(this.state=ee,this._emitChars("-")):this._reconsumeInState(B);}[Z](e){e===P.HYPHEN_MINUS?(this.state=$,this._emitChars("-")):e===P.LESS_THAN_SIGN?this.state=te:e===P.NULL?(this._err(a),this._emitChars(n)):e===P.EOF?(this._err(O),this._emitEOFToken()):this._emitCodePoint(e);}[$](e){e===P.HYPHEN_MINUS?(this.state=ee,this._emitChars("-")):e===P.LESS_THAN_SIGN?this.state=te:e===P.NULL?(this._err(a),this.state=Z,this._emitChars(n)):e===P.EOF?(this._err(O),this._emitEOFToken()):(this.state=Z,this._emitCodePoint(e));}[ee](e){e===P.HYPHEN_MINUS?this._emitChars("-"):e===P.LESS_THAN_SIGN?this.state=te:e===P.GREATER_THAN_SIGN?(this.state=B,this._emitChars(">")):e===P.NULL?(this._err(a),this.state=Z,this._emitChars(n)):e===P.EOF?(this._err(O),this._emitEOFToken()):(this.state=Z,this._emitCodePoint(e));}[te](e){e===P.SOLIDUS?(this.tempBuff=[],this.state=ne):Et(e)?(this.tempBuff=[],this._emitChars("<"),this._reconsumeInState(re)):(this._emitChars("<"),this._reconsumeInState(Z));}[ne](e){Et(e)?(this._createEndTagToken(),this._reconsumeInState(se)):(this._emitChars("</"),this._reconsumeInState(Z));}[se](e){if(at(e))this.currentToken.tagName+=pt(e),this.tempBuff.push(e);else if(Tt(e))this.currentToken.tagName+=mt(e),this.tempBuff.push(e);else {if(this.lastStartTagName===this.currentToken.tagName){if(it(e))return void(this.state=he);if(e===P.SOLIDUS)return void(this.state=Ne);if(e===P.GREATER_THAN_SIGN)return this._emitCurrentToken(),void(this.state=F)}this._emitChars("</"),this._emitSeveralCodePoints(this.tempBuff),this._reconsumeInState(Z);}}[re](e){it(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?ie:Z,this._emitCodePoint(e)):at(e)?(this.tempBuff.push(lt(e)),this._emitCodePoint(e)):Tt(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(Z);}[ie](e){e===P.HYPHEN_MINUS?(this.state=oe,this._emitChars("-")):e===P.LESS_THAN_SIGN?(this.state=Te,this._emitChars("<")):e===P.NULL?(this._err(a),this._emitChars(n)):e===P.EOF?(this._err(O),this._emitEOFToken()):this._emitCodePoint(e);}[oe](e){e===P.HYPHEN_MINUS?(this.state=ae,this._emitChars("-")):e===P.LESS_THAN_SIGN?(this.state=Te,this._emitChars("<")):e===P.NULL?(this._err(a),this.state=ie,this._emitChars(n)):e===P.EOF?(this._err(O),this._emitEOFToken()):(this.state=ie,this._emitCodePoint(e));}[ae](e){e===P.HYPHEN_MINUS?this._emitChars("-"):e===P.LESS_THAN_SIGN?(this.state=Te,this._emitChars("<")):e===P.GREATER_THAN_SIGN?(this.state=B,this._emitChars(">")):e===P.NULL?(this._err(a),this.state=ie,this._emitChars(n)):e===P.EOF?(this._err(O),this._emitEOFToken()):(this.state=ie,this._emitCodePoint(e));}[Te](e){e===P.SOLIDUS?(this.tempBuff=[],this.state=Ee,this._emitChars("/")):this._reconsumeInState(ie);}[Ee](e){it(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN?(this.state=this._isTempBufferEqualToScriptString()?Z:ie,this._emitCodePoint(e)):at(e)?(this.tempBuff.push(lt(e)),this._emitCodePoint(e)):Tt(e)?(this.tempBuff.push(e),this._emitCodePoint(e)):this._reconsumeInState(ie);}[he](e){it(e)||(e===P.SOLIDUS||e===P.GREATER_THAN_SIGN||e===P.EOF?this._reconsumeInState(_e):e===P.EQUALS_SIGN?(this._err("unexpected-equals-sign-before-attribute-name"),this._createAttr("="),this.state=ce):(this._createAttr(""),this._reconsumeInState(ce)));}[ce](e){it(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN||e===P.EOF?(this._leaveAttrName(_e),this._unconsume()):e===P.EQUALS_SIGN?this._leaveAttrName(le):at(e)?this.currentAttr.name+=pt(e):e===P.QUOTATION_MARK||e===P.APOSTROPHE||e===P.LESS_THAN_SIGN?(this._err("unexpected-character-in-attribute-name"),this.currentAttr.name+=mt(e)):e===P.NULL?(this._err(a),this.currentAttr.name+=n):this.currentAttr.name+=mt(e);}[_e](e){it(e)||(e===P.SOLIDUS?this.state=Ne:e===P.EQUALS_SIGN?this.state=le:e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(c),this._emitEOFToken()):(this._createAttr(""),this._reconsumeInState(ce)));}[le](e){it(e)||(e===P.QUOTATION_MARK?this.state=me:e===P.APOSTROPHE?this.state=pe:e===P.GREATER_THAN_SIGN?(this._err("missing-attribute-value"),this.state=F,this._emitCurrentToken()):this._reconsumeInState(Ae));}[me](e){e===P.QUOTATION_MARK?this.state=ue:e===P.AMPERSAND?(this.returnState=me,this.state=qe):e===P.NULL?(this._err(a),this.currentAttr.value+=n):e===P.EOF?(this._err(c),this._emitEOFToken()):this.currentAttr.value+=mt(e);}[pe](e){e===P.APOSTROPHE?this.state=ue:e===P.AMPERSAND?(this.returnState=pe,this.state=qe):e===P.NULL?(this._err(a),this.currentAttr.value+=n):e===P.EOF?(this._err(c),this._emitEOFToken()):this.currentAttr.value+=mt(e);}[Ae](e){it(e)?this._leaveAttrValue(he):e===P.AMPERSAND?(this.returnState=Ae,this.state=qe):e===P.GREATER_THAN_SIGN?(this._leaveAttrValue(F),this._emitCurrentToken()):e===P.NULL?(this._err(a),this.currentAttr.value+=n):e===P.QUOTATION_MARK||e===P.APOSTROPHE||e===P.LESS_THAN_SIGN||e===P.EQUALS_SIGN||e===P.GRAVE_ACCENT?(this._err("unexpected-character-in-unquoted-attribute-value"),this.currentAttr.value+=mt(e)):e===P.EOF?(this._err(c),this._emitEOFToken()):this.currentAttr.value+=mt(e);}[ue](e){it(e)?this._leaveAttrValue(he):e===P.SOLIDUS?this._leaveAttrValue(Ne):e===P.GREATER_THAN_SIGN?(this._leaveAttrValue(F),this._emitCurrentToken()):e===P.EOF?(this._err(c),this._emitEOFToken()):(this._err("missing-whitespace-between-attributes"),this._reconsumeInState(he));}[Ne](e){e===P.GREATER_THAN_SIGN?(this.currentToken.selfClosing=!0,this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(c),this._emitEOFToken()):(this._err("unexpected-solidus-in-tag"),this._reconsumeInState(he));}[de](e){e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):e===P.EOF?(this._emitCurrentToken(),this._emitEOFToken()):e===P.NULL?(this._err(a),this.currentToken.data+=n):this.currentToken.data+=mt(e);}[Ce](e){this._consumeSequenceIfMatch(H.DASH_DASH_STRING,e,!0)?(this._createCommentToken(),this.state=Oe):this._consumeSequenceIfMatch(H.DOCTYPE_STRING,e,!1)?this.state=He:this._consumeSequenceIfMatch(H.CDATA_START_STRING,e,!0)?this.allowCDATA?this.state=Ve:(this._err("cdata-in-html-content"),this._createCommentToken(),this.currentToken.data="[CDATA[",this.state=de):this._ensureHibernation()||(this._err("incorrectly-opened-comment"),this._createCommentToken(),this._reconsumeInState(de));}[Oe](e){e===P.HYPHEN_MINUS?this.state=fe:e===P.GREATER_THAN_SIGN?(this._err(S),this.state=F,this._emitCurrentToken()):this._reconsumeInState(Se);}[fe](e){e===P.HYPHEN_MINUS?this.state=ge:e===P.GREATER_THAN_SIGN?(this._err(S),this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(R),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(Se));}[Se](e){e===P.HYPHEN_MINUS?this.state=Me:e===P.LESS_THAN_SIGN?(this.currentToken.data+="<",this.state=Re):e===P.NULL?(this._err(a),this.currentToken.data+=n):e===P.EOF?(this._err(R),this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.data+=mt(e);}[Re](e){e===P.EXCLAMATION_MARK?(this.currentToken.data+="!",this.state=Ie):e===P.LESS_THAN_SIGN?this.currentToken.data+="!":this._reconsumeInState(Se);}[Ie](e){e===P.HYPHEN_MINUS?this.state=Le:this._reconsumeInState(Se);}[Le](e){e===P.HYPHEN_MINUS?this.state=ke:this._reconsumeInState(Me);}[ke](e){e!==P.GREATER_THAN_SIGN&&e!==P.EOF&&this._err("nested-comment"),this._reconsumeInState(ge);}[Me](e){e===P.HYPHEN_MINUS?this.state=ge:e===P.EOF?(this._err(R),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="-",this._reconsumeInState(Se));}[ge](e){e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):e===P.EXCLAMATION_MARK?this.state=Pe:e===P.HYPHEN_MINUS?this.currentToken.data+="-":e===P.EOF?(this._err(R),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--",this._reconsumeInState(Se));}[Pe](e){e===P.HYPHEN_MINUS?(this.currentToken.data+="--!",this.state=Me):e===P.GREATER_THAN_SIGN?(this._err("incorrectly-closed-comment"),this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(R),this._emitCurrentToken(),this._emitEOFToken()):(this.currentToken.data+="--!",this._reconsumeInState(Se));}[He](e){it(e)?this.state=De:e===P.GREATER_THAN_SIGN?this._reconsumeInState(De):e===P.EOF?(this._err(f),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err("missing-whitespace-before-doctype-name"),this._reconsumeInState(De));}[De](e){it(e)||(at(e)?(this._createDoctypeToken(pt(e)),this.state=Fe):e===P.NULL?(this._err(a),this._createDoctypeToken(n),this.state=Fe):e===P.GREATER_THAN_SIGN?(this._err("missing-doctype-name"),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=F):e===P.EOF?(this._err(f),this._createDoctypeToken(null),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._createDoctypeToken(mt(e)),this.state=Fe));}[Fe](e){it(e)?this.state=Ue:e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):at(e)?this.currentToken.name+=pt(e):e===P.NULL?(this._err(a),this.currentToken.name+=n):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.name+=mt(e);}[Ue](e){it(e)||(e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this._consumeSequenceIfMatch(H.PUBLIC_STRING,e,!1)?this.state=Ge:this._consumeSequenceIfMatch(H.SYSTEM_STRING,e,!1)?this.state=ve:this._ensureHibernation()||(this._err("invalid-character-sequence-after-doctype-name"),this.currentToken.forceQuirks=!0,this._reconsumeInState(We)));}[Ge](e){it(e)?this.state=Be:e===P.QUOTATION_MARK?(this._err(_),this.currentToken.publicId="",this.state=Ke):e===P.APOSTROPHE?(this._err(_),this.currentToken.publicId="",this.state=be):e===P.GREATER_THAN_SIGN?(this._err(u),this.currentToken.forceQuirks=!0,this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(p),this.currentToken.forceQuirks=!0,this._reconsumeInState(We));}[Be](e){it(e)||(e===P.QUOTATION_MARK?(this.currentToken.publicId="",this.state=Ke):e===P.APOSTROPHE?(this.currentToken.publicId="",this.state=be):e===P.GREATER_THAN_SIGN?(this._err(u),this.currentToken.forceQuirks=!0,this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(p),this.currentToken.forceQuirks=!0,this._reconsumeInState(We)));}[Ke](e){e===P.QUOTATION_MARK?this.state=xe:e===P.NULL?(this._err(a),this.currentToken.publicId+=n):e===P.GREATER_THAN_SIGN?(this._err(d),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=F):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mt(e);}[be](e){e===P.APOSTROPHE?this.state=xe:e===P.NULL?(this._err(a),this.currentToken.publicId+=n):e===P.GREATER_THAN_SIGN?(this._err(d),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=F):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.publicId+=mt(e);}[xe](e){it(e)?this.state=ye:e===P.GREATER_THAN_SIGN?(this.state=F,this._emitCurrentToken()):e===P.QUOTATION_MARK?(this._err(l),this.currentToken.systemId="",this.state=we):e===P.APOSTROPHE?(this._err(l),this.currentToken.systemId="",this.state=Qe):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(A),this.currentToken.forceQuirks=!0,this._reconsumeInState(We));}[ye](e){it(e)||(e===P.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=F):e===P.QUOTATION_MARK?(this.currentToken.systemId="",this.state=we):e===P.APOSTROPHE?(this.currentToken.systemId="",this.state=Qe):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(A),this.currentToken.forceQuirks=!0,this._reconsumeInState(We)));}[ve](e){it(e)?this.state=Ye:e===P.QUOTATION_MARK?(this._err(m),this.currentToken.systemId="",this.state=we):e===P.APOSTROPHE?(this._err(m),this.currentToken.systemId="",this.state=Qe):e===P.GREATER_THAN_SIGN?(this._err(N),this.currentToken.forceQuirks=!0,this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(A),this.currentToken.forceQuirks=!0,this._reconsumeInState(We));}[Ye](e){it(e)||(e===P.QUOTATION_MARK?(this.currentToken.systemId="",this.state=we):e===P.APOSTROPHE?(this.currentToken.systemId="",this.state=Qe):e===P.GREATER_THAN_SIGN?(this._err(N),this.currentToken.forceQuirks=!0,this.state=F,this._emitCurrentToken()):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err(A),this.currentToken.forceQuirks=!0,this._reconsumeInState(We)));}[we](e){e===P.QUOTATION_MARK?this.state=Xe:e===P.NULL?(this._err(a),this.currentToken.systemId+=n):e===P.GREATER_THAN_SIGN?(this._err(C),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=F):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mt(e);}[Qe](e){e===P.APOSTROPHE?this.state=Xe:e===P.NULL?(this._err(a),this.currentToken.systemId+=n):e===P.GREATER_THAN_SIGN?(this._err(C),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this.state=F):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):this.currentToken.systemId+=mt(e);}[Xe](e){it(e)||(e===P.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=F):e===P.EOF?(this._err(f),this.currentToken.forceQuirks=!0,this._emitCurrentToken(),this._emitEOFToken()):(this._err("unexpected-character-after-doctype-system-identifier"),this._reconsumeInState(We)));}[We](e){e===P.GREATER_THAN_SIGN?(this._emitCurrentToken(),this.state=F):e===P.NULL?this._err(a):e===P.EOF&&(this._emitCurrentToken(),this._emitEOFToken());}[Ve](e){e===P.RIGHT_SQUARE_BRACKET?this.state=je:e===P.EOF?(this._err("eof-in-cdata"),this._emitEOFToken()):this._emitCodePoint(e);}[je](e){e===P.RIGHT_SQUARE_BRACKET?this.state=ze:(this._emitChars("]"),this._reconsumeInState(Ve));}[ze](e){e===P.GREATER_THAN_SIGN?this.state=F:e===P.RIGHT_SQUARE_BRACKET?this._emitChars("]"):(this._emitChars("]]"),this._reconsumeInState(Ve));}[qe](e){this.tempBuff=[P.AMPERSAND],e===P.NUMBER_SIGN?(this.tempBuff.push(e),this.state=$e):ht(e)?this._reconsumeInState(Je):(this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState));}[Je](e){const t=this._matchNamedCharacterReference(e);if(this._ensureHibernation())this.tempBuff=[P.AMPERSAND];else if(t){const e=this.tempBuff[this.tempBuff.length-1]===P.SEMICOLON;this._isCharacterReferenceAttributeQuirk(e)||(e||this._errOnNextCodePoint(E),this.tempBuff=t),this._flushCodePointsConsumedAsCharacterReference(),this.state=this.returnState;}else this._flushCodePointsConsumedAsCharacterReference(),this.state=Ze;}[Ze](e){ht(e)?this._isCharacterReferenceInAttribute()?this.currentAttr.value+=mt(e):this._emitCodePoint(e):(e===P.SEMICOLON&&this._err("unknown-named-character-reference"),this._reconsumeInState(this.returnState));}[$e](e){this.charRefCode=0,e===P.LATIN_SMALL_X||e===P.LATIN_CAPITAL_X?(this.tempBuff.push(e),this.state=et):this._reconsumeInState(tt);}[et](e){!function(e){return ot(e)||ct(e)||_t(e)}(e)?(this._err(I),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState)):this._reconsumeInState(nt);}[tt](e){ot(e)?this._reconsumeInState(st):(this._err(I),this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState));}[nt](e){ct(e)?this.charRefCode=16*this.charRefCode+e-55:_t(e)?this.charRefCode=16*this.charRefCode+e-87:ot(e)?this.charRefCode=16*this.charRefCode+e-48:e===P.SEMICOLON?this.state=rt:(this._err(E),this._reconsumeInState(rt));}[st](e){ot(e)?this.charRefCode=10*this.charRefCode+e-48:e===P.SEMICOLON?this.state=rt:(this._err(E),this._reconsumeInState(rt));}[rt](){if(this.charRefCode===P.NULL)this._err("null-character-reference"),this.charRefCode=P.REPLACEMENT_CHARACTER;else if(this.charRefCode>1114111)this._err("character-reference-outside-unicode-range"),this.charRefCode=P.REPLACEMENT_CHARACTER;else if(r(this.charRefCode))this._err("surrogate-character-reference"),this.charRefCode=P.REPLACEMENT_CHARACTER;else if(o(this.charRefCode))this._err("noncharacter-character-reference");else if(i(this.charRefCode)||this.charRefCode===P.CARRIAGE_RETURN){this._err("control-character-reference");const e=D[this.charRefCode];e&&(this.charRefCode=e);}this.tempBuff=[this.charRefCode],this._flushCodePointsConsumedAsCharacterReference(),this._reconsumeInState(this.returnState);}}ut.CHARACTER_TOKEN="CHARACTER_TOKEN",ut.NULL_CHARACTER_TOKEN="NULL_CHARACTER_TOKEN",ut.WHITESPACE_CHARACTER_TOKEN="WHITESPACE_CHARACTER_TOKEN",ut.START_TAG_TOKEN="START_TAG_TOKEN",ut.END_TAG_TOKEN="END_TAG_TOKEN",ut.COMMENT_TOKEN="COMMENT_TOKEN",ut.DOCTYPE_TOKEN="DOCTYPE_TOKEN",ut.EOF_TOKEN="EOF_TOKEN",ut.HIBERNATION_TOKEN="HIBERNATION_TOKEN",ut.MODE={DATA:F,RCDATA:U,RAWTEXT:G,SCRIPT_DATA:B,PLAINTEXT:K},ut.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 Nt=ut;function dt(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}var Ct=dt((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}};}));const Ot=Ct.TAG_NAMES,ft=Ct.NAMESPACES;function St(e){switch(e.length){case 1:return e===Ot.P;case 2:return e===Ot.RB||e===Ot.RP||e===Ot.RT||e===Ot.DD||e===Ot.DT||e===Ot.LI;case 3:return e===Ot.RTC;case 6:return e===Ot.OPTION;case 8:return e===Ot.OPTGROUP}return !1}function Rt(e){switch(e.length){case 1:return e===Ot.P;case 2:return e===Ot.RB||e===Ot.RP||e===Ot.RT||e===Ot.DD||e===Ot.DT||e===Ot.LI||e===Ot.TD||e===Ot.TH||e===Ot.TR;case 3:return e===Ot.RTC;case 5:return e===Ot.TBODY||e===Ot.TFOOT||e===Ot.THEAD;case 6:return e===Ot.OPTION;case 7:return e===Ot.CAPTION;case 8:return e===Ot.OPTGROUP||e===Ot.COLGROUP}return !1}function It(e,t){switch(e.length){case 2:if(e===Ot.TD||e===Ot.TH)return t===ft.HTML;if(e===Ot.MI||e===Ot.MO||e===Ot.MN||e===Ot.MS)return t===ft.MATHML;break;case 4:if(e===Ot.HTML)return t===ft.HTML;if(e===Ot.DESC)return t===ft.SVG;break;case 5:if(e===Ot.TABLE)return t===ft.HTML;if(e===Ot.MTEXT)return t===ft.MATHML;if(e===Ot.TITLE)return t===ft.SVG;break;case 6:return (e===Ot.APPLET||e===Ot.OBJECT)&&t===ft.HTML;case 7:return (e===Ot.CAPTION||e===Ot.MARQUEE)&&t===ft.HTML;case 8:return e===Ot.TEMPLATE&&t===ft.HTML;case 13:return e===Ot.FOREIGN_OBJECT&&t===ft.SVG;case 14:return e===Ot.ANNOTATION_XML&&t===ft.MATHML}return !1}class Lt{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===Lt.MARKER_ENTRY)break;const o=i.element,a=this.treeAdapter.getAttrList(o);this.treeAdapter.getTagName(o)===s&&this.treeAdapter.getNamespaceURI(o)===r&&a.length===n&&t.push({idx:e,attrs:a});}}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:Lt.MARKER_ENTRY}),this.length++;}pushElement(e,t){this._ensureNoahArkCondition(e),this.entries.push({type:Lt.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:Lt.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===Lt.MARKER_ENTRY)break}}getElementEntryInScopeWithTagName(e){for(let t=this.length-1;t>=0;t--){const n=this.entries[t];if(n.type===Lt.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===Lt.ELEMENT_ENTRY&&n.element===e)return n}return null}}Lt.MARKER_ENTRY="MARKER_ENTRY",Lt.ELEMENT_ENTRY="ELEMENT_ENTRY";var kt=Lt;class Mt{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")}}Mt.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 gt=Mt,Pt=class extends gt{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;}}}},Ht=class extends gt{constructor(e){super(e),this.tokenizer=e,this.posTracker=gt.install(e.preprocessor,Pt),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===Nt.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(Nt.MODE).forEach((s=>{const r=Nt.MODE[s];n[r]=function(n){e.ctLoc=e._getCurrentLocation(),t[r].call(this,n);};})),n}},Dt=class extends gt{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 Ft=Ct.TAG_NAMES;var Ut=class extends gt{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){if(this.treeAdapter.getNodeSourceCodeLocation(e)&&t.location){const n=t.location,s=this.treeAdapter.getTagName(e),r={};t.type===Nt.END_TAG_TOKEN&&s===t.tagName?(r.endTag=Object.assign({},n),r.endLine=n.endLine,r.endCol=n.endCol,r.endOffset=n.endOffset):(r.endLine=n.startLine,r.endCol=n.startCol,r.endOffset=n.startOffset),this.treeAdapter.updateNodeSourceCodeLocation(e,r);}}_getOverriddenMethods(e,t){return {_bootstrap(n,s){t._bootstrap.call(this,n,s),e.lastStartTagToken=null,e.lastFosterParentingLocation=null,e.currentToken=null;const r=gt.install(this.tokenizer,Ht);e.posTracker=r.posTracker,gt.install(this.openElements,Dt,{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===Nt.END_TAG_TOKEN&&(n.tagName===Ft.HTML||n.tagName===Ft.BODY&&this.openElements.hasInScope(Ft.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),o=s&&e.lastFosterParentingLocation.beforeElement?i.indexOf(e.lastFosterParentingLocation.beforeElement)-1:i.length-1,a=i[o];if(this.treeAdapter.getNodeSourceCodeLocation(a)){const{endLine:e,endCol:t,endOffset:s}=n.location;this.treeAdapter.updateNodeSourceCodeLocation(a,{endLine:e,endCol:t,endOffset:s});}else this.treeAdapter.setNodeSourceCodeLocation(a,n.location);}}}},Gt=class extends gt{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);}}}},Bt=class extends Gt{constructor(e,t){super(e,t),this.posTracker=gt.install(e,Pt),this.lastErrOffset=-1;}_reportError(e){this.lastErrOffset!==this.posTracker.offset&&(this.lastErrOffset=this.posTracker.offset,super._reportError(e));}},Kt=class extends Gt{constructor(e,t){super(e,t);const n=gt.install(e.preprocessor,Bt,t);this.posTracker=n.posTracker;}},bt=class extends Gt{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),gt.install(this.tokenizer,Kt,e.opts),gt.install(this.tokenizer,Ht);},_processInputToken(n){e.ctLoc=n.location,t._processInputToken.call(this,n);},_err(t,n){e.locBeforeToken=n&&n.beforeToken,e._reportError(t);}}}},xt=dt((function(e,t){const{DOCUMENT_MODE:n}=Ct;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},t.updateNodeSourceCodeLocation=function(e,t){e.sourceCodeLocation=Object.assign(e.sourceCodeLocation,t);};}));const{DOCUMENT_MODE:yt}=Ct,vt="html",Yt=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],wt=Yt.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]),Qt=["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"],Xt=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Wt=Xt.concat(["-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]);function Vt(e,t){for(let n=0;n<t.length;n++)if(0===e.indexOf(t[n]))return !0;return !1}var jt=dt((function(e,t){const n=Ct.TAG_NAMES,s=Ct.NAMESPACES,r=Ct.ATTRS,i={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"},o={"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"},T={[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===Nt.getTokenAttr(e,r.COLOR)&&null===Nt.getTokenAttr(e,r.SIZE)&&null===Nt.getTokenAttr(e,r.FACE))||T[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=i[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=o[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,i,o){return !(o&&o!==s.HTML||!function(e,t,i){if(t===s.MATHML&&e===n.ANNOTATION_XML)for(let e=0;e<i.length;e++)if(i[e].name===r.ENCODING){const t=i[e].value.toLowerCase();return "text/html"===t||"application/xhtml+xml"===t}return t===s.SVG&&(e===n.FOREIGN_OBJECT||e===n.DESC||e===n.TITLE)}(e,t,i))||!(o&&o!==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))};}));const zt=Ct.TAG_NAMES,qt=Ct.NAMESPACES,Jt=Ct.ATTRS,Zt={scriptingEnabled:!0,sourceCodeLocationInfo:!1,onParseError:null,treeAdapter:xt},$t="hidden",en="INITIAL_MODE",tn="BEFORE_HTML_MODE",nn="BEFORE_HEAD_MODE",sn="IN_HEAD_MODE",rn="IN_HEAD_NO_SCRIPT_MODE",on="AFTER_HEAD_MODE",an="IN_BODY_MODE",Tn="TEXT_MODE",En="IN_TABLE_MODE",hn="IN_TABLE_TEXT_MODE",cn="IN_CAPTION_MODE",_n="IN_COLUMN_GROUP_MODE",ln="IN_TABLE_BODY_MODE",mn="IN_ROW_MODE",pn="IN_CELL_MODE",An="IN_SELECT_MODE",un="IN_SELECT_IN_TABLE_MODE",Nn="IN_TEMPLATE_MODE",dn="AFTER_BODY_MODE",Cn="IN_FRAMESET_MODE",On="AFTER_FRAMESET_MODE",fn="AFTER_AFTER_BODY_MODE",Sn="AFTER_AFTER_FRAMESET_MODE",Rn={[zt.TR]:mn,[zt.TBODY]:ln,[zt.THEAD]:ln,[zt.TFOOT]:ln,[zt.CAPTION]:cn,[zt.COLGROUP]:_n,[zt.TABLE]:En,[zt.BODY]:an,[zt.FRAMESET]:Cn},In={[zt.CAPTION]:En,[zt.COLGROUP]:En,[zt.TBODY]:En,[zt.TFOOT]:En,[zt.THEAD]:En,[zt.COL]:_n,[zt.TR]:ln,[zt.TD]:mn,[zt.TH]:mn},Ln={[en]:{[Nt.CHARACTER_TOKEN]:vn,[Nt.NULL_CHARACTER_TOKEN]:vn,[Nt.WHITESPACE_CHARACTER_TOKEN]:Gn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:function(e,t){e._setDocumentType(t);const n=t.forceQuirks?Ct.DOCUMENT_MODE.QUIRKS:function(e){if(e.name!==vt)return yt.QUIRKS;const t=e.systemId;if(t&&"http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd"===t.toLowerCase())return yt.QUIRKS;let n=e.publicId;if(null!==n){if(n=n.toLowerCase(),Qt.indexOf(n)>-1)return yt.QUIRKS;let e=null===t?wt:Yt;if(Vt(n,e))return yt.QUIRKS;if(e=null===t?Xt:Wt,Vt(n,e))return yt.LIMITED_QUIRKS}return yt.NO_QUIRKS}(t);(function(e){return e.name===vt&&null===e.publicId&&(null===e.systemId||"about:legacy-compat"===e.systemId)})(t)||e._err("non-conforming-doctype"),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=tn;},[Nt.START_TAG_TOKEN]:vn,[Nt.END_TAG_TOKEN]:vn,[Nt.EOF_TOKEN]:vn},[tn]:{[Nt.CHARACTER_TOKEN]:Yn,[Nt.NULL_CHARACTER_TOKEN]:Yn,[Nt.WHITESPACE_CHARACTER_TOKEN]:Gn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){t.tagName===zt.HTML?(e._insertElement(t,qt.HTML),e.insertionMode=nn):Yn(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n!==zt.HTML&&n!==zt.HEAD&&n!==zt.BODY&&n!==zt.BR||Yn(e,t);},[Nt.EOF_TOKEN]:Yn},[nn]:{[Nt.CHARACTER_TOKEN]:wn,[Nt.NULL_CHARACTER_TOKEN]:wn,[Nt.WHITESPACE_CHARACTER_TOKEN]:Gn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Bn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.HEAD?(e._insertElement(t,qt.HTML),e.headElement=e.openElements.current,e.insertionMode=sn):wn(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HEAD||n===zt.BODY||n===zt.HTML||n===zt.BR?wn(e,t):e._err(L);},[Nt.EOF_TOKEN]:wn},[sn]:{[Nt.CHARACTER_TOKEN]:Wn,[Nt.NULL_CHARACTER_TOKEN]:Wn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Bn,[Nt.START_TAG_TOKEN]:Qn,[Nt.END_TAG_TOKEN]:Xn,[Nt.EOF_TOKEN]:Wn},[rn]:{[Nt.CHARACTER_TOKEN]:Vn,[Nt.NULL_CHARACTER_TOKEN]:Vn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Bn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.BASEFONT||n===zt.BGSOUND||n===zt.HEAD||n===zt.LINK||n===zt.META||n===zt.NOFRAMES||n===zt.STYLE?Qn(e,t):n===zt.NOSCRIPT?e._err("nested-noscript-in-head"):Vn(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.NOSCRIPT?(e.openElements.pop(),e.insertionMode=sn):n===zt.BR?Vn(e,t):e._err(L);},[Nt.EOF_TOKEN]:Vn},[on]:{[Nt.CHARACTER_TOKEN]:jn,[Nt.NULL_CHARACTER_TOKEN]:jn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Bn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.BODY?(e._insertElement(t,qt.HTML),e.framesetOk=!1,e.insertionMode=an):n===zt.FRAMESET?(e._insertElement(t,qt.HTML),e.insertionMode=Cn):n===zt.BASE||n===zt.BASEFONT||n===zt.BGSOUND||n===zt.LINK||n===zt.META||n===zt.NOFRAMES||n===zt.SCRIPT||n===zt.STYLE||n===zt.TEMPLATE||n===zt.TITLE?(e._err("abandoned-head-element-child"),e.openElements.push(e.headElement),Qn(e,t),e.openElements.remove(e.headElement)):n===zt.HEAD?e._err(k):jn(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.BODY||n===zt.HTML||n===zt.BR?jn(e,t):n===zt.TEMPLATE?Xn(e,t):e._err(L);},[Nt.EOF_TOKEN]:jn},[an]:{[Nt.CHARACTER_TOKEN]:qn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:as,[Nt.END_TAG_TOKEN]:cs,[Nt.EOF_TOKEN]:_s},[Tn]:{[Nt.CHARACTER_TOKEN]:xn,[Nt.NULL_CHARACTER_TOKEN]:xn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Gn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:Gn,[Nt.END_TAG_TOKEN]:function(e,t){t.tagName===zt.SCRIPT&&(e.pendingScript=e.openElements.current),e.openElements.pop(),e.insertionMode=e.originalInsertionMode;},[Nt.EOF_TOKEN]:function(e,t){e._err("eof-in-element-that-can-contain-only-text"),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e._processToken(t);}},[En]:{[Nt.CHARACTER_TOKEN]:ls,[Nt.NULL_CHARACTER_TOKEN]:ls,[Nt.WHITESPACE_CHARACTER_TOKEN]:ls,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:ms,[Nt.END_TAG_TOKEN]:ps,[Nt.EOF_TOKEN]:_s},[hn]:{[Nt.CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0;},[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:function(e,t){e.pendingCharacterTokens.push(t);},[Nt.COMMENT_TOKEN]:us,[Nt.DOCTYPE_TOKEN]:us,[Nt.START_TAG_TOKEN]:us,[Nt.END_TAG_TOKEN]:us,[Nt.EOF_TOKEN]:us},[cn]:{[Nt.CHARACTER_TOKEN]:qn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.CAPTION||n===zt.COL||n===zt.COLGROUP||n===zt.TBODY||n===zt.TD||n===zt.TFOOT||n===zt.TH||n===zt.THEAD||n===zt.TR?e.openElements.hasInTableScope(zt.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(zt.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=En,e._processToken(t)):as(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.CAPTION||n===zt.TABLE?e.openElements.hasInTableScope(zt.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(zt.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=En,n===zt.TABLE&&e._processToken(t)):n!==zt.BODY&&n!==zt.COL&&n!==zt.COLGROUP&&n!==zt.HTML&&n!==zt.TBODY&&n!==zt.TD&&n!==zt.TFOOT&&n!==zt.TH&&n!==zt.THEAD&&n!==zt.TR&&cs(e,t);},[Nt.EOF_TOKEN]:_s},[_n]:{[Nt.CHARACTER_TOKEN]:Ns,[Nt.NULL_CHARACTER_TOKEN]:Ns,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.COL?(e._appendElement(t,qt.HTML),t.ackSelfClosing=!0):n===zt.TEMPLATE?Qn(e,t):Ns(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.COLGROUP?e.openElements.currentTagName===zt.COLGROUP&&(e.openElements.pop(),e.insertionMode=En):n===zt.TEMPLATE?Xn(e,t):n!==zt.COL&&Ns(e,t);},[Nt.EOF_TOKEN]:_s},[ln]:{[Nt.CHARACTER_TOKEN]:ls,[Nt.NULL_CHARACTER_TOKEN]:ls,[Nt.WHITESPACE_CHARACTER_TOKEN]:ls,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.TR?(e.openElements.clearBackToTableBodyContext(),e._insertElement(t,qt.HTML),e.insertionMode=mn):n===zt.TH||n===zt.TD?(e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(zt.TR),e.insertionMode=mn,e._processToken(t)):n===zt.CAPTION||n===zt.COL||n===zt.COLGROUP||n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=En,e._processToken(t)):ms(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD?e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=En):n===zt.TABLE?e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=En,e._processToken(t)):(n!==zt.BODY&&n!==zt.CAPTION&&n!==zt.COL&&n!==zt.COLGROUP||n!==zt.HTML&&n!==zt.TD&&n!==zt.TH&&n!==zt.TR)&&ps(e,t);},[Nt.EOF_TOKEN]:_s},[mn]:{[Nt.CHARACTER_TOKEN]:ls,[Nt.NULL_CHARACTER_TOKEN]:ls,[Nt.WHITESPACE_CHARACTER_TOKEN]:ls,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.TH||n===zt.TD?(e.openElements.clearBackToTableRowContext(),e._insertElement(t,qt.HTML),e.insertionMode=pn,e.activeFormattingElements.insertMarker()):n===zt.CAPTION||n===zt.COL||n===zt.COLGROUP||n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD||n===zt.TR?e.openElements.hasInTableScope(zt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ln,e._processToken(t)):ms(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.TR?e.openElements.hasInTableScope(zt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ln):n===zt.TABLE?e.openElements.hasInTableScope(zt.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ln,e._processToken(t)):n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD?(e.openElements.hasInTableScope(n)||e.openElements.hasInTableScope(zt.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=ln,e._processToken(t)):(n!==zt.BODY&&n!==zt.CAPTION&&n!==zt.COL&&n!==zt.COLGROUP||n!==zt.HTML&&n!==zt.TD&&n!==zt.TH)&&ps(e,t);},[Nt.EOF_TOKEN]:_s},[pn]:{[Nt.CHARACTER_TOKEN]:qn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.CAPTION||n===zt.COL||n===zt.COLGROUP||n===zt.TBODY||n===zt.TD||n===zt.TFOOT||n===zt.TH||n===zt.THEAD||n===zt.TR?(e.openElements.hasInTableScope(zt.TD)||e.openElements.hasInTableScope(zt.TH))&&(e._closeTableCell(),e._processToken(t)):as(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.TD||n===zt.TH?e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=mn):n===zt.TABLE||n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD||n===zt.TR?e.openElements.hasInTableScope(n)&&(e._closeTableCell(),e._processToken(t)):n!==zt.BODY&&n!==zt.CAPTION&&n!==zt.COL&&n!==zt.COLGROUP&&n!==zt.HTML&&cs(e,t);},[Nt.EOF_TOKEN]:_s},[An]:{[Nt.CHARACTER_TOKEN]:xn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:ds,[Nt.END_TAG_TOKEN]:Cs,[Nt.EOF_TOKEN]:_s},[un]:{[Nt.CHARACTER_TOKEN]:xn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.CAPTION||n===zt.TABLE||n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD||n===zt.TR||n===zt.TD||n===zt.TH?(e.openElements.popUntilTagNamePopped(zt.SELECT),e._resetInsertionMode(),e._processToken(t)):ds(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.CAPTION||n===zt.TABLE||n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD||n===zt.TR||n===zt.TD||n===zt.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(zt.SELECT),e._resetInsertionMode(),e._processToken(t)):Cs(e,t);},[Nt.EOF_TOKEN]:_s},[Nn]:{[Nt.CHARACTER_TOKEN]:qn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;if(n===zt.BASE||n===zt.BASEFONT||n===zt.BGSOUND||n===zt.LINK||n===zt.META||n===zt.NOFRAMES||n===zt.SCRIPT||n===zt.STYLE||n===zt.TEMPLATE||n===zt.TITLE)Qn(e,t);else {const s=In[n]||an;e._popTmplInsertionMode(),e._pushTmplInsertionMode(s),e.insertionMode=s,e._processToken(t);}},[Nt.END_TAG_TOKEN]:function(e,t){t.tagName===zt.TEMPLATE&&Xn(e,t);},[Nt.EOF_TOKEN]:Os},[dn]:{[Nt.CHARACTER_TOKEN]:fs,[Nt.NULL_CHARACTER_TOKEN]:fs,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:function(e,t){e._appendCommentNode(t,e.openElements.items[0]);},[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){t.tagName===zt.HTML?as(e,t):fs(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){t.tagName===zt.HTML?e.fragmentContext||(e.insertionMode=fn):fs(e,t);},[Nt.EOF_TOKEN]:yn},[Cn]:{[Nt.CHARACTER_TOKEN]:Gn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.FRAMESET?e._insertElement(t,qt.HTML):n===zt.FRAME?(e._appendElement(t,qt.HTML),t.ackSelfClosing=!0):n===zt.NOFRAMES&&Qn(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){t.tagName!==zt.FRAMESET||e.openElements.isRootHtmlElementCurrent()||(e.openElements.pop(),e.fragmentContext||e.openElements.currentTagName===zt.FRAMESET||(e.insertionMode=On));},[Nt.EOF_TOKEN]:yn},[On]:{[Nt.CHARACTER_TOKEN]:Gn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:xn,[Nt.COMMENT_TOKEN]:Kn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.NOFRAMES&&Qn(e,t);},[Nt.END_TAG_TOKEN]:function(e,t){t.tagName===zt.HTML&&(e.insertionMode=Sn);},[Nt.EOF_TOKEN]:yn},[fn]:{[Nt.CHARACTER_TOKEN]:Ss,[Nt.NULL_CHARACTER_TOKEN]:Ss,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:bn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){t.tagName===zt.HTML?as(e,t):Ss(e,t);},[Nt.END_TAG_TOKEN]:Ss,[Nt.EOF_TOKEN]:yn},[Sn]:{[Nt.CHARACTER_TOKEN]:Gn,[Nt.NULL_CHARACTER_TOKEN]:Gn,[Nt.WHITESPACE_CHARACTER_TOKEN]:zn,[Nt.COMMENT_TOKEN]:bn,[Nt.DOCTYPE_TOKEN]:Gn,[Nt.START_TAG_TOKEN]:function(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.NOFRAMES&&Qn(e,t);},[Nt.END_TAG_TOKEN]:Gn,[Nt.EOF_TOKEN]:yn}};var kn=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))}(Zt,e),this.treeAdapter=this.options.treeAdapter,this.pendingScript=null,this.options.sourceCodeLocationInfo&&gt.install(this,Ut),this.options.onParseError&&gt.install(this,bt,{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(zt.TEMPLATE,qt.HTML,[]));const n=this.treeAdapter.createElement("documentmock",qt.HTML,[]);this._bootstrap(n,t),this.treeAdapter.getTagName(t)===zt.TEMPLATE&&this._pushTmplInsertionMode(Nn),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 Nt(this.options),this.stopped=!1,this.insertionMode=en,this.originalInsertionMode="",this.document=e,this.fragmentContext=t,this.headElement=null,this.formElement=null,this.openElements=new 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===Ot.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ft.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===ft.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===Ot.H1||e===Ot.H2||e===Ot.H3||e===Ot.H4||e===Ot.H5||e===Ot.H6&&t===ft.HTML)break}}popUntilTableCellPopped(){for(;this.stackTop>-1;){const e=this.currentTagName,t=this.treeAdapter.getNamespaceURI(this.current);if(this.pop(),e===Ot.TD||e===Ot.TH&&t===ft.HTML)break}}popAllUpToHtmlElement(){this.stackTop=0,this._updateCurrentElement();}clearBackToTableContext(){for(;this.currentTagName!==Ot.TABLE&&this.currentTagName!==Ot.TEMPLATE&&this.currentTagName!==Ot.HTML||this.treeAdapter.getNamespaceURI(this.current)!==ft.HTML;)this.pop();}clearBackToTableBodyContext(){for(;this.currentTagName!==Ot.TBODY&&this.currentTagName!==Ot.TFOOT&&this.currentTagName!==Ot.THEAD&&this.currentTagName!==Ot.TEMPLATE&&this.currentTagName!==Ot.HTML||this.treeAdapter.getNamespaceURI(this.current)!==ft.HTML;)this.pop();}clearBackToTableRowContext(){for(;this.currentTagName!==Ot.TR&&this.currentTagName!==Ot.TEMPLATE&&this.currentTagName!==Ot.HTML||this.treeAdapter.getNamespaceURI(this.current)!==ft.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)===Ot.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===Ot.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===ft.HTML)return !0;if(It(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===Ot.H1||t===Ot.H2||t===Ot.H3||t===Ot.H4||t===Ot.H5||t===Ot.H6)&&n===ft.HTML)return !0;if(It(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===ft.HTML)return !0;if((n===Ot.UL||n===Ot.OL)&&s===ft.HTML||It(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===ft.HTML)return !0;if(n===Ot.BUTTON&&s===ft.HTML||It(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])===ft.HTML){if(n===e)return !0;if(n===Ot.TABLE||n===Ot.TEMPLATE||n===Ot.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])===ft.HTML){if(t===Ot.TBODY||t===Ot.THEAD||t===Ot.TFOOT)return !0;if(t===Ot.TABLE||t===Ot.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])===ft.HTML){if(n===e)return !0;if(n!==Ot.OPTION&&n!==Ot.OPTGROUP)return !1}}return !0}generateImpliedEndTags(){for(;St(this.currentTagName);)this.pop();}generateImpliedEndTagsThoroughly(){for(;Rt(this.currentTagName);)this.pop();}generateImpliedEndTagsWithExclusion(e){for(;St(this.currentTagName)&&this.currentTagName!==e;)this.pop();}}(this.document,this.treeAdapter),this.activeFormattingElements=new kt(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===Nt.HIBERNATION_TOKEN)break;if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.type===Nt.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)!==qt.HTML&&!this._isIntegrationPoint(e);}_switchToTextParsing(e,t){this._insertElement(e,qt.HTML),this.tokenizer.state=t,this.originalInsertionMode=this.insertionMode,this.insertionMode=Tn;}switchToPlaintextParsing(){this.insertionMode=Tn,this.originalInsertionMode=an,this.tokenizer.state=Nt.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)===zt.FORM){this.formElement=e;break}e=this.treeAdapter.getParentNode(e);}while(e)}_initTokenizerForFragmentParsing(){if(this.treeAdapter.getNamespaceURI(this.fragmentContext)===qt.HTML){const e=this.treeAdapter.getTagName(this.fragmentContext);e===zt.TITLE||e===zt.TEXTAREA?this.tokenizer.state=Nt.MODE.RCDATA:e===zt.STYLE||e===zt.XMP||e===zt.IFRAME||e===zt.NOEMBED||e===zt.NOFRAMES||e===zt.NOSCRIPT?this.tokenizer.state=Nt.MODE.RAWTEXT:e===zt.SCRIPT?this.tokenizer.state=Nt.MODE.SCRIPT_DATA:e===zt.PLAINTEXT&&(this.tokenizer.state=Nt.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,qt.HTML,[]);this._attachElementToTree(t),this.openElements.push(t);}_insertTemplate(e){const t=this.treeAdapter.createElement(e.tagName,qt.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(zt.HTML,qt.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===qt.HTML)return !1;if(this.treeAdapter.getTagName(t)===zt.ANNOTATION_XML&&n===qt.MATHML&&e.type===Nt.START_TAG_TOKEN&&e.tagName===zt.SVG)return !1;const s=e.type===Nt.CHARACTER_TOKEN||e.type===Nt.NULL_CHARACTER_TOKEN||e.type===Nt.WHITESPACE_CHARACTER_TOKEN;return !((e.type===Nt.START_TAG_TOKEN&&e.tagName!==zt.MGLYPH&&e.tagName!==zt.MALIGNMARK||s)&&this._isIntegrationPoint(t,qt.MATHML)||(e.type===Nt.START_TAG_TOKEN||s)&&this._isIntegrationPoint(t,qt.HTML)||e.type===Nt.EOF_TOKEN)}_processToken(e){Ln[this.insertionMode][e.type](this,e);}_processTokenInBodyMode(e){Ln.IN_BODY_MODE[e.type](this,e);}_processTokenInForeignContent(e){e.type===Nt.CHARACTER_TOKEN?function(e,t){e._insertCharacters(t),e.framesetOk=!1;}(this,e):e.type===Nt.NULL_CHARACTER_TOKEN?function(e,t){t.chars=n,e._insertCharacters(t);}(this,e):e.type===Nt.WHITESPACE_CHARACTER_TOKEN?xn(this,e):e.type===Nt.COMMENT_TOKEN?Kn(this,e):e.type===Nt.START_TAG_TOKEN?function(e,t){if(jt.causesExit(t)&&!e.fragmentContext){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==qt.HTML&&!e._isIntegrationPoint(e.openElements.current);)e.openElements.pop();e._processToken(t);}else {const n=e._getAdjustedCurrentElement(),s=e.treeAdapter.getNamespaceURI(n);s===qt.MATHML?jt.adjustTokenMathMLAttrs(t):s===qt.SVG&&(jt.adjustTokenSVGTagName(t),jt.adjustTokenSVGAttrs(t)),jt.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,s):e._insertElement(t,s),t.ackSelfClosing=!0;}}(this,e):e.type===Nt.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)===qt.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===Nt.START_TAG_TOKEN&&e.selfClosing&&!e.ackSelfClosing&&this._err("non-void-html-element-start-tag-with-trailing-solidus");}_isIntegrationPoint(e,t){const n=this.treeAdapter.getTagName(e),s=this.treeAdapter.getNamespaceURI(e),r=this.treeAdapter.getAttrList(e);return jt.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===kt.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=mn;}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(zt.P),this.openElements.popUntilTagNamePopped(zt.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=Rn[s];if(r){this.insertionMode=r;break}if(!(t||s!==zt.TD&&s!==zt.TH)){this.insertionMode=pn;break}if(!t&&s===zt.HEAD){this.insertionMode=sn;break}if(s===zt.SELECT){this._resetInsertionModeForSelect(e);break}if(s===zt.TEMPLATE){this.insertionMode=this.currentTmplInsertionMode;break}if(s===zt.HTML){this.insertionMode=this.headElement?on:nn;break}if(t){this.insertionMode=an;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===zt.TEMPLATE)break;if(n===zt.TABLE)return void(this.insertionMode=un)}this.insertionMode=An;}_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===zt.TABLE||t===zt.TBODY||t===zt.TFOOT||t===zt.THEAD||t===zt.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===zt.TEMPLATE&&r===qt.HTML){e.parent=this.treeAdapter.getTemplateContent(n);break}if(s===zt.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 Ct.SPECIAL_ELEMENTS[n][t]}};function Mn(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):hs(e,t),n}function gn(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 Pn(e,t,n){let s=t,r=e.openElements.getCommonAncestor(t);for(let i=0,o=r;o!==n;i++,o=r){r=e.openElements.getCommonAncestor(o);const n=e.activeFormattingElements.getElementEntry(o),a=n&&i>=3;!n||a?(a&&e.activeFormattingElements.removeEntry(n),e.openElements.remove(o)):(o=Hn(e,n),s===t&&(e.activeFormattingElements.bookmark=n),e.treeAdapter.detachNode(s),e.treeAdapter.appendChild(o,s),s=o);}return s}function Hn(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 Dn(e,t,n){if(e._isElementCausesFosterParenting(t))e._fosterParentElement(n);else {const s=e.treeAdapter.getTagName(t),r=e.treeAdapter.getNamespaceURI(t);s===zt.TEMPLATE&&r===qt.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n);}}function Fn(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 Un(e,t){let n;for(let s=0;s<8&&(n=Mn(e,t),n);s++){const t=gn(e,n);if(!t)break;e.activeFormattingElements.bookmark=n;const s=Pn(e,t,n.element),r=e.openElements.getCommonAncestor(n.element);e.treeAdapter.detachNode(s),Dn(e,r,s),Fn(e,t,n);}}function Gn(){}function Bn(e){e._err("misplaced-doctype");}function Kn(e,t){e._appendCommentNode(t,e.openElements.currentTmplContent||e.openElements.current);}function bn(e,t){e._appendCommentNode(t,e.document);}function xn(e,t){e._insertCharacters(t);}function yn(e){e.stopped=!0;}function vn(e,t){e._err("missing-doctype",{beforeToken:!0}),e.treeAdapter.setDocumentMode(e.document,Ct.DOCUMENT_MODE.QUIRKS),e.insertionMode=tn,e._processToken(t);}function Yn(e,t){e._insertFakeRootElement(),e.insertionMode=nn,e._processToken(t);}function wn(e,t){e._insertFakeElement(zt.HEAD),e.headElement=e.openElements.current,e.insertionMode=sn,e._processToken(t);}function Qn(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.BASE||n===zt.BASEFONT||n===zt.BGSOUND||n===zt.LINK||n===zt.META?(e._appendElement(t,qt.HTML),t.ackSelfClosing=!0):n===zt.TITLE?e._switchToTextParsing(t,Nt.MODE.RCDATA):n===zt.NOSCRIPT?e.options.scriptingEnabled?e._switchToTextParsing(t,Nt.MODE.RAWTEXT):(e._insertElement(t,qt.HTML),e.insertionMode=rn):n===zt.NOFRAMES||n===zt.STYLE?e._switchToTextParsing(t,Nt.MODE.RAWTEXT):n===zt.SCRIPT?e._switchToTextParsing(t,Nt.MODE.SCRIPT_DATA):n===zt.TEMPLATE?(e._insertTemplate(t,qt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=Nn,e._pushTmplInsertionMode(Nn)):n===zt.HEAD?e._err(k):Wn(e,t);}function Xn(e,t){const n=t.tagName;n===zt.HEAD?(e.openElements.pop(),e.insertionMode=on):n===zt.BODY||n===zt.BR||n===zt.HTML?Wn(e,t):n===zt.TEMPLATE&&e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagName!==zt.TEMPLATE&&e._err("closing-of-element-with-open-child-elements"),e.openElements.popUntilTagNamePopped(zt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode()):e._err(L);}function Wn(e,t){e.openElements.pop(),e.insertionMode=on,e._processToken(t);}function Vn(e,t){const n=t.type===Nt.EOF_TOKEN?"open-elements-left-after-eof":"disallowed-content-in-noscript-in-head";e._err(n),e.openElements.pop(),e.insertionMode=sn,e._processToken(t);}function jn(e,t){e._insertFakeElement(zt.BODY),e.insertionMode=an,e._processToken(t);}function zn(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t);}function qn(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1;}function Jn(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML);}function Zn(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML),e.skipNextNewLine=!0,e.framesetOk=!1;}function $n(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}function es(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1;}function ts(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,qt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;}function ns(e,t){e._appendElement(t,qt.HTML),t.ackSelfClosing=!0;}function ss(e,t){e._switchToTextParsing(t,Nt.MODE.RAWTEXT);}function rs(e,t){e.openElements.currentTagName===zt.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML);}function is(e,t){e.openElements.hasInScope(zt.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,qt.HTML);}function os(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML);}function as(e,t){const n=t.tagName;switch(n.length){case 1:n===zt.I||n===zt.S||n===zt.B||n===zt.U?$n(e,t):n===zt.P?Jn(e,t):n===zt.A?function(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(zt.A);n&&(Un(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}(e,t):os(e,t);break;case 2:n===zt.DL||n===zt.OL||n===zt.UL?Jn(e,t):n===zt.H1||n===zt.H2||n===zt.H3||n===zt.H4||n===zt.H5||n===zt.H6?function(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement();const n=e.openElements.currentTagName;n!==zt.H1&&n!==zt.H2&&n!==zt.H3&&n!==zt.H4&&n!==zt.H5&&n!==zt.H6||e.openElements.pop(),e._insertElement(t,qt.HTML);}(e,t):n===zt.LI||n===zt.DD||n===zt.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===zt.LI&&r===zt.LI?i=zt.LI:n!==zt.DD&&n!==zt.DT||r!==zt.DD&&r!==zt.DT||(i=r),i){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(r!==zt.ADDRESS&&r!==zt.DIV&&r!==zt.P&&e._isSpecialElement(s))break}e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML);}(e,t):n===zt.EM||n===zt.TT?$n(e,t):n===zt.BR?ts(e,t):n===zt.HR?function(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._appendElement(t,qt.HTML),e.framesetOk=!1,t.ackSelfClosing=!0;}(e,t):n===zt.RB?is(e,t):n===zt.RT||n===zt.RP?function(e,t){e.openElements.hasInScope(zt.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(zt.RTC),e._insertElement(t,qt.HTML);}(e,t):n!==zt.TH&&n!==zt.TD&&n!==zt.TR&&os(e,t);break;case 3:n===zt.DIV||n===zt.DIR||n===zt.NAV?Jn(e,t):n===zt.PRE?Zn(e,t):n===zt.BIG?$n(e,t):n===zt.IMG||n===zt.WBR?ts(e,t):n===zt.XMP?function(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Nt.MODE.RAWTEXT);}(e,t):n===zt.SVG?function(e,t){e._reconstructActiveFormattingElements(),jt.adjustTokenSVGAttrs(t),jt.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,qt.SVG):e._insertElement(t,qt.SVG),t.ackSelfClosing=!0;}(e,t):n===zt.RTC?is(e,t):n!==zt.COL&&os(e,t);break;case 4:n===zt.HTML?function(e,t){0===e.openElements.tmplCount&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs);}(e,t):n===zt.BASE||n===zt.LINK||n===zt.META?Qn(e,t):n===zt.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===zt.MAIN||n===zt.MENU?Jn(e,t):n===zt.FORM?function(e,t){const n=e.openElements.tmplCount>0;e.formElement&&!n||(e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML),n||(e.formElement=e.openElements.current));}(e,t):n===zt.CODE||n===zt.FONT?$n(e,t):n===zt.NOBR?function(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(zt.NOBR)&&(Un(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,qt.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t);}(e,t):n===zt.AREA?ts(e,t):n===zt.MATH?function(e,t){e._reconstructActiveFormattingElements(),jt.adjustTokenMathMLAttrs(t),jt.adjustTokenXMLAttrs(t),t.selfClosing?e._appendElement(t,qt.MATHML):e._insertElement(t,qt.MATHML),t.ackSelfClosing=!0;}(e,t):n===zt.MENU?function(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML);}(e,t):n!==zt.HEAD&&os(e,t);break;case 5:n===zt.STYLE||n===zt.TITLE?Qn(e,t):n===zt.ASIDE?Jn(e,t):n===zt.SMALL?$n(e,t):n===zt.TABLE?function(e,t){e.treeAdapter.getDocumentMode(e.document)!==Ct.DOCUMENT_MODE.QUIRKS&&e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML),e.framesetOk=!1,e.insertionMode=En;}(e,t):n===zt.EMBED?ts(e,t):n===zt.INPUT?function(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,qt.HTML);const n=Nt.getTokenAttr(t,Jt.TYPE);n&&n.toLowerCase()===$t||(e.framesetOk=!1),t.ackSelfClosing=!0;}(e,t):n===zt.PARAM||n===zt.TRACK?ns(e,t):n===zt.IMAGE?function(e,t){t.tagName=zt.IMG,ts(e,t);}(e,t):n!==zt.FRAME&&n!==zt.TBODY&&n!==zt.TFOOT&&n!==zt.THEAD&&os(e,t);break;case 6:n===zt.SCRIPT?Qn(e,t):n===zt.CENTER||n===zt.FIGURE||n===zt.FOOTER||n===zt.HEADER||n===zt.HGROUP||n===zt.DIALOG?Jn(e,t):n===zt.BUTTON?function(e,t){e.openElements.hasInScope(zt.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(zt.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML),e.framesetOk=!1;}(e,t):n===zt.STRIKE||n===zt.STRONG?$n(e,t):n===zt.APPLET||n===zt.OBJECT?es(e,t):n===zt.KEYGEN?ts(e,t):n===zt.SOURCE?ns(e,t):n===zt.IFRAME?function(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Nt.MODE.RAWTEXT);}(e,t):n===zt.SELECT?function(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,qt.HTML),e.framesetOk=!1,e.insertionMode===En||e.insertionMode===cn||e.insertionMode===ln||e.insertionMode===mn||e.insertionMode===pn?e.insertionMode=un:e.insertionMode=An;}(e,t):n===zt.OPTION?rs(e,t):os(e,t);break;case 7:n===zt.BGSOUND?Qn(e,t):n===zt.DETAILS||n===zt.ADDRESS||n===zt.ARTICLE||n===zt.SECTION||n===zt.SUMMARY?Jn(e,t):n===zt.LISTING?Zn(e,t):n===zt.MARQUEE?es(e,t):n===zt.NOEMBED?ss(e,t):n!==zt.CAPTION&&os(e,t);break;case 8:n===zt.BASEFONT?Qn(e,t):n===zt.FRAMESET?function(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,qt.HTML),e.insertionMode=Cn);}(e,t):n===zt.FIELDSET?Jn(e,t):n===zt.TEXTAREA?function(e,t){e._insertElement(t,qt.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Nt.MODE.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=Tn;}(e,t):n===zt.TEMPLATE?Qn(e,t):n===zt.NOSCRIPT?e.options.scriptingEnabled?ss(e,t):os(e,t):n===zt.OPTGROUP?rs(e,t):n!==zt.COLGROUP&&os(e,t);break;case 9:n===zt.PLAINTEXT?function(e,t){e.openElements.hasInButtonScope(zt.P)&&e._closePElement(),e._insertElement(t,qt.HTML),e.tokenizer.state=Nt.MODE.PLAINTEXT;}(e,t):os(e,t);break;case 10:n===zt.BLOCKQUOTE||n===zt.FIGCAPTION?Jn(e,t):os(e,t);break;default:os(e,t);}}function Ts(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n));}function Es(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker());}function hs(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 cs(e,t){const n=t.tagName;switch(n.length){case 1:n===zt.A||n===zt.B||n===zt.I||n===zt.S||n===zt.U?Un(e,t):n===zt.P?function(e){e.openElements.hasInButtonScope(zt.P)||e._insertFakeElement(zt.P),e._closePElement();}(e):hs(e,t);break;case 2:n===zt.DL||n===zt.UL||n===zt.OL?Ts(e,t):n===zt.LI?function(e){e.openElements.hasInListItemScope(zt.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(zt.LI),e.openElements.popUntilTagNamePopped(zt.LI));}(e):n===zt.DD||n===zt.DT?function(e,t){const n=t.tagName;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n));}(e,t):n===zt.H1||n===zt.H2||n===zt.H3||n===zt.H4||n===zt.H5||n===zt.H6?function(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped());}(e):n===zt.BR?function(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(zt.BR),e.openElements.pop(),e.framesetOk=!1;}(e):n===zt.EM||n===zt.TT?Un(e,t):hs(e,t);break;case 3:n===zt.BIG?Un(e,t):n===zt.DIR||n===zt.DIV||n===zt.NAV||n===zt.PRE?Ts(e,t):hs(e,t);break;case 4:n===zt.BODY?function(e){e.openElements.hasInScope(zt.BODY)&&(e.insertionMode=dn);}(e):n===zt.HTML?function(e,t){e.openElements.hasInScope(zt.BODY)&&(e.insertionMode=dn,e._processToken(t));}(e,t):n===zt.FORM?function(e){const t=e.openElements.tmplCount>0,n=e.formElement;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(zt.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(zt.FORM):e.openElements.remove(n));}(e):n===zt.CODE||n===zt.FONT||n===zt.NOBR?Un(e,t):n===zt.MAIN||n===zt.MENU?Ts(e,t):hs(e,t);break;case 5:n===zt.ASIDE?Ts(e,t):n===zt.SMALL?Un(e,t):hs(e,t);break;case 6:n===zt.CENTER||n===zt.FIGURE||n===zt.FOOTER||n===zt.HEADER||n===zt.HGROUP||n===zt.DIALOG?Ts(e,t):n===zt.APPLET||n===zt.OBJECT?Es(e,t):n===zt.STRIKE||n===zt.STRONG?Un(e,t):hs(e,t);break;case 7:n===zt.ADDRESS||n===zt.ARTICLE||n===zt.DETAILS||n===zt.SECTION||n===zt.SUMMARY||n===zt.LISTING?Ts(e,t):n===zt.MARQUEE?Es(e,t):hs(e,t);break;case 8:n===zt.FIELDSET?Ts(e,t):n===zt.TEMPLATE?Xn(e,t):hs(e,t);break;case 10:n===zt.BLOCKQUOTE||n===zt.FIGCAPTION?Ts(e,t):hs(e,t);break;default:hs(e,t);}}function _s(e,t){e.tmplInsertionModeStackTop>-1?Os(e,t):e.stopped=!0;}function ls(e,t){const n=e.openElements.currentTagName;n===zt.TABLE||n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD||n===zt.TR?(e.pendingCharacterTokens=[],e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=hn,e._processToken(t)):As(e,t);}function ms(e,t){const n=t.tagName;switch(n.length){case 2:n===zt.TD||n===zt.TH||n===zt.TR?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(zt.TBODY),e.insertionMode=ln,e._processToken(t);}(e,t):As(e,t);break;case 3:n===zt.COL?function(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(zt.COLGROUP),e.insertionMode=_n,e._processToken(t);}(e,t):As(e,t);break;case 4:n===zt.FORM?function(e,t){e.formElement||0!==e.openElements.tmplCount||(e._insertElement(t,qt.HTML),e.formElement=e.openElements.current,e.openElements.pop());}(e,t):As(e,t);break;case 5:n===zt.TABLE?function(e,t){e.openElements.hasInTableScope(zt.TABLE)&&(e.openElements.popUntilTagNamePopped(zt.TABLE),e._resetInsertionMode(),e._processToken(t));}(e,t):n===zt.STYLE?Qn(e,t):n===zt.TBODY||n===zt.TFOOT||n===zt.THEAD?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,qt.HTML),e.insertionMode=ln;}(e,t):n===zt.INPUT?function(e,t){const n=Nt.getTokenAttr(t,Jt.TYPE);n&&n.toLowerCase()===$t?e._appendElement(t,qt.HTML):As(e,t),t.ackSelfClosing=!0;}(e,t):As(e,t);break;case 6:n===zt.SCRIPT?Qn(e,t):As(e,t);break;case 7:n===zt.CAPTION?function(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,qt.HTML),e.insertionMode=cn;}(e,t):As(e,t);break;case 8:n===zt.COLGROUP?function(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,qt.HTML),e.insertionMode=_n;}(e,t):n===zt.TEMPLATE?Qn(e,t):As(e,t);break;default:As(e,t);}}function ps(e,t){const n=t.tagName;n===zt.TABLE?e.openElements.hasInTableScope(zt.TABLE)&&(e.openElements.popUntilTagNamePopped(zt.TABLE),e._resetInsertionMode()):n===zt.TEMPLATE?Xn(e,t):n!==zt.BODY&&n!==zt.CAPTION&&n!==zt.COL&&n!==zt.COLGROUP&&n!==zt.HTML&&n!==zt.TBODY&&n!==zt.TD&&n!==zt.TFOOT&&n!==zt.TH&&n!==zt.THEAD&&n!==zt.TR&&As(e,t);}function As(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,e._processTokenInBodyMode(t),e.fosterParentingEnabled=n;}function us(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)As(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t);}function Ns(e,t){e.openElements.currentTagName===zt.COLGROUP&&(e.openElements.pop(),e.insertionMode=En,e._processToken(t));}function ds(e,t){const n=t.tagName;n===zt.HTML?as(e,t):n===zt.OPTION?(e.openElements.currentTagName===zt.OPTION&&e.openElements.pop(),e._insertElement(t,qt.HTML)):n===zt.OPTGROUP?(e.openElements.currentTagName===zt.OPTION&&e.openElements.pop(),e.openElements.currentTagName===zt.OPTGROUP&&e.openElements.pop(),e._insertElement(t,qt.HTML)):n===zt.INPUT||n===zt.KEYGEN||n===zt.TEXTAREA||n===zt.SELECT?e.openElements.hasInSelectScope(zt.SELECT)&&(e.openElements.popUntilTagNamePopped(zt.SELECT),e._resetInsertionMode(),n!==zt.SELECT&&e._processToken(t)):n!==zt.SCRIPT&&n!==zt.TEMPLATE||Qn(e,t);}function Cs(e,t){const n=t.tagName;if(n===zt.OPTGROUP){const t=e.openElements.items[e.openElements.stackTop-1],n=t&&e.treeAdapter.getTagName(t);e.openElements.currentTagName===zt.OPTION&&n===zt.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagName===zt.OPTGROUP&&e.openElements.pop();}else n===zt.OPTION?e.openElements.currentTagName===zt.OPTION&&e.openElements.pop():n===zt.SELECT&&e.openElements.hasInSelectScope(zt.SELECT)?(e.openElements.popUntilTagNamePopped(zt.SELECT),e._resetInsertionMode()):n===zt.TEMPLATE&&Xn(e,t);}function Os(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(zt.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e._popTmplInsertionMode(),e._resetInsertionMode(),e._processToken(t)):e.stopped=!0;}function fs(e,t){e.insertionMode=an,e._processToken(t);}function Ss(e,t){e.insertionMode=an,e._processToken(t);}return Ct.TAG_NAMES,Ct.NAMESPACES,e.parse=function(e,t){return new kn(t).parse(e)},e.parseFragment=function(e,t,n){return "string"==typeof e&&(n=t,t=e,e=null),new kn(n).parseFragment(t,e)},Object.defineProperty(e,"__esModule",{value:!0}),e}({});const parse=e.parse;const parseFragment=e.parseFragment;
1226
+
1227
+ const docParser = new WeakMap();
1228
+ function parseDocumentUtil(ownerDocument, html) {
1229
+ const doc = parse(html.trim(), getParser(ownerDocument));
1230
+ doc.documentElement = doc.firstElementChild;
1231
+ doc.head = doc.documentElement.firstElementChild;
1232
+ doc.body = doc.head.nextElementSibling;
1233
+ return doc;
1234
+ }
1235
+ function parseFragmentUtil(ownerDocument, html) {
1236
+ if (typeof html === 'string') {
1237
+ html = html.trim();
1238
+ }
1239
+ else {
1240
+ html = '';
1241
+ }
1242
+ const frag = parseFragment(html, getParser(ownerDocument));
1243
+ return frag;
1244
+ }
1245
+ function getParser(ownerDocument) {
1246
+ let parseOptions = docParser.get(ownerDocument);
1247
+ if (parseOptions != null) {
1248
+ return parseOptions;
1249
+ }
1250
+ const treeAdapter = {
1251
+ createDocument() {
1252
+ const doc = ownerDocument.createElement("#document" /* DOCUMENT_NODE */);
1253
+ doc['x-mode'] = 'no-quirks';
1254
+ return doc;
1255
+ },
1256
+ setNodeSourceCodeLocation(node, location) {
1257
+ node.sourceCodeLocation = location;
1258
+ },
1259
+ getNodeSourceCodeLocation(node) {
1260
+ return node.sourceCodeLocation;
1261
+ },
1262
+ createDocumentFragment() {
1263
+ return ownerDocument.createDocumentFragment();
1264
+ },
1265
+ createElement(tagName, namespaceURI, attrs) {
1266
+ const elm = ownerDocument.createElementNS(namespaceURI, tagName);
1267
+ for (let i = 0; i < attrs.length; i++) {
1268
+ const attr = attrs[i];
1269
+ if (attr.namespace == null || attr.namespace === 'http://www.w3.org/1999/xhtml') {
1270
+ elm.setAttribute(attr.name, attr.value);
1271
+ }
1272
+ else {
1273
+ elm.setAttributeNS(attr.namespace, attr.name, attr.value);
1274
+ }
1275
+ }
1276
+ return elm;
1277
+ },
1278
+ createCommentNode(data) {
1279
+ return ownerDocument.createComment(data);
1280
+ },
1281
+ appendChild(parentNode, newNode) {
1282
+ parentNode.appendChild(newNode);
1283
+ },
1284
+ insertBefore(parentNode, newNode, referenceNode) {
1285
+ parentNode.insertBefore(newNode, referenceNode);
1286
+ },
1287
+ setTemplateContent(templateElement, contentElement) {
1288
+ templateElement.content = contentElement;
1289
+ },
1290
+ getTemplateContent(templateElement) {
1291
+ return templateElement.content;
1292
+ },
1293
+ setDocumentType(doc, name, publicId, systemId) {
1294
+ let doctypeNode = doc.childNodes.find(n => n.nodeType === 10 /* DOCUMENT_TYPE_NODE */);
1295
+ if (doctypeNode == null) {
1296
+ doctypeNode = ownerDocument.createDocumentTypeNode();
1297
+ doc.insertBefore(doctypeNode, doc.firstChild);
1298
+ }
1299
+ doctypeNode.nodeValue = '!DOCTYPE';
1300
+ doctypeNode['x-name'] = name;
1301
+ doctypeNode['x-publicId'] = publicId;
1302
+ doctypeNode['x-systemId'] = systemId;
1303
+ },
1304
+ setDocumentMode(doc, mode) {
1305
+ doc['x-mode'] = mode;
1306
+ },
1307
+ getDocumentMode(doc) {
1308
+ return doc['x-mode'];
1309
+ },
1310
+ detachNode(node) {
1311
+ node.remove();
1312
+ },
1313
+ insertText(parentNode, text) {
1314
+ const lastChild = parentNode.lastChild;
1315
+ if (lastChild != null && lastChild.nodeType === 3 /* TEXT_NODE */) {
1316
+ lastChild.nodeValue += text;
1317
+ }
1318
+ else {
1319
+ parentNode.appendChild(ownerDocument.createTextNode(text));
1320
+ }
1321
+ },
1322
+ insertTextBefore(parentNode, text, referenceNode) {
1323
+ const prevNode = parentNode.childNodes[parentNode.childNodes.indexOf(referenceNode) - 1];
1324
+ if (prevNode != null && prevNode.nodeType === 3 /* TEXT_NODE */) {
1325
+ prevNode.nodeValue += text;
1326
+ }
1327
+ else {
1328
+ parentNode.insertBefore(ownerDocument.createTextNode(text), referenceNode);
1329
+ }
1330
+ },
1331
+ adoptAttributes(recipient, attrs) {
1332
+ for (let i = 0; i < attrs.length; i++) {
1333
+ const attr = attrs[i];
1334
+ if (recipient.hasAttributeNS(attr.namespace, attr.name) === false) {
1335
+ recipient.setAttributeNS(attr.namespace, attr.name, attr.value);
1336
+ }
1337
+ }
1338
+ },
1339
+ getFirstChild(node) {
1340
+ return node.childNodes[0];
1341
+ },
1342
+ getChildNodes(node) {
1343
+ return node.childNodes;
1344
+ },
1345
+ getParentNode(node) {
1346
+ return node.parentNode;
1347
+ },
1348
+ getAttrList(element) {
1349
+ const attrs = element.attributes.__items.map(attr => {
1350
+ return {
1351
+ name: attr.name,
1352
+ value: attr.value,
1353
+ namespace: attr.namespaceURI,
1354
+ prefix: null,
1355
+ };
1356
+ });
1357
+ return attrs;
1358
+ },
1359
+ getTagName(element) {
1360
+ if (element.namespaceURI === 'http://www.w3.org/1999/xhtml') {
1361
+ return element.nodeName.toLowerCase();
1362
+ }
1363
+ else {
1364
+ return element.nodeName;
1365
+ }
1366
+ },
1367
+ getNamespaceURI(element) {
1368
+ return element.namespaceURI;
1369
+ },
1370
+ getTextNodeContent(textNode) {
1371
+ return textNode.nodeValue;
1372
+ },
1373
+ getCommentNodeContent(commentNode) {
1374
+ return commentNode.nodeValue;
1375
+ },
1376
+ getDocumentTypeNodeName(doctypeNode) {
1377
+ return doctypeNode['x-name'];
1378
+ },
1379
+ getDocumentTypeNodePublicId(doctypeNode) {
1380
+ return doctypeNode['x-publicId'];
1381
+ },
1382
+ getDocumentTypeNodeSystemId(doctypeNode) {
1383
+ return doctypeNode['x-systemId'];
1384
+ },
1385
+ isTextNode(node) {
1386
+ return node.nodeType === 3 /* TEXT_NODE */;
1387
+ },
1388
+ isCommentNode(node) {
1389
+ return node.nodeType === 8 /* COMMENT_NODE */;
1390
+ },
1391
+ isDocumentTypeNode(node) {
1392
+ return node.nodeType === 10 /* DOCUMENT_TYPE_NODE */;
1393
+ },
1394
+ isElementNode(node) {
1395
+ return node.nodeType === 1 /* ELEMENT_NODE */;
1396
+ },
1397
+ };
1398
+ parseOptions = {
1399
+ treeAdapter: treeAdapter,
1400
+ };
1401
+ docParser.set(ownerDocument, parseOptions);
1402
+ return parseOptions;
1403
+ }
1404
+
1405
+ class MockNode {
1406
+ constructor(ownerDocument, nodeType, nodeName, nodeValue) {
1407
+ this.ownerDocument = ownerDocument;
1408
+ this.nodeType = nodeType;
1409
+ this.nodeName = nodeName;
1410
+ this._nodeValue = nodeValue;
1411
+ this.parentNode = null;
1412
+ this.childNodes = [];
1413
+ }
1414
+ appendChild(newNode) {
1415
+ if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
1416
+ const nodes = newNode.childNodes.slice();
1417
+ for (const child of nodes) {
1418
+ this.appendChild(child);
1419
+ }
1420
+ }
1421
+ else {
1422
+ newNode.remove();
1423
+ newNode.parentNode = this;
1424
+ this.childNodes.push(newNode);
1425
+ connectNode(this.ownerDocument, newNode);
1426
+ }
1427
+ return newNode;
1428
+ }
1429
+ append(...items) {
1430
+ items.forEach(item => {
1431
+ const isNode = typeof item === 'object' && item !== null && 'nodeType' in item;
1432
+ this.appendChild(isNode ? item : this.ownerDocument.createTextNode(String(item)));
1433
+ });
1434
+ }
1435
+ prepend(...items) {
1436
+ const firstChild = this.firstChild;
1437
+ items.forEach(item => {
1438
+ const isNode = typeof item === 'object' && item !== null && 'nodeType' in item;
1439
+ this.insertBefore(isNode ? item : this.ownerDocument.createTextNode(String(item)), firstChild);
1440
+ });
1441
+ }
1442
+ cloneNode(deep) {
1443
+ throw new Error(`invalid node type to clone: ${this.nodeType}, deep: ${deep}`);
1444
+ }
1445
+ compareDocumentPosition(_other) {
1446
+ // unimplemented
1447
+ // https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
1448
+ return -1;
1449
+ }
1450
+ get firstChild() {
1451
+ return this.childNodes[0] || null;
1452
+ }
1453
+ insertBefore(newNode, referenceNode) {
1454
+ if (newNode.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
1455
+ for (let i = 0, ii = newNode.childNodes.length; i < ii; i++) {
1456
+ insertBefore(this, newNode.childNodes[i], referenceNode);
1457
+ }
1458
+ }
1459
+ else {
1460
+ insertBefore(this, newNode, referenceNode);
1461
+ }
1462
+ return newNode;
1463
+ }
1464
+ get isConnected() {
1465
+ let node = this;
1466
+ while (node != null) {
1467
+ if (node.nodeType === 9 /* DOCUMENT_NODE */) {
1468
+ return true;
1469
+ }
1470
+ node = node.parentNode;
1471
+ if (node != null && node.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */) {
1472
+ node = node.host;
1473
+ }
1474
+ }
1475
+ return false;
1476
+ }
1477
+ isSameNode(node) {
1478
+ return this === node;
1479
+ }
1480
+ get lastChild() {
1481
+ return this.childNodes[this.childNodes.length - 1] || null;
1482
+ }
1483
+ get nextSibling() {
1484
+ if (this.parentNode != null) {
1485
+ const index = this.parentNode.childNodes.indexOf(this) + 1;
1486
+ return this.parentNode.childNodes[index] || null;
1487
+ }
1488
+ return null;
1489
+ }
1490
+ get nodeValue() {
1491
+ return this._nodeValue;
1492
+ }
1493
+ set nodeValue(value) {
1494
+ this._nodeValue = value;
1495
+ }
1496
+ get parentElement() {
1497
+ return this.parentNode || null;
1498
+ }
1499
+ set parentElement(value) {
1500
+ this.parentNode = value;
1501
+ }
1502
+ get previousSibling() {
1503
+ if (this.parentNode != null) {
1504
+ const index = this.parentNode.childNodes.indexOf(this) - 1;
1505
+ return this.parentNode.childNodes[index] || null;
1506
+ }
1507
+ return null;
1508
+ }
1509
+ contains(otherNode) {
1510
+ return this.childNodes.includes(otherNode);
1511
+ }
1512
+ removeChild(childNode) {
1513
+ const index = this.childNodes.indexOf(childNode);
1514
+ if (index > -1) {
1515
+ this.childNodes.splice(index, 1);
1516
+ if (this.nodeType === 1 /* ELEMENT_NODE */) {
1517
+ const wasConnected = this.isConnected;
1518
+ childNode.parentNode = null;
1519
+ if (wasConnected === true) {
1520
+ disconnectNode(childNode);
1521
+ }
1522
+ }
1523
+ else {
1524
+ childNode.parentNode = null;
1525
+ }
1526
+ }
1527
+ else {
1528
+ throw new Error(`node not found within childNodes during removeChild`);
1529
+ }
1530
+ return childNode;
1531
+ }
1532
+ remove() {
1533
+ if (this.parentNode != null) {
1534
+ this.parentNode.removeChild(this);
1535
+ }
1536
+ }
1537
+ replaceChild(newChild, oldChild) {
1538
+ if (oldChild.parentNode === this) {
1539
+ this.insertBefore(newChild, oldChild);
1540
+ oldChild.remove();
1541
+ return newChild;
1542
+ }
1543
+ return null;
1544
+ }
1545
+ get textContent() {
1546
+ return this._nodeValue;
1547
+ }
1548
+ set textContent(value) {
1549
+ this._nodeValue = String(value);
1550
+ }
1551
+ }
1552
+ MockNode.ELEMENT_NODE = 1;
1553
+ MockNode.TEXT_NODE = 3;
1554
+ MockNode.PROCESSING_INSTRUCTION_NODE = 7;
1555
+ MockNode.COMMENT_NODE = 8;
1556
+ MockNode.DOCUMENT_NODE = 9;
1557
+ MockNode.DOCUMENT_TYPE_NODE = 10;
1558
+ MockNode.DOCUMENT_FRAGMENT_NODE = 11;
1559
+ class MockNodeList {
1560
+ constructor(ownerDocument, childNodes, length) {
1561
+ this.ownerDocument = ownerDocument;
1562
+ this.childNodes = childNodes;
1563
+ this.length = length;
1564
+ }
1565
+ }
1566
+ class MockElement extends MockNode {
1567
+ constructor(ownerDocument, nodeName) {
1568
+ super(ownerDocument, 1 /* ELEMENT_NODE */, typeof nodeName === 'string' ? nodeName : null, null);
1569
+ this.namespaceURI = null;
1570
+ }
1571
+ addEventListener(type, handler) {
1572
+ addEventListener(this, type, handler);
1573
+ }
1574
+ attachShadow(_opts) {
1575
+ const shadowRoot = this.ownerDocument.createDocumentFragment();
1576
+ this.shadowRoot = shadowRoot;
1577
+ return shadowRoot;
1578
+ }
1579
+ get shadowRoot() {
1580
+ return this.__shadowRoot || null;
1581
+ }
1582
+ set shadowRoot(shadowRoot) {
1583
+ if (shadowRoot != null) {
1584
+ shadowRoot.host = this;
1585
+ this.__shadowRoot = shadowRoot;
1586
+ }
1587
+ else {
1588
+ delete this.__shadowRoot;
1589
+ }
1590
+ }
1591
+ get attributes() {
1592
+ if (this.__attributeMap == null) {
1593
+ this.__attributeMap = createAttributeProxy(false);
1594
+ }
1595
+ return this.__attributeMap;
1596
+ }
1597
+ set attributes(attrs) {
1598
+ this.__attributeMap = attrs;
1599
+ }
1600
+ get children() {
1601
+ return this.childNodes.filter(n => n.nodeType === 1 /* ELEMENT_NODE */);
1602
+ }
1603
+ get childElementCount() {
1604
+ return this.childNodes.filter(n => n.nodeType === 1 /* ELEMENT_NODE */).length;
1605
+ }
1606
+ get className() {
1607
+ return this.getAttributeNS(null, 'class') || '';
1608
+ }
1609
+ set className(value) {
1610
+ this.setAttributeNS(null, 'class', value);
1611
+ }
1612
+ get classList() {
1613
+ return new MockClassList(this);
1614
+ }
1615
+ click() {
1616
+ dispatchEvent(this, new MockEvent('click', { bubbles: true, cancelable: true, composed: true }));
1617
+ }
1618
+ cloneNode(_deep) {
1619
+ // implemented on MockElement.prototype from within element.ts
1620
+ return null;
1621
+ }
1622
+ closest(selector) {
1623
+ let elm = this;
1624
+ while (elm != null) {
1625
+ if (elm.matches(selector)) {
1626
+ return elm;
1627
+ }
1628
+ elm = elm.parentNode;
1629
+ }
1630
+ return null;
1631
+ }
1632
+ get dataset() {
1633
+ return dataset(this);
1634
+ }
1635
+ get dir() {
1636
+ return this.getAttributeNS(null, 'dir') || '';
1637
+ }
1638
+ set dir(value) {
1639
+ this.setAttributeNS(null, 'dir', value);
1640
+ }
1641
+ dispatchEvent(ev) {
1642
+ return dispatchEvent(this, ev);
1643
+ }
1644
+ get firstElementChild() {
1645
+ return this.children[0] || null;
1646
+ }
1647
+ getAttribute(attrName) {
1648
+ if (attrName === 'style') {
1649
+ if (this.__style != null && this.__style.length > 0) {
1650
+ return this.style.cssText;
1651
+ }
1652
+ return null;
1653
+ }
1654
+ const attr = this.attributes.getNamedItem(attrName);
1655
+ if (attr != null) {
1656
+ return attr.value;
1657
+ }
1658
+ return null;
1659
+ }
1660
+ getAttributeNS(namespaceURI, attrName) {
1661
+ const attr = this.attributes.getNamedItemNS(namespaceURI, attrName);
1662
+ if (attr != null) {
1663
+ return attr.value;
1664
+ }
1665
+ return null;
1666
+ }
1667
+ getBoundingClientRect() {
1668
+ return { bottom: 0, height: 0, left: 0, right: 0, top: 0, width: 0, x: 0, y: 0 };
1669
+ }
1670
+ getRootNode(opts) {
1671
+ const isComposed = opts != null && opts.composed === true;
1672
+ let node = this;
1673
+ while (node.parentNode != null) {
1674
+ node = node.parentNode;
1675
+ if (isComposed === true && node.parentNode == null && node.host != null) {
1676
+ node = node.host;
1677
+ }
1678
+ }
1679
+ return node;
1680
+ }
1681
+ get draggable() {
1682
+ return this.getAttributeNS(null, 'draggable') === 'true';
1683
+ }
1684
+ set draggable(value) {
1685
+ this.setAttributeNS(null, 'draggable', value);
1686
+ }
1687
+ hasChildNodes() {
1688
+ return this.childNodes.length > 0;
1689
+ }
1690
+ get id() {
1691
+ return this.getAttributeNS(null, 'id') || '';
1692
+ }
1693
+ set id(value) {
1694
+ this.setAttributeNS(null, 'id', value);
1695
+ }
1696
+ get innerHTML() {
1697
+ if (this.childNodes.length === 0) {
1698
+ return '';
1699
+ }
1700
+ return serializeNodeToHtml(this, {
1701
+ newLines: false,
1702
+ indentSpaces: 0,
1703
+ });
1704
+ }
1705
+ set innerHTML(html) {
1706
+ if (NON_ESCAPABLE_CONTENT.has(this.nodeName) === true) {
1707
+ setTextContent(this, html);
1708
+ }
1709
+ else {
1710
+ for (let i = this.childNodes.length - 1; i >= 0; i--) {
1711
+ this.removeChild(this.childNodes[i]);
1712
+ }
1713
+ if (typeof html === 'string') {
1714
+ const frag = parseFragmentUtil(this.ownerDocument, html);
1715
+ while (frag.childNodes.length > 0) {
1716
+ this.appendChild(frag.childNodes[0]);
1717
+ }
1718
+ }
1719
+ }
1720
+ }
1721
+ get innerText() {
1722
+ const text = [];
1723
+ getTextContent(this.childNodes, text);
1724
+ return text.join('');
1725
+ }
1726
+ set innerText(value) {
1727
+ setTextContent(this, value);
1728
+ }
1729
+ insertAdjacentElement(position, elm) {
1730
+ if (position === 'beforebegin') {
1731
+ insertBefore(this.parentNode, elm, this);
1732
+ }
1733
+ else if (position === 'afterbegin') {
1734
+ this.prepend(elm);
1735
+ }
1736
+ else if (position === 'beforeend') {
1737
+ this.appendChild(elm);
1738
+ }
1739
+ else if (position === 'afterend') {
1740
+ insertBefore(this.parentNode, elm, this.nextSibling);
1741
+ }
1742
+ return elm;
1743
+ }
1744
+ insertAdjacentHTML(position, html) {
1745
+ const frag = parseFragmentUtil(this.ownerDocument, html);
1746
+ if (position === 'beforebegin') {
1747
+ while (frag.childNodes.length > 0) {
1748
+ insertBefore(this.parentNode, frag.childNodes[0], this);
1749
+ }
1750
+ }
1751
+ else if (position === 'afterbegin') {
1752
+ while (frag.childNodes.length > 0) {
1753
+ this.prepend(frag.childNodes[frag.childNodes.length - 1]);
1754
+ }
1755
+ }
1756
+ else if (position === 'beforeend') {
1757
+ while (frag.childNodes.length > 0) {
1758
+ this.appendChild(frag.childNodes[0]);
1759
+ }
1760
+ }
1761
+ else if (position === 'afterend') {
1762
+ while (frag.childNodes.length > 0) {
1763
+ insertBefore(this.parentNode, frag.childNodes[frag.childNodes.length - 1], this.nextSibling);
1764
+ }
1765
+ }
1766
+ }
1767
+ insertAdjacentText(position, text) {
1768
+ const elm = this.ownerDocument.createTextNode(text);
1769
+ if (position === 'beforebegin') {
1770
+ insertBefore(this.parentNode, elm, this);
1771
+ }
1772
+ else if (position === 'afterbegin') {
1773
+ this.prepend(elm);
1774
+ }
1775
+ else if (position === 'beforeend') {
1776
+ this.appendChild(elm);
1777
+ }
1778
+ else if (position === 'afterend') {
1779
+ insertBefore(this.parentNode, elm, this.nextSibling);
1780
+ }
1781
+ }
1782
+ hasAttribute(attrName) {
1783
+ if (attrName === 'style') {
1784
+ return this.__style != null && this.__style.length > 0;
1785
+ }
1786
+ return this.getAttribute(attrName) !== null;
1787
+ }
1788
+ hasAttributeNS(namespaceURI, name) {
1789
+ return this.getAttributeNS(namespaceURI, name) !== null;
1790
+ }
1791
+ get hidden() {
1792
+ return this.hasAttributeNS(null, 'hidden');
1793
+ }
1794
+ set hidden(isHidden) {
1795
+ if (isHidden === true) {
1796
+ this.setAttributeNS(null, 'hidden', '');
1797
+ }
1798
+ else {
1799
+ this.removeAttributeNS(null, 'hidden');
1800
+ }
1801
+ }
1802
+ get lang() {
1803
+ return this.getAttributeNS(null, 'lang') || '';
1804
+ }
1805
+ set lang(value) {
1806
+ this.setAttributeNS(null, 'lang', value);
1807
+ }
1808
+ get lastElementChild() {
1809
+ const children = this.children;
1810
+ return children[children.length - 1] || null;
1811
+ }
1812
+ matches(selector) {
1813
+ return matches(selector, this);
1814
+ }
1815
+ get nextElementSibling() {
1816
+ const parentElement = this.parentElement;
1817
+ if (parentElement != null &&
1818
+ (parentElement.nodeType === 1 /* ELEMENT_NODE */ ||
1819
+ parentElement.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */ ||
1820
+ parentElement.nodeType === 9 /* DOCUMENT_NODE */)) {
1821
+ const children = parentElement.children;
1822
+ const index = children.indexOf(this) + 1;
1823
+ return parentElement.children[index] || null;
1824
+ }
1825
+ return null;
1826
+ }
1827
+ get outerHTML() {
1828
+ return serializeNodeToHtml(this, {
1829
+ newLines: false,
1830
+ outerHtml: true,
1831
+ indentSpaces: 0,
1832
+ });
1833
+ }
1834
+ get previousElementSibling() {
1835
+ const parentElement = this.parentElement;
1836
+ if (parentElement != null &&
1837
+ (parentElement.nodeType === 1 /* ELEMENT_NODE */ ||
1838
+ parentElement.nodeType === 11 /* DOCUMENT_FRAGMENT_NODE */ ||
1839
+ parentElement.nodeType === 9 /* DOCUMENT_NODE */)) {
1840
+ const children = parentElement.children;
1841
+ const index = children.indexOf(this) - 1;
1842
+ return parentElement.children[index] || null;
1843
+ }
1844
+ return null;
1845
+ }
1846
+ getElementsByClassName(classNames) {
1847
+ const classes = classNames
1848
+ .trim()
1849
+ .split(' ')
1850
+ .filter(c => c.length > 0);
1851
+ const results = [];
1852
+ getElementsByClassName(this, classes, results);
1853
+ return results;
1854
+ }
1855
+ getElementsByTagName(tagName) {
1856
+ const results = [];
1857
+ getElementsByTagName(this, tagName.toLowerCase(), results);
1858
+ return results;
1859
+ }
1860
+ querySelector(selector) {
1861
+ return selectOne(selector, this);
1862
+ }
1863
+ querySelectorAll(selector) {
1864
+ return selectAll(selector, this);
1865
+ }
1866
+ removeAttribute(attrName) {
1867
+ if (attrName === 'style') {
1868
+ delete this.__style;
1869
+ }
1870
+ else {
1871
+ const attr = this.attributes.getNamedItem(attrName);
1872
+ if (attr != null) {
1873
+ this.attributes.removeNamedItemNS(attr);
1874
+ if (checkAttributeChanged(this) === true) {
1875
+ attributeChanged(this, attrName, attr.value, null);
1876
+ }
1877
+ }
1878
+ }
1879
+ }
1880
+ removeAttributeNS(namespaceURI, attrName) {
1881
+ const attr = this.attributes.getNamedItemNS(namespaceURI, attrName);
1882
+ if (attr != null) {
1883
+ this.attributes.removeNamedItemNS(attr);
1884
+ if (checkAttributeChanged(this) === true) {
1885
+ attributeChanged(this, attrName, attr.value, null);
1886
+ }
1887
+ }
1888
+ }
1889
+ removeEventListener(type, handler) {
1890
+ removeEventListener(this, type, handler);
1891
+ }
1892
+ setAttribute(attrName, value) {
1893
+ if (attrName === 'style') {
1894
+ this.style = value;
1895
+ }
1896
+ else {
1897
+ const attributes = this.attributes;
1898
+ let attr = attributes.getNamedItem(attrName);
1899
+ const checkAttrChanged = checkAttributeChanged(this);
1900
+ if (attr != null) {
1901
+ if (checkAttrChanged === true) {
1902
+ const oldValue = attr.value;
1903
+ attr.value = value;
1904
+ if (oldValue !== attr.value) {
1905
+ attributeChanged(this, attr.name, oldValue, attr.value);
1906
+ }
1907
+ }
1908
+ else {
1909
+ attr.value = value;
1910
+ }
1911
+ }
1912
+ else {
1913
+ if (attributes.caseInsensitive) {
1914
+ attrName = attrName.toLowerCase();
1915
+ }
1916
+ attr = new MockAttr(attrName, value);
1917
+ attributes.__items.push(attr);
1918
+ if (checkAttrChanged === true) {
1919
+ attributeChanged(this, attrName, null, attr.value);
1920
+ }
1921
+ }
1922
+ }
1923
+ }
1924
+ setAttributeNS(namespaceURI, attrName, value) {
1925
+ const attributes = this.attributes;
1926
+ let attr = attributes.getNamedItemNS(namespaceURI, attrName);
1927
+ const checkAttrChanged = checkAttributeChanged(this);
1928
+ if (attr != null) {
1929
+ if (checkAttrChanged === true) {
1930
+ const oldValue = attr.value;
1931
+ attr.value = value;
1932
+ if (oldValue !== attr.value) {
1933
+ attributeChanged(this, attr.name, oldValue, attr.value);
1934
+ }
1935
+ }
1936
+ else {
1937
+ attr.value = value;
1938
+ }
1939
+ }
1940
+ else {
1941
+ attr = new MockAttr(attrName, value, namespaceURI);
1942
+ attributes.__items.push(attr);
1943
+ if (checkAttrChanged === true) {
1944
+ attributeChanged(this, attrName, null, attr.value);
1945
+ }
1946
+ }
1947
+ }
1948
+ get style() {
1949
+ if (this.__style == null) {
1950
+ this.__style = createCSSStyleDeclaration();
1951
+ }
1952
+ return this.__style;
1953
+ }
1954
+ set style(val) {
1955
+ if (typeof val === 'string') {
1956
+ if (this.__style == null) {
1957
+ this.__style = createCSSStyleDeclaration();
1958
+ }
1959
+ this.__style.cssText = val;
1960
+ }
1961
+ else {
1962
+ this.__style = val;
1963
+ }
1964
+ }
1965
+ get tabIndex() {
1966
+ return parseInt(this.getAttributeNS(null, 'tabindex') || '-1', 10);
1967
+ }
1968
+ set tabIndex(value) {
1969
+ this.setAttributeNS(null, 'tabindex', value);
1970
+ }
1971
+ get tagName() {
1972
+ return this.nodeName;
1973
+ }
1974
+ set tagName(value) {
1975
+ this.nodeName = value;
1976
+ }
1977
+ get textContent() {
1978
+ const text = [];
1979
+ getTextContent(this.childNodes, text);
1980
+ return text.join('');
1981
+ }
1982
+ set textContent(value) {
1983
+ setTextContent(this, value);
1984
+ }
1985
+ get title() {
1986
+ return this.getAttributeNS(null, 'title') || '';
1987
+ }
1988
+ set title(value) {
1989
+ this.setAttributeNS(null, 'title', value);
1990
+ }
1991
+ onanimationstart() {
1992
+ /**/
1993
+ }
1994
+ onanimationend() {
1995
+ /**/
1996
+ }
1997
+ onanimationiteration() {
1998
+ /**/
1999
+ }
2000
+ onabort() {
2001
+ /**/
2002
+ }
2003
+ onauxclick() {
2004
+ /**/
2005
+ }
2006
+ onbeforecopy() {
2007
+ /**/
2008
+ }
2009
+ onbeforecut() {
2010
+ /**/
2011
+ }
2012
+ onbeforepaste() {
2013
+ /**/
2014
+ }
2015
+ onblur() {
2016
+ /**/
2017
+ }
2018
+ oncancel() {
2019
+ /**/
2020
+ }
2021
+ oncanplay() {
2022
+ /**/
2023
+ }
2024
+ oncanplaythrough() {
2025
+ /**/
2026
+ }
2027
+ onchange() {
2028
+ /**/
2029
+ }
2030
+ onclick() {
2031
+ /**/
2032
+ }
2033
+ onclose() {
2034
+ /**/
2035
+ }
2036
+ oncontextmenu() {
2037
+ /**/
2038
+ }
2039
+ oncopy() {
2040
+ /**/
2041
+ }
2042
+ oncuechange() {
2043
+ /**/
2044
+ }
2045
+ oncut() {
2046
+ /**/
2047
+ }
2048
+ ondblclick() {
2049
+ /**/
2050
+ }
2051
+ ondrag() {
2052
+ /**/
2053
+ }
2054
+ ondragend() {
2055
+ /**/
2056
+ }
2057
+ ondragenter() {
2058
+ /**/
2059
+ }
2060
+ ondragleave() {
2061
+ /**/
2062
+ }
2063
+ ondragover() {
2064
+ /**/
2065
+ }
2066
+ ondragstart() {
2067
+ /**/
2068
+ }
2069
+ ondrop() {
2070
+ /**/
2071
+ }
2072
+ ondurationchange() {
2073
+ /**/
2074
+ }
2075
+ onemptied() {
2076
+ /**/
2077
+ }
2078
+ onended() {
2079
+ /**/
2080
+ }
2081
+ onerror() {
2082
+ /**/
2083
+ }
2084
+ onfocus() {
2085
+ /**/
2086
+ }
2087
+ onfocusin() {
2088
+ /**/
2089
+ }
2090
+ onfocusout() {
2091
+ /**/
2092
+ }
2093
+ onformdata() {
2094
+ /**/
2095
+ }
2096
+ onfullscreenchange() {
2097
+ /**/
2098
+ }
2099
+ onfullscreenerror() {
2100
+ /**/
2101
+ }
2102
+ ongotpointercapture() {
2103
+ /**/
2104
+ }
2105
+ oninput() {
2106
+ /**/
2107
+ }
2108
+ oninvalid() {
2109
+ /**/
2110
+ }
2111
+ onkeydown() {
2112
+ /**/
2113
+ }
2114
+ onkeypress() {
2115
+ /**/
2116
+ }
2117
+ onkeyup() {
2118
+ /**/
2119
+ }
2120
+ onload() {
2121
+ /**/
2122
+ }
2123
+ onloadeddata() {
2124
+ /**/
2125
+ }
2126
+ onloadedmetadata() {
2127
+ /**/
2128
+ }
2129
+ onloadstart() {
2130
+ /**/
2131
+ }
2132
+ onlostpointercapture() {
2133
+ /**/
2134
+ }
2135
+ onmousedown() {
2136
+ /**/
2137
+ }
2138
+ onmouseenter() {
2139
+ /**/
2140
+ }
2141
+ onmouseleave() {
2142
+ /**/
2143
+ }
2144
+ onmousemove() {
2145
+ /**/
2146
+ }
2147
+ onmouseout() {
2148
+ /**/
2149
+ }
2150
+ onmouseover() {
2151
+ /**/
2152
+ }
2153
+ onmouseup() {
2154
+ /**/
2155
+ }
2156
+ onmousewheel() {
2157
+ /**/
2158
+ }
2159
+ onpaste() {
2160
+ /**/
2161
+ }
2162
+ onpause() {
2163
+ /**/
2164
+ }
2165
+ onplay() {
2166
+ /**/
2167
+ }
2168
+ onplaying() {
2169
+ /**/
2170
+ }
2171
+ onpointercancel() {
2172
+ /**/
2173
+ }
2174
+ onpointerdown() {
2175
+ /**/
2176
+ }
2177
+ onpointerenter() {
2178
+ /**/
2179
+ }
2180
+ onpointerleave() {
2181
+ /**/
2182
+ }
2183
+ onpointermove() {
2184
+ /**/
2185
+ }
2186
+ onpointerout() {
2187
+ /**/
2188
+ }
2189
+ onpointerover() {
2190
+ /**/
2191
+ }
2192
+ onpointerup() {
2193
+ /**/
2194
+ }
2195
+ onprogress() {
2196
+ /**/
2197
+ }
2198
+ onratechange() {
2199
+ /**/
2200
+ }
2201
+ onreset() {
2202
+ /**/
2203
+ }
2204
+ onresize() {
2205
+ /**/
2206
+ }
2207
+ onscroll() {
2208
+ /**/
2209
+ }
2210
+ onsearch() {
2211
+ /**/
2212
+ }
2213
+ onseeked() {
2214
+ /**/
2215
+ }
2216
+ onseeking() {
2217
+ /**/
2218
+ }
2219
+ onselect() {
2220
+ /**/
2221
+ }
2222
+ onselectstart() {
2223
+ /**/
2224
+ }
2225
+ onstalled() {
2226
+ /**/
2227
+ }
2228
+ onsubmit() {
2229
+ /**/
2230
+ }
2231
+ onsuspend() {
2232
+ /**/
2233
+ }
2234
+ ontimeupdate() {
2235
+ /**/
2236
+ }
2237
+ ontoggle() {
2238
+ /**/
2239
+ }
2240
+ onvolumechange() {
2241
+ /**/
2242
+ }
2243
+ onwaiting() {
2244
+ /**/
2245
+ }
2246
+ onwebkitfullscreenchange() {
2247
+ /**/
2248
+ }
2249
+ onwebkitfullscreenerror() {
2250
+ /**/
2251
+ }
2252
+ onwheel() {
2253
+ /**/
2254
+ }
2255
+ toString(opts) {
2256
+ return serializeNodeToHtml(this, opts);
2257
+ }
2258
+ }
2259
+ function getElementsByClassName(elm, classNames, foundElms) {
2260
+ const children = elm.children;
2261
+ for (let i = 0, ii = children.length; i < ii; i++) {
2262
+ const childElm = children[i];
2263
+ for (let j = 0, jj = classNames.length; j < jj; j++) {
2264
+ if (childElm.classList.contains(classNames[j])) {
2265
+ foundElms.push(childElm);
2266
+ }
2267
+ }
2268
+ getElementsByClassName(childElm, classNames, foundElms);
2269
+ }
2270
+ }
2271
+ function getElementsByTagName(elm, tagName, foundElms) {
2272
+ const children = elm.children;
2273
+ for (let i = 0, ii = children.length; i < ii; i++) {
2274
+ const childElm = children[i];
2275
+ if (tagName === '*' || childElm.nodeName.toLowerCase() === tagName) {
2276
+ foundElms.push(childElm);
2277
+ }
2278
+ getElementsByTagName(childElm, tagName, foundElms);
2279
+ }
2280
+ }
2281
+ function resetElement(elm) {
2282
+ resetEventListeners(elm);
2283
+ delete elm.__attributeMap;
2284
+ delete elm.__shadowRoot;
2285
+ delete elm.__style;
2286
+ }
2287
+ function insertBefore(parentNode, newNode, referenceNode) {
2288
+ if (newNode !== referenceNode) {
2289
+ newNode.remove();
2290
+ newNode.parentNode = parentNode;
2291
+ newNode.ownerDocument = parentNode.ownerDocument;
2292
+ if (referenceNode != null) {
2293
+ const index = parentNode.childNodes.indexOf(referenceNode);
2294
+ if (index > -1) {
2295
+ parentNode.childNodes.splice(index, 0, newNode);
2296
+ }
2297
+ else {
2298
+ throw new Error(`referenceNode not found in parentNode.childNodes`);
2299
+ }
2300
+ }
2301
+ else {
2302
+ parentNode.childNodes.push(newNode);
2303
+ }
2304
+ connectNode(parentNode.ownerDocument, newNode);
2305
+ }
2306
+ return newNode;
2307
+ }
2308
+ class MockHTMLElement extends MockElement {
2309
+ constructor(ownerDocument, nodeName) {
2310
+ super(ownerDocument, typeof nodeName === 'string' ? nodeName.toUpperCase() : null);
2311
+ this.namespaceURI = 'http://www.w3.org/1999/xhtml';
2312
+ }
2313
+ get tagName() {
2314
+ return this.nodeName;
2315
+ }
2316
+ set tagName(value) {
2317
+ this.nodeName = value;
2318
+ }
2319
+ get attributes() {
2320
+ if (this.__attributeMap == null) {
2321
+ this.__attributeMap = createAttributeProxy(true);
2322
+ }
2323
+ return this.__attributeMap;
2324
+ }
2325
+ set attributes(attrs) {
2326
+ this.__attributeMap = attrs;
2327
+ }
2328
+ }
2329
+ class MockTextNode extends MockNode {
2330
+ constructor(ownerDocument, text) {
2331
+ super(ownerDocument, 3 /* TEXT_NODE */, "#text" /* TEXT_NODE */, text);
2332
+ }
2333
+ cloneNode(_deep) {
2334
+ return new MockTextNode(null, this.nodeValue);
2335
+ }
2336
+ get textContent() {
2337
+ return this.nodeValue;
2338
+ }
2339
+ set textContent(text) {
2340
+ this.nodeValue = text;
2341
+ }
2342
+ get data() {
2343
+ return this.nodeValue;
2344
+ }
2345
+ set data(text) {
2346
+ this.nodeValue = text;
2347
+ }
2348
+ get wholeText() {
2349
+ if (this.parentNode != null) {
2350
+ const text = [];
2351
+ for (let i = 0, ii = this.parentNode.childNodes.length; i < ii; i++) {
2352
+ const childNode = this.parentNode.childNodes[i];
2353
+ if (childNode.nodeType === 3 /* TEXT_NODE */) {
2354
+ text.push(childNode.nodeValue);
2355
+ }
2356
+ }
2357
+ return text.join('');
2358
+ }
2359
+ return this.nodeValue;
2360
+ }
2361
+ }
2362
+ function getTextContent(childNodes, text) {
2363
+ for (let i = 0, ii = childNodes.length; i < ii; i++) {
2364
+ const childNode = childNodes[i];
2365
+ if (childNode.nodeType === 3 /* TEXT_NODE */) {
2366
+ text.push(childNode.nodeValue);
2367
+ }
2368
+ else if (childNode.nodeType === 1 /* ELEMENT_NODE */) {
2369
+ getTextContent(childNode.childNodes, text);
2370
+ }
2371
+ }
2372
+ }
2373
+ function setTextContent(elm, text) {
2374
+ for (let i = elm.childNodes.length - 1; i >= 0; i--) {
2375
+ elm.removeChild(elm.childNodes[i]);
2376
+ }
2377
+ const textNode = new MockTextNode(elm.ownerDocument, text);
2378
+ elm.appendChild(textNode);
2379
+ }
2380
+
2381
+ class MockComment extends MockNode {
2382
+ constructor(ownerDocument, data) {
2383
+ super(ownerDocument, 8 /* COMMENT_NODE */, "#comment" /* COMMENT_NODE */, data);
2384
+ }
2385
+ cloneNode(_deep) {
2386
+ return new MockComment(null, this.nodeValue);
2387
+ }
2388
+ get textContent() {
2389
+ return this.nodeValue;
2390
+ }
2391
+ set textContent(text) {
2392
+ this.nodeValue = text;
2393
+ }
2394
+ }
2395
+
2396
+ class MockDocumentFragment extends MockHTMLElement {
2397
+ constructor(ownerDocument) {
2398
+ super(ownerDocument, null);
2399
+ this.nodeName = "#document-fragment" /* DOCUMENT_FRAGMENT_NODE */;
2400
+ this.nodeType = 11 /* DOCUMENT_FRAGMENT_NODE */;
2401
+ }
2402
+ getElementById(id) {
2403
+ return getElementById(this, id);
2404
+ }
2405
+ cloneNode(deep) {
2406
+ const cloned = new MockDocumentFragment(null);
2407
+ if (deep) {
2408
+ for (let i = 0, ii = this.childNodes.length; i < ii; i++) {
2409
+ const childNode = this.childNodes[i];
2410
+ if (childNode.nodeType === 1 /* ELEMENT_NODE */ ||
2411
+ childNode.nodeType === 3 /* TEXT_NODE */ ||
2412
+ childNode.nodeType === 8 /* COMMENT_NODE */) {
2413
+ const clonedChildNode = this.childNodes[i].cloneNode(true);
2414
+ cloned.appendChild(clonedChildNode);
2415
+ }
2416
+ }
2417
+ }
2418
+ return cloned;
2419
+ }
2420
+ }
2421
+
2422
+ class MockDocumentTypeNode extends MockHTMLElement {
2423
+ constructor(ownerDocument) {
2424
+ super(ownerDocument, '!DOCTYPE');
2425
+ this.nodeType = 10 /* DOCUMENT_TYPE_NODE */;
2426
+ this.setAttribute('html', '');
2427
+ }
2428
+ }
2429
+
2430
+ class MockCSSRule {
2431
+ constructor(parentStyleSheet) {
2432
+ this.parentStyleSheet = parentStyleSheet;
2433
+ this.cssText = '';
2434
+ this.type = 0;
2435
+ }
2436
+ }
2437
+ class MockCSSStyleSheet {
2438
+ constructor(ownerNode) {
2439
+ this.type = 'text/css';
2440
+ this.parentStyleSheet = null;
2441
+ this.cssRules = [];
2442
+ this.ownerNode = ownerNode;
2443
+ }
2444
+ get rules() {
2445
+ return this.cssRules;
2446
+ }
2447
+ set rules(rules) {
2448
+ this.cssRules = rules;
2449
+ }
2450
+ deleteRule(index) {
2451
+ if (index >= 0 && index < this.cssRules.length) {
2452
+ this.cssRules.splice(index, 1);
2453
+ updateStyleTextNode(this.ownerNode);
2454
+ }
2455
+ }
2456
+ insertRule(rule, index = 0) {
2457
+ if (typeof index !== 'number') {
2458
+ index = 0;
2459
+ }
2460
+ if (index < 0) {
2461
+ index = 0;
2462
+ }
2463
+ if (index > this.cssRules.length) {
2464
+ index = this.cssRules.length;
2465
+ }
2466
+ const cssRule = new MockCSSRule(this);
2467
+ cssRule.cssText = rule;
2468
+ this.cssRules.splice(index, 0, cssRule);
2469
+ updateStyleTextNode(this.ownerNode);
2470
+ return index;
2471
+ }
2472
+ }
2473
+ function getStyleElementText(styleElm) {
2474
+ const output = [];
2475
+ for (let i = 0; i < styleElm.childNodes.length; i++) {
2476
+ output.push(styleElm.childNodes[i].nodeValue);
2477
+ }
2478
+ return output.join('');
2479
+ }
2480
+ function setStyleElementText(styleElm, text) {
2481
+ // keeping the innerHTML and the sheet.cssRules connected
2482
+ // is not technically correct, but since we're doing
2483
+ // SSR we'll need to turn any assigned cssRules into
2484
+ // real text, not just properties that aren't rendered
2485
+ const sheet = styleElm.sheet;
2486
+ sheet.cssRules.length = 0;
2487
+ sheet.insertRule(text);
2488
+ updateStyleTextNode(styleElm);
2489
+ }
2490
+ function updateStyleTextNode(styleElm) {
2491
+ const childNodeLen = styleElm.childNodes.length;
2492
+ if (childNodeLen > 1) {
2493
+ for (let i = childNodeLen - 1; i >= 1; i--) {
2494
+ styleElm.removeChild(styleElm.childNodes[i]);
2495
+ }
2496
+ }
2497
+ else if (childNodeLen < 1) {
2498
+ styleElm.appendChild(styleElm.ownerDocument.createTextNode(''));
2499
+ }
2500
+ const textNode = styleElm.childNodes[0];
2501
+ textNode.nodeValue = styleElm.sheet.cssRules.map(r => r.cssText).join('\n');
2502
+ }
2503
+
2504
+ function createElement(ownerDocument, tagName) {
2505
+ if (typeof tagName !== 'string' || tagName === '' || !/^[a-z0-9-_:]+$/i.test(tagName)) {
2506
+ throw new Error(`The tag name provided (${tagName}) is not a valid name.`);
2507
+ }
2508
+ tagName = tagName.toLowerCase();
2509
+ switch (tagName) {
2510
+ case 'a':
2511
+ return new MockAnchorElement(ownerDocument);
2512
+ case 'base':
2513
+ return new MockBaseElement(ownerDocument);
2514
+ case 'button':
2515
+ return new MockButtonElement(ownerDocument);
2516
+ case 'canvas':
2517
+ return new MockCanvasElement(ownerDocument);
2518
+ case 'form':
2519
+ return new MockFormElement(ownerDocument);
2520
+ case 'img':
2521
+ return new MockImageElement(ownerDocument);
2522
+ case 'input':
2523
+ return new MockInputElement(ownerDocument);
2524
+ case 'link':
2525
+ return new MockLinkElement(ownerDocument);
2526
+ case 'meta':
2527
+ return new MockMetaElement(ownerDocument);
2528
+ case 'script':
2529
+ return new MockScriptElement(ownerDocument);
2530
+ case 'style':
2531
+ return new MockStyleElement(ownerDocument);
2532
+ case 'template':
2533
+ return new MockTemplateElement(ownerDocument);
2534
+ case 'title':
2535
+ return new MockTitleElement(ownerDocument);
2536
+ }
2537
+ if (ownerDocument != null && tagName.includes('-')) {
2538
+ const win = ownerDocument.defaultView;
2539
+ if (win != null && win.customElements != null) {
2540
+ return createCustomElement(win.customElements, ownerDocument, tagName);
2541
+ }
2542
+ }
2543
+ return new MockHTMLElement(ownerDocument, tagName);
2544
+ }
2545
+ function createElementNS(ownerDocument, namespaceURI, tagName) {
2546
+ if (namespaceURI === 'http://www.w3.org/1999/xhtml') {
2547
+ return createElement(ownerDocument, tagName);
2548
+ }
2549
+ else if (namespaceURI === 'http://www.w3.org/2000/svg') {
2550
+ return new MockSVGElement(ownerDocument, tagName);
2551
+ }
2552
+ else {
2553
+ return new MockElement(ownerDocument, tagName);
2554
+ }
2555
+ }
2556
+ class MockAnchorElement extends MockHTMLElement {
2557
+ constructor(ownerDocument) {
2558
+ super(ownerDocument, 'a');
2559
+ }
2560
+ get href() {
2561
+ return fullUrl(this, 'href');
2562
+ }
2563
+ set href(value) {
2564
+ this.setAttribute('href', value);
2565
+ }
2566
+ }
2567
+ class MockButtonElement extends MockHTMLElement {
2568
+ constructor(ownerDocument) {
2569
+ super(ownerDocument, 'button');
2570
+ }
2571
+ }
2572
+ patchPropAttributes(MockButtonElement.prototype, {
2573
+ type: String,
2574
+ }, {
2575
+ type: 'submit',
2576
+ });
2577
+ class MockImageElement extends MockHTMLElement {
2578
+ constructor(ownerDocument) {
2579
+ super(ownerDocument, 'img');
2580
+ }
2581
+ get draggable() {
2582
+ return this.getAttributeNS(null, 'draggable') !== 'false';
2583
+ }
2584
+ set draggable(value) {
2585
+ this.setAttributeNS(null, 'draggable', value);
2586
+ }
2587
+ get src() {
2588
+ return fullUrl(this, 'src');
2589
+ }
2590
+ set src(value) {
2591
+ this.setAttribute('src', value);
2592
+ }
2593
+ }
2594
+ patchPropAttributes(MockImageElement.prototype, {
2595
+ height: Number,
2596
+ width: Number,
2597
+ });
2598
+ class MockInputElement extends MockHTMLElement {
2599
+ constructor(ownerDocument) {
2600
+ super(ownerDocument, 'input');
2601
+ }
2602
+ get list() {
2603
+ const listId = this.getAttribute('list');
2604
+ if (listId) {
2605
+ return this.ownerDocument.getElementById(listId);
2606
+ }
2607
+ return null;
2608
+ }
2609
+ }
2610
+ patchPropAttributes(MockInputElement.prototype, {
2611
+ accept: String,
2612
+ autocomplete: String,
2613
+ autofocus: Boolean,
2614
+ capture: String,
2615
+ checked: Boolean,
2616
+ disabled: Boolean,
2617
+ form: String,
2618
+ formaction: String,
2619
+ formenctype: String,
2620
+ formmethod: String,
2621
+ formnovalidate: String,
2622
+ formtarget: String,
2623
+ height: Number,
2624
+ inputmode: String,
2625
+ max: String,
2626
+ maxLength: Number,
2627
+ min: String,
2628
+ minLength: Number,
2629
+ multiple: Boolean,
2630
+ name: String,
2631
+ pattern: String,
2632
+ placeholder: String,
2633
+ required: Boolean,
2634
+ readOnly: Boolean,
2635
+ size: Number,
2636
+ spellCheck: Boolean,
2637
+ src: String,
2638
+ step: String,
2639
+ type: String,
2640
+ value: String,
2641
+ width: Number,
2642
+ }, {
2643
+ type: 'text',
2644
+ });
2645
+ class MockFormElement extends MockHTMLElement {
2646
+ constructor(ownerDocument) {
2647
+ super(ownerDocument, 'form');
2648
+ }
2649
+ }
2650
+ patchPropAttributes(MockFormElement.prototype, {
2651
+ name: String,
2652
+ });
2653
+ class MockLinkElement extends MockHTMLElement {
2654
+ constructor(ownerDocument) {
2655
+ super(ownerDocument, 'link');
2656
+ }
2657
+ get href() {
2658
+ return fullUrl(this, 'href');
2659
+ }
2660
+ set href(value) {
2661
+ this.setAttribute('href', value);
2662
+ }
2663
+ }
2664
+ patchPropAttributes(MockLinkElement.prototype, {
2665
+ crossorigin: String,
2666
+ media: String,
2667
+ rel: String,
2668
+ type: String,
2669
+ });
2670
+ class MockMetaElement extends MockHTMLElement {
2671
+ constructor(ownerDocument) {
2672
+ super(ownerDocument, 'meta');
2673
+ }
2674
+ }
2675
+ patchPropAttributes(MockMetaElement.prototype, {
2676
+ charset: String,
2677
+ content: String,
2678
+ name: String,
2679
+ });
2680
+ class MockScriptElement extends MockHTMLElement {
2681
+ constructor(ownerDocument) {
2682
+ super(ownerDocument, 'script');
2683
+ }
2684
+ get src() {
2685
+ return fullUrl(this, 'src');
2686
+ }
2687
+ set src(value) {
2688
+ this.setAttribute('src', value);
2689
+ }
2690
+ }
2691
+ patchPropAttributes(MockScriptElement.prototype, {
2692
+ type: String,
2693
+ });
2694
+ class MockStyleElement extends MockHTMLElement {
2695
+ constructor(ownerDocument) {
2696
+ super(ownerDocument, 'style');
2697
+ this.sheet = new MockCSSStyleSheet(this);
2698
+ }
2699
+ get innerHTML() {
2700
+ return getStyleElementText(this);
2701
+ }
2702
+ set innerHTML(value) {
2703
+ setStyleElementText(this, value);
2704
+ }
2705
+ get innerText() {
2706
+ return getStyleElementText(this);
2707
+ }
2708
+ set innerText(value) {
2709
+ setStyleElementText(this, value);
2710
+ }
2711
+ get textContent() {
2712
+ return getStyleElementText(this);
2713
+ }
2714
+ set textContent(value) {
2715
+ setStyleElementText(this, value);
2716
+ }
2717
+ }
2718
+ class MockSVGElement extends MockElement {
2719
+ // SVGElement properties and methods
2720
+ get ownerSVGElement() {
2721
+ return null;
2722
+ }
2723
+ get viewportElement() {
2724
+ return null;
2725
+ }
2726
+ focus() {
2727
+ /**/
2728
+ }
2729
+ onunload() {
2730
+ /**/
2731
+ }
2732
+ // SVGGeometryElement properties and methods
2733
+ get pathLength() {
2734
+ return 0;
2735
+ }
2736
+ isPointInFill(_pt) {
2737
+ return false;
2738
+ }
2739
+ isPointInStroke(_pt) {
2740
+ return false;
2741
+ }
2742
+ getTotalLength() {
2743
+ return 0;
2744
+ }
2745
+ }
2746
+ class MockBaseElement extends MockHTMLElement {
2747
+ constructor(ownerDocument) {
2748
+ super(ownerDocument, 'base');
2749
+ }
2750
+ get href() {
2751
+ return fullUrl(this, 'href');
2752
+ }
2753
+ set href(value) {
2754
+ this.setAttribute('href', value);
2755
+ }
2756
+ }
2757
+ class MockTemplateElement extends MockHTMLElement {
2758
+ constructor(ownerDocument) {
2759
+ super(ownerDocument, 'template');
2760
+ this.content = new MockDocumentFragment(ownerDocument);
2761
+ }
2762
+ get innerHTML() {
2763
+ return this.content.innerHTML;
2764
+ }
2765
+ set innerHTML(html) {
2766
+ this.content.innerHTML = html;
2767
+ }
2768
+ cloneNode(deep) {
2769
+ const cloned = new MockTemplateElement(null);
2770
+ cloned.attributes = cloneAttributes(this.attributes);
2771
+ const styleCssText = this.getAttribute('style');
2772
+ if (styleCssText != null && styleCssText.length > 0) {
2773
+ cloned.setAttribute('style', styleCssText);
2774
+ }
2775
+ cloned.content = this.content.cloneNode(deep);
2776
+ if (deep) {
2777
+ for (let i = 0, ii = this.childNodes.length; i < ii; i++) {
2778
+ const clonedChildNode = this.childNodes[i].cloneNode(true);
2779
+ cloned.appendChild(clonedChildNode);
2780
+ }
2781
+ }
2782
+ return cloned;
2783
+ }
2784
+ }
2785
+ class MockTitleElement extends MockHTMLElement {
2786
+ constructor(ownerDocument) {
2787
+ super(ownerDocument, 'title');
2788
+ }
2789
+ get text() {
2790
+ return this.textContent;
2791
+ }
2792
+ set text(value) {
2793
+ this.textContent = value;
2794
+ }
2795
+ }
2796
+ class MockCanvasElement extends MockHTMLElement {
2797
+ constructor(ownerDocument) {
2798
+ super(ownerDocument, 'canvas');
2799
+ }
2800
+ getContext() {
2801
+ return {
2802
+ fillRect() {
2803
+ return;
2804
+ },
2805
+ clearRect() { },
2806
+ getImageData: function (_, __, w, h) {
2807
+ return {
2808
+ data: new Array(w * h * 4),
2809
+ };
2810
+ },
2811
+ putImageData() { },
2812
+ createImageData: function () {
2813
+ return [];
2814
+ },
2815
+ setTransform() { },
2816
+ drawImage() { },
2817
+ save() { },
2818
+ fillText() { },
2819
+ restore() { },
2820
+ beginPath() { },
2821
+ moveTo() { },
2822
+ lineTo() { },
2823
+ closePath() { },
2824
+ stroke() { },
2825
+ translate() { },
2826
+ scale() { },
2827
+ rotate() { },
2828
+ arc() { },
2829
+ fill() { },
2830
+ measureText() {
2831
+ return { width: 0 };
2832
+ },
2833
+ transform() { },
2834
+ rect() { },
2835
+ clip() { },
2836
+ };
2837
+ }
2838
+ }
2839
+ function fullUrl(elm, attrName) {
2840
+ const val = elm.getAttribute(attrName) || '';
2841
+ if (elm.ownerDocument != null) {
2842
+ const win = elm.ownerDocument.defaultView;
2843
+ if (win != null) {
2844
+ const loc = win.location;
2845
+ if (loc != null) {
2846
+ try {
2847
+ const url = new URL(val, loc.href);
2848
+ return url.href;
2849
+ }
2850
+ catch (e) { }
2851
+ }
2852
+ }
2853
+ }
2854
+ return val.replace(/\'|\"/g, '').trim();
2855
+ }
2856
+ function patchPropAttributes(prototype, attrs, defaults = {}) {
2857
+ Object.keys(attrs).forEach(propName => {
2858
+ const attr = attrs[propName];
2859
+ const defaultValue = defaults[propName];
2860
+ if (attr === Boolean) {
2861
+ Object.defineProperty(prototype, propName, {
2862
+ get() {
2863
+ return this.hasAttribute(propName);
2864
+ },
2865
+ set(value) {
2866
+ if (value) {
2867
+ this.setAttribute(propName, '');
2868
+ }
2869
+ else {
2870
+ this.removeAttribute(propName);
2871
+ }
2872
+ },
2873
+ });
2874
+ }
2875
+ else if (attr === Number) {
2876
+ Object.defineProperty(prototype, propName, {
2877
+ get() {
2878
+ const value = this.getAttribute(propName);
2879
+ return value ? parseInt(value, 10) : defaultValue === undefined ? 0 : defaultValue;
2880
+ },
2881
+ set(value) {
2882
+ this.setAttribute(propName, value);
2883
+ },
2884
+ });
2885
+ }
2886
+ else {
2887
+ Object.defineProperty(prototype, propName, {
2888
+ get() {
2889
+ return this.hasAttribute(propName) ? this.getAttribute(propName) : defaultValue || '';
2890
+ },
2891
+ set(value) {
2892
+ this.setAttribute(propName, value);
2893
+ },
2894
+ });
2895
+ }
2896
+ });
2897
+ }
2898
+ MockElement.prototype.cloneNode = function (deep) {
2899
+ // because we're creating elements, which extending specific HTML base classes there
2900
+ // is a MockElement circular reference that bundling has trouble dealing with so
2901
+ // the fix is to add cloneNode() to MockElement's prototype after the HTML classes
2902
+ const cloned = createElement(this.ownerDocument, this.nodeName);
2903
+ cloned.attributes = cloneAttributes(this.attributes);
2904
+ const styleCssText = this.getAttribute('style');
2905
+ if (styleCssText != null && styleCssText.length > 0) {
2906
+ cloned.setAttribute('style', styleCssText);
2907
+ }
2908
+ if (deep) {
2909
+ for (let i = 0, ii = this.childNodes.length; i < ii; i++) {
2910
+ const clonedChildNode = this.childNodes[i].cloneNode(true);
2911
+ cloned.appendChild(clonedChildNode);
2912
+ }
2913
+ }
2914
+ return cloned;
2915
+ };
2916
+
2917
+ let sharedDocument;
2918
+ function parseHtmlToDocument(html, ownerDocument = null) {
2919
+ if (ownerDocument == null) {
2920
+ if (sharedDocument == null) {
2921
+ sharedDocument = new MockDocument();
2922
+ }
2923
+ ownerDocument = sharedDocument;
2924
+ }
2925
+ return parseDocumentUtil(ownerDocument, html);
2926
+ }
2927
+ function parseHtmlToFragment(html, ownerDocument = null) {
2928
+ if (ownerDocument == null) {
2929
+ if (sharedDocument == null) {
2930
+ sharedDocument = new MockDocument();
2931
+ }
2932
+ ownerDocument = sharedDocument;
2933
+ }
2934
+ return parseFragmentUtil(ownerDocument, html);
2935
+ }
2936
+
2937
+ class MockHeaders {
2938
+ constructor(init) {
2939
+ this._values = [];
2940
+ if (typeof init === 'object') {
2941
+ if (typeof init[Symbol.iterator] === 'function') {
2942
+ const kvs = [];
2943
+ for (const kv of init) {
2944
+ if (typeof kv[Symbol.iterator] === 'function') {
2945
+ kvs.push([...kv]);
2946
+ }
2947
+ }
2948
+ for (const kv of kvs) {
2949
+ this.append(kv[0], kv[1]);
2950
+ }
2951
+ }
2952
+ else {
2953
+ for (const key in init) {
2954
+ this.append(key, init[key]);
2955
+ }
2956
+ }
2957
+ }
2958
+ }
2959
+ append(key, value) {
2960
+ this._values.push([key, value + '']);
2961
+ }
2962
+ delete(key) {
2963
+ key = key.toLowerCase();
2964
+ for (let i = this._values.length - 1; i >= 0; i--) {
2965
+ if (this._values[i][0].toLowerCase() === key) {
2966
+ this._values.splice(i, 1);
2967
+ }
2968
+ }
2969
+ }
2970
+ entries() {
2971
+ const entries = [];
2972
+ for (const kv of this.keys()) {
2973
+ entries.push([kv, this.get(kv)]);
2974
+ }
2975
+ let index = -1;
2976
+ return {
2977
+ next() {
2978
+ index++;
2979
+ return {
2980
+ value: entries[index],
2981
+ done: !entries[index],
2982
+ };
2983
+ },
2984
+ [Symbol.iterator]() {
2985
+ return this;
2986
+ },
2987
+ };
2988
+ }
2989
+ forEach(cb) {
2990
+ for (const kv of this.entries()) {
2991
+ cb(kv[1], kv[0]);
2992
+ }
2993
+ }
2994
+ get(key) {
2995
+ const rtn = [];
2996
+ key = key.toLowerCase();
2997
+ for (const kv of this._values) {
2998
+ if (kv[0].toLowerCase() === key) {
2999
+ rtn.push(kv[1]);
3000
+ }
3001
+ }
3002
+ return rtn.length > 0 ? rtn.join(', ') : null;
3003
+ }
3004
+ has(key) {
3005
+ key = key.toLowerCase();
3006
+ for (const kv of this._values) {
3007
+ if (kv[0].toLowerCase() === key) {
3008
+ return true;
3009
+ }
3010
+ }
3011
+ return false;
3012
+ }
3013
+ keys() {
3014
+ const keys = [];
3015
+ for (const kv of this._values) {
3016
+ const key = kv[0].toLowerCase();
3017
+ if (!keys.includes(key)) {
3018
+ keys.push(key);
3019
+ }
3020
+ }
3021
+ let index = -1;
3022
+ return {
3023
+ next() {
3024
+ index++;
3025
+ return {
3026
+ value: keys[index],
3027
+ done: !keys[index],
3028
+ };
3029
+ },
3030
+ [Symbol.iterator]() {
3031
+ return this;
3032
+ },
3033
+ };
3034
+ }
3035
+ set(key, value) {
3036
+ for (const kv of this._values) {
3037
+ if (kv[0].toLowerCase() === key.toLowerCase()) {
3038
+ kv[1] = value + '';
3039
+ return;
3040
+ }
3041
+ }
3042
+ this.append(key, value);
3043
+ }
3044
+ values() {
3045
+ const values = this._values;
3046
+ let index = -1;
3047
+ return {
3048
+ next() {
3049
+ index++;
3050
+ const done = !values[index];
3051
+ return {
3052
+ value: done ? undefined : values[index][1],
3053
+ done,
3054
+ };
3055
+ },
3056
+ [Symbol.iterator]() {
3057
+ return this;
3058
+ },
3059
+ };
3060
+ }
3061
+ [Symbol.iterator]() {
3062
+ return this.entries();
3063
+ }
3064
+ }
3065
+
3066
+ class MockRequest {
3067
+ constructor(input, init = {}) {
3068
+ this._method = 'GET';
3069
+ this._url = '/';
3070
+ this.bodyUsed = false;
3071
+ this.cache = 'default';
3072
+ this.credentials = 'same-origin';
3073
+ this.integrity = '';
3074
+ this.keepalive = false;
3075
+ this.mode = 'cors';
3076
+ this.redirect = 'follow';
3077
+ this.referrer = 'about:client';
3078
+ this.referrerPolicy = '';
3079
+ if (typeof input === 'string') {
3080
+ this.url = input;
3081
+ }
3082
+ else if (input) {
3083
+ Object.assign(this, input);
3084
+ this.headers = new MockHeaders(input.headers);
3085
+ }
3086
+ Object.assign(this, init);
3087
+ if (init.headers) {
3088
+ this.headers = new MockHeaders(init.headers);
3089
+ }
3090
+ if (!this.headers) {
3091
+ this.headers = new MockHeaders();
3092
+ }
3093
+ }
3094
+ get url() {
3095
+ if (typeof this._url === 'string') {
3096
+ return new URL(this._url, location.href).href;
3097
+ }
3098
+ return new URL('/', location.href).href;
3099
+ }
3100
+ set url(value) {
3101
+ this._url = value;
3102
+ }
3103
+ get method() {
3104
+ if (typeof this._method === 'string') {
3105
+ return this._method.toUpperCase();
3106
+ }
3107
+ return 'GET';
3108
+ }
3109
+ set method(value) {
3110
+ this._method = value;
3111
+ }
3112
+ clone() {
3113
+ const clone = { ...this };
3114
+ clone.headers = new MockHeaders(this.headers);
3115
+ return new MockRequest(clone);
3116
+ }
3117
+ }
3118
+ class MockResponse {
3119
+ constructor(body, init = {}) {
3120
+ this.ok = true;
3121
+ this.status = 200;
3122
+ this.statusText = '';
3123
+ this.type = 'default';
3124
+ this.url = '';
3125
+ this._body = body;
3126
+ if (init) {
3127
+ Object.assign(this, init);
3128
+ }
3129
+ this.headers = new MockHeaders(init.headers);
3130
+ }
3131
+ async json() {
3132
+ return JSON.parse(this._body);
3133
+ }
3134
+ async text() {
3135
+ return this._body;
3136
+ }
3137
+ clone() {
3138
+ const initClone = { ...this };
3139
+ initClone.headers = new MockHeaders(this.headers);
3140
+ return new MockResponse(this._body, initClone);
3141
+ }
3142
+ }
3143
+
3144
+ function setupGlobal(gbl) {
3145
+ if (gbl.window == null) {
3146
+ const win = (gbl.window = new MockWindow());
3147
+ WINDOW_FUNCTIONS.forEach(fnName => {
3148
+ if (!(fnName in gbl)) {
3149
+ gbl[fnName] = win[fnName].bind(win);
3150
+ }
3151
+ });
3152
+ WINDOW_PROPS.forEach(propName => {
3153
+ if (!(propName in gbl)) {
3154
+ Object.defineProperty(gbl, propName, {
3155
+ get() {
3156
+ return win[propName];
3157
+ },
3158
+ set(val) {
3159
+ win[propName] = val;
3160
+ },
3161
+ configurable: true,
3162
+ enumerable: true,
3163
+ });
3164
+ }
3165
+ });
3166
+ GLOBAL_CONSTRUCTORS.forEach(([cstrName]) => {
3167
+ gbl[cstrName] = win[cstrName];
3168
+ });
3169
+ }
3170
+ return gbl.window;
3171
+ }
3172
+ function teardownGlobal(gbl) {
3173
+ const win = gbl.window;
3174
+ if (win && typeof win.close === 'function') {
3175
+ win.close();
3176
+ }
3177
+ }
3178
+ function patchWindow(winToBePatched) {
3179
+ const mockWin = new MockWindow(false);
3180
+ WINDOW_FUNCTIONS.forEach(fnName => {
3181
+ if (typeof winToBePatched[fnName] !== 'function') {
3182
+ winToBePatched[fnName] = mockWin[fnName].bind(mockWin);
3183
+ }
3184
+ });
3185
+ WINDOW_PROPS.forEach(propName => {
3186
+ if (winToBePatched === undefined) {
3187
+ Object.defineProperty(winToBePatched, propName, {
3188
+ get() {
3189
+ return mockWin[propName];
3190
+ },
3191
+ set(val) {
3192
+ mockWin[propName] = val;
3193
+ },
3194
+ configurable: true,
3195
+ enumerable: true,
3196
+ });
3197
+ }
3198
+ });
3199
+ }
3200
+ function addGlobalsToWindowPrototype(mockWinPrototype) {
3201
+ GLOBAL_CONSTRUCTORS.forEach(([cstrName, Cstr]) => {
3202
+ Object.defineProperty(mockWinPrototype, cstrName, {
3203
+ get() {
3204
+ return this['__' + cstrName] || Cstr;
3205
+ },
3206
+ set(cstr) {
3207
+ this['__' + cstrName] = cstr;
3208
+ },
3209
+ configurable: true,
3210
+ enumerable: true,
3211
+ });
3212
+ });
3213
+ }
3214
+ const WINDOW_FUNCTIONS = [
3215
+ 'addEventListener',
3216
+ 'alert',
3217
+ 'blur',
3218
+ 'cancelAnimationFrame',
3219
+ 'cancelIdleCallback',
3220
+ 'clearInterval',
3221
+ 'clearTimeout',
3222
+ 'close',
3223
+ 'confirm',
3224
+ 'dispatchEvent',
3225
+ 'focus',
3226
+ 'getComputedStyle',
3227
+ 'matchMedia',
3228
+ 'open',
3229
+ 'prompt',
3230
+ 'removeEventListener',
3231
+ 'requestAnimationFrame',
3232
+ 'requestIdleCallback',
3233
+ 'URL',
3234
+ ];
3235
+ const WINDOW_PROPS = [
3236
+ 'customElements',
3237
+ 'devicePixelRatio',
3238
+ 'document',
3239
+ 'history',
3240
+ 'innerHeight',
3241
+ 'innerWidth',
3242
+ 'localStorage',
3243
+ 'location',
3244
+ 'navigator',
3245
+ 'pageXOffset',
3246
+ 'pageYOffset',
3247
+ 'performance',
3248
+ 'screenLeft',
3249
+ 'screenTop',
3250
+ 'screenX',
3251
+ 'screenY',
3252
+ 'scrollX',
3253
+ 'scrollY',
3254
+ 'sessionStorage',
3255
+ 'CSS',
3256
+ 'CustomEvent',
3257
+ 'Event',
3258
+ 'Element',
3259
+ 'HTMLElement',
3260
+ 'Node',
3261
+ 'NodeList',
3262
+ 'KeyboardEvent',
3263
+ 'MouseEvent',
3264
+ ];
3265
+ const GLOBAL_CONSTRUCTORS = [
3266
+ ['CustomEvent', MockCustomEvent],
3267
+ ['Event', MockEvent],
3268
+ ['Headers', MockHeaders],
3269
+ ['KeyboardEvent', MockKeyboardEvent],
3270
+ ['MouseEvent', MockMouseEvent],
3271
+ ['Request', MockRequest],
3272
+ ['Response', MockResponse],
3273
+ ['HTMLAnchorElement', MockAnchorElement],
3274
+ ['HTMLBaseElement', MockBaseElement],
3275
+ ['HTMLButtonElement', MockButtonElement],
3276
+ ['HTMLCanvasElement', MockCanvasElement],
3277
+ ['HTMLFormElement', MockFormElement],
3278
+ ['HTMLImageElement', MockImageElement],
3279
+ ['HTMLInputElement', MockInputElement],
3280
+ ['HTMLLinkElement', MockLinkElement],
3281
+ ['HTMLMetaElement', MockMetaElement],
3282
+ ['HTMLScriptElement', MockScriptElement],
3283
+ ['HTMLStyleElement', MockStyleElement],
3284
+ ['HTMLTemplateElement', MockTemplateElement],
3285
+ ['HTMLTitleElement', MockTitleElement],
3286
+ ];
3287
+
3288
+ const consoleNoop = () => {
3289
+ /**/
3290
+ };
3291
+ function createConsole() {
3292
+ return {
3293
+ debug: consoleNoop,
3294
+ error: consoleNoop,
3295
+ info: consoleNoop,
3296
+ log: consoleNoop,
3297
+ warn: consoleNoop,
3298
+ dir: consoleNoop,
3299
+ dirxml: consoleNoop,
3300
+ table: consoleNoop,
3301
+ trace: consoleNoop,
3302
+ group: consoleNoop,
3303
+ groupCollapsed: consoleNoop,
3304
+ groupEnd: consoleNoop,
3305
+ clear: consoleNoop,
3306
+ count: consoleNoop,
3307
+ countReset: consoleNoop,
3308
+ assert: consoleNoop,
3309
+ profile: consoleNoop,
3310
+ profileEnd: consoleNoop,
3311
+ time: consoleNoop,
3312
+ timeLog: consoleNoop,
3313
+ timeEnd: consoleNoop,
3314
+ timeStamp: consoleNoop,
3315
+ context: consoleNoop,
3316
+ memory: consoleNoop,
3317
+ };
3318
+ }
3319
+
3320
+ class MockHistory {
3321
+ constructor() {
3322
+ this.items = [];
3323
+ }
3324
+ get length() {
3325
+ return this.items.length;
3326
+ }
3327
+ back() {
3328
+ this.go(-1);
3329
+ }
3330
+ forward() {
3331
+ this.go(1);
3332
+ }
3333
+ go(_value) {
3334
+ //
3335
+ }
3336
+ pushState(_state, _title, _url) {
3337
+ //
3338
+ }
3339
+ replaceState(_state, _title, _url) {
3340
+ //
3341
+ }
3342
+ }
3343
+
3344
+ class MockIntersectionObserver {
3345
+ constructor() {
3346
+ /**/
3347
+ }
3348
+ disconnect() {
3349
+ /**/
3350
+ }
3351
+ observe() {
3352
+ /**/
3353
+ }
3354
+ takeRecords() {
3355
+ return [];
3356
+ }
3357
+ unobserve() {
3358
+ /**/
3359
+ }
3360
+ }
3361
+
3362
+ class MockLocation {
3363
+ constructor() {
3364
+ this.ancestorOrigins = null;
3365
+ this.protocol = '';
3366
+ this.host = '';
3367
+ this.hostname = '';
3368
+ this.port = '';
3369
+ this.pathname = '';
3370
+ this.search = '';
3371
+ this.hash = '';
3372
+ this.username = '';
3373
+ this.password = '';
3374
+ this.origin = '';
3375
+ this._href = '';
3376
+ }
3377
+ get href() {
3378
+ return this._href;
3379
+ }
3380
+ set href(value) {
3381
+ const url = new URL(value, 'http://mockdoc-rindojs.web.app');
3382
+ this._href = url.href;
3383
+ this.protocol = url.protocol;
3384
+ this.host = url.host;
3385
+ this.hostname = url.hostname;
3386
+ this.port = url.port;
3387
+ this.pathname = url.pathname;
3388
+ this.search = url.search;
3389
+ this.hash = url.hash;
3390
+ this.username = url.username;
3391
+ this.password = url.password;
3392
+ this.origin = url.origin;
3393
+ }
3394
+ assign(_url) {
3395
+ //
3396
+ }
3397
+ reload(_forcedReload) {
3398
+ //
3399
+ }
3400
+ replace(_url) {
3401
+ //
3402
+ }
3403
+ toString() {
3404
+ return this.href;
3405
+ }
3406
+ }
3407
+
3408
+ class MockNavigator {
3409
+ constructor() {
3410
+ this.appCodeName = 'MockNavigator';
3411
+ this.appName = 'MockNavigator';
3412
+ this.appVersion = 'MockNavigator';
3413
+ this.platform = 'MockNavigator';
3414
+ this.userAgent = 'MockNavigator';
3415
+ }
3416
+ }
3417
+
3418
+ /**
3419
+ * https://developer.mozilla.org/en-US/docs/Web/API/Performance
3420
+ */
3421
+ class MockPerformance {
3422
+ constructor() {
3423
+ this.timeOrigin = Date.now();
3424
+ }
3425
+ addEventListener() {
3426
+ //
3427
+ }
3428
+ clearMarks() {
3429
+ //
3430
+ }
3431
+ clearMeasures() {
3432
+ //
3433
+ }
3434
+ clearResourceTimings() {
3435
+ //
3436
+ }
3437
+ dispatchEvent() {
3438
+ return true;
3439
+ }
3440
+ getEntries() {
3441
+ return [];
3442
+ }
3443
+ getEntriesByName() {
3444
+ return [];
3445
+ }
3446
+ getEntriesByType() {
3447
+ return [];
3448
+ }
3449
+ mark() {
3450
+ //
3451
+ }
3452
+ measure() {
3453
+ //
3454
+ }
3455
+ get navigation() {
3456
+ return {};
3457
+ }
3458
+ now() {
3459
+ return Date.now() - this.timeOrigin;
3460
+ }
3461
+ get onresourcetimingbufferfull() {
3462
+ return null;
3463
+ }
3464
+ removeEventListener() {
3465
+ //
3466
+ }
3467
+ setResourceTimingBufferSize() {
3468
+ //
3469
+ }
3470
+ get timing() {
3471
+ return {};
3472
+ }
3473
+ toJSON() {
3474
+ //
3475
+ }
3476
+ }
3477
+ function resetPerformance(perf) {
3478
+ if (perf != null) {
3479
+ try {
3480
+ perf.timeOrigin = Date.now();
3481
+ }
3482
+ catch (e) { }
3483
+ }
3484
+ }
3485
+
3486
+ class MockStorage {
3487
+ constructor() {
3488
+ this.items = new Map();
3489
+ }
3490
+ key(_value) {
3491
+ //
3492
+ }
3493
+ getItem(key) {
3494
+ key = String(key);
3495
+ if (this.items.has(key)) {
3496
+ return this.items.get(key);
3497
+ }
3498
+ return null;
3499
+ }
3500
+ setItem(key, value) {
3501
+ if (value == null) {
3502
+ value = 'null';
3503
+ }
3504
+ this.items.set(String(key), String(value));
3505
+ }
3506
+ removeItem(key) {
3507
+ this.items.delete(String(key));
3508
+ }
3509
+ clear() {
3510
+ this.items.clear();
3511
+ }
3512
+ }
3513
+
3514
+ const nativeClearInterval = clearInterval;
3515
+ const nativeClearTimeout = clearTimeout;
3516
+ const nativeSetInterval = setInterval;
3517
+ const nativeSetTimeout = setTimeout;
3518
+ const nativeURL = URL;
3519
+ class MockWindow {
3520
+ constructor(html = null) {
3521
+ if (html !== false) {
3522
+ this.document = new MockDocument(html, this);
3523
+ }
3524
+ else {
3525
+ this.document = null;
3526
+ }
3527
+ this.performance = new MockPerformance();
3528
+ this.customElements = new MockCustomElementRegistry(this);
3529
+ this.console = createConsole();
3530
+ resetWindowDefaults(this);
3531
+ resetWindowDimensions(this);
3532
+ }
3533
+ addEventListener(type, handler) {
3534
+ addEventListener(this, type, handler);
3535
+ }
3536
+ alert(msg) {
3537
+ if (this.console) {
3538
+ this.console.debug(msg);
3539
+ }
3540
+ else {
3541
+ console.debug(msg);
3542
+ }
3543
+ }
3544
+ blur() {
3545
+ /**/
3546
+ }
3547
+ cancelAnimationFrame(id) {
3548
+ this.__clearTimeout(id);
3549
+ }
3550
+ cancelIdleCallback(id) {
3551
+ this.__clearTimeout(id);
3552
+ }
3553
+ get CharacterData() {
3554
+ if (this.__charDataCstr == null) {
3555
+ const ownerDocument = this.document;
3556
+ this.__charDataCstr = class extends MockNode {
3557
+ constructor() {
3558
+ super(ownerDocument, 0, 'test', '');
3559
+ throw new Error('Illegal constructor: cannot construct CharacterData');
3560
+ }
3561
+ };
3562
+ }
3563
+ return this.__charDataCstr;
3564
+ }
3565
+ set CharacterData(charDataCstr) {
3566
+ this.__charDataCstr = charDataCstr;
3567
+ }
3568
+ clearInterval(id) {
3569
+ this.__clearInterval(id);
3570
+ }
3571
+ clearTimeout(id) {
3572
+ this.__clearTimeout(id);
3573
+ }
3574
+ close() {
3575
+ resetWindow(this);
3576
+ }
3577
+ confirm() {
3578
+ return false;
3579
+ }
3580
+ get CSS() {
3581
+ return {
3582
+ supports: () => true,
3583
+ };
3584
+ }
3585
+ get Document() {
3586
+ if (this.__docCstr == null) {
3587
+ const win = this;
3588
+ this.__docCstr = class extends MockDocument {
3589
+ constructor() {
3590
+ super(false, win);
3591
+ throw new Error('Illegal constructor: cannot construct Document');
3592
+ }
3593
+ };
3594
+ }
3595
+ return this.__docCstr;
3596
+ }
3597
+ set Document(docCstr) {
3598
+ this.__docCstr = docCstr;
3599
+ }
3600
+ get DocumentFragment() {
3601
+ if (this.__docFragCstr == null) {
3602
+ const ownerDocument = this.document;
3603
+ this.__docFragCstr = class extends MockDocumentFragment {
3604
+ constructor() {
3605
+ super(ownerDocument);
3606
+ throw new Error('Illegal constructor: cannot construct DocumentFragment');
3607
+ }
3608
+ };
3609
+ }
3610
+ return this.__docFragCstr;
3611
+ }
3612
+ set DocumentFragment(docFragCstr) {
3613
+ this.__docFragCstr = docFragCstr;
3614
+ }
3615
+ get DocumentType() {
3616
+ if (this.__docTypeCstr == null) {
3617
+ const ownerDocument = this.document;
3618
+ this.__docTypeCstr = class extends MockNode {
3619
+ constructor() {
3620
+ super(ownerDocument, 0, 'test', '');
3621
+ throw new Error('Illegal constructor: cannot construct DocumentType');
3622
+ }
3623
+ };
3624
+ }
3625
+ return this.__docTypeCstr;
3626
+ }
3627
+ set DocumentType(docTypeCstr) {
3628
+ this.__docTypeCstr = docTypeCstr;
3629
+ }
3630
+ get DOMTokenList() {
3631
+ if (this.__domTokenListCstr == null) {
3632
+ this.__domTokenListCstr = class MockDOMTokenList {
3633
+ };
3634
+ }
3635
+ return this.__domTokenListCstr;
3636
+ }
3637
+ set DOMTokenList(domTokenListCstr) {
3638
+ this.__domTokenListCstr = domTokenListCstr;
3639
+ }
3640
+ dispatchEvent(ev) {
3641
+ return dispatchEvent(this, ev);
3642
+ }
3643
+ get Element() {
3644
+ if (this.__elementCstr == null) {
3645
+ const ownerDocument = this.document;
3646
+ this.__elementCstr = class extends MockElement {
3647
+ constructor() {
3648
+ super(ownerDocument, '');
3649
+ throw new Error('Illegal constructor: cannot construct Element');
3650
+ }
3651
+ };
3652
+ }
3653
+ return this.__elementCstr;
3654
+ }
3655
+ fetch(input, init) {
3656
+ if (typeof fetch === 'function') {
3657
+ return fetch(input, init);
3658
+ }
3659
+ throw new Error(`fetch() not implemented`);
3660
+ }
3661
+ focus() {
3662
+ /**/
3663
+ }
3664
+ getComputedStyle(_) {
3665
+ return {
3666
+ cssText: '',
3667
+ length: 0,
3668
+ parentRule: null,
3669
+ getPropertyPriority() {
3670
+ return null;
3671
+ },
3672
+ getPropertyValue() {
3673
+ return '';
3674
+ },
3675
+ item() {
3676
+ return null;
3677
+ },
3678
+ removeProperty() {
3679
+ return null;
3680
+ },
3681
+ setProperty() {
3682
+ return null;
3683
+ },
3684
+ };
3685
+ }
3686
+ get globalThis() {
3687
+ return this;
3688
+ }
3689
+ get history() {
3690
+ if (this.__history == null) {
3691
+ this.__history = new MockHistory();
3692
+ }
3693
+ return this.__history;
3694
+ }
3695
+ set history(hsty) {
3696
+ this.__history = hsty;
3697
+ }
3698
+ get JSON() {
3699
+ return JSON;
3700
+ }
3701
+ get HTMLElement() {
3702
+ if (this.__htmlElementCstr == null) {
3703
+ const ownerDocument = this.document;
3704
+ this.__htmlElementCstr = class extends MockHTMLElement {
3705
+ constructor() {
3706
+ super(ownerDocument, '');
3707
+ const observedAttributes = this.constructor.observedAttributes;
3708
+ if (Array.isArray(observedAttributes) && typeof this.attributeChangedCallback === 'function') {
3709
+ observedAttributes.forEach(attrName => {
3710
+ const attrValue = this.getAttribute(attrName);
3711
+ if (attrValue != null) {
3712
+ this.attributeChangedCallback(attrName, null, attrValue);
3713
+ }
3714
+ });
3715
+ }
3716
+ }
3717
+ };
3718
+ }
3719
+ return this.__htmlElementCstr;
3720
+ }
3721
+ set HTMLElement(htmlElementCstr) {
3722
+ this.__htmlElementCstr = htmlElementCstr;
3723
+ }
3724
+ get IntersectionObserver() {
3725
+ return MockIntersectionObserver;
3726
+ }
3727
+ get localStorage() {
3728
+ if (this.__localStorage == null) {
3729
+ this.__localStorage = new MockStorage();
3730
+ }
3731
+ return this.__localStorage;
3732
+ }
3733
+ set localStorage(locStorage) {
3734
+ this.__localStorage = locStorage;
3735
+ }
3736
+ get location() {
3737
+ if (this.__location == null) {
3738
+ this.__location = new MockLocation();
3739
+ }
3740
+ return this.__location;
3741
+ }
3742
+ set location(val) {
3743
+ if (typeof val === 'string') {
3744
+ if (this.__location == null) {
3745
+ this.__location = new MockLocation();
3746
+ }
3747
+ this.__location.href = val;
3748
+ }
3749
+ else {
3750
+ this.__location = val;
3751
+ }
3752
+ }
3753
+ matchMedia() {
3754
+ return {
3755
+ matches: false,
3756
+ };
3757
+ }
3758
+ get Node() {
3759
+ if (this.__nodeCstr == null) {
3760
+ const ownerDocument = this.document;
3761
+ this.__nodeCstr = class extends MockNode {
3762
+ constructor() {
3763
+ super(ownerDocument, 0, 'test', '');
3764
+ throw new Error('Illegal constructor: cannot construct Node');
3765
+ }
3766
+ };
3767
+ }
3768
+ return this.__nodeCstr;
3769
+ }
3770
+ get NodeList() {
3771
+ if (this.__nodeListCstr == null) {
3772
+ const ownerDocument = this.document;
3773
+ this.__nodeListCstr = class extends MockNodeList {
3774
+ constructor() {
3775
+ super(ownerDocument, [], 0);
3776
+ throw new Error('Illegal constructor: cannot construct NodeList');
3777
+ }
3778
+ };
3779
+ }
3780
+ return this.__nodeListCstr;
3781
+ }
3782
+ get navigator() {
3783
+ if (this.__navigator == null) {
3784
+ this.__navigator = new MockNavigator();
3785
+ }
3786
+ return this.__navigator;
3787
+ }
3788
+ set navigator(nav) {
3789
+ this.__navigator = nav;
3790
+ }
3791
+ get parent() {
3792
+ return null;
3793
+ }
3794
+ prompt() {
3795
+ return '';
3796
+ }
3797
+ open() {
3798
+ return null;
3799
+ }
3800
+ get origin() {
3801
+ return this.location.origin;
3802
+ }
3803
+ removeEventListener(type, handler) {
3804
+ removeEventListener(this, type, handler);
3805
+ }
3806
+ requestAnimationFrame(callback) {
3807
+ return this.setTimeout(() => {
3808
+ callback(Date.now());
3809
+ }, 0);
3810
+ }
3811
+ requestIdleCallback(callback) {
3812
+ return this.setTimeout(() => {
3813
+ callback({
3814
+ didTimeout: false,
3815
+ timeRemaining: () => 0,
3816
+ });
3817
+ }, 0);
3818
+ }
3819
+ scroll(_x, _y) {
3820
+ /**/
3821
+ }
3822
+ scrollBy(_x, _y) {
3823
+ /**/
3824
+ }
3825
+ scrollTo(_x, _y) {
3826
+ /**/
3827
+ }
3828
+ get self() {
3829
+ return this;
3830
+ }
3831
+ get sessionStorage() {
3832
+ if (this.__sessionStorage == null) {
3833
+ this.__sessionStorage = new MockStorage();
3834
+ }
3835
+ return this.__sessionStorage;
3836
+ }
3837
+ set sessionStorage(locStorage) {
3838
+ this.__sessionStorage = locStorage;
3839
+ }
3840
+ setInterval(callback, ms, ...args) {
3841
+ if (this.__timeouts == null) {
3842
+ this.__timeouts = new Set();
3843
+ }
3844
+ ms = Math.min(ms, this.__maxTimeout);
3845
+ if (this.__allowInterval) {
3846
+ const intervalId = this.__setInterval(() => {
3847
+ if (this.__timeouts) {
3848
+ this.__timeouts.delete(intervalId);
3849
+ try {
3850
+ callback(...args);
3851
+ }
3852
+ catch (e) {
3853
+ if (this.console) {
3854
+ this.console.error(e);
3855
+ }
3856
+ else {
3857
+ console.error(e);
3858
+ }
3859
+ }
3860
+ }
3861
+ }, ms);
3862
+ if (this.__timeouts) {
3863
+ this.__timeouts.add(intervalId);
3864
+ }
3865
+ return intervalId;
3866
+ }
3867
+ const timeoutId = this.__setTimeout(() => {
3868
+ if (this.__timeouts) {
3869
+ this.__timeouts.delete(timeoutId);
3870
+ try {
3871
+ callback(...args);
3872
+ }
3873
+ catch (e) {
3874
+ if (this.console) {
3875
+ this.console.error(e);
3876
+ }
3877
+ else {
3878
+ console.error(e);
3879
+ }
3880
+ }
3881
+ }
3882
+ }, ms);
3883
+ if (this.__timeouts) {
3884
+ this.__timeouts.add(timeoutId);
3885
+ }
3886
+ return timeoutId;
3887
+ }
3888
+ setTimeout(callback, ms, ...args) {
3889
+ if (this.__timeouts == null) {
3890
+ this.__timeouts = new Set();
3891
+ }
3892
+ ms = Math.min(ms, this.__maxTimeout);
3893
+ const timeoutId = this.__setTimeout(() => {
3894
+ if (this.__timeouts) {
3895
+ this.__timeouts.delete(timeoutId);
3896
+ try {
3897
+ callback(...args);
3898
+ }
3899
+ catch (e) {
3900
+ if (this.console) {
3901
+ this.console.error(e);
3902
+ }
3903
+ else {
3904
+ console.error(e);
3905
+ }
3906
+ }
3907
+ }
3908
+ }, ms);
3909
+ if (this.__timeouts) {
3910
+ this.__timeouts.add(timeoutId);
3911
+ }
3912
+ return timeoutId;
3913
+ }
3914
+ get top() {
3915
+ return this;
3916
+ }
3917
+ get window() {
3918
+ return this;
3919
+ }
3920
+ onanimationstart() {
3921
+ /**/
3922
+ }
3923
+ onanimationend() {
3924
+ /**/
3925
+ }
3926
+ onanimationiteration() {
3927
+ /**/
3928
+ }
3929
+ onabort() {
3930
+ /**/
3931
+ }
3932
+ onauxclick() {
3933
+ /**/
3934
+ }
3935
+ onbeforecopy() {
3936
+ /**/
3937
+ }
3938
+ onbeforecut() {
3939
+ /**/
3940
+ }
3941
+ onbeforepaste() {
3942
+ /**/
3943
+ }
3944
+ onblur() {
3945
+ /**/
3946
+ }
3947
+ oncancel() {
3948
+ /**/
3949
+ }
3950
+ oncanplay() {
3951
+ /**/
3952
+ }
3953
+ oncanplaythrough() {
3954
+ /**/
3955
+ }
3956
+ onchange() {
3957
+ /**/
3958
+ }
3959
+ onclick() {
3960
+ /**/
3961
+ }
3962
+ onclose() {
3963
+ /**/
3964
+ }
3965
+ oncontextmenu() {
3966
+ /**/
3967
+ }
3968
+ oncopy() {
3969
+ /**/
3970
+ }
3971
+ oncuechange() {
3972
+ /**/
3973
+ }
3974
+ oncut() {
3975
+ /**/
3976
+ }
3977
+ ondblclick() {
3978
+ /**/
3979
+ }
3980
+ ondrag() {
3981
+ /**/
3982
+ }
3983
+ ondragend() {
3984
+ /**/
3985
+ }
3986
+ ondragenter() {
3987
+ /**/
3988
+ }
3989
+ ondragleave() {
3990
+ /**/
3991
+ }
3992
+ ondragover() {
3993
+ /**/
3994
+ }
3995
+ ondragstart() {
3996
+ /**/
3997
+ }
3998
+ ondrop() {
3999
+ /**/
4000
+ }
4001
+ ondurationchange() {
4002
+ /**/
4003
+ }
4004
+ onemptied() {
4005
+ /**/
4006
+ }
4007
+ onended() {
4008
+ /**/
4009
+ }
4010
+ onerror() {
4011
+ /**/
4012
+ }
4013
+ onfocus() {
4014
+ /**/
4015
+ }
4016
+ onfocusin() {
4017
+ /**/
4018
+ }
4019
+ onfocusout() {
4020
+ /**/
4021
+ }
4022
+ onformdata() {
4023
+ /**/
4024
+ }
4025
+ onfullscreenchange() {
4026
+ /**/
4027
+ }
4028
+ onfullscreenerror() {
4029
+ /**/
4030
+ }
4031
+ ongotpointercapture() {
4032
+ /**/
4033
+ }
4034
+ oninput() {
4035
+ /**/
4036
+ }
4037
+ oninvalid() {
4038
+ /**/
4039
+ }
4040
+ onkeydown() {
4041
+ /**/
4042
+ }
4043
+ onkeypress() {
4044
+ /**/
4045
+ }
4046
+ onkeyup() {
4047
+ /**/
4048
+ }
4049
+ onload() {
4050
+ /**/
4051
+ }
4052
+ onloadeddata() {
4053
+ /**/
4054
+ }
4055
+ onloadedmetadata() {
4056
+ /**/
4057
+ }
4058
+ onloadstart() {
4059
+ /**/
4060
+ }
4061
+ onlostpointercapture() {
4062
+ /**/
4063
+ }
4064
+ onmousedown() {
4065
+ /**/
4066
+ }
4067
+ onmouseenter() {
4068
+ /**/
4069
+ }
4070
+ onmouseleave() {
4071
+ /**/
4072
+ }
4073
+ onmousemove() {
4074
+ /**/
4075
+ }
4076
+ onmouseout() {
4077
+ /**/
4078
+ }
4079
+ onmouseover() {
4080
+ /**/
4081
+ }
4082
+ onmouseup() {
4083
+ /**/
4084
+ }
4085
+ onmousewheel() {
4086
+ /**/
4087
+ }
4088
+ onpaste() {
4089
+ /**/
4090
+ }
4091
+ onpause() {
4092
+ /**/
4093
+ }
4094
+ onplay() {
4095
+ /**/
4096
+ }
4097
+ onplaying() {
4098
+ /**/
4099
+ }
4100
+ onpointercancel() {
4101
+ /**/
4102
+ }
4103
+ onpointerdown() {
4104
+ /**/
4105
+ }
4106
+ onpointerenter() {
4107
+ /**/
4108
+ }
4109
+ onpointerleave() {
4110
+ /**/
4111
+ }
4112
+ onpointermove() {
4113
+ /**/
4114
+ }
4115
+ onpointerout() {
4116
+ /**/
4117
+ }
4118
+ onpointerover() {
4119
+ /**/
4120
+ }
4121
+ onpointerup() {
4122
+ /**/
4123
+ }
4124
+ onprogress() {
4125
+ /**/
4126
+ }
4127
+ onratechange() {
4128
+ /**/
4129
+ }
4130
+ onreset() {
4131
+ /**/
4132
+ }
4133
+ onresize() {
4134
+ /**/
4135
+ }
4136
+ onscroll() {
4137
+ /**/
4138
+ }
4139
+ onsearch() {
4140
+ /**/
4141
+ }
4142
+ onseeked() {
4143
+ /**/
4144
+ }
4145
+ onseeking() {
4146
+ /**/
4147
+ }
4148
+ onselect() {
4149
+ /**/
4150
+ }
4151
+ onselectstart() {
4152
+ /**/
4153
+ }
4154
+ onstalled() {
4155
+ /**/
4156
+ }
4157
+ onsubmit() {
4158
+ /**/
4159
+ }
4160
+ onsuspend() {
4161
+ /**/
4162
+ }
4163
+ ontimeupdate() {
4164
+ /**/
4165
+ }
4166
+ ontoggle() {
4167
+ /**/
4168
+ }
4169
+ onvolumechange() {
4170
+ /**/
4171
+ }
4172
+ onwaiting() {
4173
+ /**/
4174
+ }
4175
+ onwebkitfullscreenchange() {
4176
+ /**/
4177
+ }
4178
+ onwebkitfullscreenerror() {
4179
+ /**/
4180
+ }
4181
+ onwheel() {
4182
+ /**/
4183
+ }
4184
+ }
4185
+ addGlobalsToWindowPrototype(MockWindow.prototype);
4186
+ function resetWindowDefaults(win) {
4187
+ win.__clearInterval = nativeClearInterval;
4188
+ win.__clearTimeout = nativeClearTimeout;
4189
+ win.__setInterval = nativeSetInterval;
4190
+ win.__setTimeout = nativeSetTimeout;
4191
+ win.__maxTimeout = 30000;
4192
+ win.__allowInterval = true;
4193
+ win.URL = nativeURL;
4194
+ }
4195
+ function cloneWindow(srcWin, opts = {}) {
4196
+ if (srcWin == null) {
4197
+ return null;
4198
+ }
4199
+ const clonedWin = new MockWindow(false);
4200
+ if (!opts.customElementProxy) {
4201
+ srcWin.customElements = null;
4202
+ }
4203
+ if (srcWin.document != null) {
4204
+ const clonedDoc = new MockDocument(false, clonedWin);
4205
+ clonedWin.document = clonedDoc;
4206
+ clonedDoc.documentElement = srcWin.document.documentElement.cloneNode(true);
4207
+ }
4208
+ else {
4209
+ clonedWin.document = new MockDocument(null, clonedWin);
4210
+ }
4211
+ return clonedWin;
4212
+ }
4213
+ function cloneDocument(srcDoc) {
4214
+ if (srcDoc == null) {
4215
+ return null;
4216
+ }
4217
+ const dstWin = cloneWindow(srcDoc.defaultView);
4218
+ return dstWin.document;
4219
+ }
4220
+ /**
4221
+ * Constrain setTimeout() to 1ms, but still async. Also
4222
+ * only allow setInterval() to fire once, also constrained to 1ms.
4223
+ */
4224
+ function constrainTimeouts(win) {
4225
+ win.__allowInterval = false;
4226
+ win.__maxTimeout = 0;
4227
+ }
4228
+ function resetWindow(win) {
4229
+ if (win != null) {
4230
+ if (win.__timeouts) {
4231
+ win.__timeouts.forEach(timeoutId => {
4232
+ nativeClearInterval(timeoutId);
4233
+ nativeClearTimeout(timeoutId);
4234
+ });
4235
+ win.__timeouts.clear();
4236
+ }
4237
+ if (win.customElements && win.customElements.clear) {
4238
+ win.customElements.clear();
4239
+ }
4240
+ resetDocument(win.document);
4241
+ resetPerformance(win.performance);
4242
+ for (const key in win) {
4243
+ if (win.hasOwnProperty(key) && key !== 'document' && key !== 'performance' && key !== 'customElements') {
4244
+ delete win[key];
4245
+ }
4246
+ }
4247
+ resetWindowDefaults(win);
4248
+ resetWindowDimensions(win);
4249
+ resetEventListeners(win);
4250
+ if (win.document != null) {
4251
+ try {
4252
+ win.document.defaultView = win;
4253
+ }
4254
+ catch (e) { }
4255
+ }
4256
+ // ensure we don't hold onto nodeFetch values
4257
+ win.fetch = null;
4258
+ win.Headers = null;
4259
+ win.Request = null;
4260
+ win.Response = null;
4261
+ win.FetchError = null;
4262
+ }
4263
+ }
4264
+ function resetWindowDimensions(win) {
4265
+ try {
4266
+ win.devicePixelRatio = 1;
4267
+ win.innerHeight = 768;
4268
+ win.innerWidth = 1366;
4269
+ win.pageXOffset = 0;
4270
+ win.pageYOffset = 0;
4271
+ win.screenLeft = 0;
4272
+ win.screenTop = 0;
4273
+ win.screenX = 0;
4274
+ win.screenY = 0;
4275
+ win.scrollX = 0;
4276
+ win.scrollY = 0;
4277
+ win.screen = {
4278
+ availHeight: win.innerHeight,
4279
+ availLeft: 0,
4280
+ availTop: 0,
4281
+ availWidth: win.innerWidth,
4282
+ colorDepth: 24,
4283
+ height: win.innerHeight,
4284
+ keepAwake: false,
4285
+ orientation: {
4286
+ angle: 0,
4287
+ type: 'portrait-primary',
4288
+ },
4289
+ pixelDepth: 24,
4290
+ width: win.innerWidth,
4291
+ };
4292
+ }
4293
+ catch (e) { }
4294
+ }
4295
+
4296
+ class MockDocument extends MockHTMLElement {
4297
+ constructor(html = null, win = null) {
4298
+ super(null, null);
4299
+ this.nodeName = "#document" /* DOCUMENT_NODE */;
4300
+ this.nodeType = 9 /* DOCUMENT_NODE */;
4301
+ this.defaultView = win;
4302
+ this.cookie = '';
4303
+ this.referrer = '';
4304
+ this.appendChild(this.createDocumentTypeNode());
4305
+ if (typeof html === 'string') {
4306
+ const parsedDoc = parseDocumentUtil(this, html);
4307
+ const documentElement = parsedDoc.children.find(elm => elm.nodeName === 'HTML');
4308
+ if (documentElement != null) {
4309
+ this.appendChild(documentElement);
4310
+ setOwnerDocument(documentElement, this);
4311
+ }
4312
+ }
4313
+ else if (html !== false) {
4314
+ const documentElement = new MockHTMLElement(this, 'html');
4315
+ this.appendChild(documentElement);
4316
+ documentElement.appendChild(new MockHTMLElement(this, 'head'));
4317
+ documentElement.appendChild(new MockHTMLElement(this, 'body'));
4318
+ }
4319
+ }
4320
+ get dir() {
4321
+ return this.documentElement.dir;
4322
+ }
4323
+ set dir(value) {
4324
+ this.documentElement.dir = value;
4325
+ }
4326
+ get location() {
4327
+ if (this.defaultView != null) {
4328
+ return this.defaultView.location;
4329
+ }
4330
+ return null;
4331
+ }
4332
+ set location(val) {
4333
+ if (this.defaultView != null) {
4334
+ this.defaultView.location = val;
4335
+ }
4336
+ }
4337
+ get baseURI() {
4338
+ const baseNode = this.head.childNodes.find(node => node.nodeName === 'BASE');
4339
+ if (baseNode) {
4340
+ return baseNode.href;
4341
+ }
4342
+ return this.URL;
4343
+ }
4344
+ get URL() {
4345
+ return this.location.href;
4346
+ }
4347
+ get styleSheets() {
4348
+ return this.querySelectorAll('style');
4349
+ }
4350
+ get scripts() {
4351
+ return this.querySelectorAll('script');
4352
+ }
4353
+ get forms() {
4354
+ return this.querySelectorAll('form');
4355
+ }
4356
+ get images() {
4357
+ return this.querySelectorAll('img');
4358
+ }
4359
+ get scrollingElement() {
4360
+ return this.documentElement;
4361
+ }
4362
+ get documentElement() {
4363
+ for (let i = this.childNodes.length - 1; i >= 0; i--) {
4364
+ if (this.childNodes[i].nodeName === 'HTML') {
4365
+ return this.childNodes[i];
4366
+ }
4367
+ }
4368
+ const documentElement = new MockHTMLElement(this, 'html');
4369
+ this.appendChild(documentElement);
4370
+ return documentElement;
4371
+ }
4372
+ set documentElement(documentElement) {
4373
+ for (let i = this.childNodes.length - 1; i >= 0; i--) {
4374
+ if (this.childNodes[i].nodeType !== 10 /* DOCUMENT_TYPE_NODE */) {
4375
+ this.childNodes[i].remove();
4376
+ }
4377
+ }
4378
+ if (documentElement != null) {
4379
+ this.appendChild(documentElement);
4380
+ setOwnerDocument(documentElement, this);
4381
+ }
4382
+ }
4383
+ get head() {
4384
+ const documentElement = this.documentElement;
4385
+ for (let i = 0; i < documentElement.childNodes.length; i++) {
4386
+ if (documentElement.childNodes[i].nodeName === 'HEAD') {
4387
+ return documentElement.childNodes[i];
4388
+ }
4389
+ }
4390
+ const head = new MockHTMLElement(this, 'head');
4391
+ documentElement.insertBefore(head, documentElement.firstChild);
4392
+ return head;
4393
+ }
4394
+ set head(head) {
4395
+ const documentElement = this.documentElement;
4396
+ for (let i = documentElement.childNodes.length - 1; i >= 0; i--) {
4397
+ if (documentElement.childNodes[i].nodeName === 'HEAD') {
4398
+ documentElement.childNodes[i].remove();
4399
+ }
4400
+ }
4401
+ if (head != null) {
4402
+ documentElement.insertBefore(head, documentElement.firstChild);
4403
+ setOwnerDocument(head, this);
4404
+ }
4405
+ }
4406
+ get body() {
4407
+ const documentElement = this.documentElement;
4408
+ for (let i = documentElement.childNodes.length - 1; i >= 0; i--) {
4409
+ if (documentElement.childNodes[i].nodeName === 'BODY') {
4410
+ return documentElement.childNodes[i];
4411
+ }
4412
+ }
4413
+ const body = new MockHTMLElement(this, 'body');
4414
+ documentElement.appendChild(body);
4415
+ return body;
4416
+ }
4417
+ set body(body) {
4418
+ const documentElement = this.documentElement;
4419
+ for (let i = documentElement.childNodes.length - 1; i >= 0; i--) {
4420
+ if (documentElement.childNodes[i].nodeName === 'BODY') {
4421
+ documentElement.childNodes[i].remove();
4422
+ }
4423
+ }
4424
+ if (body != null) {
4425
+ documentElement.appendChild(body);
4426
+ setOwnerDocument(body, this);
4427
+ }
4428
+ }
4429
+ appendChild(newNode) {
4430
+ newNode.remove();
4431
+ newNode.parentNode = this;
4432
+ this.childNodes.push(newNode);
4433
+ return newNode;
4434
+ }
4435
+ createComment(data) {
4436
+ return new MockComment(this, data);
4437
+ }
4438
+ createAttribute(attrName) {
4439
+ return new MockAttr(attrName.toLowerCase(), '');
4440
+ }
4441
+ createAttributeNS(namespaceURI, attrName) {
4442
+ return new MockAttr(attrName, '', namespaceURI);
4443
+ }
4444
+ createElement(tagName) {
4445
+ if (tagName === "#document" /* DOCUMENT_NODE */) {
4446
+ const doc = new MockDocument(false);
4447
+ doc.nodeName = tagName;
4448
+ doc.parentNode = null;
4449
+ return doc;
4450
+ }
4451
+ return createElement(this, tagName);
4452
+ }
4453
+ createElementNS(namespaceURI, tagName) {
4454
+ const elmNs = createElementNS(this, namespaceURI, tagName);
4455
+ elmNs.namespaceURI = namespaceURI;
4456
+ return elmNs;
4457
+ }
4458
+ createTextNode(text) {
4459
+ return new MockTextNode(this, text);
4460
+ }
4461
+ createDocumentFragment() {
4462
+ return new MockDocumentFragment(this);
4463
+ }
4464
+ createDocumentTypeNode() {
4465
+ return new MockDocumentTypeNode(this);
4466
+ }
4467
+ getElementById(id) {
4468
+ return getElementById(this, id);
4469
+ }
4470
+ getElementsByName(elmName) {
4471
+ return getElementsByName(this, elmName.toLowerCase());
4472
+ }
4473
+ get title() {
4474
+ const title = this.head.childNodes.find(elm => elm.nodeName === 'TITLE');
4475
+ if (title != null && typeof title.textContent === 'string') {
4476
+ return title.textContent.trim();
4477
+ }
4478
+ return '';
4479
+ }
4480
+ set title(value) {
4481
+ const head = this.head;
4482
+ let title = head.childNodes.find(elm => elm.nodeName === 'TITLE');
4483
+ if (title == null) {
4484
+ title = this.createElement('title');
4485
+ head.appendChild(title);
4486
+ }
4487
+ title.textContent = value;
4488
+ }
4489
+ }
4490
+ function createDocument(html = null) {
4491
+ return new MockWindow(html).document;
4492
+ }
4493
+ function createFragment(html) {
4494
+ return parseHtmlToFragment(html, null);
4495
+ }
4496
+ function resetDocument(doc) {
4497
+ if (doc != null) {
4498
+ resetEventListeners(doc);
4499
+ const documentElement = doc.documentElement;
4500
+ if (documentElement != null) {
4501
+ resetElement(documentElement);
4502
+ for (let i = 0, ii = documentElement.childNodes.length; i < ii; i++) {
4503
+ const childNode = documentElement.childNodes[i];
4504
+ resetElement(childNode);
4505
+ childNode.childNodes.length = 0;
4506
+ }
4507
+ }
4508
+ for (const key in doc) {
4509
+ if (doc.hasOwnProperty(key) && !DOC_KEY_KEEPERS.has(key)) {
4510
+ delete doc[key];
4511
+ }
4512
+ }
4513
+ try {
4514
+ doc.nodeName = "#document" /* DOCUMENT_NODE */;
4515
+ }
4516
+ catch (e) { }
4517
+ try {
4518
+ doc.nodeType = 9 /* DOCUMENT_NODE */;
4519
+ }
4520
+ catch (e) { }
4521
+ try {
4522
+ doc.cookie = '';
4523
+ }
4524
+ catch (e) { }
4525
+ try {
4526
+ doc.referrer = '';
4527
+ }
4528
+ catch (e) { }
4529
+ }
4530
+ }
4531
+ const DOC_KEY_KEEPERS = new Set([
4532
+ 'nodeName',
4533
+ 'nodeType',
4534
+ 'nodeValue',
4535
+ 'ownerDocument',
4536
+ 'parentNode',
4537
+ 'childNodes',
4538
+ '_shadowRoot',
4539
+ ]);
4540
+ function getElementById(elm, id) {
4541
+ const children = elm.children;
4542
+ for (let i = 0, ii = children.length; i < ii; i++) {
4543
+ const childElm = children[i];
4544
+ if (childElm.id === id) {
4545
+ return childElm;
4546
+ }
4547
+ const childElmFound = getElementById(childElm, id);
4548
+ if (childElmFound != null) {
4549
+ return childElmFound;
4550
+ }
4551
+ }
4552
+ return null;
4553
+ }
4554
+ function getElementsByName(elm, elmName, foundElms = []) {
4555
+ const children = elm.children;
4556
+ for (let i = 0, ii = children.length; i < ii; i++) {
4557
+ const childElm = children[i];
4558
+ if (childElm.name && childElm.name.toLowerCase() === elmName) {
4559
+ foundElms.push(childElm);
4560
+ }
4561
+ getElementsByName(childElm, elmName, foundElms);
4562
+ }
4563
+ return foundElms;
4564
+ }
4565
+ function setOwnerDocument(elm, ownerDocument) {
4566
+ for (let i = 0, ii = elm.childNodes.length; i < ii; i++) {
4567
+ elm.childNodes[i].ownerDocument = ownerDocument;
4568
+ if (elm.childNodes[i].nodeType === 1 /* ELEMENT_NODE */) {
4569
+ setOwnerDocument(elm.childNodes[i], ownerDocument);
4570
+ }
4571
+ }
4572
+ }
4573
+
4574
+ export { MockAttr, MockAttributeMap, MockComment, MockCustomEvent, MockDocument, MockElement, MockHTMLElement, MockHeaders, MockKeyboardEvent, MockMouseEvent, MockNode, MockRequest, MockResponse, MockTextNode, MockWindow, cloneAttributes, cloneDocument, cloneWindow, constrainTimeouts, createDocument, createFragment, parseHtmlToDocument, parseHtmlToFragment, patchWindow, resetDocument, serializeNodeToHtml, setupGlobal, teardownGlobal };