welcome-ui 8.0.0 → 8.1.0-alpha.1

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 (301) hide show
  1. package/dist/AXB53BZF-XKOjjeWO.mjs +25 -0
  2. package/dist/Accordion.mjs +30 -23
  3. package/dist/Alert.mjs +76 -70
  4. package/dist/AspectRatio.mjs +8 -10
  5. package/dist/Avatar.mjs +48 -47
  6. package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-CWSI38FM.mjs} +355 -351
  7. package/dist/Badge.mjs +25 -25
  8. package/dist/Box.mjs +5 -5
  9. package/dist/Breadcrumb.mjs +173 -168
  10. package/dist/Button.mjs +72 -67
  11. package/dist/ButtonGroup.mjs +13 -12
  12. package/dist/Card.mjs +14 -14
  13. package/dist/Checkbox.mjs +2 -2
  14. package/dist/ClearButton.mjs +15 -15
  15. package/dist/CloseButton.mjs +9 -9
  16. package/dist/{CustomInput-D_13Gd_3.mjs → CustomPopper-CZt4RioF.mjs} +3200 -3047
  17. package/dist/DatePicker.mjs +81 -80
  18. package/dist/DateTimePicker.mjs +67 -62
  19. package/dist/DateTimePickerCommon.mjs +1 -1
  20. package/dist/Drawer.mjs +190 -174
  21. package/dist/DropdownMenu.mjs +389 -386
  22. package/dist/Field.mjs +104 -92
  23. package/dist/FieldGroup.mjs +12 -9
  24. package/dist/FileDrop.mjs +613 -576
  25. package/dist/FileUpload.mjs +95 -74
  26. package/dist/Files.mjs +46 -46
  27. package/dist/Flex.mjs +13 -13
  28. package/dist/Grid.mjs +29 -29
  29. package/dist/Hint.mjs +12 -12
  30. package/dist/ITI7HKP4-C89kOQb8.mjs +474 -0
  31. package/dist/Icon.mjs +24 -24
  32. package/dist/Icons.mjs +988 -988
  33. package/dist/IconsFont.mjs +159 -159
  34. package/dist/InputText.mjs +65 -57
  35. package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-afsomHuH.mjs} +109 -108
  36. package/dist/KUU7WJ55-CzsjuIMv.mjs +61 -0
  37. package/dist/LVA2YJMS-C-kJ1lkr.mjs +873 -0
  38. package/dist/Label.mjs +37 -35
  39. package/dist/Link.mjs +28 -24
  40. package/dist/Loader.mjs +20 -16
  41. package/dist/Logo.mjs +55 -42
  42. package/dist/MTZPJQMC-TybFZCho.mjs +15 -0
  43. package/dist/Modal.mjs +272 -249
  44. package/dist/NLEBE274-oSxMftGy.mjs +84 -0
  45. package/dist/P2CTZE2T-DOT1mNnX.mjs +301 -0
  46. package/dist/P4IRICAX-CWSZLTGz.mjs +37 -0
  47. package/dist/Pagination.mjs +104 -104
  48. package/dist/PasswordInput.mjs +35 -34
  49. package/dist/Picker.mjs +35 -33
  50. package/dist/Popover.mjs +100 -93
  51. package/dist/QYJ6MIDR-DJ-vUdAM.mjs +98 -0
  52. package/dist/Radio.mjs +58 -52
  53. package/dist/RadioGroup.mjs +46 -46
  54. package/dist/RadioTab.mjs +37 -35
  55. package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-B6m278Vb.mjs} +18 -17
  56. package/dist/Search.mjs +175 -161
  57. package/dist/Select.mjs +885 -847
  58. package/dist/Shape.mjs +9 -9
  59. package/dist/Slider.mjs +359 -336
  60. package/dist/Stack.mjs +22 -24
  61. package/dist/Swiper.mjs +324 -311
  62. package/dist/Table.mjs +23 -23
  63. package/dist/Tabs.mjs +250 -245
  64. package/dist/Tag.mjs +51 -49
  65. package/dist/Text.mjs +49 -47
  66. package/dist/Textarea.mjs +39 -39
  67. package/dist/TimePicker.mjs +57 -56
  68. package/dist/Toast.mjs +144 -137
  69. package/dist/Toggle.mjs +27 -24
  70. package/dist/Tooltip.mjs +115 -111
  71. package/dist/UniversalLink.mjs +16 -16
  72. package/dist/VEVQD5MH-0w9Y7Ytc.mjs +20 -0
  73. package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-C0UPBY-5.mjs} +61 -62
  74. package/dist/VariantIcon.mjs +14 -22
  75. package/dist/WelcomeLoader.mjs +4863 -9223
  76. package/dist/WuiProvider.mjs +69 -58
  77. package/dist/X5NMLKT6-BJw3xE-K.mjs +25 -0
  78. package/dist/YV4JVR4I-DPC8mMuG.mjs +344 -0
  79. package/dist/downshift.esm-B7Jil1wW.mjs +1082 -0
  80. package/dist/{field-styles-DLIhqG_8.mjs → field-styles-BVlRlvuu.mjs} +2 -2
  81. package/dist/{hex-to-rgba-BIDK-3ab.mjs → hex-to-rgba-DU_XzKIK.mjs} +2 -2
  82. package/dist/hide-focus-rings-root-CCXdysih.mjs +15 -0
  83. package/dist/index-5HBq1O6Z.mjs +185 -0
  84. package/dist/{index-C7zM96J_.mjs → index-BaLGEKs7.mjs} +8 -8
  85. package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
  86. package/dist/index-CYmF7qCH.mjs +11 -0
  87. package/dist/index-C_k-m0Rl.mjs +36 -0
  88. package/dist/index-D8v_VJ9z.mjs +26 -0
  89. package/dist/{index-BNGGwOCo.mjs → index-DAZ1SYdj.mjs} +7 -7
  90. package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
  91. package/dist/index-DpkNUfAS.mjs +11 -0
  92. package/dist/{index-DqBUFsqP.mjs → index-DvzWKxKE.mjs} +7 -7
  93. package/dist/{index-BJAZgeHL.mjs → index-QaLwIvZS.mjs} +8 -8
  94. package/dist/{index-BQtDgQBH.mjs → index-SQQQ4dEE.mjs} +8 -8
  95. package/dist/index-i_anpNhw.mjs +66 -0
  96. package/dist/index-wl3X6EM1.mjs +16 -0
  97. package/dist/jsx-runtime-B7I4PJ0H.mjs +613 -0
  98. package/dist/radio-group-C0fUHvam.mjs +52 -0
  99. package/dist/theme.mjs +1175 -1120
  100. package/dist/throttle-CW18pWlW.mjs +13 -0
  101. package/dist/types/components/Accordion/index.d.ts +1 -1
  102. package/dist/types/components/Accordion/styles.d.ts +2 -2
  103. package/dist/types/components/Accordion/theme.d.ts +1 -1
  104. package/dist/types/components/Alert/index.d.ts +2 -2
  105. package/dist/types/components/Alert/styles.d.ts +9 -9
  106. package/dist/types/components/Alert/theme.d.ts +4 -4
  107. package/dist/types/components/Avatar/index.d.ts +2 -3
  108. package/dist/types/components/Avatar/styles.d.ts +8 -8
  109. package/dist/types/components/Avatar/theme.d.ts +3 -3
  110. package/dist/types/components/Avatar/utils.d.ts +1 -1
  111. package/dist/types/components/Badge/index.d.ts +2 -2
  112. package/dist/types/components/Badge/styles.d.ts +5 -5
  113. package/dist/types/components/Badge/theme.d.ts +1 -1
  114. package/dist/types/components/Breadcrumb/Item.d.ts +1 -1
  115. package/dist/types/components/Breadcrumb/index.d.ts +2 -2
  116. package/dist/types/components/Breadcrumb/theme.d.ts +1 -1
  117. package/dist/types/components/Button/index.d.ts +4 -5
  118. package/dist/types/components/Button/styles.d.ts +1 -1
  119. package/dist/types/components/Button/theme.d.ts +7 -7
  120. package/dist/types/components/ButtonGroup/index.d.ts +3 -3
  121. package/dist/types/components/Card/Cover.styles.d.ts +4 -4
  122. package/dist/types/components/Card/index.d.ts +2 -3
  123. package/dist/types/components/Card/theme.d.ts +1 -1
  124. package/dist/types/components/Checkbox/index.d.ts +2 -2
  125. package/dist/types/components/Checkbox/styles.d.ts +1 -1
  126. package/dist/types/components/Checkbox/theme.d.ts +1 -1
  127. package/dist/types/components/ClearButton/index.d.ts +5 -6
  128. package/dist/types/components/ClearButton/styles.d.ts +4 -4
  129. package/dist/types/components/CloseButton/styles.d.ts +4 -4
  130. package/dist/types/components/DatePicker/index.d.ts +3 -3
  131. package/dist/types/components/DateTimePicker/index.d.ts +2 -2
  132. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +1 -1
  133. package/dist/types/components/DateTimePickerCommon/CustomInput.d.ts +5 -5
  134. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +1 -1
  135. package/dist/types/components/DateTimePickerCommon/index.d.ts +2 -2
  136. package/dist/types/components/DateTimePickerCommon/theme.d.ts +1 -1
  137. package/dist/types/components/DateTimePickerCommon/utils.d.ts +2 -2
  138. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +1 -1
  139. package/dist/types/components/Drawer/AssetDrawer/index.d.ts +1 -1
  140. package/dist/types/components/Drawer/index.d.ts +12 -12
  141. package/dist/types/components/Drawer/styles.d.ts +5 -5
  142. package/dist/types/components/Drawer/theme.d.ts +2 -2
  143. package/dist/types/components/DropdownMenu/index.d.ts +4 -4
  144. package/dist/types/components/DropdownMenu/theme.d.ts +1 -1
  145. package/dist/types/components/Field/index.d.ts +8 -8
  146. package/dist/types/components/Field/styles.d.ts +1 -1
  147. package/dist/types/components/Field/utils.d.ts +1 -1
  148. package/dist/types/components/FileDrop/FilePreview.d.ts +2 -2
  149. package/dist/types/components/FileDrop/Message.d.ts +1 -1
  150. package/dist/types/components/FileDrop/index.d.ts +20 -20
  151. package/dist/types/components/FileDrop/theme.d.ts +1 -1
  152. package/dist/types/components/FileUpload/index.d.ts +13 -13
  153. package/dist/types/components/Files/index.d.ts +5 -5
  154. package/dist/types/components/Files/types.d.ts +1 -1
  155. package/dist/types/components/Hint/index.d.ts +1 -2
  156. package/dist/types/components/Hint/theme.d.ts +1 -1
  157. package/dist/types/components/Icon/index.d.ts +3 -3
  158. package/dist/types/components/Icon/styles.d.ts +3 -3
  159. package/dist/types/components/Icon/theme.d.ts +3 -3
  160. package/dist/types/components/Icons/Sun/content.json.d.ts +2 -1
  161. package/dist/types/components/Icons/index.d.ts +2 -2
  162. package/dist/types/components/IconsFont/index.d.ts +2 -3
  163. package/dist/types/components/IconsFont/styles.d.ts +1 -1
  164. package/dist/types/components/InputText/index.d.ts +1 -1
  165. package/dist/types/components/InputText/styles.d.ts +1 -1
  166. package/dist/types/components/Label/index.d.ts +2 -3
  167. package/dist/types/components/Label/theme.d.ts +1 -1
  168. package/dist/types/components/Link/index.d.ts +5 -5
  169. package/dist/types/components/Link/styles.d.ts +4 -4
  170. package/dist/types/components/Link/theme.d.ts +1 -1
  171. package/dist/types/components/Loader/index.d.ts +1 -1
  172. package/dist/types/components/Loader/styles.d.ts +4 -4
  173. package/dist/types/components/Loader/theme.d.ts +4 -4
  174. package/dist/types/components/Logo/Solutions.d.ts +1 -2
  175. package/dist/types/components/Logo/Symbol.d.ts +1 -2
  176. package/dist/types/components/Logo/Wui.d.ts +1 -2
  177. package/dist/types/components/Logo/index.d.ts +5 -5
  178. package/dist/types/components/Modal/Assets/Backdrop.d.ts +5 -6
  179. package/dist/types/components/Modal/Assets/Iframe.d.ts +1 -2
  180. package/dist/types/components/Modal/Assets/index.d.ts +9 -9
  181. package/dist/types/components/Modal/Assets/styles.d.ts +8 -8
  182. package/dist/types/components/Modal/Close.d.ts +3 -4
  183. package/dist/types/components/Modal/Content.d.ts +3 -5
  184. package/dist/types/components/Modal/Footer.d.ts +1 -1
  185. package/dist/types/components/Modal/Header.d.ts +2 -2
  186. package/dist/types/components/Modal/index.d.ts +17 -17
  187. package/dist/types/components/Modal/styles.d.ts +7 -7
  188. package/dist/types/components/Modal/theme.d.ts +2 -2
  189. package/dist/types/components/Pagination/index.d.ts +2 -2
  190. package/dist/types/components/Pagination/theme.d.ts +1 -1
  191. package/dist/types/components/Pagination/utils.d.ts +1 -1
  192. package/dist/types/components/Picker/index.d.ts +1 -1
  193. package/dist/types/components/Picker/styles.d.ts +1 -1
  194. package/dist/types/components/Popover/Arrow.d.ts +1 -2
  195. package/dist/types/components/Popover/Content.d.ts +2 -3
  196. package/dist/types/components/Popover/Popover.d.ts +4 -5
  197. package/dist/types/components/Popover/PopoverHover.d.ts +3 -4
  198. package/dist/types/components/Popover/Trigger.d.ts +1 -1
  199. package/dist/types/components/Popover/styles.d.ts +4 -4
  200. package/dist/types/components/Popover/theme.d.ts +1 -1
  201. package/dist/types/components/Popover/usePopover.d.ts +6 -6
  202. package/dist/types/components/Radio/index.d.ts +3 -3
  203. package/dist/types/components/Radio/styles.d.ts +5 -5
  204. package/dist/types/components/Radio/theme.d.ts +1 -1
  205. package/dist/types/components/RadioGroup/index.d.ts +2 -2
  206. package/dist/types/components/RadioTab/index.d.ts +3 -3
  207. package/dist/types/components/RadioTab/styles.d.ts +3 -9
  208. package/dist/types/components/RadioTab/theme.d.ts +1 -1
  209. package/dist/types/components/Search/index.d.ts +5 -5
  210. package/dist/types/components/Select/index.d.ts +11 -11
  211. package/dist/types/components/Select/styles.d.ts +6 -6
  212. package/dist/types/components/Select/utils.d.ts +11 -7
  213. package/dist/types/components/Shape/index.d.ts +1 -1
  214. package/dist/types/components/Shape/styles.d.ts +3 -3
  215. package/dist/types/components/Slider/Range.d.ts +3 -3
  216. package/dist/types/components/Slider/index.d.ts +2 -2
  217. package/dist/types/components/Slider/styles.d.ts +16 -16
  218. package/dist/types/components/Slider/theme.d.ts +1 -1
  219. package/dist/types/components/Stack/index.d.ts +1 -1
  220. package/dist/types/components/Swiper/index.d.ts +17 -18
  221. package/dist/types/components/Swiper/styles.d.ts +56 -56
  222. package/dist/types/components/Swiper/theme.d.ts +1 -1
  223. package/dist/types/components/System/index.d.ts +14 -14
  224. package/dist/types/components/Table/index.d.ts +6 -7
  225. package/dist/types/components/Table/styles.d.ts +1 -1
  226. package/dist/types/components/Table/theme.d.ts +1 -1
  227. package/dist/types/components/Tabs/ActiveBar.d.ts +5 -5
  228. package/dist/types/components/Tabs/TabList.d.ts +4 -4
  229. package/dist/types/components/Tabs/TabPanel.d.ts +2 -2
  230. package/dist/types/components/Tabs/styles.d.ts +2 -2
  231. package/dist/types/components/Tabs/theme.d.ts +2 -2
  232. package/dist/types/components/Tag/index.d.ts +2 -3
  233. package/dist/types/components/Tag/styles.d.ts +1 -1
  234. package/dist/types/components/Tag/theme.d.ts +3 -3
  235. package/dist/types/components/Text/index.d.ts +2 -2
  236. package/dist/types/components/Textarea/index.d.ts +1 -1
  237. package/dist/types/components/Textarea/theme.d.ts +1 -1
  238. package/dist/types/components/TimePicker/index.d.ts +2 -2
  239. package/dist/types/components/Toast/Growl.d.ts +1 -1
  240. package/dist/types/components/Toast/Snackbar.d.ts +1 -1
  241. package/dist/types/components/Toast/ToastWrapper.d.ts +5 -5
  242. package/dist/types/components/Toast/index.d.ts +6 -6
  243. package/dist/types/components/Toast/styles.d.ts +16 -16
  244. package/dist/types/components/Toast/theme.d.ts +2 -2
  245. package/dist/types/components/Toast/utils.d.ts +13 -13
  246. package/dist/types/components/Toggle/index.d.ts +3 -3
  247. package/dist/types/components/Toggle/styles.d.ts +5 -4
  248. package/dist/types/components/Toggle/theme.d.ts +6 -6
  249. package/dist/types/components/Tooltip/index.d.ts +2 -2
  250. package/dist/types/components/Tooltip/styles.d.ts +1 -1
  251. package/dist/types/components/Tooltip/theme.d.ts +1 -1
  252. package/dist/types/components/VariantIcon/index.d.ts +1 -1
  253. package/dist/types/components/VariantIcon/styles.d.ts +1 -1
  254. package/dist/types/components/VariantIcon/theme.d.ts +3 -3
  255. package/dist/types/components/WuiProvider/font.d.ts +3 -5
  256. package/dist/types/components/WuiProvider/index.d.ts +1 -1
  257. package/dist/types/theme/colors.d.ts +3 -11
  258. package/dist/types/theme/dark.d.ts +1 -1
  259. package/dist/types/theme/defaultFields.d.ts +10 -10
  260. package/dist/types/theme/fonts.d.ts +5 -5
  261. package/dist/types/theme/index.d.ts +31 -31
  262. package/dist/types/theme/screens.d.ts +1 -1
  263. package/dist/types/theme/space.d.ts +1 -1
  264. package/dist/types/theme/typography.d.ts +1 -1
  265. package/dist/types/utils/field-styles.d.ts +6 -6
  266. package/dist/types/utils/index.d.ts +2 -2
  267. package/dist/types/utils/ts-utils.d.ts +1 -1
  268. package/dist/types/utils/use-copy-text.d.ts +1 -1
  269. package/dist/types/utils/use-create-portal.d.ts +1 -1
  270. package/dist/types/utils/use-viewport.d.ts +2 -2
  271. package/dist/types/utils/wrap-children.d.ts +1 -1
  272. package/dist/{use-fork-ref-CUZErtAC.mjs → use-fork-ref-DvaCTfQ_.mjs} +4 -3
  273. package/dist/use-viewport-CWpjoHXy.mjs +16 -0
  274. package/dist/utils.mjs +96 -85
  275. package/dist/wrap-children-DBSD-X5-.mjs +9 -0
  276. package/package.json +9 -36
  277. package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
  278. package/dist/ITI7HKP4-BONrZ9Pq.mjs +0 -473
  279. package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
  280. package/dist/LVA2YJMS-qFC9J-lt.mjs +0 -1479
  281. package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
  282. package/dist/NLEBE274-C94QU78N.mjs +0 -84
  283. package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
  284. package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
  285. package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
  286. package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
  287. package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
  288. package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
  289. package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
  290. package/dist/hide-focus-rings-root-BNyva1yb.mjs +0 -14
  291. package/dist/index-BDeIsk2X.mjs +0 -184
  292. package/dist/index-BRDOakbf.mjs +0 -11
  293. package/dist/index-BpRjq7lj.mjs +0 -11
  294. package/dist/index-BrfXjmHY.mjs +0 -36
  295. package/dist/index-CExLVjET.mjs +0 -26
  296. package/dist/index-DEJJvyGk.mjs +0 -66
  297. package/dist/index-u1oHKa7X.mjs +0 -16
  298. package/dist/radio-group-CGC6DTFJ.mjs +0 -51
  299. package/dist/throttle-BDBzFeFj.mjs +0 -13
  300. package/dist/use-viewport-m3glsbna.mjs +0 -16
  301. package/dist/wrap-children-aq69jtFP.mjs +0 -12
package/dist/FileDrop.mjs CHANGED
@@ -1,17 +1,19 @@
1
1
  "use client";
2
- import s, { forwardRef as Ei, useImperativeHandle as zi, Fragment as Ai, useMemo as V, useRef as fa, useReducer as Fi, useEffect as ia, useCallback as E, useState as Ya } from "react";
3
- import { P as d } from "./index-SbQUT2mU.mjs";
4
- import { c as Va } from "./create-event-rXDe5aCQ.mjs";
5
- import wa, { css as _a, th as _ } from "@xstyled/styled-components";
6
- import { shouldForwardProp as Oi, forwardRef as _i } from "./System.mjs";
7
- import { Text as xa } from "./Text.mjs";
8
- import { Button as ga } from "./Button.mjs";
2
+ import { j as d } from "./jsx-runtime-B7I4PJ0H.mjs";
3
+ import Aa, { forwardRef as Fa, useMemo as V, useRef as vi, useReducer as Oa, useEffect as ai, useCallback as E, useImperativeHandle as _a, Fragment as Pa, useState as Vi } from "react";
4
+ import { P as s } from "./index-DgSynio4.mjs";
5
+ import { g as Ia } from "./_commonjsHelpers-CXJ7dpIk.mjs";
6
+ import { Button as gi } from "./Button.mjs";
9
7
  import "./Icon.mjs";
10
- import { E as Pi } from "./index-DqBUFsqP.mjs";
11
- import { getFileIcon as Ii, getFileSize as Ri, getFileName as li } from "./Files.mjs";
12
- import { P as Si, N as Ti, E as qi, T as Ci } from "./index-CExLVjET.mjs";
13
- function H(a, i, t, e) {
14
- function n(o) {
8
+ import { P as Ra, N as Sa, E as qa, T as Ta } from "./index-D8v_VJ9z.mjs";
9
+ import { shouldForwardProp as La, forwardRef as Ca } from "./System.mjs";
10
+ import { c as Gi } from "./create-event-rXDe5aCQ.mjs";
11
+ import { getFileIcon as $a, getFileSize as Ma, getFileName as sa } from "./Files.mjs";
12
+ import { E as Ka } from "./index-DvzWKxKE.mjs";
13
+ import { Text as bi } from "./Text.mjs";
14
+ import ki, { th as P, css as Ii } from "@xstyled/styled-components";
15
+ function H(i, a, t, n) {
16
+ function e(o) {
15
17
  return o instanceof t ? o : new t(function(c) {
16
18
  c(o);
17
19
  });
@@ -19,25 +21,25 @@ function H(a, i, t, e) {
19
21
  return new (t || (t = Promise))(function(o, c) {
20
22
  function r(x) {
21
23
  try {
22
- h(e.next(x));
23
- } catch (k) {
24
- c(k);
24
+ h(n.next(x));
25
+ } catch (D) {
26
+ c(D);
25
27
  }
26
28
  }
27
- function f(x) {
29
+ function v(x) {
28
30
  try {
29
- h(e.throw(x));
30
- } catch (k) {
31
- c(k);
31
+ h(n.throw(x));
32
+ } catch (D) {
33
+ c(D);
32
34
  }
33
35
  }
34
36
  function h(x) {
35
- x.done ? o(x.value) : n(x.value).then(r, f);
37
+ x.done ? o(x.value) : e(x.value).then(r, v);
36
38
  }
37
- h((e = e.apply(a, i || [])).next());
39
+ h((n = n.apply(i, a || [])).next());
38
40
  });
39
41
  }
40
- const Li = /* @__PURE__ */ new Map([
42
+ const Ha = /* @__PURE__ */ new Map([
41
43
  // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
42
44
  ["1km", "application/vnd.1000minds.decision-model+xml"],
43
45
  ["3dml", "text/vnd.in3d.3dml"],
@@ -1240,473 +1242,478 @@ const Li = /* @__PURE__ */ new Map([
1240
1242
  ["zmm", "application/vnd.handheld-entertainment+xml"],
1241
1243
  ["zsh", "text/x-scriptzsh"]
1242
1244
  ]);
1243
- function G(a, i, t) {
1244
- const e = $i(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
1245
- return typeof e.path != "string" && Ga(e, "path", o), Ga(e, "relativePath", o), e;
1246
- }
1247
- function $i(a) {
1248
- const { name: i } = a;
1249
- if (i && i.lastIndexOf(".") !== -1 && !a.type) {
1250
- const e = i.split(".").pop().toLowerCase(), n = Li.get(e);
1251
- n && Object.defineProperty(a, "type", {
1252
- value: n,
1245
+ function G(i, a, t) {
1246
+ const n = Wa(i), { webkitRelativePath: e } = i, o = typeof a == "string" ? a : typeof e == "string" && e.length > 0 ? e : `./${i.name}`;
1247
+ return typeof n.path != "string" && Zi(n, "path", o), Zi(n, "relativePath", o), n;
1248
+ }
1249
+ function Wa(i) {
1250
+ const { name: a } = i;
1251
+ if (a && a.lastIndexOf(".") !== -1 && !i.type) {
1252
+ const n = a.split(".").pop().toLowerCase(), e = Ha.get(n);
1253
+ e && Object.defineProperty(i, "type", {
1254
+ value: e,
1253
1255
  writable: !1,
1254
1256
  configurable: !1,
1255
1257
  enumerable: !0
1256
1258
  });
1257
1259
  }
1258
- return a;
1260
+ return i;
1259
1261
  }
1260
- function Ga(a, i, t) {
1261
- Object.defineProperty(a, i, {
1262
+ function Zi(i, a, t) {
1263
+ Object.defineProperty(i, a, {
1262
1264
  value: t,
1263
1265
  writable: !1,
1264
1266
  configurable: !1,
1265
1267
  enumerable: !0
1266
1268
  });
1267
1269
  }
1268
- const Mi = [
1270
+ const Na = [
1269
1271
  // Thumbnail cache files for macOS and Windows
1270
1272
  ".DS_Store",
1271
1273
  // macOs
1272
1274
  "Thumbs.db"
1273
1275
  // Windows
1274
1276
  ];
1275
- function Ki(a) {
1277
+ function Ua(i) {
1276
1278
  return H(this, void 0, void 0, function* () {
1277
- return ba(a) && Hi(a.dataTransfer) ? Ui(a.dataTransfer, a.type) : Wi(a) ? Bi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Ni(a) : [];
1279
+ return hi(i) && Ba(i.dataTransfer) ? Za(i.dataTransfer, i.type) : Ya(i) ? Va(i) : Array.isArray(i) && i.every((a) => "getFile" in a && typeof a.getFile == "function") ? Ga(i) : [];
1278
1280
  });
1279
1281
  }
1280
- function Hi(a) {
1281
- return ba(a);
1282
+ function Ba(i) {
1283
+ return hi(i);
1282
1284
  }
1283
- function Wi(a) {
1284
- return ba(a) && ba(a.target);
1285
+ function Ya(i) {
1286
+ return hi(i) && hi(i.target);
1285
1287
  }
1286
- function ba(a) {
1287
- return typeof a == "object" && a !== null;
1288
+ function hi(i) {
1289
+ return typeof i == "object" && i !== null;
1288
1290
  }
1289
- function Bi(a) {
1290
- return Ra(a.target.files).map((i) => G(i));
1291
+ function Va(i) {
1292
+ return qi(i.target.files).map((a) => G(a));
1291
1293
  }
1292
- function Ni(a) {
1294
+ function Ga(i) {
1293
1295
  return H(this, void 0, void 0, function* () {
1294
- return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => G(t));
1296
+ return (yield Promise.all(i.map((t) => t.getFile()))).map((t) => G(t));
1295
1297
  });
1296
1298
  }
1297
- function Ui(a, i) {
1299
+ function Za(i, a) {
1298
1300
  return H(this, void 0, void 0, function* () {
1299
- if (a.items) {
1300
- const t = Ra(a.items).filter((n) => n.kind === "file");
1301
- if (i !== "drop")
1301
+ if (i.items) {
1302
+ const t = qi(i.items).filter((e) => e.kind === "file");
1303
+ if (a !== "drop")
1302
1304
  return t;
1303
- const e = yield Promise.all(t.map(Yi));
1304
- return Za(ri(e));
1305
+ const n = yield Promise.all(t.map(Ja));
1306
+ return Ji(da(n));
1305
1307
  }
1306
- return Za(Ra(a.files).map((t) => G(t)));
1308
+ return Ji(qi(i.files).map((t) => G(t)));
1307
1309
  });
1308
1310
  }
1309
- function Za(a) {
1310
- return a.filter((i) => Mi.indexOf(i.name) === -1);
1311
+ function Ji(i) {
1312
+ return i.filter((a) => Na.indexOf(a.name) === -1);
1311
1313
  }
1312
- function Ra(a) {
1313
- if (a === null)
1314
+ function qi(i) {
1315
+ if (i === null)
1314
1316
  return [];
1315
- const i = [];
1316
- for (let t = 0; t < a.length; t++) {
1317
- const e = a[t];
1318
- i.push(e);
1317
+ const a = [];
1318
+ for (let t = 0; t < i.length; t++) {
1319
+ const n = i[t];
1320
+ a.push(n);
1319
1321
  }
1320
- return i;
1322
+ return a;
1321
1323
  }
1322
- function Yi(a) {
1323
- if (typeof a.webkitGetAsEntry != "function")
1324
- return Ja(a);
1325
- const i = a.webkitGetAsEntry();
1326
- return i && i.isDirectory ? si(i) : Ja(a, i);
1324
+ function Ja(i) {
1325
+ if (typeof i.webkitGetAsEntry != "function")
1326
+ return Xi(i);
1327
+ const a = i.webkitGetAsEntry();
1328
+ return a && a.isDirectory ? ma(a) : Xi(i, a);
1327
1329
  }
1328
- function ri(a) {
1329
- return a.reduce((i, t) => [
1330
- ...i,
1331
- ...Array.isArray(t) ? ri(t) : [t]
1330
+ function da(i) {
1331
+ return i.reduce((a, t) => [
1332
+ ...a,
1333
+ ...Array.isArray(t) ? da(t) : [t]
1332
1334
  ], []);
1333
1335
  }
1334
- function Ja(a, i) {
1336
+ function Xi(i, a) {
1335
1337
  var t;
1336
- if (typeof a.getAsFileSystemHandle == "function")
1337
- return a.getAsFileSystemHandle().then((o) => H(this, void 0, void 0, function* () {
1338
+ if (typeof i.getAsFileSystemHandle == "function")
1339
+ return i.getAsFileSystemHandle().then((o) => H(this, void 0, void 0, function* () {
1338
1340
  const c = yield o.getFile();
1339
1341
  return c.handle = o, G(c);
1340
1342
  }));
1341
- const e = a.getAsFile();
1342
- if (!e)
1343
- return Promise.reject(`${a} is not a File`);
1344
- const n = G(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1345
- return Promise.resolve(n);
1343
+ const n = i.getAsFile();
1344
+ if (!n)
1345
+ return Promise.reject(`${i} is not a File`);
1346
+ const e = G(n, (t = a == null ? void 0 : a.fullPath) !== null && t !== void 0 ? t : void 0);
1347
+ return Promise.resolve(e);
1346
1348
  }
1347
- function Vi(a) {
1349
+ function Xa(i) {
1348
1350
  return H(this, void 0, void 0, function* () {
1349
- return a.isDirectory ? si(a) : Gi(a);
1351
+ return i.isDirectory ? ma(i) : Qa(i);
1350
1352
  });
1351
1353
  }
1352
- function si(a) {
1353
- const i = a.createReader();
1354
- return new Promise((t, e) => {
1355
- const n = [];
1354
+ function ma(i) {
1355
+ const a = i.createReader();
1356
+ return new Promise((t, n) => {
1357
+ const e = [];
1356
1358
  function o() {
1357
- i.readEntries((c) => H(this, void 0, void 0, function* () {
1359
+ a.readEntries((c) => H(this, void 0, void 0, function* () {
1358
1360
  if (c.length) {
1359
- const r = Promise.all(c.map(Vi));
1360
- n.push(r), o();
1361
+ const r = Promise.all(c.map(Xa));
1362
+ e.push(r), o();
1361
1363
  } else
1362
1364
  try {
1363
- const r = yield Promise.all(n);
1365
+ const r = yield Promise.all(e);
1364
1366
  t(r);
1365
1367
  } catch (r) {
1366
- e(r);
1368
+ n(r);
1367
1369
  }
1368
1370
  }), (c) => {
1369
- e(c);
1371
+ n(c);
1370
1372
  });
1371
1373
  }
1372
1374
  o();
1373
1375
  });
1374
1376
  }
1375
- function Gi(a) {
1377
+ function Qa(i) {
1376
1378
  return H(this, void 0, void 0, function* () {
1377
- return new Promise((i, t) => {
1378
- a.file((e) => {
1379
- const n = G(e, a.fullPath);
1380
- i(n);
1381
- }, (e) => {
1382
- t(e);
1379
+ return new Promise((a, t) => {
1380
+ i.file((n) => {
1381
+ const e = G(n, i.fullPath);
1382
+ a(e);
1383
+ }, (n) => {
1384
+ t(n);
1383
1385
  });
1384
1386
  });
1385
1387
  });
1386
1388
  }
1387
- var Pa = function(a, i) {
1388
- if (a && i) {
1389
- var t = Array.isArray(i) ? i : i.split(",");
1390
- if (t.length === 0)
1391
- return !0;
1392
- var e = a.name || "", n = (a.type || "").toLowerCase(), o = n.replace(/\/.*$/, "");
1393
- return t.some(function(c) {
1394
- var r = c.trim().toLowerCase();
1395
- return r.charAt(0) === "." ? e.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : n === r;
1396
- });
1397
- }
1398
- return !0;
1399
- };
1400
- function Xa(a) {
1401
- return Xi(a) || Ji(a) || mi(a) || Zi();
1389
+ var fi = {}, Qi;
1390
+ function it() {
1391
+ return Qi || (Qi = 1, fi.__esModule = !0, fi.default = function(i, a) {
1392
+ if (i && a) {
1393
+ var t = Array.isArray(a) ? a : a.split(",");
1394
+ if (t.length === 0)
1395
+ return !0;
1396
+ var n = i.name || "", e = (i.type || "").toLowerCase(), o = e.replace(/\/.*$/, "");
1397
+ return t.some(function(c) {
1398
+ var r = c.trim().toLowerCase();
1399
+ return r.charAt(0) === "." ? n.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : e === r;
1400
+ });
1401
+ }
1402
+ return !0;
1403
+ }), fi;
1404
+ }
1405
+ var at = it();
1406
+ const Ri = /* @__PURE__ */ Ia(at);
1407
+ function ia(i) {
1408
+ return et(i) || nt(i) || va(i) || tt();
1402
1409
  }
1403
- function Zi() {
1410
+ function tt() {
1404
1411
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1405
1412
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1406
1413
  }
1407
- function Ji(a) {
1408
- if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1414
+ function nt(i) {
1415
+ if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
1409
1416
  }
1410
- function Xi(a) {
1411
- if (Array.isArray(a)) return Sa(a);
1417
+ function et(i) {
1418
+ if (Array.isArray(i)) return Ti(i);
1412
1419
  }
1413
- function Qa(a, i) {
1414
- var t = Object.keys(a);
1420
+ function aa(i, a) {
1421
+ var t = Object.keys(i);
1415
1422
  if (Object.getOwnPropertySymbols) {
1416
- var e = Object.getOwnPropertySymbols(a);
1417
- i && (e = e.filter(function(n) {
1418
- return Object.getOwnPropertyDescriptor(a, n).enumerable;
1419
- })), t.push.apply(t, e);
1423
+ var n = Object.getOwnPropertySymbols(i);
1424
+ a && (n = n.filter(function(e) {
1425
+ return Object.getOwnPropertyDescriptor(i, e).enumerable;
1426
+ })), t.push.apply(t, n);
1420
1427
  }
1421
1428
  return t;
1422
1429
  }
1423
- function ai(a) {
1424
- for (var i = 1; i < arguments.length; i++) {
1425
- var t = arguments[i] != null ? arguments[i] : {};
1426
- i % 2 ? Qa(Object(t), !0).forEach(function(e) {
1427
- di(a, e, t[e]);
1428
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Qa(Object(t)).forEach(function(e) {
1429
- Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1430
+ function ta(i) {
1431
+ for (var a = 1; a < arguments.length; a++) {
1432
+ var t = arguments[a] != null ? arguments[a] : {};
1433
+ a % 2 ? aa(Object(t), !0).forEach(function(n) {
1434
+ ua(i, n, t[n]);
1435
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : aa(Object(t)).forEach(function(n) {
1436
+ Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
1430
1437
  });
1431
1438
  }
1432
- return a;
1439
+ return i;
1433
1440
  }
1434
- function di(a, i, t) {
1435
- return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1441
+ function ua(i, a, t) {
1442
+ return a in i ? Object.defineProperty(i, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : i[a] = t, i;
1436
1443
  }
1437
- function ta(a, i) {
1438
- return it(a) || at(a, i) || mi(a, i) || Qi();
1444
+ function ti(i, a) {
1445
+ return ct(i) || ot(i, a) || va(i, a) || pt();
1439
1446
  }
1440
- function Qi() {
1447
+ function pt() {
1441
1448
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1442
1449
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1443
1450
  }
1444
- function mi(a, i) {
1445
- if (a) {
1446
- if (typeof a == "string") return Sa(a, i);
1447
- var t = Object.prototype.toString.call(a).slice(8, -1);
1448
- if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1449
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Sa(a, i);
1451
+ function va(i, a) {
1452
+ if (i) {
1453
+ if (typeof i == "string") return Ti(i, a);
1454
+ var t = Object.prototype.toString.call(i).slice(8, -1);
1455
+ if (t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set") return Array.from(i);
1456
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ti(i, a);
1450
1457
  }
1451
1458
  }
1452
- function Sa(a, i) {
1453
- (i == null || i > a.length) && (i = a.length);
1454
- for (var t = 0, e = new Array(i); t < i; t++)
1455
- e[t] = a[t];
1456
- return e;
1459
+ function Ti(i, a) {
1460
+ (a == null || a > i.length) && (a = i.length);
1461
+ for (var t = 0, n = new Array(a); t < a; t++)
1462
+ n[t] = i[t];
1463
+ return n;
1457
1464
  }
1458
- function at(a, i) {
1459
- var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1465
+ function ot(i, a) {
1466
+ var t = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
1460
1467
  if (t != null) {
1461
- var e = [], n = !0, o = !1, c, r;
1468
+ var n = [], e = !0, o = !1, c, r;
1462
1469
  try {
1463
- for (t = t.call(a); !(n = (c = t.next()).done) && (e.push(c.value), !(i && e.length === i)); n = !0)
1470
+ for (t = t.call(i); !(e = (c = t.next()).done) && (n.push(c.value), !(a && n.length === a)); e = !0)
1464
1471
  ;
1465
- } catch (f) {
1466
- o = !0, r = f;
1472
+ } catch (v) {
1473
+ o = !0, r = v;
1467
1474
  } finally {
1468
1475
  try {
1469
- !n && t.return != null && t.return();
1476
+ !e && t.return != null && t.return();
1470
1477
  } finally {
1471
1478
  if (o) throw r;
1472
1479
  }
1473
1480
  }
1474
- return e;
1481
+ return n;
1475
1482
  }
1476
1483
  }
1477
- function it(a) {
1478
- if (Array.isArray(a)) return a;
1484
+ function ct(i) {
1485
+ if (Array.isArray(i)) return i;
1479
1486
  }
1480
- var tt = typeof Pa == "function" ? Pa : Pa.default, et = "file-invalid-type", nt = "file-too-large", pt = "file-too-small", ot = "too-many-files", ct = function() {
1481
- var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), e = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
1487
+ var lt = typeof Ri == "function" ? Ri : Ri.default, rt = "file-invalid-type", st = "file-too-large", dt = "file-too-small", mt = "too-many-files", ut = function() {
1488
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = a.split(","), n = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
1482
1489
  return {
1483
- code: et,
1484
- message: "File type must be ".concat(e)
1490
+ code: rt,
1491
+ message: "File type must be ".concat(n)
1485
1492
  };
1486
- }, ii = function(i) {
1493
+ }, na = function(a) {
1487
1494
  return {
1488
- code: nt,
1489
- message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1495
+ code: st,
1496
+ message: "File is larger than ".concat(a, " ").concat(a === 1 ? "byte" : "bytes")
1490
1497
  };
1491
- }, ti = function(i) {
1498
+ }, ea = function(a) {
1492
1499
  return {
1493
- code: pt,
1494
- message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1500
+ code: dt,
1501
+ message: "File is smaller than ".concat(a, " ").concat(a === 1 ? "byte" : "bytes")
1495
1502
  };
1496
- }, lt = {
1497
- code: ot,
1503
+ }, vt = {
1504
+ code: mt,
1498
1505
  message: "Too many files"
1499
1506
  };
1500
- function ui(a, i) {
1501
- var t = a.type === "application/x-moz-file" || tt(a, i);
1502
- return [t, t ? null : ct(i)];
1503
- }
1504
- function fi(a, i, t) {
1505
- if (K(a.size))
1506
- if (K(i) && K(t)) {
1507
- if (a.size > t) return [!1, ii(t)];
1508
- if (a.size < i) return [!1, ti(i)];
1507
+ function fa(i, a) {
1508
+ var t = i.type === "application/x-moz-file" || lt(i, a);
1509
+ return [t, t ? null : ut(a)];
1510
+ }
1511
+ function xa(i, a, t) {
1512
+ if (K(i.size))
1513
+ if (K(a) && K(t)) {
1514
+ if (i.size > t) return [!1, na(t)];
1515
+ if (i.size < a) return [!1, ea(a)];
1509
1516
  } else {
1510
- if (K(i) && a.size < i) return [!1, ti(i)];
1511
- if (K(t) && a.size > t) return [!1, ii(t)];
1517
+ if (K(a) && i.size < a) return [!1, ea(a)];
1518
+ if (K(t) && i.size > t) return [!1, na(t)];
1512
1519
  }
1513
1520
  return [!0, null];
1514
1521
  }
1515
- function K(a) {
1516
- return a != null;
1522
+ function K(i) {
1523
+ return i != null;
1517
1524
  }
1518
- function rt(a) {
1519
- var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, c = a.maxFiles, r = a.validator;
1520
- return !o && i.length > 1 || o && c >= 1 && i.length > c ? !1 : i.every(function(f) {
1521
- var h = ui(f, t), x = ta(h, 1), k = x[0], P = fi(f, e, n), R = ta(P, 1), j = R[0], I = r ? r(f) : null;
1522
- return k && j && !I;
1525
+ function ft(i) {
1526
+ var a = i.files, t = i.accept, n = i.minSize, e = i.maxSize, o = i.multiple, c = i.maxFiles, r = i.validator;
1527
+ return !o && a.length > 1 || o && c >= 1 && a.length > c ? !1 : a.every(function(v) {
1528
+ var h = fa(v, t), x = ti(h, 1), D = x[0], I = xa(v, n, e), R = ti(I, 1), y = R[0], z = r ? r(v) : null;
1529
+ return D && y && !z;
1523
1530
  });
1524
1531
  }
1525
- function ha(a) {
1526
- return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
1532
+ function yi(i) {
1533
+ return typeof i.isPropagationStopped == "function" ? i.isPropagationStopped() : typeof i.cancelBubble < "u" ? i.cancelBubble : !1;
1527
1534
  }
1528
- function va(a) {
1529
- return a.dataTransfer ? Array.prototype.some.call(a.dataTransfer.types, function(i) {
1530
- return i === "Files" || i === "application/x-moz-file";
1531
- }) : !!a.target && !!a.target.files;
1535
+ function xi(i) {
1536
+ return i.dataTransfer ? Array.prototype.some.call(i.dataTransfer.types, function(a) {
1537
+ return a === "Files" || a === "application/x-moz-file";
1538
+ }) : !!i.target && !!i.target.files;
1532
1539
  }
1533
- function ei(a) {
1534
- a.preventDefault();
1540
+ function pa(i) {
1541
+ i.preventDefault();
1535
1542
  }
1536
- function st(a) {
1537
- return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
1543
+ function xt(i) {
1544
+ return i.indexOf("MSIE") !== -1 || i.indexOf("Trident/") !== -1;
1538
1545
  }
1539
- function dt(a) {
1540
- return a.indexOf("Edge/") !== -1;
1546
+ function gt(i) {
1547
+ return i.indexOf("Edge/") !== -1;
1541
1548
  }
1542
- function mt() {
1543
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1544
- return st(a) || dt(a);
1549
+ function bt() {
1550
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1551
+ return xt(i) || gt(i);
1545
1552
  }
1546
- function O() {
1547
- for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
1548
- i[t] = arguments[t];
1549
- return function(e) {
1550
- for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), c = 1; c < n; c++)
1553
+ function _() {
1554
+ for (var i = arguments.length, a = new Array(i), t = 0; t < i; t++)
1555
+ a[t] = arguments[t];
1556
+ return function(n) {
1557
+ for (var e = arguments.length, o = new Array(e > 1 ? e - 1 : 0), c = 1; c < e; c++)
1551
1558
  o[c - 1] = arguments[c];
1552
- return i.some(function(r) {
1553
- return !ha(e) && r && r.apply(void 0, [e].concat(o)), ha(e);
1559
+ return a.some(function(r) {
1560
+ return !yi(n) && r && r.apply(void 0, [n].concat(o)), yi(n);
1554
1561
  });
1555
1562
  };
1556
1563
  }
1557
- function ut() {
1564
+ function ht() {
1558
1565
  return "showOpenFilePicker" in window;
1559
1566
  }
1560
- function ft(a) {
1561
- if (K(a)) {
1562
- var i = Object.entries(a).filter(function(t) {
1563
- var e = ta(t, 2), n = e[0], o = e[1], c = !0;
1564
- return vi(n) || (console.warn('Skipped "'.concat(n, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), c = !1), (!Array.isArray(o) || !o.every(xi)) && (console.warn('Skipped "'.concat(n, '" because an invalid file extension was provided.')), c = !1), c;
1565
- }).reduce(function(t, e) {
1566
- var n = ta(e, 2), o = n[0], c = n[1];
1567
- return ai(ai({}, t), {}, di({}, o, c));
1567
+ function yt(i) {
1568
+ if (K(i)) {
1569
+ var a = Object.entries(i).filter(function(t) {
1570
+ var n = ti(t, 2), e = n[0], o = n[1], c = !0;
1571
+ return ga(e) || (console.warn('Skipped "'.concat(e, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), c = !1), (!Array.isArray(o) || !o.every(ba)) && (console.warn('Skipped "'.concat(e, '" because an invalid file extension was provided.')), c = !1), c;
1572
+ }).reduce(function(t, n) {
1573
+ var e = ti(n, 2), o = e[0], c = e[1];
1574
+ return ta(ta({}, t), {}, ua({}, o, c));
1568
1575
  }, {});
1569
1576
  return [{
1570
1577
  // description is required due to https://crbug.com/1264708
1571
1578
  description: "Files",
1572
- accept: i
1579
+ accept: a
1573
1580
  }];
1574
1581
  }
1575
- return a;
1582
+ return i;
1576
1583
  }
1577
- function vt(a) {
1578
- if (K(a))
1579
- return Object.entries(a).reduce(function(i, t) {
1580
- var e = ta(t, 2), n = e[0], o = e[1];
1581
- return [].concat(Xa(i), [n], Xa(o));
1582
- }, []).filter(function(i) {
1583
- return vi(i) || xi(i);
1584
+ function wt(i) {
1585
+ if (K(i))
1586
+ return Object.entries(i).reduce(function(a, t) {
1587
+ var n = ti(t, 2), e = n[0], o = n[1];
1588
+ return [].concat(ia(a), [e], ia(o));
1589
+ }, []).filter(function(a) {
1590
+ return ga(a) || ba(a);
1584
1591
  }).join(",");
1585
1592
  }
1586
- function xt(a) {
1587
- return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
1593
+ function kt(i) {
1594
+ return i instanceof DOMException && (i.name === "AbortError" || i.code === i.ABORT_ERR);
1588
1595
  }
1589
- function gt(a) {
1590
- return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
1596
+ function jt(i) {
1597
+ return i instanceof DOMException && (i.name === "SecurityError" || i.code === i.SECURITY_ERR);
1591
1598
  }
1592
- function vi(a) {
1593
- return a === "audio/*" || a === "video/*" || a === "image/*" || a === "text/*" || a === "application/*" || /\w+\/[-+.\w]+/g.test(a);
1599
+ function ga(i) {
1600
+ return i === "audio/*" || i === "video/*" || i === "image/*" || i === "text/*" || i === "application/*" || /\w+\/[-+.\w]+/g.test(i);
1594
1601
  }
1595
- function xi(a) {
1596
- return /^.*\.[\w]+$/.test(a);
1602
+ function ba(i) {
1603
+ return /^.*\.[\w]+$/.test(i);
1597
1604
  }
1598
- var bt = ["children"], ht = ["open"], yt = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], wt = ["refKey", "onChange", "onClick"];
1599
- function kt(a) {
1600
- return Et(a) || Dt(a) || gi(a) || jt();
1605
+ var Dt = ["children"], zt = ["open"], Et = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], At = ["refKey", "onChange", "onClick"];
1606
+ function Ft(i) {
1607
+ return Pt(i) || _t(i) || ha(i) || Ot();
1601
1608
  }
1602
- function jt() {
1609
+ function Ot() {
1603
1610
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1604
1611
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1605
1612
  }
1606
- function Dt(a) {
1607
- if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1613
+ function _t(i) {
1614
+ if (typeof Symbol < "u" && i[Symbol.iterator] != null || i["@@iterator"] != null) return Array.from(i);
1608
1615
  }
1609
- function Et(a) {
1610
- if (Array.isArray(a)) return Ta(a);
1616
+ function Pt(i) {
1617
+ if (Array.isArray(i)) return Li(i);
1611
1618
  }
1612
- function Ia(a, i) {
1613
- return Ft(a) || At(a, i) || gi(a, i) || zt();
1619
+ function Si(i, a) {
1620
+ return St(i) || Rt(i, a) || ha(i, a) || It();
1614
1621
  }
1615
- function zt() {
1622
+ function It() {
1616
1623
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1617
1624
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1618
1625
  }
1619
- function gi(a, i) {
1620
- if (a) {
1621
- if (typeof a == "string") return Ta(a, i);
1622
- var t = Object.prototype.toString.call(a).slice(8, -1);
1623
- if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1624
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ta(a, i);
1626
+ function ha(i, a) {
1627
+ if (i) {
1628
+ if (typeof i == "string") return Li(i, a);
1629
+ var t = Object.prototype.toString.call(i).slice(8, -1);
1630
+ if (t === "Object" && i.constructor && (t = i.constructor.name), t === "Map" || t === "Set") return Array.from(i);
1631
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Li(i, a);
1625
1632
  }
1626
1633
  }
1627
- function Ta(a, i) {
1628
- (i == null || i > a.length) && (i = a.length);
1629
- for (var t = 0, e = new Array(i); t < i; t++)
1630
- e[t] = a[t];
1631
- return e;
1634
+ function Li(i, a) {
1635
+ (a == null || a > i.length) && (a = i.length);
1636
+ for (var t = 0, n = new Array(a); t < a; t++)
1637
+ n[t] = i[t];
1638
+ return n;
1632
1639
  }
1633
- function At(a, i) {
1634
- var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1640
+ function Rt(i, a) {
1641
+ var t = i == null ? null : typeof Symbol < "u" && i[Symbol.iterator] || i["@@iterator"];
1635
1642
  if (t != null) {
1636
- var e = [], n = !0, o = !1, c, r;
1643
+ var n = [], e = !0, o = !1, c, r;
1637
1644
  try {
1638
- for (t = t.call(a); !(n = (c = t.next()).done) && (e.push(c.value), !(i && e.length === i)); n = !0)
1645
+ for (t = t.call(i); !(e = (c = t.next()).done) && (n.push(c.value), !(a && n.length === a)); e = !0)
1639
1646
  ;
1640
- } catch (f) {
1641
- o = !0, r = f;
1647
+ } catch (v) {
1648
+ o = !0, r = v;
1642
1649
  } finally {
1643
1650
  try {
1644
- !n && t.return != null && t.return();
1651
+ !e && t.return != null && t.return();
1645
1652
  } finally {
1646
1653
  if (o) throw r;
1647
1654
  }
1648
1655
  }
1649
- return e;
1656
+ return n;
1650
1657
  }
1651
1658
  }
1652
- function Ft(a) {
1653
- if (Array.isArray(a)) return a;
1659
+ function St(i) {
1660
+ if (Array.isArray(i)) return i;
1654
1661
  }
1655
- function ni(a, i) {
1656
- var t = Object.keys(a);
1662
+ function oa(i, a) {
1663
+ var t = Object.keys(i);
1657
1664
  if (Object.getOwnPropertySymbols) {
1658
- var e = Object.getOwnPropertySymbols(a);
1659
- i && (e = e.filter(function(n) {
1660
- return Object.getOwnPropertyDescriptor(a, n).enumerable;
1661
- })), t.push.apply(t, e);
1665
+ var n = Object.getOwnPropertySymbols(i);
1666
+ a && (n = n.filter(function(e) {
1667
+ return Object.getOwnPropertyDescriptor(i, e).enumerable;
1668
+ })), t.push.apply(t, n);
1662
1669
  }
1663
1670
  return t;
1664
1671
  }
1665
- function u(a) {
1666
- for (var i = 1; i < arguments.length; i++) {
1667
- var t = arguments[i] != null ? arguments[i] : {};
1668
- i % 2 ? ni(Object(t), !0).forEach(function(e) {
1669
- qa(a, e, t[e]);
1670
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ni(Object(t)).forEach(function(e) {
1671
- Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1672
+ function u(i) {
1673
+ for (var a = 1; a < arguments.length; a++) {
1674
+ var t = arguments[a] != null ? arguments[a] : {};
1675
+ a % 2 ? oa(Object(t), !0).forEach(function(n) {
1676
+ Ci(i, n, t[n]);
1677
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(i, Object.getOwnPropertyDescriptors(t)) : oa(Object(t)).forEach(function(n) {
1678
+ Object.defineProperty(i, n, Object.getOwnPropertyDescriptor(t, n));
1672
1679
  });
1673
1680
  }
1674
- return a;
1681
+ return i;
1675
1682
  }
1676
- function qa(a, i, t) {
1677
- return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1683
+ function Ci(i, a, t) {
1684
+ return a in i ? Object.defineProperty(i, a, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : i[a] = t, i;
1678
1685
  }
1679
- function ya(a, i) {
1680
- if (a == null) return {};
1681
- var t = Ot(a, i), e, n;
1686
+ function wi(i, a) {
1687
+ if (i == null) return {};
1688
+ var t = qt(i, a), n, e;
1682
1689
  if (Object.getOwnPropertySymbols) {
1683
- var o = Object.getOwnPropertySymbols(a);
1684
- for (n = 0; n < o.length; n++)
1685
- e = o[n], !(i.indexOf(e) >= 0) && Object.prototype.propertyIsEnumerable.call(a, e) && (t[e] = a[e]);
1690
+ var o = Object.getOwnPropertySymbols(i);
1691
+ for (e = 0; e < o.length; e++)
1692
+ n = o[e], !(a.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(i, n) && (t[n] = i[n]);
1686
1693
  }
1687
1694
  return t;
1688
1695
  }
1689
- function Ot(a, i) {
1690
- if (a == null) return {};
1691
- var t = {}, e = Object.keys(a), n, o;
1692
- for (o = 0; o < e.length; o++)
1693
- n = e[o], !(i.indexOf(n) >= 0) && (t[n] = a[n]);
1696
+ function qt(i, a) {
1697
+ if (i == null) return {};
1698
+ var t = {}, n = Object.keys(i), e, o;
1699
+ for (o = 0; o < n.length; o++)
1700
+ e = n[o], !(a.indexOf(e) >= 0) && (t[e] = i[e]);
1694
1701
  return t;
1695
1702
  }
1696
- var La = /* @__PURE__ */ Ei(function(a, i) {
1697
- var t = a.children, e = ya(a, bt), n = hi(e), o = n.open, c = ya(n, ht);
1698
- return zi(i, function() {
1703
+ var ji = /* @__PURE__ */ Fa(function(i, a) {
1704
+ var t = i.children, n = wi(i, Dt), e = wa(n), o = e.open, c = wi(e, zt);
1705
+ return _a(a, function() {
1699
1706
  return {
1700
1707
  open: o
1701
1708
  };
1702
- }, [o]), /* @__PURE__ */ s.createElement(Ai, null, t(u(u({}, c), {}, {
1709
+ }, [o]), /* @__PURE__ */ Aa.createElement(Pa, null, t(u(u({}, c), {}, {
1703
1710
  open: o
1704
1711
  })));
1705
1712
  });
1706
- La.displayName = "Dropzone";
1707
- var bi = {
1713
+ ji.displayName = "Dropzone";
1714
+ var ya = {
1708
1715
  disabled: !1,
1709
- getFilesFromEvent: Ki,
1716
+ getFilesFromEvent: Ua,
1710
1717
  maxSize: 1 / 0,
1711
1718
  minSize: 0,
1712
1719
  multiple: !0,
@@ -1720,8 +1727,8 @@ var bi = {
1720
1727
  useFsAccessApi: !1,
1721
1728
  autoFocus: !1
1722
1729
  };
1723
- La.defaultProps = bi;
1724
- La.propTypes = {
1730
+ ji.defaultProps = ya;
1731
+ ji.propTypes = {
1725
1732
  /**
1726
1733
  * Render function that exposes the dropzone state and prop getter fns
1727
1734
  *
@@ -1737,7 +1744,7 @@ La.propTypes = {
1737
1744
  * @param {File[]} params.acceptedFiles Accepted files
1738
1745
  * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
1739
1746
  */
1740
- children: d.func,
1747
+ children: s.func,
1741
1748
  /**
1742
1749
  * Set accepted file types.
1743
1750
  * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
@@ -1745,90 +1752,90 @@ La.propTypes = {
1745
1752
  * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
1746
1753
  * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
1747
1754
  */
1748
- accept: d.objectOf(d.arrayOf(d.string)),
1755
+ accept: s.objectOf(s.arrayOf(s.string)),
1749
1756
  /**
1750
1757
  * Allow drag 'n' drop (or selection from the file dialog) of multiple files
1751
1758
  */
1752
- multiple: d.bool,
1759
+ multiple: s.bool,
1753
1760
  /**
1754
1761
  * If false, allow dropped items to take over the current browser window
1755
1762
  */
1756
- preventDropOnDocument: d.bool,
1763
+ preventDropOnDocument: s.bool,
1757
1764
  /**
1758
1765
  * If true, disables click to open the native file selection dialog
1759
1766
  */
1760
- noClick: d.bool,
1767
+ noClick: s.bool,
1761
1768
  /**
1762
1769
  * If true, disables SPACE/ENTER to open the native file selection dialog.
1763
1770
  * Note that it also stops tracking the focus state.
1764
1771
  */
1765
- noKeyboard: d.bool,
1772
+ noKeyboard: s.bool,
1766
1773
  /**
1767
1774
  * If true, disables drag 'n' drop
1768
1775
  */
1769
- noDrag: d.bool,
1776
+ noDrag: s.bool,
1770
1777
  /**
1771
1778
  * If true, stops drag event propagation to parents
1772
1779
  */
1773
- noDragEventsBubbling: d.bool,
1780
+ noDragEventsBubbling: s.bool,
1774
1781
  /**
1775
1782
  * Minimum file size (in bytes)
1776
1783
  */
1777
- minSize: d.number,
1784
+ minSize: s.number,
1778
1785
  /**
1779
1786
  * Maximum file size (in bytes)
1780
1787
  */
1781
- maxSize: d.number,
1788
+ maxSize: s.number,
1782
1789
  /**
1783
1790
  * Maximum accepted number of files
1784
1791
  * The default value is 0 which means there is no limitation to how many files are accepted.
1785
1792
  */
1786
- maxFiles: d.number,
1793
+ maxFiles: s.number,
1787
1794
  /**
1788
1795
  * Enable/disable the dropzone
1789
1796
  */
1790
- disabled: d.bool,
1797
+ disabled: s.bool,
1791
1798
  /**
1792
1799
  * Use this to provide a custom file aggregator
1793
1800
  *
1794
1801
  * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
1795
1802
  */
1796
- getFilesFromEvent: d.func,
1803
+ getFilesFromEvent: s.func,
1797
1804
  /**
1798
1805
  * Cb for when closing the file dialog with no selection
1799
1806
  */
1800
- onFileDialogCancel: d.func,
1807
+ onFileDialogCancel: s.func,
1801
1808
  /**
1802
1809
  * Cb for when opening the file dialog
1803
1810
  */
1804
- onFileDialogOpen: d.func,
1811
+ onFileDialogOpen: s.func,
1805
1812
  /**
1806
1813
  * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
1807
1814
  * to open the file picker instead of using an `<input type="file">` click event.
1808
1815
  */
1809
- useFsAccessApi: d.bool,
1816
+ useFsAccessApi: s.bool,
1810
1817
  /**
1811
1818
  * Set to true to focus the root element on render
1812
1819
  */
1813
- autoFocus: d.bool,
1820
+ autoFocus: s.bool,
1814
1821
  /**
1815
1822
  * Cb for when the `dragenter` event occurs.
1816
1823
  *
1817
1824
  * @param {DragEvent} event
1818
1825
  */
1819
- onDragEnter: d.func,
1826
+ onDragEnter: s.func,
1820
1827
  /**
1821
1828
  * Cb for when the `dragleave` event occurs
1822
1829
  *
1823
1830
  * @param {DragEvent} event
1824
1831
  */
1825
- onDragLeave: d.func,
1832
+ onDragLeave: s.func,
1826
1833
  /**
1827
1834
  * Cb for when the `dragover` event occurs
1828
1835
  *
1829
1836
  * @param {DragEvent} event
1830
1837
  */
1831
- onDragOver: d.func,
1838
+ onDragOver: s.func,
1832
1839
  /**
1833
1840
  * Cb for when the `drop` event occurs.
1834
1841
  * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
@@ -1859,7 +1866,7 @@ La.propTypes = {
1859
1866
  * @param {FileRejection[]} fileRejections
1860
1867
  * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
1861
1868
  */
1862
- onDrop: d.func,
1869
+ onDrop: s.func,
1863
1870
  /**
1864
1871
  * Cb for when the `drop` event occurs.
1865
1872
  * Note that if no files are accepted, this callback is not invoked.
@@ -1867,7 +1874,7 @@ La.propTypes = {
1867
1874
  * @param {File[]} files
1868
1875
  * @param {(DragEvent|Event)} event
1869
1876
  */
1870
- onDropAccepted: d.func,
1877
+ onDropAccepted: s.func,
1871
1878
  /**
1872
1879
  * Cb for when the `drop` event occurs.
1873
1880
  * Note that if no files are rejected, this callback is not invoked.
@@ -1875,21 +1882,21 @@ La.propTypes = {
1875
1882
  * @param {FileRejection[]} fileRejections
1876
1883
  * @param {(DragEvent|Event)} event
1877
1884
  */
1878
- onDropRejected: d.func,
1885
+ onDropRejected: s.func,
1879
1886
  /**
1880
1887
  * Cb for when there's some error from any of the promises.
1881
1888
  *
1882
1889
  * @param {Error} error
1883
1890
  */
1884
- onError: d.func,
1891
+ onError: s.func,
1885
1892
  /**
1886
1893
  * Custom validation function. It must return null if there's no errors.
1887
1894
  * @param {File} file
1888
1895
  * @returns {FileError|FileError[]|null}
1889
1896
  */
1890
- validator: d.func
1897
+ validator: s.func
1891
1898
  };
1892
- var Ca = {
1899
+ var $i = {
1893
1900
  isFocused: !1,
1894
1901
  isFileDialogActive: !1,
1895
1902
  isDragActive: !1,
@@ -1898,58 +1905,58 @@ var Ca = {
1898
1905
  acceptedFiles: [],
1899
1906
  fileRejections: []
1900
1907
  };
1901
- function hi() {
1902
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = u(u({}, bi), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, c = i.minSize, r = i.multiple, f = i.maxFiles, h = i.onDragEnter, x = i.onDragLeave, k = i.onDragOver, P = i.onDrop, R = i.onDropAccepted, j = i.onDropRejected, I = i.onFileDialogCancel, q = i.onFileDialogOpen, ea = i.useFsAccessApi, na = i.autoFocus, Z = i.preventDropOnDocument, D = i.noClick, S = i.noKeyboard, W = i.noDrag, z = i.noDragEventsBubbling, J = i.onError, C = i.validator, L = V(function() {
1903
- return vt(t);
1904
- }, [t]), pa = V(function() {
1905
- return ft(t);
1908
+ function wa() {
1909
+ var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, a = u(u({}, ya), i), t = a.accept, n = a.disabled, e = a.getFilesFromEvent, o = a.maxSize, c = a.minSize, r = a.multiple, v = a.maxFiles, h = a.onDragEnter, x = a.onDragLeave, D = a.onDragOver, I = a.onDrop, R = a.onDropAccepted, y = a.onDropRejected, z = a.onFileDialogCancel, T = a.onFileDialogOpen, ni = a.useFsAccessApi, ei = a.autoFocus, Z = a.preventDropOnDocument, k = a.noClick, S = a.noKeyboard, W = a.noDrag, A = a.noDragEventsBubbling, J = a.onError, L = a.validator, C = V(function() {
1910
+ return wt(t);
1911
+ }, [t]), pi = V(function() {
1912
+ return yt(t);
1906
1913
  }, [t]), X = V(function() {
1907
- return typeof q == "function" ? q : pi;
1908
- }, [q]), $ = V(function() {
1909
- return typeof I == "function" ? I : pi;
1910
- }, [I]), b = fa(null), y = fa(null), oa = Fi(_t, Ca), ca = Ia(oa, 2), A = ca[0], m = ca[1], F = A.isFocused, la = A.isFileDialogActive, B = fa(typeof window < "u" && window.isSecureContext && ea && ut()), Q = function() {
1911
- !B.current && la && setTimeout(function() {
1912
- if (y.current) {
1913
- var l = y.current.files;
1914
+ return typeof T == "function" ? T : ca;
1915
+ }, [T]), $ = V(function() {
1916
+ return typeof z == "function" ? z : ca;
1917
+ }, [z]), b = vi(null), w = vi(null), oi = Oa(Tt, $i), ci = Si(oi, 2), F = ci[0], m = ci[1], O = F.isFocused, li = F.isFileDialogActive, N = vi(typeof window < "u" && window.isSecureContext && ni && ht()), Q = function() {
1918
+ !N.current && li && setTimeout(function() {
1919
+ if (w.current) {
1920
+ var l = w.current.files;
1914
1921
  l.length || (m({
1915
1922
  type: "closeDialog"
1916
1923
  }), $());
1917
1924
  }
1918
1925
  }, 300);
1919
1926
  };
1920
- ia(function() {
1927
+ ai(function() {
1921
1928
  return window.addEventListener("focus", Q, !1), function() {
1922
1929
  window.removeEventListener("focus", Q, !1);
1923
1930
  };
1924
- }, [y, la, $, B]);
1925
- var T = fa([]), $a = function(l) {
1926
- b.current && b.current.contains(l.target) || (l.preventDefault(), T.current = []);
1931
+ }, [w, li, $, N]);
1932
+ var q = vi([]), Mi = function(l) {
1933
+ b.current && b.current.contains(l.target) || (l.preventDefault(), q.current = []);
1927
1934
  };
1928
- ia(function() {
1929
- return Z && (document.addEventListener("dragover", ei, !1), document.addEventListener("drop", $a, !1)), function() {
1930
- Z && (document.removeEventListener("dragover", ei), document.removeEventListener("drop", $a));
1935
+ ai(function() {
1936
+ return Z && (document.addEventListener("dragover", pa, !1), document.addEventListener("drop", Mi, !1)), function() {
1937
+ Z && (document.removeEventListener("dragover", pa), document.removeEventListener("drop", Mi));
1931
1938
  };
1932
- }, [b, Z]), ia(function() {
1933
- return !e && na && b.current && b.current.focus(), function() {
1939
+ }, [b, Z]), ai(function() {
1940
+ return !n && ei && b.current && b.current.focus(), function() {
1934
1941
  };
1935
- }, [b, na, e]);
1942
+ }, [b, ei, n]);
1936
1943
  var M = E(function(p) {
1937
1944
  J ? J(p) : console.error(p);
1938
- }, [J]), Ma = E(function(p) {
1939
- p.preventDefault(), p.persist(), ma(p), T.current = [].concat(kt(T.current), [p.target]), va(p) && Promise.resolve(n(p)).then(function(l) {
1940
- if (!(ha(p) && !z)) {
1941
- var v = l.length, g = v > 0 && rt({
1945
+ }, [J]), Ki = E(function(p) {
1946
+ p.preventDefault(), p.persist(), mi(p), q.current = [].concat(Ft(q.current), [p.target]), xi(p) && Promise.resolve(e(p)).then(function(l) {
1947
+ if (!(yi(p) && !A)) {
1948
+ var f = l.length, g = f > 0 && ft({
1942
1949
  files: l,
1943
- accept: L,
1950
+ accept: C,
1944
1951
  minSize: c,
1945
1952
  maxSize: o,
1946
1953
  multiple: r,
1947
- maxFiles: f,
1948
- validator: C
1949
- }), w = v > 0 && !g;
1954
+ maxFiles: v,
1955
+ validator: L
1956
+ }), j = f > 0 && !g;
1950
1957
  m({
1951
1958
  isDragAccept: g,
1952
- isDragReject: w,
1959
+ isDragReject: j,
1953
1960
  isDragActive: !0,
1954
1961
  type: "setDraggedFiles"
1955
1962
  }), h && h(p);
@@ -1957,128 +1964,128 @@ function hi() {
1957
1964
  }).catch(function(l) {
1958
1965
  return M(l);
1959
1966
  });
1960
- }, [n, h, M, z, L, c, o, r, f, C]), Ka = E(function(p) {
1961
- p.preventDefault(), p.persist(), ma(p);
1962
- var l = va(p);
1967
+ }, [e, h, M, A, C, c, o, r, v, L]), Hi = E(function(p) {
1968
+ p.preventDefault(), p.persist(), mi(p);
1969
+ var l = xi(p);
1963
1970
  if (l && p.dataTransfer)
1964
1971
  try {
1965
1972
  p.dataTransfer.dropEffect = "copy";
1966
1973
  } catch {
1967
1974
  }
1968
- return l && k && k(p), !1;
1969
- }, [k, z]), Ha = E(function(p) {
1970
- p.preventDefault(), p.persist(), ma(p);
1971
- var l = T.current.filter(function(g) {
1975
+ return l && D && D(p), !1;
1976
+ }, [D, A]), Wi = E(function(p) {
1977
+ p.preventDefault(), p.persist(), mi(p);
1978
+ var l = q.current.filter(function(g) {
1972
1979
  return b.current && b.current.contains(g);
1973
- }), v = l.indexOf(p.target);
1974
- v !== -1 && l.splice(v, 1), T.current = l, !(l.length > 0) && (m({
1980
+ }), f = l.indexOf(p.target);
1981
+ f !== -1 && l.splice(f, 1), q.current = l, !(l.length > 0) && (m({
1975
1982
  type: "setDraggedFiles",
1976
1983
  isDragActive: !1,
1977
1984
  isDragAccept: !1,
1978
1985
  isDragReject: !1
1979
- }), va(p) && x && x(p));
1980
- }, [b, x, z]), ra = E(function(p, l) {
1981
- var v = [], g = [];
1982
- p.forEach(function(w) {
1983
- var aa = ui(w, L), Y = Ia(aa, 2), ja = Y[0], Da = Y[1], Ea = fi(w, c, o), ua = Ia(Ea, 2), za = ua[0], Aa = ua[1], Fa = C ? C(w) : null;
1984
- if (ja && za && !Fa)
1985
- v.push(w);
1986
+ }), xi(p) && x && x(p));
1987
+ }, [b, x, A]), ri = E(function(p, l) {
1988
+ var f = [], g = [];
1989
+ p.forEach(function(j) {
1990
+ var ii = fa(j, C), Y = Si(ii, 2), zi = Y[0], Ei = Y[1], Ai = xa(j, c, o), ui = Si(Ai, 2), Fi = ui[0], Oi = ui[1], _i = L ? L(j) : null;
1991
+ if (zi && Fi && !_i)
1992
+ f.push(j);
1986
1993
  else {
1987
- var Oa = [Da, Aa];
1988
- Fa && (Oa = Oa.concat(Fa)), g.push({
1989
- file: w,
1990
- errors: Oa.filter(function(Di) {
1991
- return Di;
1994
+ var Pi = [Ei, Oi];
1995
+ _i && (Pi = Pi.concat(_i)), g.push({
1996
+ file: j,
1997
+ errors: Pi.filter(function(Ea) {
1998
+ return Ea;
1992
1999
  })
1993
2000
  });
1994
2001
  }
1995
- }), (!r && v.length > 1 || r && f >= 1 && v.length > f) && (v.forEach(function(w) {
2002
+ }), (!r && f.length > 1 || r && v >= 1 && f.length > v) && (f.forEach(function(j) {
1996
2003
  g.push({
1997
- file: w,
1998
- errors: [lt]
2004
+ file: j,
2005
+ errors: [vt]
1999
2006
  });
2000
- }), v.splice(0)), m({
2001
- acceptedFiles: v,
2007
+ }), f.splice(0)), m({
2008
+ acceptedFiles: f,
2002
2009
  fileRejections: g,
2003
2010
  isDragReject: g.length > 0,
2004
2011
  type: "setFiles"
2005
- }), P && P(v, g, l), g.length > 0 && j && j(g, l), v.length > 0 && R && R(v, l);
2006
- }, [m, r, L, c, o, f, P, R, j, C]), sa = E(function(p) {
2007
- p.preventDefault(), p.persist(), ma(p), T.current = [], va(p) && Promise.resolve(n(p)).then(function(l) {
2008
- ha(p) && !z || ra(l, p);
2012
+ }), I && I(f, g, l), g.length > 0 && y && y(g, l), f.length > 0 && R && R(f, l);
2013
+ }, [m, r, C, c, o, v, I, R, y, L]), si = E(function(p) {
2014
+ p.preventDefault(), p.persist(), mi(p), q.current = [], xi(p) && Promise.resolve(e(p)).then(function(l) {
2015
+ yi(p) && !A || ri(l, p);
2009
2016
  }).catch(function(l) {
2010
2017
  return M(l);
2011
2018
  }), m({
2012
2019
  type: "reset"
2013
2020
  });
2014
- }, [n, ra, M, z]), N = E(function() {
2015
- if (B.current) {
2021
+ }, [e, ri, M, A]), U = E(function() {
2022
+ if (N.current) {
2016
2023
  m({
2017
2024
  type: "openDialog"
2018
2025
  }), X();
2019
2026
  var p = {
2020
2027
  multiple: r,
2021
- types: pa
2028
+ types: pi
2022
2029
  };
2023
2030
  window.showOpenFilePicker(p).then(function(l) {
2024
- return n(l);
2031
+ return e(l);
2025
2032
  }).then(function(l) {
2026
- ra(l, null), m({
2033
+ ri(l, null), m({
2027
2034
  type: "closeDialog"
2028
2035
  });
2029
2036
  }).catch(function(l) {
2030
- xt(l) ? ($(l), m({
2037
+ kt(l) ? ($(l), m({
2031
2038
  type: "closeDialog"
2032
- })) : gt(l) ? (B.current = !1, y.current ? (y.current.value = null, y.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
2039
+ })) : jt(l) ? (N.current = !1, w.current ? (w.current.value = null, w.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
2033
2040
  });
2034
2041
  return;
2035
2042
  }
2036
- y.current && (m({
2043
+ w.current && (m({
2037
2044
  type: "openDialog"
2038
- }), X(), y.current.value = null, y.current.click());
2039
- }, [m, X, $, ea, ra, M, pa, r]), Wa = E(function(p) {
2040
- !b.current || !b.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), N());
2041
- }, [b, N]), Ba = E(function() {
2045
+ }), X(), w.current.value = null, w.current.click());
2046
+ }, [m, X, $, ni, ri, M, pi, r]), Ni = E(function(p) {
2047
+ !b.current || !b.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), U());
2048
+ }, [b, U]), Ui = E(function() {
2042
2049
  m({
2043
2050
  type: "focus"
2044
2051
  });
2045
- }, []), Na = E(function() {
2052
+ }, []), Bi = E(function() {
2046
2053
  m({
2047
2054
  type: "blur"
2048
2055
  });
2049
- }, []), Ua = E(function() {
2050
- D || (mt() ? setTimeout(N, 0) : N());
2051
- }, [D, N]), U = function(l) {
2052
- return e ? null : l;
2053
- }, ka = function(l) {
2054
- return S ? null : U(l);
2055
- }, da = function(l) {
2056
- return W ? null : U(l);
2057
- }, ma = function(l) {
2058
- z && l.stopPropagation();
2059
- }, wi = V(function() {
2056
+ }, []), Yi = E(function() {
2057
+ k || (bt() ? setTimeout(U, 0) : U());
2058
+ }, [k, U]), B = function(l) {
2059
+ return n ? null : l;
2060
+ }, Di = function(l) {
2061
+ return S ? null : B(l);
2062
+ }, di = function(l) {
2063
+ return W ? null : B(l);
2064
+ }, mi = function(l) {
2065
+ A && l.stopPropagation();
2066
+ }, ja = V(function() {
2060
2067
  return function() {
2061
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.role, w = p.onKeyDown, aa = p.onFocus, Y = p.onBlur, ja = p.onClick, Da = p.onDragEnter, Ea = p.onDragOver, ua = p.onDragLeave, za = p.onDrop, Aa = ya(p, yt);
2062
- return u(u(qa({
2063
- onKeyDown: ka(O(w, Wa)),
2064
- onFocus: ka(O(aa, Ba)),
2065
- onBlur: ka(O(Y, Na)),
2066
- onClick: U(O(ja, Ua)),
2067
- onDragEnter: da(O(Da, Ma)),
2068
- onDragOver: da(O(Ea, Ka)),
2069
- onDragLeave: da(O(ua, Ha)),
2070
- onDrop: da(O(za, sa)),
2068
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.role, j = p.onKeyDown, ii = p.onFocus, Y = p.onBlur, zi = p.onClick, Ei = p.onDragEnter, Ai = p.onDragOver, ui = p.onDragLeave, Fi = p.onDrop, Oi = wi(p, Et);
2069
+ return u(u(Ci({
2070
+ onKeyDown: Di(_(j, Ni)),
2071
+ onFocus: Di(_(ii, Ui)),
2072
+ onBlur: Di(_(Y, Bi)),
2073
+ onClick: B(_(zi, Yi)),
2074
+ onDragEnter: di(_(Ei, Ki)),
2075
+ onDragOver: di(_(Ai, Hi)),
2076
+ onDragLeave: di(_(ui, Wi)),
2077
+ onDrop: di(_(Fi, si)),
2071
2078
  role: typeof g == "string" && g !== "" ? g : "presentation"
2072
- }, v, b), !e && !S ? {
2079
+ }, f, b), !n && !S ? {
2073
2080
  tabIndex: 0
2074
- } : {}), Aa);
2081
+ } : {}), Oi);
2075
2082
  };
2076
- }, [b, Wa, Ba, Na, Ua, Ma, Ka, Ha, sa, S, W, e]), ki = E(function(p) {
2083
+ }, [b, Ni, Ui, Bi, Yi, Ki, Hi, Wi, si, S, W, n]), Da = E(function(p) {
2077
2084
  p.stopPropagation();
2078
- }, []), ji = V(function() {
2085
+ }, []), za = V(function() {
2079
2086
  return function() {
2080
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.onChange, w = p.onClick, aa = ya(p, wt), Y = qa({
2081
- accept: L,
2087
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.onChange, j = p.onClick, ii = wi(p, At), Y = Ci({
2088
+ accept: C,
2082
2089
  multiple: r,
2083
2090
  type: "file",
2084
2091
  style: {
@@ -2093,68 +2100,95 @@ function hi() {
2093
2100
  width: "1px",
2094
2101
  whiteSpace: "nowrap"
2095
2102
  },
2096
- onChange: U(O(g, sa)),
2097
- onClick: U(O(w, ki)),
2103
+ onChange: B(_(g, si)),
2104
+ onClick: B(_(j, Da)),
2098
2105
  tabIndex: -1
2099
- }, v, y);
2100
- return u(u({}, Y), aa);
2106
+ }, f, w);
2107
+ return u(u({}, Y), ii);
2101
2108
  };
2102
- }, [y, t, r, sa, e]);
2103
- return u(u({}, A), {}, {
2104
- isFocused: F && !e,
2105
- getRootProps: wi,
2106
- getInputProps: ji,
2109
+ }, [w, t, r, si, n]);
2110
+ return u(u({}, F), {}, {
2111
+ isFocused: O && !n,
2112
+ getRootProps: ja,
2113
+ getInputProps: za,
2107
2114
  rootRef: b,
2108
- inputRef: y,
2109
- open: U(N)
2115
+ inputRef: w,
2116
+ open: B(U)
2110
2117
  });
2111
2118
  }
2112
- function _t(a, i) {
2113
- switch (i.type) {
2119
+ function Tt(i, a) {
2120
+ switch (a.type) {
2114
2121
  case "focus":
2115
- return u(u({}, a), {}, {
2122
+ return u(u({}, i), {}, {
2116
2123
  isFocused: !0
2117
2124
  });
2118
2125
  case "blur":
2119
- return u(u({}, a), {}, {
2126
+ return u(u({}, i), {}, {
2120
2127
  isFocused: !1
2121
2128
  });
2122
2129
  case "openDialog":
2123
- return u(u({}, Ca), {}, {
2130
+ return u(u({}, $i), {}, {
2124
2131
  isFileDialogActive: !0
2125
2132
  });
2126
2133
  case "closeDialog":
2127
- return u(u({}, a), {}, {
2134
+ return u(u({}, i), {}, {
2128
2135
  isFileDialogActive: !1
2129
2136
  });
2130
2137
  case "setDraggedFiles":
2131
- return u(u({}, a), {}, {
2132
- isDragActive: i.isDragActive,
2133
- isDragAccept: i.isDragAccept,
2134
- isDragReject: i.isDragReject
2138
+ return u(u({}, i), {}, {
2139
+ isDragActive: a.isDragActive,
2140
+ isDragAccept: a.isDragAccept,
2141
+ isDragReject: a.isDragReject
2135
2142
  });
2136
2143
  case "setFiles":
2137
- return u(u({}, a), {}, {
2138
- acceptedFiles: i.acceptedFiles,
2139
- fileRejections: i.fileRejections,
2140
- isDragReject: i.isDragReject
2144
+ return u(u({}, i), {}, {
2145
+ acceptedFiles: a.acceptedFiles,
2146
+ fileRejections: a.fileRejections,
2147
+ isDragReject: a.isDragReject
2141
2148
  });
2142
2149
  case "reset":
2143
- return u({}, Ca);
2150
+ return u({}, $i);
2144
2151
  default:
2145
- return a;
2152
+ return i;
2146
2153
  }
2147
2154
  }
2148
- function pi() {
2155
+ function ca() {
2149
2156
  }
2150
- const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2151
- ({ disabled: a, isDragAccept: i, isDragReject: t }) => _a`
2152
- ${_("defaultFields.default")};
2153
- ${_("fileDrops.default")};
2154
- ${i && _("fileDrops.dragAccept")};
2155
- ${t && _a`
2156
- border-color: ${_("defaultFields.variants.danger.borderColor")};
2157
- ${_("fileDrops.dragReject")}
2157
+ const Lt = ({
2158
+ file: i,
2159
+ fileName: a,
2160
+ forceFileType: t,
2161
+ previewButtonText: n = "Preview"
2162
+ }) => {
2163
+ if (!i) return null;
2164
+ const e = typeof i == "string", o = $a(i, t), c = i instanceof File ? Ma(i) : null, r = e && a ? a : sa(i);
2165
+ return /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2166
+ /* @__PURE__ */ d.jsx(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }),
2167
+ /* @__PURE__ */ d.jsx(bi, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4", children: r }),
2168
+ !e && /* @__PURE__ */ d.jsx(bi, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm", children: c }),
2169
+ e && /* @__PURE__ */ d.jsxs(gi, { as: "a", href: i, mt: "md", rel: "noopener", size: "sm", target: "_blank", children: [
2170
+ /* @__PURE__ */ d.jsx("span", { children: n }),
2171
+ /* @__PURE__ */ d.jsx(Ka, {})
2172
+ ] })
2173
+ ] });
2174
+ }, la = ({
2175
+ disabled: i,
2176
+ fileButtonText: a = "Browse file",
2177
+ hint: t = "Drag & drop a file here or",
2178
+ openFile: n,
2179
+ title: e = "Add file"
2180
+ }) => /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2181
+ /* @__PURE__ */ d.jsx(bi, { color: "neutral-90", m: "0", variant: "h4", children: e }),
2182
+ /* @__PURE__ */ d.jsx(bi, { color: "beige-70", m: "0", mt: "xs", variant: "sm", children: t }),
2183
+ /* @__PURE__ */ d.jsx(gi, { disabled: i, mt: "lg", onClick: n, type: "button", children: a })
2184
+ ] }), Ct = ki.divBox.withConfig({ shouldForwardProp: La })(
2185
+ ({ disabled: i, isDragAccept: a, isDragReject: t }) => Ii`
2186
+ ${P("defaultFields.default")};
2187
+ ${P("fileDrops.default")};
2188
+ ${a && P("fileDrops.dragAccept")};
2189
+ ${t && Ii`
2190
+ border-color: ${P("defaultFields.variants.danger.borderColor")};
2191
+ ${P("fileDrops.dragReject")}
2158
2192
  `};
2159
2193
  position: relative;
2160
2194
  display: flex;
@@ -2164,163 +2198,166 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2164
2198
  transition: medium;
2165
2199
 
2166
2200
  &:focus {
2167
- ${_("defaultFields.focused.default")};
2201
+ ${P("defaultFields.focused.default")};
2168
2202
  }
2169
2203
 
2170
- ${a && _a`
2171
- ${_("defaultFields.disabled")};
2172
- ${_("fileDrops.disabled")};
2204
+ ${i && Ii`
2205
+ ${P("defaultFields.disabled")};
2206
+ ${P("fileDrops.disabled")};
2173
2207
  `};
2174
2208
  `
2175
- ), It = wa.div`
2209
+ ), $t = ki.div`
2176
2210
  width: 100%;
2177
2211
  height: 100%;
2178
2212
  display: flex;
2179
2213
  flex-direction: column;
2180
2214
  align-items: center;
2181
2215
  justify-content: center;
2182
- `, yi = wa.imgBox`
2216
+ `, ka = ki.imgBox`
2183
2217
  max-height: 100%;
2184
2218
  max-width: 100%;
2185
2219
  object-fit: contain;
2186
- `, Rt = wa.div`
2220
+ `, Mt = ki.div`
2187
2221
  position: absolute;
2188
- top: ${_.space("md")};
2189
- right: ${_.space("md")};
2222
+ top: ${P.space("md")};
2223
+ right: ${P.space("md")};
2190
2224
  display: flex;
2191
2225
  gap: xs;
2192
- `, oi = ({
2193
- disabled: a,
2194
- fileButtonText: i = "Browse file",
2195
- hint: t = "Drag & drop a file here or",
2196
- openFile: e,
2197
- title: n = "Add file"
2198
- }) => /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", m: "0", variant: "h4" }, n), /* @__PURE__ */ s.createElement(xa, { color: "beige-70", m: "0", mt: "xs", variant: "sm" }, t), /* @__PURE__ */ s.createElement(ga, { disabled: a, mt: "lg", onClick: e, type: "button" }, i)), St = ({
2199
- file: a,
2200
- fileName: i,
2201
- forceFileType: t,
2202
- previewButtonText: e = "Preview"
2203
- }) => {
2204
- const n = typeof a == "string", o = Ii(a, t), c = a instanceof File ? Ri(a) : null, r = n && i ? i : li(a);
2205
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }), /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4" }, r), !n && /* @__PURE__ */ s.createElement(xa, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm" }, c), n && /* @__PURE__ */ s.createElement(ga, { as: "a", href: a, mt: "md", rel: "noopener", size: "sm", target: "_blank" }, /* @__PURE__ */ s.createElement("span", null, e), /* @__PURE__ */ s.createElement(Pi, null)));
2206
- }, Tt = ({
2207
- disabled: a,
2208
- error: i,
2226
+ `, Kt = ({
2227
+ disabled: i,
2228
+ error: a,
2209
2229
  file: t,
2210
- fileName: e,
2211
- fileUrl: n,
2230
+ fileName: n,
2231
+ fileUrl: e,
2212
2232
  forceFileType: o,
2213
2233
  isAnImage: c,
2214
2234
  isHoverAccept: r,
2215
- isHoverReject: f,
2235
+ isHoverReject: v,
2216
2236
  openFile: h,
2217
2237
  wordings: x
2218
- }) => r ? /* @__PURE__ */ s.createElement(Si, null) : f ? /* @__PURE__ */ s.createElement(Ti, null) : i ? /* @__PURE__ */ s.createElement(oi, { openFile: h, ...x }) : n ? c ? /* @__PURE__ */ s.createElement(yi, { src: n }) : /* @__PURE__ */ s.createElement(St, { file: t, fileName: e, forceFileType: o, ...x }) : /* @__PURE__ */ s.createElement(oi, { disabled: a, openFile: h, ...x }), ci = /\.(jpeg|jpg|gif|png|webp)$/, qt = (a) => a ? typeof a == "string" ? !!li(a).match(ci) : a.name ? !!a.name.match(ci) : !1 : !1, Ct = (a) => {
2219
- let i;
2220
- if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
2221
- return i;
2238
+ }) => r ? /* @__PURE__ */ d.jsx(Ra, {}) : v ? /* @__PURE__ */ d.jsx(Sa, {}) : a ? /* @__PURE__ */ d.jsx(la, { openFile: h, ...x }) : e ? c ? /* @__PURE__ */ d.jsx(ka, { src: e }) : /* @__PURE__ */ d.jsx(Lt, { file: t, fileName: n, forceFileType: o, ...x }) : /* @__PURE__ */ d.jsx(la, { disabled: i, openFile: h, ...x }), ra = /\.(jpeg|jpg|gif|png|webp)$/, Ht = (i) => {
2239
+ if (!i) return !1;
2240
+ if (typeof i == "string") {
2241
+ const a = sa(i);
2242
+ return !!a && !!a.match(ra);
2243
+ } else
2244
+ return i.name ? !!i.name.match(ra) : !1;
2245
+ }, Wt = (i) => {
2246
+ let a;
2247
+ if (i instanceof File ? a = i.preview : a = i, typeof a != "string" || a.startsWith("blob:"))
2248
+ return a;
2222
2249
  if (typeof window < "u")
2223
2250
  try {
2224
- return new URL(i);
2251
+ return new URL(a);
2225
2252
  } catch {
2226
2253
  return;
2227
2254
  }
2228
- }, Lt = hi, $t = 2e6, Mt = "ERROR_INVALID_TYPE", Kt = "ERROR_INVALID_SIZE", Ht = _i(
2255
+ }, Nt = wa || ji.useDropzone, Ut = 2e6, Bt = "ERROR_INVALID_TYPE", Yt = "ERROR_INVALID_SIZE", Vt = Ca(
2229
2256
  ({
2230
- accept: a = {
2257
+ accept: i = {
2231
2258
  "image/*": []
2232
2259
  },
2233
- children: i = Tt,
2260
+ children: a = Kt,
2234
2261
  dataTestId: t,
2235
- disabled: e,
2236
- fileName: n,
2262
+ disabled: n,
2263
+ fileName: e,
2237
2264
  forceFileType: o,
2238
2265
  handleAddFile: c,
2239
2266
  handleRemoveFile: r,
2240
- isClearable: f,
2267
+ isClearable: v,
2241
2268
  isEditable: h,
2242
- maxSize: x = $t,
2243
- multiple: k,
2244
- name: P,
2269
+ maxSize: x = Ut,
2270
+ multiple: D,
2271
+ name: I,
2245
2272
  onBlur: R,
2246
- onChange: j,
2247
- onError: I,
2248
- value: q,
2249
- wordings: ea,
2250
- ...na
2273
+ onChange: y,
2274
+ onError: z,
2275
+ value: T,
2276
+ wordings: ni,
2277
+ ...ei
2251
2278
  }, Z) => {
2252
- const [D, S] = Ya(q), [W, z] = Ya(void 0);
2253
- ia(() => {
2254
- S(q);
2255
- }, [q]), ia(() => () => D && D instanceof File && URL.revokeObjectURL(D.preview), [D]);
2256
- const J = (A) => {
2257
- const [m] = A;
2258
- m instanceof File && (m.preview = URL.createObjectURL(m)), S(m), z(null);
2259
- const F = Va({ name: P, value: m });
2260
- j && j(F), c && c(F);
2261
- }, C = (A, m) => {
2262
- let F;
2263
- A.map(({ errors: la }) => {
2264
- la.map((B) => {
2265
- const { code: Q, message: T } = B;
2266
- Q === "file-invalid-type" ? F = Mt : Q === "file-too-large" ? F = Kt : F = T;
2279
+ const [k, S] = Vi(T), [W, A] = Vi(null);
2280
+ ai(() => {
2281
+ S(T);
2282
+ }, [T]), ai(() => () => {
2283
+ k && k instanceof File && k.preview && URL.revokeObjectURL(k.preview);
2284
+ }, [k]);
2285
+ const J = (F) => {
2286
+ const [m] = F;
2287
+ m instanceof File && (m.preview = URL.createObjectURL(m)), S(m), A(null);
2288
+ const O = Gi({ name: I, value: m });
2289
+ y == null || y(O), c == null || c(O);
2290
+ }, L = (F, m) => {
2291
+ let O = null;
2292
+ F.map(({ errors: li }) => {
2293
+ li.map((N) => {
2294
+ const { code: Q, message: q } = N;
2295
+ Q === "file-invalid-type" ? O = Bt : Q === "file-too-large" ? O = Yt : O = q;
2267
2296
  });
2268
- }), S(null), z(F), I && I(F), j && j(m), R && R();
2269
- }, L = (A) => {
2270
- A.preventDefault(), S(null), z(null);
2271
- const m = Va({ name: P, value: null });
2272
- j && j(m), r && r(m);
2273
- }, { getInputProps: pa, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: y, open: oa } = Lt({
2274
- accept: a,
2275
- disabled: e,
2297
+ }), S(null), A(O), O && (z == null || z(O)), y == null || y(m), R == null || R();
2298
+ }, C = (F) => {
2299
+ F.preventDefault(), S(null), A(null);
2300
+ const m = Gi({ name: I, value: null });
2301
+ y == null || y(m), r == null || r(m);
2302
+ }, { getInputProps: pi, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: w, open: oi } = Nt({
2303
+ accept: i,
2304
+ disabled: n,
2276
2305
  maxSize: x,
2277
- multiple: k,
2306
+ multiple: D,
2278
2307
  noClick: !0,
2279
2308
  onDropAccepted: J,
2280
- onDropRejected: C
2281
- }), ca = (A) => I(A);
2282
- return /* @__PURE__ */ s.createElement(
2283
- Pt,
2309
+ onDropRejected: L
2310
+ }), ci = (F) => z == null ? void 0 : z(F);
2311
+ return /* @__PURE__ */ d.jsxs(
2312
+ Ct,
2284
2313
  {
2285
2314
  ...X({
2286
2315
  "data-testid": t,
2316
+ disabled: n,
2287
2317
  handleRemoveFile: r,
2288
- isEditable: h,
2289
- isDragActive: b,
2318
+ isClearable: v,
2290
2319
  isDragAccept: $,
2291
- isDragReject: y,
2292
- isClearable: f,
2293
- disabled: e,
2320
+ isDragActive: b,
2321
+ isDragReject: w,
2322
+ isEditable: h,
2294
2323
  ref: Z
2295
2324
  }),
2296
- ...na
2297
- },
2298
- /* @__PURE__ */ s.createElement(
2299
- "input",
2300
- {
2301
- ...pa({ disabled: e, multiple: k, name: P, onError: ca }),
2302
- style: { display: "block", opacity: 0, height: 0, width: 0 }
2303
- }
2304
- ),
2305
- /* @__PURE__ */ s.createElement(It, null, i({
2306
- disabled: e,
2307
- error: W,
2308
- file: D,
2309
- fileName: n,
2310
- fileUrl: D && Ct(D),
2311
- forceFileType: o,
2312
- isAnImage: o === "image" || qt(D),
2313
- isHoverAccept: $,
2314
- isHoverReject: y,
2315
- openFile: oa,
2316
- wordings: ea
2317
- }), !!D && (W || h || f) && /* @__PURE__ */ s.createElement(Rt, null, (W || h) && /* @__PURE__ */ s.createElement(ga, { onClick: oa, shape: "circle", size: "sm", type: "button", variant: "tertiary" }, /* @__PURE__ */ s.createElement(qi, null)), f && /* @__PURE__ */ s.createElement(ga, { danger: !0, onClick: L, shape: "circle", size: "sm", type: "button" }, /* @__PURE__ */ s.createElement(Ci, null))))
2325
+ ...ei,
2326
+ children: [
2327
+ /* @__PURE__ */ d.jsx(
2328
+ "input",
2329
+ {
2330
+ ...pi({ disabled: n, multiple: D, name: I, onError: ci }),
2331
+ style: { display: "block", height: 0, opacity: 0, width: 0 }
2332
+ }
2333
+ ),
2334
+ /* @__PURE__ */ d.jsxs($t, { children: [
2335
+ a({
2336
+ disabled: n,
2337
+ error: W,
2338
+ file: k,
2339
+ fileName: e,
2340
+ fileUrl: k && Wt(k),
2341
+ forceFileType: o,
2342
+ isAnImage: o === "image" || Ht(k),
2343
+ isHoverAccept: $,
2344
+ isHoverReject: w,
2345
+ openFile: oi,
2346
+ wordings: ni
2347
+ }),
2348
+ !!k && (W || h || v) && /* @__PURE__ */ d.jsxs(Mt, { children: [
2349
+ (W || h) && /* @__PURE__ */ d.jsx(gi, { onClick: oi, shape: "circle", size: "sm", type: "button", variant: "tertiary", children: /* @__PURE__ */ d.jsx(qa, {}) }),
2350
+ v && /* @__PURE__ */ d.jsx(gi, { danger: !0, onClick: C, shape: "circle", size: "sm", type: "button", children: /* @__PURE__ */ d.jsx(Ta, {}) })
2351
+ ] })
2352
+ ] })
2353
+ ]
2354
+ }
2318
2355
  );
2319
2356
  }
2320
2357
  );
2321
- Ht.displayName = "FileDrop";
2322
- const ae = yi;
2358
+ Vt.displayName = "FileDrop";
2359
+ const rn = ka;
2323
2360
  export {
2324
- Ht as FileDrop,
2325
- ae as ImagePreview
2361
+ Vt as FileDrop,
2362
+ rn as ImagePreview
2326
2363
  };