brd-ui-kit 0.1.67 → 0.1.69
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/brd-ui-kit.css +1 -1
- package/dist/components/input-contact/index.d.ts +2 -0
- package/dist/components/{contact-input/contact-input.d.ts → input-contact/input-contact.d.ts} +6 -5
- package/dist/components/input-contact.d.ts +2 -0
- package/dist/components/input-phone/index.d.ts +2 -0
- package/dist/components/input-phone/input-phone.d.ts +9 -0
- package/dist/components/input-phone.d.ts +2 -0
- package/dist/components-avatar-uploader-avatar-uploader.cjs +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.cjs.map +1 -1
- package/dist/components-avatar-uploader-avatar-uploader.js +4 -3
- package/dist/components-avatar-uploader-avatar-uploader.js.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs +1 -1
- package/dist/components-basic-avatar-basic-avatar.cjs.map +1 -1
- package/dist/components-basic-avatar-basic-avatar.js +3 -2
- package/dist/components-basic-avatar-basic-avatar.js.map +1 -1
- package/dist/components-files-uploader-files-uploader.cjs +1 -1
- package/dist/components-files-uploader-files-uploader.js +1 -1
- package/dist/components-input-contact-input-contact.cjs +9 -0
- package/dist/components-input-contact-input-contact.cjs.map +1 -0
- package/dist/{components-contact-input-contact-input.js → components-input-contact-input-contact.js} +94 -55
- package/dist/components-input-contact-input-contact.js.map +1 -0
- package/dist/components-input-contact.cjs +2 -0
- package/dist/components-input-contact.cjs.map +1 -0
- package/dist/components-input-contact.js +5 -0
- package/dist/components-input-contact.js.map +1 -0
- package/dist/components-input-password-input-password.cjs +1 -1
- package/dist/components-input-password-input-password.cjs.map +1 -1
- package/dist/components-input-password-input-password.js +3 -2
- package/dist/components-input-password-input-password.js.map +1 -1
- package/dist/components-input-phone-input-phone.cjs +30 -0
- package/dist/components-input-phone-input-phone.cjs.map +1 -0
- package/dist/components-input-phone-input-phone.js +2853 -0
- package/dist/components-input-phone-input-phone.js.map +1 -0
- package/dist/components-input-phone.cjs +2 -0
- package/dist/components-input-phone.cjs.map +1 -0
- package/dist/components-input-phone.js +5 -0
- package/dist/components-input-phone.js.map +1 -0
- package/dist/constants/contact-input.d.ts +1 -1
- package/dist/{index-B5Id-jNC.js → index-CVlBIwtP.js} +486 -1127
- package/dist/index-CVlBIwtP.js.map +1 -0
- package/dist/index-DJD-8LQA.cjs +6 -0
- package/dist/index-DJD-8LQA.cjs.map +1 -0
- package/dist/index-DgusNo6W.cjs +3 -0
- package/dist/index-DgusNo6W.cjs.map +1 -0
- package/dist/index-Mf4QF1FW.js +647 -0
- package/dist/index-Mf4QF1FW.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +30 -28
- package/dist/index.js.map +1 -1
- package/package.json +20 -10
- package/dist/components/contact-input/index.d.ts +0 -2
- package/dist/components/contact-input.d.ts +0 -2
- package/dist/components-contact-input-contact-input.cjs +0 -7
- package/dist/components-contact-input-contact-input.cjs.map +0 -1
- package/dist/components-contact-input-contact-input.js.map +0 -1
- package/dist/components-contact-input.cjs +0 -2
- package/dist/components-contact-input.cjs.map +0 -1
- package/dist/components-contact-input.js +0 -5
- package/dist/components-contact-input.js.map +0 -1
- package/dist/index-B5Id-jNC.js.map +0 -1
- package/dist/index-D8y9Cogu.cjs +0 -7
- package/dist/index-D8y9Cogu.cjs.map +0 -1
|
@@ -1,675 +1,34 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var a = typeof Symbol == "function" && Symbol.for, i = a ? /* @__PURE__ */ Symbol.for("react.element") : 60103, e = a ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = a ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = a ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, n = a ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, d = a ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = a ? /* @__PURE__ */ Symbol.for("react.context") : 60110, h = a ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, E = a ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, v = a ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, k = a ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, S = a ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, R = a ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, W = a ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, A = a ? /* @__PURE__ */ Symbol.for("react.block") : 60121, $ = a ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, B = a ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, ta = a ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
9
|
-
function I(s) {
|
|
10
|
-
if (typeof s == "object" && s !== null) {
|
|
11
|
-
var J = s.$$typeof;
|
|
12
|
-
switch (J) {
|
|
13
|
-
case i:
|
|
14
|
-
switch (s = s.type, s) {
|
|
15
|
-
case h:
|
|
16
|
-
case E:
|
|
17
|
-
case t:
|
|
18
|
-
case n:
|
|
19
|
-
case o:
|
|
20
|
-
case k:
|
|
21
|
-
return s;
|
|
22
|
-
default:
|
|
23
|
-
switch (s = s && s.$$typeof, s) {
|
|
24
|
-
case l:
|
|
25
|
-
case v:
|
|
26
|
-
case W:
|
|
27
|
-
case R:
|
|
28
|
-
case d:
|
|
29
|
-
return s;
|
|
30
|
-
default:
|
|
31
|
-
return J;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
case e:
|
|
35
|
-
return J;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function q(s) {
|
|
40
|
-
return I(s) === E;
|
|
41
|
-
}
|
|
42
|
-
return O.AsyncMode = h, O.ConcurrentMode = E, O.ContextConsumer = l, O.ContextProvider = d, O.Element = i, O.ForwardRef = v, O.Fragment = t, O.Lazy = W, O.Memo = R, O.Portal = e, O.Profiler = n, O.StrictMode = o, O.Suspense = k, O.isAsyncMode = function(s) {
|
|
43
|
-
return q(s) || I(s) === h;
|
|
44
|
-
}, O.isConcurrentMode = q, O.isContextConsumer = function(s) {
|
|
45
|
-
return I(s) === l;
|
|
46
|
-
}, O.isContextProvider = function(s) {
|
|
47
|
-
return I(s) === d;
|
|
48
|
-
}, O.isElement = function(s) {
|
|
49
|
-
return typeof s == "object" && s !== null && s.$$typeof === i;
|
|
50
|
-
}, O.isForwardRef = function(s) {
|
|
51
|
-
return I(s) === v;
|
|
52
|
-
}, O.isFragment = function(s) {
|
|
53
|
-
return I(s) === t;
|
|
54
|
-
}, O.isLazy = function(s) {
|
|
55
|
-
return I(s) === W;
|
|
56
|
-
}, O.isMemo = function(s) {
|
|
57
|
-
return I(s) === R;
|
|
58
|
-
}, O.isPortal = function(s) {
|
|
59
|
-
return I(s) === e;
|
|
60
|
-
}, O.isProfiler = function(s) {
|
|
61
|
-
return I(s) === n;
|
|
62
|
-
}, O.isStrictMode = function(s) {
|
|
63
|
-
return I(s) === o;
|
|
64
|
-
}, O.isSuspense = function(s) {
|
|
65
|
-
return I(s) === k;
|
|
66
|
-
}, O.isValidElementType = function(s) {
|
|
67
|
-
return typeof s == "string" || typeof s == "function" || s === t || s === E || s === n || s === o || s === k || s === S || typeof s == "object" && s !== null && (s.$$typeof === W || s.$$typeof === R || s.$$typeof === d || s.$$typeof === l || s.$$typeof === v || s.$$typeof === $ || s.$$typeof === B || s.$$typeof === ta || s.$$typeof === A);
|
|
68
|
-
}, O.typeOf = I, O;
|
|
69
|
-
}
|
|
70
|
-
var _ = {};
|
|
71
|
-
var ii;
|
|
72
|
-
function Bi() {
|
|
73
|
-
return ii || (ii = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
74
|
-
var a = typeof Symbol == "function" && Symbol.for, i = a ? /* @__PURE__ */ Symbol.for("react.element") : 60103, e = a ? /* @__PURE__ */ Symbol.for("react.portal") : 60106, t = a ? /* @__PURE__ */ Symbol.for("react.fragment") : 60107, o = a ? /* @__PURE__ */ Symbol.for("react.strict_mode") : 60108, n = a ? /* @__PURE__ */ Symbol.for("react.profiler") : 60114, d = a ? /* @__PURE__ */ Symbol.for("react.provider") : 60109, l = a ? /* @__PURE__ */ Symbol.for("react.context") : 60110, h = a ? /* @__PURE__ */ Symbol.for("react.async_mode") : 60111, E = a ? /* @__PURE__ */ Symbol.for("react.concurrent_mode") : 60111, v = a ? /* @__PURE__ */ Symbol.for("react.forward_ref") : 60112, k = a ? /* @__PURE__ */ Symbol.for("react.suspense") : 60113, S = a ? /* @__PURE__ */ Symbol.for("react.suspense_list") : 60120, R = a ? /* @__PURE__ */ Symbol.for("react.memo") : 60115, W = a ? /* @__PURE__ */ Symbol.for("react.lazy") : 60116, A = a ? /* @__PURE__ */ Symbol.for("react.block") : 60121, $ = a ? /* @__PURE__ */ Symbol.for("react.fundamental") : 60117, B = a ? /* @__PURE__ */ Symbol.for("react.responder") : 60118, ta = a ? /* @__PURE__ */ Symbol.for("react.scope") : 60119;
|
|
75
|
-
function I(r) {
|
|
76
|
-
return typeof r == "string" || typeof r == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
77
|
-
r === t || r === E || r === n || r === o || r === k || r === S || typeof r == "object" && r !== null && (r.$$typeof === W || r.$$typeof === R || r.$$typeof === d || r.$$typeof === l || r.$$typeof === v || r.$$typeof === $ || r.$$typeof === B || r.$$typeof === ta || r.$$typeof === A);
|
|
78
|
-
}
|
|
79
|
-
function q(r) {
|
|
80
|
-
if (typeof r == "object" && r !== null) {
|
|
81
|
-
var K = r.$$typeof;
|
|
82
|
-
switch (K) {
|
|
83
|
-
case i:
|
|
84
|
-
var la = r.type;
|
|
85
|
-
switch (la) {
|
|
86
|
-
case h:
|
|
87
|
-
case E:
|
|
88
|
-
case t:
|
|
89
|
-
case n:
|
|
90
|
-
case o:
|
|
91
|
-
case k:
|
|
92
|
-
return la;
|
|
93
|
-
default:
|
|
94
|
-
var va = la && la.$$typeof;
|
|
95
|
-
switch (va) {
|
|
96
|
-
case l:
|
|
97
|
-
case v:
|
|
98
|
-
case W:
|
|
99
|
-
case R:
|
|
100
|
-
case d:
|
|
101
|
-
return va;
|
|
102
|
-
default:
|
|
103
|
-
return K;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
case e:
|
|
107
|
-
return K;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
var s = h, J = E, V = l, pa = d, aa = i, ia = v, ra = t, ca = W, na = R, C = e, G = n, U = o, X = k, oa = !1;
|
|
112
|
-
function M(r) {
|
|
113
|
-
return oa || (oa = !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.")), p(r) || q(r) === h;
|
|
114
|
-
}
|
|
115
|
-
function p(r) {
|
|
116
|
-
return q(r) === E;
|
|
117
|
-
}
|
|
118
|
-
function m(r) {
|
|
119
|
-
return q(r) === l;
|
|
120
|
-
}
|
|
121
|
-
function g(r) {
|
|
122
|
-
return q(r) === d;
|
|
123
|
-
}
|
|
124
|
-
function w(r) {
|
|
125
|
-
return typeof r == "object" && r !== null && r.$$typeof === i;
|
|
126
|
-
}
|
|
127
|
-
function f(r) {
|
|
128
|
-
return q(r) === v;
|
|
129
|
-
}
|
|
130
|
-
function b(r) {
|
|
131
|
-
return q(r) === t;
|
|
132
|
-
}
|
|
133
|
-
function y(r) {
|
|
134
|
-
return q(r) === W;
|
|
135
|
-
}
|
|
136
|
-
function x(r) {
|
|
137
|
-
return q(r) === R;
|
|
138
|
-
}
|
|
139
|
-
function j(r) {
|
|
140
|
-
return q(r) === e;
|
|
141
|
-
}
|
|
142
|
-
function T(r) {
|
|
143
|
-
return q(r) === n;
|
|
144
|
-
}
|
|
145
|
-
function D(r) {
|
|
146
|
-
return q(r) === o;
|
|
147
|
-
}
|
|
148
|
-
function Y(r) {
|
|
149
|
-
return q(r) === k;
|
|
150
|
-
}
|
|
151
|
-
_.AsyncMode = s, _.ConcurrentMode = J, _.ContextConsumer = V, _.ContextProvider = pa, _.Element = aa, _.ForwardRef = ia, _.Fragment = ra, _.Lazy = ca, _.Memo = na, _.Portal = C, _.Profiler = G, _.StrictMode = U, _.Suspense = X, _.isAsyncMode = M, _.isConcurrentMode = p, _.isContextConsumer = m, _.isContextProvider = g, _.isElement = w, _.isForwardRef = f, _.isFragment = b, _.isLazy = y, _.isMemo = x, _.isPortal = j, _.isProfiler = T, _.isStrictMode = D, _.isSuspense = Y, _.isValidElementType = I, _.typeOf = q;
|
|
152
|
-
})()), _;
|
|
153
|
-
}
|
|
154
|
-
var ei;
|
|
155
|
-
function ji() {
|
|
156
|
-
return ei || (ei = 1, process.env.NODE_ENV === "production" ? ja.exports = Gi() : ja.exports = Bi()), ja.exports;
|
|
157
|
-
}
|
|
158
|
-
var qa, ti;
|
|
159
|
-
function Ui() {
|
|
160
|
-
if (ti) return qa;
|
|
161
|
-
ti = 1;
|
|
162
|
-
var a = Object.getOwnPropertySymbols, i = Object.prototype.hasOwnProperty, e = Object.prototype.propertyIsEnumerable;
|
|
163
|
-
function t(n) {
|
|
164
|
-
if (n == null)
|
|
165
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
166
|
-
return Object(n);
|
|
167
|
-
}
|
|
168
|
-
function o() {
|
|
169
|
-
try {
|
|
170
|
-
if (!Object.assign)
|
|
171
|
-
return !1;
|
|
172
|
-
var n = new String("abc");
|
|
173
|
-
if (n[5] = "de", Object.getOwnPropertyNames(n)[0] === "5")
|
|
174
|
-
return !1;
|
|
175
|
-
for (var d = {}, l = 0; l < 10; l++)
|
|
176
|
-
d["_" + String.fromCharCode(l)] = l;
|
|
177
|
-
var h = Object.getOwnPropertyNames(d).map(function(v) {
|
|
178
|
-
return d[v];
|
|
179
|
-
});
|
|
180
|
-
if (h.join("") !== "0123456789")
|
|
181
|
-
return !1;
|
|
182
|
-
var E = {};
|
|
183
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(v) {
|
|
184
|
-
E[v] = v;
|
|
185
|
-
}), Object.keys(Object.assign({}, E)).join("") === "abcdefghijklmnopqrst";
|
|
186
|
-
} catch {
|
|
187
|
-
return !1;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
return qa = o() ? Object.assign : function(n, d) {
|
|
191
|
-
for (var l, h = t(n), E, v = 1; v < arguments.length; v++) {
|
|
192
|
-
l = Object(arguments[v]);
|
|
193
|
-
for (var k in l)
|
|
194
|
-
i.call(l, k) && (h[k] = l[k]);
|
|
195
|
-
if (a) {
|
|
196
|
-
E = a(l);
|
|
197
|
-
for (var S = 0; S < E.length; S++)
|
|
198
|
-
e.call(l, E[S]) && (h[E[S]] = l[E[S]]);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
return h;
|
|
202
|
-
}, qa;
|
|
203
|
-
}
|
|
204
|
-
var Ma, ni;
|
|
205
|
-
function Ja() {
|
|
206
|
-
if (ni) return Ma;
|
|
207
|
-
ni = 1;
|
|
208
|
-
var a = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
209
|
-
return Ma = a, Ma;
|
|
210
|
-
}
|
|
211
|
-
var $a, oi;
|
|
212
|
-
function Di() {
|
|
213
|
-
return oi || (oi = 1, $a = Function.call.bind(Object.prototype.hasOwnProperty)), $a;
|
|
214
|
-
}
|
|
215
|
-
var La, pi;
|
|
216
|
-
function Ni() {
|
|
217
|
-
if (pi) return La;
|
|
218
|
-
pi = 1;
|
|
219
|
-
var a = function() {
|
|
220
|
-
};
|
|
221
|
-
if (process.env.NODE_ENV !== "production") {
|
|
222
|
-
var i = /* @__PURE__ */ Ja(), e = {}, t = /* @__PURE__ */ Di();
|
|
223
|
-
a = function(n) {
|
|
224
|
-
var d = "Warning: " + n;
|
|
225
|
-
typeof console < "u" && console.error(d);
|
|
226
|
-
try {
|
|
227
|
-
throw new Error(d);
|
|
228
|
-
} catch {
|
|
229
|
-
}
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
function o(n, d, l, h, E) {
|
|
233
|
-
if (process.env.NODE_ENV !== "production") {
|
|
234
|
-
for (var v in n)
|
|
235
|
-
if (t(n, v)) {
|
|
236
|
-
var k;
|
|
237
|
-
try {
|
|
238
|
-
if (typeof n[v] != "function") {
|
|
239
|
-
var S = Error(
|
|
240
|
-
(h || "React class") + ": " + l + " type `" + v + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof n[v] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
241
|
-
);
|
|
242
|
-
throw S.name = "Invariant Violation", S;
|
|
243
|
-
}
|
|
244
|
-
k = n[v](d, v, h, l, null, i);
|
|
245
|
-
} catch (W) {
|
|
246
|
-
k = W;
|
|
247
|
-
}
|
|
248
|
-
if (k && !(k instanceof Error) && a(
|
|
249
|
-
(h || "React class") + ": type specification of " + l + " `" + v + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof k + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
250
|
-
), k instanceof Error && !(k.message in e)) {
|
|
251
|
-
e[k.message] = !0;
|
|
252
|
-
var R = E ? E() : "";
|
|
253
|
-
a(
|
|
254
|
-
"Failed " + l + " type: " + k.message + (R ?? "")
|
|
255
|
-
);
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
return o.resetWarningCache = function() {
|
|
261
|
-
process.env.NODE_ENV !== "production" && (e = {});
|
|
262
|
-
}, La = o, La;
|
|
263
|
-
}
|
|
264
|
-
var Wa, ri;
|
|
265
|
-
function Vi() {
|
|
266
|
-
if (ri) return Wa;
|
|
267
|
-
ri = 1;
|
|
268
|
-
var a = ji(), i = Ui(), e = /* @__PURE__ */ Ja(), t = /* @__PURE__ */ Di(), o = /* @__PURE__ */ Ni(), n = function() {
|
|
269
|
-
};
|
|
270
|
-
process.env.NODE_ENV !== "production" && (n = function(l) {
|
|
271
|
-
var h = "Warning: " + l;
|
|
272
|
-
typeof console < "u" && console.error(h);
|
|
273
|
-
try {
|
|
274
|
-
throw new Error(h);
|
|
275
|
-
} catch {
|
|
276
|
-
}
|
|
277
|
-
});
|
|
278
|
-
function d() {
|
|
279
|
-
return null;
|
|
280
|
-
}
|
|
281
|
-
return Wa = function(l, h) {
|
|
282
|
-
var E = typeof Symbol == "function" && Symbol.iterator, v = "@@iterator";
|
|
283
|
-
function k(p) {
|
|
284
|
-
var m = p && (E && p[E] || p[v]);
|
|
285
|
-
if (typeof m == "function")
|
|
286
|
-
return m;
|
|
287
|
-
}
|
|
288
|
-
var S = "<<anonymous>>", R = {
|
|
289
|
-
array: B("array"),
|
|
290
|
-
bigint: B("bigint"),
|
|
291
|
-
bool: B("boolean"),
|
|
292
|
-
func: B("function"),
|
|
293
|
-
number: B("number"),
|
|
294
|
-
object: B("object"),
|
|
295
|
-
string: B("string"),
|
|
296
|
-
symbol: B("symbol"),
|
|
297
|
-
any: ta(),
|
|
298
|
-
arrayOf: I,
|
|
299
|
-
element: q(),
|
|
300
|
-
elementType: s(),
|
|
301
|
-
instanceOf: J,
|
|
302
|
-
node: ia(),
|
|
303
|
-
objectOf: pa,
|
|
304
|
-
oneOf: V,
|
|
305
|
-
oneOfType: aa,
|
|
306
|
-
shape: ca,
|
|
307
|
-
exact: na
|
|
308
|
-
};
|
|
309
|
-
function W(p, m) {
|
|
310
|
-
return p === m ? p !== 0 || 1 / p === 1 / m : p !== p && m !== m;
|
|
311
|
-
}
|
|
312
|
-
function A(p, m) {
|
|
313
|
-
this.message = p, this.data = m && typeof m == "object" ? m : {}, this.stack = "";
|
|
314
|
-
}
|
|
315
|
-
A.prototype = Error.prototype;
|
|
316
|
-
function $(p) {
|
|
317
|
-
if (process.env.NODE_ENV !== "production")
|
|
318
|
-
var m = {}, g = 0;
|
|
319
|
-
function w(b, y, x, j, T, D, Y) {
|
|
320
|
-
if (j = j || S, D = D || x, Y !== e) {
|
|
321
|
-
if (h) {
|
|
322
|
-
var r = new Error(
|
|
323
|
-
"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"
|
|
324
|
-
);
|
|
325
|
-
throw r.name = "Invariant Violation", r;
|
|
326
|
-
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
327
|
-
var K = j + ":" + x;
|
|
328
|
-
!m[K] && // Avoid spamming the console because they are often not actionable except for lib authors
|
|
329
|
-
g < 3 && (n(
|
|
330
|
-
"You are manually calling a React.PropTypes validation function for the `" + D + "` prop on `" + j + "`. 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."
|
|
331
|
-
), m[K] = !0, g++);
|
|
332
|
-
}
|
|
333
|
-
}
|
|
334
|
-
return y[x] == null ? b ? y[x] === null ? new A("The " + T + " `" + D + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new A("The " + T + " `" + D + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : p(y, x, j, T, D);
|
|
335
|
-
}
|
|
336
|
-
var f = w.bind(null, !1);
|
|
337
|
-
return f.isRequired = w.bind(null, !0), f;
|
|
338
|
-
}
|
|
339
|
-
function B(p) {
|
|
340
|
-
function m(g, w, f, b, y, x) {
|
|
341
|
-
var j = g[w], T = U(j);
|
|
342
|
-
if (T !== p) {
|
|
343
|
-
var D = X(j);
|
|
344
|
-
return new A(
|
|
345
|
-
"Invalid " + b + " `" + y + "` of type " + ("`" + D + "` supplied to `" + f + "`, expected ") + ("`" + p + "`."),
|
|
346
|
-
{ expectedType: p }
|
|
347
|
-
);
|
|
348
|
-
}
|
|
349
|
-
return null;
|
|
350
|
-
}
|
|
351
|
-
return $(m);
|
|
352
|
-
}
|
|
353
|
-
function ta() {
|
|
354
|
-
return $(d);
|
|
355
|
-
}
|
|
356
|
-
function I(p) {
|
|
357
|
-
function m(g, w, f, b, y) {
|
|
358
|
-
if (typeof p != "function")
|
|
359
|
-
return new A("Property `" + y + "` of component `" + f + "` has invalid PropType notation inside arrayOf.");
|
|
360
|
-
var x = g[w];
|
|
361
|
-
if (!Array.isArray(x)) {
|
|
362
|
-
var j = U(x);
|
|
363
|
-
return new A("Invalid " + b + " `" + y + "` of type " + ("`" + j + "` supplied to `" + f + "`, expected an array."));
|
|
364
|
-
}
|
|
365
|
-
for (var T = 0; T < x.length; T++) {
|
|
366
|
-
var D = p(x, T, f, b, y + "[" + T + "]", e);
|
|
367
|
-
if (D instanceof Error)
|
|
368
|
-
return D;
|
|
369
|
-
}
|
|
370
|
-
return null;
|
|
371
|
-
}
|
|
372
|
-
return $(m);
|
|
373
|
-
}
|
|
374
|
-
function q() {
|
|
375
|
-
function p(m, g, w, f, b) {
|
|
376
|
-
var y = m[g];
|
|
377
|
-
if (!l(y)) {
|
|
378
|
-
var x = U(y);
|
|
379
|
-
return new A("Invalid " + f + " `" + b + "` of type " + ("`" + x + "` supplied to `" + w + "`, expected a single ReactElement."));
|
|
380
|
-
}
|
|
381
|
-
return null;
|
|
382
|
-
}
|
|
383
|
-
return $(p);
|
|
384
|
-
}
|
|
385
|
-
function s() {
|
|
386
|
-
function p(m, g, w, f, b) {
|
|
387
|
-
var y = m[g];
|
|
388
|
-
if (!a.isValidElementType(y)) {
|
|
389
|
-
var x = U(y);
|
|
390
|
-
return new A("Invalid " + f + " `" + b + "` of type " + ("`" + x + "` supplied to `" + w + "`, expected a single ReactElement type."));
|
|
391
|
-
}
|
|
392
|
-
return null;
|
|
393
|
-
}
|
|
394
|
-
return $(p);
|
|
395
|
-
}
|
|
396
|
-
function J(p) {
|
|
397
|
-
function m(g, w, f, b, y) {
|
|
398
|
-
if (!(g[w] instanceof p)) {
|
|
399
|
-
var x = p.name || S, j = M(g[w]);
|
|
400
|
-
return new A("Invalid " + b + " `" + y + "` of type " + ("`" + j + "` supplied to `" + f + "`, expected ") + ("instance of `" + x + "`."));
|
|
401
|
-
}
|
|
402
|
-
return null;
|
|
403
|
-
}
|
|
404
|
-
return $(m);
|
|
405
|
-
}
|
|
406
|
-
function V(p) {
|
|
407
|
-
if (!Array.isArray(p))
|
|
408
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? n(
|
|
409
|
-
"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])."
|
|
410
|
-
) : n("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
411
|
-
function m(g, w, f, b, y) {
|
|
412
|
-
for (var x = g[w], j = 0; j < p.length; j++)
|
|
413
|
-
if (W(x, p[j]))
|
|
414
|
-
return null;
|
|
415
|
-
var T = JSON.stringify(p, function(Y, r) {
|
|
416
|
-
var K = X(r);
|
|
417
|
-
return K === "symbol" ? String(r) : r;
|
|
418
|
-
});
|
|
419
|
-
return new A("Invalid " + b + " `" + y + "` of value `" + String(x) + "` " + ("supplied to `" + f + "`, expected one of " + T + "."));
|
|
420
|
-
}
|
|
421
|
-
return $(m);
|
|
422
|
-
}
|
|
423
|
-
function pa(p) {
|
|
424
|
-
function m(g, w, f, b, y) {
|
|
425
|
-
if (typeof p != "function")
|
|
426
|
-
return new A("Property `" + y + "` of component `" + f + "` has invalid PropType notation inside objectOf.");
|
|
427
|
-
var x = g[w], j = U(x);
|
|
428
|
-
if (j !== "object")
|
|
429
|
-
return new A("Invalid " + b + " `" + y + "` of type " + ("`" + j + "` supplied to `" + f + "`, expected an object."));
|
|
430
|
-
for (var T in x)
|
|
431
|
-
if (t(x, T)) {
|
|
432
|
-
var D = p(x, T, f, b, y + "." + T, e);
|
|
433
|
-
if (D instanceof Error)
|
|
434
|
-
return D;
|
|
435
|
-
}
|
|
436
|
-
return null;
|
|
437
|
-
}
|
|
438
|
-
return $(m);
|
|
439
|
-
}
|
|
440
|
-
function aa(p) {
|
|
441
|
-
if (!Array.isArray(p))
|
|
442
|
-
return process.env.NODE_ENV !== "production" && n("Invalid argument supplied to oneOfType, expected an instance of array."), d;
|
|
443
|
-
for (var m = 0; m < p.length; m++) {
|
|
444
|
-
var g = p[m];
|
|
445
|
-
if (typeof g != "function")
|
|
446
|
-
return n(
|
|
447
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + oa(g) + " at index " + m + "."
|
|
448
|
-
), d;
|
|
449
|
-
}
|
|
450
|
-
function w(f, b, y, x, j) {
|
|
451
|
-
for (var T = [], D = 0; D < p.length; D++) {
|
|
452
|
-
var Y = p[D], r = Y(f, b, y, x, j, e);
|
|
453
|
-
if (r == null)
|
|
454
|
-
return null;
|
|
455
|
-
r.data && t(r.data, "expectedType") && T.push(r.data.expectedType);
|
|
456
|
-
}
|
|
457
|
-
var K = T.length > 0 ? ", expected one of type [" + T.join(", ") + "]" : "";
|
|
458
|
-
return new A("Invalid " + x + " `" + j + "` supplied to " + ("`" + y + "`" + K + "."));
|
|
459
|
-
}
|
|
460
|
-
return $(w);
|
|
461
|
-
}
|
|
462
|
-
function ia() {
|
|
463
|
-
function p(m, g, w, f, b) {
|
|
464
|
-
return C(m[g]) ? null : new A("Invalid " + f + " `" + b + "` supplied to " + ("`" + w + "`, expected a ReactNode."));
|
|
465
|
-
}
|
|
466
|
-
return $(p);
|
|
467
|
-
}
|
|
468
|
-
function ra(p, m, g, w, f) {
|
|
469
|
-
return new A(
|
|
470
|
-
(p || "React class") + ": " + m + " type `" + g + "." + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + f + "`."
|
|
471
|
-
);
|
|
472
|
-
}
|
|
473
|
-
function ca(p) {
|
|
474
|
-
function m(g, w, f, b, y) {
|
|
475
|
-
var x = g[w], j = U(x);
|
|
476
|
-
if (j !== "object")
|
|
477
|
-
return new A("Invalid " + b + " `" + y + "` of type `" + j + "` " + ("supplied to `" + f + "`, expected `object`."));
|
|
478
|
-
for (var T in p) {
|
|
479
|
-
var D = p[T];
|
|
480
|
-
if (typeof D != "function")
|
|
481
|
-
return ra(f, b, y, T, X(D));
|
|
482
|
-
var Y = D(x, T, f, b, y + "." + T, e);
|
|
483
|
-
if (Y)
|
|
484
|
-
return Y;
|
|
485
|
-
}
|
|
486
|
-
return null;
|
|
487
|
-
}
|
|
488
|
-
return $(m);
|
|
489
|
-
}
|
|
490
|
-
function na(p) {
|
|
491
|
-
function m(g, w, f, b, y) {
|
|
492
|
-
var x = g[w], j = U(x);
|
|
493
|
-
if (j !== "object")
|
|
494
|
-
return new A("Invalid " + b + " `" + y + "` of type `" + j + "` " + ("supplied to `" + f + "`, expected `object`."));
|
|
495
|
-
var T = i({}, g[w], p);
|
|
496
|
-
for (var D in T) {
|
|
497
|
-
var Y = p[D];
|
|
498
|
-
if (t(p, D) && typeof Y != "function")
|
|
499
|
-
return ra(f, b, y, D, X(Y));
|
|
500
|
-
if (!Y)
|
|
501
|
-
return new A(
|
|
502
|
-
"Invalid " + b + " `" + y + "` key `" + D + "` supplied to `" + f + "`.\nBad object: " + JSON.stringify(g[w], null, " ") + `
|
|
503
|
-
Valid keys: ` + JSON.stringify(Object.keys(p), null, " ")
|
|
504
|
-
);
|
|
505
|
-
var r = Y(x, D, f, b, y + "." + D, e);
|
|
506
|
-
if (r)
|
|
507
|
-
return r;
|
|
508
|
-
}
|
|
509
|
-
return null;
|
|
510
|
-
}
|
|
511
|
-
return $(m);
|
|
512
|
-
}
|
|
513
|
-
function C(p) {
|
|
514
|
-
switch (typeof p) {
|
|
515
|
-
case "number":
|
|
516
|
-
case "string":
|
|
517
|
-
case "undefined":
|
|
518
|
-
return !0;
|
|
519
|
-
case "boolean":
|
|
520
|
-
return !p;
|
|
521
|
-
case "object":
|
|
522
|
-
if (Array.isArray(p))
|
|
523
|
-
return p.every(C);
|
|
524
|
-
if (p === null || l(p))
|
|
525
|
-
return !0;
|
|
526
|
-
var m = k(p);
|
|
527
|
-
if (m) {
|
|
528
|
-
var g = m.call(p), w;
|
|
529
|
-
if (m !== p.entries) {
|
|
530
|
-
for (; !(w = g.next()).done; )
|
|
531
|
-
if (!C(w.value))
|
|
532
|
-
return !1;
|
|
533
|
-
} else
|
|
534
|
-
for (; !(w = g.next()).done; ) {
|
|
535
|
-
var f = w.value;
|
|
536
|
-
if (f && !C(f[1]))
|
|
537
|
-
return !1;
|
|
538
|
-
}
|
|
539
|
-
} else
|
|
540
|
-
return !1;
|
|
541
|
-
return !0;
|
|
542
|
-
default:
|
|
543
|
-
return !1;
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
function G(p, m) {
|
|
547
|
-
return p === "symbol" ? !0 : m ? m["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && m instanceof Symbol : !1;
|
|
548
|
-
}
|
|
549
|
-
function U(p) {
|
|
550
|
-
var m = typeof p;
|
|
551
|
-
return Array.isArray(p) ? "array" : p instanceof RegExp ? "object" : G(m, p) ? "symbol" : m;
|
|
552
|
-
}
|
|
553
|
-
function X(p) {
|
|
554
|
-
if (typeof p > "u" || p === null)
|
|
555
|
-
return "" + p;
|
|
556
|
-
var m = U(p);
|
|
557
|
-
if (m === "object") {
|
|
558
|
-
if (p instanceof Date)
|
|
559
|
-
return "date";
|
|
560
|
-
if (p instanceof RegExp)
|
|
561
|
-
return "regexp";
|
|
562
|
-
}
|
|
563
|
-
return m;
|
|
564
|
-
}
|
|
565
|
-
function oa(p) {
|
|
566
|
-
var m = X(p);
|
|
567
|
-
switch (m) {
|
|
568
|
-
case "array":
|
|
569
|
-
case "object":
|
|
570
|
-
return "an " + m;
|
|
571
|
-
case "boolean":
|
|
572
|
-
case "date":
|
|
573
|
-
case "regexp":
|
|
574
|
-
return "a " + m;
|
|
575
|
-
default:
|
|
576
|
-
return m;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
function M(p) {
|
|
580
|
-
return !p.constructor || !p.constructor.name ? S : p.constructor.name;
|
|
581
|
-
}
|
|
582
|
-
return R.checkPropTypes = o, R.resetWarningCache = o.resetWarningCache, R.PropTypes = R, R;
|
|
583
|
-
}, Wa;
|
|
584
|
-
}
|
|
585
|
-
var Ya, ci;
|
|
586
|
-
function Ji() {
|
|
587
|
-
if (ci) return Ya;
|
|
588
|
-
ci = 1;
|
|
589
|
-
var a = /* @__PURE__ */ Ja();
|
|
590
|
-
function i() {
|
|
591
|
-
}
|
|
592
|
-
function e() {
|
|
593
|
-
}
|
|
594
|
-
return e.resetWarningCache = i, Ya = function() {
|
|
595
|
-
function t(d, l, h, E, v, k) {
|
|
596
|
-
if (k !== a) {
|
|
597
|
-
var S = new Error(
|
|
598
|
-
"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"
|
|
599
|
-
);
|
|
600
|
-
throw S.name = "Invariant Violation", S;
|
|
601
|
-
}
|
|
602
|
-
}
|
|
603
|
-
t.isRequired = t;
|
|
604
|
-
function o() {
|
|
605
|
-
return t;
|
|
606
|
-
}
|
|
607
|
-
var n = {
|
|
608
|
-
array: t,
|
|
609
|
-
bigint: t,
|
|
610
|
-
bool: t,
|
|
611
|
-
func: t,
|
|
612
|
-
number: t,
|
|
613
|
-
object: t,
|
|
614
|
-
string: t,
|
|
615
|
-
symbol: t,
|
|
616
|
-
any: t,
|
|
617
|
-
arrayOf: o,
|
|
618
|
-
element: t,
|
|
619
|
-
elementType: t,
|
|
620
|
-
instanceOf: o,
|
|
621
|
-
node: t,
|
|
622
|
-
objectOf: o,
|
|
623
|
-
oneOf: o,
|
|
624
|
-
oneOfType: o,
|
|
625
|
-
shape: o,
|
|
626
|
-
exact: o,
|
|
627
|
-
checkPropTypes: e,
|
|
628
|
-
resetWarningCache: i
|
|
629
|
-
};
|
|
630
|
-
return n.PropTypes = n, n;
|
|
631
|
-
}, Ya;
|
|
632
|
-
}
|
|
633
|
-
var li;
|
|
634
|
-
function Xi() {
|
|
635
|
-
if (li) return Ea.exports;
|
|
636
|
-
if (li = 1, process.env.NODE_ENV !== "production") {
|
|
637
|
-
var a = ji(), i = !0;
|
|
638
|
-
Ea.exports = /* @__PURE__ */ Vi()(a.isElement, i);
|
|
639
|
-
} else
|
|
640
|
-
Ea.exports = /* @__PURE__ */ Ji()();
|
|
641
|
-
return Ea.exports;
|
|
642
|
-
}
|
|
643
|
-
var Zi = /* @__PURE__ */ Xi();
|
|
644
|
-
const P = /* @__PURE__ */ Ei(Zi);
|
|
645
|
-
function da(a, i, e, t) {
|
|
646
|
-
function o(n) {
|
|
647
|
-
return n instanceof e ? n : new e(function(d) {
|
|
648
|
-
d(n);
|
|
1
|
+
import xi, { useMemo as T, useRef as G, useReducer as gi, useEffect as X, useCallback as y, forwardRef as bi, useImperativeHandle as hi, Fragment as yi } from "react";
|
|
2
|
+
import { P as s } from "./index-Mf4QF1FW.js";
|
|
3
|
+
import { g as wi } from "./_commonjsHelpers-DaMA6jEr.js";
|
|
4
|
+
function _(a, i, t, n) {
|
|
5
|
+
function p(o) {
|
|
6
|
+
return o instanceof t ? o : new t(function(l) {
|
|
7
|
+
l(o);
|
|
649
8
|
});
|
|
650
9
|
}
|
|
651
|
-
return new (
|
|
652
|
-
function
|
|
10
|
+
return new (t || (t = Promise))(function(o, l) {
|
|
11
|
+
function r(b) {
|
|
653
12
|
try {
|
|
654
|
-
|
|
655
|
-
} catch (
|
|
656
|
-
|
|
13
|
+
j(n.next(b));
|
|
14
|
+
} catch (D) {
|
|
15
|
+
l(D);
|
|
657
16
|
}
|
|
658
17
|
}
|
|
659
|
-
function
|
|
18
|
+
function g(b) {
|
|
660
19
|
try {
|
|
661
|
-
|
|
662
|
-
} catch (
|
|
663
|
-
|
|
20
|
+
j(n.throw(b));
|
|
21
|
+
} catch (D) {
|
|
22
|
+
l(D);
|
|
664
23
|
}
|
|
665
24
|
}
|
|
666
|
-
function
|
|
667
|
-
|
|
25
|
+
function j(b) {
|
|
26
|
+
b.done ? o(b.value) : p(b.value).then(r, g);
|
|
668
27
|
}
|
|
669
|
-
|
|
28
|
+
j((n = n.apply(a, i || [])).next());
|
|
670
29
|
});
|
|
671
30
|
}
|
|
672
|
-
const
|
|
31
|
+
const ki = /* @__PURE__ */ new Map([
|
|
673
32
|
// https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
|
|
674
33
|
["1km", "application/vnd.1000minds.decision-model+xml"],
|
|
675
34
|
["3dml", "text/vnd.in3d.3dml"],
|
|
@@ -1872,16 +1231,16 @@ const Qi = /* @__PURE__ */ new Map([
|
|
|
1872
1231
|
["zmm", "application/vnd.handheld-entertainment+xml"],
|
|
1873
1232
|
["zsh", "text/x-scriptzsh"]
|
|
1874
1233
|
]);
|
|
1875
|
-
function
|
|
1876
|
-
const
|
|
1877
|
-
return typeof
|
|
1234
|
+
function C(a, i, t) {
|
|
1235
|
+
const n = ji(a), { webkitRelativePath: p } = a, o = typeof i == "string" ? i : typeof p == "string" && p.length > 0 ? p : `./${a.name}`;
|
|
1236
|
+
return typeof n.path != "string" && Ka(n, "path", o), Ka(n, "relativePath", o), n;
|
|
1878
1237
|
}
|
|
1879
|
-
function
|
|
1238
|
+
function ji(a) {
|
|
1880
1239
|
const { name: i } = a;
|
|
1881
1240
|
if (i && i.lastIndexOf(".") !== -1 && !a.type) {
|
|
1882
|
-
const
|
|
1883
|
-
|
|
1884
|
-
value:
|
|
1241
|
+
const n = i.split(".").pop().toLowerCase(), p = ki.get(n);
|
|
1242
|
+
p && Object.defineProperty(a, "type", {
|
|
1243
|
+
value: p,
|
|
1885
1244
|
writable: !1,
|
|
1886
1245
|
configurable: !1,
|
|
1887
1246
|
enumerable: !0
|
|
@@ -1889,327 +1248,327 @@ function ae(a) {
|
|
|
1889
1248
|
}
|
|
1890
1249
|
return a;
|
|
1891
1250
|
}
|
|
1892
|
-
function
|
|
1251
|
+
function Ka(a, i, t) {
|
|
1893
1252
|
Object.defineProperty(a, i, {
|
|
1894
|
-
value:
|
|
1253
|
+
value: t,
|
|
1895
1254
|
writable: !1,
|
|
1896
1255
|
configurable: !1,
|
|
1897
1256
|
enumerable: !0
|
|
1898
1257
|
});
|
|
1899
1258
|
}
|
|
1900
|
-
const
|
|
1259
|
+
const Di = [
|
|
1901
1260
|
// Thumbnail cache files for macOS and Windows
|
|
1902
1261
|
".DS_Store",
|
|
1903
1262
|
// macOs
|
|
1904
1263
|
"Thumbs.db"
|
|
1905
1264
|
// Windows
|
|
1906
1265
|
];
|
|
1907
|
-
function
|
|
1908
|
-
return
|
|
1909
|
-
return
|
|
1266
|
+
function zi(a) {
|
|
1267
|
+
return _(this, void 0, void 0, function* () {
|
|
1268
|
+
return aa(a) && Ei(a.dataTransfer) ? _i(a.dataTransfer, a.type) : Ai(a) ? Oi(a) : Array.isArray(a) && a.every((i) => "getFile" in i && typeof i.getFile == "function") ? Fi(a) : [];
|
|
1910
1269
|
});
|
|
1911
1270
|
}
|
|
1912
|
-
function
|
|
1913
|
-
return
|
|
1271
|
+
function Ei(a) {
|
|
1272
|
+
return aa(a);
|
|
1914
1273
|
}
|
|
1915
|
-
function
|
|
1916
|
-
return
|
|
1274
|
+
function Ai(a) {
|
|
1275
|
+
return aa(a) && aa(a.target);
|
|
1917
1276
|
}
|
|
1918
|
-
function
|
|
1277
|
+
function aa(a) {
|
|
1919
1278
|
return typeof a == "object" && a !== null;
|
|
1920
1279
|
}
|
|
1921
|
-
function
|
|
1922
|
-
return
|
|
1280
|
+
function Oi(a) {
|
|
1281
|
+
return ha(a.target.files).map((i) => C(i));
|
|
1923
1282
|
}
|
|
1924
|
-
function
|
|
1925
|
-
return
|
|
1926
|
-
return (yield Promise.all(a.map((
|
|
1283
|
+
function Fi(a) {
|
|
1284
|
+
return _(this, void 0, void 0, function* () {
|
|
1285
|
+
return (yield Promise.all(a.map((t) => t.getFile()))).map((t) => C(t));
|
|
1927
1286
|
});
|
|
1928
1287
|
}
|
|
1929
|
-
function
|
|
1930
|
-
return
|
|
1288
|
+
function _i(a, i) {
|
|
1289
|
+
return _(this, void 0, void 0, function* () {
|
|
1931
1290
|
if (a.items) {
|
|
1932
|
-
const
|
|
1291
|
+
const t = ha(a.items).filter((p) => p.kind === "file");
|
|
1933
1292
|
if (i !== "drop")
|
|
1934
|
-
return
|
|
1935
|
-
const
|
|
1936
|
-
return
|
|
1293
|
+
return t;
|
|
1294
|
+
const n = yield Promise.all(t.map(Pi));
|
|
1295
|
+
return Ga(ai(n));
|
|
1937
1296
|
}
|
|
1938
|
-
return
|
|
1297
|
+
return Ga(ha(a.files).map((t) => C(t)));
|
|
1939
1298
|
});
|
|
1940
1299
|
}
|
|
1941
|
-
function di(a) {
|
|
1942
|
-
return a.filter((i) => ie.indexOf(i.name) === -1);
|
|
1943
|
-
}
|
|
1944
1300
|
function Ga(a) {
|
|
1301
|
+
return a.filter((i) => Di.indexOf(i.name) === -1);
|
|
1302
|
+
}
|
|
1303
|
+
function ha(a) {
|
|
1945
1304
|
if (a === null)
|
|
1946
1305
|
return [];
|
|
1947
1306
|
const i = [];
|
|
1948
|
-
for (let
|
|
1949
|
-
const
|
|
1950
|
-
i.push(
|
|
1307
|
+
for (let t = 0; t < a.length; t++) {
|
|
1308
|
+
const n = a[t];
|
|
1309
|
+
i.push(n);
|
|
1951
1310
|
}
|
|
1952
1311
|
return i;
|
|
1953
1312
|
}
|
|
1954
|
-
function
|
|
1313
|
+
function Pi(a) {
|
|
1955
1314
|
if (typeof a.webkitGetAsEntry != "function")
|
|
1956
|
-
return
|
|
1315
|
+
return Ha(a);
|
|
1957
1316
|
const i = a.webkitGetAsEntry();
|
|
1958
|
-
return i && i.isDirectory ?
|
|
1317
|
+
return i && i.isDirectory ? ii(i) : Ha(a, i);
|
|
1959
1318
|
}
|
|
1960
|
-
function
|
|
1961
|
-
return a.reduce((i,
|
|
1319
|
+
function ai(a) {
|
|
1320
|
+
return a.reduce((i, t) => [
|
|
1962
1321
|
...i,
|
|
1963
|
-
...Array.isArray(
|
|
1322
|
+
...Array.isArray(t) ? ai(t) : [t]
|
|
1964
1323
|
], []);
|
|
1965
1324
|
}
|
|
1966
|
-
function
|
|
1967
|
-
return
|
|
1968
|
-
var
|
|
1325
|
+
function Ha(a, i) {
|
|
1326
|
+
return _(this, void 0, void 0, function* () {
|
|
1327
|
+
var t;
|
|
1969
1328
|
if (globalThis.isSecureContext && typeof a.getAsFileSystemHandle == "function") {
|
|
1970
|
-
const
|
|
1971
|
-
if (
|
|
1329
|
+
const o = yield a.getAsFileSystemHandle();
|
|
1330
|
+
if (o === null)
|
|
1972
1331
|
throw new Error(`${a} is not a File`);
|
|
1973
|
-
if (
|
|
1974
|
-
const
|
|
1975
|
-
return
|
|
1332
|
+
if (o !== void 0) {
|
|
1333
|
+
const l = yield o.getFile();
|
|
1334
|
+
return l.handle = o, C(l);
|
|
1976
1335
|
}
|
|
1977
1336
|
}
|
|
1978
|
-
const
|
|
1979
|
-
if (!
|
|
1337
|
+
const n = a.getAsFile();
|
|
1338
|
+
if (!n)
|
|
1980
1339
|
throw new Error(`${a} is not a File`);
|
|
1981
|
-
return
|
|
1340
|
+
return C(n, (t = i?.fullPath) !== null && t !== void 0 ? t : void 0);
|
|
1982
1341
|
});
|
|
1983
1342
|
}
|
|
1984
|
-
function
|
|
1985
|
-
return
|
|
1986
|
-
return a.isDirectory ?
|
|
1343
|
+
function Si(a) {
|
|
1344
|
+
return _(this, void 0, void 0, function* () {
|
|
1345
|
+
return a.isDirectory ? ii(a) : qi(a);
|
|
1987
1346
|
});
|
|
1988
1347
|
}
|
|
1989
|
-
function
|
|
1348
|
+
function ii(a) {
|
|
1990
1349
|
const i = a.createReader();
|
|
1991
|
-
return new Promise((
|
|
1992
|
-
const
|
|
1993
|
-
function
|
|
1994
|
-
i.readEntries((
|
|
1995
|
-
if (
|
|
1996
|
-
const
|
|
1997
|
-
|
|
1350
|
+
return new Promise((t, n) => {
|
|
1351
|
+
const p = [];
|
|
1352
|
+
function o() {
|
|
1353
|
+
i.readEntries((l) => _(this, void 0, void 0, function* () {
|
|
1354
|
+
if (l.length) {
|
|
1355
|
+
const r = Promise.all(l.map(Si));
|
|
1356
|
+
p.push(r), o();
|
|
1998
1357
|
} else
|
|
1999
1358
|
try {
|
|
2000
|
-
const
|
|
2001
|
-
|
|
2002
|
-
} catch (
|
|
2003
|
-
|
|
1359
|
+
const r = yield Promise.all(p);
|
|
1360
|
+
t(r);
|
|
1361
|
+
} catch (r) {
|
|
1362
|
+
n(r);
|
|
2004
1363
|
}
|
|
2005
|
-
}), (
|
|
2006
|
-
|
|
1364
|
+
}), (l) => {
|
|
1365
|
+
n(l);
|
|
2007
1366
|
});
|
|
2008
1367
|
}
|
|
2009
|
-
|
|
1368
|
+
o();
|
|
2010
1369
|
});
|
|
2011
1370
|
}
|
|
2012
|
-
function
|
|
2013
|
-
return
|
|
2014
|
-
return new Promise((i,
|
|
2015
|
-
a.file((
|
|
2016
|
-
const
|
|
2017
|
-
i(
|
|
2018
|
-
}, (
|
|
2019
|
-
|
|
1371
|
+
function qi(a) {
|
|
1372
|
+
return _(this, void 0, void 0, function* () {
|
|
1373
|
+
return new Promise((i, t) => {
|
|
1374
|
+
a.file((n) => {
|
|
1375
|
+
const p = C(n, a.fullPath);
|
|
1376
|
+
i(p);
|
|
1377
|
+
}, (n) => {
|
|
1378
|
+
t(n);
|
|
2020
1379
|
});
|
|
2021
1380
|
});
|
|
2022
1381
|
});
|
|
2023
1382
|
}
|
|
2024
|
-
var
|
|
2025
|
-
function
|
|
2026
|
-
return
|
|
1383
|
+
var Z = {}, Wa;
|
|
1384
|
+
function Ti() {
|
|
1385
|
+
return Wa || (Wa = 1, Z.__esModule = !0, Z.default = function(a, i) {
|
|
2027
1386
|
if (a && i) {
|
|
2028
|
-
var
|
|
2029
|
-
if (
|
|
1387
|
+
var t = Array.isArray(i) ? i : i.split(",");
|
|
1388
|
+
if (t.length === 0)
|
|
2030
1389
|
return !0;
|
|
2031
|
-
var
|
|
2032
|
-
return
|
|
2033
|
-
var
|
|
2034
|
-
return
|
|
1390
|
+
var n = a.name || "", p = (a.type || "").toLowerCase(), o = p.replace(/\/.*$/, "");
|
|
1391
|
+
return t.some(function(l) {
|
|
1392
|
+
var r = l.trim().toLowerCase();
|
|
1393
|
+
return r.charAt(0) === "." ? n.toLowerCase().endsWith(r) : r.endsWith("/*") ? o === r.replace(/\/.*$/, "") : p === r;
|
|
2035
1394
|
});
|
|
2036
1395
|
}
|
|
2037
1396
|
return !0;
|
|
2038
|
-
}),
|
|
1397
|
+
}), Z;
|
|
2039
1398
|
}
|
|
2040
|
-
var
|
|
2041
|
-
const
|
|
2042
|
-
function
|
|
2043
|
-
return
|
|
1399
|
+
var Ci = Ti();
|
|
1400
|
+
const ga = /* @__PURE__ */ wi(Ci);
|
|
1401
|
+
function Ba(a) {
|
|
1402
|
+
return Li(a) || Ri(a) || ni(a) || Ii();
|
|
2044
1403
|
}
|
|
2045
|
-
function
|
|
1404
|
+
function Ii() {
|
|
2046
1405
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2047
1406
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2048
1407
|
}
|
|
2049
|
-
function
|
|
1408
|
+
function Ri(a) {
|
|
2050
1409
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
2051
1410
|
}
|
|
2052
|
-
function
|
|
2053
|
-
if (Array.isArray(a)) return
|
|
1411
|
+
function Li(a) {
|
|
1412
|
+
if (Array.isArray(a)) return ya(a);
|
|
2054
1413
|
}
|
|
2055
|
-
function
|
|
2056
|
-
var
|
|
1414
|
+
function Na(a, i) {
|
|
1415
|
+
var t = Object.keys(a);
|
|
2057
1416
|
if (Object.getOwnPropertySymbols) {
|
|
2058
|
-
var
|
|
2059
|
-
i && (
|
|
2060
|
-
return Object.getOwnPropertyDescriptor(a,
|
|
2061
|
-
})),
|
|
1417
|
+
var n = Object.getOwnPropertySymbols(a);
|
|
1418
|
+
i && (n = n.filter(function(p) {
|
|
1419
|
+
return Object.getOwnPropertyDescriptor(a, p).enumerable;
|
|
1420
|
+
})), t.push.apply(t, n);
|
|
2062
1421
|
}
|
|
2063
|
-
return
|
|
1422
|
+
return t;
|
|
2064
1423
|
}
|
|
2065
|
-
function
|
|
1424
|
+
function Ua(a) {
|
|
2066
1425
|
for (var i = 1; i < arguments.length; i++) {
|
|
2067
|
-
var
|
|
2068
|
-
i % 2 ?
|
|
2069
|
-
|
|
2070
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(
|
|
2071
|
-
Object.defineProperty(a,
|
|
1426
|
+
var t = arguments[i] != null ? arguments[i] : {};
|
|
1427
|
+
i % 2 ? Na(Object(t), !0).forEach(function(n) {
|
|
1428
|
+
ti(a, n, t[n]);
|
|
1429
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Na(Object(t)).forEach(function(n) {
|
|
1430
|
+
Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2072
1431
|
});
|
|
2073
1432
|
}
|
|
2074
1433
|
return a;
|
|
2075
1434
|
}
|
|
2076
|
-
function
|
|
2077
|
-
return i in a ? Object.defineProperty(a, i, { value:
|
|
1435
|
+
function ti(a, i, t) {
|
|
1436
|
+
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
2078
1437
|
}
|
|
2079
|
-
function
|
|
2080
|
-
return
|
|
1438
|
+
function W(a, i) {
|
|
1439
|
+
return Ki(a) || $i(a, i) || ni(a, i) || Mi();
|
|
2081
1440
|
}
|
|
2082
|
-
function
|
|
1441
|
+
function Mi() {
|
|
2083
1442
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2084
1443
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2085
1444
|
}
|
|
2086
|
-
function
|
|
1445
|
+
function ni(a, i) {
|
|
2087
1446
|
if (a) {
|
|
2088
|
-
if (typeof a == "string") return
|
|
2089
|
-
var
|
|
2090
|
-
if (
|
|
2091
|
-
if (
|
|
1447
|
+
if (typeof a == "string") return ya(a, i);
|
|
1448
|
+
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
1449
|
+
if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
|
|
1450
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return ya(a, i);
|
|
2092
1451
|
}
|
|
2093
1452
|
}
|
|
2094
|
-
function
|
|
1453
|
+
function ya(a, i) {
|
|
2095
1454
|
(i == null || i > a.length) && (i = a.length);
|
|
2096
|
-
for (var
|
|
2097
|
-
t
|
|
2098
|
-
return
|
|
2099
|
-
}
|
|
2100
|
-
function
|
|
2101
|
-
var
|
|
2102
|
-
if (
|
|
2103
|
-
var
|
|
1455
|
+
for (var t = 0, n = new Array(i); t < i; t++)
|
|
1456
|
+
n[t] = a[t];
|
|
1457
|
+
return n;
|
|
1458
|
+
}
|
|
1459
|
+
function $i(a, i) {
|
|
1460
|
+
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1461
|
+
if (t != null) {
|
|
1462
|
+
var n = [], p = !0, o = !1, l, r;
|
|
2104
1463
|
try {
|
|
2105
|
-
for (
|
|
1464
|
+
for (t = t.call(a); !(p = (l = t.next()).done) && (n.push(l.value), !(i && n.length === i)); p = !0)
|
|
2106
1465
|
;
|
|
2107
|
-
} catch (
|
|
2108
|
-
|
|
1466
|
+
} catch (g) {
|
|
1467
|
+
o = !0, r = g;
|
|
2109
1468
|
} finally {
|
|
2110
1469
|
try {
|
|
2111
|
-
!
|
|
1470
|
+
!p && t.return != null && t.return();
|
|
2112
1471
|
} finally {
|
|
2113
|
-
if (
|
|
1472
|
+
if (o) throw r;
|
|
2114
1473
|
}
|
|
2115
1474
|
}
|
|
2116
|
-
return
|
|
1475
|
+
return n;
|
|
2117
1476
|
}
|
|
2118
1477
|
}
|
|
2119
|
-
function
|
|
1478
|
+
function Ki(a) {
|
|
2120
1479
|
if (Array.isArray(a)) return a;
|
|
2121
1480
|
}
|
|
2122
|
-
var
|
|
2123
|
-
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "",
|
|
1481
|
+
var Gi = typeof ga == "function" ? ga : ga.default, Hi = "file-invalid-type", Wi = "file-too-large", Bi = "file-too-small", Ni = "too-many-files", Ui = function() {
|
|
1482
|
+
var i = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", t = i.split(","), n = t.length > 1 ? "one of ".concat(t.join(", ")) : t[0];
|
|
2124
1483
|
return {
|
|
2125
|
-
code:
|
|
2126
|
-
message: "File type must be ".concat(
|
|
1484
|
+
code: Hi,
|
|
1485
|
+
message: "File type must be ".concat(n)
|
|
2127
1486
|
};
|
|
2128
|
-
},
|
|
1487
|
+
}, Ya = function(i) {
|
|
2129
1488
|
return {
|
|
2130
|
-
code:
|
|
1489
|
+
code: Wi,
|
|
2131
1490
|
message: "File is larger than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
2132
1491
|
};
|
|
2133
|
-
},
|
|
1492
|
+
}, Ja = function(i) {
|
|
2134
1493
|
return {
|
|
2135
|
-
code:
|
|
1494
|
+
code: Bi,
|
|
2136
1495
|
message: "File is smaller than ".concat(i, " ").concat(i === 1 ? "byte" : "bytes")
|
|
2137
1496
|
};
|
|
2138
|
-
},
|
|
2139
|
-
code:
|
|
1497
|
+
}, Yi = {
|
|
1498
|
+
code: Ni,
|
|
2140
1499
|
message: "Too many files"
|
|
2141
1500
|
};
|
|
2142
|
-
function
|
|
1501
|
+
function Ji(a) {
|
|
2143
1502
|
return a.type === "" && typeof a.getAsFile == "function";
|
|
2144
1503
|
}
|
|
2145
|
-
function
|
|
2146
|
-
var
|
|
2147
|
-
return [
|
|
1504
|
+
function ei(a, i) {
|
|
1505
|
+
var t = a.type === "application/x-moz-file" || Gi(a, i) || Ji(a);
|
|
1506
|
+
return [t, t ? null : Ui(i)];
|
|
2148
1507
|
}
|
|
2149
|
-
function
|
|
2150
|
-
if (
|
|
2151
|
-
if (
|
|
2152
|
-
if (a.size >
|
|
2153
|
-
if (a.size < i) return [!1,
|
|
1508
|
+
function pi(a, i, t) {
|
|
1509
|
+
if (F(a.size))
|
|
1510
|
+
if (F(i) && F(t)) {
|
|
1511
|
+
if (a.size > t) return [!1, Ya(t)];
|
|
1512
|
+
if (a.size < i) return [!1, Ja(i)];
|
|
2154
1513
|
} else {
|
|
2155
|
-
if (
|
|
2156
|
-
if (
|
|
1514
|
+
if (F(i) && a.size < i) return [!1, Ja(i)];
|
|
1515
|
+
if (F(t) && a.size > t) return [!1, Ya(t)];
|
|
2157
1516
|
}
|
|
2158
1517
|
return [!0, null];
|
|
2159
1518
|
}
|
|
2160
|
-
function
|
|
1519
|
+
function F(a) {
|
|
2161
1520
|
return a != null;
|
|
2162
1521
|
}
|
|
2163
|
-
function
|
|
2164
|
-
var i = a.files,
|
|
2165
|
-
return !
|
|
2166
|
-
var
|
|
2167
|
-
return
|
|
1522
|
+
function Vi(a) {
|
|
1523
|
+
var i = a.files, t = a.accept, n = a.minSize, p = a.maxSize, o = a.multiple, l = a.maxFiles, r = a.validator;
|
|
1524
|
+
return !o && i.length > 1 || o && l >= 1 && i.length > l ? !1 : i.every(function(g) {
|
|
1525
|
+
var j = ei(g, t), b = W(j, 1), D = b[0], I = pi(g, n, p), R = W(I, 1), L = R[0], M = r ? r(g) : null;
|
|
1526
|
+
return D && L && !M;
|
|
2168
1527
|
});
|
|
2169
1528
|
}
|
|
2170
|
-
function
|
|
1529
|
+
function ia(a) {
|
|
2171
1530
|
return typeof a.isPropagationStopped == "function" ? a.isPropagationStopped() : typeof a.cancelBubble < "u" ? a.cancelBubble : !1;
|
|
2172
1531
|
}
|
|
2173
|
-
function
|
|
1532
|
+
function H(a) {
|
|
2174
1533
|
return a.dataTransfer ? Array.prototype.some.call(a.dataTransfer.types, function(i) {
|
|
2175
1534
|
return i === "Files" || i === "application/x-moz-file";
|
|
2176
1535
|
}) : !!a.target && !!a.target.files;
|
|
2177
1536
|
}
|
|
2178
|
-
function
|
|
1537
|
+
function Va(a) {
|
|
2179
1538
|
a.preventDefault();
|
|
2180
1539
|
}
|
|
2181
|
-
function
|
|
1540
|
+
function Qi(a) {
|
|
2182
1541
|
return a.indexOf("MSIE") !== -1 || a.indexOf("Trident/") !== -1;
|
|
2183
1542
|
}
|
|
2184
|
-
function
|
|
1543
|
+
function Xi(a) {
|
|
2185
1544
|
return a.indexOf("Edge/") !== -1;
|
|
2186
1545
|
}
|
|
2187
|
-
function
|
|
1546
|
+
function Zi() {
|
|
2188
1547
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
2189
|
-
return
|
|
2190
|
-
}
|
|
2191
|
-
function
|
|
2192
|
-
for (var a = arguments.length, i = new Array(a),
|
|
2193
|
-
i[
|
|
2194
|
-
return function(
|
|
2195
|
-
for (var
|
|
2196
|
-
|
|
2197
|
-
return i.some(function(
|
|
2198
|
-
return !
|
|
1548
|
+
return Qi(a) || Xi(a);
|
|
1549
|
+
}
|
|
1550
|
+
function k() {
|
|
1551
|
+
for (var a = arguments.length, i = new Array(a), t = 0; t < a; t++)
|
|
1552
|
+
i[t] = arguments[t];
|
|
1553
|
+
return function(n) {
|
|
1554
|
+
for (var p = arguments.length, o = new Array(p > 1 ? p - 1 : 0), l = 1; l < p; l++)
|
|
1555
|
+
o[l - 1] = arguments[l];
|
|
1556
|
+
return i.some(function(r) {
|
|
1557
|
+
return !ia(n) && r && r.apply(void 0, [n].concat(o)), ia(n);
|
|
2199
1558
|
});
|
|
2200
1559
|
};
|
|
2201
1560
|
}
|
|
2202
|
-
function
|
|
1561
|
+
function at() {
|
|
2203
1562
|
return "showOpenFilePicker" in window;
|
|
2204
1563
|
}
|
|
2205
|
-
function
|
|
2206
|
-
if (
|
|
2207
|
-
var i = Object.entries(a).filter(function(
|
|
2208
|
-
var
|
|
2209
|
-
return
|
|
2210
|
-
}).reduce(function(
|
|
2211
|
-
var
|
|
2212
|
-
return
|
|
1564
|
+
function it(a) {
|
|
1565
|
+
if (F(a)) {
|
|
1566
|
+
var i = Object.entries(a).filter(function(t) {
|
|
1567
|
+
var n = W(t, 2), p = n[0], o = n[1], l = !0;
|
|
1568
|
+
return oi(p) || (console.warn('Skipped "'.concat(p, '" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types.')), l = !1), (!Array.isArray(o) || !o.every(ci)) && (console.warn('Skipped "'.concat(p, '" because an invalid file extension was provided.')), l = !1), l;
|
|
1569
|
+
}).reduce(function(t, n) {
|
|
1570
|
+
var p = W(n, 2), o = p[0], l = p[1];
|
|
1571
|
+
return Ua(Ua({}, t), {}, ti({}, o, l));
|
|
2213
1572
|
}, {});
|
|
2214
1573
|
return [{
|
|
2215
1574
|
// description is required due to https://crbug.com/1264708
|
|
@@ -2219,139 +1578,139 @@ function ze(a) {
|
|
|
2219
1578
|
}
|
|
2220
1579
|
return a;
|
|
2221
1580
|
}
|
|
2222
|
-
function
|
|
2223
|
-
if (
|
|
2224
|
-
return Object.entries(a).reduce(function(i,
|
|
2225
|
-
var
|
|
2226
|
-
return [].concat(
|
|
1581
|
+
function tt(a) {
|
|
1582
|
+
if (F(a))
|
|
1583
|
+
return Object.entries(a).reduce(function(i, t) {
|
|
1584
|
+
var n = W(t, 2), p = n[0], o = n[1];
|
|
1585
|
+
return [].concat(Ba(i), [p], Ba(o));
|
|
2227
1586
|
}, []).filter(function(i) {
|
|
2228
|
-
return
|
|
1587
|
+
return oi(i) || ci(i);
|
|
2229
1588
|
}).join(",");
|
|
2230
1589
|
}
|
|
2231
|
-
function
|
|
1590
|
+
function nt(a) {
|
|
2232
1591
|
return a instanceof DOMException && (a.name === "AbortError" || a.code === a.ABORT_ERR);
|
|
2233
1592
|
}
|
|
2234
|
-
function
|
|
1593
|
+
function et(a) {
|
|
2235
1594
|
return a instanceof DOMException && (a.name === "SecurityError" || a.code === a.SECURITY_ERR);
|
|
2236
1595
|
}
|
|
2237
|
-
function
|
|
1596
|
+
function oi(a) {
|
|
2238
1597
|
return a === "audio/*" || a === "video/*" || a === "image/*" || a === "text/*" || a === "application/*" || /\w+\/[-+.\w]+/g.test(a);
|
|
2239
1598
|
}
|
|
2240
|
-
function
|
|
1599
|
+
function ci(a) {
|
|
2241
1600
|
return /^.*\.[\w]+$/.test(a);
|
|
2242
1601
|
}
|
|
2243
|
-
var
|
|
2244
|
-
function
|
|
2245
|
-
return
|
|
1602
|
+
var pt = ["children"], ot = ["open"], ct = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], lt = ["refKey", "onChange", "onClick"];
|
|
1603
|
+
function Qa(a) {
|
|
1604
|
+
return dt(a) || st(a) || li(a) || rt();
|
|
2246
1605
|
}
|
|
2247
|
-
function
|
|
1606
|
+
function rt() {
|
|
2248
1607
|
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2249
1608
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2250
1609
|
}
|
|
2251
|
-
function
|
|
1610
|
+
function st(a) {
|
|
2252
1611
|
if (typeof Symbol < "u" && a[Symbol.iterator] != null || a["@@iterator"] != null) return Array.from(a);
|
|
2253
1612
|
}
|
|
2254
|
-
function
|
|
2255
|
-
if (Array.isArray(a)) return
|
|
1613
|
+
function dt(a) {
|
|
1614
|
+
if (Array.isArray(a)) return wa(a);
|
|
2256
1615
|
}
|
|
2257
|
-
function
|
|
2258
|
-
return
|
|
1616
|
+
function ba(a, i) {
|
|
1617
|
+
return vt(a) || ut(a, i) || li(a, i) || mt();
|
|
2259
1618
|
}
|
|
2260
|
-
function
|
|
1619
|
+
function mt() {
|
|
2261
1620
|
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
2262
1621
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2263
1622
|
}
|
|
2264
|
-
function
|
|
1623
|
+
function li(a, i) {
|
|
2265
1624
|
if (a) {
|
|
2266
|
-
if (typeof a == "string") return
|
|
2267
|
-
var
|
|
2268
|
-
if (
|
|
2269
|
-
if (
|
|
1625
|
+
if (typeof a == "string") return wa(a, i);
|
|
1626
|
+
var t = Object.prototype.toString.call(a).slice(8, -1);
|
|
1627
|
+
if (t === "Object" && a.constructor && (t = a.constructor.name), t === "Map" || t === "Set") return Array.from(a);
|
|
1628
|
+
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)) return wa(a, i);
|
|
2270
1629
|
}
|
|
2271
1630
|
}
|
|
2272
|
-
function
|
|
1631
|
+
function wa(a, i) {
|
|
2273
1632
|
(i == null || i > a.length) && (i = a.length);
|
|
2274
|
-
for (var
|
|
2275
|
-
t
|
|
2276
|
-
return
|
|
2277
|
-
}
|
|
2278
|
-
function
|
|
2279
|
-
var
|
|
2280
|
-
if (
|
|
2281
|
-
var
|
|
1633
|
+
for (var t = 0, n = new Array(i); t < i; t++)
|
|
1634
|
+
n[t] = a[t];
|
|
1635
|
+
return n;
|
|
1636
|
+
}
|
|
1637
|
+
function ut(a, i) {
|
|
1638
|
+
var t = a == null ? null : typeof Symbol < "u" && a[Symbol.iterator] || a["@@iterator"];
|
|
1639
|
+
if (t != null) {
|
|
1640
|
+
var n = [], p = !0, o = !1, l, r;
|
|
2282
1641
|
try {
|
|
2283
|
-
for (
|
|
1642
|
+
for (t = t.call(a); !(p = (l = t.next()).done) && (n.push(l.value), !(i && n.length === i)); p = !0)
|
|
2284
1643
|
;
|
|
2285
|
-
} catch (
|
|
2286
|
-
|
|
1644
|
+
} catch (g) {
|
|
1645
|
+
o = !0, r = g;
|
|
2287
1646
|
} finally {
|
|
2288
1647
|
try {
|
|
2289
|
-
!
|
|
1648
|
+
!p && t.return != null && t.return();
|
|
2290
1649
|
} finally {
|
|
2291
|
-
if (
|
|
1650
|
+
if (o) throw r;
|
|
2292
1651
|
}
|
|
2293
1652
|
}
|
|
2294
|
-
return
|
|
1653
|
+
return n;
|
|
2295
1654
|
}
|
|
2296
1655
|
}
|
|
2297
|
-
function
|
|
1656
|
+
function vt(a) {
|
|
2298
1657
|
if (Array.isArray(a)) return a;
|
|
2299
1658
|
}
|
|
2300
|
-
function
|
|
2301
|
-
var
|
|
1659
|
+
function Xa(a, i) {
|
|
1660
|
+
var t = Object.keys(a);
|
|
2302
1661
|
if (Object.getOwnPropertySymbols) {
|
|
2303
|
-
var
|
|
2304
|
-
i && (
|
|
2305
|
-
return Object.getOwnPropertyDescriptor(a,
|
|
2306
|
-
})),
|
|
1662
|
+
var n = Object.getOwnPropertySymbols(a);
|
|
1663
|
+
i && (n = n.filter(function(p) {
|
|
1664
|
+
return Object.getOwnPropertyDescriptor(a, p).enumerable;
|
|
1665
|
+
})), t.push.apply(t, n);
|
|
2307
1666
|
}
|
|
2308
|
-
return
|
|
1667
|
+
return t;
|
|
2309
1668
|
}
|
|
2310
|
-
function
|
|
1669
|
+
function d(a) {
|
|
2311
1670
|
for (var i = 1; i < arguments.length; i++) {
|
|
2312
|
-
var
|
|
2313
|
-
i % 2 ?
|
|
2314
|
-
|
|
2315
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(
|
|
2316
|
-
Object.defineProperty(a,
|
|
1671
|
+
var t = arguments[i] != null ? arguments[i] : {};
|
|
1672
|
+
i % 2 ? Xa(Object(t), !0).forEach(function(n) {
|
|
1673
|
+
ka(a, n, t[n]);
|
|
1674
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(t)) : Xa(Object(t)).forEach(function(n) {
|
|
1675
|
+
Object.defineProperty(a, n, Object.getOwnPropertyDescriptor(t, n));
|
|
2317
1676
|
});
|
|
2318
1677
|
}
|
|
2319
1678
|
return a;
|
|
2320
1679
|
}
|
|
2321
|
-
function
|
|
2322
|
-
return i in a ? Object.defineProperty(a, i, { value:
|
|
1680
|
+
function ka(a, i, t) {
|
|
1681
|
+
return i in a ? Object.defineProperty(a, i, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : a[i] = t, a;
|
|
2323
1682
|
}
|
|
2324
|
-
function
|
|
1683
|
+
function ta(a, i) {
|
|
2325
1684
|
if (a == null) return {};
|
|
2326
|
-
var
|
|
1685
|
+
var t = ft(a, i), n, p;
|
|
2327
1686
|
if (Object.getOwnPropertySymbols) {
|
|
2328
|
-
var
|
|
2329
|
-
for (
|
|
2330
|
-
|
|
1687
|
+
var o = Object.getOwnPropertySymbols(a);
|
|
1688
|
+
for (p = 0; p < o.length; p++)
|
|
1689
|
+
n = o[p], !(i.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(a, n) && (t[n] = a[n]);
|
|
2331
1690
|
}
|
|
2332
|
-
return
|
|
1691
|
+
return t;
|
|
2333
1692
|
}
|
|
2334
|
-
function
|
|
1693
|
+
function ft(a, i) {
|
|
2335
1694
|
if (a == null) return {};
|
|
2336
|
-
var
|
|
2337
|
-
for (
|
|
2338
|
-
|
|
2339
|
-
return
|
|
2340
|
-
}
|
|
2341
|
-
var
|
|
2342
|
-
var
|
|
2343
|
-
return
|
|
1695
|
+
var t = {}, n = Object.keys(a), p, o;
|
|
1696
|
+
for (o = 0; o < n.length; o++)
|
|
1697
|
+
p = n[o], !(i.indexOf(p) >= 0) && (t[p] = a[p]);
|
|
1698
|
+
return t;
|
|
1699
|
+
}
|
|
1700
|
+
var Da = /* @__PURE__ */ bi(function(a, i) {
|
|
1701
|
+
var t = a.children, n = ta(a, pt), p = xt(n), o = p.open, l = ta(p, ot);
|
|
1702
|
+
return hi(i, function() {
|
|
2344
1703
|
return {
|
|
2345
|
-
open:
|
|
1704
|
+
open: o
|
|
2346
1705
|
};
|
|
2347
|
-
}, [
|
|
2348
|
-
open:
|
|
1706
|
+
}, [o]), /* @__PURE__ */ xi.createElement(yi, null, t(d(d({}, l), {}, {
|
|
1707
|
+
open: o
|
|
2349
1708
|
})));
|
|
2350
1709
|
});
|
|
2351
|
-
|
|
2352
|
-
var
|
|
1710
|
+
Da.displayName = "Dropzone";
|
|
1711
|
+
var ri = {
|
|
2353
1712
|
disabled: !1,
|
|
2354
|
-
getFilesFromEvent:
|
|
1713
|
+
getFilesFromEvent: zi,
|
|
2355
1714
|
maxSize: 1 / 0,
|
|
2356
1715
|
minSize: 0,
|
|
2357
1716
|
multiple: !0,
|
|
@@ -2365,8 +1724,8 @@ var Fi = {
|
|
|
2365
1724
|
useFsAccessApi: !1,
|
|
2366
1725
|
autoFocus: !1
|
|
2367
1726
|
};
|
|
2368
|
-
|
|
2369
|
-
|
|
1727
|
+
Da.defaultProps = ri;
|
|
1728
|
+
Da.propTypes = {
|
|
2370
1729
|
/**
|
|
2371
1730
|
* Render function that exposes the dropzone state and prop getter fns
|
|
2372
1731
|
*
|
|
@@ -2383,7 +1742,7 @@ Xa.propTypes = {
|
|
|
2383
1742
|
* @param {File[]} params.acceptedFiles Accepted files
|
|
2384
1743
|
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected. This persists after drop and is the source of truth for post-drop rejections.
|
|
2385
1744
|
*/
|
|
2386
|
-
children:
|
|
1745
|
+
children: s.func,
|
|
2387
1746
|
/**
|
|
2388
1747
|
* Set accepted file types.
|
|
2389
1748
|
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
@@ -2391,90 +1750,90 @@ Xa.propTypes = {
|
|
|
2391
1750
|
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
2392
1751
|
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
2393
1752
|
*/
|
|
2394
|
-
accept:
|
|
1753
|
+
accept: s.objectOf(s.arrayOf(s.string)),
|
|
2395
1754
|
/**
|
|
2396
1755
|
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
2397
1756
|
*/
|
|
2398
|
-
multiple:
|
|
1757
|
+
multiple: s.bool,
|
|
2399
1758
|
/**
|
|
2400
1759
|
* If false, allow dropped items to take over the current browser window
|
|
2401
1760
|
*/
|
|
2402
|
-
preventDropOnDocument:
|
|
1761
|
+
preventDropOnDocument: s.bool,
|
|
2403
1762
|
/**
|
|
2404
1763
|
* If true, disables click to open the native file selection dialog
|
|
2405
1764
|
*/
|
|
2406
|
-
noClick:
|
|
1765
|
+
noClick: s.bool,
|
|
2407
1766
|
/**
|
|
2408
1767
|
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
2409
1768
|
* Note that it also stops tracking the focus state.
|
|
2410
1769
|
*/
|
|
2411
|
-
noKeyboard:
|
|
1770
|
+
noKeyboard: s.bool,
|
|
2412
1771
|
/**
|
|
2413
1772
|
* If true, disables drag 'n' drop
|
|
2414
1773
|
*/
|
|
2415
|
-
noDrag:
|
|
1774
|
+
noDrag: s.bool,
|
|
2416
1775
|
/**
|
|
2417
1776
|
* If true, stops drag event propagation to parents
|
|
2418
1777
|
*/
|
|
2419
|
-
noDragEventsBubbling:
|
|
1778
|
+
noDragEventsBubbling: s.bool,
|
|
2420
1779
|
/**
|
|
2421
1780
|
* Minimum file size (in bytes)
|
|
2422
1781
|
*/
|
|
2423
|
-
minSize:
|
|
1782
|
+
minSize: s.number,
|
|
2424
1783
|
/**
|
|
2425
1784
|
* Maximum file size (in bytes)
|
|
2426
1785
|
*/
|
|
2427
|
-
maxSize:
|
|
1786
|
+
maxSize: s.number,
|
|
2428
1787
|
/**
|
|
2429
1788
|
* Maximum accepted number of files
|
|
2430
1789
|
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
2431
1790
|
*/
|
|
2432
|
-
maxFiles:
|
|
1791
|
+
maxFiles: s.number,
|
|
2433
1792
|
/**
|
|
2434
1793
|
* Enable/disable the dropzone
|
|
2435
1794
|
*/
|
|
2436
|
-
disabled:
|
|
1795
|
+
disabled: s.bool,
|
|
2437
1796
|
/**
|
|
2438
1797
|
* Use this to provide a custom file aggregator
|
|
2439
1798
|
*
|
|
2440
1799
|
* @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2441
1800
|
*/
|
|
2442
|
-
getFilesFromEvent:
|
|
1801
|
+
getFilesFromEvent: s.func,
|
|
2443
1802
|
/**
|
|
2444
1803
|
* Cb for when closing the file dialog with no selection
|
|
2445
1804
|
*/
|
|
2446
|
-
onFileDialogCancel:
|
|
1805
|
+
onFileDialogCancel: s.func,
|
|
2447
1806
|
/**
|
|
2448
1807
|
* Cb for when opening the file dialog
|
|
2449
1808
|
*/
|
|
2450
|
-
onFileDialogOpen:
|
|
1809
|
+
onFileDialogOpen: s.func,
|
|
2451
1810
|
/**
|
|
2452
1811
|
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
2453
1812
|
* to open the file picker instead of using an `<input type="file">` click event.
|
|
2454
1813
|
*/
|
|
2455
|
-
useFsAccessApi:
|
|
1814
|
+
useFsAccessApi: s.bool,
|
|
2456
1815
|
/**
|
|
2457
1816
|
* Set to true to focus the root element on render
|
|
2458
1817
|
*/
|
|
2459
|
-
autoFocus:
|
|
1818
|
+
autoFocus: s.bool,
|
|
2460
1819
|
/**
|
|
2461
1820
|
* Cb for when the `dragenter` event occurs.
|
|
2462
1821
|
*
|
|
2463
1822
|
* @param {DragEvent} event
|
|
2464
1823
|
*/
|
|
2465
|
-
onDragEnter:
|
|
1824
|
+
onDragEnter: s.func,
|
|
2466
1825
|
/**
|
|
2467
1826
|
* Cb for when the `dragleave` event occurs
|
|
2468
1827
|
*
|
|
2469
1828
|
* @param {DragEvent} event
|
|
2470
1829
|
*/
|
|
2471
|
-
onDragLeave:
|
|
1830
|
+
onDragLeave: s.func,
|
|
2472
1831
|
/**
|
|
2473
1832
|
* Cb for when the `dragover` event occurs
|
|
2474
1833
|
*
|
|
2475
1834
|
* @param {DragEvent} event
|
|
2476
1835
|
*/
|
|
2477
|
-
onDragOver:
|
|
1836
|
+
onDragOver: s.func,
|
|
2478
1837
|
/**
|
|
2479
1838
|
* Cb for when the `drop` event occurs.
|
|
2480
1839
|
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
@@ -2505,7 +1864,7 @@ Xa.propTypes = {
|
|
|
2505
1864
|
* @param {FileRejection[]} fileRejections
|
|
2506
1865
|
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2507
1866
|
*/
|
|
2508
|
-
onDrop:
|
|
1867
|
+
onDrop: s.func,
|
|
2509
1868
|
/**
|
|
2510
1869
|
* Cb for when the `drop` event occurs.
|
|
2511
1870
|
* Note that if no files are accepted, this callback is not invoked.
|
|
@@ -2513,7 +1872,7 @@ Xa.propTypes = {
|
|
|
2513
1872
|
* @param {File[]} files
|
|
2514
1873
|
* @param {(DragEvent|Event)} event
|
|
2515
1874
|
*/
|
|
2516
|
-
onDropAccepted:
|
|
1875
|
+
onDropAccepted: s.func,
|
|
2517
1876
|
/**
|
|
2518
1877
|
* Cb for when the `drop` event occurs.
|
|
2519
1878
|
* Note that if no files are rejected, this callback is not invoked.
|
|
@@ -2521,21 +1880,21 @@ Xa.propTypes = {
|
|
|
2521
1880
|
* @param {FileRejection[]} fileRejections
|
|
2522
1881
|
* @param {(DragEvent|Event)} event
|
|
2523
1882
|
*/
|
|
2524
|
-
onDropRejected:
|
|
1883
|
+
onDropRejected: s.func,
|
|
2525
1884
|
/**
|
|
2526
1885
|
* Cb for when there's some error from any of the promises.
|
|
2527
1886
|
*
|
|
2528
1887
|
* @param {Error} error
|
|
2529
1888
|
*/
|
|
2530
|
-
onError:
|
|
1889
|
+
onError: s.func,
|
|
2531
1890
|
/**
|
|
2532
1891
|
* Custom validation function. It must return null if there's no errors.
|
|
2533
1892
|
* @param {File} file
|
|
2534
1893
|
* @returns {FileError|FileError[]|null}
|
|
2535
1894
|
*/
|
|
2536
|
-
validator:
|
|
1895
|
+
validator: s.func
|
|
2537
1896
|
};
|
|
2538
|
-
var
|
|
1897
|
+
var ja = {
|
|
2539
1898
|
isFocused: !1,
|
|
2540
1899
|
isFileDialogActive: !1,
|
|
2541
1900
|
isDragActive: !1,
|
|
@@ -2545,214 +1904,214 @@ var Va = {
|
|
|
2545
1904
|
acceptedFiles: [],
|
|
2546
1905
|
fileRejections: []
|
|
2547
1906
|
};
|
|
2548
|
-
function
|
|
2549
|
-
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i =
|
|
2550
|
-
return
|
|
2551
|
-
}, [
|
|
2552
|
-
return
|
|
2553
|
-
}, [
|
|
2554
|
-
return typeof
|
|
2555
|
-
}, [
|
|
2556
|
-
return typeof
|
|
2557
|
-
}, [
|
|
2558
|
-
!
|
|
2559
|
-
if (
|
|
2560
|
-
var
|
|
2561
|
-
|
|
1907
|
+
function xt() {
|
|
1908
|
+
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, i = d(d({}, ri), a), t = i.accept, n = i.disabled, p = i.getFilesFromEvent, o = i.maxSize, l = i.minSize, r = i.multiple, g = i.maxFiles, j = i.onDragEnter, b = i.onDragLeave, D = i.onDragOver, I = i.onDrop, R = i.onDropAccepted, L = i.onDropRejected, M = i.onFileDialogCancel, na = i.onFileDialogOpen, za = i.useFsAccessApi, Ea = i.autoFocus, ea = i.preventDropOnDocument, Aa = i.noClick, pa = i.noKeyboard, Oa = i.noDrag, E = i.noDragEventsBubbling, oa = i.onError, $ = i.validator, K = T(function() {
|
|
1909
|
+
return tt(t);
|
|
1910
|
+
}, [t]), Fa = T(function() {
|
|
1911
|
+
return it(t);
|
|
1912
|
+
}, [t]), ca = T(function() {
|
|
1913
|
+
return typeof na == "function" ? na : Za;
|
|
1914
|
+
}, [na]), B = T(function() {
|
|
1915
|
+
return typeof M == "function" ? M : Za;
|
|
1916
|
+
}, [M]), x = G(null), h = G(null), si = gi(gt, ja), _a = ba(si, 2), la = _a[0], v = _a[1], di = la.isFocused, Pa = la.isFileDialogActive, N = G(typeof window < "u" && window.isSecureContext && za && at()), Sa = function() {
|
|
1917
|
+
!N.current && Pa && setTimeout(function() {
|
|
1918
|
+
if (h.current) {
|
|
1919
|
+
var c = h.current.files;
|
|
1920
|
+
c.length || (v({
|
|
2562
1921
|
type: "closeDialog"
|
|
2563
|
-
}),
|
|
1922
|
+
}), B());
|
|
2564
1923
|
}
|
|
2565
1924
|
}, 300);
|
|
2566
1925
|
};
|
|
2567
|
-
|
|
2568
|
-
return window.addEventListener("focus",
|
|
2569
|
-
window.removeEventListener("focus",
|
|
1926
|
+
X(function() {
|
|
1927
|
+
return window.addEventListener("focus", Sa, !1), function() {
|
|
1928
|
+
window.removeEventListener("focus", Sa, !1);
|
|
2570
1929
|
};
|
|
2571
|
-
}, [
|
|
2572
|
-
var
|
|
2573
|
-
|
|
1930
|
+
}, [h, Pa, B, N]);
|
|
1931
|
+
var P = G([]), A = G([]), qa = function(c) {
|
|
1932
|
+
x.current && x.current.contains(c.target) || (c.preventDefault(), P.current = []);
|
|
2574
1933
|
};
|
|
2575
|
-
|
|
2576
|
-
return
|
|
2577
|
-
|
|
1934
|
+
X(function() {
|
|
1935
|
+
return ea && (document.addEventListener("dragover", Va, !1), document.addEventListener("drop", qa, !1)), function() {
|
|
1936
|
+
ea && (document.removeEventListener("dragover", Va), document.removeEventListener("drop", qa));
|
|
2578
1937
|
};
|
|
2579
|
-
}, [
|
|
2580
|
-
var
|
|
2581
|
-
|
|
1938
|
+
}, [x, ea]), X(function() {
|
|
1939
|
+
var e = function(w) {
|
|
1940
|
+
A.current = [].concat(Qa(A.current), [w.target]), H(w) && v({
|
|
2582
1941
|
isDragGlobal: !0,
|
|
2583
1942
|
type: "setDragGlobal"
|
|
2584
1943
|
});
|
|
2585
|
-
},
|
|
2586
|
-
|
|
2587
|
-
return
|
|
2588
|
-
}), !(
|
|
1944
|
+
}, c = function(w) {
|
|
1945
|
+
A.current = A.current.filter(function(z) {
|
|
1946
|
+
return z !== w.target && z !== null;
|
|
1947
|
+
}), !(A.current.length > 0) && v({
|
|
2589
1948
|
isDragGlobal: !1,
|
|
2590
1949
|
type: "setDragGlobal"
|
|
2591
1950
|
});
|
|
2592
|
-
},
|
|
2593
|
-
|
|
1951
|
+
}, m = function() {
|
|
1952
|
+
A.current = [], v({
|
|
2594
1953
|
isDragGlobal: !1,
|
|
2595
1954
|
type: "setDragGlobal"
|
|
2596
1955
|
});
|
|
2597
|
-
},
|
|
2598
|
-
|
|
1956
|
+
}, u = function() {
|
|
1957
|
+
A.current = [], v({
|
|
2599
1958
|
isDragGlobal: !1,
|
|
2600
1959
|
type: "setDragGlobal"
|
|
2601
1960
|
});
|
|
2602
1961
|
};
|
|
2603
|
-
return document.addEventListener("dragenter",
|
|
2604
|
-
document.removeEventListener("dragenter",
|
|
1962
|
+
return document.addEventListener("dragenter", e, !1), document.addEventListener("dragleave", c, !1), document.addEventListener("dragend", m, !1), document.addEventListener("drop", u, !1), function() {
|
|
1963
|
+
document.removeEventListener("dragenter", e), document.removeEventListener("dragleave", c), document.removeEventListener("dragend", m), document.removeEventListener("drop", u);
|
|
2605
1964
|
};
|
|
2606
|
-
}, [
|
|
2607
|
-
return !
|
|
1965
|
+
}, [x]), X(function() {
|
|
1966
|
+
return !n && Ea && x.current && x.current.focus(), function() {
|
|
2608
1967
|
};
|
|
2609
|
-
}, [
|
|
2610
|
-
var
|
|
2611
|
-
|
|
2612
|
-
}, [
|
|
2613
|
-
|
|
2614
|
-
if (!(
|
|
2615
|
-
var
|
|
2616
|
-
files:
|
|
2617
|
-
accept:
|
|
2618
|
-
minSize:
|
|
2619
|
-
maxSize:
|
|
2620
|
-
multiple:
|
|
2621
|
-
maxFiles:
|
|
2622
|
-
validator:
|
|
2623
|
-
}),
|
|
2624
|
-
|
|
2625
|
-
isDragAccept:
|
|
2626
|
-
isDragReject:
|
|
1968
|
+
}, [x, Ea, n]);
|
|
1969
|
+
var O = y(function(e) {
|
|
1970
|
+
oa ? oa(e) : console.error(e);
|
|
1971
|
+
}, [oa]), Ta = y(function(e) {
|
|
1972
|
+
e.preventDefault(), e.persist(), V(e), P.current = [].concat(Qa(P.current), [e.target]), H(e) && Promise.resolve(p(e)).then(function(c) {
|
|
1973
|
+
if (!(ia(e) && !E)) {
|
|
1974
|
+
var m = c.length, u = m > 0 && Vi({
|
|
1975
|
+
files: c,
|
|
1976
|
+
accept: K,
|
|
1977
|
+
minSize: l,
|
|
1978
|
+
maxSize: o,
|
|
1979
|
+
multiple: r,
|
|
1980
|
+
maxFiles: g,
|
|
1981
|
+
validator: $
|
|
1982
|
+
}), f = m > 0 && !u;
|
|
1983
|
+
v({
|
|
1984
|
+
isDragAccept: u,
|
|
1985
|
+
isDragReject: f,
|
|
2627
1986
|
isDragActive: !0,
|
|
2628
1987
|
type: "setDraggedFiles"
|
|
2629
|
-
}),
|
|
1988
|
+
}), j && j(e);
|
|
2630
1989
|
}
|
|
2631
|
-
}).catch(function(
|
|
2632
|
-
return
|
|
1990
|
+
}).catch(function(c) {
|
|
1991
|
+
return O(c);
|
|
2633
1992
|
});
|
|
2634
|
-
}, [
|
|
2635
|
-
|
|
2636
|
-
var
|
|
2637
|
-
if (
|
|
1993
|
+
}, [p, j, O, E, K, l, o, r, g, $]), Ca = y(function(e) {
|
|
1994
|
+
e.preventDefault(), e.persist(), V(e);
|
|
1995
|
+
var c = H(e);
|
|
1996
|
+
if (c && e.dataTransfer)
|
|
2638
1997
|
try {
|
|
2639
|
-
|
|
1998
|
+
e.dataTransfer.dropEffect = "copy";
|
|
2640
1999
|
} catch {
|
|
2641
2000
|
}
|
|
2642
|
-
return
|
|
2643
|
-
}, [
|
|
2644
|
-
|
|
2645
|
-
var
|
|
2646
|
-
return
|
|
2647
|
-
}),
|
|
2648
|
-
|
|
2001
|
+
return c && D && D(e), !1;
|
|
2002
|
+
}, [D, E]), Ia = y(function(e) {
|
|
2003
|
+
e.preventDefault(), e.persist(), V(e);
|
|
2004
|
+
var c = P.current.filter(function(u) {
|
|
2005
|
+
return x.current && x.current.contains(u);
|
|
2006
|
+
}), m = c.indexOf(e.target);
|
|
2007
|
+
m !== -1 && c.splice(m, 1), P.current = c, !(c.length > 0) && (v({
|
|
2649
2008
|
type: "setDraggedFiles",
|
|
2650
2009
|
isDragActive: !1,
|
|
2651
2010
|
isDragAccept: !1,
|
|
2652
2011
|
isDragReject: !1
|
|
2653
|
-
}),
|
|
2654
|
-
}, [
|
|
2655
|
-
var
|
|
2656
|
-
|
|
2657
|
-
var
|
|
2658
|
-
if (
|
|
2659
|
-
|
|
2012
|
+
}), H(e) && b && b(e));
|
|
2013
|
+
}, [x, b, E]), U = y(function(e, c) {
|
|
2014
|
+
var m = [], u = [];
|
|
2015
|
+
e.forEach(function(f) {
|
|
2016
|
+
var w = ei(f, K), z = ba(w, 2), sa = z[0], da = z[1], ma = pi(f, l, o), Q = ba(ma, 2), ua = Q[0], va = Q[1], fa = $ ? $(f) : null;
|
|
2017
|
+
if (sa && ua && !fa)
|
|
2018
|
+
m.push(f);
|
|
2660
2019
|
else {
|
|
2661
|
-
var
|
|
2662
|
-
|
|
2663
|
-
file:
|
|
2664
|
-
errors:
|
|
2665
|
-
return
|
|
2020
|
+
var xa = [da, va];
|
|
2021
|
+
fa && (xa = xa.concat(fa)), u.push({
|
|
2022
|
+
file: f,
|
|
2023
|
+
errors: xa.filter(function(fi) {
|
|
2024
|
+
return fi;
|
|
2666
2025
|
})
|
|
2667
2026
|
});
|
|
2668
2027
|
}
|
|
2669
|
-
}), (!
|
|
2670
|
-
|
|
2671
|
-
file:
|
|
2672
|
-
errors: [
|
|
2028
|
+
}), (!r && m.length > 1 || r && g >= 1 && m.length > g) && (m.forEach(function(f) {
|
|
2029
|
+
u.push({
|
|
2030
|
+
file: f,
|
|
2031
|
+
errors: [Yi]
|
|
2673
2032
|
});
|
|
2674
|
-
}),
|
|
2675
|
-
acceptedFiles:
|
|
2676
|
-
fileRejections:
|
|
2033
|
+
}), m.splice(0)), v({
|
|
2034
|
+
acceptedFiles: m,
|
|
2035
|
+
fileRejections: u,
|
|
2677
2036
|
type: "setFiles"
|
|
2678
|
-
}),
|
|
2679
|
-
}, [
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
}).catch(function(
|
|
2683
|
-
return
|
|
2684
|
-
}),
|
|
2037
|
+
}), I && I(m, u, c), u.length > 0 && L && L(u, c), m.length > 0 && R && R(m, c);
|
|
2038
|
+
}, [v, r, K, l, o, g, I, R, L, $]), Y = y(function(e) {
|
|
2039
|
+
e.preventDefault(), e.persist(), V(e), P.current = [], H(e) && Promise.resolve(p(e)).then(function(c) {
|
|
2040
|
+
ia(e) && !E || U(c, e);
|
|
2041
|
+
}).catch(function(c) {
|
|
2042
|
+
return O(c);
|
|
2043
|
+
}), v({
|
|
2685
2044
|
type: "reset"
|
|
2686
2045
|
});
|
|
2687
|
-
}, [
|
|
2688
|
-
if (
|
|
2689
|
-
|
|
2046
|
+
}, [p, U, O, E]), S = y(function() {
|
|
2047
|
+
if (N.current) {
|
|
2048
|
+
v({
|
|
2690
2049
|
type: "openDialog"
|
|
2691
2050
|
}), ca();
|
|
2692
|
-
var
|
|
2693
|
-
multiple:
|
|
2694
|
-
types:
|
|
2051
|
+
var e = {
|
|
2052
|
+
multiple: r,
|
|
2053
|
+
types: Fa
|
|
2695
2054
|
};
|
|
2696
|
-
window.showOpenFilePicker(
|
|
2697
|
-
return
|
|
2698
|
-
}).then(function(
|
|
2699
|
-
|
|
2055
|
+
window.showOpenFilePicker(e).then(function(c) {
|
|
2056
|
+
return p(c);
|
|
2057
|
+
}).then(function(c) {
|
|
2058
|
+
U(c, null), v({
|
|
2700
2059
|
type: "closeDialog"
|
|
2701
2060
|
});
|
|
2702
|
-
}).catch(function(
|
|
2703
|
-
|
|
2061
|
+
}).catch(function(c) {
|
|
2062
|
+
nt(c) ? (B(c), v({
|
|
2704
2063
|
type: "closeDialog"
|
|
2705
|
-
})) :
|
|
2064
|
+
})) : et(c) ? (N.current = !1, h.current ? (h.current.value = null, h.current.click()) : O(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no <input> was provided."))) : O(c);
|
|
2706
2065
|
});
|
|
2707
2066
|
return;
|
|
2708
2067
|
}
|
|
2709
|
-
|
|
2068
|
+
h.current && (v({
|
|
2710
2069
|
type: "openDialog"
|
|
2711
|
-
}), ca(),
|
|
2712
|
-
}, [
|
|
2713
|
-
!
|
|
2714
|
-
}, [
|
|
2715
|
-
|
|
2070
|
+
}), ca(), h.current.value = null, h.current.click());
|
|
2071
|
+
}, [v, ca, B, za, U, O, Fa, r]), Ra = y(function(e) {
|
|
2072
|
+
!x.current || !x.current.isEqualNode(e.target) || (e.key === " " || e.key === "Enter" || e.keyCode === 32 || e.keyCode === 13) && (e.preventDefault(), S());
|
|
2073
|
+
}, [x, S]), La = y(function() {
|
|
2074
|
+
v({
|
|
2716
2075
|
type: "focus"
|
|
2717
2076
|
});
|
|
2718
|
-
}, []),
|
|
2719
|
-
|
|
2077
|
+
}, []), Ma = y(function() {
|
|
2078
|
+
v({
|
|
2720
2079
|
type: "blur"
|
|
2721
2080
|
});
|
|
2722
|
-
}, []),
|
|
2723
|
-
|
|
2724
|
-
}, [
|
|
2725
|
-
return
|
|
2726
|
-
},
|
|
2727
|
-
return
|
|
2728
|
-
},
|
|
2729
|
-
return
|
|
2730
|
-
},
|
|
2731
|
-
|
|
2732
|
-
},
|
|
2081
|
+
}, []), $a = y(function() {
|
|
2082
|
+
Aa || (Zi() ? setTimeout(S, 0) : S());
|
|
2083
|
+
}, [Aa, S]), q = function(c) {
|
|
2084
|
+
return n ? null : c;
|
|
2085
|
+
}, ra = function(c) {
|
|
2086
|
+
return pa ? null : q(c);
|
|
2087
|
+
}, J = function(c) {
|
|
2088
|
+
return Oa ? null : q(c);
|
|
2089
|
+
}, V = function(c) {
|
|
2090
|
+
E && c.stopPropagation();
|
|
2091
|
+
}, mi = T(function() {
|
|
2733
2092
|
return function() {
|
|
2734
|
-
var
|
|
2735
|
-
return
|
|
2736
|
-
onKeyDown:
|
|
2737
|
-
onFocus:
|
|
2738
|
-
onBlur:
|
|
2739
|
-
onClick:
|
|
2740
|
-
onDragEnter:
|
|
2741
|
-
onDragOver:
|
|
2742
|
-
onDragLeave:
|
|
2743
|
-
onDrop:
|
|
2744
|
-
role: typeof
|
|
2745
|
-
},
|
|
2093
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = e.refKey, m = c === void 0 ? "ref" : c, u = e.role, f = e.onKeyDown, w = e.onFocus, z = e.onBlur, sa = e.onClick, da = e.onDragEnter, ma = e.onDragOver, Q = e.onDragLeave, ua = e.onDrop, va = ta(e, ct);
|
|
2094
|
+
return d(d(ka({
|
|
2095
|
+
onKeyDown: ra(k(f, Ra)),
|
|
2096
|
+
onFocus: ra(k(w, La)),
|
|
2097
|
+
onBlur: ra(k(z, Ma)),
|
|
2098
|
+
onClick: q(k(sa, $a)),
|
|
2099
|
+
onDragEnter: J(k(da, Ta)),
|
|
2100
|
+
onDragOver: J(k(ma, Ca)),
|
|
2101
|
+
onDragLeave: J(k(Q, Ia)),
|
|
2102
|
+
onDrop: J(k(ua, Y)),
|
|
2103
|
+
role: typeof u == "string" && u !== "" ? u : "presentation"
|
|
2104
|
+
}, m, x), !n && !pa ? {
|
|
2746
2105
|
tabIndex: 0
|
|
2747
|
-
} : {}),
|
|
2106
|
+
} : {}), va);
|
|
2748
2107
|
};
|
|
2749
|
-
}, [
|
|
2750
|
-
|
|
2751
|
-
}, []),
|
|
2108
|
+
}, [x, Ra, La, Ma, $a, Ta, Ca, Ia, Y, pa, Oa, n]), ui = y(function(e) {
|
|
2109
|
+
e.stopPropagation();
|
|
2110
|
+
}, []), vi = T(function() {
|
|
2752
2111
|
return function() {
|
|
2753
|
-
var
|
|
2754
|
-
accept:
|
|
2755
|
-
multiple:
|
|
2112
|
+
var e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, c = e.refKey, m = c === void 0 ? "ref" : c, u = e.onChange, f = e.onClick, w = ta(e, lt), z = ka({
|
|
2113
|
+
accept: K,
|
|
2114
|
+
multiple: r,
|
|
2756
2115
|
type: "file",
|
|
2757
2116
|
style: {
|
|
2758
2117
|
border: 0,
|
|
@@ -2766,65 +2125,65 @@ function Ue() {
|
|
|
2766
2125
|
width: "1px",
|
|
2767
2126
|
whiteSpace: "nowrap"
|
|
2768
2127
|
},
|
|
2769
|
-
onChange:
|
|
2770
|
-
onClick:
|
|
2128
|
+
onChange: q(k(u, Y)),
|
|
2129
|
+
onClick: q(k(f, ui)),
|
|
2771
2130
|
tabIndex: -1
|
|
2772
|
-
},
|
|
2773
|
-
return
|
|
2131
|
+
}, m, h);
|
|
2132
|
+
return d(d({}, z), w);
|
|
2774
2133
|
};
|
|
2775
|
-
}, [
|
|
2776
|
-
return
|
|
2777
|
-
isFocused:
|
|
2778
|
-
getRootProps:
|
|
2779
|
-
getInputProps:
|
|
2780
|
-
rootRef:
|
|
2781
|
-
inputRef:
|
|
2782
|
-
open:
|
|
2134
|
+
}, [h, t, r, Y, n]);
|
|
2135
|
+
return d(d({}, la), {}, {
|
|
2136
|
+
isFocused: di && !n,
|
|
2137
|
+
getRootProps: mi,
|
|
2138
|
+
getInputProps: vi,
|
|
2139
|
+
rootRef: x,
|
|
2140
|
+
inputRef: h,
|
|
2141
|
+
open: q(S)
|
|
2783
2142
|
});
|
|
2784
2143
|
}
|
|
2785
|
-
function
|
|
2144
|
+
function gt(a, i) {
|
|
2786
2145
|
switch (i.type) {
|
|
2787
2146
|
case "focus":
|
|
2788
|
-
return
|
|
2147
|
+
return d(d({}, a), {}, {
|
|
2789
2148
|
isFocused: !0
|
|
2790
2149
|
});
|
|
2791
2150
|
case "blur":
|
|
2792
|
-
return
|
|
2151
|
+
return d(d({}, a), {}, {
|
|
2793
2152
|
isFocused: !1
|
|
2794
2153
|
});
|
|
2795
2154
|
case "openDialog":
|
|
2796
|
-
return
|
|
2155
|
+
return d(d({}, ja), {}, {
|
|
2797
2156
|
isFileDialogActive: !0
|
|
2798
2157
|
});
|
|
2799
2158
|
case "closeDialog":
|
|
2800
|
-
return
|
|
2159
|
+
return d(d({}, a), {}, {
|
|
2801
2160
|
isFileDialogActive: !1
|
|
2802
2161
|
});
|
|
2803
2162
|
case "setDraggedFiles":
|
|
2804
|
-
return
|
|
2163
|
+
return d(d({}, a), {}, {
|
|
2805
2164
|
isDragActive: i.isDragActive,
|
|
2806
2165
|
isDragAccept: i.isDragAccept,
|
|
2807
2166
|
isDragReject: i.isDragReject
|
|
2808
2167
|
});
|
|
2809
2168
|
case "setFiles":
|
|
2810
|
-
return
|
|
2169
|
+
return d(d({}, a), {}, {
|
|
2811
2170
|
acceptedFiles: i.acceptedFiles,
|
|
2812
2171
|
fileRejections: i.fileRejections,
|
|
2813
2172
|
isDragReject: !1
|
|
2814
2173
|
});
|
|
2815
2174
|
case "setDragGlobal":
|
|
2816
|
-
return
|
|
2175
|
+
return d(d({}, a), {}, {
|
|
2817
2176
|
isDragGlobal: i.isDragGlobal
|
|
2818
2177
|
});
|
|
2819
2178
|
case "reset":
|
|
2820
|
-
return
|
|
2179
|
+
return d({}, ja);
|
|
2821
2180
|
default:
|
|
2822
2181
|
return a;
|
|
2823
2182
|
}
|
|
2824
2183
|
}
|
|
2825
|
-
function
|
|
2184
|
+
function Za() {
|
|
2826
2185
|
}
|
|
2827
2186
|
export {
|
|
2828
|
-
|
|
2187
|
+
xt as u
|
|
2829
2188
|
};
|
|
2830
|
-
//# sourceMappingURL=index-
|
|
2189
|
+
//# sourceMappingURL=index-CVlBIwtP.js.map
|