@aussieljk/forkbook 0.0.1-11 → 0.0.1-12

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 (341) hide show
  1. package/README.md +1 -1
  2. package/assets/create/rendererAssets/common/button.css +6 -6
  3. package/assets/create/rendererAssets/common/header.css +5 -5
  4. package/assets/create/rendererAssets/common/page.css +10 -10
  5. package/dist/_browser-chunks/{Color-QLZNXLSV.js → Color-TA43572R.js} +2 -2
  6. package/dist/_browser-chunks/{DocsRenderer-JXND3PVQ.js → DocsRenderer-DKXSW2OY.js} +2 -2
  7. package/dist/_browser-chunks/{WithTooltip-GNLRTZDF.js → WithTooltip-66AWY4VQ.js} +5 -4
  8. package/dist/_browser-chunks/{chunk-RBCHTR7C.js → chunk-2ELGJRFZ.js} +1 -1
  9. package/dist/_browser-chunks/{chunk-DYNTDJ3O.js → chunk-2UKY4NXZ.js} +1 -1
  10. package/dist/_browser-chunks/{chunk-I4ATZPNZ.js → chunk-2WMECYEY.js} +3 -3
  11. package/dist/_browser-chunks/{chunk-6ELMKWKX.js → chunk-2WZWS7GJ.js} +1 -1
  12. package/dist/_browser-chunks/{chunk-N3NRW5XX.js → chunk-2YWS25WY.js} +1 -1
  13. package/dist/_browser-chunks/{chunk-NGMQJMCY.js → chunk-3O4QUF3D.js} +1 -1
  14. package/dist/_browser-chunks/{chunk-GNZY6LOW.js → chunk-5MRMYSUN.js} +4 -4
  15. package/dist/_browser-chunks/{chunk-RMYQ3QN3.js → chunk-5XGERZHU.js} +15 -12
  16. package/dist/_browser-chunks/{chunk-5WMXI5GW.js → chunk-AQVUHXWY.js} +6 -4
  17. package/dist/_browser-chunks/{chunk-ZHKZKFY4.js → chunk-ARZTIHZK.js} +6 -10
  18. package/dist/_browser-chunks/{chunk-DS2WQZGO.js → chunk-D2Z5KXPS.js} +12 -41
  19. package/dist/_browser-chunks/{chunk-EQKMUQF3.js → chunk-DT7BB545.js} +3 -2
  20. package/dist/_browser-chunks/{chunk-76222HQR.js → chunk-E6QKKKLO.js} +20 -5
  21. package/dist/_browser-chunks/{chunk-QU4RB2WU.js → chunk-F22A5EGD.js} +4 -4
  22. package/dist/_browser-chunks/{chunk-3M5T7BW4.js → chunk-GGALYEQS.js} +1 -1
  23. package/dist/_browser-chunks/{chunk-TTBPZQ24.js → chunk-HGIW4I4J.js} +11 -18
  24. package/dist/_browser-chunks/{chunk-46Z7NGAS.js → chunk-HX443LKV.js} +1 -1
  25. package/dist/_browser-chunks/{chunk-KYSD26D6.js → chunk-IGD46SQI.js} +90 -83
  26. package/dist/_browser-chunks/{chunk-WBLVFDJT.js → chunk-QSYOMLRG.js} +665 -622
  27. package/dist/_browser-chunks/{chunk-2JT76G3E.js → chunk-SBOQ4QPY.js} +15 -15
  28. package/dist/_browser-chunks/{chunk-O24AZJZ7.js → chunk-UDR26TXA.js} +2 -2
  29. package/dist/_browser-chunks/{chunk-5I7E4GMO.js → chunk-WY2LUGOH.js} +1 -1
  30. package/dist/_browser-chunks/{chunk-7DQREF4S.js → chunk-XV3AEPJW.js} +1 -1
  31. package/dist/_browser-chunks/{matchers-YLBYSYAF.js → matchers-2HVLNCVO.js} +4 -4
  32. package/dist/_browser-chunks/{react-dom-client-4OHE3QDV.js → react-dom-client-SLBUX3U3.js} +1 -1
  33. package/dist/_node-chunks/{attached-runtime-J2AKT5WI.js → attached-runtime-AU2RZM4Y.js} +28 -29
  34. package/dist/_node-chunks/{builder-manager-Z4RWF4ZH.js → builder-manager-UPXA2KKT.js} +39 -28
  35. package/dist/_node-chunks/{chunk-NIQSBBT2.js → chunk-22A63J7O.js} +7 -7
  36. package/dist/_node-chunks/{chunk-5P4N734V.js → chunk-22TWJGGQ.js} +28 -43
  37. package/dist/_node-chunks/{chunk-T6P2EJD2.js → chunk-2GJBHF56.js} +6 -6
  38. package/dist/_node-chunks/{chunk-GGCOG7OV.js → chunk-2MGPZNKV.js} +280 -306
  39. package/dist/_node-chunks/{chunk-36LPBTLF.js → chunk-2Q3YWQSK.js} +6 -6
  40. package/dist/_node-chunks/{chunk-OXT6T4AS.js → chunk-2W525A4I.js} +7 -7
  41. package/dist/_node-chunks/{chunk-55S3GGGC.js → chunk-2X3WAH7V.js} +7 -7
  42. package/dist/_node-chunks/{chunk-XH5CXH53.js → chunk-34DNGOCZ.js} +8 -8
  43. package/dist/_node-chunks/{chunk-A7GEBS3Q.js → chunk-3MJZ5GI2.js} +6 -6
  44. package/dist/_node-chunks/{chunk-46Y5H6X5.js → chunk-3X67K6EI.js} +136 -114
  45. package/dist/_node-chunks/{chunk-GMKLTDKN.js → chunk-5KMW5XXM.js} +6 -6
  46. package/dist/_node-chunks/{chunk-AVL7GUOZ.js → chunk-5MYXWAKD.js} +515 -1040
  47. package/dist/_node-chunks/{chunk-MI7WBXWX.js → chunk-5N7YRHXJ.js} +6 -6
  48. package/dist/_node-chunks/{chunk-LKITAODU.js → chunk-6772LYNF.js} +7 -7
  49. package/dist/_node-chunks/{chunk-IRPQQARO.js → chunk-76M6JG5T.js} +7 -7
  50. package/dist/_node-chunks/{chunk-YBG7HVP7.js → chunk-7F6TIY4T.js} +8 -8
  51. package/dist/_node-chunks/{chunk-IFAV3CER.js → chunk-7SBWGNA7.js} +10 -10
  52. package/dist/_node-chunks/{chunk-LHNHFYK3.js → chunk-ABCEMTIP.js} +6 -6
  53. package/dist/_node-chunks/{chunk-OPT5A55S.js → chunk-AHNN3TQH.js} +8 -8
  54. package/dist/_node-chunks/{chunk-76KKKLEE.js → chunk-BDATIKVV.js} +7 -7
  55. package/dist/_node-chunks/{chunk-SJXLINHV.js → chunk-BMM74ZQW.js} +6 -6
  56. package/dist/_node-chunks/{chunk-XSVOMORJ.js → chunk-BOWRRVJM.js} +6 -6
  57. package/dist/_node-chunks/{chunk-FB2BOL6I.js → chunk-BTDLJXAT.js} +6 -6
  58. package/dist/_node-chunks/{chunk-W7HY3ELZ.js → chunk-C2HVGXLD.js} +224 -181
  59. package/dist/_node-chunks/chunk-CWIJ2D5F.js +18 -0
  60. package/dist/_node-chunks/{chunk-BKND5XP2.js → chunk-DNX4BLMS.js} +7 -7
  61. package/dist/_node-chunks/{chunk-FTYDKQCO.js → chunk-DXR3YGRT.js} +6 -6
  62. package/dist/_node-chunks/{chunk-6E34W4UX.js → chunk-EFZAYIPN.js} +6 -6
  63. package/dist/_node-chunks/{chunk-54EHKXV7.js → chunk-FAR3NIPG.js} +8 -8
  64. package/dist/_node-chunks/{chunk-3EBGFRAH.js → chunk-FFUIQJRI.js} +32 -40
  65. package/dist/_node-chunks/{chunk-2WVLC5M2.js → chunk-FKI7K3GE.js} +6 -6
  66. package/dist/_node-chunks/{chunk-TAMTPVYZ.js → chunk-FR67COFW.js} +7 -7
  67. package/dist/_node-chunks/{chunk-IVAOJWPF.js → chunk-FUDG3QKB.js} +7 -7
  68. package/dist/_node-chunks/{chunk-XVOIYGTJ.js → chunk-G6GOV7H7.js} +6 -6
  69. package/dist/_node-chunks/{chunk-MW4OAPPD.js → chunk-H7UVQBCQ.js} +8 -8
  70. package/dist/_node-chunks/{chunk-PYVGF5F2.js → chunk-HMQUTLMS.js} +6 -6
  71. package/dist/_node-chunks/{chunk-NLNAIU4I.js → chunk-HPXM4SGT.js} +9 -9
  72. package/dist/_node-chunks/{chunk-APPFF22V.js → chunk-HW4T3OXA.js} +7 -7
  73. package/dist/_node-chunks/{chunk-FUG5LYKS.js → chunk-HW7RCOV4.js} +8 -8
  74. package/dist/_node-chunks/{chunk-PXOD36TR.js → chunk-IFHNMS7I.js} +19 -19
  75. package/dist/_node-chunks/{chunk-W3KFVTWV.js → chunk-IKUSSZJ3.js} +10 -10
  76. package/dist/_node-chunks/{chunk-C5OFHB3N.js → chunk-IOXDHKFF.js} +7 -7
  77. package/dist/_node-chunks/chunk-J3CNNXKQ.js +11 -0
  78. package/dist/_node-chunks/{chunk-2U5J7YTA.js → chunk-JB4457FJ.js} +6 -6
  79. package/dist/_node-chunks/{chunk-VZG3OKFO.js → chunk-JHX35YKT.js} +6 -6
  80. package/dist/_node-chunks/{chunk-LAIED5XU.js → chunk-JKPKEYSH.js} +6 -6
  81. package/dist/_node-chunks/{chunk-NLLM4MDK.js → chunk-JMFTALJW.js} +6 -6
  82. package/dist/_node-chunks/{chunk-AKMPPLT5.js → chunk-JXS4P2RM.js} +7 -7
  83. package/dist/_node-chunks/{chunk-6UASHVMR.js → chunk-K2K6KTBC.js} +8 -8
  84. package/dist/_node-chunks/{chunk-S3NDLFYL.js → chunk-KMC5WWQS.js} +7 -7
  85. package/dist/_node-chunks/{chunk-BBU2FUPC.js → chunk-KQTFSKC6.js} +8 -8
  86. package/dist/_node-chunks/{chunk-3IIQSDCO.js → chunk-KZPWZM2E.js} +37 -34
  87. package/dist/_node-chunks/{chunk-7YQTID2W.js → chunk-LTJ4AYDM.js} +6 -6
  88. package/dist/_node-chunks/{chunk-32FLWHUC.js → chunk-MNNESU33.js} +497 -475
  89. package/dist/_node-chunks/{chunk-WBCKO5LP.js → chunk-MNQVVJZN.js} +6 -6
  90. package/dist/_node-chunks/{chunk-MBIVTOJK.js → chunk-NO7MF6VR.js} +6 -6
  91. package/dist/_node-chunks/{chunk-BSQB5B57.js → chunk-NPSIAK46.js} +6 -6
  92. package/dist/_node-chunks/{chunk-DGWKJQ6G.js → chunk-NUSHY22I.js} +62 -7
  93. package/dist/_node-chunks/{chunk-OJWUUSA4.js → chunk-NXRZL2PR.js} +6 -6
  94. package/dist/_node-chunks/{chunk-FEC5PGJO.js → chunk-O2CCUB5T.js} +7 -7
  95. package/dist/_node-chunks/{chunk-6UAJLEIO.js → chunk-ORSH2FXG.js} +6 -6
  96. package/dist/_node-chunks/{chunk-GYFR2JLS.js → chunk-OSNOV4EH.js} +7 -7
  97. package/dist/_node-chunks/{chunk-GTXZNA2L.js → chunk-PHB6QBHM.js} +10 -10
  98. package/dist/_node-chunks/{chunk-WO4UEQI6.js → chunk-POA32M7F.js} +21 -21
  99. package/dist/_node-chunks/{chunk-GO3YSBPE.js → chunk-Q64ESHBN.js} +8 -8
  100. package/dist/_node-chunks/{chunk-RNRGXAFV.js → chunk-QBWGJYHY.js} +6 -6
  101. package/dist/_node-chunks/{chunk-ZEYODVQT.js → chunk-QSKVNZCF.js} +7 -7
  102. package/dist/_node-chunks/{chunk-D5ADPGA4.js → chunk-QX6RXAEU.js} +6 -6
  103. package/dist/_node-chunks/{chunk-PQTEFQIJ.js → chunk-R73PEGQU.js} +9 -9
  104. package/dist/_node-chunks/{chunk-Z2ZTDQDY.js → chunk-RHH7VDIY.js} +8 -8
  105. package/dist/_node-chunks/{chunk-R7VDUSKY.js → chunk-RMJNWFPV.js} +9 -9
  106. package/dist/_node-chunks/{chunk-5GOXN5M4.js → chunk-RT2LVWTC.js} +7 -7
  107. package/dist/_node-chunks/{chunk-XCJ2ZIQ4.js → chunk-SPCPGRYF.js} +7 -7
  108. package/dist/_node-chunks/{chunk-Y4W4B3E7.js → chunk-SUHBBHKR.js} +6 -6
  109. package/dist/_node-chunks/{chunk-VKRGTLQJ.js → chunk-TXZTC6LA.js} +22 -22
  110. package/dist/_node-chunks/{chunk-XO54HM4P.js → chunk-U5HVQTHI.js} +6 -6
  111. package/dist/_node-chunks/{chunk-XICRXTTE.js → chunk-UFZUSE3Y.js} +6 -6
  112. package/dist/_node-chunks/{chunk-ALGQMFMN.js → chunk-UGQFYYBC.js} +6 -6
  113. package/dist/_node-chunks/{chunk-ER3X3AQ7.js → chunk-UKLCYEZU.js} +7 -7
  114. package/dist/_node-chunks/{chunk-J3SM62J3.js → chunk-VJEN2JM3.js} +8 -8
  115. package/dist/_node-chunks/{chunk-7IOSIYW2.js → chunk-W5ZAUN5R.js} +7 -7
  116. package/dist/_node-chunks/{chunk-MXLHIEXC.js → chunk-WNEWL2PL.js} +6 -6
  117. package/dist/_node-chunks/{chunk-CEYSYQLV.js → chunk-WUVQ465T.js} +6 -6
  118. package/dist/_node-chunks/{chunk-REIDJUVJ.js → chunk-XCNYQV2M.js} +19 -15
  119. package/dist/_node-chunks/{chunk-TKMXEHM4.js → chunk-XOAWAXUH.js} +7 -7
  120. package/dist/_node-chunks/chunk-Y472MP5U.js +281 -0
  121. package/dist/_node-chunks/{chunk-NFDQT7UW.js → chunk-ZCKTYMZT.js} +320 -316
  122. package/dist/_node-chunks/{chunk-5JLVSH44.js → chunk-ZUK5ZLPP.js} +8 -8
  123. package/dist/_node-chunks/dist-2DPC664Y.js +27 -0
  124. package/dist/_node-chunks/dist-XBFUDMFQ.js +16 -0
  125. package/dist/_node-chunks/{local-runtime-YDAW5RJV.js → local-runtime-Z667YPXR.js} +19 -20
  126. package/dist/_node-chunks/{mdx-plugin-XLDET5LV.js → mdx-plugin-BPRPTZNP.js} +13 -13
  127. package/dist/_node-chunks/{monorepo-NWMAHGOM.js → monorepo-GO54BY34.js} +11 -11
  128. package/dist/_node-chunks/{monorepo-optimized-tests-relaxed-limits-no-story-deletion-4B6IZ7JD.js → monorepo-optimized-tests-relaxed-limits-no-story-deletion-PEHFNJQ5.js} +11 -11
  129. package/dist/_node-chunks/optimized-tests-W7U4ZRWX.js +22 -0
  130. package/dist/_node-chunks/{pattern-copy-play-PJC4PO6A.js → pattern-copy-play-64HQIVWK.js} +9 -9
  131. package/dist/_node-chunks/postinstallAddon-XM2BHKDN.js +20 -0
  132. package/dist/_node-chunks/{rehype-external-links-4CWXZ35U.js → rehype-external-links-2BSEZ7AC.js} +9 -9
  133. package/dist/_node-chunks/{rehype-slug-QZ2PWSJH.js → rehype-slug-6253EA36.js} +9 -9
  134. package/dist/_node-chunks/{relaxed-limits-ZQR4ER7L.js → relaxed-limits-4PAAPG3J.js} +11 -11
  135. package/dist/_node-chunks/{run-BMXB2BW2.js → run-3SQW3FRF.js} +18 -18
  136. package/dist/_node-chunks/{run-U63AXEKZ.js → run-XJT3YVMZ.js} +16 -16
  137. package/dist/_node-chunks/{setup-NCUTUBNN.js → setup-JIYCTADZ.js} +8 -8
  138. package/dist/_node-chunks/{vitest.config.4.template-4XHF7XPS.js → vitest.config.4.template-W74SGWHT.js} +7 -7
  139. package/dist/actions/decorator.js +12 -20
  140. package/dist/addon-a11y/index.js +2 -2
  141. package/dist/addon-a11y/manager.js +11 -11
  142. package/dist/addon-a11y/preset.js +7 -7
  143. package/dist/addon-a11y/preview.js +2 -2
  144. package/dist/addon-docs/blocks.d.ts +10 -6
  145. package/dist/addon-docs/blocks.js +29 -31
  146. package/dist/addon-docs/index.js +3 -3
  147. package/dist/addon-docs/manager.js +3 -3
  148. package/dist/addon-docs/preset.js +10 -10
  149. package/dist/addon-docs/preview.js +1 -1
  150. package/dist/addon-links/preview.d.ts +1 -1
  151. package/dist/addon-mcp/preset.js +9 -9
  152. package/dist/addon-mcp/tools/preview-stories/preview-stories-app-script.js +15 -15
  153. package/dist/addon-ondevice-controls/index.js +1 -1
  154. package/dist/addon-ondevice-controls/register.js +1 -1
  155. package/dist/addon-pseudo-states/index.js +1 -1
  156. package/dist/addon-pseudo-states/preview.js +1 -1
  157. package/dist/addon-themes/postinstall.js +7 -7
  158. package/dist/addon-vitest/constants.js +8 -8
  159. package/dist/addon-vitest/manager.js +18 -9
  160. package/dist/addon-vitest/node/coverage-reporter.js +11 -11
  161. package/dist/addon-vitest/node/vitest.js +28 -28
  162. package/dist/addon-vitest/postinstall.js +10 -10
  163. package/dist/addon-vitest/preset.js +15 -15
  164. package/dist/addon-vitest/vitest-plugin/global-setup.js +21 -21
  165. package/dist/addon-vitest/vitest-plugin/index.js +68 -58
  166. package/dist/babel/index.js +11 -11
  167. package/dist/bin/core.js +106 -88
  168. package/dist/bin/dispatcher.js +10 -10
  169. package/dist/bin/loader.js +8 -8
  170. package/dist/builder-vite/index.js +18 -18
  171. package/dist/builder-vite/preset.js +13 -13
  172. package/dist/channels/index.d.ts +1 -1
  173. package/dist/channels/index.js +1 -1
  174. package/dist/{chunk-Dr3R0DXk.d.ts → chunk-B-NVyPqN.d.ts} +2 -2
  175. package/dist/{chunk-Fg1Fm__9.d.ts → chunk-BmCH-L7_.d.ts} +393 -383
  176. package/dist/{chunk-CNqjcOmK.d.ts → chunk-Bn1RoGAP.d.ts} +1 -1
  177. package/dist/{chunk-BXLImeLy.d.ts → chunk-CfEntHiI.d.ts} +18 -3
  178. package/dist/{chunk-D0NUmzXp.d.ts → chunk-IMedIHPn.d.ts} +3 -3
  179. package/dist/{chunk-CYuvV2sR.d.ts → chunk-evfhuBNU.d.ts} +1 -1
  180. package/dist/cli/index.d.ts +2 -2
  181. package/dist/cli/index.js +25 -30
  182. package/dist/cli/tools/sdk/child-host.d.ts +1 -1
  183. package/dist/cli/tools/sdk/child-host.js +17 -17
  184. package/dist/cli/tools/sdk/index.d.ts +2 -2
  185. package/dist/cli/tools/sdk/index.js +18 -18
  186. package/dist/cli-commands/bin/index.js +7 -7
  187. package/dist/client-logger/index.js +2 -1
  188. package/dist/common/index.d.ts +5 -5
  189. package/dist/common/index.js +34 -35
  190. package/dist/components/index.d.ts +6 -6
  191. package/dist/components/index.js +154 -164
  192. package/dist/core-server/index.d.ts +5 -5
  193. package/dist/core-server/index.js +685 -152
  194. package/dist/core-server/presets/common-manager.js +229 -318
  195. package/dist/core-server/presets/common-override-preset.js +10 -10
  196. package/dist/core-server/presets/common-preset.js +73 -268
  197. package/dist/create/bin/index.js +7 -7
  198. package/dist/create/index.js +15 -15
  199. package/dist/csf/csf-utils.d.ts +1 -1
  200. package/dist/csf/index.d.ts +1 -1
  201. package/dist/csf/index.js +10 -10
  202. package/dist/csf-tools/index.d.ts +41 -37
  203. package/dist/csf-tools/index.js +13 -13
  204. package/dist/instrumenter/index.d.ts +1 -1
  205. package/dist/instrumenter/index.js +1 -1
  206. package/dist/manager/_manager-chunks/{globals-runtime-CHjExYMv.js → globals-runtime--RDllwDw.js} +629 -436
  207. package/dist/manager/_manager-chunks/{globals-runtime-DvV_TF3-.js → globals-runtime-B4NRbNSS.js} +2 -2
  208. package/dist/manager/_manager-chunks/{globals-runtime-wjkxyMn0.js → globals-runtime-BC43T1rL.js} +4150 -50
  209. package/dist/manager/_manager-chunks/{globals-runtime-C5gK7HhH.js → globals-runtime-BFVFUcji.js} +2 -2
  210. package/dist/manager/_manager-chunks/{globals-runtime-BSj0mCjE.js → globals-runtime-BWciJpaD.js} +94 -92
  211. package/dist/manager/_manager-chunks/{globals-runtime-CA8AuIRT.js → globals-runtime-BnQ7i5wq.js} +232 -228
  212. package/dist/manager/_manager-chunks/globals-runtime-BtduS2C2.js +10601 -0
  213. package/dist/manager/_manager-chunks/globals-runtime-BzuYs3dZ.js +1971 -0
  214. package/dist/manager/_manager-chunks/{globals-runtime-BY3epqww.js → globals-runtime-CS41oTca.js} +2 -1
  215. package/dist/manager/_manager-chunks/{globals-runtime-Bu9eGDTe.js → globals-runtime-CdLHkSK1.js} +260 -401
  216. package/dist/manager/_manager-chunks/globals-runtime-CoTrrHG3.js +1163 -0
  217. package/dist/manager/_manager-chunks/{globals-runtime-BweHuXkK.js → globals-runtime-DCmvKMN5.js} +2 -2
  218. package/dist/manager/_manager-chunks/globals-runtime-DgO0hT2p.js +32 -0
  219. package/dist/manager/_manager-chunks/{globals-runtime-C92M_Vnq.js → globals-runtime-DhygDQ09.js} +5 -5
  220. package/dist/manager/_manager-chunks/{globals-runtime-CCTA-XPa.js → globals-runtime-DweLlyBa.js} +5 -4
  221. package/dist/manager/_manager-chunks/globals-runtime-Me9Bl-sx.js +156 -0
  222. package/dist/manager/_manager-chunks/globals-runtime-nQMRiA0J.js +19 -0
  223. package/dist/manager/_manager-chunks/{globals-runtime-Bj5KDUJi.js → globals-runtime-oRjPg2jY.js} +1 -1
  224. package/dist/manager/_manager-chunks/{runtime-CJQZFUUj.js → runtime-1BcYUf7-.js} +26 -44
  225. package/dist/manager/_manager-chunks/{runtime-Dem2xJbS.js → runtime-B2VQIT0n.js} +739 -554
  226. package/dist/manager/_manager-chunks/runtime-BBaBlpAS.js +552 -0
  227. package/dist/manager/_manager-chunks/{runtime-DvB1axgp.js → runtime-BFgSyEE6.js} +13 -13
  228. package/dist/manager/_manager-chunks/{runtime-B6NL14pz.js → runtime-CE_oqcpl.js} +6 -6
  229. package/dist/manager/_manager-chunks/{runtime-BAsOe1C_.js → runtime-CRqm7NXD.js} +49 -49
  230. package/dist/manager/_manager-chunks/{runtime-EPerAEAs.js → runtime-CZtDJIYj.js} +3 -3
  231. package/dist/manager/_manager-chunks/{runtime-CgRqs_SK.js → runtime-D3Gk2bTl.js} +852 -841
  232. package/dist/manager/_manager-chunks/{runtime-Dtbhxq5m.js → runtime-Db8fJ2MP.js} +67 -500
  233. package/dist/manager/_manager-chunks/{runtime--hR2NZFd.js → runtime-Dj8tizGo.js} +103 -103
  234. package/dist/manager/globals-runtime.js +1 -1
  235. package/dist/manager/runtime.js +1 -1
  236. package/dist/manager-api/index.d.ts +1 -1
  237. package/dist/manager-api/index.js +444 -428
  238. package/dist/manager-errors.d.ts +1 -1
  239. package/dist/mcp/index.js +9 -9
  240. package/dist/mocking-utils/index.js +15 -19
  241. package/dist/nextjs-vite/export-mocks/router/index.js +1 -1
  242. package/dist/nextjs-vite/index.d.ts +1 -1
  243. package/dist/nextjs-vite/index.js +4 -4
  244. package/dist/nextjs-vite/node/index.js +7 -7
  245. package/dist/nextjs-vite/preset.js +12 -12
  246. package/dist/nextjs-vite/preview.js +1 -1
  247. package/dist/nextjs-vite/vite-plugin/index.d.ts +2 -2
  248. package/dist/nextjs-vite/vite-plugin/index.js +9 -9
  249. package/dist/nextjs-vite-plugin/index.js +15 -15
  250. package/dist/nextjs-vite-plugin/mocks/storybook.global.js +8 -8
  251. package/dist/nextjs-vite-plugin/plugins/next-mocks/alias/router/index.js +1 -1
  252. package/dist/node-logger/index.d.ts +16 -16
  253. package/dist/node-logger/index.js +9 -9
  254. package/dist/oxc-parser/index.js +14 -11
  255. package/dist/oxc-parser/worker.js +10 -10
  256. package/dist/preview/_chunks/{runtime-BJwGQok8.js → runtime-4BNaFIif.js} +180 -21
  257. package/dist/preview/_chunks/{runtime-BUnOhg9h.js → runtime-BSJ0Ov_b.js} +2 -2
  258. package/dist/preview/_chunks/{runtime-BhSZ1Mwt.js → runtime-Bjm1gBLN.js} +6 -19
  259. package/dist/preview/_chunks/{runtime-Bcv1hJky.js → runtime-CBKlMZg2.js} +4148 -48
  260. package/dist/preview/_chunks/{runtime-BPwAnlRx.js → runtime-CElbz0uN.js} +1 -1
  261. package/dist/preview/_chunks/{runtime-BZ4pNS3g.js → runtime-C_nyb8QT.js} +3 -3
  262. package/dist/preview/_chunks/{runtime-BgPhfM5P.js → runtime-CzTPeFXg.js} +676 -376
  263. package/dist/preview/_chunks/{runtime-WapFVPAh.js → runtime-DZ7fvh0y.js} +1 -1
  264. package/dist/preview/runtime.js +1 -1
  265. package/dist/preview-api/index.d.ts +2 -2
  266. package/dist/preview-api/index.js +5 -5
  267. package/dist/preview-errors.d.ts +1 -1
  268. package/dist/react/docgen/docgen-worker.js +11 -11
  269. package/dist/react/entry-preview-argtypes.js +1 -1
  270. package/dist/react/entry-preview-docs.js +1 -1
  271. package/dist/react/entry-preview.js +1 -1
  272. package/dist/react/index.d.ts +1 -1
  273. package/dist/react/index.js +5 -5
  274. package/dist/react/preset.js +13 -13
  275. package/dist/react/preview.js +4 -4
  276. package/dist/react-native/bin/get-stories.js +8 -8
  277. package/dist/react-native/index.d.ts +37 -36
  278. package/dist/react-native/index.js +30 -34
  279. package/dist/react-native/metro/node.d.ts +1 -1
  280. package/dist/react-native/metro/node.js +10 -10
  281. package/dist/react-native/metro/withForkbook.d.ts +7 -7
  282. package/dist/react-native/metro/withForkbook.js +14 -14
  283. package/dist/react-native/preview.js +4 -1
  284. package/dist/react-native/scripts/generate.js +8 -8
  285. package/dist/react-native/stub.js +1 -1
  286. package/dist/react-native-ui/index.d.ts +4 -3
  287. package/dist/react-native-ui/index.js +1 -8
  288. package/dist/react-native-ui-common/index.d.ts +7 -6
  289. package/dist/react-native-ui-common/index.js +6 -6
  290. package/dist/react-vite/node/index.js +7 -7
  291. package/dist/react-vite/preset.js +7 -7
  292. package/dist/server-errors.d.ts +1 -1
  293. package/dist/server-errors.js +9 -9
  294. package/dist/shared/open-service/index.d.ts +1 -1
  295. package/dist/shared/open-service/index.js +1 -1
  296. package/dist/shared/open-service/services/docgen/worker/docgen-worker.js +9 -9
  297. package/dist/shared/open-service/toolsets/docs/public.d.ts +2 -2
  298. package/dist/telemetry/index.d.ts +38 -274
  299. package/dist/telemetry/index.js +11 -66
  300. package/dist/test/index.js +125 -112
  301. package/dist/types/index.d.ts +1 -1
  302. package/dist/types/index.js +2 -2
  303. package/package.json +15 -15
  304. package/template/nextjs-vite/cli/js/Button.jsx +2 -2
  305. package/template/nextjs-vite/cli/js/Header.jsx +1 -1
  306. package/template/nextjs-vite/cli/js/Page.jsx +1 -1
  307. package/template/nextjs-vite/cli/ts/Button.tsx +2 -2
  308. package/template/nextjs-vite/cli/ts/Header.tsx +1 -1
  309. package/template/nextjs-vite/cli/ts/Page.tsx +1 -1
  310. package/template/react/cli/js/Button.jsx +2 -2
  311. package/template/react/cli/js/Header.jsx +1 -1
  312. package/template/react/cli/js/Page.jsx +1 -1
  313. package/template/react/cli/ts/Button.tsx +2 -2
  314. package/template/react/cli/ts/Header.tsx +1 -1
  315. package/template/react/cli/ts/Page.tsx +1 -1
  316. package/template/react-vite/cli/js/Button.jsx +2 -2
  317. package/template/react-vite/cli/js/Header.jsx +1 -1
  318. package/template/react-vite/cli/js/Page.jsx +1 -1
  319. package/template/react-vite/cli/ts/Button.tsx +2 -2
  320. package/template/react-vite/cli/ts/Header.tsx +1 -1
  321. package/template/react-vite/cli/ts/Page.tsx +1 -1
  322. package/dist/_node-chunks/chunk-2YNXKY72.js +0 -40
  323. package/dist/_node-chunks/chunk-3NST2GUZ.js +0 -33
  324. package/dist/_node-chunks/chunk-4D325SMT.js +0 -1359
  325. package/dist/_node-chunks/chunk-APXRPW7A.js +0 -11
  326. package/dist/_node-chunks/chunk-QHBQRPDP.js +0 -155
  327. package/dist/_node-chunks/chunk-SMBAR4G6.js +0 -18
  328. package/dist/_node-chunks/chunk-SRDKK3SG.js +0 -33
  329. package/dist/_node-chunks/chunk-V5IMPC3J.js +0 -33
  330. package/dist/_node-chunks/chunk-YIAUHGY2.js +0 -69
  331. package/dist/_node-chunks/dist-C5QIQD3G.js +0 -27
  332. package/dist/_node-chunks/dist-NBRPZCHX.js +0 -16
  333. package/dist/_node-chunks/optimized-tests-EIPJR7HA.js +0 -22
  334. package/dist/_node-chunks/postinstallAddon-EOAAURMG.js +0 -20
  335. package/dist/_node-chunks/session-id-HEW5JUNB.js +0 -23
  336. package/dist/manager/_manager-chunks/globals-runtime-Bs75QQ_I.js +0 -9987
  337. package/dist/manager/_manager-chunks/globals-runtime-WZKaeKm9.js +0 -4091
  338. package/dist/manager/_manager-chunks/runtime-5o_11Jae.js +0 -78
  339. package/dist/preview/_chunks/runtime-BsMjBzuq.js +0 -53
  340. package/dist/preview/_chunks/runtime-C1jgT6tJ.js +0 -4091
  341. package/dist/preview/_chunks/runtime-CkOhMcXf.js +0 -387
@@ -1,8 +1,8 @@
1
1
  import { a as __toESM, n as __esmMin, r as __exportAll, t as __commonJSMin } from "./globals-runtime-BdGkqNEt.js";
2
- import { f as require_redent } from "./globals-runtime-CA8AuIRT.js";
3
- import { T as require_picocolors_browser } from "./globals-runtime-Bs75QQ_I.js";
4
- import { _ as require_css_escape, d as init_dist$1, f as computeAccessibleName$1, g as require_ansi_regex, m as computeAccessibleDescription$1, v as require_lib } from "./globals-runtime-DvV_TF3-.js";
5
- import { t as require_lz_string } from "./globals-runtime-Bj5KDUJi.js";
2
+ import { f as require_redent } from "./globals-runtime-BnQ7i5wq.js";
3
+ import { _ as require_css_escape, d as init_dist$1, f as computeAccessibleName$1, g as require_ansi_regex, m as computeAccessibleDescription$1, v as require_lib } from "./globals-runtime-B4NRbNSS.js";
4
+ import { t as require_lz_string } from "./globals-runtime-oRjPg2jY.js";
5
+ import { d as require_picocolors_browser } from "./globals-runtime-BzuYs3dZ.js";
6
6
  import { d as a, f as init_adobe_css_tools, l as _objectWithoutPropertiesLoose } from "./globals-runtime-DwFqpqya.js";
7
7
  //#region ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/polyfills/array.from.mjs
8
8
  function isCallable(fn) {
@@ -339,26 +339,26 @@ function init_getRole() {
339
339
  }
340
340
  //#endregion
341
341
  //#region ../../node_modules/@testing-library/jest-dom/node_modules/dom-accessibility-api/dist/util.mjs
342
- function isElement(node) {
342
+ function isElement$2(node) {
343
343
  return node !== null && node.nodeType === node.ELEMENT_NODE;
344
344
  }
345
345
  function isHTMLTableCaptionElement(node) {
346
- return isElement(node) && getLocalName(node) === "caption";
346
+ return isElement$2(node) && getLocalName(node) === "caption";
347
347
  }
348
348
  function isHTMLInputElement(node) {
349
- return isElement(node) && getLocalName(node) === "input";
349
+ return isElement$2(node) && getLocalName(node) === "input";
350
350
  }
351
351
  function isHTMLOptGroupElement(node) {
352
- return isElement(node) && getLocalName(node) === "optgroup";
352
+ return isElement$2(node) && getLocalName(node) === "optgroup";
353
353
  }
354
354
  function isHTMLSelectElement(node) {
355
- return isElement(node) && getLocalName(node) === "select";
355
+ return isElement$2(node) && getLocalName(node) === "select";
356
356
  }
357
357
  function isHTMLTableElement(node) {
358
- return isElement(node) && getLocalName(node) === "table";
358
+ return isElement$2(node) && getLocalName(node) === "table";
359
359
  }
360
360
  function isHTMLTextAreaElement(node) {
361
- return isElement(node) && getLocalName(node) === "textarea";
361
+ return isElement$2(node) && getLocalName(node) === "textarea";
362
362
  }
363
363
  function safeWindow(node) {
364
364
  var defaultView = (node.ownerDocument === null ? node : node.ownerDocument).defaultView;
@@ -366,19 +366,19 @@ function safeWindow(node) {
366
366
  return defaultView;
367
367
  }
368
368
  function isHTMLFieldSetElement(node) {
369
- return isElement(node) && getLocalName(node) === "fieldset";
369
+ return isElement$2(node) && getLocalName(node) === "fieldset";
370
370
  }
371
371
  function isHTMLLegendElement(node) {
372
- return isElement(node) && getLocalName(node) === "legend";
372
+ return isElement$2(node) && getLocalName(node) === "legend";
373
373
  }
374
374
  function isHTMLSlotElement(node) {
375
- return isElement(node) && getLocalName(node) === "slot";
375
+ return isElement$2(node) && getLocalName(node) === "slot";
376
376
  }
377
377
  function isSVGElement(node) {
378
- return isElement(node) && node.ownerSVGElement !== void 0;
378
+ return isElement$2(node) && node.ownerSVGElement !== void 0;
379
379
  }
380
380
  function isSVGSVGElement(node) {
381
- return isElement(node) && getLocalName(node) === "svg";
381
+ return isElement$2(node) && getLocalName(node) === "svg";
382
382
  }
383
383
  function isSVGTitleElement(node) {
384
384
  return isSVGElement(node) && getLocalName(node) === "title";
@@ -390,7 +390,7 @@ function isSVGTitleElement(node) {
390
390
  * @returns {Element[]} -
391
391
  */
392
392
  function queryIdRefs(node, attributeName) {
393
- if (isElement(node) && node.hasAttribute(attributeName)) {
393
+ if (isElement$2(node) && node.hasAttribute(attributeName)) {
394
394
  var ids = node.getAttribute(attributeName).split(" ");
395
395
  var root = node.getRootNode ? node.getRootNode() : node.ownerDocument;
396
396
  return ids.map(function(id) {
@@ -402,7 +402,7 @@ function queryIdRefs(node, attributeName) {
402
402
  return [];
403
403
  }
404
404
  function hasAnyConcreteRoles(node, roles) {
405
- if (isElement(node)) return roles.indexOf(getRole(node)) !== -1;
405
+ if (isElement$2(node)) return roles.indexOf(getRole(node)) !== -1;
406
406
  return false;
407
407
  }
408
408
  var presentationRoles;
@@ -435,7 +435,7 @@ function asFlatString(s) {
435
435
  * @returns {boolean} -
436
436
  */
437
437
  function isHidden(node, getComputedStyleImplementation) {
438
- if (!isElement(node)) return false;
438
+ if (!isElement$2(node)) return false;
439
439
  if (node.hasAttribute("hidden") || node.getAttribute("aria-hidden") === "true") return true;
440
440
  var style = getComputedStyleImplementation(node);
441
441
  return style.getPropertyValue("display") === "none" || style.getPropertyValue("visibility") === "hidden";
@@ -453,7 +453,7 @@ function isControl(node) {
453
453
  ]) || hasAbstractRole(node, "range");
454
454
  }
455
455
  function hasAbstractRole(node, role) {
456
- if (!isElement(node)) return false;
456
+ if (!isElement$2(node)) return false;
457
457
  switch (role) {
458
458
  case "range": return hasAnyConcreteRoles(node, [
459
459
  "meter",
@@ -557,7 +557,7 @@ function findLabelableElement(element) {
557
557
  if (isLabelableElement(element)) return element;
558
558
  var labelableElement = null;
559
559
  element.childNodes.forEach(function(childNode) {
560
- if (labelableElement === null && isElement(childNode)) {
560
+ if (labelableElement === null && isElement$2(childNode)) {
561
561
  var descendantLabelableElement = findLabelableElement(childNode);
562
562
  if (descendantLabelableElement !== null) labelableElement = descendantLabelableElement;
563
563
  }
@@ -612,7 +612,7 @@ function computeTextAlternative(root) {
612
612
  var _options$compute = options.compute, compute = _options$compute === void 0 ? "name" : _options$compute, _options$computedStyl = options.computedStyleSupportsPseudoElements, computedStyleSupportsPseudoElements = _options$computedStyl === void 0 ? options.getComputedStyle !== void 0 : _options$computedStyl, _options$getComputedS = options.getComputedStyle, getComputedStyle = _options$getComputedS === void 0 ? window.getComputedStyle.bind(window) : _options$getComputedS, _options$hidden = options.hidden, hidden = _options$hidden === void 0 ? false : _options$hidden;
613
613
  function computeMiscTextAlternative(node, context) {
614
614
  var accumulatedText = "";
615
- if (isElement(node) && computedStyleSupportsPseudoElements) {
615
+ if (isElement$2(node) && computedStyleSupportsPseudoElements) {
616
616
  var beforeContent = getTextualContent(getComputedStyle(node, "::before"));
617
617
  accumulatedText = "".concat(beforeContent, " ").concat(accumulatedText);
618
618
  }
@@ -622,10 +622,10 @@ function computeTextAlternative(root) {
622
622
  isReferenced: false,
623
623
  recursion: true
624
624
  });
625
- var separator = (isElement(child) ? getComputedStyle(child).getPropertyValue("display") : "inline") !== "inline" ? " " : "";
625
+ var separator = (isElement$2(child) ? getComputedStyle(child).getPropertyValue("display") : "inline") !== "inline" ? " " : "";
626
626
  accumulatedText += "".concat(separator).concat(result).concat(separator);
627
627
  });
628
- if (isElement(node) && computedStyleSupportsPseudoElements) {
628
+ if (isElement$2(node) && computedStyleSupportsPseudoElements) {
629
629
  var afterContent = getTextualContent(getComputedStyle(node, "::after"));
630
630
  accumulatedText = "".concat(accumulatedText, " ").concat(afterContent);
631
631
  }
@@ -646,11 +646,11 @@ function computeTextAlternative(root) {
646
646
  return null;
647
647
  }
648
648
  function computeTooltipAttributeValue(node) {
649
- if (!isElement(node)) return null;
649
+ if (!isElement$2(node)) return null;
650
650
  return useAttribute(node, "title");
651
651
  }
652
652
  function computeElementTextAlternative(node) {
653
- if (!isElement(node)) return null;
653
+ if (!isElement$2(node)) return null;
654
654
  if (isHTMLFieldSetElement(node)) {
655
655
  consultedNodes.add(node);
656
656
  var children = arrayFrom(node.childNodes);
@@ -729,7 +729,7 @@ function computeTextAlternative(root) {
729
729
  consultedNodes.add(current);
730
730
  return "";
731
731
  }
732
- var labelAttributeNode = isElement(current) ? current.getAttributeNode("aria-labelledby") : null;
732
+ var labelAttributeNode = isElement$2(current) ? current.getAttributeNode("aria-labelledby") : null;
733
733
  var labelElements = labelAttributeNode !== null && !consultedNodes.has(labelAttributeNode) ? queryIdRefs(current, "aria-labelledby") : [];
734
734
  if (compute === "name" && !context.isReferenced && labelElements.length > 0) {
735
735
  consultedNodes.add(labelAttributeNode);
@@ -743,7 +743,7 @@ function computeTextAlternative(root) {
743
743
  }
744
744
  var skipToStep2E = context.recursion && isControl(current) && compute === "name";
745
745
  if (!skipToStep2E) {
746
- var ariaLabel = (isElement(current) && current.getAttribute("aria-label") || "").trim();
746
+ var ariaLabel = (isElement$2(current) && current.getAttribute("aria-label") || "").trim();
747
747
  if (ariaLabel !== "" && compute === "name") {
748
748
  consultedNodes.add(current);
749
749
  return ariaLabel;
@@ -784,7 +784,7 @@ function computeTextAlternative(root) {
784
784
  return getValueOfTextbox(current);
785
785
  }
786
786
  }
787
- if (allowsNameFromContent(current) || isElement(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
787
+ if (allowsNameFromContent(current) || isElement$2(current) && context.isReferenced || isNativeHostLanguageTextAlternativeElement(current) || isDescendantOfNativeHostLanguageTextAlternativeElement(current)) {
788
788
  var accumulatedText2F = computeMiscTextAlternative(current, {
789
789
  isEmbeddedInLabel: context.isEmbeddedInLabel,
790
790
  isReferenced: false
@@ -996,7 +996,7 @@ function matches$1(textToMatch, matcher) {
996
996
  function deprecate(name, replacementText) {
997
997
  console.warn(`Warning: ${name} has been deprecated and will be removed in future updates.`, replacementText);
998
998
  }
999
- function normalize$1(text) {
999
+ function normalize$2(text) {
1000
1000
  return text.replace(/\s+/g, " ").trim();
1001
1001
  }
1002
1002
  function getTag(element) {
@@ -1150,7 +1150,7 @@ function toContainHTML(container, htmlText) {
1150
1150
  }
1151
1151
  function toHaveTextContent(node, checkWith, options = { normalizeWhitespace: true }) {
1152
1152
  checkNode(node, toHaveTextContent, this);
1153
- const textContent = options.normalizeWhitespace ? normalize$1(node.textContent) : node.textContent.replace(/\u00a0/g, " ");
1153
+ const textContent = options.normalizeWhitespace ? normalize$2(node.textContent) : node.textContent.replace(/\u00a0/g, " ");
1154
1154
  const checkingWithEmptyString = textContent !== "" && checkWith === "";
1155
1155
  return {
1156
1156
  pass: !checkingWithEmptyString && matches$1(textContent, checkWith),
@@ -1193,7 +1193,7 @@ function toHaveAccessibleErrorMessage(htmlElement, expectedAccessibleErrorMessag
1193
1193
  return getMessage(this, this.utils.matcherHint(method, "element"), "Expected element to be marked as invalid with attribute", `${ariaInvalidName}="${String(true)}"`, "Received", htmlElement.hasAttribute("aria-invalid") ? `${ariaInvalidName}="${htmlElement.getAttribute(ariaInvalidName)}` : null);
1194
1194
  }
1195
1195
  };
1196
- const error = normalize$1(htmlElement.ownerDocument.getElementById(errormessageId)?.textContent ?? "");
1196
+ const error = normalize$2(htmlElement.ownerDocument.getElementById(errormessageId)?.textContent ?? "");
1197
1197
  return {
1198
1198
  pass: expectedAccessibleErrorMessage === void 0 ? Boolean(error) : expectedAccessibleErrorMessage instanceof RegExp ? expectedAccessibleErrorMessage.test(error) : this.equals(error, expectedAccessibleErrorMessage),
1199
1199
  message: () => {
@@ -1738,7 +1738,7 @@ function toHaveDescription(htmlElement, checkWith) {
1738
1738
  let description = "";
1739
1739
  if (descriptionIDs.length > 0) {
1740
1740
  const document = htmlElement.ownerDocument;
1741
- description = normalize$1(descriptionIDs.map((descriptionID) => document.getElementById(descriptionID)).filter(Boolean).map((el) => el.textContent).join(" "));
1741
+ description = normalize$2(descriptionIDs.map((descriptionID) => document.getElementById(descriptionID)).filter(Boolean).map((el) => el.textContent).join(" "));
1742
1742
  }
1743
1743
  return {
1744
1744
  pass: expectsDescription ? checkWith instanceof RegExp ? checkWith.test(description) : this.equals(description, checkWith) : Boolean(description),
@@ -1765,7 +1765,7 @@ function toHaveErrorMessage(htmlElement, checkWith) {
1765
1765
  let errormessage = "";
1766
1766
  if (errormessageIDs.length > 0) {
1767
1767
  const document = htmlElement.ownerDocument;
1768
- errormessage = normalize$1(errormessageIDs.map((errormessageID) => document.getElementById(errormessageID)).filter(Boolean).map((el) => el.textContent).join(" "));
1768
+ errormessage = normalize$2(errormessageIDs.map((errormessageID) => document.getElementById(errormessageID)).filter(Boolean).map((el) => el.textContent).join(" "));
1769
1769
  }
1770
1770
  return {
1771
1771
  pass: expectsErrorMessage ? checkWith instanceof RegExp ? checkWith.test(errormessage) : this.equals(errormessage, checkWith) : Boolean(errormessage),
@@ -3111,7 +3111,7 @@ var require_build = /* @__PURE__ */ __commonJSMin(((exports) => {
3111
3111
  var dom_esm_exports = /* @__PURE__ */ __exportAll({
3112
3112
  buildQueries: () => buildQueries,
3113
3113
  configure: () => configure,
3114
- createEvent: () => createEvent,
3114
+ createEvent: () => createEvent$1,
3115
3115
  findAllByAltText: () => findAllByAltText,
3116
3116
  findAllByDisplayValue: () => findAllByDisplayValue,
3117
3117
  findAllByLabelText: () => findAllByLabelText,
@@ -3258,7 +3258,7 @@ function jestFakeTimersAreEnabled() {
3258
3258
  // istanbul ignore next
3259
3259
  return false;
3260
3260
  }
3261
- function getDocument() {
3261
+ function getDocument$1() {
3262
3262
  /* istanbul ignore if */
3263
3263
  if (typeof window === "undefined") throw new Error("Could not find default container");
3264
3264
  return window.document;
@@ -3285,7 +3285,7 @@ function filterCommentsAndDefaultIgnoreTagsTags(value) {
3285
3285
  }
3286
3286
  function prettyDOM(dom, maxLength, options) {
3287
3287
  if (options === void 0) options = {};
3288
- if (!dom) dom = getDocument().body;
3288
+ if (!dom) dom = getDocument$1().body;
3289
3289
  if (typeof maxLength !== "number") maxLength = typeof process !== "undefined" && typeof process.env !== "undefined" && process.env.DEBUG_PRINT_LIMIT || 7e3;
3290
3290
  if (maxLength === 0) return "";
3291
3291
  if (dom.documentElement) dom = dom.documentElement;
@@ -3699,9 +3699,9 @@ function getSuggestedQuery(element, variant, method) {
3699
3699
  if (canSuggest("LabelText", method, labelText)) return makeSuggestion("LabelText", element, labelText, { variant });
3700
3700
  const placeholderText = element.getAttribute("placeholder");
3701
3701
  if (canSuggest("PlaceholderText", method, placeholderText)) return makeSuggestion("PlaceholderText", element, placeholderText, { variant });
3702
- const textContent = normalize(getNodeText(element));
3702
+ const textContent = normalize$1(getNodeText(element));
3703
3703
  if (canSuggest("Text", method, textContent)) return makeSuggestion("Text", element, textContent, { variant });
3704
- if (canSuggest("DisplayValue", method, element.value)) return makeSuggestion("DisplayValue", element, normalize(element.value), { variant });
3704
+ if (canSuggest("DisplayValue", method, element.value)) return makeSuggestion("DisplayValue", element, normalize$1(element.value), { variant });
3705
3705
  const alt = element.getAttribute("alt");
3706
3706
  if (canSuggest("AltText", method, alt)) return makeSuggestion("AltText", element, alt, { variant });
3707
3707
  const title = element.getAttribute("title");
@@ -3713,7 +3713,7 @@ function copyStackTrace(target, source) {
3713
3713
  target.stack = source.stack.replace(source.message, target.message);
3714
3714
  }
3715
3715
  function waitFor(callback, _ref) {
3716
- let _ref$container = _ref.container, container = _ref$container === void 0 ? getDocument() : _ref$container, _ref$timeout = _ref.timeout, timeout = _ref$timeout === void 0 ? getConfig().asyncUtilTimeout : _ref$timeout, _ref$showOriginalStac = _ref.showOriginalStackTrace, showOriginalStackTrace = _ref$showOriginalStac === void 0 ? getConfig().showOriginalStackTrace : _ref$showOriginalStac, stackTraceError = _ref.stackTraceError, _ref$interval = _ref.interval, interval = _ref$interval === void 0 ? 50 : _ref$interval, _ref$onTimeout = _ref.onTimeout, onTimeout = _ref$onTimeout === void 0 ? (error) => {
3716
+ let _ref$container = _ref.container, container = _ref$container === void 0 ? getDocument$1() : _ref$container, _ref$timeout = _ref.timeout, timeout = _ref$timeout === void 0 ? getConfig().asyncUtilTimeout : _ref$timeout, _ref$showOriginalStac = _ref.showOriginalStackTrace, showOriginalStackTrace = _ref$showOriginalStac === void 0 ? getConfig().showOriginalStackTrace : _ref$showOriginalStac, stackTraceError = _ref.stackTraceError, _ref$interval = _ref.interval, interval = _ref$interval === void 0 ? 50 : _ref$interval, _ref$onTimeout = _ref.onTimeout, onTimeout = _ref$onTimeout === void 0 ? (error) => {
3717
3717
  Object.defineProperty(error, "message", { value: getConfig().getElementError(error.message, container).message });
3718
3718
  return error;
3719
3719
  } : _ref$onTimeout, _ref$mutationObserver = _ref.mutationObserverOptions, mutationObserverOptions = _ref$mutationObserver === void 0 ? {
@@ -3955,7 +3955,7 @@ function fireEvent(element, event) {
3955
3955
  return element.dispatchEvent(event);
3956
3956
  });
3957
3957
  }
3958
- function createEvent(eventName, node, init, _temp) {
3958
+ function createEvent$1(eventName, node, init, _temp) {
3959
3959
  let _ref = _temp === void 0 ? {} : _temp, _ref$EventType = _ref.EventType, EventType = _ref$EventType === void 0 ? "Event" : _ref$EventType, _ref$defaultInit = _ref.defaultInit, defaultInit = _ref$defaultInit === void 0 ? {} : _ref$defaultInit;
3960
3960
  if (!node) throw new Error("Unable to fire a \"" + eventName + "\" event - please provide a DOM element.");
3961
3961
  const eventInit = {
@@ -4014,7 +4014,7 @@ function encode(value) {
4014
4014
  function getPlaygroundUrl(markup) {
4015
4015
  return "https://testing-playground.com/#markup=" + encode(markup);
4016
4016
  }
4017
- var import_build, import_lib, import_lz_string, printProps, NodeTypeTextNode, printChildren, printText, printComment, printElement, printElementAsLeaf, ELEMENT_NODE$1, TEXT_NODE$1, COMMENT_NODE$1, FRAGMENT_NODE, ELEMENT_REGEXP, isCustomElement, testNode, picocolors, readFileSync, codeFrameColumns, TEXT_NODE, _excluded$1, shouldHighlight, DOMCollection, ELEMENT_NODE, COMMENT_NODE, logDOM, config, labelledNodeNames, elementRoleList, logRoles, normalize, wrapSingleQueryWithSuggestion, wrapAllByQueryWithSuggestion, queryHelpers, queryAllLabelsByText, queryAllByLabelText, getAllByLabelText, getMultipleError$7, queryByLabelText, getByLabelText, findAllByLabelText, findByLabelText, getAllByLabelTextWithSuggestions, getByLabelTextWithSuggestions, queryAllByLabelTextWithSuggestions, queryAllByPlaceholderText, getMultipleError$6, getMissingError$6, queryAllByPlaceholderTextWithSuggestions, _buildQueries$6, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryAllByText, getMultipleError$5, getMissingError$5, queryAllByTextWithSuggestions, _buildQueries$5, queryByText, getAllByText, getByText, findAllByText, findByText, queryAllByDisplayValue, getMultipleError$4, getMissingError$4, queryAllByDisplayValueWithSuggestions, _buildQueries$4, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, VALID_TAG_REGEXP, queryAllByAltText, getMultipleError$3, getMissingError$3, queryAllByAltTextWithSuggestions, _buildQueries$3, queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText, isSvgTitle, queryAllByTitle, getMultipleError$2, getMissingError$2, queryAllByTitleWithSuggestions, _buildQueries$2, queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle, queryAllByRole, getNameHint, getMultipleError$1, getMissingError$1, queryAllByRoleWithSuggestions, _buildQueries$1, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, getTestIdAttribute, queryAllByTestId, getMultipleError, getMissingError, queryAllByTestIdWithSuggestions, _buildQueries, queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId, queries, isRemoved, eventMap, eventAliasMap, _excluded, _excluded2, debug, logTestingPlaygroundURL, initialValue, screen;
4017
+ var import_build, import_lib, import_lz_string, printProps, NodeTypeTextNode, printChildren, printText, printComment, printElement, printElementAsLeaf, ELEMENT_NODE$1, TEXT_NODE$1, COMMENT_NODE$1, FRAGMENT_NODE, ELEMENT_REGEXP, isCustomElement, testNode, picocolors, readFileSync, codeFrameColumns, TEXT_NODE, _excluded$1, shouldHighlight, DOMCollection, ELEMENT_NODE, COMMENT_NODE, logDOM, config, labelledNodeNames, elementRoleList, logRoles, normalize$1, wrapSingleQueryWithSuggestion, wrapAllByQueryWithSuggestion, queryHelpers, queryAllLabelsByText, queryAllByLabelText, getAllByLabelText, getMultipleError$7, queryByLabelText, getByLabelText, findAllByLabelText, findByLabelText, getAllByLabelTextWithSuggestions, getByLabelTextWithSuggestions, queryAllByLabelTextWithSuggestions, queryAllByPlaceholderText, getMultipleError$6, getMissingError$6, queryAllByPlaceholderTextWithSuggestions, _buildQueries$6, queryByPlaceholderText, getAllByPlaceholderText, getByPlaceholderText, findAllByPlaceholderText, findByPlaceholderText, queryAllByText, getMultipleError$5, getMissingError$5, queryAllByTextWithSuggestions, _buildQueries$5, queryByText, getAllByText, getByText, findAllByText, findByText, queryAllByDisplayValue, getMultipleError$4, getMissingError$4, queryAllByDisplayValueWithSuggestions, _buildQueries$4, queryByDisplayValue, getAllByDisplayValue, getByDisplayValue, findAllByDisplayValue, findByDisplayValue, VALID_TAG_REGEXP, queryAllByAltText, getMultipleError$3, getMissingError$3, queryAllByAltTextWithSuggestions, _buildQueries$3, queryByAltText, getAllByAltText, getByAltText, findAllByAltText, findByAltText, isSvgTitle, queryAllByTitle, getMultipleError$2, getMissingError$2, queryAllByTitleWithSuggestions, _buildQueries$2, queryByTitle, getAllByTitle, getByTitle, findAllByTitle, findByTitle, queryAllByRole, getNameHint, getMultipleError$1, getMissingError$1, queryAllByRoleWithSuggestions, _buildQueries$1, queryByRole, getAllByRole, getByRole, findAllByRole, findByRole, getTestIdAttribute, queryAllByTestId, getMultipleError, getMissingError, queryAllByTestIdWithSuggestions, _buildQueries, queryByTestId, getAllByTestId, getByTestId, findAllByTestId, findByTestId, queries, isRemoved, eventMap$1, eventAliasMap, _excluded, _excluded2, debug, logTestingPlaygroundURL, initialValue, screen;
4018
4018
  function init_dom_esm() {
4019
4019
  return (init_dom_esm = __esmMin((() => {
4020
4020
  import_build = /* @__PURE__ */ __toESM(require_build());
@@ -4133,7 +4133,7 @@ function init_dom_esm() {
4133
4133
  let _ref10$hidden = (_temp2 === void 0 ? {} : _temp2).hidden;
4134
4134
  return console.log(prettyRoles(dom, { hidden: _ref10$hidden === void 0 ? false : _ref10$hidden }));
4135
4135
  };
4136
- normalize = getDefaultNormalizer();
4136
+ normalize$1 = getDefaultNormalizer();
4137
4137
  wrapSingleQueryWithSuggestion = (query, queryAllByName, variant) => function(container) {
4138
4138
  for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) args[_key3 - 1] = arguments[_key3];
4139
4139
  const element = query(container, ...args);
@@ -4549,7 +4549,7 @@ function init_dom_esm() {
4549
4549
  findByTestId
4550
4550
  });
4551
4551
  isRemoved = (result) => !result || Array.isArray(result) && !result.length;
4552
- eventMap = {
4552
+ eventMap$1 = {
4553
4553
  copy: {
4554
4554
  EventType: "ClipboardEvent",
4555
4555
  defaultInit: {
@@ -5237,14 +5237,14 @@ function init_dom_esm() {
5237
5237
  "cancelable",
5238
5238
  "detail"
5239
5239
  ];
5240
- Object.keys(eventMap).forEach((key) => {
5241
- const _eventMap$key = eventMap[key], EventType = _eventMap$key.EventType, defaultInit = _eventMap$key.defaultInit;
5240
+ Object.keys(eventMap$1).forEach((key) => {
5241
+ const _eventMap$key = eventMap$1[key], EventType = _eventMap$key.EventType, defaultInit = _eventMap$key.defaultInit;
5242
5242
  const eventName = key.toLowerCase();
5243
- createEvent[key] = (node, init) => createEvent(eventName, node, init, {
5243
+ createEvent$1[key] = (node, init) => createEvent$1(eventName, node, init, {
5244
5244
  EventType,
5245
5245
  defaultInit
5246
5246
  });
5247
- fireEvent[key] = (node, init) => fireEvent(node, createEvent[key](node, init));
5247
+ fireEvent[key] = (node, init) => fireEvent(node, createEvent$1[key](node, init));
5248
5248
  });
5249
5249
  Object.keys(eventAliasMap).forEach((aliasKey) => {
5250
5250
  const key = eventAliasMap[aliasKey];
@@ -5254,7 +5254,7 @@ function init_dom_esm() {
5254
5254
  });
5255
5255
  debug = (element, maxLength, options) => Array.isArray(element) ? element.forEach((el) => logDOM(el, maxLength, options)) : logDOM(element, maxLength, options);
5256
5256
  logTestingPlaygroundURL = function(element) {
5257
- if (element === void 0) element = getDocument().body;
5257
+ if (element === void 0) element = getDocument$1().body;
5258
5258
  if (!element || !("innerHTML" in element)) {
5259
5259
  console.log("The element you're providing isn't a valid DOM element.");
5260
5260
  return;
@@ -5280,4 +5280,4104 @@ function init_dom_esm() {
5280
5280
  })))();
5281
5281
  }
5282
5282
  //#endregion
5283
- export { matchers_exports as a, init_matchers as i, getConfig as n, init_dom_esm as r, dom_esm_exports as t };
5283
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isElementType.js
5284
+ function isElementType(element, tag, props) {
5285
+ if (element.namespaceURI && element.namespaceURI !== "http://www.w3.org/1999/xhtml") return false;
5286
+ tag = Array.isArray(tag) ? tag : [tag];
5287
+ if (!tag.includes(element.tagName.toLowerCase())) return false;
5288
+ if (props) return Object.entries(props).every(([k, v]) => element[k] === v);
5289
+ return true;
5290
+ }
5291
+ //#endregion
5292
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getWindow.js
5293
+ function getWindow(node) {
5294
+ var _node_ownerDocument;
5295
+ if (isDocument$1(node) && node.defaultView) return node.defaultView;
5296
+ else if ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.defaultView) return node.ownerDocument.defaultView;
5297
+ throw new Error(`Could not determine window of node. Node was ${describe(node)}`);
5298
+ }
5299
+ function isDocument$1(node) {
5300
+ return node.nodeType === 9;
5301
+ }
5302
+ function describe(val) {
5303
+ return typeof val === "function" ? `function ${val.name}` : val === null ? "null" : String(val);
5304
+ }
5305
+ //#endregion
5306
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Blob.js
5307
+ function readBlobText(blob, FileReader) {
5308
+ return new Promise((res, rej) => {
5309
+ const fr = new FileReader();
5310
+ fr.onerror = rej;
5311
+ fr.onabort = rej;
5312
+ fr.onload = () => {
5313
+ res(String(fr.result));
5314
+ };
5315
+ fr.readAsText(blob);
5316
+ });
5317
+ }
5318
+ //#endregion
5319
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/FileList.js
5320
+ function createFileList(window, files) {
5321
+ const list = {
5322
+ ...files,
5323
+ length: files.length,
5324
+ item: (index) => list[index],
5325
+ [Symbol.iterator]: function* nextFile() {
5326
+ for (let i = 0; i < list.length; i++) yield list[i];
5327
+ }
5328
+ };
5329
+ list.constructor = window.FileList;
5330
+ /* istanbul ignore else */ if (window.FileList) Object.setPrototypeOf(list, window.FileList.prototype);
5331
+ Object.freeze(list);
5332
+ return list;
5333
+ }
5334
+ //#endregion
5335
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/DataTransfer.js
5336
+ function _define_property$8(obj, key, value) {
5337
+ if (key in obj) Object.defineProperty(obj, key, {
5338
+ value,
5339
+ enumerable: true,
5340
+ configurable: true,
5341
+ writable: true
5342
+ });
5343
+ else obj[key] = value;
5344
+ return obj;
5345
+ }
5346
+ function toAsciiLowercase(value) {
5347
+ return value.replace(/[A-Z]/g, (char) => char.toLowerCase());
5348
+ }
5349
+ function normalizeFormat(format) {
5350
+ const type = toAsciiLowercase(format);
5351
+ return type === "text" ? "text/plain" : type === "url" ? "text/uri-list" : type;
5352
+ }
5353
+ function getTypeMatcher(type, exact) {
5354
+ const [group, sub] = type.split("/");
5355
+ const isGroup = !sub || sub === "*";
5356
+ return (item) => {
5357
+ return exact ? item.type === (isGroup ? group : type) : isGroup ? item.type.startsWith(`${group}/`) : item.type === group;
5358
+ };
5359
+ }
5360
+ function createDataTransferStub(window) {
5361
+ return new class DataTransferStub {
5362
+ getData(format) {
5363
+ var _this_items_find;
5364
+ const type = normalizeFormat(format);
5365
+ const match = (_this_items_find = this.items.find(getTypeMatcher(type, true))) !== null && _this_items_find !== void 0 ? _this_items_find : this.items.find(getTypeMatcher(type, false));
5366
+ let text = "";
5367
+ match === null || match === void 0 || match.getAsString((t) => {
5368
+ text = t;
5369
+ });
5370
+ return text;
5371
+ }
5372
+ setData(format, data) {
5373
+ const type = normalizeFormat(format);
5374
+ const matchIndex = this.items.findIndex(getTypeMatcher(type, true));
5375
+ const item = new DataTransferItemStub(data, type);
5376
+ if (matchIndex >= 0) this.items.splice(matchIndex, 1, item);
5377
+ else this.items.push(item);
5378
+ }
5379
+ clearData(format) {
5380
+ if (format) {
5381
+ const type = normalizeFormat(format);
5382
+ const matchIndex = this.items.findIndex(getTypeMatcher(type, true));
5383
+ if (matchIndex >= 0) this.items.remove(matchIndex);
5384
+ } else this.items.clear();
5385
+ }
5386
+ get types() {
5387
+ const t = [];
5388
+ if (this.files.length) t.push("Files");
5389
+ this.items.forEach((i) => t.push(i.type));
5390
+ Object.freeze(t);
5391
+ return t;
5392
+ }
5393
+ /* istanbul ignore next */ setDragImage() {}
5394
+ constructor() {
5395
+ _define_property$8(this, "dropEffect", "none");
5396
+ _define_property$8(this, "effectAllowed", "uninitialized");
5397
+ _define_property$8(this, "items", new DataTransferItemListStub());
5398
+ _define_property$8(this, "files", createFileList(window, []));
5399
+ }
5400
+ }();
5401
+ }
5402
+ function createDataTransfer(window, files = []) {
5403
+ const dt = typeof window.DataTransfer === "undefined" ? createDataTransferStub(window) : /* istanbul ignore next */ new window.DataTransfer();
5404
+ Object.defineProperty(dt, "files", { get: () => createFileList(window, files) });
5405
+ return dt;
5406
+ }
5407
+ async function getBlobFromDataTransferItem(window, item) {
5408
+ if (item.kind === "file") return item.getAsFile();
5409
+ return new window.Blob([await new Promise((r) => item.getAsString(r))], { type: item.type });
5410
+ }
5411
+ var DataTransferItemStub, DataTransferItemListStub;
5412
+ function init_DataTransfer() {
5413
+ return (init_DataTransfer = __esmMin((() => {
5414
+ DataTransferItemStub = class {
5415
+ getAsFile() {
5416
+ return this.file;
5417
+ }
5418
+ getAsString(callback) {
5419
+ if (typeof this.data === "string") callback(this.data);
5420
+ }
5421
+ /* istanbul ignore next */ webkitGetAsEntry() {
5422
+ throw new Error("not implemented");
5423
+ }
5424
+ constructor(dataOrFile, type) {
5425
+ _define_property$8(this, "kind", void 0);
5426
+ _define_property$8(this, "type", void 0);
5427
+ _define_property$8(this, "file", null);
5428
+ _define_property$8(this, "data", void 0);
5429
+ if (typeof dataOrFile === "string") {
5430
+ this.kind = "string";
5431
+ this.type = String(type);
5432
+ this.data = dataOrFile;
5433
+ } else {
5434
+ this.kind = "file";
5435
+ this.type = dataOrFile.type;
5436
+ this.file = dataOrFile;
5437
+ }
5438
+ }
5439
+ };
5440
+ DataTransferItemListStub = class extends Array {
5441
+ add(...args) {
5442
+ const item = typeof args[0] === "string" ? new DataTransferItemStub(args[0], toAsciiLowercase(args[1])) : new DataTransferItemStub(args[0]);
5443
+ this.push(item);
5444
+ return item;
5445
+ }
5446
+ clear() {
5447
+ this.splice(0, this.length);
5448
+ }
5449
+ remove(index) {
5450
+ this.splice(index, 1);
5451
+ }
5452
+ };
5453
+ })))();
5454
+ }
5455
+ //#endregion
5456
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/dataTransfer/Clipboard.js
5457
+ function _define_property$7(obj, key, value) {
5458
+ if (key in obj) Object.defineProperty(obj, key, {
5459
+ value,
5460
+ enumerable: true,
5461
+ configurable: true,
5462
+ writable: true
5463
+ });
5464
+ else obj[key] = value;
5465
+ return obj;
5466
+ }
5467
+ function createClipboardItem(window, ...blobs) {
5468
+ const dataMap = Object.fromEntries(blobs.map((b) => [typeof b === "string" ? "text/plain" : b.type, Promise.resolve(b)]));
5469
+ /* istanbul ignore if */ if (typeof window.ClipboardItem !== "undefined") return new window.ClipboardItem(dataMap);
5470
+ return new class ClipboardItem {
5471
+ get types() {
5472
+ return Array.from(Object.keys(this.data));
5473
+ }
5474
+ async getType(type) {
5475
+ const value = await this.data[type];
5476
+ if (!value) throw new Error(`${type} is not one of the available MIME types on this item.`);
5477
+ return value instanceof window.Blob ? value : new window.Blob([value], { type });
5478
+ }
5479
+ constructor(d) {
5480
+ _define_property$7(this, "data", void 0);
5481
+ this.data = d;
5482
+ }
5483
+ }(dataMap);
5484
+ }
5485
+ function createClipboardStub(window, control) {
5486
+ return Object.assign(new class Clipboard extends window.EventTarget {
5487
+ async read() {
5488
+ return Array.from(this.items);
5489
+ }
5490
+ async readText() {
5491
+ let text = "";
5492
+ for (const item of this.items) {
5493
+ const type = item.types.includes("text/plain") ? "text/plain" : item.types.find((t) => t.startsWith("text/"));
5494
+ if (type) text += await item.getType(type).then((b) => readBlobText(b, window.FileReader));
5495
+ }
5496
+ return text;
5497
+ }
5498
+ async write(data) {
5499
+ this.items = data;
5500
+ }
5501
+ async writeText(text) {
5502
+ this.items = [createClipboardItem(window, text)];
5503
+ }
5504
+ constructor(...args) {
5505
+ super(...args), _define_property$7(this, "items", []);
5506
+ }
5507
+ }(), { [ClipboardStubControl]: control });
5508
+ }
5509
+ function isClipboardStub(clipboard) {
5510
+ return !!(clipboard === null || clipboard === void 0 ? void 0 : clipboard[ClipboardStubControl]);
5511
+ }
5512
+ function attachClipboardStubToView(window) {
5513
+ if (isClipboardStub(window.navigator.clipboard)) return window.navigator.clipboard[ClipboardStubControl];
5514
+ const realClipboard = Object.getOwnPropertyDescriptor(window.navigator, "clipboard");
5515
+ let stub;
5516
+ const control = {
5517
+ resetClipboardStub: () => {
5518
+ stub = createClipboardStub(window, control);
5519
+ },
5520
+ detachClipboardStub: () => {
5521
+ /* istanbul ignore if */ if (realClipboard) Object.defineProperty(window.navigator, "clipboard", realClipboard);
5522
+ else Object.defineProperty(window.navigator, "clipboard", {
5523
+ value: void 0,
5524
+ configurable: true
5525
+ });
5526
+ }
5527
+ };
5528
+ stub = createClipboardStub(window, control);
5529
+ Object.defineProperty(window.navigator, "clipboard", {
5530
+ get: () => stub,
5531
+ configurable: true
5532
+ });
5533
+ return stub[ClipboardStubControl];
5534
+ }
5535
+ function resetClipboardStubOnView(window) {
5536
+ if (isClipboardStub(window.navigator.clipboard)) window.navigator.clipboard[ClipboardStubControl].resetClipboardStub();
5537
+ }
5538
+ function detachClipboardStubFromView(window) {
5539
+ if (isClipboardStub(window.navigator.clipboard)) window.navigator.clipboard[ClipboardStubControl].detachClipboardStub();
5540
+ }
5541
+ async function readDataTransferFromClipboard(document) {
5542
+ const window = document.defaultView;
5543
+ const clipboard = window === null || window === void 0 ? void 0 : window.navigator.clipboard;
5544
+ const items = clipboard && await clipboard.read();
5545
+ if (!items) throw new Error("The Clipboard API is unavailable.");
5546
+ const dt = createDataTransfer(window);
5547
+ for (const item of items) for (const type of item.types) dt.setData(type, await item.getType(type).then((b) => readBlobText(b, window.FileReader)));
5548
+ return dt;
5549
+ }
5550
+ async function writeDataTransferToClipboard(document, clipboardData) {
5551
+ const window = getWindow(document);
5552
+ const clipboard = window.navigator.clipboard;
5553
+ const items = [];
5554
+ for (let i = 0; i < clipboardData.items.length; i++) {
5555
+ const dtItem = clipboardData.items[i];
5556
+ const blob = await getBlobFromDataTransferItem(window, dtItem);
5557
+ items.push(createClipboardItem(window, blob));
5558
+ }
5559
+ if (!(clipboard && await clipboard.write(items).then(
5560
+ () => true,
5561
+ /* istanbul ignore next */
5562
+ () => false
5563
+ ))) throw new Error("The Clipboard API is unavailable.");
5564
+ }
5565
+ var ClipboardStubControl, g;
5566
+ function init_Clipboard() {
5567
+ return (init_Clipboard = __esmMin((() => {
5568
+ init_DataTransfer();
5569
+ ClipboardStubControl = Symbol("Manage ClipboardSub");
5570
+ g = globalThis;
5571
+ /* istanbul ignore else */ if (typeof g.afterEach === "function") g.afterEach(() => {
5572
+ if (typeof globalThis.window !== "undefined") resetClipboardStubOnView(globalThis.window);
5573
+ });
5574
+ /* istanbul ignore else */ if (typeof g.afterAll === "function") g.afterAll(() => {
5575
+ if (typeof globalThis.window !== "undefined") detachClipboardStubFromView(globalThis.window);
5576
+ });
5577
+ })))();
5578
+ }
5579
+ //#endregion
5580
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/selector.js
5581
+ var FOCUSABLE_SELECTOR;
5582
+ function init_selector() {
5583
+ return (init_selector = __esmMin((() => {
5584
+ FOCUSABLE_SELECTOR = [
5585
+ "input:not([type=hidden]):not([disabled])",
5586
+ "button:not([disabled])",
5587
+ "select:not([disabled])",
5588
+ "textarea:not([disabled])",
5589
+ "[contenteditable=\"\"]",
5590
+ "[contenteditable=\"true\"]",
5591
+ "a[href]",
5592
+ "[tabindex]:not([disabled])",
5593
+ "details > summary"
5594
+ ].join(", ");
5595
+ })))();
5596
+ }
5597
+ //#endregion
5598
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/isFocusable.js
5599
+ function isFocusable(element) {
5600
+ return element.matches(FOCUSABLE_SELECTOR);
5601
+ }
5602
+ function init_isFocusable() {
5603
+ return (init_isFocusable = __esmMin((() => {
5604
+ init_selector();
5605
+ })))();
5606
+ }
5607
+ //#endregion
5608
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/cloneEvent.js
5609
+ function cloneEvent(event) {
5610
+ return new event.constructor(event.type, event);
5611
+ }
5612
+ //#endregion
5613
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isDisabled.js
5614
+ function isDisabled(element) {
5615
+ for (let el = element; el; el = el.parentElement) if (isElementType(el, [
5616
+ "button",
5617
+ "input",
5618
+ "select",
5619
+ "textarea",
5620
+ "optgroup",
5621
+ "option"
5622
+ ])) {
5623
+ if (el.hasAttribute("disabled")) return true;
5624
+ } else if (isElementType(el, "fieldset")) {
5625
+ var _el_querySelector;
5626
+ if (el.hasAttribute("disabled") && !((_el_querySelector = el.querySelector(":scope > legend")) === null || _el_querySelector === void 0 ? void 0 : _el_querySelector.contains(element))) return true;
5627
+ } else if (el.tagName.includes("-")) {
5628
+ if (el.constructor.formAssociated && el.hasAttribute("disabled")) return true;
5629
+ }
5630
+ return false;
5631
+ }
5632
+ function init_isDisabled() {
5633
+ return (init_isDisabled = __esmMin((() => {})))();
5634
+ }
5635
+ //#endregion
5636
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/getActiveElement.js
5637
+ function getActiveElement(document) {
5638
+ const activeElement = document.activeElement;
5639
+ if (activeElement === null || activeElement === void 0 ? void 0 : activeElement.shadowRoot) {
5640
+ const activeElementInShadowTree = getActiveElement(activeElement.shadowRoot);
5641
+ if (activeElementInShadowTree) return activeElementInShadowTree;
5642
+ } else if (activeElement && isElementType(activeElement, "iframe")) {
5643
+ const contentDocument = activeElement.contentDocument;
5644
+ if (contentDocument) return getActiveElement(contentDocument);
5645
+ }
5646
+ if (isDisabled(activeElement)) return document.ownerDocument ? /* istanbul ignore next */ document.ownerDocument.body : document.body;
5647
+ return activeElement;
5648
+ }
5649
+ function getActiveElementOrBody(document) {
5650
+ var _getActiveElement;
5651
+ return (_getActiveElement = getActiveElement(document)) !== null && _getActiveElement !== void 0 ? _getActiveElement : /* istanbul ignore next */ document.body;
5652
+ }
5653
+ function init_getActiveElement() {
5654
+ return (init_getActiveElement = __esmMin((() => {
5655
+ init_isDisabled();
5656
+ })))();
5657
+ }
5658
+ //#endregion
5659
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/findClosest.js
5660
+ function findClosest(element, callback) {
5661
+ let el = element;
5662
+ do {
5663
+ if (callback(el)) return el;
5664
+ el = el.parentElement;
5665
+ } while (el && el !== element.ownerDocument.body);
5666
+ }
5667
+ //#endregion
5668
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/isContentEditable.js
5669
+ function isContentEditable(element) {
5670
+ return element.hasAttribute("contenteditable") && (element.getAttribute("contenteditable") == "true" || element.getAttribute("contenteditable") == "");
5671
+ }
5672
+ /**
5673
+ * If a node is a contenteditable or inside one, return that element.
5674
+ */ function getContentEditable(node) {
5675
+ const element = getElement$1(node);
5676
+ return element && (element.closest("[contenteditable=\"\"]") || element.closest("[contenteditable=\"true\"]"));
5677
+ }
5678
+ function getElement$1(node) {
5679
+ return node.nodeType === 1 ? node : node.parentElement;
5680
+ }
5681
+ //#endregion
5682
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/click/isClickableInput.js
5683
+ function isClickableInput(element) {
5684
+ return isElementType(element, "button") || isElementType(element, "input") && element.type in clickableInputTypes;
5685
+ }
5686
+ var clickableInputTypes;
5687
+ function init_isClickableInput() {
5688
+ return (init_isClickableInput = __esmMin((() => {
5689
+ clickableInputTypes = /*#__PURE__*/ function(clickableInputTypes) {
5690
+ clickableInputTypes["button"] = "button";
5691
+ clickableInputTypes["color"] = "color";
5692
+ clickableInputTypes["file"] = "file";
5693
+ clickableInputTypes["image"] = "image";
5694
+ clickableInputTypes["reset"] = "reset";
5695
+ clickableInputTypes["submit"] = "submit";
5696
+ clickableInputTypes["checkbox"] = "checkbox";
5697
+ clickableInputTypes["radio"] = "radio";
5698
+ return clickableInputTypes;
5699
+ }(clickableInputTypes || {});
5700
+ })))();
5701
+ }
5702
+ //#endregion
5703
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/isEditable.js
5704
+ function isEditable(element) {
5705
+ return isEditableInputOrTextArea(element) && !element.readOnly || isContentEditable(element);
5706
+ }
5707
+ function isEditableInputOrTextArea(element) {
5708
+ return isElementType(element, "textarea") || isElementType(element, "input") && element.type in editableInputTypes;
5709
+ }
5710
+ var editableInputTypes;
5711
+ function init_isEditable() {
5712
+ return (init_isEditable = __esmMin((() => {
5713
+ editableInputTypes = /*#__PURE__*/ function(editableInputTypes) {
5714
+ editableInputTypes["text"] = "text";
5715
+ editableInputTypes["date"] = "date";
5716
+ editableInputTypes["datetime-local"] = "datetime-local";
5717
+ editableInputTypes["email"] = "email";
5718
+ editableInputTypes["month"] = "month";
5719
+ editableInputTypes["number"] = "number";
5720
+ editableInputTypes["password"] = "password";
5721
+ editableInputTypes["search"] = "search";
5722
+ editableInputTypes["tel"] = "tel";
5723
+ editableInputTypes["time"] = "time";
5724
+ editableInputTypes["url"] = "url";
5725
+ editableInputTypes["week"] = "week";
5726
+ return editableInputTypes;
5727
+ }(editableInputTypes || {});
5728
+ })))();
5729
+ }
5730
+ //#endregion
5731
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/selection.js
5732
+ /**
5733
+ * Determine if the element has its own selection implementation
5734
+ * and does not interact with the Document Selection API.
5735
+ */ function hasOwnSelection(node) {
5736
+ return isElement$1(node) && isEditableInputOrTextArea(node);
5737
+ }
5738
+ function hasNoSelection(node) {
5739
+ return isElement$1(node) && isClickableInput(node);
5740
+ }
5741
+ function isElement$1(node) {
5742
+ return node.nodeType === 1;
5743
+ }
5744
+ function init_selection() {
5745
+ return (init_selection = __esmMin((() => {
5746
+ init_isClickableInput();
5747
+ init_isEditable();
5748
+ })))();
5749
+ }
5750
+ //#endregion
5751
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/updateSelectionOnFocus.js
5752
+ /**
5753
+ * Reset the Document Selection when moving focus into an element
5754
+ * with own selection implementation.
5755
+ */ function updateSelectionOnFocus(element) {
5756
+ const selection = element.ownerDocument.getSelection();
5757
+ /* istanbul ignore if */ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) return;
5758
+ if (hasOwnSelection(element)) {
5759
+ const contenteditable = getContentEditable(selection.focusNode);
5760
+ if (contenteditable) {
5761
+ if (!selection.isCollapsed) {
5762
+ var _contenteditable_firstChild;
5763
+ const focusNode = ((_contenteditable_firstChild = contenteditable.firstChild) === null || _contenteditable_firstChild === void 0 ? void 0 : _contenteditable_firstChild.nodeType) === 3 ? contenteditable.firstChild : contenteditable;
5764
+ selection.setBaseAndExtent(focusNode, 0, focusNode, 0);
5765
+ }
5766
+ } else selection.setBaseAndExtent(element, 0, element, 0);
5767
+ }
5768
+ }
5769
+ function init_updateSelectionOnFocus() {
5770
+ return (init_updateSelectionOnFocus = __esmMin((() => {
5771
+ init_Clipboard();
5772
+ init_selection();
5773
+ })))();
5774
+ }
5775
+ //#endregion
5776
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/wrapEvent.js
5777
+ function wrapEvent(cb, _element) {
5778
+ return getConfig().eventWrapper(cb);
5779
+ }
5780
+ function init_wrapEvent() {
5781
+ return (init_wrapEvent = __esmMin((() => {
5782
+ init_dom_esm();
5783
+ })))();
5784
+ }
5785
+ //#endregion
5786
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/focus.js
5787
+ /**
5788
+ * Focus closest focusable element.
5789
+ */ function focusElement(element) {
5790
+ const target = findClosest(element, isFocusable);
5791
+ const activeElement = getActiveElement(element.ownerDocument);
5792
+ if ((target !== null && target !== void 0 ? target : element.ownerDocument.body) === activeElement) return;
5793
+ else if (target) wrapEvent(() => target.focus());
5794
+ else wrapEvent(() => activeElement === null || activeElement === void 0 ? void 0 : activeElement.blur());
5795
+ updateSelectionOnFocus(target !== null && target !== void 0 ? target : element.ownerDocument.body);
5796
+ }
5797
+ function blurElement(element) {
5798
+ if (!isFocusable(element)) return;
5799
+ if (!(getActiveElement(element.ownerDocument) === element)) return;
5800
+ wrapEvent(() => element.blur());
5801
+ }
5802
+ function init_focus() {
5803
+ return (init_focus = __esmMin((() => {
5804
+ init_Clipboard();
5805
+ init_getActiveElement();
5806
+ init_isFocusable();
5807
+ init_updateSelectionOnFocus();
5808
+ init_wrapEvent();
5809
+ })))();
5810
+ }
5811
+ //#endregion
5812
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/registry.js
5813
+ var behavior;
5814
+ function init_registry() {
5815
+ return (init_registry = __esmMin((() => {
5816
+ behavior = {};
5817
+ })))();
5818
+ }
5819
+ //#endregion
5820
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/click.js
5821
+ function init_click() {
5822
+ return (init_click = __esmMin((() => {
5823
+ init_Clipboard();
5824
+ init_isFocusable();
5825
+ init_focus();
5826
+ init_registry();
5827
+ behavior.click = (event, target, instance) => {
5828
+ const context = target.closest("button,input,label,select,textarea");
5829
+ const control = context && isElementType(context, "label") && context.control;
5830
+ if (control && control !== target) return () => {
5831
+ if (isFocusable(control)) {
5832
+ focusElement(control);
5833
+ instance.dispatchEvent(control, cloneEvent(event));
5834
+ }
5835
+ };
5836
+ else if (isElementType(target, "input", { type: "file" })) return () => {
5837
+ blurElement(target);
5838
+ target.dispatchEvent(new (getWindow(target)).Event("fileDialog"));
5839
+ focusElement(target);
5840
+ };
5841
+ };
5842
+ })))();
5843
+ }
5844
+ //#endregion
5845
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/UI.js
5846
+ function isUIValue(value) {
5847
+ return typeof value === "object" && UIValue in value;
5848
+ }
5849
+ function isUISelectionStart(start) {
5850
+ return !!start && typeof start === "object" && UISelection in start;
5851
+ }
5852
+ function setUIValue(element, value) {
5853
+ if (element[InitialValue] === void 0) element[InitialValue] = element.value;
5854
+ element[UIValue] = value;
5855
+ element.value = Object.assign(new String(value), { [UIValue]: true });
5856
+ }
5857
+ function getUIValue(element) {
5858
+ return element[UIValue] === void 0 ? element.value : String(element[UIValue]);
5859
+ }
5860
+ /** Flag the IDL value as clean. This does not change the value. */ function setUIValueClean(element) {
5861
+ element[UIValue] = void 0;
5862
+ }
5863
+ function clearInitialValue(element) {
5864
+ element[InitialValue] = void 0;
5865
+ }
5866
+ function getInitialValue(element) {
5867
+ return element[InitialValue];
5868
+ }
5869
+ function setUISelectionRaw(element, selection) {
5870
+ element[UISelection] = selection;
5871
+ }
5872
+ function setUISelection(element, { focusOffset: focusOffsetParam, anchorOffset: anchorOffsetParam = focusOffsetParam }, mode = "replace") {
5873
+ const valueLength = getUIValue(element).length;
5874
+ const sanitizeOffset = (o) => Math.max(0, Math.min(valueLength, o));
5875
+ const anchorOffset = mode === "replace" || element[UISelection] === void 0 ? sanitizeOffset(anchorOffsetParam) : element[UISelection].anchorOffset;
5876
+ const focusOffset = sanitizeOffset(focusOffsetParam);
5877
+ const startOffset = Math.min(anchorOffset, focusOffset);
5878
+ const endOffset = Math.max(anchorOffset, focusOffset);
5879
+ element[UISelection] = {
5880
+ anchorOffset,
5881
+ focusOffset
5882
+ };
5883
+ if (element.selectionStart === startOffset && element.selectionEnd === endOffset) return;
5884
+ const startObj = Object.assign(new Number(startOffset), { [UISelection]: true });
5885
+ try {
5886
+ element.setSelectionRange(startObj, endOffset);
5887
+ } catch {}
5888
+ }
5889
+ function getUISelection(element) {
5890
+ var _element_UISelection, _element_selectionStart, _element_selectionEnd;
5891
+ const sel = (_element_UISelection = element[UISelection]) !== null && _element_UISelection !== void 0 ? _element_UISelection : {
5892
+ anchorOffset: (_element_selectionStart = element.selectionStart) !== null && _element_selectionStart !== void 0 ? _element_selectionStart : 0,
5893
+ focusOffset: (_element_selectionEnd = element.selectionEnd) !== null && _element_selectionEnd !== void 0 ? _element_selectionEnd : 0
5894
+ };
5895
+ return {
5896
+ ...sel,
5897
+ startOffset: Math.min(sel.anchorOffset, sel.focusOffset),
5898
+ endOffset: Math.max(sel.anchorOffset, sel.focusOffset)
5899
+ };
5900
+ }
5901
+ function hasUISelection(element) {
5902
+ return !!element[UISelection];
5903
+ }
5904
+ /** Flag the IDL selection as clean. This does not change the selection. */ function setUISelectionClean(element) {
5905
+ element[UISelection] = void 0;
5906
+ }
5907
+ var UIValue, UISelection, InitialValue;
5908
+ function init_UI() {
5909
+ return (init_UI = __esmMin((() => {
5910
+ UIValue = Symbol("Displayed value in UI");
5911
+ UISelection = Symbol("Displayed selection in UI");
5912
+ InitialValue = Symbol("Initial value to compare on blur");
5913
+ })))();
5914
+ }
5915
+ //#endregion
5916
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/timeValue.js
5917
+ function buildTimeValue(value) {
5918
+ const onlyDigitsValue = value.replace(/\D/g, "");
5919
+ if (onlyDigitsValue.length < 2) return value;
5920
+ const firstDigit = parseInt$1(onlyDigitsValue[0], 10);
5921
+ const secondDigit = parseInt$1(onlyDigitsValue[1], 10);
5922
+ if (firstDigit >= 3 || firstDigit === 2 && secondDigit >= 4) {
5923
+ let index;
5924
+ if (firstDigit >= 3) index = 1;
5925
+ else index = 2;
5926
+ return build(onlyDigitsValue, index);
5927
+ }
5928
+ if (value.length === 2) return value;
5929
+ return build(onlyDigitsValue, 2);
5930
+ }
5931
+ function build(onlyDigitsValue, index) {
5932
+ const hours = onlyDigitsValue.slice(0, index);
5933
+ const validHours = Math.min(parseInt$1(hours, 10), 23);
5934
+ const minuteCharacters = onlyDigitsValue.slice(index);
5935
+ const parsedMinutes = parseInt$1(minuteCharacters, 10);
5936
+ const validMinutes = Math.min(parsedMinutes, 59);
5937
+ return `${validHours.toString().padStart(2, "0")}:${validMinutes.toString().padStart(2, "0")}`;
5938
+ }
5939
+ function isValidDateOrTimeValue(element, value) {
5940
+ const clone = element.cloneNode();
5941
+ clone.value = value;
5942
+ return clone.value === value;
5943
+ }
5944
+ var parseInt$1;
5945
+ function init_timeValue() {
5946
+ return (init_timeValue = __esmMin((() => {
5947
+ parseInt$1 = globalThis.parseInt;
5948
+ })))();
5949
+ }
5950
+ //#endregion
5951
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/maxLength.js
5952
+ function getMaxLength(element) {
5953
+ var _element_getAttribute;
5954
+ const attr = (_element_getAttribute = element.getAttribute("maxlength")) !== null && _element_getAttribute !== void 0 ? _element_getAttribute : "";
5955
+ return /^\d+$/.test(attr) && Number(attr) >= 0 ? Number(attr) : void 0;
5956
+ }
5957
+ function supportsMaxLength(element) {
5958
+ return isElementType(element, "textarea") || isElementType(element, "input") && element.type in maxLengthSupportedTypes;
5959
+ }
5960
+ var maxLengthSupportedTypes;
5961
+ function init_maxLength() {
5962
+ return (init_maxLength = __esmMin((() => {
5963
+ maxLengthSupportedTypes = /*#__PURE__*/ function(maxLengthSupportedTypes) {
5964
+ maxLengthSupportedTypes["email"] = "email";
5965
+ maxLengthSupportedTypes["password"] = "password";
5966
+ maxLengthSupportedTypes["search"] = "search";
5967
+ maxLengthSupportedTypes["telephone"] = "telephone";
5968
+ maxLengthSupportedTypes["text"] = "text";
5969
+ maxLengthSupportedTypes["url"] = "url";
5970
+ return maxLengthSupportedTypes;
5971
+ }(maxLengthSupportedTypes || {});
5972
+ })))();
5973
+ }
5974
+ //#endregion
5975
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/cursor.js
5976
+ function getNextCursorPosition(node, offset, direction, inputType) {
5977
+ if (isTextNode(node) && offset + direction >= 0 && offset + direction <= node.nodeValue.length) return {
5978
+ node,
5979
+ offset: offset + direction
5980
+ };
5981
+ const nextNode = getNextCharacterContentNode(node, offset, direction);
5982
+ if (nextNode) {
5983
+ if (isTextNode(nextNode)) return {
5984
+ node: nextNode,
5985
+ offset: direction > 0 ? Math.min(1, nextNode.nodeValue.length) : Math.max(nextNode.nodeValue.length - 1, 0)
5986
+ };
5987
+ else if (isElementType(nextNode, "br")) {
5988
+ const nextPlusOne = getNextCharacterContentNode(nextNode, void 0, direction);
5989
+ if (!nextPlusOne) {
5990
+ if (direction < 0 && inputType === "deleteContentBackward") return {
5991
+ node: nextNode.parentNode,
5992
+ offset: getOffset(nextNode)
5993
+ };
5994
+ return;
5995
+ } else if (isTextNode(nextPlusOne)) return {
5996
+ node: nextPlusOne,
5997
+ offset: direction > 0 ? 0 : nextPlusOne.nodeValue.length
5998
+ };
5999
+ else if (direction < 0 && isElementType(nextPlusOne, "br")) return {
6000
+ node: nextNode.parentNode,
6001
+ offset: getOffset(nextNode)
6002
+ };
6003
+ else return {
6004
+ node: nextPlusOne.parentNode,
6005
+ offset: getOffset(nextPlusOne) + (direction > 0 ? 0 : 1)
6006
+ };
6007
+ } else return {
6008
+ node: nextNode.parentNode,
6009
+ offset: getOffset(nextNode) + (direction > 0 ? 1 : 0)
6010
+ };
6011
+ }
6012
+ }
6013
+ function getNextCharacterContentNode(node, offset, direction) {
6014
+ const nextOffset = Number(offset) + (direction < 0 ? -1 : 0);
6015
+ if (offset !== void 0 && isElement(node) && nextOffset >= 0 && nextOffset < node.children.length) node = node.children[nextOffset];
6016
+ return walkNodes(node, direction === 1 ? "next" : "previous", isTreatedAsCharacterContent);
6017
+ }
6018
+ function isTreatedAsCharacterContent(node) {
6019
+ if (isTextNode(node)) return true;
6020
+ if (isElement(node)) {
6021
+ if (isElementType(node, ["input", "textarea"])) return node.type !== "hidden";
6022
+ else if (isElementType(node, "br")) return true;
6023
+ }
6024
+ return false;
6025
+ }
6026
+ function getOffset(node) {
6027
+ let i = 0;
6028
+ while (node.previousSibling) {
6029
+ i++;
6030
+ node = node.previousSibling;
6031
+ }
6032
+ return i;
6033
+ }
6034
+ function isElement(node) {
6035
+ return node.nodeType === 1;
6036
+ }
6037
+ function isTextNode(node) {
6038
+ return node.nodeType === 3;
6039
+ }
6040
+ function walkNodes(node, direction, callback) {
6041
+ for (;;) {
6042
+ var _node_ownerDocument;
6043
+ const sibling = node[`${direction}Sibling`];
6044
+ if (sibling) {
6045
+ node = getDescendant(sibling, direction === "next" ? "first" : "last");
6046
+ if (callback(node)) return node;
6047
+ } else if (node.parentNode && (!isElement(node.parentNode) || !isContentEditable(node.parentNode) && node.parentNode !== ((_node_ownerDocument = node.ownerDocument) === null || _node_ownerDocument === void 0 ? void 0 : _node_ownerDocument.body))) node = node.parentNode;
6048
+ else break;
6049
+ }
6050
+ }
6051
+ function getDescendant(node, direction) {
6052
+ while (node.hasChildNodes()) node = node[`${direction}Child`];
6053
+ return node;
6054
+ }
6055
+ function init_cursor() {
6056
+ return (init_cursor = __esmMin((() => {})))();
6057
+ }
6058
+ //#endregion
6059
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/trackValue.js
6060
+ function isReact17Element(element) {
6061
+ return Object.getOwnPropertyNames(element).some((k) => k.startsWith("__react")) && getWindow(element).REACT_VERSION === 17;
6062
+ }
6063
+ function startTrackValue(element) {
6064
+ if (!isReact17Element(element)) return;
6065
+ element[TrackChanges] = {
6066
+ previousValue: String(element.value),
6067
+ tracked: []
6068
+ };
6069
+ }
6070
+ function trackOrSetValue(element, v) {
6071
+ var _element_TrackChanges_tracked, _element_TrackChanges;
6072
+ (_element_TrackChanges = element[TrackChanges]) === null || _element_TrackChanges === void 0 || (_element_TrackChanges_tracked = _element_TrackChanges.tracked) == null || _element_TrackChanges_tracked.push(v);
6073
+ if (!element[TrackChanges]) {
6074
+ setUIValueClean(element);
6075
+ setUISelection(element, { focusOffset: v.length });
6076
+ }
6077
+ }
6078
+ function commitValueAfterInput(element, cursorOffset) {
6079
+ var _changes_tracked;
6080
+ const changes = element[TrackChanges];
6081
+ element[TrackChanges] = void 0;
6082
+ if (!(changes === null || changes === void 0 ? void 0 : (_changes_tracked = changes.tracked) === null || _changes_tracked === void 0 ? void 0 : _changes_tracked.length)) return;
6083
+ const isJustReactStateUpdate = changes.tracked.length === 2 && changes.tracked[0] === changes.previousValue && changes.tracked[1] === element.value;
6084
+ if (!isJustReactStateUpdate) setUIValueClean(element);
6085
+ if (hasUISelection(element)) setUISelection(element, { focusOffset: isJustReactStateUpdate ? cursorOffset : element.value.length });
6086
+ }
6087
+ var TrackChanges;
6088
+ function init_trackValue() {
6089
+ return (init_trackValue = __esmMin((() => {
6090
+ init_Clipboard();
6091
+ init_UI();
6092
+ TrackChanges = Symbol("Track programmatic changes for React workaround");
6093
+ })))();
6094
+ }
6095
+ //#endregion
6096
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/getTargetTypeAndSelection.js
6097
+ /**
6098
+ * Determine which selection logic and selection ranges to consider.
6099
+ */ function getTargetTypeAndSelection(node) {
6100
+ const element = getElement(node);
6101
+ if (element && hasOwnSelection(element)) return {
6102
+ type: "input",
6103
+ selection: getUISelection(element)
6104
+ };
6105
+ const selection = element === null || element === void 0 ? void 0 : element.ownerDocument.getSelection();
6106
+ return {
6107
+ type: getContentEditable(node) && (selection === null || selection === void 0 ? void 0 : selection.anchorNode) && getContentEditable(selection.anchorNode) ? "contenteditable" : "default",
6108
+ selection
6109
+ };
6110
+ }
6111
+ function getElement(node) {
6112
+ return node.nodeType === 1 ? node : node.parentElement;
6113
+ }
6114
+ function init_getTargetTypeAndSelection() {
6115
+ return (init_getTargetTypeAndSelection = __esmMin((() => {
6116
+ init_UI();
6117
+ init_Clipboard();
6118
+ init_selection();
6119
+ })))();
6120
+ }
6121
+ //#endregion
6122
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/getInputRange.js
6123
+ /**
6124
+ * Get the range that would be overwritten by input.
6125
+ */ function getInputRange(focusNode) {
6126
+ const typeAndSelection = getTargetTypeAndSelection(focusNode);
6127
+ if (typeAndSelection.type === "input") return typeAndSelection.selection;
6128
+ else if (typeAndSelection.type === "contenteditable") {
6129
+ var _typeAndSelection_selection;
6130
+ return (_typeAndSelection_selection = typeAndSelection.selection) === null || _typeAndSelection_selection === void 0 ? void 0 : _typeAndSelection_selection.getRangeAt(0);
6131
+ }
6132
+ }
6133
+ function init_getInputRange() {
6134
+ return (init_getInputRange = __esmMin((() => {
6135
+ init_getTargetTypeAndSelection();
6136
+ })))();
6137
+ }
6138
+ //#endregion
6139
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelection.js
6140
+ /**
6141
+ * Set the selection
6142
+ */ function setSelection({ focusNode, focusOffset, anchorNode = focusNode, anchorOffset = focusOffset }) {
6143
+ var _anchorNode_ownerDocument_getSelection, _anchorNode_ownerDocument;
6144
+ if (getTargetTypeAndSelection(focusNode).type === "input") return setUISelection(focusNode, {
6145
+ anchorOffset,
6146
+ focusOffset
6147
+ });
6148
+ (_anchorNode_ownerDocument = anchorNode.ownerDocument) === null || _anchorNode_ownerDocument === void 0 || (_anchorNode_ownerDocument_getSelection = _anchorNode_ownerDocument.getSelection()) == null || _anchorNode_ownerDocument_getSelection.setBaseAndExtent(anchorNode, anchorOffset, focusNode, focusOffset);
6149
+ }
6150
+ function init_setSelection() {
6151
+ return (init_setSelection = __esmMin((() => {
6152
+ init_UI();
6153
+ init_Clipboard();
6154
+ init_getTargetTypeAndSelection();
6155
+ })))();
6156
+ }
6157
+ //#endregion
6158
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/input.js
6159
+ function isDateOrTime(element) {
6160
+ return isElementType(element, "input") && ["date", "time"].includes(element.type);
6161
+ }
6162
+ function input(instance, element, data, inputType = "insertText") {
6163
+ const inputRange = getInputRange(element);
6164
+ /* istanbul ignore if */ if (!inputRange) return;
6165
+ if (!isDateOrTime(element)) {
6166
+ if (!instance.dispatchUIEvent(element, "beforeinput", {
6167
+ inputType,
6168
+ data
6169
+ })) return;
6170
+ }
6171
+ if ("startContainer" in inputRange) editContenteditable(instance, element, inputRange, data, inputType);
6172
+ else editInputElement(instance, element, inputRange, data, inputType);
6173
+ }
6174
+ function editContenteditable(instance, element, inputRange, data, inputType) {
6175
+ let del = false;
6176
+ if (!inputRange.collapsed) {
6177
+ del = true;
6178
+ inputRange.deleteContents();
6179
+ } else if (["deleteContentBackward", "deleteContentForward"].includes(inputType)) {
6180
+ const nextPosition = getNextCursorPosition(inputRange.startContainer, inputRange.startOffset, inputType === "deleteContentBackward" ? -1 : 1, inputType);
6181
+ if (nextPosition) {
6182
+ del = true;
6183
+ const delRange = inputRange.cloneRange();
6184
+ if (delRange.comparePoint(nextPosition.node, nextPosition.offset) < 0) delRange.setStart(nextPosition.node, nextPosition.offset);
6185
+ else delRange.setEnd(nextPosition.node, nextPosition.offset);
6186
+ delRange.deleteContents();
6187
+ }
6188
+ }
6189
+ if (data) {
6190
+ if (inputRange.endContainer.nodeType === 3) {
6191
+ const offset = inputRange.endOffset;
6192
+ inputRange.endContainer.insertData(offset, data);
6193
+ inputRange.setStart(inputRange.endContainer, offset + data.length);
6194
+ inputRange.setEnd(inputRange.endContainer, offset + data.length);
6195
+ } else {
6196
+ const text = element.ownerDocument.createTextNode(data);
6197
+ inputRange.insertNode(text);
6198
+ inputRange.setStart(text, data.length);
6199
+ inputRange.setEnd(text, data.length);
6200
+ }
6201
+ }
6202
+ if (del || data) instance.dispatchUIEvent(element, "input", { inputType });
6203
+ }
6204
+ function editInputElement(instance, element, inputRange, data, inputType) {
6205
+ let dataToInsert = data;
6206
+ if (supportsMaxLength(element)) {
6207
+ const maxLength = getMaxLength(element);
6208
+ if (maxLength !== void 0 && data.length > 0) {
6209
+ const selectionLength = inputRange.endOffset - inputRange.startOffset;
6210
+ const spaceUntilMaxLength = maxLength - element.value.length + selectionLength;
6211
+ if (spaceUntilMaxLength > 0) dataToInsert = data.substring(0, spaceUntilMaxLength);
6212
+ else return;
6213
+ }
6214
+ }
6215
+ const { newValue, newOffset, oldValue } = calculateNewValue(dataToInsert, element, inputRange, inputType);
6216
+ if (newValue === oldValue && newOffset === inputRange.startOffset && newOffset === inputRange.endOffset) return;
6217
+ if (isElementType(element, "input", { type: "number" }) && !isValidNumberInput(newValue)) return;
6218
+ setUIValue(element, newValue);
6219
+ setSelection({
6220
+ focusNode: element,
6221
+ anchorOffset: newOffset,
6222
+ focusOffset: newOffset
6223
+ });
6224
+ if (isDateOrTime(element)) {
6225
+ if (isValidDateOrTimeValue(element, newValue)) {
6226
+ commitInput(instance, element, newOffset, {});
6227
+ instance.dispatchUIEvent(element, "change");
6228
+ clearInitialValue(element);
6229
+ }
6230
+ } else commitInput(instance, element, newOffset, {
6231
+ data,
6232
+ inputType
6233
+ });
6234
+ }
6235
+ function calculateNewValue(inputData, node, { startOffset, endOffset }, inputType) {
6236
+ const value = getUIValue(node);
6237
+ const prologEnd = Math.max(0, startOffset === endOffset && inputType === "deleteContentBackward" ? startOffset - 1 : startOffset);
6238
+ const prolog = value.substring(0, prologEnd);
6239
+ const epilogStart = Math.min(value.length, startOffset === endOffset && inputType === "deleteContentForward" ? startOffset + 1 : endOffset);
6240
+ let newValue = `${prolog}${inputData}${value.substring(epilogStart, value.length)}`;
6241
+ let newOffset = prologEnd + inputData.length;
6242
+ if (isElementType(node, "input", { type: "time" })) {
6243
+ const builtValue = buildTimeValue(newValue);
6244
+ if (builtValue !== "" && isValidDateOrTimeValue(node, builtValue)) {
6245
+ newValue = builtValue;
6246
+ newOffset = builtValue.length;
6247
+ }
6248
+ }
6249
+ return {
6250
+ oldValue: value,
6251
+ newValue,
6252
+ newOffset
6253
+ };
6254
+ }
6255
+ function commitInput(instance, element, newOffset, inputInit) {
6256
+ instance.dispatchUIEvent(element, "input", inputInit);
6257
+ commitValueAfterInput(element, newOffset);
6258
+ }
6259
+ function isValidNumberInput(value) {
6260
+ var _value_match, _value_match1;
6261
+ const valueParts = value.split("e", 2);
6262
+ return !(/[^\d.\-e]/.test(value) || Number((_value_match = value.match(/-/g)) === null || _value_match === void 0 ? void 0 : _value_match.length) > 2 || Number((_value_match1 = value.match(/\./g)) === null || _value_match1 === void 0 ? void 0 : _value_match1.length) > 1 || valueParts[1] && !/^-?\d*$/.test(valueParts[1]));
6263
+ }
6264
+ function init_input() {
6265
+ return (init_input = __esmMin((() => {
6266
+ init_UI();
6267
+ init_Clipboard();
6268
+ init_timeValue();
6269
+ init_maxLength();
6270
+ init_cursor();
6271
+ init_trackValue();
6272
+ init_getInputRange();
6273
+ init_setSelection();
6274
+ })))();
6275
+ }
6276
+ //#endregion
6277
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/cut.js
6278
+ function init_cut() {
6279
+ return (init_cut = __esmMin((() => {
6280
+ init_Clipboard();
6281
+ init_isEditable();
6282
+ init_input();
6283
+ init_registry();
6284
+ behavior.cut = (event, target, instance) => {
6285
+ return () => {
6286
+ if (isEditable(target)) input(instance, target, "", "deleteByCut");
6287
+ };
6288
+ };
6289
+ })))();
6290
+ }
6291
+ //#endregion
6292
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/getValueOrTextContent.js
6293
+ function getValueOrTextContent(element) {
6294
+ // istanbul ignore if
6295
+ if (!element) return null;
6296
+ if (isContentEditable(element)) return element.textContent;
6297
+ return getUIValue(element);
6298
+ }
6299
+ function init_getValueOrTextContent() {
6300
+ return (init_getValueOrTextContent = __esmMin((() => {
6301
+ init_Clipboard();
6302
+ init_UI();
6303
+ })))();
6304
+ }
6305
+ //#endregion
6306
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/isVisible.js
6307
+ function isVisible(element) {
6308
+ const window = getWindow(element);
6309
+ for (let el = element; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement) {
6310
+ const { display, visibility } = window.getComputedStyle(el);
6311
+ if (display === "none") return false;
6312
+ if (visibility === "hidden") return false;
6313
+ }
6314
+ return true;
6315
+ }
6316
+ function init_isVisible() {
6317
+ return (init_isVisible = __esmMin((() => {})))();
6318
+ }
6319
+ //#endregion
6320
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/focus/getTabDestination.js
6321
+ function getTabDestination(activeElement, shift) {
6322
+ const document = activeElement.ownerDocument;
6323
+ const focusableElements = document.querySelectorAll(FOCUSABLE_SELECTOR);
6324
+ const enabledElements = Array.from(focusableElements).filter((el) => el === activeElement || !(Number(el.getAttribute("tabindex")) < 0 || isDisabled(el)));
6325
+ if (Number(activeElement.getAttribute("tabindex")) >= 0) enabledElements.sort((a, b) => {
6326
+ const i = Number(a.getAttribute("tabindex"));
6327
+ const j = Number(b.getAttribute("tabindex"));
6328
+ if (i === j) return 0;
6329
+ else if (i === 0) return 1;
6330
+ else if (j === 0) return -1;
6331
+ return i - j;
6332
+ });
6333
+ const checkedRadio = {};
6334
+ let prunedElements = [document.body];
6335
+ const activeRadioGroup = isElementType(activeElement, "input", { type: "radio" }) ? activeElement.name : void 0;
6336
+ enabledElements.forEach((currentElement) => {
6337
+ const el = currentElement;
6338
+ if (isElementType(el, "input", { type: "radio" }) && el.name) {
6339
+ if (el === activeElement) {
6340
+ prunedElements.push(el);
6341
+ return;
6342
+ } else if (el.name === activeRadioGroup) return;
6343
+ if (el.checked) {
6344
+ prunedElements = prunedElements.filter((e) => !isElementType(e, "input", {
6345
+ type: "radio",
6346
+ name: el.name
6347
+ }));
6348
+ prunedElements.push(el);
6349
+ checkedRadio[el.name] = el;
6350
+ return;
6351
+ }
6352
+ if (typeof checkedRadio[el.name] !== "undefined") return;
6353
+ }
6354
+ prunedElements.push(el);
6355
+ });
6356
+ for (let index = prunedElements.findIndex((el) => el === activeElement);;) {
6357
+ index += shift ? -1 : 1;
6358
+ if (index === prunedElements.length) index = 0;
6359
+ else if (index === -1) index = prunedElements.length - 1;
6360
+ if (prunedElements[index] === activeElement || prunedElements[index] === document.body || isVisible(prunedElements[index])) return prunedElements[index];
6361
+ }
6362
+ }
6363
+ function init_getTabDestination() {
6364
+ return (init_getTabDestination = __esmMin((() => {
6365
+ init_isDisabled();
6366
+ init_isVisible();
6367
+ init_selector();
6368
+ })))();
6369
+ }
6370
+ //#endregion
6371
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/moveSelection.js
6372
+ /**
6373
+ * Move the selection
6374
+ */ function moveSelection(node, direction) {
6375
+ if (hasOwnSelection(node)) {
6376
+ const selection = getUISelection(node);
6377
+ setSelection({
6378
+ focusNode: node,
6379
+ focusOffset: selection.startOffset === selection.endOffset ? selection.focusOffset + direction : direction < 0 ? selection.startOffset : selection.endOffset
6380
+ });
6381
+ } else {
6382
+ const selection = node.ownerDocument.getSelection();
6383
+ if (!(selection === null || selection === void 0 ? void 0 : selection.focusNode)) return;
6384
+ if (selection.isCollapsed) {
6385
+ const nextPosition = getNextCursorPosition(selection.focusNode, selection.focusOffset, direction);
6386
+ if (nextPosition) setSelection({
6387
+ focusNode: nextPosition.node,
6388
+ focusOffset: nextPosition.offset
6389
+ });
6390
+ } else selection[direction < 0 ? "collapseToStart" : "collapseToEnd"]();
6391
+ }
6392
+ }
6393
+ function init_moveSelection() {
6394
+ return (init_moveSelection = __esmMin((() => {
6395
+ init_UI();
6396
+ init_Clipboard();
6397
+ init_cursor();
6398
+ init_selection();
6399
+ init_setSelection();
6400
+ })))();
6401
+ }
6402
+ //#endregion
6403
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/selectAll.js
6404
+ /**
6405
+ * Expand a selection like the browser does when pressing Ctrl+A.
6406
+ */ function selectAll(target) {
6407
+ var _getContentEditable;
6408
+ if (hasOwnSelection(target)) return setSelection({
6409
+ focusNode: target,
6410
+ anchorOffset: 0,
6411
+ focusOffset: getUIValue(target).length
6412
+ });
6413
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
6414
+ setSelection({
6415
+ focusNode,
6416
+ anchorOffset: 0,
6417
+ focusOffset: focusNode.childNodes.length
6418
+ });
6419
+ }
6420
+ function isAllSelected(target) {
6421
+ var _getContentEditable;
6422
+ if (hasOwnSelection(target)) return getUISelection(target).startOffset === 0 && getUISelection(target).endOffset === getUIValue(target).length;
6423
+ const focusNode = (_getContentEditable = getContentEditable(target)) !== null && _getContentEditable !== void 0 ? _getContentEditable : target.ownerDocument.body;
6424
+ const selection = target.ownerDocument.getSelection();
6425
+ return (selection === null || selection === void 0 ? void 0 : selection.anchorNode) === focusNode && selection.focusNode === focusNode && selection.anchorOffset === 0 && selection.focusOffset === focusNode.childNodes.length;
6426
+ }
6427
+ function init_selectAll() {
6428
+ return (init_selectAll = __esmMin((() => {
6429
+ init_UI();
6430
+ init_Clipboard();
6431
+ init_selection();
6432
+ init_setSelection();
6433
+ })))();
6434
+ }
6435
+ //#endregion
6436
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionRange.js
6437
+ /**
6438
+ * Backward-compatible selection.
6439
+ *
6440
+ * Handles input elements and contenteditable if it only contains a single text node.
6441
+ */ function setSelectionRange(element, anchorOffset, focusOffset) {
6442
+ var _element_firstChild;
6443
+ if (hasOwnSelection(element)) return setSelection({
6444
+ focusNode: element,
6445
+ anchorOffset,
6446
+ focusOffset
6447
+ });
6448
+ /* istanbul ignore else */ if (isContentEditable(element) && ((_element_firstChild = element.firstChild) === null || _element_firstChild === void 0 ? void 0 : _element_firstChild.nodeType) === 3) return setSelection({
6449
+ focusNode: element.firstChild,
6450
+ anchorOffset,
6451
+ focusOffset
6452
+ });
6453
+ /* istanbul ignore next */ throw new Error("Not implemented. The result of this interaction is unreliable.");
6454
+ }
6455
+ function init_setSelectionRange() {
6456
+ return (init_setSelectionRange = __esmMin((() => {
6457
+ init_Clipboard();
6458
+ init_selection();
6459
+ init_setSelection();
6460
+ })))();
6461
+ }
6462
+ //#endregion
6463
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/radio.js
6464
+ function walkRadio(instance, el, direction) {
6465
+ const window = getWindow(el);
6466
+ const group = Array.from(el.ownerDocument.querySelectorAll(el.name ? `input[type="radio"][name="${window.CSS.escape(el.name)}"]` : `input[type="radio"][name=""], input[type="radio"]:not([name])`));
6467
+ for (let i = group.findIndex((e) => e === el) + direction;; i += direction) {
6468
+ if (!group[i]) i = direction > 0 ? 0 : group.length - 1;
6469
+ if (group[i] === el) return;
6470
+ if (isDisabled(group[i])) continue;
6471
+ focusElement(group[i]);
6472
+ instance.dispatchUIEvent(group[i], "click");
6473
+ return;
6474
+ }
6475
+ }
6476
+ function init_radio() {
6477
+ return (init_radio = __esmMin((() => {
6478
+ init_Clipboard();
6479
+ init_isDisabled();
6480
+ init_focus();
6481
+ })))();
6482
+ }
6483
+ //#endregion
6484
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keydown.js
6485
+ var keydownBehavior, combinationBehavior;
6486
+ function init_keydown() {
6487
+ return (init_keydown = __esmMin((() => {
6488
+ init_UI();
6489
+ init_getValueOrTextContent();
6490
+ init_Clipboard();
6491
+ init_isEditable();
6492
+ init_getActiveElement();
6493
+ init_getTabDestination();
6494
+ init_selection();
6495
+ init_focus();
6496
+ init_input();
6497
+ init_moveSelection();
6498
+ init_selectAll();
6499
+ init_setSelectionRange();
6500
+ init_radio();
6501
+ init_registry();
6502
+ behavior.keydown = (event, target, instance) => {
6503
+ var _ref;
6504
+ var _keydownBehavior_event_key;
6505
+ return (_ref = (_keydownBehavior_event_key = keydownBehavior[event.key]) === null || _keydownBehavior_event_key === void 0 ? void 0 : _keydownBehavior_event_key.call(keydownBehavior, event, target, instance)) !== null && _ref !== void 0 ? _ref : combinationBehavior(event, target, instance);
6506
+ };
6507
+ keydownBehavior = {
6508
+ ArrowDown: (event, target, instance) => {
6509
+ /* istanbul ignore else */ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, 1);
6510
+ },
6511
+ ArrowLeft: (event, target, instance) => {
6512
+ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, -1);
6513
+ return () => moveSelection(target, -1);
6514
+ },
6515
+ ArrowRight: (event, target, instance) => {
6516
+ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, 1);
6517
+ return () => moveSelection(target, 1);
6518
+ },
6519
+ ArrowUp: (event, target, instance) => {
6520
+ /* istanbul ignore else */ if (isElementType(target, "input", { type: "radio" })) return () => walkRadio(instance, target, -1);
6521
+ },
6522
+ Backspace: (event, target, instance) => {
6523
+ if (isEditable(target)) return () => {
6524
+ input(instance, target, "", "deleteContentBackward");
6525
+ };
6526
+ },
6527
+ Delete: (event, target, instance) => {
6528
+ if (isEditable(target)) return () => {
6529
+ input(instance, target, "", "deleteContentForward");
6530
+ };
6531
+ },
6532
+ End: (event, target) => {
6533
+ if (isElementType(target, ["input", "textarea"]) || isContentEditable(target)) return () => {
6534
+ var _ref;
6535
+ var _getValueOrTextContent;
6536
+ const newPos = (_ref = (_getValueOrTextContent = getValueOrTextContent(target)) === null || _getValueOrTextContent === void 0 ? void 0 : _getValueOrTextContent.length) !== null && _ref !== void 0 ? _ref : /* istanbul ignore next */ 0;
6537
+ setSelectionRange(target, newPos, newPos);
6538
+ };
6539
+ },
6540
+ Home: (event, target) => {
6541
+ if (isElementType(target, ["input", "textarea"]) || isContentEditable(target)) return () => {
6542
+ setSelectionRange(target, 0, 0);
6543
+ };
6544
+ },
6545
+ PageDown: (event, target) => {
6546
+ if (isElementType(target, ["input"])) return () => {
6547
+ const newPos = getUIValue(target).length;
6548
+ setSelectionRange(target, newPos, newPos);
6549
+ };
6550
+ },
6551
+ PageUp: (event, target) => {
6552
+ if (isElementType(target, ["input"])) return () => {
6553
+ setSelectionRange(target, 0, 0);
6554
+ };
6555
+ },
6556
+ Tab: (event, target, instance) => {
6557
+ return () => {
6558
+ const dest = getTabDestination(getActiveElementOrBody(instance.config.document), instance.system.keyboard.modifiers.Shift);
6559
+ focusElement(dest);
6560
+ if (hasOwnSelection(dest)) setUISelection(dest, {
6561
+ anchorOffset: 0,
6562
+ focusOffset: dest.value.length
6563
+ });
6564
+ };
6565
+ }
6566
+ };
6567
+ combinationBehavior = (event, target, instance) => {
6568
+ if (event.code === "KeyA" && instance.system.keyboard.modifiers.Control) return () => selectAll(target);
6569
+ };
6570
+ })))();
6571
+ }
6572
+ //#endregion
6573
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keypress.js
6574
+ var ClickInputOnEnter, SubmitSingleInputOnEnter;
6575
+ function init_keypress() {
6576
+ return (init_keypress = __esmMin((() => {
6577
+ init_Clipboard();
6578
+ init_isEditable();
6579
+ init_input();
6580
+ init_registry();
6581
+ behavior.keypress = (event, target, instance) => {
6582
+ if (event.key === "Enter") {
6583
+ if (isElementType(target, "button") || isElementType(target, "input") && ClickInputOnEnter.includes(target.type) || isElementType(target, "a") && Boolean(target.href)) return () => {
6584
+ instance.dispatchUIEvent(target, "click");
6585
+ };
6586
+ else if (isElementType(target, "input")) {
6587
+ const form = target.form;
6588
+ const submit = form === null || form === void 0 ? void 0 : form.querySelector("input[type=\"submit\"], button:not([type]), button[type=\"submit\"]");
6589
+ if (submit) return () => instance.dispatchUIEvent(submit, "click");
6590
+ else if (form && SubmitSingleInputOnEnter.includes(target.type) && form.querySelectorAll("input").length === 1) return () => instance.dispatchUIEvent(form, "submit");
6591
+ else return;
6592
+ }
6593
+ }
6594
+ if (isEditable(target)) {
6595
+ const inputType = event.key === "Enter" ? isContentEditable(target) && !instance.system.keyboard.modifiers.Shift ? "insertParagraph" : "insertLineBreak" : "insertText";
6596
+ const inputData = event.key === "Enter" ? "\n" : event.key;
6597
+ return () => input(instance, target, inputData, inputType);
6598
+ }
6599
+ };
6600
+ ClickInputOnEnter = [
6601
+ "button",
6602
+ "color",
6603
+ "file",
6604
+ "image",
6605
+ "reset",
6606
+ "submit"
6607
+ ];
6608
+ SubmitSingleInputOnEnter = [
6609
+ "email",
6610
+ "month",
6611
+ "password",
6612
+ "search",
6613
+ "tel",
6614
+ "text",
6615
+ "url",
6616
+ "week"
6617
+ ];
6618
+ })))();
6619
+ }
6620
+ //#endregion
6621
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/keyup.js
6622
+ var keyupBehavior;
6623
+ function init_keyup() {
6624
+ return (init_keyup = __esmMin((() => {
6625
+ init_isClickableInput();
6626
+ init_Clipboard();
6627
+ init_registry();
6628
+ behavior.keyup = (event, target, instance) => {
6629
+ var _keyupBehavior_event_key;
6630
+ return (_keyupBehavior_event_key = keyupBehavior[event.key]) === null || _keyupBehavior_event_key === void 0 ? void 0 : _keyupBehavior_event_key.call(keyupBehavior, event, target, instance);
6631
+ };
6632
+ keyupBehavior = { " ": (event, target, instance) => {
6633
+ if (isClickableInput(target)) return () => instance.dispatchUIEvent(target, "click");
6634
+ } };
6635
+ })))();
6636
+ }
6637
+ //#endregion
6638
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/behavior/paste.js
6639
+ function init_paste() {
6640
+ return (init_paste = __esmMin((() => {
6641
+ init_Clipboard();
6642
+ init_isEditable();
6643
+ init_input();
6644
+ init_registry();
6645
+ behavior.paste = (event, target, instance) => {
6646
+ if (isEditable(target)) return () => {
6647
+ var _event_clipboardData;
6648
+ const insertData = (_event_clipboardData = event.clipboardData) === null || _event_clipboardData === void 0 ? void 0 : _event_clipboardData.getData("text");
6649
+ if (insertData) input(instance, target, insertData, "insertFromPaste");
6650
+ };
6651
+ };
6652
+ })))();
6653
+ }
6654
+ //#endregion
6655
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/eventMap.js
6656
+ function getEventClass(type) {
6657
+ return eventMap[type].EventType;
6658
+ }
6659
+ function isMouseEvent(type) {
6660
+ return mouseEvents.includes(getEventClass(type));
6661
+ }
6662
+ function isKeyboardEvent(type) {
6663
+ return getEventClass(type) === "KeyboardEvent";
6664
+ }
6665
+ var eventMap, mouseEvents;
6666
+ function init_eventMap() {
6667
+ return (init_eventMap = __esmMin((() => {
6668
+ eventMap = {
6669
+ auxclick: {
6670
+ EventType: "PointerEvent",
6671
+ defaultInit: {
6672
+ bubbles: true,
6673
+ cancelable: true,
6674
+ composed: true
6675
+ }
6676
+ },
6677
+ beforeinput: {
6678
+ EventType: "InputEvent",
6679
+ defaultInit: {
6680
+ bubbles: true,
6681
+ cancelable: true,
6682
+ composed: true
6683
+ }
6684
+ },
6685
+ blur: {
6686
+ EventType: "FocusEvent",
6687
+ defaultInit: {
6688
+ bubbles: false,
6689
+ cancelable: false,
6690
+ composed: true
6691
+ }
6692
+ },
6693
+ click: {
6694
+ EventType: "PointerEvent",
6695
+ defaultInit: {
6696
+ bubbles: true,
6697
+ cancelable: true,
6698
+ composed: true
6699
+ }
6700
+ },
6701
+ contextmenu: {
6702
+ EventType: "PointerEvent",
6703
+ defaultInit: {
6704
+ bubbles: true,
6705
+ cancelable: true,
6706
+ composed: true
6707
+ }
6708
+ },
6709
+ copy: {
6710
+ EventType: "ClipboardEvent",
6711
+ defaultInit: {
6712
+ bubbles: true,
6713
+ cancelable: true,
6714
+ composed: true
6715
+ }
6716
+ },
6717
+ change: {
6718
+ EventType: "Event",
6719
+ defaultInit: {
6720
+ bubbles: true,
6721
+ cancelable: false
6722
+ }
6723
+ },
6724
+ cut: {
6725
+ EventType: "ClipboardEvent",
6726
+ defaultInit: {
6727
+ bubbles: true,
6728
+ cancelable: true,
6729
+ composed: true
6730
+ }
6731
+ },
6732
+ dblclick: {
6733
+ EventType: "MouseEvent",
6734
+ defaultInit: {
6735
+ bubbles: true,
6736
+ cancelable: true,
6737
+ composed: true
6738
+ }
6739
+ },
6740
+ focus: {
6741
+ EventType: "FocusEvent",
6742
+ defaultInit: {
6743
+ bubbles: false,
6744
+ cancelable: false,
6745
+ composed: true
6746
+ }
6747
+ },
6748
+ focusin: {
6749
+ EventType: "FocusEvent",
6750
+ defaultInit: {
6751
+ bubbles: true,
6752
+ cancelable: false,
6753
+ composed: true
6754
+ }
6755
+ },
6756
+ focusout: {
6757
+ EventType: "FocusEvent",
6758
+ defaultInit: {
6759
+ bubbles: true,
6760
+ cancelable: false,
6761
+ composed: true
6762
+ }
6763
+ },
6764
+ keydown: {
6765
+ EventType: "KeyboardEvent",
6766
+ defaultInit: {
6767
+ bubbles: true,
6768
+ cancelable: true,
6769
+ composed: true
6770
+ }
6771
+ },
6772
+ keypress: {
6773
+ EventType: "KeyboardEvent",
6774
+ defaultInit: {
6775
+ bubbles: true,
6776
+ cancelable: true,
6777
+ composed: true
6778
+ }
6779
+ },
6780
+ keyup: {
6781
+ EventType: "KeyboardEvent",
6782
+ defaultInit: {
6783
+ bubbles: true,
6784
+ cancelable: true,
6785
+ composed: true
6786
+ }
6787
+ },
6788
+ paste: {
6789
+ EventType: "ClipboardEvent",
6790
+ defaultInit: {
6791
+ bubbles: true,
6792
+ cancelable: true,
6793
+ composed: true
6794
+ }
6795
+ },
6796
+ input: {
6797
+ EventType: "InputEvent",
6798
+ defaultInit: {
6799
+ bubbles: true,
6800
+ cancelable: false,
6801
+ composed: true
6802
+ }
6803
+ },
6804
+ mousedown: {
6805
+ EventType: "MouseEvent",
6806
+ defaultInit: {
6807
+ bubbles: true,
6808
+ cancelable: true,
6809
+ composed: true
6810
+ }
6811
+ },
6812
+ mouseenter: {
6813
+ EventType: "MouseEvent",
6814
+ defaultInit: {
6815
+ bubbles: false,
6816
+ cancelable: false,
6817
+ composed: true
6818
+ }
6819
+ },
6820
+ mouseleave: {
6821
+ EventType: "MouseEvent",
6822
+ defaultInit: {
6823
+ bubbles: false,
6824
+ cancelable: false,
6825
+ composed: true
6826
+ }
6827
+ },
6828
+ mousemove: {
6829
+ EventType: "MouseEvent",
6830
+ defaultInit: {
6831
+ bubbles: true,
6832
+ cancelable: true,
6833
+ composed: true
6834
+ }
6835
+ },
6836
+ mouseout: {
6837
+ EventType: "MouseEvent",
6838
+ defaultInit: {
6839
+ bubbles: true,
6840
+ cancelable: true,
6841
+ composed: true
6842
+ }
6843
+ },
6844
+ mouseover: {
6845
+ EventType: "MouseEvent",
6846
+ defaultInit: {
6847
+ bubbles: true,
6848
+ cancelable: true,
6849
+ composed: true
6850
+ }
6851
+ },
6852
+ mouseup: {
6853
+ EventType: "MouseEvent",
6854
+ defaultInit: {
6855
+ bubbles: true,
6856
+ cancelable: true,
6857
+ composed: true
6858
+ }
6859
+ },
6860
+ pointerover: {
6861
+ EventType: "PointerEvent",
6862
+ defaultInit: {
6863
+ bubbles: true,
6864
+ cancelable: true,
6865
+ composed: true
6866
+ }
6867
+ },
6868
+ pointerenter: {
6869
+ EventType: "PointerEvent",
6870
+ defaultInit: {
6871
+ bubbles: false,
6872
+ cancelable: false
6873
+ }
6874
+ },
6875
+ pointerdown: {
6876
+ EventType: "PointerEvent",
6877
+ defaultInit: {
6878
+ bubbles: true,
6879
+ cancelable: true,
6880
+ composed: true
6881
+ }
6882
+ },
6883
+ pointermove: {
6884
+ EventType: "PointerEvent",
6885
+ defaultInit: {
6886
+ bubbles: true,
6887
+ cancelable: true,
6888
+ composed: true
6889
+ }
6890
+ },
6891
+ pointerup: {
6892
+ EventType: "PointerEvent",
6893
+ defaultInit: {
6894
+ bubbles: true,
6895
+ cancelable: true,
6896
+ composed: true
6897
+ }
6898
+ },
6899
+ pointercancel: {
6900
+ EventType: "PointerEvent",
6901
+ defaultInit: {
6902
+ bubbles: true,
6903
+ cancelable: false,
6904
+ composed: true
6905
+ }
6906
+ },
6907
+ pointerout: {
6908
+ EventType: "PointerEvent",
6909
+ defaultInit: {
6910
+ bubbles: true,
6911
+ cancelable: true,
6912
+ composed: true
6913
+ }
6914
+ },
6915
+ pointerleave: {
6916
+ EventType: "PointerEvent",
6917
+ defaultInit: {
6918
+ bubbles: false,
6919
+ cancelable: false
6920
+ }
6921
+ },
6922
+ submit: {
6923
+ EventType: "Event",
6924
+ defaultInit: {
6925
+ bubbles: true,
6926
+ cancelable: true
6927
+ }
6928
+ }
6929
+ };
6930
+ mouseEvents = ["MouseEvent", "PointerEvent"];
6931
+ })))();
6932
+ }
6933
+ //#endregion
6934
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/createEvent.js
6935
+ function createEvent(type, target, init) {
6936
+ const window = getWindow(target);
6937
+ const { EventType, defaultInit } = eventMap[type];
6938
+ const event = new (getEventConstructors(window))[EventType](type, defaultInit);
6939
+ eventInitializer[EventType].forEach((f) => f(event, init !== null && init !== void 0 ? init : {}));
6940
+ return event;
6941
+ }
6942
+ /* istanbul ignore next */ function getEventConstructors(window) {
6943
+ var _window_Event, _window_AnimationEvent, _window_ClipboardEvent, _window_PopStateEvent, _window_ProgressEvent, _window_TransitionEvent, _window_UIEvent, _window_CompositionEvent, _window_FocusEvent, _window_InputEvent, _window_KeyboardEvent, _window_MouseEvent, _window_DragEvent, _window_PointerEvent, _window_TouchEvent;
6944
+ const Event = (_window_Event = window.Event) !== null && _window_Event !== void 0 ? _window_Event : class Event {};
6945
+ const AnimationEvent = (_window_AnimationEvent = window.AnimationEvent) !== null && _window_AnimationEvent !== void 0 ? _window_AnimationEvent : class AnimationEvent extends Event {};
6946
+ const ClipboardEvent = (_window_ClipboardEvent = window.ClipboardEvent) !== null && _window_ClipboardEvent !== void 0 ? _window_ClipboardEvent : class ClipboardEvent extends Event {};
6947
+ const PopStateEvent = (_window_PopStateEvent = window.PopStateEvent) !== null && _window_PopStateEvent !== void 0 ? _window_PopStateEvent : class PopStateEvent extends Event {};
6948
+ const ProgressEvent = (_window_ProgressEvent = window.ProgressEvent) !== null && _window_ProgressEvent !== void 0 ? _window_ProgressEvent : class ProgressEvent extends Event {};
6949
+ const TransitionEvent = (_window_TransitionEvent = window.TransitionEvent) !== null && _window_TransitionEvent !== void 0 ? _window_TransitionEvent : class TransitionEvent extends Event {};
6950
+ const UIEvent = (_window_UIEvent = window.UIEvent) !== null && _window_UIEvent !== void 0 ? _window_UIEvent : class UIEvent extends Event {};
6951
+ const CompositionEvent = (_window_CompositionEvent = window.CompositionEvent) !== null && _window_CompositionEvent !== void 0 ? _window_CompositionEvent : class CompositionEvent extends UIEvent {};
6952
+ const FocusEvent = (_window_FocusEvent = window.FocusEvent) !== null && _window_FocusEvent !== void 0 ? _window_FocusEvent : class FocusEvent extends UIEvent {};
6953
+ const InputEvent = (_window_InputEvent = window.InputEvent) !== null && _window_InputEvent !== void 0 ? _window_InputEvent : class InputEvent extends UIEvent {};
6954
+ const KeyboardEvent = (_window_KeyboardEvent = window.KeyboardEvent) !== null && _window_KeyboardEvent !== void 0 ? _window_KeyboardEvent : class KeyboardEvent extends UIEvent {};
6955
+ const MouseEvent = (_window_MouseEvent = window.MouseEvent) !== null && _window_MouseEvent !== void 0 ? _window_MouseEvent : class MouseEvent extends UIEvent {};
6956
+ return {
6957
+ Event,
6958
+ AnimationEvent,
6959
+ ClipboardEvent,
6960
+ PopStateEvent,
6961
+ ProgressEvent,
6962
+ TransitionEvent,
6963
+ UIEvent,
6964
+ CompositionEvent,
6965
+ FocusEvent,
6966
+ InputEvent,
6967
+ KeyboardEvent,
6968
+ MouseEvent,
6969
+ DragEvent: (_window_DragEvent = window.DragEvent) !== null && _window_DragEvent !== void 0 ? _window_DragEvent : class DragEvent extends MouseEvent {},
6970
+ PointerEvent: (_window_PointerEvent = window.PointerEvent) !== null && _window_PointerEvent !== void 0 ? _window_PointerEvent : class PointerEvent extends MouseEvent {},
6971
+ TouchEvent: (_window_TouchEvent = window.TouchEvent) !== null && _window_TouchEvent !== void 0 ? _window_TouchEvent : class TouchEvent extends UIEvent {}
6972
+ };
6973
+ }
6974
+ function assignProps(obj, props) {
6975
+ for (const [key, value] of Object.entries(props)) Object.defineProperty(obj, key, { get: () => value !== null && value !== void 0 ? value : null });
6976
+ }
6977
+ function sanitizeNumber(n) {
6978
+ return Number(n !== null && n !== void 0 ? n : 0);
6979
+ }
6980
+ function initClipboardEvent(event, { clipboardData }) {
6981
+ assignProps(event, { clipboardData });
6982
+ }
6983
+ function initFocusEvent(event, { relatedTarget }) {
6984
+ assignProps(event, { relatedTarget });
6985
+ }
6986
+ function initInputEvent(event, { data, inputType, isComposing }) {
6987
+ assignProps(event, {
6988
+ data,
6989
+ isComposing: Boolean(isComposing),
6990
+ inputType: String(inputType)
6991
+ });
6992
+ }
6993
+ function initUIEvent(event, { view, detail }) {
6994
+ assignProps(event, {
6995
+ view,
6996
+ detail: sanitizeNumber(detail !== null && detail !== void 0 ? detail : 0)
6997
+ });
6998
+ }
6999
+ function initUIEventModifiers(event, { altKey, ctrlKey, metaKey, shiftKey, modifierAltGraph, modifierCapsLock, modifierFn, modifierFnLock, modifierNumLock, modifierScrollLock, modifierSymbol, modifierSymbolLock }) {
7000
+ assignProps(event, {
7001
+ altKey: Boolean(altKey),
7002
+ ctrlKey: Boolean(ctrlKey),
7003
+ metaKey: Boolean(metaKey),
7004
+ shiftKey: Boolean(shiftKey),
7005
+ getModifierState(k) {
7006
+ return Boolean({
7007
+ Alt: altKey,
7008
+ AltGraph: modifierAltGraph,
7009
+ CapsLock: modifierCapsLock,
7010
+ Control: ctrlKey,
7011
+ Fn: modifierFn,
7012
+ FnLock: modifierFnLock,
7013
+ Meta: metaKey,
7014
+ NumLock: modifierNumLock,
7015
+ ScrollLock: modifierScrollLock,
7016
+ Shift: shiftKey,
7017
+ Symbol: modifierSymbol,
7018
+ SymbolLock: modifierSymbolLock
7019
+ }[k]);
7020
+ }
7021
+ });
7022
+ }
7023
+ function initKeyboardEvent(event, { key, code, location, repeat, isComposing, charCode }) {
7024
+ assignProps(event, {
7025
+ key: String(key),
7026
+ code: String(code),
7027
+ location: sanitizeNumber(location),
7028
+ repeat: Boolean(repeat),
7029
+ isComposing: Boolean(isComposing),
7030
+ charCode
7031
+ });
7032
+ }
7033
+ function initMouseEvent(event, { x, y, screenX, screenY, clientX = x, clientY = y, button, buttons, relatedTarget, offsetX, offsetY, pageX, pageY }) {
7034
+ assignProps(event, {
7035
+ screenX: sanitizeNumber(screenX),
7036
+ screenY: sanitizeNumber(screenY),
7037
+ clientX: sanitizeNumber(clientX),
7038
+ x: sanitizeNumber(clientX),
7039
+ clientY: sanitizeNumber(clientY),
7040
+ y: sanitizeNumber(clientY),
7041
+ button: sanitizeNumber(button),
7042
+ buttons: sanitizeNumber(buttons),
7043
+ relatedTarget,
7044
+ offsetX: sanitizeNumber(offsetX),
7045
+ offsetY: sanitizeNumber(offsetY),
7046
+ pageX: sanitizeNumber(pageX),
7047
+ pageY: sanitizeNumber(pageY)
7048
+ });
7049
+ }
7050
+ function initPointerEvent(event, { pointerId, width, height, pressure, tangentialPressure, tiltX, tiltY, twist, pointerType, isPrimary, buttons }) {
7051
+ assignProps(event, {
7052
+ pointerId: sanitizeNumber(pointerId),
7053
+ width: sanitizeNumber(width !== null && width !== void 0 ? width : 1),
7054
+ height: sanitizeNumber(height !== null && height !== void 0 ? height : 1),
7055
+ pressure: sanitizeNumber(pressure !== null && pressure !== void 0 ? pressure : buttons ? .5 : 0),
7056
+ tangentialPressure: sanitizeNumber(tangentialPressure),
7057
+ tiltX: sanitizeNumber(tiltX),
7058
+ tiltY: sanitizeNumber(tiltY),
7059
+ twist: sanitizeNumber(twist),
7060
+ pointerType: String(pointerType !== null && pointerType !== void 0 ? pointerType : ""),
7061
+ isPrimary: Boolean(isPrimary)
7062
+ });
7063
+ }
7064
+ var eventInitializer;
7065
+ function init_createEvent() {
7066
+ return (init_createEvent = __esmMin((() => {
7067
+ init_Clipboard();
7068
+ init_eventMap();
7069
+ eventInitializer = {
7070
+ ClipboardEvent: [initClipboardEvent],
7071
+ Event: [],
7072
+ FocusEvent: [initUIEvent, initFocusEvent],
7073
+ InputEvent: [initUIEvent, initInputEvent],
7074
+ MouseEvent: [
7075
+ initUIEvent,
7076
+ initUIEventModifiers,
7077
+ initMouseEvent
7078
+ ],
7079
+ PointerEvent: [
7080
+ initUIEvent,
7081
+ initUIEventModifiers,
7082
+ initMouseEvent,
7083
+ initPointerEvent
7084
+ ],
7085
+ KeyboardEvent: [
7086
+ initUIEvent,
7087
+ initUIEventModifiers,
7088
+ initKeyboardEvent
7089
+ ]
7090
+ };
7091
+ })))();
7092
+ }
7093
+ //#endregion
7094
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/dispatchEvent.js
7095
+ function dispatchUIEvent(target, type, init, preventDefault = false) {
7096
+ if (isMouseEvent(type) || isKeyboardEvent(type)) init = {
7097
+ ...init,
7098
+ ...this.system.getUIEventModifiers()
7099
+ };
7100
+ const event = createEvent(type, target, init);
7101
+ return dispatchEvent.call(this, target, event, preventDefault);
7102
+ }
7103
+ function dispatchEvent(target, event, preventDefault = false) {
7104
+ var _behavior_type;
7105
+ const type = event.type;
7106
+ const behaviorImplementation = preventDefault ? () => {} : (_behavior_type = behavior[type]) === null || _behavior_type === void 0 ? void 0 : _behavior_type.call(behavior, event, target, this);
7107
+ if (behaviorImplementation) {
7108
+ event.preventDefault();
7109
+ let defaultPrevented = false;
7110
+ Object.defineProperty(event, "defaultPrevented", { get: () => defaultPrevented });
7111
+ Object.defineProperty(event, "preventDefault", { value: () => {
7112
+ defaultPrevented = event.cancelable;
7113
+ } });
7114
+ wrapEvent(() => target.dispatchEvent(event));
7115
+ if (!defaultPrevented) behaviorImplementation();
7116
+ return !defaultPrevented;
7117
+ }
7118
+ return wrapEvent(() => target.dispatchEvent(event));
7119
+ }
7120
+ function dispatchDOMEvent(target, type, init) {
7121
+ const event = createEvent(type, target, init);
7122
+ wrapEvent(() => target.dispatchEvent(event));
7123
+ }
7124
+ function init_dispatchEvent() {
7125
+ return (init_dispatchEvent = __esmMin((() => {
7126
+ init_click();
7127
+ init_cut();
7128
+ init_keydown();
7129
+ init_keypress();
7130
+ init_keyup();
7131
+ init_paste();
7132
+ init_registry();
7133
+ init_wrapEvent();
7134
+ init_eventMap();
7135
+ init_createEvent();
7136
+ })))();
7137
+ }
7138
+ //#endregion
7139
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/patchFocus.js
7140
+ function patchFocus(HTMLElement) {
7141
+ if (HTMLElement.prototype[patched]) return;
7142
+ const { focus, blur } = HTMLElement.prototype;
7143
+ Object.defineProperties(HTMLElement.prototype, {
7144
+ focus: {
7145
+ configurable: true,
7146
+ value: patchedFocus,
7147
+ writable: true
7148
+ },
7149
+ blur: {
7150
+ configurable: true,
7151
+ value: patchedBlur,
7152
+ writable: true
7153
+ },
7154
+ [patched]: {
7155
+ configurable: true,
7156
+ get: () => ({
7157
+ focus,
7158
+ blur
7159
+ })
7160
+ }
7161
+ });
7162
+ let activeCall;
7163
+ function patchedFocus(options) {
7164
+ if (this.ownerDocument.visibilityState !== "hidden") return focus.call(this, options);
7165
+ const blurred = getActiveTarget(this.ownerDocument);
7166
+ if (blurred === this) return;
7167
+ const thisCall = Symbol("focus call");
7168
+ activeCall = thisCall;
7169
+ if (blurred) {
7170
+ blur.call(blurred);
7171
+ dispatchDOMEvent(blurred, "blur", { relatedTarget: this });
7172
+ dispatchDOMEvent(blurred, "focusout", { relatedTarget: activeCall === thisCall ? this : null });
7173
+ }
7174
+ if (activeCall === thisCall) {
7175
+ focus.call(this, options);
7176
+ dispatchDOMEvent(this, "focus", { relatedTarget: blurred });
7177
+ }
7178
+ if (activeCall === thisCall) dispatchDOMEvent(this, "focusin", { relatedTarget: blurred });
7179
+ }
7180
+ function patchedBlur() {
7181
+ if (this.ownerDocument.visibilityState !== "hidden") return blur.call(this);
7182
+ const blurred = getActiveTarget(this.ownerDocument);
7183
+ if (blurred !== this) return;
7184
+ activeCall = Symbol("blur call");
7185
+ blur.call(this);
7186
+ dispatchDOMEvent(blurred, "blur", { relatedTarget: null });
7187
+ dispatchDOMEvent(blurred, "focusout", { relatedTarget: null });
7188
+ }
7189
+ }
7190
+ function getActiveTarget(document) {
7191
+ const active = getActiveElement(document);
7192
+ return (active === null || active === void 0 ? void 0 : active.tagName) === "BODY" ? null : active;
7193
+ }
7194
+ var patched;
7195
+ function init_patchFocus() {
7196
+ return (init_patchFocus = __esmMin((() => {
7197
+ init_dispatchEvent();
7198
+ init_Clipboard();
7199
+ init_getActiveElement();
7200
+ init_dom_esm();
7201
+ patched = Symbol("patched focus/blur methods");
7202
+ })))();
7203
+ }
7204
+ //#endregion
7205
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/interceptor.js
7206
+ function prepareInterceptor(element, propName, interceptorImpl) {
7207
+ const prototypeDescriptor = Object.getOwnPropertyDescriptor(element.constructor.prototype, propName);
7208
+ const objectDescriptor = Object.getOwnPropertyDescriptor(element, propName);
7209
+ const target = (prototypeDescriptor === null || prototypeDescriptor === void 0 ? void 0 : prototypeDescriptor.set) ? "set" : "value";
7210
+ /* istanbul ignore if */ if (typeof (prototypeDescriptor === null || prototypeDescriptor === void 0 ? void 0 : prototypeDescriptor[target]) !== "function" || prototypeDescriptor[target][Interceptor]) throw new Error(`Element ${element.tagName} does not implement "${String(propName)}".`);
7211
+ function intercept(...args) {
7212
+ const { applyNative = false, realArgs, then } = interceptorImpl.call(this, ...args);
7213
+ const sourceDescriptor = !applyNative && objectDescriptor ? objectDescriptor : prototypeDescriptor;
7214
+ const realFunc = sourceDescriptor === null || sourceDescriptor === void 0 ? void 0 : sourceDescriptor[target];
7215
+ if (target === "set") realFunc.call(this, realArgs);
7216
+ else realFunc.call(this, ...realArgs);
7217
+ then === null || then === void 0 || then();
7218
+ }
7219
+ intercept[Interceptor] = Interceptor;
7220
+ Object.defineProperty(element, propName, {
7221
+ ...objectDescriptor !== null && objectDescriptor !== void 0 ? objectDescriptor : prototypeDescriptor,
7222
+ [target]: intercept
7223
+ });
7224
+ }
7225
+ function prepareValueInterceptor(element) {
7226
+ prepareInterceptor(element, "value", function interceptorImpl(v) {
7227
+ const value = v === null ? "" : v;
7228
+ const isUI = isUIValue(value);
7229
+ if (isUI) startTrackValue(this);
7230
+ return {
7231
+ applyNative: !!isUI,
7232
+ realArgs: sanitizeValue(this, value),
7233
+ then: isUI ? void 0 : () => trackOrSetValue(this, String(value))
7234
+ };
7235
+ });
7236
+ }
7237
+ function sanitizeValue(element, v) {
7238
+ if (isElementType(element, "input", { type: "number" }) && String(v) !== "" && !Number.isNaN(Number(v))) return String(Number(v));
7239
+ return String(v);
7240
+ }
7241
+ function prepareSelectionInterceptor(element) {
7242
+ prepareInterceptor(element, "setSelectionRange", function interceptorImpl(start, ...others) {
7243
+ const isUI = isUISelectionStart(start);
7244
+ return {
7245
+ applyNative: !!isUI,
7246
+ realArgs: [Number(start), ...others],
7247
+ then: () => isUI ? void 0 : setUISelectionClean(element)
7248
+ };
7249
+ });
7250
+ prepareInterceptor(element, "selectionStart", function interceptorImpl(v) {
7251
+ return {
7252
+ realArgs: v,
7253
+ then: () => setUISelectionClean(element)
7254
+ };
7255
+ });
7256
+ prepareInterceptor(element, "selectionEnd", function interceptorImpl(v) {
7257
+ return {
7258
+ realArgs: v,
7259
+ then: () => setUISelectionClean(element)
7260
+ };
7261
+ });
7262
+ prepareInterceptor(element, "select", function interceptorImpl() {
7263
+ return {
7264
+ realArgs: [],
7265
+ then: () => setUISelectionRaw(element, {
7266
+ anchorOffset: 0,
7267
+ focusOffset: getUIValue(element).length
7268
+ })
7269
+ };
7270
+ });
7271
+ }
7272
+ function prepareRangeTextInterceptor(element) {
7273
+ prepareInterceptor(element, "setRangeText", function interceptorImpl(...realArgs) {
7274
+ return {
7275
+ realArgs,
7276
+ then: () => {
7277
+ setUIValueClean(element);
7278
+ setUISelectionClean(element);
7279
+ }
7280
+ };
7281
+ });
7282
+ }
7283
+ var Interceptor;
7284
+ function init_interceptor() {
7285
+ return (init_interceptor = __esmMin((() => {
7286
+ init_Clipboard();
7287
+ init_trackValue();
7288
+ init_UI();
7289
+ Interceptor = Symbol("Interceptor for programmatical calls");
7290
+ })))();
7291
+ }
7292
+ //#endregion
7293
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/prepareDocument.js
7294
+ function prepareDocument(document) {
7295
+ if (document[isPrepared]) return;
7296
+ document.addEventListener("focus", (e) => {
7297
+ const el = e.target;
7298
+ prepareElement(el);
7299
+ }, {
7300
+ capture: true,
7301
+ passive: true
7302
+ });
7303
+ // istanbul ignore else
7304
+ if (document.activeElement) prepareElement(document.activeElement);
7305
+ document.addEventListener("blur", (e) => {
7306
+ const el = e.target;
7307
+ const initialValue = getInitialValue(el);
7308
+ if (initialValue !== void 0) {
7309
+ if (el.value !== initialValue) dispatchDOMEvent(el, "change");
7310
+ clearInitialValue(el);
7311
+ }
7312
+ }, {
7313
+ capture: true,
7314
+ passive: true
7315
+ });
7316
+ document[isPrepared] = isPrepared;
7317
+ }
7318
+ function prepareElement(el) {
7319
+ if (el[isPrepared]) return;
7320
+ if (isElementType(el, ["input", "textarea"])) {
7321
+ prepareValueInterceptor(el);
7322
+ prepareSelectionInterceptor(el);
7323
+ prepareRangeTextInterceptor(el);
7324
+ }
7325
+ el[isPrepared] = isPrepared;
7326
+ }
7327
+ var isPrepared;
7328
+ function init_prepareDocument() {
7329
+ return (init_prepareDocument = __esmMin((() => {
7330
+ init_dispatchEvent();
7331
+ init_Clipboard();
7332
+ init_UI();
7333
+ init_dom_esm();
7334
+ init_interceptor();
7335
+ isPrepared = Symbol("Node prepared with document state workarounds");
7336
+ })))();
7337
+ }
7338
+ //#endregion
7339
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getDocumentFromNode.js
7340
+ function getDocumentFromNode(el) {
7341
+ return isDocument(el) ? el : el.ownerDocument;
7342
+ }
7343
+ function isDocument(node) {
7344
+ return node.nodeType === 9;
7345
+ }
7346
+ //#endregion
7347
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/level.js
7348
+ function setLevelRef(instance, level) {
7349
+ instance.levelRefs[level] = {};
7350
+ }
7351
+ function getLevelRef(instance, level) {
7352
+ return instance.levelRefs[level];
7353
+ }
7354
+ var ApiLevel;
7355
+ function init_level() {
7356
+ return (init_level = __esmMin((() => {
7357
+ ApiLevel = /*#__PURE__*/ function(ApiLevel) {
7358
+ ApiLevel[ApiLevel["Trigger"] = 2] = "Trigger";
7359
+ ApiLevel[ApiLevel["Call"] = 1] = "Call";
7360
+ return ApiLevel;
7361
+ }({});
7362
+ })))();
7363
+ }
7364
+ //#endregion
7365
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/wait.js
7366
+ function wait(config) {
7367
+ const delay = config.delay;
7368
+ if (typeof delay !== "number") return;
7369
+ return Promise.all([new Promise((resolve) => globalThis.setTimeout(() => resolve(), delay)), config.advanceTimers(delay)]);
7370
+ }
7371
+ //#endregion
7372
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/options.js
7373
+ var PointerEventsCheckLevel;
7374
+ function init_options() {
7375
+ return (init_options = __esmMin((() => {
7376
+ PointerEventsCheckLevel = /*#__PURE__*/ function(PointerEventsCheckLevel) {
7377
+ /**
7378
+ * Check pointer events on every user interaction that triggers a bunch of events.
7379
+ * E.g. once for releasing a mouse button even though this triggers `pointerup`, `mouseup`, `click`, etc...
7380
+ */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachTrigger"] = 4] = "EachTrigger";
7381
+ /** Check each target once per call to pointer (related) API */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachApiCall"] = 2] = "EachApiCall";
7382
+ /** Check each event target once */ PointerEventsCheckLevel[PointerEventsCheckLevel["EachTarget"] = 1] = "EachTarget";
7383
+ /** No pointer events check */ PointerEventsCheckLevel[PointerEventsCheckLevel["Never"] = 0] = "Never";
7384
+ return PointerEventsCheckLevel;
7385
+ }({});
7386
+ })))();
7387
+ }
7388
+ //#endregion
7389
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/keyboard.js
7390
+ function _define_property$6(obj, key, value) {
7391
+ if (key in obj) Object.defineProperty(obj, key, {
7392
+ value,
7393
+ enumerable: true,
7394
+ configurable: true,
7395
+ writable: true
7396
+ });
7397
+ else obj[key] = value;
7398
+ return obj;
7399
+ }
7400
+ function isModifierKey(key) {
7401
+ return modifierKeys.includes(key);
7402
+ }
7403
+ function isModifierLock(key) {
7404
+ return modifierLocks.includes(key);
7405
+ }
7406
+ var DOM_KEY_LOCATION, modifierKeys, modifierLocks, KeyboardHost;
7407
+ function init_keyboard() {
7408
+ return (init_keyboard = __esmMin((() => {
7409
+ init_Clipboard();
7410
+ init_getActiveElement();
7411
+ DOM_KEY_LOCATION = /*#__PURE__*/ function(DOM_KEY_LOCATION) {
7412
+ DOM_KEY_LOCATION[DOM_KEY_LOCATION["STANDARD"] = 0] = "STANDARD";
7413
+ DOM_KEY_LOCATION[DOM_KEY_LOCATION["LEFT"] = 1] = "LEFT";
7414
+ DOM_KEY_LOCATION[DOM_KEY_LOCATION["RIGHT"] = 2] = "RIGHT";
7415
+ DOM_KEY_LOCATION[DOM_KEY_LOCATION["NUMPAD"] = 3] = "NUMPAD";
7416
+ return DOM_KEY_LOCATION;
7417
+ }({});
7418
+ modifierKeys = [
7419
+ "Alt",
7420
+ "AltGraph",
7421
+ "Control",
7422
+ "Fn",
7423
+ "Meta",
7424
+ "Shift",
7425
+ "Symbol"
7426
+ ];
7427
+ modifierLocks = [
7428
+ "CapsLock",
7429
+ "FnLock",
7430
+ "NumLock",
7431
+ "ScrollLock",
7432
+ "SymbolLock"
7433
+ ];
7434
+ KeyboardHost = class {
7435
+ isKeyPressed(keyDef) {
7436
+ return this.pressed.has(String(keyDef.code));
7437
+ }
7438
+ getPressedKeys() {
7439
+ return this.pressed.values().map((p) => p.keyDef);
7440
+ }
7441
+ /** Press a key */ async keydown(instance, keyDef, repeat = false) {
7442
+ const key = String(keyDef.key);
7443
+ const code = String(keyDef.code);
7444
+ const target = getActiveElementOrBody(instance.config.document);
7445
+ this.setKeydownTarget(target);
7446
+ this.pressed.add(code, keyDef);
7447
+ if (isModifierKey(key)) this.modifiers[key] = true;
7448
+ const unprevented = instance.dispatchUIEvent(target, "keydown", {
7449
+ key,
7450
+ code,
7451
+ repeat
7452
+ });
7453
+ if (isModifierLock(key) && !this.modifiers[key]) {
7454
+ this.modifiers[key] = true;
7455
+ this.modifierLockStart[key] = true;
7456
+ }
7457
+ if (unprevented) this.pressed.setUnprevented(code);
7458
+ if (unprevented && this.hasKeyPress(key)) instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keypress", {
7459
+ key,
7460
+ code,
7461
+ charCode: keyDef.key === "Enter" ? 13 : String(keyDef.key).charCodeAt(0)
7462
+ });
7463
+ }
7464
+ /** Release a key */ async keyup(instance, keyDef) {
7465
+ const key = String(keyDef.key);
7466
+ const code = String(keyDef.code);
7467
+ const unprevented = this.pressed.isUnprevented(code);
7468
+ this.pressed.delete(code);
7469
+ if (isModifierKey(key) && !this.pressed.values().find((p) => p.keyDef.key === key)) this.modifiers[key] = false;
7470
+ instance.dispatchUIEvent(getActiveElementOrBody(instance.config.document), "keyup", {
7471
+ key,
7472
+ code
7473
+ }, !unprevented);
7474
+ if (isModifierLock(key) && this.modifiers[key]) {
7475
+ if (this.modifierLockStart[key]) this.modifierLockStart[key] = false;
7476
+ else this.modifiers[key] = false;
7477
+ }
7478
+ }
7479
+ setKeydownTarget(target) {
7480
+ if (target !== this.lastKeydownTarget) this.carryChar = "";
7481
+ this.lastKeydownTarget = target;
7482
+ }
7483
+ hasKeyPress(key) {
7484
+ return (key.length === 1 || key === "Enter") && !this.modifiers.Control && !this.modifiers.Alt;
7485
+ }
7486
+ constructor(system) {
7487
+ _define_property$6(this, "system", void 0);
7488
+ _define_property$6(this, "modifiers", {
7489
+ Alt: false,
7490
+ AltGraph: false,
7491
+ CapsLock: false,
7492
+ Control: false,
7493
+ Fn: false,
7494
+ FnLock: false,
7495
+ Meta: false,
7496
+ NumLock: false,
7497
+ ScrollLock: false,
7498
+ Shift: false,
7499
+ Symbol: false,
7500
+ SymbolLock: false
7501
+ });
7502
+ _define_property$6(this, "pressed", new class {
7503
+ add(code, keyDef) {
7504
+ var _this_registry, _code, _;
7505
+ (_ = (_this_registry = this.registry)[_code = code]) !== null && _ !== void 0 || (_this_registry[_code] = {
7506
+ keyDef,
7507
+ unpreventedDefault: false
7508
+ });
7509
+ }
7510
+ has(code) {
7511
+ return !!this.registry[code];
7512
+ }
7513
+ setUnprevented(code) {
7514
+ const o = this.registry[code];
7515
+ if (o) o.unpreventedDefault = true;
7516
+ }
7517
+ isUnprevented(code) {
7518
+ var _this_registry_code;
7519
+ return !!((_this_registry_code = this.registry[code]) === null || _this_registry_code === void 0 ? void 0 : _this_registry_code.unpreventedDefault);
7520
+ }
7521
+ delete(code) {
7522
+ delete this.registry[code];
7523
+ }
7524
+ values() {
7525
+ return Object.values(this.registry);
7526
+ }
7527
+ constructor() {
7528
+ _define_property$6(this, "registry", {});
7529
+ }
7530
+ }());
7531
+ _define_property$6(this, "carryChar", "");
7532
+ _define_property$6(this, "lastKeydownTarget", void 0);
7533
+ _define_property$6(this, "modifierLockStart", {});
7534
+ this.system = system;
7535
+ }
7536
+ };
7537
+ })))();
7538
+ }
7539
+ //#endregion
7540
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/keyboard/keyMap.js
7541
+ var defaultKeyMap$1;
7542
+ function init_keyMap() {
7543
+ return (init_keyMap = __esmMin((() => {
7544
+ init_keyboard();
7545
+ defaultKeyMap$1 = [
7546
+ ..."0123456789".split("").map((c) => ({
7547
+ code: `Digit${c}`,
7548
+ key: c
7549
+ })),
7550
+ ...")!@#$%^&*(".split("").map((c, i) => ({
7551
+ code: `Digit${i}`,
7552
+ key: c,
7553
+ shiftKey: true
7554
+ })),
7555
+ ..."abcdefghijklmnopqrstuvwxyz".split("").map((c) => ({
7556
+ code: `Key${c.toUpperCase()}`,
7557
+ key: c
7558
+ })),
7559
+ ..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map((c) => ({
7560
+ code: `Key${c}`,
7561
+ key: c,
7562
+ shiftKey: true
7563
+ })),
7564
+ {
7565
+ code: "BracketLeft",
7566
+ key: "["
7567
+ },
7568
+ {
7569
+ code: "BracketLeft",
7570
+ key: "{",
7571
+ shiftKey: true
7572
+ },
7573
+ {
7574
+ code: "BracketRight",
7575
+ key: "]"
7576
+ },
7577
+ {
7578
+ code: "BracketRight",
7579
+ key: "}",
7580
+ shiftKey: true
7581
+ },
7582
+ {
7583
+ code: "Space",
7584
+ key: " "
7585
+ },
7586
+ {
7587
+ code: "AltLeft",
7588
+ key: "Alt",
7589
+ location: DOM_KEY_LOCATION.LEFT
7590
+ },
7591
+ {
7592
+ code: "AltRight",
7593
+ key: "Alt",
7594
+ location: DOM_KEY_LOCATION.RIGHT
7595
+ },
7596
+ {
7597
+ code: "ShiftLeft",
7598
+ key: "Shift",
7599
+ location: DOM_KEY_LOCATION.LEFT
7600
+ },
7601
+ {
7602
+ code: "ShiftRight",
7603
+ key: "Shift",
7604
+ location: DOM_KEY_LOCATION.RIGHT
7605
+ },
7606
+ {
7607
+ code: "ControlLeft",
7608
+ key: "Control",
7609
+ location: DOM_KEY_LOCATION.LEFT
7610
+ },
7611
+ {
7612
+ code: "ControlRight",
7613
+ key: "Control",
7614
+ location: DOM_KEY_LOCATION.RIGHT
7615
+ },
7616
+ {
7617
+ code: "MetaLeft",
7618
+ key: "Meta",
7619
+ location: DOM_KEY_LOCATION.LEFT
7620
+ },
7621
+ {
7622
+ code: "MetaRight",
7623
+ key: "Meta",
7624
+ location: DOM_KEY_LOCATION.RIGHT
7625
+ },
7626
+ {
7627
+ code: "OSLeft",
7628
+ key: "OS",
7629
+ location: DOM_KEY_LOCATION.LEFT
7630
+ },
7631
+ {
7632
+ code: "OSRight",
7633
+ key: "OS",
7634
+ location: DOM_KEY_LOCATION.RIGHT
7635
+ },
7636
+ {
7637
+ code: "ContextMenu",
7638
+ key: "ContextMenu"
7639
+ },
7640
+ {
7641
+ code: "Tab",
7642
+ key: "Tab"
7643
+ },
7644
+ {
7645
+ code: "CapsLock",
7646
+ key: "CapsLock"
7647
+ },
7648
+ {
7649
+ code: "Backspace",
7650
+ key: "Backspace"
7651
+ },
7652
+ {
7653
+ code: "Enter",
7654
+ key: "Enter"
7655
+ },
7656
+ {
7657
+ code: "Escape",
7658
+ key: "Escape"
7659
+ },
7660
+ {
7661
+ code: "ArrowUp",
7662
+ key: "ArrowUp"
7663
+ },
7664
+ {
7665
+ code: "ArrowDown",
7666
+ key: "ArrowDown"
7667
+ },
7668
+ {
7669
+ code: "ArrowLeft",
7670
+ key: "ArrowLeft"
7671
+ },
7672
+ {
7673
+ code: "ArrowRight",
7674
+ key: "ArrowRight"
7675
+ },
7676
+ {
7677
+ code: "Home",
7678
+ key: "Home"
7679
+ },
7680
+ {
7681
+ code: "End",
7682
+ key: "End"
7683
+ },
7684
+ {
7685
+ code: "Delete",
7686
+ key: "Delete"
7687
+ },
7688
+ {
7689
+ code: "PageUp",
7690
+ key: "PageUp"
7691
+ },
7692
+ {
7693
+ code: "PageDown",
7694
+ key: "PageDown"
7695
+ },
7696
+ {
7697
+ code: "Fn",
7698
+ key: "Fn"
7699
+ },
7700
+ {
7701
+ code: "Symbol",
7702
+ key: "Symbol"
7703
+ },
7704
+ {
7705
+ code: "AltRight",
7706
+ key: "AltGraph"
7707
+ }
7708
+ ];
7709
+ })))();
7710
+ }
7711
+ //#endregion
7712
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/pointer/keyMap.js
7713
+ var defaultKeyMap;
7714
+ function init_keyMap$1() {
7715
+ return (init_keyMap$1 = __esmMin((() => {
7716
+ defaultKeyMap = [
7717
+ {
7718
+ name: "MouseLeft",
7719
+ pointerType: "mouse",
7720
+ button: "primary"
7721
+ },
7722
+ {
7723
+ name: "MouseRight",
7724
+ pointerType: "mouse",
7725
+ button: "secondary"
7726
+ },
7727
+ {
7728
+ name: "MouseMiddle",
7729
+ pointerType: "mouse",
7730
+ button: "auxiliary"
7731
+ },
7732
+ {
7733
+ name: "TouchA",
7734
+ pointerType: "touch"
7735
+ },
7736
+ {
7737
+ name: "TouchB",
7738
+ pointerType: "touch"
7739
+ },
7740
+ {
7741
+ name: "TouchC",
7742
+ pointerType: "touch"
7743
+ }
7744
+ ];
7745
+ })))();
7746
+ }
7747
+ //#endregion
7748
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/buttons.js
7749
+ function _define_property$5(obj, key, value) {
7750
+ if (key in obj) Object.defineProperty(obj, key, {
7751
+ value,
7752
+ enumerable: true,
7753
+ configurable: true,
7754
+ writable: true
7755
+ });
7756
+ else obj[key] = value;
7757
+ return obj;
7758
+ }
7759
+ function getMouseButtonId(button = 0) {
7760
+ if (button in MouseButton) return MouseButton[button];
7761
+ return Number(button);
7762
+ }
7763
+ function getMouseEventButton(button) {
7764
+ button = getMouseButtonId(button);
7765
+ if (button in MouseButtonFlip) return MouseButtonFlip[button];
7766
+ return button;
7767
+ }
7768
+ var Buttons, MouseButton, MouseButtonFlip;
7769
+ function init_buttons() {
7770
+ return (init_buttons = __esmMin((() => {
7771
+ Buttons = class {
7772
+ getButtons() {
7773
+ let v = 0;
7774
+ for (const button of Object.keys(this.pressed)) v |= 2 ** Number(button);
7775
+ return v;
7776
+ }
7777
+ down(keyDef) {
7778
+ const button = getMouseButtonId(keyDef.button);
7779
+ if (button in this.pressed) {
7780
+ this.pressed[button].push(keyDef);
7781
+ return;
7782
+ }
7783
+ this.pressed[button] = [keyDef];
7784
+ return button;
7785
+ }
7786
+ up(keyDef) {
7787
+ const button = getMouseButtonId(keyDef.button);
7788
+ if (button in this.pressed) {
7789
+ this.pressed[button] = this.pressed[button].filter((k) => k.name !== keyDef.name);
7790
+ if (this.pressed[button].length === 0) {
7791
+ delete this.pressed[button];
7792
+ return button;
7793
+ }
7794
+ }
7795
+ }
7796
+ constructor() {
7797
+ _define_property$5(this, "pressed", {});
7798
+ }
7799
+ };
7800
+ MouseButton = {
7801
+ primary: 0,
7802
+ secondary: 1,
7803
+ auxiliary: 2,
7804
+ back: 3,
7805
+ X1: 3,
7806
+ forward: 4,
7807
+ X2: 4
7808
+ };
7809
+ MouseButtonFlip = {
7810
+ 1: 2,
7811
+ 2: 1
7812
+ };
7813
+ })))();
7814
+ }
7815
+ //#endregion
7816
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/device.js
7817
+ function _define_property$4(obj, key, value) {
7818
+ if (key in obj) Object.defineProperty(obj, key, {
7819
+ value,
7820
+ enumerable: true,
7821
+ configurable: true,
7822
+ writable: true
7823
+ });
7824
+ else obj[key] = value;
7825
+ return obj;
7826
+ }
7827
+ var Device;
7828
+ function init_device() {
7829
+ return (init_device = __esmMin((() => {
7830
+ Device = class {
7831
+ get countPressed() {
7832
+ return this.pressedKeys.size;
7833
+ }
7834
+ isPressed(keyDef) {
7835
+ return this.pressedKeys.has(keyDef.name);
7836
+ }
7837
+ addPressed(keyDef) {
7838
+ return this.pressedKeys.add(keyDef.name);
7839
+ }
7840
+ removePressed(keyDef) {
7841
+ return this.pressedKeys.delete(keyDef.name);
7842
+ }
7843
+ constructor() {
7844
+ _define_property$4(this, "pressedKeys", /* @__PURE__ */ new Set());
7845
+ }
7846
+ };
7847
+ })))();
7848
+ }
7849
+ //#endregion
7850
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/misc/getTreeDiff.js
7851
+ function getTreeDiff(a, b) {
7852
+ const treeA = [];
7853
+ for (let el = a; el; el = el.parentElement) treeA.push(el);
7854
+ const treeB = [];
7855
+ for (let el = b; el; el = el.parentElement) treeB.push(el);
7856
+ let i = 0;
7857
+ for (;; i++) if (i >= treeA.length || i >= treeB.length || treeA[treeA.length - 1 - i] !== treeB[treeB.length - 1 - i]) break;
7858
+ return [
7859
+ treeA.slice(0, treeA.length - i),
7860
+ treeB.slice(0, treeB.length - i),
7861
+ treeB.slice(treeB.length - i)
7862
+ ];
7863
+ }
7864
+ //#endregion
7865
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/resolveCaretPosition.js
7866
+ function resolveCaretPosition({ target, node, offset }) {
7867
+ if (hasOwnSelection(target)) return {
7868
+ node: target,
7869
+ offset: offset !== null && offset !== void 0 ? offset : getUIValue(target).length
7870
+ };
7871
+ else if (node) return {
7872
+ node,
7873
+ offset: offset !== null && offset !== void 0 ? offset : node.nodeType === 3 ? node.nodeValue.length : node.childNodes.length
7874
+ };
7875
+ return findNodeAtTextOffset(target, offset);
7876
+ }
7877
+ function findNodeAtTextOffset(node, offset, isRoot = true) {
7878
+ let i = offset === void 0 ? node.childNodes.length - 1 : 0;
7879
+ const step = offset === void 0 ? -1 : 1;
7880
+ while (offset === void 0 ? i >= (isRoot ? Math.max(node.childNodes.length - 1, 0) : 0) : i <= node.childNodes.length) {
7881
+ if (offset && i === node.childNodes.length) throw new Error("The given offset is out of bounds.");
7882
+ const c = node.childNodes.item(i);
7883
+ const text = String(c.textContent);
7884
+ if (text.length) {
7885
+ if (offset !== void 0 && text.length < offset) offset -= text.length;
7886
+ else if (c.nodeType === 1) return findNodeAtTextOffset(c, offset, false);
7887
+ else if (c.nodeType === 3) return {
7888
+ node: c,
7889
+ offset: offset !== null && offset !== void 0 ? offset : c.nodeValue.length
7890
+ };
7891
+ }
7892
+ i += step;
7893
+ }
7894
+ return {
7895
+ node,
7896
+ offset: node.childNodes.length
7897
+ };
7898
+ }
7899
+ function init_resolveCaretPosition() {
7900
+ return (init_resolveCaretPosition = __esmMin((() => {
7901
+ init_UI();
7902
+ init_Clipboard();
7903
+ init_selection();
7904
+ })))();
7905
+ }
7906
+ //#endregion
7907
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/setSelectionPerMouse.js
7908
+ function setSelectionPerMouseDown({ document, target, clickCount, node, offset }) {
7909
+ if (hasNoSelection(target)) return;
7910
+ const targetHasOwnSelection = hasOwnSelection(target);
7911
+ const text = String(targetHasOwnSelection ? getUIValue(target) : target.textContent);
7912
+ const [start, end] = node ? [offset, offset] : getTextRange(text, offset, clickCount);
7913
+ if (targetHasOwnSelection) {
7914
+ setUISelection(target, {
7915
+ anchorOffset: start !== null && start !== void 0 ? start : text.length,
7916
+ focusOffset: end !== null && end !== void 0 ? end : text.length
7917
+ });
7918
+ return {
7919
+ node: target,
7920
+ start: start !== null && start !== void 0 ? start : 0,
7921
+ end: end !== null && end !== void 0 ? end : text.length
7922
+ };
7923
+ } else {
7924
+ const { node: startNode, offset: startOffset } = resolveCaretPosition({
7925
+ target,
7926
+ node,
7927
+ offset: start
7928
+ });
7929
+ const { node: endNode, offset: endOffset } = resolveCaretPosition({
7930
+ target,
7931
+ node,
7932
+ offset: end
7933
+ });
7934
+ const range = target.ownerDocument.createRange();
7935
+ try {
7936
+ range.setStart(startNode, startOffset);
7937
+ range.setEnd(endNode, endOffset);
7938
+ } catch {
7939
+ throw new Error("The given offset is out of bounds.");
7940
+ }
7941
+ const selection = document.getSelection();
7942
+ selection === null || selection === void 0 || selection.removeAllRanges();
7943
+ selection === null || selection === void 0 || selection.addRange(range.cloneRange());
7944
+ return range;
7945
+ }
7946
+ }
7947
+ function getTextRange(text, pos, clickCount) {
7948
+ if (clickCount % 3 === 1 || text.length === 0) return [pos, pos];
7949
+ const textPos = pos !== null && pos !== void 0 ? pos : text.length;
7950
+ if (clickCount % 3 === 2) return [textPos - text.substr(0, pos).match(/(\w+|\s+|\W)?$/)[0].length, pos === void 0 ? pos : pos + text.substr(pos).match(/^(\w+|\s+|\W)?/)[0].length];
7951
+ return [textPos - text.substr(0, pos).match(/[^\r\n]*$/)[0].length, pos === void 0 ? pos : pos + text.substr(pos).match(/^[^\r\n]*/)[0].length];
7952
+ }
7953
+ function init_setSelectionPerMouse() {
7954
+ return (init_setSelectionPerMouse = __esmMin((() => {
7955
+ init_UI();
7956
+ init_Clipboard();
7957
+ init_selection();
7958
+ init_resolveCaretPosition();
7959
+ })))();
7960
+ }
7961
+ //#endregion
7962
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/event/selection/modifySelectionPerMouse.js
7963
+ function modifySelectionPerMouseMove(selectionRange, { document, target, node, offset }) {
7964
+ const selectionFocus = resolveCaretPosition({
7965
+ target,
7966
+ node,
7967
+ offset
7968
+ });
7969
+ if ("node" in selectionRange) {
7970
+ /* istanbul ignore else */ if (selectionFocus.node === selectionRange.node) {
7971
+ const anchorOffset = selectionFocus.offset < selectionRange.start ? selectionRange.end : selectionRange.start;
7972
+ const focusOffset = selectionFocus.offset > selectionRange.end || selectionFocus.offset < selectionRange.start ? selectionFocus.offset : selectionRange.end;
7973
+ setUISelection(selectionRange.node, {
7974
+ anchorOffset,
7975
+ focusOffset
7976
+ });
7977
+ }
7978
+ } else {
7979
+ const range = selectionRange.cloneRange();
7980
+ const cmp = range.comparePoint(selectionFocus.node, selectionFocus.offset);
7981
+ if (cmp < 0) range.setStart(selectionFocus.node, selectionFocus.offset);
7982
+ else if (cmp > 0) range.setEnd(selectionFocus.node, selectionFocus.offset);
7983
+ const selection = document.getSelection();
7984
+ selection === null || selection === void 0 || selection.removeAllRanges();
7985
+ selection === null || selection === void 0 || selection.addRange(range.cloneRange());
7986
+ }
7987
+ }
7988
+ function init_modifySelectionPerMouse() {
7989
+ return (init_modifySelectionPerMouse = __esmMin((() => {
7990
+ init_UI();
7991
+ init_Clipboard();
7992
+ init_resolveCaretPosition();
7993
+ })))();
7994
+ }
7995
+ //#endregion
7996
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/shared.js
7997
+ function isDifferentPointerPosition(positionA, positionB) {
7998
+ var _positionA_coords, _positionB_coords, _positionA_coords1, _positionB_coords1, _positionA_coords2, _positionB_coords2, _positionA_coords3, _positionB_coords3, _positionA_coords4, _positionB_coords4, _positionA_coords5, _positionB_coords5, _positionA_coords6, _positionB_coords6, _positionA_coords7, _positionB_coords7, _positionA_coords8, _positionB_coords8, _positionA_coords9, _positionB_coords9, _positionA_caret, _positionB_caret, _positionA_caret1, _positionB_caret1;
7999
+ return positionA.target !== positionB.target || ((_positionA_coords = positionA.coords) === null || _positionA_coords === void 0 ? void 0 : _positionA_coords.x) !== ((_positionB_coords = positionB.coords) === null || _positionB_coords === void 0 ? void 0 : _positionB_coords.x) || ((_positionA_coords1 = positionA.coords) === null || _positionA_coords1 === void 0 ? void 0 : _positionA_coords1.y) !== ((_positionB_coords1 = positionB.coords) === null || _positionB_coords1 === void 0 ? void 0 : _positionB_coords1.y) || ((_positionA_coords2 = positionA.coords) === null || _positionA_coords2 === void 0 ? void 0 : _positionA_coords2.clientX) !== ((_positionB_coords2 = positionB.coords) === null || _positionB_coords2 === void 0 ? void 0 : _positionB_coords2.clientX) || ((_positionA_coords3 = positionA.coords) === null || _positionA_coords3 === void 0 ? void 0 : _positionA_coords3.clientY) !== ((_positionB_coords3 = positionB.coords) === null || _positionB_coords3 === void 0 ? void 0 : _positionB_coords3.clientY) || ((_positionA_coords4 = positionA.coords) === null || _positionA_coords4 === void 0 ? void 0 : _positionA_coords4.offsetX) !== ((_positionB_coords4 = positionB.coords) === null || _positionB_coords4 === void 0 ? void 0 : _positionB_coords4.offsetX) || ((_positionA_coords5 = positionA.coords) === null || _positionA_coords5 === void 0 ? void 0 : _positionA_coords5.offsetY) !== ((_positionB_coords5 = positionB.coords) === null || _positionB_coords5 === void 0 ? void 0 : _positionB_coords5.offsetY) || ((_positionA_coords6 = positionA.coords) === null || _positionA_coords6 === void 0 ? void 0 : _positionA_coords6.pageX) !== ((_positionB_coords6 = positionB.coords) === null || _positionB_coords6 === void 0 ? void 0 : _positionB_coords6.pageX) || ((_positionA_coords7 = positionA.coords) === null || _positionA_coords7 === void 0 ? void 0 : _positionA_coords7.pageY) !== ((_positionB_coords7 = positionB.coords) === null || _positionB_coords7 === void 0 ? void 0 : _positionB_coords7.pageY) || ((_positionA_coords8 = positionA.coords) === null || _positionA_coords8 === void 0 ? void 0 : _positionA_coords8.screenX) !== ((_positionB_coords8 = positionB.coords) === null || _positionB_coords8 === void 0 ? void 0 : _positionB_coords8.screenX) || ((_positionA_coords9 = positionA.coords) === null || _positionA_coords9 === void 0 ? void 0 : _positionA_coords9.screenY) !== ((_positionB_coords9 = positionB.coords) === null || _positionB_coords9 === void 0 ? void 0 : _positionB_coords9.screenY) || ((_positionA_caret = positionA.caret) === null || _positionA_caret === void 0 ? void 0 : _positionA_caret.node) !== ((_positionB_caret = positionB.caret) === null || _positionB_caret === void 0 ? void 0 : _positionB_caret.node) || ((_positionA_caret1 = positionA.caret) === null || _positionA_caret1 === void 0 ? void 0 : _positionA_caret1.offset) !== ((_positionB_caret1 = positionB.caret) === null || _positionB_caret1 === void 0 ? void 0 : _positionB_caret1.offset);
8000
+ }
8001
+ //#endregion
8002
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/mouse.js
8003
+ function _define_property$3(obj, key, value) {
8004
+ if (key in obj) Object.defineProperty(obj, key, {
8005
+ value,
8006
+ enumerable: true,
8007
+ configurable: true,
8008
+ writable: true
8009
+ });
8010
+ else obj[key] = value;
8011
+ return obj;
8012
+ }
8013
+ var Mouse;
8014
+ function init_mouse() {
8015
+ return (init_mouse = __esmMin((() => {
8016
+ init_click();
8017
+ init_cut();
8018
+ init_keydown();
8019
+ init_keypress();
8020
+ init_keyup();
8021
+ init_paste();
8022
+ init_dom_esm();
8023
+ init_Clipboard();
8024
+ init_isDisabled();
8025
+ init_focus();
8026
+ init_setSelectionPerMouse();
8027
+ init_modifySelectionPerMouse();
8028
+ init_buttons();
8029
+ Mouse = class {
8030
+ move(instance, position, isPrevented) {
8031
+ const prevPosition = this.position;
8032
+ const prevTarget = this.getTarget(instance);
8033
+ this.position = position;
8034
+ if (!isDifferentPointerPosition(prevPosition, position)) return;
8035
+ const nextTarget = this.getTarget(instance);
8036
+ const init = this.getEventInit("mousemove");
8037
+ const [leave, enter] = getTreeDiff(prevTarget, nextTarget);
8038
+ return {
8039
+ leave: () => {
8040
+ if (prevTarget !== nextTarget) {
8041
+ instance.dispatchUIEvent(prevTarget, "mouseout", init);
8042
+ leave.forEach((el) => instance.dispatchUIEvent(el, "mouseleave", init));
8043
+ }
8044
+ },
8045
+ enter: () => {
8046
+ if (prevTarget !== nextTarget) {
8047
+ instance.dispatchUIEvent(nextTarget, "mouseover", init);
8048
+ enter.forEach((el) => instance.dispatchUIEvent(el, "mouseenter", init));
8049
+ }
8050
+ },
8051
+ move: () => {
8052
+ if (isPrevented) return;
8053
+ instance.dispatchUIEvent(nextTarget, "mousemove", init);
8054
+ this.modifySelecting(instance);
8055
+ }
8056
+ };
8057
+ }
8058
+ down(instance, keyDef, isPrevented) {
8059
+ const button = this.buttons.down(keyDef);
8060
+ if (button === void 0) return;
8061
+ const target = this.getTarget(instance);
8062
+ this.buttonDownTarget[button] = target;
8063
+ const init = this.getEventInit("mousedown", keyDef.button);
8064
+ const disabled = isDisabled(target);
8065
+ if (!isPrevented && (disabled || instance.dispatchUIEvent(target, "mousedown", init))) {
8066
+ this.startSelecting(instance, init.detail);
8067
+ focusElement(target);
8068
+ }
8069
+ if (!disabled && getMouseEventButton(keyDef.button) === 2) instance.dispatchUIEvent(target, "contextmenu", this.getEventInit("contextmenu", keyDef.button));
8070
+ }
8071
+ up(instance, keyDef, isPrevented) {
8072
+ const button = this.buttons.up(keyDef);
8073
+ if (button === void 0) return;
8074
+ const target = this.getTarget(instance);
8075
+ if (!isDisabled(target)) {
8076
+ if (!isPrevented) {
8077
+ const mouseUpInit = this.getEventInit("mouseup", keyDef.button);
8078
+ instance.dispatchUIEvent(target, "mouseup", mouseUpInit);
8079
+ this.endSelecting();
8080
+ }
8081
+ const clickTarget = getTreeDiff(this.buttonDownTarget[button], target)[2][0];
8082
+ if (clickTarget) {
8083
+ const init = this.getEventInit("click", keyDef.button);
8084
+ if (init.detail) {
8085
+ instance.dispatchUIEvent(clickTarget, init.button === 0 ? "click" : "auxclick", init);
8086
+ if (init.button === 0 && init.detail === 2) instance.dispatchUIEvent(clickTarget, "dblclick", {
8087
+ ...this.getEventInit("dblclick", keyDef.button),
8088
+ detail: init.detail
8089
+ });
8090
+ }
8091
+ }
8092
+ }
8093
+ }
8094
+ resetClickCount() {
8095
+ this.clickCount.reset();
8096
+ }
8097
+ getEventInit(type, button) {
8098
+ const init = { ...this.position.coords };
8099
+ init.button = getMouseEventButton(button);
8100
+ init.buttons = this.buttons.getButtons();
8101
+ if (type === "mousedown") init.detail = this.clickCount.getOnDown(init.button);
8102
+ else if (type === "mouseup") init.detail = this.clickCount.getOnUp(init.button);
8103
+ else if (type === "click" || type === "auxclick") init.detail = this.clickCount.incOnClick(init.button);
8104
+ return init;
8105
+ }
8106
+ getTarget(instance) {
8107
+ var _this_position_target;
8108
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
8109
+ }
8110
+ startSelecting(instance, clickCount) {
8111
+ var _this_position_caret, _this_position_caret1;
8112
+ this.selecting = setSelectionPerMouseDown({
8113
+ document: instance.config.document,
8114
+ target: this.getTarget(instance),
8115
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
8116
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset,
8117
+ clickCount
8118
+ });
8119
+ }
8120
+ modifySelecting(instance) {
8121
+ var _this_position_caret, _this_position_caret1;
8122
+ if (!this.selecting) return;
8123
+ modifySelectionPerMouseMove(this.selecting, {
8124
+ document: instance.config.document,
8125
+ target: this.getTarget(instance),
8126
+ node: (_this_position_caret = this.position.caret) === null || _this_position_caret === void 0 ? void 0 : _this_position_caret.node,
8127
+ offset: (_this_position_caret1 = this.position.caret) === null || _this_position_caret1 === void 0 ? void 0 : _this_position_caret1.offset
8128
+ });
8129
+ }
8130
+ endSelecting() {
8131
+ this.selecting = void 0;
8132
+ }
8133
+ constructor() {
8134
+ _define_property$3(this, "position", {});
8135
+ _define_property$3(this, "buttons", new Buttons());
8136
+ _define_property$3(this, "selecting", void 0);
8137
+ _define_property$3(this, "buttonDownTarget", {});
8138
+ _define_property$3(this, "clickCount", new class {
8139
+ incOnClick(button) {
8140
+ const current = this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
8141
+ this.count = this.count[button] === void 0 ? {} : { [button]: Number(this.count[button]) + 1 };
8142
+ return current;
8143
+ }
8144
+ getOnDown(button) {
8145
+ var _this_count_button, _this_count_button1;
8146
+ this.down = { [button]: (_this_count_button = this.count[button]) !== null && _this_count_button !== void 0 ? _this_count_button : 0 };
8147
+ this.count = { [button]: (_this_count_button1 = this.count[button]) !== null && _this_count_button1 !== void 0 ? _this_count_button1 : 0 };
8148
+ return Number(this.count[button]) + 1;
8149
+ }
8150
+ getOnUp(button) {
8151
+ return this.down[button] === void 0 ? void 0 : Number(this.down[button]) + 1;
8152
+ }
8153
+ reset() {
8154
+ this.count = {};
8155
+ }
8156
+ constructor() {
8157
+ _define_property$3(this, "down", {});
8158
+ _define_property$3(this, "count", {});
8159
+ }
8160
+ }());
8161
+ }
8162
+ };
8163
+ })))();
8164
+ }
8165
+ //#endregion
8166
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/pointer/cssPointerEvents.js
8167
+ function hasPointerEvents(instance, element) {
8168
+ var _checkPointerEvents;
8169
+ return ((_checkPointerEvents = checkPointerEvents(instance, element)) === null || _checkPointerEvents === void 0 ? void 0 : _checkPointerEvents.pointerEvents) !== "none";
8170
+ }
8171
+ function closestPointerEventsDeclaration(element) {
8172
+ const window = getWindow(element);
8173
+ for (let el = element, tree = []; el === null || el === void 0 ? void 0 : el.ownerDocument; el = el.parentElement) {
8174
+ tree.push(el);
8175
+ const pointerEvents = window.getComputedStyle(el).pointerEvents;
8176
+ if (pointerEvents && !["inherit", "unset"].includes(pointerEvents)) return {
8177
+ pointerEvents,
8178
+ tree
8179
+ };
8180
+ }
8181
+ }
8182
+ function checkPointerEvents(instance, element) {
8183
+ const lastCheck = element[PointerEventsCheck];
8184
+ if (!(instance.config.pointerEventsCheck !== PointerEventsCheckLevel.Never && (!lastCheck || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachApiCall) && lastCheck[ApiLevel.Call] !== getLevelRef(instance, ApiLevel.Call) || hasBitFlag(instance.config.pointerEventsCheck, PointerEventsCheckLevel.EachTrigger) && lastCheck[ApiLevel.Trigger] !== getLevelRef(instance, ApiLevel.Trigger)))) return lastCheck === null || lastCheck === void 0 ? void 0 : lastCheck.result;
8185
+ const declaration = closestPointerEventsDeclaration(element);
8186
+ element[PointerEventsCheck] = {
8187
+ [ApiLevel.Call]: getLevelRef(instance, ApiLevel.Call),
8188
+ [ApiLevel.Trigger]: getLevelRef(instance, ApiLevel.Trigger),
8189
+ result: declaration
8190
+ };
8191
+ return declaration;
8192
+ }
8193
+ function assertPointerEvents(instance, element) {
8194
+ const declaration = checkPointerEvents(instance, element);
8195
+ if ((declaration === null || declaration === void 0 ? void 0 : declaration.pointerEvents) === "none") throw new Error([
8196
+ `Unable to perform pointer interaction as the element ${declaration.tree.length > 1 ? "inherits" : "has"} \`pointer-events: none\`:`,
8197
+ "",
8198
+ printTree(declaration.tree)
8199
+ ].join("\n"));
8200
+ }
8201
+ function printTree(tree) {
8202
+ return tree.reverse().map((el, i) => [
8203
+ "".padEnd(i),
8204
+ el.tagName,
8205
+ el.id && `#${el.id}`,
8206
+ el.hasAttribute("data-testid") && `(testId=${el.getAttribute("data-testid")})`,
8207
+ getLabelDescr(el),
8208
+ tree.length > 1 && i === 0 && " <-- This element declared `pointer-events: none`",
8209
+ tree.length > 1 && i === tree.length - 1 && " <-- Asserted pointer events here"
8210
+ ].filter(Boolean).join("")).join("\n");
8211
+ }
8212
+ function getLabelDescr(element) {
8213
+ var _element_labels;
8214
+ let label;
8215
+ if (element.hasAttribute("aria-label")) label = element.getAttribute("aria-label");
8216
+ else if (element.hasAttribute("aria-labelledby")) {
8217
+ var _element_ownerDocument_getElementById_textContent, _element_ownerDocument_getElementById;
8218
+ label = (_element_ownerDocument_getElementById = element.ownerDocument.getElementById(element.getAttribute("aria-labelledby"))) === null || _element_ownerDocument_getElementById === void 0 ? void 0 : (_element_ownerDocument_getElementById_textContent = _element_ownerDocument_getElementById.textContent) === null || _element_ownerDocument_getElementById_textContent === void 0 ? void 0 : _element_ownerDocument_getElementById_textContent.trim();
8219
+ } else if (isElementType(element, [
8220
+ "button",
8221
+ "input",
8222
+ "meter",
8223
+ "output",
8224
+ "progress",
8225
+ "select",
8226
+ "textarea"
8227
+ ]) && ((_element_labels = element.labels) === null || _element_labels === void 0 ? void 0 : _element_labels.length)) label = Array.from(element.labels).map((el) => {
8228
+ var _el_textContent;
8229
+ return (_el_textContent = el.textContent) === null || _el_textContent === void 0 ? void 0 : _el_textContent.trim();
8230
+ }).join("|");
8231
+ else if (isElementType(element, "button")) {
8232
+ var _element_textContent;
8233
+ label = (_element_textContent = element.textContent) === null || _element_textContent === void 0 ? void 0 : _element_textContent.trim();
8234
+ }
8235
+ label = label === null || label === void 0 ? void 0 : label.replace(/\n/g, " ");
8236
+ if (Number(label === null || label === void 0 ? void 0 : label.length) > 30) label = `${label === null || label === void 0 ? void 0 : label.substring(0, 29)}…`;
8237
+ return label ? `(label=${label})` : "";
8238
+ }
8239
+ function hasBitFlag(conf, flag) {
8240
+ return (conf & flag) > 0;
8241
+ }
8242
+ var PointerEventsCheck;
8243
+ function init_cssPointerEvents() {
8244
+ return (init_cssPointerEvents = __esmMin((() => {
8245
+ init_options();
8246
+ init_level();
8247
+ PointerEventsCheck = Symbol("Last check for pointer-events");
8248
+ })))();
8249
+ }
8250
+ //#endregion
8251
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/pointer.js
8252
+ function _define_property$2(obj, key, value) {
8253
+ if (key in obj) Object.defineProperty(obj, key, {
8254
+ value,
8255
+ enumerable: true,
8256
+ configurable: true,
8257
+ writable: true
8258
+ });
8259
+ else obj[key] = value;
8260
+ return obj;
8261
+ }
8262
+ var Pointer;
8263
+ function init_pointer() {
8264
+ return (init_pointer = __esmMin((() => {
8265
+ init_Clipboard();
8266
+ init_cssPointerEvents();
8267
+ init_buttons();
8268
+ Pointer = class {
8269
+ init(instance) {
8270
+ const target = this.getTarget(instance);
8271
+ const [, enter] = getTreeDiff(null, target);
8272
+ const init = this.getEventInit();
8273
+ assertPointerEvents(instance, target);
8274
+ instance.dispatchUIEvent(target, "pointerover", init);
8275
+ enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init));
8276
+ return this;
8277
+ }
8278
+ move(instance, position) {
8279
+ const prevPosition = this.position;
8280
+ const prevTarget = this.getTarget(instance);
8281
+ this.position = position;
8282
+ if (!isDifferentPointerPosition(prevPosition, position)) return;
8283
+ const nextTarget = this.getTarget(instance);
8284
+ const init = this.getEventInit(-1);
8285
+ const [leave, enter] = getTreeDiff(prevTarget, nextTarget);
8286
+ return {
8287
+ leave: () => {
8288
+ if (hasPointerEvents(instance, prevTarget)) {
8289
+ if (prevTarget !== nextTarget) {
8290
+ instance.dispatchUIEvent(prevTarget, "pointerout", init);
8291
+ leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init));
8292
+ }
8293
+ }
8294
+ },
8295
+ enter: () => {
8296
+ assertPointerEvents(instance, nextTarget);
8297
+ if (prevTarget !== nextTarget) {
8298
+ instance.dispatchUIEvent(nextTarget, "pointerover", init);
8299
+ enter.forEach((el) => instance.dispatchUIEvent(el, "pointerenter", init));
8300
+ }
8301
+ },
8302
+ move: () => {
8303
+ instance.dispatchUIEvent(nextTarget, "pointermove", init);
8304
+ }
8305
+ };
8306
+ }
8307
+ down(instance, button = 0) {
8308
+ if (this.isDown) return;
8309
+ const target = this.getTarget(instance);
8310
+ assertPointerEvents(instance, target);
8311
+ this.isDown = true;
8312
+ this.isPrevented = !instance.dispatchUIEvent(target, "pointerdown", this.getEventInit(button));
8313
+ }
8314
+ up(instance, button = 0) {
8315
+ if (!this.isDown) return;
8316
+ const target = this.getTarget(instance);
8317
+ assertPointerEvents(instance, target);
8318
+ this.isPrevented = false;
8319
+ this.isDown = false;
8320
+ instance.dispatchUIEvent(target, "pointerup", this.getEventInit(button));
8321
+ }
8322
+ release(instance) {
8323
+ const target = this.getTarget(instance);
8324
+ const [leave] = getTreeDiff(target, null);
8325
+ const init = this.getEventInit();
8326
+ /* istanbul ignore else */ if (hasPointerEvents(instance, target)) {
8327
+ instance.dispatchUIEvent(target, "pointerout", init);
8328
+ leave.forEach((el) => instance.dispatchUIEvent(el, "pointerleave", init));
8329
+ }
8330
+ this.isCancelled = true;
8331
+ }
8332
+ getTarget(instance) {
8333
+ var _this_position_target;
8334
+ return (_this_position_target = this.position.target) !== null && _this_position_target !== void 0 ? _this_position_target : instance.config.document.body;
8335
+ }
8336
+ getEventInit(button) {
8337
+ return {
8338
+ ...this.position.coords,
8339
+ pointerId: this.pointerId,
8340
+ pointerType: this.pointerType,
8341
+ isPrimary: this.isPrimary,
8342
+ button: getMouseEventButton(button),
8343
+ buttons: this.buttons.getButtons()
8344
+ };
8345
+ }
8346
+ constructor({ pointerId, pointerType, isPrimary }, buttons) {
8347
+ _define_property$2(this, "pointerId", void 0);
8348
+ _define_property$2(this, "pointerType", void 0);
8349
+ _define_property$2(this, "isPrimary", void 0);
8350
+ _define_property$2(this, "buttons", void 0);
8351
+ _define_property$2(this, "isMultitouch", false);
8352
+ _define_property$2(this, "isCancelled", false);
8353
+ _define_property$2(this, "isDown", false);
8354
+ _define_property$2(this, "isPrevented", false);
8355
+ _define_property$2(this, "position", {});
8356
+ this.pointerId = pointerId;
8357
+ this.pointerType = pointerType;
8358
+ this.isPrimary = isPrimary;
8359
+ this.isMultitouch = !isPrimary;
8360
+ this.buttons = buttons;
8361
+ }
8362
+ };
8363
+ })))();
8364
+ }
8365
+ //#endregion
8366
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/pointer/index.js
8367
+ function _define_property$1(obj, key, value) {
8368
+ if (key in obj) Object.defineProperty(obj, key, {
8369
+ value,
8370
+ enumerable: true,
8371
+ configurable: true,
8372
+ writable: true
8373
+ });
8374
+ else obj[key] = value;
8375
+ return obj;
8376
+ }
8377
+ var PointerHost;
8378
+ function init_pointer$1() {
8379
+ return (init_pointer$1 = __esmMin((() => {
8380
+ init_buttons();
8381
+ init_device();
8382
+ init_mouse();
8383
+ init_pointer();
8384
+ PointerHost = class {
8385
+ isKeyPressed(keyDef) {
8386
+ return this.devices.get(keyDef.pointerType).isPressed(keyDef);
8387
+ }
8388
+ async press(instance, keyDef, position) {
8389
+ this.devices.get(keyDef.pointerType).addPressed(keyDef);
8390
+ this.buttons.down(keyDef);
8391
+ const pointerName = this.getPointerName(keyDef);
8392
+ const pointer = keyDef.pointerType === "touch" ? this.pointers.new(pointerName, keyDef.pointerType, this.buttons) : this.pointers.get(pointerName);
8393
+ pointer.position = position;
8394
+ if (pointer.pointerType !== "touch") this.mouse.position = position;
8395
+ if (pointer.pointerType === "touch") pointer.init(instance);
8396
+ pointer.down(instance, keyDef.button);
8397
+ if (pointer.pointerType !== "touch") this.mouse.down(instance, keyDef, pointer.isPrevented);
8398
+ }
8399
+ async move(instance, pointerName, position) {
8400
+ const pointer = this.pointers.get(pointerName);
8401
+ const pointermove = pointer.move(instance, position);
8402
+ const mousemove = pointer.pointerType === "touch" ? void 0 : this.mouse.move(instance, position, pointer.isPrevented);
8403
+ pointermove === null || pointermove === void 0 || pointermove.leave();
8404
+ mousemove === null || mousemove === void 0 || mousemove.leave();
8405
+ pointermove === null || pointermove === void 0 || pointermove.enter();
8406
+ mousemove === null || mousemove === void 0 || mousemove.enter();
8407
+ pointermove === null || pointermove === void 0 || pointermove.move();
8408
+ mousemove === null || mousemove === void 0 || mousemove.move();
8409
+ }
8410
+ async release(instance, keyDef, position) {
8411
+ const device = this.devices.get(keyDef.pointerType);
8412
+ device.removePressed(keyDef);
8413
+ this.buttons.up(keyDef);
8414
+ const pointer = this.pointers.get(this.getPointerName(keyDef));
8415
+ const isPrevented = pointer.isPrevented;
8416
+ pointer.position = position;
8417
+ if (pointer.pointerType !== "touch") this.mouse.position = position;
8418
+ if (device.countPressed === 0) pointer.up(instance, keyDef.button);
8419
+ if (pointer.pointerType === "touch") pointer.release(instance);
8420
+ if (pointer.pointerType === "touch" && !pointer.isMultitouch) {
8421
+ const mousemove = this.mouse.move(instance, position, isPrevented);
8422
+ mousemove === null || mousemove === void 0 || mousemove.leave();
8423
+ mousemove === null || mousemove === void 0 || mousemove.enter();
8424
+ mousemove === null || mousemove === void 0 || mousemove.move();
8425
+ this.mouse.down(instance, keyDef, isPrevented);
8426
+ }
8427
+ if (!pointer.isMultitouch) {
8428
+ const mousemove = this.mouse.move(instance, position, isPrevented);
8429
+ mousemove === null || mousemove === void 0 || mousemove.leave();
8430
+ mousemove === null || mousemove === void 0 || mousemove.enter();
8431
+ mousemove === null || mousemove === void 0 || mousemove.move();
8432
+ this.mouse.up(instance, keyDef, isPrevented);
8433
+ }
8434
+ }
8435
+ getPointerName(keyDef) {
8436
+ return keyDef.pointerType === "touch" ? keyDef.name : keyDef.pointerType;
8437
+ }
8438
+ getPreviousPosition(pointerName) {
8439
+ return this.pointers.has(pointerName) ? this.pointers.get(pointerName).position : void 0;
8440
+ }
8441
+ resetClickCount() {
8442
+ this.mouse.resetClickCount();
8443
+ }
8444
+ getMouseTarget(instance) {
8445
+ var _this_mouse_position_target;
8446
+ return (_this_mouse_position_target = this.mouse.position.target) !== null && _this_mouse_position_target !== void 0 ? _this_mouse_position_target : instance.config.document.body;
8447
+ }
8448
+ setMousePosition(position) {
8449
+ this.mouse.position = position;
8450
+ this.pointers.get("mouse").position = position;
8451
+ }
8452
+ constructor(system) {
8453
+ _define_property$1(this, "system", void 0);
8454
+ _define_property$1(this, "mouse", void 0);
8455
+ _define_property$1(this, "buttons", void 0);
8456
+ _define_property$1(this, "devices", new class {
8457
+ get(k) {
8458
+ var _this_registry, _k, _;
8459
+ return (_ = (_this_registry = this.registry)[_k = k]) !== null && _ !== void 0 ? _ : _this_registry[_k] = new Device();
8460
+ }
8461
+ constructor() {
8462
+ _define_property$1(this, "registry", {});
8463
+ }
8464
+ }());
8465
+ _define_property$1(this, "pointers", new class {
8466
+ new(pointerName, pointerType, buttons) {
8467
+ const isPrimary = pointerType !== "touch" || !Object.values(this.registry).some((p) => p.pointerType === "touch" && !p.isCancelled);
8468
+ if (!isPrimary) Object.values(this.registry).forEach((p) => {
8469
+ if (p.pointerType === pointerType && !p.isCancelled) p.isMultitouch = true;
8470
+ });
8471
+ this.registry[pointerName] = new Pointer({
8472
+ pointerId: this.nextId++,
8473
+ pointerType,
8474
+ isPrimary
8475
+ }, buttons);
8476
+ return this.registry[pointerName];
8477
+ }
8478
+ get(pointerName) {
8479
+ if (!this.has(pointerName)) throw new Error(`Trying to access pointer "${pointerName}" which does not exist.`);
8480
+ return this.registry[pointerName];
8481
+ }
8482
+ has(pointerName) {
8483
+ return pointerName in this.registry;
8484
+ }
8485
+ constructor() {
8486
+ _define_property$1(this, "registry", {});
8487
+ _define_property$1(this, "nextId", 1);
8488
+ }
8489
+ }());
8490
+ this.system = system;
8491
+ this.buttons = new Buttons();
8492
+ this.mouse = new Mouse();
8493
+ this.pointers.new("mouse", "mouse", this.buttons);
8494
+ }
8495
+ };
8496
+ })))();
8497
+ }
8498
+ //#endregion
8499
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/system/index.js
8500
+ function _define_property(obj, key, value) {
8501
+ if (key in obj) Object.defineProperty(obj, key, {
8502
+ value,
8503
+ enumerable: true,
8504
+ configurable: true,
8505
+ writable: true
8506
+ });
8507
+ else obj[key] = value;
8508
+ return obj;
8509
+ }
8510
+ var System;
8511
+ function init_system() {
8512
+ return (init_system = __esmMin((() => {
8513
+ init_keyboard();
8514
+ init_pointer$1();
8515
+ System = class {
8516
+ getUIEventModifiers() {
8517
+ return {
8518
+ altKey: this.keyboard.modifiers.Alt,
8519
+ ctrlKey: this.keyboard.modifiers.Control,
8520
+ metaKey: this.keyboard.modifiers.Meta,
8521
+ shiftKey: this.keyboard.modifiers.Shift,
8522
+ modifierAltGraph: this.keyboard.modifiers.AltGraph,
8523
+ modifierCapsLock: this.keyboard.modifiers.CapsLock,
8524
+ modifierFn: this.keyboard.modifiers.Fn,
8525
+ modifierFnLock: this.keyboard.modifiers.FnLock,
8526
+ modifierNumLock: this.keyboard.modifiers.NumLock,
8527
+ modifierScrollLock: this.keyboard.modifiers.ScrollLock,
8528
+ modifierSymbol: this.keyboard.modifiers.Symbol,
8529
+ modifierSymbolLock: this.keyboard.modifiers.SymbolLock
8530
+ };
8531
+ }
8532
+ constructor() {
8533
+ _define_property(this, "keyboard", new KeyboardHost(this));
8534
+ _define_property(this, "pointer", new PointerHost(this));
8535
+ }
8536
+ };
8537
+ })))();
8538
+ }
8539
+ //#endregion
8540
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/convenience/click.js
8541
+ async function click$1(element) {
8542
+ const pointerIn = [];
8543
+ if (!this.config.skipHover) pointerIn.push({ target: element });
8544
+ pointerIn.push({
8545
+ keys: "[MouseLeft]",
8546
+ target: element
8547
+ });
8548
+ return this.pointer(pointerIn);
8549
+ }
8550
+ async function dblClick$1(element) {
8551
+ return this.pointer([{ target: element }, "[MouseLeft][MouseLeft]"]);
8552
+ }
8553
+ async function tripleClick$1(element) {
8554
+ return this.pointer([{ target: element }, "[MouseLeft][MouseLeft][MouseLeft]"]);
8555
+ }
8556
+ //#endregion
8557
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/convenience/hover.js
8558
+ async function hover$1(element) {
8559
+ return this.pointer({ target: element });
8560
+ }
8561
+ async function unhover$1(element) {
8562
+ assertPointerEvents(this, this.system.pointer.getMouseTarget(this));
8563
+ return this.pointer({ target: element.ownerDocument.body });
8564
+ }
8565
+ function init_hover() {
8566
+ return (init_hover = __esmMin((() => {
8567
+ init_Clipboard();
8568
+ init_cssPointerEvents();
8569
+ })))();
8570
+ }
8571
+ //#endregion
8572
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/convenience/tab.js
8573
+ async function tab$1({ shift } = {}) {
8574
+ return this.keyboard(shift === true ? "{Shift>}{Tab}{/Shift}" : shift === false ? "[/ShiftLeft][/ShiftRight]{Tab}" : "{Tab}");
8575
+ }
8576
+ //#endregion
8577
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/keyDef/readNextDescriptor.js
8578
+ /**
8579
+ * Read the next key definition from user input
8580
+ *
8581
+ * Describe key per `{descriptor}` or `[descriptor]`.
8582
+ * Everything else will be interpreted as a single character as descriptor - e.g. `a`.
8583
+ * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
8584
+ * A previously pressed key can be released per `{/descriptor}`.
8585
+ * Keeping the key pressed can be written as `{descriptor>}`.
8586
+ * When keeping the key pressed you can choose how long the key is pressed `{descriptor>3}`.
8587
+ * You can then release the key per `{descriptor>3/}` or keep it pressed and continue with the next key.
8588
+ */ function readNextDescriptor(text, context) {
8589
+ let pos = 0;
8590
+ const startBracket = text[pos] in bracketDict ? text[pos] : "";
8591
+ pos += startBracket.length;
8592
+ const type = new RegExp(`^\\${startBracket}{2}`).test(text) ? "" : startBracket;
8593
+ return {
8594
+ type,
8595
+ ...type === "" ? readPrintableChar(text, pos, context) : readTag(text, pos, type, context)
8596
+ };
8597
+ }
8598
+ function readPrintableChar(text, pos, context) {
8599
+ const descriptor = text[pos];
8600
+ assertDescriptor(descriptor, text, pos, context);
8601
+ pos += descriptor.length;
8602
+ return {
8603
+ consumedLength: pos,
8604
+ descriptor,
8605
+ releasePrevious: false,
8606
+ releaseSelf: true,
8607
+ repeat: 1
8608
+ };
8609
+ }
8610
+ function readTag(text, pos, startBracket, context) {
8611
+ var _ref;
8612
+ var _text_slice_match, _text_slice_match1;
8613
+ const releasePreviousModifier = text[pos] === "/" ? "/" : "";
8614
+ pos += releasePreviousModifier.length;
8615
+ const escapedDescriptor = startBracket === "{" && text[pos] === "\\";
8616
+ pos += Number(escapedDescriptor);
8617
+ const descriptor = escapedDescriptor ? text[pos] : (_text_slice_match = text.slice(pos).match(startBracket === "{" ? /^\w+|^[^}>/]/ : /^\w+/)) === null || _text_slice_match === void 0 ? void 0 : _text_slice_match[0];
8618
+ assertDescriptor(descriptor, text, pos, context);
8619
+ pos += descriptor.length;
8620
+ const repeatModifier = (_ref = (_text_slice_match1 = text.slice(pos).match(/^>\d+/)) === null || _text_slice_match1 === void 0 ? void 0 : _text_slice_match1[0]) !== null && _ref !== void 0 ? _ref : "";
8621
+ pos += repeatModifier.length;
8622
+ const releaseSelfModifier = text[pos] === "/" || !repeatModifier && text[pos] === ">" ? text[pos] : "";
8623
+ pos += releaseSelfModifier.length;
8624
+ const expectedEndBracket = bracketDict[startBracket];
8625
+ const endBracket = text[pos] === expectedEndBracket ? expectedEndBracket : "";
8626
+ if (!endBracket) throw new Error(getErrorMessage([
8627
+ !repeatModifier && "repeat modifier",
8628
+ !releaseSelfModifier && "release modifier",
8629
+ `"${expectedEndBracket}"`
8630
+ ].filter(Boolean).join(" or "), text[pos], text, context));
8631
+ pos += endBracket.length;
8632
+ return {
8633
+ consumedLength: pos,
8634
+ descriptor,
8635
+ releasePrevious: !!releasePreviousModifier,
8636
+ repeat: repeatModifier ? Math.max(Number(repeatModifier.substr(1)), 1) : 1,
8637
+ releaseSelf: hasReleaseSelf(releaseSelfModifier, repeatModifier)
8638
+ };
8639
+ }
8640
+ function assertDescriptor(descriptor, text, pos, context) {
8641
+ if (!descriptor) throw new Error(getErrorMessage("key descriptor", text[pos], text, context));
8642
+ }
8643
+ function hasReleaseSelf(releaseSelfModifier, repeatModifier) {
8644
+ if (releaseSelfModifier) return releaseSelfModifier === "/";
8645
+ if (repeatModifier) return false;
8646
+ }
8647
+ function getErrorMessage(expected, found, text, context) {
8648
+ return `Expected ${expected} but found "${found !== null && found !== void 0 ? found : ""}" in "${text}"
8649
+ See ${context === "pointer" ? `https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen` : `https://testing-library.com/docs/user-event/keyboard`}
8650
+ for more information about how userEvent parses your input.`;
8651
+ }
8652
+ var bracketDict;
8653
+ function init_readNextDescriptor() {
8654
+ return (init_readNextDescriptor = __esmMin((() => {
8655
+ bracketDict = {
8656
+ "{": "}",
8657
+ "[": "]"
8658
+ };
8659
+ })))();
8660
+ }
8661
+ //#endregion
8662
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/keyboard/parseKeyDef.js
8663
+ /**
8664
+ * Parse key definitions per `keyboardMap`
8665
+ *
8666
+ * Keys can be referenced by `{key}` or `{special}` as well as physical locations per `[code]`.
8667
+ * Everything else will be interpreted as a typed character - e.g. `a`.
8668
+ * Brackets `{` and `[` can be escaped by doubling - e.g. `foo[[bar` translates to `foo[bar`.
8669
+ * Keeping the key pressed can be written as `{key>}`.
8670
+ * When keeping the key pressed you can choose how long (how many keydown and keypress) the key is pressed `{key>3}`.
8671
+ * You can then release the key per `{key>3/}` or keep it pressed and continue with the next key.
8672
+ */ function parseKeyDef$1(keyboardMap, text) {
8673
+ const defs = [];
8674
+ do {
8675
+ var _keyboardMap_find;
8676
+ const { type, descriptor, consumedLength, releasePrevious, releaseSelf = true, repeat } = readNextDescriptor(text, "keyboard");
8677
+ const keyDef = (_keyboardMap_find = keyboardMap.find((def) => {
8678
+ if (type === "[") {
8679
+ var _def_code;
8680
+ return ((_def_code = def.code) === null || _def_code === void 0 ? void 0 : _def_code.toLowerCase()) === descriptor.toLowerCase();
8681
+ } else if (type === "{") {
8682
+ var _def_key;
8683
+ return ((_def_key = def.key) === null || _def_key === void 0 ? void 0 : _def_key.toLowerCase()) === descriptor.toLowerCase();
8684
+ }
8685
+ return def.key === descriptor;
8686
+ })) !== null && _keyboardMap_find !== void 0 ? _keyboardMap_find : {
8687
+ key: "Unknown",
8688
+ code: "Unknown",
8689
+ [type === "[" ? "code" : "key"]: descriptor
8690
+ };
8691
+ defs.push({
8692
+ keyDef,
8693
+ releasePrevious,
8694
+ releaseSelf,
8695
+ repeat
8696
+ });
8697
+ text = text.slice(consumedLength);
8698
+ } while (text);
8699
+ return defs;
8700
+ }
8701
+ function init_parseKeyDef() {
8702
+ return (init_parseKeyDef = __esmMin((() => {
8703
+ init_Clipboard();
8704
+ init_readNextDescriptor();
8705
+ })))();
8706
+ }
8707
+ //#endregion
8708
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/keyboard/index.js
8709
+ async function keyboard$1(text) {
8710
+ const actions = parseKeyDef$1(this.config.keyboardMap, text);
8711
+ for (let i = 0; i < actions.length; i++) {
8712
+ await wait(this.config);
8713
+ await keyboardAction(this, actions[i]);
8714
+ }
8715
+ }
8716
+ async function keyboardAction(instance, { keyDef, releasePrevious, releaseSelf, repeat }) {
8717
+ const { system } = instance;
8718
+ if (system.keyboard.isKeyPressed(keyDef)) await system.keyboard.keyup(instance, keyDef);
8719
+ if (!releasePrevious) {
8720
+ for (let i = 1; i <= repeat; i++) {
8721
+ await system.keyboard.keydown(instance, keyDef, i > 1);
8722
+ if (i < repeat) await wait(instance.config);
8723
+ }
8724
+ if (releaseSelf) await system.keyboard.keyup(instance, keyDef);
8725
+ }
8726
+ }
8727
+ async function releaseAllKeys(instance) {
8728
+ for (const k of instance.system.keyboard.getPressedKeys()) await instance.system.keyboard.keyup(instance, k);
8729
+ }
8730
+ function init_keyboard$1() {
8731
+ return (init_keyboard$1 = __esmMin((() => {
8732
+ init_Clipboard();
8733
+ init_parseKeyDef();
8734
+ })))();
8735
+ }
8736
+ //#endregion
8737
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/document/copySelection.js
8738
+ function copySelection(target) {
8739
+ const data = hasOwnSelection(target) ? { "text/plain": readSelectedValueFromInput(target) } : { "text/plain": String(target.ownerDocument.getSelection()) };
8740
+ const dt = createDataTransfer(getWindow(target));
8741
+ for (const type in data) if (data[type]) dt.setData(type, data[type]);
8742
+ return dt;
8743
+ }
8744
+ function readSelectedValueFromInput(target) {
8745
+ const sel = getUISelection(target);
8746
+ return getUIValue(target).substring(sel.startOffset, sel.endOffset);
8747
+ }
8748
+ function init_copySelection() {
8749
+ return (init_copySelection = __esmMin((() => {
8750
+ init_DataTransfer();
8751
+ init_Clipboard();
8752
+ init_selection();
8753
+ init_UI();
8754
+ })))();
8755
+ }
8756
+ //#endregion
8757
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/clipboard/copy.js
8758
+ async function copy$1() {
8759
+ var _doc_activeElement;
8760
+ const doc = this.config.document;
8761
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
8762
+ const clipboardData = copySelection(target);
8763
+ if (clipboardData.items.length === 0) return;
8764
+ if (this.dispatchUIEvent(target, "copy", { clipboardData }) && this.config.writeToClipboard) await writeDataTransferToClipboard(doc, clipboardData);
8765
+ return clipboardData;
8766
+ }
8767
+ function init_copy() {
8768
+ return (init_copy = __esmMin((() => {
8769
+ init_Clipboard();
8770
+ init_copySelection();
8771
+ })))();
8772
+ }
8773
+ //#endregion
8774
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/clipboard/cut.js
8775
+ async function cut$1() {
8776
+ var _doc_activeElement;
8777
+ const doc = this.config.document;
8778
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
8779
+ const clipboardData = copySelection(target);
8780
+ if (clipboardData.items.length === 0) return;
8781
+ if (this.dispatchUIEvent(target, "cut", { clipboardData }) && this.config.writeToClipboard) await writeDataTransferToClipboard(target.ownerDocument, clipboardData);
8782
+ return clipboardData;
8783
+ }
8784
+ function init_cut$1() {
8785
+ return (init_cut$1 = __esmMin((() => {
8786
+ init_Clipboard();
8787
+ init_copySelection();
8788
+ })))();
8789
+ }
8790
+ //#endregion
8791
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/clipboard/paste.js
8792
+ async function paste$1(clipboardData) {
8793
+ var _doc_activeElement, _ref;
8794
+ const doc = this.config.document;
8795
+ const target = (_doc_activeElement = doc.activeElement) !== null && _doc_activeElement !== void 0 ? _doc_activeElement : /* istanbul ignore next */ doc.body;
8796
+ const dataTransfer = (_ref = typeof clipboardData === "string" ? getClipboardDataFromString(doc, clipboardData) : clipboardData) !== null && _ref !== void 0 ? _ref : await readDataTransferFromClipboard(doc).catch(() => {
8797
+ throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.");
8798
+ });
8799
+ this.dispatchUIEvent(target, "paste", { clipboardData: dataTransfer });
8800
+ }
8801
+ function getClipboardDataFromString(doc, text) {
8802
+ const dt = createDataTransfer(getWindow(doc));
8803
+ dt.setData("text", text);
8804
+ return dt;
8805
+ }
8806
+ function init_paste$1() {
8807
+ return (init_paste$1 = __esmMin((() => {
8808
+ init_DataTransfer();
8809
+ init_Clipboard();
8810
+ })))();
8811
+ }
8812
+ //#endregion
8813
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/pointer/parseKeyDef.js
8814
+ function parseKeyDef(pointerMap, keys) {
8815
+ const defs = [];
8816
+ do {
8817
+ const { descriptor, consumedLength, releasePrevious, releaseSelf = true } = readNextDescriptor(keys, "pointer");
8818
+ const keyDef = pointerMap.find((p) => p.name === descriptor);
8819
+ if (keyDef) defs.push({
8820
+ keyDef,
8821
+ releasePrevious,
8822
+ releaseSelf
8823
+ });
8824
+ keys = keys.slice(consumedLength);
8825
+ } while (keys);
8826
+ return defs;
8827
+ }
8828
+ function init_parseKeyDef$1() {
8829
+ return (init_parseKeyDef$1 = __esmMin((() => {
8830
+ init_Clipboard();
8831
+ init_readNextDescriptor();
8832
+ })))();
8833
+ }
8834
+ //#endregion
8835
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/pointer/index.js
8836
+ async function pointer$1(input) {
8837
+ const { pointerMap } = this.config;
8838
+ const actions = [];
8839
+ (Array.isArray(input) ? input : [input]).forEach((actionInput) => {
8840
+ if (typeof actionInput === "string") actions.push(...parseKeyDef(pointerMap, actionInput));
8841
+ else if ("keys" in actionInput) actions.push(...parseKeyDef(pointerMap, actionInput.keys).map((i) => ({
8842
+ ...actionInput,
8843
+ ...i
8844
+ })));
8845
+ else actions.push(actionInput);
8846
+ });
8847
+ for (let i = 0; i < actions.length; i++) {
8848
+ await wait(this.config);
8849
+ await pointerAction(this, actions[i]);
8850
+ }
8851
+ this.system.pointer.resetClickCount();
8852
+ }
8853
+ async function pointerAction(instance, action) {
8854
+ var _action_target, _action_coords, _action_node, _action_offset;
8855
+ var _previousPosition_caret, _previousPosition_caret1;
8856
+ const pointerName = "pointerName" in action && action.pointerName ? action.pointerName : "keyDef" in action ? instance.system.pointer.getPointerName(action.keyDef) : "mouse";
8857
+ const previousPosition = instance.system.pointer.getPreviousPosition(pointerName);
8858
+ const position = {
8859
+ target: (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : getPrevTarget(instance, previousPosition),
8860
+ coords: (_action_coords = action.coords) !== null && _action_coords !== void 0 ? _action_coords : previousPosition === null || previousPosition === void 0 ? void 0 : previousPosition.coords,
8861
+ caret: {
8862
+ node: (_action_node = action.node) !== null && _action_node !== void 0 ? _action_node : hasCaretPosition(action) ? void 0 : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret = previousPosition.caret) === null || _previousPosition_caret === void 0 ? void 0 : _previousPosition_caret.node,
8863
+ offset: (_action_offset = action.offset) !== null && _action_offset !== void 0 ? _action_offset : hasCaretPosition(action) ? void 0 : previousPosition === null || previousPosition === void 0 ? void 0 : (_previousPosition_caret1 = previousPosition.caret) === null || _previousPosition_caret1 === void 0 ? void 0 : _previousPosition_caret1.offset
8864
+ }
8865
+ };
8866
+ if ("keyDef" in action) {
8867
+ if (instance.system.pointer.isKeyPressed(action.keyDef)) {
8868
+ setLevelRef(instance, ApiLevel.Trigger);
8869
+ await instance.system.pointer.release(instance, action.keyDef, position);
8870
+ }
8871
+ if (!action.releasePrevious) {
8872
+ setLevelRef(instance, ApiLevel.Trigger);
8873
+ await instance.system.pointer.press(instance, action.keyDef, position);
8874
+ if (action.releaseSelf) {
8875
+ setLevelRef(instance, ApiLevel.Trigger);
8876
+ await instance.system.pointer.release(instance, action.keyDef, position);
8877
+ }
8878
+ }
8879
+ } else {
8880
+ setLevelRef(instance, ApiLevel.Trigger);
8881
+ await instance.system.pointer.move(instance, pointerName, position);
8882
+ }
8883
+ }
8884
+ function hasCaretPosition(action) {
8885
+ var _ref, _action_target;
8886
+ return !!((_ref = (_action_target = action.target) !== null && _action_target !== void 0 ? _action_target : action.node) !== null && _ref !== void 0 ? _ref : action.offset !== void 0);
8887
+ }
8888
+ function getPrevTarget(instance, position) {
8889
+ var _position_target;
8890
+ if (!position) throw new Error("This pointer has no previous position. Provide a target property!");
8891
+ return (_position_target = position.target) !== null && _position_target !== void 0 ? _position_target : instance.config.document.body;
8892
+ }
8893
+ function init_pointer$2() {
8894
+ return (init_pointer$2 = __esmMin((() => {
8895
+ init_Clipboard();
8896
+ init_level();
8897
+ init_parseKeyDef$1();
8898
+ })))();
8899
+ }
8900
+ //#endregion
8901
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utility/clear.js
8902
+ async function clear$1(element) {
8903
+ if (!isEditable(element) || isDisabled(element)) throw new Error("clear()` is only supported on editable elements.");
8904
+ focusElement(element);
8905
+ if (element.ownerDocument.activeElement !== element) throw new Error("The element to be cleared could not be focused.");
8906
+ selectAll(element);
8907
+ if (!isAllSelected(element)) throw new Error("The element content to be cleared could not be selected.");
8908
+ input(this, element, "", "deleteContentBackward");
8909
+ }
8910
+ function init_clear() {
8911
+ return (init_clear = __esmMin((() => {
8912
+ init_click();
8913
+ init_cut();
8914
+ init_keydown();
8915
+ init_keypress();
8916
+ init_keyup();
8917
+ init_paste();
8918
+ init_dom_esm();
8919
+ init_Clipboard();
8920
+ init_isEditable();
8921
+ init_isDisabled();
8922
+ init_focus();
8923
+ init_input();
8924
+ init_selectAll();
8925
+ })))();
8926
+ }
8927
+ //#endregion
8928
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utility/selectOptions.js
8929
+ async function selectOptions$1(select, values) {
8930
+ return selectOptionsBase.call(this, true, select, values);
8931
+ }
8932
+ async function deselectOptions$1(select, values) {
8933
+ return selectOptionsBase.call(this, false, select, values);
8934
+ }
8935
+ async function selectOptionsBase(newValue, select, values) {
8936
+ if (!newValue && !select.multiple) throw getConfig().getElementError(`Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.`, select);
8937
+ const valArray = Array.isArray(values) ? values : [values];
8938
+ const allOptions = Array.from(select.querySelectorAll("option, [role=\"option\"]"));
8939
+ const selectedOptions = valArray.map((val) => {
8940
+ if (typeof val !== "string" && allOptions.includes(val)) return val;
8941
+ else {
8942
+ const matchingOption = allOptions.find((o) => o.value === val || o.innerHTML === val);
8943
+ if (matchingOption) return matchingOption;
8944
+ else throw getConfig().getElementError(`Value "${String(val)}" not found in options`, select);
8945
+ }
8946
+ }).filter((option) => !isDisabled(option));
8947
+ if (isDisabled(select) || !selectedOptions.length) return;
8948
+ const selectOption = (option) => {
8949
+ option.selected = newValue;
8950
+ this.dispatchUIEvent(select, "input", {
8951
+ bubbles: true,
8952
+ cancelable: false,
8953
+ composed: true
8954
+ });
8955
+ this.dispatchUIEvent(select, "change");
8956
+ };
8957
+ if (isElementType(select, "select")) {
8958
+ if (select.multiple) for (const option of selectedOptions) {
8959
+ const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, option);
8960
+ if (withPointerEvents) {
8961
+ this.dispatchUIEvent(option, "pointerover");
8962
+ this.dispatchUIEvent(select, "pointerenter");
8963
+ this.dispatchUIEvent(option, "mouseover");
8964
+ this.dispatchUIEvent(select, "mouseenter");
8965
+ this.dispatchUIEvent(option, "pointermove");
8966
+ this.dispatchUIEvent(option, "mousemove");
8967
+ this.dispatchUIEvent(option, "pointerdown");
8968
+ this.dispatchUIEvent(option, "mousedown");
8969
+ }
8970
+ focusElement(select);
8971
+ if (withPointerEvents) {
8972
+ this.dispatchUIEvent(option, "pointerup");
8973
+ this.dispatchUIEvent(option, "mouseup");
8974
+ }
8975
+ selectOption(option);
8976
+ if (withPointerEvents) this.dispatchUIEvent(option, "click");
8977
+ await wait(this.config);
8978
+ }
8979
+ else if (selectedOptions.length === 1) {
8980
+ const withPointerEvents = this.config.pointerEventsCheck === 0 ? true : hasPointerEvents(this, select);
8981
+ if (withPointerEvents) await this.click(select);
8982
+ else focusElement(select);
8983
+ selectOption(selectedOptions[0]);
8984
+ if (withPointerEvents) {
8985
+ this.dispatchUIEvent(select, "pointerover");
8986
+ this.dispatchUIEvent(select, "pointerenter");
8987
+ this.dispatchUIEvent(select, "mouseover");
8988
+ this.dispatchUIEvent(select, "mouseenter");
8989
+ this.dispatchUIEvent(select, "pointerup");
8990
+ this.dispatchUIEvent(select, "mouseup");
8991
+ this.dispatchUIEvent(select, "click");
8992
+ }
8993
+ await wait(this.config);
8994
+ } else throw getConfig().getElementError(`Cannot select multiple options on a non-multiple select`, select);
8995
+ } else if (select.getAttribute("role") === "listbox") for (const option of selectedOptions) {
8996
+ await this.click(option);
8997
+ await this.unhover(option);
8998
+ }
8999
+ else throw getConfig().getElementError(`Cannot select options on elements that are neither select nor listbox elements`, select);
9000
+ }
9001
+ function init_selectOptions() {
9002
+ return (init_selectOptions = __esmMin((() => {
9003
+ init_dom_esm();
9004
+ init_Clipboard();
9005
+ init_isDisabled();
9006
+ init_cssPointerEvents();
9007
+ init_click();
9008
+ init_cut();
9009
+ init_keydown();
9010
+ init_keypress();
9011
+ init_keyup();
9012
+ init_paste();
9013
+ init_focus();
9014
+ })))();
9015
+ }
9016
+ //#endregion
9017
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utility/type.js
9018
+ async function type$1(element, text, { skipClick = this.config.skipClick, skipAutoClose = this.config.skipAutoClose, initialSelectionStart, initialSelectionEnd } = {}) {
9019
+ if (element.disabled) return;
9020
+ if (!skipClick) await this.click(element);
9021
+ if (initialSelectionStart !== void 0) setSelectionRange(element, initialSelectionStart, initialSelectionEnd !== null && initialSelectionEnd !== void 0 ? initialSelectionEnd : initialSelectionStart);
9022
+ await this.keyboard(text);
9023
+ if (!skipAutoClose) await releaseAllKeys(this);
9024
+ }
9025
+ function init_type() {
9026
+ return (init_type = __esmMin((() => {
9027
+ init_keyboard$1();
9028
+ init_Clipboard();
9029
+ init_setSelectionRange();
9030
+ })))();
9031
+ }
9032
+ //#endregion
9033
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utils/edit/setFiles.js
9034
+ function restoreProperty(obj, prop, descriptor) {
9035
+ if (descriptor) Object.defineProperty(obj, prop, descriptor);
9036
+ else delete obj[prop];
9037
+ }
9038
+ function setFiles(el, files) {
9039
+ var _el_fakeFiles;
9040
+ (_el_fakeFiles = el[fakeFiles]) === null || _el_fakeFiles === void 0 || _el_fakeFiles.restore();
9041
+ const typeDescr = Object.getOwnPropertyDescriptor(el, "type");
9042
+ const valueDescr = Object.getOwnPropertyDescriptor(el, "value");
9043
+ const filesDescr = Object.getOwnPropertyDescriptor(el, "files");
9044
+ function restore() {
9045
+ restoreProperty(el, "type", typeDescr);
9046
+ restoreProperty(el, "value", valueDescr);
9047
+ restoreProperty(el, "files", filesDescr);
9048
+ }
9049
+ el[fakeFiles] = { restore };
9050
+ Object.defineProperties(el, {
9051
+ files: {
9052
+ configurable: true,
9053
+ get: () => files
9054
+ },
9055
+ value: {
9056
+ configurable: true,
9057
+ get: () => files.length ? `C:\\fakepath\\${files[0].name}` : "",
9058
+ set(v) {
9059
+ if (v === "") restore();
9060
+ else {
9061
+ var _valueDescr_set;
9062
+ valueDescr === null || valueDescr === void 0 || (_valueDescr_set = valueDescr.set) == null || _valueDescr_set.call(el, v);
9063
+ }
9064
+ }
9065
+ },
9066
+ type: {
9067
+ configurable: true,
9068
+ get: () => "file",
9069
+ set(v) {
9070
+ if (v !== "file") {
9071
+ restore();
9072
+ el.type = v;
9073
+ }
9074
+ }
9075
+ }
9076
+ });
9077
+ }
9078
+ var fakeFiles;
9079
+ function init_setFiles() {
9080
+ return (init_setFiles = __esmMin((() => {
9081
+ fakeFiles = Symbol("files and value properties are mocked");
9082
+ })))();
9083
+ }
9084
+ //#endregion
9085
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/utility/upload.js
9086
+ async function upload$1(element, fileOrFiles) {
9087
+ const input = isElementType(element, "label") ? element.control : element;
9088
+ if (!input || !isElementType(input, "input", { type: "file" })) throw new TypeError(`The ${input === element ? "given" : "associated"} ${input === null || input === void 0 ? void 0 : input.tagName} element does not accept file uploads`);
9089
+ if (isDisabled(element)) return;
9090
+ const files = (Array.isArray(fileOrFiles) ? fileOrFiles : [fileOrFiles]).filter((file) => !this.config.applyAccept || isAcceptableFile(file, input.accept)).slice(0, input.multiple ? void 0 : 1);
9091
+ const fileDialog = () => {
9092
+ var _input_files;
9093
+ if (files.length === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.length) && files.every((f, i) => {
9094
+ var _input_files;
9095
+ return f === ((_input_files = input.files) === null || _input_files === void 0 ? void 0 : _input_files.item(i));
9096
+ })) return;
9097
+ setFiles(input, createFileList(getWindow(element), files));
9098
+ this.dispatchUIEvent(input, "input");
9099
+ this.dispatchUIEvent(input, "change");
9100
+ };
9101
+ input.addEventListener("fileDialog", fileDialog);
9102
+ await this.click(element);
9103
+ input.removeEventListener("fileDialog", fileDialog);
9104
+ }
9105
+ function normalize(nameOrType) {
9106
+ return nameOrType.toLowerCase().replace(/(\.|\/)jpg\b/g, "$1jpeg");
9107
+ }
9108
+ function isAcceptableFile(file, accept) {
9109
+ if (!accept) return true;
9110
+ const wildcards = [
9111
+ "audio/*",
9112
+ "image/*",
9113
+ "video/*"
9114
+ ];
9115
+ return normalize(accept).trim().split(/\s*,\s*/).some((acceptToken) => {
9116
+ if (acceptToken.startsWith(".")) return normalize(file.name).endsWith(acceptToken);
9117
+ else if (wildcards.includes(acceptToken)) return normalize(file.type).startsWith(acceptToken.replace("*", ""));
9118
+ return normalize(file.type) === acceptToken;
9119
+ });
9120
+ }
9121
+ function init_upload() {
9122
+ return (init_upload = __esmMin((() => {
9123
+ init_Clipboard();
9124
+ init_setFiles();
9125
+ init_isDisabled();
9126
+ })))();
9127
+ }
9128
+ //#endregion
9129
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/setup/api.js
9130
+ var userEventApi;
9131
+ function init_api() {
9132
+ return (init_api = __esmMin((() => {
9133
+ init_hover();
9134
+ init_keyboard$1();
9135
+ init_copy();
9136
+ init_cut$1();
9137
+ init_paste$1();
9138
+ init_pointer$2();
9139
+ init_clear();
9140
+ init_selectOptions();
9141
+ init_type();
9142
+ init_upload();
9143
+ userEventApi = {
9144
+ click: click$1,
9145
+ dblClick: dblClick$1,
9146
+ tripleClick: tripleClick$1,
9147
+ hover: hover$1,
9148
+ unhover: unhover$1,
9149
+ tab: tab$1,
9150
+ keyboard: keyboard$1,
9151
+ copy: copy$1,
9152
+ cut: cut$1,
9153
+ paste: paste$1,
9154
+ pointer: pointer$1,
9155
+ clear: clear$1,
9156
+ deselectOptions: deselectOptions$1,
9157
+ selectOptions: selectOptions$1,
9158
+ type: type$1,
9159
+ upload: upload$1
9160
+ };
9161
+ })))();
9162
+ }
9163
+ //#endregion
9164
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/setup/wrapAsync.js
9165
+ /**
9166
+ * Wrap an internal Promise
9167
+ */ function wrapAsync(implementation) {
9168
+ return getConfig().asyncWrapper(implementation);
9169
+ }
9170
+ function init_wrapAsync() {
9171
+ return (init_wrapAsync = __esmMin((() => {
9172
+ init_dom_esm();
9173
+ })))();
9174
+ }
9175
+ //#endregion
9176
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/setup/setup.js
9177
+ function createConfig(options = {}, defaults = defaultOptionsSetup, node) {
9178
+ const document = getDocument(options, node, defaults);
9179
+ return {
9180
+ ...defaults,
9181
+ ...options,
9182
+ document
9183
+ };
9184
+ }
9185
+ /**
9186
+ * Start a "session" with userEvent.
9187
+ * All APIs returned by this function share an input device state and a default configuration.
9188
+ */ function setupMain(options = {}) {
9189
+ var _config_document_defaultView;
9190
+ const config = createConfig(options);
9191
+ prepareDocument(config.document);
9192
+ patchFocus(getWindow(config.document).HTMLElement);
9193
+ attachClipboardStubToView((_config_document_defaultView = config.document.defaultView) !== null && _config_document_defaultView !== void 0 ? _config_document_defaultView : /* istanbul ignore next */ globalThis.window);
9194
+ return createInstance(config).api;
9195
+ }
9196
+ /**
9197
+ * Setup in direct call per `userEvent.anyApi()`
9198
+ */ function setupDirect({ keyboardState, pointerState, ...options } = {}, node) {
9199
+ var _ref;
9200
+ const config = createConfig(options, defaultOptionsDirect, node);
9201
+ prepareDocument(config.document);
9202
+ patchFocus(getWindow(config.document).HTMLElement);
9203
+ const system = (_ref = pointerState !== null && pointerState !== void 0 ? pointerState : keyboardState) !== null && _ref !== void 0 ? _ref : new System();
9204
+ return {
9205
+ api: createInstance(config, system).api,
9206
+ system
9207
+ };
9208
+ }
9209
+ /**
9210
+ * Create a set of callbacks with different default settings but the same state.
9211
+ */ function setupSub(options) {
9212
+ return createInstance({
9213
+ ...this.config,
9214
+ ...options
9215
+ }, this.system).api;
9216
+ }
9217
+ function wrapAndBindImpl(instance, impl) {
9218
+ function method(...args) {
9219
+ setLevelRef(instance, ApiLevel.Call);
9220
+ return wrapAsync(() => impl.apply(instance, args).then(async (ret) => {
9221
+ await wait(instance.config);
9222
+ return ret;
9223
+ }));
9224
+ }
9225
+ Object.defineProperty(method, "name", { get: () => impl.name });
9226
+ return method;
9227
+ }
9228
+ function createInstance(config, system = new System()) {
9229
+ const instance = {};
9230
+ Object.assign(instance, {
9231
+ config,
9232
+ dispatchEvent: dispatchEvent.bind(instance),
9233
+ dispatchUIEvent: dispatchUIEvent.bind(instance),
9234
+ system,
9235
+ levelRefs: {},
9236
+ ...userEventApi
9237
+ });
9238
+ return {
9239
+ instance,
9240
+ api: {
9241
+ ...Object.fromEntries(Object.entries(userEventApi).map(([name, api]) => [name, wrapAndBindImpl(instance, api)])),
9242
+ setup: setupSub.bind(instance)
9243
+ }
9244
+ };
9245
+ }
9246
+ function getDocument(options, node, defaults) {
9247
+ var _ref, _options_document;
9248
+ return (_ref = (_options_document = options.document) !== null && _options_document !== void 0 ? _options_document : node && getDocumentFromNode(node)) !== null && _ref !== void 0 ? _ref : defaults.document;
9249
+ }
9250
+ var defaultOptionsDirect, defaultOptionsSetup;
9251
+ function init_setup() {
9252
+ return (init_setup = __esmMin((() => {
9253
+ init_patchFocus();
9254
+ init_prepareDocument();
9255
+ init_dispatchEvent();
9256
+ init_Clipboard();
9257
+ init_level();
9258
+ init_options();
9259
+ init_dom_esm();
9260
+ init_keyMap();
9261
+ init_keyMap$1();
9262
+ init_system();
9263
+ init_api();
9264
+ init_wrapAsync();
9265
+ defaultOptionsDirect = {
9266
+ applyAccept: true,
9267
+ autoModify: true,
9268
+ delay: 0,
9269
+ document: globalThis.document,
9270
+ keyboardMap: defaultKeyMap$1,
9271
+ pointerMap: defaultKeyMap,
9272
+ pointerEventsCheck: PointerEventsCheckLevel.EachApiCall,
9273
+ skipAutoClose: false,
9274
+ skipClick: false,
9275
+ skipHover: false,
9276
+ writeToClipboard: false,
9277
+ advanceTimers: () => Promise.resolve()
9278
+ };
9279
+ defaultOptionsSetup = {
9280
+ ...defaultOptionsDirect,
9281
+ writeToClipboard: true
9282
+ };
9283
+ })))();
9284
+ }
9285
+ //#endregion
9286
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/setup/directApi.js
9287
+ var directApi_exports = /* @__PURE__ */ __exportAll({
9288
+ clear: () => clear,
9289
+ click: () => click,
9290
+ copy: () => copy,
9291
+ cut: () => cut,
9292
+ dblClick: () => dblClick,
9293
+ deselectOptions: () => deselectOptions,
9294
+ hover: () => hover,
9295
+ keyboard: () => keyboard,
9296
+ paste: () => paste,
9297
+ pointer: () => pointer,
9298
+ selectOptions: () => selectOptions,
9299
+ tab: () => tab,
9300
+ tripleClick: () => tripleClick,
9301
+ type: () => type,
9302
+ unhover: () => unhover,
9303
+ upload: () => upload
9304
+ });
9305
+ function clear(element) {
9306
+ return setupDirect().api.clear(element);
9307
+ }
9308
+ function click(element, options = {}) {
9309
+ return setupDirect(options, element).api.click(element);
9310
+ }
9311
+ function copy(options = {}) {
9312
+ return setupDirect(options).api.copy();
9313
+ }
9314
+ function cut(options = {}) {
9315
+ return setupDirect(options).api.cut();
9316
+ }
9317
+ function dblClick(element, options = {}) {
9318
+ return setupDirect(options).api.dblClick(element);
9319
+ }
9320
+ function deselectOptions(select, values, options = {}) {
9321
+ return setupDirect(options).api.deselectOptions(select, values);
9322
+ }
9323
+ function hover(element, options = {}) {
9324
+ return setupDirect(options).api.hover(element);
9325
+ }
9326
+ async function keyboard(text, options = {}) {
9327
+ const { api, system } = setupDirect(options);
9328
+ return api.keyboard(text).then(() => system);
9329
+ }
9330
+ async function pointer(input, options = {}) {
9331
+ const { api, system } = setupDirect(options);
9332
+ return api.pointer(input).then(() => system);
9333
+ }
9334
+ function paste(clipboardData, options) {
9335
+ return setupDirect(options).api.paste(clipboardData);
9336
+ }
9337
+ function selectOptions(select, values, options = {}) {
9338
+ return setupDirect(options).api.selectOptions(select, values);
9339
+ }
9340
+ function tripleClick(element, options = {}) {
9341
+ return setupDirect(options).api.tripleClick(element);
9342
+ }
9343
+ function type(element, text, options = {}) {
9344
+ return setupDirect(options, element).api.type(element, text, options);
9345
+ }
9346
+ function unhover(element, options = {}) {
9347
+ const { api, system } = setupDirect(options);
9348
+ system.pointer.setMousePosition({ target: element });
9349
+ return api.unhover(element);
9350
+ }
9351
+ function upload(element, fileOrFiles, options = {}) {
9352
+ return setupDirect(options).api.upload(element, fileOrFiles);
9353
+ }
9354
+ function tab(options = {}) {
9355
+ return setupDirect().api.tab(options);
9356
+ }
9357
+ function init_directApi() {
9358
+ return (init_directApi = __esmMin((() => {
9359
+ init_setup();
9360
+ })))();
9361
+ }
9362
+ //#endregion
9363
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/setup/index.js
9364
+ var userEvent;
9365
+ function init_setup$1() {
9366
+ return (init_setup$1 = __esmMin((() => {
9367
+ init_setup();
9368
+ init_directApi();
9369
+ userEvent = {
9370
+ ...directApi_exports,
9371
+ setup: setupMain
9372
+ };
9373
+ })))();
9374
+ }
9375
+ //#endregion
9376
+ //#region ../../node_modules/@testing-library/user-event/dist/esm/index.js
9377
+ function init_esm() {
9378
+ return (init_esm = __esmMin((() => {
9379
+ init_setup$1();
9380
+ })))();
9381
+ }
9382
+ //#endregion
9383
+ export { init_dom_esm as a, dom_esm_exports as i, init_setup$1 as n, init_matchers as o, userEvent as r, matchers_exports as s, init_esm as t };