welcome-ui 10.0.0-alpha.1 → 10.0.0-alpha.11

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 (179) hide show
  1. package/README.md +1 -1
  2. package/dist/2W3RN7C5-DMC82gDP.js +61 -0
  3. package/dist/4I4MLMKD-BO6Lcy7s.js +150 -0
  4. package/dist/Accordion.js +20 -18
  5. package/dist/Alert.css +1 -1
  6. package/dist/Alert.js +93 -87
  7. package/dist/AspectRatio.js +2 -1
  8. package/dist/Avatar.js +14 -12
  9. package/dist/{B7UTNDHN-BlIblHCu.js → B7UTNDHN-BghjolIs.js} +30 -30
  10. package/dist/Badge.js +2 -1
  11. package/dist/Breadcrumb.css +1 -1
  12. package/dist/Breadcrumb.js +175 -154
  13. package/dist/Button.css +1 -1
  14. package/dist/Button.js +43 -41
  15. package/dist/ButtonGroup.js +7 -5
  16. package/dist/Card.css +1 -1
  17. package/dist/Card.js +68 -15
  18. package/dist/Checkbox.js +32 -30
  19. package/dist/CloseButton.css +1 -1
  20. package/dist/CloseButton.js +15 -13
  21. package/dist/{CustomPopper-vwbOQq72.js → CustomPopper-C1wIDHbM.js} +5 -4
  22. package/dist/{DSAASPLT-BaaCUKsb.js → DSAASPLT-Fx1kuAsk.js} +3 -3
  23. package/dist/DatePicker.js +96 -91
  24. package/dist/DateTimePicker.js +21 -20
  25. package/dist/Drawer.js +141 -96
  26. package/dist/DropdownMenu.css +1 -1
  27. package/dist/DropdownMenu.js +902 -462
  28. package/dist/Field.css +1 -1
  29. package/dist/Field.js +50 -50
  30. package/dist/FieldGroup.js +9 -7
  31. package/dist/FileDrop.css +1 -1
  32. package/dist/FileDrop.js +433 -398
  33. package/dist/FileUpload.js +44 -41
  34. package/dist/GVVKDT6A-CF9ejW_c.js +619 -0
  35. package/dist/Hint.js +10 -8
  36. package/dist/Icon.css +1 -1
  37. package/dist/Icon.js +36 -22
  38. package/dist/InputText.css +1 -1
  39. package/dist/InputText.js +59 -57
  40. package/dist/{KPUWHTQJ-D2TPji47.js → KPUWHTQJ-Dv3cAqjP.js} +33 -31
  41. package/dist/Label.js +9 -7
  42. package/dist/Link.css +1 -1
  43. package/dist/Link.js +54 -49
  44. package/dist/Loader.js +13 -11
  45. package/dist/Logo.js +21 -13
  46. package/dist/Modal.js +153 -113
  47. package/dist/{NI3IVY7K-Ztb3-XAv.js → NI3IVY7K-Dy240mkD.js} +53 -53
  48. package/dist/{NMGNQVTG-C6TqBngP.js → NMGNQVTG-DRO2uXZT.js} +8 -8
  49. package/dist/{OE2EFRVA-C3721cM3.js → OE2EFRVA-Dg1R6gaC.js} +186 -170
  50. package/dist/{OLVWQA7U-DysaSaZj.js → OLVWQA7U-Dia3UUnG.js} +51 -51
  51. package/dist/Pagination.css +1 -1
  52. package/dist/Pagination.js +157 -76
  53. package/dist/PasswordInput.js +20 -17
  54. package/dist/Popover.js +89 -72
  55. package/dist/{RTNCFSKZ-qpPg689E.js → RTNCFSKZ-BywELldk.js} +47 -47
  56. package/dist/Radio.css +1 -1
  57. package/dist/Radio.js +39 -40
  58. package/dist/RadioGroup.js +29 -27
  59. package/dist/RadioTab.js +3 -2
  60. package/dist/{SBSPVDDI-DJKkC1eb.js → SBSPVDDI-CmtnvvUX.js} +42 -42
  61. package/dist/SQZLCNLX-Dg4KKdNJ.js +83 -0
  62. package/dist/Search.css +1 -1
  63. package/dist/Search.js +136 -129
  64. package/dist/Select.css +1 -1
  65. package/dist/Select.js +259 -257
  66. package/dist/Slider.js +67 -62
  67. package/dist/Stepper.js +34 -27
  68. package/dist/StickyNote.css +1 -0
  69. package/dist/StickyNote.js +49 -0
  70. package/dist/Swiper.js +53 -51
  71. package/dist/{T22PY7TE-C1N0q8Kn.js → T22PY7TE-gLuJpoOm.js} +46 -46
  72. package/dist/Table.js +34 -21
  73. package/dist/Tabs.js +165 -156
  74. package/dist/Tag.css +1 -1
  75. package/dist/Tag.js +67 -62
  76. package/dist/Text.js +5 -3
  77. package/dist/Textarea.css +1 -1
  78. package/dist/Textarea.js +26 -17
  79. package/dist/TimePicker.js +53 -51
  80. package/dist/Toast.css +1 -1
  81. package/dist/Toast.js +275 -165
  82. package/dist/Toggle.js +17 -15
  83. package/dist/Tooltip.css +1 -1
  84. package/dist/Tooltip.js +120 -129
  85. package/dist/VariantIcon.js +8 -6
  86. package/dist/VisuallyHidden.js +9 -7
  87. package/dist/WelcomeLoader.js +4 -3
  88. package/dist/XCKGTAUF-CJwwVibW.js +25 -0
  89. package/dist/{Y67KZUMI-DFEgrUv2.js → Y67KZUMI-BwLWwpNF.js} +5 -5
  90. package/dist/{ZTXFEM5L-CkrIQCN1.js → ZTXFEM5L-WGHY_jqg.js} +3 -3
  91. package/dist/{downshift.esm-D_6pHXkq.js → downshift.esm-xtYanIDi.js} +1 -1
  92. package/dist/scss/breakpoints.scss +9 -0
  93. package/dist/scss/text-ellipsis.scss +5 -0
  94. package/dist/scss/texts.scss +108 -0
  95. package/dist/theme.css +1 -1
  96. package/dist/theme.js +1 -0
  97. package/dist/{tslib.es6-DpB4Y59c.js → tslib.es6-C80jYMbM.js} +1 -1
  98. package/dist/types/components/Alert/components/Buttons.d.ts +3 -0
  99. package/dist/types/components/Alert/components/Title.d.ts +5 -0
  100. package/dist/types/components/Alert/index.d.ts +7 -3
  101. package/dist/types/components/Alert/types.d.ts +3 -9
  102. package/dist/types/components/Breadcrumb/Item.d.ts +2 -2
  103. package/dist/types/components/Breadcrumb/index.d.ts +1 -1
  104. package/dist/types/components/Breadcrumb/types.d.ts +6 -3
  105. package/dist/types/components/Card/Body.d.ts +2 -3
  106. package/dist/types/components/Card/Footer.d.ts +6 -0
  107. package/dist/types/components/Card/Header.d.ts +5 -0
  108. package/dist/types/components/Card/index.d.ts +7 -8
  109. package/dist/types/components/Card/types.d.ts +16 -3
  110. package/dist/types/components/Checkbox/index.d.ts +1 -2
  111. package/dist/types/components/Checkbox/types.d.ts +3 -1
  112. package/dist/types/components/DateTimePickerCommon/CustomHeader.d.ts +4 -1
  113. package/dist/types/components/DateTimePickerCommon/CustomPopper.d.ts +6 -3
  114. package/dist/types/components/Drawer/AssetDrawer/Header.d.ts +4 -1
  115. package/dist/types/components/Drawer/AssetDrawer/IconBlock.d.ts +4 -1
  116. package/dist/types/components/Drawer/AssetDrawer/types.d.ts +3 -0
  117. package/dist/types/components/Drawer/components/Backdrop.d.ts +1 -1
  118. package/dist/types/components/Drawer/components/Close.d.ts +4 -1
  119. package/dist/types/components/Drawer/components/Title.d.ts +4 -1
  120. package/dist/types/components/Drawer/index.d.ts +13 -4
  121. package/dist/types/components/DropdownMenu/Action.d.ts +2 -0
  122. package/dist/types/components/DropdownMenu/Group.d.ts +4 -0
  123. package/dist/types/components/DropdownMenu/Item.d.ts +7 -0
  124. package/dist/types/components/DropdownMenu/Search.d.ts +2 -0
  125. package/dist/types/components/DropdownMenu/Submenu.d.ts +4 -0
  126. package/dist/types/components/DropdownMenu/index.d.ts +11 -0
  127. package/dist/types/components/DropdownMenu/types.d.ts +26 -5
  128. package/dist/types/components/FileDrop/components/FilePreview.d.ts +4 -1
  129. package/dist/types/components/FileDrop/components/Message.d.ts +4 -1
  130. package/dist/types/components/FileDrop/types.d.ts +2 -0
  131. package/dist/types/components/Icon/icons.d.ts +6 -6
  132. package/dist/types/components/Icon/types.d.ts +2 -0
  133. package/dist/types/components/Loader/index.d.ts +4 -1
  134. package/dist/types/components/Modal/Assets/AssetContent.d.ts +4 -1
  135. package/dist/types/components/Modal/Assets/AssetTitle.d.ts +4 -1
  136. package/dist/types/components/Modal/Assets/CloseButton.d.ts +4 -1
  137. package/dist/types/components/Modal/Assets/Dialog.d.ts +4 -1
  138. package/dist/types/components/Modal/Assets/Iframe.d.ts +4 -1
  139. package/dist/types/components/Modal/Assets/index.d.ts +16 -4
  140. package/dist/types/components/Modal/components/Close.d.ts +4 -1
  141. package/dist/types/components/Modal/components/Content.d.ts +1 -1
  142. package/dist/types/components/Modal/index.d.ts +17 -5
  143. package/dist/types/components/Modal/types.d.ts +1 -1
  144. package/dist/types/components/Pagination/types.d.ts +11 -0
  145. package/dist/types/components/PasswordInput/ToggleButton.d.ts +4 -1
  146. package/dist/types/components/Popover/Arrow.d.ts +4 -1
  147. package/dist/types/components/Popover/ContentWrapper.d.ts +4 -1
  148. package/dist/types/components/Radio/types.d.ts +1 -1
  149. package/dist/types/components/RadioGroup/index.d.ts +4 -1
  150. package/dist/types/components/Stepper/index.d.ts +8 -2
  151. package/dist/types/components/StickyNote/components/Button.d.ts +5 -0
  152. package/dist/types/components/StickyNote/components/Title.d.ts +5 -0
  153. package/dist/types/components/StickyNote/index.d.ts +11 -0
  154. package/dist/types/components/StickyNote/index.test.d.ts +1 -0
  155. package/dist/types/components/StickyNote/types.d.ts +15 -0
  156. package/dist/types/components/Swiper/index.d.ts +4 -1
  157. package/dist/types/components/Table/index.d.ts +20 -5
  158. package/dist/types/components/Tabs/components/ActiveBar/index.d.ts +4 -1
  159. package/dist/types/components/Tag/types.d.ts +4 -2
  160. package/dist/types/components/Textarea/types.d.ts +1 -0
  161. package/dist/types/components/Toast/components/Growl.d.ts +2 -0
  162. package/dist/types/components/Toast/index.d.ts +8 -2
  163. package/dist/types/components/Toast/types.d.ts +8 -9
  164. package/dist/types/components/Tooltip/types.d.ts +1 -1
  165. package/dist/types/theme/types.d.ts +255 -218
  166. package/dist/types/utils/index.d.ts +0 -1
  167. package/dist/{utils-DileZjMm.js → utils-BD597oo6.js} +1 -1
  168. package/dist/utils.js +3 -2
  169. package/package.json +3 -2
  170. package/dist/2W3RN7C5-bkX-rIa3.js +0 -61
  171. package/dist/4I4MLMKD-BLxAidnq.js +0 -43
  172. package/dist/GVVKDT6A-bET6V7Py.js +0 -724
  173. package/dist/SQZLCNLX-CHDXnZ16.js +0 -82
  174. package/dist/XCKGTAUF-DkxWCbaW.js +0 -25
  175. package/dist/index.css +0 -0
  176. package/dist/types/components/Icon/Icon.d.ts +0 -2
  177. package/dist/types/utils/theme/index.d.ts +0 -0
  178. /package/dist/{index-CdiHdiVB.js → index-PAaZGbyz.js} +0 -0
  179. /package/dist/types/components/Icon/{Icon.test.d.ts → index.test.d.ts} +0 -0
package/dist/FileDrop.js CHANGED
@@ -1,14 +1,15 @@
1
1
  "use client";
2
- import { jsxs as V, Fragment as vi, jsx as f } from "react/jsx-runtime";
3
- import Ii, { useMemo as Y, useRef as fa, useReducer as Ri, useEffect as ta, useCallback as j, forwardRef as fi, useImperativeHandle as Si, Fragment as qi, useState as Xa } from "react";
4
- import { _ as N, P as s } from "./tslib.es6-DpB4Y59c.js";
5
- import { g as Ti, c as Da } from "./index-CdiHdiVB.js";
6
- import { Button as ha } from "./Button.js";
7
- import { Icon as G } from "./Icon.js";
8
- import { c as Qa } from "./create-event-rXDe5aCQ.js";
9
- import { g as Li, a as Ci, b as xi } from "./index-DmEMuVTM.js";
10
- import { Text as ya } from "./Text.js";
11
- const Mi = /* @__PURE__ */ new Map([
2
+ import './FileDrop.css';
3
+ import { jsxs as L, Fragment as ui, jsx as x } from "react/jsx-runtime";
4
+ import Si, { useMemo as Z, useRef as fa, useReducer as qi, useEffect as pa, useCallback as E, forwardRef as fi, useImperativeHandle as Ti, Fragment as Li, useState as Qa } from "react";
5
+ import { _ as K, P as s } from "./tslib.es6-C80jYMbM.js";
6
+ import { g as Ci, c as za } from "./index-PAaZGbyz.js";
7
+ import { Button as ya } from "./Button.js";
8
+ import { Icon as J } from "./Icon.js";
9
+ import { c as ai } from "./create-event-rXDe5aCQ.js";
10
+ import { g as Mi, a as Ni, b as xi } from "./index-DmEMuVTM.js";
11
+ import { Text as wa } from "./Text.js";
12
+ const $i = /* @__PURE__ */ new Map([
12
13
  // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
13
14
  ["1km", "application/vnd.1000minds.decision-model+xml"],
14
15
  ["3dml", "text/vnd.in3d.3dml"],
@@ -1211,14 +1212,14 @@ const Mi = /* @__PURE__ */ new Map([
1211
1212
  ["zmm", "application/vnd.handheld-entertainment+xml"],
1212
1213
  ["zsh", "text/x-scriptzsh"]
1213
1214
  ]);
1214
- function Z(a, i, t) {
1215
- const e = $i(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
1216
- return typeof e.path != "string" && ai(e, "path", o), ai(e, "relativePath", o), e;
1215
+ function X(a, i, t) {
1216
+ const e = Ki(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
1217
+ return typeof e.path != "string" && ii(e, "path", o), ii(e, "relativePath", o), e;
1217
1218
  }
1218
- function $i(a) {
1219
+ function Ki(a) {
1219
1220
  const { name: i } = a;
1220
1221
  if (i && i.lastIndexOf(".") !== -1 && !a.type) {
1221
- const e = i.split(".").pop().toLowerCase(), n = Mi.get(e);
1222
+ const e = i.split(".").pop().toLowerCase(), n = $i.get(e);
1222
1223
  n && Object.defineProperty(a, "type", {
1223
1224
  value: n,
1224
1225
  writable: !1,
@@ -1228,7 +1229,7 @@ function $i(a) {
1228
1229
  }
1229
1230
  return a;
1230
1231
  }
1231
- function ai(a, i, t) {
1232
+ function ii(a, i, t) {
1232
1233
  Object.defineProperty(a, i, {
1233
1234
  value: t,
1234
1235
  writable: !1,
@@ -1236,51 +1237,51 @@ function ai(a, i, t) {
1236
1237
  enumerable: !0
1237
1238
  });
1238
1239
  }
1239
- const Ni = [
1240
+ const Hi = [
1240
1241
  // Thumbnail cache files for macOS and Windows
1241
1242
  ".DS_Store",
1242
1243
  // macOs
1243
1244
  "Thumbs.db"
1244
1245
  // Windows
1245
1246
  ];
1246
- function Ki(a) {
1247
- return N(this, void 0, void 0, function* () {
1248
- return wa(a) && Hi(a.dataTransfer) ? Yi(a.dataTransfer, a.type) : Wi(a) ? Ui(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Bi(a) : [];
1247
+ function Wi(a) {
1248
+ return K(this, void 0, void 0, function* () {
1249
+ return ka(a) && Ui(a.dataTransfer) ? Gi(a.dataTransfer, a.type) : Bi(a) ? Yi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Vi(a) : [];
1249
1250
  });
1250
1251
  }
1251
- function Hi(a) {
1252
- return wa(a);
1252
+ function Ui(a) {
1253
+ return ka(a);
1253
1254
  }
1254
- function Wi(a) {
1255
- return wa(a) && wa(a.target);
1255
+ function Bi(a) {
1256
+ return ka(a) && ka(a.target);
1256
1257
  }
1257
- function wa(a) {
1258
+ function ka(a) {
1258
1259
  return typeof a == "object" && a !== null;
1259
1260
  }
1260
- function Ui(a) {
1261
- return Ca(a.target.files).map((i) => Z(i));
1261
+ function Yi(a) {
1262
+ return Ma(a.target.files).map((i) => X(i));
1262
1263
  }
1263
- function Bi(a) {
1264
- return N(this, void 0, void 0, function* () {
1265
- return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => Z(t));
1264
+ function Vi(a) {
1265
+ return K(this, void 0, void 0, function* () {
1266
+ return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => X(t));
1266
1267
  });
1267
1268
  }
1268
- function Yi(a, i) {
1269
- return N(this, void 0, void 0, function* () {
1269
+ function Gi(a, i) {
1270
+ return K(this, void 0, void 0, function* () {
1270
1271
  if (a.items) {
1271
- const t = Ca(a.items).filter((n) => n.kind === "file");
1272
+ const t = Ma(a.items).filter((n) => n.kind === "file");
1272
1273
  if (i !== "drop")
1273
1274
  return t;
1274
- const e = yield Promise.all(t.map(Vi));
1275
- return ii(gi(e));
1275
+ const e = yield Promise.all(t.map(Zi));
1276
+ return ti(gi(e));
1276
1277
  }
1277
- return ii(Ca(a.files).map((t) => Z(t)));
1278
+ return ti(Ma(a.files).map((t) => X(t)));
1278
1279
  });
1279
1280
  }
1280
- function ii(a) {
1281
- return a.filter((i) => Ni.indexOf(i.name) === -1);
1281
+ function ti(a) {
1282
+ return a.filter((i) => Hi.indexOf(i.name) === -1);
1282
1283
  }
1283
- function Ca(a) {
1284
+ function Ma(a) {
1284
1285
  if (a === null)
1285
1286
  return [];
1286
1287
  const i = [];
@@ -1290,11 +1291,11 @@ function Ca(a) {
1290
1291
  }
1291
1292
  return i;
1292
1293
  }
1293
- function Vi(a) {
1294
+ function Zi(a) {
1294
1295
  if (typeof a.webkitGetAsEntry != "function")
1295
- return ti(a);
1296
+ return ei(a);
1296
1297
  const i = a.webkitGetAsEntry();
1297
- return i && i.isDirectory ? bi(i) : ti(a, i);
1298
+ return i && i.isDirectory ? bi(i) : ei(a, i);
1298
1299
  }
1299
1300
  function gi(a) {
1300
1301
  return a.reduce((i, t) => [
@@ -1302,22 +1303,22 @@ function gi(a) {
1302
1303
  ...Array.isArray(t) ? gi(t) : [t]
1303
1304
  ], []);
1304
1305
  }
1305
- function ti(a, i) {
1306
+ function ei(a, i) {
1306
1307
  var t;
1307
1308
  if (typeof a.getAsFileSystemHandle == "function")
1308
- return a.getAsFileSystemHandle().then((o) => N(this, void 0, void 0, function* () {
1309
+ return a.getAsFileSystemHandle().then((o) => K(this, void 0, void 0, function* () {
1309
1310
  const l = yield o.getFile();
1310
- return l.handle = o, Z(l);
1311
+ return l.handle = o, X(l);
1311
1312
  }));
1312
1313
  const e = a.getAsFile();
1313
1314
  if (!e)
1314
1315
  return Promise.reject(`${a} is not a File`);
1315
- const n = Z(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1316
+ const n = X(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1316
1317
  return Promise.resolve(n);
1317
1318
  }
1318
- function Gi(a) {
1319
- return N(this, void 0, void 0, function* () {
1320
- return a.isDirectory ? bi(a) : Zi(a);
1319
+ function Ji(a) {
1320
+ return K(this, void 0, void 0, function* () {
1321
+ return a.isDirectory ? bi(a) : Xi(a);
1321
1322
  });
1322
1323
  }
1323
1324
  function bi(a) {
@@ -1325,9 +1326,9 @@ function bi(a) {
1325
1326
  return new Promise((t, e) => {
1326
1327
  const n = [];
1327
1328
  function o() {
1328
- i.readEntries((l) => N(this, void 0, void 0, function* () {
1329
+ i.readEntries((l) => K(this, void 0, void 0, function* () {
1329
1330
  if (l.length) {
1330
- const r = Promise.all(l.map(Gi));
1331
+ const r = Promise.all(l.map(Ji));
1331
1332
  n.push(r), o();
1332
1333
  } else
1333
1334
  try {
@@ -1343,11 +1344,11 @@ function bi(a) {
1343
1344
  o();
1344
1345
  });
1345
1346
  }
1346
- function Zi(a) {
1347
- return N(this, void 0, void 0, function* () {
1347
+ function Xi(a) {
1348
+ return K(this, void 0, void 0, function* () {
1348
1349
  return new Promise((i, t) => {
1349
1350
  a.file((e) => {
1350
- const n = Z(e, a.fullPath);
1351
+ const n = X(e, a.fullPath);
1351
1352
  i(n);
1352
1353
  }, (e) => {
1353
1354
  t(e);
@@ -1355,9 +1356,9 @@ function Zi(a) {
1355
1356
  });
1356
1357
  });
1357
1358
  }
1358
- var xa = {}, ei;
1359
- function Ji() {
1360
- return ei || (ei = 1, xa.__esModule = !0, xa.default = function(a, i) {
1359
+ var xa = {}, ni;
1360
+ function Qi() {
1361
+ return ni || (ni = 1, xa.__esModule = !0, xa.default = function(a, i) {
1361
1362
  if (a && i) {
1362
1363
  var t = Array.isArray(i) ? i : i.split(",");
1363
1364
  if (t.length === 0)
@@ -1371,22 +1372,22 @@ function Ji() {
1371
1372
  return !0;
1372
1373
  }), xa;
1373
1374
  }
1374
- var Xi = Ji();
1375
- const Sa = /* @__PURE__ */ Ti(Xi);
1376
- function ni(a) {
1377
- return it(a) || at(a) || yi(a) || Qi();
1375
+ var at = Qi();
1376
+ const Ta = /* @__PURE__ */ Ci(at);
1377
+ function pi(a) {
1378
+ return et(a) || tt(a) || yi(a) || it();
1378
1379
  }
1379
- function Qi() {
1380
+ function it() {
1380
1381
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1381
1382
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1382
1383
  }
1383
- function at(a) {
1384
+ function tt(a) {
1384
1385
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1385
1386
  }
1386
- function it(a) {
1387
- if (Array.isArray(a)) return Ma(a);
1387
+ function et(a) {
1388
+ if (Array.isArray(a)) return Na(a);
1388
1389
  }
1389
- function pi(a, i) {
1390
+ function oi(a, i) {
1390
1391
  var t = Object.keys(a);
1391
1392
  if (Object.getOwnPropertySymbols) {
1392
1393
  var e = Object.getOwnPropertySymbols(a);
@@ -1396,12 +1397,12 @@ function pi(a, i) {
1396
1397
  }
1397
1398
  return t;
1398
1399
  }
1399
- function oi(a) {
1400
+ function ci(a) {
1400
1401
  for (var i = 1; i < arguments.length; i++) {
1401
1402
  var t = arguments[i] != null ? arguments[i] : {};
1402
- i % 2 ? pi(Object(t), !0).forEach(function(e) {
1403
+ i % 2 ? oi(Object(t), !0).forEach(function(e) {
1403
1404
  hi(a, e, t[e]);
1404
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : pi(Object(t)).forEach(function(e) {
1405
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : oi(Object(t)).forEach(function(e) {
1405
1406
  Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1406
1407
  });
1407
1408
  }
@@ -1410,28 +1411,28 @@ function oi(a) {
1410
1411
  function hi(a, i, t) {
1411
1412
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1412
1413
  }
1413
- function ea(a, i) {
1414
- return nt(a) || et(a, i) || yi(a, i) || tt();
1414
+ function oa(a, i) {
1415
+ return ot(a) || pt(a, i) || yi(a, i) || nt();
1415
1416
  }
1416
- function tt() {
1417
+ function nt() {
1417
1418
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1418
1419
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1419
1420
  }
1420
1421
  function yi(a, i) {
1421
1422
  if (a) {
1422
- if (typeof a == "string") return Ma(a, i);
1423
+ if (typeof a == "string") return Na(a, i);
1423
1424
  var t = Object.prototype.toString.call(a).slice(8, -1);
1424
1425
  if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1425
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ma(a, i);
1426
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Na(a, i);
1426
1427
  }
1427
1428
  }
1428
- function Ma(a, i) {
1429
+ function Na(a, i) {
1429
1430
  (i == null || i > a.length) && (i = a.length);
1430
1431
  for (var t = 0, e = new Array(i); t < i; t++)
1431
1432
  e[t] = a[t];
1432
1433
  return e;
1433
1434
  }
1434
- function et(a, i) {
1435
+ function pt(a, i) {
1435
1436
  var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1436
1437
  if (t != null) {
1437
1438
  var e = [], n = !0, o = !1, l, r;
@@ -1450,55 +1451,55 @@ function et(a, i) {
1450
1451
  return e;
1451
1452
  }
1452
1453
  }
1453
- function nt(a) {
1454
+ function ot(a) {
1454
1455
  if (Array.isArray(a)) return a;
1455
1456
  }
1456
- var pt = typeof Sa == "function" ? Sa : Sa.default, ot = "file-invalid-type", ct = "file-too-large", lt = "file-too-small", rt = "too-many-files", st = function() {
1457
+ var ct = typeof Ta == "function" ? Ta : Ta.default, lt = "file-invalid-type", rt = "file-too-large", st = "file-too-small", dt = "too-many-files", mt = function() {
1457
1458
  var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), e = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
1458
1459
  return {
1459
- code: ot,
1460
+ code: lt,
1460
1461
  message: "File type must be ".concat(e)
1461
1462
  };
1462
- }, ci = function(i) {
1463
+ }, li = function(i) {
1463
1464
  return {
1464
- code: ct,
1465
+ code: rt,
1465
1466
  message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1466
1467
  };
1467
- }, li = function(i) {
1468
+ }, ri = function(i) {
1468
1469
  return {
1469
- code: lt,
1470
+ code: st,
1470
1471
  message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1471
1472
  };
1472
- }, dt = {
1473
- code: rt,
1473
+ }, vt = {
1474
+ code: dt,
1474
1475
  message: "Too many files"
1475
1476
  };
1476
1477
  function wi(a, i) {
1477
- var t = a.type === "application/x-moz-file" || pt(a, i);
1478
- return [t, t ? null : st(i)];
1478
+ var t = a.type === "application/x-moz-file" || ct(a, i);
1479
+ return [t, t ? null : mt(i)];
1479
1480
  }
1480
1481
  function ki(a, i, t) {
1481
1482
  if ($(a.size))
1482
1483
  if ($(i) && $(t)) {
1483
- if (a.size > t) return [!1, ci(t)];
1484
- if (a.size < i) return [!1, li(i)];
1484
+ if (a.size > t) return [!1, li(t)];
1485
+ if (a.size < i) return [!1, ri(i)];
1485
1486
  } else {
1486
- if ($(i) && a.size < i) return [!1, li(i)];
1487
- if ($(t) && a.size > t) return [!1, ci(t)];
1487
+ if ($(i) && a.size < i) return [!1, ri(i)];
1488
+ if ($(t) && a.size > t) return [!1, li(t)];
1488
1489
  }
1489
1490
  return [!0, null];
1490
1491
  }
1491
1492
  function $(a) {
1492
1493
  return a != null;
1493
1494
  }
1494
- function mt(a) {
1495
+ function ut(a) {
1495
1496
  var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, l = a.maxFiles, r = a.validator;
1496
1497
  return !o && i.length > 1 || o && l >= 1 && i.length > l ? !1 : i.every(function(v) {
1497
- var w = wi(v, t), D = ea(w, 1), I = D[0], F = ki(v, e, n), P = ea(F, 1), h = P[0], E = r ? r(v) : null;
1498
- return I && h && !E;
1498
+ var h = wi(v, t), D = oa(h, 1), S = D[0], C = ki(v, e, n), q = oa(C, 1), O = q[0], F = r ? r(v) : null;
1499
+ return S && O && !F;
1499
1500
  });
1500
1501
  }
1501
- function ka(a) {
1502
+ function ja(a) {
1502
1503
  return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
1503
1504
  }
1504
1505
  function ga(a) {
@@ -1506,41 +1507,41 @@ function ga(a) {
1506
1507
  return i === "Files" || i === "application/x-moz-file";
1507
1508
  }) : !!a.target && !!a.target.files;
1508
1509
  }
1509
- function ri(a) {
1510
+ function si(a) {
1510
1511
  a.preventDefault();
1511
1512
  }
1512
- function ut(a) {
1513
+ function ft(a) {
1513
1514
  return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
1514
1515
  }
1515
- function vt(a) {
1516
+ function xt(a) {
1516
1517
  return a.indexOf("Edge/") !== -1;
1517
1518
  }
1518
- function ft() {
1519
+ function gt() {
1519
1520
  var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1520
- return ut(a) || vt(a);
1521
+ return ft(a) || xt(a);
1521
1522
  }
1522
- function O() {
1523
+ function A() {
1523
1524
  for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
1524
1525
  i[t] = arguments[t];
1525
1526
  return function(e) {
1526
1527
  for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), l = 1; l < n; l++)
1527
1528
  o[l - 1] = arguments[l];
1528
1529
  return i.some(function(r) {
1529
- return !ka(e) && r && r.apply(void 0, [e].concat(o)), ka(e);
1530
+ return !ja(e) && r && r.apply(void 0, [e].concat(o)), ja(e);
1530
1531
  });
1531
1532
  };
1532
1533
  }
1533
- function xt() {
1534
+ function bt() {
1534
1535
  return "showOpenFilePicker" in window;
1535
1536
  }
1536
- function gt(a) {
1537
+ function ht(a) {
1537
1538
  if ($(a)) {
1538
1539
  var i = Object.entries(a).filter(function(t) {
1539
- var e = ea(t, 2), n = e[0], o = e[1], l = !0;
1540
+ var e = oa(t, 2), n = e[0], o = e[1], l = !0;
1540
1541
  return ji(n) || (console.warn('Skipped "'.concat(n, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(o) || !o.every(Di)) && (console.warn('Skipped "'.concat(n, '" because an invalid file extension was provided.')), l = !1), l;
1541
1542
  }).reduce(function(t, e) {
1542
- var n = ea(e, 2), o = n[0], l = n[1];
1543
- return oi(oi({}, t), {}, hi({}, o, l));
1543
+ var n = oa(e, 2), o = n[0], l = n[1];
1544
+ return ci(ci({}, t), {}, hi({}, o, l));
1544
1545
  }, {});
1545
1546
  return [{
1546
1547
  // description is required due to https://crbug.com/1264708
@@ -1550,19 +1551,19 @@ function gt(a) {
1550
1551
  }
1551
1552
  return a;
1552
1553
  }
1553
- function bt(a) {
1554
+ function yt(a) {
1554
1555
  if ($(a))
1555
1556
  return Object.entries(a).reduce(function(i, t) {
1556
- var e = ea(t, 2), n = e[0], o = e[1];
1557
- return [].concat(ni(i), [n], ni(o));
1557
+ var e = oa(t, 2), n = e[0], o = e[1];
1558
+ return [].concat(pi(i), [n], pi(o));
1558
1559
  }, []).filter(function(i) {
1559
1560
  return ji(i) || Di(i);
1560
1561
  }).join(",");
1561
1562
  }
1562
- function ht(a) {
1563
+ function wt(a) {
1563
1564
  return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
1564
1565
  }
1565
- function yt(a) {
1566
+ function kt(a) {
1566
1567
  return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
1567
1568
  }
1568
1569
  function ji(a) {
@@ -1571,24 +1572,24 @@ function ji(a) {
1571
1572
  function Di(a) {
1572
1573
  return /^.*\.[\w]+$/.test(a);
1573
1574
  }
1574
- var wt = ["children"], kt = ["open"], jt = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], Dt = ["refKey", "onChange", "onClick"];
1575
- function zt(a) {
1576
- return At(a) || Et(a) || zi(a) || _t();
1575
+ var jt = ["children"], Dt = ["open"], zt = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], _t = ["refKey", "onChange", "onClick"];
1576
+ function Et(a) {
1577
+ return Ft(a) || Ot(a) || zi(a) || At();
1577
1578
  }
1578
- function _t() {
1579
+ function At() {
1579
1580
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1580
1581
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1581
1582
  }
1582
- function Et(a) {
1583
+ function Ot(a) {
1583
1584
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1584
1585
  }
1585
- function At(a) {
1586
+ function Ft(a) {
1586
1587
  if (Array.isArray(a)) return $a(a);
1587
1588
  }
1588
- function qa(a, i) {
1589
- return Pt(a) || Ft(a, i) || zi(a, i) || Ot();
1589
+ function La(a, i) {
1590
+ return Rt(a) || It(a, i) || zi(a, i) || Pt();
1590
1591
  }
1591
- function Ot() {
1592
+ function Pt() {
1592
1593
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1593
1594
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1594
1595
  }
@@ -1606,7 +1607,7 @@ function $a(a, i) {
1606
1607
  e[t] = a[t];
1607
1608
  return e;
1608
1609
  }
1609
- function Ft(a, i) {
1610
+ function It(a, i) {
1610
1611
  var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1611
1612
  if (t != null) {
1612
1613
  var e = [], n = !0, o = !1, l, r;
@@ -1625,10 +1626,10 @@ function Ft(a, i) {
1625
1626
  return e;
1626
1627
  }
1627
1628
  }
1628
- function Pt(a) {
1629
+ function Rt(a) {
1629
1630
  if (Array.isArray(a)) return a;
1630
1631
  }
1631
- function si(a, i) {
1632
+ function di(a, i) {
1632
1633
  var t = Object.keys(a);
1633
1634
  if (Object.getOwnPropertySymbols) {
1634
1635
  var e = Object.getOwnPropertySymbols(a);
@@ -1638,23 +1639,23 @@ function si(a, i) {
1638
1639
  }
1639
1640
  return t;
1640
1641
  }
1641
- function m(a) {
1642
+ function d(a) {
1642
1643
  for (var i = 1; i < arguments.length; i++) {
1643
1644
  var t = arguments[i] != null ? arguments[i] : {};
1644
- i % 2 ? si(Object(t), !0).forEach(function(e) {
1645
- Na(a, e, t[e]);
1646
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : si(Object(t)).forEach(function(e) {
1645
+ i % 2 ? di(Object(t), !0).forEach(function(e) {
1646
+ Ka(a, e, t[e]);
1647
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : di(Object(t)).forEach(function(e) {
1647
1648
  Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1648
1649
  });
1649
1650
  }
1650
1651
  return a;
1651
1652
  }
1652
- function Na(a, i, t) {
1653
+ function Ka(a, i, t) {
1653
1654
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1654
1655
  }
1655
- function ja(a, i) {
1656
+ function Da(a, i) {
1656
1657
  if (a == null) return {};
1657
- var t = It(a, i), e, n;
1658
+ var t = St(a, i), e, n;
1658
1659
  if (Object.getOwnPropertySymbols) {
1659
1660
  var o = Object.getOwnPropertySymbols(a);
1660
1661
  for (n = 0; n < o.length; n++)
@@ -1662,27 +1663,27 @@ function ja(a, i) {
1662
1663
  }
1663
1664
  return t;
1664
1665
  }
1665
- function It(a, i) {
1666
+ function St(a, i) {
1666
1667
  if (a == null) return {};
1667
1668
  var t = {}, e = Object.keys(a), n, o;
1668
1669
  for (o = 0; o < e.length; o++)
1669
1670
  n = e[o], !(i.indexOf(n) >= 0) && (t[n] = a[n]);
1670
1671
  return t;
1671
1672
  }
1672
- var Ha = /* @__PURE__ */ fi(function(a, i) {
1673
- var t = a.children, e = ja(a, wt), n = Ei(e), o = n.open, l = ja(n, kt);
1674
- return Si(i, function() {
1673
+ var Ua = /* @__PURE__ */ fi(function(a, i) {
1674
+ var t = a.children, e = Da(a, jt), n = Ei(e), o = n.open, l = Da(n, Dt);
1675
+ return Ti(i, function() {
1675
1676
  return {
1676
1677
  open: o
1677
1678
  };
1678
- }, [o]), /* @__PURE__ */ Ii.createElement(qi, null, t(m(m({}, l), {}, {
1679
+ }, [o]), /* @__PURE__ */ Si.createElement(Li, null, t(d(d({}, l), {}, {
1679
1680
  open: o
1680
1681
  })));
1681
1682
  });
1682
- Ha.displayName = "Dropzone";
1683
+ Ua.displayName = "Dropzone";
1683
1684
  var _i = {
1684
1685
  disabled: !1,
1685
- getFilesFromEvent: Ki,
1686
+ getFilesFromEvent: Wi,
1686
1687
  maxSize: 1 / 0,
1687
1688
  minSize: 0,
1688
1689
  multiple: !0,
@@ -1696,8 +1697,8 @@ var _i = {
1696
1697
  useFsAccessApi: !1,
1697
1698
  autoFocus: !1
1698
1699
  };
1699
- Ha.defaultProps = _i;
1700
- Ha.propTypes = {
1700
+ Ua.defaultProps = _i;
1701
+ Ua.propTypes = {
1701
1702
  /**
1702
1703
  * Render function that exposes the dropzone state and prop getter fns
1703
1704
  *
@@ -1865,7 +1866,7 @@ Ha.propTypes = {
1865
1866
  */
1866
1867
  validator: s.func
1867
1868
  };
1868
- var Ka = {
1869
+ var Ha = {
1869
1870
  isFocused: !1,
1870
1871
  isFileDialogActive: !1,
1871
1872
  isDragActive: !1,
@@ -1875,186 +1876,186 @@ var Ka = {
1875
1876
  fileRejections: []
1876
1877
  };
1877
1878
  function Ei() {
1878
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = m(m({}, _i), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, l = i.minSize, r = i.multiple, v = i.maxFiles, w = i.onDragEnter, D = i.onDragLeave, I = i.onDragOver, F = i.onDrop, P = i.onDropAccepted, h = i.onDropRejected, E = i.onFileDialogCancel, q = i.onFileDialogOpen, na = i.useFsAccessApi, pa = i.autoFocus, J = i.preventDropOnDocument, k = i.noClick, R = i.noKeyboard, K = i.noDrag, z = i.noDragEventsBubbling, X = i.onError, T = i.validator, L = Y(function() {
1879
- return bt(t);
1880
- }, [t]), oa = Y(function() {
1881
- return gt(t);
1882
- }, [t]), Q = Y(function() {
1883
- return typeof q == "function" ? q : di;
1884
- }, [q]), C = Y(function() {
1885
- return typeof E == "function" ? E : di;
1886
- }, [E]), g = fa(null), b = fa(null), ca = Ri(Rt, Ka), la = qa(ca, 2), _ = la[0], d = la[1], A = _.isFocused, ra = _.isFileDialogActive, H = fa(typeof window < "u" && window.isSecureContext && na && xt()), aa = function() {
1887
- !H.current && ra && setTimeout(function() {
1888
- if (b.current) {
1889
- var c = b.current.files;
1890
- c.length || (d({
1879
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = d(d({}, _i), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, l = i.minSize, r = i.multiple, v = i.maxFiles, h = i.onDragEnter, D = i.onDragLeave, S = i.onDragOver, C = i.onDrop, q = i.onDropAccepted, O = i.onDropRejected, F = i.onFileDialogCancel, y = i.onFileDialogOpen, M = i.useFsAccessApi, H = i.autoFocus, Q = i.preventDropOnDocument, ca = i.noClick, aa = i.noKeyboard, z = i.noDrag, _ = i.noDragEventsBubbling, ia = i.onError, P = i.validator, N = Z(function() {
1880
+ return yt(t);
1881
+ }, [t]), la = Z(function() {
1882
+ return ht(t);
1883
+ }, [t]), ta = Z(function() {
1884
+ return typeof y == "function" ? y : mi;
1885
+ }, [y]), W = Z(function() {
1886
+ return typeof F == "function" ? F : mi;
1887
+ }, [F]), f = fa(null), g = fa(null), Ea = qi(qt, Ha), U = La(Ea, 2), B = U[0], b = U[1], I = B.isFocused, w = B.isFileDialogActive, k = fa(typeof window < "u" && window.isSecureContext && M && bt()), ra = function() {
1888
+ !k.current && w && setTimeout(function() {
1889
+ if (g.current) {
1890
+ var c = g.current.files;
1891
+ c.length || (b({
1891
1892
  type: "closeDialog"
1892
- }), C());
1893
+ }), W());
1893
1894
  }
1894
1895
  }, 300);
1895
1896
  };
1896
- ta(function() {
1897
- return window.addEventListener("focus", aa, !1), function() {
1898
- window.removeEventListener("focus", aa, !1);
1897
+ pa(function() {
1898
+ return window.addEventListener("focus", ra, !1), function() {
1899
+ window.removeEventListener("focus", ra, !1);
1899
1900
  };
1900
- }, [b, ra, C, H]);
1901
- var S = fa([]), Wa = function(c) {
1902
- g.current && g.current.contains(c.target) || (c.preventDefault(), S.current = []);
1901
+ }, [g, w, W, k]);
1902
+ var T = fa([]), ea = function(c) {
1903
+ f.current && f.current.contains(c.target) || (c.preventDefault(), T.current = []);
1903
1904
  };
1904
- ta(function() {
1905
- return J && (document.addEventListener("dragover", ri, !1), document.addEventListener("drop", Wa, !1)), function() {
1906
- J && (document.removeEventListener("dragover", ri), document.removeEventListener("drop", Wa));
1905
+ pa(function() {
1906
+ return Q && (document.addEventListener("dragover", si, !1), document.addEventListener("drop", ea, !1)), function() {
1907
+ Q && (document.removeEventListener("dragover", si), document.removeEventListener("drop", ea));
1907
1908
  };
1908
- }, [g, J]), ta(function() {
1909
- return !e && pa && g.current && g.current.focus(), function() {
1909
+ }, [f, Q]), pa(function() {
1910
+ return !e && H && f.current && f.current.focus(), function() {
1910
1911
  };
1911
- }, [g, pa, e]);
1912
- var M = j(function(p) {
1913
- X ? X(p) : console.error(p);
1914
- }, [X]), Ua = j(function(p) {
1915
- p.preventDefault(), p.persist(), ua(p), S.current = [].concat(zt(S.current), [p.target]), ga(p) && Promise.resolve(n(p)).then(function(c) {
1916
- if (!(ka(p) && !z)) {
1917
- var u = c.length, x = u > 0 && mt({
1912
+ }, [f, H, e]);
1913
+ var R = E(function(p) {
1914
+ ia ? ia(p) : console.error(p);
1915
+ }, [ia]), Ba = E(function(p) {
1916
+ p.preventDefault(), p.persist(), va(p), T.current = [].concat(Et(T.current), [p.target]), ga(p) && Promise.resolve(n(p)).then(function(c) {
1917
+ if (!(ja(p) && !_)) {
1918
+ var m = c.length, u = m > 0 && ut({
1918
1919
  files: c,
1919
- accept: L,
1920
+ accept: N,
1920
1921
  minSize: l,
1921
1922
  maxSize: o,
1922
1923
  multiple: r,
1923
1924
  maxFiles: v,
1924
- validator: T
1925
- }), y = u > 0 && !x;
1926
- d({
1927
- isDragAccept: x,
1928
- isDragReject: y,
1925
+ validator: P
1926
+ }), j = m > 0 && !u;
1927
+ b({
1928
+ isDragAccept: u,
1929
+ isDragReject: j,
1929
1930
  isDragActive: !0,
1930
1931
  type: "setDraggedFiles"
1931
- }), w && w(p);
1932
+ }), h && h(p);
1932
1933
  }
1933
1934
  }).catch(function(c) {
1934
- return M(c);
1935
+ return R(c);
1935
1936
  });
1936
- }, [n, w, M, z, L, l, o, r, v, T]), Ba = j(function(p) {
1937
- p.preventDefault(), p.persist(), ua(p);
1937
+ }, [n, h, R, _, N, l, o, r, v, P]), Ya = E(function(p) {
1938
+ p.preventDefault(), p.persist(), va(p);
1938
1939
  var c = ga(p);
1939
1940
  if (c && p.dataTransfer)
1940
1941
  try {
1941
1942
  p.dataTransfer.dropEffect = "copy";
1942
1943
  } catch {
1943
1944
  }
1944
- return c && I && I(p), !1;
1945
- }, [I, z]), Ya = j(function(p) {
1946
- p.preventDefault(), p.persist(), ua(p);
1947
- var c = S.current.filter(function(x) {
1948
- return g.current && g.current.contains(x);
1949
- }), u = c.indexOf(p.target);
1950
- u !== -1 && c.splice(u, 1), S.current = c, !(c.length > 0) && (d({
1945
+ return c && S && S(p), !1;
1946
+ }, [S, _]), Va = E(function(p) {
1947
+ p.preventDefault(), p.persist(), va(p);
1948
+ var c = T.current.filter(function(u) {
1949
+ return f.current && f.current.contains(u);
1950
+ }), m = c.indexOf(p.target);
1951
+ m !== -1 && c.splice(m, 1), T.current = c, !(c.length > 0) && (b({
1951
1952
  type: "setDraggedFiles",
1952
1953
  isDragActive: !1,
1953
1954
  isDragAccept: !1,
1954
1955
  isDragReject: !1
1955
1956
  }), ga(p) && D && D(p));
1956
- }, [g, D, z]), sa = j(function(p, c) {
1957
- var u = [], x = [];
1958
- p.forEach(function(y) {
1959
- var ia = wi(y, L), B = qa(ia, 2), Ea = B[0], Aa = B[1], Oa = ki(y, l, o), va = qa(Oa, 2), Fa = va[0], Pa = va[1], Ia = T ? T(y) : null;
1960
- if (Ea && Fa && !Ia)
1961
- u.push(y);
1957
+ }, [f, D, _]), sa = E(function(p, c) {
1958
+ var m = [], u = [];
1959
+ p.forEach(function(j) {
1960
+ var na = wi(j, N), G = La(na, 2), Oa = G[0], Fa = G[1], Pa = ki(j, l, o), ua = La(Pa, 2), Ia = ua[0], Ra = ua[1], Sa = P ? P(j) : null;
1961
+ if (Oa && Ia && !Sa)
1962
+ m.push(j);
1962
1963
  else {
1963
- var Ra = [Aa, Pa];
1964
- Ia && (Ra = Ra.concat(Ia)), x.push({
1965
- file: y,
1966
- errors: Ra.filter(function(Pi) {
1967
- return Pi;
1964
+ var qa = [Fa, Ra];
1965
+ Sa && (qa = qa.concat(Sa)), u.push({
1966
+ file: j,
1967
+ errors: qa.filter(function(Ri) {
1968
+ return Ri;
1968
1969
  })
1969
1970
  });
1970
1971
  }
1971
- }), (!r && u.length > 1 || r && v >= 1 && u.length > v) && (u.forEach(function(y) {
1972
- x.push({
1973
- file: y,
1974
- errors: [dt]
1972
+ }), (!r && m.length > 1 || r && v >= 1 && m.length > v) && (m.forEach(function(j) {
1973
+ u.push({
1974
+ file: j,
1975
+ errors: [vt]
1975
1976
  });
1976
- }), u.splice(0)), d({
1977
- acceptedFiles: u,
1978
- fileRejections: x,
1979
- isDragReject: x.length > 0,
1977
+ }), m.splice(0)), b({
1978
+ acceptedFiles: m,
1979
+ fileRejections: u,
1980
+ isDragReject: u.length > 0,
1980
1981
  type: "setFiles"
1981
- }), F && F(u, x, c), x.length > 0 && h && h(x, c), u.length > 0 && P && P(u, c);
1982
- }, [d, r, L, l, o, v, F, P, h, T]), da = j(function(p) {
1983
- p.preventDefault(), p.persist(), ua(p), S.current = [], ga(p) && Promise.resolve(n(p)).then(function(c) {
1984
- ka(p) && !z || sa(c, p);
1982
+ }), C && C(m, u, c), u.length > 0 && O && O(u, c), m.length > 0 && q && q(m, c);
1983
+ }, [b, r, N, l, o, v, C, q, O, P]), da = E(function(p) {
1984
+ p.preventDefault(), p.persist(), va(p), T.current = [], ga(p) && Promise.resolve(n(p)).then(function(c) {
1985
+ ja(p) && !_ || sa(c, p);
1985
1986
  }).catch(function(c) {
1986
- return M(c);
1987
- }), d({
1987
+ return R(c);
1988
+ }), b({
1988
1989
  type: "reset"
1989
1990
  });
1990
- }, [n, sa, M, z]), W = j(function() {
1991
- if (H.current) {
1992
- d({
1991
+ }, [n, sa, R, _]), Y = E(function() {
1992
+ if (k.current) {
1993
+ b({
1993
1994
  type: "openDialog"
1994
- }), Q();
1995
+ }), ta();
1995
1996
  var p = {
1996
1997
  multiple: r,
1997
- types: oa
1998
+ types: la
1998
1999
  };
1999
2000
  window.showOpenFilePicker(p).then(function(c) {
2000
2001
  return n(c);
2001
2002
  }).then(function(c) {
2002
- sa(c, null), d({
2003
+ sa(c, null), b({
2003
2004
  type: "closeDialog"
2004
2005
  });
2005
2006
  }).catch(function(c) {
2006
- ht(c) ? (C(c), d({
2007
+ wt(c) ? (W(c), b({
2007
2008
  type: "closeDialog"
2008
- })) : yt(c) ? (H.current = !1, b.current ? (b.current.value = null, b.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(c);
2009
+ })) : kt(c) ? (k.current = !1, g.current ? (g.current.value = null, g.current.click()) : R(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."))) : R(c);
2009
2010
  });
2010
2011
  return;
2011
2012
  }
2012
- b.current && (d({
2013
+ g.current && (b({
2013
2014
  type: "openDialog"
2014
- }), Q(), b.current.value = null, b.current.click());
2015
- }, [d, Q, C, na, sa, M, oa, r]), Va = j(function(p) {
2016
- !g.current || !g.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), W());
2017
- }, [g, W]), Ga = j(function() {
2018
- d({
2015
+ }), ta(), g.current.value = null, g.current.click());
2016
+ }, [b, ta, W, M, sa, R, la, r]), Ga = E(function(p) {
2017
+ !f.current || !f.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), Y());
2018
+ }, [f, Y]), Za = E(function() {
2019
+ b({
2019
2020
  type: "focus"
2020
2021
  });
2021
- }, []), Za = j(function() {
2022
- d({
2022
+ }, []), Ja = E(function() {
2023
+ b({
2023
2024
  type: "blur"
2024
2025
  });
2025
- }, []), Ja = j(function() {
2026
- k || (ft() ? setTimeout(W, 0) : W());
2027
- }, [k, W]), U = function(c) {
2026
+ }, []), Xa = E(function() {
2027
+ ca || (gt() ? setTimeout(Y, 0) : Y());
2028
+ }, [ca, Y]), V = function(c) {
2028
2029
  return e ? null : c;
2029
- }, _a = function(c) {
2030
- return R ? null : U(c);
2030
+ }, Aa = function(c) {
2031
+ return aa ? null : V(c);
2031
2032
  }, ma = function(c) {
2032
- return K ? null : U(c);
2033
- }, ua = function(c) {
2034
- z && c.stopPropagation();
2035
- }, Ai = Y(function() {
2033
+ return z ? null : V(c);
2034
+ }, va = function(c) {
2035
+ _ && c.stopPropagation();
2036
+ }, Fi = Z(function() {
2036
2037
  return function() {
2037
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.role, y = p.onKeyDown, ia = p.onFocus, B = p.onBlur, Ea = p.onClick, Aa = p.onDragEnter, Oa = p.onDragOver, va = p.onDragLeave, Fa = p.onDrop, Pa = ja(p, jt);
2038
- return m(m(Na({
2039
- onKeyDown: _a(O(y, Va)),
2040
- onFocus: _a(O(ia, Ga)),
2041
- onBlur: _a(O(B, Za)),
2042
- onClick: U(O(Ea, Ja)),
2043
- onDragEnter: ma(O(Aa, Ua)),
2044
- onDragOver: ma(O(Oa, Ba)),
2045
- onDragLeave: ma(O(va, Ya)),
2046
- onDrop: ma(O(Fa, da)),
2047
- role: typeof x == "string" && x !== "" ? x : "presentation"
2048
- }, u, g), !e && !R ? {
2038
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, m = c === void 0 ? "ref" : c, u = p.role, j = p.onKeyDown, na = p.onFocus, G = p.onBlur, Oa = p.onClick, Fa = p.onDragEnter, Pa = p.onDragOver, ua = p.onDragLeave, Ia = p.onDrop, Ra = Da(p, zt);
2039
+ return d(d(Ka({
2040
+ onKeyDown: Aa(A(j, Ga)),
2041
+ onFocus: Aa(A(na, Za)),
2042
+ onBlur: Aa(A(G, Ja)),
2043
+ onClick: V(A(Oa, Xa)),
2044
+ onDragEnter: ma(A(Fa, Ba)),
2045
+ onDragOver: ma(A(Pa, Ya)),
2046
+ onDragLeave: ma(A(ua, Va)),
2047
+ onDrop: ma(A(Ia, da)),
2048
+ role: typeof u == "string" && u !== "" ? u : "presentation"
2049
+ }, m, f), !e && !aa ? {
2049
2050
  tabIndex: 0
2050
- } : {}), Pa);
2051
+ } : {}), Ra);
2051
2052
  };
2052
- }, [g, Va, Ga, Za, Ja, Ua, Ba, Ya, da, R, K, e]), Oi = j(function(p) {
2053
+ }, [f, Ga, Za, Ja, Xa, Ba, Ya, Va, da, aa, z, e]), Pi = E(function(p) {
2053
2054
  p.stopPropagation();
2054
- }, []), Fi = Y(function() {
2055
+ }, []), Ii = Z(function() {
2055
2056
  return function() {
2056
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.onChange, y = p.onClick, ia = ja(p, Dt), B = Na({
2057
- accept: L,
2057
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, m = c === void 0 ? "ref" : c, u = p.onChange, j = p.onClick, na = Da(p, _t), G = Ka({
2058
+ accept: N,
2058
2059
  multiple: r,
2059
2060
  type: "file",
2060
2061
  style: {
@@ -2069,121 +2070,127 @@ function Ei() {
2069
2070
  width: "1px",
2070
2071
  whiteSpace: "nowrap"
2071
2072
  },
2072
- onChange: U(O(x, da)),
2073
- onClick: U(O(y, Oi)),
2073
+ onChange: V(A(u, da)),
2074
+ onClick: V(A(j, Pi)),
2074
2075
  tabIndex: -1
2075
- }, u, b);
2076
- return m(m({}, B), ia);
2076
+ }, m, g);
2077
+ return d(d({}, G), na);
2077
2078
  };
2078
- }, [b, t, r, da, e]);
2079
- return m(m({}, _), {}, {
2080
- isFocused: A && !e,
2081
- getRootProps: Ai,
2082
- getInputProps: Fi,
2083
- rootRef: g,
2084
- inputRef: b,
2085
- open: U(W)
2079
+ }, [g, t, r, da, e]);
2080
+ return d(d({}, B), {}, {
2081
+ isFocused: I && !e,
2082
+ getRootProps: Fi,
2083
+ getInputProps: Ii,
2084
+ rootRef: f,
2085
+ inputRef: g,
2086
+ open: V(Y)
2086
2087
  });
2087
2088
  }
2088
- function Rt(a, i) {
2089
+ function qt(a, i) {
2089
2090
  switch (i.type) {
2090
2091
  case "focus":
2091
- return m(m({}, a), {}, {
2092
+ return d(d({}, a), {}, {
2092
2093
  isFocused: !0
2093
2094
  });
2094
2095
  case "blur":
2095
- return m(m({}, a), {}, {
2096
+ return d(d({}, a), {}, {
2096
2097
  isFocused: !1
2097
2098
  });
2098
2099
  case "openDialog":
2099
- return m(m({}, Ka), {}, {
2100
+ return d(d({}, Ha), {}, {
2100
2101
  isFileDialogActive: !0
2101
2102
  });
2102
2103
  case "closeDialog":
2103
- return m(m({}, a), {}, {
2104
+ return d(d({}, a), {}, {
2104
2105
  isFileDialogActive: !1
2105
2106
  });
2106
2107
  case "setDraggedFiles":
2107
- return m(m({}, a), {}, {
2108
+ return d(d({}, a), {}, {
2108
2109
  isDragActive: i.isDragActive,
2109
2110
  isDragAccept: i.isDragAccept,
2110
2111
  isDragReject: i.isDragReject
2111
2112
  });
2112
2113
  case "setFiles":
2113
- return m(m({}, a), {}, {
2114
+ return d(d({}, a), {}, {
2114
2115
  acceptedFiles: i.acceptedFiles,
2115
2116
  fileRejections: i.fileRejections,
2116
2117
  isDragReject: i.isDragReject
2117
2118
  });
2118
2119
  case "reset":
2119
- return m({}, Ka);
2120
+ return d({}, Ha);
2120
2121
  default:
2121
2122
  return a;
2122
2123
  }
2123
2124
  }
2124
- function di() {
2125
- }
2126
- const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65", za = {
2127
- root: St,
2128
- disabled: qt,
2129
- "drag-reject": "_drag-reject_tju30_32",
2130
- "file-input": "_file-input_tju30_35",
2131
- "file-preview": "_file-preview_tju30_40",
2132
- "file-preview-icon": "_file-preview-icon_tju30_48",
2133
- "file-preview-name": "_file-preview-name_tju30_51",
2134
- "file-preview-size": "_file-preview-size_tju30_55",
2135
- "image-preview": "_image-preview_tju30_60",
2136
- actions: Tt,
2137
- "message-title": "_message-title_tju30_72",
2138
- "message-hint": "_message-hint_tju30_75",
2139
- "message-file-button-text": "_message-file-button-text_tju30_80"
2140
- }, Ta = Da(za), Lt = ({
2125
+ function mi() {
2126
+ }
2127
+ const Tt = "_root_z1bfm_2", Lt = "_disabled_z1bfm_26", Ct = "_actions_z1bfm_68", _a = {
2128
+ root: Tt,
2129
+ disabled: Lt,
2130
+ "drag-reject": "_drag-reject_z1bfm_32",
2131
+ "file-input": "_file-input_z1bfm_35",
2132
+ "file-preview": "_file-preview_z1bfm_40",
2133
+ "file-preview-icon": "_file-preview-icon_z1bfm_48",
2134
+ "file-preview-name": "_file-preview-name_z1bfm_51",
2135
+ "file-preview-size": "_file-preview-size_z1bfm_55",
2136
+ "file-preview-button": "_file-preview-button_z1bfm_58",
2137
+ "image-preview": "_image-preview_z1bfm_63",
2138
+ actions: Ct,
2139
+ "message-title": "_message-title_z1bfm_73",
2140
+ "message-hint": "_message-hint_z1bfm_76",
2141
+ "message-file-button-text": "_message-file-button-text_z1bfm_81"
2142
+ }, ba = za(_a), Ai = ({
2141
2143
  file: a,
2142
2144
  fileName: i,
2143
2145
  forceFileType: t,
2144
2146
  previewButtonText: e = "Preview"
2145
2147
  }) => {
2146
- const n = typeof a == "string", o = Li(a, t), l = a instanceof File ? Ci(a) : null, r = n && i ? i : xi(a);
2147
- return /* @__PURE__ */ V(vi, { children: [
2148
- /* @__PURE__ */ f(G, { className: Ta("file-preview-icon"), name: o, size: "xxl" }),
2149
- /* @__PURE__ */ f(ya, { as: "h4", className: Ta("file-preview-name"), lines: 1, variant: "heading-md-strong", children: r }),
2150
- !n && /* @__PURE__ */ f(ya, { className: Ta("file-preview-size"), lines: 1, variant: "body-md", children: l }),
2151
- n ? /* @__PURE__ */ V(
2152
- ha,
2148
+ const n = typeof a == "string", o = Mi(a, t), l = a instanceof File ? Ni(a) : null, r = n && i ? i : xi(a);
2149
+ return /* @__PURE__ */ L(ui, { children: [
2150
+ n ? /* @__PURE__ */ L(
2151
+ ya,
2153
2152
  {
2154
2153
  as: "a",
2155
- className: "mt-md",
2154
+ className: ba("file-preview-size", "file-preview-button"),
2156
2155
  href: a,
2157
2156
  rel: "noopener noreferrer",
2158
2157
  size: "md",
2159
2158
  target: "_blank",
2159
+ variant: "secondary",
2160
2160
  children: [
2161
- /* @__PURE__ */ f("span", { children: e }),
2162
- /* @__PURE__ */ f(G, { name: "external-link-alt" })
2161
+ /* @__PURE__ */ x("span", { children: e }),
2162
+ /* @__PURE__ */ x(J, { name: "external-link-alt" })
2163
2163
  ]
2164
2164
  }
2165
- ) : null
2165
+ ) : null,
2166
+ /* @__PURE__ */ x(J, { className: ba("file-preview-icon"), name: o, size: "xxl" }),
2167
+ /* @__PURE__ */ x(wa, { className: ba("file-preview-name"), lines: 1, variant: "heading-xs-strong", children: r }),
2168
+ !n && /* @__PURE__ */ x(wa, { className: ba("file-preview-size"), lines: 1, variant: "body-md", children: l })
2166
2169
  ] });
2167
- }, La = Da(za), mi = ({
2170
+ };
2171
+ Ai.displayName = "FileDrop.FilePreview";
2172
+ const Ca = za(_a), Wa = ({
2168
2173
  disabled: a,
2169
2174
  fileButtonText: i = "Browse file",
2170
2175
  hint: t = "Drag & drop a file here or",
2171
2176
  openFile: e,
2172
2177
  title: n = "Add file"
2173
- }) => /* @__PURE__ */ V(vi, { children: [
2174
- /* @__PURE__ */ f(ya, { as: "h4", className: La("message-title"), variant: "heading-md-strong", children: n }),
2175
- /* @__PURE__ */ f(ya, { className: La("message-hint"), variant: "body-md", children: t }),
2176
- /* @__PURE__ */ f(
2177
- ha,
2178
+ }) => /* @__PURE__ */ L(ui, { children: [
2179
+ /* @__PURE__ */ x(wa, { className: Ca("message-title"), variant: "heading-xs-strong", children: n }),
2180
+ /* @__PURE__ */ x(wa, { className: Ca("message-hint"), variant: "body-md", children: t }),
2181
+ /* @__PURE__ */ x(
2182
+ ya,
2178
2183
  {
2179
- className: La("message-file-button-text"),
2184
+ className: Ca("message-file-button-text"),
2180
2185
  disabled: a,
2181
2186
  onClick: e,
2182
2187
  type: "button",
2183
2188
  children: i
2184
2189
  }
2185
2190
  )
2186
- ] }), Ct = Da(za), Mt = ({
2191
+ ] });
2192
+ Wa.displayName = "FileDrop.Message";
2193
+ const Mt = za(_a), Oi = ({
2187
2194
  disabled: a,
2188
2195
  error: i,
2189
2196
  file: t,
@@ -2193,9 +2200,11 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
2193
2200
  isAnImage: l,
2194
2201
  isHoverAccept: r,
2195
2202
  isHoverReject: v,
2196
- openFile: w,
2203
+ openFile: h,
2197
2204
  wordings: D
2198
- }) => r ? /* @__PURE__ */ f(G, { name: "smile-beam-solid" }) : v ? /* @__PURE__ */ f(G, { name: "sad-solid" }) : i ? /* @__PURE__ */ f(mi, { openFile: w, ...D }) : n ? l ? /* @__PURE__ */ f("img", { className: Ct("image-preview"), src: n }) : /* @__PURE__ */ f(Lt, { file: t, fileName: e, forceFileType: o, ...D }) : /* @__PURE__ */ f(mi, { disabled: a, openFile: w, ...D }), ui = /\.(jpeg|jpg|gif|png|webp)$/, $t = (a) => a ? typeof a == "string" ? !!xi(a).match(ui) : a.name ? !!a.name.match(ui) : !1 : !1, Nt = (a) => {
2205
+ }) => r ? /* @__PURE__ */ x(J, { name: "smile-beam-solid" }) : v ? /* @__PURE__ */ x(J, { name: "sad-solid" }) : i ? /* @__PURE__ */ x(Wa, { openFile: h, ...D }) : n ? l ? /* @__PURE__ */ x("img", { className: Mt("image-preview"), src: n }) : /* @__PURE__ */ x(Ai, { file: t, fileName: e, forceFileType: o, ...D }) : /* @__PURE__ */ x(Wa, { disabled: a, openFile: h, ...D });
2206
+ Oi.displayName = "FileDrop.Preview";
2207
+ const vi = /\.(jpeg|jpg|gif|png|webp)$/, Nt = (a) => a ? typeof a == "string" ? !!xi(a).match(vi) : a.name ? !!a.name.match(vi) : !1 : !1, $t = (a) => {
2199
2208
  let i;
2200
2209
  if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
2201
2210
  return i;
@@ -2205,109 +2214,134 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
2205
2214
  } catch {
2206
2215
  return;
2207
2216
  }
2208
- }, Kt = 2e6, Ht = "ERROR_INVALID_TYPE", Wt = "ERROR_INVALID_SIZE", ba = Da(za), ae = fi(
2217
+ }, Kt = 2e6, Ht = "ERROR_INVALID_TYPE", Wt = "ERROR_INVALID_SIZE", ha = za(_a), Ut = fi(
2209
2218
  ({
2210
2219
  accept: a = {
2211
2220
  "image/*": []
2212
2221
  },
2213
- children: i = Mt,
2222
+ children: i = Oi,
2214
2223
  className: t,
2215
- disabled: e,
2216
- fileName: n,
2217
- forceFileType: o,
2218
- handleAddFile: l,
2219
- handleRemoveFile: r,
2220
- isClearable: v,
2221
- isEditable: w,
2222
- maxSize: D = Kt,
2223
- multiple: I,
2224
- name: F,
2225
- onBlur: P,
2226
- onChange: h,
2227
- onError: E,
2228
- value: q,
2229
- wordings: na,
2230
- ...pa
2231
- }, J) => {
2232
- const [k, R] = Xa(q), [K, z] = Xa(void 0);
2233
- ta(() => {
2234
- R(q);
2235
- }, [q]), ta(() => () => k && k instanceof File && URL.revokeObjectURL(k.preview), [k]);
2236
- const X = (_) => {
2237
- const [d] = _;
2238
- d instanceof File && (d.preview = URL.createObjectURL(d)), R(d), z(null);
2239
- const A = Qa({ name: F, value: d });
2240
- h == null || h(A), l == null || l(A);
2241
- }, T = (_, d) => {
2242
- let A;
2243
- _.map(({ errors: ra }) => {
2244
- ra.map((H) => {
2245
- const { code: aa, message: S } = H;
2246
- aa === "file-invalid-type" ? A = Ht : aa === "file-too-large" ? A = Wt : A = S;
2224
+ deleteButtonText: e = "Delete",
2225
+ disabled: n,
2226
+ editButtonText: o = "Edit",
2227
+ fileName: l,
2228
+ forceFileType: r,
2229
+ handleAddFile: v,
2230
+ handleRemoveFile: h,
2231
+ isClearable: D,
2232
+ isEditable: S,
2233
+ maxSize: C = Kt,
2234
+ multiple: q,
2235
+ name: O,
2236
+ onBlur: F,
2237
+ onChange: y,
2238
+ onError: M,
2239
+ value: H,
2240
+ wordings: Q,
2241
+ ...ca
2242
+ }, aa) => {
2243
+ const [z, _] = Qa(H), [ia, P] = Qa(void 0);
2244
+ pa(() => {
2245
+ _(H);
2246
+ }, [H]), pa(() => () => z && z instanceof File && URL.revokeObjectURL(z.preview), [z]);
2247
+ const N = (I) => {
2248
+ const [w] = I;
2249
+ w instanceof File && (w.preview = URL.createObjectURL(w)), _(w), P(null);
2250
+ const k = ai({ name: O, value: w });
2251
+ y == null || y(k), v == null || v(k);
2252
+ }, la = (I, w) => {
2253
+ let k;
2254
+ I.map(({ errors: ra }) => {
2255
+ ra.map((T) => {
2256
+ const { code: ea, message: R } = T;
2257
+ ea === "file-invalid-type" ? k = Ht : ea === "file-too-large" ? k = Wt : k = R;
2247
2258
  });
2248
- }), R(null), z(A), E == null || E(A), h == null || h(d), P == null || P();
2249
- }, L = (_) => {
2250
- _.preventDefault(), R(null), z(null);
2251
- const d = Qa({ name: F, value: null });
2252
- h == null || h(d), r == null || r(d);
2253
- }, { getInputProps: oa, getRootProps: Q, isDragAccept: C, isDragActive: g, isDragReject: b, open: ca } = Ei({
2259
+ }), _(null), P(k), M == null || M(k), y == null || y(w), F == null || F();
2260
+ }, ta = (I) => {
2261
+ I.preventDefault(), _(null), P(null);
2262
+ const w = ai({ name: O, value: null });
2263
+ y == null || y(w), h == null || h(w);
2264
+ }, { getInputProps: W, getRootProps: f, isDragAccept: g, isDragActive: Ea, isDragReject: U, open: B } = Ei({
2254
2265
  accept: a,
2255
- disabled: e,
2256
- maxSize: D,
2257
- multiple: I,
2266
+ disabled: n,
2267
+ maxSize: C,
2268
+ multiple: q,
2258
2269
  noClick: !0,
2259
- onDropAccepted: X,
2260
- onDropRejected: T
2261
- }), la = (_) => E(_);
2262
- return /* @__PURE__ */ V(
2270
+ onDropAccepted: N,
2271
+ onDropRejected: la
2272
+ }), b = (I) => M(I);
2273
+ return /* @__PURE__ */ L(
2263
2274
  "div",
2264
2275
  {
2265
- className: ba("root", e && "disabled", b && "drag-reject", t),
2266
- ...Q({
2267
- disabled: e,
2268
- handleRemoveFile: r,
2269
- isClearable: v,
2270
- isDragAccept: C,
2271
- isDragActive: g,
2272
- isDragReject: b,
2273
- isEditable: w,
2274
- ref: J
2276
+ className: ha(
2277
+ "root",
2278
+ n && "disabled",
2279
+ U && "drag-reject",
2280
+ "field-input",
2281
+ t
2282
+ ),
2283
+ ...f({
2284
+ disabled: n,
2285
+ handleRemoveFile: h,
2286
+ isClearable: D,
2287
+ isDragAccept: g,
2288
+ isDragActive: Ea,
2289
+ isDragReject: U,
2290
+ isEditable: S,
2291
+ ref: aa
2275
2292
  }),
2276
- ...pa,
2293
+ ...ca,
2277
2294
  children: [
2278
- /* @__PURE__ */ f(
2295
+ /* @__PURE__ */ x(
2279
2296
  "input",
2280
2297
  {
2281
- className: ba("file-input"),
2282
- ...oa({ disabled: e, multiple: I, name: F, onError: la })
2298
+ className: ha("file-input"),
2299
+ ...W({ disabled: n, multiple: q, name: O, onError: b })
2283
2300
  }
2284
2301
  ),
2285
- /* @__PURE__ */ V("div", { className: ba("file-preview"), children: [
2302
+ /* @__PURE__ */ L("div", { className: ha("file-preview"), children: [
2286
2303
  i({
2287
- disabled: e,
2288
- error: K,
2289
- file: k,
2290
- fileName: n,
2291
- fileUrl: k && Nt(k),
2292
- forceFileType: o,
2293
- isAnImage: o === "image" || $t(k),
2294
- isHoverAccept: C,
2295
- isHoverReject: b,
2296
- openFile: ca,
2297
- wordings: na
2304
+ disabled: n,
2305
+ error: ia,
2306
+ file: z,
2307
+ fileName: l,
2308
+ fileUrl: z && $t(z),
2309
+ forceFileType: r,
2310
+ isAnImage: r === "image" || Nt(z),
2311
+ isHoverAccept: g,
2312
+ isHoverReject: U,
2313
+ openFile: B,
2314
+ wordings: Q
2298
2315
  }),
2299
- k && (K || w || v) ? /* @__PURE__ */ V("div", { className: ba("actions"), children: [
2300
- K || w ? /* @__PURE__ */ f(ha, { onClick: ca, size: "md", type: "button", variant: "tertiary", children: /* @__PURE__ */ f(G, { name: "pen" }) }) : null,
2301
- v ? /* @__PURE__ */ f(
2302
- ha,
2316
+ z ? /* @__PURE__ */ L("div", { className: ha("actions"), children: [
2317
+ /* @__PURE__ */ L(
2318
+ ya,
2319
+ {
2320
+ disabled: !S,
2321
+ onClick: B,
2322
+ size: "lg",
2323
+ type: "button",
2324
+ variant: "secondary",
2325
+ children: [
2326
+ /* @__PURE__ */ x(J, { name: "pen" }),
2327
+ o
2328
+ ]
2329
+ }
2330
+ ),
2331
+ /* @__PURE__ */ L(
2332
+ ya,
2303
2333
  {
2304
- onClick: L,
2305
- size: "md",
2334
+ disabled: !D,
2335
+ onClick: ta,
2336
+ size: "lg",
2306
2337
  type: "button",
2307
- variant: "primary-danger",
2308
- children: /* @__PURE__ */ f(G, { name: "trash" })
2338
+ variant: "secondary-danger",
2339
+ children: [
2340
+ /* @__PURE__ */ x(J, { name: "trash" }),
2341
+ e
2342
+ ]
2309
2343
  }
2310
- ) : null
2344
+ )
2311
2345
  ] }) : null
2312
2346
  ] })
2313
2347
  ]
@@ -2315,6 +2349,7 @@ const St = "_root_tju30_2", qt = "_disabled_tju30_26", Tt = "_actions_tju30_65",
2315
2349
  );
2316
2350
  }
2317
2351
  );
2352
+ Ut.displayName = "FileDrop";
2318
2353
  export {
2319
- ae as FileDrop
2354
+ Ut as FileDrop
2320
2355
  };