@keboola/design 10.1.0 → 11.0.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 (504) hide show
  1. package/AGENTS.md +2 -0
  2. package/dist/MermaidDiagram-ZU5KAVRT.js +18 -0
  3. package/dist/{MermaidDiagram-EOKJHQQV.js.map → MermaidDiagram-ZU5KAVRT.js.map} +1 -1
  4. package/dist/charts.d.ts +14 -8
  5. package/dist/charts.js +6 -1
  6. package/dist/charts.js.map +1 -1
  7. package/dist/chunk-2YYJDKSP.js +51 -0
  8. package/dist/chunk-2YYJDKSP.js.map +1 -0
  9. package/dist/chunk-3P5UUCFI.js +385 -0
  10. package/dist/chunk-3P5UUCFI.js.map +1 -0
  11. package/dist/chunk-3QDFDDWZ.js +99 -0
  12. package/dist/chunk-3QDFDDWZ.js.map +1 -0
  13. package/dist/chunk-3W27OLK5.js +15 -0
  14. package/dist/chunk-3W27OLK5.js.map +1 -0
  15. package/dist/chunk-4FIZZONW.js +40 -0
  16. package/dist/chunk-4FIZZONW.js.map +1 -0
  17. package/dist/chunk-4GIAXOJG.js +133 -0
  18. package/dist/chunk-4GIAXOJG.js.map +1 -0
  19. package/dist/chunk-52NDNMK7.js +99 -0
  20. package/dist/chunk-52NDNMK7.js.map +1 -0
  21. package/dist/chunk-576G5OES.js +201 -0
  22. package/dist/chunk-576G5OES.js.map +1 -0
  23. package/dist/chunk-5AIE6SET.js +659 -0
  24. package/dist/chunk-5AIE6SET.js.map +1 -0
  25. package/dist/chunk-5FTNAZRW.js +327 -0
  26. package/dist/chunk-5FTNAZRW.js.map +1 -0
  27. package/dist/chunk-5IG2S7ZY.js +70 -0
  28. package/dist/chunk-5IG2S7ZY.js.map +1 -0
  29. package/dist/chunk-5QCXHNCW.js +404 -0
  30. package/dist/chunk-5QCXHNCW.js.map +1 -0
  31. package/dist/chunk-6DUMGC7Y.js +105 -0
  32. package/dist/chunk-6DUMGC7Y.js.map +1 -0
  33. package/dist/chunk-6J25CVST.js +174 -0
  34. package/dist/chunk-6J25CVST.js.map +1 -0
  35. package/dist/chunk-6NN35XOP.js +120 -0
  36. package/dist/chunk-6NN35XOP.js.map +1 -0
  37. package/dist/chunk-6NZBVA4T.js +24 -0
  38. package/dist/chunk-6NZBVA4T.js.map +1 -0
  39. package/dist/chunk-6W5BHRCL.js +295 -0
  40. package/dist/chunk-6W5BHRCL.js.map +1 -0
  41. package/dist/chunk-72BKRCEG.js +409 -0
  42. package/dist/chunk-72BKRCEG.js.map +1 -0
  43. package/dist/{chunk-Q7NWXLCT.js → chunk-7GTI3PPI.js} +53 -48
  44. package/dist/chunk-7GTI3PPI.js.map +1 -0
  45. package/dist/chunk-7P6PLZ4B.js +74 -0
  46. package/dist/chunk-7P6PLZ4B.js.map +1 -0
  47. package/dist/chunk-7WZWY5IA.js +46 -0
  48. package/dist/chunk-7WZWY5IA.js.map +1 -0
  49. package/dist/chunk-AIYO2632.js +489 -0
  50. package/dist/chunk-AIYO2632.js.map +1 -0
  51. package/dist/chunk-ANFZWPNE.js +112 -0
  52. package/dist/chunk-ANFZWPNE.js.map +1 -0
  53. package/dist/chunk-ANZTVAJU.js +73 -0
  54. package/dist/chunk-ANZTVAJU.js.map +1 -0
  55. package/dist/chunk-BD5BTJKX.js +166 -0
  56. package/dist/chunk-BD5BTJKX.js.map +1 -0
  57. package/dist/chunk-BHGIDSRJ.js +140 -0
  58. package/dist/chunk-BHGIDSRJ.js.map +1 -0
  59. package/dist/chunk-BSQWZITZ.js +507 -0
  60. package/dist/chunk-BSQWZITZ.js.map +1 -0
  61. package/dist/chunk-D3LAIK62.js +23 -0
  62. package/dist/chunk-D3LAIK62.js.map +1 -0
  63. package/dist/chunk-DODCR43C.js +155 -0
  64. package/dist/chunk-DODCR43C.js.map +1 -0
  65. package/dist/chunk-EEK5NGZF.js +40 -0
  66. package/dist/chunk-EEK5NGZF.js.map +1 -0
  67. package/dist/chunk-ENRG7TXA.js +11 -0
  68. package/dist/chunk-ENRG7TXA.js.map +1 -0
  69. package/dist/chunk-EQRMGIGY.js +239 -0
  70. package/dist/chunk-EQRMGIGY.js.map +1 -0
  71. package/dist/{chunk-XV3UUOYF.js → chunk-ERAHK5YQ.js} +9 -359
  72. package/dist/chunk-ERAHK5YQ.js.map +1 -0
  73. package/dist/chunk-F3FOFY2P.js +124 -0
  74. package/dist/chunk-F3FOFY2P.js.map +1 -0
  75. package/dist/chunk-F6BTWFOC.js +507 -0
  76. package/dist/chunk-F6BTWFOC.js.map +1 -0
  77. package/dist/chunk-F6J6NNAL.js +34 -0
  78. package/dist/chunk-F6J6NNAL.js.map +1 -0
  79. package/dist/chunk-FCHJ7D5O.js +59 -0
  80. package/dist/chunk-FCHJ7D5O.js.map +1 -0
  81. package/dist/chunk-FFJTEQCC.js +80 -0
  82. package/dist/chunk-FFJTEQCC.js.map +1 -0
  83. package/dist/chunk-FUFMVW7O.js +64 -0
  84. package/dist/chunk-FUFMVW7O.js.map +1 -0
  85. package/dist/chunk-FVPGQ6UE.js +25 -0
  86. package/dist/chunk-FVPGQ6UE.js.map +1 -0
  87. package/dist/{chunk-JP7PNHLH.js → chunk-G3PMV62Z.js} +3 -10
  88. package/dist/chunk-G3PMV62Z.js.map +1 -0
  89. package/dist/chunk-GACFOW3E.js +51 -0
  90. package/dist/chunk-GACFOW3E.js.map +1 -0
  91. package/dist/chunk-GDT6HQMK.js +42 -0
  92. package/dist/chunk-GDT6HQMK.js.map +1 -0
  93. package/dist/chunk-HLGU22C6.js +2589 -0
  94. package/dist/chunk-HLGU22C6.js.map +1 -0
  95. package/dist/chunk-HPMYYGP7.js +134 -0
  96. package/dist/chunk-HPMYYGP7.js.map +1 -0
  97. package/dist/chunk-I2UCOD45.js +197 -0
  98. package/dist/chunk-I2UCOD45.js.map +1 -0
  99. package/dist/chunk-IEGDZUVM.js +75 -0
  100. package/dist/chunk-IEGDZUVM.js.map +1 -0
  101. package/dist/chunk-IIS7INHF.js +47 -0
  102. package/dist/chunk-IIS7INHF.js.map +1 -0
  103. package/dist/chunk-ITELSEFU.js +256 -0
  104. package/dist/chunk-ITELSEFU.js.map +1 -0
  105. package/dist/{chunk-CTCFYWJC.js → chunk-IXAYNBOY.js} +6 -6
  106. package/dist/{chunk-CTCFYWJC.js.map → chunk-IXAYNBOY.js.map} +1 -1
  107. package/dist/chunk-JUW2ETEI.js +191 -0
  108. package/dist/chunk-JUW2ETEI.js.map +1 -0
  109. package/dist/chunk-K65C7CVE.js +127 -0
  110. package/dist/chunk-K65C7CVE.js.map +1 -0
  111. package/dist/chunk-KDI64MCY.js +189 -0
  112. package/dist/chunk-KDI64MCY.js.map +1 -0
  113. package/dist/chunk-KN4ASMH5.js +160 -0
  114. package/dist/chunk-KN4ASMH5.js.map +1 -0
  115. package/dist/chunk-KQW7QNTU.js +1549 -0
  116. package/dist/chunk-KQW7QNTU.js.map +1 -0
  117. package/dist/chunk-KR7NXXHC.js +66 -0
  118. package/dist/chunk-KR7NXXHC.js.map +1 -0
  119. package/dist/chunk-KRZKIVMA.js +142 -0
  120. package/dist/chunk-KRZKIVMA.js.map +1 -0
  121. package/dist/{chunk-C3L3TBBT.js → chunk-KTTLLKGQ.js} +6 -63
  122. package/dist/chunk-KTTLLKGQ.js.map +1 -0
  123. package/dist/chunk-KWKSHPDP.js +234 -0
  124. package/dist/chunk-KWKSHPDP.js.map +1 -0
  125. package/dist/chunk-KZVC7OYG.js +57 -0
  126. package/dist/chunk-KZVC7OYG.js.map +1 -0
  127. package/dist/chunk-L5DHUN2V.js +204 -0
  128. package/dist/chunk-L5DHUN2V.js.map +1 -0
  129. package/dist/chunk-LCTGEH57.js +1376 -0
  130. package/dist/chunk-LCTGEH57.js.map +1 -0
  131. package/dist/chunk-LXLIQ2D6.js +12 -0
  132. package/dist/chunk-LXLIQ2D6.js.map +1 -0
  133. package/dist/chunk-M4CTURKX.js +84 -0
  134. package/dist/chunk-M4CTURKX.js.map +1 -0
  135. package/dist/chunk-M6LTUPVP.js +301 -0
  136. package/dist/chunk-M6LTUPVP.js.map +1 -0
  137. package/dist/chunk-MA6RRHDT.js +291 -0
  138. package/dist/chunk-MA6RRHDT.js.map +1 -0
  139. package/dist/chunk-MODE4QIA.js +6 -0
  140. package/dist/chunk-MODE4QIA.js.map +1 -0
  141. package/dist/chunk-MVILMVGG.js +118 -0
  142. package/dist/chunk-MVILMVGG.js.map +1 -0
  143. package/dist/chunk-MWS4VCLV.js +17 -0
  144. package/dist/chunk-MWS4VCLV.js.map +1 -0
  145. package/dist/chunk-NEUX74SO.js +315 -0
  146. package/dist/chunk-NEUX74SO.js.map +1 -0
  147. package/dist/chunk-NFHKYBRD.js +156 -0
  148. package/dist/chunk-NFHKYBRD.js.map +1 -0
  149. package/dist/chunk-NHJNNXD3.js +89 -0
  150. package/dist/chunk-NHJNNXD3.js.map +1 -0
  151. package/dist/chunk-O2BF3HZL.js +33 -0
  152. package/dist/chunk-O2BF3HZL.js.map +1 -0
  153. package/dist/chunk-OANXCZYD.js +212 -0
  154. package/dist/chunk-OANXCZYD.js.map +1 -0
  155. package/dist/chunk-ODJF7YIP.js +230 -0
  156. package/dist/chunk-ODJF7YIP.js.map +1 -0
  157. package/dist/chunk-ON4BJTHI.js +101 -0
  158. package/dist/chunk-ON4BJTHI.js.map +1 -0
  159. package/dist/{chunk-VMFSRV5H.js → chunk-OTL5WXIJ.js} +2 -2
  160. package/dist/{chunk-VMFSRV5H.js.map → chunk-OTL5WXIJ.js.map} +1 -1
  161. package/dist/{chunk-VPPM7UUQ.js → chunk-PACNBKJV.js} +3 -3
  162. package/dist/{chunk-VPPM7UUQ.js.map → chunk-PACNBKJV.js.map} +1 -1
  163. package/dist/{chunk-ESBL3IPF.js → chunk-PROCA7K7.js} +2 -2
  164. package/dist/{chunk-ESBL3IPF.js.map → chunk-PROCA7K7.js.map} +1 -1
  165. package/dist/chunk-QGMIPA67.js +85 -0
  166. package/dist/chunk-QGMIPA67.js.map +1 -0
  167. package/dist/chunk-QQA37LFB.js +190 -0
  168. package/dist/chunk-QQA37LFB.js.map +1 -0
  169. package/dist/chunk-QZAWRSEB.js +61 -0
  170. package/dist/chunk-QZAWRSEB.js.map +1 -0
  171. package/dist/chunk-R74KGWNS.js +699 -0
  172. package/dist/chunk-R74KGWNS.js.map +1 -0
  173. package/dist/chunk-RFDLHMKL.js +110 -0
  174. package/dist/chunk-RFDLHMKL.js.map +1 -0
  175. package/dist/chunk-RL64HN7S.js +40 -0
  176. package/dist/chunk-RL64HN7S.js.map +1 -0
  177. package/dist/chunk-RMRQKPL7.js +115 -0
  178. package/dist/chunk-RMRQKPL7.js.map +1 -0
  179. package/dist/{chunk-BOHNXTMM.js → chunk-RQVK4IYC.js} +3 -3
  180. package/dist/{chunk-BOHNXTMM.js.map → chunk-RQVK4IYC.js.map} +1 -1
  181. package/dist/chunk-RTW56PWZ.js +59 -0
  182. package/dist/chunk-RTW56PWZ.js.map +1 -0
  183. package/dist/chunk-RUTPQNLR.js +266 -0
  184. package/dist/chunk-RUTPQNLR.js.map +1 -0
  185. package/dist/chunk-S6TAF63G.js +25 -0
  186. package/dist/chunk-S6TAF63G.js.map +1 -0
  187. package/dist/chunk-SBGAUGXY.js +224 -0
  188. package/dist/chunk-SBGAUGXY.js.map +1 -0
  189. package/dist/chunk-SC275NHZ.js +407 -0
  190. package/dist/chunk-SC275NHZ.js.map +1 -0
  191. package/dist/chunk-SCQPU4UE.js +97 -0
  192. package/dist/chunk-SCQPU4UE.js.map +1 -0
  193. package/dist/chunk-SFFF2WQP.js +8 -0
  194. package/dist/chunk-SFFF2WQP.js.map +1 -0
  195. package/dist/chunk-SJYMHZKA.js +36 -0
  196. package/dist/chunk-SJYMHZKA.js.map +1 -0
  197. package/dist/chunk-SLCCUJVN.js +125 -0
  198. package/dist/chunk-SLCCUJVN.js.map +1 -0
  199. package/dist/{chunk-IJTHFNNJ.js → chunk-SVBSNSD4.js} +10 -12
  200. package/dist/chunk-SVBSNSD4.js.map +1 -0
  201. package/dist/chunk-SVPLTL35.js +62 -0
  202. package/dist/chunk-SVPLTL35.js.map +1 -0
  203. package/dist/{chunk-63NSN2VL.js → chunk-SWQFYNYG.js} +115 -51
  204. package/dist/chunk-SWQFYNYG.js.map +1 -0
  205. package/dist/chunk-THHB4EWS.js +72 -0
  206. package/dist/chunk-THHB4EWS.js.map +1 -0
  207. package/dist/chunk-TUCDD33E.js +246 -0
  208. package/dist/chunk-TUCDD33E.js.map +1 -0
  209. package/dist/chunk-TV4WAP2R.js +14 -0
  210. package/dist/chunk-TV4WAP2R.js.map +1 -0
  211. package/dist/chunk-U3A6YBTZ.js +134 -0
  212. package/dist/chunk-U3A6YBTZ.js.map +1 -0
  213. package/dist/chunk-UGT6DKWM.js +95 -0
  214. package/dist/chunk-UGT6DKWM.js.map +1 -0
  215. package/dist/chunk-VSERHUWD.js +212 -0
  216. package/dist/chunk-VSERHUWD.js.map +1 -0
  217. package/dist/chunk-VYG7BDXC.js +49 -0
  218. package/dist/chunk-VYG7BDXC.js.map +1 -0
  219. package/dist/chunk-WETKNYZX.js +52 -0
  220. package/dist/chunk-WETKNYZX.js.map +1 -0
  221. package/dist/chunk-WGG4AML3.js +216 -0
  222. package/dist/chunk-WGG4AML3.js.map +1 -0
  223. package/dist/chunk-WKAUEL6I.js +30 -0
  224. package/dist/chunk-WKAUEL6I.js.map +1 -0
  225. package/dist/chunk-WPOLA5CG.js +81 -0
  226. package/dist/chunk-WPOLA5CG.js.map +1 -0
  227. package/dist/chunk-WPVETCGJ.js +254 -0
  228. package/dist/chunk-WPVETCGJ.js.map +1 -0
  229. package/dist/chunk-WTSM3A7E.js +13 -0
  230. package/dist/chunk-WTSM3A7E.js.map +1 -0
  231. package/dist/chunk-WU3F2K3T.js +148 -0
  232. package/dist/chunk-WU3F2K3T.js.map +1 -0
  233. package/dist/chunk-WZZK2DTZ.js +39 -0
  234. package/dist/chunk-WZZK2DTZ.js.map +1 -0
  235. package/dist/chunk-X4IHLKRD.js +42 -0
  236. package/dist/chunk-X4IHLKRD.js.map +1 -0
  237. package/dist/chunk-XAHEXZJC.js +80 -0
  238. package/dist/chunk-XAHEXZJC.js.map +1 -0
  239. package/dist/chunk-XCYGJDUX.js +31 -0
  240. package/dist/chunk-XCYGJDUX.js.map +1 -0
  241. package/dist/chunk-Y4W3JORC.js +104 -0
  242. package/dist/chunk-Y4W3JORC.js.map +1 -0
  243. package/dist/{chunk-7PUUHEJQ.js → chunk-YFZJ3ZLG.js} +26 -42
  244. package/dist/chunk-YFZJ3ZLG.js.map +1 -0
  245. package/dist/{chunk-6FPEI4EM.js → chunk-YI3WLXEN.js} +27 -2323
  246. package/dist/chunk-YI3WLXEN.js.map +1 -0
  247. package/dist/chunk-ZBKFSPD3.js +29 -0
  248. package/dist/chunk-ZBKFSPD3.js.map +1 -0
  249. package/dist/chunk-ZOERRQ6A.js +79 -0
  250. package/dist/chunk-ZOERRQ6A.js.map +1 -0
  251. package/dist/chunk-ZSTGUKHU.js +10 -0
  252. package/dist/chunk-ZSTGUKHU.js.map +1 -0
  253. package/dist/chunk-ZUEHDL27.js +65 -0
  254. package/dist/chunk-ZUEHDL27.js.map +1 -0
  255. package/dist/editors.js +22 -14
  256. package/dist/editors.js.map +1 -1
  257. package/dist/icons.js +7 -2
  258. package/dist/index.d.ts +8 -18
  259. package/dist/index.js +121 -15800
  260. package/dist/index.js.map +1 -1
  261. package/dist/internal/blocks/AIKit.js +30 -0
  262. package/dist/internal/blocks/AIKit.js.map +1 -0
  263. package/dist/internal/blocks/AppShell.js +11 -0
  264. package/dist/internal/blocks/AppShell.js.map +1 -0
  265. package/dist/internal/blocks/AutoSaveTextarea.js +14 -0
  266. package/dist/internal/blocks/AutoSaveTextarea.js.map +1 -0
  267. package/dist/internal/blocks/BrandEditor.js +23 -0
  268. package/dist/internal/blocks/BrandEditor.js.map +1 -0
  269. package/dist/internal/blocks/ChartPanel.js +10 -0
  270. package/dist/internal/blocks/ChartPanel.js.map +1 -0
  271. package/dist/internal/blocks/ClipboardButton.js +12 -0
  272. package/dist/internal/blocks/ClipboardButton.js.map +1 -0
  273. package/dist/internal/blocks/ColorInput.js +13 -0
  274. package/dist/internal/blocks/ColorInput.js.map +1 -0
  275. package/dist/internal/blocks/ColorModeSwitch.js +13 -0
  276. package/dist/internal/blocks/ColorModeSwitch.js.map +1 -0
  277. package/dist/internal/blocks/Command.js +15 -0
  278. package/dist/internal/blocks/Command.js.map +1 -0
  279. package/dist/internal/blocks/CopyField.js +11 -0
  280. package/dist/internal/blocks/CopyField.js.map +1 -0
  281. package/dist/internal/blocks/DashboardHero.js +9 -0
  282. package/dist/internal/blocks/DashboardHero.js.map +1 -0
  283. package/dist/internal/blocks/DateInput.js +16 -0
  284. package/dist/internal/blocks/DateInput.js.map +1 -0
  285. package/dist/internal/blocks/DateRangeInput.js +16 -0
  286. package/dist/internal/blocks/DateRangeInput.js.map +1 -0
  287. package/dist/internal/blocks/EmptyConfigurationActionCard.js +10 -0
  288. package/dist/internal/blocks/EmptyConfigurationActionCard.js.map +1 -0
  289. package/dist/internal/blocks/EmptyState.js +4 -0
  290. package/dist/internal/blocks/EmptyState.js.map +1 -0
  291. package/dist/internal/blocks/ErrorState.js +5 -0
  292. package/dist/internal/blocks/ErrorState.js.map +1 -0
  293. package/dist/internal/blocks/ExportMenu.js +13 -0
  294. package/dist/internal/blocks/ExportMenu.js.map +1 -0
  295. package/dist/internal/blocks/Form.js +29 -0
  296. package/dist/internal/blocks/Form.js.map +1 -0
  297. package/dist/internal/blocks/FormGroup.js +18 -0
  298. package/dist/internal/blocks/FormGroup.js.map +1 -0
  299. package/dist/internal/blocks/GoogleButton.js +10 -0
  300. package/dist/internal/blocks/GoogleButton.js.map +1 -0
  301. package/dist/internal/blocks/MicrosoftButton.js +10 -0
  302. package/dist/internal/blocks/MicrosoftButton.js.map +1 -0
  303. package/dist/internal/blocks/MultiActionButtonGroup.js +12 -0
  304. package/dist/internal/blocks/MultiActionButtonGroup.js.map +1 -0
  305. package/dist/internal/blocks/MultiCombobox.js +14 -0
  306. package/dist/internal/blocks/MultiCombobox.js.map +1 -0
  307. package/dist/internal/blocks/NumberInput.js +12 -0
  308. package/dist/internal/blocks/NumberInput.js.map +1 -0
  309. package/dist/internal/blocks/OtpInput.js +10 -0
  310. package/dist/internal/blocks/OtpInput.js.map +1 -0
  311. package/dist/internal/blocks/PageHeader.js +9 -0
  312. package/dist/internal/blocks/PageHeader.js.map +1 -0
  313. package/dist/internal/blocks/PageLayout.js +9 -0
  314. package/dist/internal/blocks/PageLayout.js.map +1 -0
  315. package/dist/internal/blocks/PageToolbar.js +13 -0
  316. package/dist/internal/blocks/PageToolbar.js.map +1 -0
  317. package/dist/internal/blocks/PasswordInput.js +13 -0
  318. package/dist/internal/blocks/PasswordInput.js.map +1 -0
  319. package/dist/internal/blocks/SearchInput.js +12 -0
  320. package/dist/internal/blocks/SearchInput.js.map +1 -0
  321. package/dist/internal/blocks/SearchInputWithNavigation.js +16 -0
  322. package/dist/internal/blocks/SearchInputWithNavigation.js.map +1 -0
  323. package/dist/internal/blocks/SectionNav.js +15 -0
  324. package/dist/internal/blocks/SectionNav.js.map +1 -0
  325. package/dist/internal/blocks/SplitButton.js +14 -0
  326. package/dist/internal/blocks/SplitButton.js.map +1 -0
  327. package/dist/internal/blocks/StatCard.js +10 -0
  328. package/dist/internal/blocks/StatCard.js.map +1 -0
  329. package/dist/internal/blocks/TextInput.js +13 -0
  330. package/dist/internal/blocks/TextInput.js.map +1 -0
  331. package/dist/internal/blocks/Textarea.js +13 -0
  332. package/dist/internal/blocks/Textarea.js.map +1 -0
  333. package/dist/internal/blocks/TimeInput.js +17 -0
  334. package/dist/internal/blocks/TimeInput.js.map +1 -0
  335. package/dist/internal/components/Alert.js +11 -0
  336. package/dist/internal/components/Alert.js.map +1 -0
  337. package/dist/internal/components/AlertModal.js +11 -0
  338. package/dist/internal/components/AlertModal.js.map +1 -0
  339. package/dist/internal/components/Avatar.js +9 -0
  340. package/dist/internal/components/Avatar.js.map +1 -0
  341. package/dist/internal/components/Badge.js +9 -0
  342. package/dist/internal/components/Badge.js.map +1 -0
  343. package/dist/internal/components/BrandLogo.js +11 -0
  344. package/dist/internal/components/BrandLogo.js.map +1 -0
  345. package/dist/internal/components/Breadcrumb.js +14 -0
  346. package/dist/internal/components/Breadcrumb.js.map +1 -0
  347. package/dist/internal/components/Button.js +10 -0
  348. package/dist/internal/components/Button.js.map +1 -0
  349. package/dist/internal/components/ButtonGroup.js +9 -0
  350. package/dist/internal/components/ButtonGroup.js.map +1 -0
  351. package/dist/internal/components/Calendar.js +9 -0
  352. package/dist/internal/components/Calendar.js.map +1 -0
  353. package/dist/internal/components/Card.js +9 -0
  354. package/dist/internal/components/Card.js.map +1 -0
  355. package/dist/internal/components/Checkbox.js +11 -0
  356. package/dist/internal/components/Checkbox.js.map +1 -0
  357. package/dist/internal/components/Clipboard.js +9 -0
  358. package/dist/internal/components/Clipboard.js.map +1 -0
  359. package/dist/internal/components/Collapsible.js +9 -0
  360. package/dist/internal/components/Collapsible.js.map +1 -0
  361. package/dist/internal/components/CollapsiblePanel.js +11 -0
  362. package/dist/internal/components/CollapsiblePanel.js.map +1 -0
  363. package/dist/internal/components/Combobox.js +13 -0
  364. package/dist/internal/components/Combobox.js.map +1 -0
  365. package/dist/internal/components/DatePicker.js +11 -0
  366. package/dist/internal/components/DatePicker.js.map +1 -0
  367. package/dist/internal/components/DateRangePicker.js +17 -0
  368. package/dist/internal/components/DateRangePicker.js.map +1 -0
  369. package/dist/internal/components/DiffView.js +9 -0
  370. package/dist/internal/components/DiffView.js.map +1 -0
  371. package/dist/internal/components/DotsLoader.js +5 -0
  372. package/dist/internal/components/DotsLoader.js.map +1 -0
  373. package/dist/internal/components/DropdownMenu.js +11 -0
  374. package/dist/internal/components/DropdownMenu.js.map +1 -0
  375. package/dist/internal/components/EmptySearchContent.js +4 -0
  376. package/dist/internal/components/EmptySearchContent.js.map +1 -0
  377. package/dist/internal/components/FileUpload.js +11 -0
  378. package/dist/internal/components/FileUpload.js.map +1 -0
  379. package/dist/internal/components/FullScreenModal.js +12 -0
  380. package/dist/internal/components/FullScreenModal.js.map +1 -0
  381. package/dist/internal/components/HelpBlock.js +4 -0
  382. package/dist/internal/components/HelpBlock.js.map +1 -0
  383. package/dist/internal/components/HoverCard.js +9 -0
  384. package/dist/internal/components/HoverCard.js.map +1 -0
  385. package/dist/internal/components/InputGroup.js +11 -0
  386. package/dist/internal/components/InputGroup.js.map +1 -0
  387. package/dist/internal/components/Kbd.js +9 -0
  388. package/dist/internal/components/Kbd.js.map +1 -0
  389. package/dist/internal/components/Label.js +9 -0
  390. package/dist/internal/components/Label.js.map +1 -0
  391. package/dist/internal/components/Link.js +9 -0
  392. package/dist/internal/components/Link.js.map +1 -0
  393. package/dist/internal/components/MarkedText.js +5 -0
  394. package/dist/internal/components/MarkedText.js.map +1 -0
  395. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js +10 -0
  396. package/dist/internal/components/MergeEditor/ConflictStatus/ConflictStatusIndicator.js.map +1 -0
  397. package/dist/internal/components/MergeEditor/PaneHeader.js +4 -0
  398. package/dist/internal/components/MergeEditor/PaneHeader.js.map +1 -0
  399. package/dist/internal/components/MergeEditor/constants.js +4 -0
  400. package/dist/internal/components/MergeEditor/constants.js.map +1 -0
  401. package/dist/internal/components/MergeEditor/useMergeDiff.js +5 -0
  402. package/dist/internal/components/MergeEditor/useMergeDiff.js.map +1 -0
  403. package/dist/internal/components/Modal.js +13 -0
  404. package/dist/internal/components/Modal.js.map +1 -0
  405. package/dist/internal/components/Navbar.js +14 -0
  406. package/dist/internal/components/Navbar.js.map +1 -0
  407. package/dist/internal/components/Pagination.js +11 -0
  408. package/dist/internal/components/Pagination.js.map +1 -0
  409. package/dist/internal/components/PanelWithDetails.js +11 -0
  410. package/dist/internal/components/PanelWithDetails.js.map +1 -0
  411. package/dist/internal/components/Popconfirm.js +12 -0
  412. package/dist/internal/components/Popconfirm.js.map +1 -0
  413. package/dist/internal/components/Popover.js +9 -0
  414. package/dist/internal/components/Popover.js.map +1 -0
  415. package/dist/internal/components/Progress.js +9 -0
  416. package/dist/internal/components/Progress.js.map +1 -0
  417. package/dist/internal/components/RadioGroup.js +12 -0
  418. package/dist/internal/components/RadioGroup.js.map +1 -0
  419. package/dist/internal/components/Resizable.js +9 -0
  420. package/dist/internal/components/Resizable.js.map +1 -0
  421. package/dist/internal/components/ScrollArea.js +9 -0
  422. package/dist/internal/components/ScrollArea.js.map +1 -0
  423. package/dist/internal/components/Search.js +10 -0
  424. package/dist/internal/components/Search.js.map +1 -0
  425. package/dist/internal/components/Select.js +12 -0
  426. package/dist/internal/components/Select.js.map +1 -0
  427. package/dist/internal/components/Separator.js +9 -0
  428. package/dist/internal/components/Separator.js.map +1 -0
  429. package/dist/internal/components/Sheet.js +12 -0
  430. package/dist/internal/components/Sheet.js.map +1 -0
  431. package/dist/internal/components/Sidebar.js +20 -0
  432. package/dist/internal/components/Sidebar.js.map +1 -0
  433. package/dist/internal/components/Skeleton/Skeleton.js +9 -0
  434. package/dist/internal/components/Skeleton/Skeleton.js.map +1 -0
  435. package/dist/internal/components/Skeleton/SkeletonList.js +10 -0
  436. package/dist/internal/components/Skeleton/SkeletonList.js.map +1 -0
  437. package/dist/internal/components/Slider.js +11 -0
  438. package/dist/internal/components/Slider.js.map +1 -0
  439. package/dist/internal/components/SpotlightBackdrop.js +9 -0
  440. package/dist/internal/components/SpotlightBackdrop.js.map +1 -0
  441. package/dist/internal/components/Stepper.js +10 -0
  442. package/dist/internal/components/Stepper.js.map +1 -0
  443. package/dist/internal/components/Switch.js +10 -0
  444. package/dist/internal/components/Switch.js.map +1 -0
  445. package/dist/internal/components/Table.js +10 -0
  446. package/dist/internal/components/Table.js.map +1 -0
  447. package/dist/internal/components/Tabs.js +12 -0
  448. package/dist/internal/components/Tabs.js.map +1 -0
  449. package/dist/internal/components/ThemeProvider.js +10 -0
  450. package/dist/internal/components/ThemeProvider.js.map +1 -0
  451. package/dist/internal/components/TimePicker.js +12 -0
  452. package/dist/internal/components/TimePicker.js.map +1 -0
  453. package/dist/internal/components/Timeline.js +10 -0
  454. package/dist/internal/components/Timeline.js.map +1 -0
  455. package/dist/internal/components/Toast.js +11 -0
  456. package/dist/internal/components/Toast.js.map +1 -0
  457. package/dist/internal/components/Toggle.js +9 -0
  458. package/dist/internal/components/Toggle.js.map +1 -0
  459. package/dist/internal/components/ToggleGroup.js +9 -0
  460. package/dist/internal/components/ToggleGroup.js.map +1 -0
  461. package/dist/internal/components/Tooltip.js +8 -0
  462. package/dist/internal/components/Tooltip.js.map +1 -0
  463. package/dist/internal/components/Truncated.js +9 -0
  464. package/dist/internal/components/Truncated.js.map +1 -0
  465. package/dist/internal/components/Workbench.js +11 -0
  466. package/dist/internal/components/Workbench.js.map +1 -0
  467. package/dist/internal/components/ZoomableSvg.js +13 -0
  468. package/dist/internal/components/ZoomableSvg.js.map +1 -0
  469. package/dist/internal/hooks/useAutosizeInput.js +4 -0
  470. package/dist/internal/hooks/useAutosizeInput.js.map +1 -0
  471. package/dist/internal/hooks/useScrollbarPosition.js +5 -0
  472. package/dist/internal/hooks/useScrollbarPosition.js.map +1 -0
  473. package/dist/internal/hooks/useStableCallback.js +4 -0
  474. package/dist/internal/hooks/useStableCallback.js.map +1 -0
  475. package/dist/internal/utils/mergeRefs.js +4 -0
  476. package/dist/internal/utils/mergeRefs.js.map +1 -0
  477. package/dist/internal/utils.js +8 -0
  478. package/dist/internal/utils.js.map +1 -0
  479. package/dist/markdown-editor.js +23 -9
  480. package/dist/markdown-editor.js.map +1 -1
  481. package/dist/mermaid.js +16 -8
  482. package/dist/rjsf.js +102 -29
  483. package/dist/rjsf.js.map +1 -1
  484. package/dist/styles.css +1 -1
  485. package/dist/testing.js +8 -3
  486. package/dist/testing.js.map +1 -1
  487. package/package.json +9 -8
  488. package/src/styles.css +35 -7
  489. package/src/theme.css +64 -0
  490. package/dist/MermaidDiagram-EOKJHQQV.js +0 -10
  491. package/dist/chunk-63NSN2VL.js.map +0 -1
  492. package/dist/chunk-6FPEI4EM.js.map +0 -1
  493. package/dist/chunk-7PUUHEJQ.js.map +0 -1
  494. package/dist/chunk-C3L3TBBT.js.map +0 -1
  495. package/dist/chunk-IJTHFNNJ.js.map +0 -1
  496. package/dist/chunk-JP7PNHLH.js.map +0 -1
  497. package/dist/chunk-KPNAW5MU.js +0 -229
  498. package/dist/chunk-KPNAW5MU.js.map +0 -1
  499. package/dist/chunk-L37JJ6MR.js +0 -152
  500. package/dist/chunk-L37JJ6MR.js.map +0 -1
  501. package/dist/chunk-Q7NWXLCT.js.map +0 -1
  502. package/dist/chunk-SYIEF644.js +0 -1016
  503. package/dist/chunk-SYIEF644.js.map +0 -1
  504. package/dist/chunk-XV3UUOYF.js.map +0 -1
@@ -0,0 +1,2589 @@
1
+ import { Button } from './chunk-IXAYNBOY.js';
2
+ import { X, Upload, FileSpreadsheet, FileText, File } from './chunk-RQVK4IYC.js';
3
+ import { cn } from './chunk-LXLIQ2D6.js';
4
+ import { __commonJS, __toESM } from './chunk-G3PMV62Z.js';
5
+ import React, { createContext, forwardRef, useImperativeHandle, Fragment, useMemo, useRef, useReducer, useEffect, useCallback, use } from 'react';
6
+ import { cva } from 'class-variance-authority';
7
+ import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
8
+
9
+ // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js
10
+ var require_react_is_production_min = __commonJS({
11
+ "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.production.min.js"(exports$1) {
12
+ var b = "function" === typeof Symbol && Symbol.for;
13
+ var c = b ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
14
+ var d = b ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
15
+ var e = b ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
16
+ var f = b ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
17
+ var g = b ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
18
+ var h = b ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
19
+ var k = b ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
20
+ var l = b ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
21
+ var m = b ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
22
+ var n = b ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
23
+ var p = b ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
24
+ var q = b ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
25
+ var r = b ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
26
+ var t = b ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
27
+ var v = b ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
28
+ var w = b ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
29
+ var x = b ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
30
+ var y = b ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
31
+ function z(a) {
32
+ if ("object" === typeof a && null !== a) {
33
+ var u = a.$$typeof;
34
+ switch (u) {
35
+ case c:
36
+ switch (a = a.type, a) {
37
+ case l:
38
+ case m:
39
+ case e:
40
+ case g:
41
+ case f:
42
+ case p:
43
+ return a;
44
+ default:
45
+ switch (a = a && a.$$typeof, a) {
46
+ case k:
47
+ case n:
48
+ case t:
49
+ case r:
50
+ case h:
51
+ return a;
52
+ default:
53
+ return u;
54
+ }
55
+ }
56
+ case d:
57
+ return u;
58
+ }
59
+ }
60
+ }
61
+ function A(a) {
62
+ return z(a) === m;
63
+ }
64
+ exports$1.AsyncMode = l;
65
+ exports$1.ConcurrentMode = m;
66
+ exports$1.ContextConsumer = k;
67
+ exports$1.ContextProvider = h;
68
+ exports$1.Element = c;
69
+ exports$1.ForwardRef = n;
70
+ exports$1.Fragment = e;
71
+ exports$1.Lazy = t;
72
+ exports$1.Memo = r;
73
+ exports$1.Portal = d;
74
+ exports$1.Profiler = g;
75
+ exports$1.StrictMode = f;
76
+ exports$1.Suspense = p;
77
+ exports$1.isAsyncMode = function(a) {
78
+ return A(a) || z(a) === l;
79
+ };
80
+ exports$1.isConcurrentMode = A;
81
+ exports$1.isContextConsumer = function(a) {
82
+ return z(a) === k;
83
+ };
84
+ exports$1.isContextProvider = function(a) {
85
+ return z(a) === h;
86
+ };
87
+ exports$1.isElement = function(a) {
88
+ return "object" === typeof a && null !== a && a.$$typeof === c;
89
+ };
90
+ exports$1.isForwardRef = function(a) {
91
+ return z(a) === n;
92
+ };
93
+ exports$1.isFragment = function(a) {
94
+ return z(a) === e;
95
+ };
96
+ exports$1.isLazy = function(a) {
97
+ return z(a) === t;
98
+ };
99
+ exports$1.isMemo = function(a) {
100
+ return z(a) === r;
101
+ };
102
+ exports$1.isPortal = function(a) {
103
+ return z(a) === d;
104
+ };
105
+ exports$1.isProfiler = function(a) {
106
+ return z(a) === g;
107
+ };
108
+ exports$1.isStrictMode = function(a) {
109
+ return z(a) === f;
110
+ };
111
+ exports$1.isSuspense = function(a) {
112
+ return z(a) === p;
113
+ };
114
+ exports$1.isValidElementType = function(a) {
115
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
116
+ };
117
+ exports$1.typeOf = z;
118
+ }
119
+ });
120
+
121
+ // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js
122
+ var require_react_is_development = __commonJS({
123
+ "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/cjs/react-is.development.js"(exports$1) {
124
+ if (process.env.NODE_ENV !== "production") {
125
+ (function() {
126
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
127
+ var REACT_ELEMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.element") : 60103;
128
+ var REACT_PORTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.portal") : 60106;
129
+ var REACT_FRAGMENT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107;
130
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108;
131
+ var REACT_PROFILER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114;
132
+ var REACT_PROVIDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.provider") : 60109;
133
+ var REACT_CONTEXT_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.context") : 60110;
134
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111;
135
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111;
136
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112;
137
+ var REACT_SUSPENSE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113;
138
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120;
139
+ var REACT_MEMO_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.memo") : 60115;
140
+ var REACT_LAZY_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116;
141
+ var REACT_BLOCK_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.block") : 60121;
142
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117;
143
+ var REACT_RESPONDER_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.responder") : 60118;
144
+ var REACT_SCOPE_TYPE = hasSymbol ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
145
+ function isValidElementType(type) {
146
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
147
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
148
+ }
149
+ function typeOf(object) {
150
+ if (typeof object === "object" && object !== null) {
151
+ var $$typeof = object.$$typeof;
152
+ switch ($$typeof) {
153
+ case REACT_ELEMENT_TYPE:
154
+ var type = object.type;
155
+ switch (type) {
156
+ case REACT_ASYNC_MODE_TYPE:
157
+ case REACT_CONCURRENT_MODE_TYPE:
158
+ case REACT_FRAGMENT_TYPE:
159
+ case REACT_PROFILER_TYPE:
160
+ case REACT_STRICT_MODE_TYPE:
161
+ case REACT_SUSPENSE_TYPE:
162
+ return type;
163
+ default:
164
+ var $$typeofType = type && type.$$typeof;
165
+ switch ($$typeofType) {
166
+ case REACT_CONTEXT_TYPE:
167
+ case REACT_FORWARD_REF_TYPE:
168
+ case REACT_LAZY_TYPE:
169
+ case REACT_MEMO_TYPE:
170
+ case REACT_PROVIDER_TYPE:
171
+ return $$typeofType;
172
+ default:
173
+ return $$typeof;
174
+ }
175
+ }
176
+ case REACT_PORTAL_TYPE:
177
+ return $$typeof;
178
+ }
179
+ }
180
+ return void 0;
181
+ }
182
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
183
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
184
+ var ContextConsumer = REACT_CONTEXT_TYPE;
185
+ var ContextProvider = REACT_PROVIDER_TYPE;
186
+ var Element = REACT_ELEMENT_TYPE;
187
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
188
+ var Fragment3 = REACT_FRAGMENT_TYPE;
189
+ var Lazy = REACT_LAZY_TYPE;
190
+ var Memo = REACT_MEMO_TYPE;
191
+ var Portal = REACT_PORTAL_TYPE;
192
+ var Profiler = REACT_PROFILER_TYPE;
193
+ var StrictMode = REACT_STRICT_MODE_TYPE;
194
+ var Suspense = REACT_SUSPENSE_TYPE;
195
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
196
+ function isAsyncMode(object) {
197
+ {
198
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
199
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
200
+ console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
201
+ }
202
+ }
203
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
204
+ }
205
+ function isConcurrentMode(object) {
206
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
207
+ }
208
+ function isContextConsumer(object) {
209
+ return typeOf(object) === REACT_CONTEXT_TYPE;
210
+ }
211
+ function isContextProvider(object) {
212
+ return typeOf(object) === REACT_PROVIDER_TYPE;
213
+ }
214
+ function isElement(object) {
215
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
216
+ }
217
+ function isForwardRef(object) {
218
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
219
+ }
220
+ function isFragment(object) {
221
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
222
+ }
223
+ function isLazy(object) {
224
+ return typeOf(object) === REACT_LAZY_TYPE;
225
+ }
226
+ function isMemo(object) {
227
+ return typeOf(object) === REACT_MEMO_TYPE;
228
+ }
229
+ function isPortal(object) {
230
+ return typeOf(object) === REACT_PORTAL_TYPE;
231
+ }
232
+ function isProfiler(object) {
233
+ return typeOf(object) === REACT_PROFILER_TYPE;
234
+ }
235
+ function isStrictMode(object) {
236
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
237
+ }
238
+ function isSuspense(object) {
239
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
240
+ }
241
+ exports$1.AsyncMode = AsyncMode;
242
+ exports$1.ConcurrentMode = ConcurrentMode;
243
+ exports$1.ContextConsumer = ContextConsumer;
244
+ exports$1.ContextProvider = ContextProvider;
245
+ exports$1.Element = Element;
246
+ exports$1.ForwardRef = ForwardRef;
247
+ exports$1.Fragment = Fragment3;
248
+ exports$1.Lazy = Lazy;
249
+ exports$1.Memo = Memo;
250
+ exports$1.Portal = Portal;
251
+ exports$1.Profiler = Profiler;
252
+ exports$1.StrictMode = StrictMode;
253
+ exports$1.Suspense = Suspense;
254
+ exports$1.isAsyncMode = isAsyncMode;
255
+ exports$1.isConcurrentMode = isConcurrentMode;
256
+ exports$1.isContextConsumer = isContextConsumer;
257
+ exports$1.isContextProvider = isContextProvider;
258
+ exports$1.isElement = isElement;
259
+ exports$1.isForwardRef = isForwardRef;
260
+ exports$1.isFragment = isFragment;
261
+ exports$1.isLazy = isLazy;
262
+ exports$1.isMemo = isMemo;
263
+ exports$1.isPortal = isPortal;
264
+ exports$1.isProfiler = isProfiler;
265
+ exports$1.isStrictMode = isStrictMode;
266
+ exports$1.isSuspense = isSuspense;
267
+ exports$1.isValidElementType = isValidElementType;
268
+ exports$1.typeOf = typeOf;
269
+ })();
270
+ }
271
+ }
272
+ });
273
+
274
+ // ../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js
275
+ var require_react_is = __commonJS({
276
+ "../../node_modules/.pnpm/react-is@16.13.1/node_modules/react-is/index.js"(exports$1, module) {
277
+ if (process.env.NODE_ENV === "production") {
278
+ module.exports = require_react_is_production_min();
279
+ } else {
280
+ module.exports = require_react_is_development();
281
+ }
282
+ }
283
+ });
284
+
285
+ // ../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js
286
+ var require_object_assign = __commonJS({
287
+ "../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js"(exports$1, module) {
288
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
289
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
290
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
291
+ function toObject(val) {
292
+ if (val === null || val === void 0) {
293
+ throw new TypeError("Object.assign cannot be called with null or undefined");
294
+ }
295
+ return Object(val);
296
+ }
297
+ function shouldUseNative() {
298
+ try {
299
+ if (!Object.assign) {
300
+ return false;
301
+ }
302
+ var test1 = new String("abc");
303
+ test1[5] = "de";
304
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
305
+ return false;
306
+ }
307
+ var test2 = {};
308
+ for (var i = 0; i < 10; i++) {
309
+ test2["_" + String.fromCharCode(i)] = i;
310
+ }
311
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
312
+ return test2[n];
313
+ });
314
+ if (order2.join("") !== "0123456789") {
315
+ return false;
316
+ }
317
+ var test3 = {};
318
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
319
+ test3[letter] = letter;
320
+ });
321
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
322
+ return false;
323
+ }
324
+ return true;
325
+ } catch (err) {
326
+ return false;
327
+ }
328
+ }
329
+ module.exports = shouldUseNative() ? Object.assign : function(target, source) {
330
+ var from;
331
+ var to = toObject(target);
332
+ var symbols;
333
+ for (var s = 1; s < arguments.length; s++) {
334
+ from = Object(arguments[s]);
335
+ for (var key in from) {
336
+ if (hasOwnProperty.call(from, key)) {
337
+ to[key] = from[key];
338
+ }
339
+ }
340
+ if (getOwnPropertySymbols) {
341
+ symbols = getOwnPropertySymbols(from);
342
+ for (var i = 0; i < symbols.length; i++) {
343
+ if (propIsEnumerable.call(from, symbols[i])) {
344
+ to[symbols[i]] = from[symbols[i]];
345
+ }
346
+ }
347
+ }
348
+ }
349
+ return to;
350
+ };
351
+ }
352
+ });
353
+
354
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js
355
+ var require_ReactPropTypesSecret = __commonJS({
356
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/ReactPropTypesSecret.js"(exports$1, module) {
357
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
358
+ module.exports = ReactPropTypesSecret;
359
+ }
360
+ });
361
+
362
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js
363
+ var require_has = __commonJS({
364
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/lib/has.js"(exports$1, module) {
365
+ module.exports = Function.call.bind(Object.prototype.hasOwnProperty);
366
+ }
367
+ });
368
+
369
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js
370
+ var require_checkPropTypes = __commonJS({
371
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/checkPropTypes.js"(exports$1, module) {
372
+ var printWarning = function() {
373
+ };
374
+ if (process.env.NODE_ENV !== "production") {
375
+ ReactPropTypesSecret = require_ReactPropTypesSecret();
376
+ loggedTypeFailures = {};
377
+ has = require_has();
378
+ printWarning = function(text) {
379
+ var message = "Warning: " + text;
380
+ if (typeof console !== "undefined") {
381
+ console.error(message);
382
+ }
383
+ try {
384
+ throw new Error(message);
385
+ } catch (x) {
386
+ }
387
+ };
388
+ }
389
+ var ReactPropTypesSecret;
390
+ var loggedTypeFailures;
391
+ var has;
392
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
393
+ if (process.env.NODE_ENV !== "production") {
394
+ for (var typeSpecName in typeSpecs) {
395
+ if (has(typeSpecs, typeSpecName)) {
396
+ var error;
397
+ try {
398
+ if (typeof typeSpecs[typeSpecName] !== "function") {
399
+ var err = Error(
400
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
401
+ );
402
+ err.name = "Invariant Violation";
403
+ throw err;
404
+ }
405
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
406
+ } catch (ex) {
407
+ error = ex;
408
+ }
409
+ if (error && !(error instanceof Error)) {
410
+ printWarning(
411
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
412
+ );
413
+ }
414
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
415
+ loggedTypeFailures[error.message] = true;
416
+ var stack = getStack ? getStack() : "";
417
+ printWarning(
418
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
419
+ );
420
+ }
421
+ }
422
+ }
423
+ }
424
+ }
425
+ checkPropTypes.resetWarningCache = function() {
426
+ if (process.env.NODE_ENV !== "production") {
427
+ loggedTypeFailures = {};
428
+ }
429
+ };
430
+ module.exports = checkPropTypes;
431
+ }
432
+ });
433
+
434
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js
435
+ var require_factoryWithTypeCheckers = __commonJS({
436
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithTypeCheckers.js"(exports$1, module) {
437
+ var ReactIs = require_react_is();
438
+ var assign = require_object_assign();
439
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
440
+ var has = require_has();
441
+ var checkPropTypes = require_checkPropTypes();
442
+ var printWarning = function() {
443
+ };
444
+ if (process.env.NODE_ENV !== "production") {
445
+ printWarning = function(text) {
446
+ var message = "Warning: " + text;
447
+ if (typeof console !== "undefined") {
448
+ console.error(message);
449
+ }
450
+ try {
451
+ throw new Error(message);
452
+ } catch (x) {
453
+ }
454
+ };
455
+ }
456
+ function emptyFunctionThatReturnsNull() {
457
+ return null;
458
+ }
459
+ module.exports = function(isValidElement, throwOnDirectAccess) {
460
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
461
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
462
+ function getIteratorFn(maybeIterable) {
463
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
464
+ if (typeof iteratorFn === "function") {
465
+ return iteratorFn;
466
+ }
467
+ }
468
+ var ANONYMOUS = "<<anonymous>>";
469
+ var ReactPropTypes = {
470
+ array: createPrimitiveTypeChecker("array"),
471
+ bigint: createPrimitiveTypeChecker("bigint"),
472
+ bool: createPrimitiveTypeChecker("boolean"),
473
+ func: createPrimitiveTypeChecker("function"),
474
+ number: createPrimitiveTypeChecker("number"),
475
+ object: createPrimitiveTypeChecker("object"),
476
+ string: createPrimitiveTypeChecker("string"),
477
+ symbol: createPrimitiveTypeChecker("symbol"),
478
+ any: createAnyTypeChecker(),
479
+ arrayOf: createArrayOfTypeChecker,
480
+ element: createElementTypeChecker(),
481
+ elementType: createElementTypeTypeChecker(),
482
+ instanceOf: createInstanceTypeChecker,
483
+ node: createNodeChecker(),
484
+ objectOf: createObjectOfTypeChecker,
485
+ oneOf: createEnumTypeChecker,
486
+ oneOfType: createUnionTypeChecker,
487
+ shape: createShapeTypeChecker,
488
+ exact: createStrictShapeTypeChecker
489
+ };
490
+ function is(x, y) {
491
+ if (x === y) {
492
+ return x !== 0 || 1 / x === 1 / y;
493
+ } else {
494
+ return x !== x && y !== y;
495
+ }
496
+ }
497
+ function PropTypeError(message, data) {
498
+ this.message = message;
499
+ this.data = data && typeof data === "object" ? data : {};
500
+ this.stack = "";
501
+ }
502
+ PropTypeError.prototype = Error.prototype;
503
+ function createChainableTypeChecker(validate) {
504
+ if (process.env.NODE_ENV !== "production") {
505
+ var manualPropTypeCallCache = {};
506
+ var manualPropTypeWarningCount = 0;
507
+ }
508
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
509
+ componentName = componentName || ANONYMOUS;
510
+ propFullName = propFullName || propName;
511
+ if (secret !== ReactPropTypesSecret) {
512
+ if (throwOnDirectAccess) {
513
+ var err = new Error(
514
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
515
+ );
516
+ err.name = "Invariant Violation";
517
+ throw err;
518
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
519
+ var cacheKey = componentName + ":" + propName;
520
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
521
+ manualPropTypeWarningCount < 3) {
522
+ printWarning(
523
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
524
+ );
525
+ manualPropTypeCallCache[cacheKey] = true;
526
+ manualPropTypeWarningCount++;
527
+ }
528
+ }
529
+ }
530
+ if (props[propName] == null) {
531
+ if (isRequired) {
532
+ if (props[propName] === null) {
533
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
534
+ }
535
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
536
+ }
537
+ return null;
538
+ } else {
539
+ return validate(props, propName, componentName, location, propFullName);
540
+ }
541
+ }
542
+ var chainedCheckType = checkType.bind(null, false);
543
+ chainedCheckType.isRequired = checkType.bind(null, true);
544
+ return chainedCheckType;
545
+ }
546
+ function createPrimitiveTypeChecker(expectedType) {
547
+ function validate(props, propName, componentName, location, propFullName, secret) {
548
+ var propValue = props[propName];
549
+ var propType = getPropType(propValue);
550
+ if (propType !== expectedType) {
551
+ var preciseType = getPreciseType(propValue);
552
+ return new PropTypeError(
553
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
554
+ { expectedType }
555
+ );
556
+ }
557
+ return null;
558
+ }
559
+ return createChainableTypeChecker(validate);
560
+ }
561
+ function createAnyTypeChecker() {
562
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
563
+ }
564
+ function createArrayOfTypeChecker(typeChecker) {
565
+ function validate(props, propName, componentName, location, propFullName) {
566
+ if (typeof typeChecker !== "function") {
567
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
568
+ }
569
+ var propValue = props[propName];
570
+ if (!Array.isArray(propValue)) {
571
+ var propType = getPropType(propValue);
572
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
573
+ }
574
+ for (var i = 0; i < propValue.length; i++) {
575
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
576
+ if (error instanceof Error) {
577
+ return error;
578
+ }
579
+ }
580
+ return null;
581
+ }
582
+ return createChainableTypeChecker(validate);
583
+ }
584
+ function createElementTypeChecker() {
585
+ function validate(props, propName, componentName, location, propFullName) {
586
+ var propValue = props[propName];
587
+ if (!isValidElement(propValue)) {
588
+ var propType = getPropType(propValue);
589
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
590
+ }
591
+ return null;
592
+ }
593
+ return createChainableTypeChecker(validate);
594
+ }
595
+ function createElementTypeTypeChecker() {
596
+ function validate(props, propName, componentName, location, propFullName) {
597
+ var propValue = props[propName];
598
+ if (!ReactIs.isValidElementType(propValue)) {
599
+ var propType = getPropType(propValue);
600
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
601
+ }
602
+ return null;
603
+ }
604
+ return createChainableTypeChecker(validate);
605
+ }
606
+ function createInstanceTypeChecker(expectedClass) {
607
+ function validate(props, propName, componentName, location, propFullName) {
608
+ if (!(props[propName] instanceof expectedClass)) {
609
+ var expectedClassName = expectedClass.name || ANONYMOUS;
610
+ var actualClassName = getClassName(props[propName]);
611
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
612
+ }
613
+ return null;
614
+ }
615
+ return createChainableTypeChecker(validate);
616
+ }
617
+ function createEnumTypeChecker(expectedValues) {
618
+ if (!Array.isArray(expectedValues)) {
619
+ if (process.env.NODE_ENV !== "production") {
620
+ if (arguments.length > 1) {
621
+ printWarning(
622
+ "Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
623
+ );
624
+ } else {
625
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
626
+ }
627
+ }
628
+ return emptyFunctionThatReturnsNull;
629
+ }
630
+ function validate(props, propName, componentName, location, propFullName) {
631
+ var propValue = props[propName];
632
+ for (var i = 0; i < expectedValues.length; i++) {
633
+ if (is(propValue, expectedValues[i])) {
634
+ return null;
635
+ }
636
+ }
637
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
638
+ var type = getPreciseType(value);
639
+ if (type === "symbol") {
640
+ return String(value);
641
+ }
642
+ return value;
643
+ });
644
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
645
+ }
646
+ return createChainableTypeChecker(validate);
647
+ }
648
+ function createObjectOfTypeChecker(typeChecker) {
649
+ function validate(props, propName, componentName, location, propFullName) {
650
+ if (typeof typeChecker !== "function") {
651
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
652
+ }
653
+ var propValue = props[propName];
654
+ var propType = getPropType(propValue);
655
+ if (propType !== "object") {
656
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
657
+ }
658
+ for (var key in propValue) {
659
+ if (has(propValue, key)) {
660
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
661
+ if (error instanceof Error) {
662
+ return error;
663
+ }
664
+ }
665
+ }
666
+ return null;
667
+ }
668
+ return createChainableTypeChecker(validate);
669
+ }
670
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
671
+ if (!Array.isArray(arrayOfTypeCheckers)) {
672
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
673
+ return emptyFunctionThatReturnsNull;
674
+ }
675
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
676
+ var checker = arrayOfTypeCheckers[i];
677
+ if (typeof checker !== "function") {
678
+ printWarning(
679
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
680
+ );
681
+ return emptyFunctionThatReturnsNull;
682
+ }
683
+ }
684
+ function validate(props, propName, componentName, location, propFullName) {
685
+ var expectedTypes = [];
686
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
687
+ var checker2 = arrayOfTypeCheckers[i2];
688
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
689
+ if (checkerResult == null) {
690
+ return null;
691
+ }
692
+ if (checkerResult.data && has(checkerResult.data, "expectedType")) {
693
+ expectedTypes.push(checkerResult.data.expectedType);
694
+ }
695
+ }
696
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
697
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
698
+ }
699
+ return createChainableTypeChecker(validate);
700
+ }
701
+ function createNodeChecker() {
702
+ function validate(props, propName, componentName, location, propFullName) {
703
+ if (!isNode(props[propName])) {
704
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
705
+ }
706
+ return null;
707
+ }
708
+ return createChainableTypeChecker(validate);
709
+ }
710
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
711
+ return new PropTypeError(
712
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
713
+ );
714
+ }
715
+ function createShapeTypeChecker(shapeTypes) {
716
+ function validate(props, propName, componentName, location, propFullName) {
717
+ var propValue = props[propName];
718
+ var propType = getPropType(propValue);
719
+ if (propType !== "object") {
720
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
721
+ }
722
+ for (var key in shapeTypes) {
723
+ var checker = shapeTypes[key];
724
+ if (typeof checker !== "function") {
725
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
726
+ }
727
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
728
+ if (error) {
729
+ return error;
730
+ }
731
+ }
732
+ return null;
733
+ }
734
+ return createChainableTypeChecker(validate);
735
+ }
736
+ function createStrictShapeTypeChecker(shapeTypes) {
737
+ function validate(props, propName, componentName, location, propFullName) {
738
+ var propValue = props[propName];
739
+ var propType = getPropType(propValue);
740
+ if (propType !== "object") {
741
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
742
+ }
743
+ var allKeys = assign({}, props[propName], shapeTypes);
744
+ for (var key in allKeys) {
745
+ var checker = shapeTypes[key];
746
+ if (has(shapeTypes, key) && typeof checker !== "function") {
747
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
748
+ }
749
+ if (!checker) {
750
+ return new PropTypeError(
751
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
752
+ );
753
+ }
754
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
755
+ if (error) {
756
+ return error;
757
+ }
758
+ }
759
+ return null;
760
+ }
761
+ return createChainableTypeChecker(validate);
762
+ }
763
+ function isNode(propValue) {
764
+ switch (typeof propValue) {
765
+ case "number":
766
+ case "string":
767
+ case "undefined":
768
+ return true;
769
+ case "boolean":
770
+ return !propValue;
771
+ case "object":
772
+ if (Array.isArray(propValue)) {
773
+ return propValue.every(isNode);
774
+ }
775
+ if (propValue === null || isValidElement(propValue)) {
776
+ return true;
777
+ }
778
+ var iteratorFn = getIteratorFn(propValue);
779
+ if (iteratorFn) {
780
+ var iterator = iteratorFn.call(propValue);
781
+ var step;
782
+ if (iteratorFn !== propValue.entries) {
783
+ while (!(step = iterator.next()).done) {
784
+ if (!isNode(step.value)) {
785
+ return false;
786
+ }
787
+ }
788
+ } else {
789
+ while (!(step = iterator.next()).done) {
790
+ var entry = step.value;
791
+ if (entry) {
792
+ if (!isNode(entry[1])) {
793
+ return false;
794
+ }
795
+ }
796
+ }
797
+ }
798
+ } else {
799
+ return false;
800
+ }
801
+ return true;
802
+ default:
803
+ return false;
804
+ }
805
+ }
806
+ function isSymbol(propType, propValue) {
807
+ if (propType === "symbol") {
808
+ return true;
809
+ }
810
+ if (!propValue) {
811
+ return false;
812
+ }
813
+ if (propValue["@@toStringTag"] === "Symbol") {
814
+ return true;
815
+ }
816
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
817
+ return true;
818
+ }
819
+ return false;
820
+ }
821
+ function getPropType(propValue) {
822
+ var propType = typeof propValue;
823
+ if (Array.isArray(propValue)) {
824
+ return "array";
825
+ }
826
+ if (propValue instanceof RegExp) {
827
+ return "object";
828
+ }
829
+ if (isSymbol(propType, propValue)) {
830
+ return "symbol";
831
+ }
832
+ return propType;
833
+ }
834
+ function getPreciseType(propValue) {
835
+ if (typeof propValue === "undefined" || propValue === null) {
836
+ return "" + propValue;
837
+ }
838
+ var propType = getPropType(propValue);
839
+ if (propType === "object") {
840
+ if (propValue instanceof Date) {
841
+ return "date";
842
+ } else if (propValue instanceof RegExp) {
843
+ return "regexp";
844
+ }
845
+ }
846
+ return propType;
847
+ }
848
+ function getPostfixForTypeWarning(value) {
849
+ var type = getPreciseType(value);
850
+ switch (type) {
851
+ case "array":
852
+ case "object":
853
+ return "an " + type;
854
+ case "boolean":
855
+ case "date":
856
+ case "regexp":
857
+ return "a " + type;
858
+ default:
859
+ return type;
860
+ }
861
+ }
862
+ function getClassName(propValue) {
863
+ if (!propValue.constructor || !propValue.constructor.name) {
864
+ return ANONYMOUS;
865
+ }
866
+ return propValue.constructor.name;
867
+ }
868
+ ReactPropTypes.checkPropTypes = checkPropTypes;
869
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
870
+ ReactPropTypes.PropTypes = ReactPropTypes;
871
+ return ReactPropTypes;
872
+ };
873
+ }
874
+ });
875
+
876
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js
877
+ var require_factoryWithThrowingShims = __commonJS({
878
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/factoryWithThrowingShims.js"(exports$1, module) {
879
+ var ReactPropTypesSecret = require_ReactPropTypesSecret();
880
+ function emptyFunction() {
881
+ }
882
+ function emptyFunctionWithReset() {
883
+ }
884
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
885
+ module.exports = function() {
886
+ function shim(props, propName, componentName, location, propFullName, secret) {
887
+ if (secret === ReactPropTypesSecret) {
888
+ return;
889
+ }
890
+ var err = new Error(
891
+ "Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
892
+ );
893
+ err.name = "Invariant Violation";
894
+ throw err;
895
+ }
896
+ shim.isRequired = shim;
897
+ function getShim() {
898
+ return shim;
899
+ }
900
+ var ReactPropTypes = {
901
+ array: shim,
902
+ bigint: shim,
903
+ bool: shim,
904
+ func: shim,
905
+ number: shim,
906
+ object: shim,
907
+ string: shim,
908
+ symbol: shim,
909
+ any: shim,
910
+ arrayOf: getShim,
911
+ element: shim,
912
+ elementType: shim,
913
+ instanceOf: getShim,
914
+ node: shim,
915
+ objectOf: getShim,
916
+ oneOf: getShim,
917
+ oneOfType: getShim,
918
+ shape: getShim,
919
+ exact: getShim,
920
+ checkPropTypes: emptyFunctionWithReset,
921
+ resetWarningCache: emptyFunction
922
+ };
923
+ ReactPropTypes.PropTypes = ReactPropTypes;
924
+ return ReactPropTypes;
925
+ };
926
+ }
927
+ });
928
+
929
+ // ../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js
930
+ var require_prop_types = __commonJS({
931
+ "../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js"(exports$1, module) {
932
+ if (process.env.NODE_ENV !== "production") {
933
+ ReactIs = require_react_is();
934
+ throwOnDirectAccess = true;
935
+ module.exports = require_factoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
936
+ } else {
937
+ module.exports = require_factoryWithThrowingShims()();
938
+ }
939
+ var ReactIs;
940
+ var throwOnDirectAccess;
941
+ }
942
+ });
943
+
944
+ // ../../node_modules/.pnpm/attr-accept@2.2.2/node_modules/attr-accept/dist/es/index.js
945
+ var require_es = __commonJS({
946
+ "../../node_modules/.pnpm/attr-accept@2.2.2/node_modules/attr-accept/dist/es/index.js"(exports$1) {
947
+ exports$1.__esModule = true;
948
+ exports$1.default = function(file, acceptedFiles) {
949
+ if (file && acceptedFiles) {
950
+ var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
951
+ var fileName = file.name || "";
952
+ var mimeType = (file.type || "").toLowerCase();
953
+ var baseMimeType = mimeType.replace(/\/.*$/, "");
954
+ return acceptedFilesArray.some(function(type) {
955
+ var validType = type.trim().toLowerCase();
956
+ if (validType.charAt(0) === ".") {
957
+ return fileName.toLowerCase().endsWith(validType);
958
+ } else if (validType.endsWith("/*")) {
959
+ return baseMimeType === validType.replace(/\/.*$/, "");
960
+ }
961
+ return mimeType === validType;
962
+ });
963
+ }
964
+ return true;
965
+ };
966
+ }
967
+ });
968
+ var FileUploadContext = createContext(null);
969
+ var FileUploadProvider = FileUploadContext.Provider;
970
+ var useFileUploadContext = () => {
971
+ const ctx = use(FileUploadContext);
972
+ if (ctx === null) {
973
+ throw new Error("FileUpload subcomponents and hooks must be used inside <FileUpload>.");
974
+ }
975
+ return ctx;
976
+ };
977
+ var useFileUploadRejections = () => useFileUploadContext().dropTarget.rejections;
978
+ var dropZoneVariants = cva(
979
+ [
980
+ // layout
981
+ "tw:flex",
982
+ "tw:flex-col",
983
+ "tw:items-center",
984
+ "tw:justify-center",
985
+ "tw:gap-2",
986
+ "tw:px-6",
987
+ "tw:py-10",
988
+ "tw:text-center",
989
+ // surface (argo semantic tokens — chrome)
990
+ "tw:rounded-lg",
991
+ "tw:border-2",
992
+ "tw:border-dashed",
993
+ "tw:border-input",
994
+ "tw:bg-background",
995
+ "tw:text-foreground",
996
+ "tw:transition-colors",
997
+ "tw:cursor-pointer",
998
+ "tw:select-none",
999
+ // focus
1000
+ "tw:!outline-hidden",
1001
+ "tw:focus-visible:ring-2",
1002
+ "tw:focus-visible:ring-ring/50",
1003
+ "tw:focus-visible:border-primary"
1004
+ ],
1005
+ {
1006
+ defaultVariants: {
1007
+ state: "idle"
1008
+ },
1009
+ variants: {
1010
+ state: {
1011
+ idle: ["tw:hover:bg-accent", "tw:hover:border-primary"],
1012
+ dragging: ["tw:bg-accent", "tw:border-primary"],
1013
+ disabled: ["tw:opacity-50", "tw:cursor-not-allowed"],
1014
+ error: ["tw:border-destructive", "tw:bg-destructive/5"]
1015
+ }
1016
+ }
1017
+ }
1018
+ );
1019
+ var fileItemVariants = cva(
1020
+ [
1021
+ "tw:flex",
1022
+ "tw:items-center",
1023
+ "tw:gap-3",
1024
+ "tw:rounded-md",
1025
+ "tw:border",
1026
+ "tw:border-solid",
1027
+ "tw:px-3",
1028
+ "tw:py-2",
1029
+ "tw:text-sm",
1030
+ "tw:text-foreground"
1031
+ ],
1032
+ {
1033
+ defaultVariants: {
1034
+ invalid: false
1035
+ },
1036
+ variants: {
1037
+ invalid: {
1038
+ false: ["tw:border-border", "tw:bg-background"],
1039
+ true: ["tw:border-destructive", "tw:bg-destructive/5"]
1040
+ }
1041
+ }
1042
+ }
1043
+ );
1044
+ var FileUploadDropZone = ({ children, inputId, className, ...rest }) => {
1045
+ const { dropTarget, forcedState, disabled } = useFileUploadContext();
1046
+ const { getRootProps, getInputProps, isDragActive, rejections } = dropTarget;
1047
+ const state = disabled ? "disabled" : forcedState ?? (rejections.length > 0 ? "error" : isDragActive ? "dragging" : "idle");
1048
+ const rootProps = getRootProps({ role: "button", ...rest });
1049
+ return /* @__PURE__ */ jsxs(
1050
+ "div",
1051
+ {
1052
+ ...rootProps,
1053
+ "data-slot": "file-upload-dropzone",
1054
+ className: cn(dropZoneVariants({ state }), className),
1055
+ children: [
1056
+ /* @__PURE__ */ jsx("input", { ...getInputProps({ id: inputId }) }),
1057
+ children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
1058
+ /* @__PURE__ */ jsx(Upload, { className: "tw:size-8 tw:text-muted-foreground" }),
1059
+ /* @__PURE__ */ jsx("p", { className: "tw:m-0 tw:text-sm tw:font-medium", children: "Drag files here or click to browse" })
1060
+ ] })
1061
+ ]
1062
+ }
1063
+ );
1064
+ };
1065
+ var formatBytes = (bytes) => {
1066
+ if (bytes === 0) return "0 B";
1067
+ const units = ["B", "KB", "MB", "GB"];
1068
+ const exponent = Math.min(Math.floor(Math.log10(bytes) / 3), units.length - 1);
1069
+ const value = bytes / 1e3 ** exponent;
1070
+ return `${value.toFixed(value >= 10 || exponent === 0 ? 0 : 1)} ${units[exponent]}`;
1071
+ };
1072
+ var iconForFile = (file) => {
1073
+ if (file.type.startsWith("text/csv") || file.name.endsWith(".csv")) return FileSpreadsheet;
1074
+ if (file.type.startsWith("text/")) return FileText;
1075
+ return File;
1076
+ };
1077
+ var FileUploadFileList = ({ files, onRemove, invalid, className, ...rest }) => {
1078
+ if (files.length === 0) return null;
1079
+ const itemClassName = fileItemVariants({ invalid });
1080
+ return /* @__PURE__ */ jsx(
1081
+ "ul",
1082
+ {
1083
+ className: cn("tw:m-0 tw:flex tw:list-none tw:flex-col tw:gap-2 tw:p-0", className),
1084
+ ...rest,
1085
+ children: files.map((file, index) => {
1086
+ const Icon = iconForFile(file);
1087
+ return /* @__PURE__ */ jsxs("li", { className: itemClassName, children: [
1088
+ /* @__PURE__ */ jsx(Icon, { className: "tw:size-5 tw:shrink-0 tw:text-muted-foreground" }),
1089
+ /* @__PURE__ */ jsxs("div", { className: "tw:flex tw:min-w-0 tw:flex-1 tw:flex-col", children: [
1090
+ /* @__PURE__ */ jsx("span", { className: "tw:truncate tw:font-medium", children: file.name }),
1091
+ /* @__PURE__ */ jsx("span", { className: "tw:text-xs tw:text-muted-foreground", children: formatBytes(file.size) })
1092
+ ] }),
1093
+ onRemove && /* @__PURE__ */ jsx(
1094
+ Button,
1095
+ {
1096
+ variant: "invisible",
1097
+ size: "icon-sm",
1098
+ "aria-label": `Remove ${file.name}`,
1099
+ onClick: () => onRemove(file, index),
1100
+ children: /* @__PURE__ */ jsx(X, {})
1101
+ }
1102
+ )
1103
+ ] }, `${file.name}-${index}`);
1104
+ })
1105
+ }
1106
+ );
1107
+ };
1108
+
1109
+ // ../../node_modules/.pnpm/react-dropzone@14.2.3_react@19.2.7/node_modules/react-dropzone/dist/es/index.js
1110
+ var import_prop_types = __toESM(require_prop_types());
1111
+
1112
+ // ../../node_modules/.pnpm/tslib@2.8.1/node_modules/tslib/tslib.es6.mjs
1113
+ function __awaiter(thisArg, _arguments, P, generator) {
1114
+ function adopt(value) {
1115
+ return value instanceof P ? value : new P(function(resolve) {
1116
+ resolve(value);
1117
+ });
1118
+ }
1119
+ return new (P || (P = Promise))(function(resolve, reject) {
1120
+ function fulfilled(value) {
1121
+ try {
1122
+ step(generator.next(value));
1123
+ } catch (e) {
1124
+ reject(e);
1125
+ }
1126
+ }
1127
+ function rejected(value) {
1128
+ try {
1129
+ step(generator["throw"](value));
1130
+ } catch (e) {
1131
+ reject(e);
1132
+ }
1133
+ }
1134
+ function step(result) {
1135
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1136
+ }
1137
+ step((generator = generator.apply(thisArg, [])).next());
1138
+ });
1139
+ }
1140
+ function __generator(thisArg, body) {
1141
+ var _ = { label: 0, sent: function() {
1142
+ if (t[0] & 1) throw t[1];
1143
+ return t[1];
1144
+ }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
1145
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
1146
+ return this;
1147
+ }), g;
1148
+ function verb(n) {
1149
+ return function(v) {
1150
+ return step([n, v]);
1151
+ };
1152
+ }
1153
+ function step(op) {
1154
+ if (f) throw new TypeError("Generator is already executing.");
1155
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
1156
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
1157
+ if (y = 0, t) op = [op[0] & 2, t.value];
1158
+ switch (op[0]) {
1159
+ case 0:
1160
+ case 1:
1161
+ t = op;
1162
+ break;
1163
+ case 4:
1164
+ _.label++;
1165
+ return { value: op[1], done: false };
1166
+ case 5:
1167
+ _.label++;
1168
+ y = op[1];
1169
+ op = [0];
1170
+ continue;
1171
+ case 7:
1172
+ op = _.ops.pop();
1173
+ _.trys.pop();
1174
+ continue;
1175
+ default:
1176
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
1177
+ _ = 0;
1178
+ continue;
1179
+ }
1180
+ if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
1181
+ _.label = op[1];
1182
+ break;
1183
+ }
1184
+ if (op[0] === 6 && _.label < t[1]) {
1185
+ _.label = t[1];
1186
+ t = op;
1187
+ break;
1188
+ }
1189
+ if (t && _.label < t[2]) {
1190
+ _.label = t[2];
1191
+ _.ops.push(op);
1192
+ break;
1193
+ }
1194
+ if (t[2]) _.ops.pop();
1195
+ _.trys.pop();
1196
+ continue;
1197
+ }
1198
+ op = body.call(thisArg, _);
1199
+ } catch (e) {
1200
+ op = [6, e];
1201
+ y = 0;
1202
+ } finally {
1203
+ f = t = 0;
1204
+ }
1205
+ if (op[0] & 5) throw op[1];
1206
+ return { value: op[0] ? op[1] : void 0, done: true };
1207
+ }
1208
+ }
1209
+ function __read(o, n) {
1210
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
1211
+ if (!m) return o;
1212
+ var i = m.call(o), r, ar = [], e;
1213
+ try {
1214
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
1215
+ } catch (error) {
1216
+ e = { error };
1217
+ } finally {
1218
+ try {
1219
+ if (r && !r.done && (m = i["return"])) m.call(i);
1220
+ } finally {
1221
+ if (e) throw e.error;
1222
+ }
1223
+ }
1224
+ return ar;
1225
+ }
1226
+ function __spreadArray(to, from, pack) {
1227
+ if (arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
1228
+ if (ar || !(i in from)) {
1229
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
1230
+ ar[i] = from[i];
1231
+ }
1232
+ }
1233
+ return to.concat(ar || Array.prototype.slice.call(from));
1234
+ }
1235
+
1236
+ // ../../node_modules/.pnpm/file-selector@0.6.0/node_modules/file-selector/dist/es5/file.js
1237
+ var COMMON_MIME_TYPES = /* @__PURE__ */ new Map([
1238
+ // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
1239
+ ["aac", "audio/aac"],
1240
+ ["abw", "application/x-abiword"],
1241
+ ["arc", "application/x-freearc"],
1242
+ ["avif", "image/avif"],
1243
+ ["avi", "video/x-msvideo"],
1244
+ ["azw", "application/vnd.amazon.ebook"],
1245
+ ["bin", "application/octet-stream"],
1246
+ ["bmp", "image/bmp"],
1247
+ ["bz", "application/x-bzip"],
1248
+ ["bz2", "application/x-bzip2"],
1249
+ ["cda", "application/x-cdf"],
1250
+ ["csh", "application/x-csh"],
1251
+ ["css", "text/css"],
1252
+ ["csv", "text/csv"],
1253
+ ["doc", "application/msword"],
1254
+ ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
1255
+ ["eot", "application/vnd.ms-fontobject"],
1256
+ ["epub", "application/epub+zip"],
1257
+ ["gz", "application/gzip"],
1258
+ ["gif", "image/gif"],
1259
+ ["heic", "image/heic"],
1260
+ ["heif", "image/heif"],
1261
+ ["htm", "text/html"],
1262
+ ["html", "text/html"],
1263
+ ["ico", "image/vnd.microsoft.icon"],
1264
+ ["ics", "text/calendar"],
1265
+ ["jar", "application/java-archive"],
1266
+ ["jpeg", "image/jpeg"],
1267
+ ["jpg", "image/jpeg"],
1268
+ ["js", "text/javascript"],
1269
+ ["json", "application/json"],
1270
+ ["jsonld", "application/ld+json"],
1271
+ ["mid", "audio/midi"],
1272
+ ["midi", "audio/midi"],
1273
+ ["mjs", "text/javascript"],
1274
+ ["mp3", "audio/mpeg"],
1275
+ ["mp4", "video/mp4"],
1276
+ ["mpeg", "video/mpeg"],
1277
+ ["mpkg", "application/vnd.apple.installer+xml"],
1278
+ ["odp", "application/vnd.oasis.opendocument.presentation"],
1279
+ ["ods", "application/vnd.oasis.opendocument.spreadsheet"],
1280
+ ["odt", "application/vnd.oasis.opendocument.text"],
1281
+ ["oga", "audio/ogg"],
1282
+ ["ogv", "video/ogg"],
1283
+ ["ogx", "application/ogg"],
1284
+ ["opus", "audio/opus"],
1285
+ ["otf", "font/otf"],
1286
+ ["png", "image/png"],
1287
+ ["pdf", "application/pdf"],
1288
+ ["php", "application/x-httpd-php"],
1289
+ ["ppt", "application/vnd.ms-powerpoint"],
1290
+ ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
1291
+ ["rar", "application/vnd.rar"],
1292
+ ["rtf", "application/rtf"],
1293
+ ["sh", "application/x-sh"],
1294
+ ["svg", "image/svg+xml"],
1295
+ ["swf", "application/x-shockwave-flash"],
1296
+ ["tar", "application/x-tar"],
1297
+ ["tif", "image/tiff"],
1298
+ ["tiff", "image/tiff"],
1299
+ ["ts", "video/mp2t"],
1300
+ ["ttf", "font/ttf"],
1301
+ ["txt", "text/plain"],
1302
+ ["vsd", "application/vnd.visio"],
1303
+ ["wav", "audio/wav"],
1304
+ ["weba", "audio/webm"],
1305
+ ["webm", "video/webm"],
1306
+ ["webp", "image/webp"],
1307
+ ["woff", "font/woff"],
1308
+ ["woff2", "font/woff2"],
1309
+ ["xhtml", "application/xhtml+xml"],
1310
+ ["xls", "application/vnd.ms-excel"],
1311
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
1312
+ ["xml", "application/xml"],
1313
+ ["xul", "application/vnd.mozilla.xul+xml"],
1314
+ ["zip", "application/zip"],
1315
+ ["7z", "application/x-7z-compressed"],
1316
+ // Others
1317
+ ["mkv", "video/x-matroska"],
1318
+ ["mov", "video/quicktime"],
1319
+ ["msg", "application/vnd.ms-outlook"]
1320
+ ]);
1321
+ function toFileWithPath(file, path) {
1322
+ var f = withMimeType(file);
1323
+ if (typeof f.path !== "string") {
1324
+ var webkitRelativePath = file.webkitRelativePath;
1325
+ Object.defineProperty(f, "path", {
1326
+ value: typeof path === "string" ? path : typeof webkitRelativePath === "string" && webkitRelativePath.length > 0 ? webkitRelativePath : file.name,
1327
+ writable: false,
1328
+ configurable: false,
1329
+ enumerable: true
1330
+ });
1331
+ }
1332
+ return f;
1333
+ }
1334
+ function withMimeType(file) {
1335
+ var name = file.name;
1336
+ var hasExtension = name && name.lastIndexOf(".") !== -1;
1337
+ if (hasExtension && !file.type) {
1338
+ var ext = name.split(".").pop().toLowerCase();
1339
+ var type = COMMON_MIME_TYPES.get(ext);
1340
+ if (type) {
1341
+ Object.defineProperty(file, "type", {
1342
+ value: type,
1343
+ writable: false,
1344
+ configurable: false,
1345
+ enumerable: true
1346
+ });
1347
+ }
1348
+ }
1349
+ return file;
1350
+ }
1351
+
1352
+ // ../../node_modules/.pnpm/file-selector@0.6.0/node_modules/file-selector/dist/es5/file-selector.js
1353
+ var FILES_TO_IGNORE = [
1354
+ // Thumbnail cache files for macOS and Windows
1355
+ ".DS_Store",
1356
+ "Thumbs.db"
1357
+ // Windows
1358
+ ];
1359
+ function fromEvent(evt) {
1360
+ return __awaiter(this, void 0, void 0, function() {
1361
+ return __generator(this, function(_a) {
1362
+ if (isObject(evt) && isDataTransfer(evt.dataTransfer)) {
1363
+ return [2, getDataTransferFiles(evt.dataTransfer, evt.type)];
1364
+ } else if (isChangeEvt(evt)) {
1365
+ return [2, getInputFiles(evt)];
1366
+ } else if (Array.isArray(evt) && evt.every(function(item) {
1367
+ return "getFile" in item && typeof item.getFile === "function";
1368
+ })) {
1369
+ return [2, getFsHandleFiles(evt)];
1370
+ }
1371
+ return [2, []];
1372
+ });
1373
+ });
1374
+ }
1375
+ function isDataTransfer(value) {
1376
+ return isObject(value);
1377
+ }
1378
+ function isChangeEvt(value) {
1379
+ return isObject(value) && isObject(value.target);
1380
+ }
1381
+ function isObject(v) {
1382
+ return typeof v === "object" && v !== null;
1383
+ }
1384
+ function getInputFiles(evt) {
1385
+ return fromList(evt.target.files).map(function(file) {
1386
+ return toFileWithPath(file);
1387
+ });
1388
+ }
1389
+ function getFsHandleFiles(handles) {
1390
+ return __awaiter(this, void 0, void 0, function() {
1391
+ var files;
1392
+ return __generator(this, function(_a) {
1393
+ switch (_a.label) {
1394
+ case 0:
1395
+ return [4, Promise.all(handles.map(function(h) {
1396
+ return h.getFile();
1397
+ }))];
1398
+ case 1:
1399
+ files = _a.sent();
1400
+ return [2, files.map(function(file) {
1401
+ return toFileWithPath(file);
1402
+ })];
1403
+ }
1404
+ });
1405
+ });
1406
+ }
1407
+ function getDataTransferFiles(dt, type) {
1408
+ return __awaiter(this, void 0, void 0, function() {
1409
+ var items, files;
1410
+ return __generator(this, function(_a) {
1411
+ switch (_a.label) {
1412
+ case 0:
1413
+ if (!dt.items) return [3, 2];
1414
+ items = fromList(dt.items).filter(function(item) {
1415
+ return item.kind === "file";
1416
+ });
1417
+ if (type !== "drop") {
1418
+ return [2, items];
1419
+ }
1420
+ return [4, Promise.all(items.map(toFilePromises))];
1421
+ case 1:
1422
+ files = _a.sent();
1423
+ return [2, noIgnoredFiles(flatten(files))];
1424
+ case 2:
1425
+ return [2, noIgnoredFiles(fromList(dt.files).map(function(file) {
1426
+ return toFileWithPath(file);
1427
+ }))];
1428
+ }
1429
+ });
1430
+ });
1431
+ }
1432
+ function noIgnoredFiles(files) {
1433
+ return files.filter(function(file) {
1434
+ return FILES_TO_IGNORE.indexOf(file.name) === -1;
1435
+ });
1436
+ }
1437
+ function fromList(items) {
1438
+ if (items === null) {
1439
+ return [];
1440
+ }
1441
+ var files = [];
1442
+ for (var i = 0; i < items.length; i++) {
1443
+ var file = items[i];
1444
+ files.push(file);
1445
+ }
1446
+ return files;
1447
+ }
1448
+ function toFilePromises(item) {
1449
+ if (typeof item.webkitGetAsEntry !== "function") {
1450
+ return fromDataTransferItem(item);
1451
+ }
1452
+ var entry = item.webkitGetAsEntry();
1453
+ if (entry && entry.isDirectory) {
1454
+ return fromDirEntry(entry);
1455
+ }
1456
+ return fromDataTransferItem(item);
1457
+ }
1458
+ function flatten(items) {
1459
+ return items.reduce(function(acc, files) {
1460
+ return __spreadArray(__spreadArray([], __read(acc), false), __read(Array.isArray(files) ? flatten(files) : [files]), false);
1461
+ }, []);
1462
+ }
1463
+ function fromDataTransferItem(item) {
1464
+ var file = item.getAsFile();
1465
+ if (!file) {
1466
+ return Promise.reject("".concat(item, " is not a File"));
1467
+ }
1468
+ var fwp = toFileWithPath(file);
1469
+ return Promise.resolve(fwp);
1470
+ }
1471
+ function fromEntry(entry) {
1472
+ return __awaiter(this, void 0, void 0, function() {
1473
+ return __generator(this, function(_a) {
1474
+ return [2, entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry)];
1475
+ });
1476
+ });
1477
+ }
1478
+ function fromDirEntry(entry) {
1479
+ var reader = entry.createReader();
1480
+ return new Promise(function(resolve, reject) {
1481
+ var entries = [];
1482
+ function readEntries() {
1483
+ var _this = this;
1484
+ reader.readEntries(function(batch) {
1485
+ return __awaiter(_this, void 0, void 0, function() {
1486
+ var files, err_1, items;
1487
+ return __generator(this, function(_a) {
1488
+ switch (_a.label) {
1489
+ case 0:
1490
+ if (!!batch.length) return [3, 5];
1491
+ _a.label = 1;
1492
+ case 1:
1493
+ _a.trys.push([1, 3, , 4]);
1494
+ return [4, Promise.all(entries)];
1495
+ case 2:
1496
+ files = _a.sent();
1497
+ resolve(files);
1498
+ return [3, 4];
1499
+ case 3:
1500
+ err_1 = _a.sent();
1501
+ reject(err_1);
1502
+ return [3, 4];
1503
+ case 4:
1504
+ return [3, 6];
1505
+ case 5:
1506
+ items = Promise.all(batch.map(fromEntry));
1507
+ entries.push(items);
1508
+ readEntries();
1509
+ _a.label = 6;
1510
+ case 6:
1511
+ return [
1512
+ 2
1513
+ /*return*/
1514
+ ];
1515
+ }
1516
+ });
1517
+ });
1518
+ }, function(err) {
1519
+ reject(err);
1520
+ });
1521
+ }
1522
+ readEntries();
1523
+ });
1524
+ }
1525
+ function fromFileEntry(entry) {
1526
+ return __awaiter(this, void 0, void 0, function() {
1527
+ return __generator(this, function(_a) {
1528
+ return [2, new Promise(function(resolve, reject) {
1529
+ entry.file(function(file) {
1530
+ var fwp = toFileWithPath(file, entry.fullPath);
1531
+ resolve(fwp);
1532
+ }, function(err) {
1533
+ reject(err);
1534
+ });
1535
+ })];
1536
+ });
1537
+ });
1538
+ }
1539
+
1540
+ // ../../node_modules/.pnpm/react-dropzone@14.2.3_react@19.2.7/node_modules/react-dropzone/dist/es/utils/index.js
1541
+ var import_attr_accept = __toESM(require_es());
1542
+ function _toConsumableArray(arr) {
1543
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
1544
+ }
1545
+ function _nonIterableSpread() {
1546
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1547
+ }
1548
+ function _iterableToArray(iter) {
1549
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1550
+ }
1551
+ function _arrayWithoutHoles(arr) {
1552
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
1553
+ }
1554
+ function ownKeys(object, enumerableOnly) {
1555
+ var keys = Object.keys(object);
1556
+ if (Object.getOwnPropertySymbols) {
1557
+ var symbols = Object.getOwnPropertySymbols(object);
1558
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
1559
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1560
+ })), keys.push.apply(keys, symbols);
1561
+ }
1562
+ return keys;
1563
+ }
1564
+ function _objectSpread(target) {
1565
+ for (var i = 1; i < arguments.length; i++) {
1566
+ var source = null != arguments[i] ? arguments[i] : {};
1567
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
1568
+ _defineProperty(target, key, source[key]);
1569
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
1570
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1571
+ });
1572
+ }
1573
+ return target;
1574
+ }
1575
+ function _defineProperty(obj, key, value) {
1576
+ if (key in obj) {
1577
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1578
+ } else {
1579
+ obj[key] = value;
1580
+ }
1581
+ return obj;
1582
+ }
1583
+ function _slicedToArray(arr, i) {
1584
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
1585
+ }
1586
+ function _nonIterableRest() {
1587
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1588
+ }
1589
+ function _unsupportedIterableToArray(o, minLen) {
1590
+ if (!o) return;
1591
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
1592
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1593
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1594
+ if (n === "Map" || n === "Set") return Array.from(o);
1595
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
1596
+ }
1597
+ function _arrayLikeToArray(arr, len) {
1598
+ if (len == null || len > arr.length) len = arr.length;
1599
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
1600
+ arr2[i] = arr[i];
1601
+ }
1602
+ return arr2;
1603
+ }
1604
+ function _iterableToArrayLimit(arr, i) {
1605
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1606
+ if (_i == null) return;
1607
+ var _arr = [];
1608
+ var _n = true;
1609
+ var _d = false;
1610
+ var _s, _e;
1611
+ try {
1612
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1613
+ _arr.push(_s.value);
1614
+ if (i && _arr.length === i) break;
1615
+ }
1616
+ } catch (err) {
1617
+ _d = true;
1618
+ _e = err;
1619
+ } finally {
1620
+ try {
1621
+ if (!_n && _i["return"] != null) _i["return"]();
1622
+ } finally {
1623
+ if (_d) throw _e;
1624
+ }
1625
+ }
1626
+ return _arr;
1627
+ }
1628
+ function _arrayWithHoles(arr) {
1629
+ if (Array.isArray(arr)) return arr;
1630
+ }
1631
+ var FILE_INVALID_TYPE = "file-invalid-type";
1632
+ var FILE_TOO_LARGE = "file-too-large";
1633
+ var FILE_TOO_SMALL = "file-too-small";
1634
+ var TOO_MANY_FILES = "too-many-files";
1635
+ var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr2(accept) {
1636
+ accept = Array.isArray(accept) && accept.length === 1 ? accept[0] : accept;
1637
+ var messageSuffix = Array.isArray(accept) ? "one of ".concat(accept.join(", ")) : accept;
1638
+ return {
1639
+ code: FILE_INVALID_TYPE,
1640
+ message: "File type must be ".concat(messageSuffix)
1641
+ };
1642
+ };
1643
+ var getTooLargeRejectionErr = function getTooLargeRejectionErr2(maxSize) {
1644
+ return {
1645
+ code: FILE_TOO_LARGE,
1646
+ message: "File is larger than ".concat(maxSize, " ").concat(maxSize === 1 ? "byte" : "bytes")
1647
+ };
1648
+ };
1649
+ var getTooSmallRejectionErr = function getTooSmallRejectionErr2(minSize) {
1650
+ return {
1651
+ code: FILE_TOO_SMALL,
1652
+ message: "File is smaller than ".concat(minSize, " ").concat(minSize === 1 ? "byte" : "bytes")
1653
+ };
1654
+ };
1655
+ var TOO_MANY_FILES_REJECTION = {
1656
+ code: TOO_MANY_FILES,
1657
+ message: "Too many files"
1658
+ };
1659
+ function fileAccepted(file, accept) {
1660
+ var isAcceptable = file.type === "application/x-moz-file" || (0, import_attr_accept.default)(file, accept);
1661
+ return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];
1662
+ }
1663
+ function fileMatchSize(file, minSize, maxSize) {
1664
+ if (isDefined(file.size)) {
1665
+ if (isDefined(minSize) && isDefined(maxSize)) {
1666
+ if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
1667
+ if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
1668
+ } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
1669
+ else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
1670
+ }
1671
+ return [true, null];
1672
+ }
1673
+ function isDefined(value) {
1674
+ return value !== void 0 && value !== null;
1675
+ }
1676
+ function allFilesAccepted(_ref) {
1677
+ var files = _ref.files, accept = _ref.accept, minSize = _ref.minSize, maxSize = _ref.maxSize, multiple = _ref.multiple, maxFiles = _ref.maxFiles, validator = _ref.validator;
1678
+ if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {
1679
+ return false;
1680
+ }
1681
+ return files.every(function(file) {
1682
+ var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray(_fileAccepted, 1), accepted = _fileAccepted2[0];
1683
+ var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray(_fileMatchSize, 1), sizeMatch = _fileMatchSize2[0];
1684
+ var customErrors = validator ? validator(file) : null;
1685
+ return accepted && sizeMatch && !customErrors;
1686
+ });
1687
+ }
1688
+ function isPropagationStopped(event) {
1689
+ if (typeof event.isPropagationStopped === "function") {
1690
+ return event.isPropagationStopped();
1691
+ } else if (typeof event.cancelBubble !== "undefined") {
1692
+ return event.cancelBubble;
1693
+ }
1694
+ return false;
1695
+ }
1696
+ function isEvtWithFiles(event) {
1697
+ if (!event.dataTransfer) {
1698
+ return !!event.target && !!event.target.files;
1699
+ }
1700
+ return Array.prototype.some.call(event.dataTransfer.types, function(type) {
1701
+ return type === "Files" || type === "application/x-moz-file";
1702
+ });
1703
+ }
1704
+ function onDocumentDragOver(event) {
1705
+ event.preventDefault();
1706
+ }
1707
+ function isIe(userAgent) {
1708
+ return userAgent.indexOf("MSIE") !== -1 || userAgent.indexOf("Trident/") !== -1;
1709
+ }
1710
+ function isEdge(userAgent) {
1711
+ return userAgent.indexOf("Edge/") !== -1;
1712
+ }
1713
+ function isIeOrEdge() {
1714
+ var userAgent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1715
+ return isIe(userAgent) || isEdge(userAgent);
1716
+ }
1717
+ function composeEventHandlers() {
1718
+ for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
1719
+ fns[_key] = arguments[_key];
1720
+ }
1721
+ return function(event) {
1722
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
1723
+ args[_key2 - 1] = arguments[_key2];
1724
+ }
1725
+ return fns.some(function(fn) {
1726
+ if (!isPropagationStopped(event) && fn) {
1727
+ fn.apply(void 0, [event].concat(args));
1728
+ }
1729
+ return isPropagationStopped(event);
1730
+ });
1731
+ };
1732
+ }
1733
+ function canUseFileSystemAccessAPI() {
1734
+ return "showOpenFilePicker" in window;
1735
+ }
1736
+ function pickerOptionsFromAccept(accept) {
1737
+ if (isDefined(accept)) {
1738
+ var acceptForPicker = Object.entries(accept).filter(function(_ref2) {
1739
+ var _ref3 = _slicedToArray(_ref2, 2), mimeType = _ref3[0], ext = _ref3[1];
1740
+ var ok = true;
1741
+ if (!isMIMEType(mimeType)) {
1742
+ console.warn('Skipped "'.concat(mimeType, '" 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.'));
1743
+ ok = false;
1744
+ }
1745
+ if (!Array.isArray(ext) || !ext.every(isExt)) {
1746
+ console.warn('Skipped "'.concat(mimeType, '" because an invalid file extension was provided.'));
1747
+ ok = false;
1748
+ }
1749
+ return ok;
1750
+ }).reduce(function(agg, _ref4) {
1751
+ var _ref5 = _slicedToArray(_ref4, 2), mimeType = _ref5[0], ext = _ref5[1];
1752
+ return _objectSpread(_objectSpread({}, agg), {}, _defineProperty({}, mimeType, ext));
1753
+ }, {});
1754
+ return [{
1755
+ // description is required due to https://crbug.com/1264708
1756
+ description: "Files",
1757
+ accept: acceptForPicker
1758
+ }];
1759
+ }
1760
+ return accept;
1761
+ }
1762
+ function acceptPropAsAcceptAttr(accept) {
1763
+ if (isDefined(accept)) {
1764
+ return Object.entries(accept).reduce(function(a, _ref6) {
1765
+ var _ref7 = _slicedToArray(_ref6, 2), mimeType = _ref7[0], ext = _ref7[1];
1766
+ return [].concat(_toConsumableArray(a), [mimeType], _toConsumableArray(ext));
1767
+ }, []).filter(function(v) {
1768
+ return isMIMEType(v) || isExt(v);
1769
+ }).join(",");
1770
+ }
1771
+ return void 0;
1772
+ }
1773
+ function isAbort(v) {
1774
+ return v instanceof DOMException && (v.name === "AbortError" || v.code === v.ABORT_ERR);
1775
+ }
1776
+ function isSecurityError(v) {
1777
+ return v instanceof DOMException && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
1778
+ }
1779
+ function isMIMEType(v) {
1780
+ return v === "audio/*" || v === "video/*" || v === "image/*" || v === "text/*" || /\w+\/[-+.\w]+/g.test(v);
1781
+ }
1782
+ function isExt(v) {
1783
+ return /^.*\.[\w]+$/.test(v);
1784
+ }
1785
+
1786
+ // ../../node_modules/.pnpm/react-dropzone@14.2.3_react@19.2.7/node_modules/react-dropzone/dist/es/index.js
1787
+ var _excluded = ["children"];
1788
+ var _excluded2 = ["open"];
1789
+ var _excluded3 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"];
1790
+ var _excluded4 = ["refKey", "onChange", "onClick"];
1791
+ function _toConsumableArray2(arr) {
1792
+ return _arrayWithoutHoles2(arr) || _iterableToArray2(arr) || _unsupportedIterableToArray2(arr) || _nonIterableSpread2();
1793
+ }
1794
+ function _nonIterableSpread2() {
1795
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1796
+ }
1797
+ function _iterableToArray2(iter) {
1798
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
1799
+ }
1800
+ function _arrayWithoutHoles2(arr) {
1801
+ if (Array.isArray(arr)) return _arrayLikeToArray2(arr);
1802
+ }
1803
+ function _slicedToArray2(arr, i) {
1804
+ return _arrayWithHoles2(arr) || _iterableToArrayLimit2(arr, i) || _unsupportedIterableToArray2(arr, i) || _nonIterableRest2();
1805
+ }
1806
+ function _nonIterableRest2() {
1807
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
1808
+ }
1809
+ function _unsupportedIterableToArray2(o, minLen) {
1810
+ if (!o) return;
1811
+ if (typeof o === "string") return _arrayLikeToArray2(o, minLen);
1812
+ var n = Object.prototype.toString.call(o).slice(8, -1);
1813
+ if (n === "Object" && o.constructor) n = o.constructor.name;
1814
+ if (n === "Map" || n === "Set") return Array.from(o);
1815
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray2(o, minLen);
1816
+ }
1817
+ function _arrayLikeToArray2(arr, len) {
1818
+ if (len == null || len > arr.length) len = arr.length;
1819
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
1820
+ arr2[i] = arr[i];
1821
+ }
1822
+ return arr2;
1823
+ }
1824
+ function _iterableToArrayLimit2(arr, i) {
1825
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
1826
+ if (_i == null) return;
1827
+ var _arr = [];
1828
+ var _n = true;
1829
+ var _d = false;
1830
+ var _s, _e;
1831
+ try {
1832
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
1833
+ _arr.push(_s.value);
1834
+ if (i && _arr.length === i) break;
1835
+ }
1836
+ } catch (err) {
1837
+ _d = true;
1838
+ _e = err;
1839
+ } finally {
1840
+ try {
1841
+ if (!_n && _i["return"] != null) _i["return"]();
1842
+ } finally {
1843
+ if (_d) throw _e;
1844
+ }
1845
+ }
1846
+ return _arr;
1847
+ }
1848
+ function _arrayWithHoles2(arr) {
1849
+ if (Array.isArray(arr)) return arr;
1850
+ }
1851
+ function ownKeys2(object, enumerableOnly) {
1852
+ var keys = Object.keys(object);
1853
+ if (Object.getOwnPropertySymbols) {
1854
+ var symbols = Object.getOwnPropertySymbols(object);
1855
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
1856
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
1857
+ })), keys.push.apply(keys, symbols);
1858
+ }
1859
+ return keys;
1860
+ }
1861
+ function _objectSpread2(target) {
1862
+ for (var i = 1; i < arguments.length; i++) {
1863
+ var source = null != arguments[i] ? arguments[i] : {};
1864
+ i % 2 ? ownKeys2(Object(source), true).forEach(function(key) {
1865
+ _defineProperty2(target, key, source[key]);
1866
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys2(Object(source)).forEach(function(key) {
1867
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
1868
+ });
1869
+ }
1870
+ return target;
1871
+ }
1872
+ function _defineProperty2(obj, key, value) {
1873
+ if (key in obj) {
1874
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
1875
+ } else {
1876
+ obj[key] = value;
1877
+ }
1878
+ return obj;
1879
+ }
1880
+ function _objectWithoutProperties(source, excluded) {
1881
+ if (source == null) return {};
1882
+ var target = _objectWithoutPropertiesLoose(source, excluded);
1883
+ var key, i;
1884
+ if (Object.getOwnPropertySymbols) {
1885
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
1886
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
1887
+ key = sourceSymbolKeys[i];
1888
+ if (excluded.indexOf(key) >= 0) continue;
1889
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
1890
+ target[key] = source[key];
1891
+ }
1892
+ }
1893
+ return target;
1894
+ }
1895
+ function _objectWithoutPropertiesLoose(source, excluded) {
1896
+ if (source == null) return {};
1897
+ var target = {};
1898
+ var sourceKeys = Object.keys(source);
1899
+ var key, i;
1900
+ for (i = 0; i < sourceKeys.length; i++) {
1901
+ key = sourceKeys[i];
1902
+ if (excluded.indexOf(key) >= 0) continue;
1903
+ target[key] = source[key];
1904
+ }
1905
+ return target;
1906
+ }
1907
+ var Dropzone = /* @__PURE__ */ forwardRef(function(_ref, ref) {
1908
+ var children = _ref.children, params = _objectWithoutProperties(_ref, _excluded);
1909
+ var _useDropzone = useDropzone(params), open = _useDropzone.open, props = _objectWithoutProperties(_useDropzone, _excluded2);
1910
+ useImperativeHandle(ref, function() {
1911
+ return {
1912
+ open
1913
+ };
1914
+ }, [open]);
1915
+ return /* @__PURE__ */ React.createElement(Fragment, null, children(_objectSpread2(_objectSpread2({}, props), {}, {
1916
+ open
1917
+ })));
1918
+ });
1919
+ Dropzone.displayName = "Dropzone";
1920
+ var defaultProps = {
1921
+ disabled: false,
1922
+ getFilesFromEvent: fromEvent,
1923
+ maxSize: Infinity,
1924
+ minSize: 0,
1925
+ multiple: true,
1926
+ maxFiles: 0,
1927
+ preventDropOnDocument: true,
1928
+ noClick: false,
1929
+ noKeyboard: false,
1930
+ noDrag: false,
1931
+ noDragEventsBubbling: false,
1932
+ validator: null,
1933
+ useFsAccessApi: true,
1934
+ autoFocus: false
1935
+ };
1936
+ Dropzone.defaultProps = defaultProps;
1937
+ Dropzone.propTypes = {
1938
+ /**
1939
+ * Render function that exposes the dropzone state and prop getter fns
1940
+ *
1941
+ * @param {object} params
1942
+ * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
1943
+ * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
1944
+ * @param {Function} params.open Open the native file selection dialog
1945
+ * @param {boolean} params.isFocused Dropzone area is in focus
1946
+ * @param {boolean} params.isFileDialogActive File dialog is opened
1947
+ * @param {boolean} params.isDragActive Active drag is in progress
1948
+ * @param {boolean} params.isDragAccept Dragged files are accepted
1949
+ * @param {boolean} params.isDragReject Some dragged files are rejected
1950
+ * @param {File[]} params.acceptedFiles Accepted files
1951
+ * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
1952
+ */
1953
+ children: import_prop_types.default.func,
1954
+ /**
1955
+ * Set accepted file types.
1956
+ * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
1957
+ * Keep in mind that mime type determination is not reliable across platforms. CSV files,
1958
+ * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
1959
+ * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
1960
+ */
1961
+ accept: import_prop_types.default.objectOf(import_prop_types.default.arrayOf(import_prop_types.default.string)),
1962
+ /**
1963
+ * Allow drag 'n' drop (or selection from the file dialog) of multiple files
1964
+ */
1965
+ multiple: import_prop_types.default.bool,
1966
+ /**
1967
+ * If false, allow dropped items to take over the current browser window
1968
+ */
1969
+ preventDropOnDocument: import_prop_types.default.bool,
1970
+ /**
1971
+ * If true, disables click to open the native file selection dialog
1972
+ */
1973
+ noClick: import_prop_types.default.bool,
1974
+ /**
1975
+ * If true, disables SPACE/ENTER to open the native file selection dialog.
1976
+ * Note that it also stops tracking the focus state.
1977
+ */
1978
+ noKeyboard: import_prop_types.default.bool,
1979
+ /**
1980
+ * If true, disables drag 'n' drop
1981
+ */
1982
+ noDrag: import_prop_types.default.bool,
1983
+ /**
1984
+ * If true, stops drag event propagation to parents
1985
+ */
1986
+ noDragEventsBubbling: import_prop_types.default.bool,
1987
+ /**
1988
+ * Minimum file size (in bytes)
1989
+ */
1990
+ minSize: import_prop_types.default.number,
1991
+ /**
1992
+ * Maximum file size (in bytes)
1993
+ */
1994
+ maxSize: import_prop_types.default.number,
1995
+ /**
1996
+ * Maximum accepted number of files
1997
+ * The default value is 0 which means there is no limitation to how many files are accepted.
1998
+ */
1999
+ maxFiles: import_prop_types.default.number,
2000
+ /**
2001
+ * Enable/disable the dropzone
2002
+ */
2003
+ disabled: import_prop_types.default.bool,
2004
+ /**
2005
+ * Use this to provide a custom file aggregator
2006
+ *
2007
+ * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
2008
+ */
2009
+ getFilesFromEvent: import_prop_types.default.func,
2010
+ /**
2011
+ * Cb for when closing the file dialog with no selection
2012
+ */
2013
+ onFileDialogCancel: import_prop_types.default.func,
2014
+ /**
2015
+ * Cb for when opening the file dialog
2016
+ */
2017
+ onFileDialogOpen: import_prop_types.default.func,
2018
+ /**
2019
+ * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
2020
+ * to open the file picker instead of using an `<input type="file">` click event.
2021
+ */
2022
+ useFsAccessApi: import_prop_types.default.bool,
2023
+ /**
2024
+ * Set to true to focus the root element on render
2025
+ */
2026
+ autoFocus: import_prop_types.default.bool,
2027
+ /**
2028
+ * Cb for when the `dragenter` event occurs.
2029
+ *
2030
+ * @param {DragEvent} event
2031
+ */
2032
+ onDragEnter: import_prop_types.default.func,
2033
+ /**
2034
+ * Cb for when the `dragleave` event occurs
2035
+ *
2036
+ * @param {DragEvent} event
2037
+ */
2038
+ onDragLeave: import_prop_types.default.func,
2039
+ /**
2040
+ * Cb for when the `dragover` event occurs
2041
+ *
2042
+ * @param {DragEvent} event
2043
+ */
2044
+ onDragOver: import_prop_types.default.func,
2045
+ /**
2046
+ * Cb for when the `drop` event occurs.
2047
+ * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
2048
+ *
2049
+ * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
2050
+ * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
2051
+ * If `multiple` is set to false and additional files are dropped,
2052
+ * all files besides the first will be rejected.
2053
+ * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
2054
+ *
2055
+ * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
2056
+ * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
2057
+ *
2058
+ * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
2059
+ * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
2060
+ *
2061
+ * ```js
2062
+ * function onDrop(acceptedFiles) {
2063
+ * const req = request.post('/upload')
2064
+ * acceptedFiles.forEach(file => {
2065
+ * req.attach(file.name, file)
2066
+ * })
2067
+ * req.end(callback)
2068
+ * }
2069
+ * ```
2070
+ *
2071
+ * @param {File[]} acceptedFiles
2072
+ * @param {FileRejection[]} fileRejections
2073
+ * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
2074
+ */
2075
+ onDrop: import_prop_types.default.func,
2076
+ /**
2077
+ * Cb for when the `drop` event occurs.
2078
+ * Note that if no files are accepted, this callback is not invoked.
2079
+ *
2080
+ * @param {File[]} files
2081
+ * @param {(DragEvent|Event)} event
2082
+ */
2083
+ onDropAccepted: import_prop_types.default.func,
2084
+ /**
2085
+ * Cb for when the `drop` event occurs.
2086
+ * Note that if no files are rejected, this callback is not invoked.
2087
+ *
2088
+ * @param {FileRejection[]} fileRejections
2089
+ * @param {(DragEvent|Event)} event
2090
+ */
2091
+ onDropRejected: import_prop_types.default.func,
2092
+ /**
2093
+ * Cb for when there's some error from any of the promises.
2094
+ *
2095
+ * @param {Error} error
2096
+ */
2097
+ onError: import_prop_types.default.func,
2098
+ /**
2099
+ * Custom validation function. It must return null if there's no errors.
2100
+ * @param {File} file
2101
+ * @returns {FileError|FileError[]|null}
2102
+ */
2103
+ validator: import_prop_types.default.func
2104
+ };
2105
+ var initialState = {
2106
+ isFocused: false,
2107
+ isFileDialogActive: false,
2108
+ isDragActive: false,
2109
+ isDragAccept: false,
2110
+ isDragReject: false,
2111
+ acceptedFiles: [],
2112
+ fileRejections: []
2113
+ };
2114
+ function useDropzone() {
2115
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
2116
+ var _defaultProps$props = _objectSpread2(_objectSpread2({}, defaultProps), props), accept = _defaultProps$props.accept, disabled = _defaultProps$props.disabled, getFilesFromEvent = _defaultProps$props.getFilesFromEvent, maxSize = _defaultProps$props.maxSize, minSize = _defaultProps$props.minSize, multiple = _defaultProps$props.multiple, maxFiles = _defaultProps$props.maxFiles, onDragEnter = _defaultProps$props.onDragEnter, onDragLeave = _defaultProps$props.onDragLeave, onDragOver = _defaultProps$props.onDragOver, onDrop = _defaultProps$props.onDrop, onDropAccepted = _defaultProps$props.onDropAccepted, onDropRejected = _defaultProps$props.onDropRejected, onFileDialogCancel = _defaultProps$props.onFileDialogCancel, onFileDialogOpen = _defaultProps$props.onFileDialogOpen, useFsAccessApi = _defaultProps$props.useFsAccessApi, autoFocus = _defaultProps$props.autoFocus, preventDropOnDocument = _defaultProps$props.preventDropOnDocument, noClick = _defaultProps$props.noClick, noKeyboard = _defaultProps$props.noKeyboard, noDrag = _defaultProps$props.noDrag, noDragEventsBubbling = _defaultProps$props.noDragEventsBubbling, onError = _defaultProps$props.onError, validator = _defaultProps$props.validator;
2117
+ var acceptAttr = useMemo(function() {
2118
+ return acceptPropAsAcceptAttr(accept);
2119
+ }, [accept]);
2120
+ var pickerTypes = useMemo(function() {
2121
+ return pickerOptionsFromAccept(accept);
2122
+ }, [accept]);
2123
+ var onFileDialogOpenCb = useMemo(function() {
2124
+ return typeof onFileDialogOpen === "function" ? onFileDialogOpen : noop;
2125
+ }, [onFileDialogOpen]);
2126
+ var onFileDialogCancelCb = useMemo(function() {
2127
+ return typeof onFileDialogCancel === "function" ? onFileDialogCancel : noop;
2128
+ }, [onFileDialogCancel]);
2129
+ var rootRef = useRef(null);
2130
+ var inputRef = useRef(null);
2131
+ var _useReducer = useReducer(reducer, initialState), _useReducer2 = _slicedToArray2(_useReducer, 2), state = _useReducer2[0], dispatch = _useReducer2[1];
2132
+ var isFocused = state.isFocused, isFileDialogActive = state.isFileDialogActive;
2133
+ var fsAccessApiWorksRef = useRef(typeof window !== "undefined" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI());
2134
+ var onWindowFocus = function onWindowFocus2() {
2135
+ if (!fsAccessApiWorksRef.current && isFileDialogActive) {
2136
+ setTimeout(function() {
2137
+ if (inputRef.current) {
2138
+ var files = inputRef.current.files;
2139
+ if (!files.length) {
2140
+ dispatch({
2141
+ type: "closeDialog"
2142
+ });
2143
+ onFileDialogCancelCb();
2144
+ }
2145
+ }
2146
+ }, 300);
2147
+ }
2148
+ };
2149
+ useEffect(function() {
2150
+ window.addEventListener("focus", onWindowFocus, false);
2151
+ return function() {
2152
+ window.removeEventListener("focus", onWindowFocus, false);
2153
+ };
2154
+ }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);
2155
+ var dragTargetsRef = useRef([]);
2156
+ var onDocumentDrop = function onDocumentDrop2(event) {
2157
+ if (rootRef.current && rootRef.current.contains(event.target)) {
2158
+ return;
2159
+ }
2160
+ event.preventDefault();
2161
+ dragTargetsRef.current = [];
2162
+ };
2163
+ useEffect(function() {
2164
+ if (preventDropOnDocument) {
2165
+ document.addEventListener("dragover", onDocumentDragOver, false);
2166
+ document.addEventListener("drop", onDocumentDrop, false);
2167
+ }
2168
+ return function() {
2169
+ if (preventDropOnDocument) {
2170
+ document.removeEventListener("dragover", onDocumentDragOver);
2171
+ document.removeEventListener("drop", onDocumentDrop);
2172
+ }
2173
+ };
2174
+ }, [rootRef, preventDropOnDocument]);
2175
+ useEffect(function() {
2176
+ if (!disabled && autoFocus && rootRef.current) {
2177
+ rootRef.current.focus();
2178
+ }
2179
+ return function() {
2180
+ };
2181
+ }, [rootRef, autoFocus, disabled]);
2182
+ var onErrCb = useCallback(function(e) {
2183
+ if (onError) {
2184
+ onError(e);
2185
+ } else {
2186
+ console.error(e);
2187
+ }
2188
+ }, [onError]);
2189
+ var onDragEnterCb = useCallback(function(event) {
2190
+ event.preventDefault();
2191
+ event.persist();
2192
+ stopPropagation(event);
2193
+ dragTargetsRef.current = [].concat(_toConsumableArray2(dragTargetsRef.current), [event.target]);
2194
+ if (isEvtWithFiles(event)) {
2195
+ Promise.resolve(getFilesFromEvent(event)).then(function(files) {
2196
+ if (isPropagationStopped(event) && !noDragEventsBubbling) {
2197
+ return;
2198
+ }
2199
+ var fileCount = files.length;
2200
+ var isDragAccept = fileCount > 0 && allFilesAccepted({
2201
+ files,
2202
+ accept: acceptAttr,
2203
+ minSize,
2204
+ maxSize,
2205
+ multiple,
2206
+ maxFiles,
2207
+ validator
2208
+ });
2209
+ var isDragReject = fileCount > 0 && !isDragAccept;
2210
+ dispatch({
2211
+ isDragAccept,
2212
+ isDragReject,
2213
+ isDragActive: true,
2214
+ type: "setDraggedFiles"
2215
+ });
2216
+ if (onDragEnter) {
2217
+ onDragEnter(event);
2218
+ }
2219
+ }).catch(function(e) {
2220
+ return onErrCb(e);
2221
+ });
2222
+ }
2223
+ }, [getFilesFromEvent, onDragEnter, onErrCb, noDragEventsBubbling, acceptAttr, minSize, maxSize, multiple, maxFiles, validator]);
2224
+ var onDragOverCb = useCallback(function(event) {
2225
+ event.preventDefault();
2226
+ event.persist();
2227
+ stopPropagation(event);
2228
+ var hasFiles = isEvtWithFiles(event);
2229
+ if (hasFiles && event.dataTransfer) {
2230
+ try {
2231
+ event.dataTransfer.dropEffect = "copy";
2232
+ } catch (_unused) {
2233
+ }
2234
+ }
2235
+ if (hasFiles && onDragOver) {
2236
+ onDragOver(event);
2237
+ }
2238
+ return false;
2239
+ }, [onDragOver, noDragEventsBubbling]);
2240
+ var onDragLeaveCb = useCallback(function(event) {
2241
+ event.preventDefault();
2242
+ event.persist();
2243
+ stopPropagation(event);
2244
+ var targets = dragTargetsRef.current.filter(function(target) {
2245
+ return rootRef.current && rootRef.current.contains(target);
2246
+ });
2247
+ var targetIdx = targets.indexOf(event.target);
2248
+ if (targetIdx !== -1) {
2249
+ targets.splice(targetIdx, 1);
2250
+ }
2251
+ dragTargetsRef.current = targets;
2252
+ if (targets.length > 0) {
2253
+ return;
2254
+ }
2255
+ dispatch({
2256
+ type: "setDraggedFiles",
2257
+ isDragActive: false,
2258
+ isDragAccept: false,
2259
+ isDragReject: false
2260
+ });
2261
+ if (isEvtWithFiles(event) && onDragLeave) {
2262
+ onDragLeave(event);
2263
+ }
2264
+ }, [rootRef, onDragLeave, noDragEventsBubbling]);
2265
+ var setFiles = useCallback(function(files, event) {
2266
+ var acceptedFiles = [];
2267
+ var fileRejections = [];
2268
+ files.forEach(function(file) {
2269
+ var _fileAccepted = fileAccepted(file, acceptAttr), _fileAccepted2 = _slicedToArray2(_fileAccepted, 2), accepted = _fileAccepted2[0], acceptError = _fileAccepted2[1];
2270
+ var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray2(_fileMatchSize, 2), sizeMatch = _fileMatchSize2[0], sizeError = _fileMatchSize2[1];
2271
+ var customErrors = validator ? validator(file) : null;
2272
+ if (accepted && sizeMatch && !customErrors) {
2273
+ acceptedFiles.push(file);
2274
+ } else {
2275
+ var errors = [acceptError, sizeError];
2276
+ if (customErrors) {
2277
+ errors = errors.concat(customErrors);
2278
+ }
2279
+ fileRejections.push({
2280
+ file,
2281
+ errors: errors.filter(function(e) {
2282
+ return e;
2283
+ })
2284
+ });
2285
+ }
2286
+ });
2287
+ if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {
2288
+ acceptedFiles.forEach(function(file) {
2289
+ fileRejections.push({
2290
+ file,
2291
+ errors: [TOO_MANY_FILES_REJECTION]
2292
+ });
2293
+ });
2294
+ acceptedFiles.splice(0);
2295
+ }
2296
+ dispatch({
2297
+ acceptedFiles,
2298
+ fileRejections,
2299
+ type: "setFiles"
2300
+ });
2301
+ if (onDrop) {
2302
+ onDrop(acceptedFiles, fileRejections, event);
2303
+ }
2304
+ if (fileRejections.length > 0 && onDropRejected) {
2305
+ onDropRejected(fileRejections, event);
2306
+ }
2307
+ if (acceptedFiles.length > 0 && onDropAccepted) {
2308
+ onDropAccepted(acceptedFiles, event);
2309
+ }
2310
+ }, [dispatch, multiple, acceptAttr, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);
2311
+ var onDropCb = useCallback(function(event) {
2312
+ event.preventDefault();
2313
+ event.persist();
2314
+ stopPropagation(event);
2315
+ dragTargetsRef.current = [];
2316
+ if (isEvtWithFiles(event)) {
2317
+ Promise.resolve(getFilesFromEvent(event)).then(function(files) {
2318
+ if (isPropagationStopped(event) && !noDragEventsBubbling) {
2319
+ return;
2320
+ }
2321
+ setFiles(files, event);
2322
+ }).catch(function(e) {
2323
+ return onErrCb(e);
2324
+ });
2325
+ }
2326
+ dispatch({
2327
+ type: "reset"
2328
+ });
2329
+ }, [getFilesFromEvent, setFiles, onErrCb, noDragEventsBubbling]);
2330
+ var openFileDialog = useCallback(function() {
2331
+ if (fsAccessApiWorksRef.current) {
2332
+ dispatch({
2333
+ type: "openDialog"
2334
+ });
2335
+ onFileDialogOpenCb();
2336
+ var opts = {
2337
+ multiple,
2338
+ types: pickerTypes
2339
+ };
2340
+ window.showOpenFilePicker(opts).then(function(handles) {
2341
+ return getFilesFromEvent(handles);
2342
+ }).then(function(files) {
2343
+ setFiles(files, null);
2344
+ dispatch({
2345
+ type: "closeDialog"
2346
+ });
2347
+ }).catch(function(e) {
2348
+ if (isAbort(e)) {
2349
+ onFileDialogCancelCb(e);
2350
+ dispatch({
2351
+ type: "closeDialog"
2352
+ });
2353
+ } else if (isSecurityError(e)) {
2354
+ fsAccessApiWorksRef.current = false;
2355
+ if (inputRef.current) {
2356
+ inputRef.current.value = null;
2357
+ inputRef.current.click();
2358
+ } else {
2359
+ onErrCb(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."));
2360
+ }
2361
+ } else {
2362
+ onErrCb(e);
2363
+ }
2364
+ });
2365
+ return;
2366
+ }
2367
+ if (inputRef.current) {
2368
+ dispatch({
2369
+ type: "openDialog"
2370
+ });
2371
+ onFileDialogOpenCb();
2372
+ inputRef.current.value = null;
2373
+ inputRef.current.click();
2374
+ }
2375
+ }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, onErrCb, pickerTypes, multiple]);
2376
+ var onKeyDownCb = useCallback(function(event) {
2377
+ if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
2378
+ return;
2379
+ }
2380
+ if (event.key === " " || event.key === "Enter" || event.keyCode === 32 || event.keyCode === 13) {
2381
+ event.preventDefault();
2382
+ openFileDialog();
2383
+ }
2384
+ }, [rootRef, openFileDialog]);
2385
+ var onFocusCb = useCallback(function() {
2386
+ dispatch({
2387
+ type: "focus"
2388
+ });
2389
+ }, []);
2390
+ var onBlurCb = useCallback(function() {
2391
+ dispatch({
2392
+ type: "blur"
2393
+ });
2394
+ }, []);
2395
+ var onClickCb = useCallback(function() {
2396
+ if (noClick) {
2397
+ return;
2398
+ }
2399
+ if (isIeOrEdge()) {
2400
+ setTimeout(openFileDialog, 0);
2401
+ } else {
2402
+ openFileDialog();
2403
+ }
2404
+ }, [noClick, openFileDialog]);
2405
+ var composeHandler = function composeHandler2(fn) {
2406
+ return disabled ? null : fn;
2407
+ };
2408
+ var composeKeyboardHandler = function composeKeyboardHandler2(fn) {
2409
+ return noKeyboard ? null : composeHandler(fn);
2410
+ };
2411
+ var composeDragHandler = function composeDragHandler2(fn) {
2412
+ return noDrag ? null : composeHandler(fn);
2413
+ };
2414
+ var stopPropagation = function stopPropagation2(event) {
2415
+ if (noDragEventsBubbling) {
2416
+ event.stopPropagation();
2417
+ }
2418
+ };
2419
+ var getRootProps = useMemo(function() {
2420
+ return function() {
2421
+ var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref2$refKey = _ref2.refKey, refKey = _ref2$refKey === void 0 ? "ref" : _ref2$refKey, role = _ref2.role, onKeyDown = _ref2.onKeyDown, onFocus = _ref2.onFocus, onBlur = _ref2.onBlur, onClick = _ref2.onClick, onDragEnter2 = _ref2.onDragEnter, onDragOver2 = _ref2.onDragOver, onDragLeave2 = _ref2.onDragLeave, onDrop2 = _ref2.onDrop, rest = _objectWithoutProperties(_ref2, _excluded3);
2422
+ return _objectSpread2(_objectSpread2(_defineProperty2({
2423
+ onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
2424
+ onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
2425
+ onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
2426
+ onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),
2427
+ onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter2, onDragEnterCb)),
2428
+ onDragOver: composeDragHandler(composeEventHandlers(onDragOver2, onDragOverCb)),
2429
+ onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave2, onDragLeaveCb)),
2430
+ onDrop: composeDragHandler(composeEventHandlers(onDrop2, onDropCb)),
2431
+ role: typeof role === "string" && role !== "" ? role : "presentation"
2432
+ }, refKey, rootRef), !disabled && !noKeyboard ? {
2433
+ tabIndex: 0
2434
+ } : {}), rest);
2435
+ };
2436
+ }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);
2437
+ var onInputElementClick = useCallback(function(event) {
2438
+ event.stopPropagation();
2439
+ }, []);
2440
+ var getInputProps = useMemo(function() {
2441
+ return function() {
2442
+ var _ref3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, onChange = _ref3.onChange, onClick = _ref3.onClick, rest = _objectWithoutProperties(_ref3, _excluded4);
2443
+ var inputProps = _defineProperty2({
2444
+ accept: acceptAttr,
2445
+ multiple,
2446
+ type: "file",
2447
+ style: {
2448
+ display: "none"
2449
+ },
2450
+ onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),
2451
+ onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),
2452
+ tabIndex: -1
2453
+ }, refKey, inputRef);
2454
+ return _objectSpread2(_objectSpread2({}, inputProps), rest);
2455
+ };
2456
+ }, [inputRef, accept, multiple, onDropCb, disabled]);
2457
+ return _objectSpread2(_objectSpread2({}, state), {}, {
2458
+ isFocused: isFocused && !disabled,
2459
+ getRootProps,
2460
+ getInputProps,
2461
+ rootRef,
2462
+ inputRef,
2463
+ open: composeHandler(openFileDialog)
2464
+ });
2465
+ }
2466
+ function reducer(state, action) {
2467
+ switch (action.type) {
2468
+ case "focus":
2469
+ return _objectSpread2(_objectSpread2({}, state), {}, {
2470
+ isFocused: true
2471
+ });
2472
+ case "blur":
2473
+ return _objectSpread2(_objectSpread2({}, state), {}, {
2474
+ isFocused: false
2475
+ });
2476
+ case "openDialog":
2477
+ return _objectSpread2(_objectSpread2({}, initialState), {}, {
2478
+ isFileDialogActive: true
2479
+ });
2480
+ case "closeDialog":
2481
+ return _objectSpread2(_objectSpread2({}, state), {}, {
2482
+ isFileDialogActive: false
2483
+ });
2484
+ case "setDraggedFiles":
2485
+ return _objectSpread2(_objectSpread2({}, state), {}, {
2486
+ isDragActive: action.isDragActive,
2487
+ isDragAccept: action.isDragAccept,
2488
+ isDragReject: action.isDragReject
2489
+ });
2490
+ case "setFiles":
2491
+ return _objectSpread2(_objectSpread2({}, state), {}, {
2492
+ acceptedFiles: action.acceptedFiles,
2493
+ fileRejections: action.fileRejections
2494
+ });
2495
+ case "reset":
2496
+ return _objectSpread2({}, initialState);
2497
+ default:
2498
+ return state;
2499
+ }
2500
+ }
2501
+ function noop() {
2502
+ }
2503
+
2504
+ // src/components/FileUpload/useFileDropTarget.ts
2505
+ var useFileDropTarget = ({
2506
+ accept,
2507
+ maxSize,
2508
+ maxFiles,
2509
+ multiple = true,
2510
+ disabled = false,
2511
+ noClick,
2512
+ noKeyboard,
2513
+ onFilesChange,
2514
+ onFilesRejected
2515
+ } = {}) => {
2516
+ const { getRootProps, getInputProps, isDragActive, fileRejections } = useDropzone({
2517
+ accept,
2518
+ maxSize,
2519
+ maxFiles,
2520
+ multiple,
2521
+ disabled,
2522
+ noClick,
2523
+ noKeyboard,
2524
+ onDropAccepted: (files) => onFilesChange?.(files),
2525
+ onDropRejected: (rejections) => onFilesRejected?.(rejections)
2526
+ });
2527
+ return { getRootProps, getInputProps, isDragActive, rejections: fileRejections };
2528
+ };
2529
+ var FileUploadInner = ({
2530
+ accept,
2531
+ maxSize,
2532
+ maxFiles,
2533
+ multiple,
2534
+ disabled = false,
2535
+ onFilesChange,
2536
+ onFilesRejected,
2537
+ forcedState,
2538
+ children,
2539
+ className,
2540
+ ...rest
2541
+ }) => {
2542
+ const dropTarget = useFileDropTarget({
2543
+ accept,
2544
+ maxSize,
2545
+ maxFiles,
2546
+ multiple,
2547
+ disabled,
2548
+ onFilesChange,
2549
+ onFilesRejected
2550
+ });
2551
+ return /* @__PURE__ */ jsx(FileUploadProvider, { value: { dropTarget, forcedState, disabled }, children: /* @__PURE__ */ jsx("div", { className: cn("tw:flex tw:flex-col tw:gap-3", className), ...rest, children }) });
2552
+ };
2553
+ var FileUpload = Object.assign(FileUploadInner, {
2554
+ DropZone: FileUploadDropZone,
2555
+ FileList: FileUploadFileList
2556
+ });
2557
+ /*! Bundled license information:
2558
+
2559
+ react-is/cjs/react-is.production.min.js:
2560
+ (** @license React v16.13.1
2561
+ * react-is.production.min.js
2562
+ *
2563
+ * Copyright (c) Facebook, Inc. and its affiliates.
2564
+ *
2565
+ * This source code is licensed under the MIT license found in the
2566
+ * LICENSE file in the root directory of this source tree.
2567
+ *)
2568
+
2569
+ react-is/cjs/react-is.development.js:
2570
+ (** @license React v16.13.1
2571
+ * react-is.development.js
2572
+ *
2573
+ * Copyright (c) Facebook, Inc. and its affiliates.
2574
+ *
2575
+ * This source code is licensed under the MIT license found in the
2576
+ * LICENSE file in the root directory of this source tree.
2577
+ *)
2578
+
2579
+ object-assign/index.js:
2580
+ (*
2581
+ object-assign
2582
+ (c) Sindre Sorhus
2583
+ @license MIT
2584
+ *)
2585
+ */
2586
+
2587
+ export { FileUpload, useFileDropTarget, useFileUploadRejections };
2588
+ //# sourceMappingURL=chunk-HLGU22C6.js.map
2589
+ //# sourceMappingURL=chunk-HLGU22C6.js.map