@canonical/maas-react-components 1.17.1 → 1.18.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 +1228 -1171
- package/dist/@canonical/maas-react-components.umd.js +11 -11
- package/dist/src/lib/components/MultiSelect/MultiSelect.d.ts +13 -1
- package/dist/src/lib/components/MultiSelect/MultiSelect.stories.d.ts +29 -1
- package/dist/src/lib/sections/Navigation/Link/Link.stories.d.ts +0 -1
- package/dist/style.css +1 -1
- package/package.json +6 -6
- package/dist/src/lib/components/FadeInDown/FadeInDown.stories.d.ts +0 -7
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { useListener as
|
|
5
|
-
function
|
|
1
|
+
import { jsxs as se, jsx as u, Fragment as De } from "react/jsx-runtime";
|
|
2
|
+
import * as ne from "react";
|
|
3
|
+
import ut, { useRef as Ce, useState as be, useEffect as Oe, useCallback as ee, cloneElement as ft, createContext as pt, useId as rr, useContext as Mr, useMemo as oe, 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 _e, Icon as ke, Row as _t, Col as Et, Input as wt, CheckboxInput as Tt, useClickOutside as St, useOnEscapePressed as Ct, SearchBox as Ot } from "@canonical/react-components";
|
|
5
|
+
function Lr(e) {
|
|
6
6
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
7
7
|
}
|
|
8
|
-
var
|
|
8
|
+
var zr = { exports: {} };
|
|
9
9
|
/*!
|
|
10
10
|
Copyright (c) 2018 Jed Watson.
|
|
11
11
|
Licensed under the MIT License (MIT), see
|
|
@@ -14,36 +14,36 @@ var Br = { exports: {} };
|
|
|
14
14
|
(function(e) {
|
|
15
15
|
(function() {
|
|
16
16
|
var r = {}.hasOwnProperty;
|
|
17
|
-
function
|
|
18
|
-
for (var
|
|
19
|
-
var
|
|
20
|
-
|
|
21
|
-
var s = typeof o;
|
|
22
|
-
if (s === "string" || s === "number")
|
|
23
|
-
t.push(o);
|
|
24
|
-
else if (Array.isArray(o)) {
|
|
25
|
-
if (o.length) {
|
|
26
|
-
var a = n.apply(null, o);
|
|
27
|
-
a && t.push(a);
|
|
28
|
-
}
|
|
29
|
-
} else if (s === "object") {
|
|
30
|
-
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]")) {
|
|
31
|
-
t.push(o.toString());
|
|
32
|
-
continue;
|
|
33
|
-
}
|
|
34
|
-
for (var d in o)
|
|
35
|
-
r.call(o, d) && o[d] && t.push(d);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
17
|
+
function t() {
|
|
18
|
+
for (var o = "", s = 0; s < arguments.length; s++) {
|
|
19
|
+
var i = arguments[s];
|
|
20
|
+
i && (o = a(o, n(i)));
|
|
38
21
|
}
|
|
39
|
-
return
|
|
40
|
-
}
|
|
41
|
-
|
|
22
|
+
return o;
|
|
23
|
+
}
|
|
24
|
+
function n(o) {
|
|
25
|
+
if (typeof o == "string" || typeof o == "number")
|
|
26
|
+
return o;
|
|
27
|
+
if (typeof o != "object")
|
|
28
|
+
return "";
|
|
29
|
+
if (Array.isArray(o))
|
|
30
|
+
return t.apply(null, o);
|
|
31
|
+
if (o.toString !== Object.prototype.toString && !o.toString.toString().includes("[native code]"))
|
|
32
|
+
return o.toString();
|
|
33
|
+
var s = "";
|
|
34
|
+
for (var i in o)
|
|
35
|
+
r.call(o, i) && o[i] && (s = a(s, i));
|
|
36
|
+
return s;
|
|
37
|
+
}
|
|
38
|
+
function a(o, s) {
|
|
39
|
+
return s ? o ? o + " " + s : o + s : o;
|
|
40
|
+
}
|
|
41
|
+
e.exports ? (t.default = t, e.exports = t) : window.classNames = t;
|
|
42
42
|
})();
|
|
43
|
-
})(
|
|
44
|
-
var
|
|
45
|
-
const
|
|
46
|
-
const
|
|
43
|
+
})(zr);
|
|
44
|
+
var xt = zr.exports;
|
|
45
|
+
const W = /* @__PURE__ */ Lr(xt);
|
|
46
|
+
const ve = {
|
|
47
47
|
caution: "#F99B11",
|
|
48
48
|
light: "#F7F7F7",
|
|
49
49
|
linkFaded: "#D3E4ED",
|
|
@@ -52,15 +52,15 @@ const me = {
|
|
|
52
52
|
positiveFaded: "#B7CCB9",
|
|
53
53
|
positiveMid: "#4DAB4D",
|
|
54
54
|
positive: "#0E8420"
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
],
|
|
61
|
-
var
|
|
62
|
-
const
|
|
63
|
-
return
|
|
55
|
+
}, wo = [
|
|
56
|
+
ve.link,
|
|
57
|
+
ve.positive,
|
|
58
|
+
ve.negative,
|
|
59
|
+
ve.caution
|
|
60
|
+
], Dt = ve.linkFaded, Br = ve.caution, tr = ve.light, mr = 2, vr = 1, yr = (e, r) => {
|
|
61
|
+
var a, o;
|
|
62
|
+
const t = ((o = (a = e == null ? void 0 : e.current) == null ? void 0 : a.getBoundingClientRect()) == null ? void 0 : o.width) || 0;
|
|
63
|
+
return t > r * mr ? t / r : mr;
|
|
64
64
|
}, he = {
|
|
65
65
|
bar: "meter-bar",
|
|
66
66
|
container: "meter-container",
|
|
@@ -68,95 +68,95 @@ const me = {
|
|
|
68
68
|
label: "meter-label",
|
|
69
69
|
meteroverflow: "meter-overflow",
|
|
70
70
|
segments: "meter-segments"
|
|
71
|
-
},
|
|
71
|
+
}, At = ({
|
|
72
72
|
className: e,
|
|
73
73
|
children: r,
|
|
74
|
-
data:
|
|
75
|
-
max:
|
|
76
|
-
variant:
|
|
74
|
+
data: t,
|
|
75
|
+
max: n,
|
|
76
|
+
variant: a = "regular",
|
|
77
77
|
size: o = "regular",
|
|
78
78
|
...s
|
|
79
79
|
}) => {
|
|
80
|
-
const
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
}, [l,
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
return
|
|
80
|
+
const i = Ce(null), y = t == null ? void 0 : t.reduce((D, _) => D + _.value, 0), l = n || y, v = t.map((D) => D.value / l * 100), [g, w] = be(0);
|
|
81
|
+
Oe(() => {
|
|
82
|
+
w(a === "segmented" ? yr(i, l) : 0);
|
|
83
|
+
}, [l, a]);
|
|
84
|
+
const O = ee(() => {
|
|
85
|
+
w(yr(i, l));
|
|
86
|
+
}, [i, l, w]);
|
|
87
|
+
return gt(window, O, "resize", !0, a === "segmented"), /* @__PURE__ */ se(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
|
-
className:
|
|
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
94
|
"data-testid": he.container,
|
|
95
|
-
ref:
|
|
95
|
+
ref: i,
|
|
96
96
|
children: [
|
|
97
|
-
/* @__PURE__ */ u(
|
|
98
|
-
|
|
97
|
+
/* @__PURE__ */ u(Pt, { children: /* @__PURE__ */ u(
|
|
98
|
+
Rt,
|
|
99
99
|
{
|
|
100
|
-
data:
|
|
101
|
-
datumWidths:
|
|
100
|
+
data: t,
|
|
101
|
+
datumWidths: v,
|
|
102
102
|
maximum: l,
|
|
103
|
-
overColor:
|
|
103
|
+
overColor: Br,
|
|
104
104
|
segmentWidth: g,
|
|
105
|
-
separatorColor:
|
|
105
|
+
separatorColor: tr
|
|
106
106
|
}
|
|
107
107
|
) }),
|
|
108
108
|
r
|
|
109
109
|
]
|
|
110
110
|
}
|
|
111
111
|
);
|
|
112
|
-
},
|
|
112
|
+
}, Pt = ({ children: e }) => /* @__PURE__ */ u(
|
|
113
113
|
"div",
|
|
114
114
|
{
|
|
115
115
|
className: "p-meter__bar",
|
|
116
116
|
"data-testid": he.bar,
|
|
117
|
-
style: { backgroundColor:
|
|
117
|
+
style: { backgroundColor: Dt },
|
|
118
118
|
children: e
|
|
119
119
|
}
|
|
120
|
-
),
|
|
120
|
+
), Rt = ({
|
|
121
121
|
data: e,
|
|
122
122
|
datumWidths: r,
|
|
123
|
-
maximum:
|
|
124
|
-
segmentWidth:
|
|
123
|
+
maximum: t,
|
|
124
|
+
segmentWidth: n
|
|
125
125
|
}) => {
|
|
126
|
-
const
|
|
127
|
-
backgroundColor:
|
|
126
|
+
const a = () => (e == null ? void 0 : e.reduce((i, y) => i + y.value, 0)) > t, o = (i, y) => ({
|
|
127
|
+
backgroundColor: i.color,
|
|
128
128
|
left: `${r == null ? void 0 : r.reduce(
|
|
129
|
-
(l,
|
|
129
|
+
(l, v, g) => y > g ? l + v : l,
|
|
130
130
|
0
|
|
131
131
|
)}%`,
|
|
132
|
-
width: `${r[
|
|
132
|
+
width: `${r[y]}%`
|
|
133
133
|
}), s = () => ({
|
|
134
134
|
background: `repeating-linear-gradient(
|
|
135
135
|
to right,
|
|
136
136
|
transparent 0,
|
|
137
|
-
transparent ${
|
|
138
|
-
${
|
|
139
|
-
${
|
|
137
|
+
transparent ${n - vr}px,
|
|
138
|
+
${tr} ${n - vr}px,
|
|
139
|
+
${tr} ${n}px
|
|
140
140
|
)`
|
|
141
141
|
});
|
|
142
|
-
return /* @__PURE__ */
|
|
143
|
-
|
|
142
|
+
return /* @__PURE__ */ se(De, { children: [
|
|
143
|
+
a() ? /* @__PURE__ */ u(
|
|
144
144
|
"div",
|
|
145
145
|
{
|
|
146
146
|
className: "p-meter__filled",
|
|
147
147
|
"data-testid": he.meteroverflow,
|
|
148
|
-
style: { backgroundColor:
|
|
148
|
+
style: { backgroundColor: Br, width: "100%" }
|
|
149
149
|
}
|
|
150
|
-
) : e == null ? void 0 : e.map((
|
|
150
|
+
) : e == null ? void 0 : e.map((i, y) => /* @__PURE__ */ u(
|
|
151
151
|
"div",
|
|
152
152
|
{
|
|
153
153
|
className: "p-meter__filled",
|
|
154
154
|
"data-testid": he.filled,
|
|
155
|
-
style: o(
|
|
155
|
+
style: o(i, y)
|
|
156
156
|
},
|
|
157
|
-
`meter-${
|
|
157
|
+
`meter-${y}`
|
|
158
158
|
)),
|
|
159
|
-
|
|
159
|
+
n > 0 && /* @__PURE__ */ u(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
162
|
className: "p-meter__separators",
|
|
@@ -165,27 +165,27 @@ const me = {
|
|
|
165
165
|
}
|
|
166
166
|
)
|
|
167
167
|
] });
|
|
168
|
-
},
|
|
168
|
+
}, It = ({
|
|
169
169
|
className: e,
|
|
170
170
|
children: r
|
|
171
171
|
}) => /* @__PURE__ */ u(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
174
|
+
className: W("p-meter__label", e),
|
|
175
175
|
"data-testid": he.label,
|
|
176
176
|
children: r
|
|
177
177
|
}
|
|
178
178
|
);
|
|
179
|
-
|
|
180
|
-
const
|
|
179
|
+
At.Label = It;
|
|
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,
|
|
183
|
-
className:
|
|
183
|
+
className: t
|
|
184
184
|
}) => /* @__PURE__ */ u(
|
|
185
|
-
|
|
185
|
+
ht,
|
|
186
186
|
{
|
|
187
187
|
className: "p-side-navigation__tooltip-wrapper",
|
|
188
|
-
message: /* @__PURE__ */
|
|
188
|
+
message: /* @__PURE__ */ se(De, { children: [
|
|
189
189
|
e ? "expand" : "collapse",
|
|
190
190
|
"( ",
|
|
191
191
|
/* @__PURE__ */ u("code", { children: "[" }),
|
|
@@ -198,78 +198,78 @@ const _o = ({ children: e, to: r, ...n }) => /* @__PURE__ */ u(_n, { ...n, href:
|
|
|
198
198
|
{
|
|
199
199
|
appearance: "base",
|
|
200
200
|
"aria-label": `${e ? "expand" : "collapse"} main navigation`,
|
|
201
|
-
className:
|
|
201
|
+
className: W(
|
|
202
202
|
"is-dense has-icon is-dark u-no-margin l-navigation-collapse-toggle",
|
|
203
|
-
|
|
203
|
+
t
|
|
204
204
|
),
|
|
205
|
-
onClick: (
|
|
206
|
-
r(!e),
|
|
205
|
+
onClick: (n) => {
|
|
206
|
+
r(!e), n.stopPropagation(), n.currentTarget.blur();
|
|
207
207
|
},
|
|
208
|
-
children: /* @__PURE__ */ u(
|
|
208
|
+
children: /* @__PURE__ */ u(ke, { light: !0, name: "sidebar-toggle" })
|
|
209
209
|
}
|
|
210
210
|
)
|
|
211
211
|
}
|
|
212
|
-
),
|
|
212
|
+
), kt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__content", children: /* @__PURE__ */ u("nav", { className: "p-side-navigation--icons is-dark", children: e }) }), Nt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__controls u-no-margin--top", children: e }), $t = ({ children: e }) => /* @__PURE__ */ u("div", { className: "l-navigation__drawer", children: /* @__PURE__ */ u("div", { className: "p-panel is-dark", children: e }) }), Mt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__footer", children: e }), Lt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-panel__header", children: e }), zt = ({ light: e = !0, name: r }) => /* @__PURE__ */ u(ke, { className: "p-side-navigation__icon", light: e, name: r }), Bt = ({ children: e, className: r, hasActiveChild: t }) => /* @__PURE__ */ u("li", { className: W("p-side-navigation__item", r, { "has-active-child": t }), children: e }), Wt = ({ children: e, id: r, variant: t = "base" }) => /* @__PURE__ */ u("span", { className: W("p-side-navigation__label", { "p-side-navigation__label--group": t === "group" }), id: r, children: e }), Yt = ({
|
|
213
213
|
as: e,
|
|
214
214
|
...r
|
|
215
215
|
}) => /* @__PURE__ */ u(
|
|
216
216
|
e || "a",
|
|
217
217
|
{
|
|
218
|
-
className:
|
|
218
|
+
className: W("p-side-navigation__link", r.className),
|
|
219
219
|
...r
|
|
220
220
|
}
|
|
221
|
-
),
|
|
221
|
+
), qt = ({ children: e, className: r }) => /* @__PURE__ */ u("ul", { className: W("p-side-navigation__list", r), children: e }), Ht = ({
|
|
222
222
|
as: e,
|
|
223
223
|
children: r,
|
|
224
|
-
className:
|
|
225
|
-
...
|
|
226
|
-
}) => /* @__PURE__ */ u(e || "a", { className:
|
|
224
|
+
className: t,
|
|
225
|
+
...n
|
|
226
|
+
}) => /* @__PURE__ */ u(e || "a", { className: W("p-panel__logo", t), ...n, children: /* @__PURE__ */ u("div", { className: "p-navigation__tagged-logo", children: r }) }), Kt = ({ children: e }) => ft(e, { className: "p-panel__logo-icon p-navigation__logo-icon" }), Ut = ({ children: e, variant: r = "base" }) => /* @__PURE__ */ u(
|
|
227
227
|
"div",
|
|
228
228
|
{
|
|
229
|
-
className:
|
|
229
|
+
className: W("p-panel__logo-name is-fading-when-collapsed", {
|
|
230
230
|
"p-panel__logo-name--small": r === "small"
|
|
231
231
|
}),
|
|
232
232
|
children: e
|
|
233
233
|
}
|
|
234
|
-
),
|
|
234
|
+
), Gt = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-navigation__logo-tag", children: e }), Vt = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-panel__logo-text", children: e }), Jt = ({
|
|
235
235
|
children: e,
|
|
236
236
|
className: r,
|
|
237
|
-
onClick:
|
|
237
|
+
onClick: t
|
|
238
238
|
}) => /* @__PURE__ */ u(
|
|
239
239
|
_e,
|
|
240
240
|
{
|
|
241
241
|
appearance: "base",
|
|
242
|
-
className:
|
|
242
|
+
className: W(
|
|
243
243
|
"p-side-navigation__button--menu has-icon is-dark",
|
|
244
244
|
r
|
|
245
245
|
),
|
|
246
|
-
onClick: (
|
|
247
|
-
|
|
246
|
+
onClick: (n) => {
|
|
247
|
+
t && t(n), n.stopPropagation(), n.currentTarget.blur();
|
|
248
248
|
},
|
|
249
249
|
children: e
|
|
250
250
|
}
|
|
251
|
-
),
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
const lr =
|
|
251
|
+
), Xt = ({ children: e }) => /* @__PURE__ */ u("span", { className: "p-side-navigation__text", children: e });
|
|
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 }), Zt = ({ 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 = Bt;
|
|
262
|
+
H.Link = Yt;
|
|
263
|
+
H.Text = Xt;
|
|
264
|
+
H.Icon = zt;
|
|
265
|
+
H.Label = Wt;
|
|
266
|
+
H.Logo = Ht;
|
|
267
|
+
H.LogoTag = Gt;
|
|
268
|
+
H.LogoIcon = Kt;
|
|
269
|
+
H.LogoName = Ut;
|
|
270
|
+
H.LogoText = Vt;
|
|
271
|
+
Zt.MenuButton = Jt;
|
|
272
|
+
const lr = pt(null), Wr = ({ children: e }) => {
|
|
273
273
|
const r = rr();
|
|
274
274
|
return /* @__PURE__ */ u(lr.Provider, { value: r, children: /* @__PURE__ */ u(
|
|
275
275
|
"div",
|
|
@@ -281,72 +281,72 @@ const lr = mn(null), Yr = ({ children: e }) => {
|
|
|
281
281
|
children: e
|
|
282
282
|
}
|
|
283
283
|
) });
|
|
284
|
-
},
|
|
284
|
+
}, Qt = ({ children: e }) => {
|
|
285
285
|
const r = Mr(lr);
|
|
286
286
|
return /* @__PURE__ */ u("label", { id: `${r}_label`, children: e });
|
|
287
|
-
},
|
|
287
|
+
}, en = ({ children: e }) => {
|
|
288
288
|
const r = Mr(lr);
|
|
289
289
|
return /* @__PURE__ */ u("p", { className: "p-form-help-text", id: `${r}_description`, children: e });
|
|
290
290
|
};
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
const ur = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section", children: e }),
|
|
294
|
-
ur.Title =
|
|
295
|
-
ur.Description =
|
|
296
|
-
ur.Content =
|
|
297
|
-
function
|
|
298
|
-
const [r,
|
|
291
|
+
Wr.Label = Qt;
|
|
292
|
+
Wr.Description = en;
|
|
293
|
+
const ur = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section", children: e }), rn = ({ children: e }) => /* @__PURE__ */ u("h5", { className: "p-form-section__title u-no-padding--top", children: e }), tn = ({ children: e }) => /* @__PURE__ */ u("p", { className: "p-form-help-text", children: e }), nn = ({ children: e }) => /* @__PURE__ */ u("div", { className: "p-form-section__content", children: e });
|
|
294
|
+
ur.Title = rn;
|
|
295
|
+
ur.Description = tn;
|
|
296
|
+
ur.Content = nn;
|
|
297
|
+
function on(e) {
|
|
298
|
+
const [r, t] = ne.useState(null), n = ne.useRef(null), a = ne.useCallback(() => {
|
|
299
299
|
if (e.current) {
|
|
300
300
|
const o = e.current.getBoundingClientRect();
|
|
301
|
-
|
|
301
|
+
t(o);
|
|
302
302
|
}
|
|
303
303
|
}, [e]);
|
|
304
|
-
return
|
|
304
|
+
return ne.useEffect(() => {
|
|
305
305
|
const o = new ResizeObserver(() => {
|
|
306
|
-
|
|
306
|
+
n.current && cancelAnimationFrame(n.current), n.current = requestAnimationFrame(a);
|
|
307
307
|
});
|
|
308
308
|
return e.current && o.observe(e.current), () => {
|
|
309
|
-
|
|
309
|
+
n.current && cancelAnimationFrame(n.current), o.disconnect();
|
|
310
310
|
};
|
|
311
|
-
}, [e,
|
|
311
|
+
}, [e, a]), r;
|
|
312
312
|
}
|
|
313
|
-
const
|
|
314
|
-
}]),
|
|
315
|
-
const r =
|
|
313
|
+
const Yr = ne.createContext(null), qr = ne.createContext([!1, () => {
|
|
314
|
+
}]), Hr = ({ children: e }) => {
|
|
315
|
+
const r = ne.useRef(null), t = on(r), [n, a] = ne.useState(!1);
|
|
316
316
|
return /* @__PURE__ */ u(
|
|
317
317
|
"header",
|
|
318
318
|
{
|
|
319
|
-
className:
|
|
320
|
-
"main-toolbar--stacked":
|
|
319
|
+
className: W("main-toolbar", {
|
|
320
|
+
"main-toolbar--stacked": n
|
|
321
321
|
}),
|
|
322
322
|
ref: r,
|
|
323
|
-
children: /* @__PURE__ */ u(
|
|
323
|
+
children: /* @__PURE__ */ u(Yr.Provider, { value: t, children: /* @__PURE__ */ u(qr.Provider, { value: [n, a], children: e }) })
|
|
324
324
|
}
|
|
325
325
|
);
|
|
326
|
-
},
|
|
326
|
+
}, an = ({
|
|
327
327
|
as: e,
|
|
328
328
|
children: r,
|
|
329
|
-
className:
|
|
330
|
-
...
|
|
329
|
+
className: t,
|
|
330
|
+
...n
|
|
331
331
|
}) => /* @__PURE__ */ u(
|
|
332
332
|
e || "h1",
|
|
333
333
|
{
|
|
334
|
-
className:
|
|
334
|
+
className: W("main-toolbar__title p-heading--4", t),
|
|
335
335
|
"data-testid": "main-toolbar-heading",
|
|
336
|
-
...
|
|
336
|
+
...n,
|
|
337
337
|
children: r
|
|
338
338
|
}
|
|
339
|
-
),
|
|
340
|
-
const r =
|
|
341
|
-
return
|
|
342
|
-
!
|
|
343
|
-
}, [
|
|
339
|
+
), sn = ({ children: e }) => {
|
|
340
|
+
const r = ne.useContext(Yr), [t, n] = ne.useContext(qr), a = ne.useRef(null);
|
|
341
|
+
return ne.useEffect(() => {
|
|
342
|
+
!a.current || !r || n(a.current.getBoundingClientRect().width > r.width);
|
|
343
|
+
}, [n, r, a]), /* @__PURE__ */ se(De, { children: [
|
|
344
344
|
/* @__PURE__ */ u(
|
|
345
345
|
"div",
|
|
346
346
|
{
|
|
347
347
|
"aria-hidden": "true",
|
|
348
348
|
className: "main-toolbar__controls main-toolbar__controls--observer",
|
|
349
|
-
ref:
|
|
349
|
+
ref: a,
|
|
350
350
|
style: { visibility: "hidden", position: "absolute" },
|
|
351
351
|
children: e
|
|
352
352
|
}
|
|
@@ -354,152 +354,152 @@ const qr = Q.createContext(null), Hr = Q.createContext([!1, () => {
|
|
|
354
354
|
/* @__PURE__ */ u(
|
|
355
355
|
"div",
|
|
356
356
|
{
|
|
357
|
-
className:
|
|
358
|
-
"main-toolbar__controls--stacked":
|
|
357
|
+
className: W("main-toolbar__controls", {
|
|
358
|
+
"main-toolbar__controls--stacked": t
|
|
359
359
|
}),
|
|
360
360
|
children: e
|
|
361
361
|
}
|
|
362
362
|
)
|
|
363
363
|
] });
|
|
364
364
|
};
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
Hr.Title = an;
|
|
366
|
+
Hr.Controls = sn;
|
|
367
367
|
const Le = ({
|
|
368
368
|
children: e,
|
|
369
369
|
className: r,
|
|
370
|
-
as:
|
|
371
|
-
variant:
|
|
372
|
-
...
|
|
370
|
+
as: t,
|
|
371
|
+
variant: n = "wide",
|
|
372
|
+
...a
|
|
373
373
|
}) => {
|
|
374
|
-
const o =
|
|
375
|
-
return /* @__PURE__ */ u(o, { ...
|
|
376
|
-
},
|
|
377
|
-
|
|
374
|
+
const o = t || "section", s = W("content-section", r);
|
|
375
|
+
return /* @__PURE__ */ u(o, { ...a, className: s, children: /* @__PURE__ */ u(_t, { children: /* @__PURE__ */ u(Et, { size: n === "narrow" ? 6 : 12, children: e }) }) });
|
|
376
|
+
}, cn = ({ children: e, className: r, as: t, ...n }) => /* @__PURE__ */ u(
|
|
377
|
+
t || "h1",
|
|
378
378
|
{
|
|
379
|
-
...
|
|
380
|
-
className:
|
|
379
|
+
...n,
|
|
380
|
+
className: W("content-section__title p-heading--4", r),
|
|
381
381
|
children: e
|
|
382
382
|
}
|
|
383
|
-
),
|
|
384
|
-
Le.Title =
|
|
385
|
-
Le.Header =
|
|
386
|
-
Le.Content =
|
|
387
|
-
Le.Footer =
|
|
388
|
-
const
|
|
383
|
+
), ln = ({ children: e, className: r }) => /* @__PURE__ */ u("header", { className: W("content-section__header", r), children: e }), un = ({ children: e, className: r }) => /* @__PURE__ */ u("div", { className: W("content-section__body", r), children: e }), fn = ({ children: e, className: r }) => /* @__PURE__ */ u("footer", { className: W("content-section__footer", r), children: e });
|
|
384
|
+
Le.Title = cn;
|
|
385
|
+
Le.Header = ln;
|
|
386
|
+
Le.Content = un;
|
|
387
|
+
Le.Footer = fn;
|
|
388
|
+
const Kr = ({
|
|
389
389
|
children: e,
|
|
390
390
|
className: r,
|
|
391
|
-
isVisible:
|
|
391
|
+
isVisible: t
|
|
392
392
|
}) => /* @__PURE__ */ u(
|
|
393
393
|
"div",
|
|
394
394
|
{
|
|
395
|
-
className:
|
|
396
|
-
"aria-hidden":
|
|
397
|
-
style: { visibility:
|
|
395
|
+
className: W("fade-in--down", r),
|
|
396
|
+
"aria-hidden": t ? "false" : "true",
|
|
397
|
+
style: { visibility: t ? "visible" : "hidden" },
|
|
398
398
|
children: e
|
|
399
399
|
}
|
|
400
|
-
),
|
|
400
|
+
), So = ({
|
|
401
401
|
children: e,
|
|
402
402
|
...r
|
|
403
|
-
}) => /* @__PURE__ */ u(
|
|
404
|
-
const
|
|
403
|
+
}) => /* @__PURE__ */ u(Kr, { isVisible: !r["aria-hidden"], children: /* @__PURE__ */ u("div", { className: "p-form__nested-group", ...r, children: e }) });
|
|
404
|
+
const pn = ({
|
|
405
405
|
currentPage: e,
|
|
406
406
|
error: r,
|
|
407
|
-
disabled:
|
|
408
|
-
onInputBlur:
|
|
409
|
-
onInputChange:
|
|
407
|
+
disabled: t,
|
|
408
|
+
onInputBlur: n,
|
|
409
|
+
onInputChange: a,
|
|
410
410
|
onNextClick: o,
|
|
411
411
|
onPreviousClick: s,
|
|
412
|
-
totalPages:
|
|
413
|
-
}) => /* @__PURE__ */ u("nav", { "aria-label": "pagination", className: "p-pagination", children: /* @__PURE__ */
|
|
412
|
+
totalPages: i
|
|
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
|
_e,
|
|
416
416
|
{
|
|
417
417
|
"aria-label": "Previous page",
|
|
418
418
|
className: "p-pagination__link--previous",
|
|
419
|
-
disabled: e === 1 ||
|
|
419
|
+
disabled: e === 1 || t,
|
|
420
420
|
onClick: s,
|
|
421
421
|
type: "button",
|
|
422
|
-
children: /* @__PURE__ */ u(
|
|
422
|
+
children: /* @__PURE__ */ u(ke, { name: "chevron-down" })
|
|
423
423
|
}
|
|
424
424
|
),
|
|
425
425
|
/* @__PURE__ */ u("strong", { children: "Page " }),
|
|
426
426
|
" ",
|
|
427
427
|
/* @__PURE__ */ u(
|
|
428
|
-
|
|
428
|
+
wt,
|
|
429
429
|
{
|
|
430
430
|
"aria-label": "page number",
|
|
431
431
|
className: "p-pagination__input",
|
|
432
|
-
disabled:
|
|
432
|
+
disabled: t,
|
|
433
433
|
error: r,
|
|
434
434
|
min: 1,
|
|
435
|
-
onBlur:
|
|
436
|
-
onChange:
|
|
435
|
+
onBlur: n,
|
|
436
|
+
onChange: a,
|
|
437
437
|
required: !0,
|
|
438
438
|
type: "number",
|
|
439
439
|
value: e
|
|
440
440
|
}
|
|
441
441
|
),
|
|
442
442
|
" ",
|
|
443
|
-
/* @__PURE__ */
|
|
443
|
+
/* @__PURE__ */ se("strong", { className: "u-no-wrap", children: [
|
|
444
444
|
" of ",
|
|
445
|
-
|
|
445
|
+
i
|
|
446
446
|
] }),
|
|
447
447
|
/* @__PURE__ */ u(
|
|
448
448
|
_e,
|
|
449
449
|
{
|
|
450
450
|
"aria-label": "Next page",
|
|
451
451
|
className: "p-pagination__link--next",
|
|
452
|
-
disabled: e ===
|
|
452
|
+
disabled: e === i || t,
|
|
453
453
|
onClick: o,
|
|
454
454
|
type: "button",
|
|
455
|
-
children: /* @__PURE__ */ u(
|
|
455
|
+
children: /* @__PURE__ */ u(ke, { name: "chevron-up" })
|
|
456
456
|
}
|
|
457
457
|
)
|
|
458
|
-
] }) }),
|
|
458
|
+
] }) }), Co = ({
|
|
459
459
|
currentPage: e,
|
|
460
460
|
disabled: r,
|
|
461
|
-
paginate:
|
|
462
|
-
totalPages:
|
|
461
|
+
paginate: t,
|
|
462
|
+
totalPages: n
|
|
463
463
|
}) => {
|
|
464
|
-
const [
|
|
464
|
+
const [a, o] = be(e), [s, i] = be("");
|
|
465
465
|
return /* @__PURE__ */ u(
|
|
466
|
-
|
|
466
|
+
pn,
|
|
467
467
|
{
|
|
468
|
-
currentPage:
|
|
468
|
+
currentPage: a,
|
|
469
469
|
error: s,
|
|
470
470
|
disabled: r,
|
|
471
471
|
onInputBlur: () => {
|
|
472
|
-
o(e),
|
|
472
|
+
o(e), i("");
|
|
473
473
|
},
|
|
474
|
-
onInputChange: (
|
|
475
|
-
const { value:
|
|
476
|
-
|
|
474
|
+
onInputChange: (w) => {
|
|
475
|
+
const { value: O, valueAsNumber: D } = w.target;
|
|
476
|
+
O ? (o(D), D > n || D < 1 ? i(`${D} is not a valid page number.`) : (i(""), t(D))) : i("Enter a page number.");
|
|
477
477
|
},
|
|
478
478
|
onNextClick: () => {
|
|
479
|
-
o((
|
|
479
|
+
o((w) => Number(w) + 1), t(Number(e) + 1);
|
|
480
480
|
},
|
|
481
481
|
onPreviousClick: () => {
|
|
482
|
-
o((
|
|
482
|
+
o((w) => Number(w) - 1), t(Number(e) - 1);
|
|
483
483
|
},
|
|
484
|
-
totalPages:
|
|
484
|
+
totalPages: n
|
|
485
485
|
}
|
|
486
486
|
);
|
|
487
487
|
};
|
|
488
|
-
const
|
|
489
|
-
const
|
|
490
|
-
return /* @__PURE__ */ u("li", { "aria-label":
|
|
488
|
+
const Oo = ({ activeStep: e, items: r }) => /* @__PURE__ */ u("ol", { className: "stepper", children: r.map((t, n) => {
|
|
489
|
+
const a = n === e, o = n < e;
|
|
490
|
+
return /* @__PURE__ */ u("li", { "aria-label": t, className: "stepper__item", children: /* @__PURE__ */ u(
|
|
491
491
|
"p",
|
|
492
492
|
{
|
|
493
|
-
"aria-label": o ? `${
|
|
494
|
-
className:
|
|
495
|
-
"stepper__title--is-active":
|
|
493
|
+
"aria-label": o ? `${t} (completed)` : t,
|
|
494
|
+
className: W("stepper__title", {
|
|
495
|
+
"stepper__title--is-active": a,
|
|
496
496
|
"stepper__title--is-complete": o
|
|
497
497
|
}),
|
|
498
|
-
children:
|
|
498
|
+
children: t
|
|
499
499
|
}
|
|
500
|
-
) },
|
|
500
|
+
) }, n);
|
|
501
501
|
}) });
|
|
502
|
-
var
|
|
502
|
+
var nr = { exports: {} }, Fe = { exports: {} }, I = {};
|
|
503
503
|
/** @license React v16.13.1
|
|
504
504
|
* react-is.production.min.js
|
|
505
505
|
*
|
|
@@ -509,73 +509,73 @@ var tr = { exports: {} }, Fe = { exports: {} }, F = {};
|
|
|
509
509
|
* LICENSE file in the root directory of this source tree.
|
|
510
510
|
*/
|
|
511
511
|
var gr;
|
|
512
|
-
function
|
|
512
|
+
function dn() {
|
|
513
513
|
if (gr)
|
|
514
|
-
return
|
|
514
|
+
return I;
|
|
515
515
|
gr = 1;
|
|
516
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103,
|
|
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, y = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, D = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, M = e ? Symbol.for("react.fundamental") : 60117, L = e ? Symbol.for("react.responder") : 60118, K = e ? Symbol.for("react.scope") : 60119;
|
|
517
|
+
function j(p) {
|
|
518
|
+
if (typeof p == "object" && p !== null) {
|
|
519
|
+
var re = p.$$typeof;
|
|
520
|
+
switch (re) {
|
|
521
521
|
case r:
|
|
522
|
-
switch (
|
|
523
|
-
case
|
|
522
|
+
switch (p = p.type, p) {
|
|
523
|
+
case y:
|
|
524
524
|
case l:
|
|
525
|
-
case
|
|
525
|
+
case n:
|
|
526
526
|
case o:
|
|
527
|
-
case
|
|
527
|
+
case a:
|
|
528
528
|
case g:
|
|
529
|
-
return
|
|
529
|
+
return p;
|
|
530
530
|
default:
|
|
531
|
-
switch (
|
|
532
|
-
case
|
|
533
|
-
case
|
|
534
|
-
case
|
|
535
|
-
case
|
|
531
|
+
switch (p = p && p.$$typeof, p) {
|
|
532
|
+
case i:
|
|
533
|
+
case v:
|
|
534
|
+
case D:
|
|
535
|
+
case O:
|
|
536
536
|
case s:
|
|
537
|
-
return
|
|
537
|
+
return p;
|
|
538
538
|
default:
|
|
539
|
-
return
|
|
539
|
+
return re;
|
|
540
540
|
}
|
|
541
541
|
}
|
|
542
|
-
case
|
|
543
|
-
return
|
|
542
|
+
case t:
|
|
543
|
+
return re;
|
|
544
544
|
}
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function
|
|
548
|
-
return
|
|
547
|
+
function k(p) {
|
|
548
|
+
return j(p) === l;
|
|
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 I.AsyncMode = y, I.ConcurrentMode = l, I.ContextConsumer = i, I.ContextProvider = s, I.Element = r, I.ForwardRef = v, I.Fragment = n, I.Lazy = D, I.Memo = O, I.Portal = t, I.Profiler = o, I.StrictMode = a, I.Suspense = g, I.isAsyncMode = function(p) {
|
|
551
|
+
return k(p) || j(p) === y;
|
|
552
|
+
}, I.isConcurrentMode = k, I.isContextConsumer = function(p) {
|
|
553
|
+
return j(p) === i;
|
|
554
|
+
}, I.isContextProvider = function(p) {
|
|
555
|
+
return j(p) === s;
|
|
556
|
+
}, I.isElement = function(p) {
|
|
557
|
+
return typeof p == "object" && p !== null && p.$$typeof === r;
|
|
558
|
+
}, I.isForwardRef = function(p) {
|
|
559
|
+
return j(p) === v;
|
|
560
|
+
}, I.isFragment = function(p) {
|
|
561
|
+
return j(p) === n;
|
|
562
|
+
}, I.isLazy = function(p) {
|
|
563
|
+
return j(p) === D;
|
|
564
|
+
}, I.isMemo = function(p) {
|
|
565
|
+
return j(p) === O;
|
|
566
|
+
}, I.isPortal = function(p) {
|
|
567
|
+
return j(p) === t;
|
|
568
|
+
}, I.isProfiler = function(p) {
|
|
569
|
+
return j(p) === o;
|
|
570
|
+
}, I.isStrictMode = function(p) {
|
|
571
|
+
return j(p) === a;
|
|
572
|
+
}, I.isSuspense = function(p) {
|
|
573
|
+
return j(p) === g;
|
|
574
|
+
}, I.isValidElementType = function(p) {
|
|
575
|
+
return typeof p == "string" || typeof p == "function" || p === n || p === l || p === o || p === a || p === g || p === w || typeof p == "object" && p !== null && (p.$$typeof === D || p.$$typeof === O || p.$$typeof === s || p.$$typeof === i || p.$$typeof === v || p.$$typeof === M || p.$$typeof === L || p.$$typeof === K || p.$$typeof === _);
|
|
576
|
+
}, I.typeOf = j, I;
|
|
577
|
+
}
|
|
578
|
+
var F = {};
|
|
579
579
|
/** @license React v16.13.1
|
|
580
580
|
* react-is.development.js
|
|
581
581
|
*
|
|
@@ -585,91 +585,91 @@ var I = {};
|
|
|
585
585
|
* LICENSE file in the root directory of this source tree.
|
|
586
586
|
*/
|
|
587
587
|
var br;
|
|
588
|
-
function
|
|
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,
|
|
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, y = e ? Symbol.for("react.async_mode") : 60111, l = e ? Symbol.for("react.concurrent_mode") : 60111, v = e ? Symbol.for("react.forward_ref") : 60112, g = e ? Symbol.for("react.suspense") : 60113, w = e ? Symbol.for("react.suspense_list") : 60120, O = e ? Symbol.for("react.memo") : 60115, D = e ? Symbol.for("react.lazy") : 60116, _ = e ? Symbol.for("react.block") : 60121, M = e ? Symbol.for("react.fundamental") : 60117, L = e ? Symbol.for("react.responder") : 60118, K = e ? Symbol.for("react.scope") : 60119;
|
|
591
|
+
function j(f) {
|
|
592
|
+
return typeof f == "string" || typeof f == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
593
|
+
f === n || f === l || f === o || f === a || f === g || f === w || typeof f == "object" && f !== null && (f.$$typeof === D || f.$$typeof === O || f.$$typeof === s || f.$$typeof === i || f.$$typeof === v || f.$$typeof === M || f.$$typeof === L || f.$$typeof === K || f.$$typeof === _);
|
|
594
|
+
}
|
|
595
|
+
function k(f) {
|
|
596
|
+
if (typeof f == "object" && f !== null) {
|
|
597
|
+
var Z = f.$$typeof;
|
|
598
|
+
switch (Z) {
|
|
599
599
|
case r:
|
|
600
|
-
var
|
|
601
|
-
switch (
|
|
602
|
-
case
|
|
600
|
+
var de = f.type;
|
|
601
|
+
switch (de) {
|
|
602
|
+
case y:
|
|
603
603
|
case l:
|
|
604
|
-
case
|
|
604
|
+
case n:
|
|
605
605
|
case o:
|
|
606
|
-
case
|
|
606
|
+
case a:
|
|
607
607
|
case g:
|
|
608
|
-
return
|
|
608
|
+
return de;
|
|
609
609
|
default:
|
|
610
|
-
var Te =
|
|
610
|
+
var Te = de && de.$$typeof;
|
|
611
611
|
switch (Te) {
|
|
612
|
-
case
|
|
613
|
-
case
|
|
614
|
-
case
|
|
615
|
-
case
|
|
612
|
+
case i:
|
|
613
|
+
case v:
|
|
614
|
+
case D:
|
|
615
|
+
case O:
|
|
616
616
|
case s:
|
|
617
617
|
return Te;
|
|
618
618
|
default:
|
|
619
|
-
return
|
|
619
|
+
return Z;
|
|
620
620
|
}
|
|
621
621
|
}
|
|
622
|
-
case
|
|
623
|
-
return
|
|
622
|
+
case t:
|
|
623
|
+
return Z;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
}
|
|
627
|
-
var
|
|
628
|
-
function
|
|
629
|
-
return
|
|
627
|
+
var p = y, re = l, $ = i, V = s, X = r, ce = v, fe = n, pe = D, le = O, B = t, J = o, te = a, ae = g, ue = !1;
|
|
628
|
+
function U(f) {
|
|
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.")), c(f) || k(f) === y;
|
|
630
630
|
}
|
|
631
|
-
function c(
|
|
632
|
-
return
|
|
631
|
+
function c(f) {
|
|
632
|
+
return k(f) === l;
|
|
633
633
|
}
|
|
634
|
-
function
|
|
635
|
-
return
|
|
634
|
+
function m(f) {
|
|
635
|
+
return k(f) === i;
|
|
636
636
|
}
|
|
637
|
-
function
|
|
638
|
-
return
|
|
637
|
+
function T(f) {
|
|
638
|
+
return k(f) === s;
|
|
639
639
|
}
|
|
640
|
-
function
|
|
641
|
-
return typeof
|
|
640
|
+
function S(f) {
|
|
641
|
+
return typeof f == "object" && f !== null && f.$$typeof === r;
|
|
642
642
|
}
|
|
643
|
-
function h(
|
|
644
|
-
return
|
|
643
|
+
function h(f) {
|
|
644
|
+
return k(f) === v;
|
|
645
645
|
}
|
|
646
|
-
function
|
|
647
|
-
return
|
|
646
|
+
function A(f) {
|
|
647
|
+
return k(f) === n;
|
|
648
648
|
}
|
|
649
|
-
function
|
|
650
|
-
return
|
|
649
|
+
function E(f) {
|
|
650
|
+
return k(f) === D;
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
return
|
|
652
|
+
function C(f) {
|
|
653
|
+
return k(f) === O;
|
|
654
654
|
}
|
|
655
|
-
function
|
|
656
|
-
return
|
|
655
|
+
function P(f) {
|
|
656
|
+
return k(f) === t;
|
|
657
657
|
}
|
|
658
|
-
function
|
|
659
|
-
return
|
|
658
|
+
function R(f) {
|
|
659
|
+
return k(f) === o;
|
|
660
660
|
}
|
|
661
|
-
function
|
|
662
|
-
return
|
|
661
|
+
function x(f) {
|
|
662
|
+
return k(f) === a;
|
|
663
663
|
}
|
|
664
|
-
function
|
|
665
|
-
return
|
|
664
|
+
function q(f) {
|
|
665
|
+
return k(f) === g;
|
|
666
666
|
}
|
|
667
|
-
|
|
668
|
-
}()),
|
|
667
|
+
F.AsyncMode = p, F.ConcurrentMode = re, F.ContextConsumer = $, F.ContextProvider = V, F.Element = X, F.ForwardRef = ce, F.Fragment = fe, F.Lazy = pe, F.Memo = le, F.Portal = B, F.Profiler = J, F.StrictMode = te, F.Suspense = ae, F.isAsyncMode = U, F.isConcurrentMode = c, F.isContextConsumer = m, F.isContextProvider = T, F.isElement = S, F.isForwardRef = h, F.isFragment = A, F.isLazy = E, F.isMemo = C, F.isPortal = P, F.isProfiler = R, F.isStrictMode = x, F.isSuspense = q, F.isValidElementType = j, F.typeOf = k;
|
|
668
|
+
}()), F;
|
|
669
669
|
}
|
|
670
670
|
var hr;
|
|
671
|
-
function
|
|
672
|
-
return hr || (hr = 1, process.env.NODE_ENV === "production" ? Fe.exports =
|
|
671
|
+
function Ur() {
|
|
672
|
+
return hr || (hr = 1, process.env.NODE_ENV === "production" ? Fe.exports = dn() : Fe.exports = mn()), Fe.exports;
|
|
673
673
|
}
|
|
674
674
|
/*
|
|
675
675
|
object-assign
|
|
@@ -677,50 +677,50 @@ object-assign
|
|
|
677
677
|
@license MIT
|
|
678
678
|
*/
|
|
679
679
|
var Ge, _r;
|
|
680
|
-
function
|
|
680
|
+
function vn() {
|
|
681
681
|
if (_r)
|
|
682
682
|
return Ge;
|
|
683
683
|
_r = 1;
|
|
684
|
-
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty,
|
|
685
|
-
function
|
|
684
|
+
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
685
|
+
function n(o) {
|
|
686
686
|
if (o == null)
|
|
687
687
|
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
688
688
|
return Object(o);
|
|
689
689
|
}
|
|
690
|
-
function
|
|
690
|
+
function a() {
|
|
691
691
|
try {
|
|
692
692
|
if (!Object.assign)
|
|
693
693
|
return !1;
|
|
694
694
|
var o = new String("abc");
|
|
695
695
|
if (o[5] = "de", Object.getOwnPropertyNames(o)[0] === "5")
|
|
696
696
|
return !1;
|
|
697
|
-
for (var s = {},
|
|
698
|
-
s["_" + String.fromCharCode(
|
|
699
|
-
var
|
|
700
|
-
return s[
|
|
697
|
+
for (var s = {}, i = 0; i < 10; i++)
|
|
698
|
+
s["_" + String.fromCharCode(i)] = i;
|
|
699
|
+
var y = Object.getOwnPropertyNames(s).map(function(v) {
|
|
700
|
+
return s[v];
|
|
701
701
|
});
|
|
702
|
-
if (
|
|
702
|
+
if (y.join("") !== "0123456789")
|
|
703
703
|
return !1;
|
|
704
704
|
var l = {};
|
|
705
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(
|
|
706
|
-
l[
|
|
705
|
+
return "abcdefghijklmnopqrst".split("").forEach(function(v) {
|
|
706
|
+
l[v] = v;
|
|
707
707
|
}), Object.keys(Object.assign({}, l)).join("") === "abcdefghijklmnopqrst";
|
|
708
708
|
} catch {
|
|
709
709
|
return !1;
|
|
710
710
|
}
|
|
711
711
|
}
|
|
712
|
-
return Ge =
|
|
713
|
-
for (var
|
|
714
|
-
|
|
715
|
-
for (var g in
|
|
716
|
-
r.call(
|
|
712
|
+
return Ge = a() ? Object.assign : function(o, s) {
|
|
713
|
+
for (var i, y = n(o), l, v = 1; v < arguments.length; v++) {
|
|
714
|
+
i = Object(arguments[v]);
|
|
715
|
+
for (var g in i)
|
|
716
|
+
r.call(i, g) && (y[g] = i[g]);
|
|
717
717
|
if (e) {
|
|
718
|
-
l = e(
|
|
719
|
-
for (var
|
|
720
|
-
|
|
718
|
+
l = e(i);
|
|
719
|
+
for (var w = 0; w < l.length; w++)
|
|
720
|
+
t.call(i, l[w]) && (y[l[w]] = i[l[w]]);
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
return
|
|
723
|
+
return y;
|
|
724
724
|
}, Ge;
|
|
725
725
|
}
|
|
726
726
|
var Ve, Er;
|
|
@@ -732,18 +732,18 @@ function fr() {
|
|
|
732
732
|
return Ve = e, Ve;
|
|
733
733
|
}
|
|
734
734
|
var Je, wr;
|
|
735
|
-
function
|
|
735
|
+
function Gr() {
|
|
736
736
|
return wr || (wr = 1, Je = Function.call.bind(Object.prototype.hasOwnProperty)), Je;
|
|
737
737
|
}
|
|
738
738
|
var Xe, Tr;
|
|
739
|
-
function
|
|
739
|
+
function yn() {
|
|
740
740
|
if (Tr)
|
|
741
741
|
return Xe;
|
|
742
742
|
Tr = 1;
|
|
743
743
|
var e = function() {
|
|
744
744
|
};
|
|
745
745
|
if (process.env.NODE_ENV !== "production") {
|
|
746
|
-
var r = fr(),
|
|
746
|
+
var r = fr(), t = {}, n = Gr();
|
|
747
747
|
e = function(o) {
|
|
748
748
|
var s = "Warning: " + o;
|
|
749
749
|
typeof console < "u" && console.error(s);
|
|
@@ -753,289 +753,289 @@ function vt() {
|
|
|
753
753
|
}
|
|
754
754
|
};
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function a(o, s, i, y, l) {
|
|
757
757
|
if (process.env.NODE_ENV !== "production") {
|
|
758
|
-
for (var
|
|
759
|
-
if (
|
|
758
|
+
for (var v in o)
|
|
759
|
+
if (n(o, v)) {
|
|
760
760
|
var g;
|
|
761
761
|
try {
|
|
762
|
-
if (typeof o[
|
|
763
|
-
var
|
|
764
|
-
(
|
|
762
|
+
if (typeof o[v] != "function") {
|
|
763
|
+
var w = Error(
|
|
764
|
+
(y || "React class") + ": " + i + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof o[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
765
765
|
);
|
|
766
|
-
throw
|
|
766
|
+
throw w.name = "Invariant Violation", w;
|
|
767
767
|
}
|
|
768
|
-
g = o[
|
|
769
|
-
} catch (
|
|
770
|
-
g =
|
|
768
|
+
g = o[v](s, v, y, i, null, r);
|
|
769
|
+
} catch (D) {
|
|
770
|
+
g = D;
|
|
771
771
|
}
|
|
772
772
|
if (g && !(g instanceof Error) && e(
|
|
773
|
-
(
|
|
774
|
-
), g instanceof Error && !(g.message in
|
|
775
|
-
|
|
776
|
-
var
|
|
773
|
+
(y || "React class") + ": type specification of " + i + " `" + v + "` 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
|
+
), g instanceof Error && !(g.message in t)) {
|
|
775
|
+
t[g.message] = !0;
|
|
776
|
+
var O = l ? l() : "";
|
|
777
777
|
e(
|
|
778
|
-
"Failed " +
|
|
778
|
+
"Failed " + i + " type: " + g.message + (O ?? "")
|
|
779
779
|
);
|
|
780
780
|
}
|
|
781
781
|
}
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
return
|
|
785
|
-
process.env.NODE_ENV !== "production" && (
|
|
786
|
-
}, Xe =
|
|
784
|
+
return a.resetWarningCache = function() {
|
|
785
|
+
process.env.NODE_ENV !== "production" && (t = {});
|
|
786
|
+
}, Xe = a, Xe;
|
|
787
787
|
}
|
|
788
|
-
var Ze,
|
|
789
|
-
function
|
|
790
|
-
if (
|
|
788
|
+
var Ze, Sr;
|
|
789
|
+
function gn() {
|
|
790
|
+
if (Sr)
|
|
791
791
|
return Ze;
|
|
792
|
-
|
|
793
|
-
var e =
|
|
792
|
+
Sr = 1;
|
|
793
|
+
var e = Ur(), r = vn(), t = fr(), n = Gr(), a = yn(), o = function() {
|
|
794
794
|
};
|
|
795
|
-
process.env.NODE_ENV !== "production" && (o = function(
|
|
796
|
-
var
|
|
797
|
-
typeof console < "u" && console.error(
|
|
795
|
+
process.env.NODE_ENV !== "production" && (o = function(i) {
|
|
796
|
+
var y = "Warning: " + i;
|
|
797
|
+
typeof console < "u" && console.error(y);
|
|
798
798
|
try {
|
|
799
|
-
throw new Error(
|
|
799
|
+
throw new Error(y);
|
|
800
800
|
} catch {
|
|
801
801
|
}
|
|
802
802
|
});
|
|
803
803
|
function s() {
|
|
804
804
|
return null;
|
|
805
805
|
}
|
|
806
|
-
return Ze = function(
|
|
807
|
-
var l = typeof Symbol == "function" && Symbol.iterator,
|
|
806
|
+
return Ze = function(i, y) {
|
|
807
|
+
var l = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
|
|
808
808
|
function g(c) {
|
|
809
|
-
var
|
|
810
|
-
if (typeof
|
|
811
|
-
return
|
|
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:
|
|
827
|
-
node:
|
|
828
|
-
objectOf:
|
|
829
|
-
oneOf:
|
|
830
|
-
oneOfType:
|
|
831
|
-
shape:
|
|
832
|
-
exact:
|
|
809
|
+
var m = c && (l && c[l] || c[v]);
|
|
810
|
+
if (typeof m == "function")
|
|
811
|
+
return m;
|
|
812
|
+
}
|
|
813
|
+
var w = "<<anonymous>>", O = {
|
|
814
|
+
array: L("array"),
|
|
815
|
+
bigint: L("bigint"),
|
|
816
|
+
bool: L("boolean"),
|
|
817
|
+
func: L("function"),
|
|
818
|
+
number: L("number"),
|
|
819
|
+
object: L("object"),
|
|
820
|
+
string: L("string"),
|
|
821
|
+
symbol: L("symbol"),
|
|
822
|
+
any: K(),
|
|
823
|
+
arrayOf: j,
|
|
824
|
+
element: k(),
|
|
825
|
+
elementType: p(),
|
|
826
|
+
instanceOf: re,
|
|
827
|
+
node: ce(),
|
|
828
|
+
objectOf: V,
|
|
829
|
+
oneOf: $,
|
|
830
|
+
oneOfType: X,
|
|
831
|
+
shape: pe,
|
|
832
|
+
exact: le
|
|
833
833
|
};
|
|
834
|
-
function
|
|
835
|
-
return c ===
|
|
834
|
+
function D(c, m) {
|
|
835
|
+
return c === m ? c !== 0 || 1 / c === 1 / m : c !== c && m !== m;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
this.message = c, this.data =
|
|
837
|
+
function _(c, m) {
|
|
838
|
+
this.message = c, this.data = m && typeof m == "object" ? m : {}, this.stack = "";
|
|
839
839
|
}
|
|
840
|
-
|
|
841
|
-
function
|
|
840
|
+
_.prototype = Error.prototype;
|
|
841
|
+
function M(c) {
|
|
842
842
|
if (process.env.NODE_ENV !== "production")
|
|
843
|
-
var
|
|
844
|
-
function
|
|
845
|
-
if (
|
|
846
|
-
if (
|
|
847
|
-
var
|
|
843
|
+
var m = {}, T = 0;
|
|
844
|
+
function S(A, E, C, P, R, x, q) {
|
|
845
|
+
if (P = P || w, x = x || C, q !== t) {
|
|
846
|
+
if (y) {
|
|
847
|
+
var f = 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 f.name = "Invariant Violation", f;
|
|
851
851
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
852
|
-
var
|
|
853
|
-
!
|
|
854
|
-
|
|
855
|
-
"You are manually calling a React.PropTypes validation function for the `" +
|
|
856
|
-
),
|
|
852
|
+
var Z = P + ":" + C;
|
|
853
|
+
!m[Z] && // 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 `" + x + "` prop on `" + P + "`. 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[Z] = !0, T++);
|
|
857
857
|
}
|
|
858
858
|
}
|
|
859
|
-
return
|
|
859
|
+
return E[C] == null ? A ? E[C] === null ? new _("The " + R + " `" + x + "` is marked as required " + ("in `" + P + "`, but its value is `null`.")) : new _("The " + R + " `" + x + "` is marked as required in " + ("`" + P + "`, but its value is `undefined`.")) : null : c(E, C, P, R, x);
|
|
860
860
|
}
|
|
861
|
-
var h =
|
|
862
|
-
return h.isRequired =
|
|
863
|
-
}
|
|
864
|
-
function
|
|
865
|
-
function
|
|
866
|
-
var
|
|
867
|
-
if (
|
|
868
|
-
var
|
|
869
|
-
return new
|
|
870
|
-
"Invalid " +
|
|
861
|
+
var h = S.bind(null, !1);
|
|
862
|
+
return h.isRequired = S.bind(null, !0), h;
|
|
863
|
+
}
|
|
864
|
+
function L(c) {
|
|
865
|
+
function m(T, S, h, A, E, C) {
|
|
866
|
+
var P = T[S], R = te(P);
|
|
867
|
+
if (R !== c) {
|
|
868
|
+
var x = ae(P);
|
|
869
|
+
return new _(
|
|
870
|
+
"Invalid " + A + " `" + E + "` of type " + ("`" + x + "` supplied to `" + h + "`, expected ") + ("`" + c + "`."),
|
|
871
871
|
{ expectedType: c }
|
|
872
872
|
);
|
|
873
873
|
}
|
|
874
874
|
return null;
|
|
875
875
|
}
|
|
876
|
-
return
|
|
876
|
+
return M(m);
|
|
877
877
|
}
|
|
878
|
-
function
|
|
879
|
-
return
|
|
878
|
+
function K() {
|
|
879
|
+
return M(s);
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
function
|
|
881
|
+
function j(c) {
|
|
882
|
+
function m(T, S, h, A, E) {
|
|
883
883
|
if (typeof c != "function")
|
|
884
|
-
return new
|
|
885
|
-
var
|
|
886
|
-
if (!Array.isArray(
|
|
887
|
-
var
|
|
888
|
-
return new
|
|
884
|
+
return new _("Property `" + E + "` of component `" + h + "` has invalid PropType notation inside arrayOf.");
|
|
885
|
+
var C = T[S];
|
|
886
|
+
if (!Array.isArray(C)) {
|
|
887
|
+
var P = te(C);
|
|
888
|
+
return new _("Invalid " + A + " `" + E + "` of type " + ("`" + P + "` supplied to `" + h + "`, expected an array."));
|
|
889
889
|
}
|
|
890
|
-
for (var
|
|
891
|
-
var
|
|
892
|
-
if (
|
|
893
|
-
return
|
|
890
|
+
for (var R = 0; R < C.length; R++) {
|
|
891
|
+
var x = c(C, R, h, A, E + "[" + R + "]", t);
|
|
892
|
+
if (x instanceof Error)
|
|
893
|
+
return x;
|
|
894
894
|
}
|
|
895
895
|
return null;
|
|
896
896
|
}
|
|
897
|
-
return
|
|
898
|
-
}
|
|
899
|
-
function
|
|
900
|
-
function c(
|
|
901
|
-
var
|
|
902
|
-
if (!
|
|
903
|
-
var
|
|
904
|
-
return new
|
|
897
|
+
return M(m);
|
|
898
|
+
}
|
|
899
|
+
function k() {
|
|
900
|
+
function c(m, T, S, h, A) {
|
|
901
|
+
var E = m[T];
|
|
902
|
+
if (!i(E)) {
|
|
903
|
+
var C = te(E);
|
|
904
|
+
return new _("Invalid " + h + " `" + A + "` of type " + ("`" + C + "` supplied to `" + S + "`, expected a single ReactElement."));
|
|
905
905
|
}
|
|
906
906
|
return null;
|
|
907
907
|
}
|
|
908
|
-
return
|
|
909
|
-
}
|
|
910
|
-
function
|
|
911
|
-
function c(
|
|
912
|
-
var
|
|
913
|
-
if (!e.isValidElementType(
|
|
914
|
-
var
|
|
915
|
-
return new
|
|
908
|
+
return M(c);
|
|
909
|
+
}
|
|
910
|
+
function p() {
|
|
911
|
+
function c(m, T, S, h, A) {
|
|
912
|
+
var E = m[T];
|
|
913
|
+
if (!e.isValidElementType(E)) {
|
|
914
|
+
var C = te(E);
|
|
915
|
+
return new _("Invalid " + h + " `" + A + "` of type " + ("`" + C + "` supplied to `" + S + "`, expected a single ReactElement type."));
|
|
916
916
|
}
|
|
917
917
|
return null;
|
|
918
918
|
}
|
|
919
|
-
return
|
|
919
|
+
return M(c);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
function
|
|
923
|
-
if (!(
|
|
924
|
-
var
|
|
925
|
-
return new
|
|
921
|
+
function re(c) {
|
|
922
|
+
function m(T, S, h, A, E) {
|
|
923
|
+
if (!(T[S] instanceof c)) {
|
|
924
|
+
var C = c.name || w, P = U(T[S]);
|
|
925
|
+
return new _("Invalid " + A + " `" + E + "` of type " + ("`" + P + "` supplied to `" + h + "`, expected ") + ("instance of `" + C + "`."));
|
|
926
926
|
}
|
|
927
927
|
return null;
|
|
928
928
|
}
|
|
929
|
-
return
|
|
929
|
+
return M(m);
|
|
930
930
|
}
|
|
931
|
-
function
|
|
931
|
+
function $(c) {
|
|
932
932
|
if (!Array.isArray(c))
|
|
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
|
|
937
|
-
for (var
|
|
938
|
-
if (
|
|
936
|
+
function m(T, S, h, A, E) {
|
|
937
|
+
for (var C = T[S], P = 0; P < c.length; P++)
|
|
938
|
+
if (D(C, c[P]))
|
|
939
939
|
return null;
|
|
940
|
-
var
|
|
941
|
-
var
|
|
942
|
-
return
|
|
940
|
+
var R = JSON.stringify(c, function(q, f) {
|
|
941
|
+
var Z = ae(f);
|
|
942
|
+
return Z === "symbol" ? String(f) : f;
|
|
943
943
|
});
|
|
944
|
-
return new
|
|
944
|
+
return new _("Invalid " + A + " `" + E + "` of value `" + String(C) + "` " + ("supplied to `" + h + "`, expected one of " + R + "."));
|
|
945
945
|
}
|
|
946
|
-
return
|
|
946
|
+
return M(m);
|
|
947
947
|
}
|
|
948
|
-
function
|
|
949
|
-
function
|
|
948
|
+
function V(c) {
|
|
949
|
+
function m(T, S, h, A, E) {
|
|
950
950
|
if (typeof c != "function")
|
|
951
|
-
return new
|
|
952
|
-
var
|
|
953
|
-
if (
|
|
954
|
-
return new
|
|
955
|
-
for (var
|
|
956
|
-
if (
|
|
957
|
-
var
|
|
958
|
-
if (
|
|
959
|
-
return
|
|
951
|
+
return new _("Property `" + E + "` of component `" + h + "` has invalid PropType notation inside objectOf.");
|
|
952
|
+
var C = T[S], P = te(C);
|
|
953
|
+
if (P !== "object")
|
|
954
|
+
return new _("Invalid " + A + " `" + E + "` of type " + ("`" + P + "` supplied to `" + h + "`, expected an object."));
|
|
955
|
+
for (var R in C)
|
|
956
|
+
if (n(C, R)) {
|
|
957
|
+
var x = c(C, R, h, A, E + "." + R, t);
|
|
958
|
+
if (x instanceof Error)
|
|
959
|
+
return x;
|
|
960
960
|
}
|
|
961
961
|
return null;
|
|
962
962
|
}
|
|
963
|
-
return
|
|
963
|
+
return M(m);
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function X(c) {
|
|
966
966
|
if (!Array.isArray(c))
|
|
967
967
|
return process.env.NODE_ENV !== "production" && o("Invalid argument supplied to oneOfType, expected an instance of array."), s;
|
|
968
|
-
for (var
|
|
969
|
-
var
|
|
970
|
-
if (typeof
|
|
968
|
+
for (var m = 0; m < c.length; m++) {
|
|
969
|
+
var T = c[m];
|
|
970
|
+
if (typeof T != "function")
|
|
971
971
|
return o(
|
|
972
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " +
|
|
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
|
|
977
|
-
var
|
|
978
|
-
if (
|
|
975
|
+
function S(h, A, E, C, P) {
|
|
976
|
+
for (var R = [], x = 0; x < c.length; x++) {
|
|
977
|
+
var q = c[x], f = q(h, A, E, C, P, t);
|
|
978
|
+
if (f == null)
|
|
979
979
|
return null;
|
|
980
|
-
|
|
980
|
+
f.data && n(f.data, "expectedType") && R.push(f.data.expectedType);
|
|
981
981
|
}
|
|
982
|
-
var
|
|
983
|
-
return new
|
|
982
|
+
var Z = R.length > 0 ? ", expected one of type [" + R.join(", ") + "]" : "";
|
|
983
|
+
return new _("Invalid " + C + " `" + P + "` supplied to " + ("`" + E + "`" + Z + "."));
|
|
984
984
|
}
|
|
985
|
-
return
|
|
985
|
+
return M(S);
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
function c(
|
|
989
|
-
return
|
|
987
|
+
function ce() {
|
|
988
|
+
function c(m, T, S, h, A) {
|
|
989
|
+
return B(m[T]) ? null : new _("Invalid " + h + " `" + A + "` supplied to " + ("`" + S + "`, expected a ReactNode."));
|
|
990
990
|
}
|
|
991
|
-
return
|
|
991
|
+
return M(c);
|
|
992
992
|
}
|
|
993
|
-
function
|
|
994
|
-
return new
|
|
995
|
-
(c || "React class") + ": " +
|
|
993
|
+
function fe(c, m, T, S, h) {
|
|
994
|
+
return new _(
|
|
995
|
+
(c || "React class") + ": " + m + " type `" + T + "." + S + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + h + "`."
|
|
996
996
|
);
|
|
997
997
|
}
|
|
998
|
-
function
|
|
999
|
-
function
|
|
1000
|
-
var
|
|
1001
|
-
if (
|
|
1002
|
-
return new
|
|
1003
|
-
for (var
|
|
1004
|
-
var
|
|
1005
|
-
if (typeof
|
|
1006
|
-
return
|
|
1007
|
-
var
|
|
1008
|
-
if (
|
|
1009
|
-
return
|
|
998
|
+
function pe(c) {
|
|
999
|
+
function m(T, S, h, A, E) {
|
|
1000
|
+
var C = T[S], P = te(C);
|
|
1001
|
+
if (P !== "object")
|
|
1002
|
+
return new _("Invalid " + A + " `" + E + "` of type `" + P + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
1003
|
+
for (var R in c) {
|
|
1004
|
+
var x = c[R];
|
|
1005
|
+
if (typeof x != "function")
|
|
1006
|
+
return fe(h, A, E, R, ae(x));
|
|
1007
|
+
var q = x(C, R, h, A, E + "." + R, t);
|
|
1008
|
+
if (q)
|
|
1009
|
+
return q;
|
|
1010
1010
|
}
|
|
1011
1011
|
return null;
|
|
1012
1012
|
}
|
|
1013
|
-
return
|
|
1014
|
-
}
|
|
1015
|
-
function
|
|
1016
|
-
function
|
|
1017
|
-
var
|
|
1018
|
-
if (
|
|
1019
|
-
return new
|
|
1020
|
-
var
|
|
1021
|
-
for (var
|
|
1022
|
-
var
|
|
1023
|
-
if (
|
|
1024
|
-
return
|
|
1025
|
-
if (!
|
|
1026
|
-
return new
|
|
1027
|
-
"Invalid " +
|
|
1013
|
+
return M(m);
|
|
1014
|
+
}
|
|
1015
|
+
function le(c) {
|
|
1016
|
+
function m(T, S, h, A, E) {
|
|
1017
|
+
var C = T[S], P = te(C);
|
|
1018
|
+
if (P !== "object")
|
|
1019
|
+
return new _("Invalid " + A + " `" + E + "` of type `" + P + "` " + ("supplied to `" + h + "`, expected `object`."));
|
|
1020
|
+
var R = r({}, T[S], c);
|
|
1021
|
+
for (var x in R) {
|
|
1022
|
+
var q = c[x];
|
|
1023
|
+
if (n(c, x) && typeof q != "function")
|
|
1024
|
+
return fe(h, A, E, x, ae(q));
|
|
1025
|
+
if (!q)
|
|
1026
|
+
return new _(
|
|
1027
|
+
"Invalid " + A + " `" + E + "` key `" + x + "` supplied to `" + h + "`.\nBad object: " + JSON.stringify(T[S], null, " ") + `
|
|
1028
1028
|
Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
1029
1029
|
);
|
|
1030
|
-
var
|
|
1031
|
-
if (
|
|
1032
|
-
return
|
|
1030
|
+
var f = q(C, x, h, A, E + "." + x, t);
|
|
1031
|
+
if (f)
|
|
1032
|
+
return f;
|
|
1033
1033
|
}
|
|
1034
1034
|
return null;
|
|
1035
1035
|
}
|
|
1036
|
-
return
|
|
1036
|
+
return M(m);
|
|
1037
1037
|
}
|
|
1038
|
-
function
|
|
1038
|
+
function B(c) {
|
|
1039
1039
|
switch (typeof c) {
|
|
1040
1040
|
case "number":
|
|
1041
1041
|
case "string":
|
|
@@ -1045,20 +1045,20 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
1045
1045
|
return !c;
|
|
1046
1046
|
case "object":
|
|
1047
1047
|
if (Array.isArray(c))
|
|
1048
|
-
return c.every(
|
|
1049
|
-
if (c === null ||
|
|
1048
|
+
return c.every(B);
|
|
1049
|
+
if (c === null || i(c))
|
|
1050
1050
|
return !0;
|
|
1051
|
-
var
|
|
1052
|
-
if (
|
|
1053
|
-
var
|
|
1054
|
-
if (
|
|
1055
|
-
for (; !(
|
|
1056
|
-
if (!
|
|
1051
|
+
var m = g(c);
|
|
1052
|
+
if (m) {
|
|
1053
|
+
var T = m.call(c), S;
|
|
1054
|
+
if (m !== c.entries) {
|
|
1055
|
+
for (; !(S = T.next()).done; )
|
|
1056
|
+
if (!B(S.value))
|
|
1057
1057
|
return !1;
|
|
1058
1058
|
} else
|
|
1059
|
-
for (; !(
|
|
1060
|
-
var h =
|
|
1061
|
-
if (h && !
|
|
1059
|
+
for (; !(S = T.next()).done; ) {
|
|
1060
|
+
var h = S.value;
|
|
1061
|
+
if (h && !B(h[1]))
|
|
1062
1062
|
return !1;
|
|
1063
1063
|
}
|
|
1064
1064
|
} else
|
|
@@ -1068,206 +1068,206 @@ Valid keys: ` + JSON.stringify(Object.keys(c), null, " ")
|
|
|
1068
1068
|
return !1;
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
|
-
function
|
|
1072
|
-
return c === "symbol" ? !0 :
|
|
1071
|
+
function J(c, m) {
|
|
1072
|
+
return c === "symbol" ? !0 : m ? m["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && m instanceof Symbol : !1;
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1075
|
-
var
|
|
1076
|
-
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" :
|
|
1074
|
+
function te(c) {
|
|
1075
|
+
var m = typeof c;
|
|
1076
|
+
return Array.isArray(c) ? "array" : c instanceof RegExp ? "object" : J(m, c) ? "symbol" : m;
|
|
1077
1077
|
}
|
|
1078
|
-
function
|
|
1078
|
+
function ae(c) {
|
|
1079
1079
|
if (typeof c > "u" || c === null)
|
|
1080
1080
|
return "" + c;
|
|
1081
|
-
var
|
|
1082
|
-
if (
|
|
1081
|
+
var m = te(c);
|
|
1082
|
+
if (m === "object") {
|
|
1083
1083
|
if (c instanceof Date)
|
|
1084
1084
|
return "date";
|
|
1085
1085
|
if (c instanceof RegExp)
|
|
1086
1086
|
return "regexp";
|
|
1087
1087
|
}
|
|
1088
|
-
return
|
|
1088
|
+
return m;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1091
|
-
var
|
|
1092
|
-
switch (
|
|
1090
|
+
function ue(c) {
|
|
1091
|
+
var m = ae(c);
|
|
1092
|
+
switch (m) {
|
|
1093
1093
|
case "array":
|
|
1094
1094
|
case "object":
|
|
1095
|
-
return "an " +
|
|
1095
|
+
return "an " + m;
|
|
1096
1096
|
case "boolean":
|
|
1097
1097
|
case "date":
|
|
1098
1098
|
case "regexp":
|
|
1099
|
-
return "a " +
|
|
1099
|
+
return "a " + m;
|
|
1100
1100
|
default:
|
|
1101
|
-
return
|
|
1101
|
+
return m;
|
|
1102
1102
|
}
|
|
1103
1103
|
}
|
|
1104
|
-
function
|
|
1105
|
-
return !c.constructor || !c.constructor.name ?
|
|
1104
|
+
function U(c) {
|
|
1105
|
+
return !c.constructor || !c.constructor.name ? w : c.constructor.name;
|
|
1106
1106
|
}
|
|
1107
|
-
return
|
|
1107
|
+
return O.checkPropTypes = a, O.resetWarningCache = a.resetWarningCache, O.PropTypes = O, O;
|
|
1108
1108
|
}, Ze;
|
|
1109
1109
|
}
|
|
1110
1110
|
var Qe, Cr;
|
|
1111
|
-
function
|
|
1111
|
+
function bn() {
|
|
1112
1112
|
if (Cr)
|
|
1113
1113
|
return Qe;
|
|
1114
1114
|
Cr = 1;
|
|
1115
1115
|
var e = fr();
|
|
1116
1116
|
function r() {
|
|
1117
1117
|
}
|
|
1118
|
-
function
|
|
1118
|
+
function t() {
|
|
1119
1119
|
}
|
|
1120
|
-
return
|
|
1121
|
-
function
|
|
1120
|
+
return t.resetWarningCache = r, Qe = function() {
|
|
1121
|
+
function n(s, i, y, l, v, g) {
|
|
1122
1122
|
if (g !== e) {
|
|
1123
|
-
var
|
|
1123
|
+
var w = 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 w.name = "Invariant Violation", w;
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
|
|
1130
|
-
function
|
|
1131
|
-
return
|
|
1129
|
+
n.isRequired = n;
|
|
1130
|
+
function a() {
|
|
1131
|
+
return n;
|
|
1132
1132
|
}
|
|
1133
1133
|
var o = {
|
|
1134
|
-
array:
|
|
1135
|
-
bigint:
|
|
1136
|
-
bool:
|
|
1137
|
-
func:
|
|
1138
|
-
number:
|
|
1139
|
-
object:
|
|
1140
|
-
string:
|
|
1141
|
-
symbol:
|
|
1142
|
-
any:
|
|
1143
|
-
arrayOf:
|
|
1144
|
-
element:
|
|
1145
|
-
elementType:
|
|
1146
|
-
instanceOf:
|
|
1147
|
-
node:
|
|
1148
|
-
objectOf:
|
|
1149
|
-
oneOf:
|
|
1150
|
-
oneOfType:
|
|
1151
|
-
shape:
|
|
1152
|
-
exact:
|
|
1153
|
-
checkPropTypes:
|
|
1134
|
+
array: n,
|
|
1135
|
+
bigint: n,
|
|
1136
|
+
bool: n,
|
|
1137
|
+
func: n,
|
|
1138
|
+
number: n,
|
|
1139
|
+
object: n,
|
|
1140
|
+
string: n,
|
|
1141
|
+
symbol: n,
|
|
1142
|
+
any: n,
|
|
1143
|
+
arrayOf: a,
|
|
1144
|
+
element: n,
|
|
1145
|
+
elementType: n,
|
|
1146
|
+
instanceOf: a,
|
|
1147
|
+
node: n,
|
|
1148
|
+
objectOf: a,
|
|
1149
|
+
oneOf: a,
|
|
1150
|
+
oneOfType: a,
|
|
1151
|
+
shape: a,
|
|
1152
|
+
exact: a,
|
|
1153
|
+
checkPropTypes: t,
|
|
1154
1154
|
resetWarningCache: r
|
|
1155
1155
|
};
|
|
1156
1156
|
return o.PropTypes = o, o;
|
|
1157
1157
|
}, Qe;
|
|
1158
1158
|
}
|
|
1159
1159
|
if (process.env.NODE_ENV !== "production") {
|
|
1160
|
-
var
|
|
1161
|
-
|
|
1160
|
+
var hn = Ur(), _n = !0;
|
|
1161
|
+
nr.exports = gn()(hn.isElement, _n);
|
|
1162
1162
|
} else
|
|
1163
|
-
|
|
1164
|
-
var
|
|
1165
|
-
const
|
|
1166
|
-
function Ee(e, r,
|
|
1167
|
-
function
|
|
1168
|
-
return o instanceof
|
|
1163
|
+
nr.exports = bn()();
|
|
1164
|
+
var En = nr.exports;
|
|
1165
|
+
const N = /* @__PURE__ */ Lr(En);
|
|
1166
|
+
function Ee(e, r, t, n) {
|
|
1167
|
+
function a(o) {
|
|
1168
|
+
return o instanceof t ? o : new t(function(s) {
|
|
1169
1169
|
s(o);
|
|
1170
1170
|
});
|
|
1171
1171
|
}
|
|
1172
|
-
return new (
|
|
1173
|
-
function
|
|
1172
|
+
return new (t || (t = Promise))(function(o, s) {
|
|
1173
|
+
function i(v) {
|
|
1174
1174
|
try {
|
|
1175
|
-
l(
|
|
1175
|
+
l(n.next(v));
|
|
1176
1176
|
} catch (g) {
|
|
1177
1177
|
s(g);
|
|
1178
1178
|
}
|
|
1179
1179
|
}
|
|
1180
|
-
function
|
|
1180
|
+
function y(v) {
|
|
1181
1181
|
try {
|
|
1182
|
-
l(
|
|
1182
|
+
l(n.throw(v));
|
|
1183
1183
|
} catch (g) {
|
|
1184
1184
|
s(g);
|
|
1185
1185
|
}
|
|
1186
1186
|
}
|
|
1187
|
-
function l(
|
|
1188
|
-
|
|
1187
|
+
function l(v) {
|
|
1188
|
+
v.done ? o(v.value) : a(v.value).then(i, y);
|
|
1189
1189
|
}
|
|
1190
|
-
l((
|
|
1190
|
+
l((n = n.apply(e, r || [])).next());
|
|
1191
1191
|
});
|
|
1192
1192
|
}
|
|
1193
1193
|
function we(e, r) {
|
|
1194
|
-
var
|
|
1194
|
+
var t = { label: 0, sent: function() {
|
|
1195
1195
|
if (o[0] & 1)
|
|
1196
1196
|
throw o[1];
|
|
1197
1197
|
return o[1];
|
|
1198
|
-
}, trys: [], ops: [] },
|
|
1199
|
-
return s = { next:
|
|
1198
|
+
}, trys: [], ops: [] }, n, a, o, s;
|
|
1199
|
+
return s = { next: i(0), throw: i(1), return: i(2) }, typeof Symbol == "function" && (s[Symbol.iterator] = function() {
|
|
1200
1200
|
return this;
|
|
1201
1201
|
}), s;
|
|
1202
|
-
function
|
|
1203
|
-
return function(
|
|
1204
|
-
return
|
|
1202
|
+
function i(l) {
|
|
1203
|
+
return function(v) {
|
|
1204
|
+
return y([l, v]);
|
|
1205
1205
|
};
|
|
1206
1206
|
}
|
|
1207
|
-
function
|
|
1208
|
-
if (
|
|
1207
|
+
function y(l) {
|
|
1208
|
+
if (n)
|
|
1209
1209
|
throw new TypeError("Generator is already executing.");
|
|
1210
|
-
for (; s && (s = 0, l[0] && (
|
|
1210
|
+
for (; s && (s = 0, l[0] && (t = 0)), t; )
|
|
1211
1211
|
try {
|
|
1212
|
-
if (
|
|
1212
|
+
if (n = 1, a && (o = l[0] & 2 ? a.return : l[0] ? a.throw || ((o = a.return) && o.call(a), 0) : a.next) && !(o = o.call(a, l[1])).done)
|
|
1213
1213
|
return o;
|
|
1214
|
-
switch (
|
|
1214
|
+
switch (a = 0, o && (l = [l[0] & 2, o.value]), l[0]) {
|
|
1215
1215
|
case 0:
|
|
1216
1216
|
case 1:
|
|
1217
1217
|
o = l;
|
|
1218
1218
|
break;
|
|
1219
1219
|
case 4:
|
|
1220
|
-
return
|
|
1220
|
+
return t.label++, { value: l[1], done: !1 };
|
|
1221
1221
|
case 5:
|
|
1222
|
-
|
|
1222
|
+
t.label++, a = l[1], l = [0];
|
|
1223
1223
|
continue;
|
|
1224
1224
|
case 7:
|
|
1225
|
-
l =
|
|
1225
|
+
l = t.ops.pop(), t.trys.pop();
|
|
1226
1226
|
continue;
|
|
1227
1227
|
default:
|
|
1228
|
-
if (o =
|
|
1229
|
-
|
|
1228
|
+
if (o = t.trys, !(o = o.length > 0 && o[o.length - 1]) && (l[0] === 6 || l[0] === 2)) {
|
|
1229
|
+
t = 0;
|
|
1230
1230
|
continue;
|
|
1231
1231
|
}
|
|
1232
1232
|
if (l[0] === 3 && (!o || l[1] > o[0] && l[1] < o[3])) {
|
|
1233
|
-
|
|
1233
|
+
t.label = l[1];
|
|
1234
1234
|
break;
|
|
1235
1235
|
}
|
|
1236
|
-
if (l[0] === 6 &&
|
|
1237
|
-
|
|
1236
|
+
if (l[0] === 6 && t.label < o[1]) {
|
|
1237
|
+
t.label = o[1], o = l;
|
|
1238
1238
|
break;
|
|
1239
1239
|
}
|
|
1240
|
-
if (o &&
|
|
1241
|
-
|
|
1240
|
+
if (o && t.label < o[2]) {
|
|
1241
|
+
t.label = o[2], t.ops.push(l);
|
|
1242
1242
|
break;
|
|
1243
1243
|
}
|
|
1244
|
-
o[2] &&
|
|
1244
|
+
o[2] && t.ops.pop(), t.trys.pop();
|
|
1245
1245
|
continue;
|
|
1246
1246
|
}
|
|
1247
|
-
l = r.call(e,
|
|
1248
|
-
} catch (
|
|
1249
|
-
l = [6,
|
|
1247
|
+
l = r.call(e, t);
|
|
1248
|
+
} catch (v) {
|
|
1249
|
+
l = [6, v], a = 0;
|
|
1250
1250
|
} finally {
|
|
1251
|
-
|
|
1251
|
+
n = o = 0;
|
|
1252
1252
|
}
|
|
1253
1253
|
if (l[0] & 5)
|
|
1254
1254
|
throw l[1];
|
|
1255
1255
|
return { value: l[0] ? l[1] : void 0, done: !0 };
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1259
|
-
var
|
|
1260
|
-
if (!
|
|
1258
|
+
function Or(e, r) {
|
|
1259
|
+
var t = typeof Symbol == "function" && e[Symbol.iterator];
|
|
1260
|
+
if (!t)
|
|
1261
1261
|
return e;
|
|
1262
|
-
var
|
|
1262
|
+
var n = t.call(e), a, o = [], s;
|
|
1263
1263
|
try {
|
|
1264
|
-
for (; (r === void 0 || r-- > 0) && !(
|
|
1265
|
-
o.push(
|
|
1266
|
-
} catch (
|
|
1267
|
-
s = { error:
|
|
1264
|
+
for (; (r === void 0 || r-- > 0) && !(a = n.next()).done; )
|
|
1265
|
+
o.push(a.value);
|
|
1266
|
+
} catch (i) {
|
|
1267
|
+
s = { error: i };
|
|
1268
1268
|
} finally {
|
|
1269
1269
|
try {
|
|
1270
|
-
|
|
1270
|
+
a && !a.done && (t = n.return) && t.call(n);
|
|
1271
1271
|
} finally {
|
|
1272
1272
|
if (s)
|
|
1273
1273
|
throw s.error;
|
|
@@ -1275,13 +1275,13 @@ function xr(e, r) {
|
|
|
1275
1275
|
}
|
|
1276
1276
|
return o;
|
|
1277
1277
|
}
|
|
1278
|
-
function
|
|
1279
|
-
if (
|
|
1280
|
-
for (var
|
|
1281
|
-
(o || !(
|
|
1278
|
+
function xr(e, r, t) {
|
|
1279
|
+
if (t || arguments.length === 2)
|
|
1280
|
+
for (var n = 0, a = r.length, o; n < a; n++)
|
|
1281
|
+
(o || !(n in r)) && (o || (o = Array.prototype.slice.call(r, 0, n)), o[n] = r[n]);
|
|
1282
1282
|
return e.concat(o || Array.prototype.slice.call(r));
|
|
1283
1283
|
}
|
|
1284
|
-
var
|
|
1284
|
+
var wn = /* @__PURE__ */ new Map([
|
|
1285
1285
|
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
|
1286
1286
|
["aac", "audio/aac"],
|
|
1287
1287
|
["abw", "application/x-abiword"],
|
|
@@ -1365,25 +1365,25 @@ var Et = /* @__PURE__ */ new Map([
|
|
|
1365
1365
|
["mov", "video/quicktime"],
|
|
1366
1366
|
["msg", "application/vnd.ms-outlook"]
|
|
1367
1367
|
]);
|
|
1368
|
-
function
|
|
1369
|
-
var
|
|
1370
|
-
if (typeof
|
|
1371
|
-
var
|
|
1372
|
-
Object.defineProperty(
|
|
1373
|
-
value: typeof r == "string" ? r : typeof
|
|
1368
|
+
function Ae(e, r) {
|
|
1369
|
+
var t = Tn(e);
|
|
1370
|
+
if (typeof t.path != "string") {
|
|
1371
|
+
var n = e.webkitRelativePath;
|
|
1372
|
+
Object.defineProperty(t, "path", {
|
|
1373
|
+
value: typeof r == "string" ? r : typeof n == "string" && n.length > 0 ? n : e.name,
|
|
1374
1374
|
writable: !1,
|
|
1375
1375
|
configurable: !1,
|
|
1376
1376
|
enumerable: !0
|
|
1377
1377
|
});
|
|
1378
1378
|
}
|
|
1379
|
-
return
|
|
1379
|
+
return t;
|
|
1380
1380
|
}
|
|
1381
|
-
function
|
|
1382
|
-
var r = e.name,
|
|
1383
|
-
if (
|
|
1384
|
-
var
|
|
1385
|
-
|
|
1386
|
-
value:
|
|
1381
|
+
function Tn(e) {
|
|
1382
|
+
var r = e.name, t = r && r.lastIndexOf(".") !== -1;
|
|
1383
|
+
if (t && !e.type) {
|
|
1384
|
+
var n = r.split(".").pop().toLowerCase(), a = wn.get(n);
|
|
1385
|
+
a && Object.defineProperty(e, "type", {
|
|
1386
|
+
value: a,
|
|
1387
1387
|
writable: !1,
|
|
1388
1388
|
configurable: !1,
|
|
1389
1389
|
enumerable: !0
|
|
@@ -1391,66 +1391,66 @@ function wt(e) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
return e;
|
|
1393
1393
|
}
|
|
1394
|
-
var
|
|
1394
|
+
var Sn = [
|
|
1395
1395
|
// Thumbnail cache files for macOS and Windows
|
|
1396
1396
|
".DS_Store",
|
|
1397
1397
|
"Thumbs.db"
|
|
1398
1398
|
// Windows
|
|
1399
1399
|
];
|
|
1400
|
-
function
|
|
1400
|
+
function Cn(e) {
|
|
1401
1401
|
return Ee(this, void 0, void 0, function() {
|
|
1402
1402
|
return we(this, function(r) {
|
|
1403
|
-
return
|
|
1404
|
-
return "getFile" in
|
|
1405
|
-
}) ? [2,
|
|
1403
|
+
return Ne(e) && On(e.dataTransfer) ? [2, Pn(e.dataTransfer, e.type)] : xn(e) ? [2, Dn(e)] : Array.isArray(e) && e.every(function(t) {
|
|
1404
|
+
return "getFile" in t && typeof t.getFile == "function";
|
|
1405
|
+
}) ? [2, An(e)] : [2, []];
|
|
1406
1406
|
});
|
|
1407
1407
|
});
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
return
|
|
1409
|
+
function On(e) {
|
|
1410
|
+
return Ne(e);
|
|
1411
1411
|
}
|
|
1412
|
-
function
|
|
1413
|
-
return
|
|
1412
|
+
function xn(e) {
|
|
1413
|
+
return Ne(e) && Ne(e.target);
|
|
1414
1414
|
}
|
|
1415
|
-
function
|
|
1415
|
+
function Ne(e) {
|
|
1416
1416
|
return typeof e == "object" && e !== null;
|
|
1417
1417
|
}
|
|
1418
|
-
function
|
|
1418
|
+
function Dn(e) {
|
|
1419
1419
|
return or(e.target.files).map(function(r) {
|
|
1420
|
-
return
|
|
1420
|
+
return Ae(r);
|
|
1421
1421
|
});
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function An(e) {
|
|
1424
1424
|
return Ee(this, void 0, void 0, function() {
|
|
1425
1425
|
var r;
|
|
1426
|
-
return we(this, function(
|
|
1427
|
-
switch (
|
|
1426
|
+
return we(this, function(t) {
|
|
1427
|
+
switch (t.label) {
|
|
1428
1428
|
case 0:
|
|
1429
|
-
return [4, Promise.all(e.map(function(
|
|
1430
|
-
return
|
|
1429
|
+
return [4, Promise.all(e.map(function(n) {
|
|
1430
|
+
return n.getFile();
|
|
1431
1431
|
}))];
|
|
1432
1432
|
case 1:
|
|
1433
|
-
return r =
|
|
1434
|
-
return
|
|
1433
|
+
return r = t.sent(), [2, r.map(function(n) {
|
|
1434
|
+
return Ae(n);
|
|
1435
1435
|
})];
|
|
1436
1436
|
}
|
|
1437
1437
|
});
|
|
1438
1438
|
});
|
|
1439
1439
|
}
|
|
1440
|
-
function
|
|
1440
|
+
function Pn(e, r) {
|
|
1441
1441
|
return Ee(this, void 0, void 0, function() {
|
|
1442
|
-
var
|
|
1443
|
-
return we(this, function(
|
|
1444
|
-
switch (
|
|
1442
|
+
var t, n;
|
|
1443
|
+
return we(this, function(a) {
|
|
1444
|
+
switch (a.label) {
|
|
1445
1445
|
case 0:
|
|
1446
|
-
return e.items ? (
|
|
1446
|
+
return e.items ? (t = or(e.items).filter(function(o) {
|
|
1447
1447
|
return o.kind === "file";
|
|
1448
|
-
}), r !== "drop" ? [2,
|
|
1448
|
+
}), r !== "drop" ? [2, t] : [4, Promise.all(t.map(Rn))]) : [3, 2];
|
|
1449
1449
|
case 1:
|
|
1450
|
-
return
|
|
1450
|
+
return n = a.sent(), [2, Dr(Vr(n))];
|
|
1451
1451
|
case 2:
|
|
1452
1452
|
return [2, Dr(or(e.files).map(function(o) {
|
|
1453
|
-
return
|
|
1453
|
+
return Ae(o);
|
|
1454
1454
|
}))];
|
|
1455
1455
|
}
|
|
1456
1456
|
});
|
|
@@ -1458,68 +1458,68 @@ function At(e, r) {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
function Dr(e) {
|
|
1460
1460
|
return e.filter(function(r) {
|
|
1461
|
-
return
|
|
1461
|
+
return Sn.indexOf(r.name) === -1;
|
|
1462
1462
|
});
|
|
1463
1463
|
}
|
|
1464
1464
|
function or(e) {
|
|
1465
1465
|
if (e === null)
|
|
1466
1466
|
return [];
|
|
1467
|
-
for (var r = [],
|
|
1468
|
-
var
|
|
1469
|
-
r.push(
|
|
1467
|
+
for (var r = [], t = 0; t < e.length; t++) {
|
|
1468
|
+
var n = e[t];
|
|
1469
|
+
r.push(n);
|
|
1470
1470
|
}
|
|
1471
1471
|
return r;
|
|
1472
1472
|
}
|
|
1473
|
-
function
|
|
1473
|
+
function Rn(e) {
|
|
1474
1474
|
if (typeof e.webkitGetAsEntry != "function")
|
|
1475
1475
|
return Ar(e);
|
|
1476
1476
|
var r = e.webkitGetAsEntry();
|
|
1477
|
-
return r && r.isDirectory ?
|
|
1477
|
+
return r && r.isDirectory ? Jr(r) : Ar(e);
|
|
1478
1478
|
}
|
|
1479
|
-
function
|
|
1480
|
-
return e.reduce(function(r,
|
|
1481
|
-
return
|
|
1479
|
+
function Vr(e) {
|
|
1480
|
+
return e.reduce(function(r, t) {
|
|
1481
|
+
return xr(xr([], Or(r), !1), Or(Array.isArray(t) ? Vr(t) : [t]), !1);
|
|
1482
1482
|
}, []);
|
|
1483
1483
|
}
|
|
1484
1484
|
function Ar(e) {
|
|
1485
1485
|
var r = e.getAsFile();
|
|
1486
1486
|
if (!r)
|
|
1487
1487
|
return Promise.reject("".concat(e, " is not a File"));
|
|
1488
|
-
var
|
|
1489
|
-
return Promise.resolve(
|
|
1488
|
+
var t = Ae(r);
|
|
1489
|
+
return Promise.resolve(t);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function In(e) {
|
|
1492
1492
|
return Ee(this, void 0, void 0, function() {
|
|
1493
1493
|
return we(this, function(r) {
|
|
1494
|
-
return [2, e.isDirectory ?
|
|
1494
|
+
return [2, e.isDirectory ? Jr(e) : Fn(e)];
|
|
1495
1495
|
});
|
|
1496
1496
|
});
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function Jr(e) {
|
|
1499
1499
|
var r = e.createReader();
|
|
1500
|
-
return new Promise(function(
|
|
1501
|
-
var
|
|
1500
|
+
return new Promise(function(t, n) {
|
|
1501
|
+
var a = [];
|
|
1502
1502
|
function o() {
|
|
1503
1503
|
var s = this;
|
|
1504
|
-
r.readEntries(function(
|
|
1504
|
+
r.readEntries(function(i) {
|
|
1505
1505
|
return Ee(s, void 0, void 0, function() {
|
|
1506
|
-
var
|
|
1506
|
+
var y, l, v;
|
|
1507
1507
|
return we(this, function(g) {
|
|
1508
1508
|
switch (g.label) {
|
|
1509
1509
|
case 0:
|
|
1510
|
-
if (
|
|
1510
|
+
if (i.length)
|
|
1511
1511
|
return [3, 5];
|
|
1512
1512
|
g.label = 1;
|
|
1513
1513
|
case 1:
|
|
1514
|
-
return g.trys.push([1, 3, , 4]), [4, Promise.all(
|
|
1514
|
+
return g.trys.push([1, 3, , 4]), [4, Promise.all(a)];
|
|
1515
1515
|
case 2:
|
|
1516
|
-
return
|
|
1516
|
+
return y = g.sent(), t(y), [3, 4];
|
|
1517
1517
|
case 3:
|
|
1518
|
-
return l = g.sent(),
|
|
1518
|
+
return l = g.sent(), n(l), [3, 4];
|
|
1519
1519
|
case 4:
|
|
1520
1520
|
return [3, 6];
|
|
1521
1521
|
case 5:
|
|
1522
|
-
|
|
1522
|
+
v = Promise.all(i.map(In)), a.push(v), o(), g.label = 6;
|
|
1523
1523
|
case 6:
|
|
1524
1524
|
return [
|
|
1525
1525
|
2
|
|
@@ -1528,178 +1528,178 @@ function Xr(e) {
|
|
|
1528
1528
|
}
|
|
1529
1529
|
});
|
|
1530
1530
|
});
|
|
1531
|
-
}, function(
|
|
1532
|
-
|
|
1531
|
+
}, function(i) {
|
|
1532
|
+
n(i);
|
|
1533
1533
|
});
|
|
1534
1534
|
}
|
|
1535
1535
|
o();
|
|
1536
1536
|
});
|
|
1537
1537
|
}
|
|
1538
|
-
function
|
|
1538
|
+
function Fn(e) {
|
|
1539
1539
|
return Ee(this, void 0, void 0, function() {
|
|
1540
1540
|
return we(this, function(r) {
|
|
1541
|
-
return [2, new Promise(function(
|
|
1542
|
-
e.file(function(
|
|
1543
|
-
var o =
|
|
1544
|
-
|
|
1545
|
-
}, function(
|
|
1546
|
-
|
|
1541
|
+
return [2, new Promise(function(t, n) {
|
|
1542
|
+
e.file(function(a) {
|
|
1543
|
+
var o = Ae(a, e.fullPath);
|
|
1544
|
+
t(o);
|
|
1545
|
+
}, function(a) {
|
|
1546
|
+
n(a);
|
|
1547
1547
|
});
|
|
1548
1548
|
})];
|
|
1549
1549
|
});
|
|
1550
1550
|
});
|
|
1551
1551
|
}
|
|
1552
|
-
var
|
|
1552
|
+
var jn = function(e, r) {
|
|
1553
1553
|
if (e && r) {
|
|
1554
|
-
var
|
|
1555
|
-
return
|
|
1556
|
-
var
|
|
1557
|
-
return
|
|
1554
|
+
var t = Array.isArray(r) ? r : r.split(","), n = e.name || "", a = (e.type || "").toLowerCase(), o = a.replace(/\/.*$/, "");
|
|
1555
|
+
return t.some(function(s) {
|
|
1556
|
+
var i = s.trim().toLowerCase();
|
|
1557
|
+
return i.charAt(0) === "." ? n.toLowerCase().endsWith(i) : i.endsWith("/*") ? o === i.replace(/\/.*$/, "") : a === i;
|
|
1558
1558
|
});
|
|
1559
1559
|
}
|
|
1560
1560
|
return !0;
|
|
1561
1561
|
};
|
|
1562
1562
|
function Pr(e) {
|
|
1563
|
-
return
|
|
1563
|
+
return $n(e) || Nn(e) || Zr(e) || kn();
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function kn() {
|
|
1566
1566
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1567
1567
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1568
1568
|
}
|
|
1569
|
-
function
|
|
1569
|
+
function Nn(e) {
|
|
1570
1570
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
1571
1571
|
return Array.from(e);
|
|
1572
1572
|
}
|
|
1573
|
-
function
|
|
1573
|
+
function $n(e) {
|
|
1574
1574
|
if (Array.isArray(e))
|
|
1575
|
-
return
|
|
1575
|
+
return ar(e);
|
|
1576
1576
|
}
|
|
1577
1577
|
function Rr(e, r) {
|
|
1578
|
-
var
|
|
1578
|
+
var t = Object.keys(e);
|
|
1579
1579
|
if (Object.getOwnPropertySymbols) {
|
|
1580
|
-
var
|
|
1581
|
-
r && (
|
|
1582
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
1583
|
-
})),
|
|
1580
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1581
|
+
r && (n = n.filter(function(a) {
|
|
1582
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
1583
|
+
})), t.push.apply(t, n);
|
|
1584
1584
|
}
|
|
1585
|
-
return
|
|
1585
|
+
return t;
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function Ir(e) {
|
|
1588
1588
|
for (var r = 1; r < arguments.length; r++) {
|
|
1589
|
-
var
|
|
1590
|
-
r % 2 ? Rr(Object(
|
|
1591
|
-
|
|
1592
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
1593
|
-
Object.defineProperty(e,
|
|
1589
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
1590
|
+
r % 2 ? Rr(Object(t), !0).forEach(function(n) {
|
|
1591
|
+
Xr(e, n, t[n]);
|
|
1592
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Rr(Object(t)).forEach(function(n) {
|
|
1593
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
1596
|
return e;
|
|
1597
1597
|
}
|
|
1598
|
-
function
|
|
1599
|
-
return r in e ? Object.defineProperty(e, r, { value:
|
|
1598
|
+
function Xr(e, r, t) {
|
|
1599
|
+
return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
1600
1600
|
}
|
|
1601
|
-
function
|
|
1602
|
-
return
|
|
1601
|
+
function xe(e, r) {
|
|
1602
|
+
return zn(e) || Ln(e, r) || Zr(e, r) || Mn();
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function Mn() {
|
|
1605
1605
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1606
1606
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1607
1607
|
}
|
|
1608
|
-
function
|
|
1608
|
+
function Zr(e, r) {
|
|
1609
1609
|
if (e) {
|
|
1610
1610
|
if (typeof e == "string")
|
|
1611
|
-
return
|
|
1612
|
-
var
|
|
1613
|
-
if (
|
|
1611
|
+
return ar(e, r);
|
|
1612
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
1613
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set")
|
|
1614
1614
|
return Array.from(e);
|
|
1615
|
-
if (
|
|
1616
|
-
return
|
|
1615
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
1616
|
+
return ar(e, r);
|
|
1617
1617
|
}
|
|
1618
1618
|
}
|
|
1619
|
-
function
|
|
1619
|
+
function ar(e, r) {
|
|
1620
1620
|
(r == null || r > e.length) && (r = e.length);
|
|
1621
|
-
for (var
|
|
1622
|
-
t
|
|
1623
|
-
return
|
|
1621
|
+
for (var t = 0, n = new Array(r); t < r; t++)
|
|
1622
|
+
n[t] = e[t];
|
|
1623
|
+
return n;
|
|
1624
1624
|
}
|
|
1625
|
-
function
|
|
1626
|
-
var
|
|
1627
|
-
if (
|
|
1628
|
-
var
|
|
1625
|
+
function Ln(e, r) {
|
|
1626
|
+
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1627
|
+
if (t != null) {
|
|
1628
|
+
var n = [], a = !0, o = !1, s, i;
|
|
1629
1629
|
try {
|
|
1630
|
-
for (
|
|
1630
|
+
for (t = t.call(e); !(a = (s = t.next()).done) && (n.push(s.value), !(r && n.length === r)); a = !0)
|
|
1631
1631
|
;
|
|
1632
|
-
} catch (
|
|
1633
|
-
o = !0,
|
|
1632
|
+
} catch (y) {
|
|
1633
|
+
o = !0, i = y;
|
|
1634
1634
|
} finally {
|
|
1635
1635
|
try {
|
|
1636
|
-
!
|
|
1636
|
+
!a && t.return != null && t.return();
|
|
1637
1637
|
} finally {
|
|
1638
1638
|
if (o)
|
|
1639
|
-
throw
|
|
1639
|
+
throw i;
|
|
1640
1640
|
}
|
|
1641
1641
|
}
|
|
1642
|
-
return
|
|
1642
|
+
return n;
|
|
1643
1643
|
}
|
|
1644
1644
|
}
|
|
1645
|
-
function
|
|
1645
|
+
function zn(e) {
|
|
1646
1646
|
if (Array.isArray(e))
|
|
1647
1647
|
return e;
|
|
1648
1648
|
}
|
|
1649
|
-
var
|
|
1649
|
+
var Bn = "file-invalid-type", Wn = "file-too-large", Yn = "file-too-small", qn = "too-many-files", Hn = function(r) {
|
|
1650
1650
|
r = Array.isArray(r) && r.length === 1 ? r[0] : r;
|
|
1651
|
-
var
|
|
1651
|
+
var t = Array.isArray(r) ? "one of ".concat(r.join(", ")) : r;
|
|
1652
1652
|
return {
|
|
1653
|
-
code:
|
|
1654
|
-
message: "File type must be ".concat(
|
|
1653
|
+
code: Bn,
|
|
1654
|
+
message: "File type must be ".concat(t)
|
|
1655
1655
|
};
|
|
1656
|
-
},
|
|
1656
|
+
}, Fr = function(r) {
|
|
1657
1657
|
return {
|
|
1658
|
-
code:
|
|
1658
|
+
code: Wn,
|
|
1659
1659
|
message: "File is larger than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
|
|
1660
1660
|
};
|
|
1661
1661
|
}, jr = function(r) {
|
|
1662
1662
|
return {
|
|
1663
|
-
code:
|
|
1663
|
+
code: Yn,
|
|
1664
1664
|
message: "File is smaller than ".concat(r, " ").concat(r === 1 ? "byte" : "bytes")
|
|
1665
1665
|
};
|
|
1666
|
-
},
|
|
1667
|
-
code:
|
|
1666
|
+
}, Kn = {
|
|
1667
|
+
code: qn,
|
|
1668
1668
|
message: "Too many files"
|
|
1669
1669
|
};
|
|
1670
|
-
function
|
|
1671
|
-
var
|
|
1672
|
-
return [
|
|
1673
|
-
}
|
|
1674
|
-
function
|
|
1675
|
-
if (
|
|
1676
|
-
if (
|
|
1677
|
-
if (e.size >
|
|
1678
|
-
return [!1,
|
|
1670
|
+
function Qr(e, r) {
|
|
1671
|
+
var t = e.type === "application/x-moz-file" || jn(e, r);
|
|
1672
|
+
return [t, t ? null : Hn(r)];
|
|
1673
|
+
}
|
|
1674
|
+
function et(e, r, t) {
|
|
1675
|
+
if (me(e.size))
|
|
1676
|
+
if (me(r) && me(t)) {
|
|
1677
|
+
if (e.size > t)
|
|
1678
|
+
return [!1, Fr(t)];
|
|
1679
1679
|
if (e.size < r)
|
|
1680
1680
|
return [!1, jr(r)];
|
|
1681
1681
|
} else {
|
|
1682
|
-
if (
|
|
1682
|
+
if (me(r) && e.size < r)
|
|
1683
1683
|
return [!1, jr(r)];
|
|
1684
|
-
if (
|
|
1685
|
-
return [!1,
|
|
1684
|
+
if (me(t) && e.size > t)
|
|
1685
|
+
return [!1, Fr(t)];
|
|
1686
1686
|
}
|
|
1687
1687
|
return [!0, null];
|
|
1688
1688
|
}
|
|
1689
|
-
function
|
|
1689
|
+
function me(e) {
|
|
1690
1690
|
return e != null;
|
|
1691
1691
|
}
|
|
1692
|
-
function
|
|
1693
|
-
var r = e.files,
|
|
1694
|
-
return !o && r.length > 1 || o && s >= 1 && r.length > s ? !1 : r.every(function(
|
|
1695
|
-
var l =
|
|
1696
|
-
return g &&
|
|
1692
|
+
function Un(e) {
|
|
1693
|
+
var r = e.files, t = e.accept, n = e.minSize, a = e.maxSize, o = e.multiple, s = e.maxFiles, i = e.validator;
|
|
1694
|
+
return !o && r.length > 1 || o && s >= 1 && r.length > s ? !1 : r.every(function(y) {
|
|
1695
|
+
var l = Qr(y, t), v = xe(l, 1), g = v[0], w = et(y, n, a), O = xe(w, 1), D = O[0], _ = i ? i(y) : null;
|
|
1696
|
+
return g && D && !_;
|
|
1697
1697
|
});
|
|
1698
1698
|
}
|
|
1699
|
-
function
|
|
1699
|
+
function $e(e) {
|
|
1700
1700
|
return typeof e.isPropagationStopped == "function" ? e.isPropagationStopped() : typeof e.cancelBubble < "u" ? e.cancelBubble : !1;
|
|
1701
1701
|
}
|
|
1702
|
-
function
|
|
1702
|
+
function je(e) {
|
|
1703
1703
|
return e.dataTransfer ? Array.prototype.some.call(e.dataTransfer.types, function(r) {
|
|
1704
1704
|
return r === "Files" || r === "application/x-moz-file";
|
|
1705
1705
|
}) : !!e.target && !!e.target.files;
|
|
@@ -1707,38 +1707,38 @@ function Ie(e) {
|
|
|
1707
1707
|
function kr(e) {
|
|
1708
1708
|
e.preventDefault();
|
|
1709
1709
|
}
|
|
1710
|
-
function
|
|
1710
|
+
function Gn(e) {
|
|
1711
1711
|
return e.indexOf("MSIE") !== -1 || e.indexOf("Trident/") !== -1;
|
|
1712
1712
|
}
|
|
1713
|
-
function
|
|
1713
|
+
function Vn(e) {
|
|
1714
1714
|
return e.indexOf("Edge/") !== -1;
|
|
1715
1715
|
}
|
|
1716
|
-
function
|
|
1716
|
+
function Jn() {
|
|
1717
1717
|
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1718
|
-
return
|
|
1718
|
+
return Gn(e) || Vn(e);
|
|
1719
1719
|
}
|
|
1720
|
-
function
|
|
1721
|
-
for (var e = arguments.length, r = new Array(e),
|
|
1722
|
-
r[
|
|
1723
|
-
return function(
|
|
1724
|
-
for (var
|
|
1720
|
+
function ie() {
|
|
1721
|
+
for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
|
|
1722
|
+
r[t] = arguments[t];
|
|
1723
|
+
return function(n) {
|
|
1724
|
+
for (var a = arguments.length, o = new Array(a > 1 ? a - 1 : 0), s = 1; s < a; s++)
|
|
1725
1725
|
o[s - 1] = arguments[s];
|
|
1726
|
-
return r.some(function(
|
|
1727
|
-
return
|
|
1726
|
+
return r.some(function(i) {
|
|
1727
|
+
return !$e(n) && i && i.apply(void 0, [n].concat(o)), $e(n);
|
|
1728
1728
|
});
|
|
1729
1729
|
};
|
|
1730
1730
|
}
|
|
1731
|
-
function
|
|
1731
|
+
function Xn() {
|
|
1732
1732
|
return "showOpenFilePicker" in window;
|
|
1733
1733
|
}
|
|
1734
|
-
function
|
|
1735
|
-
if (
|
|
1736
|
-
var r = Object.entries(e).filter(function(
|
|
1737
|
-
var
|
|
1738
|
-
return
|
|
1739
|
-
}).reduce(function(
|
|
1740
|
-
var
|
|
1741
|
-
return
|
|
1734
|
+
function Zn(e) {
|
|
1735
|
+
if (me(e)) {
|
|
1736
|
+
var r = Object.entries(e).filter(function(t) {
|
|
1737
|
+
var n = xe(t, 2), a = n[0], o = n[1], s = !0;
|
|
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
|
+
}).reduce(function(t, n) {
|
|
1740
|
+
var a = xe(n, 2), o = a[0], s = a[1];
|
|
1741
|
+
return Ir(Ir({}, t), {}, Xr({}, o, s));
|
|
1742
1742
|
}, {});
|
|
1743
1743
|
return [{
|
|
1744
1744
|
// description is required due to https://crbug.com/1264708
|
|
@@ -1748,148 +1748,148 @@ function Xt(e) {
|
|
|
1748
1748
|
}
|
|
1749
1749
|
return e;
|
|
1750
1750
|
}
|
|
1751
|
-
function
|
|
1752
|
-
if (
|
|
1753
|
-
return Object.entries(e).reduce(function(r,
|
|
1754
|
-
var
|
|
1755
|
-
return [].concat(Pr(r), [
|
|
1751
|
+
function Qn(e) {
|
|
1752
|
+
if (me(e))
|
|
1753
|
+
return Object.entries(e).reduce(function(r, t) {
|
|
1754
|
+
var n = xe(t, 2), a = n[0], o = n[1];
|
|
1755
|
+
return [].concat(Pr(r), [a], Pr(o));
|
|
1756
1756
|
}, []).filter(function(r) {
|
|
1757
|
-
return
|
|
1757
|
+
return rt(r) || tt(r);
|
|
1758
1758
|
}).join(",");
|
|
1759
1759
|
}
|
|
1760
|
-
function
|
|
1760
|
+
function eo(e) {
|
|
1761
1761
|
return e instanceof DOMException && (e.name === "AbortError" || e.code === e.ABORT_ERR);
|
|
1762
1762
|
}
|
|
1763
|
-
function
|
|
1763
|
+
function ro(e) {
|
|
1764
1764
|
return e instanceof DOMException && (e.name === "SecurityError" || e.code === e.SECURITY_ERR);
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1766
|
+
function rt(e) {
|
|
1767
1767
|
return e === "audio/*" || e === "video/*" || e === "image/*" || e === "text/*" || /\w+\/[-+.\w]+/g.test(e);
|
|
1768
1768
|
}
|
|
1769
|
-
function
|
|
1769
|
+
function tt(e) {
|
|
1770
1770
|
return /^.*\.[\w]+$/.test(e);
|
|
1771
1771
|
}
|
|
1772
|
-
var
|
|
1772
|
+
var to = ["children"], no = ["open"], oo = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], ao = ["refKey", "onChange", "onClick"];
|
|
1773
1773
|
function io(e) {
|
|
1774
|
-
return
|
|
1774
|
+
return lo(e) || co(e) || nt(e) || so();
|
|
1775
1775
|
}
|
|
1776
|
-
function
|
|
1776
|
+
function so() {
|
|
1777
1777
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
1778
1778
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1779
1779
|
}
|
|
1780
|
-
function
|
|
1780
|
+
function co(e) {
|
|
1781
1781
|
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null)
|
|
1782
1782
|
return Array.from(e);
|
|
1783
1783
|
}
|
|
1784
|
-
function
|
|
1784
|
+
function lo(e) {
|
|
1785
1785
|
if (Array.isArray(e))
|
|
1786
|
-
return
|
|
1786
|
+
return ir(e);
|
|
1787
1787
|
}
|
|
1788
1788
|
function er(e, r) {
|
|
1789
|
-
return
|
|
1789
|
+
return po(e) || fo(e, r) || nt(e, r) || uo();
|
|
1790
1790
|
}
|
|
1791
|
-
function
|
|
1791
|
+
function uo() {
|
|
1792
1792
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1793
1793
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1794
1794
|
}
|
|
1795
|
-
function
|
|
1795
|
+
function nt(e, r) {
|
|
1796
1796
|
if (e) {
|
|
1797
1797
|
if (typeof e == "string")
|
|
1798
|
-
return
|
|
1799
|
-
var
|
|
1800
|
-
if (
|
|
1798
|
+
return ir(e, r);
|
|
1799
|
+
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
1800
|
+
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set")
|
|
1801
1801
|
return Array.from(e);
|
|
1802
|
-
if (
|
|
1803
|
-
return
|
|
1802
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
1803
|
+
return ir(e, r);
|
|
1804
1804
|
}
|
|
1805
1805
|
}
|
|
1806
|
-
function
|
|
1806
|
+
function ir(e, r) {
|
|
1807
1807
|
(r == null || r > e.length) && (r = e.length);
|
|
1808
|
-
for (var
|
|
1809
|
-
t
|
|
1810
|
-
return
|
|
1808
|
+
for (var t = 0, n = new Array(r); t < r; t++)
|
|
1809
|
+
n[t] = e[t];
|
|
1810
|
+
return n;
|
|
1811
1811
|
}
|
|
1812
|
-
function
|
|
1813
|
-
var
|
|
1814
|
-
if (
|
|
1815
|
-
var
|
|
1812
|
+
function fo(e, r) {
|
|
1813
|
+
var t = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1814
|
+
if (t != null) {
|
|
1815
|
+
var n = [], a = !0, o = !1, s, i;
|
|
1816
1816
|
try {
|
|
1817
|
-
for (
|
|
1817
|
+
for (t = t.call(e); !(a = (s = t.next()).done) && (n.push(s.value), !(r && n.length === r)); a = !0)
|
|
1818
1818
|
;
|
|
1819
|
-
} catch (
|
|
1820
|
-
o = !0,
|
|
1819
|
+
} catch (y) {
|
|
1820
|
+
o = !0, i = y;
|
|
1821
1821
|
} finally {
|
|
1822
1822
|
try {
|
|
1823
|
-
!
|
|
1823
|
+
!a && t.return != null && t.return();
|
|
1824
1824
|
} finally {
|
|
1825
1825
|
if (o)
|
|
1826
|
-
throw
|
|
1826
|
+
throw i;
|
|
1827
1827
|
}
|
|
1828
1828
|
}
|
|
1829
|
-
return
|
|
1829
|
+
return n;
|
|
1830
1830
|
}
|
|
1831
1831
|
}
|
|
1832
|
-
function
|
|
1832
|
+
function po(e) {
|
|
1833
1833
|
if (Array.isArray(e))
|
|
1834
1834
|
return e;
|
|
1835
1835
|
}
|
|
1836
1836
|
function Nr(e, r) {
|
|
1837
|
-
var
|
|
1837
|
+
var t = Object.keys(e);
|
|
1838
1838
|
if (Object.getOwnPropertySymbols) {
|
|
1839
|
-
var
|
|
1840
|
-
r && (
|
|
1841
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
1842
|
-
})),
|
|
1839
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
1840
|
+
r && (n = n.filter(function(a) {
|
|
1841
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
1842
|
+
})), t.push.apply(t, n);
|
|
1843
1843
|
}
|
|
1844
|
-
return
|
|
1844
|
+
return t;
|
|
1845
1845
|
}
|
|
1846
|
-
function
|
|
1846
|
+
function z(e) {
|
|
1847
1847
|
for (var r = 1; r < arguments.length; r++) {
|
|
1848
|
-
var
|
|
1849
|
-
r % 2 ? Nr(Object(
|
|
1850
|
-
sr(e,
|
|
1851
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
1852
|
-
Object.defineProperty(e,
|
|
1848
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
1849
|
+
r % 2 ? Nr(Object(t), !0).forEach(function(n) {
|
|
1850
|
+
sr(e, n, t[n]);
|
|
1851
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Nr(Object(t)).forEach(function(n) {
|
|
1852
|
+
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(t, n));
|
|
1853
1853
|
});
|
|
1854
1854
|
}
|
|
1855
1855
|
return e;
|
|
1856
1856
|
}
|
|
1857
|
-
function sr(e, r,
|
|
1858
|
-
return r in e ? Object.defineProperty(e, r, { value:
|
|
1857
|
+
function sr(e, r, t) {
|
|
1858
|
+
return r in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e;
|
|
1859
1859
|
}
|
|
1860
|
-
function
|
|
1860
|
+
function Me(e, r) {
|
|
1861
1861
|
if (e == null)
|
|
1862
1862
|
return {};
|
|
1863
|
-
var
|
|
1863
|
+
var t = mo(e, r), n, a;
|
|
1864
1864
|
if (Object.getOwnPropertySymbols) {
|
|
1865
1865
|
var o = Object.getOwnPropertySymbols(e);
|
|
1866
|
-
for (
|
|
1867
|
-
|
|
1866
|
+
for (a = 0; a < o.length; a++)
|
|
1867
|
+
n = o[a], !(r.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (t[n] = e[n]);
|
|
1868
1868
|
}
|
|
1869
|
-
return
|
|
1869
|
+
return t;
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function mo(e, r) {
|
|
1872
1872
|
if (e == null)
|
|
1873
1873
|
return {};
|
|
1874
|
-
var
|
|
1875
|
-
for (o = 0; o <
|
|
1876
|
-
|
|
1877
|
-
return
|
|
1874
|
+
var t = {}, n = Object.keys(e), a, o;
|
|
1875
|
+
for (o = 0; o < n.length; o++)
|
|
1876
|
+
a = n[o], !(r.indexOf(a) >= 0) && (t[a] = e[a]);
|
|
1877
|
+
return t;
|
|
1878
1878
|
}
|
|
1879
|
-
var pr = /* @__PURE__ */
|
|
1880
|
-
var
|
|
1881
|
-
return
|
|
1879
|
+
var pr = /* @__PURE__ */ mt(function(e, r) {
|
|
1880
|
+
var t = e.children, n = Me(e, to), a = at(n), o = a.open, s = Me(a, no);
|
|
1881
|
+
return vt(r, function() {
|
|
1882
1882
|
return {
|
|
1883
1883
|
open: o
|
|
1884
1884
|
};
|
|
1885
|
-
}, [o]), /* @__PURE__ */
|
|
1885
|
+
}, [o]), /* @__PURE__ */ ut.createElement(yt, null, t(z(z({}, s), {}, {
|
|
1886
1886
|
open: o
|
|
1887
1887
|
})));
|
|
1888
1888
|
});
|
|
1889
1889
|
pr.displayName = "Dropzone";
|
|
1890
|
-
var
|
|
1890
|
+
var ot = {
|
|
1891
1891
|
disabled: !1,
|
|
1892
|
-
getFilesFromEvent:
|
|
1892
|
+
getFilesFromEvent: Cn,
|
|
1893
1893
|
maxSize: 1 / 0,
|
|
1894
1894
|
minSize: 0,
|
|
1895
1895
|
multiple: !0,
|
|
@@ -1903,7 +1903,7 @@ var an = {
|
|
|
1903
1903
|
useFsAccessApi: !0,
|
|
1904
1904
|
autoFocus: !1
|
|
1905
1905
|
};
|
|
1906
|
-
pr.defaultProps =
|
|
1906
|
+
pr.defaultProps = ot;
|
|
1907
1907
|
pr.propTypes = {
|
|
1908
1908
|
/**
|
|
1909
1909
|
* Render function that exposes the dropzone state and prop getter fns
|
|
@@ -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: N.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: N.objectOf(N.arrayOf(N.string)),
|
|
1932
1932
|
/**
|
|
1933
1933
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
1934
1934
|
*/
|
|
1935
|
-
multiple:
|
|
1935
|
+
multiple: N.bool,
|
|
1936
1936
|
/**
|
|
1937
1937
|
* If false, allow dropped items to take over the current browser window
|
|
1938
1938
|
*/
|
|
1939
|
-
preventDropOnDocument:
|
|
1939
|
+
preventDropOnDocument: N.bool,
|
|
1940
1940
|
/**
|
|
1941
1941
|
* If true, disables click to open the native file selection dialog
|
|
1942
1942
|
*/
|
|
1943
|
-
noClick:
|
|
1943
|
+
noClick: N.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: N.bool,
|
|
1949
1949
|
/**
|
|
1950
1950
|
* If true, disables drag 'n' drop
|
|
1951
1951
|
*/
|
|
1952
|
-
noDrag:
|
|
1952
|
+
noDrag: N.bool,
|
|
1953
1953
|
/**
|
|
1954
1954
|
* If true, stops drag event propagation to parents
|
|
1955
1955
|
*/
|
|
1956
|
-
noDragEventsBubbling:
|
|
1956
|
+
noDragEventsBubbling: N.bool,
|
|
1957
1957
|
/**
|
|
1958
1958
|
* Minimum file size (in bytes)
|
|
1959
1959
|
*/
|
|
1960
|
-
minSize:
|
|
1960
|
+
minSize: N.number,
|
|
1961
1961
|
/**
|
|
1962
1962
|
* Maximum file size (in bytes)
|
|
1963
1963
|
*/
|
|
1964
|
-
maxSize:
|
|
1964
|
+
maxSize: N.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: N.number,
|
|
1970
1970
|
/**
|
|
1971
1971
|
* Enable/disable the dropzone
|
|
1972
1972
|
*/
|
|
1973
|
-
disabled:
|
|
1973
|
+
disabled: N.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: N.func,
|
|
1980
1980
|
/**
|
|
1981
1981
|
* Cb for when closing the file dialog with no selection
|
|
1982
1982
|
*/
|
|
1983
|
-
onFileDialogCancel:
|
|
1983
|
+
onFileDialogCancel: N.func,
|
|
1984
1984
|
/**
|
|
1985
1985
|
* Cb for when opening the file dialog
|
|
1986
1986
|
*/
|
|
1987
|
-
onFileDialogOpen:
|
|
1987
|
+
onFileDialogOpen: N.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: N.bool,
|
|
1993
1993
|
/**
|
|
1994
1994
|
* Set to true to focus the root element on render
|
|
1995
1995
|
*/
|
|
1996
|
-
autoFocus:
|
|
1996
|
+
autoFocus: N.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: N.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: N.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: N.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: N.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: N.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: N.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: N.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: N.func
|
|
2074
2074
|
};
|
|
2075
2075
|
var cr = {
|
|
2076
2076
|
isFocused: !1,
|
|
@@ -2081,380 +2081,437 @@ var cr = {
|
|
|
2081
2081
|
acceptedFiles: [],
|
|
2082
2082
|
fileRejections: []
|
|
2083
2083
|
};
|
|
2084
|
-
function
|
|
2085
|
-
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r =
|
|
2086
|
-
return
|
|
2087
|
-
}, [
|
|
2088
|
-
return
|
|
2089
|
-
}, [
|
|
2090
|
-
return typeof
|
|
2091
|
-
}, [
|
|
2092
|
-
return typeof
|
|
2093
|
-
}, [
|
|
2094
|
-
!
|
|
2095
|
-
if (
|
|
2096
|
-
var b =
|
|
2097
|
-
b.length || (
|
|
2084
|
+
function at() {
|
|
2085
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, r = z(z({}, ot), e), t = r.accept, n = r.disabled, a = r.getFilesFromEvent, o = r.maxSize, s = r.minSize, i = r.multiple, y = r.maxFiles, l = r.onDragEnter, v = r.onDragLeave, g = r.onDragOver, w = r.onDrop, O = r.onDropAccepted, D = r.onDropRejected, _ = r.onFileDialogCancel, M = r.onFileDialogOpen, L = r.useFsAccessApi, K = r.autoFocus, j = r.preventDropOnDocument, k = r.noClick, p = r.noKeyboard, re = r.noDrag, $ = r.noDragEventsBubbling, V = r.onError, X = r.validator, ce = oe(function() {
|
|
2086
|
+
return Qn(t);
|
|
2087
|
+
}, [t]), fe = oe(function() {
|
|
2088
|
+
return Zn(t);
|
|
2089
|
+
}, [t]), pe = oe(function() {
|
|
2090
|
+
return typeof M == "function" ? M : $r;
|
|
2091
|
+
}, [M]), le = oe(function() {
|
|
2092
|
+
return typeof _ == "function" ? _ : $r;
|
|
2093
|
+
}, [_]), B = Ce(null), J = Ce(null), te = dt(vo, cr), ae = er(te, 2), ue = ae[0], U = ae[1], c = ue.isFocused, m = ue.isFileDialogActive, T = Ce(typeof window < "u" && window.isSecureContext && L && Xn()), S = function() {
|
|
2094
|
+
!T.current && m && setTimeout(function() {
|
|
2095
|
+
if (J.current) {
|
|
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
|
+
Oe(function() {
|
|
2104
|
+
return window.addEventListener("focus", S, !1), function() {
|
|
2105
|
+
window.removeEventListener("focus", S, !1);
|
|
2106
2106
|
};
|
|
2107
|
-
}, [
|
|
2108
|
-
var h = Ce([]),
|
|
2109
|
-
|
|
2107
|
+
}, [J, m, le, T]);
|
|
2108
|
+
var h = Ce([]), A = function(b) {
|
|
2109
|
+
B.current && B.current.contains(b.target) || (b.preventDefault(), h.current = []);
|
|
2110
2110
|
};
|
|
2111
|
-
|
|
2112
|
-
return
|
|
2113
|
-
|
|
2111
|
+
Oe(function() {
|
|
2112
|
+
return j && (document.addEventListener("dragover", kr, !1), document.addEventListener("drop", A, !1)), function() {
|
|
2113
|
+
j && (document.removeEventListener("dragover", kr), document.removeEventListener("drop", A));
|
|
2114
2114
|
};
|
|
2115
|
-
}, [
|
|
2116
|
-
return !
|
|
2115
|
+
}, [B, j]), Oe(function() {
|
|
2116
|
+
return !n && K && B.current && B.current.focus(), function() {
|
|
2117
2117
|
};
|
|
2118
|
-
}, [
|
|
2119
|
-
var
|
|
2120
|
-
|
|
2121
|
-
}, [
|
|
2122
|
-
|
|
2123
|
-
if (!(
|
|
2124
|
-
var
|
|
2118
|
+
}, [B, K, n]);
|
|
2119
|
+
var E = ee(function(d) {
|
|
2120
|
+
V ? V(d) : console.error(d);
|
|
2121
|
+
}, [V]), C = ee(function(d) {
|
|
2122
|
+
d.preventDefault(), d.persist(), Re(d), h.current = [].concat(io(h.current), [d.target]), je(d) && Promise.resolve(a(d)).then(function(b) {
|
|
2123
|
+
if (!($e(d) && !$)) {
|
|
2124
|
+
var Y = b.length, G = Y > 0 && Un({
|
|
2125
2125
|
files: b,
|
|
2126
|
-
accept:
|
|
2126
|
+
accept: ce,
|
|
2127
2127
|
minSize: s,
|
|
2128
2128
|
maxSize: o,
|
|
2129
|
-
multiple:
|
|
2130
|
-
maxFiles:
|
|
2131
|
-
validator:
|
|
2132
|
-
}),
|
|
2133
|
-
|
|
2134
|
-
isDragAccept:
|
|
2135
|
-
isDragReject:
|
|
2129
|
+
multiple: i,
|
|
2130
|
+
maxFiles: y,
|
|
2131
|
+
validator: X
|
|
2132
|
+
}), Q = Y > 0 && !G;
|
|
2133
|
+
U({
|
|
2134
|
+
isDragAccept: G,
|
|
2135
|
+
isDragReject: Q,
|
|
2136
2136
|
isDragActive: !0,
|
|
2137
2137
|
type: "setDraggedFiles"
|
|
2138
|
-
}), l && l(
|
|
2138
|
+
}), l && l(d);
|
|
2139
2139
|
}
|
|
2140
2140
|
}).catch(function(b) {
|
|
2141
|
-
return
|
|
2141
|
+
return E(b);
|
|
2142
2142
|
});
|
|
2143
|
-
}, [
|
|
2144
|
-
|
|
2145
|
-
var b =
|
|
2146
|
-
if (b &&
|
|
2143
|
+
}, [a, l, E, $, ce, s, o, i, y, X]), P = ee(function(d) {
|
|
2144
|
+
d.preventDefault(), d.persist(), Re(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 b && g && g(
|
|
2152
|
-
}, [g,
|
|
2153
|
-
|
|
2154
|
-
var b = h.current.filter(function(
|
|
2155
|
-
return
|
|
2156
|
-
}),
|
|
2157
|
-
|
|
2151
|
+
return b && g && g(d), !1;
|
|
2152
|
+
}, [g, $]), R = ee(function(d) {
|
|
2153
|
+
d.preventDefault(), d.persist(), Re(d);
|
|
2154
|
+
var b = h.current.filter(function(G) {
|
|
2155
|
+
return B.current && B.current.contains(G);
|
|
2156
|
+
}), Y = b.indexOf(d.target);
|
|
2157
|
+
Y !== -1 && b.splice(Y, 1), h.current = b, !(b.length > 0) && (U({
|
|
2158
2158
|
type: "setDraggedFiles",
|
|
2159
2159
|
isDragActive: !1,
|
|
2160
2160
|
isDragAccept: !1,
|
|
2161
2161
|
isDragReject: !1
|
|
2162
|
-
}),
|
|
2163
|
-
}, [
|
|
2164
|
-
var
|
|
2165
|
-
|
|
2166
|
-
var
|
|
2162
|
+
}), je(d) && v && v(d));
|
|
2163
|
+
}, [B, v, $]), x = ee(function(d, b) {
|
|
2164
|
+
var Y = [], G = [];
|
|
2165
|
+
d.forEach(function(Q) {
|
|
2166
|
+
var Se = Qr(Q, ce), ge = er(Se, 2), Be = ge[0], We = ge[1], Ye = et(Q, s, o), Ie = er(Ye, 2), qe = Ie[0], He = Ie[1], Ke = X ? X(Q) : null;
|
|
2167
2167
|
if (Be && qe && !Ke)
|
|
2168
|
-
|
|
2168
|
+
Y.push(Q);
|
|
2169
2169
|
else {
|
|
2170
2170
|
var Ue = [We, He];
|
|
2171
|
-
Ke && (Ue = Ue.concat(Ke)),
|
|
2172
|
-
file:
|
|
2173
|
-
errors: Ue.filter(function(
|
|
2174
|
-
return
|
|
2171
|
+
Ke && (Ue = Ue.concat(Ke)), G.push({
|
|
2172
|
+
file: Q,
|
|
2173
|
+
errors: Ue.filter(function(lt) {
|
|
2174
|
+
return lt;
|
|
2175
2175
|
})
|
|
2176
2176
|
});
|
|
2177
2177
|
}
|
|
2178
|
-
}), (!
|
|
2179
|
-
|
|
2180
|
-
file:
|
|
2181
|
-
errors: [
|
|
2178
|
+
}), (!i && Y.length > 1 || i && y >= 1 && Y.length > y) && (Y.forEach(function(Q) {
|
|
2179
|
+
G.push({
|
|
2180
|
+
file: Q,
|
|
2181
|
+
errors: [Kn]
|
|
2182
2182
|
});
|
|
2183
|
-
}),
|
|
2184
|
-
acceptedFiles:
|
|
2185
|
-
fileRejections:
|
|
2183
|
+
}), Y.splice(0)), U({
|
|
2184
|
+
acceptedFiles: Y,
|
|
2185
|
+
fileRejections: G,
|
|
2186
2186
|
type: "setFiles"
|
|
2187
|
-
}),
|
|
2188
|
-
}, [
|
|
2189
|
-
|
|
2190
|
-
|
|
2187
|
+
}), w && w(Y, G, b), G.length > 0 && D && D(G, b), Y.length > 0 && O && O(Y, b);
|
|
2188
|
+
}, [U, i, ce, s, o, y, w, O, D, X]), q = ee(function(d) {
|
|
2189
|
+
d.preventDefault(), d.persist(), Re(d), h.current = [], je(d) && Promise.resolve(a(d)).then(function(b) {
|
|
2190
|
+
$e(d) && !$ || x(b, d);
|
|
2191
2191
|
}).catch(function(b) {
|
|
2192
|
-
return
|
|
2193
|
-
}),
|
|
2192
|
+
return E(b);
|
|
2193
|
+
}), U({
|
|
2194
2194
|
type: "reset"
|
|
2195
2195
|
});
|
|
2196
|
-
}, [
|
|
2197
|
-
if (
|
|
2198
|
-
|
|
2196
|
+
}, [a, x, E, $]), f = ee(function() {
|
|
2197
|
+
if (T.current) {
|
|
2198
|
+
U({
|
|
2199
2199
|
type: "openDialog"
|
|
2200
|
-
}),
|
|
2201
|
-
var
|
|
2202
|
-
multiple:
|
|
2203
|
-
types:
|
|
2200
|
+
}), pe();
|
|
2201
|
+
var d = {
|
|
2202
|
+
multiple: i,
|
|
2203
|
+
types: fe
|
|
2204
2204
|
};
|
|
2205
|
-
window.showOpenFilePicker(
|
|
2206
|
-
return
|
|
2205
|
+
window.showOpenFilePicker(d).then(function(b) {
|
|
2206
|
+
return a(b);
|
|
2207
2207
|
}).then(function(b) {
|
|
2208
|
-
|
|
2208
|
+
x(b, null), U({
|
|
2209
2209
|
type: "closeDialog"
|
|
2210
2210
|
});
|
|
2211
2211
|
}).catch(function(b) {
|
|
2212
|
-
|
|
2212
|
+
eo(b) ? (le(b), U({
|
|
2213
2213
|
type: "closeDialog"
|
|
2214
|
-
})) :
|
|
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
|
-
}),
|
|
2221
|
-
}, [
|
|
2222
|
-
!
|
|
2223
|
-
}, [
|
|
2224
|
-
|
|
2220
|
+
}), pe(), J.current.value = null, J.current.click());
|
|
2221
|
+
}, [U, pe, le, L, x, E, fe, i]), Z = ee(function(d) {
|
|
2222
|
+
!B.current || !B.current.isEqualNode(d.target) || (d.key === " " || d.key === "Enter" || d.keyCode === 32 || d.keyCode === 13) && (d.preventDefault(), f());
|
|
2223
|
+
}, [B, f]), de = ee(function() {
|
|
2224
|
+
U({
|
|
2225
2225
|
type: "focus"
|
|
2226
2226
|
});
|
|
2227
|
-
}, []), Te =
|
|
2228
|
-
|
|
2227
|
+
}, []), Te = ee(function() {
|
|
2228
|
+
U({
|
|
2229
2229
|
type: "blur"
|
|
2230
2230
|
});
|
|
2231
|
-
}, []), dr =
|
|
2232
|
-
|
|
2233
|
-
}, [
|
|
2234
|
-
return
|
|
2231
|
+
}, []), dr = ee(function() {
|
|
2232
|
+
k || (Jn() ? setTimeout(f, 0) : f());
|
|
2233
|
+
}, [k, f]), ye = function(b) {
|
|
2234
|
+
return n ? null : b;
|
|
2235
2235
|
}, ze = function(b) {
|
|
2236
|
-
return
|
|
2237
|
-
}, Ae = function(b) {
|
|
2238
|
-
return G ? null : ve(b);
|
|
2236
|
+
return p ? null : ye(b);
|
|
2239
2237
|
}, Pe = function(b) {
|
|
2240
|
-
|
|
2241
|
-
},
|
|
2238
|
+
return re ? null : ye(b);
|
|
2239
|
+
}, Re = function(b) {
|
|
2240
|
+
$ && b.stopPropagation();
|
|
2241
|
+
}, it = oe(function() {
|
|
2242
2242
|
return function() {
|
|
2243
|
-
var
|
|
2244
|
-
return
|
|
2245
|
-
onKeyDown: ze(
|
|
2246
|
-
onFocus: ze(
|
|
2247
|
-
onBlur: ze(
|
|
2248
|
-
onClick:
|
|
2249
|
-
onDragEnter:
|
|
2250
|
-
onDragOver:
|
|
2251
|
-
onDragLeave:
|
|
2252
|
-
onDrop:
|
|
2253
|
-
role: typeof
|
|
2254
|
-
},
|
|
2243
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = d.refKey, Y = b === void 0 ? "ref" : b, G = d.role, Q = d.onKeyDown, Se = d.onFocus, ge = d.onBlur, Be = d.onClick, We = d.onDragEnter, Ye = d.onDragOver, Ie = d.onDragLeave, qe = d.onDrop, He = Me(d, oo);
|
|
2244
|
+
return z(z(sr({
|
|
2245
|
+
onKeyDown: ze(ie(Q, Z)),
|
|
2246
|
+
onFocus: ze(ie(Se, de)),
|
|
2247
|
+
onBlur: ze(ie(ge, Te)),
|
|
2248
|
+
onClick: ye(ie(Be, dr)),
|
|
2249
|
+
onDragEnter: Pe(ie(We, C)),
|
|
2250
|
+
onDragOver: Pe(ie(Ye, P)),
|
|
2251
|
+
onDragLeave: Pe(ie(Ie, R)),
|
|
2252
|
+
onDrop: Pe(ie(qe, q)),
|
|
2253
|
+
role: typeof G == "string" && G !== "" ? G : "presentation"
|
|
2254
|
+
}, Y, B), !n && !p ? {
|
|
2255
2255
|
tabIndex: 0
|
|
2256
2256
|
} : {}), He);
|
|
2257
2257
|
};
|
|
2258
|
-
}, [
|
|
2259
|
-
|
|
2260
|
-
}, []),
|
|
2258
|
+
}, [B, Z, de, Te, dr, C, P, R, q, p, re, n]), st = ee(function(d) {
|
|
2259
|
+
d.stopPropagation();
|
|
2260
|
+
}, []), ct = oe(function() {
|
|
2261
2261
|
return function() {
|
|
2262
|
-
var
|
|
2263
|
-
accept:
|
|
2264
|
-
multiple:
|
|
2262
|
+
var d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, b = d.refKey, Y = b === void 0 ? "ref" : b, G = d.onChange, Q = d.onClick, Se = Me(d, ao), ge = sr({
|
|
2263
|
+
accept: ce,
|
|
2264
|
+
multiple: i,
|
|
2265
2265
|
type: "file",
|
|
2266
2266
|
style: {
|
|
2267
2267
|
display: "none"
|
|
2268
2268
|
},
|
|
2269
|
-
onChange:
|
|
2270
|
-
onClick:
|
|
2269
|
+
onChange: ye(ie(G, q)),
|
|
2270
|
+
onClick: ye(ie(Q, st)),
|
|
2271
2271
|
tabIndex: -1
|
|
2272
|
-
},
|
|
2273
|
-
return
|
|
2272
|
+
}, Y, J);
|
|
2273
|
+
return z(z({}, ge), Se);
|
|
2274
2274
|
};
|
|
2275
|
-
}, [
|
|
2276
|
-
return
|
|
2277
|
-
isFocused: c && !
|
|
2278
|
-
getRootProps:
|
|
2279
|
-
getInputProps:
|
|
2280
|
-
rootRef:
|
|
2281
|
-
inputRef:
|
|
2282
|
-
open:
|
|
2275
|
+
}, [J, t, i, q, n]);
|
|
2276
|
+
return z(z({}, ue), {}, {
|
|
2277
|
+
isFocused: c && !n,
|
|
2278
|
+
getRootProps: it,
|
|
2279
|
+
getInputProps: ct,
|
|
2280
|
+
rootRef: B,
|
|
2281
|
+
inputRef: J,
|
|
2282
|
+
open: ye(f)
|
|
2283
2283
|
});
|
|
2284
2284
|
}
|
|
2285
|
-
function
|
|
2285
|
+
function vo(e, r) {
|
|
2286
2286
|
switch (r.type) {
|
|
2287
2287
|
case "focus":
|
|
2288
|
-
return
|
|
2288
|
+
return z(z({}, e), {}, {
|
|
2289
2289
|
isFocused: !0
|
|
2290
2290
|
});
|
|
2291
2291
|
case "blur":
|
|
2292
|
-
return
|
|
2292
|
+
return z(z({}, e), {}, {
|
|
2293
2293
|
isFocused: !1
|
|
2294
2294
|
});
|
|
2295
2295
|
case "openDialog":
|
|
2296
|
-
return
|
|
2296
|
+
return z(z({}, cr), {}, {
|
|
2297
2297
|
isFileDialogActive: !0
|
|
2298
2298
|
});
|
|
2299
2299
|
case "closeDialog":
|
|
2300
|
-
return
|
|
2300
|
+
return z(z({}, e), {}, {
|
|
2301
2301
|
isFileDialogActive: !1
|
|
2302
2302
|
});
|
|
2303
2303
|
case "setDraggedFiles":
|
|
2304
|
-
return
|
|
2304
|
+
return z(z({}, e), {}, {
|
|
2305
2305
|
isDragActive: r.isDragActive,
|
|
2306
2306
|
isDragAccept: r.isDragAccept,
|
|
2307
2307
|
isDragReject: r.isDragReject
|
|
2308
2308
|
});
|
|
2309
2309
|
case "setFiles":
|
|
2310
|
-
return
|
|
2310
|
+
return z(z({}, e), {}, {
|
|
2311
2311
|
acceptedFiles: r.acceptedFiles,
|
|
2312
2312
|
fileRejections: r.fileRejections
|
|
2313
2313
|
});
|
|
2314
2314
|
case "reset":
|
|
2315
|
-
return
|
|
2315
|
+
return z({}, cr);
|
|
2316
2316
|
default:
|
|
2317
2317
|
return e;
|
|
2318
2318
|
}
|
|
2319
2319
|
}
|
|
2320
2320
|
function $r() {
|
|
2321
2321
|
}
|
|
2322
|
-
const
|
|
2322
|
+
const xo = ({
|
|
2323
2323
|
onFileUpload: e
|
|
2324
2324
|
}) => {
|
|
2325
|
-
const { getRootProps: r } =
|
|
2325
|
+
const { getRootProps: r } = at({
|
|
2326
2326
|
onDrop: e
|
|
2327
2327
|
});
|
|
2328
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" }) });
|
|
2329
2329
|
};
|
|
2330
|
-
const
|
|
2330
|
+
const yo = (e) => [...e].sort(
|
|
2331
|
+
(r, t) => r.label.localeCompare(t.label, "en", { numeric: !0 })
|
|
2332
|
+
), go = (e) => e.reduce(
|
|
2333
|
+
(r, t) => {
|
|
2334
|
+
const n = t.group || "Ungrouped";
|
|
2335
|
+
return r[n] = r[n] || [], r[n].push(t), r;
|
|
2336
|
+
},
|
|
2337
|
+
{}
|
|
2338
|
+
), bo = ({
|
|
2331
2339
|
items: e,
|
|
2332
2340
|
selectedItems: r,
|
|
2333
|
-
disabledItems:
|
|
2334
|
-
header:
|
|
2335
|
-
updateItems:
|
|
2341
|
+
disabledItems: t,
|
|
2342
|
+
header: n,
|
|
2343
|
+
updateItems: a,
|
|
2336
2344
|
isOpen: o,
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
type: "button",
|
|
2377
|
-
children: "Clear"
|
|
2378
|
-
}
|
|
2379
|
-
)
|
|
2380
|
-
] })
|
|
2381
|
-
] }) }), Co = ({
|
|
2345
|
+
footer: s,
|
|
2346
|
+
sortFn: i = yo,
|
|
2347
|
+
groupFn: y = go,
|
|
2348
|
+
...l
|
|
2349
|
+
}) => {
|
|
2350
|
+
const v = oe(() => e.some((_) => _.group), [e]), g = oe(() => i(e), [e, i]), w = oe(
|
|
2351
|
+
() => v ? y(g) : { Ungrouped: g },
|
|
2352
|
+
[e, y]
|
|
2353
|
+
), O = oe(
|
|
2354
|
+
() => new Set(r.map((_) => _.value)),
|
|
2355
|
+
[r]
|
|
2356
|
+
), D = oe(
|
|
2357
|
+
() => new Set(t.map((_) => _.value)),
|
|
2358
|
+
[t]
|
|
2359
|
+
);
|
|
2360
|
+
return /* @__PURE__ */ u(Kr, { isVisible: o, className: "put-above", children: /* @__PURE__ */ se("div", { className: "multi-select__dropdown", role: "listbox", ...l, children: [
|
|
2361
|
+
n || null,
|
|
2362
|
+
Object.entries(w).map(([_, M]) => /* @__PURE__ */ se("div", { className: "multi-select__group", children: [
|
|
2363
|
+
v ? /* @__PURE__ */ u("h5", { className: "multi-select__dropdown-header", children: _ }) : null,
|
|
2364
|
+
/* @__PURE__ */ u("ul", { className: "multi-select__dropdown-list", "aria-label": _, children: M.map((L) => {
|
|
2365
|
+
const K = O.has(L.value), j = D.has(L.value);
|
|
2366
|
+
return /* @__PURE__ */ u("li", { className: "multi-select__dropdown-item", children: /* @__PURE__ */ u(
|
|
2367
|
+
Tt,
|
|
2368
|
+
{
|
|
2369
|
+
disabled: j,
|
|
2370
|
+
label: L.label,
|
|
2371
|
+
checked: K,
|
|
2372
|
+
onChange: () => a(
|
|
2373
|
+
K ? r.filter(
|
|
2374
|
+
(k) => k.value !== L.value
|
|
2375
|
+
) : [...r, L]
|
|
2376
|
+
)
|
|
2377
|
+
}
|
|
2378
|
+
) }, L.value);
|
|
2379
|
+
}) })
|
|
2380
|
+
] }, _)),
|
|
2381
|
+
s ? /* @__PURE__ */ u("div", { className: "multi-select__footer", children: s }) : null
|
|
2382
|
+
] }) });
|
|
2383
|
+
}, Do = ({
|
|
2382
2384
|
disabled: e,
|
|
2383
2385
|
selectedItems: r = [],
|
|
2384
|
-
label:
|
|
2385
|
-
onItemsUpdate:
|
|
2386
|
-
placeholder:
|
|
2386
|
+
label: t,
|
|
2387
|
+
onItemsUpdate: n,
|
|
2388
|
+
placeholder: a,
|
|
2387
2389
|
required: o = !1,
|
|
2388
2390
|
items: s = [],
|
|
2389
|
-
disabledItems:
|
|
2390
|
-
|
|
2391
|
+
disabledItems: i = [],
|
|
2392
|
+
dropdownHeader: y,
|
|
2393
|
+
dropdownFooter: l,
|
|
2394
|
+
variant: v = "search"
|
|
2391
2395
|
}) => {
|
|
2392
|
-
const
|
|
2393
|
-
|
|
2396
|
+
const g = St(() => {
|
|
2397
|
+
O(!1), _("");
|
|
2394
2398
|
});
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
),
|
|
2403
|
-
const
|
|
2404
|
-
|
|
2405
|
-
},
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2399
|
+
Ct(() => {
|
|
2400
|
+
O(!1), _("");
|
|
2401
|
+
});
|
|
2402
|
+
const [w, O] = be(!1), [D, _] = be("");
|
|
2403
|
+
Oe(() => {
|
|
2404
|
+
w || _("");
|
|
2405
|
+
}, [w]);
|
|
2406
|
+
const [M, L] = be([]), K = r || M, j = ($) => {
|
|
2407
|
+
const V = Array.from(new Set($));
|
|
2408
|
+
L(V), n && n(V);
|
|
2409
|
+
}, k = rr(), p = rr(), re = K.filter(
|
|
2410
|
+
($) => s.some((V) => V.value === $.value)
|
|
2411
|
+
).map(($) => $.label).join(", ");
|
|
2412
|
+
return /* @__PURE__ */ u("div", { ref: g, children: /* @__PURE__ */ se("div", { className: "multi-select", children: [
|
|
2413
|
+
v === "search" ? /* @__PURE__ */ u(
|
|
2414
|
+
Ot,
|
|
2410
2415
|
{
|
|
2411
|
-
|
|
2412
|
-
"aria-
|
|
2413
|
-
|
|
2416
|
+
externallyControlled: !0,
|
|
2417
|
+
"aria-controls": k,
|
|
2418
|
+
"aria-expanded": w,
|
|
2419
|
+
id: p,
|
|
2414
2420
|
role: "combobox",
|
|
2415
|
-
label:
|
|
2421
|
+
"aria-label": t || a || "Search",
|
|
2416
2422
|
disabled: e,
|
|
2417
2423
|
autoComplete: "off",
|
|
2418
|
-
onChange: (
|
|
2419
|
-
|
|
2420
|
-
|
|
2424
|
+
onChange: ($) => {
|
|
2425
|
+
_($), O(!0);
|
|
2426
|
+
},
|
|
2427
|
+
onFocus: () => O(!0),
|
|
2428
|
+
placeholder: a ?? "Search",
|
|
2421
2429
|
required: o,
|
|
2422
2430
|
type: "text",
|
|
2423
|
-
value:
|
|
2431
|
+
value: D,
|
|
2424
2432
|
className: "multi-select__input"
|
|
2425
2433
|
}
|
|
2434
|
+
) : /* @__PURE__ */ u(
|
|
2435
|
+
"button",
|
|
2436
|
+
{
|
|
2437
|
+
role: "combobox",
|
|
2438
|
+
type: "button",
|
|
2439
|
+
"aria-label": t || a || "Select items",
|
|
2440
|
+
"aria-controls": k,
|
|
2441
|
+
"aria-expanded": w,
|
|
2442
|
+
className: "multi-select__select-button",
|
|
2443
|
+
onFocus: () => O(!0),
|
|
2444
|
+
onClick: () => O(!0),
|
|
2445
|
+
children: K.length > 0 ? re : a ?? "Select items"
|
|
2446
|
+
}
|
|
2426
2447
|
),
|
|
2427
2448
|
/* @__PURE__ */ u(
|
|
2428
|
-
|
|
2449
|
+
bo,
|
|
2429
2450
|
{
|
|
2430
|
-
id:
|
|
2431
|
-
isOpen:
|
|
2432
|
-
items:
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2451
|
+
id: k,
|
|
2452
|
+
isOpen: w,
|
|
2453
|
+
items: D.length > 0 ? s.filter(
|
|
2454
|
+
($) => $.label.toLowerCase().includes(D.toLowerCase())
|
|
2455
|
+
) : s,
|
|
2456
|
+
selectedItems: K,
|
|
2457
|
+
disabledItems: i,
|
|
2458
|
+
header: y,
|
|
2459
|
+
updateItems: j,
|
|
2460
|
+
footer: l || /* @__PURE__ */ se(De, { children: [
|
|
2461
|
+
/* @__PURE__ */ u(
|
|
2462
|
+
_e,
|
|
2463
|
+
{
|
|
2464
|
+
appearance: "link",
|
|
2465
|
+
onClick: () => {
|
|
2466
|
+
const $ = s.filter(
|
|
2467
|
+
(V) => !i.some(
|
|
2468
|
+
(X) => X.value === V.value
|
|
2469
|
+
)
|
|
2470
|
+
);
|
|
2471
|
+
j([...K, ...$]);
|
|
2472
|
+
},
|
|
2473
|
+
type: "button",
|
|
2474
|
+
children: "Select all"
|
|
2475
|
+
}
|
|
2476
|
+
),
|
|
2477
|
+
/* @__PURE__ */ u(
|
|
2478
|
+
_e,
|
|
2479
|
+
{
|
|
2480
|
+
appearance: "link",
|
|
2481
|
+
onClick: () => {
|
|
2482
|
+
const $ = K.filter(
|
|
2483
|
+
(V) => i.some(
|
|
2484
|
+
(X) => X.value === V.value
|
|
2485
|
+
)
|
|
2486
|
+
);
|
|
2487
|
+
j($);
|
|
2488
|
+
},
|
|
2489
|
+
type: "button",
|
|
2490
|
+
children: "Clear"
|
|
2491
|
+
}
|
|
2492
|
+
)
|
|
2493
|
+
] })
|
|
2437
2494
|
}
|
|
2438
2495
|
)
|
|
2439
2496
|
] }) });
|
|
2440
2497
|
};
|
|
2441
2498
|
export {
|
|
2442
2499
|
Le as ContentSection,
|
|
2443
|
-
|
|
2444
|
-
|
|
2500
|
+
To as ExternalLink,
|
|
2501
|
+
xo as FileUpload,
|
|
2445
2502
|
ur as FormSection,
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2503
|
+
Wr as InputGroup,
|
|
2504
|
+
Hr as MainToolbar,
|
|
2505
|
+
At as Meter,
|
|
2506
|
+
Do as MultiSelect,
|
|
2507
|
+
bo as MultiSelectDropdown,
|
|
2508
|
+
H as Navigation,
|
|
2509
|
+
Zt as NavigationBar,
|
|
2510
|
+
So as NestedFormGroup,
|
|
2511
|
+
pn as Pagination,
|
|
2512
|
+
Co as PaginationContainer,
|
|
2513
|
+
Oo as Stepper,
|
|
2514
|
+
wo as defaultFilledColors,
|
|
2515
|
+
ve as meterColor,
|
|
2459
2516
|
he as testIds
|
|
2460
2517
|
};
|