welcome-ui 10.0.0-alpha.13 → 10.0.0-alpha.15

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 (32) hide show
  1. package/dist/7PRQYBBV-D9IY4qtU.js +14 -0
  2. package/dist/Alert.js +34 -34
  3. package/dist/{B7UTNDHN-BghjolIs.js → B7UTNDHN-DDN2hpM5.js} +18 -28
  4. package/dist/DropdownMenu.js +17 -16
  5. package/dist/Field.js +7 -7
  6. package/dist/FileDrop.css +1 -1
  7. package/dist/FileDrop.js +310 -295
  8. package/dist/Icon.js +6 -4
  9. package/dist/Modal.js +1 -1
  10. package/dist/NSTBQJLB-C_1-awKs.js +173 -0
  11. package/dist/OLVWQA7U-UYYsJnlv.js +20 -0
  12. package/dist/RadioGroup.js +1 -1
  13. package/dist/Tabs.js +167 -367
  14. package/dist/Window.css +1 -0
  15. package/dist/Window.js +106 -0
  16. package/dist/tab-panel-B8NigruF.js +216 -0
  17. package/dist/types/components/Alert/components/Buttons.d.ts +2 -2
  18. package/dist/types/components/Alert/index.d.ts +2 -2
  19. package/dist/types/components/FileDrop/components/Message.d.ts +1 -1
  20. package/dist/types/components/FileDrop/types.d.ts +5 -0
  21. package/dist/types/components/Icon/icons.d.ts +2 -2
  22. package/dist/types/components/Tabs/utils.d.ts +1 -1
  23. package/dist/types/components/Window/components/Body.d.ts +3 -0
  24. package/dist/types/components/Window/components/BoxText.d.ts +3 -0
  25. package/dist/types/components/Window/components/Header.d.ts +13 -0
  26. package/dist/types/components/Window/components/Media.d.ts +3 -0
  27. package/dist/types/components/Window/components/TabPanel.d.ts +1 -0
  28. package/dist/types/components/Window/index.d.ts +22 -0
  29. package/dist/types/components/Window/index.test.d.ts +1 -0
  30. package/dist/types/components/Window/types.d.ts +48 -0
  31. package/package.json +1 -1
  32. package/dist/OLVWQA7U-Dia3UUnG.js +0 -187
package/dist/FileDrop.js CHANGED
@@ -1,14 +1,14 @@
1
1
  "use client";
2
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";
3
+ import { jsxs as L, Fragment as vi, jsx as m } from "react/jsx-runtime";
4
+ import Si, { useMemo as J, useRef as xa, useReducer as qi, useEffect as ta, useCallback as _, forwardRef as fi, useImperativeHandle as Ti, Fragment as Li, useState as Qa } from "react";
5
+ import { _ as B, P as s } from "./tslib.es6-C80jYMbM.js";
6
+ import { g as Ci, c as Aa } from "./index-PAaZGbyz.js";
7
+ import { Button as ja } from "./Button.js";
8
+ import { Icon as U } from "./Icon.js";
9
9
  import { c as ai } from "./create-event-rXDe5aCQ.js";
10
10
  import { g as Mi, a as Ni, b as xi } from "./index-DmEMuVTM.js";
11
- import { Text as wa } from "./Text.js";
11
+ import { Text as Da } from "./Text.js";
12
12
  const $i = /* @__PURE__ */ new Map([
13
13
  // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
14
14
  ["1km", "application/vnd.1000minds.decision-model+xml"],
@@ -1245,43 +1245,43 @@ const Hi = [
1245
1245
  // Windows
1246
1246
  ];
1247
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) : [];
1248
+ return B(this, void 0, void 0, function* () {
1249
+ return za(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) : [];
1250
1250
  });
1251
1251
  }
1252
1252
  function Ui(a) {
1253
- return ka(a);
1253
+ return za(a);
1254
1254
  }
1255
1255
  function Bi(a) {
1256
- return ka(a) && ka(a.target);
1256
+ return za(a) && za(a.target);
1257
1257
  }
1258
- function ka(a) {
1258
+ function za(a) {
1259
1259
  return typeof a == "object" && a !== null;
1260
1260
  }
1261
1261
  function Yi(a) {
1262
- return Ma(a.target.files).map((i) => X(i));
1262
+ return $a(a.target.files).map((i) => X(i));
1263
1263
  }
1264
1264
  function Vi(a) {
1265
- return K(this, void 0, void 0, function* () {
1265
+ return B(this, void 0, void 0, function* () {
1266
1266
  return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => X(t));
1267
1267
  });
1268
1268
  }
1269
1269
  function Gi(a, i) {
1270
- return K(this, void 0, void 0, function* () {
1270
+ return B(this, void 0, void 0, function* () {
1271
1271
  if (a.items) {
1272
- const t = Ma(a.items).filter((n) => n.kind === "file");
1272
+ const t = $a(a.items).filter((n) => n.kind === "file");
1273
1273
  if (i !== "drop")
1274
1274
  return t;
1275
1275
  const e = yield Promise.all(t.map(Zi));
1276
1276
  return ti(gi(e));
1277
1277
  }
1278
- return ti(Ma(a.files).map((t) => X(t)));
1278
+ return ti($a(a.files).map((t) => X(t)));
1279
1279
  });
1280
1280
  }
1281
1281
  function ti(a) {
1282
1282
  return a.filter((i) => Hi.indexOf(i.name) === -1);
1283
1283
  }
1284
- function Ma(a) {
1284
+ function $a(a) {
1285
1285
  if (a === null)
1286
1286
  return [];
1287
1287
  const i = [];
@@ -1306,7 +1306,7 @@ function gi(a) {
1306
1306
  function ei(a, i) {
1307
1307
  var t;
1308
1308
  if (typeof a.getAsFileSystemHandle == "function")
1309
- return a.getAsFileSystemHandle().then((o) => K(this, void 0, void 0, function* () {
1309
+ return a.getAsFileSystemHandle().then((o) => B(this, void 0, void 0, function* () {
1310
1310
  const l = yield o.getFile();
1311
1311
  return l.handle = o, X(l);
1312
1312
  }));
@@ -1317,7 +1317,7 @@ function ei(a, i) {
1317
1317
  return Promise.resolve(n);
1318
1318
  }
1319
1319
  function Ji(a) {
1320
- return K(this, void 0, void 0, function* () {
1320
+ return B(this, void 0, void 0, function* () {
1321
1321
  return a.isDirectory ? bi(a) : Xi(a);
1322
1322
  });
1323
1323
  }
@@ -1326,7 +1326,7 @@ function bi(a) {
1326
1326
  return new Promise((t, e) => {
1327
1327
  const n = [];
1328
1328
  function o() {
1329
- i.readEntries((l) => K(this, void 0, void 0, function* () {
1329
+ i.readEntries((l) => B(this, void 0, void 0, function* () {
1330
1330
  if (l.length) {
1331
1331
  const r = Promise.all(l.map(Ji));
1332
1332
  n.push(r), o();
@@ -1345,7 +1345,7 @@ function bi(a) {
1345
1345
  });
1346
1346
  }
1347
1347
  function Xi(a) {
1348
- return K(this, void 0, void 0, function* () {
1348
+ return B(this, void 0, void 0, function* () {
1349
1349
  return new Promise((i, t) => {
1350
1350
  a.file((e) => {
1351
1351
  const n = X(e, a.fullPath);
@@ -1356,9 +1356,9 @@ function Xi(a) {
1356
1356
  });
1357
1357
  });
1358
1358
  }
1359
- var xa = {}, ni;
1359
+ var ga = {}, ni;
1360
1360
  function Qi() {
1361
- return ni || (ni = 1, xa.__esModule = !0, xa.default = function(a, i) {
1361
+ return ni || (ni = 1, ga.__esModule = !0, ga.default = function(a, i) {
1362
1362
  if (a && i) {
1363
1363
  var t = Array.isArray(i) ? i : i.split(",");
1364
1364
  if (t.length === 0)
@@ -1370,10 +1370,10 @@ function Qi() {
1370
1370
  });
1371
1371
  }
1372
1372
  return !0;
1373
- }), xa;
1373
+ }), ga;
1374
1374
  }
1375
1375
  var at = Qi();
1376
- const Ta = /* @__PURE__ */ Ci(at);
1376
+ const Ma = /* @__PURE__ */ Ci(at);
1377
1377
  function pi(a) {
1378
1378
  return et(a) || tt(a) || yi(a) || it();
1379
1379
  }
@@ -1385,7 +1385,7 @@ function tt(a) {
1385
1385
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1386
1386
  }
1387
1387
  function et(a) {
1388
- if (Array.isArray(a)) return Na(a);
1388
+ if (Array.isArray(a)) return Ka(a);
1389
1389
  }
1390
1390
  function oi(a, i) {
1391
1391
  var t = Object.keys(a);
@@ -1411,7 +1411,7 @@ function ci(a) {
1411
1411
  function hi(a, i, t) {
1412
1412
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1413
1413
  }
1414
- function oa(a, i) {
1414
+ function ea(a, i) {
1415
1415
  return ot(a) || pt(a, i) || yi(a, i) || nt();
1416
1416
  }
1417
1417
  function nt() {
@@ -1420,13 +1420,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1420
1420
  }
1421
1421
  function yi(a, i) {
1422
1422
  if (a) {
1423
- if (typeof a == "string") return Na(a, i);
1423
+ if (typeof a == "string") return Ka(a, i);
1424
1424
  var t = Object.prototype.toString.call(a).slice(8, -1);
1425
1425
  if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1426
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Na(a, i);
1426
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ka(a, i);
1427
1427
  }
1428
1428
  }
1429
- function Na(a, i) {
1429
+ function Ka(a, i) {
1430
1430
  (i == null || i > a.length) && (i = a.length);
1431
1431
  for (var t = 0, e = new Array(i); t < i; t++)
1432
1432
  e[t] = a[t];
@@ -1454,7 +1454,7 @@ function pt(a, i) {
1454
1454
  function ot(a) {
1455
1455
  if (Array.isArray(a)) return a;
1456
1456
  }
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
+ var ct = typeof Ma == "function" ? Ma : Ma.default, lt = "file-invalid-type", rt = "file-too-large", st = "file-too-small", dt = "too-many-files", mt = function() {
1458
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];
1459
1459
  return {
1460
1460
  code: lt,
@@ -1470,7 +1470,7 @@ var ct = typeof Ta == "function" ? Ta : Ta.default, lt = "file-invalid-type", rt
1470
1470
  code: st,
1471
1471
  message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
1472
1472
  };
1473
- }, vt = {
1473
+ }, ut = {
1474
1474
  code: dt,
1475
1475
  message: "Too many files"
1476
1476
  };
@@ -1479,30 +1479,30 @@ function wi(a, i) {
1479
1479
  return [t, t ? null : mt(i)];
1480
1480
  }
1481
1481
  function ki(a, i, t) {
1482
- if ($(a.size))
1483
- if ($(i) && $(t)) {
1482
+ if (W(a.size))
1483
+ if (W(i) && W(t)) {
1484
1484
  if (a.size > t) return [!1, li(t)];
1485
1485
  if (a.size < i) return [!1, ri(i)];
1486
1486
  } else {
1487
- if ($(i) && a.size < i) return [!1, ri(i)];
1488
- if ($(t) && a.size > t) return [!1, li(t)];
1487
+ if (W(i) && a.size < i) return [!1, ri(i)];
1488
+ if (W(t) && a.size > t) return [!1, li(t)];
1489
1489
  }
1490
1490
  return [!0, null];
1491
1491
  }
1492
- function $(a) {
1492
+ function W(a) {
1493
1493
  return a != null;
1494
1494
  }
1495
- function ut(a) {
1495
+ function vt(a) {
1496
1496
  var i = a.files, t = a.accept, e = a.minSize, n = a.maxSize, o = a.multiple, l = a.maxFiles, r = a.validator;
1497
1497
  return !o && i.length > 1 || o && l >= 1 && i.length > l ? !1 : i.every(function(v) {
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;
1498
+ var j = wi(v, t), D = ea(j, 1), f = D[0], R = ki(v, e, n), C = ea(R, 1), S = C[0], P = r ? r(v) : null;
1499
+ return f && S && !P;
1500
1500
  });
1501
1501
  }
1502
- function ja(a) {
1502
+ function _a(a) {
1503
1503
  return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
1504
1504
  }
1505
- function ga(a) {
1505
+ function ba(a) {
1506
1506
  return a.dataTransfer ? Array.prototype.some.call(a.dataTransfer.types, function(i) {
1507
1507
  return i === "Files" || i === "application/x-moz-file";
1508
1508
  }) : !!a.target && !!a.target.files;
@@ -1520,14 +1520,14 @@ function gt() {
1520
1520
  var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
1521
1521
  return ft(a) || xt(a);
1522
1522
  }
1523
- function A() {
1523
+ function F() {
1524
1524
  for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
1525
1525
  i[t] = arguments[t];
1526
1526
  return function(e) {
1527
1527
  for (var n = arguments.length, o = new Array(n > 1 ? n - 1 : 0), l = 1; l < n; l++)
1528
1528
  o[l - 1] = arguments[l];
1529
1529
  return i.some(function(r) {
1530
- return !ja(e) && r && r.apply(void 0, [e].concat(o)), ja(e);
1530
+ return !_a(e) && r && r.apply(void 0, [e].concat(o)), _a(e);
1531
1531
  });
1532
1532
  };
1533
1533
  }
@@ -1535,12 +1535,12 @@ function bt() {
1535
1535
  return "showOpenFilePicker" in window;
1536
1536
  }
1537
1537
  function ht(a) {
1538
- if ($(a)) {
1538
+ if (W(a)) {
1539
1539
  var i = Object.entries(a).filter(function(t) {
1540
- var e = oa(t, 2), n = e[0], o = e[1], l = !0;
1540
+ var e = ea(t, 2), n = e[0], o = e[1], l = !0;
1541
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;
1542
1542
  }).reduce(function(t, e) {
1543
- var n = oa(e, 2), o = n[0], l = n[1];
1543
+ var n = ea(e, 2), o = n[0], l = n[1];
1544
1544
  return ci(ci({}, t), {}, hi({}, o, l));
1545
1545
  }, {});
1546
1546
  return [{
@@ -1552,9 +1552,9 @@ function ht(a) {
1552
1552
  return a;
1553
1553
  }
1554
1554
  function yt(a) {
1555
- if ($(a))
1555
+ if (W(a))
1556
1556
  return Object.entries(a).reduce(function(i, t) {
1557
- var e = oa(t, 2), n = e[0], o = e[1];
1557
+ var e = ea(t, 2), n = e[0], o = e[1];
1558
1558
  return [].concat(pi(i), [n], pi(o));
1559
1559
  }, []).filter(function(i) {
1560
1560
  return ji(i) || Di(i);
@@ -1584,9 +1584,9 @@ function Ot(a) {
1584
1584
  if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
1585
1585
  }
1586
1586
  function Ft(a) {
1587
- if (Array.isArray(a)) return $a(a);
1587
+ if (Array.isArray(a)) return Ha(a);
1588
1588
  }
1589
- function La(a, i) {
1589
+ function Na(a, i) {
1590
1590
  return Rt(a) || It(a, i) || zi(a, i) || Pt();
1591
1591
  }
1592
1592
  function Pt() {
@@ -1595,13 +1595,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
1595
1595
  }
1596
1596
  function zi(a, i) {
1597
1597
  if (a) {
1598
- if (typeof a == "string") return $a(a, i);
1598
+ if (typeof a == "string") return Ha(a, i);
1599
1599
  var t = Object.prototype.toString.call(a).slice(8, -1);
1600
1600
  if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
1601
- if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return $a(a, i);
1601
+ if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return Ha(a, i);
1602
1602
  }
1603
1603
  }
1604
- function $a(a, i) {
1604
+ function Ha(a, i) {
1605
1605
  (i == null || i > a.length) && (i = a.length);
1606
1606
  for (var t = 0, e = new Array(i); t < i; t++)
1607
1607
  e[t] = a[t];
@@ -1643,17 +1643,17 @@ function d(a) {
1643
1643
  for (var i = 1; i < arguments.length; i++) {
1644
1644
  var t = arguments[i] != null ? arguments[i] : {};
1645
1645
  i % 2 ? di(Object(t), !0).forEach(function(e) {
1646
- Ka(a, e, t[e]);
1646
+ Wa(a, e, t[e]);
1647
1647
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : di(Object(t)).forEach(function(e) {
1648
1648
  Object.defineProperty(a, e, Object.getOwnPropertyDescriptor(t, e));
1649
1649
  });
1650
1650
  }
1651
1651
  return a;
1652
1652
  }
1653
- function Ka(a, i, t) {
1653
+ function Wa(a, i, t) {
1654
1654
  return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
1655
1655
  }
1656
- function Da(a, i) {
1656
+ function Ea(a, i) {
1657
1657
  if (a == null) return {};
1658
1658
  var t = St(a, i), e, n;
1659
1659
  if (Object.getOwnPropertySymbols) {
@@ -1670,8 +1670,8 @@ function St(a, i) {
1670
1670
  n = e[o], !(i.indexOf(n) >= 0) && (t[n] = a[n]);
1671
1671
  return t;
1672
1672
  }
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);
1673
+ var Ba = /* @__PURE__ */ fi(function(a, i) {
1674
+ var t = a.children, e = Ea(a, jt), n = Ei(e), o = n.open, l = Ea(n, Dt);
1675
1675
  return Ti(i, function() {
1676
1676
  return {
1677
1677
  open: o
@@ -1680,7 +1680,7 @@ var Ua = /* @__PURE__ */ fi(function(a, i) {
1680
1680
  open: o
1681
1681
  })));
1682
1682
  });
1683
- Ua.displayName = "Dropzone";
1683
+ Ba.displayName = "Dropzone";
1684
1684
  var _i = {
1685
1685
  disabled: !1,
1686
1686
  getFilesFromEvent: Wi,
@@ -1697,8 +1697,8 @@ var _i = {
1697
1697
  useFsAccessApi: !1,
1698
1698
  autoFocus: !1
1699
1699
  };
1700
- Ua.defaultProps = _i;
1701
- Ua.propTypes = {
1700
+ Ba.defaultProps = _i;
1701
+ Ba.propTypes = {
1702
1702
  /**
1703
1703
  * Render function that exposes the dropzone state and prop getter fns
1704
1704
  *
@@ -1866,7 +1866,7 @@ Ua.propTypes = {
1866
1866
  */
1867
1867
  validator: s.func
1868
1868
  };
1869
- var Ha = {
1869
+ var Ua = {
1870
1870
  isFocused: !1,
1871
1871
  isFileDialogActive: !1,
1872
1872
  isDragActive: !1,
@@ -1876,186 +1876,186 @@ var Ha = {
1876
1876
  fileRejections: []
1877
1877
  };
1878
1878
  function Ei() {
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() {
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, j = i.onDragEnter, D = i.onDragLeave, f = i.onDragOver, R = i.onDrop, C = i.onDropAccepted, S = i.onDropRejected, P = i.onFileDialogCancel, M = i.onFileDialogOpen, z = i.useFsAccessApi, N = i.autoFocus, $ = i.preventDropOnDocument, na = i.noClick, Q = i.noKeyboard, pa = i.noDrag, g = i.noDragEventsBubbling, q = i.onError, K = i.validator, I = J(function() {
1880
1880
  return yt(t);
1881
- }, [t]), la = Z(function() {
1881
+ }, [t]), oa = J(function() {
1882
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({
1883
+ }, [t]), aa = J(function() {
1884
+ return typeof M == "function" ? M : mi;
1885
+ }, [M]), Y = J(function() {
1886
+ return typeof P == "function" ? P : mi;
1887
+ }, [P]), b = xa(null), w = xa(null), ca = qi(qt, Ua), la = Na(ca, 2), H = la[0], h = la[1], Fa = H.isFocused, A = H.isFileDialogActive, y = xa(typeof window < "u" && window.isSecureContext && z && bt()), E = function() {
1888
+ !y.current && A && setTimeout(function() {
1889
+ if (w.current) {
1890
+ var c = w.current.files;
1891
+ c.length || (h({
1892
1892
  type: "closeDialog"
1893
- }), W());
1893
+ }), Y());
1894
1894
  }
1895
1895
  }, 300);
1896
1896
  };
1897
- pa(function() {
1898
- return window.addEventListener("focus", ra, !1), function() {
1899
- window.removeEventListener("focus", ra, !1);
1897
+ ta(function() {
1898
+ return window.addEventListener("focus", E, !1), function() {
1899
+ window.removeEventListener("focus", E, !1);
1900
1900
  };
1901
- }, [g, w, W, k]);
1902
- var T = fa([]), ea = function(c) {
1903
- f.current && f.current.contains(c.target) || (c.preventDefault(), T.current = []);
1901
+ }, [w, A, Y, y]);
1902
+ var T = xa([]), ra = function(c) {
1903
+ b.current && b.current.contains(c.target) || (c.preventDefault(), T.current = []);
1904
1904
  };
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));
1905
+ ta(function() {
1906
+ return $ && (document.addEventListener("dragover", si, !1), document.addEventListener("drop", ra, !1)), function() {
1907
+ $ && (document.removeEventListener("dragover", si), document.removeEventListener("drop", ra));
1908
1908
  };
1909
- }, [f, Q]), pa(function() {
1910
- return !e && H && f.current && f.current.focus(), function() {
1909
+ }, [b, $]), ta(function() {
1910
+ return !e && N && b.current && b.current.focus(), function() {
1911
1911
  };
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({
1912
+ }, [b, N, e]);
1913
+ var O = _(function(p) {
1914
+ q ? q(p) : console.error(p);
1915
+ }, [q]), sa = _(function(p) {
1916
+ p.preventDefault(), p.persist(), va(p), T.current = [].concat(Et(T.current), [p.target]), ba(p) && Promise.resolve(n(p)).then(function(c) {
1917
+ if (!(_a(p) && !g)) {
1918
+ var u = c.length, x = u > 0 && vt({
1919
1919
  files: c,
1920
- accept: N,
1920
+ accept: I,
1921
1921
  minSize: l,
1922
1922
  maxSize: o,
1923
1923
  multiple: r,
1924
1924
  maxFiles: v,
1925
- validator: P
1926
- }), j = m > 0 && !u;
1927
- b({
1928
- isDragAccept: u,
1929
- isDragReject: j,
1925
+ validator: K
1926
+ }), k = u > 0 && !x;
1927
+ h({
1928
+ isDragAccept: x,
1929
+ isDragReject: k,
1930
1930
  isDragActive: !0,
1931
1931
  type: "setDraggedFiles"
1932
- }), h && h(p);
1932
+ }), j && j(p);
1933
1933
  }
1934
1934
  }).catch(function(c) {
1935
- return R(c);
1935
+ return O(c);
1936
1936
  });
1937
- }, [n, h, R, _, N, l, o, r, v, P]), Ya = E(function(p) {
1937
+ }, [n, j, O, g, I, l, o, r, v, K]), Ya = _(function(p) {
1938
1938
  p.preventDefault(), p.persist(), va(p);
1939
- var c = ga(p);
1939
+ var c = ba(p);
1940
1940
  if (c && p.dataTransfer)
1941
1941
  try {
1942
1942
  p.dataTransfer.dropEffect = "copy";
1943
1943
  } catch {
1944
1944
  }
1945
- return c && S && S(p), !1;
1946
- }, [S, _]), Va = E(function(p) {
1945
+ return c && f && f(p), !1;
1946
+ }, [f, g]), Va = _(function(p) {
1947
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({
1948
+ var c = T.current.filter(function(x) {
1949
+ return b.current && b.current.contains(x);
1950
+ }), u = c.indexOf(p.target);
1951
+ u !== -1 && c.splice(u, 1), T.current = c, !(c.length > 0) && (h({
1952
1952
  type: "setDraggedFiles",
1953
1953
  isDragActive: !1,
1954
1954
  isDragAccept: !1,
1955
1955
  isDragReject: !1
1956
- }), ga(p) && D && D(p));
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);
1956
+ }), ba(p) && D && D(p));
1957
+ }, [b, D, g]), da = _(function(p, c) {
1958
+ var u = [], x = [];
1959
+ p.forEach(function(k) {
1960
+ var ia = wi(k, I), Z = Na(ia, 2), Ia = Z[0], Ra = Z[1], Sa = ki(k, l, o), fa = Na(Sa, 2), qa = fa[0], Ta = fa[1], La = K ? K(k) : null;
1961
+ if (Ia && qa && !La)
1962
+ u.push(k);
1963
1963
  else {
1964
- var qa = [Fa, Ra];
1965
- Sa && (qa = qa.concat(Sa)), u.push({
1966
- file: j,
1967
- errors: qa.filter(function(Ri) {
1964
+ var Ca = [Ra, Ta];
1965
+ La && (Ca = Ca.concat(La)), x.push({
1966
+ file: k,
1967
+ errors: Ca.filter(function(Ri) {
1968
1968
  return Ri;
1969
1969
  })
1970
1970
  });
1971
1971
  }
1972
- }), (!r && m.length > 1 || r && v >= 1 && m.length > v) && (m.forEach(function(j) {
1973
- u.push({
1974
- file: j,
1975
- errors: [vt]
1972
+ }), (!r && u.length > 1 || r && v >= 1 && u.length > v) && (u.forEach(function(k) {
1973
+ x.push({
1974
+ file: k,
1975
+ errors: [ut]
1976
1976
  });
1977
- }), m.splice(0)), b({
1978
- acceptedFiles: m,
1979
- fileRejections: u,
1980
- isDragReject: u.length > 0,
1977
+ }), u.splice(0)), h({
1978
+ acceptedFiles: u,
1979
+ fileRejections: x,
1980
+ isDragReject: x.length > 0,
1981
1981
  type: "setFiles"
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);
1982
+ }), R && R(u, x, c), x.length > 0 && S && S(x, c), u.length > 0 && C && C(u, c);
1983
+ }, [h, r, I, l, o, v, R, C, S, K]), ma = _(function(p) {
1984
+ p.preventDefault(), p.persist(), va(p), T.current = [], ba(p) && Promise.resolve(n(p)).then(function(c) {
1985
+ _a(p) && !g || da(c, p);
1986
1986
  }).catch(function(c) {
1987
- return R(c);
1988
- }), b({
1987
+ return O(c);
1988
+ }), h({
1989
1989
  type: "reset"
1990
1990
  });
1991
- }, [n, sa, R, _]), Y = E(function() {
1992
- if (k.current) {
1993
- b({
1991
+ }, [n, da, O, g]), V = _(function() {
1992
+ if (y.current) {
1993
+ h({
1994
1994
  type: "openDialog"
1995
- }), ta();
1995
+ }), aa();
1996
1996
  var p = {
1997
1997
  multiple: r,
1998
- types: la
1998
+ types: oa
1999
1999
  };
2000
2000
  window.showOpenFilePicker(p).then(function(c) {
2001
2001
  return n(c);
2002
2002
  }).then(function(c) {
2003
- sa(c, null), b({
2003
+ da(c, null), h({
2004
2004
  type: "closeDialog"
2005
2005
  });
2006
2006
  }).catch(function(c) {
2007
- wt(c) ? (W(c), b({
2007
+ wt(c) ? (Y(c), h({
2008
2008
  type: "closeDialog"
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
+ })) : kt(c) ? (y.current = !1, w.current ? (w.current.value = null, w.current.click()) : O(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."))) : O(c);
2010
2010
  });
2011
2011
  return;
2012
2012
  }
2013
- g.current && (b({
2013
+ w.current && (h({
2014
2014
  type: "openDialog"
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({
2015
+ }), aa(), w.current.value = null, w.current.click());
2016
+ }, [h, aa, Y, z, da, O, oa, r]), Ga = _(function(p) {
2017
+ !b.current || !b.current.isEqualNode(p.target) || (p.key === " " || p.key === "Enter" || p.keyCode === 32 || p.keyCode === 13) && (p.preventDefault(), V());
2018
+ }, [b, V]), Za = _(function() {
2019
+ h({
2020
2020
  type: "focus"
2021
2021
  });
2022
- }, []), Ja = E(function() {
2023
- b({
2022
+ }, []), Ja = _(function() {
2023
+ h({
2024
2024
  type: "blur"
2025
2025
  });
2026
- }, []), Xa = E(function() {
2027
- ca || (gt() ? setTimeout(Y, 0) : Y());
2028
- }, [ca, Y]), V = function(c) {
2026
+ }, []), Xa = _(function() {
2027
+ na || (gt() ? setTimeout(V, 0) : V());
2028
+ }, [na, V]), G = function(c) {
2029
2029
  return e ? null : c;
2030
- }, Aa = function(c) {
2031
- return aa ? null : V(c);
2032
- }, ma = function(c) {
2033
- return z ? null : V(c);
2030
+ }, Pa = function(c) {
2031
+ return Q ? null : G(c);
2032
+ }, ua = function(c) {
2033
+ return pa ? null : G(c);
2034
2034
  }, va = function(c) {
2035
- _ && c.stopPropagation();
2036
- }, Fi = Z(function() {
2035
+ g && c.stopPropagation();
2036
+ }, Fi = J(function() {
2037
2037
  return function() {
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 ? {
2038
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.role, k = p.onKeyDown, ia = p.onFocus, Z = p.onBlur, Ia = p.onClick, Ra = p.onDragEnter, Sa = p.onDragOver, fa = p.onDragLeave, qa = p.onDrop, Ta = Ea(p, zt);
2039
+ return d(d(Wa({
2040
+ onKeyDown: Pa(F(k, Ga)),
2041
+ onFocus: Pa(F(ia, Za)),
2042
+ onBlur: Pa(F(Z, Ja)),
2043
+ onClick: G(F(Ia, Xa)),
2044
+ onDragEnter: ua(F(Ra, sa)),
2045
+ onDragOver: ua(F(Sa, Ya)),
2046
+ onDragLeave: ua(F(fa, Va)),
2047
+ onDrop: ua(F(qa, ma)),
2048
+ role: typeof x == "string" && x !== "" ? x : "presentation"
2049
+ }, u, b), !e && !Q ? {
2050
2050
  tabIndex: 0
2051
- } : {}), Ra);
2051
+ } : {}), Ta);
2052
2052
  };
2053
- }, [f, Ga, Za, Ja, Xa, Ba, Ya, Va, da, aa, z, e]), Pi = E(function(p) {
2053
+ }, [b, Ga, Za, Ja, Xa, sa, Ya, Va, ma, Q, pa, e]), Pi = _(function(p) {
2054
2054
  p.stopPropagation();
2055
- }, []), Ii = Z(function() {
2055
+ }, []), Ii = J(function() {
2056
2056
  return function() {
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,
2057
+ var p = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = p.refKey, u = c === void 0 ? "ref" : c, x = p.onChange, k = p.onClick, ia = Ea(p, _t), Z = Wa({
2058
+ accept: I,
2059
2059
  multiple: r,
2060
2060
  type: "file",
2061
2061
  style: {
@@ -2070,20 +2070,20 @@ function Ei() {
2070
2070
  width: "1px",
2071
2071
  whiteSpace: "nowrap"
2072
2072
  },
2073
- onChange: V(A(u, da)),
2074
- onClick: V(A(j, Pi)),
2073
+ onChange: G(F(x, ma)),
2074
+ onClick: G(F(k, Pi)),
2075
2075
  tabIndex: -1
2076
- }, m, g);
2077
- return d(d({}, G), na);
2076
+ }, u, w);
2077
+ return d(d({}, Z), ia);
2078
2078
  };
2079
- }, [g, t, r, da, e]);
2080
- return d(d({}, B), {}, {
2081
- isFocused: I && !e,
2079
+ }, [w, t, r, ma, e]);
2080
+ return d(d({}, H), {}, {
2081
+ isFocused: Fa && !e,
2082
2082
  getRootProps: Fi,
2083
2083
  getInputProps: Ii,
2084
- rootRef: f,
2085
- inputRef: g,
2086
- open: V(Y)
2084
+ rootRef: b,
2085
+ inputRef: w,
2086
+ open: G(V)
2087
2087
  });
2088
2088
  }
2089
2089
  function qt(a, i) {
@@ -2097,7 +2097,7 @@ function qt(a, i) {
2097
2097
  isFocused: !1
2098
2098
  });
2099
2099
  case "openDialog":
2100
- return d(d({}, Ha), {}, {
2100
+ return d(d({}, Ua), {}, {
2101
2101
  isFileDialogActive: !0
2102
2102
  });
2103
2103
  case "closeDialog":
@@ -2117,80 +2117,84 @@ function qt(a, i) {
2117
2117
  isDragReject: i.isDragReject
2118
2118
  });
2119
2119
  case "reset":
2120
- return d({}, Ha);
2120
+ return d({}, Ua);
2121
2121
  default:
2122
2122
  return a;
2123
2123
  }
2124
2124
  }
2125
2125
  function mi() {
2126
2126
  }
2127
- const Tt = "_root_z1bfm_2", Lt = "_disabled_z1bfm_26", Ct = "_actions_z1bfm_68", _a = {
2127
+ const Tt = "_root_dadju_2", Lt = "_disabled_dadju_26", Ct = "_actions_dadju_68", Oa = {
2128
2128
  root: Tt,
2129
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",
2130
+ "drag-reject": "_drag-reject_dadju_32",
2131
+ "file-input": "_file-input_dadju_35",
2132
+ "file-preview": "_file-preview_dadju_40",
2133
+ "file-preview-icon": "_file-preview-icon_dadju_48",
2134
+ "file-preview-name": "_file-preview-name_dadju_51",
2135
+ "file-preview-size": "_file-preview-size_dadju_55",
2136
+ "file-preview-button": "_file-preview-button_dadju_58",
2137
+ "image-preview": "_image-preview_dadju_63",
2138
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 = ({
2139
+ "message-title": "_message-title_dadju_73",
2140
+ "message-hint": "_message-hint_dadju_76",
2141
+ "message-file-button-text": "_message-file-button-text_dadju_81",
2142
+ "message-icon": "_message-icon_dadju_84"
2143
+ }, ha = Aa(Oa), Ai = ({
2143
2144
  file: a,
2144
2145
  fileName: i,
2145
2146
  forceFileType: t,
2146
2147
  previewButtonText: e = "Preview"
2147
2148
  }) => {
2148
2149
  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
+ return /* @__PURE__ */ L(vi, { children: [
2150
2151
  n ? /* @__PURE__ */ L(
2151
- ya,
2152
+ ja,
2152
2153
  {
2153
2154
  as: "a",
2154
- className: ba("file-preview-size", "file-preview-button"),
2155
+ className: ha("file-preview-size", "file-preview-button"),
2155
2156
  href: a,
2156
2157
  rel: "noopener noreferrer",
2157
2158
  size: "md",
2158
2159
  target: "_blank",
2159
2160
  variant: "secondary",
2160
2161
  children: [
2161
- /* @__PURE__ */ x("span", { children: e }),
2162
- /* @__PURE__ */ x(J, { name: "external-link-alt" })
2162
+ /* @__PURE__ */ m("span", { children: e }),
2163
+ /* @__PURE__ */ m(U, { name: "external-link-alt" })
2163
2164
  ]
2164
2165
  }
2165
2166
  ) : 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 })
2167
+ /* @__PURE__ */ m(U, { className: ha("file-preview-icon"), name: o, size: "xxl" }),
2168
+ /* @__PURE__ */ m(Da, { className: ha("file-preview-name"), lines: 1, variant: "heading-xs-strong", children: r }),
2169
+ !n && /* @__PURE__ */ m(Da, { className: ha("file-preview-size"), lines: 1, variant: "body-md", children: l })
2169
2170
  ] });
2170
2171
  };
2171
2172
  Ai.displayName = "FileDrop.FilePreview";
2172
- const Ca = za(_a), Wa = ({
2173
+ const ya = Aa(Oa), ka = ({
2173
2174
  disabled: a,
2174
2175
  fileButtonText: i = "Browse file",
2175
2176
  hint: t = "Drag & drop a file here or",
2176
- openFile: e,
2177
- title: n = "Add file"
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,
2177
+ isLoading: e,
2178
+ openFile: n,
2179
+ title: o = "Add file"
2180
+ }) => /* @__PURE__ */ L(vi, { children: [
2181
+ /* @__PURE__ */ m(U, { className: ya("message-icon"), name: "import", size: "lg" }),
2182
+ /* @__PURE__ */ m(Da, { className: ya("message-title"), variant: "heading-xs-strong", children: o }),
2183
+ /* @__PURE__ */ m(Da, { className: ya("message-hint"), variant: "body-md", children: t }),
2184
+ /* @__PURE__ */ m(
2185
+ ja,
2183
2186
  {
2184
- className: Ca("message-file-button-text"),
2187
+ className: ya("message-file-button-text"),
2185
2188
  disabled: a,
2186
- onClick: e,
2189
+ isLoading: e,
2190
+ onClick: n,
2187
2191
  type: "button",
2188
2192
  children: i
2189
2193
  }
2190
2194
  )
2191
2195
  ] });
2192
- Wa.displayName = "FileDrop.Message";
2193
- const Mt = za(_a), Oi = ({
2196
+ ka.displayName = "FileDrop.Message";
2197
+ const Mt = Aa(Oa), Oi = ({
2194
2198
  disabled: a,
2195
2199
  error: i,
2196
2200
  file: t,
@@ -2200,11 +2204,20 @@ const Mt = za(_a), Oi = ({
2200
2204
  isAnImage: l,
2201
2205
  isHoverAccept: r,
2202
2206
  isHoverReject: v,
2203
- openFile: h,
2204
- wordings: D
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 });
2207
+ isLoading: j,
2208
+ openFile: D,
2209
+ wordings: f
2210
+ }) => r ? /* @__PURE__ */ m(U, { name: "smile-beam-solid" }) : v ? /* @__PURE__ */ m(U, { name: "sad-solid" }) : j ? /* @__PURE__ */ m(
2211
+ ka,
2212
+ {
2213
+ hint: f == null ? void 0 : f.loadingHint,
2214
+ isLoading: !0,
2215
+ openFile: D,
2216
+ title: f == null ? void 0 : f.loadingTitle
2217
+ }
2218
+ ) : i ? /* @__PURE__ */ m(ka, { openFile: D, ...f }) : n ? l ? /* @__PURE__ */ m("img", { className: Mt("image-preview"), src: n }) : /* @__PURE__ */ m(Ai, { file: t, fileName: e, forceFileType: o, ...f }) : /* @__PURE__ */ m(ka, { disabled: a, openFile: D, ...f });
2206
2219
  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) => {
2220
+ const ui = /\.(jpeg|jpg|gif|png|webp)$/, Nt = (a) => a ? typeof a == "string" ? !!xi(a).match(ui) : a.name ? !!a.name.match(ui) : !1 : !1, $t = (a) => {
2208
2221
  let i;
2209
2222
  if (a instanceof File ? i = a.preview : i = a, typeof i != "string" || i.startsWith("blob:"))
2210
2223
  return i;
@@ -2214,7 +2227,7 @@ const vi = /\.(jpeg|jpg|gif|png|webp)$/, Nt = (a) => a ? typeof a == "string" ?
2214
2227
  } catch {
2215
2228
  return;
2216
2229
  }
2217
- }, Kt = 2e6, Ht = "ERROR_INVALID_TYPE", Wt = "ERROR_INVALID_SIZE", ha = za(_a), Ut = fi(
2230
+ }, Kt = 2e6, Ht = "ERROR_INVALID_TYPE", Wt = "ERROR_INVALID_SIZE", wa = Aa(Oa), Ut = fi(
2218
2231
  ({
2219
2232
  accept: a = {
2220
2233
  "image/*": []
@@ -2227,118 +2240,120 @@ const vi = /\.(jpeg|jpg|gif|png|webp)$/, Nt = (a) => a ? typeof a == "string" ?
2227
2240
  fileName: l,
2228
2241
  forceFileType: r,
2229
2242
  handleAddFile: v,
2230
- handleRemoveFile: h,
2243
+ handleRemoveFile: j,
2231
2244
  isClearable: D,
2232
- isEditable: S,
2245
+ isEditable: f,
2246
+ isLoading: R,
2233
2247
  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;
2248
+ multiple: S,
2249
+ name: P,
2250
+ onBlur: M,
2251
+ onChange: z,
2252
+ onError: N,
2253
+ value: $,
2254
+ wordings: na,
2255
+ ...Q
2256
+ }, pa) => {
2257
+ const [g, q] = Qa($), [K, I] = Qa(void 0);
2258
+ ta(() => {
2259
+ q($);
2260
+ }, [$]), ta(() => () => g && g instanceof File && URL.revokeObjectURL(g.preview), [g]);
2261
+ const oa = (A) => {
2262
+ const [y] = A;
2263
+ y instanceof File && (y.preview = URL.createObjectURL(y)), q(y), I(null);
2264
+ const E = ai({ name: P, value: y });
2265
+ z == null || z(E), v == null || v(E);
2266
+ }, aa = (A, y) => {
2267
+ let E;
2268
+ A.map(({ errors: T }) => {
2269
+ T.map((ra) => {
2270
+ const { code: O, message: sa } = ra;
2271
+ O === "file-invalid-type" ? E = Ht : O === "file-too-large" ? E = Wt : E = sa;
2258
2272
  });
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({
2273
+ }), q(null), I(E), N == null || N(E), z == null || z(y), M == null || M();
2274
+ }, Y = (A) => {
2275
+ A.preventDefault(), q(null), I(null);
2276
+ const y = ai({ name: P, value: null });
2277
+ z == null || z(y), j == null || j(y);
2278
+ }, { getInputProps: b, getRootProps: w, isDragAccept: ca, isDragActive: la, isDragReject: H, open: h } = Ei({
2265
2279
  accept: a,
2266
2280
  disabled: n,
2267
2281
  maxSize: C,
2268
- multiple: q,
2282
+ multiple: S,
2269
2283
  noClick: !0,
2270
- onDropAccepted: N,
2271
- onDropRejected: la
2272
- }), b = (I) => M(I);
2284
+ onDropAccepted: oa,
2285
+ onDropRejected: aa
2286
+ }), Fa = (A) => N(A);
2273
2287
  return /* @__PURE__ */ L(
2274
2288
  "div",
2275
2289
  {
2276
- className: ha(
2290
+ className: wa(
2277
2291
  "root",
2278
2292
  n && "disabled",
2279
- U && "drag-reject",
2293
+ H && "drag-reject",
2280
2294
  "field-input",
2281
2295
  t
2282
2296
  ),
2283
- ...f({
2297
+ ...w({
2284
2298
  disabled: n,
2285
- handleRemoveFile: h,
2299
+ handleRemoveFile: j,
2286
2300
  isClearable: D,
2287
- isDragAccept: g,
2288
- isDragActive: Ea,
2289
- isDragReject: U,
2290
- isEditable: S,
2291
- ref: aa
2301
+ isDragAccept: ca,
2302
+ isDragActive: la,
2303
+ isDragReject: H,
2304
+ isEditable: f,
2305
+ ref: pa
2292
2306
  }),
2293
- ...ca,
2307
+ ...Q,
2294
2308
  children: [
2295
- /* @__PURE__ */ x(
2309
+ /* @__PURE__ */ m(
2296
2310
  "input",
2297
2311
  {
2298
- className: ha("file-input"),
2299
- ...W({ disabled: n, multiple: q, name: O, onError: b })
2312
+ className: wa("file-input"),
2313
+ ...b({ disabled: n, multiple: S, name: P, onError: Fa })
2300
2314
  }
2301
2315
  ),
2302
- /* @__PURE__ */ L("div", { className: ha("file-preview"), children: [
2316
+ /* @__PURE__ */ L("div", { className: wa("file-preview"), children: [
2303
2317
  i({
2304
2318
  disabled: n,
2305
- error: ia,
2306
- file: z,
2319
+ error: K,
2320
+ file: g,
2307
2321
  fileName: l,
2308
- fileUrl: z && $t(z),
2322
+ fileUrl: g && $t(g),
2309
2323
  forceFileType: r,
2310
- isAnImage: r === "image" || Nt(z),
2311
- isHoverAccept: g,
2312
- isHoverReject: U,
2313
- openFile: B,
2314
- wordings: Q
2324
+ isAnImage: r === "image" || Nt(g),
2325
+ isHoverAccept: ca,
2326
+ isHoverReject: H,
2327
+ isLoading: R,
2328
+ openFile: h,
2329
+ wordings: na
2315
2330
  }),
2316
- z ? /* @__PURE__ */ L("div", { className: ha("actions"), children: [
2331
+ !R && g ? /* @__PURE__ */ L("div", { className: wa("actions"), children: [
2317
2332
  /* @__PURE__ */ L(
2318
- ya,
2333
+ ja,
2319
2334
  {
2320
- disabled: !S,
2321
- onClick: B,
2335
+ disabled: !f,
2336
+ onClick: h,
2322
2337
  size: "lg",
2323
2338
  type: "button",
2324
2339
  variant: "secondary",
2325
2340
  children: [
2326
- /* @__PURE__ */ x(J, { name: "pen" }),
2327
- o
2341
+ /* @__PURE__ */ m(U, { name: "pen" }),
2342
+ /* @__PURE__ */ m("span", { children: o })
2328
2343
  ]
2329
2344
  }
2330
2345
  ),
2331
2346
  /* @__PURE__ */ L(
2332
- ya,
2347
+ ja,
2333
2348
  {
2334
2349
  disabled: !D,
2335
- onClick: ta,
2350
+ onClick: Y,
2336
2351
  size: "lg",
2337
2352
  type: "button",
2338
2353
  variant: "secondary-danger",
2339
2354
  children: [
2340
- /* @__PURE__ */ x(J, { name: "trash" }),
2341
- e
2355
+ /* @__PURE__ */ m(U, { name: "trash" }),
2356
+ /* @__PURE__ */ m("span", { children: e })
2342
2357
  ]
2343
2358
  }
2344
2359
  )