@jigowatts/jigowatts-ui 2.0.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (225) hide show
  1. package/dist/assets/index10.css +1 -1
  2. package/dist/assets/index11.css +1 -1
  3. package/dist/assets/index12.css +1 -1
  4. package/dist/assets/index13.css +1 -1
  5. package/dist/assets/index14.css +1 -1
  6. package/dist/assets/index15.css +1 -1
  7. package/dist/assets/index16.css +1 -1
  8. package/dist/assets/index17.css +1 -1
  9. package/dist/assets/index18.css +1 -1
  10. package/dist/assets/index19.css +1 -1
  11. package/dist/assets/index20.css +1 -1
  12. package/dist/assets/index21.css +1 -1
  13. package/dist/assets/index22.css +1 -1
  14. package/dist/assets/index23.css +1 -1
  15. package/dist/assets/index24.css +1 -1
  16. package/dist/assets/index25.css +1 -1
  17. package/dist/assets/index26.css +1 -1
  18. package/dist/assets/index27.css +1 -1
  19. package/dist/assets/index28.css +1 -1
  20. package/dist/assets/index29.css +1 -1
  21. package/dist/assets/index30.css +1 -1
  22. package/dist/assets/index31.css +1 -1
  23. package/dist/assets/index32.css +1 -1
  24. package/dist/assets/index7.css +1 -1
  25. package/dist/assets/index8.css +1 -1
  26. package/dist/assets/index9.css +1 -1
  27. package/dist/components/Button/index.test.cjs.js +1 -1
  28. package/dist/components/Button/index.test.es.js +1 -1
  29. package/dist/components/Card/index.cjs.js +1 -1
  30. package/dist/components/Card/index.es.js +1 -1
  31. package/dist/components/Card/index.test.cjs.js +1 -1
  32. package/dist/components/Card/index.test.es.js +1 -1
  33. package/dist/components/CardWithTitle/index.cjs.js +1 -1
  34. package/dist/components/CardWithTitle/index.es.js +1 -1
  35. package/dist/components/CardWithTitle/index.test.cjs.js +1 -1
  36. package/dist/components/CardWithTitle/index.test.es.js +1 -1
  37. package/dist/components/CopyableBox/index.cjs.js +2 -0
  38. package/dist/components/CopyableBox/index.cjs.js.map +1 -0
  39. package/dist/components/CopyableBox/index.d.ts +23 -0
  40. package/dist/components/CopyableBox/index.es.js +46 -0
  41. package/dist/components/CopyableBox/index.es.js.map +1 -0
  42. package/dist/components/CopyableBox/index.test.cjs.js +2 -0
  43. package/dist/components/CopyableBox/index.test.cjs.js.map +1 -0
  44. package/dist/components/CopyableBox/index.test.d.ts +1 -0
  45. package/dist/components/CopyableBox/index.test.es.js +39 -0
  46. package/dist/components/CopyableBox/index.test.es.js.map +1 -0
  47. package/dist/components/CustomLink/index.cjs.js +1 -1
  48. package/dist/components/CustomLink/index.es.js +1 -1
  49. package/dist/components/CustomLink/index.test.cjs.js +1 -1
  50. package/dist/components/CustomLink/index.test.es.js +2 -2
  51. package/dist/components/DataTable/index.cjs.js +1 -1
  52. package/dist/components/DataTable/index.es.js +1 -1
  53. package/dist/components/DataTable/index.test.cjs.js +1 -1
  54. package/dist/components/DataTable/index.test.es.js +2 -2
  55. package/dist/components/DatePickerController/index.cjs.js +1 -1
  56. package/dist/components/DatePickerController/index.es.js +1 -1
  57. package/dist/components/DatePickerController/index.test.cjs.js +1 -1
  58. package/dist/components/DatePickerController/index.test.es.js +1 -1
  59. package/dist/components/ErrorMessage/index.cjs.js +1 -1
  60. package/dist/components/ErrorMessage/index.es.js +1 -1
  61. package/dist/components/ErrorMessage/index.test.cjs.js +1 -1
  62. package/dist/components/ErrorMessage/index.test.es.js +2 -2
  63. package/dist/components/EvseStateLabel/index.cjs.js +1 -1
  64. package/dist/components/EvseStateLabel/index.es.js +1 -1
  65. package/dist/components/FlexButtons/index.cjs.js +1 -1
  66. package/dist/components/FlexButtons/index.es.js +1 -1
  67. package/dist/components/FlexButtons/index.test.cjs.js +1 -1
  68. package/dist/components/FlexButtons/index.test.es.js +1 -1
  69. package/dist/components/Form/index.cjs.js +1 -1
  70. package/dist/components/Form/index.es.js +1 -1
  71. package/dist/components/Form/index.test.cjs.js +1 -1
  72. package/dist/components/Form/index.test.es.js +2 -2
  73. package/dist/components/FormItem/index.cjs.js +1 -1
  74. package/dist/components/FormItem/index.es.js +1 -1
  75. package/dist/components/FormItem/index.test.cjs.js +1 -1
  76. package/dist/components/FormItem/index.test.es.js +2 -2
  77. package/dist/components/FormTitle/index.cjs.js +1 -1
  78. package/dist/components/FormTitle/index.es.js +1 -1
  79. package/dist/components/FormTitle/index.test.cjs.js +1 -1
  80. package/dist/components/FormTitle/index.test.es.js +2 -2
  81. package/dist/components/HStack/index.cjs.js +1 -1
  82. package/dist/components/HStack/index.es.js +1 -1
  83. package/dist/components/HStack/index.test.cjs.js +1 -1
  84. package/dist/components/HStack/index.test.es.js +1 -1
  85. package/dist/components/HtmlRenderer/index.test.cjs.js +1 -1
  86. package/dist/components/HtmlRenderer/index.test.es.js +1 -1
  87. package/dist/components/Input/index.cjs.js +1 -1
  88. package/dist/components/Input/index.es.js +1 -1
  89. package/dist/components/Input/index.test.cjs.js +1 -1
  90. package/dist/components/Input/index.test.es.js +1 -1
  91. package/dist/components/InputController/index.test.cjs.js +1 -1
  92. package/dist/components/InputController/index.test.es.js +1 -1
  93. package/dist/components/InputGroup/index.cjs.js +1 -1
  94. package/dist/components/InputGroup/index.es.js +1 -1
  95. package/dist/components/InputGroup/index.test.cjs.js +1 -1
  96. package/dist/components/InputGroup/index.test.es.js +2 -2
  97. package/dist/components/Label/index.cjs.js +1 -1
  98. package/dist/components/Label/index.es.js +1 -1
  99. package/dist/components/Label/index.test.cjs.js +1 -1
  100. package/dist/components/Label/index.test.es.js +2 -2
  101. package/dist/components/LabeledContent/index.cjs.js +1 -1
  102. package/dist/components/LabeledContent/index.es.js +1 -1
  103. package/dist/components/LabeledContent/index.test.cjs.js +1 -1
  104. package/dist/components/LabeledContent/index.test.es.js +1 -1
  105. package/dist/components/LoadingOverlay/index.cjs.js +1 -1
  106. package/dist/components/LoadingOverlay/index.es.js +1 -1
  107. package/dist/components/LoadingOverlay/index.test.cjs.js +1 -1
  108. package/dist/components/LoadingOverlay/index.test.es.js +2 -2
  109. package/dist/components/MaxWidthContainer/index.cjs.js +1 -1
  110. package/dist/components/MaxWidthContainer/index.es.js +1 -1
  111. package/dist/components/MaxWidthContainer/index.test.cjs.js +1 -1
  112. package/dist/components/MaxWidthContainer/index.test.es.js +2 -2
  113. package/dist/components/NumericFieldController/index.test.cjs.js +1 -1
  114. package/dist/components/NumericFieldController/index.test.es.js +1 -1
  115. package/dist/components/OfflineLabel/index.cjs.js +1 -1
  116. package/dist/components/OfflineLabel/index.es.js +1 -1
  117. package/dist/components/PageSizeSelector/index.cjs.js +1 -1
  118. package/dist/components/PageSizeSelector/index.es.js +2 -2
  119. package/dist/components/Pagination/index.test.cjs.js +1 -1
  120. package/dist/components/Pagination/index.test.es.js +1 -1
  121. package/dist/components/PasswordInputController/index.test.cjs.js +1 -1
  122. package/dist/components/PasswordInputController/index.test.es.js +1 -1
  123. package/dist/components/RadioButton/index.cjs.js +1 -1
  124. package/dist/components/RadioButton/index.es.js +1 -1
  125. package/dist/components/RadioButton/index.test.cjs.js +1 -1
  126. package/dist/components/RadioButton/index.test.es.js +3 -3
  127. package/dist/components/RadioGroupController/index.test.cjs.js +1 -1
  128. package/dist/components/RadioGroupController/index.test.es.js +1 -1
  129. package/dist/components/RangeDatePicker/index.cjs.js +1 -1
  130. package/dist/components/RangeDatePicker/index.es.js +1 -1
  131. package/dist/components/RangeDatePickerController/index.test.cjs.js +1 -1
  132. package/dist/components/RangeDatePickerController/index.test.es.js +1 -1
  133. package/dist/components/ReportCard/index.cjs.js +1 -1
  134. package/dist/components/ReportCard/index.es.js +1 -1
  135. package/dist/components/ReportCard/index.test.cjs.js +1 -1
  136. package/dist/components/ReportCard/index.test.es.js +1 -1
  137. package/dist/components/ReportChart/index.cjs.js +1 -1
  138. package/dist/components/ReportChart/index.es.js +1 -1
  139. package/dist/components/ReportChartMulti/index.cjs.js +1 -1
  140. package/dist/components/ReportChartMulti/index.es.js +1 -1
  141. package/dist/components/ReportChartMulti/index.test.cjs.js +1 -1
  142. package/dist/components/ReportChartMulti/index.test.es.js +1 -1
  143. package/dist/components/ScrollableDialog/index.test.cjs.js +1 -1
  144. package/dist/components/ScrollableDialog/index.test.es.js +1 -1
  145. package/dist/components/SelectBox/index.cjs.js +1 -1
  146. package/dist/components/SelectBox/index.es.js +1 -1
  147. package/dist/components/SelectBox/index.test.cjs.js +1 -1
  148. package/dist/components/SelectBox/index.test.es.js +2 -2
  149. package/dist/components/SelectBoxController/index.test.cjs.js +1 -1
  150. package/dist/components/SelectBoxController/index.test.es.js +1 -1
  151. package/dist/components/SideMenu/index.test.cjs.js +1 -1
  152. package/dist/components/SideMenu/index.test.es.js +2 -2
  153. package/dist/components/SpinnerButton/index.test.cjs.js +1 -1
  154. package/dist/components/SpinnerButton/index.test.es.js +1 -1
  155. package/dist/components/SubMenu/index.test.cjs.js +1 -1
  156. package/dist/components/SubMenu/index.test.es.js +1 -1
  157. package/dist/components/Tabs/index.test.cjs.js +1 -1
  158. package/dist/components/Tabs/index.test.es.js +1 -1
  159. package/dist/components/Textarea/index.test.cjs.js +1 -1
  160. package/dist/components/Textarea/index.test.es.js +2 -2
  161. package/dist/components/Title/index.cjs.js +1 -1
  162. package/dist/components/Title/index.cjs.js.map +1 -1
  163. package/dist/components/Title/index.es.js +9 -2
  164. package/dist/components/Title/index.es.js.map +1 -1
  165. package/dist/components/Title/index.test.cjs.js +1 -1
  166. package/dist/components/Title/index.test.es.js +1 -1
  167. package/dist/components/ToggleButton/index.test.cjs.js +1 -1
  168. package/dist/components/ToggleButton/index.test.es.js +1 -1
  169. package/dist/components/TwoFaDialog/index.cjs.js +19 -0
  170. package/dist/components/TwoFaDialog/index.cjs.js.map +1 -0
  171. package/dist/components/TwoFaDialog/index.d.ts +62 -0
  172. package/dist/components/TwoFaDialog/index.es.js +1129 -0
  173. package/dist/components/TwoFaDialog/index.es.js.map +1 -0
  174. package/dist/components/TwoFaDialog/index.test.cjs.js +3 -0
  175. package/dist/components/TwoFaDialog/index.test.cjs.js.map +1 -0
  176. package/dist/components/TwoFaDialog/index.test.d.ts +1 -0
  177. package/dist/components/TwoFaDialog/index.test.es.js +73 -0
  178. package/dist/components/TwoFaDialog/index.test.es.js.map +1 -0
  179. package/dist/components/TwoFaInputController/index.cjs.js +2 -0
  180. package/dist/components/TwoFaInputController/index.cjs.js.map +1 -0
  181. package/dist/components/TwoFaInputController/index.d.ts +34 -0
  182. package/dist/components/TwoFaInputController/index.es.js +87 -0
  183. package/dist/components/TwoFaInputController/index.es.js.map +1 -0
  184. package/dist/components/TwoFaInputController/index.test.cjs.js +2 -0
  185. package/dist/components/TwoFaInputController/index.test.cjs.js.map +1 -0
  186. package/dist/components/TwoFaInputController/index.test.d.ts +1 -0
  187. package/dist/components/TwoFaInputController/index.test.es.js +123 -0
  188. package/dist/components/TwoFaInputController/index.test.es.js.map +1 -0
  189. package/dist/components/TwoFaLabel/index.cjs.js +2 -0
  190. package/dist/components/TwoFaLabel/index.cjs.js.map +1 -0
  191. package/dist/components/TwoFaLabel/index.d.ts +28 -0
  192. package/dist/components/TwoFaLabel/index.es.js +60 -0
  193. package/dist/components/TwoFaLabel/index.es.js.map +1 -0
  194. package/dist/components/TwoFaLabel/index.test.cjs.js +2 -0
  195. package/dist/components/TwoFaLabel/index.test.cjs.js.map +1 -0
  196. package/dist/components/TwoFaLabel/index.test.d.ts +1 -0
  197. package/dist/components/TwoFaLabel/index.test.es.js +19 -0
  198. package/dist/components/TwoFaLabel/index.test.es.js.map +1 -0
  199. package/dist/components/VStack/index.test.cjs.js +1 -1
  200. package/dist/components/VStack/index.test.es.js +1 -1
  201. package/dist/{index-B663CLQ0.cjs → index-BM3CSrls.cjs} +2 -2
  202. package/dist/{index-B663CLQ0.cjs.map → index-BM3CSrls.cjs.map} +1 -1
  203. package/dist/{index-Bbj4TMfJ.cjs → index-BoenezD8.cjs} +2 -2
  204. package/dist/{index-Bbj4TMfJ.cjs.map → index-BoenezD8.cjs.map} +1 -1
  205. package/dist/{index-pr0ncuNy.js → index-CogWL0bN.js} +2 -2
  206. package/dist/{index-pr0ncuNy.js.map → index-CogWL0bN.js.map} +1 -1
  207. package/dist/{index-CSiE_l9r.js → index-D7VNQwOv.js} +2 -2
  208. package/dist/{index-CSiE_l9r.js.map → index-D7VNQwOv.js.map} +1 -1
  209. package/dist/{index-Bt_ypxrX.js → index-DI17hZPH.js} +2 -2
  210. package/dist/{index-Bt_ypxrX.js.map → index-DI17hZPH.js.map} +1 -1
  211. package/dist/{index-CaEC29Xt.cjs → index-Ds6DK19y.cjs} +2 -2
  212. package/dist/{index-CaEC29Xt.cjs.map → index-Ds6DK19y.cjs.map} +1 -1
  213. package/dist/{index-CCbJ_2yU.cjs → index-SHLzSoKB.cjs} +2 -2
  214. package/dist/{index-CCbJ_2yU.cjs.map → index-SHLzSoKB.cjs.map} +1 -1
  215. package/dist/{index--uHewOkd.js → index-sarAILcU.js} +2 -2
  216. package/dist/{index--uHewOkd.js.map → index-sarAILcU.js.map} +1 -1
  217. package/dist/index.cjs.js +1 -1
  218. package/dist/index.d.ts +4 -0
  219. package/dist/index.es.js +75 -65
  220. package/dist/index.es.js.map +1 -1
  221. package/dist/{react.esm-DVhZgPrH.js → react.esm-BBESb8eI.js} +3 -2
  222. package/dist/{react.esm-DVhZgPrH.js.map → react.esm-BBESb8eI.js.map} +1 -1
  223. package/dist/{react.esm-BcRJ42eI.cjs → react.esm-DGuy6Rn3.cjs} +29 -29
  224. package/dist/{react.esm-BcRJ42eI.cjs.map → react.esm-DGuy6Rn3.cjs.map} +1 -1
  225. package/package.json +22 -1
@@ -0,0 +1,123 @@
1
+ import { jsx as c } from "react/jsx-runtime";
2
+ import { a as s, r as l, s as u, f as d } from "../../react.esm-BBESb8eI.js";
3
+ import { useForm as a } from "react-hook-form";
4
+ import { TwoFaInputController as i } from "./index.es.js";
5
+ describe("TwoFaInputController", () => {
6
+ it("renders six input fields with the correct attributes", () => {
7
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill("");
8
+ l(
9
+ /* @__PURE__ */ c(
10
+ i,
11
+ {
12
+ control: o,
13
+ name: r,
14
+ defaultValue: n,
15
+ onSubmit: () => {
16
+ }
17
+ }
18
+ )
19
+ );
20
+ const t = u.getAllByRole("textbox");
21
+ expect(t).toHaveLength(6), t.forEach((e) => {
22
+ expect(e).toHaveAttribute("type", "text"), expect(e).toHaveAttribute("inputmode", "numeric"), expect(e).toHaveAttribute("maxlength", "1"), expect(e).toHaveAttribute("autocomplete", "off"), expect(e).toHaveStyle("text-align: center"), expect(e).toHaveStyle("width: 2ch"), expect(e).toHaveStyle("height: 3ch"), expect(e).toHaveStyle("font-size: 1.5rem");
23
+ });
24
+ }), it("focuses the next input field when a digit is entered", () => {
25
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill("");
26
+ l(
27
+ /* @__PURE__ */ c(
28
+ i,
29
+ {
30
+ control: o,
31
+ name: r,
32
+ defaultValue: n,
33
+ onSubmit: () => {
34
+ }
35
+ }
36
+ )
37
+ );
38
+ const t = u.getAllByRole("textbox");
39
+ d.change(t[0], { target: { value: "1" } }), expect(t[1]).toHaveFocus();
40
+ }), it("moves focus to the previous input field on backspace", () => {
41
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill("");
42
+ l(
43
+ /* @__PURE__ */ c(
44
+ i,
45
+ {
46
+ control: o,
47
+ name: r,
48
+ defaultValue: n,
49
+ onSubmit: () => {
50
+ }
51
+ }
52
+ )
53
+ );
54
+ const t = u.getAllByRole("textbox");
55
+ d.keyDown(t[1], { key: "Backspace" }), expect(t[0]).toHaveFocus();
56
+ }), it("moves focus to the previous input field on ArrowLeft", () => {
57
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill("");
58
+ l(
59
+ /* @__PURE__ */ c(
60
+ i,
61
+ {
62
+ control: o,
63
+ name: r,
64
+ defaultValue: n,
65
+ onSubmit: () => {
66
+ }
67
+ }
68
+ )
69
+ );
70
+ const t = u.getAllByRole("textbox");
71
+ d.keyDown(t[1], { key: "ArrowLeft" }), expect(t[0]).toHaveFocus();
72
+ }), it("moves focus to the next input field on ArrowRight", () => {
73
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill("");
74
+ l(
75
+ /* @__PURE__ */ c(
76
+ i,
77
+ {
78
+ control: o,
79
+ name: r,
80
+ defaultValue: n,
81
+ onSubmit: () => {
82
+ }
83
+ }
84
+ )
85
+ );
86
+ const t = u.getAllByRole("textbox");
87
+ d.keyDown(t[0], { key: "ArrowRight" }), expect(t[1]).toHaveFocus();
88
+ }), it("displays validate error message when there are errors", () => {
89
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill("");
90
+ l(
91
+ /* @__PURE__ */ c(
92
+ i,
93
+ {
94
+ control: o,
95
+ name: r,
96
+ defaultValue: n,
97
+ onSubmit: () => {
98
+ },
99
+ errors: {
100
+ code: [{ type: "required", message: "必須" }]
101
+ },
102
+ errorMessage: "必須"
103
+ }
104
+ )
105
+ ), expect(u.getByText("必須")).toBeInTheDocument();
106
+ }), it("calls onSubmit with the correct code when all inputs are filled", () => {
107
+ const o = s(() => a().control).result.current, r = "code", n = Array(6).fill(""), t = jest.fn();
108
+ l(
109
+ /* @__PURE__ */ c(
110
+ i,
111
+ {
112
+ control: o,
113
+ name: r,
114
+ defaultValue: n,
115
+ onSubmit: t
116
+ }
117
+ )
118
+ ), u.getAllByRole("textbox").forEach((h, f) => {
119
+ d.change(h, { target: { value: String(f + 1) } });
120
+ }), expect(t).toHaveBeenCalled();
121
+ });
122
+ });
123
+ //# sourceMappingURL=index.test.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.es.js","sources":["../../../src/components/TwoFaInputController/index.test.tsx"],"sourcesContent":["import { fireEvent, render, renderHook, screen } from \"@testing-library/react\";\nimport { FieldErrors, useForm } from \"react-hook-form\";\n\nimport TwoFaInputController from \".\";\n\ndescribe(\"TwoFaInputController\", () => {\n it(\"renders six input fields with the correct attributes\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={() => {}}\n />,\n );\n\n const inputs = screen.getAllByRole(\"textbox\");\n expect(inputs).toHaveLength(6);\n inputs.forEach((input) => {\n expect(input).toHaveAttribute(\"type\", \"text\");\n expect(input).toHaveAttribute(\"inputmode\", \"numeric\");\n expect(input).toHaveAttribute(\"maxlength\", \"1\");\n expect(input).toHaveAttribute(\"autocomplete\", \"off\");\n expect(input).toHaveStyle(\"text-align: center\");\n expect(input).toHaveStyle(\"width: 2ch\");\n expect(input).toHaveStyle(\"height: 3ch\");\n expect(input).toHaveStyle(\"font-size: 1.5rem\");\n });\n });\n\n it(\"focuses the next input field when a digit is entered\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={() => {}}\n />,\n );\n\n const inputs = screen.getAllByRole(\"textbox\");\n fireEvent.change(inputs[0], { target: { value: \"1\" } });\n expect(inputs[1]).toHaveFocus();\n });\n\n it(\"moves focus to the previous input field on backspace\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={() => {}}\n />,\n );\n\n const inputs = screen.getAllByRole(\"textbox\");\n fireEvent.keyDown(inputs[1], { key: \"Backspace\" });\n expect(inputs[0]).toHaveFocus();\n });\n\n it(\"moves focus to the previous input field on ArrowLeft\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={() => {}}\n />,\n );\n\n const inputs = screen.getAllByRole(\"textbox\");\n fireEvent.keyDown(inputs[1], { key: \"ArrowLeft\" });\n expect(inputs[0]).toHaveFocus();\n });\n\n it(\"moves focus to the next input field on ArrowRight\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={() => {}}\n />,\n );\n\n const inputs = screen.getAllByRole(\"textbox\");\n fireEvent.keyDown(inputs[0], { key: \"ArrowRight\" });\n expect(inputs[1]).toHaveFocus();\n });\n\n it(\"displays validate error message when there are errors\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n const errors: FieldErrors<{ code: string[] }> = {\n code: [{ type: \"required\", message: \"必須\" }],\n };\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={() => {}}\n errors={errors}\n errorMessage=\"必須\"\n />,\n );\n\n expect(screen.getByText(\"必須\")).toBeInTheDocument();\n });\n\n it(\"calls onSubmit with the correct code when all inputs are filled\", () => {\n const controlResult = renderHook(() => {\n const methods = useForm();\n return methods.control;\n });\n const control = controlResult.result.current;\n const name = \"code\";\n const defaultValue = Array(6).fill(\"\");\n const handleSubmit = jest.fn();\n\n render(\n <TwoFaInputController\n control={control}\n name={name}\n defaultValue={defaultValue}\n onSubmit={handleSubmit}\n />,\n );\n\n const inputs = screen.getAllByRole(\"textbox\");\n inputs.forEach((input, index) => {\n fireEvent.change(input, { target: { value: String(index + 1) } });\n });\n\n expect(handleSubmit).toHaveBeenCalled();\n });\n});\n"],"names":["control","renderHook","useForm","name","defaultValue","render","jsx","TwoFaInputController","inputs","screen","input","fireEvent","handleSubmit","index"],"mappings":";;;;AAKA,SAAS,wBAAwB,MAAM;AACrC,KAAG,wDAAwD,MAAM;AAK/D,UAAMA,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE;AAErC,IAAAC;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAU,MAAM;AAAA,UAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACnB;AAGF,UAAMI,IAASC,EAAO,aAAa,SAAS;AAC5C,WAAOD,CAAM,EAAE,aAAa,CAAC,GAC7BA,EAAO,QAAQ,CAACE,MAAU;AACxB,aAAOA,CAAK,EAAE,gBAAgB,QAAQ,MAAM,GAC5C,OAAOA,CAAK,EAAE,gBAAgB,aAAa,SAAS,GACpD,OAAOA,CAAK,EAAE,gBAAgB,aAAa,GAAG,GAC9C,OAAOA,CAAK,EAAE,gBAAgB,gBAAgB,KAAK,GACnD,OAAOA,CAAK,EAAE,YAAY,oBAAoB,GAC9C,OAAOA,CAAK,EAAE,YAAY,YAAY,GACtC,OAAOA,CAAK,EAAE,YAAY,aAAa,GACvC,OAAOA,CAAK,EAAE,YAAY,mBAAmB;AAAA,IAC/C,CAAC;AAAA,EACH,CAAC,GAED,GAAG,wDAAwD,MAAM;AAK/D,UAAMV,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE;AAErC,IAAAC;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAU,MAAM;AAAA,UAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACnB;AAGF,UAAMI,IAASC,EAAO,aAAa,SAAS;AAC5C,IAAAE,EAAU,OAAOH,EAAO,CAAC,GAAG,EAAE,QAAQ,EAAE,OAAO,IAAA,GAAO,GACtD,OAAOA,EAAO,CAAC,CAAC,EAAE,YAAA;AAAA,EACpB,CAAC,GAED,GAAG,wDAAwD,MAAM;AAK/D,UAAMR,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE;AAErC,IAAAC;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAU,MAAM;AAAA,UAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACnB;AAGF,UAAMI,IAASC,EAAO,aAAa,SAAS;AAC5C,IAAAE,EAAU,QAAQH,EAAO,CAAC,GAAG,EAAE,KAAK,aAAa,GACjD,OAAOA,EAAO,CAAC,CAAC,EAAE,YAAA;AAAA,EACpB,CAAC,GAED,GAAG,wDAAwD,MAAM;AAK/D,UAAMR,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE;AAErC,IAAAC;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAU,MAAM;AAAA,UAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACnB;AAGF,UAAMI,IAASC,EAAO,aAAa,SAAS;AAC5C,IAAAE,EAAU,QAAQH,EAAO,CAAC,GAAG,EAAE,KAAK,aAAa,GACjD,OAAOA,EAAO,CAAC,CAAC,EAAE,YAAA;AAAA,EACpB,CAAC,GAED,GAAG,qDAAqD,MAAM;AAK5D,UAAMR,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE;AAErC,IAAAC;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAU,MAAM;AAAA,UAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACnB;AAGF,UAAMI,IAASC,EAAO,aAAa,SAAS;AAC5C,IAAAE,EAAU,QAAQH,EAAO,CAAC,GAAG,EAAE,KAAK,cAAc,GAClD,OAAOA,EAAO,CAAC,CAAC,EAAE,YAAA;AAAA,EACpB,CAAC,GAED,GAAG,yDAAyD,MAAM;AAKhE,UAAMR,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE;AAKrC,IAAAC;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAU,MAAM;AAAA,UAAC;AAAA,UACjB,QAV4C;AAAA,YAC9C,MAAM,CAAC,EAAE,MAAM,YAAY,SAAS,MAAM;AAAA,UAAA;AAAA,UAUxC,cAAa;AAAA,QAAA;AAAA,MAAA;AAAA,IACf,GAGF,OAAOK,EAAO,UAAU,IAAI,CAAC,EAAE,kBAAA;AAAA,EACjC,CAAC,GAED,GAAG,mEAAmE,MAAM;AAK1E,UAAMT,IAJgBC,EAAW,MACfC,EAAA,EACD,OAChB,EAC6B,OAAO,SAC/BC,IAAO,QACPC,IAAe,MAAM,CAAC,EAAE,KAAK,EAAE,GAC/BQ,IAAe,KAAK,GAAA;AAE1B,IAAAP;AAAA,MACE,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,SAAAP;AAAA,UACA,MAAAG;AAAA,UACA,cAAAC;AAAA,UACA,UAAUQ;AAAA,QAAA;AAAA,MAAA;AAAA,IACZ,GAGaH,EAAO,aAAa,SAAS,EACrC,QAAQ,CAACC,GAAOG,MAAU;AAC/B,MAAAF,EAAU,OAAOD,GAAO,EAAE,QAAQ,EAAE,OAAO,OAAOG,IAAQ,CAAC,EAAA,GAAK;AAAA,IAClE,CAAC,GAED,OAAOD,CAAY,EAAE,iBAAA;AAAA,EACvB,CAAC;AACH,CAAC;"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),a=require("@mui/icons-material"),t=require("@mui/material"),o={NOT_SELECTED:"not_selected",ENABLED:"enabled",DISABLED:"disabled"},s=r=>{const{twoFaStatus:i,labelEnabled:l="有効",labelDisabled:n="無効"}=r,d=i===o.ENABLED;return e.jsx(t.Box,{sx:{display:"flex",flexDirection:"row",gap:"6px",alignItems:"center"},children:d?e.jsxs(e.Fragment,{children:[e.jsx(a.VerifiedUser,{"data-testid":"two-fa-icon",sx:{fontSize:"1rem",color:"#6672e8"}}),e.jsx(t.Typography,{"data-testid":"two-fa-text",sx:{fontSize:"0.8rem",color:"#6672e8"},children:l})]}):e.jsxs(e.Fragment,{children:[e.jsx(a.Shield,{"data-testid":"two-fa-icon",sx:{fontSize:"1rem",color:"grey"}}),e.jsx(t.Typography,{"data-testid":"two-fa-text",sx:{fontSize:"0.8rem",color:"grey"},children:n})]})})};exports.TwoFaLabel=s;exports.TwoFaStatus=o;exports.default=s;
2
+ //# sourceMappingURL=index.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs.js","sources":["../../../src/components/TwoFaLabel/index.tsx"],"sourcesContent":["import { Shield, VerifiedUser } from \"@mui/icons-material\";\nimport { Box, Typography } from \"@mui/material\";\n\nexport const TwoFaStatus = {\n NOT_SELECTED: \"not_selected\",\n ENABLED: \"enabled\",\n DISABLED: \"disabled\",\n} as const;\n\nexport type CommonTwoFaStatus = (typeof TwoFaStatus)[keyof typeof TwoFaStatus];\n\nexport type TwoFaLabelProps = {\n /**\n * 2要素認証のステータスを設定します。\n * - `enabled`: 有効\n * - `disabled`: 無効\n * - `not_selected`: 未設定(無効として表示)\n */\n twoFaStatus?: CommonTwoFaStatus;\n /**\n * \"有効\" の場合に表示するテキスト (デフォルト: \"有効\")\n */\n labelEnabled?: string;\n /**\n * \"無効\" の場合に表示するテキスト (デフォルト: \"無効\")\n */\n labelDisabled?: string;\n};\n\n/**\n * 2要素認証済みか否かを表示するラベルコンポーネントです。\n */\nexport const TwoFaLabel = (props: TwoFaLabelProps) => {\n const { twoFaStatus, labelEnabled = \"有効\", labelDisabled = \"無効\" } = props;\n\n const isEnabled = twoFaStatus === TwoFaStatus.ENABLED;\n\n return (\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"6px\",\n alignItems: \"center\",\n }}\n >\n {isEnabled ? (\n <>\n <VerifiedUser\n data-testid=\"two-fa-icon\"\n sx={{ fontSize: \"1rem\", color: \"#6672e8\" }}\n />\n <Typography\n data-testid=\"two-fa-text\"\n sx={{ fontSize: \"0.8rem\", color: \"#6672e8\" }}\n >\n {labelEnabled}\n </Typography>\n </>\n ) : (\n <>\n <Shield\n data-testid=\"two-fa-icon\"\n sx={{ fontSize: \"1rem\", color: \"grey\" }}\n />\n <Typography\n data-testid=\"two-fa-text\"\n sx={{ fontSize: \"0.8rem\", color: \"grey\" }}\n >\n {labelDisabled}\n </Typography>\n </>\n )}\n </Box>\n );\n};\n\nexport default TwoFaLabel;\n"],"names":["TwoFaStatus","TwoFaLabel","props","twoFaStatus","labelEnabled","labelDisabled","isEnabled","jsx","Box","jsxs","Fragment","VerifiedUser","Typography","Shield"],"mappings":"6MAGaA,EAAc,CACzB,aAAc,eACd,QAAS,UACT,SAAU,UACZ,EAyBaC,EAAcC,GAA2B,CACpD,KAAM,CAAE,YAAAC,EAAa,aAAAC,EAAe,KAAM,cAAAC,EAAgB,MAASH,EAE7DI,EAAYH,IAAgBH,EAAY,QAE9C,OACEO,EAAAA,IAACC,EAAAA,IAAA,CACC,GAAI,CACF,QAAS,OACT,cAAe,MACf,IAAK,MACL,WAAY,QAAA,EAGb,WACCC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAH,EAAAA,IAACI,EAAAA,aAAA,CACC,cAAY,cACZ,GAAI,CAAE,SAAU,OAAQ,MAAO,SAAA,CAAU,CAAA,EAE3CJ,EAAAA,IAACK,EAAAA,WAAA,CACC,cAAY,cACZ,GAAI,CAAE,SAAU,SAAU,MAAO,SAAA,EAEhC,SAAAR,CAAA,CAAA,CACH,CAAA,CACF,EAEAK,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAH,EAAAA,IAACM,EAAAA,OAAA,CACC,cAAY,cACZ,GAAI,CAAE,SAAU,OAAQ,MAAO,MAAA,CAAO,CAAA,EAExCN,EAAAA,IAACK,EAAAA,WAAA,CACC,cAAY,cACZ,GAAI,CAAE,SAAU,SAAU,MAAO,MAAA,EAEhC,SAAAP,CAAA,CAAA,CACH,CAAA,CACF,CAAA,CAAA,CAIR"}
@@ -0,0 +1,28 @@
1
+ export declare const TwoFaStatus: {
2
+ readonly NOT_SELECTED: "not_selected";
3
+ readonly ENABLED: "enabled";
4
+ readonly DISABLED: "disabled";
5
+ };
6
+ export type CommonTwoFaStatus = (typeof TwoFaStatus)[keyof typeof TwoFaStatus];
7
+ export type TwoFaLabelProps = {
8
+ /**
9
+ * 2要素認証のステータスを設定します。
10
+ * - `enabled`: 有効
11
+ * - `disabled`: 無効
12
+ * - `not_selected`: 未設定(無効として表示)
13
+ */
14
+ twoFaStatus?: CommonTwoFaStatus;
15
+ /**
16
+ * "有効" の場合に表示するテキスト (デフォルト: "有効")
17
+ */
18
+ labelEnabled?: string;
19
+ /**
20
+ * "無効" の場合に表示するテキスト (デフォルト: "無効")
21
+ */
22
+ labelDisabled?: string;
23
+ };
24
+ /**
25
+ * 2要素認証済みか否かを表示するラベルコンポーネントです。
26
+ */
27
+ export declare const TwoFaLabel: (props: TwoFaLabelProps) => import("react/jsx-runtime").JSX.Element;
28
+ export default TwoFaLabel;
@@ -0,0 +1,60 @@
1
+ import { jsx as e, jsxs as t, Fragment as o } from "react/jsx-runtime";
2
+ import { VerifiedUser as n, Shield as c } from "@mui/icons-material";
3
+ import { Box as f, Typography as a } from "@mui/material";
4
+ const x = {
5
+ NOT_SELECTED: "not_selected",
6
+ ENABLED: "enabled",
7
+ DISABLED: "disabled"
8
+ }, S = (r) => {
9
+ const { twoFaStatus: i, labelEnabled: l = "有効", labelDisabled: s = "無効" } = r, d = i === x.ENABLED;
10
+ return /* @__PURE__ */ e(
11
+ f,
12
+ {
13
+ sx: {
14
+ display: "flex",
15
+ flexDirection: "row",
16
+ gap: "6px",
17
+ alignItems: "center"
18
+ },
19
+ children: d ? /* @__PURE__ */ t(o, { children: [
20
+ /* @__PURE__ */ e(
21
+ n,
22
+ {
23
+ "data-testid": "two-fa-icon",
24
+ sx: { fontSize: "1rem", color: "#6672e8" }
25
+ }
26
+ ),
27
+ /* @__PURE__ */ e(
28
+ a,
29
+ {
30
+ "data-testid": "two-fa-text",
31
+ sx: { fontSize: "0.8rem", color: "#6672e8" },
32
+ children: l
33
+ }
34
+ )
35
+ ] }) : /* @__PURE__ */ t(o, { children: [
36
+ /* @__PURE__ */ e(
37
+ c,
38
+ {
39
+ "data-testid": "two-fa-icon",
40
+ sx: { fontSize: "1rem", color: "grey" }
41
+ }
42
+ ),
43
+ /* @__PURE__ */ e(
44
+ a,
45
+ {
46
+ "data-testid": "two-fa-text",
47
+ sx: { fontSize: "0.8rem", color: "grey" },
48
+ children: s
49
+ }
50
+ )
51
+ ] })
52
+ }
53
+ );
54
+ };
55
+ export {
56
+ S as TwoFaLabel,
57
+ x as TwoFaStatus,
58
+ S as default
59
+ };
60
+ //# sourceMappingURL=index.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.es.js","sources":["../../../src/components/TwoFaLabel/index.tsx"],"sourcesContent":["import { Shield, VerifiedUser } from \"@mui/icons-material\";\nimport { Box, Typography } from \"@mui/material\";\n\nexport const TwoFaStatus = {\n NOT_SELECTED: \"not_selected\",\n ENABLED: \"enabled\",\n DISABLED: \"disabled\",\n} as const;\n\nexport type CommonTwoFaStatus = (typeof TwoFaStatus)[keyof typeof TwoFaStatus];\n\nexport type TwoFaLabelProps = {\n /**\n * 2要素認証のステータスを設定します。\n * - `enabled`: 有効\n * - `disabled`: 無効\n * - `not_selected`: 未設定(無効として表示)\n */\n twoFaStatus?: CommonTwoFaStatus;\n /**\n * \"有効\" の場合に表示するテキスト (デフォルト: \"有効\")\n */\n labelEnabled?: string;\n /**\n * \"無効\" の場合に表示するテキスト (デフォルト: \"無効\")\n */\n labelDisabled?: string;\n};\n\n/**\n * 2要素認証済みか否かを表示するラベルコンポーネントです。\n */\nexport const TwoFaLabel = (props: TwoFaLabelProps) => {\n const { twoFaStatus, labelEnabled = \"有効\", labelDisabled = \"無効\" } = props;\n\n const isEnabled = twoFaStatus === TwoFaStatus.ENABLED;\n\n return (\n <Box\n sx={{\n display: \"flex\",\n flexDirection: \"row\",\n gap: \"6px\",\n alignItems: \"center\",\n }}\n >\n {isEnabled ? (\n <>\n <VerifiedUser\n data-testid=\"two-fa-icon\"\n sx={{ fontSize: \"1rem\", color: \"#6672e8\" }}\n />\n <Typography\n data-testid=\"two-fa-text\"\n sx={{ fontSize: \"0.8rem\", color: \"#6672e8\" }}\n >\n {labelEnabled}\n </Typography>\n </>\n ) : (\n <>\n <Shield\n data-testid=\"two-fa-icon\"\n sx={{ fontSize: \"1rem\", color: \"grey\" }}\n />\n <Typography\n data-testid=\"two-fa-text\"\n sx={{ fontSize: \"0.8rem\", color: \"grey\" }}\n >\n {labelDisabled}\n </Typography>\n </>\n )}\n </Box>\n );\n};\n\nexport default TwoFaLabel;\n"],"names":["TwoFaStatus","TwoFaLabel","props","twoFaStatus","labelEnabled","labelDisabled","isEnabled","jsx","Box","jsxs","Fragment","VerifiedUser","Typography","Shield"],"mappings":";;;AAGO,MAAMA,IAAc;AAAA,EACzB,cAAc;AAAA,EACd,SAAS;AAAA,EACT,UAAU;AACZ,GAyBaC,IAAa,CAACC,MAA2B;AACpD,QAAM,EAAE,aAAAC,GAAa,cAAAC,IAAe,MAAM,eAAAC,IAAgB,SAASH,GAE7DI,IAAYH,MAAgBH,EAAY;AAE9C,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,IAAI;AAAA,QACF,SAAS;AAAA,QACT,eAAe;AAAA,QACf,KAAK;AAAA,QACL,YAAY;AAAA,MAAA;AAAA,MAGb,cACC,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,IAAI,EAAE,UAAU,QAAQ,OAAO,UAAA;AAAA,UAAU;AAAA,QAAA;AAAA,QAE3C,gBAAAJ;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,IAAI,EAAE,UAAU,UAAU,OAAO,UAAA;AAAA,YAEhC,UAAAR;AAAA,UAAA;AAAA,QAAA;AAAA,MACH,EAAA,CACF,IAEA,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,IAAI,EAAE,UAAU,QAAQ,OAAO,OAAA;AAAA,UAAO;AAAA,QAAA;AAAA,QAExC,gBAAAN;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,eAAY;AAAA,YACZ,IAAI,EAAE,UAAU,UAAU,OAAO,OAAA;AAAA,YAEhC,UAAAP;AAAA,UAAA;AAAA,QAAA;AAAA,MACH,EAAA,CACF;AAAA,IAAA;AAAA,EAAA;AAIR;"}
@@ -0,0 +1,2 @@
1
+ "use strict";const a=require("react/jsx-runtime"),e=require("../../react.esm-DGuy6Rn3.cjs"),t=require("./index.cjs.js");describe("TwoFaLabel",()=>{it("renders '有効' when twoFaStatus is enabled",()=>{e.render(a.jsx(t.TwoFaLabel,{twoFaStatus:t.TwoFaStatus.ENABLED})),expect(e.screen.getByTestId("two-fa-text")).toHaveTextContent("有効"),expect(e.screen.getByTestId("two-fa-icon")).toBeInTheDocument()}),it("renders '無効' when twoFaStatus is disabled",()=>{e.render(a.jsx(t.TwoFaLabel,{twoFaStatus:t.TwoFaStatus.DISABLED})),expect(e.screen.getByTestId("two-fa-text")).toHaveTextContent("無効"),expect(e.screen.getByTestId("two-fa-icon")).toBeInTheDocument()}),it("renders '無効' when twoFaStatus is not_selected",()=>{e.render(a.jsx(t.TwoFaLabel,{twoFaStatus:t.TwoFaStatus.NOT_SELECTED})),expect(e.screen.getByTestId("two-fa-text")).toHaveTextContent("無効"),expect(e.screen.getByTestId("two-fa-icon")).toBeInTheDocument()}),it("renders '無効' when twoFaStatus is undefined",()=>{e.render(a.jsx(t.TwoFaLabel,{})),expect(e.screen.getByTestId("two-fa-text")).toHaveTextContent("無効"),expect(e.screen.getByTestId("two-fa-icon")).toBeInTheDocument()}),it("renders custom labels for enabled and disabled states",()=>{e.render(a.jsx(t.TwoFaLabel,{twoFaStatus:t.TwoFaStatus.ENABLED,labelEnabled:"Enabled"})),expect(e.screen.getByTestId("two-fa-text")).toHaveTextContent("Enabled")})});
2
+ //# sourceMappingURL=index.test.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.cjs.js","sources":["../../../src/components/TwoFaLabel/index.test.tsx"],"sourcesContent":["import { render, screen } from \"@testing-library/react\";\n\nimport TwoFaLabel, { TwoFaStatus } from \".\";\n\ndescribe(\"TwoFaLabel\", () => {\n it(\"renders '有効' when twoFaStatus is enabled\", () => {\n render(<TwoFaLabel twoFaStatus={TwoFaStatus.ENABLED} />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"有効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders '無効' when twoFaStatus is disabled\", () => {\n render(<TwoFaLabel twoFaStatus={TwoFaStatus.DISABLED} />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"無効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders '無効' when twoFaStatus is not_selected\", () => {\n render(<TwoFaLabel twoFaStatus={TwoFaStatus.NOT_SELECTED} />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"無効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders '無効' when twoFaStatus is undefined\", () => {\n render(<TwoFaLabel />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"無効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders custom labels for enabled and disabled states\", () => {\n render(\n <TwoFaLabel twoFaStatus={TwoFaStatus.ENABLED} labelEnabled=\"Enabled\" />,\n );\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"Enabled\");\n });\n});\n"],"names":["render","jsx","TwoFaLabel","TwoFaStatus","screen"],"mappings":"wHAIA,SAAS,aAAc,IAAM,CAC3B,GAAG,2CAA4C,IAAM,CACnDA,EAAAA,OAAOC,EAAAA,IAACC,aAAA,CAAW,YAAaC,EAAAA,YAAY,QAAS,CAAE,EAEvD,OAAOC,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,EAChE,OAAOA,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAA,CAC5C,CAAC,EAED,GAAG,4CAA6C,IAAM,CACpDJ,EAAAA,OAAOC,EAAAA,IAACC,aAAA,CAAW,YAAaC,EAAAA,YAAY,SAAU,CAAE,EAExD,OAAOC,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,EAChE,OAAOA,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAA,CAC5C,CAAC,EAED,GAAG,gDAAiD,IAAM,CACxDJ,EAAAA,OAAOC,EAAAA,IAACC,aAAA,CAAW,YAAaC,EAAAA,YAAY,aAAc,CAAE,EAE5D,OAAOC,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,EAChE,OAAOA,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAA,CAC5C,CAAC,EAED,GAAG,6CAA8C,IAAM,CACrDJ,EAAAA,OAAOC,EAAAA,IAACC,eAAW,CAAE,EAErB,OAAOE,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,EAChE,OAAOA,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAA,CAC5C,CAAC,EAED,GAAG,wDAAyD,IAAM,CAChEJ,EAAAA,aACGE,EAAAA,WAAA,CAAW,YAAaC,EAAAA,YAAY,QAAS,aAAa,SAAA,CAAU,CAAA,EAEvE,OAAOC,EAAAA,OAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,SAAS,CACvE,CAAC,CACH,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,19 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { r as o, s as t } from "../../react.esm-BBESb8eI.js";
3
+ import { TwoFaLabel as a, TwoFaStatus as n } from "./index.es.js";
4
+ describe("TwoFaLabel", () => {
5
+ it("renders '有効' when twoFaStatus is enabled", () => {
6
+ o(/* @__PURE__ */ e(a, { twoFaStatus: n.ENABLED })), expect(t.getByTestId("two-fa-text")).toHaveTextContent("有効"), expect(t.getByTestId("two-fa-icon")).toBeInTheDocument();
7
+ }), it("renders '無効' when twoFaStatus is disabled", () => {
8
+ o(/* @__PURE__ */ e(a, { twoFaStatus: n.DISABLED })), expect(t.getByTestId("two-fa-text")).toHaveTextContent("無効"), expect(t.getByTestId("two-fa-icon")).toBeInTheDocument();
9
+ }), it("renders '無効' when twoFaStatus is not_selected", () => {
10
+ o(/* @__PURE__ */ e(a, { twoFaStatus: n.NOT_SELECTED })), expect(t.getByTestId("two-fa-text")).toHaveTextContent("無効"), expect(t.getByTestId("two-fa-icon")).toBeInTheDocument();
11
+ }), it("renders '無効' when twoFaStatus is undefined", () => {
12
+ o(/* @__PURE__ */ e(a, {})), expect(t.getByTestId("two-fa-text")).toHaveTextContent("無効"), expect(t.getByTestId("two-fa-icon")).toBeInTheDocument();
13
+ }), it("renders custom labels for enabled and disabled states", () => {
14
+ o(
15
+ /* @__PURE__ */ e(a, { twoFaStatus: n.ENABLED, labelEnabled: "Enabled" })
16
+ ), expect(t.getByTestId("two-fa-text")).toHaveTextContent("Enabled");
17
+ });
18
+ });
19
+ //# sourceMappingURL=index.test.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.es.js","sources":["../../../src/components/TwoFaLabel/index.test.tsx"],"sourcesContent":["import { render, screen } from \"@testing-library/react\";\n\nimport TwoFaLabel, { TwoFaStatus } from \".\";\n\ndescribe(\"TwoFaLabel\", () => {\n it(\"renders '有効' when twoFaStatus is enabled\", () => {\n render(<TwoFaLabel twoFaStatus={TwoFaStatus.ENABLED} />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"有効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders '無効' when twoFaStatus is disabled\", () => {\n render(<TwoFaLabel twoFaStatus={TwoFaStatus.DISABLED} />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"無効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders '無効' when twoFaStatus is not_selected\", () => {\n render(<TwoFaLabel twoFaStatus={TwoFaStatus.NOT_SELECTED} />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"無効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders '無効' when twoFaStatus is undefined\", () => {\n render(<TwoFaLabel />);\n\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"無効\");\n expect(screen.getByTestId(\"two-fa-icon\")).toBeInTheDocument();\n });\n\n it(\"renders custom labels for enabled and disabled states\", () => {\n render(\n <TwoFaLabel twoFaStatus={TwoFaStatus.ENABLED} labelEnabled=\"Enabled\" />,\n );\n expect(screen.getByTestId(\"two-fa-text\")).toHaveTextContent(\"Enabled\");\n });\n});\n"],"names":["render","jsx","TwoFaLabel","TwoFaStatus","screen"],"mappings":";;;AAIA,SAAS,cAAc,MAAM;AAC3B,KAAG,4CAA4C,MAAM;AACnD,IAAAA,EAAO,gBAAAC,EAACC,GAAA,EAAW,aAAaC,EAAY,SAAS,CAAE,GAEvD,OAAOC,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,GAChE,OAAOA,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAA;AAAA,EAC5C,CAAC,GAED,GAAG,6CAA6C,MAAM;AACpD,IAAAJ,EAAO,gBAAAC,EAACC,GAAA,EAAW,aAAaC,EAAY,UAAU,CAAE,GAExD,OAAOC,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,GAChE,OAAOA,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAA;AAAA,EAC5C,CAAC,GAED,GAAG,iDAAiD,MAAM;AACxD,IAAAJ,EAAO,gBAAAC,EAACC,GAAA,EAAW,aAAaC,EAAY,cAAc,CAAE,GAE5D,OAAOC,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,GAChE,OAAOA,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAA;AAAA,EAC5C,CAAC,GAED,GAAG,8CAA8C,MAAM;AACrD,IAAAJ,EAAO,gBAAAC,EAACC,KAAW,CAAE,GAErB,OAAOE,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,IAAI,GAChE,OAAOA,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAA;AAAA,EAC5C,CAAC,GAED,GAAG,yDAAyD,MAAM;AAChE,IAAAJ;AAAA,wBACGE,GAAA,EAAW,aAAaC,EAAY,SAAS,cAAa,UAAA,CAAU;AAAA,IAAA,GAEvE,OAAOC,EAAO,YAAY,aAAa,CAAC,EAAE,kBAAkB,SAAS;AAAA,EACvE,CAAC;AACH,CAAC;"}
@@ -1,2 +1,2 @@
1
- "use strict";const e=require("react/jsx-runtime"),i=require("../../react.esm-BcRJ42eI.cjs");require("../../index-9p9q0wxE.cjs");const c=require("./index.cjs.js");describe("VStack Component",()=>{it("renders its children",()=>{const{getByText:t}=i.render(e.jsxs(c.VStack,{children:[e.jsx("div",{children:"Child 1"}),e.jsx("div",{children:"Child 2"})]}));expect(t("Child 1")).toBeInTheDocument(),expect(t("Child 2")).toBeInTheDocument()}),it("applies default gap spacing",()=>{const{container:t}=i.render(e.jsx(c.VStack,{children:e.jsx("div",{children:"Child"})}));expect(t.firstChild).toHaveStyle("gap: 24px")}),it("applies custom gap spacing",()=>{const{container:n}=i.render(e.jsx(c.VStack,{spacing:10,children:e.jsx("div",{children:"Child"})}));expect(n.firstChild).toHaveStyle("gap: 10px")})});
1
+ "use strict";const e=require("react/jsx-runtime"),i=require("../../react.esm-DGuy6Rn3.cjs");require("../../index-9p9q0wxE.cjs");const c=require("./index.cjs.js");describe("VStack Component",()=>{it("renders its children",()=>{const{getByText:t}=i.render(e.jsxs(c.VStack,{children:[e.jsx("div",{children:"Child 1"}),e.jsx("div",{children:"Child 2"})]}));expect(t("Child 1")).toBeInTheDocument(),expect(t("Child 2")).toBeInTheDocument()}),it("applies default gap spacing",()=>{const{container:t}=i.render(e.jsx(c.VStack,{children:e.jsx("div",{children:"Child"})}));expect(t.firstChild).toHaveStyle("gap: 24px")}),it("applies custom gap spacing",()=>{const{container:n}=i.render(e.jsx(c.VStack,{spacing:10,children:e.jsx("div",{children:"Child"})}));expect(n.firstChild).toHaveStyle("gap: 10px")})});
2
2
  //# sourceMappingURL=index.test.cjs.js.map
@@ -1,5 +1,5 @@
1
1
  import { jsxs as o, jsx as i } from "react/jsx-runtime";
2
- import { r as t } from "../../react.esm-DVhZgPrH.js";
2
+ import { r as t } from "../../react.esm-BBESb8eI.js";
3
3
  import "../../index-Cj9ZvtM1.js";
4
4
  import { VStack as c } from "./index.es.js";
5
5
  describe("VStack Component", () => {
@@ -1,2 +1,2 @@
1
- "use strict";require('./assets/index28.css');const s=require("react/jsx-runtime"),t=require("classnames"),l="_inputContainer_18h3l_1",c="_radioGroup_18h3l_8",u="_radio_18h3l_8",d="_input_18h3l_1",_="_error_18h3l_36",p="_errorMessage_18h3l_40",r={inputContainer:l,radioGroup:c,radio:u,input:d,error:_,errorMessage:p},h=a=>{const{values:i,register:n,errorMessage:o}=a;return s.jsxs("div",{className:r.inputContainer,children:[s.jsx("div",{className:r.radioGroup,children:i.map(e=>s.jsxs("div",{className:r.radio,children:[s.jsx("input",{type:"radio",value:e.value,id:e.value,className:t(r.input,{[r.error]:o}),...n}),s.jsx("label",{htmlFor:e.value,children:e.label})]},e.value))}),o&&s.jsx("small",{className:r.errorMessage,children:o})]})};exports.RadioButton=h;exports.styles=r;
2
- //# sourceMappingURL=index-B663CLQ0.cjs.map
1
+ "use strict";require('./assets/index25.css');const s=require("react/jsx-runtime"),t=require("classnames"),l="_inputContainer_18h3l_1",c="_radioGroup_18h3l_8",u="_radio_18h3l_8",d="_input_18h3l_1",_="_error_18h3l_36",p="_errorMessage_18h3l_40",r={inputContainer:l,radioGroup:c,radio:u,input:d,error:_,errorMessage:p},h=a=>{const{values:i,register:n,errorMessage:o}=a;return s.jsxs("div",{className:r.inputContainer,children:[s.jsx("div",{className:r.radioGroup,children:i.map(e=>s.jsxs("div",{className:r.radio,children:[s.jsx("input",{type:"radio",value:e.value,id:e.value,className:t(r.input,{[r.error]:o}),...n}),s.jsx("label",{htmlFor:e.value,children:e.label})]},e.value))}),o&&s.jsx("small",{className:r.errorMessage,children:o})]})};exports.RadioButton=h;exports.styles=r;
2
+ //# sourceMappingURL=index-BM3CSrls.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-B663CLQ0.cjs","sources":["../src/components/RadioButton/index.tsx"],"sourcesContent":["import classnames from \"classnames\";\nimport type { UseFormRegisterReturn } from \"react-hook-form\";\n\nimport styles from \"./index.module.scss\";\n\ntype Value = {\n label: string;\n value: string;\n};\ntype Props = {\n values: Value[];\n register?: UseFormRegisterReturn;\n errorMessage?: string;\n};\n\nexport const RadioButton = (props: Props) => {\n const { values, register, errorMessage } = props;\n\n return (\n <div className={styles.inputContainer}>\n <div className={styles.radioGroup}>\n {values.map((value) => (\n <div className={styles.radio} key={value.value}>\n <input\n type=\"radio\"\n value={value.value}\n id={value.value}\n className={classnames(styles.input, {\n [styles.error]: errorMessage,\n })}\n {...register}\n />\n <label htmlFor={value.value}>{value.label}</label>\n </div>\n ))}\n </div>\n {errorMessage && (\n <small className={styles.errorMessage}>{errorMessage}</small>\n )}\n </div>\n );\n};\n\nexport default RadioButton;\n"],"names":["RadioButton","props","values","register","errorMessage","jsxs","styles","jsx","value","classnames"],"mappings":"4RAeaA,EAAeC,GAAiB,CAC3C,KAAM,CAAE,OAAAC,EAAQ,SAAAC,EAAU,aAAAC,CAAA,EAAiBH,EAE3C,OACEI,EAAAA,KAAC,MAAA,CAAI,UAAWC,EAAO,eACrB,SAAA,CAAAC,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAO,WACpB,SAAAJ,EAAO,IAAKM,GACXH,EAAAA,KAAC,MAAA,CAAI,UAAWC,EAAO,MACrB,SAAA,CAAAC,EAAAA,IAAC,QAAA,CACC,KAAK,QACL,MAAOC,EAAM,MACb,GAAIA,EAAM,MACV,UAAWC,EAAWH,EAAO,MAAO,CAClC,CAACA,EAAO,KAAK,EAAGF,CAAA,CACjB,EACA,GAAGD,CAAA,CAAA,QAEL,QAAA,CAAM,QAASK,EAAM,MAAQ,WAAM,KAAA,CAAM,CAAA,CAAA,EAVTA,EAAM,KAWzC,CACD,EACH,EACCJ,GACCG,EAAAA,IAAC,QAAA,CAAM,UAAWD,EAAO,aAAe,SAAAF,CAAA,CAAa,CAAA,EAEzD,CAEJ"}
1
+ {"version":3,"file":"index-BM3CSrls.cjs","sources":["../src/components/RadioButton/index.tsx"],"sourcesContent":["import classnames from \"classnames\";\nimport type { UseFormRegisterReturn } from \"react-hook-form\";\n\nimport styles from \"./index.module.scss\";\n\ntype Value = {\n label: string;\n value: string;\n};\ntype Props = {\n values: Value[];\n register?: UseFormRegisterReturn;\n errorMessage?: string;\n};\n\nexport const RadioButton = (props: Props) => {\n const { values, register, errorMessage } = props;\n\n return (\n <div className={styles.inputContainer}>\n <div className={styles.radioGroup}>\n {values.map((value) => (\n <div className={styles.radio} key={value.value}>\n <input\n type=\"radio\"\n value={value.value}\n id={value.value}\n className={classnames(styles.input, {\n [styles.error]: errorMessage,\n })}\n {...register}\n />\n <label htmlFor={value.value}>{value.label}</label>\n </div>\n ))}\n </div>\n {errorMessage && (\n <small className={styles.errorMessage}>{errorMessage}</small>\n )}\n </div>\n );\n};\n\nexport default RadioButton;\n"],"names":["RadioButton","props","values","register","errorMessage","jsxs","styles","jsx","value","classnames"],"mappings":"4RAeaA,EAAeC,GAAiB,CAC3C,KAAM,CAAE,OAAAC,EAAQ,SAAAC,EAAU,aAAAC,CAAA,EAAiBH,EAE3C,OACEI,EAAAA,KAAC,MAAA,CAAI,UAAWC,EAAO,eACrB,SAAA,CAAAC,EAAAA,IAAC,MAAA,CAAI,UAAWD,EAAO,WACpB,SAAAJ,EAAO,IAAKM,GACXH,EAAAA,KAAC,MAAA,CAAI,UAAWC,EAAO,MACrB,SAAA,CAAAC,EAAAA,IAAC,QAAA,CACC,KAAK,QACL,MAAOC,EAAM,MACb,GAAIA,EAAM,MACV,UAAWC,EAAWH,EAAO,MAAO,CAClC,CAACA,EAAO,KAAK,EAAGF,CAAA,CACjB,EACA,GAAGD,CAAA,CAAA,QAEL,QAAA,CAAM,QAASK,EAAM,MAAQ,WAAM,KAAA,CAAM,CAAA,CAAA,EAVTA,EAAM,KAWzC,CACD,EACH,EACCJ,GACCG,EAAAA,IAAC,QAAA,CAAM,UAAWD,EAAO,aAAe,SAAAF,CAAA,CAAa,CAAA,EAEzD,CAEJ"}
@@ -1,7 +1,7 @@
1
- "use strict";const H=require("./react.esm-BcRJ42eI.cjs");function a(e,t,n){return e.namespaceURI&&e.namespaceURI!=="http://www.w3.org/1999/xhtml"||(t=Array.isArray(t)?t:[t],!t.includes(e.tagName.toLowerCase()))?!1:n?Object.entries(n).every(([i,r])=>e[i]===r):!0}function E(e){var t;if(qt(e)&&e.defaultView)return e.defaultView;if(!((t=e.ownerDocument)===null||t===void 0)&&t.defaultView)return e.ownerDocument.defaultView;throw new Error(`Could not determine window of node. Node was ${Yt(e)}`)}function qt(e){return e.nodeType===9}function Yt(e){return typeof e=="function"?`function ${e.name}`:e===null?"null":String(e)}function lt(e,t){return new Promise((n,i)=>{const r=new t;r.onerror=i,r.onabort=i,r.onload=()=>{n(String(r.result))},r.readAsText(e)})}function Ne(e,t){const n={...t,length:t.length,item:i=>n[i],[Symbol.iterator]:function*(){for(let r=0;r<n.length;r++)yield n[r]}};return n.constructor=e.FileList,e.FileList&&Object.setPrototypeOf(n,e.FileList.prototype),Object.freeze(n),n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class at{getAsFile(){return this.file}getAsString(t){typeof this.data=="string"&&t(this.data)}webkitGetAsEntry(){throw new Error("not implemented")}constructor(t,n){A(this,"kind",void 0),A(this,"type",void 0),A(this,"file",null),A(this,"data",void 0),typeof t=="string"?(this.kind="string",this.type=String(n),this.data=t):(this.kind="file",this.type=t.type,this.file=t)}}class Jt extends Array{add(...t){const n=new at(t[0],t[1]);return this.push(n),n}clear(){this.splice(0,this.length)}remove(t){this.splice(t,1)}}function pe(e,t){const[n,i]=e.split("/"),r=!i||i==="*";return o=>t?o.type===(r?n:e):r?o.type.startsWith(`${n}/`):o.type===n}function Qt(e){return new class{getData(n){var i;const r=(i=this.items.find(pe(n,!0)))!==null&&i!==void 0?i:this.items.find(pe(n,!1));let o="";return r==null||r.getAsString(s=>{o=s}),o}setData(n,i){const r=this.items.findIndex(pe(n,!0)),o=new at(i,n);r>=0?this.items.splice(r,1,o):this.items.push(o)}clearData(n){if(n){const i=this.items.findIndex(pe(n,!0));i>=0&&this.items.remove(i)}else this.items.clear()}get types(){const n=[];return this.files.length&&n.push("Files"),this.items.forEach(i=>n.push(i.type)),Object.freeze(n),n}setDragImage(){}constructor(){A(this,"dropEffect","none"),A(this,"effectAllowed","uninitialized"),A(this,"items",new Jt),A(this,"files",Ne(e,[]))}}}function Me(e,t=[]){const n=typeof e.DataTransfer>"u"?Qt(e):new e.DataTransfer;return Object.defineProperty(n,"files",{get:()=>Ne(e,t)}),n}async function Zt(e,t){return t.kind==="file"?t.getAsFile():new e.Blob([await new Promise(n=>t.getAsString(n))],{type:t.type})}function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pt(e,...t){const n=Object.fromEntries(t.map(i=>[typeof i=="string"?"text/plain":i.type,Promise.resolve(i)]));return typeof e.ClipboardItem<"u"?new e.ClipboardItem(n):new class{get types(){return Array.from(Object.keys(this.data))}async getType(r){const o=await this.data[r];if(!o)throw new Error(`${r} is not one of the available MIME types on this item.`);return o instanceof e.Blob?o:new e.Blob([o],{type:r})}constructor(r){ft(this,"data",void 0),this.data=r}}(n)}const W=Symbol("Manage ClipboardSub");function Re(e,t){return Object.assign(new class extends e.EventTarget{async read(){return Array.from(this.items)}async readText(){let i="";for(const r of this.items){const o=r.types.includes("text/plain")?"text/plain":r.types.find(s=>s.startsWith("text/"));o&&(i+=await r.getType(o).then(s=>lt(s,e.FileReader)))}return i}async write(i){this.items=i}async writeText(i){this.items=[pt(e,i)]}constructor(...i){super(...i),ft(this,"items",[])}},{[W]:t})}function Le(e){return!!(e!=null&&e[W])}function en(e){if(Le(e.navigator.clipboard))return e.navigator.clipboard[W];const t=Object.getOwnPropertyDescriptor(e.navigator,"clipboard");let n;const i={resetClipboardStub:()=>{n=Re(e,i)},detachClipboardStub:()=>{t?Object.defineProperty(e.navigator,"clipboard",t):Object.defineProperty(e.navigator,"clipboard",{value:void 0,configurable:!0})}};return n=Re(e,i),Object.defineProperty(e.navigator,"clipboard",{get:()=>n,configurable:!0}),n[W]}function tn(e){Le(e.navigator.clipboard)&&e.navigator.clipboard[W].resetClipboardStub()}function nn(e){Le(e.navigator.clipboard)&&e.navigator.clipboard[W].detachClipboardStub()}async function rn(e){const t=e.defaultView,n=t==null?void 0:t.navigator.clipboard,i=n&&await n.read();if(!i)throw new Error("The Clipboard API is unavailable.");const r=Me(t);for(const o of i)for(const s of o.types)r.setData(s,await o.getType(s).then(u=>lt(u,t.FileReader)));return r}async function ht(e,t){const n=E(e),i=n.navigator.clipboard,r=[];for(let s=0;s<t.items.length;s++){const u=t.items[s],c=await Zt(n,u);r.push(pt(n,c))}if(!(i&&await i.write(r).then(()=>!0,()=>!1)))throw new Error("The Clipboard API is unavailable.")}const we=globalThis;typeof we.afterEach=="function"&&we.afterEach(()=>tn(globalThis.window));typeof we.afterAll=="function"&&we.afterAll(()=>nn(globalThis.window));const bt=["input:not([type=hidden]):not([disabled])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contenteditable=""]','[contenteditable="true"]',"a[href]","[tabindex]:not([disabled])"].join(", ");function $e(e){return e.matches(bt)}function on(e){return new e.constructor(e.type,e)}function I(e){for(let n=e;n;n=n.parentElement)if(a(n,["button","input","select","textarea","optgroup","option"])){if(n.hasAttribute("disabled"))return!0}else if(a(n,"fieldset")){var t;if(n.hasAttribute("disabled")&&!(!((t=n.querySelector(":scope > legend"))===null||t===void 0)&&t.contains(e)))return!0}else if(n.tagName.includes("-")&&n.constructor.formAssociated&&n.hasAttribute("disabled"))return!0;return!1}function fe(e){const t=e.activeElement;return t!=null&&t.shadowRoot?fe(t.shadowRoot):I(t)?e.ownerDocument?e.ownerDocument.body:e.body:t}function Se(e){var t;return(t=fe(e))!==null&&t!==void 0?t:e.body}function sn(e,t){let n=e;do{if(t(n))return n;n=n.parentElement}while(n&&n!==e.ownerDocument.body)}function R(e){return e.hasAttribute("contenteditable")&&(e.getAttribute("contenteditable")=="true"||e.getAttribute("contenteditable")=="")}function de(e){const t=un(e);return t&&(t.closest('[contenteditable=""]')||t.closest('[contenteditable="true"]'))}function un(e){return e.nodeType===1?e:e.parentElement}var gt=function(e){return e.button="button",e.color="color",e.file="file",e.image="image",e.reset="reset",e.submit="submit",e.checkbox="checkbox",e.radio="radio",e}(gt||{});function vt(e){return a(e,"button")||a(e,"input")&&e.type in gt}function z(e){return mt(e)&&!e.readOnly||R(e)}var yt=function(e){return e.text="text",e.date="date",e["datetime-local"]="datetime-local",e.email="email",e.month="month",e.number="number",e.password="password",e.search="search",e.tel="tel",e.time="time",e.url="url",e.week="week",e}(yt||{});function mt(e){return a(e,"textarea")||a(e,"input")&&e.type in yt}function k(e){return Et(e)&&mt(e)}function cn(e){return Et(e)&&vt(e)}function Et(e){return e.nodeType===1}function dn(e){const t=e.ownerDocument.getSelection();if(t!=null&&t.focusNode&&k(e)){const i=de(t.focusNode);if(i){if(!t.isCollapsed){var n;const r=((n=i.firstChild)===null||n===void 0?void 0:n.nodeType)===3?i.firstChild:i;t.setBaseAndExtent(r,0,r,0)}}else t.setBaseAndExtent(e,0,e,0)}}function q(e,t){return H.getConfig().eventWrapper(e)}function O(e){const t=sn(e,$e),n=fe(e.ownerDocument);(t??e.ownerDocument.body)!==n&&(q(t?()=>t.focus():()=>n==null?void 0:n.blur()),dn(t??e.ownerDocument.body))}function ln(e){!$e(e)||!(fe(e.ownerDocument)===e)||q(()=>e.blur())}const U={};U.click=(e,t,n)=>{const i=t.closest("button,input,label,select,textarea"),r=i&&a(i,"label")&&i.control;if(r&&r!==t)return()=>{$e(r)&&(O(r),n.dispatchEvent(r,on(e)))};if(a(t,"input",{type:"file"}))return()=>{ln(t),t.dispatchEvent(new(E(t)).Event("fileDialog")),O(t)}};const Y=Symbol("Displayed value in UI"),_=Symbol("Displayed selection in UI"),ke=Symbol("Initial value to compare on blur");function an(e){return typeof e=="object"&&Y in e}function fn(e){return!!e&&typeof e=="object"&&_ in e}function pn(e,t){e[ke]===void 0&&(e[ke]=e.value),e[Y]=t,e.value=Object.assign(new String(t),{[Y]:!0})}function T(e){return e[Y]===void 0?e.value:String(e[Y])}function Fe(e){e[Y]=void 0}function wt(e){e[ke]=void 0}function hn(e){return e[ke]}function bn(e,t){e[_]=t}function Z(e,{focusOffset:t,anchorOffset:n=t},i="replace"){const r=T(e).length,o=f=>Math.max(0,Math.min(r,f)),s=i==="replace"||e[_]===void 0?o(n):e[_].anchorOffset,u=o(t),c=Math.min(s,u),d=Math.max(s,u);if(e[_]={anchorOffset:s,focusOffset:u},e.selectionStart===c&&e.selectionEnd===d)return;const l=Object.assign(new Number(c),{[_]:!0});try{e.setSelectionRange(l,d)}catch{}}function le(e){var t,n,i;const r=(i=e[_])!==null&&i!==void 0?i:{anchorOffset:(t=e.selectionStart)!==null&&t!==void 0?t:0,focusOffset:(n=e.selectionEnd)!==null&&n!==void 0?n:0};return{...r,startOffset:Math.min(r.anchorOffset,r.focusOffset),endOffset:Math.max(r.anchorOffset,r.focusOffset)}}function gn(e){return!!e[_]}function ye(e){e[_]=void 0}const Te=globalThis.parseInt;function vn(e){const t=e.replace(/\D/g,"");if(t.length<2)return e;const n=Te(t[0],10),i=Te(t[1],10);if(n>=3||n===2&&i>=4){let r;return n>=3?r=1:r=2,je(t,r)}return e.length===2?e:je(t,2)}function je(e,t){const n=e.slice(0,t),i=Math.min(Te(n,10),23),r=e.slice(t),o=Te(r,10),s=Math.min(o,59);return`${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}function kt(e,t){const n=e.cloneNode();return n.value=t,n.value===t}var Tt=function(e){return e.email="email",e.password="password",e.search="search",e.telephone="telephone",e.text="text",e.url="url",e}(Tt||{});function yn(e){var t;const n=(t=e.getAttribute("maxlength"))!==null&&t!==void 0?t:"";return/^\d+$/.test(n)&&Number(n)>=0?Number(n):void 0}function mn(e){return a(e,"textarea")||a(e,"input")&&e.type in Tt}function Ct(e,t,n,i){if(me(e)&&t+n>=0&&t+n<=e.nodeValue.length)return{node:e,offset:t+n};const r=He(e,t,n);if(r){if(me(r))return{node:r,offset:n>0?Math.min(1,r.nodeValue.length):Math.max(r.nodeValue.length-1,0)};if(a(r,"br")){const o=He(r,void 0,n);return o?me(o)?{node:o,offset:n>0?0:o.nodeValue.length}:n<0&&a(o,"br")?{node:r.parentNode,offset:he(r)}:{node:o.parentNode,offset:he(o)+(n>0?0:1)}:n<0&&i==="deleteContentBackward"?{node:r.parentNode,offset:he(r)}:void 0}else return{node:r.parentNode,offset:he(r)+(n>0?1:0)}}}function He(e,t,n){const i=Number(t)+(n<0?-1:0);return t!==void 0&&Be(e)&&i>=0&&i<e.children.length&&(e=e.children[i]),wn(e,n===1?"next":"previous",En)}function En(e){if(me(e))return!0;if(Be(e)){if(a(e,["input","textarea"]))return e.type!=="hidden";if(a(e,"br"))return!0}return!1}function he(e){let t=0;for(;e.previousSibling;)t++,e=e.previousSibling;return t}function Be(e){return e.nodeType===1}function me(e){return e.nodeType===3}function wn(e,t,n){for(;;){var i;const r=e[`${t}Sibling`];if(r){if(e=kn(r,t==="next"?"first":"last"),n(e))return e}else if(e.parentNode&&(!Be(e.parentNode)||!R(e.parentNode)&&e.parentNode!==((i=e.ownerDocument)===null||i===void 0?void 0:i.body)))e=e.parentNode;else break}}function kn(e,t){for(;e.hasChildNodes();)e=e[`${t}Child`];return e}const ae=Symbol("Track programmatic changes for React workaround");function Tn(e){return Object.getOwnPropertyNames(e).some(t=>t.startsWith("__react"))&&E(e).REACT_VERSION===17}function Cn(e){Tn(e)&&(e[ae]={previousValue:String(e.value),tracked:[]})}function _n(e,t){var n,i;(i=e[ae])===null||i===void 0||(n=i.tracked)===null||n===void 0||n.push(t),e[ae]||(Fe(e),Z(e,{focusOffset:t.length}))}function In(e,t){var n;const i=e[ae];if(e[ae]=void 0,!(!(i==null||(n=i.tracked)===null||n===void 0)&&n.length))return;const r=i.tracked.length===2&&i.tracked[0]===i.previousValue&&i.tracked[1]===e.value;r||Fe(e),gn(e)&&Z(e,{focusOffset:r?t:e.value.length})}function _t(e){const t=Sn(e);if(t&&k(t))return{type:"input",selection:le(t)};const n=t==null?void 0:t.ownerDocument.getSelection();return{type:de(e)&&(n==null?void 0:n.anchorNode)&&de(n.anchorNode)?"contenteditable":"default",selection:n}}function Sn(e){return e.nodeType===1?e:e.parentElement}function Pn(e){const t=_t(e);if(t.type==="input")return t.selection;if(t.type==="contenteditable"){var n;return(n=t.selection)===null||n===void 0?void 0:n.getRangeAt(0)}}function j({focusNode:e,focusOffset:t,anchorNode:n=e,anchorOffset:i=t}){var r,o;if(_t(e).type==="input")return Z(e,{anchorOffset:i,focusOffset:t});(o=n.ownerDocument)===null||o===void 0||(r=o.getSelection())===null||r===void 0||r.setBaseAndExtent(n,i,e,t)}function It(e){return a(e,"input")&&["date","time"].includes(e.type)}function J(e,t,n,i="insertText"){const r=Pn(t);r&&(!It(t)&&!e.dispatchUIEvent(t,"beforeinput",{inputType:i,data:n})||("startContainer"in r?An(e,t,r,n,i):On(e,t,r,n,i)))}function An(e,t,n,i,r){let o=!1;if(!n.collapsed)o=!0,n.deleteContents();else if(["deleteContentBackward","deleteContentForward"].includes(r)){const s=Ct(n.startContainer,n.startOffset,r==="deleteContentBackward"?-1:1,r);if(s){o=!0;const u=n.cloneRange();u.comparePoint(s.node,s.offset)<0?u.setStart(s.node,s.offset):u.setEnd(s.node,s.offset),u.deleteContents()}}if(i)if(n.endContainer.nodeType===3){const s=n.endOffset;n.endContainer.insertData(s,i),n.setStart(n.endContainer,s+i.length),n.setEnd(n.endContainer,s+i.length)}else{const s=t.ownerDocument.createTextNode(i);n.insertNode(s),n.setStart(s,i.length),n.setEnd(s,i.length)}(o||i)&&e.dispatchUIEvent(t,"input",{inputType:r})}function On(e,t,n,i,r){let o=i;if(mn(t)){const d=yn(t);if(d!==void 0&&i.length>0){const l=d-t.value.length;if(l>0)o=i.substring(0,l);else return}}const{newValue:s,newOffset:u,oldValue:c}=Un(o,t,n,r);s===c&&u===n.startOffset&&u===n.endOffset||a(t,"input",{type:"number"})&&!Dn(s)||(pn(t,s),j({focusNode:t,anchorOffset:u,focusOffset:u}),It(t)?kt(t,s)&&(Ge(e,t,u,{}),e.dispatchUIEvent(t,"change"),wt(t)):Ge(e,t,u,{data:i,inputType:r}))}function Un(e,t,{startOffset:n,endOffset:i},r){const o=T(t),s=Math.max(0,n===i&&r==="deleteContentBackward"?n-1:n),u=o.substring(0,s),c=Math.min(o.length,n===i&&r==="deleteContentForward"?n+1:i),d=o.substring(c,o.length);let l=`${u}${e}${d}`,f=s+e.length;if(a(t,"input",{type:"time"})){const p=vn(l);p!==""&&kt(t,p)&&(l=p,f=p.length)}return{oldValue:o,newValue:l,newOffset:f}}function Ge(e,t,n,i){e.dispatchUIEvent(t,"input",i),In(t,n)}function Dn(e){var t,n;const i=e.split("e",2);return!(/[^\d.\-e]/.test(e)||Number((t=e.match(/-/g))===null||t===void 0?void 0:t.length)>2||Number((n=e.match(/\./g))===null||n===void 0?void 0:n.length)>1||i[1]&&!/^-?\d*$/.test(i[1]))}U.cut=(e,t,n)=>()=>{z(t)&&J(n,t,"","deleteByCut")};function xn(e){return e?R(e)?e.textContent:T(e):null}function Nn(e){const t=E(e);for(let n=e;n!=null&&n.ownerDocument;n=n.parentElement){const{display:i,visibility:r}=t.getComputedStyle(n);if(i==="none"||r==="hidden")return!1}return!0}function Mn(e,t){const n=e.ownerDocument,i=n.querySelectorAll(bt),r=Array.from(i).filter(c=>c===e||!(Number(c.getAttribute("tabindex"))<0||I(c)));Number(e.getAttribute("tabindex"))>=0&&r.sort((c,d)=>{const l=Number(c.getAttribute("tabindex")),f=Number(d.getAttribute("tabindex"));return l===f?0:l===0?1:f===0?-1:l-f});const o={};let s=[n.body];const u=a(e,"input",{type:"radio"})?e.name:void 0;r.forEach(c=>{const d=c;if(a(d,"input",{type:"radio"})&&d.name){if(d===e){s.push(d);return}else if(d.name===u)return;if(d.checked){s=s.filter(l=>!a(l,"input",{type:"radio",name:d.name})),s.push(d),o[d.name]=d;return}if(typeof o[d.name]<"u")return}s.push(d)});for(let c=s.findIndex(d=>d===e);;)if(c+=t?-1:1,c===s.length?c=0:c===-1&&(c=s.length-1),s[c]===e||s[c]===n.body||Nn(s[c]))return s[c]}function Xe(e,t){if(k(e)){const n=le(e);j({focusNode:e,focusOffset:n.startOffset===n.endOffset?n.focusOffset+t:t<0?n.startOffset:n.endOffset})}else{const n=e.ownerDocument.getSelection();if(!(n!=null&&n.focusNode))return;if(n.isCollapsed){const i=Ct(n.focusNode,n.focusOffset,t);i&&j({focusNode:i.node,focusOffset:i.offset})}else n[t<0?"collapseToStart":"collapseToEnd"]()}}function St(e){if(k(e))return j({focusNode:e,anchorOffset:0,focusOffset:T(e).length});var t;const n=(t=de(e))!==null&&t!==void 0?t:e.ownerDocument.body;j({focusNode:n,anchorOffset:0,focusOffset:n.childNodes.length})}function Ln(e){if(k(e))return le(e).startOffset===0&&le(e).endOffset===T(e).length;var t;const n=(t=de(e))!==null&&t!==void 0?t:e.ownerDocument.body,i=e.ownerDocument.getSelection();return(i==null?void 0:i.anchorNode)===n&&i.focusNode===n&&i.anchorOffset===0&&i.focusOffset===n.childNodes.length}function oe(e,t,n){var i;if(k(e))return j({focusNode:e,anchorOffset:t,focusOffset:n});if(R(e)&&((i=e.firstChild)===null||i===void 0?void 0:i.nodeType)===3)return j({focusNode:e.firstChild,anchorOffset:t,focusOffset:n});throw new Error("Not implemented. The result of this interaction is unreliable.")}function be(e,t,n){const i=E(t),r=Array.from(t.ownerDocument.querySelectorAll(t.name?`input[type="radio"][name="${i.CSS.escape(t.name)}"]`:'input[type="radio"][name=""], input[type="radio"]:not([name])'));for(let o=r.findIndex(s=>s===t)+n;;o+=n){if(r[o]||(o=n>0?0:r.length-1),r[o]===t)return;if(!I(r[o])){O(r[o]),e.dispatchUIEvent(r[o],"click");return}}}U.keydown=(e,t,n)=>{var i,r;return(r=(i=We[e.key])===null||i===void 0?void 0:i.call(We,e,t,n))!==null&&r!==void 0?r:$n(e,t,n)};const We={ArrowDown:(e,t,n)=>{if(a(t,"input",{type:"radio"}))return()=>be(n,t,1)},ArrowLeft:(e,t,n)=>a(t,"input",{type:"radio"})?()=>be(n,t,-1):()=>Xe(t,-1),ArrowRight:(e,t,n)=>a(t,"input",{type:"radio"})?()=>be(n,t,1):()=>Xe(t,1),ArrowUp:(e,t,n)=>{if(a(t,"input",{type:"radio"}))return()=>be(n,t,-1)},Backspace:(e,t,n)=>{if(z(t))return()=>{J(n,t,"","deleteContentBackward")}},Delete:(e,t,n)=>{if(z(t))return()=>{J(n,t,"","deleteContentForward")}},End:(e,t)=>{if(a(t,["input","textarea"])||R(t))return()=>{var n,i;const r=(i=(n=xn(t))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0;oe(t,r,r)}},Home:(e,t)=>{if(a(t,["input","textarea"])||R(t))return()=>{oe(t,0,0)}},PageDown:(e,t)=>{if(a(t,["input"]))return()=>{const n=T(t).length;oe(t,n,n)}},PageUp:(e,t)=>{if(a(t,["input"]))return()=>{oe(t,0,0)}},Tab:(e,t,n)=>()=>{const i=Mn(t,n.system.keyboard.modifiers.Shift);O(i),k(i)&&Z(i,{anchorOffset:0,focusOffset:i.value.length})}},$n=(e,t,n)=>{if(e.code==="KeyA"&&n.system.keyboard.modifiers.Control)return()=>St(t)};U.keypress=(e,t,n)=>{if(e.key==="Enter"){if(a(t,"button")||a(t,"input")&&Fn.includes(t.type)||a(t,"a")&&t.href)return()=>{n.dispatchUIEvent(t,"click")};if(a(t,"input")){const i=t.form,r=i==null?void 0:i.querySelector('input[type="submit"], button:not([type]), button[type="submit"]');return r?()=>n.dispatchUIEvent(r,"click"):i&&Bn.includes(t.type)&&i.querySelectorAll("input").length===1?()=>n.dispatchUIEvent(i,"submit"):void 0}}if(z(t)){const i=e.key==="Enter"?R(t)&&!n.system.keyboard.modifiers.Shift?"insertParagraph":"insertLineBreak":"insertText",r=e.key==="Enter"?`
1
+ "use strict";const H=require("./react.esm-DGuy6Rn3.cjs");function a(e,t,n){return e.namespaceURI&&e.namespaceURI!=="http://www.w3.org/1999/xhtml"||(t=Array.isArray(t)?t:[t],!t.includes(e.tagName.toLowerCase()))?!1:n?Object.entries(n).every(([i,r])=>e[i]===r):!0}function E(e){var t;if(qt(e)&&e.defaultView)return e.defaultView;if(!((t=e.ownerDocument)===null||t===void 0)&&t.defaultView)return e.ownerDocument.defaultView;throw new Error(`Could not determine window of node. Node was ${Yt(e)}`)}function qt(e){return e.nodeType===9}function Yt(e){return typeof e=="function"?`function ${e.name}`:e===null?"null":String(e)}function lt(e,t){return new Promise((n,i)=>{const r=new t;r.onerror=i,r.onabort=i,r.onload=()=>{n(String(r.result))},r.readAsText(e)})}function Ne(e,t){const n={...t,length:t.length,item:i=>n[i],[Symbol.iterator]:function*(){for(let r=0;r<n.length;r++)yield n[r]}};return n.constructor=e.FileList,e.FileList&&Object.setPrototypeOf(n,e.FileList.prototype),Object.freeze(n),n}function A(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class at{getAsFile(){return this.file}getAsString(t){typeof this.data=="string"&&t(this.data)}webkitGetAsEntry(){throw new Error("not implemented")}constructor(t,n){A(this,"kind",void 0),A(this,"type",void 0),A(this,"file",null),A(this,"data",void 0),typeof t=="string"?(this.kind="string",this.type=String(n),this.data=t):(this.kind="file",this.type=t.type,this.file=t)}}class Jt extends Array{add(...t){const n=new at(t[0],t[1]);return this.push(n),n}clear(){this.splice(0,this.length)}remove(t){this.splice(t,1)}}function pe(e,t){const[n,i]=e.split("/"),r=!i||i==="*";return o=>t?o.type===(r?n:e):r?o.type.startsWith(`${n}/`):o.type===n}function Qt(e){return new class{getData(n){var i;const r=(i=this.items.find(pe(n,!0)))!==null&&i!==void 0?i:this.items.find(pe(n,!1));let o="";return r==null||r.getAsString(s=>{o=s}),o}setData(n,i){const r=this.items.findIndex(pe(n,!0)),o=new at(i,n);r>=0?this.items.splice(r,1,o):this.items.push(o)}clearData(n){if(n){const i=this.items.findIndex(pe(n,!0));i>=0&&this.items.remove(i)}else this.items.clear()}get types(){const n=[];return this.files.length&&n.push("Files"),this.items.forEach(i=>n.push(i.type)),Object.freeze(n),n}setDragImage(){}constructor(){A(this,"dropEffect","none"),A(this,"effectAllowed","uninitialized"),A(this,"items",new Jt),A(this,"files",Ne(e,[]))}}}function Me(e,t=[]){const n=typeof e.DataTransfer>"u"?Qt(e):new e.DataTransfer;return Object.defineProperty(n,"files",{get:()=>Ne(e,t)}),n}async function Zt(e,t){return t.kind==="file"?t.getAsFile():new e.Blob([await new Promise(n=>t.getAsString(n))],{type:t.type})}function ft(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function pt(e,...t){const n=Object.fromEntries(t.map(i=>[typeof i=="string"?"text/plain":i.type,Promise.resolve(i)]));return typeof e.ClipboardItem<"u"?new e.ClipboardItem(n):new class{get types(){return Array.from(Object.keys(this.data))}async getType(r){const o=await this.data[r];if(!o)throw new Error(`${r} is not one of the available MIME types on this item.`);return o instanceof e.Blob?o:new e.Blob([o],{type:r})}constructor(r){ft(this,"data",void 0),this.data=r}}(n)}const W=Symbol("Manage ClipboardSub");function Re(e,t){return Object.assign(new class extends e.EventTarget{async read(){return Array.from(this.items)}async readText(){let i="";for(const r of this.items){const o=r.types.includes("text/plain")?"text/plain":r.types.find(s=>s.startsWith("text/"));o&&(i+=await r.getType(o).then(s=>lt(s,e.FileReader)))}return i}async write(i){this.items=i}async writeText(i){this.items=[pt(e,i)]}constructor(...i){super(...i),ft(this,"items",[])}},{[W]:t})}function Le(e){return!!(e!=null&&e[W])}function en(e){if(Le(e.navigator.clipboard))return e.navigator.clipboard[W];const t=Object.getOwnPropertyDescriptor(e.navigator,"clipboard");let n;const i={resetClipboardStub:()=>{n=Re(e,i)},detachClipboardStub:()=>{t?Object.defineProperty(e.navigator,"clipboard",t):Object.defineProperty(e.navigator,"clipboard",{value:void 0,configurable:!0})}};return n=Re(e,i),Object.defineProperty(e.navigator,"clipboard",{get:()=>n,configurable:!0}),n[W]}function tn(e){Le(e.navigator.clipboard)&&e.navigator.clipboard[W].resetClipboardStub()}function nn(e){Le(e.navigator.clipboard)&&e.navigator.clipboard[W].detachClipboardStub()}async function rn(e){const t=e.defaultView,n=t==null?void 0:t.navigator.clipboard,i=n&&await n.read();if(!i)throw new Error("The Clipboard API is unavailable.");const r=Me(t);for(const o of i)for(const s of o.types)r.setData(s,await o.getType(s).then(u=>lt(u,t.FileReader)));return r}async function ht(e,t){const n=E(e),i=n.navigator.clipboard,r=[];for(let s=0;s<t.items.length;s++){const u=t.items[s],c=await Zt(n,u);r.push(pt(n,c))}if(!(i&&await i.write(r).then(()=>!0,()=>!1)))throw new Error("The Clipboard API is unavailable.")}const we=globalThis;typeof we.afterEach=="function"&&we.afterEach(()=>tn(globalThis.window));typeof we.afterAll=="function"&&we.afterAll(()=>nn(globalThis.window));const bt=["input:not([type=hidden]):not([disabled])","button:not([disabled])","select:not([disabled])","textarea:not([disabled])",'[contenteditable=""]','[contenteditable="true"]',"a[href]","[tabindex]:not([disabled])"].join(", ");function $e(e){return e.matches(bt)}function on(e){return new e.constructor(e.type,e)}function I(e){for(let n=e;n;n=n.parentElement)if(a(n,["button","input","select","textarea","optgroup","option"])){if(n.hasAttribute("disabled"))return!0}else if(a(n,"fieldset")){var t;if(n.hasAttribute("disabled")&&!(!((t=n.querySelector(":scope > legend"))===null||t===void 0)&&t.contains(e)))return!0}else if(n.tagName.includes("-")&&n.constructor.formAssociated&&n.hasAttribute("disabled"))return!0;return!1}function fe(e){const t=e.activeElement;return t!=null&&t.shadowRoot?fe(t.shadowRoot):I(t)?e.ownerDocument?e.ownerDocument.body:e.body:t}function Se(e){var t;return(t=fe(e))!==null&&t!==void 0?t:e.body}function sn(e,t){let n=e;do{if(t(n))return n;n=n.parentElement}while(n&&n!==e.ownerDocument.body)}function R(e){return e.hasAttribute("contenteditable")&&(e.getAttribute("contenteditable")=="true"||e.getAttribute("contenteditable")=="")}function de(e){const t=un(e);return t&&(t.closest('[contenteditable=""]')||t.closest('[contenteditable="true"]'))}function un(e){return e.nodeType===1?e:e.parentElement}var gt=function(e){return e.button="button",e.color="color",e.file="file",e.image="image",e.reset="reset",e.submit="submit",e.checkbox="checkbox",e.radio="radio",e}(gt||{});function vt(e){return a(e,"button")||a(e,"input")&&e.type in gt}function z(e){return mt(e)&&!e.readOnly||R(e)}var yt=function(e){return e.text="text",e.date="date",e["datetime-local"]="datetime-local",e.email="email",e.month="month",e.number="number",e.password="password",e.search="search",e.tel="tel",e.time="time",e.url="url",e.week="week",e}(yt||{});function mt(e){return a(e,"textarea")||a(e,"input")&&e.type in yt}function k(e){return Et(e)&&mt(e)}function cn(e){return Et(e)&&vt(e)}function Et(e){return e.nodeType===1}function dn(e){const t=e.ownerDocument.getSelection();if(t!=null&&t.focusNode&&k(e)){const i=de(t.focusNode);if(i){if(!t.isCollapsed){var n;const r=((n=i.firstChild)===null||n===void 0?void 0:n.nodeType)===3?i.firstChild:i;t.setBaseAndExtent(r,0,r,0)}}else t.setBaseAndExtent(e,0,e,0)}}function q(e,t){return H.getConfig().eventWrapper(e)}function O(e){const t=sn(e,$e),n=fe(e.ownerDocument);(t??e.ownerDocument.body)!==n&&(q(t?()=>t.focus():()=>n==null?void 0:n.blur()),dn(t??e.ownerDocument.body))}function ln(e){!$e(e)||!(fe(e.ownerDocument)===e)||q(()=>e.blur())}const U={};U.click=(e,t,n)=>{const i=t.closest("button,input,label,select,textarea"),r=i&&a(i,"label")&&i.control;if(r&&r!==t)return()=>{$e(r)&&(O(r),n.dispatchEvent(r,on(e)))};if(a(t,"input",{type:"file"}))return()=>{ln(t),t.dispatchEvent(new(E(t)).Event("fileDialog")),O(t)}};const Y=Symbol("Displayed value in UI"),_=Symbol("Displayed selection in UI"),ke=Symbol("Initial value to compare on blur");function an(e){return typeof e=="object"&&Y in e}function fn(e){return!!e&&typeof e=="object"&&_ in e}function pn(e,t){e[ke]===void 0&&(e[ke]=e.value),e[Y]=t,e.value=Object.assign(new String(t),{[Y]:!0})}function T(e){return e[Y]===void 0?e.value:String(e[Y])}function Fe(e){e[Y]=void 0}function wt(e){e[ke]=void 0}function hn(e){return e[ke]}function bn(e,t){e[_]=t}function Z(e,{focusOffset:t,anchorOffset:n=t},i="replace"){const r=T(e).length,o=f=>Math.max(0,Math.min(r,f)),s=i==="replace"||e[_]===void 0?o(n):e[_].anchorOffset,u=o(t),c=Math.min(s,u),d=Math.max(s,u);if(e[_]={anchorOffset:s,focusOffset:u},e.selectionStart===c&&e.selectionEnd===d)return;const l=Object.assign(new Number(c),{[_]:!0});try{e.setSelectionRange(l,d)}catch{}}function le(e){var t,n,i;const r=(i=e[_])!==null&&i!==void 0?i:{anchorOffset:(t=e.selectionStart)!==null&&t!==void 0?t:0,focusOffset:(n=e.selectionEnd)!==null&&n!==void 0?n:0};return{...r,startOffset:Math.min(r.anchorOffset,r.focusOffset),endOffset:Math.max(r.anchorOffset,r.focusOffset)}}function gn(e){return!!e[_]}function ye(e){e[_]=void 0}const Te=globalThis.parseInt;function vn(e){const t=e.replace(/\D/g,"");if(t.length<2)return e;const n=Te(t[0],10),i=Te(t[1],10);if(n>=3||n===2&&i>=4){let r;return n>=3?r=1:r=2,je(t,r)}return e.length===2?e:je(t,2)}function je(e,t){const n=e.slice(0,t),i=Math.min(Te(n,10),23),r=e.slice(t),o=Te(r,10),s=Math.min(o,59);return`${i.toString().padStart(2,"0")}:${s.toString().padStart(2,"0")}`}function kt(e,t){const n=e.cloneNode();return n.value=t,n.value===t}var Tt=function(e){return e.email="email",e.password="password",e.search="search",e.telephone="telephone",e.text="text",e.url="url",e}(Tt||{});function yn(e){var t;const n=(t=e.getAttribute("maxlength"))!==null&&t!==void 0?t:"";return/^\d+$/.test(n)&&Number(n)>=0?Number(n):void 0}function mn(e){return a(e,"textarea")||a(e,"input")&&e.type in Tt}function Ct(e,t,n,i){if(me(e)&&t+n>=0&&t+n<=e.nodeValue.length)return{node:e,offset:t+n};const r=He(e,t,n);if(r){if(me(r))return{node:r,offset:n>0?Math.min(1,r.nodeValue.length):Math.max(r.nodeValue.length-1,0)};if(a(r,"br")){const o=He(r,void 0,n);return o?me(o)?{node:o,offset:n>0?0:o.nodeValue.length}:n<0&&a(o,"br")?{node:r.parentNode,offset:he(r)}:{node:o.parentNode,offset:he(o)+(n>0?0:1)}:n<0&&i==="deleteContentBackward"?{node:r.parentNode,offset:he(r)}:void 0}else return{node:r.parentNode,offset:he(r)+(n>0?1:0)}}}function He(e,t,n){const i=Number(t)+(n<0?-1:0);return t!==void 0&&Be(e)&&i>=0&&i<e.children.length&&(e=e.children[i]),wn(e,n===1?"next":"previous",En)}function En(e){if(me(e))return!0;if(Be(e)){if(a(e,["input","textarea"]))return e.type!=="hidden";if(a(e,"br"))return!0}return!1}function he(e){let t=0;for(;e.previousSibling;)t++,e=e.previousSibling;return t}function Be(e){return e.nodeType===1}function me(e){return e.nodeType===3}function wn(e,t,n){for(;;){var i;const r=e[`${t}Sibling`];if(r){if(e=kn(r,t==="next"?"first":"last"),n(e))return e}else if(e.parentNode&&(!Be(e.parentNode)||!R(e.parentNode)&&e.parentNode!==((i=e.ownerDocument)===null||i===void 0?void 0:i.body)))e=e.parentNode;else break}}function kn(e,t){for(;e.hasChildNodes();)e=e[`${t}Child`];return e}const ae=Symbol("Track programmatic changes for React workaround");function Tn(e){return Object.getOwnPropertyNames(e).some(t=>t.startsWith("__react"))&&E(e).REACT_VERSION===17}function Cn(e){Tn(e)&&(e[ae]={previousValue:String(e.value),tracked:[]})}function _n(e,t){var n,i;(i=e[ae])===null||i===void 0||(n=i.tracked)===null||n===void 0||n.push(t),e[ae]||(Fe(e),Z(e,{focusOffset:t.length}))}function In(e,t){var n;const i=e[ae];if(e[ae]=void 0,!(!(i==null||(n=i.tracked)===null||n===void 0)&&n.length))return;const r=i.tracked.length===2&&i.tracked[0]===i.previousValue&&i.tracked[1]===e.value;r||Fe(e),gn(e)&&Z(e,{focusOffset:r?t:e.value.length})}function _t(e){const t=Sn(e);if(t&&k(t))return{type:"input",selection:le(t)};const n=t==null?void 0:t.ownerDocument.getSelection();return{type:de(e)&&(n==null?void 0:n.anchorNode)&&de(n.anchorNode)?"contenteditable":"default",selection:n}}function Sn(e){return e.nodeType===1?e:e.parentElement}function Pn(e){const t=_t(e);if(t.type==="input")return t.selection;if(t.type==="contenteditable"){var n;return(n=t.selection)===null||n===void 0?void 0:n.getRangeAt(0)}}function j({focusNode:e,focusOffset:t,anchorNode:n=e,anchorOffset:i=t}){var r,o;if(_t(e).type==="input")return Z(e,{anchorOffset:i,focusOffset:t});(o=n.ownerDocument)===null||o===void 0||(r=o.getSelection())===null||r===void 0||r.setBaseAndExtent(n,i,e,t)}function It(e){return a(e,"input")&&["date","time"].includes(e.type)}function J(e,t,n,i="insertText"){const r=Pn(t);r&&(!It(t)&&!e.dispatchUIEvent(t,"beforeinput",{inputType:i,data:n})||("startContainer"in r?An(e,t,r,n,i):On(e,t,r,n,i)))}function An(e,t,n,i,r){let o=!1;if(!n.collapsed)o=!0,n.deleteContents();else if(["deleteContentBackward","deleteContentForward"].includes(r)){const s=Ct(n.startContainer,n.startOffset,r==="deleteContentBackward"?-1:1,r);if(s){o=!0;const u=n.cloneRange();u.comparePoint(s.node,s.offset)<0?u.setStart(s.node,s.offset):u.setEnd(s.node,s.offset),u.deleteContents()}}if(i)if(n.endContainer.nodeType===3){const s=n.endOffset;n.endContainer.insertData(s,i),n.setStart(n.endContainer,s+i.length),n.setEnd(n.endContainer,s+i.length)}else{const s=t.ownerDocument.createTextNode(i);n.insertNode(s),n.setStart(s,i.length),n.setEnd(s,i.length)}(o||i)&&e.dispatchUIEvent(t,"input",{inputType:r})}function On(e,t,n,i,r){let o=i;if(mn(t)){const d=yn(t);if(d!==void 0&&i.length>0){const l=d-t.value.length;if(l>0)o=i.substring(0,l);else return}}const{newValue:s,newOffset:u,oldValue:c}=Un(o,t,n,r);s===c&&u===n.startOffset&&u===n.endOffset||a(t,"input",{type:"number"})&&!Dn(s)||(pn(t,s),j({focusNode:t,anchorOffset:u,focusOffset:u}),It(t)?kt(t,s)&&(Ge(e,t,u,{}),e.dispatchUIEvent(t,"change"),wt(t)):Ge(e,t,u,{data:i,inputType:r}))}function Un(e,t,{startOffset:n,endOffset:i},r){const o=T(t),s=Math.max(0,n===i&&r==="deleteContentBackward"?n-1:n),u=o.substring(0,s),c=Math.min(o.length,n===i&&r==="deleteContentForward"?n+1:i),d=o.substring(c,o.length);let l=`${u}${e}${d}`,f=s+e.length;if(a(t,"input",{type:"time"})){const p=vn(l);p!==""&&kt(t,p)&&(l=p,f=p.length)}return{oldValue:o,newValue:l,newOffset:f}}function Ge(e,t,n,i){e.dispatchUIEvent(t,"input",i),In(t,n)}function Dn(e){var t,n;const i=e.split("e",2);return!(/[^\d.\-e]/.test(e)||Number((t=e.match(/-/g))===null||t===void 0?void 0:t.length)>2||Number((n=e.match(/\./g))===null||n===void 0?void 0:n.length)>1||i[1]&&!/^-?\d*$/.test(i[1]))}U.cut=(e,t,n)=>()=>{z(t)&&J(n,t,"","deleteByCut")};function xn(e){return e?R(e)?e.textContent:T(e):null}function Nn(e){const t=E(e);for(let n=e;n!=null&&n.ownerDocument;n=n.parentElement){const{display:i,visibility:r}=t.getComputedStyle(n);if(i==="none"||r==="hidden")return!1}return!0}function Mn(e,t){const n=e.ownerDocument,i=n.querySelectorAll(bt),r=Array.from(i).filter(c=>c===e||!(Number(c.getAttribute("tabindex"))<0||I(c)));Number(e.getAttribute("tabindex"))>=0&&r.sort((c,d)=>{const l=Number(c.getAttribute("tabindex")),f=Number(d.getAttribute("tabindex"));return l===f?0:l===0?1:f===0?-1:l-f});const o={};let s=[n.body];const u=a(e,"input",{type:"radio"})?e.name:void 0;r.forEach(c=>{const d=c;if(a(d,"input",{type:"radio"})&&d.name){if(d===e){s.push(d);return}else if(d.name===u)return;if(d.checked){s=s.filter(l=>!a(l,"input",{type:"radio",name:d.name})),s.push(d),o[d.name]=d;return}if(typeof o[d.name]<"u")return}s.push(d)});for(let c=s.findIndex(d=>d===e);;)if(c+=t?-1:1,c===s.length?c=0:c===-1&&(c=s.length-1),s[c]===e||s[c]===n.body||Nn(s[c]))return s[c]}function Xe(e,t){if(k(e)){const n=le(e);j({focusNode:e,focusOffset:n.startOffset===n.endOffset?n.focusOffset+t:t<0?n.startOffset:n.endOffset})}else{const n=e.ownerDocument.getSelection();if(!(n!=null&&n.focusNode))return;if(n.isCollapsed){const i=Ct(n.focusNode,n.focusOffset,t);i&&j({focusNode:i.node,focusOffset:i.offset})}else n[t<0?"collapseToStart":"collapseToEnd"]()}}function St(e){if(k(e))return j({focusNode:e,anchorOffset:0,focusOffset:T(e).length});var t;const n=(t=de(e))!==null&&t!==void 0?t:e.ownerDocument.body;j({focusNode:n,anchorOffset:0,focusOffset:n.childNodes.length})}function Ln(e){if(k(e))return le(e).startOffset===0&&le(e).endOffset===T(e).length;var t;const n=(t=de(e))!==null&&t!==void 0?t:e.ownerDocument.body,i=e.ownerDocument.getSelection();return(i==null?void 0:i.anchorNode)===n&&i.focusNode===n&&i.anchorOffset===0&&i.focusOffset===n.childNodes.length}function oe(e,t,n){var i;if(k(e))return j({focusNode:e,anchorOffset:t,focusOffset:n});if(R(e)&&((i=e.firstChild)===null||i===void 0?void 0:i.nodeType)===3)return j({focusNode:e.firstChild,anchorOffset:t,focusOffset:n});throw new Error("Not implemented. The result of this interaction is unreliable.")}function be(e,t,n){const i=E(t),r=Array.from(t.ownerDocument.querySelectorAll(t.name?`input[type="radio"][name="${i.CSS.escape(t.name)}"]`:'input[type="radio"][name=""], input[type="radio"]:not([name])'));for(let o=r.findIndex(s=>s===t)+n;;o+=n){if(r[o]||(o=n>0?0:r.length-1),r[o]===t)return;if(!I(r[o])){O(r[o]),e.dispatchUIEvent(r[o],"click");return}}}U.keydown=(e,t,n)=>{var i,r;return(r=(i=We[e.key])===null||i===void 0?void 0:i.call(We,e,t,n))!==null&&r!==void 0?r:$n(e,t,n)};const We={ArrowDown:(e,t,n)=>{if(a(t,"input",{type:"radio"}))return()=>be(n,t,1)},ArrowLeft:(e,t,n)=>a(t,"input",{type:"radio"})?()=>be(n,t,-1):()=>Xe(t,-1),ArrowRight:(e,t,n)=>a(t,"input",{type:"radio"})?()=>be(n,t,1):()=>Xe(t,1),ArrowUp:(e,t,n)=>{if(a(t,"input",{type:"radio"}))return()=>be(n,t,-1)},Backspace:(e,t,n)=>{if(z(t))return()=>{J(n,t,"","deleteContentBackward")}},Delete:(e,t,n)=>{if(z(t))return()=>{J(n,t,"","deleteContentForward")}},End:(e,t)=>{if(a(t,["input","textarea"])||R(t))return()=>{var n,i;const r=(i=(n=xn(t))===null||n===void 0?void 0:n.length)!==null&&i!==void 0?i:0;oe(t,r,r)}},Home:(e,t)=>{if(a(t,["input","textarea"])||R(t))return()=>{oe(t,0,0)}},PageDown:(e,t)=>{if(a(t,["input"]))return()=>{const n=T(t).length;oe(t,n,n)}},PageUp:(e,t)=>{if(a(t,["input"]))return()=>{oe(t,0,0)}},Tab:(e,t,n)=>()=>{const i=Mn(t,n.system.keyboard.modifiers.Shift);O(i),k(i)&&Z(i,{anchorOffset:0,focusOffset:i.value.length})}},$n=(e,t,n)=>{if(e.code==="KeyA"&&n.system.keyboard.modifiers.Control)return()=>St(t)};U.keypress=(e,t,n)=>{if(e.key==="Enter"){if(a(t,"button")||a(t,"input")&&Fn.includes(t.type)||a(t,"a")&&t.href)return()=>{n.dispatchUIEvent(t,"click")};if(a(t,"input")){const i=t.form,r=i==null?void 0:i.querySelector('input[type="submit"], button:not([type]), button[type="submit"]');return r?()=>n.dispatchUIEvent(r,"click"):i&&Bn.includes(t.type)&&i.querySelectorAll("input").length===1?()=>n.dispatchUIEvent(i,"submit"):void 0}}if(z(t)){const i=e.key==="Enter"?R(t)&&!n.system.keyboard.modifiers.Shift?"insertParagraph":"insertLineBreak":"insertText",r=e.key==="Enter"?`
2
2
  `:e.key;return()=>J(n,t,r,i)}};const Fn=["button","color","file","image","reset","submit"],Bn=["email","month","password","search","tel","text","url","week"];U.keyup=(e,t,n)=>{var i;return(i=ze[e.key])===null||i===void 0?void 0:i.call(ze,e,t,n)};const ze={" ":(e,t,n)=>{if(vt(t))return()=>n.dispatchUIEvent(t,"click")}};U.paste=(e,t,n)=>{if(z(t))return()=>{var i;const r=(i=e.clipboardData)===null||i===void 0?void 0:i.getData("text");r&&J(n,t,r,"insertFromPaste")}};const Pt={auxclick:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},beforeinput:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},blur:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},click:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},contextmenu:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},copy:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},change:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!1}},cut:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},dblclick:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},focus:{EventType:"FocusEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},focusin:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},focusout:{EventType:"FocusEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},keydown:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keypress:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},keyup:{EventType:"KeyboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},paste:{EventType:"ClipboardEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},input:{EventType:"InputEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},mousedown:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseenter:{EventType:"MouseEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mouseleave:{EventType:"MouseEvent",defaultInit:{bubbles:!1,cancelable:!1,composed:!0}},mousemove:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseout:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseover:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},mouseup:{EventType:"MouseEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerover:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerenter:{EventType:"PointerEvent",defaultInit:{bubbles:!1,cancelable:!1}},pointerdown:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointermove:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerup:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointercancel:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!1,composed:!0}},pointerout:{EventType:"PointerEvent",defaultInit:{bubbles:!0,cancelable:!0,composed:!0}},pointerleave:{EventType:"PointerEvent",defaultInit:{bubbles:!1,cancelable:!1}},submit:{EventType:"Event",defaultInit:{bubbles:!0,cancelable:!0}}};function At(e){return Pt[e].EventType}const Vn=["MouseEvent","PointerEvent"];function Kn(e){return Vn.includes(At(e))}function Rn(e){return At(e)==="KeyboardEvent"}const jn={ClipboardEvent:[Gn],Event:[],FocusEvent:[re,Xn],InputEvent:[re,Wn],MouseEvent:[re,Pe,qe],PointerEvent:[re,Pe,qe,qn],KeyboardEvent:[re,Pe,zn]};function Ot(e,t,n){const i=E(t),{EventType:r,defaultInit:o}=Pt[e],s=new(Hn(i))[r](e,o);return jn[r].forEach(u=>u(s,n??{})),s}function Hn(e){var t;const n=(t=e.Event)!==null&&t!==void 0?t:class{};var i;const r=(i=e.AnimationEvent)!==null&&i!==void 0?i:class extends n{};var o;const s=(o=e.ClipboardEvent)!==null&&o!==void 0?o:class extends n{};var u;const c=(u=e.PopStateEvent)!==null&&u!==void 0?u:class extends n{};var d;const l=(d=e.ProgressEvent)!==null&&d!==void 0?d:class extends n{};var f;const p=(f=e.TransitionEvent)!==null&&f!==void 0?f:class extends n{};var h;const g=(h=e.UIEvent)!==null&&h!==void 0?h:class extends n{};var S;const ee=(S=e.CompositionEvent)!==null&&S!==void 0?S:class extends g{};var x;const te=(x=e.FocusEvent)!==null&&x!==void 0?x:class extends g{};var N;const ne=(N=e.InputEvent)!==null&&N!==void 0?N:class extends g{};var M;const ie=(M=e.KeyboardEvent)!==null&&M!==void 0?M:class extends g{};var L;const $=(L=e.MouseEvent)!==null&&L!==void 0?L:class extends g{};var F;const Xt=(F=e.DragEvent)!==null&&F!==void 0?F:class extends ${};var _e;const Wt=(_e=e.PointerEvent)!==null&&_e!==void 0?_e:class extends ${};var Ie;const zt=(Ie=e.TouchEvent)!==null&&Ie!==void 0?Ie:class extends g{};return{Event:n,AnimationEvent:r,ClipboardEvent:s,PopStateEvent:c,ProgressEvent:l,TransitionEvent:p,UIEvent:g,CompositionEvent:ee,FocusEvent:te,InputEvent:ne,KeyboardEvent:ie,MouseEvent:$,DragEvent:Xt,PointerEvent:Wt,TouchEvent:zt}}function D(e,t){for(const[n,i]of Object.entries(t))Object.defineProperty(e,n,{get:()=>i??null})}function b(e){return Number(e??0)}function Gn(e,{clipboardData:t}){D(e,{clipboardData:t})}function Xn(e,{relatedTarget:t}){D(e,{relatedTarget:t})}function Wn(e,{data:t,inputType:n,isComposing:i}){D(e,{data:t,isComposing:!!i,inputType:String(n)})}function re(e,{view:t,detail:n}){D(e,{view:t,detail:b(n??0)})}function Pe(e,{altKey:t,ctrlKey:n,metaKey:i,shiftKey:r,modifierAltGraph:o,modifierCapsLock:s,modifierFn:u,modifierFnLock:c,modifierNumLock:d,modifierScrollLock:l,modifierSymbol:f,modifierSymbolLock:p}){D(e,{altKey:!!t,ctrlKey:!!n,metaKey:!!i,shiftKey:!!r,getModifierState(h){return!!{Alt:t,AltGraph:o,CapsLock:s,Control:n,Fn:u,FnLock:c,Meta:i,NumLock:d,ScrollLock:l,Shift:r,Symbol:f,SymbolLock:p}[h]}})}function zn(e,{key:t,code:n,location:i,repeat:r,isComposing:o,charCode:s}){D(e,{key:String(t),code:String(n),location:b(i),repeat:!!r,isComposing:!!o,charCode:s})}function qe(e,{x:t,y:n,screenX:i,screenY:r,clientX:o=t,clientY:s=n,button:u,buttons:c,relatedTarget:d,offsetX:l,offsetY:f,pageX:p,pageY:h}){D(e,{screenX:b(i),screenY:b(r),clientX:b(o),x:b(o),clientY:b(s),y:b(s),button:b(u),buttons:b(c),relatedTarget:d,offsetX:b(l),offsetY:b(f),pageX:b(p),pageY:b(h)})}function qn(e,{pointerId:t,width:n,height:i,pressure:r,tangentialPressure:o,tiltX:s,tiltY:u,twist:c,pointerType:d,isPrimary:l}){D(e,{pointerId:b(t),width:b(n??1),height:b(i??1),pressure:b(r),tangentialPressure:b(o),tiltX:b(s),tiltY:b(u),twist:b(c),pointerType:String(d),isPrimary:!!l})}function Yn(e,t,n,i=!1){(Kn(t)||Rn(t))&&(n={...n,...this.system.getUIEventModifiers()});const r=Ot(t,e,n);return Ut.call(this,e,r,i)}function Ut(e,t,n=!1){var i;const r=t.type,o=n?()=>{}:(i=U[r])===null||i===void 0?void 0:i.call(U,t,e,this);if(o){t.preventDefault();let s=!1;return Object.defineProperty(t,"defaultPrevented",{get:()=>s}),Object.defineProperty(t,"preventDefault",{value:()=>{s=t.cancelable}}),q(()=>e.dispatchEvent(t)),s||o(),!s}return q(()=>e.dispatchEvent(t))}function K(e,t,n){const i=Ot(t,e,n);q(()=>e.dispatchEvent(i))}const Ye=Symbol("patched focus/blur methods");function Dt(e){if(e.prototype[Ye])return;const{focus:t,blur:n}=e.prototype;Object.defineProperties(e.prototype,{focus:{configurable:!0,get:()=>r},blur:{configurable:!0,get:()=>o},[Ye]:{configurable:!0,get:()=>({focus:t,blur:n})}});let i;function r(s){if(this.ownerDocument.visibilityState!=="hidden")return t.call(this,s);const u=Je(this.ownerDocument);if(u===this)return;const c=Symbol("focus call");i=c,u&&(n.call(u),K(u,"blur",{relatedTarget:this}),K(u,"focusout",{relatedTarget:i===c?this:null})),i===c&&(t.call(this,s),K(this,"focus",{relatedTarget:u})),i===c&&K(this,"focusin",{relatedTarget:u})}function o(){if(this.ownerDocument.visibilityState!=="hidden")return n.call(this);const s=Je(this.ownerDocument);if(s!==this)return;i=Symbol("blur call"),n.call(this),K(s,"blur",{relatedTarget:null}),K(s,"focusout",{relatedTarget:null})}}function Je(e){const t=fe(e);return(t==null?void 0:t.tagName)==="BODY"?null:t}const Ae=Symbol("Interceptor for programmatical calls");function G(e,t,n){const i=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=Object.getOwnPropertyDescriptor(e,t),o=i!=null&&i.set?"set":"value";if(typeof(i==null?void 0:i[o])!="function"||i[o][Ae])throw new Error(`Element ${e.tagName} does not implement "${String(t)}".`);function s(...u){const{applyNative:c=!1,realArgs:d,then:l}=n.call(this,...u),f=(!c&&r||i)[o];o==="set"?f.call(this,d):f.call(this,...d),l==null||l()}s[Ae]=Ae,Object.defineProperty(e,t,{...r??i,[o]:s})}function Jn(e){G(e,"value",function(n){const i=an(n);return i&&Cn(this),{applyNative:!!i,realArgs:Qn(this,n),then:i?void 0:()=>_n(this,String(n))}})}function Qn(e,t){return a(e,"input",{type:"number"})&&String(t)!==""&&!Number.isNaN(Number(t))?String(Number(t)):String(t)}function Zn(e){G(e,"setSelectionRange",function(n,...i){const r=fn(n);return{applyNative:!!r,realArgs:[Number(n),...i],then:()=>r?void 0:ye(e)}}),G(e,"selectionStart",function(n){return{realArgs:n,then:()=>ye(e)}}),G(e,"selectionEnd",function(n){return{realArgs:n,then:()=>ye(e)}}),G(e,"select",function(){return{realArgs:[],then:()=>bn(e,{anchorOffset:0,focusOffset:T(e).length})}})}function ei(e){G(e,"setRangeText",function(...n){return{realArgs:n,then:()=>{Fe(e),ye(e)}}})}const X=Symbol("Node prepared with document state workarounds");function xt(e){e[X]||(e.addEventListener("focus",t=>{const n=t.target;Qe(n)},{capture:!0,passive:!0}),e.activeElement&&Qe(e.activeElement),e.addEventListener("blur",t=>{const n=t.target,i=hn(n);i!==void 0&&(n.value!==i&&K(n,"change"),wt(n))},{capture:!0,passive:!0}),e[X]=X)}function Qe(e){e[X]||(a(e,["input","textarea"])&&(Jn(e),Zn(e),ei(e)),e[X]=X)}function ti(e){return ni(e)?e:e.ownerDocument}function ni(e){return e.nodeType===9}var m=function(e){return e[e.Trigger=2]="Trigger",e[e.Call=1]="Call",e}({});function se(e,t){e.levelRefs[t]={}}function ge(e,t){return e.levelRefs[t]}function Q(e){const t=e.delay;if(typeof t=="number")return Promise.all([new Promise(n=>globalThis.setTimeout(()=>n(),t)),e.advanceTimers(t)])}var Ee=function(e){return e[e.EachTrigger=4]="EachTrigger",e[e.EachApiCall=2]="EachApiCall",e[e.EachTarget=1]="EachTarget",e[e.Never=0]="Never",e}({});function B(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(e){return e[e.STANDARD=0]="STANDARD",e[e.LEFT=1]="LEFT",e[e.RIGHT=2]="RIGHT",e[e.NUMPAD=3]="NUMPAD",e}({});const ii=["Alt","AltGraph","Control","Fn","Meta","Shift","Symbol"];function Ze(e){return ii.includes(e)}const ri=["CapsLock","FnLock","NumLock","ScrollLock","SymbolLock"];function et(e){return ri.includes(e)}class oi{isKeyPressed(t){return this.pressed.has(String(t.code))}getPressedKeys(){return this.pressed.values().map(t=>t.keyDef)}async keydown(t,n){const i=String(n.key),r=String(n.code),o=Se(t.config.document);this.setKeydownTarget(o),this.pressed.add(r,n),Ze(i)&&(this.modifiers[i]=!0);const s=t.dispatchUIEvent(o,"keydown",{key:i,code:r});et(i)&&!this.modifiers[i]&&(this.modifiers[i]=!0,this.modifierLockStart[i]=!0),s&&this.pressed.setUnprevented(r),s&&this.hasKeyPress(i)&&t.dispatchUIEvent(Se(t.config.document),"keypress",{key:i,code:r,charCode:n.key==="Enter"?13:String(n.key).charCodeAt(0)})}async keyup(t,n){const i=String(n.key),r=String(n.code),o=this.pressed.isUnprevented(r);this.pressed.delete(r),Ze(i)&&!this.pressed.values().find(s=>s.keyDef.key===i)&&(this.modifiers[i]=!1),t.dispatchUIEvent(Se(t.config.document),"keyup",{key:i,code:r},!o),et(i)&&this.modifiers[i]&&(this.modifierLockStart[i]?this.modifierLockStart[i]=!1:this.modifiers[i]=!1)}setKeydownTarget(t){t!==this.lastKeydownTarget&&(this.carryChar=""),this.lastKeydownTarget=t}hasKeyPress(t){return(t.length===1||t==="Enter")&&!this.modifiers.Control&&!this.modifiers.Alt}constructor(t){B(this,"system",void 0),B(this,"modifiers",{Alt:!1,AltGraph:!1,CapsLock:!1,Control:!1,Fn:!1,FnLock:!1,Meta:!1,NumLock:!1,ScrollLock:!1,Shift:!1,Symbol:!1,SymbolLock:!1}),B(this,"pressed",new class{add(n,i){var r,o,s;(s=(r=this.registry)[o=n])!==null&&s!==void 0||(r[o]={keyDef:i,unpreventedDefault:!1})}has(n){return!!this.registry[n]}setUnprevented(n){const i=this.registry[n];i&&(i.unpreventedDefault=!0)}isUnprevented(n){var i;return!!(!((i=this.registry[n])===null||i===void 0)&&i.unpreventedDefault)}delete(n){delete this.registry[n]}values(){return Object.values(this.registry)}constructor(){B(this,"registry",{})}}),B(this,"carryChar",""),B(this,"lastKeydownTarget",void 0),B(this,"modifierLockStart",{}),this.system=t}}const si=[..."0123456789".split("").map(e=>({code:`Digit${e}`,key:e})),...")!@#$%^&*(".split("").map((e,t)=>({code:`Digit${t}`,key:e,shiftKey:!0})),..."abcdefghijklmnopqrstuvwxyz".split("").map(e=>({code:`Key${e.toUpperCase()}`,key:e})),..."ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("").map(e=>({code:`Key${e}`,key:e,shiftKey:!0})),{code:"BracketLeft",key:"["},{code:"BracketLeft",key:"{",shiftKey:!0},{code:"BracketRight",key:"]"},{code:"BracketRight",key:"}",shiftKey:!0},{code:"Space",key:" "},{code:"AltLeft",key:"Alt",location:w.LEFT},{code:"AltRight",key:"Alt",location:w.RIGHT},{code:"ShiftLeft",key:"Shift",location:w.LEFT},{code:"ShiftRight",key:"Shift",location:w.RIGHT},{code:"ControlLeft",key:"Control",location:w.LEFT},{code:"ControlRight",key:"Control",location:w.RIGHT},{code:"MetaLeft",key:"Meta",location:w.LEFT},{code:"MetaRight",key:"Meta",location:w.RIGHT},{code:"OSLeft",key:"OS",location:w.LEFT},{code:"OSRight",key:"OS",location:w.RIGHT},{code:"ContextMenu",key:"ContextMenu"},{code:"Tab",key:"Tab"},{code:"CapsLock",key:"CapsLock"},{code:"Backspace",key:"Backspace"},{code:"Enter",key:"Enter"},{code:"Escape",key:"Escape"},{code:"ArrowUp",key:"ArrowUp"},{code:"ArrowDown",key:"ArrowDown"},{code:"ArrowLeft",key:"ArrowLeft"},{code:"ArrowRight",key:"ArrowRight"},{code:"Home",key:"Home"},{code:"End",key:"End"},{code:"Delete",key:"Delete"},{code:"PageUp",key:"PageUp"},{code:"PageDown",key:"PageDown"},{code:"Fn",key:"Fn"},{code:"Symbol",key:"Symbol"},{code:"AltRight",key:"AltGraph"}],ui=[{name:"MouseLeft",pointerType:"mouse",button:"primary"},{name:"MouseRight",pointerType:"mouse",button:"secondary"},{name:"MouseMiddle",pointerType:"mouse",button:"auxiliary"},{name:"TouchA",pointerType:"touch"},{name:"TouchB",pointerType:"touch"},{name:"TouchC",pointerType:"touch"}];function ci(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Nt{getButtons(){let t=0;for(const n of Object.keys(this.pressed))t|=2**Number(n);return t}down(t){const n=Ue(t.button);if(n in this.pressed){this.pressed[n].push(t);return}return this.pressed[n]=[t],n}up(t){const n=Ue(t.button);if(n in this.pressed&&(this.pressed[n]=this.pressed[n].filter(i=>i.name!==t.name),this.pressed[n].length===0))return delete this.pressed[n],n}constructor(){ci(this,"pressed",{})}}const tt={primary:0,secondary:1,auxiliary:2,back:3,X1:3,forward:4,X2:4};function Ue(e=0){return e in tt?tt[e]:Number(e)}const nt={1:2,2:1};function De(e){return e=Ue(e),e in nt?nt[e]:e}function di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class li{get countPressed(){return this.pressedKeys.size}isPressed(t){return this.pressedKeys.has(t.name)}addPressed(t){return this.pressedKeys.add(t.name)}removePressed(t){return this.pressedKeys.delete(t.name)}constructor(){di(this,"pressedKeys",new Set)}}function ce(e,t){const n=[];for(let o=e;o;o=o.parentElement)n.push(o);const i=[];for(let o=t;o;o=o.parentElement)i.push(o);let r=0;for(;!(r>=n.length||r>=i.length||n[n.length-1-r]!==i[i.length-1-r]);r++);return[n.slice(0,n.length-r),i.slice(0,i.length-r),i.slice(i.length-r)]}function xe({target:e,node:t,offset:n}){return k(e)?{node:e,offset:n??T(e).length}:t?{node:t,offset:n??(t.nodeType===3?t.nodeValue.length:t.childNodes.length)}:Mt(e,n)}function Mt(e,t,n=!0){let i=t===void 0?e.childNodes.length-1:0;const r=t===void 0?-1:1;for(;t===void 0?i>=(n?Math.max(e.childNodes.length-1,0):0):i<=e.childNodes.length;){if(t&&i===e.childNodes.length)throw new Error("The given offset is out of bounds.");const o=e.childNodes.item(i),s=String(o.textContent);if(s.length)if(t!==void 0&&s.length<t)t-=s.length;else{if(o.nodeType===1)return Mt(o,t,!1);if(o.nodeType===3)return{node:o,offset:t??o.nodeValue.length}}i+=r}return{node:e,offset:e.childNodes.length}}function ai({document:e,target:t,clickCount:n,node:i,offset:r}){if(cn(t))return;const o=k(t),s=String(o?T(t):t.textContent),[u,c]=i?[r,r]:fi(s,r,n);if(o)return Z(t,{anchorOffset:u??s.length,focusOffset:c??s.length}),{node:t,start:u??0,end:c??s.length};{const{node:d,offset:l}=xe({target:t,node:i,offset:u}),{node:f,offset:p}=xe({target:t,node:i,offset:c}),h=t.ownerDocument.createRange();try{h.setStart(d,l),h.setEnd(f,p)}catch{throw new Error("The given offset is out of bounds.")}const g=e.getSelection();return g==null||g.removeAllRanges(),g==null||g.addRange(h.cloneRange()),h}}function fi(e,t,n){if(n%3===1||e.length===0)return[t,t];const i=t??e.length;return n%3===2?[i-e.substr(0,t).match(/(\w+|\s+|\W)?$/)[0].length,t===void 0?t:t+e.substr(t).match(/^(\w+|\s+|\W)?/)[0].length]:[i-e.substr(0,t).match(/[^\r\n]*$/)[0].length,t===void 0?t:t+e.substr(t).match(/^[^\r\n]*/)[0].length]}function pi(e,{document:t,target:n,node:i,offset:r}){const o=xe({target:n,node:i,offset:r});if("node"in e){if(o.node===e.node){const s=o.offset<e.start?e.end:e.start,u=o.offset>e.end||o.offset<e.start?o.offset:e.end;Z(e.node,{anchorOffset:s,focusOffset:u})}}else{const s=e.cloneRange(),u=s.comparePoint(o.node,o.offset);u<0?s.setStart(o.node,o.offset):u>0&&s.setEnd(o.node,o.offset);const c=t.getSelection();c==null||c.removeAllRanges(),c==null||c.addRange(s.cloneRange())}}function Lt(e,t){var n,i,r,o,s,u,c,d,l,f,p,h,g,S,ee,x,te,N,ne,M,ie,L,$,F;return e.target!==t.target||((n=e.coords)===null||n===void 0?void 0:n.x)!==((i=t.coords)===null||i===void 0?void 0:i.x)||((r=e.coords)===null||r===void 0?void 0:r.y)!==((o=t.coords)===null||o===void 0?void 0:o.y)||((s=e.coords)===null||s===void 0?void 0:s.clientX)!==((u=t.coords)===null||u===void 0?void 0:u.clientX)||((c=e.coords)===null||c===void 0?void 0:c.clientY)!==((d=t.coords)===null||d===void 0?void 0:d.clientY)||((l=e.coords)===null||l===void 0?void 0:l.offsetX)!==((f=t.coords)===null||f===void 0?void 0:f.offsetX)||((p=e.coords)===null||p===void 0?void 0:p.offsetY)!==((h=t.coords)===null||h===void 0?void 0:h.offsetY)||((g=e.coords)===null||g===void 0?void 0:g.pageX)!==((S=t.coords)===null||S===void 0?void 0:S.pageX)||((ee=e.coords)===null||ee===void 0?void 0:ee.pageY)!==((x=t.coords)===null||x===void 0?void 0:x.pageY)||((te=e.coords)===null||te===void 0?void 0:te.screenX)!==((N=t.coords)===null||N===void 0?void 0:N.screenX)||((ne=e.coords)===null||ne===void 0?void 0:ne.screenY)!==((M=t.coords)===null||M===void 0?void 0:M.screenY)||((ie=e.caret)===null||ie===void 0?void 0:ie.node)!==((L=t.caret)===null||L===void 0?void 0:L.node)||(($=e.caret)===null||$===void 0?void 0:$.offset)!==((F=t.caret)===null||F===void 0?void 0:F.offset)}function V(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class hi{move(t,n,i){const r=this.position,o=this.getTarget(t);if(this.position=n,!Lt(r,n))return;const s=this.getTarget(t),u=this.getEventInit("mousemove"),[c,d]=ce(o,s);return{leave:()=>{o!==s&&(t.dispatchUIEvent(o,"mouseout",u),c.forEach(l=>t.dispatchUIEvent(l,"mouseleave",u)))},enter:()=>{o!==s&&(t.dispatchUIEvent(s,"mouseover",u),d.forEach(l=>t.dispatchUIEvent(l,"mouseenter",u)))},move:()=>{i||(t.dispatchUIEvent(s,"mousemove",u),this.modifySelecting(t))}}}down(t,n,i){const r=this.buttons.down(n);if(r===void 0)return;const o=this.getTarget(t);this.buttonDownTarget[r]=o;const s=this.getEventInit("mousedown",n.button),u=I(o);!i&&(u||t.dispatchUIEvent(o,"mousedown",s))&&(this.startSelecting(t,s.detail),O(o)),!u&&De(n.button)===2&&t.dispatchUIEvent(o,"contextmenu",this.getEventInit("contextmenu",n.button))}up(t,n,i){const r=this.buttons.up(n);if(r===void 0)return;const o=this.getTarget(t);if(!I(o)){if(!i){const u=this.getEventInit("mouseup",n.button);t.dispatchUIEvent(o,"mouseup",u),this.endSelecting()}const s=ce(this.buttonDownTarget[r],o)[2][0];if(s){const u=this.getEventInit("click",n.button);u.detail&&(t.dispatchUIEvent(s,u.button===0?"click":"auxclick",u),u.button===0&&u.detail===2&&t.dispatchUIEvent(s,"dblclick",{...this.getEventInit("dblclick",n.button),detail:u.detail}))}}}resetClickCount(){this.clickCount.reset()}getEventInit(t,n){const i={...this.position.coords};return i.button=De(n),i.buttons=this.buttons.getButtons(),t==="mousedown"?i.detail=this.clickCount.getOnDown(i.button):t==="mouseup"?i.detail=this.clickCount.getOnUp(i.button):(t==="click"||t==="auxclick")&&(i.detail=this.clickCount.incOnClick(i.button)),i}getTarget(t){var n;return(n=this.position.target)!==null&&n!==void 0?n:t.config.document.body}startSelecting(t,n){var i,r;this.selecting=ai({document:t.config.document,target:this.getTarget(t),node:(i=this.position.caret)===null||i===void 0?void 0:i.node,offset:(r=this.position.caret)===null||r===void 0?void 0:r.offset,clickCount:n})}modifySelecting(t){var n,i;this.selecting&&pi(this.selecting,{document:t.config.document,target:this.getTarget(t),node:(n=this.position.caret)===null||n===void 0?void 0:n.node,offset:(i=this.position.caret)===null||i===void 0?void 0:i.offset})}endSelecting(){this.selecting=void 0}constructor(){V(this,"position",{}),V(this,"buttons",new Nt),V(this,"selecting",void 0),V(this,"buttonDownTarget",{}),V(this,"clickCount",new class{incOnClick(t){const n=this.down[t]===void 0?void 0:Number(this.down[t])+1;return this.count=this.count[t]===void 0?{}:{[t]:Number(this.count[t])+1},n}getOnDown(t){var n;this.down={[t]:(n=this.count[t])!==null&&n!==void 0?n:0};var i;return this.count={[t]:(i=this.count[t])!==null&&i!==void 0?i:0},Number(this.count[t])+1}getOnUp(t){return this.down[t]===void 0?void 0:Number(this.down[t])+1}reset(){this.count={}}constructor(){V(this,"down",{}),V(this,"count",{})}})}}function Ce(e,t){var n;return((n=$t(e,t))===null||n===void 0?void 0:n.pointerEvents)!=="none"}function bi(e){const t=E(e);for(let n=e,i=[];n!=null&&n.ownerDocument;n=n.parentElement){i.push(n);const r=t.getComputedStyle(n).pointerEvents;if(r&&!["inherit","unset"].includes(r))return{pointerEvents:r,tree:i}}}const it=Symbol("Last check for pointer-events");function $t(e,t){const n=t[it];if(!(e.config.pointerEventsCheck!==Ee.Never&&(!n||rt(e.config.pointerEventsCheck,Ee.EachApiCall)&&n[m.Call]!==ge(e,m.Call)||rt(e.config.pointerEventsCheck,Ee.EachTrigger)&&n[m.Trigger]!==ge(e,m.Trigger))))return n==null?void 0:n.result;const r=bi(t);return t[it]={[m.Call]:ge(e,m.Call),[m.Trigger]:ge(e,m.Trigger),result:r},r}function ue(e,t){const n=$t(e,t);if((n==null?void 0:n.pointerEvents)==="none")throw new Error([`Unable to perform pointer interaction as the element ${n.tree.length>1?"inherits":"has"} \`pointer-events: none\`:`,"",gi(n.tree)].join(`
3
3
  `))}function gi(e){return e.reverse().map((t,n)=>["".padEnd(n),t.tagName,t.id&&`#${t.id}`,t.hasAttribute("data-testid")&&`(testId=${t.getAttribute("data-testid")})`,vi(t),e.length>1&&n===0&&" <-- This element declared `pointer-events: none`",e.length>1&&n===e.length-1&&" <-- Asserted pointer events here"].filter(Boolean).join("")).join(`
4
4
  `)}function vi(e){var t;let n;if(e.hasAttribute("aria-label"))n=e.getAttribute("aria-label");else if(e.hasAttribute("aria-labelledby")){var i,r;n=(r=e.ownerDocument.getElementById(e.getAttribute("aria-labelledby")))===null||r===void 0||(i=r.textContent)===null||i===void 0?void 0:i.trim()}else if(a(e,["button","input","meter","output","progress","select","textarea"])&&(!((t=e.labels)===null||t===void 0)&&t.length))n=Array.from(e.labels).map(s=>{var u;return(u=s.textContent)===null||u===void 0?void 0:u.trim()}).join("|");else if(a(e,"button")){var o;n=(o=e.textContent)===null||o===void 0?void 0:o.trim()}return n=n==null?void 0:n.replace(/\n/g," "),Number(n==null?void 0:n.length)>30&&(n=`${n==null?void 0:n.substring(0,29)}…`),n?`(label=${n})`:""}function rt(e,t){return(e&t)>0}function C(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class yi{init(t){const n=this.getTarget(t),[,i]=ce(null,n),r=this.getEventInit();return ue(t,n),t.dispatchUIEvent(n,"pointerover",r),i.forEach(o=>t.dispatchUIEvent(o,"pointerenter",r)),this}move(t,n){const i=this.position,r=this.getTarget(t);if(this.position=n,!Lt(i,n))return;const o=this.getTarget(t),s=this.getEventInit(-1),[u,c]=ce(r,o);return{leave:()=>{Ce(t,r)&&r!==o&&(t.dispatchUIEvent(r,"pointerout",s),u.forEach(d=>t.dispatchUIEvent(d,"pointerleave",s)))},enter:()=>{ue(t,o),r!==o&&(t.dispatchUIEvent(o,"pointerover",s),c.forEach(d=>t.dispatchUIEvent(d,"pointerenter",s)))},move:()=>{t.dispatchUIEvent(o,"pointermove",s)}}}down(t,n=0){if(this.isDown)return;const i=this.getTarget(t);ue(t,i),this.isDown=!0,this.isPrevented=!t.dispatchUIEvent(i,"pointerdown",this.getEventInit(n))}up(t,n=0){if(!this.isDown)return;const i=this.getTarget(t);ue(t,i),this.isPrevented=!1,this.isDown=!1,t.dispatchUIEvent(i,"pointerup",this.getEventInit(n))}release(t){const n=this.getTarget(t),[i]=ce(n,null),r=this.getEventInit();Ce(t,n)&&(t.dispatchUIEvent(n,"pointerout",r),i.forEach(o=>t.dispatchUIEvent(o,"pointerleave",r))),this.isCancelled=!0}getTarget(t){var n;return(n=this.position.target)!==null&&n!==void 0?n:t.config.document.body}getEventInit(t){return{...this.position.coords,pointerId:this.pointerId,pointerType:this.pointerType,isPrimary:this.isPrimary,button:De(t),buttons:this.buttons.getButtons()}}constructor({pointerId:t,pointerType:n,isPrimary:i},r){C(this,"pointerId",void 0),C(this,"pointerType",void 0),C(this,"isPrimary",void 0),C(this,"buttons",void 0),C(this,"isMultitouch",!1),C(this,"isCancelled",!1),C(this,"isDown",!1),C(this,"isPrevented",!1),C(this,"position",{}),this.pointerId=t,this.pointerType=n,this.isPrimary=i,this.isMultitouch=!i,this.buttons=r}}function P(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class mi{isKeyPressed(t){return this.devices.get(t.pointerType).isPressed(t)}async press(t,n,i){this.devices.get(n.pointerType).addPressed(n),this.buttons.down(n);const r=this.getPointerName(n),o=n.pointerType==="touch"?this.pointers.new(r,n.pointerType,this.buttons):this.pointers.get(r);o.position=i,o.pointerType!=="touch"&&(this.mouse.position=i),o.pointerType==="touch"&&o.init(t),o.down(t,n.button),o.pointerType!=="touch"&&this.mouse.down(t,n,o.isPrevented)}async move(t,n,i){const r=this.pointers.get(n),o=r.move(t,i),s=r.pointerType==="touch"?void 0:this.mouse.move(t,i,r.isPrevented);o==null||o.leave(),s==null||s.leave(),o==null||o.enter(),s==null||s.enter(),o==null||o.move(),s==null||s.move()}async release(t,n,i){const r=this.devices.get(n.pointerType);r.removePressed(n),this.buttons.up(n);const o=this.pointers.get(this.getPointerName(n)),s=o.isPrevented;if(o.position=i,o.pointerType!=="touch"&&(this.mouse.position=i),r.countPressed===0&&o.up(t,n.button),o.pointerType==="touch"&&o.release(t),o.pointerType==="touch"&&!o.isMultitouch){const u=this.mouse.move(t,i,s);u==null||u.leave(),u==null||u.enter(),u==null||u.move(),this.mouse.down(t,n,s)}if(!o.isMultitouch){const u=this.mouse.move(t,i,s);u==null||u.leave(),u==null||u.enter(),u==null||u.move(),this.mouse.up(t,n,s)}}getPointerName(t){return t.pointerType==="touch"?t.name:t.pointerType}getPreviousPosition(t){return this.pointers.has(t)?this.pointers.get(t).position:void 0}resetClickCount(){this.mouse.resetClickCount()}getMouseTarget(t){var n;return(n=this.mouse.position.target)!==null&&n!==void 0?n:t.config.document.body}setMousePosition(t){this.mouse.position=t,this.pointers.get("mouse").position=t}constructor(t){P(this,"system",void 0),P(this,"mouse",void 0),P(this,"buttons",void 0),P(this,"devices",new class{get(n){var i,r,o;return(o=(i=this.registry)[r=n])!==null&&o!==void 0?o:i[r]=new li}constructor(){P(this,"registry",{})}}),P(this,"pointers",new class{new(n,i,r){const o=i!=="touch"||!Object.values(this.registry).some(s=>s.pointerType==="touch"&&!s.isCancelled);return o||Object.values(this.registry).forEach(s=>{s.pointerType===i&&!s.isCancelled&&(s.isMultitouch=!0)}),this.registry[n]=new yi({pointerId:this.nextId++,pointerType:i,isPrimary:o},r),this.registry[n]}get(n){if(!this.has(n))throw new Error(`Trying to access pointer "${n}" which does not exist.`);return this.registry[n]}has(n){return n in this.registry}constructor(){P(this,"registry",{}),P(this,"nextId",1)}}),this.system=t,this.buttons=new Nt,this.mouse=new hi,this.pointers.new("mouse","mouse",this.buttons)}}function ot(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class Ft{getUIEventModifiers(){return{altKey:this.keyboard.modifiers.Alt,ctrlKey:this.keyboard.modifiers.Control,metaKey:this.keyboard.modifiers.Meta,shiftKey:this.keyboard.modifiers.Shift,modifierAltGraph:this.keyboard.modifiers.AltGraph,modifierCapsLock:this.keyboard.modifiers.CapsLock,modifierFn:this.keyboard.modifiers.Fn,modifierFnLock:this.keyboard.modifiers.FnLock,modifierNumLock:this.keyboard.modifiers.NumLock,modifierScrollLock:this.keyboard.modifiers.ScrollLock,modifierSymbol:this.keyboard.modifiers.Symbol,modifierSymbolLock:this.keyboard.modifiers.SymbolLock}}constructor(){ot(this,"keyboard",new oi(this)),ot(this,"pointer",new mi(this))}}async function Ei(e){const t=[];return this.config.skipHover||t.push({target:e}),t.push({keys:"[MouseLeft]",target:e}),this.pointer(t)}async function wi(e){return this.pointer([{target:e},"[MouseLeft][MouseLeft]"])}async function ki(e){return this.pointer([{target:e},"[MouseLeft][MouseLeft][MouseLeft]"])}async function Ti(e){return this.pointer({target:e})}async function Ci(e){return ue(this,this.system.pointer.getMouseTarget(this)),this.pointer({target:e.ownerDocument.body})}async function _i({shift:e}={}){return this.keyboard(e===!0?"{Shift>}{Tab}{/Shift}":e===!1?"[/ShiftLeft][/ShiftRight]{Tab}":"{Tab}")}var Ve=function(e){return e["{"]="}",e["["]="]",e}(Ve||{});function Bt(e,t){let n=0;const i=e[n]in Ve?e[n]:"";n+=i.length;const o=new RegExp(`^\\${i}{2}`).test(e)?"":i;return{type:o,...o===""?Ii(e,n,t):Si(e,n,o,t)}}function Ii(e,t,n){const i=e[t];return Vt(i,e,t,n),t+=i.length,{consumedLength:t,descriptor:i,releasePrevious:!1,releaseSelf:!0,repeat:1}}function Si(e,t,n,i){var r,o;const s=e[t]==="/"?"/":"";t+=s.length;const u=n==="{"&&e[t]==="\\";t+=Number(u);const c=u?e[t]:(r=e.slice(t).match(n==="{"?/^\w+|^[^}>/]/:/^\w+/))===null||r===void 0?void 0:r[0];Vt(c,e,t,i),t+=c.length;var d;const l=(d=(o=e.slice(t).match(/^>\d+/))===null||o===void 0?void 0:o[0])!==null&&d!==void 0?d:"";t+=l.length;const f=e[t]==="/"||!l&&e[t]===">"?e[t]:"";t+=f.length;const p=Ve[n],h=e[t]===p?p:"";if(!h)throw new Error(Kt([!l&&"repeat modifier",!f&&"release modifier",`"${p}"`].filter(Boolean).join(" or "),e[t],e,i));return t+=h.length,{consumedLength:t,descriptor:c,releasePrevious:!!s,repeat:l?Math.max(Number(l.substr(1)),1):1,releaseSelf:Pi(f,l)}}function Vt(e,t,n,i){if(!e)throw new Error(Kt("key descriptor",t[n],t,i))}function Pi(e,t){if(e)return e==="/";if(t)return!1}function Kt(e,t,n,i){return`Expected ${e} but found "${t??""}" in "${n}"
5
5
  See ${i==="pointer"?"https://testing-library.com/docs/user-event/pointer#pressing-a-button-or-touching-the-screen":"https://testing-library.com/docs/user-event/keyboard"}
6
6
  for more information about how userEvent parses your input.`}function Ai(e,t){const n=[];do{const{type:r,descriptor:o,consumedLength:s,releasePrevious:u,releaseSelf:c=!0,repeat:d}=Bt(t,"keyboard");var i;const l=(i=e.find(f=>{if(r==="["){var p;return((p=f.code)===null||p===void 0?void 0:p.toLowerCase())===o.toLowerCase()}else if(r==="{"){var h;return((h=f.key)===null||h===void 0?void 0:h.toLowerCase())===o.toLowerCase()}return f.key===o}))!==null&&i!==void 0?i:{key:"Unknown",code:"Unknown",[r==="["?"code":"key"]:o};n.push({keyDef:l,releasePrevious:u,releaseSelf:c,repeat:d}),t=t.slice(s)}while(t);return n}async function Oi(e){const t=Ai(this.config.keyboardMap,e);for(let n=0;n<t.length;n++)await Q(this.config),await Ui(this,t[n])}async function Ui(e,{keyDef:t,releasePrevious:n,releaseSelf:i,repeat:r}){const{system:o}=e;if(o.keyboard.isKeyPressed(t)&&await o.keyboard.keyup(e,t),!n){for(let s=1;s<=r;s++)await o.keyboard.keydown(e,t),s<r&&await Q(e.config);i&&await o.keyboard.keyup(e,t)}}async function Di(e){for(const t of e.system.keyboard.getPressedKeys())await e.system.keyboard.keyup(e,t)}function Rt(e){const t=k(e)?{"text/plain":xi(e)}:{"text/plain":String(e.ownerDocument.getSelection())},n=Me(E(e));for(const i in t)t[i]&&n.setData(i,t[i]);return n}function xi(e){const t=le(e);return T(e).substring(t.startOffset,t.endOffset)}async function Ni(){const e=this.config.document;var t;const n=(t=e.activeElement)!==null&&t!==void 0?t:e.body,i=Rt(n);if(i.items.length!==0)return this.dispatchUIEvent(n,"copy",{clipboardData:i})&&this.config.writeToClipboard&&await ht(e,i),i}async function Mi(){const e=this.config.document;var t;const n=(t=e.activeElement)!==null&&t!==void 0?t:e.body,i=Rt(n);if(i.items.length!==0)return this.dispatchUIEvent(n,"cut",{clipboardData:i})&&this.config.writeToClipboard&&await ht(n.ownerDocument,i),i}async function Li(e){const t=this.config.document;var n;const i=(n=t.activeElement)!==null&&n!==void 0?n:t.body;var r;const o=(r=typeof e=="string"?$i(t,e):e)!==null&&r!==void 0?r:await rn(t).catch(()=>{throw new Error("`userEvent.paste()` without `clipboardData` requires the `ClipboardAPI` to be available.")});this.dispatchUIEvent(i,"paste",{clipboardData:o})}function $i(e,t){const n=Me(E(e));return n.setData("text",t),n}function st(e,t){const n=[];do{const{descriptor:i,consumedLength:r,releasePrevious:o,releaseSelf:s=!0}=Bt(t,"pointer"),u=e.find(c=>c.name===i);u&&n.push({keyDef:u,releasePrevious:o,releaseSelf:s}),t=t.slice(r)}while(t);return n}async function Fi(e){const{pointerMap:t}=this.config,n=[];(Array.isArray(e)?e:[e]).forEach(i=>{typeof i=="string"?n.push(...st(t,i)):"keys"in i?n.push(...st(t,i.keys).map(r=>({...i,...r}))):n.push(i)});for(let i=0;i<n.length;i++)await Q(this.config),await Bi(this,n[i]);this.system.pointer.resetClickCount()}async function Bi(e,t){var n,i;const r="pointerName"in t&&t.pointerName?t.pointerName:"keyDef"in t?e.system.pointer.getPointerName(t.keyDef):"mouse",o=e.system.pointer.getPreviousPosition(r);var s,u,c,d;const l={target:(s=t.target)!==null&&s!==void 0?s:Vi(e,o),coords:(u=t.coords)!==null&&u!==void 0?u:o==null?void 0:o.coords,caret:{node:(c=t.node)!==null&&c!==void 0?c:ut(t)||o==null||(n=o.caret)===null||n===void 0?void 0:n.node,offset:(d=t.offset)!==null&&d!==void 0?d:ut(t)||o==null||(i=o.caret)===null||i===void 0?void 0:i.offset}};"keyDef"in t?(e.system.pointer.isKeyPressed(t.keyDef)&&(se(e,m.Trigger),await e.system.pointer.release(e,t.keyDef,l)),t.releasePrevious||(se(e,m.Trigger),await e.system.pointer.press(e,t.keyDef,l),t.releaseSelf&&(se(e,m.Trigger),await e.system.pointer.release(e,t.keyDef,l)))):(se(e,m.Trigger),await e.system.pointer.move(e,r,l))}function ut(e){var t,n;return!!((n=(t=e.target)!==null&&t!==void 0?t:e.node)!==null&&n!==void 0?n:e.offset!==void 0)}function Vi(e,t){if(!t)throw new Error("This pointer has no previous position. Provide a target property!");var n;return(n=t.target)!==null&&n!==void 0?n:e.config.document.body}async function Ki(e){if(!z(e)||I(e))throw new Error("clear()` is only supported on editable elements.");if(O(e),e.ownerDocument.activeElement!==e)throw new Error("The element to be cleared could not be focused.");if(St(e),!Ln(e))throw new Error("The element content to be cleared could not be selected.");J(this,e,"","deleteContentBackward")}async function Ri(e,t){return jt.call(this,!0,e,t)}async function ji(e,t){return jt.call(this,!1,e,t)}async function jt(e,t,n){if(!e&&!t.multiple)throw H.getConfig().getElementError("Unable to deselect an option in a non-multiple select. Use selectOptions to change the selection instead.",t);const i=Array.isArray(n)?n:[n],r=Array.from(t.querySelectorAll('option, [role="option"]')),o=i.map(u=>{if(typeof u!="string"&&r.includes(u))return u;{const c=r.find(d=>d.value===u||d.innerHTML===u);if(c)return c;throw H.getConfig().getElementError(`Value "${String(u)}" not found in options`,t)}}).filter(u=>!I(u));if(I(t)||!o.length)return;const s=u=>{u.selected=e,this.dispatchUIEvent(t,"input",{bubbles:!0,cancelable:!1,composed:!0}),this.dispatchUIEvent(t,"change")};if(a(t,"select"))if(t.multiple)for(const u of o){const c=this.config.pointerEventsCheck===0?!0:Ce(this,u);c&&(this.dispatchUIEvent(u,"pointerover"),this.dispatchUIEvent(t,"pointerenter"),this.dispatchUIEvent(u,"mouseover"),this.dispatchUIEvent(t,"mouseenter"),this.dispatchUIEvent(u,"pointermove"),this.dispatchUIEvent(u,"mousemove"),this.dispatchUIEvent(u,"pointerdown"),this.dispatchUIEvent(u,"mousedown")),O(t),c&&(this.dispatchUIEvent(u,"pointerup"),this.dispatchUIEvent(u,"mouseup")),s(u),c&&this.dispatchUIEvent(u,"click"),await Q(this.config)}else if(o.length===1){const u=this.config.pointerEventsCheck===0?!0:Ce(this,t);u?await this.click(t):O(t),s(o[0]),u&&(this.dispatchUIEvent(t,"pointerover"),this.dispatchUIEvent(t,"pointerenter"),this.dispatchUIEvent(t,"mouseover"),this.dispatchUIEvent(t,"mouseenter"),this.dispatchUIEvent(t,"pointerup"),this.dispatchUIEvent(t,"mouseup"),this.dispatchUIEvent(t,"click")),await Q(this.config)}else throw H.getConfig().getElementError("Cannot select multiple options on a non-multiple select",t);else if(t.getAttribute("role")==="listbox")for(const u of o)await this.click(u),await this.unhover(u);else throw H.getConfig().getElementError("Cannot select options on elements that are neither select nor listbox elements",t)}async function Hi(e,t,{skipClick:n=this.config.skipClick,skipAutoClose:i=this.config.skipAutoClose,initialSelectionStart:r,initialSelectionEnd:o}={}){e.disabled||(n||await this.click(e),r!==void 0&&oe(e,r,o??r),await this.keyboard(t),i||await Di(this))}const ct=Symbol("files and value properties are mocked");function Oe(e,t,n){n?Object.defineProperty(e,t,n):delete e[t]}function Gi(e,t){var n;(n=e[ct])===null||n===void 0||n.restore();const i=Object.getOwnPropertyDescriptor(e,"type"),r=Object.getOwnPropertyDescriptor(e,"value"),o=Object.getOwnPropertyDescriptor(e,"files");function s(){Oe(e,"type",i),Oe(e,"value",r),Oe(e,"files",o)}e[ct]={restore:s},Object.defineProperties(e,{files:{configurable:!0,get:()=>t},value:{configurable:!0,get:()=>t.length?`C:\\fakepath\\${t[0].name}`:"",set(u){if(u==="")s();else{var c;r==null||(c=r.set)===null||c===void 0||c.call(e,u)}}},type:{configurable:!0,get:()=>"file",set(u){u!=="file"&&(s(),e.type=u)}}})}async function Xi(e,t){const n=a(e,"label")?e.control:e;if(!n||!a(n,"input",{type:"file"}))throw new TypeError(`The ${n===e?"given":"associated"} ${n==null?void 0:n.tagName} element does not accept file uploads`);if(I(e))return;const i=(Array.isArray(t)?t:[t]).filter(o=>!this.config.applyAccept||Wi(o,n.accept)).slice(0,n.multiple?void 0:1),r=()=>{var o;i.length===((o=n.files)===null||o===void 0?void 0:o.length)&&i.every((s,u)=>{var c;return s===((c=n.files)===null||c===void 0?void 0:c.item(u))})||(Gi(n,Ne(E(e),i)),this.dispatchUIEvent(n,"input"),this.dispatchUIEvent(n,"change"))};n.addEventListener("fileDialog",r),await this.click(e),n.removeEventListener("fileDialog",r)}function ve(e){return e.toLowerCase().replace(/(\.|\/)jpg\b/g,"$1jpeg")}function Wi(e,t){if(!t)return!0;const n=["audio/*","image/*","video/*"];return ve(t).trim().split(/\s*,\s*/).some(i=>i.startsWith(".")?ve(e.name).endsWith(i):n.includes(i)?ve(e.type).startsWith(i.replace("*","")):ve(e.type)===i)}const dt={click:Ei,dblClick:wi,tripleClick:ki,hover:Ti,unhover:Ci,tab:_i,keyboard:Oi,copy:Ni,cut:Mi,paste:Li,pointer:Fi,clear:Ki,deselectOptions:ji,selectOptions:Ri,type:Hi,upload:Xi};function zi(e){return H.getConfig().asyncWrapper(e)}const Ht={applyAccept:!0,autoModify:!0,delay:0,document:globalThis.document,keyboardMap:si,pointerMap:ui,pointerEventsCheck:Ee.EachApiCall,skipAutoClose:!1,skipClick:!1,skipHover:!1,writeToClipboard:!1,advanceTimers:()=>Promise.resolve()},qi={...Ht,writeToClipboard:!0};function Gt(e={},t=qi,n){const i=Zi(e,n,t);return{...t,...e,document:i}}function Yi(e={}){const t=Gt(e);xt(t.document),Dt(E(t.document).HTMLElement);var n;const i=(n=t.document.defaultView)!==null&&n!==void 0?n:globalThis.window;return en(i),Ke(t).api}function v({keyboardState:e,pointerState:t,...n}={},i){const r=Gt(n,Ht,i);xt(r.document),Dt(E(r.document).HTMLElement);var o;const s=(o=t??e)!==null&&o!==void 0?o:new Ft;return{api:Ke(r,s).api,system:s}}function Ji(e){return Ke({...this.config,...e},this.system).api}function Qi(e,t){function n(...i){return se(e,m.Call),zi(()=>t.apply(e,i).then(async r=>(await Q(e.config),r)))}return Object.defineProperty(n,"name",{get:()=>t.name}),n}function Ke(e,t=new Ft){const n={};return Object.assign(n,{config:e,dispatchEvent:Ut.bind(n),dispatchUIEvent:Yn.bind(n),system:t,levelRefs:{},...dt}),{instance:n,api:{...Object.fromEntries(Object.entries(dt).map(([i,r])=>[i,Qi(n,r)])),setup:Ji.bind(n)}}}function Zi(e,t,n){var i,r;return(r=(i=e.document)!==null&&i!==void 0?i:t&&ti(t))!==null&&r!==void 0?r:n.document}function er(e){return v().api.clear(e)}function tr(e,t={}){return v(t,e).api.click(e)}function nr(e={}){return v(e).api.copy()}function ir(e={}){return v(e).api.cut()}function rr(e,t={}){return v(t).api.dblClick(e)}function or(e,t,n={}){return v(n).api.deselectOptions(e,t)}function sr(e,t={}){return v(t).api.hover(e)}async function ur(e,t={}){const{api:n,system:i}=v(t);return n.keyboard(e).then(()=>i)}async function cr(e,t={}){const{api:n,system:i}=v(t);return n.pointer(e).then(()=>i)}function dr(e,t){return v(t).api.paste(e)}function lr(e,t,n={}){return v(n).api.selectOptions(e,t)}function ar(e,t={}){return v(t).api.tripleClick(e)}function fr(e,t,n={}){return v(n,e).api.type(e,t,n)}function pr(e,t={}){const{api:n,system:i}=v(t);return i.pointer.setMousePosition({target:e}),n.unhover(e)}function hr(e,t,n={}){return v(n).api.upload(e,t)}function br(e={}){return v().api.tab(e)}const gr=Object.freeze(Object.defineProperty({__proto__:null,clear:er,click:tr,copy:nr,cut:ir,dblClick:rr,deselectOptions:or,hover:sr,keyboard:ur,paste:dr,pointer:cr,selectOptions:lr,tab:br,tripleClick:ar,type:fr,unhover:pr,upload:hr},Symbol.toStringTag,{value:"Module"})),vr={...gr,setup:Yi};exports.userEvent=vr;
7
- //# sourceMappingURL=index-Bbj4TMfJ.cjs.map
7
+ //# sourceMappingURL=index-BoenezD8.cjs.map