@canonical/maas-react-components 1.28.0 → 1.28.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 +322 -330
- package/dist/@canonical/maas-react-components.umd.js +7 -7
- package/dist/src/lib/components/DynamicTable/DynamicTable.d.ts +3 -3
- package/dist/src/lib/components/DynamicTable/DynamicTable.stories.d.ts +2 -1
- package/dist/src/lib/components/DynamicTable/index.d.ts +1 -1
- package/dist/src/lib/components/FadeInDown/FadeInDown.d.ts +2 -2
- package/dist/src/lib/components/FadeInDown/index.d.ts +1 -1
- package/dist/src/lib/components/FileUpload/FileUpload.d.ts +3 -3
- package/dist/src/lib/components/FileUpload/FileUpload.stories.d.ts +2 -1
- package/dist/src/lib/components/FileUpload/hooks.d.ts +3 -2
- package/dist/src/lib/components/FileUpload/index.d.ts +1 -1
- package/dist/src/lib/components/MultiSelect/MultiSelect.d.ts +2 -2
- package/dist/src/lib/components/MultiSelect/MultiSelect.stories.d.ts +2 -1
- package/dist/src/lib/components/MultiSelect/index.d.ts +1 -1
- package/dist/src/lib/components/NestedFormGroup/NestedFormGroup.d.ts +2 -2
- package/dist/src/lib/components/NestedFormGroup/NestedFormGroup.stories.d.ts +3 -2
- package/dist/src/lib/components/NestedFormGroup/index.d.ts +1 -1
- package/dist/src/lib/components/Pagination/Pagination.d.ts +2 -2
- package/dist/src/lib/components/Pagination/Pagination.stories.d.ts +3 -2
- package/dist/src/lib/components/Pagination/index.d.ts +1 -1
- package/dist/src/lib/components/Stepper/Stepper.d.ts +1 -0
- package/dist/src/lib/components/Stepper/Stepper.stories.d.ts +2 -1
- package/dist/src/lib/components/Stepper/index.d.ts +1 -1
- package/dist/src/lib/components/TableCaption/TableCaption.d.ts +2 -1
- package/dist/src/lib/components/TableCaption/TableCaption.stories.d.ts +2 -1
- package/dist/src/lib/components/TableCaption/index.d.ts +1 -1
- package/dist/src/lib/components/index.d.ts +7 -7
- package/dist/src/lib/elements/ExternalLink/ExternalLink.d.ts +3 -2
- package/dist/src/lib/elements/ExternalLink/ExternalLink.stories.d.ts +3 -2
- package/dist/src/lib/elements/ExternalLink/index.d.ts +1 -1
- package/dist/src/lib/elements/Meter/Meter.d.ts +0 -1
- package/dist/src/lib/elements/Meter/Meter.stories.d.ts +3 -2
- package/dist/src/lib/elements/Meter/index.d.ts +1 -1
- package/dist/src/lib/elements/Placeholder/Placeholder.d.ts +2 -2
- package/dist/src/lib/elements/Placeholder/Placeholder.stories.d.ts +2 -1
- package/dist/src/lib/elements/Placeholder/index.d.ts +1 -1
- package/dist/src/lib/elements/ProgressIndicator/ProgressIndicator.d.ts +1 -2
- package/dist/src/lib/elements/ProgressIndicator/index.d.ts +1 -1
- package/dist/src/lib/elements/index.d.ts +4 -4
- package/dist/src/lib/index.d.ts +4 -4
- package/dist/src/lib/sections/ContentSection/ContentSection.d.ts +1 -2
- package/dist/src/lib/sections/ContentSection/ContentSection.stories.d.ts +2 -1
- package/dist/src/lib/sections/ContentSection/index.d.ts +1 -1
- package/dist/src/lib/sections/FormSection/FormSection.d.ts +0 -1
- package/dist/src/lib/sections/FormSection/FormSection.stories.d.ts +3 -2
- package/dist/src/lib/sections/FormSection/index.d.ts +1 -1
- package/dist/src/lib/sections/InputGroup/InputGroup.d.ts +1 -0
- package/dist/src/lib/sections/InputGroup/InputGroup.stories.d.ts +3 -2
- package/dist/src/lib/sections/InputGroup/index.d.ts +1 -1
- package/dist/src/lib/sections/MainToolbar/MainToolbar.d.ts +1 -2
- package/dist/src/lib/sections/MainToolbar/MainToolbar.stories.d.ts +2 -1
- package/dist/src/lib/sections/MainToolbar/index.d.ts +1 -1
- package/dist/src/lib/sections/Navigation/Banner/Banner.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Banner/Banner.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/CollapseToggle/CollapseToggle.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Content/Content.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Content/Content.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Controls/Controls.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Controls/Controls.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Drawer/Drawer.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Drawer/Drawer.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Footer/Footer.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Footer/Footer.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Header/Header.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Header/Header.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Icon/Icon.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Item/Item.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Item/Item.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Label/Label.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Label/Label.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Link/Link.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Link/Link.stories.d.ts +3 -2
- package/dist/src/lib/sections/Navigation/List/List.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/List/List.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Logo/Logo.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Logo/Logo.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/LogoIcon/LogoIcon.d.ts +3 -2
- package/dist/src/lib/sections/Navigation/LogoIcon/LogoIcon.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/LogoName/LogoName.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/LogoName/LogoName.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/LogoTag/LogoTag.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/LogoTag/LogoTag.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/LogoText/LogoText.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/MenuButton/MenuButton.d.ts +3 -2
- package/dist/src/lib/sections/Navigation/MenuButton/MenuButton.stories.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/Navigation.d.ts +21 -21
- package/dist/src/lib/sections/Navigation/Navigation.stories.d.ts +3 -2
- package/dist/src/lib/sections/Navigation/Text/Text.d.ts +2 -1
- package/dist/src/lib/sections/Navigation/index.d.ts +1 -1
- package/dist/src/lib/sections/index.d.ts +5 -5
- package/dist/src/lib/utils/formatBytes/formatBytes.stories.d.ts +2 -1
- package/dist/src/lib/utils/formatBytes/index.d.ts +1 -1
- package/dist/src/lib/utils/index.d.ts +1 -1
- package/dist/src/types.d.ts +2 -1
- package/dist/style.css +1 -1
- package/dist/vitest-setup.d.ts +1 -0
- package/package.json +12 -12
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as U, jsx as s, Fragment as de } from "react/jsx-runtime";
|
|
2
2
|
import * as oe from "react";
|
|
3
|
-
import
|
|
4
|
-
import { useListener as xt, Link as Tt, Spinner as
|
|
3
|
+
import gt, { useRef as we, useState as fe, useEffect as be, useCallback as Z, cloneElement as ht, createContext as Lr, useId as ke, useContext as lr, useMemo as ae, useReducer as Br, forwardRef as bt, useImperativeHandle as _t, Fragment as Et, useLayoutEffect as wt } from "react";
|
|
4
|
+
import { useListener as xt, Link as Tt, Spinner as Ct, Tooltip as St, Button as pe, Icon as Te, Row as Ot, Col as Dt, Input as At, Label as Pt, CheckboxInput as Rt, useClickOutside as Ft, useOnEscapePressed as It, SearchBox as jt } from "@canonical/react-components";
|
|
5
5
|
function zr(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
@@ -42,8 +42,7 @@ var Wr = { exports: {} };
|
|
|
42
42
|
})();
|
|
43
43
|
})(Wr);
|
|
44
44
|
var Nt = Wr.exports;
|
|
45
|
-
const L = /* @__PURE__ */ zr(Nt)
|
|
46
|
-
const he = {
|
|
45
|
+
const L = /* @__PURE__ */ zr(Nt), he = {
|
|
47
46
|
caution: "#F99B11",
|
|
48
47
|
light: "#F7F7F7",
|
|
49
48
|
linkFaded: "#D3E4ED",
|
|
@@ -57,7 +56,7 @@ const he = {
|
|
|
57
56
|
he.positive,
|
|
58
57
|
he.negative,
|
|
59
58
|
he.caution
|
|
60
|
-
], kt = he.linkFaded, Yr = he.caution, tr = he.light, vr = 2,
|
|
59
|
+
], kt = he.linkFaded, Yr = he.caution, tr = he.light, vr = 2, yr = 1, gr = (e, r) => {
|
|
61
60
|
var a, o;
|
|
62
61
|
const t = ((o = (a = e == null ? void 0 : e.current) == null ? void 0 : a.getBoundingClientRect()) == null ? void 0 : o.width) || 0;
|
|
63
62
|
return t > r * vr ? t / r : vr;
|
|
@@ -68,7 +67,7 @@ const he = {
|
|
|
68
67
|
label: "meter-label",
|
|
69
68
|
meteroverflow: "meter-overflow",
|
|
70
69
|
segments: "meter-segments"
|
|
71
|
-
},
|
|
70
|
+
}, Mt = ({
|
|
72
71
|
className: e,
|
|
73
72
|
children: r,
|
|
74
73
|
data: t,
|
|
@@ -77,12 +76,12 @@ const he = {
|
|
|
77
76
|
size: o = "regular",
|
|
78
77
|
...c
|
|
79
78
|
}) => {
|
|
80
|
-
const i =
|
|
79
|
+
const i = we(null), f = t == null ? void 0 : t.reduce((T, x) => T + x.value, 0), l = n || f, m = t.map((T) => T.value / l * 100), [g, b] = fe(0);
|
|
81
80
|
be(() => {
|
|
82
|
-
b(a === "segmented" ?
|
|
81
|
+
b(a === "segmented" ? gr(i, l) : 0);
|
|
83
82
|
}, [l, a]);
|
|
84
83
|
const h = Z(() => {
|
|
85
|
-
b(
|
|
84
|
+
b(gr(i, l));
|
|
86
85
|
}, [i, l, b]);
|
|
87
86
|
return xt(window, h, "resize", !0, a === "segmented"), /* @__PURE__ */ U(
|
|
88
87
|
"div",
|
|
@@ -94,14 +93,14 @@ const he = {
|
|
|
94
93
|
"data-testid": xe.container,
|
|
95
94
|
ref: i,
|
|
96
95
|
children: [
|
|
97
|
-
/* @__PURE__ */ s(
|
|
96
|
+
/* @__PURE__ */ s($t, { children: /* @__PURE__ */ s(
|
|
98
97
|
Lt,
|
|
99
98
|
{
|
|
100
99
|
data: t,
|
|
101
100
|
datumWidths: m,
|
|
102
101
|
maximum: l,
|
|
103
102
|
overColor: Yr,
|
|
104
|
-
segmentWidth:
|
|
103
|
+
segmentWidth: g,
|
|
105
104
|
separatorColor: tr
|
|
106
105
|
}
|
|
107
106
|
) }),
|
|
@@ -109,7 +108,7 @@ const he = {
|
|
|
109
108
|
]
|
|
110
109
|
}
|
|
111
110
|
);
|
|
112
|
-
},
|
|
111
|
+
}, $t = ({ children: e }) => /* @__PURE__ */ s(
|
|
113
112
|
"div",
|
|
114
113
|
{
|
|
115
114
|
className: "p-meter__bar",
|
|
@@ -126,7 +125,7 @@ const he = {
|
|
|
126
125
|
const a = () => (e == null ? void 0 : e.reduce((i, f) => i + f.value, 0)) > t, o = (i, f) => ({
|
|
127
126
|
backgroundColor: i.color,
|
|
128
127
|
left: `${r == null ? void 0 : r.reduce(
|
|
129
|
-
(l, m,
|
|
128
|
+
(l, m, g) => f > g ? l + m : l,
|
|
130
129
|
0
|
|
131
130
|
)}%`,
|
|
132
131
|
width: `${r[f]}%`
|
|
@@ -134,8 +133,8 @@ const he = {
|
|
|
134
133
|
background: `repeating-linear-gradient(
|
|
135
134
|
to right,
|
|
136
135
|
transparent 0,
|
|
137
|
-
transparent ${n -
|
|
138
|
-
${tr} ${n -
|
|
136
|
+
transparent ${n - yr}px,
|
|
137
|
+
${tr} ${n - yr}px,
|
|
139
138
|
${tr} ${n}px
|
|
140
139
|
)`
|
|
141
140
|
});
|
|
@@ -176,16 +175,14 @@ const he = {
|
|
|
176
175
|
children: r
|
|
177
176
|
}
|
|
178
177
|
);
|
|
179
|
-
|
|
180
|
-
const Bo = ({ children: e, to: r, ...t }) => /* @__PURE__ */ s(Tt, { ...t, href: r, rel: "noreferrer noopener", target: "_blank", children: e })
|
|
181
|
-
const zt = ({
|
|
178
|
+
Mt.Label = Bt;
|
|
179
|
+
const Bo = ({ children: e, to: r, ...t }) => /* @__PURE__ */ s(Tt, { ...t, href: r, rel: "noreferrer noopener", target: "_blank", children: e }), zt = ({
|
|
182
180
|
percentComplete: e
|
|
183
181
|
}) => /* @__PURE__ */ U("small", { className: "progress-indicator", children: [
|
|
184
182
|
e,
|
|
185
183
|
"% ",
|
|
186
|
-
/* @__PURE__ */ s(
|
|
187
|
-
] })
|
|
188
|
-
const Wt = ({
|
|
184
|
+
/* @__PURE__ */ s(Ct, { className: "progress-indicator__spinner" })
|
|
185
|
+
] }), Wt = ({
|
|
189
186
|
text: e,
|
|
190
187
|
children: r,
|
|
191
188
|
className: t,
|
|
@@ -207,7 +204,7 @@ const Wt = ({
|
|
|
207
204
|
setIsCollapsed: r,
|
|
208
205
|
className: t
|
|
209
206
|
}) => /* @__PURE__ */ s(
|
|
210
|
-
|
|
207
|
+
St,
|
|
211
208
|
{
|
|
212
209
|
className: "p-side-navigation__tooltip-wrapper",
|
|
213
210
|
message: /* @__PURE__ */ U(de, { children: [
|
|
@@ -273,8 +270,7 @@ const Wt = ({
|
|
|
273
270
|
},
|
|
274
271
|
children: e
|
|
275
272
|
}
|
|
276
|
-
), cn = ({ children: e }) => /* @__PURE__ */ s("span", { className: "p-side-navigation__text", children: e });
|
|
277
|
-
const H = ({ children: e, className: r, isCollapsed: t }) => /* @__PURE__ */ s("header", { "aria-label": "main navigation", className: L("l-navigation is-maas", r, { "is-collapsed": t, "is-pinned": !t }), children: e }), ln = ({ children: e, className: r }) => /* @__PURE__ */ s("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ s("div", { className: L("p-panel is-dark", r), children: e }) });
|
|
273
|
+
), cn = ({ children: e }) => /* @__PURE__ */ s("span", { className: "p-side-navigation__text", children: e }), H = ({ children: e, className: r, isCollapsed: t }) => /* @__PURE__ */ s("header", { "aria-label": "main navigation", className: L("l-navigation is-maas", r, { "is-collapsed": t, "is-pinned": !t }), children: e }), ln = ({ children: e, className: r }) => /* @__PURE__ */ s("header", { "aria-label": "navigation", className: "l-navigation-bar", children: /* @__PURE__ */ s("div", { className: L("p-panel is-dark", r), children: e }) });
|
|
278
274
|
H.Header = Vt;
|
|
279
275
|
H.Banner = Yt;
|
|
280
276
|
H.Drawer = Ht;
|
|
@@ -348,7 +344,7 @@ const Ur = oe.createContext(null), Kr = oe.createContext([!1, () => {
|
|
|
348
344
|
children: /* @__PURE__ */ s(Ur.Provider, { value: t, children: /* @__PURE__ */ s(Kr.Provider, { value: [n, a], children: e }) })
|
|
349
345
|
}
|
|
350
346
|
);
|
|
351
|
-
},
|
|
347
|
+
}, yn = ({
|
|
352
348
|
as: e,
|
|
353
349
|
children: r,
|
|
354
350
|
className: t,
|
|
@@ -361,7 +357,7 @@ const Ur = oe.createContext(null), Kr = oe.createContext([!1, () => {
|
|
|
361
357
|
...n,
|
|
362
358
|
children: r
|
|
363
359
|
}
|
|
364
|
-
),
|
|
360
|
+
), gn = ({ children: e }) => {
|
|
365
361
|
const r = oe.useContext(Ur), [t, n] = oe.useContext(Kr), a = oe.useRef(null);
|
|
366
362
|
return oe.useEffect(() => {
|
|
367
363
|
!a.current || !r || n(a.current.getBoundingClientRect().width > r.width);
|
|
@@ -387,8 +383,8 @@ const Ur = oe.createContext(null), Kr = oe.createContext([!1, () => {
|
|
|
387
383
|
)
|
|
388
384
|
] });
|
|
389
385
|
};
|
|
390
|
-
Hr.Title =
|
|
391
|
-
Hr.Controls =
|
|
386
|
+
Hr.Title = yn;
|
|
387
|
+
Hr.Controls = gn;
|
|
392
388
|
const Be = ({
|
|
393
389
|
children: e,
|
|
394
390
|
className: r,
|
|
@@ -405,11 +401,11 @@ const Be = ({
|
|
|
405
401
|
className: L("content-section__title p-heading--4", r),
|
|
406
402
|
children: e
|
|
407
403
|
}
|
|
408
|
-
), bn = ({ children: e, className: r }) => /* @__PURE__ */ s("header", { className: L("content-section__header", r), children: e }), _n = ({ children: e, className: r }) => /* @__PURE__ */ s("div", { className: L("content-section__body", r), children: e }),
|
|
404
|
+
), bn = ({ children: e, className: r }) => /* @__PURE__ */ s("header", { className: L("content-section__header", r), children: e }), _n = ({ children: e, className: r }) => /* @__PURE__ */ s("div", { className: L("content-section__body", r), children: e }), En = ({ children: e, className: r }) => /* @__PURE__ */ s("footer", { className: L("content-section__footer", r), children: e });
|
|
409
405
|
Be.Title = hn;
|
|
410
406
|
Be.Header = bn;
|
|
411
407
|
Be.Content = _n;
|
|
412
|
-
Be.Footer =
|
|
408
|
+
Be.Footer = En;
|
|
413
409
|
const Gr = ({
|
|
414
410
|
children: e,
|
|
415
411
|
className: r,
|
|
@@ -425,8 +421,7 @@ const Gr = ({
|
|
|
425
421
|
), zo = ({
|
|
426
422
|
children: e,
|
|
427
423
|
...r
|
|
428
|
-
}) => /* @__PURE__ */ s(Gr, { isVisible: !r["aria-hidden"], children: /* @__PURE__ */ s("div", { className: "p-form__nested-group", ...r, children: e }) })
|
|
429
|
-
const En = ({
|
|
424
|
+
}) => /* @__PURE__ */ s(Gr, { isVisible: !r["aria-hidden"], children: /* @__PURE__ */ s("div", { className: "p-form__nested-group", ...r, children: e }) }), wn = ({
|
|
430
425
|
className: e,
|
|
431
426
|
currentPage: r,
|
|
432
427
|
error: t,
|
|
@@ -497,7 +492,7 @@ const En = ({
|
|
|
497
492
|
}) => {
|
|
498
493
|
const [a, o] = fe(e), [c, i] = fe("");
|
|
499
494
|
return /* @__PURE__ */ s(
|
|
500
|
-
|
|
495
|
+
wn,
|
|
501
496
|
{
|
|
502
497
|
currentPage: a,
|
|
503
498
|
error: c,
|
|
@@ -518,8 +513,7 @@ const En = ({
|
|
|
518
513
|
totalPages: n
|
|
519
514
|
}
|
|
520
515
|
);
|
|
521
|
-
}
|
|
522
|
-
const Yo = ({ activeStep: e, items: r }) => /* @__PURE__ */ s("ol", { className: "stepper", children: r.map((t, n) => {
|
|
516
|
+
}, Yo = ({ activeStep: e, items: r }) => /* @__PURE__ */ s("ol", { className: "stepper", children: r.map((t, n) => {
|
|
523
517
|
const a = n === e, o = n < e;
|
|
524
518
|
return /* @__PURE__ */ s("li", { "aria-label": t, className: "stepper__item", children: /* @__PURE__ */ s(
|
|
525
519
|
"p",
|
|
@@ -547,7 +541,7 @@ function xn() {
|
|
|
547
541
|
if (hr)
|
|
548
542
|
return I;
|
|
549
543
|
hr = 1;
|
|
550
|
-
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, c = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112,
|
|
544
|
+
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, c = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, h = e ? Symbol.for("react.memo") : 60115, T = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, B = e ? Symbol.for("react.fundamental") : 60117, N = e ? Symbol.for("react.responder") : 60118, K = e ? Symbol.for("react.scope") : 60119;
|
|
551
545
|
function A(p) {
|
|
552
546
|
if (typeof p == "object" && p !== null) {
|
|
553
547
|
var Q = p.$$typeof;
|
|
@@ -559,7 +553,7 @@ function xn() {
|
|
|
559
553
|
case n:
|
|
560
554
|
case o:
|
|
561
555
|
case a:
|
|
562
|
-
case
|
|
556
|
+
case g:
|
|
563
557
|
return p;
|
|
564
558
|
default:
|
|
565
559
|
switch (p = p && p.$$typeof, p) {
|
|
@@ -581,7 +575,7 @@ function xn() {
|
|
|
581
575
|
function k(p) {
|
|
582
576
|
return A(p) === l;
|
|
583
577
|
}
|
|
584
|
-
return I.AsyncMode = f, I.ConcurrentMode = l, I.ContextConsumer = i, I.ContextProvider = c, I.Element = r, I.ForwardRef = m, I.Fragment = n, I.Lazy = T, I.Memo = h, I.Portal = t, I.Profiler = o, I.StrictMode = a, I.Suspense =
|
|
578
|
+
return I.AsyncMode = f, I.ConcurrentMode = l, I.ContextConsumer = i, I.ContextProvider = c, I.Element = r, I.ForwardRef = m, I.Fragment = n, I.Lazy = T, I.Memo = h, I.Portal = t, I.Profiler = o, I.StrictMode = a, I.Suspense = g, I.isAsyncMode = function(p) {
|
|
585
579
|
return k(p) || A(p) === f;
|
|
586
580
|
}, I.isConcurrentMode = k, I.isContextConsumer = function(p) {
|
|
587
581
|
return A(p) === i;
|
|
@@ -604,9 +598,9 @@ function xn() {
|
|
|
604
598
|
}, I.isStrictMode = function(p) {
|
|
605
599
|
return A(p) === a;
|
|
606
600
|
}, I.isSuspense = function(p) {
|
|
607
|
-
return A(p) ===
|
|
601
|
+
return A(p) === g;
|
|
608
602
|
}, I.isValidElementType = function(p) {
|
|
609
|
-
return typeof p == "string" || typeof p == "function" || p === n || p === l || p === o || p === a || p ===
|
|
603
|
+
return typeof p == "string" || typeof p == "function" || p === n || p === l || p === o || p === a || p === g || p === b || typeof p == "object" && p !== null && (p.$$typeof === T || p.$$typeof === h || p.$$typeof === c || p.$$typeof === i || p.$$typeof === m || p.$$typeof === B || p.$$typeof === N || p.$$typeof === K || p.$$typeof === x);
|
|
610
604
|
}, I.typeOf = A, I;
|
|
611
605
|
}
|
|
612
606
|
var j = {};
|
|
@@ -621,27 +615,27 @@ var j = {};
|
|
|
621
615
|
var br;
|
|
622
616
|
function Tn() {
|
|
623
617
|
return br || (br = 1, process.env.NODE_ENV !== "production" && function() {
|
|
624
|
-
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, c = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112,
|
|
618
|
+
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, c = e ? Symbol.for("react.provider") : 60109, i = e ? Symbol.for("react.context") : 60110, f = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, m = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, b = e ? Symbol.for("react.suspense_list") : 60120, h = e ? Symbol.for("react.memo") : 60115, T = e ? Symbol.for("react.lazy") : 60116, x = e ? Symbol.for("react.block") : 60121, B = e ? Symbol.for("react.fundamental") : 60117, N = e ? Symbol.for("react.responder") : 60118, K = e ? Symbol.for("react.scope") : 60119;
|
|
625
619
|
function A(d) {
|
|
626
620
|
return typeof d == "string" || typeof d == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
627
|
-
d === n || d === l || d === o || d === a || d ===
|
|
621
|
+
d === n || d === l || d === o || d === a || d === g || d === b || typeof d == "object" && d !== null && (d.$$typeof === T || d.$$typeof === h || d.$$typeof === c || d.$$typeof === i || d.$$typeof === m || d.$$typeof === B || d.$$typeof === N || d.$$typeof === K || d.$$typeof === x);
|
|
628
622
|
}
|
|
629
623
|
function k(d) {
|
|
630
624
|
if (typeof d == "object" && d !== null) {
|
|
631
625
|
var re = d.$$typeof;
|
|
632
626
|
switch (re) {
|
|
633
627
|
case r:
|
|
634
|
-
var
|
|
635
|
-
switch (
|
|
628
|
+
var ye = d.type;
|
|
629
|
+
switch (ye) {
|
|
636
630
|
case f:
|
|
637
631
|
case l:
|
|
638
632
|
case n:
|
|
639
633
|
case o:
|
|
640
634
|
case a:
|
|
641
|
-
case
|
|
642
|
-
return
|
|
635
|
+
case g:
|
|
636
|
+
return ye;
|
|
643
637
|
default:
|
|
644
|
-
var Oe =
|
|
638
|
+
var Oe = ye && ye.$$typeof;
|
|
645
639
|
switch (Oe) {
|
|
646
640
|
case i:
|
|
647
641
|
case m:
|
|
@@ -658,29 +652,29 @@ function Tn() {
|
|
|
658
652
|
}
|
|
659
653
|
}
|
|
660
654
|
}
|
|
661
|
-
var p = f, Q = l,
|
|
655
|
+
var p = f, Q = l, M = i, X = c, ee = r, ce = m, me = n, ve = T, le = h, W = t, J = o, ne = a, ie = g, ue = !1;
|
|
662
656
|
function G(d) {
|
|
663
657
|
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.")), u(d) || k(d) === f;
|
|
664
658
|
}
|
|
665
659
|
function u(d) {
|
|
666
660
|
return k(d) === l;
|
|
667
661
|
}
|
|
668
|
-
function
|
|
662
|
+
function y(d) {
|
|
669
663
|
return k(d) === i;
|
|
670
664
|
}
|
|
671
|
-
function
|
|
665
|
+
function C(d) {
|
|
672
666
|
return k(d) === c;
|
|
673
667
|
}
|
|
674
|
-
function
|
|
668
|
+
function S(d) {
|
|
675
669
|
return typeof d == "object" && d !== null && d.$$typeof === r;
|
|
676
670
|
}
|
|
677
|
-
function
|
|
671
|
+
function E(d) {
|
|
678
672
|
return k(d) === m;
|
|
679
673
|
}
|
|
680
674
|
function P(d) {
|
|
681
675
|
return k(d) === n;
|
|
682
676
|
}
|
|
683
|
-
function
|
|
677
|
+
function w(d) {
|
|
684
678
|
return k(d) === T;
|
|
685
679
|
}
|
|
686
680
|
function O(d) {
|
|
@@ -696,9 +690,9 @@ function Tn() {
|
|
|
696
690
|
return k(d) === a;
|
|
697
691
|
}
|
|
698
692
|
function q(d) {
|
|
699
|
-
return k(d) ===
|
|
693
|
+
return k(d) === g;
|
|
700
694
|
}
|
|
701
|
-
j.AsyncMode = p, j.ConcurrentMode = Q, j.ContextConsumer =
|
|
695
|
+
j.AsyncMode = p, j.ConcurrentMode = Q, j.ContextConsumer = M, j.ContextProvider = X, j.Element = ee, j.ForwardRef = ce, j.Fragment = me, j.Lazy = ve, j.Memo = le, j.Portal = W, j.Profiler = J, j.StrictMode = ne, j.Suspense = ie, j.isAsyncMode = G, j.isConcurrentMode = u, j.isContextConsumer = y, j.isContextProvider = C, j.isElement = S, j.isForwardRef = E, j.isFragment = P, j.isLazy = w, j.isMemo = O, j.isPortal = R, j.isProfiler = F, j.isStrictMode = D, j.isSuspense = q, j.isValidElementType = A, j.typeOf = k;
|
|
702
696
|
}()), j;
|
|
703
697
|
}
|
|
704
698
|
var _r;
|
|
@@ -710,11 +704,11 @@ object-assign
|
|
|
710
704
|
(c) Sindre Sorhus
|
|
711
705
|
@license MIT
|
|
712
706
|
*/
|
|
713
|
-
var Ve,
|
|
714
|
-
function
|
|
715
|
-
if (
|
|
707
|
+
var Ve, Er;
|
|
708
|
+
function Cn() {
|
|
709
|
+
if (Er)
|
|
716
710
|
return Ve;
|
|
717
|
-
|
|
711
|
+
Er = 1;
|
|
718
712
|
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
719
713
|
function n(o) {
|
|
720
714
|
if (o == null)
|
|
@@ -746,8 +740,8 @@ function Sn() {
|
|
|
746
740
|
return Ve = a() ? Object.assign : function(o, c) {
|
|
747
741
|
for (var i, f = n(o), l, m = 1; m < arguments.length; m++) {
|
|
748
742
|
i = Object(arguments[m]);
|
|
749
|
-
for (var
|
|
750
|
-
r.call(i,
|
|
743
|
+
for (var g in i)
|
|
744
|
+
r.call(i, g) && (f[g] = i[g]);
|
|
751
745
|
if (e) {
|
|
752
746
|
l = e(i);
|
|
753
747
|
for (var b = 0; b < l.length; b++)
|
|
@@ -757,11 +751,11 @@ function Sn() {
|
|
|
757
751
|
return f;
|
|
758
752
|
}, Ve;
|
|
759
753
|
}
|
|
760
|
-
var Xe,
|
|
754
|
+
var Xe, wr;
|
|
761
755
|
function pr() {
|
|
762
|
-
if (
|
|
756
|
+
if (wr)
|
|
763
757
|
return Xe;
|
|
764
|
-
|
|
758
|
+
wr = 1;
|
|
765
759
|
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
766
760
|
return Xe = e, Xe;
|
|
767
761
|
}
|
|
@@ -770,7 +764,7 @@ function Xr() {
|
|
|
770
764
|
return xr || (xr = 1, Je = Function.call.bind(Object.prototype.hasOwnProperty)), Je;
|
|
771
765
|
}
|
|
772
766
|
var Ze, Tr;
|
|
773
|
-
function
|
|
767
|
+
function Sn() {
|
|
774
768
|
if (Tr)
|
|
775
769
|
return Ze;
|
|
776
770
|
Tr = 1;
|
|
@@ -791,7 +785,7 @@ function Cn() {
|
|
|
791
785
|
if (process.env.NODE_ENV !== "production") {
|
|
792
786
|
for (var m in o)
|
|
793
787
|
if (n(o, m)) {
|
|
794
|
-
var
|
|
788
|
+
var g;
|
|
795
789
|
try {
|
|
796
790
|
if (typeof o[m] != "function") {
|
|
797
791
|
var b = Error(
|
|
@@ -799,17 +793,17 @@ function Cn() {
|
|
|
799
793
|
);
|
|
800
794
|
throw b.name = "Invariant Violation", b;
|
|
801
795
|
}
|
|
802
|
-
|
|
796
|
+
g = o[m](c, m, f, i, null, r);
|
|
803
797
|
} catch (T) {
|
|
804
|
-
|
|
798
|
+
g = T;
|
|
805
799
|
}
|
|
806
|
-
if (
|
|
807
|
-
(f || "React class") + ": type specification of " + i + " `" + m + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof
|
|
808
|
-
),
|
|
809
|
-
t[
|
|
800
|
+
if (g && !(g instanceof Error) && e(
|
|
801
|
+
(f || "React class") + ": type specification of " + i + " `" + m + "` 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)."
|
|
802
|
+
), g instanceof Error && !(g.message in t)) {
|
|
803
|
+
t[g.message] = !0;
|
|
810
804
|
var h = l ? l() : "";
|
|
811
805
|
e(
|
|
812
|
-
"Failed " + i + " type: " +
|
|
806
|
+
"Failed " + i + " type: " + g.message + (h ?? "")
|
|
813
807
|
);
|
|
814
808
|
}
|
|
815
809
|
}
|
|
@@ -819,12 +813,12 @@ function Cn() {
|
|
|
819
813
|
process.env.NODE_ENV !== "production" && (t = {});
|
|
820
814
|
}, Ze = a, Ze;
|
|
821
815
|
}
|
|
822
|
-
var Qe,
|
|
816
|
+
var Qe, Cr;
|
|
823
817
|
function On() {
|
|
824
|
-
if (
|
|
818
|
+
if (Cr)
|
|
825
819
|
return Qe;
|
|
826
|
-
|
|
827
|
-
var e = Vr(), r =
|
|
820
|
+
Cr = 1;
|
|
821
|
+
var e = Vr(), r = Cn(), t = pr(), n = Xr(), a = Sn(), o = function() {
|
|
828
822
|
};
|
|
829
823
|
process.env.NODE_ENV !== "production" && (o = function(i) {
|
|
830
824
|
var f = "Warning: " + i;
|
|
@@ -839,10 +833,10 @@ function On() {
|
|
|
839
833
|
}
|
|
840
834
|
return Qe = function(i, f) {
|
|
841
835
|
var l = typeof Symbol == "function" && Symbol.iterator, m = "@@iterator";
|
|
842
|
-
function
|
|
843
|
-
var
|
|
844
|
-
if (typeof
|
|
845
|
-
return
|
|
836
|
+
function g(u) {
|
|
837
|
+
var y = u && (l && u[l] || u[m]);
|
|
838
|
+
if (typeof y == "function")
|
|
839
|
+
return y;
|
|
846
840
|
}
|
|
847
841
|
var b = "<<anonymous>>", h = {
|
|
848
842
|
array: N("array"),
|
|
@@ -860,22 +854,22 @@ function On() {
|
|
|
860
854
|
instanceOf: Q,
|
|
861
855
|
node: ce(),
|
|
862
856
|
objectOf: X,
|
|
863
|
-
oneOf:
|
|
857
|
+
oneOf: M,
|
|
864
858
|
oneOfType: ee,
|
|
865
859
|
shape: ve,
|
|
866
860
|
exact: le
|
|
867
861
|
};
|
|
868
|
-
function T(u,
|
|
869
|
-
return u ===
|
|
862
|
+
function T(u, y) {
|
|
863
|
+
return u === y ? u !== 0 || 1 / u === 1 / y : u !== u && y !== y;
|
|
870
864
|
}
|
|
871
|
-
function x(u,
|
|
872
|
-
this.message = u, this.data =
|
|
865
|
+
function x(u, y) {
|
|
866
|
+
this.message = u, this.data = y && typeof y == "object" ? y : {}, this.stack = "";
|
|
873
867
|
}
|
|
874
868
|
x.prototype = Error.prototype;
|
|
875
869
|
function B(u) {
|
|
876
870
|
if (process.env.NODE_ENV !== "production")
|
|
877
|
-
var
|
|
878
|
-
function
|
|
871
|
+
var y = {}, C = 0;
|
|
872
|
+
function S(P, w, O, R, F, D, q) {
|
|
879
873
|
if (R = R || b, D = D || O, q !== t) {
|
|
880
874
|
if (f) {
|
|
881
875
|
var d = new Error(
|
|
@@ -884,190 +878,190 @@ function On() {
|
|
|
884
878
|
throw d.name = "Invariant Violation", d;
|
|
885
879
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
886
880
|
var re = R + ":" + O;
|
|
887
|
-
!
|
|
888
|
-
|
|
881
|
+
!y[re] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
882
|
+
C < 3 && (o(
|
|
889
883
|
"You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + R + "`. 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."
|
|
890
|
-
),
|
|
884
|
+
), y[re] = !0, C++);
|
|
891
885
|
}
|
|
892
886
|
}
|
|
893
|
-
return
|
|
887
|
+
return w[O] == null ? P ? w[O] === null ? new x("The " + F + " `" + D + "` is marked as required " + ("in `" + R + "`, but its value is `null`.")) : new x("The " + F + " `" + D + "` is marked as required in " + ("`" + R + "`, but its value is `undefined`.")) : null : u(w, O, R, F, D);
|
|
894
888
|
}
|
|
895
|
-
var
|
|
896
|
-
return
|
|
889
|
+
var E = S.bind(null, !1);
|
|
890
|
+
return E.isRequired = S.bind(null, !0), E;
|
|
897
891
|
}
|
|
898
892
|
function N(u) {
|
|
899
|
-
function
|
|
900
|
-
var R = S
|
|
893
|
+
function y(C, S, E, P, w, O) {
|
|
894
|
+
var R = C[S], F = ne(R);
|
|
901
895
|
if (F !== u) {
|
|
902
896
|
var D = ie(R);
|
|
903
897
|
return new x(
|
|
904
|
-
"Invalid " + P + " `" +
|
|
898
|
+
"Invalid " + P + " `" + w + "` of type " + ("`" + D + "` supplied to `" + E + "`, expected ") + ("`" + u + "`."),
|
|
905
899
|
{ expectedType: u }
|
|
906
900
|
);
|
|
907
901
|
}
|
|
908
902
|
return null;
|
|
909
903
|
}
|
|
910
|
-
return B(
|
|
904
|
+
return B(y);
|
|
911
905
|
}
|
|
912
906
|
function K() {
|
|
913
907
|
return B(c);
|
|
914
908
|
}
|
|
915
909
|
function A(u) {
|
|
916
|
-
function
|
|
910
|
+
function y(C, S, E, P, w) {
|
|
917
911
|
if (typeof u != "function")
|
|
918
|
-
return new x("Property `" +
|
|
919
|
-
var O = S
|
|
912
|
+
return new x("Property `" + w + "` of component `" + E + "` has invalid PropType notation inside arrayOf.");
|
|
913
|
+
var O = C[S];
|
|
920
914
|
if (!Array.isArray(O)) {
|
|
921
915
|
var R = ne(O);
|
|
922
|
-
return new x("Invalid " + P + " `" +
|
|
916
|
+
return new x("Invalid " + P + " `" + w + "` of type " + ("`" + R + "` supplied to `" + E + "`, expected an array."));
|
|
923
917
|
}
|
|
924
918
|
for (var F = 0; F < O.length; F++) {
|
|
925
|
-
var D = u(O, F,
|
|
919
|
+
var D = u(O, F, E, P, w + "[" + F + "]", t);
|
|
926
920
|
if (D instanceof Error)
|
|
927
921
|
return D;
|
|
928
922
|
}
|
|
929
923
|
return null;
|
|
930
924
|
}
|
|
931
|
-
return B(
|
|
925
|
+
return B(y);
|
|
932
926
|
}
|
|
933
927
|
function k() {
|
|
934
|
-
function u(
|
|
935
|
-
var
|
|
936
|
-
if (!i(
|
|
937
|
-
var O = ne(
|
|
938
|
-
return new x("Invalid " +
|
|
928
|
+
function u(y, C, S, E, P) {
|
|
929
|
+
var w = y[C];
|
|
930
|
+
if (!i(w)) {
|
|
931
|
+
var O = ne(w);
|
|
932
|
+
return new x("Invalid " + E + " `" + P + "` of type " + ("`" + O + "` supplied to `" + S + "`, expected a single ReactElement."));
|
|
939
933
|
}
|
|
940
934
|
return null;
|
|
941
935
|
}
|
|
942
936
|
return B(u);
|
|
943
937
|
}
|
|
944
938
|
function p() {
|
|
945
|
-
function u(
|
|
946
|
-
var
|
|
947
|
-
if (!e.isValidElementType(
|
|
948
|
-
var O = ne(
|
|
949
|
-
return new x("Invalid " +
|
|
939
|
+
function u(y, C, S, E, P) {
|
|
940
|
+
var w = y[C];
|
|
941
|
+
if (!e.isValidElementType(w)) {
|
|
942
|
+
var O = ne(w);
|
|
943
|
+
return new x("Invalid " + E + " `" + P + "` of type " + ("`" + O + "` supplied to `" + S + "`, expected a single ReactElement type."));
|
|
950
944
|
}
|
|
951
945
|
return null;
|
|
952
946
|
}
|
|
953
947
|
return B(u);
|
|
954
948
|
}
|
|
955
949
|
function Q(u) {
|
|
956
|
-
function
|
|
957
|
-
if (!(S
|
|
958
|
-
var O = u.name || b, R = G(S
|
|
959
|
-
return new x("Invalid " + P + " `" +
|
|
950
|
+
function y(C, S, E, P, w) {
|
|
951
|
+
if (!(C[S] instanceof u)) {
|
|
952
|
+
var O = u.name || b, R = G(C[S]);
|
|
953
|
+
return new x("Invalid " + P + " `" + w + "` of type " + ("`" + R + "` supplied to `" + E + "`, expected ") + ("instance of `" + O + "`."));
|
|
960
954
|
}
|
|
961
955
|
return null;
|
|
962
956
|
}
|
|
963
|
-
return B(
|
|
957
|
+
return B(y);
|
|
964
958
|
}
|
|
965
|
-
function
|
|
959
|
+
function M(u) {
|
|
966
960
|
if (!Array.isArray(u))
|
|
967
961
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? o(
|
|
968
962
|
"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])."
|
|
969
963
|
) : o("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
970
|
-
function
|
|
971
|
-
for (var O = S
|
|
964
|
+
function y(C, S, E, P, w) {
|
|
965
|
+
for (var O = C[S], R = 0; R < u.length; R++)
|
|
972
966
|
if (T(O, u[R]))
|
|
973
967
|
return null;
|
|
974
968
|
var F = JSON.stringify(u, function(q, d) {
|
|
975
969
|
var re = ie(d);
|
|
976
970
|
return re === "symbol" ? String(d) : d;
|
|
977
971
|
});
|
|
978
|
-
return new x("Invalid " + P + " `" +
|
|
972
|
+
return new x("Invalid " + P + " `" + w + "` of value `" + String(O) + "` " + ("supplied to `" + E + "`, expected one of " + F + "."));
|
|
979
973
|
}
|
|
980
|
-
return B(
|
|
974
|
+
return B(y);
|
|
981
975
|
}
|
|
982
976
|
function X(u) {
|
|
983
|
-
function
|
|
977
|
+
function y(C, S, E, P, w) {
|
|
984
978
|
if (typeof u != "function")
|
|
985
|
-
return new x("Property `" +
|
|
986
|
-
var O = S
|
|
979
|
+
return new x("Property `" + w + "` of component `" + E + "` has invalid PropType notation inside objectOf.");
|
|
980
|
+
var O = C[S], R = ne(O);
|
|
987
981
|
if (R !== "object")
|
|
988
|
-
return new x("Invalid " + P + " `" +
|
|
982
|
+
return new x("Invalid " + P + " `" + w + "` of type " + ("`" + R + "` supplied to `" + E + "`, expected an object."));
|
|
989
983
|
for (var F in O)
|
|
990
984
|
if (n(O, F)) {
|
|
991
|
-
var D = u(O, F,
|
|
985
|
+
var D = u(O, F, E, P, w + "." + F, t);
|
|
992
986
|
if (D instanceof Error)
|
|
993
987
|
return D;
|
|
994
988
|
}
|
|
995
989
|
return null;
|
|
996
990
|
}
|
|
997
|
-
return B(
|
|
991
|
+
return B(y);
|
|
998
992
|
}
|
|
999
993
|
function ee(u) {
|
|
1000
994
|
if (!Array.isArray(u))
|
|
1001
995
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
1002
|
-
for (var
|
|
1003
|
-
var
|
|
1004
|
-
if (typeof
|
|
996
|
+
for (var y = 0; y < u.length; y++) {
|
|
997
|
+
var C = u[y];
|
|
998
|
+
if (typeof C != "function")
|
|
1005
999
|
return o(
|
|
1006
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue(
|
|
1000
|
+
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + ue(C) + " at index " + y + "."
|
|
1007
1001
|
), c;
|
|
1008
1002
|
}
|
|
1009
|
-
function
|
|
1003
|
+
function S(E, P, w, O, R) {
|
|
1010
1004
|
for (var F = [], D = 0; D < u.length; D++) {
|
|
1011
|
-
var q = u[D], d = q(
|
|
1005
|
+
var q = u[D], d = q(E, P, w, O, R, t);
|
|
1012
1006
|
if (d == null)
|
|
1013
1007
|
return null;
|
|
1014
1008
|
d.data && n(d.data, "expectedType") && F.push(d.data.expectedType);
|
|
1015
1009
|
}
|
|
1016
1010
|
var re = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
|
|
1017
|
-
return new x("Invalid " + O + " `" + R + "` supplied to " + ("`" +
|
|
1011
|
+
return new x("Invalid " + O + " `" + R + "` supplied to " + ("`" + w + "`" + re + "."));
|
|
1018
1012
|
}
|
|
1019
|
-
return B(
|
|
1013
|
+
return B(S);
|
|
1020
1014
|
}
|
|
1021
1015
|
function ce() {
|
|
1022
|
-
function u(
|
|
1023
|
-
return W(
|
|
1016
|
+
function u(y, C, S, E, P) {
|
|
1017
|
+
return W(y[C]) ? null : new x("Invalid " + E + " `" + P + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
|
|
1024
1018
|
}
|
|
1025
1019
|
return B(u);
|
|
1026
1020
|
}
|
|
1027
|
-
function me(u,
|
|
1021
|
+
function me(u, y, C, S, E) {
|
|
1028
1022
|
return new x(
|
|
1029
|
-
(u || "React class") + ": " +
|
|
1023
|
+
(u || "React class") + ": " + y + " type `" + C + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + E + "`."
|
|
1030
1024
|
);
|
|
1031
1025
|
}
|
|
1032
1026
|
function ve(u) {
|
|
1033
|
-
function
|
|
1034
|
-
var O = S
|
|
1027
|
+
function y(C, S, E, P, w) {
|
|
1028
|
+
var O = C[S], R = ne(O);
|
|
1035
1029
|
if (R !== "object")
|
|
1036
|
-
return new x("Invalid " + P + " `" +
|
|
1030
|
+
return new x("Invalid " + P + " `" + w + "` of type `" + R + "` " + ("supplied to `" + E + "`, expected `object`."));
|
|
1037
1031
|
for (var F in u) {
|
|
1038
1032
|
var D = u[F];
|
|
1039
1033
|
if (typeof D != "function")
|
|
1040
|
-
return me(
|
|
1041
|
-
var q = D(O, F,
|
|
1034
|
+
return me(E, P, w, F, ie(D));
|
|
1035
|
+
var q = D(O, F, E, P, w + "." + F, t);
|
|
1042
1036
|
if (q)
|
|
1043
1037
|
return q;
|
|
1044
1038
|
}
|
|
1045
1039
|
return null;
|
|
1046
1040
|
}
|
|
1047
|
-
return B(
|
|
1041
|
+
return B(y);
|
|
1048
1042
|
}
|
|
1049
1043
|
function le(u) {
|
|
1050
|
-
function
|
|
1051
|
-
var O = S
|
|
1044
|
+
function y(C, S, E, P, w) {
|
|
1045
|
+
var O = C[S], R = ne(O);
|
|
1052
1046
|
if (R !== "object")
|
|
1053
|
-
return new x("Invalid " + P + " `" +
|
|
1054
|
-
var F = r({}, S
|
|
1047
|
+
return new x("Invalid " + P + " `" + w + "` of type `" + R + "` " + ("supplied to `" + E + "`, expected `object`."));
|
|
1048
|
+
var F = r({}, C[S], u);
|
|
1055
1049
|
for (var D in F) {
|
|
1056
1050
|
var q = u[D];
|
|
1057
1051
|
if (n(u, D) && typeof q != "function")
|
|
1058
|
-
return me(
|
|
1052
|
+
return me(E, P, w, D, ie(q));
|
|
1059
1053
|
if (!q)
|
|
1060
1054
|
return new x(
|
|
1061
|
-
"Invalid " + P + " `" +
|
|
1055
|
+
"Invalid " + P + " `" + w + "` key `" + D + "` supplied to `" + E + "`.\nBad object: " + JSON.stringify(C[S], null, " ") + `
|
|
1062
1056
|
Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
1063
1057
|
);
|
|
1064
|
-
var d = q(O, D,
|
|
1058
|
+
var d = q(O, D, E, P, w + "." + D, t);
|
|
1065
1059
|
if (d)
|
|
1066
1060
|
return d;
|
|
1067
1061
|
}
|
|
1068
1062
|
return null;
|
|
1069
1063
|
}
|
|
1070
|
-
return B(
|
|
1064
|
+
return B(y);
|
|
1071
1065
|
}
|
|
1072
1066
|
function W(u) {
|
|
1073
1067
|
switch (typeof u) {
|
|
@@ -1082,17 +1076,17 @@ Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
|
1082
1076
|
return u.every(W);
|
|
1083
1077
|
if (u === null || i(u))
|
|
1084
1078
|
return !0;
|
|
1085
|
-
var
|
|
1086
|
-
if (
|
|
1087
|
-
var
|
|
1088
|
-
if (
|
|
1089
|
-
for (; !(
|
|
1090
|
-
if (!W(
|
|
1079
|
+
var y = g(u);
|
|
1080
|
+
if (y) {
|
|
1081
|
+
var C = y.call(u), S;
|
|
1082
|
+
if (y !== u.entries) {
|
|
1083
|
+
for (; !(S = C.next()).done; )
|
|
1084
|
+
if (!W(S.value))
|
|
1091
1085
|
return !1;
|
|
1092
1086
|
} else
|
|
1093
|
-
for (; !(
|
|
1094
|
-
var
|
|
1095
|
-
if (
|
|
1087
|
+
for (; !(S = C.next()).done; ) {
|
|
1088
|
+
var E = S.value;
|
|
1089
|
+
if (E && !W(E[1]))
|
|
1096
1090
|
return !1;
|
|
1097
1091
|
}
|
|
1098
1092
|
} else
|
|
@@ -1102,37 +1096,37 @@ Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
|
1102
1096
|
return !1;
|
|
1103
1097
|
}
|
|
1104
1098
|
}
|
|
1105
|
-
function J(u,
|
|
1106
|
-
return u === "symbol" ? !0 :
|
|
1099
|
+
function J(u, y) {
|
|
1100
|
+
return u === "symbol" ? !0 : y ? y["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && y instanceof Symbol : !1;
|
|
1107
1101
|
}
|
|
1108
1102
|
function ne(u) {
|
|
1109
|
-
var
|
|
1110
|
-
return Array.isArray(u) ? "array" : u instanceof RegExp ? "object" : J(
|
|
1103
|
+
var y = typeof u;
|
|
1104
|
+
return Array.isArray(u) ? "array" : u instanceof RegExp ? "object" : J(y, u) ? "symbol" : y;
|
|
1111
1105
|
}
|
|
1112
1106
|
function ie(u) {
|
|
1113
1107
|
if (typeof u > "u" || u === null)
|
|
1114
1108
|
return "" + u;
|
|
1115
|
-
var
|
|
1116
|
-
if (
|
|
1109
|
+
var y = ne(u);
|
|
1110
|
+
if (y === "object") {
|
|
1117
1111
|
if (u instanceof Date)
|
|
1118
1112
|
return "date";
|
|
1119
1113
|
if (u instanceof RegExp)
|
|
1120
1114
|
return "regexp";
|
|
1121
1115
|
}
|
|
1122
|
-
return
|
|
1116
|
+
return y;
|
|
1123
1117
|
}
|
|
1124
1118
|
function ue(u) {
|
|
1125
|
-
var
|
|
1126
|
-
switch (
|
|
1119
|
+
var y = ie(u);
|
|
1120
|
+
switch (y) {
|
|
1127
1121
|
case "array":
|
|
1128
1122
|
case "object":
|
|
1129
|
-
return "an " +
|
|
1123
|
+
return "an " + y;
|
|
1130
1124
|
case "boolean":
|
|
1131
1125
|
case "date":
|
|
1132
1126
|
case "regexp":
|
|
1133
|
-
return "a " +
|
|
1127
|
+
return "a " + y;
|
|
1134
1128
|
default:
|
|
1135
|
-
return
|
|
1129
|
+
return y;
|
|
1136
1130
|
}
|
|
1137
1131
|
}
|
|
1138
1132
|
function G(u) {
|
|
@@ -1141,19 +1135,19 @@ Valid keys: ` + JSON.stringify(Object.keys(u), null, " ")
|
|
|
1141
1135
|
return h.checkPropTypes = a, h.resetWarningCache = a.resetWarningCache, h.PropTypes = h, h;
|
|
1142
1136
|
}, Qe;
|
|
1143
1137
|
}
|
|
1144
|
-
var er,
|
|
1138
|
+
var er, Sr;
|
|
1145
1139
|
function Dn() {
|
|
1146
|
-
if (
|
|
1140
|
+
if (Sr)
|
|
1147
1141
|
return er;
|
|
1148
|
-
|
|
1142
|
+
Sr = 1;
|
|
1149
1143
|
var e = pr();
|
|
1150
1144
|
function r() {
|
|
1151
1145
|
}
|
|
1152
1146
|
function t() {
|
|
1153
1147
|
}
|
|
1154
1148
|
return t.resetWarningCache = r, er = function() {
|
|
1155
|
-
function n(c, i, f, l, m,
|
|
1156
|
-
if (
|
|
1149
|
+
function n(c, i, f, l, m, g) {
|
|
1150
|
+
if (g !== e) {
|
|
1157
1151
|
var b = new Error(
|
|
1158
1152
|
"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"
|
|
1159
1153
|
);
|
|
@@ -1196,8 +1190,8 @@ if (process.env.NODE_ENV !== "production") {
|
|
|
1196
1190
|
} else
|
|
1197
1191
|
nr.exports = Dn()();
|
|
1198
1192
|
var Rn = nr.exports;
|
|
1199
|
-
const
|
|
1200
|
-
function
|
|
1193
|
+
const $ = /* @__PURE__ */ zr(Rn);
|
|
1194
|
+
function Ce(e, r, t, n) {
|
|
1201
1195
|
function a(o) {
|
|
1202
1196
|
return o instanceof t ? o : new t(function(c) {
|
|
1203
1197
|
c(o);
|
|
@@ -1207,15 +1201,15 @@ function Se(e, r, t, n) {
|
|
|
1207
1201
|
function i(m) {
|
|
1208
1202
|
try {
|
|
1209
1203
|
l(n.next(m));
|
|
1210
|
-
} catch (
|
|
1211
|
-
c(
|
|
1204
|
+
} catch (g) {
|
|
1205
|
+
c(g);
|
|
1212
1206
|
}
|
|
1213
1207
|
}
|
|
1214
1208
|
function f(m) {
|
|
1215
1209
|
try {
|
|
1216
1210
|
l(n.throw(m));
|
|
1217
|
-
} catch (
|
|
1218
|
-
c(
|
|
1211
|
+
} catch (g) {
|
|
1212
|
+
c(g);
|
|
1219
1213
|
}
|
|
1220
1214
|
}
|
|
1221
1215
|
function l(m) {
|
|
@@ -1224,7 +1218,7 @@ function Se(e, r, t, n) {
|
|
|
1224
1218
|
l((n = n.apply(e, r || [])).next());
|
|
1225
1219
|
});
|
|
1226
1220
|
}
|
|
1227
|
-
function
|
|
1221
|
+
function Se(e, r) {
|
|
1228
1222
|
var t = { label: 0, sent: function() {
|
|
1229
1223
|
if (o[0] & 1)
|
|
1230
1224
|
throw o[1];
|
|
@@ -1432,32 +1426,32 @@ var jn = [
|
|
|
1432
1426
|
// Windows
|
|
1433
1427
|
];
|
|
1434
1428
|
function Nn(e) {
|
|
1435
|
-
return
|
|
1436
|
-
return
|
|
1437
|
-
return
|
|
1429
|
+
return Ce(this, void 0, void 0, function() {
|
|
1430
|
+
return Se(this, function(r) {
|
|
1431
|
+
return Me(e) && kn(e.dataTransfer) ? [2, Bn(e.dataTransfer, e.type)] : Mn(e) ? [2, $n(e)] : Array.isArray(e) && e.every(function(t) {
|
|
1438
1432
|
return "getFile" in t && typeof t.getFile == "function";
|
|
1439
1433
|
}) ? [2, Ln(e)] : [2, []];
|
|
1440
1434
|
});
|
|
1441
1435
|
});
|
|
1442
1436
|
}
|
|
1443
1437
|
function kn(e) {
|
|
1444
|
-
return
|
|
1438
|
+
return Me(e);
|
|
1445
1439
|
}
|
|
1446
|
-
function
|
|
1447
|
-
return
|
|
1440
|
+
function Mn(e) {
|
|
1441
|
+
return Me(e) && Me(e.target);
|
|
1448
1442
|
}
|
|
1449
|
-
function
|
|
1443
|
+
function Me(e) {
|
|
1450
1444
|
return typeof e == "object" && e !== null;
|
|
1451
1445
|
}
|
|
1452
|
-
function
|
|
1446
|
+
function $n(e) {
|
|
1453
1447
|
return or(e.target.files).map(function(r) {
|
|
1454
1448
|
return Pe(r);
|
|
1455
1449
|
});
|
|
1456
1450
|
}
|
|
1457
1451
|
function Ln(e) {
|
|
1458
|
-
return
|
|
1452
|
+
return Ce(this, void 0, void 0, function() {
|
|
1459
1453
|
var r;
|
|
1460
|
-
return
|
|
1454
|
+
return Se(this, function(t) {
|
|
1461
1455
|
switch (t.label) {
|
|
1462
1456
|
case 0:
|
|
1463
1457
|
return [4, Promise.all(e.map(function(n) {
|
|
@@ -1472,9 +1466,9 @@ function Ln(e) {
|
|
|
1472
1466
|
});
|
|
1473
1467
|
}
|
|
1474
1468
|
function Bn(e, r) {
|
|
1475
|
-
return
|
|
1469
|
+
return Ce(this, void 0, void 0, function() {
|
|
1476
1470
|
var t, n;
|
|
1477
|
-
return
|
|
1471
|
+
return Se(this, function(a) {
|
|
1478
1472
|
switch (a.label) {
|
|
1479
1473
|
case 0:
|
|
1480
1474
|
return e.items ? (t = or(e.items).filter(function(o) {
|
|
@@ -1523,8 +1517,8 @@ function Pr(e) {
|
|
|
1523
1517
|
return Promise.resolve(t);
|
|
1524
1518
|
}
|
|
1525
1519
|
function Wn(e) {
|
|
1526
|
-
return
|
|
1527
|
-
return
|
|
1520
|
+
return Ce(this, void 0, void 0, function() {
|
|
1521
|
+
return Se(this, function(r) {
|
|
1528
1522
|
return [2, e.isDirectory ? Zr(e) : Yn(e)];
|
|
1529
1523
|
});
|
|
1530
1524
|
});
|
|
@@ -1536,24 +1530,24 @@ function Zr(e) {
|
|
|
1536
1530
|
function o() {
|
|
1537
1531
|
var c = this;
|
|
1538
1532
|
r.readEntries(function(i) {
|
|
1539
|
-
return
|
|
1533
|
+
return Ce(c, void 0, void 0, function() {
|
|
1540
1534
|
var f, l, m;
|
|
1541
|
-
return
|
|
1542
|
-
switch (
|
|
1535
|
+
return Se(this, function(g) {
|
|
1536
|
+
switch (g.label) {
|
|
1543
1537
|
case 0:
|
|
1544
1538
|
if (i.length)
|
|
1545
1539
|
return [3, 5];
|
|
1546
|
-
|
|
1540
|
+
g.label = 1;
|
|
1547
1541
|
case 1:
|
|
1548
|
-
return
|
|
1542
|
+
return g.trys.push([1, 3, , 4]), [4, Promise.all(a)];
|
|
1549
1543
|
case 2:
|
|
1550
|
-
return f =
|
|
1544
|
+
return f = g.sent(), t(f), [3, 4];
|
|
1551
1545
|
case 3:
|
|
1552
|
-
return l =
|
|
1546
|
+
return l = g.sent(), n(l), [3, 4];
|
|
1553
1547
|
case 4:
|
|
1554
1548
|
return [3, 6];
|
|
1555
1549
|
case 5:
|
|
1556
|
-
m = Promise.all(i.map(Wn)), a.push(m), o(),
|
|
1550
|
+
m = Promise.all(i.map(Wn)), a.push(m), o(), g.label = 6;
|
|
1557
1551
|
case 6:
|
|
1558
1552
|
return [
|
|
1559
1553
|
2
|
|
@@ -1570,8 +1564,8 @@ function Zr(e) {
|
|
|
1570
1564
|
});
|
|
1571
1565
|
}
|
|
1572
1566
|
function Yn(e) {
|
|
1573
|
-
return
|
|
1574
|
-
return
|
|
1567
|
+
return Ce(this, void 0, void 0, function() {
|
|
1568
|
+
return Se(this, function(r) {
|
|
1575
1569
|
return [2, new Promise(function(t, n) {
|
|
1576
1570
|
e.file(function(a) {
|
|
1577
1571
|
var o = Pe(a, e.fullPath);
|
|
@@ -1706,31 +1700,31 @@ function rt(e, r) {
|
|
|
1706
1700
|
return [t, t ? null : ro(r)];
|
|
1707
1701
|
}
|
|
1708
1702
|
function tt(e, r, t) {
|
|
1709
|
-
if (
|
|
1710
|
-
if (
|
|
1703
|
+
if (ge(e.size))
|
|
1704
|
+
if (ge(r) && ge(t)) {
|
|
1711
1705
|
if (e.size > t)
|
|
1712
1706
|
return [!1, jr(t)];
|
|
1713
1707
|
if (e.size < r)
|
|
1714
1708
|
return [!1, Nr(r)];
|
|
1715
1709
|
} else {
|
|
1716
|
-
if (
|
|
1710
|
+
if (ge(r) && e.size < r)
|
|
1717
1711
|
return [!1, Nr(r)];
|
|
1718
|
-
if (
|
|
1712
|
+
if (ge(t) && e.size > t)
|
|
1719
1713
|
return [!1, jr(t)];
|
|
1720
1714
|
}
|
|
1721
1715
|
return [!0, null];
|
|
1722
1716
|
}
|
|
1723
|
-
function
|
|
1717
|
+
function ge(e) {
|
|
1724
1718
|
return e != null;
|
|
1725
1719
|
}
|
|
1726
1720
|
function no(e) {
|
|
1727
1721
|
var r = e.files, t = e.accept, n = e.minSize, a = e.maxSize, o = e.multiple, c = e.maxFiles, i = e.validator;
|
|
1728
1722
|
return !o && r.length > 1 || o && c >= 1 && r.length > c ? !1 : r.every(function(f) {
|
|
1729
|
-
var l = rt(f, t), m = Ae(l, 1),
|
|
1730
|
-
return
|
|
1723
|
+
var l = rt(f, t), m = Ae(l, 1), g = m[0], b = tt(f, n, a), h = Ae(b, 1), T = h[0], x = i ? i(f) : null;
|
|
1724
|
+
return g && T && !x;
|
|
1731
1725
|
});
|
|
1732
1726
|
}
|
|
1733
|
-
function
|
|
1727
|
+
function $e(e) {
|
|
1734
1728
|
return typeof e.isPropagationStopped == "function" ? e.isPropagationStopped() : typeof e.cancelBubble < "u" ? e.cancelBubble : !1;
|
|
1735
1729
|
}
|
|
1736
1730
|
function Ne(e) {
|
|
@@ -1758,7 +1752,7 @@ function se() {
|
|
|
1758
1752
|
for (var a = arguments.length, o = new Array(a > 1 ? a - 1 : 0), c = 1; c < a; c++)
|
|
1759
1753
|
o[c - 1] = arguments[c];
|
|
1760
1754
|
return r.some(function(i) {
|
|
1761
|
-
return
|
|
1755
|
+
return !$e(n) && i && i.apply(void 0, [n].concat(o)), $e(n);
|
|
1762
1756
|
});
|
|
1763
1757
|
};
|
|
1764
1758
|
}
|
|
@@ -1766,7 +1760,7 @@ function so() {
|
|
|
1766
1760
|
return "showOpenFilePicker" in window;
|
|
1767
1761
|
}
|
|
1768
1762
|
function co(e) {
|
|
1769
|
-
if (
|
|
1763
|
+
if (ge(e)) {
|
|
1770
1764
|
var r = Object.entries(e).filter(function(t) {
|
|
1771
1765
|
var n = Ae(t, 2), a = n[0], o = n[1], c = !0;
|
|
1772
1766
|
return nt(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.')), c = !1), (!Array.isArray(o) || !o.every(ot)) && (console.warn('Skipped "'.concat(a, '" because an invalid file extension was provided.')), c = !1), c;
|
|
@@ -1783,7 +1777,7 @@ function co(e) {
|
|
|
1783
1777
|
return e;
|
|
1784
1778
|
}
|
|
1785
1779
|
function lo(e) {
|
|
1786
|
-
if (
|
|
1780
|
+
if (ge(e))
|
|
1787
1781
|
return Object.entries(e).reduce(function(r, t) {
|
|
1788
1782
|
var n = Ae(t, 2), a = n[0], o = n[1];
|
|
1789
1783
|
return [].concat(Rr(r), [a], Rr(o));
|
|
@@ -1803,8 +1797,8 @@ function nt(e) {
|
|
|
1803
1797
|
function ot(e) {
|
|
1804
1798
|
return /^.*\.[\w]+$/.test(e);
|
|
1805
1799
|
}
|
|
1806
|
-
var po = ["children"], mo = ["open"], vo = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"],
|
|
1807
|
-
function
|
|
1800
|
+
var po = ["children"], mo = ["open"], vo = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], yo = ["refKey", "onChange", "onClick"];
|
|
1801
|
+
function go(e) {
|
|
1808
1802
|
return _o(e) || bo(e) || at(e) || ho();
|
|
1809
1803
|
}
|
|
1810
1804
|
function ho() {
|
|
@@ -1820,9 +1814,9 @@ function _o(e) {
|
|
|
1820
1814
|
return ir(e);
|
|
1821
1815
|
}
|
|
1822
1816
|
function rr(e, r) {
|
|
1823
|
-
return xo(e) ||
|
|
1817
|
+
return xo(e) || wo(e, r) || at(e, r) || Eo();
|
|
1824
1818
|
}
|
|
1825
|
-
function
|
|
1819
|
+
function Eo() {
|
|
1826
1820
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1827
1821
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1828
1822
|
}
|
|
@@ -1843,7 +1837,7 @@ function ir(e, r) {
|
|
|
1843
1837
|
n[t] = e[t];
|
|
1844
1838
|
return n;
|
|
1845
1839
|
}
|
|
1846
|
-
function
|
|
1840
|
+
function wo(e, r) {
|
|
1847
1841
|
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1848
1842
|
if (t != null) {
|
|
1849
1843
|
var n = [], a = !0, o = !1, c, i;
|
|
@@ -1867,7 +1861,7 @@ function xo(e) {
|
|
|
1867
1861
|
if (Array.isArray(e))
|
|
1868
1862
|
return e;
|
|
1869
1863
|
}
|
|
1870
|
-
function
|
|
1864
|
+
function Mr(e, r) {
|
|
1871
1865
|
var t = Object.keys(e);
|
|
1872
1866
|
if (Object.getOwnPropertySymbols) {
|
|
1873
1867
|
var n = Object.getOwnPropertySymbols(e);
|
|
@@ -1880,9 +1874,9 @@ function $r(e, r) {
|
|
|
1880
1874
|
function z(e) {
|
|
1881
1875
|
for (var r = 1; r < arguments.length; r++) {
|
|
1882
1876
|
var t = arguments[r] != null ? arguments[r] : {};
|
|
1883
|
-
r % 2 ?
|
|
1877
|
+
r % 2 ? Mr(Object(t), !0).forEach(function(n) {
|
|
1884
1878
|
sr(e, n, t[n]);
|
|
1885
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) :
|
|
1879
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Mr(Object(t)).forEach(function(n) {
|
|
1886
1880
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1887
1881
|
});
|
|
1888
1882
|
}
|
|
@@ -1916,7 +1910,7 @@ var dr = /* @__PURE__ */ bt(function(e, r) {
|
|
|
1916
1910
|
return {
|
|
1917
1911
|
open: o
|
|
1918
1912
|
};
|
|
1919
|
-
}, [o]), /* @__PURE__ */
|
|
1913
|
+
}, [o]), /* @__PURE__ */ gt.createElement(Et, null, t(z(z({}, c), {}, {
|
|
1920
1914
|
open: o
|
|
1921
1915
|
})));
|
|
1922
1916
|
});
|
|
@@ -1954,7 +1948,7 @@ dr.propTypes = {
|
|
|
1954
1948
|
* @param {File[]} params.acceptedFiles Accepted files
|
|
1955
1949
|
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
|
1956
1950
|
*/
|
|
1957
|
-
children:
|
|
1951
|
+
children: $.func,
|
|
1958
1952
|
/**
|
|
1959
1953
|
* Set accepted file types.
|
|
1960
1954
|
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
@@ -1962,90 +1956,90 @@ dr.propTypes = {
|
|
|
1962
1956
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
1963
1957
|
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
1964
1958
|
*/
|
|
1965
|
-
accept:
|
|
1959
|
+
accept: $.objectOf($.arrayOf($.string)),
|
|
1966
1960
|
/**
|
|
1967
1961
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
1968
1962
|
*/
|
|
1969
|
-
multiple:
|
|
1963
|
+
multiple: $.bool,
|
|
1970
1964
|
/**
|
|
1971
1965
|
* If false, allow dropped items to take over the current browser window
|
|
1972
1966
|
*/
|
|
1973
|
-
preventDropOnDocument:
|
|
1967
|
+
preventDropOnDocument: $.bool,
|
|
1974
1968
|
/**
|
|
1975
1969
|
* If true, disables click to open the native file selection dialog
|
|
1976
1970
|
*/
|
|
1977
|
-
noClick:
|
|
1971
|
+
noClick: $.bool,
|
|
1978
1972
|
/**
|
|
1979
1973
|
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
1980
1974
|
* Note that it also stops tracking the focus state.
|
|
1981
1975
|
*/
|
|
1982
|
-
noKeyboard:
|
|
1976
|
+
noKeyboard: $.bool,
|
|
1983
1977
|
/**
|
|
1984
1978
|
* If true, disables drag 'n' drop
|
|
1985
1979
|
*/
|
|
1986
|
-
noDrag:
|
|
1980
|
+
noDrag: $.bool,
|
|
1987
1981
|
/**
|
|
1988
1982
|
* If true, stops drag event propagation to parents
|
|
1989
1983
|
*/
|
|
1990
|
-
noDragEventsBubbling:
|
|
1984
|
+
noDragEventsBubbling: $.bool,
|
|
1991
1985
|
/**
|
|
1992
1986
|
* Minimum file size (in bytes)
|
|
1993
1987
|
*/
|
|
1994
|
-
minSize:
|
|
1988
|
+
minSize: $.number,
|
|
1995
1989
|
/**
|
|
1996
1990
|
* Maximum file size (in bytes)
|
|
1997
1991
|
*/
|
|
1998
|
-
maxSize:
|
|
1992
|
+
maxSize: $.number,
|
|
1999
1993
|
/**
|
|
2000
1994
|
* Maximum accepted number of files
|
|
2001
1995
|
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
2002
1996
|
*/
|
|
2003
|
-
maxFiles:
|
|
1997
|
+
maxFiles: $.number,
|
|
2004
1998
|
/**
|
|
2005
1999
|
* Enable/disable the dropzone
|
|
2006
2000
|
*/
|
|
2007
|
-
disabled:
|
|
2001
|
+
disabled: $.bool,
|
|
2008
2002
|
/**
|
|
2009
2003
|
* Use this to provide a custom file aggregator
|
|
2010
2004
|
*
|
|
2011
2005
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2012
2006
|
*/
|
|
2013
|
-
getFilesFromEvent:
|
|
2007
|
+
getFilesFromEvent: $.func,
|
|
2014
2008
|
/**
|
|
2015
2009
|
* Cb for when closing the file dialog with no selection
|
|
2016
2010
|
*/
|
|
2017
|
-
onFileDialogCancel:
|
|
2011
|
+
onFileDialogCancel: $.func,
|
|
2018
2012
|
/**
|
|
2019
2013
|
* Cb for when opening the file dialog
|
|
2020
2014
|
*/
|
|
2021
|
-
onFileDialogOpen:
|
|
2015
|
+
onFileDialogOpen: $.func,
|
|
2022
2016
|
/**
|
|
2023
2017
|
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
2024
2018
|
* to open the file picker instead of using an `<input type="file">` click event.
|
|
2025
2019
|
*/
|
|
2026
|
-
useFsAccessApi:
|
|
2020
|
+
useFsAccessApi: $.bool,
|
|
2027
2021
|
/**
|
|
2028
2022
|
* Set to true to focus the root element on render
|
|
2029
2023
|
*/
|
|
2030
|
-
autoFocus:
|
|
2024
|
+
autoFocus: $.bool,
|
|
2031
2025
|
/**
|
|
2032
2026
|
* Cb for when the `dragenter` event occurs.
|
|
2033
2027
|
*
|
|
2034
2028
|
* @param {DragEvent} event
|
|
2035
2029
|
*/
|
|
2036
|
-
onDragEnter:
|
|
2030
|
+
onDragEnter: $.func,
|
|
2037
2031
|
/**
|
|
2038
2032
|
* Cb for when the `dragleave` event occurs
|
|
2039
2033
|
*
|
|
2040
2034
|
* @param {DragEvent} event
|
|
2041
2035
|
*/
|
|
2042
|
-
onDragLeave:
|
|
2036
|
+
onDragLeave: $.func,
|
|
2043
2037
|
/**
|
|
2044
2038
|
* Cb for when the `dragover` event occurs
|
|
2045
2039
|
*
|
|
2046
2040
|
* @param {DragEvent} event
|
|
2047
2041
|
*/
|
|
2048
|
-
onDragOver:
|
|
2042
|
+
onDragOver: $.func,
|
|
2049
2043
|
/**
|
|
2050
2044
|
* Cb for when the `drop` event occurs.
|
|
2051
2045
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
@@ -2076,7 +2070,7 @@ dr.propTypes = {
|
|
|
2076
2070
|
* @param {FileRejection[]} fileRejections
|
|
2077
2071
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2078
2072
|
*/
|
|
2079
|
-
onDrop:
|
|
2073
|
+
onDrop: $.func,
|
|
2080
2074
|
/**
|
|
2081
2075
|
* Cb for when the `drop` event occurs.
|
|
2082
2076
|
* Note that if no files are accepted, this callback is not invoked.
|
|
@@ -2084,7 +2078,7 @@ dr.propTypes = {
|
|
|
2084
2078
|
* @param {File[]} files
|
|
2085
2079
|
* @param {(DragEvent|Event)} event
|
|
2086
2080
|
*/
|
|
2087
|
-
onDropAccepted:
|
|
2081
|
+
onDropAccepted: $.func,
|
|
2088
2082
|
/**
|
|
2089
2083
|
* Cb for when the `drop` event occurs.
|
|
2090
2084
|
* Note that if no files are rejected, this callback is not invoked.
|
|
@@ -2092,19 +2086,19 @@ dr.propTypes = {
|
|
|
2092
2086
|
* @param {FileRejection[]} fileRejections
|
|
2093
2087
|
* @param {(DragEvent|Event)} event
|
|
2094
2088
|
*/
|
|
2095
|
-
onDropRejected:
|
|
2089
|
+
onDropRejected: $.func,
|
|
2096
2090
|
/**
|
|
2097
2091
|
* Cb for when there's some error from any of the promises.
|
|
2098
2092
|
*
|
|
2099
2093
|
* @param {Error} error
|
|
2100
2094
|
*/
|
|
2101
|
-
onError:
|
|
2095
|
+
onError: $.func,
|
|
2102
2096
|
/**
|
|
2103
2097
|
* Custom validation function. It must return null if there's no errors.
|
|
2104
2098
|
* @param {File} file
|
|
2105
2099
|
* @returns {FileError|FileError[]|null}
|
|
2106
2100
|
*/
|
|
2107
|
-
validator:
|
|
2101
|
+
validator: $.func
|
|
2108
2102
|
};
|
|
2109
2103
|
var cr = {
|
|
2110
2104
|
isFocused: !1,
|
|
@@ -2116,16 +2110,16 @@ var cr = {
|
|
|
2116
2110
|
fileRejections: []
|
|
2117
2111
|
};
|
|
2118
2112
|
function st() {
|
|
2119
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = z(z({}, it), e), t = r.accept, n = r.disabled, a = r.getFilesFromEvent, o = r.maxSize, c = r.minSize, i = r.multiple, f = r.maxFiles, l = r.onDragEnter, m = r.onDragLeave,
|
|
2113
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = z(z({}, it), e), t = r.accept, n = r.disabled, a = r.getFilesFromEvent, o = r.maxSize, c = r.minSize, i = r.multiple, f = r.maxFiles, l = r.onDragEnter, m = r.onDragLeave, g = r.onDragOver, b = r.onDrop, h = r.onDropAccepted, T = r.onDropRejected, x = r.onFileDialogCancel, B = r.onFileDialogOpen, N = r.useFsAccessApi, K = r.autoFocus, A = r.preventDropOnDocument, k = r.noClick, p = r.noKeyboard, Q = r.noDrag, M = r.noDragEventsBubbling, X = r.onError, ee = r.validator, ce = ae(function() {
|
|
2120
2114
|
return lo(t);
|
|
2121
2115
|
}, [t]), me = ae(function() {
|
|
2122
2116
|
return co(t);
|
|
2123
2117
|
}, [t]), ve = ae(function() {
|
|
2124
|
-
return typeof B == "function" ? B :
|
|
2118
|
+
return typeof B == "function" ? B : $r;
|
|
2125
2119
|
}, [B]), le = ae(function() {
|
|
2126
|
-
return typeof x == "function" ? x :
|
|
2127
|
-
}, [x]), W =
|
|
2128
|
-
!
|
|
2120
|
+
return typeof x == "function" ? x : $r;
|
|
2121
|
+
}, [x]), W = we(null), J = we(null), ne = Br(Co, cr), ie = rr(ne, 2), ue = ie[0], G = ie[1], u = ue.isFocused, y = ue.isFileDialogActive, C = we(typeof window < "u" && window.isSecureContext && N && so()), S = function() {
|
|
2122
|
+
!C.current && y && setTimeout(function() {
|
|
2129
2123
|
if (J.current) {
|
|
2130
2124
|
var _ = J.current.files;
|
|
2131
2125
|
_.length || (G({
|
|
@@ -2135,12 +2129,12 @@ function st() {
|
|
|
2135
2129
|
}, 300);
|
|
2136
2130
|
};
|
|
2137
2131
|
be(function() {
|
|
2138
|
-
return window.addEventListener("focus",
|
|
2139
|
-
window.removeEventListener("focus",
|
|
2132
|
+
return window.addEventListener("focus", S, !1), function() {
|
|
2133
|
+
window.removeEventListener("focus", S, !1);
|
|
2140
2134
|
};
|
|
2141
|
-
}, [J,
|
|
2142
|
-
var
|
|
2143
|
-
W.current && W.current.contains(_.target) || (_.preventDefault(),
|
|
2135
|
+
}, [J, y, le, C]);
|
|
2136
|
+
var E = we([]), P = function(_) {
|
|
2137
|
+
W.current && W.current.contains(_.target) || (_.preventDefault(), E.current = []);
|
|
2144
2138
|
};
|
|
2145
2139
|
be(function() {
|
|
2146
2140
|
return A && (document.addEventListener("dragover", kr, !1), document.addEventListener("drop", P, !1)), function() {
|
|
@@ -2150,11 +2144,11 @@ function st() {
|
|
|
2150
2144
|
return !n && K && W.current && W.current.focus(), function() {
|
|
2151
2145
|
};
|
|
2152
2146
|
}, [W, K, n]);
|
|
2153
|
-
var
|
|
2147
|
+
var w = Z(function(v) {
|
|
2154
2148
|
X ? X(v) : console.error(v);
|
|
2155
2149
|
}, [X]), O = Z(function(v) {
|
|
2156
|
-
v.preventDefault(), v.persist(), Fe(v),
|
|
2157
|
-
if (!(
|
|
2150
|
+
v.preventDefault(), v.persist(), Fe(v), E.current = [].concat(go(E.current), [v.target]), Ne(v) && Promise.resolve(a(v)).then(function(_) {
|
|
2151
|
+
if (!($e(v) && !M)) {
|
|
2158
2152
|
var Y = _.length, V = Y > 0 && no({
|
|
2159
2153
|
files: _,
|
|
2160
2154
|
accept: ce,
|
|
@@ -2172,9 +2166,9 @@ function st() {
|
|
|
2172
2166
|
}), l && l(v);
|
|
2173
2167
|
}
|
|
2174
2168
|
}).catch(function(_) {
|
|
2175
|
-
return
|
|
2169
|
+
return w(_);
|
|
2176
2170
|
});
|
|
2177
|
-
}, [a, l,
|
|
2171
|
+
}, [a, l, w, M, ce, c, o, i, f, ee]), R = Z(function(v) {
|
|
2178
2172
|
v.preventDefault(), v.persist(), Fe(v);
|
|
2179
2173
|
var _ = Ne(v);
|
|
2180
2174
|
if (_ && v.dataTransfer)
|
|
@@ -2182,30 +2176,30 @@ function st() {
|
|
|
2182
2176
|
v.dataTransfer.dropEffect = "copy";
|
|
2183
2177
|
} catch {
|
|
2184
2178
|
}
|
|
2185
|
-
return _ &&
|
|
2186
|
-
}, [
|
|
2179
|
+
return _ && g && g(v), !1;
|
|
2180
|
+
}, [g, M]), F = Z(function(v) {
|
|
2187
2181
|
v.preventDefault(), v.persist(), Fe(v);
|
|
2188
|
-
var _ =
|
|
2182
|
+
var _ = E.current.filter(function(V) {
|
|
2189
2183
|
return W.current && W.current.contains(V);
|
|
2190
2184
|
}), Y = _.indexOf(v.target);
|
|
2191
|
-
Y !== -1 && _.splice(Y, 1),
|
|
2185
|
+
Y !== -1 && _.splice(Y, 1), E.current = _, !(_.length > 0) && (G({
|
|
2192
2186
|
type: "setDraggedFiles",
|
|
2193
2187
|
isDragActive: !1,
|
|
2194
2188
|
isDragAccept: !1,
|
|
2195
2189
|
isDragReject: !1
|
|
2196
2190
|
}), Ne(v) && m && m(v));
|
|
2197
|
-
}, [W, m,
|
|
2191
|
+
}, [W, m, M]), D = Z(function(v, _) {
|
|
2198
2192
|
var Y = [], V = [];
|
|
2199
2193
|
v.forEach(function(te) {
|
|
2200
|
-
var De = rt(te, ce),
|
|
2194
|
+
var De = rt(te, ce), Ee = rr(De, 2), We = Ee[0], Ye = Ee[1], qe = tt(te, c, o), Ie = rr(qe, 2), Ue = Ie[0], Ke = Ie[1], He = ee ? ee(te) : null;
|
|
2201
2195
|
if (We && Ue && !He)
|
|
2202
2196
|
Y.push(te);
|
|
2203
2197
|
else {
|
|
2204
2198
|
var Ge = [Ye, Ke];
|
|
2205
2199
|
He && (Ge = Ge.concat(He)), V.push({
|
|
2206
2200
|
file: te,
|
|
2207
|
-
errors: Ge.filter(function(
|
|
2208
|
-
return
|
|
2201
|
+
errors: Ge.filter(function(yt) {
|
|
2202
|
+
return yt;
|
|
2209
2203
|
})
|
|
2210
2204
|
});
|
|
2211
2205
|
}
|
|
@@ -2220,15 +2214,15 @@ function st() {
|
|
|
2220
2214
|
type: "setFiles"
|
|
2221
2215
|
}), b && b(Y, V, _), V.length > 0 && T && T(V, _), Y.length > 0 && h && h(Y, _);
|
|
2222
2216
|
}, [G, i, ce, c, o, f, b, h, T, ee]), q = Z(function(v) {
|
|
2223
|
-
v.preventDefault(), v.persist(), Fe(v),
|
|
2224
|
-
|
|
2217
|
+
v.preventDefault(), v.persist(), Fe(v), E.current = [], Ne(v) && Promise.resolve(a(v)).then(function(_) {
|
|
2218
|
+
$e(v) && !M || D(_, v);
|
|
2225
2219
|
}).catch(function(_) {
|
|
2226
|
-
return
|
|
2220
|
+
return w(_);
|
|
2227
2221
|
}), G({
|
|
2228
2222
|
type: "reset"
|
|
2229
2223
|
});
|
|
2230
|
-
}, [a, D,
|
|
2231
|
-
if (
|
|
2224
|
+
}, [a, D, w, M]), d = Z(function() {
|
|
2225
|
+
if (C.current) {
|
|
2232
2226
|
G({
|
|
2233
2227
|
type: "openDialog"
|
|
2234
2228
|
}), ve();
|
|
@@ -2245,16 +2239,16 @@ function st() {
|
|
|
2245
2239
|
}).catch(function(_) {
|
|
2246
2240
|
uo(_) ? (le(_), G({
|
|
2247
2241
|
type: "closeDialog"
|
|
2248
|
-
})) : fo(_) ? (
|
|
2242
|
+
})) : fo(_) ? (C.current = !1, J.current ? (J.current.value = null, J.current.click()) : w(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."))) : w(_);
|
|
2249
2243
|
});
|
|
2250
2244
|
return;
|
|
2251
2245
|
}
|
|
2252
2246
|
J.current && (G({
|
|
2253
2247
|
type: "openDialog"
|
|
2254
2248
|
}), ve(), J.current.value = null, J.current.click());
|
|
2255
|
-
}, [G, ve, le, N, D,
|
|
2249
|
+
}, [G, ve, le, N, D, w, me, i]), re = Z(function(v) {
|
|
2256
2250
|
!W.current || !W.current.isEqualNode(v.target) || (v.key === " " || v.key === "Enter" || v.keyCode === 32 || v.keyCode === 13) && (v.preventDefault(), d());
|
|
2257
|
-
}, [W, d]),
|
|
2251
|
+
}, [W, d]), ye = Z(function() {
|
|
2258
2252
|
G({
|
|
2259
2253
|
type: "focus"
|
|
2260
2254
|
});
|
|
@@ -2271,14 +2265,14 @@ function st() {
|
|
|
2271
2265
|
}, Re = function(_) {
|
|
2272
2266
|
return Q ? null : _e(_);
|
|
2273
2267
|
}, Fe = function(_) {
|
|
2274
|
-
|
|
2268
|
+
M && _.stopPropagation();
|
|
2275
2269
|
}, dt = ae(function() {
|
|
2276
2270
|
return function() {
|
|
2277
|
-
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ = v.refKey, Y = _ === void 0 ? "ref" : _, V = v.role, te = v.onKeyDown, De = v.onFocus,
|
|
2271
|
+
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ = v.refKey, Y = _ === void 0 ? "ref" : _, V = v.role, te = v.onKeyDown, De = v.onFocus, Ee = v.onBlur, We = v.onClick, Ye = v.onDragEnter, qe = v.onDragOver, Ie = v.onDragLeave, Ue = v.onDrop, Ke = Le(v, vo);
|
|
2278
2272
|
return z(z(sr({
|
|
2279
2273
|
onKeyDown: ze(se(te, re)),
|
|
2280
|
-
onFocus: ze(se(De,
|
|
2281
|
-
onBlur: ze(se(
|
|
2274
|
+
onFocus: ze(se(De, ye)),
|
|
2275
|
+
onBlur: ze(se(Ee, Oe)),
|
|
2282
2276
|
onClick: _e(se(We, mr)),
|
|
2283
2277
|
onDragEnter: Re(se(Ye, O)),
|
|
2284
2278
|
onDragOver: Re(se(qe, R)),
|
|
@@ -2289,11 +2283,11 @@ function st() {
|
|
|
2289
2283
|
tabIndex: 0
|
|
2290
2284
|
} : {}), Ke);
|
|
2291
2285
|
};
|
|
2292
|
-
}, [W, re,
|
|
2286
|
+
}, [W, re, ye, Oe, mr, O, R, F, q, p, Q, n]), mt = Z(function(v) {
|
|
2293
2287
|
v.stopPropagation();
|
|
2294
2288
|
}, []), vt = ae(function() {
|
|
2295
2289
|
return function() {
|
|
2296
|
-
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ = v.refKey, Y = _ === void 0 ? "ref" : _, V = v.onChange, te = v.onClick, De = Le(v,
|
|
2290
|
+
var v = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ = v.refKey, Y = _ === void 0 ? "ref" : _, V = v.onChange, te = v.onClick, De = Le(v, yo), Ee = sr({
|
|
2297
2291
|
accept: ce,
|
|
2298
2292
|
multiple: i,
|
|
2299
2293
|
type: "file",
|
|
@@ -2304,7 +2298,7 @@ function st() {
|
|
|
2304
2298
|
onClick: _e(se(te, mt)),
|
|
2305
2299
|
tabIndex: -1
|
|
2306
2300
|
}, Y, J);
|
|
2307
|
-
return z(z({},
|
|
2301
|
+
return z(z({}, Ee), De);
|
|
2308
2302
|
};
|
|
2309
2303
|
}, [J, t, i, q, n]);
|
|
2310
2304
|
return z(z({}, ue), {}, {
|
|
@@ -2316,7 +2310,7 @@ function st() {
|
|
|
2316
2310
|
open: _e(d)
|
|
2317
2311
|
});
|
|
2318
2312
|
}
|
|
2319
|
-
function
|
|
2313
|
+
function Co(e, r) {
|
|
2320
2314
|
switch (r.type) {
|
|
2321
2315
|
case "focus":
|
|
2322
2316
|
return z(z({}, e), {}, {
|
|
@@ -2351,9 +2345,9 @@ function So(e, r) {
|
|
|
2351
2345
|
return e;
|
|
2352
2346
|
}
|
|
2353
2347
|
}
|
|
2354
|
-
function
|
|
2348
|
+
function $r() {
|
|
2355
2349
|
}
|
|
2356
|
-
const
|
|
2350
|
+
const So = () => {
|
|
2357
2351
|
const e = (i, f) => {
|
|
2358
2352
|
switch (f.type) {
|
|
2359
2353
|
case "add-files":
|
|
@@ -2409,7 +2403,7 @@ const Co = () => {
|
|
|
2409
2403
|
removeFile: l,
|
|
2410
2404
|
removeRejectedFile: m
|
|
2411
2405
|
}) => {
|
|
2412
|
-
const { getRootProps:
|
|
2406
|
+
const { getRootProps: g } = st({
|
|
2413
2407
|
accept: e,
|
|
2414
2408
|
maxFiles: o,
|
|
2415
2409
|
maxSize: c,
|
|
@@ -2428,7 +2422,7 @@ const Co = () => {
|
|
|
2428
2422
|
!o || t.length < o ? /* @__PURE__ */ s("div", { className: "file-upload__wrapper", children: /* @__PURE__ */ s(
|
|
2429
2423
|
"div",
|
|
2430
2424
|
{
|
|
2431
|
-
...
|
|
2425
|
+
...g(),
|
|
2432
2426
|
"aria-labelledby": a ? b : void 0,
|
|
2433
2427
|
className: "file-upload",
|
|
2434
2428
|
"data-testid": "file-upload",
|
|
@@ -2495,7 +2489,7 @@ const Co = () => {
|
|
|
2495
2489
|
onFileUpload: f,
|
|
2496
2490
|
removeFile: l,
|
|
2497
2491
|
removeRejectedFile: m
|
|
2498
|
-
} =
|
|
2492
|
+
} = So();
|
|
2499
2493
|
return /* @__PURE__ */ s(
|
|
2500
2494
|
Oo,
|
|
2501
2495
|
{
|
|
@@ -2512,8 +2506,7 @@ const Co = () => {
|
|
|
2512
2506
|
removeRejectedFile: m
|
|
2513
2507
|
}
|
|
2514
2508
|
);
|
|
2515
|
-
}
|
|
2516
|
-
const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do = (e) => (r, t) => {
|
|
2509
|
+
}, ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do = (e) => (r, t) => {
|
|
2517
2510
|
if (e) {
|
|
2518
2511
|
const n = e.has(r.value), a = e.has(t.value);
|
|
2519
2512
|
if (n && !a)
|
|
@@ -2543,7 +2536,7 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2543
2536
|
const m = ae(
|
|
2544
2537
|
() => new Set(r.map((N) => N.value)),
|
|
2545
2538
|
[r]
|
|
2546
|
-
),
|
|
2539
|
+
), g = ae(
|
|
2547
2540
|
() => new Set(t.map((N) => N.value)),
|
|
2548
2541
|
[t]
|
|
2549
2542
|
), [b, h] = fe(new Set(m));
|
|
@@ -2567,7 +2560,7 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2567
2560
|
/* @__PURE__ */ s("ul", { className: "multi-select__dropdown-list", "aria-label": N, children: K.sort(i).sort(Do(b)).map((A) => /* @__PURE__ */ s("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ s(
|
|
2568
2561
|
Rt,
|
|
2569
2562
|
{
|
|
2570
|
-
disabled:
|
|
2563
|
+
disabled: g.has(A.value),
|
|
2571
2564
|
label: A.label,
|
|
2572
2565
|
checked: m.has(A.value),
|
|
2573
2566
|
value: A.value,
|
|
@@ -2591,7 +2584,7 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2591
2584
|
dropdownFooter: l,
|
|
2592
2585
|
variant: m = "search"
|
|
2593
2586
|
}) => {
|
|
2594
|
-
const
|
|
2587
|
+
const g = Ft(() => {
|
|
2595
2588
|
h(!1), x("");
|
|
2596
2589
|
});
|
|
2597
2590
|
It(() => {
|
|
@@ -2601,13 +2594,13 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2601
2594
|
be(() => {
|
|
2602
2595
|
b || x("");
|
|
2603
2596
|
}, [b]);
|
|
2604
|
-
const [B, N] = fe([]), K = r || B, A = (
|
|
2605
|
-
const X = Array.from(new Set(
|
|
2597
|
+
const [B, N] = fe([]), K = r || B, A = (M) => {
|
|
2598
|
+
const X = Array.from(new Set(M));
|
|
2606
2599
|
N(X), n && n(X);
|
|
2607
2600
|
}, k = ke(), p = ke(), Q = K.filter(
|
|
2608
|
-
(
|
|
2609
|
-
).sort(ct).map((
|
|
2610
|
-
return /* @__PURE__ */ s("div", { ref:
|
|
2601
|
+
(M) => c.some((X) => X.value === M.value)
|
|
2602
|
+
).sort(ct).map((M) => M.label).join(", ");
|
|
2603
|
+
return /* @__PURE__ */ s("div", { ref: g, children: /* @__PURE__ */ U("div", { className: "multi-select", children: [
|
|
2611
2604
|
m === "search" ? /* @__PURE__ */ s(
|
|
2612
2605
|
jt,
|
|
2613
2606
|
{
|
|
@@ -2619,8 +2612,8 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2619
2612
|
"aria-label": t || a || "Search",
|
|
2620
2613
|
disabled: e,
|
|
2621
2614
|
autoComplete: "off",
|
|
2622
|
-
onChange: (
|
|
2623
|
-
x(
|
|
2615
|
+
onChange: (M) => {
|
|
2616
|
+
x(M), h(!0);
|
|
2624
2617
|
},
|
|
2625
2618
|
onFocus: () => h(!0),
|
|
2626
2619
|
placeholder: a ?? "Search",
|
|
@@ -2639,7 +2632,7 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2639
2632
|
"aria-expanded": b,
|
|
2640
2633
|
className: "multi-select__select-button",
|
|
2641
2634
|
onClick: () => {
|
|
2642
|
-
h((
|
|
2635
|
+
h((M) => !M);
|
|
2643
2636
|
},
|
|
2644
2637
|
children: /* @__PURE__ */ s("span", { className: "multi-select__condensed-text", children: K.length > 0 ? Q : a ?? "Select items" })
|
|
2645
2638
|
}
|
|
@@ -2650,7 +2643,7 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2650
2643
|
id: k,
|
|
2651
2644
|
isOpen: b,
|
|
2652
2645
|
items: T.length > 0 ? c.filter(
|
|
2653
|
-
(
|
|
2646
|
+
(M) => M.label.toLowerCase().includes(T.toLowerCase())
|
|
2654
2647
|
) : c,
|
|
2655
2648
|
selectedItems: K,
|
|
2656
2649
|
disabledItems: i,
|
|
@@ -2662,12 +2655,12 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2662
2655
|
{
|
|
2663
2656
|
appearance: "link",
|
|
2664
2657
|
onClick: () => {
|
|
2665
|
-
const
|
|
2658
|
+
const M = c.filter(
|
|
2666
2659
|
(X) => !i.some(
|
|
2667
2660
|
(ee) => ee.value === X.value
|
|
2668
2661
|
)
|
|
2669
2662
|
);
|
|
2670
|
-
A([...K,
|
|
2663
|
+
A([...K, ...M]);
|
|
2671
2664
|
},
|
|
2672
2665
|
type: "button",
|
|
2673
2666
|
children: "Select all"
|
|
@@ -2678,12 +2671,12 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2678
2671
|
{
|
|
2679
2672
|
appearance: "link",
|
|
2680
2673
|
onClick: () => {
|
|
2681
|
-
const
|
|
2674
|
+
const M = K.filter(
|
|
2682
2675
|
(X) => i.some(
|
|
2683
2676
|
(ee) => ee.value === X.value
|
|
2684
2677
|
)
|
|
2685
2678
|
);
|
|
2686
|
-
A(
|
|
2679
|
+
A(M);
|
|
2687
2680
|
},
|
|
2688
2681
|
type: "button",
|
|
2689
2682
|
children: "Clear"
|
|
@@ -2702,8 +2695,7 @@ const ct = (e, r) => e.label.localeCompare(r.label, "en", { numeric: !0 }), Do =
|
|
|
2702
2695
|
large: 1036,
|
|
2703
2696
|
// Large desktop
|
|
2704
2697
|
xLarge: 1681
|
|
2705
|
-
}
|
|
2706
|
-
const lt = Lr({ variant: "regular" }), ut = ({
|
|
2698
|
+
}, lt = Lr({ variant: "regular" }), ut = ({
|
|
2707
2699
|
className: e,
|
|
2708
2700
|
children: r,
|
|
2709
2701
|
variant: t,
|
|
@@ -2739,15 +2731,15 @@ const lt = Lr({ variant: "regular" }), ut = ({
|
|
|
2739
2731
|
style: t,
|
|
2740
2732
|
...n
|
|
2741
2733
|
}) => {
|
|
2742
|
-
const { variant: a } = lr(lt), o =
|
|
2743
|
-
var m,
|
|
2734
|
+
const { variant: a } = lr(lt), o = we(null), [c, i] = fe(null), f = Z(() => {
|
|
2735
|
+
var m, g;
|
|
2744
2736
|
if (window.innerWidth > Ro.small) {
|
|
2745
|
-
const b = (
|
|
2737
|
+
const b = (g = (m = o.current) == null ? void 0 : m.getBoundingClientRect) == null ? void 0 : g.call(m).top;
|
|
2746
2738
|
b && i(b + 1);
|
|
2747
2739
|
} else
|
|
2748
2740
|
i(null);
|
|
2749
2741
|
}, []);
|
|
2750
|
-
|
|
2742
|
+
wt(() => {
|
|
2751
2743
|
f();
|
|
2752
2744
|
}, [f]), be(() => (window.addEventListener("resize", f), () => window.removeEventListener("resize", f)), [f]);
|
|
2753
2745
|
const l = ae(() => a === "full-height" && c ? {
|
|
@@ -2780,8 +2772,8 @@ const Ko = ({ value: e, unit: r }, {
|
|
|
2780
2772
|
const c = e < 0, i = Math.abs(e);
|
|
2781
2773
|
if (i === 0)
|
|
2782
2774
|
return { value: 0, unit: n || "B" };
|
|
2783
|
-
const f = t ? 1024 : 1e3, l = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], m = l.findIndex((x) => x === r) || 0,
|
|
2784
|
-
let h =
|
|
2775
|
+
const f = t ? 1024 : 1e3, l = t ? ["B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"] : ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], m = l.findIndex((x) => x === r) || 0, g = i * Math.pow(f, m), b = n ? l.findIndex((x) => x === n) : Math.floor(Math.log(g) / Math.log(f));
|
|
2776
|
+
let h = g / Math.pow(f, b);
|
|
2785
2777
|
if (h % 1 !== 0) {
|
|
2786
2778
|
const x = Math.pow(10, a);
|
|
2787
2779
|
h = Math[o](h * x) / x;
|
|
@@ -2800,13 +2792,13 @@ export {
|
|
|
2800
2792
|
fr as FormSection,
|
|
2801
2793
|
qr as InputGroup,
|
|
2802
2794
|
Hr as MainToolbar,
|
|
2803
|
-
|
|
2795
|
+
Mt as Meter,
|
|
2804
2796
|
Uo as MultiSelect,
|
|
2805
2797
|
Po as MultiSelectDropdown,
|
|
2806
2798
|
H as Navigation,
|
|
2807
2799
|
ln as NavigationBar,
|
|
2808
2800
|
zo as NestedFormGroup,
|
|
2809
|
-
|
|
2801
|
+
wn as Pagination,
|
|
2810
2802
|
Wo as PaginationContainer,
|
|
2811
2803
|
Wt as Placeholder,
|
|
2812
2804
|
zt as ProgressIndicator,
|