welcome-ui 8.0.0-alpha.0 → 8.0.2

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 (90) hide show
  1. package/dist/AXB53BZF-BOEe01VW.mjs +25 -0
  2. package/dist/Accordion.mjs +17 -17
  3. package/dist/Alert.mjs +19 -19
  4. package/dist/{BYC7LY2E-CVjUW1dr.mjs → BYC7LY2E-B1IDizRs.mjs} +298 -295
  5. package/dist/Badge.mjs +1 -1
  6. package/dist/Breadcrumb.mjs +27 -26
  7. package/dist/Button.mjs +2 -2
  8. package/dist/Checkbox.mjs +1 -1
  9. package/dist/{CustomInput-D_13Gd_3.mjs → CustomInput-IA_gVoXd.mjs} +2991 -2859
  10. package/dist/DatePicker.mjs +4 -4
  11. package/dist/DateTimePicker.mjs +9 -9
  12. package/dist/DateTimePickerCommon.mjs +1 -1
  13. package/dist/Drawer.mjs +7 -7
  14. package/dist/DropdownMenu.mjs +262 -262
  15. package/dist/Field.mjs +25 -25
  16. package/dist/FileDrop.mjs +273 -267
  17. package/dist/FileUpload.mjs +26 -26
  18. package/dist/Files.mjs +1 -1
  19. package/dist/Hint.mjs +1 -1
  20. package/dist/{ITI7HKP4-BONrZ9Pq.mjs → ITI7HKP4-EL9KXYBU.mjs} +150 -150
  21. package/dist/Icons.mjs +88 -88
  22. package/dist/IconsFont.mjs +159 -159
  23. package/dist/InputText.mjs +1 -1
  24. package/dist/{JC64G2H7-Dey-8h60.mjs → JC64G2H7-BzklVBKM.mjs} +70 -70
  25. package/dist/KUU7WJ55-CS4NemC6.mjs +61 -0
  26. package/dist/{LVA2YJMS-qFC9J-lt.mjs → LVA2YJMS-DDEmK0pp.mjs} +491 -488
  27. package/dist/Label.mjs +2 -2
  28. package/dist/Link.mjs +3 -3
  29. package/dist/MTZPJQMC-CMjAwC0N.mjs +15 -0
  30. package/dist/Modal.mjs +13 -13
  31. package/dist/NLEBE274-QOMV1l7e.mjs +84 -0
  32. package/dist/P2CTZE2T-Cl2w7OLV.mjs +300 -0
  33. package/dist/P4IRICAX-DezbJY4s.mjs +37 -0
  34. package/dist/Pagination.mjs +22 -22
  35. package/dist/Picker.mjs +2 -2
  36. package/dist/Popover.mjs +2 -2
  37. package/dist/QYJ6MIDR-Bb0O5xUM.mjs +97 -0
  38. package/dist/Radio.mjs +18 -18
  39. package/dist/RadioGroup.mjs +15 -15
  40. package/dist/RadioTab.mjs +9 -9
  41. package/dist/{SYRFVSLH-cVmYtx36.mjs → SYRFVSLH-jn06-eLy.mjs} +17 -17
  42. package/dist/Search.mjs +2 -2
  43. package/dist/Select.mjs +719 -716
  44. package/dist/Shape.mjs +1 -1
  45. package/dist/Slider.mjs +1 -1
  46. package/dist/Swiper.mjs +284 -278
  47. package/dist/Tabs.mjs +128 -128
  48. package/dist/Tag.mjs +16 -16
  49. package/dist/Text.mjs +1 -1
  50. package/dist/Textarea.mjs +4 -4
  51. package/dist/TimePicker.mjs +6 -6
  52. package/dist/Toast.mjs +69 -69
  53. package/dist/Toggle.mjs +2 -2
  54. package/dist/Tooltip.mjs +60 -60
  55. package/dist/UniversalLink.mjs +8 -8
  56. package/dist/VEVQD5MH-CuegL0m0.mjs +20 -0
  57. package/dist/{VGCJ63VH-B39w1tBw.mjs → VGCJ63VH-BMzoZtCu.mjs} +31 -33
  58. package/dist/VariantIcon.mjs +4 -4
  59. package/dist/WelcomeLoader.mjs +4862 -9223
  60. package/dist/X5NMLKT6-CvSCix-_.mjs +25 -0
  61. package/dist/YV4JVR4I-Bh7B7TET.mjs +344 -0
  62. package/dist/downshift.esm-D0ns_SQs.mjs +1082 -0
  63. package/dist/{field-styles-DLIhqG_8.mjs → field-styles-CfVLcVQp.mjs} +1 -1
  64. package/dist/{index-BDeIsk2X.mjs → index-5PUh49rV.mjs} +56 -56
  65. package/dist/{index-DEJJvyGk.mjs → index-B0gDDiFm.mjs} +7 -7
  66. package/dist/{index-CExLVjET.mjs → index-B22SHR8h.mjs} +4 -4
  67. package/dist/index-BhcLigYU.mjs +77 -0
  68. package/dist/{index-BJAZgeHL.mjs → index-Bkl89twW.mjs} +4 -4
  69. package/dist/{index-BYdkhqH4.mjs → index-CBBbX29m.mjs} +3652 -3584
  70. package/dist/{index-BpRjq7lj.mjs → index-CQD9fgf_.mjs} +3 -3
  71. package/dist/{index-BRDOakbf.mjs → index-CmsWSKKs.mjs} +5 -5
  72. package/dist/{index-SbQUT2mU.mjs → index-DgSynio4.mjs} +244 -239
  73. package/dist/{index-BrfXjmHY.mjs → index-wr_b5GSV.mjs} +6 -6
  74. package/dist/radio-group-RFyDp0KD.mjs +51 -0
  75. package/dist/theme.mjs +670 -615
  76. package/dist/{use-viewport-m3glsbna.mjs → use-viewport-CfklieD-.mjs} +5 -5
  77. package/dist/utils.mjs +29 -91
  78. package/package.json +12 -15
  79. package/dist/AXB53BZF-CGoc4K3d.mjs +0 -25
  80. package/dist/KUU7WJ55-3sP-w1F1.mjs +0 -61
  81. package/dist/MTZPJQMC-C0Xe_WK4.mjs +0 -13
  82. package/dist/NLEBE274-C94QU78N.mjs +0 -84
  83. package/dist/P2CTZE2T-YPes1GXe.mjs +0 -297
  84. package/dist/P4IRICAX-DzXqUYe-.mjs +0 -37
  85. package/dist/QYJ6MIDR-BLLqyXdd.mjs +0 -97
  86. package/dist/VEVQD5MH-ZMnHV8ZJ.mjs +0 -20
  87. package/dist/X5NMLKT6-uFSu0Lii.mjs +0 -25
  88. package/dist/YV4JVR4I-BGfUf3Nu.mjs +0 -341
  89. package/dist/downshift.esm-CEHW4VDy.mjs +0 -1085
  90. package/dist/radio-group-CGC6DTFJ.mjs +0 -51
package/dist/FileDrop.mjs CHANGED
@@ -1,15 +1,16 @@
1
1
  "use client";
2
- import s, { forwardRef as Ei, useImperativeHandle as zi, Fragment as Ai, useMemo as V, useRef as fa, useReducer as Fi, useEffect as ia, useCallback as E, useState as Ya } from "react";
3
- import { P as d } from "./index-SbQUT2mU.mjs";
4
- import { c as Va } from "./create-event-rXDe5aCQ.mjs";
5
- import wa, { css as _a, th as _ } from "@xstyled/styled-components";
6
- import { shouldForwardProp as Oi, forwardRef as _i } from "./System.mjs";
7
- import { Text as xa } from "./Text.mjs";
8
- import { Button as ga } from "./Button.mjs";
2
+ import s, { forwardRef as Ai, useMemo as V, useRef as va, useReducer as Fi, useEffect as ia, useCallback as E, useImperativeHandle as Oi, Fragment as _i, useState as Va } from "react";
3
+ import { P as d } from "./index-DgSynio4.mjs";
4
+ import { g as Pi } from "./_commonjsHelpers-CXJ7dpIk.mjs";
5
+ import { c as Ga } from "./create-event-rXDe5aCQ.mjs";
6
+ import ka, { th as _, css as Ia } from "@xstyled/styled-components";
7
+ import { shouldForwardProp as Ii, forwardRef as Ri } from "./System.mjs";
8
+ import { Text as ga } from "./Text.mjs";
9
+ import { Button as ba } from "./Button.mjs";
9
10
  import "./Icon.mjs";
10
- import { E as Pi } from "./index-DqBUFsqP.mjs";
11
- import { getFileIcon as Ii, getFileSize as Ri, getFileName as li } from "./Files.mjs";
12
- import { P as Si, N as Ti, E as qi, T as Ci } from "./index-CExLVjET.mjs";
11
+ import { E as Si } from "./index-DqBUFsqP.mjs";
12
+ import { getFileIcon as qi, getFileSize as Ti, getFileName as si } from "./Files.mjs";
13
+ import { P as Ci, N as Li, E as $i, T as Mi } from "./index-B22SHR8h.mjs";
13
14
  function H(a, i, t, e) {
14
15
  function n(o) {
15
16
  return o instanceof t ? o : new t(function(c) {
@@ -24,7 +25,7 @@ function H(a, i, t, e) {
24
25
  c(k);
25
26
  }
26
27
  }
27
- function f(x) {
28
+ function v(x) {
28
29
  try {
29
30
  h(e.throw(x));
30
31
  } catch (k) {
@@ -32,12 +33,12 @@ function H(a, i, t, e) {
32
33
  }
33
34
  }
34
35
  function h(x) {
35
- x.done ? o(x.value) : n(x.value).then(r, f);
36
+ x.done ? o(x.value) : n(x.value).then(r, v);
36
37
  }
37
38
  h((e = e.apply(a, i || [])).next());
38
39
  });
39
40
  }
40
- const Li = /* @__PURE__ */ new Map([
41
+ const Ki = /* @__PURE__ */ new Map([
41
42
  // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
42
43
  ["1km", "application/vnd.1000minds.decision-model+xml"],
43
44
  ["3dml", "text/vnd.in3d.3dml"],
@@ -1241,13 +1242,13 @@ const Li = /* @__PURE__ */ new Map([
1241
1242
  ["zsh", "text/x-scriptzsh"]
1242
1243
  ]);
1243
1244
  function G(a, i, t) {
1244
- const e = $i(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
1245
- return typeof e.path != "string" && Ga(e, "path", o), Ga(e, "relativePath", o), e;
1245
+ const e = Hi(a), { webkitRelativePath: n } = a, o = typeof i == "string" ? i : typeof n == "string" && n.length > 0 ? n : `./${a.name}`;
1246
+ return typeof e.path != "string" && Za(e, "path", o), Za(e, "relativePath", o), e;
1246
1247
  }
1247
- function $i(a) {
1248
+ function Hi(a) {
1248
1249
  const { name: i } = a;
1249
1250
  if (i && i.lastIndexOf(".") !== -1 && !a.type) {
1250
- const e = i.split(".").pop().toLowerCase(), n = Li.get(e);
1251
+ const e = i.split(".").pop().toLowerCase(), n = Ki.get(e);
1251
1252
  n && Object.defineProperty(a, "type", {
1252
1253
  value: n,
1253
1254
  writable: !1,
@@ -1257,7 +1258,7 @@ function $i(a) {
1257
1258
  }
1258
1259
  return a;
1259
1260
  }
1260
- function Ga(a, i, t) {
1261
+ function Za(a, i, t) {
1261
1262
  Object.defineProperty(a, i, {
1262
1263
  value: t,
1263
1264
  writable: !1,
@@ -1265,51 +1266,51 @@ function Ga(a, i, t) {
1265
1266
  enumerable: !0
1266
1267
  });
1267
1268
  }
1268
- const Mi = [
1269
+ const Wi = [
1269
1270
  // Thumbnail cache files for macOS and Windows
1270
1271
  ".DS_Store",
1271
1272
  // macOs
1272
1273
  "Thumbs.db"
1273
1274
  // Windows
1274
1275
  ];
1275
- function Ki(a) {
1276
+ function Bi(a) {
1276
1277
  return H(this, void 0, void 0, function* () {
1277
- return ba(a) && Hi(a.dataTransfer) ? Ui(a.dataTransfer, a.type) : Wi(a) ? Bi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Ni(a) : [];
1278
+ return ha(a) && Ni(a.dataTransfer) ? Gi(a.dataTransfer, a.type) : Ui(a) ? Yi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Vi(a) : [];
1278
1279
  });
1279
1280
  }
1280
- function Hi(a) {
1281
- return ba(a);
1281
+ function Ni(a) {
1282
+ return ha(a);
1282
1283
  }
1283
- function Wi(a) {
1284
- return ba(a) && ba(a.target);
1284
+ function Ui(a) {
1285
+ return ha(a) && ha(a.target);
1285
1286
  }
1286
- function ba(a) {
1287
+ function ha(a) {
1287
1288
  return typeof a == "object" && a !== null;
1288
1289
  }
1289
- function Bi(a) {
1290
- return Ra(a.target.files).map((i) => G(i));
1290
+ function Yi(a) {
1291
+ return qa(a.target.files).map((i) => G(i));
1291
1292
  }
1292
- function Ni(a) {
1293
+ function Vi(a) {
1293
1294
  return H(this, void 0, void 0, function* () {
1294
1295
  return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => G(t));
1295
1296
  });
1296
1297
  }
1297
- function Ui(a, i) {
1298
+ function Gi(a, i) {
1298
1299
  return H(this, void 0, void 0, function* () {
1299
1300
  if (a.items) {
1300
- const t = Ra(a.items).filter((n) => n.kind === "file");
1301
+ const t = qa(a.items).filter((n) => n.kind === "file");
1301
1302
  if (i !== "drop")
1302
1303
  return t;
1303
- const e = yield Promise.all(t.map(Yi));
1304
- return Za(ri(e));
1304
+ const e = yield Promise.all(t.map(Zi));
1305
+ return Ja(di(e));
1305
1306
  }
1306
- return Za(Ra(a.files).map((t) => G(t)));
1307
+ return Ja(qa(a.files).map((t) => G(t)));
1307
1308
  });
1308
1309
  }
1309
- function Za(a) {
1310
- return a.filter((i) => Mi.indexOf(i.name) === -1);
1310
+ function Ja(a) {
1311
+ return a.filter((i) => Wi.indexOf(i.name) === -1);
1311
1312
  }
1312
- function Ra(a) {
1313
+ function qa(a) {
1313
1314
  if (a === null)
1314
1315
  return [];
1315
1316
  const i = [];
@@ -1319,19 +1320,19 @@ function Ra(a) {
1319
1320
  }
1320
1321
  return i;
1321
1322
  }
1322
- function Yi(a) {
1323
+ function Zi(a) {
1323
1324
  if (typeof a.webkitGetAsEntry != "function")
1324
- return Ja(a);
1325
+ return Xa(a);
1325
1326
  const i = a.webkitGetAsEntry();
1326
- return i && i.isDirectory ? si(i) : Ja(a, i);
1327
+ return i && i.isDirectory ? mi(i) : Xa(a, i);
1327
1328
  }
1328
- function ri(a) {
1329
+ function di(a) {
1329
1330
  return a.reduce((i, t) => [
1330
1331
  ...i,
1331
- ...Array.isArray(t) ? ri(t) : [t]
1332
+ ...Array.isArray(t) ? di(t) : [t]
1332
1333
  ], []);
1333
1334
  }
1334
- function Ja(a, i) {
1335
+ function Xa(a, i) {
1335
1336
  var t;
1336
1337
  if (typeof a.getAsFileSystemHandle == "function")
1337
1338
  return a.getAsFileSystemHandle().then((o) => H(this, void 0, void 0, function* () {
@@ -1344,19 +1345,19 @@ function Ja(a, i) {
1344
1345
  const n = G(e, (t = i == null ? void 0 : i.fullPath) !== null && t !== void 0 ? t : void 0);
1345
1346
  return Promise.resolve(n);
1346
1347
  }
1347
- function Vi(a) {
1348
+ function Ji(a) {
1348
1349
  return H(this, void 0, void 0, function* () {
1349
- return a.isDirectory ? si(a) : Gi(a);
1350
+ return a.isDirectory ? mi(a) : Xi(a);
1350
1351
  });
1351
1352
  }
1352
- function si(a) {
1353
+ function mi(a) {
1353
1354
  const i = a.createReader();
1354
1355
  return new Promise((t, e) => {
1355
1356
  const n = [];
1356
1357
  function o() {
1357
1358
  i.readEntries((c) => H(this, void 0, void 0, function* () {
1358
1359
  if (c.length) {
1359
- const r = Promise.all(c.map(Vi));
1360
+ const r = Promise.all(c.map(Ji));
1360
1361
  n.push(r), o();
1361
1362
  } else
1362
1363
  try {
@@ -1372,7 +1373,7 @@ function si(a) {
1372
1373
  o();
1373
1374
  });
1374
1375
  }
1375
- function Gi(a) {
1376
+ function Xi(a) {
1376
1377
  return H(this, void 0, void 0, function* () {
1377
1378
  return new Promise((i, t) => {
1378
1379
  a.file((e) => {
@@ -1384,33 +1385,38 @@ function Gi(a) {
1384
1385
  });
1385
1386
  });
1386
1387
  }
1387
- var Pa = function(a, i) {
1388
- if (a && i) {
1389
- var t = Array.isArray(i) ? i : i.split(",");
1390
- if (t.length === 0)
1391
- return !0;
1392
- var e = a.name || "", n = (a.type || "").toLowerCase(), o = n.replace(/\/.*$/, "");
1393
- return t.some(function(c) {
1394
- var r = c.trim().toLowerCase();
1395
- return r.charAt(0) === "." ? e.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : n === r;
1396
- });
1397
- }
1398
- return !0;
1399
- };
1400
- function Xa(a) {
1401
- return Xi(a) || Ji(a) || mi(a) || Zi();
1388
+ var fa = {}, Qa;
1389
+ function Qi() {
1390
+ return Qa || (Qa = 1, fa.__esModule = !0, fa.default = function(a, i) {
1391
+ if (a && i) {
1392
+ var t = Array.isArray(i) ? i : i.split(",");
1393
+ if (t.length === 0)
1394
+ return !0;
1395
+ var e = a.name || "", n = (a.type || "").toLowerCase(), o = n.replace(/\/.*$/, "");
1396
+ return t.some(function(c) {
1397
+ var r = c.trim().toLowerCase();
1398
+ return r.charAt(0) === "." ? e.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : n === r;
1399
+ });
1400
+ }
1401
+ return !0;
1402
+ }), fa;
1403
+ }
1404
+ var at = Qi();
1405
+ const Ra = /* @__PURE__ */ Pi(at);
1406
+ function ai(a) {
1407
+ return et(a) || tt(a) || vi(a) || it();
1402
1408
  }
1403
- function Zi() {
1409
+ function it() {
1404
1410
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1405
1411
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1406
1412
  }
1407
- function Ji(a) {
1413
+ function tt(a) {
1408
1414
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1409
1415
  }
1410
- function Xi(a) {
1411
- if (Array.isArray(a)) return Sa(a);
1416
+ function et(a) {
1417
+ if (Array.isArray(a)) return Ta(a);
1412
1418
  }
1413
- function Qa(a, i) {
1419
+ function ii(a, i) {
1414
1420
  var t = Object.keys(a);
1415
1421
  if (Object.getOwnPropertySymbols) {
1416
1422
  var e = Object.getOwnPropertySymbols(a);
@@ -1420,50 +1426,50 @@ function Qa(a, i) {
1420
1426
  }
1421
1427
  return t;
1422
1428
  }
1423
- function ai(a) {
1429
+ function ti(a) {
1424
1430
  for (var i = 1; i < arguments.length; i++) {
1425
1431
  var t = arguments[i] != null ? arguments[i] : {};
1426
- i % 2 ? Qa(Object(t), !0).forEach(function(e) {
1427
- di(a, e, t[e]);
1428
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Qa(Object(t)).forEach(function(e) {
1432
+ i % 2 ? ii(Object(t), !0).forEach(function(e) {
1433
+ ui(a, e, t[e]);
1434
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ii(Object(t)).forEach(function(e) {
1429
1435
  Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1430
1436
  });
1431
1437
  }
1432
1438
  return a;
1433
1439
  }
1434
- function di(a, i, t) {
1440
+ function ui(a, i, t) {
1435
1441
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1436
1442
  }
1437
1443
  function ta(a, i) {
1438
- return it(a) || at(a, i) || mi(a, i) || Qi();
1444
+ return ot(a) || pt(a, i) || vi(a, i) || nt();
1439
1445
  }
1440
- function Qi() {
1446
+ function nt() {
1441
1447
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1442
1448
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1443
1449
  }
1444
- function mi(a, i) {
1450
+ function vi(a, i) {
1445
1451
  if (a) {
1446
- if (typeof a == "string") return Sa(a, i);
1452
+ if (typeof a == "string") return Ta(a, i);
1447
1453
  var t = Object.prototype.toString.call(a).slice(8, -1);
1448
1454
  if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1449
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Sa(a, i);
1455
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ta(a, i);
1450
1456
  }
1451
1457
  }
1452
- function Sa(a, i) {
1458
+ function Ta(a, i) {
1453
1459
  (i == null || i > a.length) && (i = a.length);
1454
1460
  for (var t = 0, e = new Array(i); t < i; t++)
1455
1461
  e[t] = a[t];
1456
1462
  return e;
1457
1463
  }
1458
- function at(a, i) {
1464
+ function pt(a, i) {
1459
1465
  var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1460
1466
  if (t != null) {
1461
1467
  var e = [], n = !0, o = !1, c, r;
1462
1468
  try {
1463
1469
  for (t = t.call(a); !(n = (c = t.next()).done) && (e.push(c.value), !(i && e.length === i)); n = !0)
1464
1470
  ;
1465
- } catch (f) {
1466
- o = !0, r = f;
1471
+ } catch (v) {
1472
+ o = !0, r = v;
1467
1473
  } finally {
1468
1474
  try {
1469
1475
  !n && t.return != null && t.return();
@@ -1474,74 +1480,74 @@ function at(a, i) {
1474
1480
  return e;
1475
1481
  }
1476
1482
  }
1477
- function it(a) {
1483
+ function ot(a) {
1478
1484
  if (Array.isArray(a)) return a;
1479
1485
  }
1480
- var tt = typeof Pa == "function" ? Pa : Pa.default, et = "file-invalid-type", nt = "file-too-large", pt = "file-too-small", ot = "too-many-files", ct = function() {
1486
+ var ct = typeof Ra == "function" ? Ra : Ra.default, lt = "file-invalid-type", rt = "file-too-large", st = "file-too-small", dt = "too-many-files", mt = function() {
1481
1487
  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];
1482
1488
  return {
1483
- code: et,
1489
+ code: lt,
1484
1490
  message: "File type must be ".concat(e)
1485
1491
  };
1486
- }, ii = function(i) {
1492
+ }, ei = function(i) {
1487
1493
  return {
1488
- code: nt,
1494
+ code: rt,
1489
1495
  message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1490
1496
  };
1491
- }, ti = function(i) {
1497
+ }, ni = function(i) {
1492
1498
  return {
1493
- code: pt,
1499
+ code: st,
1494
1500
  message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1495
1501
  };
1496
- }, lt = {
1497
- code: ot,
1502
+ }, ut = {
1503
+ code: dt,
1498
1504
  message: "Too many files"
1499
1505
  };
1500
- function ui(a, i) {
1501
- var t = a.type === "application/x-moz-file" || tt(a, i);
1502
- return [t, t ? null : ct(i)];
1506
+ function fi(a, i) {
1507
+ var t = a.type === "application/x-moz-file" || ct(a, i);
1508
+ return [t, t ? null : mt(i)];
1503
1509
  }
1504
- function fi(a, i, t) {
1510
+ function xi(a, i, t) {
1505
1511
  if (K(a.size))
1506
1512
  if (K(i) && K(t)) {
1507
- if (a.size > t) return [!1, ii(t)];
1508
- if (a.size < i) return [!1, ti(i)];
1513
+ if (a.size > t) return [!1, ei(t)];
1514
+ if (a.size < i) return [!1, ni(i)];
1509
1515
  } else {
1510
- if (K(i) && a.size < i) return [!1, ti(i)];
1511
- if (K(t) && a.size > t) return [!1, ii(t)];
1516
+ if (K(i) && a.size < i) return [!1, ni(i)];
1517
+ if (K(t) && a.size > t) return [!1, ei(t)];
1512
1518
  }
1513
1519
  return [!0, null];
1514
1520
  }
1515
1521
  function K(a) {
1516
1522
  return a != null;
1517
1523
  }
1518
- function rt(a) {
1524
+ function vt(a) {
1519
1525
  var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, c = a.maxFiles, r = a.validator;
1520
- return !o && i.length > 1 || o && c >= 1 && i.length > c ? !1 : i.every(function(f) {
1521
- var h = ui(f, t), x = ta(h, 1), k = x[0], P = fi(f, e, n), R = ta(P, 1), j = R[0], I = r ? r(f) : null;
1526
+ return !o && i.length > 1 || o && c >= 1 && i.length > c ? !1 : i.every(function(v) {
1527
+ var h = fi(v, t), x = ta(h, 1), k = x[0], P = xi(v, e, n), R = ta(P, 1), j = R[0], I = r ? r(v) : null;
1522
1528
  return k && j && !I;
1523
1529
  });
1524
1530
  }
1525
- function ha(a) {
1531
+ function ya(a) {
1526
1532
  return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
1527
1533
  }
1528
- function va(a) {
1534
+ function xa(a) {
1529
1535
  return a.dataTransfer ? Array.prototype.some.call(a.dataTransfer.types, function(i) {
1530
1536
  return i === "Files" || i === "application/x-moz-file";
1531
1537
  }) : !!a.target && !!a.target.files;
1532
1538
  }
1533
- function ei(a) {
1539
+ function pi(a) {
1534
1540
  a.preventDefault();
1535
1541
  }
1536
- function st(a) {
1542
+ function ft(a) {
1537
1543
  return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
1538
1544
  }
1539
- function dt(a) {
1545
+ function xt(a) {
1540
1546
  return a.indexOf("Edge/") !== -1;
1541
1547
  }
1542
- function mt() {
1548
+ function gt() {
1543
1549
  var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1544
- return st(a) || dt(a);
1550
+ return ft(a) || xt(a);
1545
1551
  }
1546
1552
  function O() {
1547
1553
  for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
@@ -1550,21 +1556,21 @@ function O() {
1550
1556
  for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), c = 1; c < n; c++)
1551
1557
  o[c - 1] = arguments[c];
1552
1558
  return i.some(function(r) {
1553
- return !ha(e) && r && r.apply(void 0, [e].concat(o)), ha(e);
1559
+ return !ya(e) && r && r.apply(void 0, [e].concat(o)), ya(e);
1554
1560
  });
1555
1561
  };
1556
1562
  }
1557
- function ut() {
1563
+ function bt() {
1558
1564
  return "showOpenFilePicker" in window;
1559
1565
  }
1560
- function ft(a) {
1566
+ function ht(a) {
1561
1567
  if (K(a)) {
1562
1568
  var i = Object.entries(a).filter(function(t) {
1563
1569
  var e = ta(t, 2), n = e[0], o = e[1], c = !0;
1564
- return vi(n) || (console.warn('Skipped "'.concat(n, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), c = !1), (!Array.isArray(o) || !o.every(xi)) && (console.warn('Skipped "'.concat(n, '" because an invalid file extension was provided.')), c = !1), c;
1570
+ return gi(n) || (console.warn('Skipped "'.concat(n, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), c = !1), (!Array.isArray(o) || !o.every(bi)) && (console.warn('Skipped "'.concat(n, '" because an invalid file extension was provided.')), c = !1), c;
1565
1571
  }).reduce(function(t, e) {
1566
1572
  var n = ta(e, 2), o = n[0], c = n[1];
1567
- return ai(ai({}, t), {}, di({}, o, c));
1573
+ return ti(ti({}, t), {}, ui({}, o, c));
1568
1574
  }, {});
1569
1575
  return [{
1570
1576
  // description is required due to https://crbug.com/1264708
@@ -1574,71 +1580,71 @@ function ft(a) {
1574
1580
  }
1575
1581
  return a;
1576
1582
  }
1577
- function vt(a) {
1583
+ function yt(a) {
1578
1584
  if (K(a))
1579
1585
  return Object.entries(a).reduce(function(i, t) {
1580
1586
  var e = ta(t, 2), n = e[0], o = e[1];
1581
- return [].concat(Xa(i), [n], Xa(o));
1587
+ return [].concat(ai(i), [n], ai(o));
1582
1588
  }, []).filter(function(i) {
1583
- return vi(i) || xi(i);
1589
+ return gi(i) || bi(i);
1584
1590
  }).join(",");
1585
1591
  }
1586
- function xt(a) {
1592
+ function wt(a) {
1587
1593
  return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
1588
1594
  }
1589
- function gt(a) {
1595
+ function kt(a) {
1590
1596
  return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
1591
1597
  }
1592
- function vi(a) {
1598
+ function gi(a) {
1593
1599
  return a === "audio/*" || a === "video/*" || a === "image/*" || a === "text/*" || a === "application/*" || /\w+\/[-+.\w]+/g.test(a);
1594
1600
  }
1595
- function xi(a) {
1601
+ function bi(a) {
1596
1602
  return /^.*\.[\w]+$/.test(a);
1597
1603
  }
1598
- var bt = ["children"], ht = ["open"], yt = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], wt = ["refKey", "onChange", "onClick"];
1599
- function kt(a) {
1600
- return Et(a) || Dt(a) || gi(a) || jt();
1604
+ var jt = ["children"], Dt = ["open"], Et = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], zt = ["refKey", "onChange", "onClick"];
1605
+ function At(a) {
1606
+ return _t(a) || Ot(a) || hi(a) || Ft();
1601
1607
  }
1602
- function jt() {
1608
+ function Ft() {
1603
1609
  throw new TypeError(`Invalid attempt to spread non-iterable instance.
1604
1610
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1605
1611
  }
1606
- function Dt(a) {
1612
+ function Ot(a) {
1607
1613
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1608
1614
  }
1609
- function Et(a) {
1610
- if (Array.isArray(a)) return Ta(a);
1615
+ function _t(a) {
1616
+ if (Array.isArray(a)) return Ca(a);
1611
1617
  }
1612
- function Ia(a, i) {
1613
- return Ft(a) || At(a, i) || gi(a, i) || zt();
1618
+ function Sa(a, i) {
1619
+ return Rt(a) || It(a, i) || hi(a, i) || Pt();
1614
1620
  }
1615
- function zt() {
1621
+ function Pt() {
1616
1622
  throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1617
1623
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
1618
1624
  }
1619
- function gi(a, i) {
1625
+ function hi(a, i) {
1620
1626
  if (a) {
1621
- if (typeof a == "string") return Ta(a, i);
1627
+ if (typeof a == "string") return Ca(a, i);
1622
1628
  var t = Object.prototype.toString.call(a).slice(8, -1);
1623
1629
  if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1624
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ta(a, i);
1630
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ca(a, i);
1625
1631
  }
1626
1632
  }
1627
- function Ta(a, i) {
1633
+ function Ca(a, i) {
1628
1634
  (i == null || i > a.length) && (i = a.length);
1629
1635
  for (var t = 0, e = new Array(i); t < i; t++)
1630
1636
  e[t] = a[t];
1631
1637
  return e;
1632
1638
  }
1633
- function At(a, i) {
1639
+ function It(a, i) {
1634
1640
  var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
1635
1641
  if (t != null) {
1636
1642
  var e = [], n = !0, o = !1, c, r;
1637
1643
  try {
1638
1644
  for (t = t.call(a); !(n = (c = t.next()).done) && (e.push(c.value), !(i && e.length === i)); n = !0)
1639
1645
  ;
1640
- } catch (f) {
1641
- o = !0, r = f;
1646
+ } catch (v) {
1647
+ o = !0, r = v;
1642
1648
  } finally {
1643
1649
  try {
1644
1650
  !n && t.return != null && t.return();
@@ -1649,10 +1655,10 @@ function At(a, i) {
1649
1655
  return e;
1650
1656
  }
1651
1657
  }
1652
- function Ft(a) {
1658
+ function Rt(a) {
1653
1659
  if (Array.isArray(a)) return a;
1654
1660
  }
1655
- function ni(a, i) {
1661
+ function oi(a, i) {
1656
1662
  var t = Object.keys(a);
1657
1663
  if (Object.getOwnPropertySymbols) {
1658
1664
  var e = Object.getOwnPropertySymbols(a);
@@ -1665,20 +1671,20 @@ function ni(a, i) {
1665
1671
  function u(a) {
1666
1672
  for (var i = 1; i < arguments.length; i++) {
1667
1673
  var t = arguments[i] != null ? arguments[i] : {};
1668
- i % 2 ? ni(Object(t), !0).forEach(function(e) {
1669
- qa(a, e, t[e]);
1670
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : ni(Object(t)).forEach(function(e) {
1674
+ i % 2 ? oi(Object(t), !0).forEach(function(e) {
1675
+ La(a, e, t[e]);
1676
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : oi(Object(t)).forEach(function(e) {
1671
1677
  Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1672
1678
  });
1673
1679
  }
1674
1680
  return a;
1675
1681
  }
1676
- function qa(a, i, t) {
1682
+ function La(a, i, t) {
1677
1683
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1678
1684
  }
1679
- function ya(a, i) {
1685
+ function wa(a, i) {
1680
1686
  if (a == null) return {};
1681
- var t = Ot(a, i), e, n;
1687
+ var t = St(a, i), e, n;
1682
1688
  if (Object.getOwnPropertySymbols) {
1683
1689
  var o = Object.getOwnPropertySymbols(a);
1684
1690
  for (n = 0; n < o.length; n++)
@@ -1686,27 +1692,27 @@ function ya(a, i) {
1686
1692
  }
1687
1693
  return t;
1688
1694
  }
1689
- function Ot(a, i) {
1695
+ function St(a, i) {
1690
1696
  if (a == null) return {};
1691
1697
  var t = {}, e = Object.keys(a), n, o;
1692
1698
  for (o = 0; o < e.length; o++)
1693
1699
  n = e[o], !(i.indexOf(n) >= 0) && (t[n] = a[n]);
1694
1700
  return t;
1695
1701
  }
1696
- var La = /* @__PURE__ */ Ei(function(a, i) {
1697
- var t = a.children, e = ya(a, bt), n = hi(e), o = n.open, c = ya(n, ht);
1698
- return zi(i, function() {
1702
+ var ja = /* @__PURE__ */ Ai(function(a, i) {
1703
+ var t = a.children, e = wa(a, jt), n = wi(e), o = n.open, c = wa(n, Dt);
1704
+ return Oi(i, function() {
1699
1705
  return {
1700
1706
  open: o
1701
1707
  };
1702
- }, [o]), /* @__PURE__ */ s.createElement(Ai, null, t(u(u({}, c), {}, {
1708
+ }, [o]), /* @__PURE__ */ s.createElement(_i, null, t(u(u({}, c), {}, {
1703
1709
  open: o
1704
1710
  })));
1705
1711
  });
1706
- La.displayName = "Dropzone";
1707
- var bi = {
1712
+ ja.displayName = "Dropzone";
1713
+ var yi = {
1708
1714
  disabled: !1,
1709
- getFilesFromEvent: Ki,
1715
+ getFilesFromEvent: Bi,
1710
1716
  maxSize: 1 / 0,
1711
1717
  minSize: 0,
1712
1718
  multiple: !0,
@@ -1720,8 +1726,8 @@ var bi = {
1720
1726
  useFsAccessApi: !1,
1721
1727
  autoFocus: !1
1722
1728
  };
1723
- La.defaultProps = bi;
1724
- La.propTypes = {
1729
+ ja.defaultProps = yi;
1730
+ ja.propTypes = {
1725
1731
  /**
1726
1732
  * Render function that exposes the dropzone state and prop getter fns
1727
1733
  *
@@ -1889,7 +1895,7 @@ La.propTypes = {
1889
1895
  */
1890
1896
  validator: d.func
1891
1897
  };
1892
- var Ca = {
1898
+ var $a = {
1893
1899
  isFocused: !1,
1894
1900
  isFileDialogActive: !1,
1895
1901
  isDragActive: !1,
@@ -1898,16 +1904,16 @@ var Ca = {
1898
1904
  acceptedFiles: [],
1899
1905
  fileRejections: []
1900
1906
  };
1901
- function hi() {
1902
- var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = u(u({}, bi), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, c = i.minSize, r = i.multiple, f = i.maxFiles, h = i.onDragEnter, x = i.onDragLeave, k = i.onDragOver, P = i.onDrop, R = i.onDropAccepted, j = i.onDropRejected, I = i.onFileDialogCancel, q = i.onFileDialogOpen, ea = i.useFsAccessApi, na = i.autoFocus, Z = i.preventDropOnDocument, D = i.noClick, S = i.noKeyboard, W = i.noDrag, z = i.noDragEventsBubbling, J = i.onError, C = i.validator, L = V(function() {
1903
- return vt(t);
1907
+ function wi() {
1908
+ var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = u(u({}, yi), a), t = i.accept, e = i.disabled, n = i.getFilesFromEvent, o = i.maxSize, c = i.minSize, r = i.multiple, v = i.maxFiles, h = i.onDragEnter, x = i.onDragLeave, k = i.onDragOver, P = i.onDrop, R = i.onDropAccepted, j = i.onDropRejected, I = i.onFileDialogCancel, T = i.onFileDialogOpen, ea = i.useFsAccessApi, na = i.autoFocus, Z = i.preventDropOnDocument, D = i.noClick, S = i.noKeyboard, W = i.noDrag, z = i.noDragEventsBubbling, J = i.onError, C = i.validator, L = V(function() {
1909
+ return yt(t);
1904
1910
  }, [t]), pa = V(function() {
1905
- return ft(t);
1911
+ return ht(t);
1906
1912
  }, [t]), X = V(function() {
1907
- return typeof q == "function" ? q : pi;
1908
- }, [q]), $ = V(function() {
1909
- return typeof I == "function" ? I : pi;
1910
- }, [I]), b = fa(null), y = fa(null), oa = Fi(_t, Ca), ca = Ia(oa, 2), A = ca[0], m = ca[1], F = A.isFocused, la = A.isFileDialogActive, B = fa(typeof window < "u" && window.isSecureContext && ea && ut()), Q = function() {
1913
+ return typeof T == "function" ? T : ci;
1914
+ }, [T]), $ = V(function() {
1915
+ return typeof I == "function" ? I : ci;
1916
+ }, [I]), b = va(null), y = va(null), oa = Fi(qt, $a), ca = Sa(oa, 2), A = ca[0], m = ca[1], F = A.isFocused, la = A.isFileDialogActive, B = va(typeof window < "u" && window.isSecureContext && ea && bt()), Q = function() {
1911
1917
  !B.current && la && setTimeout(function() {
1912
1918
  if (y.current) {
1913
1919
  var l = y.current.files;
@@ -1922,12 +1928,12 @@ function hi() {
1922
1928
  window.removeEventListener("focus", Q, !1);
1923
1929
  };
1924
1930
  }, [y, la, $, B]);
1925
- var T = fa([]), $a = function(l) {
1926
- b.current && b.current.contains(l.target) || (l.preventDefault(), T.current = []);
1931
+ var q = va([]), Ma = function(l) {
1932
+ b.current && b.current.contains(l.target) || (l.preventDefault(), q.current = []);
1927
1933
  };
1928
1934
  ia(function() {
1929
- return Z && (document.addEventListener("dragover", ei, !1), document.addEventListener("drop", $a, !1)), function() {
1930
- Z && (document.removeEventListener("dragover", ei), document.removeEventListener("drop", $a));
1935
+ return Z && (document.addEventListener("dragover", pi, !1), document.addEventListener("drop", Ma, !1)), function() {
1936
+ Z && (document.removeEventListener("dragover", pi), document.removeEventListener("drop", Ma));
1931
1937
  };
1932
1938
  }, [b, Z]), ia(function() {
1933
1939
  return !e && na && b.current && b.current.focus(), function() {
@@ -1935,18 +1941,18 @@ function hi() {
1935
1941
  }, [b, na, e]);
1936
1942
  var M = E(function(p) {
1937
1943
  J ? J(p) : console.error(p);
1938
- }, [J]), Ma = E(function(p) {
1939
- p.preventDefault(), p.persist(), ma(p), T.current = [].concat(kt(T.current), [p.target]), va(p) && Promise.resolve(n(p)).then(function(l) {
1940
- if (!(ha(p) && !z)) {
1941
- var v = l.length, g = v > 0 && rt({
1944
+ }, [J]), Ka = E(function(p) {
1945
+ p.preventDefault(), p.persist(), ma(p), q.current = [].concat(At(q.current), [p.target]), xa(p) && Promise.resolve(n(p)).then(function(l) {
1946
+ if (!(ya(p) && !z)) {
1947
+ var f = l.length, g = f > 0 && vt({
1942
1948
  files: l,
1943
1949
  accept: L,
1944
1950
  minSize: c,
1945
1951
  maxSize: o,
1946
1952
  multiple: r,
1947
- maxFiles: f,
1953
+ maxFiles: v,
1948
1954
  validator: C
1949
- }), w = v > 0 && !g;
1955
+ }), w = f > 0 && !g;
1950
1956
  m({
1951
1957
  isDragAccept: g,
1952
1958
  isDragReject: w,
@@ -1957,55 +1963,55 @@ function hi() {
1957
1963
  }).catch(function(l) {
1958
1964
  return M(l);
1959
1965
  });
1960
- }, [n, h, M, z, L, c, o, r, f, C]), Ka = E(function(p) {
1966
+ }, [n, h, M, z, L, c, o, r, v, C]), Ha = E(function(p) {
1961
1967
  p.preventDefault(), p.persist(), ma(p);
1962
- var l = va(p);
1968
+ var l = xa(p);
1963
1969
  if (l && p.dataTransfer)
1964
1970
  try {
1965
1971
  p.dataTransfer.dropEffect = "copy";
1966
1972
  } catch {
1967
1973
  }
1968
1974
  return l && k && k(p), !1;
1969
- }, [k, z]), Ha = E(function(p) {
1975
+ }, [k, z]), Wa = E(function(p) {
1970
1976
  p.preventDefault(), p.persist(), ma(p);
1971
- var l = T.current.filter(function(g) {
1977
+ var l = q.current.filter(function(g) {
1972
1978
  return b.current && b.current.contains(g);
1973
- }), v = l.indexOf(p.target);
1974
- v !== -1 && l.splice(v, 1), T.current = l, !(l.length > 0) && (m({
1979
+ }), f = l.indexOf(p.target);
1980
+ f !== -1 && l.splice(f, 1), q.current = l, !(l.length > 0) && (m({
1975
1981
  type: "setDraggedFiles",
1976
1982
  isDragActive: !1,
1977
1983
  isDragAccept: !1,
1978
1984
  isDragReject: !1
1979
- }), va(p) && x && x(p));
1985
+ }), xa(p) && x && x(p));
1980
1986
  }, [b, x, z]), ra = E(function(p, l) {
1981
- var v = [], g = [];
1987
+ var f = [], g = [];
1982
1988
  p.forEach(function(w) {
1983
- var aa = ui(w, L), Y = Ia(aa, 2), ja = Y[0], Da = Y[1], Ea = fi(w, c, o), ua = Ia(Ea, 2), za = ua[0], Aa = ua[1], Fa = C ? C(w) : null;
1984
- if (ja && za && !Fa)
1985
- v.push(w);
1989
+ var aa = fi(w, L), Y = Sa(aa, 2), Ea = Y[0], za = Y[1], Aa = xi(w, c, o), ua = Sa(Aa, 2), Fa = ua[0], Oa = ua[1], _a = C ? C(w) : null;
1990
+ if (Ea && Fa && !_a)
1991
+ f.push(w);
1986
1992
  else {
1987
- var Oa = [Da, Aa];
1988
- Fa && (Oa = Oa.concat(Fa)), g.push({
1993
+ var Pa = [za, Oa];
1994
+ _a && (Pa = Pa.concat(_a)), g.push({
1989
1995
  file: w,
1990
- errors: Oa.filter(function(Di) {
1991
- return Di;
1996
+ errors: Pa.filter(function(zi) {
1997
+ return zi;
1992
1998
  })
1993
1999
  });
1994
2000
  }
1995
- }), (!r && v.length > 1 || r && f >= 1 && v.length > f) && (v.forEach(function(w) {
2001
+ }), (!r && f.length > 1 || r && v >= 1 && f.length > v) && (f.forEach(function(w) {
1996
2002
  g.push({
1997
2003
  file: w,
1998
- errors: [lt]
2004
+ errors: [ut]
1999
2005
  });
2000
- }), v.splice(0)), m({
2001
- acceptedFiles: v,
2006
+ }), f.splice(0)), m({
2007
+ acceptedFiles: f,
2002
2008
  fileRejections: g,
2003
2009
  isDragReject: g.length > 0,
2004
2010
  type: "setFiles"
2005
- }), P && P(v, g, l), g.length > 0 && j && j(g, l), v.length > 0 && R && R(v, l);
2006
- }, [m, r, L, c, o, f, P, R, j, C]), sa = E(function(p) {
2007
- p.preventDefault(), p.persist(), ma(p), T.current = [], va(p) && Promise.resolve(n(p)).then(function(l) {
2008
- ha(p) && !z || ra(l, p);
2011
+ }), P && P(f, g, l), g.length > 0 && j && j(g, l), f.length > 0 && R && R(f, l);
2012
+ }, [m, r, L, c, o, v, P, R, j, C]), sa = E(function(p) {
2013
+ p.preventDefault(), p.persist(), ma(p), q.current = [], xa(p) && Promise.resolve(n(p)).then(function(l) {
2014
+ ya(p) && !z || ra(l, p);
2009
2015
  }).catch(function(l) {
2010
2016
  return M(l);
2011
2017
  }), m({
@@ -2027,57 +2033,57 @@ function hi() {
2027
2033
  type: "closeDialog"
2028
2034
  });
2029
2035
  }).catch(function(l) {
2030
- xt(l) ? ($(l), m({
2036
+ wt(l) ? ($(l), m({
2031
2037
  type: "closeDialog"
2032
- })) : gt(l) ? (B.current = !1, y.current ? (y.current.value = null, y.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
2038
+ })) : kt(l) ? (B.current = !1, y.current ? (y.current.value = null, y.current.click()) : M(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : M(l);
2033
2039
  });
2034
2040
  return;
2035
2041
  }
2036
2042
  y.current && (m({
2037
2043
  type: "openDialog"
2038
2044
  }), X(), y.current.value = null, y.current.click());
2039
- }, [m, X, $, ea, ra, M, pa, r]), Wa = E(function(p) {
2045
+ }, [m, X, $, ea, ra, M, pa, r]), Ba = E(function(p) {
2040
2046
  !b.current || !b.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), N());
2041
- }, [b, N]), Ba = E(function() {
2047
+ }, [b, N]), Na = E(function() {
2042
2048
  m({
2043
2049
  type: "focus"
2044
2050
  });
2045
- }, []), Na = E(function() {
2051
+ }, []), Ua = E(function() {
2046
2052
  m({
2047
2053
  type: "blur"
2048
2054
  });
2049
- }, []), Ua = E(function() {
2050
- D || (mt() ? setTimeout(N, 0) : N());
2055
+ }, []), Ya = E(function() {
2056
+ D || (gt() ? setTimeout(N, 0) : N());
2051
2057
  }, [D, N]), U = function(l) {
2052
2058
  return e ? null : l;
2053
- }, ka = function(l) {
2059
+ }, Da = function(l) {
2054
2060
  return S ? null : U(l);
2055
2061
  }, da = function(l) {
2056
2062
  return W ? null : U(l);
2057
2063
  }, ma = function(l) {
2058
2064
  z && l.stopPropagation();
2059
- }, wi = V(function() {
2065
+ }, ji = V(function() {
2060
2066
  return function() {
2061
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.role, w = p.onKeyDown, aa = p.onFocus, Y = p.onBlur, ja = p.onClick, Da = p.onDragEnter, Ea = p.onDragOver, ua = p.onDragLeave, za = p.onDrop, Aa = ya(p, yt);
2062
- return u(u(qa({
2063
- onKeyDown: ka(O(w, Wa)),
2064
- onFocus: ka(O(aa, Ba)),
2065
- onBlur: ka(O(Y, Na)),
2066
- onClick: U(O(ja, Ua)),
2067
- onDragEnter: da(O(Da, Ma)),
2068
- onDragOver: da(O(Ea, Ka)),
2069
- onDragLeave: da(O(ua, Ha)),
2070
- onDrop: da(O(za, sa)),
2067
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.role, w = p.onKeyDown, aa = p.onFocus, Y = p.onBlur, Ea = p.onClick, za = p.onDragEnter, Aa = p.onDragOver, ua = p.onDragLeave, Fa = p.onDrop, Oa = wa(p, Et);
2068
+ return u(u(La({
2069
+ onKeyDown: Da(O(w, Ba)),
2070
+ onFocus: Da(O(aa, Na)),
2071
+ onBlur: Da(O(Y, Ua)),
2072
+ onClick: U(O(Ea, Ya)),
2073
+ onDragEnter: da(O(za, Ka)),
2074
+ onDragOver: da(O(Aa, Ha)),
2075
+ onDragLeave: da(O(ua, Wa)),
2076
+ onDrop: da(O(Fa, sa)),
2071
2077
  role: typeof g == "string" && g !== "" ? g : "presentation"
2072
- }, v, b), !e && !S ? {
2078
+ }, f, b), !e && !S ? {
2073
2079
  tabIndex: 0
2074
- } : {}), Aa);
2080
+ } : {}), Oa);
2075
2081
  };
2076
- }, [b, Wa, Ba, Na, Ua, Ma, Ka, Ha, sa, S, W, e]), ki = E(function(p) {
2082
+ }, [b, Ba, Na, Ua, Ya, Ka, Ha, Wa, sa, S, W, e]), Di = E(function(p) {
2077
2083
  p.stopPropagation();
2078
- }, []), ji = V(function() {
2084
+ }, []), Ei = V(function() {
2079
2085
  return function() {
2080
- var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, v = l === void 0 ? "ref" : l, g = p.onChange, w = p.onClick, aa = ya(p, wt), Y = qa({
2086
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, l = p.refKey, f = l === void 0 ? "ref" : l, g = p.onChange, w = p.onClick, aa = wa(p, zt), Y = La({
2081
2087
  accept: L,
2082
2088
  multiple: r,
2083
2089
  type: "file",
@@ -2094,22 +2100,22 @@ function hi() {
2094
2100
  whiteSpace: "nowrap"
2095
2101
  },
2096
2102
  onChange: U(O(g, sa)),
2097
- onClick: U(O(w, ki)),
2103
+ onClick: U(O(w, Di)),
2098
2104
  tabIndex: -1
2099
- }, v, y);
2105
+ }, f, y);
2100
2106
  return u(u({}, Y), aa);
2101
2107
  };
2102
2108
  }, [y, t, r, sa, e]);
2103
2109
  return u(u({}, A), {}, {
2104
2110
  isFocused: F && !e,
2105
- getRootProps: wi,
2106
- getInputProps: ji,
2111
+ getRootProps: ji,
2112
+ getInputProps: Ei,
2107
2113
  rootRef: b,
2108
2114
  inputRef: y,
2109
2115
  open: U(N)
2110
2116
  });
2111
2117
  }
2112
- function _t(a, i) {
2118
+ function qt(a, i) {
2113
2119
  switch (i.type) {
2114
2120
  case "focus":
2115
2121
  return u(u({}, a), {}, {
@@ -2120,7 +2126,7 @@ function _t(a, i) {
2120
2126
  isFocused: !1
2121
2127
  });
2122
2128
  case "openDialog":
2123
- return u(u({}, Ca), {}, {
2129
+ return u(u({}, $a), {}, {
2124
2130
  isFileDialogActive: !0
2125
2131
  });
2126
2132
  case "closeDialog":
@@ -2140,19 +2146,19 @@ function _t(a, i) {
2140
2146
  isDragReject: i.isDragReject
2141
2147
  });
2142
2148
  case "reset":
2143
- return u({}, Ca);
2149
+ return u({}, $a);
2144
2150
  default:
2145
2151
  return a;
2146
2152
  }
2147
2153
  }
2148
- function pi() {
2154
+ function ci() {
2149
2155
  }
2150
- const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2151
- ({ disabled: a, isDragAccept: i, isDragReject: t }) => _a`
2156
+ const Tt = ka.divBox.withConfig({ shouldForwardProp: Ii })(
2157
+ ({ disabled: a, isDragAccept: i, isDragReject: t }) => Ia`
2152
2158
  ${_("defaultFields.default")};
2153
2159
  ${_("fileDrops.default")};
2154
2160
  ${i && _("fileDrops.dragAccept")};
2155
- ${t && _a`
2161
+ ${t && Ia`
2156
2162
  border-color: ${_("defaultFields.variants.danger.borderColor")};
2157
2163
  ${_("fileDrops.dragReject")}
2158
2164
  `};
@@ -2167,43 +2173,43 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2167
2173
  ${_("defaultFields.focused.default")};
2168
2174
  }
2169
2175
 
2170
- ${a && _a`
2176
+ ${a && Ia`
2171
2177
  ${_("defaultFields.disabled")};
2172
2178
  ${_("fileDrops.disabled")};
2173
2179
  `};
2174
2180
  `
2175
- ), It = wa.div`
2181
+ ), Ct = ka.div`
2176
2182
  width: 100%;
2177
2183
  height: 100%;
2178
2184
  display: flex;
2179
2185
  flex-direction: column;
2180
2186
  align-items: center;
2181
2187
  justify-content: center;
2182
- `, yi = wa.imgBox`
2188
+ `, ki = ka.imgBox`
2183
2189
  max-height: 100%;
2184
2190
  max-width: 100%;
2185
2191
  object-fit: contain;
2186
- `, Rt = wa.div`
2192
+ `, Lt = ka.div`
2187
2193
  position: absolute;
2188
2194
  top: ${_.space("md")};
2189
2195
  right: ${_.space("md")};
2190
2196
  display: flex;
2191
2197
  gap: xs;
2192
- `, oi = ({
2198
+ `, li = ({
2193
2199
  disabled: a,
2194
2200
  fileButtonText: i = "Browse file",
2195
2201
  hint: t = "Drag & drop a file here or",
2196
2202
  openFile: e,
2197
2203
  title: n = "Add file"
2198
- }) => /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", m: "0", variant: "h4" }, n), /* @__PURE__ */ s.createElement(xa, { color: "beige-70", m: "0", mt: "xs", variant: "sm" }, t), /* @__PURE__ */ s.createElement(ga, { disabled: a, mt: "lg", onClick: e, type: "button" }, i)), St = ({
2204
+ }) => /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(ga, { color: "neutral-90", m: "0", variant: "h4" }, n), /* @__PURE__ */ s.createElement(ga, { color: "beige-70", m: "0", mt: "xs", variant: "sm" }, t), /* @__PURE__ */ s.createElement(ba, { disabled: a, mt: "lg", onClick: e, type: "button" }, i)), $t = ({
2199
2205
  file: a,
2200
2206
  fileName: i,
2201
2207
  forceFileType: t,
2202
2208
  previewButtonText: e = "Preview"
2203
2209
  }) => {
2204
- const n = typeof a == "string", o = Ii(a, t), c = a instanceof File ? Ri(a) : null, r = n && i ? i : li(a);
2205
- return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }), /* @__PURE__ */ s.createElement(xa, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4" }, r), !n && /* @__PURE__ */ s.createElement(xa, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm" }, c), n && /* @__PURE__ */ s.createElement(ga, { as: "a", href: a, mt: "md", rel: "noopener", size: "sm", target: "_blank" }, /* @__PURE__ */ s.createElement("span", null, e), /* @__PURE__ */ s.createElement(Pi, null)));
2206
- }, Tt = ({
2210
+ const n = typeof a == "string", o = qi(a, t), c = a instanceof File ? Ti(a) : null, r = n && i ? i : si(a);
2211
+ return /* @__PURE__ */ s.createElement(s.Fragment, null, /* @__PURE__ */ s.createElement(o, { color: "neutral-90", h: 50, mb: "lg", w: 50 }), /* @__PURE__ */ s.createElement(ga, { color: "neutral-90", lines: 1, m: 0, maxWidth: 600, variant: "h4" }, r), !n && /* @__PURE__ */ s.createElement(ga, { color: "beige-70", fontWeight: "medium", lines: 1, m: 0, variant: "sm" }, c), n && /* @__PURE__ */ s.createElement(ba, { as: "a", href: a, mt: "md", rel: "noopener", size: "sm", target: "_blank" }, /* @__PURE__ */ s.createElement("span", null, e), /* @__PURE__ */ s.createElement(Si, null)));
2212
+ }, Mt = ({
2207
2213
  disabled: a,
2208
2214
  error: i,
2209
2215
  file: t,
@@ -2212,10 +2218,10 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2212
2218
  forceFileType: o,
2213
2219
  isAnImage: c,
2214
2220
  isHoverAccept: r,
2215
- isHoverReject: f,
2221
+ isHoverReject: v,
2216
2222
  openFile: h,
2217
2223
  wordings: x
2218
- }) => r ? /* @__PURE__ */ s.createElement(Si, null) : f ? /* @__PURE__ */ s.createElement(Ti, null) : i ? /* @__PURE__ */ s.createElement(oi, { openFile: h, ...x }) : n ? c ? /* @__PURE__ */ s.createElement(yi, { src: n }) : /* @__PURE__ */ s.createElement(St, { file: t, fileName: e, forceFileType: o, ...x }) : /* @__PURE__ */ s.createElement(oi, { disabled: a, openFile: h, ...x }), ci = /\.(jpeg|jpg|gif|png|webp)$/, qt = (a) => a ? typeof a == "string" ? !!li(a).match(ci) : a.name ? !!a.name.match(ci) : !1 : !1, Ct = (a) => {
2224
+ }) => r ? /* @__PURE__ */ s.createElement(Ci, null) : v ? /* @__PURE__ */ s.createElement(Li, null) : i ? /* @__PURE__ */ s.createElement(li, { openFile: h, ...x }) : n ? c ? /* @__PURE__ */ s.createElement(ki, { src: n }) : /* @__PURE__ */ s.createElement($t, { file: t, fileName: e, forceFileType: o, ...x }) : /* @__PURE__ */ s.createElement(li, { disabled: a, openFile: h, ...x }), ri = /\.(jpeg|jpg|gif|png|webp)$/, Kt = (a) => a ? typeof a == "string" ? !!si(a).match(ri) : a.name ? !!a.name.match(ri) : !1 : !1, Ht = (a) => {
2219
2225
  let i;
2220
2226
  if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
2221
2227
  return i;
@@ -2225,52 +2231,52 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2225
2231
  } catch {
2226
2232
  return;
2227
2233
  }
2228
- }, Lt = hi, $t = 2e6, Mt = "ERROR_INVALID_TYPE", Kt = "ERROR_INVALID_SIZE", Ht = _i(
2234
+ }, Wt = wi || ja.useDropzone, Bt = 2e6, Nt = "ERROR_INVALID_TYPE", Ut = "ERROR_INVALID_SIZE", Yt = Ri(
2229
2235
  ({
2230
2236
  accept: a = {
2231
2237
  "image/*": []
2232
2238
  },
2233
- children: i = Tt,
2239
+ children: i = Mt,
2234
2240
  dataTestId: t,
2235
2241
  disabled: e,
2236
2242
  fileName: n,
2237
2243
  forceFileType: o,
2238
2244
  handleAddFile: c,
2239
2245
  handleRemoveFile: r,
2240
- isClearable: f,
2246
+ isClearable: v,
2241
2247
  isEditable: h,
2242
- maxSize: x = $t,
2248
+ maxSize: x = Bt,
2243
2249
  multiple: k,
2244
2250
  name: P,
2245
2251
  onBlur: R,
2246
2252
  onChange: j,
2247
2253
  onError: I,
2248
- value: q,
2254
+ value: T,
2249
2255
  wordings: ea,
2250
2256
  ...na
2251
2257
  }, Z) => {
2252
- const [D, S] = Ya(q), [W, z] = Ya(void 0);
2258
+ const [D, S] = Va(T), [W, z] = Va(void 0);
2253
2259
  ia(() => {
2254
- S(q);
2255
- }, [q]), ia(() => () => D && D instanceof File && URL.revokeObjectURL(D.preview), [D]);
2260
+ S(T);
2261
+ }, [T]), ia(() => () => D && D instanceof File && URL.revokeObjectURL(D.preview), [D]);
2256
2262
  const J = (A) => {
2257
2263
  const [m] = A;
2258
2264
  m instanceof File && (m.preview = URL.createObjectURL(m)), S(m), z(null);
2259
- const F = Va({ name: P, value: m });
2265
+ const F = Ga({ name: P, value: m });
2260
2266
  j && j(F), c && c(F);
2261
2267
  }, C = (A, m) => {
2262
2268
  let F;
2263
2269
  A.map(({ errors: la }) => {
2264
2270
  la.map((B) => {
2265
- const { code: Q, message: T } = B;
2266
- Q === "file-invalid-type" ? F = Mt : Q === "file-too-large" ? F = Kt : F = T;
2271
+ const { code: Q, message: q } = B;
2272
+ Q === "file-invalid-type" ? F = Nt : Q === "file-too-large" ? F = Ut : F = q;
2267
2273
  });
2268
2274
  }), S(null), z(F), I && I(F), j && j(m), R && R();
2269
2275
  }, L = (A) => {
2270
2276
  A.preventDefault(), S(null), z(null);
2271
- const m = Va({ name: P, value: null });
2277
+ const m = Ga({ name: P, value: null });
2272
2278
  j && j(m), r && r(m);
2273
- }, { getInputProps: pa, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: y, open: oa } = Lt({
2279
+ }, { getInputProps: pa, getRootProps: X, isDragAccept: $, isDragActive: b, isDragReject: y, open: oa } = Wt({
2274
2280
  accept: a,
2275
2281
  disabled: e,
2276
2282
  maxSize: x,
@@ -2280,7 +2286,7 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2280
2286
  onDropRejected: C
2281
2287
  }), ca = (A) => I(A);
2282
2288
  return /* @__PURE__ */ s.createElement(
2283
- Pt,
2289
+ Tt,
2284
2290
  {
2285
2291
  ...X({
2286
2292
  "data-testid": t,
@@ -2289,7 +2295,7 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2289
2295
  isDragActive: b,
2290
2296
  isDragAccept: $,
2291
2297
  isDragReject: y,
2292
- isClearable: f,
2298
+ isClearable: v,
2293
2299
  disabled: e,
2294
2300
  ref: Z
2295
2301
  }),
@@ -2302,25 +2308,25 @@ const Pt = wa.divBox.withConfig({ shouldForwardProp: Oi })(
2302
2308
  style: { display: "block", opacity: 0, height: 0, width: 0 }
2303
2309
  }
2304
2310
  ),
2305
- /* @__PURE__ */ s.createElement(It, null, i({
2311
+ /* @__PURE__ */ s.createElement(Ct, null, i({
2306
2312
  disabled: e,
2307
2313
  error: W,
2308
2314
  file: D,
2309
2315
  fileName: n,
2310
- fileUrl: D && Ct(D),
2316
+ fileUrl: D && Ht(D),
2311
2317
  forceFileType: o,
2312
- isAnImage: o === "image" || qt(D),
2318
+ isAnImage: o === "image" || Kt(D),
2313
2319
  isHoverAccept: $,
2314
2320
  isHoverReject: y,
2315
2321
  openFile: oa,
2316
2322
  wordings: ea
2317
- }), !!D && (W || h || f) && /* @__PURE__ */ s.createElement(Rt, null, (W || h) && /* @__PURE__ */ s.createElement(ga, { onClick: oa, shape: "circle", size: "sm", type: "button", variant: "tertiary" }, /* @__PURE__ */ s.createElement(qi, null)), f && /* @__PURE__ */ s.createElement(ga, { danger: !0, onClick: L, shape: "circle", size: "sm", type: "button" }, /* @__PURE__ */ s.createElement(Ci, null))))
2323
+ }), !!D && (W || h || v) && /* @__PURE__ */ s.createElement(Lt, null, (W || h) && /* @__PURE__ */ s.createElement(ba, { onClick: oa, shape: "circle", size: "sm", type: "button", variant: "tertiary" }, /* @__PURE__ */ s.createElement($i, null)), v && /* @__PURE__ */ s.createElement(ba, { danger: !0, onClick: L, shape: "circle", size: "sm", type: "button" }, /* @__PURE__ */ s.createElement(Mi, null))))
2318
2324
  );
2319
2325
  }
2320
2326
  );
2321
- Ht.displayName = "FileDrop";
2322
- const ae = yi;
2327
+ Yt.displayName = "FileDrop";
2328
+ const oe = ki;
2323
2329
  export {
2324
- Ht as FileDrop,
2325
- ae as ImagePreview
2330
+ Yt as FileDrop,
2331
+ oe as ImagePreview
2326
2332
  };