buninu-browser 0.0.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 (830) hide show
  1. package/AGENTS.md +13 -0
  2. package/Architecture.md +601 -0
  3. package/LICENSE +21 -0
  4. package/LICENSES/Apache-2.0.txt +202 -0
  5. package/LICENSES/BSD-3-Clause-Skia.txt +29 -0
  6. package/LICENSES/Bitstream-Vera.txt +44 -0
  7. package/LICENSES/CC-BY-4.0.txt +396 -0
  8. package/LICENSES/OFL-1.1.txt +91 -0
  9. package/LICENSES/README.md +9 -0
  10. package/LICENSES/acorn.txt +21 -0
  11. package/LICENSES/chromium.txt +27 -0
  12. package/LICENSES/dropflow.txt +19 -0
  13. package/LICENSES/emscripten.txt +102 -0
  14. package/LICENSES/freetype.txt +169 -0
  15. package/LICENSES/happy-dom.txt +22 -0
  16. package/LICENSES/harfbuzz.txt +42 -0
  17. package/LICENSES/icu.txt +512 -0
  18. package/LICENSES/libjpeg-ijg.txt +260 -0
  19. package/LICENSES/libjpeg-turbo.txt +147 -0
  20. package/LICENSES/libpng.txt +134 -0
  21. package/LICENSES/libwebp.txt +30 -0
  22. package/LICENSES/ses-aura.txt +16 -0
  23. package/LICENSES/ses-caja.txt +13 -0
  24. package/LICENSES/ses-corejs.txt +19 -0
  25. package/LICENSES/ses-v8.txt +9 -0
  26. package/LICENSES/ses.txt +201 -0
  27. package/LICENSES/termdom.txt +21 -0
  28. package/LICENSES/wasmpeg.txt +501 -0
  29. package/LICENSES/woff2.txt +19 -0
  30. package/LICENSES/wuffs.txt +211 -0
  31. package/LICENSES/zlib.txt +22 -0
  32. package/Linux +0 -0
  33. package/PORTING.md +825 -0
  34. package/README.md +283 -0
  35. package/THIRD_PARTY_NOTICES.md +224 -0
  36. package/bunfig.toml +2 -0
  37. package/buninu-browser.js +65 -0
  38. package/index.js +149 -0
  39. package/lib/cdp-server.js +1424 -0
  40. package/lib/cdp.js +203 -0
  41. package/lib/happy-dom/entities-adapter.js +51 -0
  42. package/lib/happy-dom/image-size-adapter.js +8 -0
  43. package/lib/happy-dom/mime-type-adapter.js +27 -0
  44. package/lib/happy-dom/parser.js +53 -0
  45. package/lib/happy-dom/websocket-adapter.js +62 -0
  46. package/lib/headless-shell.js +362 -0
  47. package/lib/input/hit-test.js +78 -0
  48. package/lib/layout/scroll-viewport.js +53 -0
  49. package/lib/layout/text-layout.js +2236 -0
  50. package/lib/log.js +85 -0
  51. package/lib/network/cookie-jar.js +178 -0
  52. package/lib/network/network-service.js +268 -0
  53. package/lib/network/resolver.js +97 -0
  54. package/lib/paint/display-list.js +359 -0
  55. package/lib/paint/frame.js +88 -0
  56. package/lib/paint/gradient.js +207 -0
  57. package/lib/render-tree/index.js +263 -0
  58. package/lib/render-tree/svg.js +210 -0
  59. package/lib/renderer/bindings.js +1291 -0
  60. package/lib/renderer/compositor.js +123 -0
  61. package/lib/renderer/flags.js +20 -0
  62. package/lib/renderer/host.js +503 -0
  63. package/lib/renderer/main.js +234 -0
  64. package/lib/renderer/module-transform.js +399 -0
  65. package/lib/renderer/page-realm.js +1471 -0
  66. package/lib/renderer/page-renderer.js +1691 -0
  67. package/lib/renderer/script-rewrite.js +232 -0
  68. package/lib/renderer/seccomp.js +215 -0
  69. package/lib/renderer/syscall-numbers.js +139 -0
  70. package/lib/style/computed-style.js +2053 -0
  71. package/package.json +39 -0
  72. package/patches/happy-dom/0001-use-bun-entity-adapter.patch +15 -0
  73. package/patches/happy-dom/0002-use-bun-platform-adapters.patch +69 -0
  74. package/patches/happy-dom/README.md +38 -0
  75. package/test/chromium-headless-shell +5 -0
  76. package/test/compositor.test.js +154 -0
  77. package/test/computed-style.test.js +434 -0
  78. package/test/display-list.test.js +128 -0
  79. package/test/entities-adapter.test.js +43 -0
  80. package/test/fixtures/fake-renderer.js +26 -0
  81. package/test/fixtures/seccomp-child.js +32 -0
  82. package/test/fixtures/video.mp4 +0 -0
  83. package/test/flex.test.js +150 -0
  84. package/test/gradient.test.js +56 -0
  85. package/test/grid.test.js +253 -0
  86. package/test/happy-dom-platform-adapters.test.js +18 -0
  87. package/test/headless-shell.test.js +318 -0
  88. package/test/hit-test.test.js +49 -0
  89. package/test/html-parser.test.js +40 -0
  90. package/test/index.test.js +29 -0
  91. package/test/log.test.js +40 -0
  92. package/test/mobile.test.js +85 -0
  93. package/test/network-service.test.js +214 -0
  94. package/test/page-scripts.test.js +552 -0
  95. package/test/poc-backend.js +189 -0
  96. package/test/poc-backend.test.js +154 -0
  97. package/test/positioning.test.js +112 -0
  98. package/test/render-tree.test.js +103 -0
  99. package/test/renderer-host.test.js +69 -0
  100. package/test/resolver.test.js +51 -0
  101. package/test/script-rewrite.test.js +31 -0
  102. package/test/scroll-viewport.test.js +25 -0
  103. package/test/seccomp.test.js +71 -0
  104. package/test/site-isolation.test.js +74 -0
  105. package/test/svg.test.js +61 -0
  106. package/test/text-layout.test.js +419 -0
  107. package/usr/README.md +20 -0
  108. package/usr/lib/canvaskit/LICENSE +29 -0
  109. package/usr/lib/canvaskit/canvaskit.js +264 -0
  110. package/usr/lib/canvaskit/canvaskit.wasm +0 -0
  111. package/usr/share/fonts/DejaVuSansMono-Bold.ttf +0 -0
  112. package/usr/share/fonts/DejaVuSansMono.ttf +0 -0
  113. package/usr/share/fonts/LICENSE-Apache-2.0.txt +202 -0
  114. package/usr/share/fonts/LICENSE-DejaVu.txt +44 -0
  115. package/usr/share/fonts/LICENSE-OFL-1.1.txt +91 -0
  116. package/usr/share/fonts/NotoColorEmoji.ttf +0 -0
  117. package/usr/share/fonts/NotoColorEmojiFlags.ttf +0 -0
  118. package/usr/share/fonts/NotoSansCJK-Regular.ttc +0 -0
  119. package/usr/share/fonts/NotoSansSymbols-Regular-Subsetted.ttf +0 -0
  120. package/usr/share/fonts/NotoSansSymbols-Regular-Subsetted2.ttf +0 -0
  121. package/usr/share/fonts/Roboto-Regular.ttf +0 -0
  122. package/usr/share/fonts/fonts.json +28 -0
  123. package/vendor/acorn/LICENSE +21 -0
  124. package/vendor/acorn/README.md +309 -0
  125. package/vendor/acorn/dist/acorn.mjs +6313 -0
  126. package/vendor/acorn/package.json +50 -0
  127. package/vendor/happy-dom/.editorconfig +8 -0
  128. package/vendor/happy-dom/.eslintignore +6 -0
  129. package/vendor/happy-dom/.eslintrc.cjs +188 -0
  130. package/vendor/happy-dom/.github/CODEOWNERS +2 -0
  131. package/vendor/happy-dom/.github/FUNDING.yml +1 -0
  132. package/vendor/happy-dom/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
  133. package/vendor/happy-dom/.github/ISSUE_TEMPLATE/custom.md +10 -0
  134. package/vendor/happy-dom/.github/ISSUE_TEMPLATE/feature_request.md +19 -0
  135. package/vendor/happy-dom/.github/PULL_REQUEST_TEMPLATE.md +27 -0
  136. package/vendor/happy-dom/.github/workflows/auto-assign.yml +23 -0
  137. package/vendor/happy-dom/.github/workflows/pull_request.yml +53 -0
  138. package/vendor/happy-dom/.github/workflows/release.yml +143 -0
  139. package/vendor/happy-dom/.husky/pre-commit +1 -0
  140. package/vendor/happy-dom/.prettierignore +1 -0
  141. package/vendor/happy-dom/.prettierrc.cjs +6 -0
  142. package/vendor/happy-dom/.vscode/extensions.json +3 -0
  143. package/vendor/happy-dom/CODE_OF_CONDUCT.md +128 -0
  144. package/vendor/happy-dom/CONTRIBUTING.md +147 -0
  145. package/vendor/happy-dom/LICENSE +21 -0
  146. package/vendor/happy-dom/README.md +62 -0
  147. package/vendor/happy-dom/SECURITY.md +12 -0
  148. package/vendor/happy-dom/cspell.json +34 -0
  149. package/vendor/happy-dom/docs/happy-dom-logo.jpg +0 -0
  150. package/vendor/happy-dom/integration-test/.editorconfig +8 -0
  151. package/vendor/happy-dom/integration-test/LICENSE +21 -0
  152. package/vendor/happy-dom/integration-test/README.md +1 -0
  153. package/vendor/happy-dom/integration-test/package.json +24 -0
  154. package/vendor/happy-dom/package-lock.json +15520 -0
  155. package/vendor/happy-dom/package.json +55 -0
  156. package/vendor/happy-dom/packages/@happy-dom/global-registrator/LICENSE +21 -0
  157. package/vendor/happy-dom/packages/@happy-dom/global-registrator/README.md +60 -0
  158. package/vendor/happy-dom/packages/@happy-dom/global-registrator/package.json +52 -0
  159. package/vendor/happy-dom/packages/@happy-dom/global-registrator/register.js +2 -0
  160. package/vendor/happy-dom/packages/@happy-dom/global-registrator/src/GlobalRegistrator.ts +121 -0
  161. package/vendor/happy-dom/packages/@happy-dom/global-registrator/src/index.ts +3 -0
  162. package/vendor/happy-dom/packages/@happy-dom/global-registrator/tsconfig.json +30 -0
  163. package/vendor/happy-dom/packages/@happy-dom/jest-environment/LICENSE +21 -0
  164. package/vendor/happy-dom/packages/@happy-dom/jest-environment/README.md +71 -0
  165. package/vendor/happy-dom/packages/@happy-dom/jest-environment/package.json +93 -0
  166. package/vendor/happy-dom/packages/@happy-dom/jest-environment/src/index.ts +192 -0
  167. package/vendor/happy-dom/packages/@happy-dom/jest-environment/tsconfig.json +30 -0
  168. package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/README.md +48 -0
  169. package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/package.json +41 -0
  170. package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/src/CanvasAdapter.ts +275 -0
  171. package/vendor/happy-dom/packages/@happy-dom/node-canvas-adapter/src/index.ts +1 -0
  172. package/vendor/happy-dom/packages/@happy-dom/server-renderer/LICENSE +21 -0
  173. package/vendor/happy-dom/packages/@happy-dom/server-renderer/README.md +100 -0
  174. package/vendor/happy-dom/packages/@happy-dom/server-renderer/bin/src/happy-dom-sr.ts +30 -0
  175. package/vendor/happy-dom/packages/@happy-dom/server-renderer/package.json +62 -0
  176. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRenderer.ts +368 -0
  177. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererBrowser.ts +142 -0
  178. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererBrowserWorker.ts +29 -0
  179. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererPage.ts +305 -0
  180. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererPageWorker.ts +55 -0
  181. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/ServerRendererServer.ts +332 -0
  182. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/config/DefaultServerRendererConfiguration.ts +47 -0
  183. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/enums/ServerRendererLogLevelEnum.ts +9 -0
  184. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/enums/ServerRendererModeEnum.ts +8 -0
  185. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/index.ts +19 -0
  186. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IOptionalServerRendererConfiguration.ts +127 -0
  187. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IServerRendererConfiguration.ts +126 -0
  188. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IServerRendererItem.ts +6 -0
  189. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/types/IServerRendererResult.ts +11 -0
  190. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/BrowserWindowPolyfill.ts +138 -0
  191. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/HelpPrinter.ts +36 -0
  192. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/HelpPrinterRows.ts +288 -0
  193. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/PackageVersion.ts +12 -0
  194. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/ProcessArgumentsParser.ts +387 -0
  195. package/vendor/happy-dom/packages/@happy-dom/server-renderer/src/utilities/ServerRendererConfigurationFactory.ts +91 -0
  196. package/vendor/happy-dom/packages/happy-dom/LICENSE +21 -0
  197. package/vendor/happy-dom/packages/happy-dom/README.md +42 -0
  198. package/vendor/happy-dom/packages/happy-dom/package.json +58 -0
  199. package/vendor/happy-dom/packages/happy-dom/src/PropertySymbol.ts +431 -0
  200. package/vendor/happy-dom/packages/happy-dom/src/animation/Animation.ts +273 -0
  201. package/vendor/happy-dom/packages/happy-dom/src/animation/AnimationTimeline.ts +15 -0
  202. package/vendor/happy-dom/packages/happy-dom/src/animation/DocumentTimeline.ts +33 -0
  203. package/vendor/happy-dom/packages/happy-dom/src/animation/KeyframeEffect.ts +295 -0
  204. package/vendor/happy-dom/packages/happy-dom/src/async-task-manager/AsyncTaskManager.ts +340 -0
  205. package/vendor/happy-dom/packages/happy-dom/src/async-task-manager/AsyncTaskManagerDebugError.ts +14 -0
  206. package/vendor/happy-dom/packages/happy-dom/src/base64/Base64.ts +97 -0
  207. package/vendor/happy-dom/packages/happy-dom/src/browser/Browser.ts +123 -0
  208. package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserContext.ts +100 -0
  209. package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserFrame.ts +232 -0
  210. package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserPage.ts +205 -0
  211. package/vendor/happy-dom/packages/happy-dom/src/browser/BrowserSettingsFactory.ts +96 -0
  212. package/vendor/happy-dom/packages/happy-dom/src/browser/DefaultBrowserSettings.ts +67 -0
  213. package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowser.ts +129 -0
  214. package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowserContext.ts +103 -0
  215. package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowserFrame.ts +250 -0
  216. package/vendor/happy-dom/packages/happy-dom/src/browser/detached-browser/DetachedBrowserPage.ts +218 -0
  217. package/vendor/happy-dom/packages/happy-dom/src/browser/enums/BrowserErrorCaptureEnum.ts +10 -0
  218. package/vendor/happy-dom/packages/happy-dom/src/browser/enums/BrowserNavigationCrossOriginPolicyEnum.ts +10 -0
  219. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowser.ts +51 -0
  220. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserContext.ts +44 -0
  221. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserFrame.ts +112 -0
  222. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserPage.ts +110 -0
  223. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserPageViewport.ts +5 -0
  224. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IBrowserSettings.ts +194 -0
  225. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IGoToOptions.ts +17 -0
  226. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IOptionalBrowserPageViewport.ts +5 -0
  227. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IOptionalBrowserSettings.ts +190 -0
  228. package/vendor/happy-dom/packages/happy-dom/src/browser/types/IReloadOptions.ts +27 -0
  229. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserExceptionObserver.ts +123 -0
  230. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameFactory.ts +106 -0
  231. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameNavigator.ts +574 -0
  232. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameScriptEvaluator.ts +71 -0
  233. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameURL.ts +30 -0
  234. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserFrameValidator.ts +84 -0
  235. package/vendor/happy-dom/packages/happy-dom/src/browser/utilities/BrowserPageUtility.ts +56 -0
  236. package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasAdapter.ts +63 -0
  237. package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasAdapterCaller.ts +9 -0
  238. package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasGradient.ts +8 -0
  239. package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasPattern.ts +10 -0
  240. package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasRenderingContext2D.ts +162 -0
  241. package/vendor/happy-dom/packages/happy-dom/src/canvas/ICanvasShape.ts +7 -0
  242. package/vendor/happy-dom/packages/happy-dom/src/canvas/IImageBitmapOptions.ts +8 -0
  243. package/vendor/happy-dom/packages/happy-dom/src/canvas/ITextMetrics.ts +12 -0
  244. package/vendor/happy-dom/packages/happy-dom/src/canvas/ImageBitmap.ts +162 -0
  245. package/vendor/happy-dom/packages/happy-dom/src/canvas/ImageData.ts +83 -0
  246. package/vendor/happy-dom/packages/happy-dom/src/canvas/OffscreenCanvas.ts +162 -0
  247. package/vendor/happy-dom/packages/happy-dom/src/canvas/TCanvasImage.ts +14 -0
  248. package/vendor/happy-dom/packages/happy-dom/src/canvas/TImageBitmapSource.ts +12 -0
  249. package/vendor/happy-dom/packages/happy-dom/src/clipboard/Clipboard.ts +108 -0
  250. package/vendor/happy-dom/packages/happy-dom/src/clipboard/ClipboardItem.ts +57 -0
  251. package/vendor/happy-dom/packages/happy-dom/src/config/HTMLElementConfig.ts +536 -0
  252. package/vendor/happy-dom/packages/happy-dom/src/config/HTMLElementConfigContentModelEnum.ts +12 -0
  253. package/vendor/happy-dom/packages/happy-dom/src/config/IHTMLElementTagNameMap.ts +181 -0
  254. package/vendor/happy-dom/packages/happy-dom/src/config/ISVGElementTagNameMap.ts +127 -0
  255. package/vendor/happy-dom/packages/happy-dom/src/config/NamespaceURI.ts +8 -0
  256. package/vendor/happy-dom/packages/happy-dom/src/config/SVGElementConfig.ts +70 -0
  257. package/vendor/happy-dom/packages/happy-dom/src/console/IConsole.ts +161 -0
  258. package/vendor/happy-dom/packages/happy-dom/src/console/IVirtualConsoleLogEntry.ts +10 -0
  259. package/vendor/happy-dom/packages/happy-dom/src/console/IVirtualConsoleLogGroup.ts +6 -0
  260. package/vendor/happy-dom/packages/happy-dom/src/console/IVirtualConsolePrinter.ts +58 -0
  261. package/vendor/happy-dom/packages/happy-dom/src/console/VirtualConsole.ts +363 -0
  262. package/vendor/happy-dom/packages/happy-dom/src/console/VirtualConsolePrinter.ts +148 -0
  263. package/vendor/happy-dom/packages/happy-dom/src/console/enums/VirtualConsoleLogLevelEnum.ts +12 -0
  264. package/vendor/happy-dom/packages/happy-dom/src/console/enums/VirtualConsoleLogTypeEnum.ts +29 -0
  265. package/vendor/happy-dom/packages/happy-dom/src/console/utilities/VirtualConsoleLogEntryStringifier.ts +100 -0
  266. package/vendor/happy-dom/packages/happy-dom/src/cookie/CookieContainer.ts +91 -0
  267. package/vendor/happy-dom/packages/happy-dom/src/cookie/DefaultCookie.ts +17 -0
  268. package/vendor/happy-dom/packages/happy-dom/src/cookie/ICookie.ts +14 -0
  269. package/vendor/happy-dom/packages/happy-dom/src/cookie/ICookieContainer.ts +33 -0
  270. package/vendor/happy-dom/packages/happy-dom/src/cookie/IOptionalCookie.ts +16 -0
  271. package/vendor/happy-dom/packages/happy-dom/src/cookie/enums/CookieSameSiteEnum.ts +6 -0
  272. package/vendor/happy-dom/packages/happy-dom/src/cookie/urilities/CookieExpireUtility.ts +16 -0
  273. package/vendor/happy-dom/packages/happy-dom/src/cookie/urilities/CookieStringUtility.ts +119 -0
  274. package/vendor/happy-dom/packages/happy-dom/src/cookie/urilities/CookieURLUtility.ts +27 -0
  275. package/vendor/happy-dom/packages/happy-dom/src/cookie-store/CookieStore.ts +226 -0
  276. package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreDeleteOptions.ts +9 -0
  277. package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreGetOptions.ts +7 -0
  278. package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreItem.ts +13 -0
  279. package/vendor/happy-dom/packages/happy-dom/src/cookie-store/ICookieStoreSetOptions.ts +12 -0
  280. package/vendor/happy-dom/packages/happy-dom/src/css/CSS.ts +63 -0
  281. package/vendor/happy-dom/packages/happy-dom/src/css/CSSRule.ts +84 -0
  282. package/vendor/happy-dom/packages/happy-dom/src/css/CSSRuleTypeEnum.ts +18 -0
  283. package/vendor/happy-dom/packages/happy-dom/src/css/CSSStyleSheet.ts +141 -0
  284. package/vendor/happy-dom/packages/happy-dom/src/css/CSSUnitValue.ts +26 -0
  285. package/vendor/happy-dom/packages/happy-dom/src/css/CSSUnits.ts +31 -0
  286. package/vendor/happy-dom/packages/happy-dom/src/css/MediaList.ts +177 -0
  287. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/CSSPropertyList.ts +1273 -0
  288. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/CSSStyleDeclaration.ts +355 -0
  289. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/ICSSStyleDeclaration.ts +1178 -0
  290. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/CSSComputedStyle.ts +502 -0
  291. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/config/CSSComputedStyleElementDefault.ts +133 -0
  292. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/config/CSSComputedStyleInheritedProperties.ts +39 -0
  293. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/computed-style/config/CSSComputedStyleMeasurementProperties.ts +41 -0
  294. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/CSSPropertyManager.ts +641 -0
  295. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/parsers/CSSPropertyGetParser.ts +741 -0
  296. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/parsers/CSSPropertySetParser.ts +2955 -0
  297. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/types/ICSSPropertyMap.ts +5 -0
  298. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/types/ICSSPropertyValue.ts +4 -0
  299. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/utilities/CSSStringUtility.ts +90 -0
  300. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/utilities/CSSValueFormatter.ts +447 -0
  301. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/property-manager/utilities/CSSVariableFormatter.ts +76 -0
  302. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/utilities/CSSMeasurementConverter.ts +79 -0
  303. package/vendor/happy-dom/packages/happy-dom/src/css/declaration/utilities/CSSTextParser.ts +44 -0
  304. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSConditionRule.ts +20 -0
  305. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSContainerRule.ts +34 -0
  306. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSFontFaceRule.ts +45 -0
  307. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSGroupingRule.ts +84 -0
  308. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSKeyframeRule.ts +53 -0
  309. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSKeyframesRule.ts +147 -0
  310. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSMediaRule.ts +50 -0
  311. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSScopeRule.ts +53 -0
  312. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSStyleRule.ts +73 -0
  313. package/vendor/happy-dom/packages/happy-dom/src/css/rules/CSSSupportsRule.ts +30 -0
  314. package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/CSSKeywordValue.ts +35 -0
  315. package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/CSSStyleValue.ts +37 -0
  316. package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/StylePropertyMap.ts +45 -0
  317. package/vendor/happy-dom/packages/happy-dom/src/css/style-property-map/StylePropertyMapReadOnly.ts +128 -0
  318. package/vendor/happy-dom/packages/happy-dom/src/css/utilities/CSSEscaper.ts +87 -0
  319. package/vendor/happy-dom/packages/happy-dom/src/css/utilities/CSSRuleParser.ts +315 -0
  320. package/vendor/happy-dom/packages/happy-dom/src/custom-element/CustomElementReactionStack.ts +91 -0
  321. package/vendor/happy-dom/packages/happy-dom/src/custom-element/CustomElementRegistry.ts +186 -0
  322. package/vendor/happy-dom/packages/happy-dom/src/custom-element/CustomElementUtility.ts +34 -0
  323. package/vendor/happy-dom/packages/happy-dom/src/custom-element/ICustomElementDefinition.ts +16 -0
  324. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMPoint.ts +84 -0
  325. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMPointReadOnly.ts +117 -0
  326. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMRect.ts +92 -0
  327. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMRectList.ts +34 -0
  328. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMRectReadOnly.ts +129 -0
  329. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMStringMap.ts +93 -0
  330. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMStringMapUtility.ts +33 -0
  331. package/vendor/happy-dom/packages/happy-dom/src/dom/DOMTokenList.ts +363 -0
  332. package/vendor/happy-dom/packages/happy-dom/src/dom/IDOMPointInit.ts +6 -0
  333. package/vendor/happy-dom/packages/happy-dom/src/dom/IDOMRectInit.ts +6 -0
  334. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/DOMMatrix.ts +526 -0
  335. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/DOMMatrixReadOnly.ts +1608 -0
  336. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/IDOMMatrixCompatibleObject.ts +24 -0
  337. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/IDOMMatrixJSON.ts +26 -0
  338. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/TDOMMatrix2DArray.ts +3 -0
  339. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/TDOMMatrix3DArray.ts +20 -0
  340. package/vendor/happy-dom/packages/happy-dom/src/dom/dom-matrix/TDOMMatrixInit.ts +8 -0
  341. package/vendor/happy-dom/packages/happy-dom/src/dom-implementation/DOMImplementation.ts +81 -0
  342. package/vendor/happy-dom/packages/happy-dom/src/dom-parser/DOMParser.ts +47 -0
  343. package/vendor/happy-dom/packages/happy-dom/src/event/DataTransfer.ts +128 -0
  344. package/vendor/happy-dom/packages/happy-dom/src/event/DataTransferItem.ts +47 -0
  345. package/vendor/happy-dom/packages/happy-dom/src/event/DataTransferItemList.ts +44 -0
  346. package/vendor/happy-dom/packages/happy-dom/src/event/Event.ts +222 -0
  347. package/vendor/happy-dom/packages/happy-dom/src/event/EventPhaseEnum.ts +7 -0
  348. package/vendor/happy-dom/packages/happy-dom/src/event/EventTarget.ts +396 -0
  349. package/vendor/happy-dom/packages/happy-dom/src/event/IEventInit.ts +5 -0
  350. package/vendor/happy-dom/packages/happy-dom/src/event/IEventListenerOptions.ts +10 -0
  351. package/vendor/happy-dom/packages/happy-dom/src/event/ITouchInit.ts +16 -0
  352. package/vendor/happy-dom/packages/happy-dom/src/event/IUIEventInit.ts +7 -0
  353. package/vendor/happy-dom/packages/happy-dom/src/event/MessagePort.ts +32 -0
  354. package/vendor/happy-dom/packages/happy-dom/src/event/TEventListener.ts +4 -0
  355. package/vendor/happy-dom/packages/happy-dom/src/event/TEventListenerFunction.ts +3 -0
  356. package/vendor/happy-dom/packages/happy-dom/src/event/TEventListenerObject.ts +5 -0
  357. package/vendor/happy-dom/packages/happy-dom/src/event/Touch.ts +40 -0
  358. package/vendor/happy-dom/packages/happy-dom/src/event/UIEvent.ts +32 -0
  359. package/vendor/happy-dom/packages/happy-dom/src/event/events/AnimationEvent.ts +25 -0
  360. package/vendor/happy-dom/packages/happy-dom/src/event/events/ClipboardEvent.ts +22 -0
  361. package/vendor/happy-dom/packages/happy-dom/src/event/events/CloseEvent.ts +25 -0
  362. package/vendor/happy-dom/packages/happy-dom/src/event/events/CookieChangeEvent.ts +25 -0
  363. package/vendor/happy-dom/packages/happy-dom/src/event/events/CustomEvent.ts +53 -0
  364. package/vendor/happy-dom/packages/happy-dom/src/event/events/ErrorEvent.ts +29 -0
  365. package/vendor/happy-dom/packages/happy-dom/src/event/events/FocusEvent.ts +22 -0
  366. package/vendor/happy-dom/packages/happy-dom/src/event/events/HashChangeEvent.ts +25 -0
  367. package/vendor/happy-dom/packages/happy-dom/src/event/events/IAnimationEventInit.ts +7 -0
  368. package/vendor/happy-dom/packages/happy-dom/src/event/events/IClipboardEventInit.ts +6 -0
  369. package/vendor/happy-dom/packages/happy-dom/src/event/events/ICloseEventInit.ts +7 -0
  370. package/vendor/happy-dom/packages/happy-dom/src/event/events/ICookieChangeEventInit.ts +10 -0
  371. package/vendor/happy-dom/packages/happy-dom/src/event/events/ICustomEventInit.ts +5 -0
  372. package/vendor/happy-dom/packages/happy-dom/src/event/events/IErrorEventInit.ts +8 -0
  373. package/vendor/happy-dom/packages/happy-dom/src/event/events/IFocusEventInit.ts +6 -0
  374. package/vendor/happy-dom/packages/happy-dom/src/event/events/IHashChangeEventInit.ts +6 -0
  375. package/vendor/happy-dom/packages/happy-dom/src/event/events/IInputEventInit.ts +9 -0
  376. package/vendor/happy-dom/packages/happy-dom/src/event/events/IKeyboardEventInit.ts +23 -0
  377. package/vendor/happy-dom/packages/happy-dom/src/event/events/IMediaQueryListEventInit.ts +6 -0
  378. package/vendor/happy-dom/packages/happy-dom/src/event/events/IMediaQueryListInit.ts +6 -0
  379. package/vendor/happy-dom/packages/happy-dom/src/event/events/IMessageEventInit.ts +11 -0
  380. package/vendor/happy-dom/packages/happy-dom/src/event/events/IMouseEventInit.ts +21 -0
  381. package/vendor/happy-dom/packages/happy-dom/src/event/events/IPointerEventInit.ts +19 -0
  382. package/vendor/happy-dom/packages/happy-dom/src/event/events/IPopStateEventInit.ts +6 -0
  383. package/vendor/happy-dom/packages/happy-dom/src/event/events/IProgressEventInit.ts +7 -0
  384. package/vendor/happy-dom/packages/happy-dom/src/event/events/IStorageEventInit.ts +10 -0
  385. package/vendor/happy-dom/packages/happy-dom/src/event/events/ISubmitEventInit.ts +6 -0
  386. package/vendor/happy-dom/packages/happy-dom/src/event/events/ITouchEventInit.ts +12 -0
  387. package/vendor/happy-dom/packages/happy-dom/src/event/events/IWheelEventInit.ts +8 -0
  388. package/vendor/happy-dom/packages/happy-dom/src/event/events/InputEvent.ts +28 -0
  389. package/vendor/happy-dom/packages/happy-dom/src/event/events/KeyboardEvent.ts +80 -0
  390. package/vendor/happy-dom/packages/happy-dom/src/event/events/MediaQueryListEvent.ts +23 -0
  391. package/vendor/happy-dom/packages/happy-dom/src/event/events/MediaStreamTrackEvent.ts +22 -0
  392. package/vendor/happy-dom/packages/happy-dom/src/event/events/MessageEvent.ts +33 -0
  393. package/vendor/happy-dom/packages/happy-dom/src/event/events/MouseEvent.ts +52 -0
  394. package/vendor/happy-dom/packages/happy-dom/src/event/events/PointerEvent.ts +51 -0
  395. package/vendor/happy-dom/packages/happy-dom/src/event/events/PopStateEvent.ts +23 -0
  396. package/vendor/happy-dom/packages/happy-dom/src/event/events/ProgressEvent.ts +25 -0
  397. package/vendor/happy-dom/packages/happy-dom/src/event/events/StorageEvent.ts +30 -0
  398. package/vendor/happy-dom/packages/happy-dom/src/event/events/SubmitEvent.ts +22 -0
  399. package/vendor/happy-dom/packages/happy-dom/src/event/events/TouchEvent.ts +34 -0
  400. package/vendor/happy-dom/packages/happy-dom/src/event/events/WheelEvent.ts +30 -0
  401. package/vendor/happy-dom/packages/happy-dom/src/exception/DOMException.ts +21 -0
  402. package/vendor/happy-dom/packages/happy-dom/src/exception/DOMExceptionNameEnum.ts +23 -0
  403. package/vendor/happy-dom/packages/happy-dom/src/fetch/AbortController.ts +25 -0
  404. package/vendor/happy-dom/packages/happy-dom/src/fetch/AbortSignal.ts +182 -0
  405. package/vendor/happy-dom/packages/happy-dom/src/fetch/Fetch.ts +1072 -0
  406. package/vendor/happy-dom/packages/happy-dom/src/fetch/Headers.ts +177 -0
  407. package/vendor/happy-dom/packages/happy-dom/src/fetch/ReadableStreamWrapper.ts +30 -0
  408. package/vendor/happy-dom/packages/happy-dom/src/fetch/Request.ts +492 -0
  409. package/vendor/happy-dom/packages/happy-dom/src/fetch/ResourceFetch.ts +190 -0
  410. package/vendor/happy-dom/packages/happy-dom/src/fetch/Response.ts +439 -0
  411. package/vendor/happy-dom/packages/happy-dom/src/fetch/SyncFetch.ts +717 -0
  412. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/ICacheablePreflightRequest.ts +7 -0
  413. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/ICacheablePreflightResponse.ts +7 -0
  414. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/ICachedPreflightResponse.ts +5 -0
  415. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/IPreflightResponseCache.ts +33 -0
  416. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/preflight/PreflightResponseCache.ts +94 -0
  417. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/CachedResponseStateEnum.ts +5 -0
  418. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ICacheableRequest.ts +7 -0
  419. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ICacheableResponse.ts +11 -0
  420. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ICachedResponse.ts +40 -0
  421. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/IResponseCache.ts +37 -0
  422. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/IResponseCacheFileSystem.ts +18 -0
  423. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ResponseCache.ts +248 -0
  424. package/vendor/happy-dom/packages/happy-dom/src/fetch/cache/response/ResponseCacheFileSystem.ts +175 -0
  425. package/vendor/happy-dom/packages/happy-dom/src/fetch/certificate/FetchHTTPSCertificate.ts +52 -0
  426. package/vendor/happy-dom/packages/happy-dom/src/fetch/data-uri/DataURIParser.ts +66 -0
  427. package/vendor/happy-dom/packages/happy-dom/src/fetch/multipart/MultipartFormDataParser.ts +174 -0
  428. package/vendor/happy-dom/packages/happy-dom/src/fetch/multipart/MultipartReader.ts +216 -0
  429. package/vendor/happy-dom/packages/happy-dom/src/fetch/preload/PreloadEntry.ts +50 -0
  430. package/vendor/happy-dom/packages/happy-dom/src/fetch/preload/PreloadUtility.ts +33 -0
  431. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IFetchInterceptor.ts +60 -0
  432. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IFetchRequestHeaders.ts +9 -0
  433. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IRequestInit.ts +23 -0
  434. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IResourceFetchResponse.ts +4 -0
  435. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IResponseInit.ts +10 -0
  436. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/ISyncResponse.ts +18 -0
  437. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/IVirtualServer.ts +7 -0
  438. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/THeadersInit.ts +3 -0
  439. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestBody.ts +14 -0
  440. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestCredentials.ts +1 -0
  441. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestInfo.ts +4 -0
  442. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestMode.ts +1 -0
  443. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestRedirect.ts +1 -0
  444. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TRequestReferrerPolicy.ts +10 -0
  445. package/vendor/happy-dom/packages/happy-dom/src/fetch/types/TResponseBody.ts +14 -0
  446. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchBodyUtility.ts +284 -0
  447. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchCORSUtility.ts +23 -0
  448. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchRequestHeaderUtility.ts +141 -0
  449. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchRequestReferrerUtility.ts +259 -0
  450. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchRequestValidationUtility.ts +128 -0
  451. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchResponseHeaderUtility.ts +48 -0
  452. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/FetchResponseRedirectUtility.ts +27 -0
  453. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/SyncFetchScriptBuilder.ts +77 -0
  454. package/vendor/happy-dom/packages/happy-dom/src/fetch/utilities/VirtualServerUtility.ts +114 -0
  455. package/vendor/happy-dom/packages/happy-dom/src/file/Blob.ts +163 -0
  456. package/vendor/happy-dom/packages/happy-dom/src/file/File.ts +43 -0
  457. package/vendor/happy-dom/packages/happy-dom/src/file/FileReader.ts +211 -0
  458. package/vendor/happy-dom/packages/happy-dom/src/file/FileReaderEventTypeEnum.ts +9 -0
  459. package/vendor/happy-dom/packages/happy-dom/src/file/FileReaderFormatEnum.ts +7 -0
  460. package/vendor/happy-dom/packages/happy-dom/src/file/FileReaderReadyStateEnum.ts +6 -0
  461. package/vendor/happy-dom/packages/happy-dom/src/form-data/FormData.ts +291 -0
  462. package/vendor/happy-dom/packages/happy-dom/src/history/History.ts +220 -0
  463. package/vendor/happy-dom/packages/happy-dom/src/history/HistoryItemList.ts +72 -0
  464. package/vendor/happy-dom/packages/happy-dom/src/history/HistoryScrollRestorationEnum.ts +5 -0
  465. package/vendor/happy-dom/packages/happy-dom/src/history/IHistoryItem.ts +12 -0
  466. package/vendor/happy-dom/packages/happy-dom/src/html-parser/HTMLParser.ts +920 -0
  467. package/vendor/happy-dom/packages/happy-dom/src/html-serializer/HTMLSerializer.ts +172 -0
  468. package/vendor/happy-dom/packages/happy-dom/src/index.ts +495 -0
  469. package/vendor/happy-dom/packages/happy-dom/src/intersection-observer/IIntersectionObserverInit.ts +16 -0
  470. package/vendor/happy-dom/packages/happy-dom/src/intersection-observer/IntersectionObserver.ts +64 -0
  471. package/vendor/happy-dom/packages/happy-dom/src/intersection-observer/IntersectionObserverEntry.ts +26 -0
  472. package/vendor/happy-dom/packages/happy-dom/src/javascript/IJavaScriptCompiledResult.ts +9 -0
  473. package/vendor/happy-dom/packages/happy-dom/src/javascript/JavaScriptCompiler.ts +381 -0
  474. package/vendor/happy-dom/packages/happy-dom/src/location/Location.ts +319 -0
  475. package/vendor/happy-dom/packages/happy-dom/src/match-media/IMediaQueryRange.ts +5 -0
  476. package/vendor/happy-dom/packages/happy-dom/src/match-media/IMediaQueryRule.ts +4 -0
  477. package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryItem.ts +354 -0
  478. package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryList.ts +133 -0
  479. package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryParser.ts +113 -0
  480. package/vendor/happy-dom/packages/happy-dom/src/match-media/MediaQueryTypeEnum.ts +7 -0
  481. package/vendor/happy-dom/packages/happy-dom/src/module/CSSModule.ts +53 -0
  482. package/vendor/happy-dom/packages/happy-dom/src/module/ECMAScriptModule.ts +194 -0
  483. package/vendor/happy-dom/packages/happy-dom/src/module/ECMAScriptModuleCompiler.ts +961 -0
  484. package/vendor/happy-dom/packages/happy-dom/src/module/JSONModule.ts +58 -0
  485. package/vendor/happy-dom/packages/happy-dom/src/module/ModuleFactory.ts +148 -0
  486. package/vendor/happy-dom/packages/happy-dom/src/module/ModuleURLUtility.ts +199 -0
  487. package/vendor/happy-dom/packages/happy-dom/src/module/UnresolvedModule.ts +81 -0
  488. package/vendor/happy-dom/packages/happy-dom/src/module/enums/ECMAScriptModuleEvaluateStateEnum.ts +7 -0
  489. package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleCachedResult.ts +9 -0
  490. package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleCompiledResult.ts +19 -0
  491. package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleImport.ts +4 -0
  492. package/vendor/happy-dom/packages/happy-dom/src/module/types/IECMAScriptModuleInit.ts +10 -0
  493. package/vendor/happy-dom/packages/happy-dom/src/module/types/IModule.ts +20 -0
  494. package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleImportMap.ts +10 -0
  495. package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleImportMapRule.ts +4 -0
  496. package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleImportMapScope.ts +6 -0
  497. package/vendor/happy-dom/packages/happy-dom/src/module/types/IModuleInit.ts +12 -0
  498. package/vendor/happy-dom/packages/happy-dom/src/module/types/IResolveNodeModules.ts +8 -0
  499. package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/IMutationListener.ts +7 -0
  500. package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/IMutationObserverInit.ts +14 -0
  501. package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationObserver.ts +175 -0
  502. package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationObserverListener.ts +115 -0
  503. package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationRecord.ts +55 -0
  504. package/vendor/happy-dom/packages/happy-dom/src/mutation-observer/MutationTypeEnum.ts +7 -0
  505. package/vendor/happy-dom/packages/happy-dom/src/navigator/MimeType.ts +35 -0
  506. package/vendor/happy-dom/packages/happy-dom/src/navigator/MimeTypeArray.ts +48 -0
  507. package/vendor/happy-dom/packages/happy-dom/src/navigator/Navigator.ts +247 -0
  508. package/vendor/happy-dom/packages/happy-dom/src/navigator/Plugin.ts +61 -0
  509. package/vendor/happy-dom/packages/happy-dom/src/navigator/PluginArray.ts +58 -0
  510. package/vendor/happy-dom/packages/happy-dom/src/nodes/NodeFactory.ts +38 -0
  511. package/vendor/happy-dom/packages/happy-dom/src/nodes/attr/Attr.ts +119 -0
  512. package/vendor/happy-dom/packages/happy-dom/src/nodes/character-data/CharacterData.ts +218 -0
  513. package/vendor/happy-dom/packages/happy-dom/src/nodes/character-data/CharacterDataUtility.ts +68 -0
  514. package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/ChildNodeUtility.ts +100 -0
  515. package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/IChildNode.ts +29 -0
  516. package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/INonDocumentTypeChildNode.ts +7 -0
  517. package/vendor/happy-dom/packages/happy-dom/src/nodes/child-node/NonDocumentChildNodeUtility.ts +37 -0
  518. package/vendor/happy-dom/packages/happy-dom/src/nodes/comment/Comment.ts +36 -0
  519. package/vendor/happy-dom/packages/happy-dom/src/nodes/document/Document.ts +2310 -0
  520. package/vendor/happy-dom/packages/happy-dom/src/nodes/document/DocumentReadyStateEnum.ts +6 -0
  521. package/vendor/happy-dom/packages/happy-dom/src/nodes/document/DocumentReadyStateManager.ts +52 -0
  522. package/vendor/happy-dom/packages/happy-dom/src/nodes/document/VisibilityStateEnum.ts +6 -0
  523. package/vendor/happy-dom/packages/happy-dom/src/nodes/document-fragment/DocumentFragment.ts +208 -0
  524. package/vendor/happy-dom/packages/happy-dom/src/nodes/document-type/DocumentType.ts +70 -0
  525. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/Element.ts +1842 -0
  526. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/ElementEventAttributeUtility.ts +96 -0
  527. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/HTMLCollection.ts +228 -0
  528. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/NamedNodeMap.ts +274 -0
  529. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/NamedNodeMapProxyFactory.ts +127 -0
  530. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/THTMLCollectionListener.ts +6 -0
  531. package/vendor/happy-dom/packages/happy-dom/src/nodes/element/TNamedNodeMapListener.ts +3 -0
  532. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-anchor-element/HTMLAnchorElement.ts +439 -0
  533. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-area-element/HTMLAreaElement.ts +426 -0
  534. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-audio-element/Audio.ts +28 -0
  535. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-audio-element/HTMLAudioElement.ts +10 -0
  536. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-base-element/HTMLBaseElement.ts +64 -0
  537. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-body-element/HTMLBodyElement.ts +161 -0
  538. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-br-element/HTMLBRElement.ts +7 -0
  539. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-button-element/HTMLButtonElement.ts +406 -0
  540. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-canvas-element/CanvasCaptureMediaStreamTrack.ts +51 -0
  541. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-canvas-element/HTMLCanvasElement.ts +304 -0
  542. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-d-list-element/HTMLDListElement.ts +7 -0
  543. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-data-element/HTMLDataElement.ts +25 -0
  544. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-data-list-element/HTMLDataListElement.ts +28 -0
  545. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-details-element/HTMLDetailsElement.ts +112 -0
  546. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-dialog-element/HTMLDialogElement.ts +104 -0
  547. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-div-element/HTMLDivElement.ts +7 -0
  548. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-document/HTMLDocument.ts +82 -0
  549. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-element/HTMLElement.ts +1149 -0
  550. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-element/HTMLElementUtility.ts +119 -0
  551. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-embed-element/HTMLEmbedElement.ts +90 -0
  552. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-field-set-element/HTMLFieldSetElement.ts +165 -0
  553. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/HTMLFormControlsCollection.ts +35 -0
  554. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/HTMLFormElement.ts +675 -0
  555. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/RadioNodeList.ts +25 -0
  556. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-form-element/THTMLFormControlElement.ts +16 -0
  557. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-head-element/HTMLHeadElement.ts +7 -0
  558. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-heading-element/HTMLHeadingElement.ts +7 -0
  559. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-hr-element/HTMLHRElement.ts +7 -0
  560. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-html-element/HTMLHtmlElement.ts +7 -0
  561. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-hyperlink-element/HTMLHyperlinkElementUtility.ts +329 -0
  562. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-hyperlink-element/IHTMLHyperlinkElement.ts +19 -0
  563. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-iframe-element/HTMLIFrameElement.ts +460 -0
  564. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-image-element/HTMLImageElement.ts +500 -0
  565. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-image-element/Image.ts +33 -0
  566. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/FileList.ts +34 -0
  567. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElement.ts +1550 -0
  568. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementDateUtility.ts +50 -0
  569. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementSelectionDirectionEnum.ts +6 -0
  570. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementSelectionModeEnum.ts +7 -0
  571. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementValueSanitizer.ts +211 -0
  572. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-input-element/HTMLInputElementValueStepping.ts +92 -0
  573. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-label-element/HTMLLabelElement.ts +128 -0
  574. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-label-element/HTMLLabelElementUtility.ts +45 -0
  575. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-legend-element/HTMLLegendElement.ts +27 -0
  576. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-li-element/HTMLLIElement.ts +31 -0
  577. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-link-element/HTMLLinkElement.ts +501 -0
  578. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-map-element/HTMLMapElement.ts +47 -0
  579. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/HTMLMediaElement.ts +906 -0
  580. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/IMediaTrackCapabilities.ts +21 -0
  581. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/IMediaTrackSettings.ts +5 -0
  582. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/MediaStream.ts +114 -0
  583. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/MediaStreamTrack.ts +182 -0
  584. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/RemotePlayback.ts +47 -0
  585. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrack.ts +156 -0
  586. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackCue.ts +51 -0
  587. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackCueList.ts +37 -0
  588. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackKindEnum.ts +9 -0
  589. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TextTrackList.ts +182 -0
  590. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/TimeRanges.ts +73 -0
  591. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/VTTCue.ts +80 -0
  592. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-media-element/VTTRegion.ts +15 -0
  593. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-menu-element/HTMLMenuElement.ts +7 -0
  594. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-meta-element/HTMLMetaElement.ts +80 -0
  595. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-meter-element/HTMLMeterElement.ts +216 -0
  596. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-mod-element/HTMLModElement.ts +54 -0
  597. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-o-list-element/HTMLOListElement.ts +83 -0
  598. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-object-element/HTMLObjectElement.ts +223 -0
  599. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-opt-group-element/HTMLOptGroupElement.ts +53 -0
  600. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-option-element/HTMLOptionElement.ts +192 -0
  601. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-output-element/HTMLOutputElement.ts +179 -0
  602. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-paragraph-element/HTMLParagraphElement.ts +7 -0
  603. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-param-element/HTMLParamElement.ts +7 -0
  604. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-picture-element/HTMLPictureElement.ts +7 -0
  605. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-pre-element/HTMLPreElement.ts +7 -0
  606. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-progress-element/HTMLProgressElement.ts +100 -0
  607. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-quote-element/HTMLQuoteElement.ts +36 -0
  608. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-script-element/HTMLScriptElement.ts +735 -0
  609. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-select-element/HTMLOptionsCollection.ts +69 -0
  610. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-select-element/HTMLSelectElement.ts +779 -0
  611. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-slot-element/HTMLSlotElement.ts +249 -0
  612. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-source-element/HTMLSourceElement.ts +148 -0
  613. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-span-element/HTMLSpanElement.ts +7 -0
  614. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-style-element/HTMLStyleElement.ts +125 -0
  615. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-caption-element/HTMLTableCaptionElement.ts +7 -0
  616. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-cell-element/HTMLTableCellElement.ts +125 -0
  617. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-col-element/HTMLTableColElement.ts +7 -0
  618. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-element/HTMLTableElement.ts +343 -0
  619. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-row-element/HTMLTableRowElement.ts +149 -0
  620. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-table-section-element/HTMLTableSectionElement.ts +88 -0
  621. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-template-element/HTMLTemplateElement.ts +154 -0
  622. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-text-area-element/HTMLTextAreaElement.ts +649 -0
  623. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-time-element/HTMLTimeElement.ts +27 -0
  624. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-title-element/HTMLTitleElement.ts +48 -0
  625. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-track-element/HTMLTrackElement.ts +164 -0
  626. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-u-list-element/HTMLUListElement.ts +7 -0
  627. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-unknown-element/HTMLUnknownElement.ts +9 -0
  628. package/vendor/happy-dom/packages/happy-dom/src/nodes/html-video-element/HTMLVideoElement.ts +10 -0
  629. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedComputedStyleResult.ts +6 -0
  630. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedElementByIdResult.ts +6 -0
  631. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedElementByTagNameResult.ts +6 -0
  632. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedElementsByTagNameResult.ts +6 -0
  633. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedMatchesResult.ts +6 -0
  634. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedQuerySelectorAllResult.ts +7 -0
  635. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedQuerySelectorResult.ts +6 -0
  636. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedResult.ts +3 -0
  637. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/ICachedStyleResult.ts +6 -0
  638. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/Node.ts +1373 -0
  639. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeDocumentPositionEnum.ts +10 -0
  640. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeList.ts +224 -0
  641. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeTypeEnum.ts +13 -0
  642. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/NodeUtility.ts +330 -0
  643. package/vendor/happy-dom/packages/happy-dom/src/nodes/node/TNodeListListener.ts +1 -0
  644. package/vendor/happy-dom/packages/happy-dom/src/nodes/parent-node/IParentNode.ts +109 -0
  645. package/vendor/happy-dom/packages/happy-dom/src/nodes/parent-node/ParentNodeUtility.ts +334 -0
  646. package/vendor/happy-dom/packages/happy-dom/src/nodes/processing-instruction/ProcessingInstruction.ts +22 -0
  647. package/vendor/happy-dom/packages/happy-dom/src/nodes/shadow-root/ShadowRoot.ts +290 -0
  648. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animate-element/SVGAnimateElement.ts +8 -0
  649. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animate-motion-element/SVGAnimateMotionElement.ts +8 -0
  650. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animate-transform-element/SVGAnimateTransformElement.ts +8 -0
  651. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-animation-element/SVGAnimationElement.ts +94 -0
  652. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-circle-element/SVGCircleElement.ts +72 -0
  653. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-clip-path-element/SVGClipPathElement.ts +34 -0
  654. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-component-transfer-function-element/SVGComponentTransferFunctionElement.ts +167 -0
  655. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-defs-element/SVGDefsElement.ts +8 -0
  656. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-desc-element/SVGDescElement.ts +8 -0
  657. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-element/SVGElement.ts +828 -0
  658. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-ellipse-element/SVGEllipseElement.ts +92 -0
  659. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-blend-element/SVGFEBlendElement.ts +192 -0
  660. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-color-matrix-element/SVGFEColorMatrixElement.ts +204 -0
  661. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-component-transfer-element/SVGFEComponentTransferElement.ts +133 -0
  662. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-composite-element/SVGFECompositeElement.ts +186 -0
  663. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-convolve-matrix-element/SVGFEConvolveMatrixElement.ts +366 -0
  664. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-diffuse-lighting-element/SVGFEDiffuseLightingElement.ts +214 -0
  665. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-displacement-map-element/SVGFEDisplacementMapElement.ts +226 -0
  666. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-distant-light-element/SVGFEDistantLightElement.ts +52 -0
  667. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-drop-shadow-element/SVGFEDropShadowElement.ts +227 -0
  668. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-flood-element/SVGFEFloodElement.ts +113 -0
  669. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-a-element/SVGFEFuncAElement.ts +8 -0
  670. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-b-element/SVGFEFuncBElement.ts +8 -0
  671. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-g-element/SVGFEFuncGElement.ts +8 -0
  672. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-func-r-element/SVGFEFuncRElement.ts +8 -0
  673. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-gaussian-blur-element/SVGFEGaussianBlurElement.ts +214 -0
  674. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-image-element/SVGFEImageElement.ts +173 -0
  675. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-merge-element/SVGFEMergeElement.ts +113 -0
  676. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-merge-node-element/SVGFEMergeNodeElement.ts +32 -0
  677. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-morphology-element/SVGFEMorphologyElement.ts +202 -0
  678. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-offset-element/SVGFEOffsetElement.ts +174 -0
  679. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-point-light-element/SVGFEPointLightElement.ts +72 -0
  680. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-specular-lighting-element/SVGFESpecularLightingElement.ts +237 -0
  681. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-spot-light-element/SVGFESpotLightElement.ts +173 -0
  682. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-tile-element/SVGFETileElement.ts +133 -0
  683. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-fe-turbulence-element/SVGFETurbulenceElement.ts +249 -0
  684. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-filter-element/SVGFilterElement.ts +158 -0
  685. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-foreign-object-element/SVGForeignObjectElement.ts +92 -0
  686. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-g-element/SVGGElement.ts +8 -0
  687. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-geometry-element/SVGGeometryElement.ts +94 -0
  688. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-gradient-element/SVGGradientElement.ts +104 -0
  689. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-graphics-element/SVGGraphicsElement.ts +134 -0
  690. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-image-element/SVGImageElement.ts +188 -0
  691. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-line-element/SVGLineElement.ts +92 -0
  692. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-linear-gradient-element/SVGLinearGradientElement.ts +92 -0
  693. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-m-path-element/SVGMPathElement.ts +32 -0
  694. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-marker-element/SVGMarkerElement.ts +230 -0
  695. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-mask-element/SVGMaskElement.ts +137 -0
  696. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-metadata-element/SVGMetadataElement.ts +8 -0
  697. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-path-element/SVGPathElement.ts +8 -0
  698. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-pattern-element/SVGPatternElement.ts +179 -0
  699. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-polygon-element/SVGPolygonElement.ts +53 -0
  700. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-polyline-element/SVGPolylineElement.ts +53 -0
  701. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-radial-gradient-element/SVGRadialGradientElement.ts +112 -0
  702. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-rect-element/SVGRectElement.ts +132 -0
  703. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-script-element/SVGScriptElement.ts +50 -0
  704. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-set-element/SVGSetElement.ts +8 -0
  705. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-stop-element/SVGStopElement.ts +32 -0
  706. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-style-element/SVGStyleElement.ts +143 -0
  707. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-svg-element/SVGSVGElement.ts +601 -0
  708. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-switch-element/SVGSwitchElement.ts +8 -0
  709. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-symbol-element/SVGSymbolElement.ts +8 -0
  710. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-t-span-element/SVGTSpanElement.ts +8 -0
  711. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-content-element/SVGTextContentElement.ts +143 -0
  712. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-element/SVGTextElement.ts +8 -0
  713. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-path-element/SVGTextPathElement.ts +106 -0
  714. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-text-positioning-element/SVGTextPositioningElement.ts +113 -0
  715. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-title-element/SVGTitleElement.ts +8 -0
  716. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-use-element/SVGUseElement.ts +113 -0
  717. package/vendor/happy-dom/packages/happy-dom/src/nodes/svg-view-element/SVGViewElement.ts +8 -0
  718. package/vendor/happy-dom/packages/happy-dom/src/nodes/text/Text.ts +154 -0
  719. package/vendor/happy-dom/packages/happy-dom/src/nodes/xml-document/XMLDocument.ts +10 -0
  720. package/vendor/happy-dom/packages/happy-dom/src/permissions/PermissionNameEnum.ts +32 -0
  721. package/vendor/happy-dom/packages/happy-dom/src/permissions/PermissionStatus.ts +23 -0
  722. package/vendor/happy-dom/packages/happy-dom/src/permissions/Permissions.ts +59 -0
  723. package/vendor/happy-dom/packages/happy-dom/src/query-selector/ISelectorAttribute.ts +7 -0
  724. package/vendor/happy-dom/packages/happy-dom/src/query-selector/ISelectorMatch.ts +3 -0
  725. package/vendor/happy-dom/packages/happy-dom/src/query-selector/ISelectorPseudo.ts +8 -0
  726. package/vendor/happy-dom/packages/happy-dom/src/query-selector/QuerySelector.ts +849 -0
  727. package/vendor/happy-dom/packages/happy-dom/src/query-selector/SelectorCombinatorEnum.ts +9 -0
  728. package/vendor/happy-dom/packages/happy-dom/src/query-selector/SelectorItem.ts +575 -0
  729. package/vendor/happy-dom/packages/happy-dom/src/query-selector/SelectorParser.ts +699 -0
  730. package/vendor/happy-dom/packages/happy-dom/src/query-selector/TGlobalMatchFunction.ts +12 -0
  731. package/vendor/happy-dom/packages/happy-dom/src/range/IRangeBoundaryPoint.ts +9 -0
  732. package/vendor/happy-dom/packages/happy-dom/src/range/Range.ts +1161 -0
  733. package/vendor/happy-dom/packages/happy-dom/src/range/RangeHowEnum.ts +8 -0
  734. package/vendor/happy-dom/packages/happy-dom/src/range/RangeUtility.ts +118 -0
  735. package/vendor/happy-dom/packages/happy-dom/src/resize-observer/ResizeObserver.ts +33 -0
  736. package/vendor/happy-dom/packages/happy-dom/src/screen/Screen.ts +19 -0
  737. package/vendor/happy-dom/packages/happy-dom/src/screen/ScreenDetailed.ts +17 -0
  738. package/vendor/happy-dom/packages/happy-dom/src/screen/ScreenDetails.ts +27 -0
  739. package/vendor/happy-dom/packages/happy-dom/src/selection/Selection.ts +556 -0
  740. package/vendor/happy-dom/packages/happy-dom/src/selection/SelectionDirectionEnum.ts +7 -0
  741. package/vendor/happy-dom/packages/happy-dom/src/storage/Storage.ts +149 -0
  742. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAngle.ts +310 -0
  743. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAngleTypeEnum.ts +9 -0
  744. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedAngle.ts +100 -0
  745. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedBoolean.ts +80 -0
  746. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedEnumeration.ts +119 -0
  747. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedInteger.ts +97 -0
  748. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedLength.ts +100 -0
  749. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedLengthList.ts +101 -0
  750. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedNumber.ts +101 -0
  751. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedNumberList.ts +101 -0
  752. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedPreserveAspectRatio.ts +100 -0
  753. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedRect.ts +100 -0
  754. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedString.ts +83 -0
  755. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGAnimatedTransformList.ts +101 -0
  756. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGLength.ts +375 -0
  757. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGLengthList.ts +489 -0
  758. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGLengthTypeEnum.ts +15 -0
  759. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGMatrix.ts +429 -0
  760. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGNumber.ts +83 -0
  761. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGNumberList.ts +522 -0
  762. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPoint.ts +114 -0
  763. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPointList.ts +526 -0
  764. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPreserveAspectRatio.ts +176 -0
  765. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPreserveAspectRatioAlignEnum.ts +15 -0
  766. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGPreserveAspectRatioMeetOrSliceEnum.ts +7 -0
  767. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGRect.ts +200 -0
  768. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGStringList.ts +422 -0
  769. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGTransform.ts +369 -0
  770. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGTransformList.ts +531 -0
  771. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGTransformTypeEnum.ts +11 -0
  772. package/vendor/happy-dom/packages/happy-dom/src/svg/SVGUnitTypes.ts +26 -0
  773. package/vendor/happy-dom/packages/happy-dom/src/tree-walker/NodeFilter.ts +18 -0
  774. package/vendor/happy-dom/packages/happy-dom/src/tree-walker/NodeFilterMask.ts +28 -0
  775. package/vendor/happy-dom/packages/happy-dom/src/tree-walker/NodeIterator.ts +85 -0
  776. package/vendor/happy-dom/packages/happy-dom/src/tree-walker/TNodeFilter.ts +3 -0
  777. package/vendor/happy-dom/packages/happy-dom/src/tree-walker/TreeWalker.ts +339 -0
  778. package/vendor/happy-dom/packages/happy-dom/src/url/URL.ts +45 -0
  779. package/vendor/happy-dom/packages/happy-dom/src/utilities/AttributeUtility.ts +43 -0
  780. package/vendor/happy-dom/packages/happy-dom/src/utilities/ClassMethodBinder.ts +71 -0
  781. package/vendor/happy-dom/packages/happy-dom/src/utilities/StringUtility.ts +47 -0
  782. package/vendor/happy-dom/packages/happy-dom/src/utilities/XMLEncodeUtility.ts +166 -0
  783. package/vendor/happy-dom/packages/happy-dom/src/validity-state/ValidityState.ts +234 -0
  784. package/vendor/happy-dom/packages/happy-dom/src/version.ts +1 -0
  785. package/vendor/happy-dom/packages/happy-dom/src/web-socket/WebSocket.ts +408 -0
  786. package/vendor/happy-dom/packages/happy-dom/src/web-socket/WebSocketReadyStateEnum.ts +8 -0
  787. package/vendor/happy-dom/packages/happy-dom/src/window/BrowserWindow.ts +3074 -0
  788. package/vendor/happy-dom/packages/happy-dom/src/window/CrossOriginBrowserWindow.ts +152 -0
  789. package/vendor/happy-dom/packages/happy-dom/src/window/DetachedWindowAPI.ts +133 -0
  790. package/vendor/happy-dom/packages/happy-dom/src/window/GlobalWindow.ts +90 -0
  791. package/vendor/happy-dom/packages/happy-dom/src/window/INodeJSGlobal.ts +76 -0
  792. package/vendor/happy-dom/packages/happy-dom/src/window/IOptionalTimerLoopsLimit.ts +4 -0
  793. package/vendor/happy-dom/packages/happy-dom/src/window/IScrollToOptions.ts +5 -0
  794. package/vendor/happy-dom/packages/happy-dom/src/window/ITimerLoopsLimit.ts +4 -0
  795. package/vendor/happy-dom/packages/happy-dom/src/window/VMGlobalPropertyScript.ts +59 -0
  796. package/vendor/happy-dom/packages/happy-dom/src/window/Window.ts +67 -0
  797. package/vendor/happy-dom/packages/happy-dom/src/window/WindowBrowserContext.ts +117 -0
  798. package/vendor/happy-dom/packages/happy-dom/src/window/WindowContextClassExtender.ts +288 -0
  799. package/vendor/happy-dom/packages/happy-dom/src/window/WindowPageOpenUtility.ts +200 -0
  800. package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequest.ts +577 -0
  801. package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestEventTarget.ts +88 -0
  802. package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestReadyStateEnum.ts +9 -0
  803. package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestResponseDataParser.ts +70 -0
  804. package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpRequestUpload.ts +6 -0
  805. package/vendor/happy-dom/packages/happy-dom/src/xml-http-request/XMLHttpResponseTypeEnum.ts +9 -0
  806. package/vendor/happy-dom/packages/happy-dom/src/xml-parser/XMLParser.ts +744 -0
  807. package/vendor/happy-dom/packages/happy-dom/src/xml-serializer/XMLSerializer.ts +280 -0
  808. package/vendor/happy-dom/turbo.json +52 -0
  809. package/vendor/ses/LICENSE +201 -0
  810. package/vendor/ses/LICENSE-aura +16 -0
  811. package/vendor/ses/LICENSE-caja +13 -0
  812. package/vendor/ses/LICENSE-corejs +19 -0
  813. package/vendor/ses/LICENSE-v8 +9 -0
  814. package/vendor/ses/README.md +968 -0
  815. package/vendor/ses/dist/ses.mjs +15219 -0
  816. package/vendor/ses/package.json +142 -0
  817. package/vendor/wasmpeg/LICENSE +501 -0
  818. package/vendor/wasmpeg/NOTICE +30 -0
  819. package/vendor/wasmpeg/VENDORING.md +35 -0
  820. package/vendor/wasmpeg/dist/cpu.js +2 -0
  821. package/vendor/wasmpeg/dist/cpu.wasm +0 -0
  822. package/vendor/wasmpeg/package.json +45 -0
  823. package/vendor/wasmpeg/source-v1.0.1.tar.gz +0 -0
  824. package/vendor/wasmpeg/src/js/exec.mjs +478 -0
  825. package/vendor/wasmpeg/src/js/ffmpeg.js +94 -0
  826. package/vendor/wasmpeg/src/js/formats.js +84 -0
  827. package/vendor/wasmpeg/src/js/gpu.js +480 -0
  828. package/vendor/wasmpeg/src/js/index.d.ts +154 -0
  829. package/vendor/wasmpeg/src/js/index.js +7 -0
  830. package/vendor/wasmpeg/src/js/wasmpeg.mjs +221 -0
@@ -0,0 +1,1550 @@
1
+ import HTMLElement from '../html-element/HTMLElement.js';
2
+ import * as PropertySymbol from '../../PropertySymbol.js';
3
+ import ValidityState from '../../validity-state/ValidityState.js';
4
+ import DOMExceptionNameEnum from '../../exception/DOMExceptionNameEnum.js';
5
+ import Event from '../../event/Event.js';
6
+ import HTMLInputElementValueSanitizer from './HTMLInputElementValueSanitizer.js';
7
+ import HTMLInputElementSelectionModeEnum from './HTMLInputElementSelectionModeEnum.js';
8
+ import HTMLInputElementSelectionDirectionEnum from './HTMLInputElementSelectionDirectionEnum.js';
9
+ import type HTMLFormElement from '../html-form-element/HTMLFormElement.js';
10
+ import HTMLInputElementValueStepping from './HTMLInputElementValueStepping.js';
11
+ import FileList from './FileList.js';
12
+ import type HTMLLabelElement from '../html-label-element/HTMLLabelElement.js';
13
+ import EventPhaseEnum from '../../event/EventPhaseEnum.js';
14
+ import HTMLInputElementDateUtility from './HTMLInputElementDateUtility.js';
15
+ import HTMLLabelElementUtility from '../html-label-element/HTMLLabelElementUtility.js';
16
+ import type HTMLDataListElement from '../html-data-list-element/HTMLDataListElement.js';
17
+ import type Document from '../document/Document.js';
18
+ import type ShadowRoot from '../shadow-root/ShadowRoot.js';
19
+ import { URL } from 'url';
20
+ import MouseEvent from '../../event/events/MouseEvent.js';
21
+ import type NodeList from '../node/NodeList.js';
22
+ import ElementEventAttributeUtility from '../element/ElementEventAttributeUtility.js';
23
+
24
+ // Valid input type states per HTML spec:
25
+ // https://html.spec.whatwg.org/multipage/input.html#attr-input-type
26
+ const INPUT_TYPE_STATES = new Set([
27
+ 'hidden',
28
+ 'text',
29
+ 'search',
30
+ 'tel',
31
+ 'url',
32
+ 'email',
33
+ 'password',
34
+ 'date',
35
+ 'month',
36
+ 'week',
37
+ 'time',
38
+ 'datetime-local',
39
+ 'number',
40
+ 'range',
41
+ 'color',
42
+ 'checkbox',
43
+ 'radio',
44
+ 'file',
45
+ 'submit',
46
+ 'image',
47
+ 'reset',
48
+ 'button'
49
+ ]);
50
+
51
+ /**
52
+ * HTML Input Element.
53
+ *
54
+ * Reference:
55
+ * https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement.
56
+ *
57
+ * Used as reference for some of the logic (like selection range):
58
+ * https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/nodes/nodes/HTMLInputElement-impl.js (MIT licensed).
59
+ */
60
+ export default class HTMLInputElement extends HTMLElement {
61
+ // Public properties
62
+ public declare cloneNode: (deep?: boolean) => HTMLInputElement;
63
+
64
+ public [PropertySymbol.value]: string | null = null;
65
+ public [PropertySymbol.height] = 0;
66
+ public [PropertySymbol.width] = 0;
67
+ public [PropertySymbol.checked]: boolean | null = null;
68
+ public [PropertySymbol.validationMessage] = '';
69
+ public [PropertySymbol.validity]: ValidityState = new ValidityState(this);
70
+ public [PropertySymbol.files]: FileList = new FileList();
71
+ public [PropertySymbol.indeterminate]: boolean = false;
72
+ public [PropertySymbol.formNode]: HTMLFormElement | null = null;
73
+ public [PropertySymbol.popoverTargetElement]: HTMLElement | null = null;
74
+
75
+ // Private properties
76
+ #selectionStart: number | null = null;
77
+ #selectionEnd: number | null = null;
78
+ #selectionDirection: HTMLInputElementSelectionDirectionEnum =
79
+ HTMLInputElementSelectionDirectionEnum.none;
80
+
81
+ // Events
82
+
83
+ /* eslint-disable jsdoc/require-jsdoc */
84
+
85
+ public get oninput(): ((event: Event) => void) | null {
86
+ return ElementEventAttributeUtility.getEventListener(this, 'oninput');
87
+ }
88
+
89
+ public set oninput(value: ((event: Event) => void) | null) {
90
+ this[PropertySymbol.propertyEventListeners].set('oninput', value);
91
+ }
92
+
93
+ public get oninvalid(): ((event: Event) => void) | null {
94
+ return ElementEventAttributeUtility.getEventListener(this, 'oninvalid');
95
+ }
96
+
97
+ public set oninvalid(value: ((event: Event) => void) | null) {
98
+ this[PropertySymbol.propertyEventListeners].set('oninvalid', value);
99
+ }
100
+
101
+ public get onselectionchange(): ((event: Event) => void) | null {
102
+ return ElementEventAttributeUtility.getEventListener(this, 'onselectionchange');
103
+ }
104
+
105
+ public set onselectionchange(value: ((event: Event) => void) | null) {
106
+ this[PropertySymbol.propertyEventListeners].set('onselectionchange', value);
107
+ }
108
+
109
+ /* eslint-enable jsdoc/require-jsdoc */
110
+
111
+ /**
112
+ * Returns default checked.
113
+ *
114
+ * @returns Default checked.
115
+ */
116
+ public get defaultChecked(): boolean {
117
+ return this.hasAttribute('checked');
118
+ }
119
+
120
+ /**
121
+ * Sets default checked.
122
+ *
123
+ * @param defaultChecked Default checked.
124
+ */
125
+ public set defaultChecked(defaultChecked: boolean) {
126
+ if (defaultChecked) {
127
+ this.setAttribute('checked', '');
128
+ } else {
129
+ this.removeAttribute('checked');
130
+ }
131
+ }
132
+
133
+ /**
134
+ * Returns files.
135
+ *
136
+ * @returns Files.
137
+ */
138
+ public get files(): FileList {
139
+ return this[PropertySymbol.files];
140
+ }
141
+
142
+ /**
143
+ * Sets files.
144
+ *
145
+ * @param files Files.
146
+ */
147
+ public set files(files: FileList) {
148
+ this[PropertySymbol.files] = files;
149
+ }
150
+
151
+ /**
152
+ * Returns form action.
153
+ *
154
+ * @returns Form action.
155
+ */
156
+ public get formAction(): string {
157
+ if (!this.hasAttribute('formaction')) {
158
+ return this[PropertySymbol.ownerDocument].location.href;
159
+ }
160
+
161
+ try {
162
+ return new URL(
163
+ this.getAttribute('formaction')!,
164
+ this[PropertySymbol.ownerDocument].location.href
165
+ ).href;
166
+ } catch (e) {
167
+ return '';
168
+ }
169
+ }
170
+
171
+ /**
172
+ * Sets form action.
173
+ *
174
+ * @param formAction Form action.
175
+ */
176
+ public set formAction(formAction: string) {
177
+ this.setAttribute('formaction', formAction);
178
+ }
179
+
180
+ /**
181
+ * Returns form enctype.
182
+ *
183
+ * @returns Form enctype.
184
+ */
185
+ public get formEnctype(): string {
186
+ return this.getAttribute('formenctype') || '';
187
+ }
188
+
189
+ /**
190
+ * Sets form enctype.
191
+ *
192
+ * @param formEnctype Form enctype.
193
+ */
194
+ public set formEnctype(formEnctype: string) {
195
+ this.setAttribute('formenctype', formEnctype);
196
+ }
197
+
198
+ /**
199
+ * Returns form method.
200
+ *
201
+ * @returns Form method.
202
+ */
203
+ public get formMethod(): string {
204
+ return this.getAttribute('formmethod') || '';
205
+ }
206
+
207
+ /**
208
+ * Sets form method.
209
+ *
210
+ * @param formMethod Form method.
211
+ */
212
+ public set formMethod(formMethod: string) {
213
+ this.setAttribute('formmethod', formMethod);
214
+ }
215
+
216
+ /**
217
+ * Returns no validate.
218
+ *
219
+ * @returns No validate.
220
+ */
221
+ public get formNoValidate(): boolean {
222
+ return this.getAttribute('formnovalidate') !== null;
223
+ }
224
+
225
+ /**
226
+ * Sets no validate.
227
+ *
228
+ * @param formNoValidate No validate.
229
+ */
230
+ public set formNoValidate(formNoValidate: boolean) {
231
+ if (!formNoValidate) {
232
+ this.removeAttribute('formnovalidate');
233
+ } else {
234
+ this.setAttribute('formnovalidate', '');
235
+ }
236
+ }
237
+
238
+ /**
239
+ * Returns form target.
240
+ *
241
+ * @returns Form target.
242
+ */
243
+ public get formTarget(): string {
244
+ return this.getAttribute('formtarget') || '';
245
+ }
246
+
247
+ /**
248
+ * Sets form target.
249
+ *
250
+ * @param formTarget Form target.
251
+ */
252
+ public set formTarget(formTarget: string) {
253
+ this.setAttribute('formtarget', formTarget);
254
+ }
255
+
256
+ /**
257
+ * Returns the parent form element.
258
+ *
259
+ * @returns Form.
260
+ */
261
+ public get form(): HTMLFormElement | null {
262
+ if (this[PropertySymbol.formNode]) {
263
+ return this[PropertySymbol.formNode];
264
+ }
265
+ const id = this.getAttribute('form');
266
+ if (!id || !this[PropertySymbol.isConnected]) {
267
+ return null;
268
+ }
269
+ return <HTMLFormElement>this[PropertySymbol.ownerDocument].getElementById(id);
270
+ }
271
+
272
+ /**
273
+ * Returns validation message.
274
+ *
275
+ * @returns Validation message.
276
+ */
277
+ public get validationMessage(): string {
278
+ const customMessage = this[PropertySymbol.validationMessage];
279
+ if (customMessage) {
280
+ return customMessage;
281
+ }
282
+ if (this.willValidate && !this.validity.valid) {
283
+ return 'Constraints not satisfied';
284
+ }
285
+ return '';
286
+ }
287
+
288
+ /**
289
+ * Returns validity.
290
+ *
291
+ * @returns Validity.
292
+ */
293
+ public get validity(): ValidityState {
294
+ return this[PropertySymbol.validity];
295
+ }
296
+
297
+ /**
298
+ * Returns height.
299
+ *
300
+ * @returns Height.
301
+ */
302
+ public get height(): number {
303
+ return this[PropertySymbol.height];
304
+ }
305
+
306
+ /**
307
+ * Sets height.
308
+ *
309
+ * @param height Height.
310
+ */
311
+ public set height(height: number) {
312
+ this[PropertySymbol.height] = height;
313
+ this.setAttribute('height', String(height));
314
+ }
315
+
316
+ /**
317
+ * Returns width.
318
+ *
319
+ * @returns Width.
320
+ */
321
+ public get width(): number {
322
+ return this[PropertySymbol.width];
323
+ }
324
+
325
+ /**
326
+ * Sets width.
327
+ *
328
+ * @param width Width.
329
+ */
330
+ public set width(width: number) {
331
+ this[PropertySymbol.width] = width;
332
+ this.setAttribute('width', String(width));
333
+ }
334
+
335
+ /**
336
+ * Returns size.
337
+ *
338
+ * @returns Size.
339
+ */
340
+ public get size(): number {
341
+ const size = this.getAttribute('size');
342
+ if (size !== null) {
343
+ return parseInt(size);
344
+ }
345
+ return 20;
346
+ }
347
+
348
+ /**
349
+ * Sets size.
350
+ *
351
+ * @param size Size.
352
+ */
353
+ public set size(size: number) {
354
+ this.setAttribute('size', String(size));
355
+ }
356
+
357
+ /**
358
+ * Returns minlength.
359
+ *
360
+ * @returns Min length.
361
+ */
362
+ public get minLength(): number {
363
+ const minLength = this.getAttribute('minlength');
364
+ if (minLength !== null) {
365
+ return parseInt(minLength);
366
+ }
367
+ return -1;
368
+ }
369
+
370
+ /**
371
+ * Sets minlength.
372
+ *
373
+ * @param minLength Min length.
374
+ */
375
+ public set minLength(minlength: number) {
376
+ this.setAttribute('minlength', String(minlength));
377
+ }
378
+
379
+ /**
380
+ * Returns maxlength.
381
+ *
382
+ * @returns Max length.
383
+ */
384
+ public get maxLength(): number {
385
+ const maxLength = this.getAttribute('maxlength');
386
+ if (maxLength !== null) {
387
+ return parseInt(maxLength);
388
+ }
389
+ return -1;
390
+ }
391
+
392
+ /**
393
+ * Sets maxlength.
394
+ *
395
+ * @param maxlength Max length.
396
+ */
397
+ public set maxLength(maxLength: number) {
398
+ this.setAttribute('maxlength', String(maxLength));
399
+ }
400
+
401
+ /**
402
+ * Returns type.
403
+ *
404
+ * @returns Type. Defaults to "text".
405
+ */
406
+ public get type(): string {
407
+ const value = (this.getAttribute('type') ?? '').toLowerCase();
408
+ return INPUT_TYPE_STATES.has(value) ? value : 'text';
409
+ }
410
+
411
+ /**
412
+ * Sets type.
413
+ *
414
+ * @param type Type.
415
+ */
416
+ public set type(type: string) {
417
+ this.setAttribute('type', type.toLowerCase());
418
+ }
419
+
420
+ /**
421
+ * Returns name.
422
+ *
423
+ * @returns Name.
424
+ */
425
+ public get name(): string {
426
+ return this.getAttribute('name') || '';
427
+ }
428
+
429
+ /**
430
+ * Sets name.
431
+ *
432
+ * @param name Name.
433
+ */
434
+ public set name(name: string) {
435
+ this.setAttribute('name', name);
436
+ }
437
+
438
+ /**
439
+ * Returns alt.
440
+ *
441
+ * @returns Alt.
442
+ */
443
+ public get alt(): string {
444
+ return this.getAttribute('alt') || '';
445
+ }
446
+
447
+ /**
448
+ * Sets alt.
449
+ *
450
+ * @param alt Alt.
451
+ */
452
+ public set alt(alt: string) {
453
+ this.setAttribute('alt', alt);
454
+ }
455
+
456
+ /**
457
+ * Returns min.
458
+ *
459
+ * @returns Min.
460
+ */
461
+ public get min(): string {
462
+ return this.getAttribute('min') || '';
463
+ }
464
+
465
+ /**
466
+ * Sets min.
467
+ *
468
+ * @param min Min.
469
+ */
470
+ public set min(min: string) {
471
+ this.setAttribute('min', min);
472
+ }
473
+
474
+ /**
475
+ * Returns max.
476
+ *
477
+ * @returns Max.
478
+ */
479
+ public get max(): string {
480
+ return this.getAttribute('max') || '';
481
+ }
482
+
483
+ /**
484
+ * Sets max.
485
+ *
486
+ * @param max Max.
487
+ */
488
+ public set max(max: string) {
489
+ this.setAttribute('max', max);
490
+ }
491
+
492
+ /**
493
+ * Returns pattern.
494
+ *
495
+ * @returns Pattern.
496
+ */
497
+ public get pattern(): string {
498
+ return this.getAttribute('pattern') || '';
499
+ }
500
+
501
+ /**
502
+ * Sets pattern.
503
+ *
504
+ * @param pattern Pattern.
505
+ */
506
+ public set pattern(pattern: string) {
507
+ this.setAttribute('pattern', pattern);
508
+ }
509
+
510
+ /**
511
+ * Returns placeholder.
512
+ *
513
+ * @returns Placeholder.
514
+ */
515
+ public get placeholder(): string {
516
+ return this.getAttribute('placeholder') || '';
517
+ }
518
+
519
+ /**
520
+ * Sets placeholder.
521
+ *
522
+ * @param placeholder Placeholder.
523
+ */
524
+ public set placeholder(placeholder: string) {
525
+ this.setAttribute('placeholder', placeholder);
526
+ }
527
+
528
+ /**
529
+ * Returns step.
530
+ *
531
+ * @returns Step.
532
+ */
533
+ public get step(): string {
534
+ return this.getAttribute('step') || '';
535
+ }
536
+
537
+ /**
538
+ * Sets step.
539
+ *
540
+ * @param step Step.
541
+ */
542
+ public set step(step: string) {
543
+ this.setAttribute('step', step);
544
+ }
545
+
546
+ /**
547
+ * Returns inputmode.
548
+ *
549
+ * @returns Inputmode.
550
+ */
551
+ public get inputMode(): string {
552
+ return this.getAttribute('inputmode') || '';
553
+ }
554
+
555
+ /**
556
+ * Sets inputmode.
557
+ *
558
+ * @param inputmode Inputmode.
559
+ */
560
+ public set inputMode(inputmode: string) {
561
+ this.setAttribute('inputmode', inputmode);
562
+ }
563
+
564
+ /**
565
+ * Returns accept.
566
+ *
567
+ * @returns Accept.
568
+ */
569
+ public get accept(): string {
570
+ return this.getAttribute('accept') || '';
571
+ }
572
+
573
+ /**
574
+ * Sets accept.
575
+ *
576
+ * @param accept Accept.
577
+ */
578
+ public set accept(accept: string) {
579
+ this.setAttribute('accept', accept);
580
+ }
581
+
582
+ /**
583
+ * Returns allowdirs.
584
+ *
585
+ * @returns Allowdirs.
586
+ */
587
+ public get allowdirs(): string {
588
+ return this.getAttribute('allowdirs') || '';
589
+ }
590
+
591
+ /**
592
+ * Sets allowdirs.
593
+ *
594
+ * @param allowdirs Allowdirs.
595
+ */
596
+ public set allowdirs(allowdirs: string) {
597
+ this.setAttribute('allowdirs', allowdirs);
598
+ }
599
+
600
+ /**
601
+ * Returns autocomplete.
602
+ *
603
+ * @returns Autocomplete.
604
+ */
605
+ public get autocomplete(): string {
606
+ return this.getAttribute('autocomplete') || '';
607
+ }
608
+
609
+ /**
610
+ * Sets autocomplete.
611
+ *
612
+ * @param autocomplete Autocomplete.
613
+ */
614
+ public set autocomplete(autocomplete: string) {
615
+ this.setAttribute('autocomplete', autocomplete);
616
+ }
617
+
618
+ /**
619
+ * Returns src.
620
+ *
621
+ * @returns Src.
622
+ */
623
+ public get src(): string {
624
+ return this.getAttribute('src') || '';
625
+ }
626
+
627
+ /**
628
+ * Sets src.
629
+ *
630
+ * @param src Src.
631
+ */
632
+ public set src(src: string) {
633
+ this.setAttribute('src', src);
634
+ }
635
+
636
+ /**
637
+ * Returns defaultValue.
638
+ *
639
+ * @returns Defaultvalue.
640
+ */
641
+ public get defaultValue(): string {
642
+ return this.getAttribute('value') || '';
643
+ }
644
+
645
+ /**
646
+ * Sets defaultValue.
647
+ *
648
+ * @param defaultValue Defaultvalue.
649
+ */
650
+ public set defaultValue(defaultValue: string) {
651
+ this.setAttribute('value', defaultValue);
652
+ }
653
+
654
+ /**
655
+ * Returns read only.
656
+ *
657
+ * @returns Read only.
658
+ */
659
+ public get readOnly(): boolean {
660
+ return this.getAttribute('readonly') !== null;
661
+ }
662
+
663
+ /**
664
+ * Sets read only.
665
+ *
666
+ * @param readOnly Read only.
667
+ */
668
+ public set readOnly(readOnly: boolean) {
669
+ if (!readOnly) {
670
+ this.removeAttribute('readonly');
671
+ } else {
672
+ this.setAttribute('readonly', '');
673
+ }
674
+ }
675
+
676
+ /**
677
+ * Returns disabled.
678
+ *
679
+ * @returns Disabled.
680
+ */
681
+ public get disabled(): boolean {
682
+ return this.getAttribute('disabled') !== null;
683
+ }
684
+
685
+ /**
686
+ * Sets disabled.
687
+ *
688
+ * @param disabled Disabled.
689
+ */
690
+ public set disabled(disabled: boolean) {
691
+ if (!disabled) {
692
+ this.removeAttribute('disabled');
693
+ } else {
694
+ this.setAttribute('disabled', '');
695
+ }
696
+ }
697
+
698
+ /**
699
+ * Returns autofocus.
700
+ *
701
+ * @returns Autofocus.
702
+ */
703
+ public get autofocus(): boolean {
704
+ return this.getAttribute('autofocus') !== null;
705
+ }
706
+
707
+ /**
708
+ * Sets autofocus.
709
+ *
710
+ * @param autofocus Autofocus.
711
+ */
712
+ public set autofocus(autofocus: boolean) {
713
+ if (!autofocus) {
714
+ this.removeAttribute('autofocus');
715
+ } else {
716
+ this.setAttribute('autofocus', '');
717
+ }
718
+ }
719
+
720
+ /**
721
+ * Returns required.
722
+ *
723
+ * @returns Required.
724
+ */
725
+ public get required(): boolean {
726
+ return this.getAttribute('required') !== null;
727
+ }
728
+
729
+ /**
730
+ * Sets required.
731
+ *
732
+ * @param required Required.
733
+ */
734
+ public set required(required: boolean) {
735
+ if (!required) {
736
+ this.removeAttribute('required');
737
+ } else {
738
+ this.setAttribute('required', '');
739
+ }
740
+ }
741
+
742
+ /**
743
+ * Returns indeterminate.
744
+ *
745
+ * @returns Indeterminate.
746
+ */
747
+ public get indeterminate(): boolean {
748
+ return this[PropertySymbol.indeterminate];
749
+ }
750
+
751
+ /**
752
+ * Sets indeterminate.
753
+ *
754
+ * @param indeterminate Indeterminate.
755
+ */
756
+ public set indeterminate(indeterminate: boolean) {
757
+ this[PropertySymbol.indeterminate] = Boolean(indeterminate);
758
+ }
759
+
760
+ /**
761
+ * Returns multiple.
762
+ *
763
+ * @returns Multiple.
764
+ */
765
+ public get multiple(): boolean {
766
+ return this.getAttribute('multiple') !== null;
767
+ }
768
+
769
+ /**
770
+ * Sets multiple.
771
+ *
772
+ * @param multiple Multiple.
773
+ */
774
+ public set multiple(multiple: boolean) {
775
+ if (!multiple) {
776
+ this.removeAttribute('multiple');
777
+ } else {
778
+ this.setAttribute('multiple', '');
779
+ }
780
+ }
781
+
782
+ /**
783
+ * Returns checked.
784
+ *
785
+ * @returns Checked.
786
+ */
787
+ public get checked(): boolean {
788
+ if (this[PropertySymbol.checked] !== null) {
789
+ return this[PropertySymbol.checked];
790
+ }
791
+ return this.getAttribute('checked') !== null;
792
+ }
793
+
794
+ /**
795
+ * Sets checked.
796
+ *
797
+ * @param checked Checked.
798
+ */
799
+ public set checked(checked: boolean) {
800
+ this.#setChecked(checked);
801
+ }
802
+
803
+ /**
804
+ * Returns value.
805
+ *
806
+ * @returns Value.
807
+ */
808
+ public get value(): string {
809
+ switch (this.type) {
810
+ case 'hidden':
811
+ case 'submit':
812
+ case 'image':
813
+ case 'reset':
814
+ case 'button':
815
+ return this.getAttribute('value') || '';
816
+ case 'checkbox':
817
+ case 'radio':
818
+ const attritube = this.getAttribute('value');
819
+ return attritube !== null ? attritube : 'on';
820
+ case 'file':
821
+ return this[PropertySymbol.files].length > 0
822
+ ? '/fake/path/' + this[PropertySymbol.files][0].name
823
+ : '';
824
+ }
825
+
826
+ if (this[PropertySymbol.value] === null) {
827
+ return this.getAttribute('value') || '';
828
+ }
829
+
830
+ return this[PropertySymbol.value];
831
+ }
832
+
833
+ /**
834
+ * Sets value.
835
+ *
836
+ * @param value Value.
837
+ */
838
+ public set value(value: string | null) {
839
+ // The value maybe not string, so we need to convert it to string
840
+ value = value === null ? '' : String(value);
841
+ switch (this.type) {
842
+ case 'hidden':
843
+ case 'submit':
844
+ case 'image':
845
+ case 'reset':
846
+ case 'button':
847
+ case 'checkbox':
848
+ case 'radio':
849
+ this.setAttribute('value', value);
850
+ break;
851
+ case 'file':
852
+ if (value !== null && value !== '') {
853
+ throw new this[PropertySymbol.window].DOMException(
854
+ 'Input elements of type "file" may only programmatically set the value to empty string.',
855
+ DOMExceptionNameEnum.invalidStateError
856
+ );
857
+ }
858
+ this[PropertySymbol.files] = new FileList();
859
+ break;
860
+ default:
861
+ const oldValue = this.value;
862
+ this[PropertySymbol.value] = HTMLInputElementValueSanitizer.sanitize(this, value);
863
+
864
+ if (oldValue !== this[PropertySymbol.value]) {
865
+ this.#selectionStart = this[PropertySymbol.value].length;
866
+ this.#selectionEnd = this[PropertySymbol.value].length;
867
+ this.#selectionDirection = HTMLInputElementSelectionDirectionEnum.none;
868
+ }
869
+
870
+ break;
871
+ }
872
+ }
873
+
874
+ /**
875
+ * Returns selection start.
876
+ *
877
+ * @returns Selection start.
878
+ */
879
+ public get selectionStart(): number | null {
880
+ if (!this.#isSelectionSupported()) {
881
+ return null;
882
+ }
883
+
884
+ if (this.#selectionStart === null) {
885
+ return this.value.length;
886
+ }
887
+
888
+ return this.#selectionStart;
889
+ }
890
+
891
+ /**
892
+ * Sets selection start.
893
+ *
894
+ * @param start Start.
895
+ */
896
+ public set selectionStart(start: number) {
897
+ if (!this.#isSelectionSupported()) {
898
+ throw new this[PropertySymbol.window].DOMException(
899
+ `The input element's type (${this.type}) does not support selection.`,
900
+ DOMExceptionNameEnum.invalidStateError
901
+ );
902
+ }
903
+
904
+ this.setSelectionRange(start, Math.max(start, this.selectionEnd!), this.#selectionDirection);
905
+ }
906
+
907
+ /**
908
+ * Returns selection end.
909
+ *
910
+ * @returns Selection end.
911
+ */
912
+ public get selectionEnd(): number | null {
913
+ if (!this.#isSelectionSupported()) {
914
+ return null;
915
+ }
916
+
917
+ if (this.#selectionEnd === null) {
918
+ return this.value.length;
919
+ }
920
+
921
+ return this.#selectionEnd;
922
+ }
923
+
924
+ /**
925
+ * Sets selection end.
926
+ *
927
+ * @param end End.
928
+ */
929
+ public set selectionEnd(end: number) {
930
+ if (!this.#isSelectionSupported()) {
931
+ throw new this[PropertySymbol.window].DOMException(
932
+ `The input element's type (${this.type}) does not support selection.`,
933
+ DOMExceptionNameEnum.invalidStateError
934
+ );
935
+ }
936
+
937
+ this.setSelectionRange(this.selectionStart!, end, this.#selectionDirection);
938
+ }
939
+
940
+ /**
941
+ * Returns selection direction.
942
+ *
943
+ * @returns Selection direction.
944
+ */
945
+ public get selectionDirection(): string | null {
946
+ if (!this.#isSelectionSupported()) {
947
+ return null;
948
+ }
949
+
950
+ return this.#selectionDirection;
951
+ }
952
+
953
+ /**
954
+ * Sets selection direction.
955
+ *
956
+ * @param direction Direction.
957
+ */
958
+ public set selectionDirection(direction: string) {
959
+ if (!this.#isSelectionSupported()) {
960
+ throw new this[PropertySymbol.window].DOMException(
961
+ `The input element's type (${this.type}) does not support selection.`,
962
+ DOMExceptionNameEnum.invalidStateError
963
+ );
964
+ }
965
+
966
+ this.setSelectionRange(this.#selectionStart!, this.#selectionEnd!, direction);
967
+ }
968
+
969
+ /**
970
+ * Returns "true" if it will validate.
971
+ *
972
+ * @returns "true" if it will validate.
973
+ */
974
+ public get willValidate(): boolean {
975
+ return (
976
+ this.type !== 'hidden' &&
977
+ this.type !== 'reset' &&
978
+ this.type !== 'button' &&
979
+ !this.disabled &&
980
+ !this.readOnly
981
+ );
982
+ }
983
+
984
+ /**
985
+ * Returns value as Date.
986
+ *
987
+ * @returns Date.
988
+ */
989
+ public get valueAsDate(): Date | null {
990
+ switch (this.type) {
991
+ case 'date':
992
+ case 'month':
993
+ return isNaN(new Date(String(this.value)).getTime()) ? null : new Date(this.value);
994
+ case 'week': {
995
+ const d = HTMLInputElementDateUtility.isoWeekDate(this.value);
996
+ return isNaN(d.getTime()) ? null : d;
997
+ }
998
+ case 'time': {
999
+ const d = new Date(`1970-01-01T${this.value}Z`);
1000
+ return isNaN(d.getTime()) ? null : d;
1001
+ }
1002
+ default:
1003
+ return null;
1004
+ }
1005
+ }
1006
+
1007
+ /**
1008
+ * Sets value from a Date.
1009
+ *
1010
+ * @param value Date.
1011
+ */
1012
+ public set valueAsDate(value: Date | null) {
1013
+ // Specs at https://html.spec.whatwg.org/multipage/input.html#dom-input-valueasdate
1014
+ if (!['date', 'month', 'time', 'week'].includes(this.type)) {
1015
+ throw new this[PropertySymbol.window].DOMException(
1016
+ "Failed to set the 'valueAsDate' property on 'HTMLInputElement': This input element does not support Date values.",
1017
+ DOMExceptionNameEnum.invalidStateError
1018
+ );
1019
+ }
1020
+ if (typeof value !== 'object') {
1021
+ throw new this[PropertySymbol.window].TypeError(
1022
+ "Failed to set the 'valueAsDate' property on 'HTMLInputElement': Failed to convert value to 'object'."
1023
+ );
1024
+ } else if (value && !(value instanceof Date)) {
1025
+ throw new this[PropertySymbol.window].TypeError(
1026
+ "Failed to set the 'valueAsDate' property on 'HTMLInputElement': The provided value is not a Date."
1027
+ );
1028
+ } else if (value === null || isNaN(value.getTime())) {
1029
+ this.value = '';
1030
+ return;
1031
+ }
1032
+ switch (this.type) {
1033
+ case 'date':
1034
+ this.value = value.toISOString().split('T')[0];
1035
+ break;
1036
+ case 'month':
1037
+ this.value = value.toISOString().split('T')[0].slice(0, -3);
1038
+ break;
1039
+ case 'time':
1040
+ this.value = value.toISOString().split('T')[1].slice(0, 5);
1041
+ break;
1042
+ case 'week':
1043
+ this.value = HTMLInputElementDateUtility.dateIsoWeek(value);
1044
+ break;
1045
+ }
1046
+ }
1047
+
1048
+ /**
1049
+ * Returns value as number.
1050
+ *
1051
+ * @returns Number.
1052
+ */
1053
+ public get valueAsNumber(): number {
1054
+ const value = this.value;
1055
+ if (!this.type.match(/^(range|number|date|datetime-local|month|time|week)$/) || !value) {
1056
+ return NaN;
1057
+ }
1058
+ switch (this.type) {
1059
+ case 'number':
1060
+ return parseFloat(value);
1061
+ case 'range': {
1062
+ const number = parseFloat(value);
1063
+ const min = parseFloat(this.min) || 0;
1064
+ const max = parseFloat(this.max) || 100;
1065
+ if (isNaN(number)) {
1066
+ return max < min ? min : (min + max) / 2;
1067
+ } else if (number < min) {
1068
+ return min;
1069
+ } else if (number > max) {
1070
+ return max;
1071
+ }
1072
+ return number;
1073
+ }
1074
+ case 'date':
1075
+ return new Date(value).getTime();
1076
+ case 'datetime-local':
1077
+ return new Date(value).getTime() - new Date(value).getTimezoneOffset() * 60000;
1078
+ case 'month':
1079
+ return (new Date(value).getUTCFullYear() - 1970) * 12 + new Date(value).getUTCMonth();
1080
+ case 'time':
1081
+ return (
1082
+ new Date('1970-01-01T' + value).getTime() - new Date('1970-01-01T00:00:00').getTime()
1083
+ );
1084
+ case 'week': {
1085
+ // https://html.spec.whatwg.org/multipage/input.html#week-state-(type=week)
1086
+ const match = value.match(/^(\d{4})-W(\d{2})$/);
1087
+ if (!match) {
1088
+ return NaN;
1089
+ }
1090
+ const d = new Date(Date.UTC(parseInt(match[1], 10), 0));
1091
+ const day = d.getUTCDay();
1092
+ const diff = ((day === 0 ? -6 : 1) - day) * 86400000 + parseInt(match[2], 10) * 604800000;
1093
+ return d.getTime() + diff;
1094
+ }
1095
+ default:
1096
+ return NaN;
1097
+ }
1098
+ }
1099
+
1100
+ /**
1101
+ * Sets value from a number.
1102
+ *
1103
+ * @param value number.
1104
+ */
1105
+ public set valueAsNumber(value: number) {
1106
+ // Specs at https://html.spec.whatwg.org/multipage/input.html
1107
+ switch (this.type) {
1108
+ case 'number':
1109
+ case 'range':
1110
+ // We Rely on HTMLInputElementValueSanitizer
1111
+ this.value = Number(value).toString();
1112
+ break;
1113
+ case 'date':
1114
+ case 'datetime-local': {
1115
+ const d = new Date(Number(value));
1116
+ if (isNaN(d.getTime())) {
1117
+ // Reset to default value
1118
+ this.value = '';
1119
+ break;
1120
+ }
1121
+ if (this.type == 'date') {
1122
+ this.value = d.toISOString().slice(0, 10);
1123
+ } else {
1124
+ this.value = d.toISOString().slice(0, -1);
1125
+ }
1126
+ break;
1127
+ }
1128
+ case 'month':
1129
+ if (!Number.isInteger(value) || value < 0) {
1130
+ this.value = '';
1131
+ } else {
1132
+ this.value = new Date(Date.UTC(1970, Number(value))).toISOString().slice(0, 7);
1133
+ }
1134
+ break;
1135
+ case 'time':
1136
+ if (!Number.isInteger(value) || value < 0) {
1137
+ this.value = '';
1138
+ } else {
1139
+ this.value = new Date(Number(value)).toISOString().slice(11, -1);
1140
+ }
1141
+ break;
1142
+ case 'week': {
1143
+ const d = new Date(Number(value));
1144
+ this.value = isNaN(d.getTime()) ? '' : HTMLInputElementDateUtility.dateIsoWeek(d);
1145
+ break;
1146
+ }
1147
+ default:
1148
+ throw new this[PropertySymbol.window].DOMException(
1149
+ "Failed to set the 'valueAsNumber' property on 'HTMLInputElement': This input element does not support Number values.",
1150
+ DOMExceptionNameEnum.invalidStateError
1151
+ );
1152
+ }
1153
+ }
1154
+
1155
+ /**
1156
+ * Returns the associated label elements.
1157
+ *
1158
+ * @returns Label elements.
1159
+ */
1160
+ public get labels(): NodeList<HTMLLabelElement> {
1161
+ return HTMLLabelElementUtility.getAssociatedLabelElements(this);
1162
+ }
1163
+
1164
+ /**
1165
+ * Returns associated datalist element.
1166
+ *
1167
+ * @returns Data list element.
1168
+ */
1169
+ public get list(): HTMLDataListElement | null {
1170
+ const id = this.getAttribute('list');
1171
+ if (!id) {
1172
+ return null;
1173
+ }
1174
+ const rootNode =
1175
+ <Document | ShadowRoot>this[PropertySymbol.rootNode] || this[PropertySymbol.ownerDocument];
1176
+ return <HTMLDataListElement | null>rootNode.querySelector(`datalist#${id}`);
1177
+ }
1178
+
1179
+ /**
1180
+ * Returns popover target element.
1181
+ *
1182
+ * @returns Popover target element.
1183
+ */
1184
+ public get popoverTargetElement(): HTMLElement | null {
1185
+ return this[PropertySymbol.popoverTargetElement];
1186
+ }
1187
+
1188
+ /**
1189
+ * Sets popover target element.
1190
+ *
1191
+ * @param popoverTargetElement Popover target element.
1192
+ */
1193
+ public set popoverTargetElement(popoverTargetElement: HTMLElement | null) {
1194
+ if (popoverTargetElement !== null && !(popoverTargetElement instanceof HTMLElement)) {
1195
+ throw new this[PropertySymbol.window].TypeError(
1196
+ `Failed to set the 'popoverTargetElement' property on 'HTMLInputElement': Failed to convert value to 'Element'.`
1197
+ );
1198
+ }
1199
+ this[PropertySymbol.popoverTargetElement] = popoverTargetElement;
1200
+ }
1201
+
1202
+ /**
1203
+ * Returns popover target action.
1204
+ *
1205
+ * @returns Popover target action.
1206
+ */
1207
+ public get popoverTargetAction(): string {
1208
+ const value = this.getAttribute('popovertargetaction');
1209
+ if (value === null || (value !== 'hide' && value !== 'show' && value !== 'toggle')) {
1210
+ return 'toggle';
1211
+ }
1212
+ return value;
1213
+ }
1214
+
1215
+ /**
1216
+ * Sets popover target action.
1217
+ *
1218
+ * @param value Popover target action.
1219
+ */
1220
+ public set popoverTargetAction(value: string) {
1221
+ this.setAttribute('popovertargetaction', value);
1222
+ }
1223
+
1224
+ /**
1225
+ * @override
1226
+ */
1227
+ public override get tabIndex(): number {
1228
+ const tabIndex = this.getAttribute('tabindex');
1229
+ if (tabIndex !== null) {
1230
+ const parsed = Number(tabIndex);
1231
+ return isNaN(parsed) ? 0 : parsed;
1232
+ }
1233
+ return 0;
1234
+ }
1235
+
1236
+ /**
1237
+ * @override
1238
+ */
1239
+ public override set tabIndex(tabIndex: number) {
1240
+ super.tabIndex = tabIndex;
1241
+ }
1242
+
1243
+ /**
1244
+ * Sets validation message.
1245
+ *
1246
+ * @param message Message.
1247
+ */
1248
+ public setCustomValidity(message: string): void {
1249
+ this[PropertySymbol.validationMessage] = String(message);
1250
+ }
1251
+
1252
+ /**
1253
+ * Selects the text.
1254
+ */
1255
+ public select(): void {
1256
+ if (!this.#isSelectionSupported()) {
1257
+ return;
1258
+ }
1259
+
1260
+ this.#selectionStart = 0;
1261
+ this.#selectionEnd = this.value.length;
1262
+ this.#selectionDirection = HTMLInputElementSelectionDirectionEnum.none;
1263
+
1264
+ this.dispatchEvent(new Event('select', { bubbles: true, cancelable: false }));
1265
+ }
1266
+
1267
+ /**
1268
+ * Set selection range.
1269
+ *
1270
+ * @param start Start.
1271
+ * @param end End.
1272
+ * @param [direction="none"] Direction.
1273
+ */
1274
+ public setSelectionRange(start: number, end: number, direction = 'none'): void {
1275
+ if (!this.#isSelectionSupported()) {
1276
+ throw new this[PropertySymbol.window].DOMException(
1277
+ `The input element's type (${this.type}) does not support selection.`,
1278
+ DOMExceptionNameEnum.invalidStateError
1279
+ );
1280
+ }
1281
+
1282
+ this.#selectionEnd = Math.min(end, this.value.length);
1283
+ this.#selectionStart = Math.min(start, this.#selectionEnd);
1284
+ this.#selectionDirection =
1285
+ direction === HTMLInputElementSelectionDirectionEnum.forward ||
1286
+ direction === HTMLInputElementSelectionDirectionEnum.backward
1287
+ ? direction
1288
+ : HTMLInputElementSelectionDirectionEnum.none;
1289
+ this.dispatchEvent(new Event('select', { bubbles: true, cancelable: false }));
1290
+ }
1291
+
1292
+ /**
1293
+ * Set range text.
1294
+ *
1295
+ * @param replacement Replacement.
1296
+ * @param [start] Start.
1297
+ * @param [end] End.
1298
+ * @param [direction] Direction.
1299
+ * @param selectionMode
1300
+ */
1301
+ public setRangeText(
1302
+ replacement: string,
1303
+ start: number | null = null,
1304
+ end: number | null = null,
1305
+ selectionMode = HTMLInputElementSelectionModeEnum.preserve
1306
+ ): void {
1307
+ if (!this.#isSelectionSupported()) {
1308
+ throw new this[PropertySymbol.window].DOMException(
1309
+ `The input element's type (${this.type}) does not support selection.`,
1310
+ DOMExceptionNameEnum.invalidStateError
1311
+ );
1312
+ }
1313
+
1314
+ if (start === null) {
1315
+ start = this.#selectionStart!;
1316
+ }
1317
+ if (end === null) {
1318
+ end = this.#selectionEnd!;
1319
+ }
1320
+
1321
+ if (start > end) {
1322
+ throw new this[PropertySymbol.window].DOMException(
1323
+ 'The index is not in the allowed range.',
1324
+ DOMExceptionNameEnum.invalidStateError
1325
+ );
1326
+ }
1327
+
1328
+ start = Math.min(start, this.value.length);
1329
+ end = Math.min(end, this.value.length);
1330
+
1331
+ const val = this.value;
1332
+ let selectionStart = this.#selectionStart!;
1333
+ let selectionEnd = this.#selectionEnd!;
1334
+
1335
+ this.value = val.slice(0, start) + replacement + val.slice(end);
1336
+
1337
+ const newEnd = start + this.value.length;
1338
+
1339
+ switch (selectionMode) {
1340
+ case HTMLInputElementSelectionModeEnum.select:
1341
+ this.setSelectionRange(start, newEnd);
1342
+ break;
1343
+ case HTMLInputElementSelectionModeEnum.start:
1344
+ this.setSelectionRange(start, start);
1345
+ break;
1346
+ case HTMLInputElementSelectionModeEnum.end:
1347
+ this.setSelectionRange(newEnd, newEnd);
1348
+ break;
1349
+ default:
1350
+ const delta = replacement.length - (end - start);
1351
+
1352
+ if (selectionStart > end) {
1353
+ selectionStart += delta;
1354
+ } else if (selectionStart > start) {
1355
+ selectionStart = start;
1356
+ }
1357
+
1358
+ if (selectionEnd > end) {
1359
+ selectionEnd += delta;
1360
+ } else if (selectionEnd > start) {
1361
+ selectionEnd = newEnd;
1362
+ }
1363
+
1364
+ this.setSelectionRange(selectionStart, selectionEnd);
1365
+ break;
1366
+ }
1367
+ }
1368
+
1369
+ /**
1370
+ * Checks validity.
1371
+ *
1372
+ * @returns "true" if the field is valid.
1373
+ */
1374
+ public checkValidity(): boolean {
1375
+ const valid =
1376
+ this.disabled ||
1377
+ this.readOnly ||
1378
+ this.type === 'hidden' ||
1379
+ this.type === 'reset' ||
1380
+ this.type === 'button' ||
1381
+ this[PropertySymbol.validity].valid;
1382
+ if (!valid) {
1383
+ this.dispatchEvent(new Event('invalid', { bubbles: true, cancelable: true }));
1384
+ }
1385
+ return valid;
1386
+ }
1387
+
1388
+ /**
1389
+ * Reports validity.
1390
+ *
1391
+ * @returns "true" if the field is valid.
1392
+ */
1393
+ public reportValidity(): boolean {
1394
+ return this.checkValidity();
1395
+ }
1396
+
1397
+ /**
1398
+ * Steps up.
1399
+ *
1400
+ * @param [increment] Increment.
1401
+ */
1402
+ public stepUp(increment?: number): void {
1403
+ const newValue = HTMLInputElementValueStepping.step(this, 1, increment);
1404
+ if (newValue !== null) {
1405
+ this.value = newValue;
1406
+ }
1407
+ }
1408
+
1409
+ /**
1410
+ * Steps down.
1411
+ *
1412
+ * @param [increment] Increment.
1413
+ */
1414
+ public stepDown(increment?: number): void {
1415
+ const newValue = HTMLInputElementValueStepping.step(this, -1, increment);
1416
+ if (newValue !== null) {
1417
+ this.value = newValue;
1418
+ }
1419
+ }
1420
+
1421
+ /**
1422
+ * @override
1423
+ */
1424
+ public override [PropertySymbol.cloneNode](deep = false): HTMLInputElement {
1425
+ const clone = <HTMLInputElement>super[PropertySymbol.cloneNode](deep);
1426
+ clone[PropertySymbol.value] = this[PropertySymbol.value];
1427
+ clone[PropertySymbol.height] = this[PropertySymbol.height];
1428
+ clone[PropertySymbol.width] = this[PropertySymbol.width];
1429
+ clone[PropertySymbol.files] = <FileList>this[PropertySymbol.files].slice();
1430
+ clone.#selectionStart = this.#selectionStart;
1431
+ clone.#selectionEnd = this.#selectionEnd;
1432
+ clone.#selectionDirection = this.#selectionDirection;
1433
+ return clone;
1434
+ }
1435
+
1436
+ /**
1437
+ * @override
1438
+ */
1439
+ public override dispatchEvent(event: Event): boolean {
1440
+ if (
1441
+ event[PropertySymbol.type] !== 'click' ||
1442
+ event[PropertySymbol.eventPhase] !== EventPhaseEnum.none ||
1443
+ !(event instanceof MouseEvent)
1444
+ ) {
1445
+ return super.dispatchEvent(event);
1446
+ }
1447
+
1448
+ // Do nothing if the input element is disabled and the event is a click event.
1449
+ if (this.disabled) {
1450
+ return false;
1451
+ }
1452
+
1453
+ let previousCheckedValue: boolean | null = null;
1454
+ let previousIndeterminateValue: boolean = this[PropertySymbol.indeterminate];
1455
+
1456
+ // The checkbox or radio button has to be checked before the click event is dispatched, so that event listeners can check the checked value.
1457
+ // However, the value has to be restored if preventDefault() is called on the click event.
1458
+ const type = this.type;
1459
+
1460
+ if (type === 'checkbox' || type === 'radio') {
1461
+ previousCheckedValue = this.checked;
1462
+ this.#setChecked(type === 'checkbox' ? !previousCheckedValue : true);
1463
+ if (type === 'checkbox') {
1464
+ previousIndeterminateValue = this[PropertySymbol.indeterminate];
1465
+ this[PropertySymbol.indeterminate] = false;
1466
+ }
1467
+ }
1468
+
1469
+ // Dispatches the event
1470
+ const returnValue = super.dispatchEvent(event);
1471
+
1472
+ if (
1473
+ event[PropertySymbol.type] !== 'click' ||
1474
+ event[PropertySymbol.eventPhase] !== EventPhaseEnum.none ||
1475
+ !(event instanceof MouseEvent)
1476
+ ) {
1477
+ return returnValue;
1478
+ }
1479
+
1480
+ if (event[PropertySymbol.defaultPrevented]) {
1481
+ // Restore checked state if preventDefault() is triggered inside a listener of the click event.
1482
+ if (previousCheckedValue !== null) {
1483
+ this.#setChecked(previousCheckedValue);
1484
+ this[PropertySymbol.indeterminate] = previousIndeterminateValue;
1485
+ }
1486
+ } else {
1487
+ const type = this.type;
1488
+
1489
+ if (type === 'checkbox' && this[PropertySymbol.isConnected]) {
1490
+ this.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));
1491
+ this.dispatchEvent(new Event('change', { bubbles: true, cancelable: true }));
1492
+ } else if (type === 'radio' && !previousCheckedValue && this[PropertySymbol.isConnected]) {
1493
+ this.dispatchEvent(new Event('input', { bubbles: true, cancelable: true }));
1494
+ this.dispatchEvent(new Event('change', { bubbles: true, cancelable: true }));
1495
+ } else if (type === 'submit' || type === 'reset') {
1496
+ const form = this.form;
1497
+ if (form) {
1498
+ if (type === 'submit' && this[PropertySymbol.isConnected]) {
1499
+ form.requestSubmit(this);
1500
+ } else if (type === 'reset') {
1501
+ form.reset();
1502
+ }
1503
+ }
1504
+ }
1505
+ }
1506
+
1507
+ return returnValue;
1508
+ }
1509
+
1510
+ /**
1511
+ * Checks is selection is supported.
1512
+ *
1513
+ * @returns "true" if selection is supported.
1514
+ */
1515
+ #isSelectionSupported(): boolean {
1516
+ const inputType = this.type;
1517
+ return (
1518
+ inputType === 'text' ||
1519
+ inputType === 'search' ||
1520
+ inputType === 'url' ||
1521
+ inputType === 'tel' ||
1522
+ inputType === 'password'
1523
+ );
1524
+ }
1525
+
1526
+ /**
1527
+ * Sets checked value.
1528
+ *
1529
+ * @param checked Checked.
1530
+ */
1531
+ #setChecked(checked: boolean): void {
1532
+ this[PropertySymbol.checked] = checked;
1533
+ this[PropertySymbol.clearCache]();
1534
+
1535
+ if (checked && this.type === 'radio' && this.name) {
1536
+ const root = <HTMLElement>(
1537
+ (<HTMLFormElement>this[PropertySymbol.formNode] || this.getRootNode())
1538
+ );
1539
+ const radioButtons = <NodeList<HTMLInputElement>>(
1540
+ root.querySelectorAll(`input[type="radio"][name="${this.name}"]`)
1541
+ );
1542
+
1543
+ for (const radioButton of radioButtons) {
1544
+ if (radioButton !== this) {
1545
+ radioButton[PropertySymbol.checked] = false;
1546
+ }
1547
+ }
1548
+ }
1549
+ }
1550
+ }