@canonical/maas-react-components 1.19.1 → 1.20.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/@canonical/maas-react-components.es.js +562 -549
- package/dist/@canonical/maas-react-components.umd.js +10 -10
- package/dist/src/lib/components/MultiSelect/MultiSelect.d.ts +9 -4
- package/dist/src/lib/components/MultiSelect/MultiSelect.stories.d.ts +31 -12
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as se, jsx as u, Fragment as De } from "react/jsx-runtime";
|
|
2
2
|
import * as ne from "react";
|
|
3
|
-
import ut, { useRef as
|
|
4
|
-
import { useListener as gt, Link as bt, Tooltip as ht, Button as
|
|
3
|
+
import ut, { useRef as Ce, useState as ye, useEffect as he, useCallback as re, cloneElement as ft, createContext as pt, useId as rr, useContext as Mr, useMemo as ie, useReducer as dt, forwardRef as mt, useImperativeHandle as vt, Fragment as yt } from "react";
|
|
4
|
+
import { useListener as gt, Link as bt, Tooltip as ht, Button as Ee, Icon as ke, Row as _t, Col as Et, Input as wt, CheckboxInput as St, useClickOutside as Tt, useOnEscapePressed as xt, SearchBox as Ct } from "@canonical/react-components";
|
|
5
5
|
function Lr(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
@@ -52,7 +52,7 @@ const ve = {
|
|
|
52
52
|
positiveFaded: "#B7CCB9",
|
|
53
53
|
positiveMid: "#4DAB4D",
|
|
54
54
|
positive: "#0E8420"
|
|
55
|
-
},
|
|
55
|
+
}, So = [
|
|
56
56
|
ve.link,
|
|
57
57
|
ve.positive,
|
|
58
58
|
ve.negative,
|
|
@@ -61,7 +61,7 @@ const ve = {
|
|
|
61
61
|
var a, o;
|
|
62
62
|
const t = ((o = (a = e == null ? void 0 : e.current) == null ? void 0 : a.getBoundingClientRect()) == null ? void 0 : o.width) || 0;
|
|
63
63
|
return t > r * mr ? t / r : mr;
|
|
64
|
-
},
|
|
64
|
+
}, _e = {
|
|
65
65
|
bar: "meter-bar",
|
|
66
66
|
container: "meter-container",
|
|
67
67
|
filled: "meter-filled",
|
|
@@ -77,25 +77,25 @@ const ve = {
|
|
|
77
77
|
size: o = "regular",
|
|
78
78
|
...s
|
|
79
79
|
}) => {
|
|
80
|
-
const i =
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
const i = Ce(null), v = t == null ? void 0 : t.reduce((O, w) => O + w.value, 0), c = n || v, y = t.map((O) => O.value / c * 100), [g, h] = ye(0);
|
|
81
|
+
he(() => {
|
|
82
|
+
h(a === "segmented" ? yr(i, c) : 0);
|
|
83
83
|
}, [c, a]);
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
}, [i, c,
|
|
87
|
-
return gt(window,
|
|
84
|
+
const S = re(() => {
|
|
85
|
+
h(yr(i, c));
|
|
86
|
+
}, [i, c, h]);
|
|
87
|
+
return gt(window, S, "resize", !0, a === "segmented"), /* @__PURE__ */ se(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
className: W("p-meter", e, {
|
|
91
91
|
"p-meter--small": o === "small"
|
|
92
92
|
}),
|
|
93
93
|
"aria-label": s == null ? void 0 : s["aria-label"],
|
|
94
|
-
"data-testid":
|
|
94
|
+
"data-testid": _e.container,
|
|
95
95
|
ref: i,
|
|
96
96
|
children: [
|
|
97
97
|
/* @__PURE__ */ u(Pt, { children: /* @__PURE__ */ u(
|
|
98
|
-
|
|
98
|
+
It,
|
|
99
99
|
{
|
|
100
100
|
data: t,
|
|
101
101
|
datumWidths: y,
|
|
@@ -113,11 +113,11 @@ const ve = {
|
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: "p-meter__bar",
|
|
116
|
-
"data-testid":
|
|
116
|
+
"data-testid": _e.bar,
|
|
117
117
|
style: { backgroundColor: Dt },
|
|
118
118
|
children: e
|
|
119
119
|
}
|
|
120
|
-
),
|
|
120
|
+
), It = ({
|
|
121
121
|
data: e,
|
|
122
122
|
datumWidths: r,
|
|
123
123
|
maximum: t,
|
|
@@ -144,14 +144,14 @@ const ve = {
|
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
146
146
|
className: "p-meter__filled",
|
|
147
|
-
"data-testid":
|
|
147
|
+
"data-testid": _e.meteroverflow,
|
|
148
148
|
style: { backgroundColor: zr, width: "100%" }
|
|
149
149
|
}
|
|
150
150
|
) : e == null ? void 0 : e.map((i, v) => /* @__PURE__ */ u(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
153
|
className: "p-meter__filled",
|
|
154
|
-
"data-testid":
|
|
154
|
+
"data-testid": _e.filled,
|
|
155
155
|
style: o(i, v)
|
|
156
156
|
},
|
|
157
157
|
`meter-${v}`
|
|
@@ -160,23 +160,23 @@ const ve = {
|
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
className: "p-meter__separators",
|
|
163
|
-
"data-testid":
|
|
163
|
+
"data-testid": _e.segments,
|
|
164
164
|
style: s()
|
|
165
165
|
}
|
|
166
166
|
)
|
|
167
167
|
] });
|
|
168
|
-
},
|
|
168
|
+
}, Rt = ({
|
|
169
169
|
className: e,
|
|
170
170
|
children: r
|
|
171
171
|
}) => /* @__PURE__ */ u(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
174
|
className: W("p-meter__label", e),
|
|
175
|
-
"data-testid":
|
|
175
|
+
"data-testid": _e.label,
|
|
176
176
|
children: r
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
|
-
At.Label =
|
|
179
|
+
At.Label = Rt;
|
|
180
180
|
const To = ({ children: e, to: r, ...t }) => /* @__PURE__ */ u(bt, { ...t, href: r, rel: "noreferrer noopener", target: "_blank", children: e }), Ft = ({ children: e }) => /* @__PURE__ */ u(De, { children: e }), jt = ({
|
|
181
181
|
isCollapsed: e,
|
|
182
182
|
setIsCollapsed: r,
|
|
@@ -194,7 +194,7 @@ const To = ({ children: e, to: r, ...t }) => /* @__PURE__ */ u(bt, { ...t, href:
|
|
|
194
194
|
position: "right",
|
|
195
195
|
tooltipClassName: "p-side-navigation__tooltip",
|
|
196
196
|
children: /* @__PURE__ */ u(
|
|
197
|
-
|
|
197
|
+
Ee,
|
|
198
198
|
{
|
|
199
199
|
appearance: "base",
|
|
200
200
|
"aria-label": `${e ? "expand" : "collapse"} main navigation`,
|
|
@@ -236,7 +236,7 @@ const To = ({ children: e, to: r, ...t }) => /* @__PURE__ */ u(bt, { ...t, href:
|
|
|
236
236
|
className: r,
|
|
237
237
|
onClick: t
|
|
238
238
|
}) => /* @__PURE__ */ u(
|
|
239
|
-
|
|
239
|
+
Ee,
|
|
240
240
|
{
|
|
241
241
|
appearance: "base",
|
|
242
242
|
className: W(
|
|
@@ -249,25 +249,25 @@ const To = ({ children: e, to: r, ...t }) => /* @__PURE__ */ u(bt, { ...t, href:
|
|
|
249
249
|
children: e
|
|
250
250
|
}
|
|
251
251
|
), Zt = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-side-navigation__text", children: e });
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
252
|
+
const H = ({ children: e, className: r, isCollapsed: t }) => /* @__PURE__ */ u("header", { "aria-label": "main navigation", className: W("l-navigation is-maas", r, { "is-collapsed": t, "is-pinned": !t }), children: e }), Xt = ({ children: e, className: r }) => /* @__PURE__ */ u("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ u("div", { className: W("p-panel is-dark", r), children: e }) });
|
|
253
|
+
H.Header = Lt;
|
|
254
|
+
H.Banner = Ft;
|
|
255
|
+
H.Drawer = $t;
|
|
256
|
+
H.Controls = Nt;
|
|
257
|
+
H.CollapseToggle = jt;
|
|
258
|
+
H.Content = kt;
|
|
259
|
+
H.Footer = Mt;
|
|
260
|
+
H.List = qt;
|
|
261
|
+
H.Item = zt;
|
|
262
|
+
H.Link = Yt;
|
|
263
|
+
H.Text = Zt;
|
|
264
|
+
H.Icon = Bt;
|
|
265
|
+
H.Label = Wt;
|
|
266
|
+
H.Logo = Kt;
|
|
267
|
+
H.LogoTag = Gt;
|
|
268
|
+
H.LogoIcon = Ht;
|
|
269
|
+
H.LogoName = Ut;
|
|
270
|
+
H.LogoText = Vt;
|
|
271
271
|
Xt.MenuButton = Jt;
|
|
272
272
|
const lr = pt(null), Wr = ({ children: e }) => {
|
|
273
273
|
const r = rr();
|
|
@@ -412,7 +412,7 @@ const pn = ({
|
|
|
412
412
|
totalPages: i
|
|
413
413
|
}) => /* @__PURE__ */ u("nav", { "aria-label": "pagination", className: "p-pagination", children: /* @__PURE__ */ se("span", { className: "p-pagination--items", children: [
|
|
414
414
|
/* @__PURE__ */ u(
|
|
415
|
-
|
|
415
|
+
Ee,
|
|
416
416
|
{
|
|
417
417
|
"aria-label": "Previous page",
|
|
418
418
|
className: "p-pagination__link--previous",
|
|
@@ -445,7 +445,7 @@ const pn = ({
|
|
|
445
445
|
i
|
|
446
446
|
] }),
|
|
447
447
|
/* @__PURE__ */ u(
|
|
448
|
-
|
|
448
|
+
Ee,
|
|
449
449
|
{
|
|
450
450
|
"aria-label": "Next page",
|
|
451
451
|
className: "p-pagination__link--next",
|
|
@@ -455,13 +455,13 @@ const pn = ({
|
|
|
455
455
|
children: /* @__PURE__ */ u(ke, { name: "chevron-up" })
|
|
456
456
|
}
|
|
457
457
|
)
|
|
458
|
-
] }) }),
|
|
458
|
+
] }) }), Co = ({
|
|
459
459
|
currentPage: e,
|
|
460
460
|
disabled: r,
|
|
461
461
|
paginate: t,
|
|
462
462
|
totalPages: n
|
|
463
463
|
}) => {
|
|
464
|
-
const [a, o] =
|
|
464
|
+
const [a, o] = ye(e), [s, i] = ye("");
|
|
465
465
|
return /* @__PURE__ */ u(
|
|
466
466
|
pn,
|
|
467
467
|
{
|
|
@@ -471,21 +471,21 @@ const pn = ({
|
|
|
471
471
|
onInputBlur: () => {
|
|
472
472
|
o(e), i("");
|
|
473
473
|
},
|
|
474
|
-
onInputChange: (
|
|
475
|
-
const { value:
|
|
476
|
-
|
|
474
|
+
onInputChange: (h) => {
|
|
475
|
+
const { value: S, valueAsNumber: O } = h.target;
|
|
476
|
+
S ? (o(O), O > n || O < 1 ? i(`${O} is not a valid page number.`) : (i(""), t(O))) : i("Enter a page number.");
|
|
477
477
|
},
|
|
478
478
|
onNextClick: () => {
|
|
479
|
-
o((
|
|
479
|
+
o((h) => Number(h) + 1), t(Number(e) + 1);
|
|
480
480
|
},
|
|
481
481
|
onPreviousClick: () => {
|
|
482
|
-
o((
|
|
482
|
+
o((h) => Number(h) - 1), t(Number(e) - 1);
|
|
483
483
|
},
|
|
484
484
|
totalPages: n
|
|
485
485
|
}
|
|
486
486
|
);
|
|
487
487
|
};
|
|
488
|
-
const
|
|
488
|
+
const Oo = ({ activeStep: e, items: r }) => /* @__PURE__ */ u("ol", { className: "stepper", children: r.map((t, n) => {
|
|
489
489
|
const a = n === e, o = n < e;
|
|
490
490
|
return /* @__PURE__ */ u("li", { "aria-label": t, className: "stepper__item", children: /* @__PURE__ */ u(
|
|
491
491
|
"p",
|
|
@@ -499,7 +499,7 @@ const Co = ({ activeStep: e, items: r }) => /* @__PURE__ */ u("ol", { className:
|
|
|
499
499
|
}
|
|
500
500
|
) }, n);
|
|
501
501
|
}) });
|
|
502
|
-
var nr = { exports: {} }, Fe = { exports: {} },
|
|
502
|
+
var nr = { exports: {} }, Fe = { exports: {} }, F = {};
|
|
503
503
|
/** @license React v16.13.1
|
|
504
504
|
* react-is.production.min.js
|
|
505
505
|
*
|
|
@@ -511,71 +511,71 @@ var nr = { exports: {} }, Fe = { exports: {} }, I = {};
|
|
|
511
511
|
var gr;
|
|
512
512
|
function dn() {
|
|
513
513
|
if (gr)
|
|
514
|
-
return
|
|
514
|
+
return F;
|
|
515
515
|
gr = 1;
|
|
516
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113,
|
|
517
|
-
function
|
|
518
|
-
if (typeof
|
|
519
|
-
var
|
|
520
|
-
switch (
|
|
516
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, w = e ? Symbol.for("react.block") : 60121, L = e ? Symbol.for("react.fundamental") : 60117, k = e ? Symbol.for("react.responder") : 60118, K = e ? Symbol.for("react.scope") : 60119;
|
|
517
|
+
function A(f) {
|
|
518
|
+
if (typeof f == "object" && f !== null) {
|
|
519
|
+
var Z = f.$$typeof;
|
|
520
|
+
switch (Z) {
|
|
521
521
|
case r:
|
|
522
|
-
switch (
|
|
522
|
+
switch (f = f.type, f) {
|
|
523
523
|
case v:
|
|
524
524
|
case c:
|
|
525
525
|
case n:
|
|
526
526
|
case o:
|
|
527
527
|
case a:
|
|
528
528
|
case g:
|
|
529
|
-
return
|
|
529
|
+
return f;
|
|
530
530
|
default:
|
|
531
|
-
switch (
|
|
531
|
+
switch (f = f && f.$$typeof, f) {
|
|
532
532
|
case i:
|
|
533
533
|
case y:
|
|
534
|
-
case
|
|
535
|
-
case
|
|
534
|
+
case O:
|
|
535
|
+
case S:
|
|
536
536
|
case s:
|
|
537
|
-
return
|
|
537
|
+
return f;
|
|
538
538
|
default:
|
|
539
|
-
return
|
|
539
|
+
return Z;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
542
|
case t:
|
|
543
|
-
return
|
|
543
|
+
return Z;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function
|
|
548
|
-
return
|
|
547
|
+
function N(f) {
|
|
548
|
+
return A(f) === c;
|
|
549
549
|
}
|
|
550
|
-
return
|
|
551
|
-
return
|
|
552
|
-
},
|
|
553
|
-
return
|
|
554
|
-
},
|
|
555
|
-
return
|
|
556
|
-
},
|
|
557
|
-
return typeof
|
|
558
|
-
},
|
|
559
|
-
return
|
|
560
|
-
},
|
|
561
|
-
return
|
|
562
|
-
},
|
|
563
|
-
return
|
|
564
|
-
},
|
|
565
|
-
return
|
|
566
|
-
},
|
|
567
|
-
return
|
|
568
|
-
},
|
|
569
|
-
return
|
|
570
|
-
},
|
|
571
|
-
return
|
|
572
|
-
},
|
|
573
|
-
return
|
|
574
|
-
},
|
|
575
|
-
return typeof
|
|
576
|
-
},
|
|
577
|
-
}
|
|
578
|
-
var
|
|
550
|
+
return F.AsyncMode = v, F.ConcurrentMode = c, F.ContextConsumer = i, F.ContextProvider = s, F.Element = r, F.ForwardRef = y, F.Fragment = n, F.Lazy = O, F.Memo = S, F.Portal = t, F.Profiler = o, F.StrictMode = a, F.Suspense = g, F.isAsyncMode = function(f) {
|
|
551
|
+
return N(f) || A(f) === v;
|
|
552
|
+
}, F.isConcurrentMode = N, F.isContextConsumer = function(f) {
|
|
553
|
+
return A(f) === i;
|
|
554
|
+
}, F.isContextProvider = function(f) {
|
|
555
|
+
return A(f) === s;
|
|
556
|
+
}, F.isElement = function(f) {
|
|
557
|
+
return typeof f == "object" && f !== null && f.$$typeof === r;
|
|
558
|
+
}, F.isForwardRef = function(f) {
|
|
559
|
+
return A(f) === y;
|
|
560
|
+
}, F.isFragment = function(f) {
|
|
561
|
+
return A(f) === n;
|
|
562
|
+
}, F.isLazy = function(f) {
|
|
563
|
+
return A(f) === O;
|
|
564
|
+
}, F.isMemo = function(f) {
|
|
565
|
+
return A(f) === S;
|
|
566
|
+
}, F.isPortal = function(f) {
|
|
567
|
+
return A(f) === t;
|
|
568
|
+
}, F.isProfiler = function(f) {
|
|
569
|
+
return A(f) === o;
|
|
570
|
+
}, F.isStrictMode = function(f) {
|
|
571
|
+
return A(f) === a;
|
|
572
|
+
}, F.isSuspense = function(f) {
|
|
573
|
+
return A(f) === g;
|
|
574
|
+
}, F.isValidElementType = function(f) {
|
|
575
|
+
return typeof f == "string" || typeof f == "function" || f === n || f === c || f === o || f === a || f === g || f === h || typeof f == "object" && f !== null && (f.$$typeof === O || f.$$typeof === S || f.$$typeof === s || f.$$typeof === i || f.$$typeof === y || f.$$typeof === L || f.$$typeof === k || f.$$typeof === K || f.$$typeof === w);
|
|
576
|
+
}, F.typeOf = A, F;
|
|
577
|
+
}
|
|
578
|
+
var j = {};
|
|
579
579
|
/** @license React v16.13.1
|
|
580
580
|
* react-is.development.js
|
|
581
581
|
*
|
|
@@ -587,17 +587,17 @@ var F = {};
|
|
|
587
587
|
var br;
|
|
588
588
|
function mn() {
|
|
589
589
|
return br || (br = 1, process.env.NODE_ENV !== "production" && function() {
|
|
590
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113,
|
|
591
|
-
function
|
|
592
|
-
return typeof
|
|
593
|
-
|
|
594
|
-
}
|
|
595
|
-
function
|
|
596
|
-
if (typeof
|
|
597
|
-
var
|
|
598
|
-
switch (
|
|
590
|
+
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, o = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, v = e ? Symbol.for("react.async_mode") : 60111, c = e ? Symbol.for("react.concurrent_mode") : 60111, y = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, h = e ? Symbol.for("react.suspense_list") : 60120, S = e ? Symbol.for("react.memo") : 60115, O = e ? Symbol.for("react.lazy") : 60116, w = e ? Symbol.for("react.block") : 60121, L = e ? Symbol.for("react.fundamental") : 60117, k = e ? Symbol.for("react.responder") : 60118, K = e ? Symbol.for("react.scope") : 60119;
|
|
591
|
+
function A(p) {
|
|
592
|
+
return typeof p == "string" || typeof p == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
593
|
+
p === n || p === c || p === o || p === a || p === g || p === h || typeof p == "object" && p !== null && (p.$$typeof === O || p.$$typeof === S || p.$$typeof === s || p.$$typeof === i || p.$$typeof === y || p.$$typeof === L || p.$$typeof === k || p.$$typeof === K || p.$$typeof === w);
|
|
594
|
+
}
|
|
595
|
+
function N(p) {
|
|
596
|
+
if (typeof p == "object" && p !== null) {
|
|
597
|
+
var Q = p.$$typeof;
|
|
598
|
+
switch (Q) {
|
|
599
599
|
case r:
|
|
600
|
-
var de =
|
|
600
|
+
var de = p.type;
|
|
601
601
|
switch (de) {
|
|
602
602
|
case v:
|
|
603
603
|
case c:
|
|
@@ -611,61 +611,61 @@ function mn() {
|
|
|
611
611
|
switch (Te) {
|
|
612
612
|
case i:
|
|
613
613
|
case y:
|
|
614
|
-
case
|
|
615
|
-
case
|
|
614
|
+
case O:
|
|
615
|
+
case S:
|
|
616
616
|
case s:
|
|
617
617
|
return Te;
|
|
618
618
|
default:
|
|
619
|
-
return
|
|
619
|
+
return Q;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
622
|
case t:
|
|
623
|
-
return
|
|
623
|
+
return Q;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
var
|
|
628
|
-
function U(
|
|
629
|
-
return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), l(
|
|
627
|
+
var f = v, Z = c, $ = i, V = s, X = r, ce = y, fe = n, pe = O, le = S, z = t, J = o, te = a, oe = g, ue = !1;
|
|
628
|
+
function U(p) {
|
|
629
|
+
return ue || (ue = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), l(p) || N(p) === v;
|
|
630
630
|
}
|
|
631
|
-
function l(
|
|
632
|
-
return
|
|
631
|
+
function l(p) {
|
|
632
|
+
return N(p) === c;
|
|
633
633
|
}
|
|
634
|
-
function m(
|
|
635
|
-
return
|
|
634
|
+
function m(p) {
|
|
635
|
+
return N(p) === i;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
return
|
|
637
|
+
function T(p) {
|
|
638
|
+
return N(p) === s;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
return typeof
|
|
640
|
+
function x(p) {
|
|
641
|
+
return typeof p == "object" && p !== null && p.$$typeof === r;
|
|
642
642
|
}
|
|
643
|
-
function
|
|
644
|
-
return
|
|
643
|
+
function _(p) {
|
|
644
|
+
return N(p) === y;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
646
|
+
function P(p) {
|
|
647
|
+
return N(p) === n;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
649
|
+
function E(p) {
|
|
650
|
+
return N(p) === O;
|
|
651
651
|
}
|
|
652
|
-
function C(
|
|
653
|
-
return
|
|
652
|
+
function C(p) {
|
|
653
|
+
return N(p) === S;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
655
|
+
function I(p) {
|
|
656
|
+
return N(p) === t;
|
|
657
657
|
}
|
|
658
|
-
function R(
|
|
659
|
-
return
|
|
658
|
+
function R(p) {
|
|
659
|
+
return N(p) === o;
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
return
|
|
661
|
+
function D(p) {
|
|
662
|
+
return N(p) === a;
|
|
663
663
|
}
|
|
664
|
-
function q(
|
|
665
|
-
return
|
|
664
|
+
function q(p) {
|
|
665
|
+
return N(p) === g;
|
|
666
666
|
}
|
|
667
|
-
|
|
668
|
-
}()),
|
|
667
|
+
j.AsyncMode = f, j.ConcurrentMode = Z, j.ContextConsumer = $, j.ContextProvider = V, j.Element = X, j.ForwardRef = ce, j.Fragment = fe, j.Lazy = pe, j.Memo = le, j.Portal = z, j.Profiler = J, j.StrictMode = te, j.Suspense = oe, j.isAsyncMode = U, j.isConcurrentMode = l, j.isContextConsumer = m, j.isContextProvider = T, j.isElement = x, j.isForwardRef = _, j.isFragment = P, j.isLazy = E, j.isMemo = C, j.isPortal = I, j.isProfiler = R, j.isStrictMode = D, j.isSuspense = q, j.isValidElementType = A, j.typeOf = N;
|
|
668
|
+
}()), j;
|
|
669
669
|
}
|
|
670
670
|
var hr;
|
|
671
671
|
function Ur() {
|
|
@@ -716,8 +716,8 @@ function vn() {
|
|
|
716
716
|
r.call(i, g) && (v[g] = i[g]);
|
|
717
717
|
if (e) {
|
|
718
718
|
c = e(i);
|
|
719
|
-
for (var
|
|
720
|
-
t.call(i, c[
|
|
719
|
+
for (var h = 0; h < c.length; h++)
|
|
720
|
+
t.call(i, c[h]) && (v[c[h]] = i[c[h]]);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
723
|
return v;
|
|
@@ -735,11 +735,11 @@ var Je, wr;
|
|
|
735
735
|
function Gr() {
|
|
736
736
|
return wr || (wr = 1, Je = Function.call.bind(Object.prototype.hasOwnProperty)), Je;
|
|
737
737
|
}
|
|
738
|
-
var Ze,
|
|
738
|
+
var Ze, Sr;
|
|
739
739
|
function yn() {
|
|
740
|
-
if (
|
|
740
|
+
if (Sr)
|
|
741
741
|
return Ze;
|
|
742
|
-
|
|
742
|
+
Sr = 1;
|
|
743
743
|
var e = function() {
|
|
744
744
|
};
|
|
745
745
|
if (process.env.NODE_ENV !== "production") {
|
|
@@ -760,22 +760,22 @@ function yn() {
|
|
|
760
760
|
var g;
|
|
761
761
|
try {
|
|
762
762
|
if (typeof o[y] != "function") {
|
|
763
|
-
var
|
|
763
|
+
var h = Error(
|
|
764
764
|
(v || "React class") + ": " + i + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
765
765
|
);
|
|
766
|
-
throw
|
|
766
|
+
throw h.name = "Invariant Violation", h;
|
|
767
767
|
}
|
|
768
768
|
g = o[y](s, y, v, i, null, r);
|
|
769
|
-
} catch (
|
|
770
|
-
g =
|
|
769
|
+
} catch (O) {
|
|
770
|
+
g = O;
|
|
771
771
|
}
|
|
772
772
|
if (g && !(g instanceof Error) && e(
|
|
773
773
|
(v || "React class") + ": type specification of " + i + " `" + y + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof g + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
774
774
|
), g instanceof Error && !(g.message in t)) {
|
|
775
775
|
t[g.message] = !0;
|
|
776
|
-
var
|
|
776
|
+
var S = c ? c() : "";
|
|
777
777
|
e(
|
|
778
|
-
"Failed " + i + " type: " + g.message + (
|
|
778
|
+
"Failed " + i + " type: " + g.message + (S ?? "")
|
|
779
779
|
);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
@@ -785,11 +785,11 @@ function yn() {
|
|
|
785
785
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
786
786
|
}, Ze = a, Ze;
|
|
787
787
|
}
|
|
788
|
-
var Xe,
|
|
788
|
+
var Xe, Tr;
|
|
789
789
|
function gn() {
|
|
790
|
-
if (
|
|
790
|
+
if (Tr)
|
|
791
791
|
return Xe;
|
|
792
|
-
|
|
792
|
+
Tr = 1;
|
|
793
793
|
var e = Ur(), r = vn(), t = fr(), n = Gr(), a = yn(), o = function() {
|
|
794
794
|
};
|
|
795
795
|
process.env.NODE_ENV !== "production" && (o = function(i) {
|
|
@@ -810,230 +810,230 @@ function gn() {
|
|
|
810
810
|
if (typeof m == "function")
|
|
811
811
|
return m;
|
|
812
812
|
}
|
|
813
|
-
var
|
|
814
|
-
array:
|
|
815
|
-
bigint:
|
|
816
|
-
bool:
|
|
817
|
-
func:
|
|
818
|
-
number:
|
|
819
|
-
object:
|
|
820
|
-
string:
|
|
821
|
-
symbol:
|
|
822
|
-
any:
|
|
823
|
-
arrayOf:
|
|
824
|
-
element:
|
|
825
|
-
elementType:
|
|
826
|
-
instanceOf:
|
|
813
|
+
var h = "<<anonymous>>", S = {
|
|
814
|
+
array: k("array"),
|
|
815
|
+
bigint: k("bigint"),
|
|
816
|
+
bool: k("boolean"),
|
|
817
|
+
func: k("function"),
|
|
818
|
+
number: k("number"),
|
|
819
|
+
object: k("object"),
|
|
820
|
+
string: k("string"),
|
|
821
|
+
symbol: k("symbol"),
|
|
822
|
+
any: K(),
|
|
823
|
+
arrayOf: A,
|
|
824
|
+
element: N(),
|
|
825
|
+
elementType: f(),
|
|
826
|
+
instanceOf: Z,
|
|
827
827
|
node: ce(),
|
|
828
828
|
objectOf: V,
|
|
829
829
|
oneOf: $,
|
|
830
|
-
oneOfType:
|
|
830
|
+
oneOfType: X,
|
|
831
831
|
shape: pe,
|
|
832
832
|
exact: le
|
|
833
833
|
};
|
|
834
|
-
function
|
|
834
|
+
function O(l, m) {
|
|
835
835
|
return l === m ? l !== 0 || 1 / l === 1 / m : l !== l && m !== m;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function w(l, m) {
|
|
838
838
|
this.message = l, this.data = m && typeof m == "object" ? m : {}, this.stack = "";
|
|
839
839
|
}
|
|
840
|
-
|
|
841
|
-
function
|
|
840
|
+
w.prototype = Error.prototype;
|
|
841
|
+
function L(l) {
|
|
842
842
|
if (process.env.NODE_ENV !== "production")
|
|
843
|
-
var m = {},
|
|
844
|
-
function
|
|
845
|
-
if (
|
|
843
|
+
var m = {}, T = 0;
|
|
844
|
+
function x(P, E, C, I, R, D, q) {
|
|
845
|
+
if (I = I || h, D = D || C, q !== t) {
|
|
846
846
|
if (v) {
|
|
847
|
-
var
|
|
847
|
+
var p = new Error(
|
|
848
848
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
849
849
|
);
|
|
850
|
-
throw
|
|
850
|
+
throw p.name = "Invariant Violation", p;
|
|
851
851
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
852
|
-
var
|
|
853
|
-
!m[
|
|
854
|
-
|
|
855
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
856
|
-
), m[
|
|
852
|
+
var Q = I + ":" + C;
|
|
853
|
+
!m[Q] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
854
|
+
T < 3 && (o(
|
|
855
|
+
"You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + I + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
856
|
+
), m[Q] = !0, T++);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
return
|
|
859
|
+
return E[C] == null ? P ? E[C] === null ? new w("The " + R + " `" + D + "` is marked as required " + ("in `" + I + "`, but its value is `null`.")) : new w("The " + R + " `" + D + "` is marked as required in " + ("`" + I + "`, but its value is `undefined`.")) : null : l(E, C, I, R, D);
|
|
860
860
|
}
|
|
861
|
-
var
|
|
862
|
-
return
|
|
861
|
+
var _ = x.bind(null, !1);
|
|
862
|
+
return _.isRequired = x.bind(null, !0), _;
|
|
863
863
|
}
|
|
864
|
-
function
|
|
865
|
-
function m(
|
|
866
|
-
var
|
|
864
|
+
function k(l) {
|
|
865
|
+
function m(T, x, _, P, E, C) {
|
|
866
|
+
var I = T[x], R = te(I);
|
|
867
867
|
if (R !== l) {
|
|
868
|
-
var
|
|
869
|
-
return new
|
|
870
|
-
"Invalid " +
|
|
868
|
+
var D = oe(I);
|
|
869
|
+
return new w(
|
|
870
|
+
"Invalid " + P + " `" + E + "` of type " + ("`" + D + "` supplied to `" + _ + "`, expected ") + ("`" + l + "`."),
|
|
871
871
|
{ expectedType: l }
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
874
|
return null;
|
|
875
875
|
}
|
|
876
|
-
return
|
|
876
|
+
return L(m);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
return
|
|
878
|
+
function K() {
|
|
879
|
+
return L(s);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
function m(
|
|
881
|
+
function A(l) {
|
|
882
|
+
function m(T, x, _, P, E) {
|
|
883
883
|
if (typeof l != "function")
|
|
884
|
-
return new
|
|
885
|
-
var C = x
|
|
884
|
+
return new w("Property `" + E + "` of component `" + _ + "` has invalid PropType notation inside arrayOf.");
|
|
885
|
+
var C = T[x];
|
|
886
886
|
if (!Array.isArray(C)) {
|
|
887
|
-
var
|
|
888
|
-
return new
|
|
887
|
+
var I = te(C);
|
|
888
|
+
return new w("Invalid " + P + " `" + E + "` of type " + ("`" + I + "` supplied to `" + _ + "`, expected an array."));
|
|
889
889
|
}
|
|
890
890
|
for (var R = 0; R < C.length; R++) {
|
|
891
|
-
var
|
|
892
|
-
if (
|
|
893
|
-
return
|
|
891
|
+
var D = l(C, R, _, P, E + "[" + R + "]", t);
|
|
892
|
+
if (D instanceof Error)
|
|
893
|
+
return D;
|
|
894
894
|
}
|
|
895
895
|
return null;
|
|
896
896
|
}
|
|
897
|
-
return
|
|
898
|
-
}
|
|
899
|
-
function
|
|
900
|
-
function l(m,
|
|
901
|
-
var
|
|
902
|
-
if (!i(
|
|
903
|
-
var C = te(
|
|
904
|
-
return new
|
|
897
|
+
return L(m);
|
|
898
|
+
}
|
|
899
|
+
function N() {
|
|
900
|
+
function l(m, T, x, _, P) {
|
|
901
|
+
var E = m[T];
|
|
902
|
+
if (!i(E)) {
|
|
903
|
+
var C = te(E);
|
|
904
|
+
return new w("Invalid " + _ + " `" + P + "` of type " + ("`" + C + "` supplied to `" + x + "`, expected a single ReactElement."));
|
|
905
905
|
}
|
|
906
906
|
return null;
|
|
907
907
|
}
|
|
908
|
-
return
|
|
909
|
-
}
|
|
910
|
-
function
|
|
911
|
-
function l(m,
|
|
912
|
-
var
|
|
913
|
-
if (!e.isValidElementType(
|
|
914
|
-
var C = te(
|
|
915
|
-
return new
|
|
908
|
+
return L(l);
|
|
909
|
+
}
|
|
910
|
+
function f() {
|
|
911
|
+
function l(m, T, x, _, P) {
|
|
912
|
+
var E = m[T];
|
|
913
|
+
if (!e.isValidElementType(E)) {
|
|
914
|
+
var C = te(E);
|
|
915
|
+
return new w("Invalid " + _ + " `" + P + "` of type " + ("`" + C + "` supplied to `" + x + "`, expected a single ReactElement type."));
|
|
916
916
|
}
|
|
917
917
|
return null;
|
|
918
918
|
}
|
|
919
|
-
return
|
|
919
|
+
return L(l);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
function m(
|
|
923
|
-
if (!(x
|
|
924
|
-
var C = l.name ||
|
|
925
|
-
return new
|
|
921
|
+
function Z(l) {
|
|
922
|
+
function m(T, x, _, P, E) {
|
|
923
|
+
if (!(T[x] instanceof l)) {
|
|
924
|
+
var C = l.name || h, I = U(T[x]);
|
|
925
|
+
return new w("Invalid " + P + " `" + E + "` of type " + ("`" + I + "` supplied to `" + _ + "`, expected ") + ("instance of `" + C + "`."));
|
|
926
926
|
}
|
|
927
927
|
return null;
|
|
928
928
|
}
|
|
929
|
-
return
|
|
929
|
+
return L(m);
|
|
930
930
|
}
|
|
931
931
|
function $(l) {
|
|
932
932
|
if (!Array.isArray(l))
|
|
933
933
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
934
934
|
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
935
935
|
) : o("Invalid argument supplied to oneOf, expected an array.")), s;
|
|
936
|
-
function m(
|
|
937
|
-
for (var C = x
|
|
938
|
-
if (
|
|
936
|
+
function m(T, x, _, P, E) {
|
|
937
|
+
for (var C = T[x], I = 0; I < l.length; I++)
|
|
938
|
+
if (O(C, l[I]))
|
|
939
939
|
return null;
|
|
940
|
-
var R = JSON.stringify(l, function(q,
|
|
941
|
-
var
|
|
942
|
-
return
|
|
940
|
+
var R = JSON.stringify(l, function(q, p) {
|
|
941
|
+
var Q = oe(p);
|
|
942
|
+
return Q === "symbol" ? String(p) : p;
|
|
943
943
|
});
|
|
944
|
-
return new
|
|
944
|
+
return new w("Invalid " + P + " `" + E + "` of value `" + String(C) + "` " + ("supplied to `" + _ + "`, expected one of " + R + "."));
|
|
945
945
|
}
|
|
946
|
-
return
|
|
946
|
+
return L(m);
|
|
947
947
|
}
|
|
948
948
|
function V(l) {
|
|
949
|
-
function m(
|
|
949
|
+
function m(T, x, _, P, E) {
|
|
950
950
|
if (typeof l != "function")
|
|
951
|
-
return new
|
|
952
|
-
var C = x
|
|
953
|
-
if (
|
|
954
|
-
return new
|
|
951
|
+
return new w("Property `" + E + "` of component `" + _ + "` has invalid PropType notation inside objectOf.");
|
|
952
|
+
var C = T[x], I = te(C);
|
|
953
|
+
if (I !== "object")
|
|
954
|
+
return new w("Invalid " + P + " `" + E + "` of type " + ("`" + I + "` supplied to `" + _ + "`, expected an object."));
|
|
955
955
|
for (var R in C)
|
|
956
956
|
if (n(C, R)) {
|
|
957
|
-
var
|
|
958
|
-
if (
|
|
959
|
-
return
|
|
957
|
+
var D = l(C, R, _, P, E + "." + R, t);
|
|
958
|
+
if (D instanceof Error)
|
|
959
|
+
return D;
|
|
960
960
|
}
|
|
961
961
|
return null;
|
|
962
962
|
}
|
|
963
|
-
return
|
|
963
|
+
return L(m);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function X(l) {
|
|
966
966
|
if (!Array.isArray(l))
|
|
967
967
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
968
968
|
for (var m = 0; m < l.length; m++) {
|
|
969
|
-
var
|
|
970
|
-
if (typeof
|
|
969
|
+
var T = l[m];
|
|
970
|
+
if (typeof T != "function")
|
|
971
971
|
return o(
|
|
972
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue(
|
|
972
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue(T) + " at index " + m + "."
|
|
973
973
|
), s;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
for (var R = [],
|
|
977
|
-
var q = l[
|
|
978
|
-
if (
|
|
975
|
+
function x(_, P, E, C, I) {
|
|
976
|
+
for (var R = [], D = 0; D < l.length; D++) {
|
|
977
|
+
var q = l[D], p = q(_, P, E, C, I, t);
|
|
978
|
+
if (p == null)
|
|
979
979
|
return null;
|
|
980
|
-
|
|
980
|
+
p.data && n(p.data, "expectedType") && R.push(p.data.expectedType);
|
|
981
981
|
}
|
|
982
|
-
var
|
|
983
|
-
return new
|
|
982
|
+
var Q = R.length > 0 ? ", expected one of type [" + R.join(", ") + "]" : "";
|
|
983
|
+
return new w("Invalid " + C + " `" + I + "` supplied to " + ("`" + E + "`" + Q + "."));
|
|
984
984
|
}
|
|
985
|
-
return
|
|
985
|
+
return L(x);
|
|
986
986
|
}
|
|
987
987
|
function ce() {
|
|
988
|
-
function l(m,
|
|
989
|
-
return z(m[
|
|
988
|
+
function l(m, T, x, _, P) {
|
|
989
|
+
return z(m[T]) ? null : new w("Invalid " + _ + " `" + P + "` supplied to " + ("`" + x + "`, expected a ReactNode."));
|
|
990
990
|
}
|
|
991
|
-
return
|
|
991
|
+
return L(l);
|
|
992
992
|
}
|
|
993
|
-
function fe(l, m,
|
|
994
|
-
return new
|
|
995
|
-
(l || "React class") + ": " + m + " type `" +
|
|
993
|
+
function fe(l, m, T, x, _) {
|
|
994
|
+
return new w(
|
|
995
|
+
(l || "React class") + ": " + m + " type `" + T + "." + x + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + _ + "`."
|
|
996
996
|
);
|
|
997
997
|
}
|
|
998
998
|
function pe(l) {
|
|
999
|
-
function m(
|
|
1000
|
-
var C = x
|
|
1001
|
-
if (
|
|
1002
|
-
return new
|
|
999
|
+
function m(T, x, _, P, E) {
|
|
1000
|
+
var C = T[x], I = te(C);
|
|
1001
|
+
if (I !== "object")
|
|
1002
|
+
return new w("Invalid " + P + " `" + E + "` of type `" + I + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
1003
1003
|
for (var R in l) {
|
|
1004
|
-
var
|
|
1005
|
-
if (typeof
|
|
1006
|
-
return fe(
|
|
1007
|
-
var q =
|
|
1004
|
+
var D = l[R];
|
|
1005
|
+
if (typeof D != "function")
|
|
1006
|
+
return fe(_, P, E, R, oe(D));
|
|
1007
|
+
var q = D(C, R, _, P, E + "." + R, t);
|
|
1008
1008
|
if (q)
|
|
1009
1009
|
return q;
|
|
1010
1010
|
}
|
|
1011
1011
|
return null;
|
|
1012
1012
|
}
|
|
1013
|
-
return
|
|
1013
|
+
return L(m);
|
|
1014
1014
|
}
|
|
1015
1015
|
function le(l) {
|
|
1016
|
-
function m(
|
|
1017
|
-
var C = x
|
|
1018
|
-
if (
|
|
1019
|
-
return new
|
|
1020
|
-
var R = r({}, x
|
|
1021
|
-
for (var
|
|
1022
|
-
var q = l[
|
|
1023
|
-
if (n(l,
|
|
1024
|
-
return fe(
|
|
1016
|
+
function m(T, x, _, P, E) {
|
|
1017
|
+
var C = T[x], I = te(C);
|
|
1018
|
+
if (I !== "object")
|
|
1019
|
+
return new w("Invalid " + P + " `" + E + "` of type `" + I + "` " + ("supplied to `" + _ + "`, expected `object`."));
|
|
1020
|
+
var R = r({}, T[x], l);
|
|
1021
|
+
for (var D in R) {
|
|
1022
|
+
var q = l[D];
|
|
1023
|
+
if (n(l, D) && typeof q != "function")
|
|
1024
|
+
return fe(_, P, E, D, oe(q));
|
|
1025
1025
|
if (!q)
|
|
1026
|
-
return new
|
|
1027
|
-
"Invalid " +
|
|
1026
|
+
return new w(
|
|
1027
|
+
"Invalid " + P + " `" + E + "` key `" + D + "` supplied to `" + _ + "`.\nBad object: " + JSON.stringify(T[x], null, " ") + `
|
|
1028
1028
|
Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
1029
1029
|
);
|
|
1030
|
-
var
|
|
1031
|
-
if (
|
|
1032
|
-
return
|
|
1030
|
+
var p = q(C, D, _, P, E + "." + D, t);
|
|
1031
|
+
if (p)
|
|
1032
|
+
return p;
|
|
1033
1033
|
}
|
|
1034
1034
|
return null;
|
|
1035
1035
|
}
|
|
1036
|
-
return
|
|
1036
|
+
return L(m);
|
|
1037
1037
|
}
|
|
1038
1038
|
function z(l) {
|
|
1039
1039
|
switch (typeof l) {
|
|
@@ -1050,15 +1050,15 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
1050
1050
|
return !0;
|
|
1051
1051
|
var m = g(l);
|
|
1052
1052
|
if (m) {
|
|
1053
|
-
var
|
|
1053
|
+
var T = m.call(l), x;
|
|
1054
1054
|
if (m !== l.entries) {
|
|
1055
|
-
for (; !(
|
|
1056
|
-
if (!z(
|
|
1055
|
+
for (; !(x = T.next()).done; )
|
|
1056
|
+
if (!z(x.value))
|
|
1057
1057
|
return !1;
|
|
1058
1058
|
} else
|
|
1059
|
-
for (; !(
|
|
1060
|
-
var
|
|
1061
|
-
if (
|
|
1059
|
+
for (; !(x = T.next()).done; ) {
|
|
1060
|
+
var _ = x.value;
|
|
1061
|
+
if (_ && !z(_[1]))
|
|
1062
1062
|
return !1;
|
|
1063
1063
|
}
|
|
1064
1064
|
} else
|
|
@@ -1075,7 +1075,7 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
1075
1075
|
var m = typeof l;
|
|
1076
1076
|
return Array.isArray(l) ? "array" : l instanceof RegExp ? "object" : J(m, l) ? "symbol" : m;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function oe(l) {
|
|
1079
1079
|
if (typeof l > "u" || l === null)
|
|
1080
1080
|
return "" + l;
|
|
1081
1081
|
var m = te(l);
|
|
@@ -1088,7 +1088,7 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
1088
1088
|
return m;
|
|
1089
1089
|
}
|
|
1090
1090
|
function ue(l) {
|
|
1091
|
-
var m =
|
|
1091
|
+
var m = oe(l);
|
|
1092
1092
|
switch (m) {
|
|
1093
1093
|
case "array":
|
|
1094
1094
|
case "object":
|
|
@@ -1102,16 +1102,16 @@ Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
1104
|
function U(l) {
|
|
1105
|
-
return !l.constructor || !l.constructor.name ?
|
|
1105
|
+
return !l.constructor || !l.constructor.name ? h : l.constructor.name;
|
|
1106
1106
|
}
|
|
1107
|
-
return
|
|
1107
|
+
return S.checkPropTypes = a, S.resetWarningCache = a.resetWarningCache, S.PropTypes = S, S;
|
|
1108
1108
|
}, Xe;
|
|
1109
1109
|
}
|
|
1110
|
-
var Qe,
|
|
1110
|
+
var Qe, xr;
|
|
1111
1111
|
function bn() {
|
|
1112
|
-
if (
|
|
1112
|
+
if (xr)
|
|
1113
1113
|
return Qe;
|
|
1114
|
-
|
|
1114
|
+
xr = 1;
|
|
1115
1115
|
var e = fr();
|
|
1116
1116
|
function r() {
|
|
1117
1117
|
}
|
|
@@ -1120,10 +1120,10 @@ function bn() {
|
|
|
1120
1120
|
return t.resetWarningCache = r, Qe = function() {
|
|
1121
1121
|
function n(s, i, v, c, y, g) {
|
|
1122
1122
|
if (g !== e) {
|
|
1123
|
-
var
|
|
1123
|
+
var h = new Error(
|
|
1124
1124
|
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1125
1125
|
);
|
|
1126
|
-
throw
|
|
1126
|
+
throw h.name = "Invariant Violation", h;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
1129
|
n.isRequired = n;
|
|
@@ -1162,8 +1162,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
1162
1162
|
} else
|
|
1163
1163
|
nr.exports = bn()();
|
|
1164
1164
|
var En = nr.exports;
|
|
1165
|
-
const
|
|
1166
|
-
function
|
|
1165
|
+
const M = /* @__PURE__ */ Lr(En);
|
|
1166
|
+
function we(e, r, t, n) {
|
|
1167
1167
|
function a(o) {
|
|
1168
1168
|
return o instanceof t ? o : new t(function(s) {
|
|
1169
1169
|
s(o);
|
|
@@ -1190,7 +1190,7 @@ function Ee(e, r, t, n) {
|
|
|
1190
1190
|
c((n = n.apply(e, r || [])).next());
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
|
-
function
|
|
1193
|
+
function Se(e, r) {
|
|
1194
1194
|
var t = { label: 0, sent: function() {
|
|
1195
1195
|
if (o[0] & 1)
|
|
1196
1196
|
throw o[1];
|
|
@@ -1366,7 +1366,7 @@ var wn = /* @__PURE__ */ new Map([
|
|
|
1366
1366
|
["msg", "application/vnd.ms-outlook"]
|
|
1367
1367
|
]);
|
|
1368
1368
|
function Ae(e, r) {
|
|
1369
|
-
var t =
|
|
1369
|
+
var t = Sn(e);
|
|
1370
1370
|
if (typeof t.path != "string") {
|
|
1371
1371
|
var n = e.webkitRelativePath;
|
|
1372
1372
|
Object.defineProperty(t, "path", {
|
|
@@ -1378,7 +1378,7 @@ function Ae(e, r) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
return t;
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1381
|
+
function Sn(e) {
|
|
1382
1382
|
var r = e.name, t = r && r.lastIndexOf(".") !== -1;
|
|
1383
1383
|
if (t && !e.type) {
|
|
1384
1384
|
var n = r.split(".").pop().toLowerCase(), a = wn.get(n);
|
|
@@ -1391,15 +1391,15 @@ function Tn(e) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
return e;
|
|
1393
1393
|
}
|
|
1394
|
-
var
|
|
1394
|
+
var Tn = [
|
|
1395
1395
|
// Thumbnail cache files for macOS and Windows
|
|
1396
1396
|
".DS_Store",
|
|
1397
1397
|
"Thumbs.db"
|
|
1398
1398
|
// Windows
|
|
1399
1399
|
];
|
|
1400
|
-
function
|
|
1401
|
-
return
|
|
1402
|
-
return
|
|
1400
|
+
function xn(e) {
|
|
1401
|
+
return we(this, void 0, void 0, function() {
|
|
1402
|
+
return Se(this, function(r) {
|
|
1403
1403
|
return Ne(e) && Cn(e.dataTransfer) ? [2, Pn(e.dataTransfer, e.type)] : On(e) ? [2, Dn(e)] : Array.isArray(e) && e.every(function(t) {
|
|
1404
1404
|
return "getFile" in t && typeof t.getFile == "function";
|
|
1405
1405
|
}) ? [2, An(e)] : [2, []];
|
|
@@ -1421,9 +1421,9 @@ function Dn(e) {
|
|
|
1421
1421
|
});
|
|
1422
1422
|
}
|
|
1423
1423
|
function An(e) {
|
|
1424
|
-
return
|
|
1424
|
+
return we(this, void 0, void 0, function() {
|
|
1425
1425
|
var r;
|
|
1426
|
-
return
|
|
1426
|
+
return Se(this, function(t) {
|
|
1427
1427
|
switch (t.label) {
|
|
1428
1428
|
case 0:
|
|
1429
1429
|
return [4, Promise.all(e.map(function(n) {
|
|
@@ -1438,14 +1438,14 @@ function An(e) {
|
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
1440
1440
|
function Pn(e, r) {
|
|
1441
|
-
return
|
|
1441
|
+
return we(this, void 0, void 0, function() {
|
|
1442
1442
|
var t, n;
|
|
1443
|
-
return
|
|
1443
|
+
return Se(this, function(a) {
|
|
1444
1444
|
switch (a.label) {
|
|
1445
1445
|
case 0:
|
|
1446
1446
|
return e.items ? (t = or(e.items).filter(function(o) {
|
|
1447
1447
|
return o.kind === "file";
|
|
1448
|
-
}), r !== "drop" ? [2, t] : [4, Promise.all(t.map(
|
|
1448
|
+
}), r !== "drop" ? [2, t] : [4, Promise.all(t.map(In))]) : [3, 2];
|
|
1449
1449
|
case 1:
|
|
1450
1450
|
return n = a.sent(), [2, Dr(Vr(n))];
|
|
1451
1451
|
case 2:
|
|
@@ -1458,7 +1458,7 @@ function Pn(e, r) {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
function Dr(e) {
|
|
1460
1460
|
return e.filter(function(r) {
|
|
1461
|
-
return
|
|
1461
|
+
return Tn.indexOf(r.name) === -1;
|
|
1462
1462
|
});
|
|
1463
1463
|
}
|
|
1464
1464
|
function or(e) {
|
|
@@ -1470,7 +1470,7 @@ function or(e) {
|
|
|
1470
1470
|
}
|
|
1471
1471
|
return r;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function In(e) {
|
|
1474
1474
|
if (typeof e.webkitGetAsEntry != "function")
|
|
1475
1475
|
return Ar(e);
|
|
1476
1476
|
var r = e.webkitGetAsEntry();
|
|
@@ -1488,9 +1488,9 @@ function Ar(e) {
|
|
|
1488
1488
|
var t = Ae(r);
|
|
1489
1489
|
return Promise.resolve(t);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1492
|
-
return
|
|
1493
|
-
return
|
|
1491
|
+
function Rn(e) {
|
|
1492
|
+
return we(this, void 0, void 0, function() {
|
|
1493
|
+
return Se(this, function(r) {
|
|
1494
1494
|
return [2, e.isDirectory ? Jr(e) : Fn(e)];
|
|
1495
1495
|
});
|
|
1496
1496
|
});
|
|
@@ -1502,9 +1502,9 @@ function Jr(e) {
|
|
|
1502
1502
|
function o() {
|
|
1503
1503
|
var s = this;
|
|
1504
1504
|
r.readEntries(function(i) {
|
|
1505
|
-
return
|
|
1505
|
+
return we(s, void 0, void 0, function() {
|
|
1506
1506
|
var v, c, y;
|
|
1507
|
-
return
|
|
1507
|
+
return Se(this, function(g) {
|
|
1508
1508
|
switch (g.label) {
|
|
1509
1509
|
case 0:
|
|
1510
1510
|
if (i.length)
|
|
@@ -1519,7 +1519,7 @@ function Jr(e) {
|
|
|
1519
1519
|
case 4:
|
|
1520
1520
|
return [3, 6];
|
|
1521
1521
|
case 5:
|
|
1522
|
-
y = Promise.all(i.map(
|
|
1522
|
+
y = Promise.all(i.map(Rn)), a.push(y), o(), g.label = 6;
|
|
1523
1523
|
case 6:
|
|
1524
1524
|
return [
|
|
1525
1525
|
2
|
|
@@ -1536,8 +1536,8 @@ function Jr(e) {
|
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
1538
|
function Fn(e) {
|
|
1539
|
-
return
|
|
1540
|
-
return
|
|
1539
|
+
return we(this, void 0, void 0, function() {
|
|
1540
|
+
return Se(this, function(r) {
|
|
1541
1541
|
return [2, new Promise(function(t, n) {
|
|
1542
1542
|
e.file(function(a) {
|
|
1543
1543
|
var o = Ae(a, e.fullPath);
|
|
@@ -1574,7 +1574,7 @@ function $n(e) {
|
|
|
1574
1574
|
if (Array.isArray(e))
|
|
1575
1575
|
return ar(e);
|
|
1576
1576
|
}
|
|
1577
|
-
function
|
|
1577
|
+
function Ir(e, r) {
|
|
1578
1578
|
var t = Object.keys(e);
|
|
1579
1579
|
if (Object.getOwnPropertySymbols) {
|
|
1580
1580
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1584,12 +1584,12 @@ function Rr(e, r) {
|
|
|
1584
1584
|
}
|
|
1585
1585
|
return t;
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function Rr(e) {
|
|
1588
1588
|
for (var r = 1; r < arguments.length; r++) {
|
|
1589
1589
|
var t = arguments[r] != null ? arguments[r] : {};
|
|
1590
|
-
r % 2 ?
|
|
1590
|
+
r % 2 ? Ir(Object(t), !0).forEach(function(n) {
|
|
1591
1591
|
Zr(e, n, t[n]);
|
|
1592
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
1592
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Ir(Object(t)).forEach(function(n) {
|
|
1593
1593
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
@@ -1692,8 +1692,8 @@ function me(e) {
|
|
|
1692
1692
|
function Un(e) {
|
|
1693
1693
|
var r = e.files, t = e.accept, n = e.minSize, a = e.maxSize, o = e.multiple, s = e.maxFiles, i = e.validator;
|
|
1694
1694
|
return !o && r.length > 1 || o && s >= 1 && r.length > s ? !1 : r.every(function(v) {
|
|
1695
|
-
var c = Qr(v, t), y = Oe(c, 1), g = y[0],
|
|
1696
|
-
return g &&
|
|
1695
|
+
var c = Qr(v, t), y = Oe(c, 1), g = y[0], h = et(v, n, a), S = Oe(h, 1), O = S[0], w = i ? i(v) : null;
|
|
1696
|
+
return g && O && !w;
|
|
1697
1697
|
});
|
|
1698
1698
|
}
|
|
1699
1699
|
function $e(e) {
|
|
@@ -1717,7 +1717,7 @@ function Jn() {
|
|
|
1717
1717
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1718
1718
|
return Gn(e) || Vn(e);
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1720
|
+
function ae() {
|
|
1721
1721
|
for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
|
|
1722
1722
|
r[t] = arguments[t];
|
|
1723
1723
|
return function(n) {
|
|
@@ -1738,7 +1738,7 @@ function Xn(e) {
|
|
|
1738
1738
|
return rt(a) || (console.warn('Skipped "'.concat(a, '" 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.')), s = !1), (!Array.isArray(o) || !o.every(tt)) && (console.warn('Skipped "'.concat(a, '" because an invalid file extension was provided.')), s = !1), s;
|
|
1739
1739
|
}).reduce(function(t, n) {
|
|
1740
1740
|
var a = Oe(n, 2), o = a[0], s = a[1];
|
|
1741
|
-
return
|
|
1741
|
+
return Rr(Rr({}, t), {}, Zr({}, o, s));
|
|
1742
1742
|
}, {});
|
|
1743
1743
|
return [{
|
|
1744
1744
|
// description is required due to https://crbug.com/1264708
|
|
@@ -1889,7 +1889,7 @@ var pr = /* @__PURE__ */ mt(function(e, r) {
|
|
|
1889
1889
|
pr.displayName = "Dropzone";
|
|
1890
1890
|
var ot = {
|
|
1891
1891
|
disabled: !1,
|
|
1892
|
-
getFilesFromEvent:
|
|
1892
|
+
getFilesFromEvent: xn,
|
|
1893
1893
|
maxSize: 1 / 0,
|
|
1894
1894
|
minSize: 0,
|
|
1895
1895
|
multiple: !0,
|
|
@@ -1920,7 +1920,7 @@ pr.propTypes = {
|
|
|
1920
1920
|
* @param {File[]} params.acceptedFiles Accepted files
|
|
1921
1921
|
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
|
1922
1922
|
*/
|
|
1923
|
-
children:
|
|
1923
|
+
children: M.func,
|
|
1924
1924
|
/**
|
|
1925
1925
|
* Set accepted file types.
|
|
1926
1926
|
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
@@ -1928,90 +1928,90 @@ pr.propTypes = {
|
|
|
1928
1928
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
1929
1929
|
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
1930
1930
|
*/
|
|
1931
|
-
accept:
|
|
1931
|
+
accept: M.objectOf(M.arrayOf(M.string)),
|
|
1932
1932
|
/**
|
|
1933
1933
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
1934
1934
|
*/
|
|
1935
|
-
multiple:
|
|
1935
|
+
multiple: M.bool,
|
|
1936
1936
|
/**
|
|
1937
1937
|
* If false, allow dropped items to take over the current browser window
|
|
1938
1938
|
*/
|
|
1939
|
-
preventDropOnDocument:
|
|
1939
|
+
preventDropOnDocument: M.bool,
|
|
1940
1940
|
/**
|
|
1941
1941
|
* If true, disables click to open the native file selection dialog
|
|
1942
1942
|
*/
|
|
1943
|
-
noClick:
|
|
1943
|
+
noClick: M.bool,
|
|
1944
1944
|
/**
|
|
1945
1945
|
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
1946
1946
|
* Note that it also stops tracking the focus state.
|
|
1947
1947
|
*/
|
|
1948
|
-
noKeyboard:
|
|
1948
|
+
noKeyboard: M.bool,
|
|
1949
1949
|
/**
|
|
1950
1950
|
* If true, disables drag 'n' drop
|
|
1951
1951
|
*/
|
|
1952
|
-
noDrag:
|
|
1952
|
+
noDrag: M.bool,
|
|
1953
1953
|
/**
|
|
1954
1954
|
* If true, stops drag event propagation to parents
|
|
1955
1955
|
*/
|
|
1956
|
-
noDragEventsBubbling:
|
|
1956
|
+
noDragEventsBubbling: M.bool,
|
|
1957
1957
|
/**
|
|
1958
1958
|
* Minimum file size (in bytes)
|
|
1959
1959
|
*/
|
|
1960
|
-
minSize:
|
|
1960
|
+
minSize: M.number,
|
|
1961
1961
|
/**
|
|
1962
1962
|
* Maximum file size (in bytes)
|
|
1963
1963
|
*/
|
|
1964
|
-
maxSize:
|
|
1964
|
+
maxSize: M.number,
|
|
1965
1965
|
/**
|
|
1966
1966
|
* Maximum accepted number of files
|
|
1967
1967
|
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
1968
1968
|
*/
|
|
1969
|
-
maxFiles:
|
|
1969
|
+
maxFiles: M.number,
|
|
1970
1970
|
/**
|
|
1971
1971
|
* Enable/disable the dropzone
|
|
1972
1972
|
*/
|
|
1973
|
-
disabled:
|
|
1973
|
+
disabled: M.bool,
|
|
1974
1974
|
/**
|
|
1975
1975
|
* Use this to provide a custom file aggregator
|
|
1976
1976
|
*
|
|
1977
1977
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
1978
1978
|
*/
|
|
1979
|
-
getFilesFromEvent:
|
|
1979
|
+
getFilesFromEvent: M.func,
|
|
1980
1980
|
/**
|
|
1981
1981
|
* Cb for when closing the file dialog with no selection
|
|
1982
1982
|
*/
|
|
1983
|
-
onFileDialogCancel:
|
|
1983
|
+
onFileDialogCancel: M.func,
|
|
1984
1984
|
/**
|
|
1985
1985
|
* Cb for when opening the file dialog
|
|
1986
1986
|
*/
|
|
1987
|
-
onFileDialogOpen:
|
|
1987
|
+
onFileDialogOpen: M.func,
|
|
1988
1988
|
/**
|
|
1989
1989
|
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
1990
1990
|
* to open the file picker instead of using an `<input type="file">` click event.
|
|
1991
1991
|
*/
|
|
1992
|
-
useFsAccessApi:
|
|
1992
|
+
useFsAccessApi: M.bool,
|
|
1993
1993
|
/**
|
|
1994
1994
|
* Set to true to focus the root element on render
|
|
1995
1995
|
*/
|
|
1996
|
-
autoFocus:
|
|
1996
|
+
autoFocus: M.bool,
|
|
1997
1997
|
/**
|
|
1998
1998
|
* Cb for when the `dragenter` event occurs.
|
|
1999
1999
|
*
|
|
2000
2000
|
* @param {DragEvent} event
|
|
2001
2001
|
*/
|
|
2002
|
-
onDragEnter:
|
|
2002
|
+
onDragEnter: M.func,
|
|
2003
2003
|
/**
|
|
2004
2004
|
* Cb for when the `dragleave` event occurs
|
|
2005
2005
|
*
|
|
2006
2006
|
* @param {DragEvent} event
|
|
2007
2007
|
*/
|
|
2008
|
-
onDragLeave:
|
|
2008
|
+
onDragLeave: M.func,
|
|
2009
2009
|
/**
|
|
2010
2010
|
* Cb for when the `dragover` event occurs
|
|
2011
2011
|
*
|
|
2012
2012
|
* @param {DragEvent} event
|
|
2013
2013
|
*/
|
|
2014
|
-
onDragOver:
|
|
2014
|
+
onDragOver: M.func,
|
|
2015
2015
|
/**
|
|
2016
2016
|
* Cb for when the `drop` event occurs.
|
|
2017
2017
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
@@ -2042,7 +2042,7 @@ pr.propTypes = {
|
|
|
2042
2042
|
* @param {FileRejection[]} fileRejections
|
|
2043
2043
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2044
2044
|
*/
|
|
2045
|
-
onDrop:
|
|
2045
|
+
onDrop: M.func,
|
|
2046
2046
|
/**
|
|
2047
2047
|
* Cb for when the `drop` event occurs.
|
|
2048
2048
|
* Note that if no files are accepted, this callback is not invoked.
|
|
@@ -2050,7 +2050,7 @@ pr.propTypes = {
|
|
|
2050
2050
|
* @param {File[]} files
|
|
2051
2051
|
* @param {(DragEvent|Event)} event
|
|
2052
2052
|
*/
|
|
2053
|
-
onDropAccepted:
|
|
2053
|
+
onDropAccepted: M.func,
|
|
2054
2054
|
/**
|
|
2055
2055
|
* Cb for when the `drop` event occurs.
|
|
2056
2056
|
* Note that if no files are rejected, this callback is not invoked.
|
|
@@ -2058,19 +2058,19 @@ pr.propTypes = {
|
|
|
2058
2058
|
* @param {FileRejection[]} fileRejections
|
|
2059
2059
|
* @param {(DragEvent|Event)} event
|
|
2060
2060
|
*/
|
|
2061
|
-
onDropRejected:
|
|
2061
|
+
onDropRejected: M.func,
|
|
2062
2062
|
/**
|
|
2063
2063
|
* Cb for when there's some error from any of the promises.
|
|
2064
2064
|
*
|
|
2065
2065
|
* @param {Error} error
|
|
2066
2066
|
*/
|
|
2067
|
-
onError:
|
|
2067
|
+
onError: M.func,
|
|
2068
2068
|
/**
|
|
2069
2069
|
* Custom validation function. It must return null if there's no errors.
|
|
2070
2070
|
* @param {File} file
|
|
2071
2071
|
* @returns {FileError|FileError[]|null}
|
|
2072
2072
|
*/
|
|
2073
|
-
validator:
|
|
2073
|
+
validator: M.func
|
|
2074
2074
|
};
|
|
2075
2075
|
var cr = {
|
|
2076
2076
|
isFocused: !1,
|
|
@@ -2082,119 +2082,119 @@ var cr = {
|
|
|
2082
2082
|
fileRejections: []
|
|
2083
2083
|
};
|
|
2084
2084
|
function at() {
|
|
2085
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = B(B({}, ot), e), t = r.accept, n = r.disabled, a = r.getFilesFromEvent, o = r.maxSize, s = r.minSize, i = r.multiple, v = r.maxFiles, c = r.onDragEnter, y = r.onDragLeave, g = r.onDragOver,
|
|
2085
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = B(B({}, ot), e), t = r.accept, n = r.disabled, a = r.getFilesFromEvent, o = r.maxSize, s = r.minSize, i = r.multiple, v = r.maxFiles, c = r.onDragEnter, y = r.onDragLeave, g = r.onDragOver, h = r.onDrop, S = r.onDropAccepted, O = r.onDropRejected, w = r.onFileDialogCancel, L = r.onFileDialogOpen, k = r.useFsAccessApi, K = r.autoFocus, A = r.preventDropOnDocument, N = r.noClick, f = r.noKeyboard, Z = r.noDrag, $ = r.noDragEventsBubbling, V = r.onError, X = r.validator, ce = ie(function() {
|
|
2086
2086
|
return Qn(t);
|
|
2087
|
-
}, [t]), fe =
|
|
2087
|
+
}, [t]), fe = ie(function() {
|
|
2088
2088
|
return Xn(t);
|
|
2089
|
-
}, [t]), pe =
|
|
2090
|
-
return typeof
|
|
2091
|
-
}, [
|
|
2092
|
-
return typeof
|
|
2093
|
-
}, [
|
|
2094
|
-
!
|
|
2089
|
+
}, [t]), pe = ie(function() {
|
|
2090
|
+
return typeof L == "function" ? L : $r;
|
|
2091
|
+
}, [L]), le = ie(function() {
|
|
2092
|
+
return typeof w == "function" ? w : $r;
|
|
2093
|
+
}, [w]), z = Ce(null), J = Ce(null), te = dt(vo, cr), oe = er(te, 2), ue = oe[0], U = oe[1], l = ue.isFocused, m = ue.isFileDialogActive, T = Ce(typeof window < "u" && window.isSecureContext && k && Zn()), x = function() {
|
|
2094
|
+
!T.current && m && setTimeout(function() {
|
|
2095
2095
|
if (J.current) {
|
|
2096
|
-
var
|
|
2097
|
-
|
|
2096
|
+
var b = J.current.files;
|
|
2097
|
+
b.length || (U({
|
|
2098
2098
|
type: "closeDialog"
|
|
2099
2099
|
}), le());
|
|
2100
2100
|
}
|
|
2101
2101
|
}, 300);
|
|
2102
2102
|
};
|
|
2103
|
-
|
|
2104
|
-
return window.addEventListener("focus",
|
|
2105
|
-
window.removeEventListener("focus",
|
|
2103
|
+
he(function() {
|
|
2104
|
+
return window.addEventListener("focus", x, !1), function() {
|
|
2105
|
+
window.removeEventListener("focus", x, !1);
|
|
2106
2106
|
};
|
|
2107
|
-
}, [J, m, le,
|
|
2108
|
-
var
|
|
2109
|
-
z.current && z.current.contains(
|
|
2107
|
+
}, [J, m, le, T]);
|
|
2108
|
+
var _ = Ce([]), P = function(b) {
|
|
2109
|
+
z.current && z.current.contains(b.target) || (b.preventDefault(), _.current = []);
|
|
2110
2110
|
};
|
|
2111
|
-
|
|
2112
|
-
return
|
|
2113
|
-
|
|
2111
|
+
he(function() {
|
|
2112
|
+
return A && (document.addEventListener("dragover", kr, !1), document.addEventListener("drop", P, !1)), function() {
|
|
2113
|
+
A && (document.removeEventListener("dragover", kr), document.removeEventListener("drop", P));
|
|
2114
2114
|
};
|
|
2115
|
-
}, [z,
|
|
2116
|
-
return !n &&
|
|
2115
|
+
}, [z, A]), he(function() {
|
|
2116
|
+
return !n && K && z.current && z.current.focus(), function() {
|
|
2117
2117
|
};
|
|
2118
|
-
}, [z,
|
|
2119
|
-
var
|
|
2118
|
+
}, [z, K, n]);
|
|
2119
|
+
var E = re(function(d) {
|
|
2120
2120
|
V ? V(d) : console.error(d);
|
|
2121
|
-
}, [V]), C =
|
|
2122
|
-
d.preventDefault(), d.persist(),
|
|
2121
|
+
}, [V]), C = re(function(d) {
|
|
2122
|
+
d.preventDefault(), d.persist(), Ie(d), _.current = [].concat(io(_.current), [d.target]), je(d) && Promise.resolve(a(d)).then(function(b) {
|
|
2123
2123
|
if (!($e(d) && !$)) {
|
|
2124
|
-
var Y =
|
|
2125
|
-
files:
|
|
2124
|
+
var Y = b.length, G = Y > 0 && Un({
|
|
2125
|
+
files: b,
|
|
2126
2126
|
accept: ce,
|
|
2127
2127
|
minSize: s,
|
|
2128
2128
|
maxSize: o,
|
|
2129
2129
|
multiple: i,
|
|
2130
2130
|
maxFiles: v,
|
|
2131
|
-
validator:
|
|
2132
|
-
}),
|
|
2131
|
+
validator: X
|
|
2132
|
+
}), ee = Y > 0 && !G;
|
|
2133
2133
|
U({
|
|
2134
2134
|
isDragAccept: G,
|
|
2135
|
-
isDragReject:
|
|
2135
|
+
isDragReject: ee,
|
|
2136
2136
|
isDragActive: !0,
|
|
2137
2137
|
type: "setDraggedFiles"
|
|
2138
2138
|
}), c && c(d);
|
|
2139
2139
|
}
|
|
2140
|
-
}).catch(function(
|
|
2141
|
-
return
|
|
2140
|
+
}).catch(function(b) {
|
|
2141
|
+
return E(b);
|
|
2142
2142
|
});
|
|
2143
|
-
}, [a, c,
|
|
2144
|
-
d.preventDefault(), d.persist(),
|
|
2145
|
-
var
|
|
2146
|
-
if (
|
|
2143
|
+
}, [a, c, E, $, ce, s, o, i, v, X]), I = re(function(d) {
|
|
2144
|
+
d.preventDefault(), d.persist(), Ie(d);
|
|
2145
|
+
var b = je(d);
|
|
2146
|
+
if (b && d.dataTransfer)
|
|
2147
2147
|
try {
|
|
2148
2148
|
d.dataTransfer.dropEffect = "copy";
|
|
2149
2149
|
} catch {
|
|
2150
2150
|
}
|
|
2151
|
-
return
|
|
2152
|
-
}, [g, $]), R =
|
|
2153
|
-
d.preventDefault(), d.persist(),
|
|
2154
|
-
var
|
|
2151
|
+
return b && g && g(d), !1;
|
|
2152
|
+
}, [g, $]), R = re(function(d) {
|
|
2153
|
+
d.preventDefault(), d.persist(), Ie(d);
|
|
2154
|
+
var b = _.current.filter(function(G) {
|
|
2155
2155
|
return z.current && z.current.contains(G);
|
|
2156
|
-
}), Y =
|
|
2157
|
-
Y !== -1 &&
|
|
2156
|
+
}), Y = b.indexOf(d.target);
|
|
2157
|
+
Y !== -1 && b.splice(Y, 1), _.current = b, !(b.length > 0) && (U({
|
|
2158
2158
|
type: "setDraggedFiles",
|
|
2159
2159
|
isDragActive: !1,
|
|
2160
2160
|
isDragAccept: !1,
|
|
2161
2161
|
isDragReject: !1
|
|
2162
2162
|
}), je(d) && y && y(d));
|
|
2163
|
-
}, [z, y, $]),
|
|
2163
|
+
}, [z, y, $]), D = re(function(d, b) {
|
|
2164
2164
|
var Y = [], G = [];
|
|
2165
|
-
d.forEach(function(
|
|
2166
|
-
var xe = Qr(
|
|
2165
|
+
d.forEach(function(ee) {
|
|
2166
|
+
var xe = Qr(ee, ce), be = er(xe, 2), ze = be[0], We = be[1], Ye = et(ee, s, o), Re = er(Ye, 2), qe = Re[0], Ke = Re[1], He = X ? X(ee) : null;
|
|
2167
2167
|
if (ze && qe && !He)
|
|
2168
|
-
Y.push(
|
|
2168
|
+
Y.push(ee);
|
|
2169
2169
|
else {
|
|
2170
2170
|
var Ue = [We, Ke];
|
|
2171
2171
|
He && (Ue = Ue.concat(He)), G.push({
|
|
2172
|
-
file:
|
|
2172
|
+
file: ee,
|
|
2173
2173
|
errors: Ue.filter(function(lt) {
|
|
2174
2174
|
return lt;
|
|
2175
2175
|
})
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
|
-
}), (!i && Y.length > 1 || i && v >= 1 && Y.length > v) && (Y.forEach(function(
|
|
2178
|
+
}), (!i && Y.length > 1 || i && v >= 1 && Y.length > v) && (Y.forEach(function(ee) {
|
|
2179
2179
|
G.push({
|
|
2180
|
-
file:
|
|
2180
|
+
file: ee,
|
|
2181
2181
|
errors: [Hn]
|
|
2182
2182
|
});
|
|
2183
2183
|
}), Y.splice(0)), U({
|
|
2184
2184
|
acceptedFiles: Y,
|
|
2185
2185
|
fileRejections: G,
|
|
2186
2186
|
type: "setFiles"
|
|
2187
|
-
}),
|
|
2188
|
-
}, [U, i, ce, s, o, v,
|
|
2189
|
-
d.preventDefault(), d.persist(),
|
|
2190
|
-
$e(d) && !$ ||
|
|
2191
|
-
}).catch(function(
|
|
2192
|
-
return
|
|
2187
|
+
}), h && h(Y, G, b), G.length > 0 && O && O(G, b), Y.length > 0 && S && S(Y, b);
|
|
2188
|
+
}, [U, i, ce, s, o, v, h, S, O, X]), q = re(function(d) {
|
|
2189
|
+
d.preventDefault(), d.persist(), Ie(d), _.current = [], je(d) && Promise.resolve(a(d)).then(function(b) {
|
|
2190
|
+
$e(d) && !$ || D(b, d);
|
|
2191
|
+
}).catch(function(b) {
|
|
2192
|
+
return E(b);
|
|
2193
2193
|
}), U({
|
|
2194
2194
|
type: "reset"
|
|
2195
2195
|
});
|
|
2196
|
-
}, [a,
|
|
2197
|
-
if (
|
|
2196
|
+
}, [a, D, E, $]), p = re(function() {
|
|
2197
|
+
if (T.current) {
|
|
2198
2198
|
U({
|
|
2199
2199
|
type: "openDialog"
|
|
2200
2200
|
}), pe();
|
|
@@ -2202,75 +2202,75 @@ function at() {
|
|
|
2202
2202
|
multiple: i,
|
|
2203
2203
|
types: fe
|
|
2204
2204
|
};
|
|
2205
|
-
window.showOpenFilePicker(d).then(function(
|
|
2206
|
-
return a(
|
|
2207
|
-
}).then(function(
|
|
2208
|
-
|
|
2205
|
+
window.showOpenFilePicker(d).then(function(b) {
|
|
2206
|
+
return a(b);
|
|
2207
|
+
}).then(function(b) {
|
|
2208
|
+
D(b, null), U({
|
|
2209
2209
|
type: "closeDialog"
|
|
2210
2210
|
});
|
|
2211
|
-
}).catch(function(
|
|
2212
|
-
eo(
|
|
2211
|
+
}).catch(function(b) {
|
|
2212
|
+
eo(b) ? (le(b), U({
|
|
2213
2213
|
type: "closeDialog"
|
|
2214
|
-
})) : ro(
|
|
2214
|
+
})) : ro(b) ? (T.current = !1, J.current ? (J.current.value = null, J.current.click()) : E(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."))) : E(b);
|
|
2215
2215
|
});
|
|
2216
2216
|
return;
|
|
2217
2217
|
}
|
|
2218
2218
|
J.current && (U({
|
|
2219
2219
|
type: "openDialog"
|
|
2220
2220
|
}), pe(), J.current.value = null, J.current.click());
|
|
2221
|
-
}, [U, pe, le,
|
|
2222
|
-
!z.current || !z.current.isEqualNode(d.target) || (d.key === " " || d.key === "Enter" || d.keyCode === 32 || d.keyCode === 13) && (d.preventDefault(),
|
|
2223
|
-
}, [z,
|
|
2221
|
+
}, [U, pe, le, k, D, E, fe, i]), Q = re(function(d) {
|
|
2222
|
+
!z.current || !z.current.isEqualNode(d.target) || (d.key === " " || d.key === "Enter" || d.keyCode === 32 || d.keyCode === 13) && (d.preventDefault(), p());
|
|
2223
|
+
}, [z, p]), de = re(function() {
|
|
2224
2224
|
U({
|
|
2225
2225
|
type: "focus"
|
|
2226
2226
|
});
|
|
2227
|
-
}, []), Te =
|
|
2227
|
+
}, []), Te = re(function() {
|
|
2228
2228
|
U({
|
|
2229
2229
|
type: "blur"
|
|
2230
2230
|
});
|
|
2231
|
-
}, []), dr =
|
|
2232
|
-
|
|
2233
|
-
}, [
|
|
2234
|
-
return n ? null :
|
|
2235
|
-
}, Be = function(
|
|
2236
|
-
return
|
|
2237
|
-
}, Pe = function(
|
|
2238
|
-
return
|
|
2239
|
-
},
|
|
2240
|
-
$ &&
|
|
2241
|
-
}, it =
|
|
2231
|
+
}, []), dr = re(function() {
|
|
2232
|
+
N || (Jn() ? setTimeout(p, 0) : p());
|
|
2233
|
+
}, [N, p]), ge = function(b) {
|
|
2234
|
+
return n ? null : b;
|
|
2235
|
+
}, Be = function(b) {
|
|
2236
|
+
return f ? null : ge(b);
|
|
2237
|
+
}, Pe = function(b) {
|
|
2238
|
+
return Z ? null : ge(b);
|
|
2239
|
+
}, Ie = function(b) {
|
|
2240
|
+
$ && b.stopPropagation();
|
|
2241
|
+
}, it = ie(function() {
|
|
2242
2242
|
return function() {
|
|
2243
|
-
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
2243
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = d.refKey, Y = b === void 0 ? "ref" : b, G = d.role, ee = d.onKeyDown, xe = d.onFocus, be = d.onBlur, ze = d.onClick, We = d.onDragEnter, Ye = d.onDragOver, Re = d.onDragLeave, qe = d.onDrop, Ke = Me(d, oo);
|
|
2244
2244
|
return B(B(sr({
|
|
2245
|
-
onKeyDown: Be(
|
|
2246
|
-
onFocus: Be(
|
|
2247
|
-
onBlur: Be(
|
|
2248
|
-
onClick:
|
|
2249
|
-
onDragEnter: Pe(
|
|
2250
|
-
onDragOver: Pe(
|
|
2251
|
-
onDragLeave: Pe(
|
|
2252
|
-
onDrop: Pe(
|
|
2245
|
+
onKeyDown: Be(ae(ee, Q)),
|
|
2246
|
+
onFocus: Be(ae(xe, de)),
|
|
2247
|
+
onBlur: Be(ae(be, Te)),
|
|
2248
|
+
onClick: ge(ae(ze, dr)),
|
|
2249
|
+
onDragEnter: Pe(ae(We, C)),
|
|
2250
|
+
onDragOver: Pe(ae(Ye, I)),
|
|
2251
|
+
onDragLeave: Pe(ae(Re, R)),
|
|
2252
|
+
onDrop: Pe(ae(qe, q)),
|
|
2253
2253
|
role: typeof G == "string" && G !== "" ? G : "presentation"
|
|
2254
|
-
}, Y, z), !n && !
|
|
2254
|
+
}, Y, z), !n && !f ? {
|
|
2255
2255
|
tabIndex: 0
|
|
2256
2256
|
} : {}), Ke);
|
|
2257
2257
|
};
|
|
2258
|
-
}, [z,
|
|
2258
|
+
}, [z, Q, de, Te, dr, C, I, R, q, f, Z, n]), st = re(function(d) {
|
|
2259
2259
|
d.stopPropagation();
|
|
2260
|
-
}, []), ct =
|
|
2260
|
+
}, []), ct = ie(function() {
|
|
2261
2261
|
return function() {
|
|
2262
|
-
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {},
|
|
2262
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = d.refKey, Y = b === void 0 ? "ref" : b, G = d.onChange, ee = d.onClick, xe = Me(d, ao), be = sr({
|
|
2263
2263
|
accept: ce,
|
|
2264
2264
|
multiple: i,
|
|
2265
2265
|
type: "file",
|
|
2266
2266
|
style: {
|
|
2267
2267
|
display: "none"
|
|
2268
2268
|
},
|
|
2269
|
-
onChange:
|
|
2270
|
-
onClick:
|
|
2269
|
+
onChange: ge(ae(G, q)),
|
|
2270
|
+
onClick: ge(ae(ee, st)),
|
|
2271
2271
|
tabIndex: -1
|
|
2272
2272
|
}, Y, J);
|
|
2273
|
-
return B(B({},
|
|
2273
|
+
return B(B({}, be), xe);
|
|
2274
2274
|
};
|
|
2275
2275
|
}, [J, t, i, q, n]);
|
|
2276
2276
|
return B(B({}, ue), {}, {
|
|
@@ -2279,7 +2279,7 @@ function at() {
|
|
|
2279
2279
|
getInputProps: ct,
|
|
2280
2280
|
rootRef: z,
|
|
2281
2281
|
inputRef: J,
|
|
2282
|
-
open:
|
|
2282
|
+
open: ge(p)
|
|
2283
2283
|
});
|
|
2284
2284
|
}
|
|
2285
2285
|
function vo(e, r) {
|
|
@@ -2319,23 +2319,30 @@ function vo(e, r) {
|
|
|
2319
2319
|
}
|
|
2320
2320
|
function $r() {
|
|
2321
2321
|
}
|
|
2322
|
-
const
|
|
2322
|
+
const Do = ({
|
|
2323
2323
|
onFileUpload: e
|
|
2324
2324
|
}) => {
|
|
2325
2325
|
const { getRootProps: r } = at({
|
|
2326
2326
|
onDrop: e
|
|
2327
2327
|
});
|
|
2328
|
-
return /* @__PURE__ */ u("div", { ...r(), className: "file-upload", "data-testid": "file-upload", children: /* @__PURE__ */ u("button", { className: "file-upload__button", children: "Drag and drop files here or click to upload" }) });
|
|
2328
|
+
return /* @__PURE__ */ u("div", { ...r(), className: "file-upload", "data-testid": "file-upload", children: /* @__PURE__ */ u("button", { className: "file-upload__button", type: "button", children: "Drag and drop files here or click to upload" }) });
|
|
2329
2329
|
};
|
|
2330
|
-
const yo = (e) =>
|
|
2331
|
-
(
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2330
|
+
const yo = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), go = (e) => (r, t) => {
|
|
2331
|
+
if (e) {
|
|
2332
|
+
const n = e.has(r.value), a = e.has(t.value);
|
|
2333
|
+
if (n && !a)
|
|
2334
|
+
return -1;
|
|
2335
|
+
if (!n && a)
|
|
2336
|
+
return 1;
|
|
2337
|
+
}
|
|
2338
|
+
return 0;
|
|
2339
|
+
}, bo = (e) => {
|
|
2340
|
+
const r = /* @__PURE__ */ new Map();
|
|
2341
|
+
return e.forEach((t) => {
|
|
2342
|
+
const n = t.group || "Ungrouped", a = r.get(n) || [];
|
|
2343
|
+
a.push(t), r.set(n, a);
|
|
2344
|
+
}), Array.from(r, ([t, n]) => ({ group: t, items: n }));
|
|
2345
|
+
}, ho = ({
|
|
2339
2346
|
items: e,
|
|
2340
2347
|
selectedItems: r,
|
|
2341
2348
|
disabledItems: t,
|
|
@@ -2344,43 +2351,48 @@ const yo = (e) => [...e].sort(
|
|
|
2344
2351
|
isOpen: o,
|
|
2345
2352
|
footer: s,
|
|
2346
2353
|
sortFn: i = yo,
|
|
2347
|
-
groupFn: v =
|
|
2354
|
+
groupFn: v = bo,
|
|
2348
2355
|
...c
|
|
2349
2356
|
}) => {
|
|
2350
|
-
const y =
|
|
2351
|
-
() =>
|
|
2352
|
-
[e, v]
|
|
2353
|
-
), T = oe(
|
|
2354
|
-
() => new Set(r.map((b) => b.value)),
|
|
2357
|
+
const y = ie(
|
|
2358
|
+
() => new Set(r.map((k) => k.value)),
|
|
2355
2359
|
[r]
|
|
2356
|
-
),
|
|
2357
|
-
() => new Set(t.map((
|
|
2360
|
+
), g = ie(
|
|
2361
|
+
() => new Set(t.map((k) => k.value)),
|
|
2358
2362
|
[t]
|
|
2359
|
-
);
|
|
2363
|
+
), [h, S] = ye(new Set(y));
|
|
2364
|
+
he(() => {
|
|
2365
|
+
o && S(new Set(y));
|
|
2366
|
+
}, [o]);
|
|
2367
|
+
const O = ie(() => e.some((k) => k.group), [e]), w = ie(
|
|
2368
|
+
() => O ? v(e) : [{ group: "Ungrouped", items: e }],
|
|
2369
|
+
[e, v]
|
|
2370
|
+
), L = (k) => {
|
|
2371
|
+
const { checked: K, value: A } = k.target, N = e.find((f) => `${f.value}` === A);
|
|
2372
|
+
if (N) {
|
|
2373
|
+
const f = K ? [...r, N] : r.filter((Z) => `${Z.value}` !== A) ?? [];
|
|
2374
|
+
a(f);
|
|
2375
|
+
}
|
|
2376
|
+
};
|
|
2360
2377
|
return /* @__PURE__ */ u(Hr, { isVisible: o, className: "put-above", children: /* @__PURE__ */ se("div", { className: "multi-select__dropdown", role: "listbox", ...c, children: [
|
|
2361
2378
|
n || null,
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
/* @__PURE__ */ u("ul", { className: "multi-select__dropdown-list", "aria-label":
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
)
|
|
2377
|
-
}
|
|
2378
|
-
) }, L.value);
|
|
2379
|
-
}) })
|
|
2380
|
-
] }, b)),
|
|
2379
|
+
w.map(({ group: k, items: K }) => /* @__PURE__ */ se("div", { className: "multi-select__group", children: [
|
|
2380
|
+
O ? /* @__PURE__ */ u("h5", { className: "multi-select__dropdown-header", children: k }) : null,
|
|
2381
|
+
/* @__PURE__ */ u("ul", { className: "multi-select__dropdown-list", "aria-label": k, children: K.sort(i).sort(go(h)).map((A) => /* @__PURE__ */ u("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ u(
|
|
2382
|
+
St,
|
|
2383
|
+
{
|
|
2384
|
+
disabled: g.has(A.value),
|
|
2385
|
+
label: A.label,
|
|
2386
|
+
checked: y.has(A.value),
|
|
2387
|
+
value: A.value,
|
|
2388
|
+
onChange: L
|
|
2389
|
+
},
|
|
2390
|
+
A.value
|
|
2391
|
+
) }, A.value)) })
|
|
2392
|
+
] }, k)),
|
|
2381
2393
|
s ? /* @__PURE__ */ u("div", { className: "multi-select__footer", children: s }) : null
|
|
2382
2394
|
] }) });
|
|
2383
|
-
},
|
|
2395
|
+
}, Ao = ({
|
|
2384
2396
|
disabled: e,
|
|
2385
2397
|
selectedItems: r = [],
|
|
2386
2398
|
label: t,
|
|
@@ -2393,20 +2405,20 @@ const yo = (e) => [...e].sort(
|
|
|
2393
2405
|
dropdownFooter: c,
|
|
2394
2406
|
variant: y = "search"
|
|
2395
2407
|
}) => {
|
|
2396
|
-
const g =
|
|
2397
|
-
|
|
2408
|
+
const g = Tt(() => {
|
|
2409
|
+
S(!1), w("");
|
|
2398
2410
|
});
|
|
2399
|
-
|
|
2400
|
-
|
|
2411
|
+
xt(() => {
|
|
2412
|
+
S(!1), w("");
|
|
2401
2413
|
});
|
|
2402
|
-
const [
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
}, [
|
|
2406
|
-
const [
|
|
2414
|
+
const [h, S] = ye(!1), [O, w] = ye("");
|
|
2415
|
+
he(() => {
|
|
2416
|
+
h || w("");
|
|
2417
|
+
}, [h]);
|
|
2418
|
+
const [L, k] = ye([]), K = r || L, A = ($) => {
|
|
2407
2419
|
const V = Array.from(new Set($));
|
|
2408
|
-
|
|
2409
|
-
},
|
|
2420
|
+
k(V), n && n(V);
|
|
2421
|
+
}, N = rr(), f = rr(), Z = K.filter(
|
|
2410
2422
|
($) => s.some((V) => V.value === $.value)
|
|
2411
2423
|
).map(($) => $.label).join(", ");
|
|
2412
2424
|
return /* @__PURE__ */ u("div", { ref: g, children: /* @__PURE__ */ se("div", { className: "multi-select", children: [
|
|
@@ -2414,21 +2426,21 @@ const yo = (e) => [...e].sort(
|
|
|
2414
2426
|
Ct,
|
|
2415
2427
|
{
|
|
2416
2428
|
externallyControlled: !0,
|
|
2417
|
-
"aria-controls":
|
|
2418
|
-
"aria-expanded":
|
|
2419
|
-
id:
|
|
2429
|
+
"aria-controls": N,
|
|
2430
|
+
"aria-expanded": h,
|
|
2431
|
+
id: f,
|
|
2420
2432
|
role: "combobox",
|
|
2421
2433
|
"aria-label": t || a || "Search",
|
|
2422
2434
|
disabled: e,
|
|
2423
2435
|
autoComplete: "off",
|
|
2424
2436
|
onChange: ($) => {
|
|
2425
|
-
|
|
2437
|
+
w($), S(!0);
|
|
2426
2438
|
},
|
|
2427
|
-
onFocus: () =>
|
|
2439
|
+
onFocus: () => S(!0),
|
|
2428
2440
|
placeholder: a ?? "Search",
|
|
2429
2441
|
required: o,
|
|
2430
2442
|
type: "text",
|
|
2431
|
-
value:
|
|
2443
|
+
value: O,
|
|
2432
2444
|
className: "multi-select__input"
|
|
2433
2445
|
}
|
|
2434
2446
|
) : /* @__PURE__ */ u(
|
|
@@ -2437,54 +2449,55 @@ const yo = (e) => [...e].sort(
|
|
|
2437
2449
|
role: "combobox",
|
|
2438
2450
|
type: "button",
|
|
2439
2451
|
"aria-label": t || a || "Select items",
|
|
2440
|
-
"aria-controls":
|
|
2441
|
-
"aria-expanded":
|
|
2452
|
+
"aria-controls": N,
|
|
2453
|
+
"aria-expanded": h,
|
|
2442
2454
|
className: "multi-select__select-button",
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2455
|
+
onClick: () => {
|
|
2456
|
+
S(($) => !$);
|
|
2457
|
+
},
|
|
2458
|
+
children: /* @__PURE__ */ u("span", { className: "multi-select__condensed-text", children: K.length > 0 ? Z : a ?? "Select items" })
|
|
2446
2459
|
}
|
|
2447
2460
|
),
|
|
2448
2461
|
/* @__PURE__ */ u(
|
|
2449
|
-
|
|
2462
|
+
ho,
|
|
2450
2463
|
{
|
|
2451
|
-
id:
|
|
2452
|
-
isOpen:
|
|
2453
|
-
items:
|
|
2454
|
-
($) => $.label.toLowerCase().includes(
|
|
2464
|
+
id: N,
|
|
2465
|
+
isOpen: h,
|
|
2466
|
+
items: O.length > 0 ? s.filter(
|
|
2467
|
+
($) => $.label.toLowerCase().includes(O.toLowerCase())
|
|
2455
2468
|
) : s,
|
|
2456
|
-
selectedItems:
|
|
2469
|
+
selectedItems: K,
|
|
2457
2470
|
disabledItems: i,
|
|
2458
2471
|
header: v,
|
|
2459
|
-
updateItems:
|
|
2472
|
+
updateItems: A,
|
|
2460
2473
|
footer: c || /* @__PURE__ */ se(De, { children: [
|
|
2461
2474
|
/* @__PURE__ */ u(
|
|
2462
|
-
|
|
2475
|
+
Ee,
|
|
2463
2476
|
{
|
|
2464
2477
|
appearance: "link",
|
|
2465
2478
|
onClick: () => {
|
|
2466
2479
|
const $ = s.filter(
|
|
2467
2480
|
(V) => !i.some(
|
|
2468
|
-
(
|
|
2481
|
+
(X) => X.value === V.value
|
|
2469
2482
|
)
|
|
2470
2483
|
);
|
|
2471
|
-
|
|
2484
|
+
A([...K, ...$]);
|
|
2472
2485
|
},
|
|
2473
2486
|
type: "button",
|
|
2474
2487
|
children: "Select all"
|
|
2475
2488
|
}
|
|
2476
2489
|
),
|
|
2477
2490
|
/* @__PURE__ */ u(
|
|
2478
|
-
|
|
2491
|
+
Ee,
|
|
2479
2492
|
{
|
|
2480
2493
|
appearance: "link",
|
|
2481
2494
|
onClick: () => {
|
|
2482
|
-
const $ =
|
|
2495
|
+
const $ = K.filter(
|
|
2483
2496
|
(V) => i.some(
|
|
2484
|
-
(
|
|
2497
|
+
(X) => X.value === V.value
|
|
2485
2498
|
)
|
|
2486
2499
|
);
|
|
2487
|
-
|
|
2500
|
+
A($);
|
|
2488
2501
|
},
|
|
2489
2502
|
type: "button",
|
|
2490
2503
|
children: "Clear"
|
|
@@ -2494,7 +2507,7 @@ const yo = (e) => [...e].sort(
|
|
|
2494
2507
|
}
|
|
2495
2508
|
)
|
|
2496
2509
|
] }) });
|
|
2497
|
-
},
|
|
2510
|
+
}, Po = ({ value: e, unit: r }, {
|
|
2498
2511
|
binary: t = !1,
|
|
2499
2512
|
convertTo: n,
|
|
2500
2513
|
decimals: a = 2,
|
|
@@ -2503,35 +2516,35 @@ const yo = (e) => [...e].sort(
|
|
|
2503
2516
|
const s = e < 0, i = Math.abs(e);
|
|
2504
2517
|
if (i === 0)
|
|
2505
2518
|
return { value: 0, unit: n || "B" };
|
|
2506
|
-
const v = t ? 1024 : 1e3, c = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], y = c.findIndex((
|
|
2507
|
-
let
|
|
2508
|
-
if (
|
|
2509
|
-
const
|
|
2510
|
-
|
|
2519
|
+
const v = t ? 1024 : 1e3, c = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], y = c.findIndex((w) => w === r) || 0, g = i * Math.pow(v, y), h = n ? c.findIndex((w) => w === n) : Math.floor(Math.log(g) / Math.log(v));
|
|
2520
|
+
let S = g / Math.pow(v, h);
|
|
2521
|
+
if (S % 1 !== 0) {
|
|
2522
|
+
const w = Math.pow(10, a);
|
|
2523
|
+
S = Math[o](S * w) / w;
|
|
2511
2524
|
}
|
|
2512
2525
|
return {
|
|
2513
|
-
value: s ? -
|
|
2514
|
-
unit: c[
|
|
2526
|
+
value: s ? -S : S,
|
|
2527
|
+
unit: c[h]
|
|
2515
2528
|
};
|
|
2516
2529
|
};
|
|
2517
2530
|
export {
|
|
2518
2531
|
Le as ContentSection,
|
|
2519
2532
|
To as ExternalLink,
|
|
2520
|
-
|
|
2533
|
+
Do as FileUpload,
|
|
2521
2534
|
ur as FormSection,
|
|
2522
2535
|
Wr as InputGroup,
|
|
2523
2536
|
Kr as MainToolbar,
|
|
2524
2537
|
At as Meter,
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2538
|
+
Ao as MultiSelect,
|
|
2539
|
+
ho as MultiSelectDropdown,
|
|
2540
|
+
H as Navigation,
|
|
2528
2541
|
Xt as NavigationBar,
|
|
2529
2542
|
xo as NestedFormGroup,
|
|
2530
2543
|
pn as Pagination,
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2544
|
+
Co as PaginationContainer,
|
|
2545
|
+
Oo as Stepper,
|
|
2546
|
+
So as defaultFilledColors,
|
|
2547
|
+
Po as formatBytes,
|
|
2535
2548
|
ve as meterColor,
|
|
2536
|
-
|
|
2549
|
+
_e as testIds
|
|
2537
2550
|
};
|