wcz-test 6.13.1 → 6.14.0

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.
@@ -1,8 +1,8 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { Typography, Stack, Box, useTheme, Paper, Menu, List, ListItemButton, ListItemIcon, ListItemText, ImageListItem, ImageListItemBar, IconButton, Tooltip, Dialog, Fab, Chip, Button, Link, Tab, Divider } from "@mui/material";
3
- import React, { useRef, useState, useEffectEvent, useEffect, createContext, useContext, Fragment } from "react";
3
+ import React, { useRef, useState, useEffectEvent, useEffect, useMemo, useReducer, useCallback, forwardRef, useImperativeHandle, Fragment, createContext, useContext } from "react";
4
4
  import CloudUpload from "@mui/icons-material/CloudUpload";
5
- import { useDropzone } from "react-dropzone";
5
+ import { i as getDefaultExportFromCjs, c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./FileHooks-41k6-RtZ.js";
6
6
  import { useTranslation } from "react-i18next";
7
7
  import MoreVert from "@mui/icons-material/MoreVert";
8
8
  import { grey } from "@mui/material/colors";
@@ -10,7 +10,6 @@ import { useInView } from "react-intersection-observer";
10
10
  import Delete from "@mui/icons-material/Delete";
11
11
  import FileDownload from "@mui/icons-material/FileDownload";
12
12
  import { u as useDialogs } from "./DialogsHooks-BlUsVlfv.js";
13
- import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./FileHooks-BbjesS5D.js";
14
13
  import AttachFile from "@mui/icons-material/AttachFile";
15
14
  import Image from "@mui/icons-material/Image";
16
15
  import SmartDisplay from "@mui/icons-material/SmartDisplay";
@@ -91,6 +90,3343 @@ const Fullscreen = ({ children, sx, ...props }) => {
91
90
  }
92
91
  );
93
92
  };
93
+ var propTypes = { exports: {} };
94
+ var reactIs = { exports: {} };
95
+ var reactIs_production_min = {};
96
+ var hasRequiredReactIs_production_min;
97
+ function requireReactIs_production_min() {
98
+ if (hasRequiredReactIs_production_min) return reactIs_production_min;
99
+ hasRequiredReactIs_production_min = 1;
100
+ var b = "function" === typeof Symbol && Symbol.for, c = b ? Symbol.for("react.element") : 60103, d = b ? Symbol.for("react.portal") : 60106, e = b ? Symbol.for("react.fragment") : 60107, f = b ? Symbol.for("react.strict_mode") : 60108, g = b ? Symbol.for("react.profiler") : 60114, h = b ? Symbol.for("react.provider") : 60109, k = b ? Symbol.for("react.context") : 60110, l = b ? Symbol.for("react.async_mode") : 60111, m = b ? Symbol.for("react.concurrent_mode") : 60111, n = b ? Symbol.for("react.forward_ref") : 60112, p = b ? Symbol.for("react.suspense") : 60113, q = b ? Symbol.for("react.suspense_list") : 60120, r = b ? Symbol.for("react.memo") : 60115, t = b ? Symbol.for("react.lazy") : 60116, v = b ? Symbol.for("react.block") : 60121, w = b ? Symbol.for("react.fundamental") : 60117, x = b ? Symbol.for("react.responder") : 60118, y = b ? Symbol.for("react.scope") : 60119;
101
+ function z(a) {
102
+ if ("object" === typeof a && null !== a) {
103
+ var u = a.$$typeof;
104
+ switch (u) {
105
+ case c:
106
+ switch (a = a.type, a) {
107
+ case l:
108
+ case m:
109
+ case e:
110
+ case g:
111
+ case f:
112
+ case p:
113
+ return a;
114
+ default:
115
+ switch (a = a && a.$$typeof, a) {
116
+ case k:
117
+ case n:
118
+ case t:
119
+ case r:
120
+ case h:
121
+ return a;
122
+ default:
123
+ return u;
124
+ }
125
+ }
126
+ case d:
127
+ return u;
128
+ }
129
+ }
130
+ }
131
+ function A(a) {
132
+ return z(a) === m;
133
+ }
134
+ reactIs_production_min.AsyncMode = l;
135
+ reactIs_production_min.ConcurrentMode = m;
136
+ reactIs_production_min.ContextConsumer = k;
137
+ reactIs_production_min.ContextProvider = h;
138
+ reactIs_production_min.Element = c;
139
+ reactIs_production_min.ForwardRef = n;
140
+ reactIs_production_min.Fragment = e;
141
+ reactIs_production_min.Lazy = t;
142
+ reactIs_production_min.Memo = r;
143
+ reactIs_production_min.Portal = d;
144
+ reactIs_production_min.Profiler = g;
145
+ reactIs_production_min.StrictMode = f;
146
+ reactIs_production_min.Suspense = p;
147
+ reactIs_production_min.isAsyncMode = function(a) {
148
+ return A(a) || z(a) === l;
149
+ };
150
+ reactIs_production_min.isConcurrentMode = A;
151
+ reactIs_production_min.isContextConsumer = function(a) {
152
+ return z(a) === k;
153
+ };
154
+ reactIs_production_min.isContextProvider = function(a) {
155
+ return z(a) === h;
156
+ };
157
+ reactIs_production_min.isElement = function(a) {
158
+ return "object" === typeof a && null !== a && a.$$typeof === c;
159
+ };
160
+ reactIs_production_min.isForwardRef = function(a) {
161
+ return z(a) === n;
162
+ };
163
+ reactIs_production_min.isFragment = function(a) {
164
+ return z(a) === e;
165
+ };
166
+ reactIs_production_min.isLazy = function(a) {
167
+ return z(a) === t;
168
+ };
169
+ reactIs_production_min.isMemo = function(a) {
170
+ return z(a) === r;
171
+ };
172
+ reactIs_production_min.isPortal = function(a) {
173
+ return z(a) === d;
174
+ };
175
+ reactIs_production_min.isProfiler = function(a) {
176
+ return z(a) === g;
177
+ };
178
+ reactIs_production_min.isStrictMode = function(a) {
179
+ return z(a) === f;
180
+ };
181
+ reactIs_production_min.isSuspense = function(a) {
182
+ return z(a) === p;
183
+ };
184
+ reactIs_production_min.isValidElementType = function(a) {
185
+ return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
186
+ };
187
+ reactIs_production_min.typeOf = z;
188
+ return reactIs_production_min;
189
+ }
190
+ var reactIs_development = {};
191
+ var hasRequiredReactIs_development;
192
+ function requireReactIs_development() {
193
+ if (hasRequiredReactIs_development) return reactIs_development;
194
+ hasRequiredReactIs_development = 1;
195
+ if (process.env.NODE_ENV !== "production") {
196
+ (function() {
197
+ var hasSymbol = typeof Symbol === "function" && Symbol.for;
198
+ var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
199
+ var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
200
+ var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
201
+ var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
202
+ var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
203
+ var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
204
+ var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
205
+ var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
206
+ var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
207
+ var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
208
+ var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
209
+ var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
210
+ var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
211
+ var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
212
+ var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
213
+ var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
214
+ var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
215
+ var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
216
+ function isValidElementType(type) {
217
+ return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
218
+ type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
219
+ }
220
+ function typeOf(object) {
221
+ if (typeof object === "object" && object !== null) {
222
+ var $$typeof = object.$$typeof;
223
+ switch ($$typeof) {
224
+ case REACT_ELEMENT_TYPE:
225
+ var type = object.type;
226
+ switch (type) {
227
+ case REACT_ASYNC_MODE_TYPE:
228
+ case REACT_CONCURRENT_MODE_TYPE:
229
+ case REACT_FRAGMENT_TYPE:
230
+ case REACT_PROFILER_TYPE:
231
+ case REACT_STRICT_MODE_TYPE:
232
+ case REACT_SUSPENSE_TYPE:
233
+ return type;
234
+ default:
235
+ var $$typeofType = type && type.$$typeof;
236
+ switch ($$typeofType) {
237
+ case REACT_CONTEXT_TYPE:
238
+ case REACT_FORWARD_REF_TYPE:
239
+ case REACT_LAZY_TYPE:
240
+ case REACT_MEMO_TYPE:
241
+ case REACT_PROVIDER_TYPE:
242
+ return $$typeofType;
243
+ default:
244
+ return $$typeof;
245
+ }
246
+ }
247
+ case REACT_PORTAL_TYPE:
248
+ return $$typeof;
249
+ }
250
+ }
251
+ return void 0;
252
+ }
253
+ var AsyncMode = REACT_ASYNC_MODE_TYPE;
254
+ var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
255
+ var ContextConsumer = REACT_CONTEXT_TYPE;
256
+ var ContextProvider = REACT_PROVIDER_TYPE;
257
+ var Element = REACT_ELEMENT_TYPE;
258
+ var ForwardRef = REACT_FORWARD_REF_TYPE;
259
+ var Fragment2 = REACT_FRAGMENT_TYPE;
260
+ var Lazy = REACT_LAZY_TYPE;
261
+ var Memo = REACT_MEMO_TYPE;
262
+ var Portal = REACT_PORTAL_TYPE;
263
+ var Profiler = REACT_PROFILER_TYPE;
264
+ var StrictMode = REACT_STRICT_MODE_TYPE;
265
+ var Suspense = REACT_SUSPENSE_TYPE;
266
+ var hasWarnedAboutDeprecatedIsAsyncMode = false;
267
+ function isAsyncMode(object) {
268
+ {
269
+ if (!hasWarnedAboutDeprecatedIsAsyncMode) {
270
+ hasWarnedAboutDeprecatedIsAsyncMode = true;
271
+ 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.");
272
+ }
273
+ }
274
+ return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
275
+ }
276
+ function isConcurrentMode(object) {
277
+ return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
278
+ }
279
+ function isContextConsumer(object) {
280
+ return typeOf(object) === REACT_CONTEXT_TYPE;
281
+ }
282
+ function isContextProvider(object) {
283
+ return typeOf(object) === REACT_PROVIDER_TYPE;
284
+ }
285
+ function isElement(object) {
286
+ return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
287
+ }
288
+ function isForwardRef(object) {
289
+ return typeOf(object) === REACT_FORWARD_REF_TYPE;
290
+ }
291
+ function isFragment(object) {
292
+ return typeOf(object) === REACT_FRAGMENT_TYPE;
293
+ }
294
+ function isLazy(object) {
295
+ return typeOf(object) === REACT_LAZY_TYPE;
296
+ }
297
+ function isMemo(object) {
298
+ return typeOf(object) === REACT_MEMO_TYPE;
299
+ }
300
+ function isPortal(object) {
301
+ return typeOf(object) === REACT_PORTAL_TYPE;
302
+ }
303
+ function isProfiler(object) {
304
+ return typeOf(object) === REACT_PROFILER_TYPE;
305
+ }
306
+ function isStrictMode(object) {
307
+ return typeOf(object) === REACT_STRICT_MODE_TYPE;
308
+ }
309
+ function isSuspense(object) {
310
+ return typeOf(object) === REACT_SUSPENSE_TYPE;
311
+ }
312
+ reactIs_development.AsyncMode = AsyncMode;
313
+ reactIs_development.ConcurrentMode = ConcurrentMode;
314
+ reactIs_development.ContextConsumer = ContextConsumer;
315
+ reactIs_development.ContextProvider = ContextProvider;
316
+ reactIs_development.Element = Element;
317
+ reactIs_development.ForwardRef = ForwardRef;
318
+ reactIs_development.Fragment = Fragment2;
319
+ reactIs_development.Lazy = Lazy;
320
+ reactIs_development.Memo = Memo;
321
+ reactIs_development.Portal = Portal;
322
+ reactIs_development.Profiler = Profiler;
323
+ reactIs_development.StrictMode = StrictMode;
324
+ reactIs_development.Suspense = Suspense;
325
+ reactIs_development.isAsyncMode = isAsyncMode;
326
+ reactIs_development.isConcurrentMode = isConcurrentMode;
327
+ reactIs_development.isContextConsumer = isContextConsumer;
328
+ reactIs_development.isContextProvider = isContextProvider;
329
+ reactIs_development.isElement = isElement;
330
+ reactIs_development.isForwardRef = isForwardRef;
331
+ reactIs_development.isFragment = isFragment;
332
+ reactIs_development.isLazy = isLazy;
333
+ reactIs_development.isMemo = isMemo;
334
+ reactIs_development.isPortal = isPortal;
335
+ reactIs_development.isProfiler = isProfiler;
336
+ reactIs_development.isStrictMode = isStrictMode;
337
+ reactIs_development.isSuspense = isSuspense;
338
+ reactIs_development.isValidElementType = isValidElementType;
339
+ reactIs_development.typeOf = typeOf;
340
+ })();
341
+ }
342
+ return reactIs_development;
343
+ }
344
+ var hasRequiredReactIs;
345
+ function requireReactIs() {
346
+ if (hasRequiredReactIs) return reactIs.exports;
347
+ hasRequiredReactIs = 1;
348
+ if (process.env.NODE_ENV === "production") {
349
+ reactIs.exports = requireReactIs_production_min();
350
+ } else {
351
+ reactIs.exports = requireReactIs_development();
352
+ }
353
+ return reactIs.exports;
354
+ }
355
+ var objectAssign;
356
+ var hasRequiredObjectAssign;
357
+ function requireObjectAssign() {
358
+ if (hasRequiredObjectAssign) return objectAssign;
359
+ hasRequiredObjectAssign = 1;
360
+ var getOwnPropertySymbols = Object.getOwnPropertySymbols;
361
+ var hasOwnProperty = Object.prototype.hasOwnProperty;
362
+ var propIsEnumerable = Object.prototype.propertyIsEnumerable;
363
+ function toObject(val) {
364
+ if (val === null || val === void 0) {
365
+ throw new TypeError("Object.assign cannot be called with null or undefined");
366
+ }
367
+ return Object(val);
368
+ }
369
+ function shouldUseNative() {
370
+ try {
371
+ if (!Object.assign) {
372
+ return false;
373
+ }
374
+ var test1 = new String("abc");
375
+ test1[5] = "de";
376
+ if (Object.getOwnPropertyNames(test1)[0] === "5") {
377
+ return false;
378
+ }
379
+ var test2 = {};
380
+ for (var i = 0; i < 10; i++) {
381
+ test2["_" + String.fromCharCode(i)] = i;
382
+ }
383
+ var order2 = Object.getOwnPropertyNames(test2).map(function(n) {
384
+ return test2[n];
385
+ });
386
+ if (order2.join("") !== "0123456789") {
387
+ return false;
388
+ }
389
+ var test3 = {};
390
+ "abcdefghijklmnopqrst".split("").forEach(function(letter) {
391
+ test3[letter] = letter;
392
+ });
393
+ if (Object.keys(Object.assign({}, test3)).join("") !== "abcdefghijklmnopqrst") {
394
+ return false;
395
+ }
396
+ return true;
397
+ } catch (err) {
398
+ return false;
399
+ }
400
+ }
401
+ objectAssign = shouldUseNative() ? Object.assign : function(target, source) {
402
+ var from;
403
+ var to = toObject(target);
404
+ var symbols;
405
+ for (var s = 1; s < arguments.length; s++) {
406
+ from = Object(arguments[s]);
407
+ for (var key in from) {
408
+ if (hasOwnProperty.call(from, key)) {
409
+ to[key] = from[key];
410
+ }
411
+ }
412
+ if (getOwnPropertySymbols) {
413
+ symbols = getOwnPropertySymbols(from);
414
+ for (var i = 0; i < symbols.length; i++) {
415
+ if (propIsEnumerable.call(from, symbols[i])) {
416
+ to[symbols[i]] = from[symbols[i]];
417
+ }
418
+ }
419
+ }
420
+ }
421
+ return to;
422
+ };
423
+ return objectAssign;
424
+ }
425
+ var ReactPropTypesSecret_1;
426
+ var hasRequiredReactPropTypesSecret;
427
+ function requireReactPropTypesSecret() {
428
+ if (hasRequiredReactPropTypesSecret) return ReactPropTypesSecret_1;
429
+ hasRequiredReactPropTypesSecret = 1;
430
+ var ReactPropTypesSecret = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
431
+ ReactPropTypesSecret_1 = ReactPropTypesSecret;
432
+ return ReactPropTypesSecret_1;
433
+ }
434
+ var has;
435
+ var hasRequiredHas;
436
+ function requireHas() {
437
+ if (hasRequiredHas) return has;
438
+ hasRequiredHas = 1;
439
+ has = Function.call.bind(Object.prototype.hasOwnProperty);
440
+ return has;
441
+ }
442
+ var checkPropTypes_1;
443
+ var hasRequiredCheckPropTypes;
444
+ function requireCheckPropTypes() {
445
+ if (hasRequiredCheckPropTypes) return checkPropTypes_1;
446
+ hasRequiredCheckPropTypes = 1;
447
+ var printWarning = function() {
448
+ };
449
+ if (process.env.NODE_ENV !== "production") {
450
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
451
+ var loggedTypeFailures = {};
452
+ var has2 = /* @__PURE__ */ requireHas();
453
+ printWarning = function(text) {
454
+ var message = "Warning: " + text;
455
+ if (typeof console !== "undefined") {
456
+ console.error(message);
457
+ }
458
+ try {
459
+ throw new Error(message);
460
+ } catch (x) {
461
+ }
462
+ };
463
+ }
464
+ function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
465
+ if (process.env.NODE_ENV !== "production") {
466
+ for (var typeSpecName in typeSpecs) {
467
+ if (has2(typeSpecs, typeSpecName)) {
468
+ var error;
469
+ try {
470
+ if (typeof typeSpecs[typeSpecName] !== "function") {
471
+ var err = Error(
472
+ (componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
473
+ );
474
+ err.name = "Invariant Violation";
475
+ throw err;
476
+ }
477
+ error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
478
+ } catch (ex) {
479
+ error = ex;
480
+ }
481
+ if (error && !(error instanceof Error)) {
482
+ printWarning(
483
+ (componentName || "React class") + ": type specification of " + location + " `" + typeSpecName + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof error + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
484
+ );
485
+ }
486
+ if (error instanceof Error && !(error.message in loggedTypeFailures)) {
487
+ loggedTypeFailures[error.message] = true;
488
+ var stack = getStack ? getStack() : "";
489
+ printWarning(
490
+ "Failed " + location + " type: " + error.message + (stack != null ? stack : "")
491
+ );
492
+ }
493
+ }
494
+ }
495
+ }
496
+ }
497
+ checkPropTypes.resetWarningCache = function() {
498
+ if (process.env.NODE_ENV !== "production") {
499
+ loggedTypeFailures = {};
500
+ }
501
+ };
502
+ checkPropTypes_1 = checkPropTypes;
503
+ return checkPropTypes_1;
504
+ }
505
+ var factoryWithTypeCheckers;
506
+ var hasRequiredFactoryWithTypeCheckers;
507
+ function requireFactoryWithTypeCheckers() {
508
+ if (hasRequiredFactoryWithTypeCheckers) return factoryWithTypeCheckers;
509
+ hasRequiredFactoryWithTypeCheckers = 1;
510
+ var ReactIs = requireReactIs();
511
+ var assign = requireObjectAssign();
512
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
513
+ var has2 = /* @__PURE__ */ requireHas();
514
+ var checkPropTypes = /* @__PURE__ */ requireCheckPropTypes();
515
+ var printWarning = function() {
516
+ };
517
+ if (process.env.NODE_ENV !== "production") {
518
+ printWarning = function(text) {
519
+ var message = "Warning: " + text;
520
+ if (typeof console !== "undefined") {
521
+ console.error(message);
522
+ }
523
+ try {
524
+ throw new Error(message);
525
+ } catch (x) {
526
+ }
527
+ };
528
+ }
529
+ function emptyFunctionThatReturnsNull() {
530
+ return null;
531
+ }
532
+ factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
533
+ var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
534
+ var FAUX_ITERATOR_SYMBOL = "@@iterator";
535
+ function getIteratorFn(maybeIterable) {
536
+ var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
537
+ if (typeof iteratorFn === "function") {
538
+ return iteratorFn;
539
+ }
540
+ }
541
+ var ANONYMOUS = "<<anonymous>>";
542
+ var ReactPropTypes = {
543
+ array: createPrimitiveTypeChecker("array"),
544
+ bigint: createPrimitiveTypeChecker("bigint"),
545
+ bool: createPrimitiveTypeChecker("boolean"),
546
+ func: createPrimitiveTypeChecker("function"),
547
+ number: createPrimitiveTypeChecker("number"),
548
+ object: createPrimitiveTypeChecker("object"),
549
+ string: createPrimitiveTypeChecker("string"),
550
+ symbol: createPrimitiveTypeChecker("symbol"),
551
+ any: createAnyTypeChecker(),
552
+ arrayOf: createArrayOfTypeChecker,
553
+ element: createElementTypeChecker(),
554
+ elementType: createElementTypeTypeChecker(),
555
+ instanceOf: createInstanceTypeChecker,
556
+ node: createNodeChecker(),
557
+ objectOf: createObjectOfTypeChecker,
558
+ oneOf: createEnumTypeChecker,
559
+ oneOfType: createUnionTypeChecker,
560
+ shape: createShapeTypeChecker,
561
+ exact: createStrictShapeTypeChecker
562
+ };
563
+ function is(x, y) {
564
+ if (x === y) {
565
+ return x !== 0 || 1 / x === 1 / y;
566
+ } else {
567
+ return x !== x && y !== y;
568
+ }
569
+ }
570
+ function PropTypeError(message, data) {
571
+ this.message = message;
572
+ this.data = data && typeof data === "object" ? data : {};
573
+ this.stack = "";
574
+ }
575
+ PropTypeError.prototype = Error.prototype;
576
+ function createChainableTypeChecker(validate) {
577
+ if (process.env.NODE_ENV !== "production") {
578
+ var manualPropTypeCallCache = {};
579
+ var manualPropTypeWarningCount = 0;
580
+ }
581
+ function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
582
+ componentName = componentName || ANONYMOUS;
583
+ propFullName = propFullName || propName;
584
+ if (secret !== ReactPropTypesSecret) {
585
+ if (throwOnDirectAccess) {
586
+ var err = new Error(
587
+ "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"
588
+ );
589
+ err.name = "Invariant Violation";
590
+ throw err;
591
+ } else if (process.env.NODE_ENV !== "production" && typeof console !== "undefined") {
592
+ var cacheKey = componentName + ":" + propName;
593
+ if (!manualPropTypeCallCache[cacheKey] && // Avoid spamming the console because they are often not actionable except for lib authors
594
+ manualPropTypeWarningCount < 3) {
595
+ printWarning(
596
+ "You are manually calling a React.PropTypes validation function for the `" + propFullName + "` prop on `" + componentName + "`. 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."
597
+ );
598
+ manualPropTypeCallCache[cacheKey] = true;
599
+ manualPropTypeWarningCount++;
600
+ }
601
+ }
602
+ }
603
+ if (props[propName] == null) {
604
+ if (isRequired) {
605
+ if (props[propName] === null) {
606
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required " + ("in `" + componentName + "`, but its value is `null`."));
607
+ }
608
+ return new PropTypeError("The " + location + " `" + propFullName + "` is marked as required in " + ("`" + componentName + "`, but its value is `undefined`."));
609
+ }
610
+ return null;
611
+ } else {
612
+ return validate(props, propName, componentName, location, propFullName);
613
+ }
614
+ }
615
+ var chainedCheckType = checkType.bind(null, false);
616
+ chainedCheckType.isRequired = checkType.bind(null, true);
617
+ return chainedCheckType;
618
+ }
619
+ function createPrimitiveTypeChecker(expectedType) {
620
+ function validate(props, propName, componentName, location, propFullName, secret) {
621
+ var propValue = props[propName];
622
+ var propType = getPropType(propValue);
623
+ if (propType !== expectedType) {
624
+ var preciseType = getPreciseType(propValue);
625
+ return new PropTypeError(
626
+ "Invalid " + location + " `" + propFullName + "` of type " + ("`" + preciseType + "` supplied to `" + componentName + "`, expected ") + ("`" + expectedType + "`."),
627
+ { expectedType }
628
+ );
629
+ }
630
+ return null;
631
+ }
632
+ return createChainableTypeChecker(validate);
633
+ }
634
+ function createAnyTypeChecker() {
635
+ return createChainableTypeChecker(emptyFunctionThatReturnsNull);
636
+ }
637
+ function createArrayOfTypeChecker(typeChecker) {
638
+ function validate(props, propName, componentName, location, propFullName) {
639
+ if (typeof typeChecker !== "function") {
640
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside arrayOf.");
641
+ }
642
+ var propValue = props[propName];
643
+ if (!Array.isArray(propValue)) {
644
+ var propType = getPropType(propValue);
645
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an array."));
646
+ }
647
+ for (var i = 0; i < propValue.length; i++) {
648
+ var error = typeChecker(propValue, i, componentName, location, propFullName + "[" + i + "]", ReactPropTypesSecret);
649
+ if (error instanceof Error) {
650
+ return error;
651
+ }
652
+ }
653
+ return null;
654
+ }
655
+ return createChainableTypeChecker(validate);
656
+ }
657
+ function createElementTypeChecker() {
658
+ function validate(props, propName, componentName, location, propFullName) {
659
+ var propValue = props[propName];
660
+ if (!isValidElement(propValue)) {
661
+ var propType = getPropType(propValue);
662
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
663
+ }
664
+ return null;
665
+ }
666
+ return createChainableTypeChecker(validate);
667
+ }
668
+ function createElementTypeTypeChecker() {
669
+ function validate(props, propName, componentName, location, propFullName) {
670
+ var propValue = props[propName];
671
+ if (!ReactIs.isValidElementType(propValue)) {
672
+ var propType = getPropType(propValue);
673
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement type."));
674
+ }
675
+ return null;
676
+ }
677
+ return createChainableTypeChecker(validate);
678
+ }
679
+ function createInstanceTypeChecker(expectedClass) {
680
+ function validate(props, propName, componentName, location, propFullName) {
681
+ if (!(props[propName] instanceof expectedClass)) {
682
+ var expectedClassName = expectedClass.name || ANONYMOUS;
683
+ var actualClassName = getClassName(props[propName]);
684
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + actualClassName + "` supplied to `" + componentName + "`, expected ") + ("instance of `" + expectedClassName + "`."));
685
+ }
686
+ return null;
687
+ }
688
+ return createChainableTypeChecker(validate);
689
+ }
690
+ function createEnumTypeChecker(expectedValues) {
691
+ if (!Array.isArray(expectedValues)) {
692
+ if (process.env.NODE_ENV !== "production") {
693
+ if (arguments.length > 1) {
694
+ printWarning(
695
+ "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])."
696
+ );
697
+ } else {
698
+ printWarning("Invalid argument supplied to oneOf, expected an array.");
699
+ }
700
+ }
701
+ return emptyFunctionThatReturnsNull;
702
+ }
703
+ function validate(props, propName, componentName, location, propFullName) {
704
+ var propValue = props[propName];
705
+ for (var i = 0; i < expectedValues.length; i++) {
706
+ if (is(propValue, expectedValues[i])) {
707
+ return null;
708
+ }
709
+ }
710
+ var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
711
+ var type = getPreciseType(value);
712
+ if (type === "symbol") {
713
+ return String(value);
714
+ }
715
+ return value;
716
+ });
717
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of value `" + String(propValue) + "` " + ("supplied to `" + componentName + "`, expected one of " + valuesString + "."));
718
+ }
719
+ return createChainableTypeChecker(validate);
720
+ }
721
+ function createObjectOfTypeChecker(typeChecker) {
722
+ function validate(props, propName, componentName, location, propFullName) {
723
+ if (typeof typeChecker !== "function") {
724
+ return new PropTypeError("Property `" + propFullName + "` of component `" + componentName + "` has invalid PropType notation inside objectOf.");
725
+ }
726
+ var propValue = props[propName];
727
+ var propType = getPropType(propValue);
728
+ if (propType !== "object") {
729
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected an object."));
730
+ }
731
+ for (var key in propValue) {
732
+ if (has2(propValue, key)) {
733
+ var error = typeChecker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
734
+ if (error instanceof Error) {
735
+ return error;
736
+ }
737
+ }
738
+ }
739
+ return null;
740
+ }
741
+ return createChainableTypeChecker(validate);
742
+ }
743
+ function createUnionTypeChecker(arrayOfTypeCheckers) {
744
+ if (!Array.isArray(arrayOfTypeCheckers)) {
745
+ process.env.NODE_ENV !== "production" ? printWarning("Invalid argument supplied to oneOfType, expected an instance of array.") : void 0;
746
+ return emptyFunctionThatReturnsNull;
747
+ }
748
+ for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
749
+ var checker = arrayOfTypeCheckers[i];
750
+ if (typeof checker !== "function") {
751
+ printWarning(
752
+ "Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + getPostfixForTypeWarning(checker) + " at index " + i + "."
753
+ );
754
+ return emptyFunctionThatReturnsNull;
755
+ }
756
+ }
757
+ function validate(props, propName, componentName, location, propFullName) {
758
+ var expectedTypes = [];
759
+ for (var i2 = 0; i2 < arrayOfTypeCheckers.length; i2++) {
760
+ var checker2 = arrayOfTypeCheckers[i2];
761
+ var checkerResult = checker2(props, propName, componentName, location, propFullName, ReactPropTypesSecret);
762
+ if (checkerResult == null) {
763
+ return null;
764
+ }
765
+ if (checkerResult.data && has2(checkerResult.data, "expectedType")) {
766
+ expectedTypes.push(checkerResult.data.expectedType);
767
+ }
768
+ }
769
+ var expectedTypesMessage = expectedTypes.length > 0 ? ", expected one of type [" + expectedTypes.join(", ") + "]" : "";
770
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`" + expectedTypesMessage + "."));
771
+ }
772
+ return createChainableTypeChecker(validate);
773
+ }
774
+ function createNodeChecker() {
775
+ function validate(props, propName, componentName, location, propFullName) {
776
+ if (!isNode(props[propName])) {
777
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` supplied to " + ("`" + componentName + "`, expected a ReactNode."));
778
+ }
779
+ return null;
780
+ }
781
+ return createChainableTypeChecker(validate);
782
+ }
783
+ function invalidValidatorError(componentName, location, propFullName, key, type) {
784
+ return new PropTypeError(
785
+ (componentName || "React class") + ": " + location + " type `" + propFullName + "." + key + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + type + "`."
786
+ );
787
+ }
788
+ function createShapeTypeChecker(shapeTypes) {
789
+ function validate(props, propName, componentName, location, propFullName) {
790
+ var propValue = props[propName];
791
+ var propType = getPropType(propValue);
792
+ if (propType !== "object") {
793
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
794
+ }
795
+ for (var key in shapeTypes) {
796
+ var checker = shapeTypes[key];
797
+ if (typeof checker !== "function") {
798
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
799
+ }
800
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
801
+ if (error) {
802
+ return error;
803
+ }
804
+ }
805
+ return null;
806
+ }
807
+ return createChainableTypeChecker(validate);
808
+ }
809
+ function createStrictShapeTypeChecker(shapeTypes) {
810
+ function validate(props, propName, componentName, location, propFullName) {
811
+ var propValue = props[propName];
812
+ var propType = getPropType(propValue);
813
+ if (propType !== "object") {
814
+ return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type `" + propType + "` " + ("supplied to `" + componentName + "`, expected `object`."));
815
+ }
816
+ var allKeys = assign({}, props[propName], shapeTypes);
817
+ for (var key in allKeys) {
818
+ var checker = shapeTypes[key];
819
+ if (has2(shapeTypes, key) && typeof checker !== "function") {
820
+ return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
821
+ }
822
+ if (!checker) {
823
+ return new PropTypeError(
824
+ "Invalid " + location + " `" + propFullName + "` key `" + key + "` supplied to `" + componentName + "`.\nBad object: " + JSON.stringify(props[propName], null, " ") + "\nValid keys: " + JSON.stringify(Object.keys(shapeTypes), null, " ")
825
+ );
826
+ }
827
+ var error = checker(propValue, key, componentName, location, propFullName + "." + key, ReactPropTypesSecret);
828
+ if (error) {
829
+ return error;
830
+ }
831
+ }
832
+ return null;
833
+ }
834
+ return createChainableTypeChecker(validate);
835
+ }
836
+ function isNode(propValue) {
837
+ switch (typeof propValue) {
838
+ case "number":
839
+ case "string":
840
+ case "undefined":
841
+ return true;
842
+ case "boolean":
843
+ return !propValue;
844
+ case "object":
845
+ if (Array.isArray(propValue)) {
846
+ return propValue.every(isNode);
847
+ }
848
+ if (propValue === null || isValidElement(propValue)) {
849
+ return true;
850
+ }
851
+ var iteratorFn = getIteratorFn(propValue);
852
+ if (iteratorFn) {
853
+ var iterator = iteratorFn.call(propValue);
854
+ var step;
855
+ if (iteratorFn !== propValue.entries) {
856
+ while (!(step = iterator.next()).done) {
857
+ if (!isNode(step.value)) {
858
+ return false;
859
+ }
860
+ }
861
+ } else {
862
+ while (!(step = iterator.next()).done) {
863
+ var entry = step.value;
864
+ if (entry) {
865
+ if (!isNode(entry[1])) {
866
+ return false;
867
+ }
868
+ }
869
+ }
870
+ }
871
+ } else {
872
+ return false;
873
+ }
874
+ return true;
875
+ default:
876
+ return false;
877
+ }
878
+ }
879
+ function isSymbol(propType, propValue) {
880
+ if (propType === "symbol") {
881
+ return true;
882
+ }
883
+ if (!propValue) {
884
+ return false;
885
+ }
886
+ if (propValue["@@toStringTag"] === "Symbol") {
887
+ return true;
888
+ }
889
+ if (typeof Symbol === "function" && propValue instanceof Symbol) {
890
+ return true;
891
+ }
892
+ return false;
893
+ }
894
+ function getPropType(propValue) {
895
+ var propType = typeof propValue;
896
+ if (Array.isArray(propValue)) {
897
+ return "array";
898
+ }
899
+ if (propValue instanceof RegExp) {
900
+ return "object";
901
+ }
902
+ if (isSymbol(propType, propValue)) {
903
+ return "symbol";
904
+ }
905
+ return propType;
906
+ }
907
+ function getPreciseType(propValue) {
908
+ if (typeof propValue === "undefined" || propValue === null) {
909
+ return "" + propValue;
910
+ }
911
+ var propType = getPropType(propValue);
912
+ if (propType === "object") {
913
+ if (propValue instanceof Date) {
914
+ return "date";
915
+ } else if (propValue instanceof RegExp) {
916
+ return "regexp";
917
+ }
918
+ }
919
+ return propType;
920
+ }
921
+ function getPostfixForTypeWarning(value) {
922
+ var type = getPreciseType(value);
923
+ switch (type) {
924
+ case "array":
925
+ case "object":
926
+ return "an " + type;
927
+ case "boolean":
928
+ case "date":
929
+ case "regexp":
930
+ return "a " + type;
931
+ default:
932
+ return type;
933
+ }
934
+ }
935
+ function getClassName(propValue) {
936
+ if (!propValue.constructor || !propValue.constructor.name) {
937
+ return ANONYMOUS;
938
+ }
939
+ return propValue.constructor.name;
940
+ }
941
+ ReactPropTypes.checkPropTypes = checkPropTypes;
942
+ ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;
943
+ ReactPropTypes.PropTypes = ReactPropTypes;
944
+ return ReactPropTypes;
945
+ };
946
+ return factoryWithTypeCheckers;
947
+ }
948
+ var factoryWithThrowingShims;
949
+ var hasRequiredFactoryWithThrowingShims;
950
+ function requireFactoryWithThrowingShims() {
951
+ if (hasRequiredFactoryWithThrowingShims) return factoryWithThrowingShims;
952
+ hasRequiredFactoryWithThrowingShims = 1;
953
+ var ReactPropTypesSecret = /* @__PURE__ */ requireReactPropTypesSecret();
954
+ function emptyFunction() {
955
+ }
956
+ function emptyFunctionWithReset() {
957
+ }
958
+ emptyFunctionWithReset.resetWarningCache = emptyFunction;
959
+ factoryWithThrowingShims = function() {
960
+ function shim(props, propName, componentName, location, propFullName, secret) {
961
+ if (secret === ReactPropTypesSecret) {
962
+ return;
963
+ }
964
+ var err = new Error(
965
+ "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"
966
+ );
967
+ err.name = "Invariant Violation";
968
+ throw err;
969
+ }
970
+ shim.isRequired = shim;
971
+ function getShim() {
972
+ return shim;
973
+ }
974
+ var ReactPropTypes = {
975
+ array: shim,
976
+ bigint: shim,
977
+ bool: shim,
978
+ func: shim,
979
+ number: shim,
980
+ object: shim,
981
+ string: shim,
982
+ symbol: shim,
983
+ any: shim,
984
+ arrayOf: getShim,
985
+ element: shim,
986
+ elementType: shim,
987
+ instanceOf: getShim,
988
+ node: shim,
989
+ objectOf: getShim,
990
+ oneOf: getShim,
991
+ oneOfType: getShim,
992
+ shape: getShim,
993
+ exact: getShim,
994
+ checkPropTypes: emptyFunctionWithReset,
995
+ resetWarningCache: emptyFunction
996
+ };
997
+ ReactPropTypes.PropTypes = ReactPropTypes;
998
+ return ReactPropTypes;
999
+ };
1000
+ return factoryWithThrowingShims;
1001
+ }
1002
+ var hasRequiredPropTypes;
1003
+ function requirePropTypes() {
1004
+ if (hasRequiredPropTypes) return propTypes.exports;
1005
+ hasRequiredPropTypes = 1;
1006
+ if (process.env.NODE_ENV !== "production") {
1007
+ var ReactIs = requireReactIs();
1008
+ var throwOnDirectAccess = true;
1009
+ propTypes.exports = /* @__PURE__ */ requireFactoryWithTypeCheckers()(ReactIs.isElement, throwOnDirectAccess);
1010
+ } else {
1011
+ propTypes.exports = /* @__PURE__ */ requireFactoryWithThrowingShims()();
1012
+ }
1013
+ return propTypes.exports;
1014
+ }
1015
+ var propTypesExports = /* @__PURE__ */ requirePropTypes();
1016
+ const PropTypes = /* @__PURE__ */ getDefaultExportFromCjs(propTypesExports);
1017
+ function __awaiter(thisArg, _arguments, P, generator) {
1018
+ function adopt(value) {
1019
+ return value instanceof P ? value : new P(function(resolve) {
1020
+ resolve(value);
1021
+ });
1022
+ }
1023
+ return new (P || (P = Promise))(function(resolve, reject) {
1024
+ function fulfilled(value) {
1025
+ try {
1026
+ step(generator.next(value));
1027
+ } catch (e) {
1028
+ reject(e);
1029
+ }
1030
+ }
1031
+ function rejected(value) {
1032
+ try {
1033
+ step(generator["throw"](value));
1034
+ } catch (e) {
1035
+ reject(e);
1036
+ }
1037
+ }
1038
+ function step(result) {
1039
+ result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
1040
+ }
1041
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1042
+ });
1043
+ }
1044
+ typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
1045
+ var e = new Error(message);
1046
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
1047
+ };
1048
+ const COMMON_MIME_TYPES = /* @__PURE__ */ new Map([
1049
+ // https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
1050
+ ["1km", "application/vnd.1000minds.decision-model+xml"],
1051
+ ["3dml", "text/vnd.in3d.3dml"],
1052
+ ["3ds", "image/x-3ds"],
1053
+ ["3g2", "video/3gpp2"],
1054
+ ["3gp", "video/3gp"],
1055
+ ["3gpp", "video/3gpp"],
1056
+ ["3mf", "model/3mf"],
1057
+ ["7z", "application/x-7z-compressed"],
1058
+ ["7zip", "application/x-7z-compressed"],
1059
+ ["123", "application/vnd.lotus-1-2-3"],
1060
+ ["aab", "application/x-authorware-bin"],
1061
+ ["aac", "audio/x-acc"],
1062
+ ["aam", "application/x-authorware-map"],
1063
+ ["aas", "application/x-authorware-seg"],
1064
+ ["abw", "application/x-abiword"],
1065
+ ["ac", "application/vnd.nokia.n-gage.ac+xml"],
1066
+ ["ac3", "audio/ac3"],
1067
+ ["acc", "application/vnd.americandynamics.acc"],
1068
+ ["ace", "application/x-ace-compressed"],
1069
+ ["acu", "application/vnd.acucobol"],
1070
+ ["acutc", "application/vnd.acucorp"],
1071
+ ["adp", "audio/adpcm"],
1072
+ ["aep", "application/vnd.audiograph"],
1073
+ ["afm", "application/x-font-type1"],
1074
+ ["afp", "application/vnd.ibm.modcap"],
1075
+ ["ahead", "application/vnd.ahead.space"],
1076
+ ["ai", "application/pdf"],
1077
+ ["aif", "audio/x-aiff"],
1078
+ ["aifc", "audio/x-aiff"],
1079
+ ["aiff", "audio/x-aiff"],
1080
+ ["air", "application/vnd.adobe.air-application-installer-package+zip"],
1081
+ ["ait", "application/vnd.dvb.ait"],
1082
+ ["ami", "application/vnd.amiga.ami"],
1083
+ ["amr", "audio/amr"],
1084
+ ["apk", "application/vnd.android.package-archive"],
1085
+ ["apng", "image/apng"],
1086
+ ["appcache", "text/cache-manifest"],
1087
+ ["application", "application/x-ms-application"],
1088
+ ["apr", "application/vnd.lotus-approach"],
1089
+ ["arc", "application/x-freearc"],
1090
+ ["arj", "application/x-arj"],
1091
+ ["asc", "application/pgp-signature"],
1092
+ ["asf", "video/x-ms-asf"],
1093
+ ["asm", "text/x-asm"],
1094
+ ["aso", "application/vnd.accpac.simply.aso"],
1095
+ ["asx", "video/x-ms-asf"],
1096
+ ["atc", "application/vnd.acucorp"],
1097
+ ["atom", "application/atom+xml"],
1098
+ ["atomcat", "application/atomcat+xml"],
1099
+ ["atomdeleted", "application/atomdeleted+xml"],
1100
+ ["atomsvc", "application/atomsvc+xml"],
1101
+ ["atx", "application/vnd.antix.game-component"],
1102
+ ["au", "audio/x-au"],
1103
+ ["avi", "video/x-msvideo"],
1104
+ ["avif", "image/avif"],
1105
+ ["aw", "application/applixware"],
1106
+ ["azf", "application/vnd.airzip.filesecure.azf"],
1107
+ ["azs", "application/vnd.airzip.filesecure.azs"],
1108
+ ["azv", "image/vnd.airzip.accelerator.azv"],
1109
+ ["azw", "application/vnd.amazon.ebook"],
1110
+ ["b16", "image/vnd.pco.b16"],
1111
+ ["bat", "application/x-msdownload"],
1112
+ ["bcpio", "application/x-bcpio"],
1113
+ ["bdf", "application/x-font-bdf"],
1114
+ ["bdm", "application/vnd.syncml.dm+wbxml"],
1115
+ ["bdoc", "application/x-bdoc"],
1116
+ ["bed", "application/vnd.realvnc.bed"],
1117
+ ["bh2", "application/vnd.fujitsu.oasysprs"],
1118
+ ["bin", "application/octet-stream"],
1119
+ ["blb", "application/x-blorb"],
1120
+ ["blorb", "application/x-blorb"],
1121
+ ["bmi", "application/vnd.bmi"],
1122
+ ["bmml", "application/vnd.balsamiq.bmml+xml"],
1123
+ ["bmp", "image/bmp"],
1124
+ ["book", "application/vnd.framemaker"],
1125
+ ["box", "application/vnd.previewsystems.box"],
1126
+ ["boz", "application/x-bzip2"],
1127
+ ["bpk", "application/octet-stream"],
1128
+ ["bpmn", "application/octet-stream"],
1129
+ ["bsp", "model/vnd.valve.source.compiled-map"],
1130
+ ["btif", "image/prs.btif"],
1131
+ ["buffer", "application/octet-stream"],
1132
+ ["bz", "application/x-bzip"],
1133
+ ["bz2", "application/x-bzip2"],
1134
+ ["c", "text/x-c"],
1135
+ ["c4d", "application/vnd.clonk.c4group"],
1136
+ ["c4f", "application/vnd.clonk.c4group"],
1137
+ ["c4g", "application/vnd.clonk.c4group"],
1138
+ ["c4p", "application/vnd.clonk.c4group"],
1139
+ ["c4u", "application/vnd.clonk.c4group"],
1140
+ ["c11amc", "application/vnd.cluetrust.cartomobile-config"],
1141
+ ["c11amz", "application/vnd.cluetrust.cartomobile-config-pkg"],
1142
+ ["cab", "application/vnd.ms-cab-compressed"],
1143
+ ["caf", "audio/x-caf"],
1144
+ ["cap", "application/vnd.tcpdump.pcap"],
1145
+ ["car", "application/vnd.curl.car"],
1146
+ ["cat", "application/vnd.ms-pki.seccat"],
1147
+ ["cb7", "application/x-cbr"],
1148
+ ["cba", "application/x-cbr"],
1149
+ ["cbr", "application/x-cbr"],
1150
+ ["cbt", "application/x-cbr"],
1151
+ ["cbz", "application/x-cbr"],
1152
+ ["cc", "text/x-c"],
1153
+ ["cco", "application/x-cocoa"],
1154
+ ["cct", "application/x-director"],
1155
+ ["ccxml", "application/ccxml+xml"],
1156
+ ["cdbcmsg", "application/vnd.contact.cmsg"],
1157
+ ["cda", "application/x-cdf"],
1158
+ ["cdf", "application/x-netcdf"],
1159
+ ["cdfx", "application/cdfx+xml"],
1160
+ ["cdkey", "application/vnd.mediastation.cdkey"],
1161
+ ["cdmia", "application/cdmi-capability"],
1162
+ ["cdmic", "application/cdmi-container"],
1163
+ ["cdmid", "application/cdmi-domain"],
1164
+ ["cdmio", "application/cdmi-object"],
1165
+ ["cdmiq", "application/cdmi-queue"],
1166
+ ["cdr", "application/cdr"],
1167
+ ["cdx", "chemical/x-cdx"],
1168
+ ["cdxml", "application/vnd.chemdraw+xml"],
1169
+ ["cdy", "application/vnd.cinderella"],
1170
+ ["cer", "application/pkix-cert"],
1171
+ ["cfs", "application/x-cfs-compressed"],
1172
+ ["cgm", "image/cgm"],
1173
+ ["chat", "application/x-chat"],
1174
+ ["chm", "application/vnd.ms-htmlhelp"],
1175
+ ["chrt", "application/vnd.kde.kchart"],
1176
+ ["cif", "chemical/x-cif"],
1177
+ ["cii", "application/vnd.anser-web-certificate-issue-initiation"],
1178
+ ["cil", "application/vnd.ms-artgalry"],
1179
+ ["cjs", "application/node"],
1180
+ ["cla", "application/vnd.claymore"],
1181
+ ["class", "application/octet-stream"],
1182
+ ["clkk", "application/vnd.crick.clicker.keyboard"],
1183
+ ["clkp", "application/vnd.crick.clicker.palette"],
1184
+ ["clkt", "application/vnd.crick.clicker.template"],
1185
+ ["clkw", "application/vnd.crick.clicker.wordbank"],
1186
+ ["clkx", "application/vnd.crick.clicker"],
1187
+ ["clp", "application/x-msclip"],
1188
+ ["cmc", "application/vnd.cosmocaller"],
1189
+ ["cmdf", "chemical/x-cmdf"],
1190
+ ["cml", "chemical/x-cml"],
1191
+ ["cmp", "application/vnd.yellowriver-custom-menu"],
1192
+ ["cmx", "image/x-cmx"],
1193
+ ["cod", "application/vnd.rim.cod"],
1194
+ ["coffee", "text/coffeescript"],
1195
+ ["com", "application/x-msdownload"],
1196
+ ["conf", "text/plain"],
1197
+ ["cpio", "application/x-cpio"],
1198
+ ["cpp", "text/x-c"],
1199
+ ["cpt", "application/mac-compactpro"],
1200
+ ["crd", "application/x-mscardfile"],
1201
+ ["crl", "application/pkix-crl"],
1202
+ ["crt", "application/x-x509-ca-cert"],
1203
+ ["crx", "application/x-chrome-extension"],
1204
+ ["cryptonote", "application/vnd.rig.cryptonote"],
1205
+ ["csh", "application/x-csh"],
1206
+ ["csl", "application/vnd.citationstyles.style+xml"],
1207
+ ["csml", "chemical/x-csml"],
1208
+ ["csp", "application/vnd.commonspace"],
1209
+ ["csr", "application/octet-stream"],
1210
+ ["css", "text/css"],
1211
+ ["cst", "application/x-director"],
1212
+ ["csv", "text/csv"],
1213
+ ["cu", "application/cu-seeme"],
1214
+ ["curl", "text/vnd.curl"],
1215
+ ["cww", "application/prs.cww"],
1216
+ ["cxt", "application/x-director"],
1217
+ ["cxx", "text/x-c"],
1218
+ ["dae", "model/vnd.collada+xml"],
1219
+ ["daf", "application/vnd.mobius.daf"],
1220
+ ["dart", "application/vnd.dart"],
1221
+ ["dataless", "application/vnd.fdsn.seed"],
1222
+ ["davmount", "application/davmount+xml"],
1223
+ ["dbf", "application/vnd.dbf"],
1224
+ ["dbk", "application/docbook+xml"],
1225
+ ["dcr", "application/x-director"],
1226
+ ["dcurl", "text/vnd.curl.dcurl"],
1227
+ ["dd2", "application/vnd.oma.dd2+xml"],
1228
+ ["ddd", "application/vnd.fujixerox.ddd"],
1229
+ ["ddf", "application/vnd.syncml.dmddf+xml"],
1230
+ ["dds", "image/vnd.ms-dds"],
1231
+ ["deb", "application/x-debian-package"],
1232
+ ["def", "text/plain"],
1233
+ ["deploy", "application/octet-stream"],
1234
+ ["der", "application/x-x509-ca-cert"],
1235
+ ["dfac", "application/vnd.dreamfactory"],
1236
+ ["dgc", "application/x-dgc-compressed"],
1237
+ ["dic", "text/x-c"],
1238
+ ["dir", "application/x-director"],
1239
+ ["dis", "application/vnd.mobius.dis"],
1240
+ ["disposition-notification", "message/disposition-notification"],
1241
+ ["dist", "application/octet-stream"],
1242
+ ["distz", "application/octet-stream"],
1243
+ ["djv", "image/vnd.djvu"],
1244
+ ["djvu", "image/vnd.djvu"],
1245
+ ["dll", "application/octet-stream"],
1246
+ ["dmg", "application/x-apple-diskimage"],
1247
+ ["dmn", "application/octet-stream"],
1248
+ ["dmp", "application/vnd.tcpdump.pcap"],
1249
+ ["dms", "application/octet-stream"],
1250
+ ["dna", "application/vnd.dna"],
1251
+ ["doc", "application/msword"],
1252
+ ["docm", "application/vnd.ms-word.template.macroEnabled.12"],
1253
+ ["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
1254
+ ["dot", "application/msword"],
1255
+ ["dotm", "application/vnd.ms-word.template.macroEnabled.12"],
1256
+ ["dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"],
1257
+ ["dp", "application/vnd.osgi.dp"],
1258
+ ["dpg", "application/vnd.dpgraph"],
1259
+ ["dra", "audio/vnd.dra"],
1260
+ ["drle", "image/dicom-rle"],
1261
+ ["dsc", "text/prs.lines.tag"],
1262
+ ["dssc", "application/dssc+der"],
1263
+ ["dtb", "application/x-dtbook+xml"],
1264
+ ["dtd", "application/xml-dtd"],
1265
+ ["dts", "audio/vnd.dts"],
1266
+ ["dtshd", "audio/vnd.dts.hd"],
1267
+ ["dump", "application/octet-stream"],
1268
+ ["dvb", "video/vnd.dvb.file"],
1269
+ ["dvi", "application/x-dvi"],
1270
+ ["dwd", "application/atsc-dwd+xml"],
1271
+ ["dwf", "model/vnd.dwf"],
1272
+ ["dwg", "image/vnd.dwg"],
1273
+ ["dxf", "image/vnd.dxf"],
1274
+ ["dxp", "application/vnd.spotfire.dxp"],
1275
+ ["dxr", "application/x-director"],
1276
+ ["ear", "application/java-archive"],
1277
+ ["ecelp4800", "audio/vnd.nuera.ecelp4800"],
1278
+ ["ecelp7470", "audio/vnd.nuera.ecelp7470"],
1279
+ ["ecelp9600", "audio/vnd.nuera.ecelp9600"],
1280
+ ["ecma", "application/ecmascript"],
1281
+ ["edm", "application/vnd.novadigm.edm"],
1282
+ ["edx", "application/vnd.novadigm.edx"],
1283
+ ["efif", "application/vnd.picsel"],
1284
+ ["ei6", "application/vnd.pg.osasli"],
1285
+ ["elc", "application/octet-stream"],
1286
+ ["emf", "image/emf"],
1287
+ ["eml", "message/rfc822"],
1288
+ ["emma", "application/emma+xml"],
1289
+ ["emotionml", "application/emotionml+xml"],
1290
+ ["emz", "application/x-msmetafile"],
1291
+ ["eol", "audio/vnd.digital-winds"],
1292
+ ["eot", "application/vnd.ms-fontobject"],
1293
+ ["eps", "application/postscript"],
1294
+ ["epub", "application/epub+zip"],
1295
+ ["es", "application/ecmascript"],
1296
+ ["es3", "application/vnd.eszigno3+xml"],
1297
+ ["esa", "application/vnd.osgi.subsystem"],
1298
+ ["esf", "application/vnd.epson.esf"],
1299
+ ["et3", "application/vnd.eszigno3+xml"],
1300
+ ["etx", "text/x-setext"],
1301
+ ["eva", "application/x-eva"],
1302
+ ["evy", "application/x-envoy"],
1303
+ ["exe", "application/octet-stream"],
1304
+ ["exi", "application/exi"],
1305
+ ["exp", "application/express"],
1306
+ ["exr", "image/aces"],
1307
+ ["ext", "application/vnd.novadigm.ext"],
1308
+ ["ez", "application/andrew-inset"],
1309
+ ["ez2", "application/vnd.ezpix-album"],
1310
+ ["ez3", "application/vnd.ezpix-package"],
1311
+ ["f", "text/x-fortran"],
1312
+ ["f4v", "video/mp4"],
1313
+ ["f77", "text/x-fortran"],
1314
+ ["f90", "text/x-fortran"],
1315
+ ["fbs", "image/vnd.fastbidsheet"],
1316
+ ["fcdt", "application/vnd.adobe.formscentral.fcdt"],
1317
+ ["fcs", "application/vnd.isac.fcs"],
1318
+ ["fdf", "application/vnd.fdf"],
1319
+ ["fdt", "application/fdt+xml"],
1320
+ ["fe_launch", "application/vnd.denovo.fcselayout-link"],
1321
+ ["fg5", "application/vnd.fujitsu.oasysgp"],
1322
+ ["fgd", "application/x-director"],
1323
+ ["fh", "image/x-freehand"],
1324
+ ["fh4", "image/x-freehand"],
1325
+ ["fh5", "image/x-freehand"],
1326
+ ["fh7", "image/x-freehand"],
1327
+ ["fhc", "image/x-freehand"],
1328
+ ["fig", "application/x-xfig"],
1329
+ ["fits", "image/fits"],
1330
+ ["flac", "audio/x-flac"],
1331
+ ["fli", "video/x-fli"],
1332
+ ["flo", "application/vnd.micrografx.flo"],
1333
+ ["flv", "video/x-flv"],
1334
+ ["flw", "application/vnd.kde.kivio"],
1335
+ ["flx", "text/vnd.fmi.flexstor"],
1336
+ ["fly", "text/vnd.fly"],
1337
+ ["fm", "application/vnd.framemaker"],
1338
+ ["fnc", "application/vnd.frogans.fnc"],
1339
+ ["fo", "application/vnd.software602.filler.form+xml"],
1340
+ ["for", "text/x-fortran"],
1341
+ ["fpx", "image/vnd.fpx"],
1342
+ ["frame", "application/vnd.framemaker"],
1343
+ ["fsc", "application/vnd.fsc.weblaunch"],
1344
+ ["fst", "image/vnd.fst"],
1345
+ ["ftc", "application/vnd.fluxtime.clip"],
1346
+ ["fti", "application/vnd.anser-web-funds-transfer-initiation"],
1347
+ ["fvt", "video/vnd.fvt"],
1348
+ ["fxp", "application/vnd.adobe.fxp"],
1349
+ ["fxpl", "application/vnd.adobe.fxp"],
1350
+ ["fzs", "application/vnd.fuzzysheet"],
1351
+ ["g2w", "application/vnd.geoplan"],
1352
+ ["g3", "image/g3fax"],
1353
+ ["g3w", "application/vnd.geospace"],
1354
+ ["gac", "application/vnd.groove-account"],
1355
+ ["gam", "application/x-tads"],
1356
+ ["gbr", "application/rpki-ghostbusters"],
1357
+ ["gca", "application/x-gca-compressed"],
1358
+ ["gdl", "model/vnd.gdl"],
1359
+ ["gdoc", "application/vnd.google-apps.document"],
1360
+ ["geo", "application/vnd.dynageo"],
1361
+ ["geojson", "application/geo+json"],
1362
+ ["gex", "application/vnd.geometry-explorer"],
1363
+ ["ggb", "application/vnd.geogebra.file"],
1364
+ ["ggt", "application/vnd.geogebra.tool"],
1365
+ ["ghf", "application/vnd.groove-help"],
1366
+ ["gif", "image/gif"],
1367
+ ["gim", "application/vnd.groove-identity-message"],
1368
+ ["glb", "model/gltf-binary"],
1369
+ ["gltf", "model/gltf+json"],
1370
+ ["gml", "application/gml+xml"],
1371
+ ["gmx", "application/vnd.gmx"],
1372
+ ["gnumeric", "application/x-gnumeric"],
1373
+ ["gpg", "application/gpg-keys"],
1374
+ ["gph", "application/vnd.flographit"],
1375
+ ["gpx", "application/gpx+xml"],
1376
+ ["gqf", "application/vnd.grafeq"],
1377
+ ["gqs", "application/vnd.grafeq"],
1378
+ ["gram", "application/srgs"],
1379
+ ["gramps", "application/x-gramps-xml"],
1380
+ ["gre", "application/vnd.geometry-explorer"],
1381
+ ["grv", "application/vnd.groove-injector"],
1382
+ ["grxml", "application/srgs+xml"],
1383
+ ["gsf", "application/x-font-ghostscript"],
1384
+ ["gsheet", "application/vnd.google-apps.spreadsheet"],
1385
+ ["gslides", "application/vnd.google-apps.presentation"],
1386
+ ["gtar", "application/x-gtar"],
1387
+ ["gtm", "application/vnd.groove-tool-message"],
1388
+ ["gtw", "model/vnd.gtw"],
1389
+ ["gv", "text/vnd.graphviz"],
1390
+ ["gxf", "application/gxf"],
1391
+ ["gxt", "application/vnd.geonext"],
1392
+ ["gz", "application/gzip"],
1393
+ ["gzip", "application/gzip"],
1394
+ ["h", "text/x-c"],
1395
+ ["h261", "video/h261"],
1396
+ ["h263", "video/h263"],
1397
+ ["h264", "video/h264"],
1398
+ ["hal", "application/vnd.hal+xml"],
1399
+ ["hbci", "application/vnd.hbci"],
1400
+ ["hbs", "text/x-handlebars-template"],
1401
+ ["hdd", "application/x-virtualbox-hdd"],
1402
+ ["hdf", "application/x-hdf"],
1403
+ ["heic", "image/heic"],
1404
+ ["heics", "image/heic-sequence"],
1405
+ ["heif", "image/heif"],
1406
+ ["heifs", "image/heif-sequence"],
1407
+ ["hej2", "image/hej2k"],
1408
+ ["held", "application/atsc-held+xml"],
1409
+ ["hh", "text/x-c"],
1410
+ ["hjson", "application/hjson"],
1411
+ ["hlp", "application/winhlp"],
1412
+ ["hpgl", "application/vnd.hp-hpgl"],
1413
+ ["hpid", "application/vnd.hp-hpid"],
1414
+ ["hps", "application/vnd.hp-hps"],
1415
+ ["hqx", "application/mac-binhex40"],
1416
+ ["hsj2", "image/hsj2"],
1417
+ ["htc", "text/x-component"],
1418
+ ["htke", "application/vnd.kenameaapp"],
1419
+ ["htm", "text/html"],
1420
+ ["html", "text/html"],
1421
+ ["hvd", "application/vnd.yamaha.hv-dic"],
1422
+ ["hvp", "application/vnd.yamaha.hv-voice"],
1423
+ ["hvs", "application/vnd.yamaha.hv-script"],
1424
+ ["i2g", "application/vnd.intergeo"],
1425
+ ["icc", "application/vnd.iccprofile"],
1426
+ ["ice", "x-conference/x-cooltalk"],
1427
+ ["icm", "application/vnd.iccprofile"],
1428
+ ["ico", "image/x-icon"],
1429
+ ["ics", "text/calendar"],
1430
+ ["ief", "image/ief"],
1431
+ ["ifb", "text/calendar"],
1432
+ ["ifm", "application/vnd.shana.informed.formdata"],
1433
+ ["iges", "model/iges"],
1434
+ ["igl", "application/vnd.igloader"],
1435
+ ["igm", "application/vnd.insors.igm"],
1436
+ ["igs", "model/iges"],
1437
+ ["igx", "application/vnd.micrografx.igx"],
1438
+ ["iif", "application/vnd.shana.informed.interchange"],
1439
+ ["img", "application/octet-stream"],
1440
+ ["imp", "application/vnd.accpac.simply.imp"],
1441
+ ["ims", "application/vnd.ms-ims"],
1442
+ ["in", "text/plain"],
1443
+ ["ini", "text/plain"],
1444
+ ["ink", "application/inkml+xml"],
1445
+ ["inkml", "application/inkml+xml"],
1446
+ ["install", "application/x-install-instructions"],
1447
+ ["iota", "application/vnd.astraea-software.iota"],
1448
+ ["ipfix", "application/ipfix"],
1449
+ ["ipk", "application/vnd.shana.informed.package"],
1450
+ ["irm", "application/vnd.ibm.rights-management"],
1451
+ ["irp", "application/vnd.irepository.package+xml"],
1452
+ ["iso", "application/x-iso9660-image"],
1453
+ ["itp", "application/vnd.shana.informed.formtemplate"],
1454
+ ["its", "application/its+xml"],
1455
+ ["ivp", "application/vnd.immervision-ivp"],
1456
+ ["ivu", "application/vnd.immervision-ivu"],
1457
+ ["jad", "text/vnd.sun.j2me.app-descriptor"],
1458
+ ["jade", "text/jade"],
1459
+ ["jam", "application/vnd.jam"],
1460
+ ["jar", "application/java-archive"],
1461
+ ["jardiff", "application/x-java-archive-diff"],
1462
+ ["java", "text/x-java-source"],
1463
+ ["jhc", "image/jphc"],
1464
+ ["jisp", "application/vnd.jisp"],
1465
+ ["jls", "image/jls"],
1466
+ ["jlt", "application/vnd.hp-jlyt"],
1467
+ ["jng", "image/x-jng"],
1468
+ ["jnlp", "application/x-java-jnlp-file"],
1469
+ ["joda", "application/vnd.joost.joda-archive"],
1470
+ ["jp2", "image/jp2"],
1471
+ ["jpe", "image/jpeg"],
1472
+ ["jpeg", "image/jpeg"],
1473
+ ["jpf", "image/jpx"],
1474
+ ["jpg", "image/jpeg"],
1475
+ ["jpg2", "image/jp2"],
1476
+ ["jpgm", "video/jpm"],
1477
+ ["jpgv", "video/jpeg"],
1478
+ ["jph", "image/jph"],
1479
+ ["jpm", "video/jpm"],
1480
+ ["jpx", "image/jpx"],
1481
+ ["js", "application/javascript"],
1482
+ ["json", "application/json"],
1483
+ ["json5", "application/json5"],
1484
+ ["jsonld", "application/ld+json"],
1485
+ // https://jsonlines.org/
1486
+ ["jsonl", "application/jsonl"],
1487
+ ["jsonml", "application/jsonml+json"],
1488
+ ["jsx", "text/jsx"],
1489
+ ["jxr", "image/jxr"],
1490
+ ["jxra", "image/jxra"],
1491
+ ["jxrs", "image/jxrs"],
1492
+ ["jxs", "image/jxs"],
1493
+ ["jxsc", "image/jxsc"],
1494
+ ["jxsi", "image/jxsi"],
1495
+ ["jxss", "image/jxss"],
1496
+ ["kar", "audio/midi"],
1497
+ ["karbon", "application/vnd.kde.karbon"],
1498
+ ["kdb", "application/octet-stream"],
1499
+ ["kdbx", "application/x-keepass2"],
1500
+ ["key", "application/x-iwork-keynote-sffkey"],
1501
+ ["kfo", "application/vnd.kde.kformula"],
1502
+ ["kia", "application/vnd.kidspiration"],
1503
+ ["kml", "application/vnd.google-earth.kml+xml"],
1504
+ ["kmz", "application/vnd.google-earth.kmz"],
1505
+ ["kne", "application/vnd.kinar"],
1506
+ ["knp", "application/vnd.kinar"],
1507
+ ["kon", "application/vnd.kde.kontour"],
1508
+ ["kpr", "application/vnd.kde.kpresenter"],
1509
+ ["kpt", "application/vnd.kde.kpresenter"],
1510
+ ["kpxx", "application/vnd.ds-keypoint"],
1511
+ ["ksp", "application/vnd.kde.kspread"],
1512
+ ["ktr", "application/vnd.kahootz"],
1513
+ ["ktx", "image/ktx"],
1514
+ ["ktx2", "image/ktx2"],
1515
+ ["ktz", "application/vnd.kahootz"],
1516
+ ["kwd", "application/vnd.kde.kword"],
1517
+ ["kwt", "application/vnd.kde.kword"],
1518
+ ["lasxml", "application/vnd.las.las+xml"],
1519
+ ["latex", "application/x-latex"],
1520
+ ["lbd", "application/vnd.llamagraphics.life-balance.desktop"],
1521
+ ["lbe", "application/vnd.llamagraphics.life-balance.exchange+xml"],
1522
+ ["les", "application/vnd.hhe.lesson-player"],
1523
+ ["less", "text/less"],
1524
+ ["lgr", "application/lgr+xml"],
1525
+ ["lha", "application/octet-stream"],
1526
+ ["link66", "application/vnd.route66.link66+xml"],
1527
+ ["list", "text/plain"],
1528
+ ["list3820", "application/vnd.ibm.modcap"],
1529
+ ["listafp", "application/vnd.ibm.modcap"],
1530
+ ["litcoffee", "text/coffeescript"],
1531
+ ["lnk", "application/x-ms-shortcut"],
1532
+ ["log", "text/plain"],
1533
+ ["lostxml", "application/lost+xml"],
1534
+ ["lrf", "application/octet-stream"],
1535
+ ["lrm", "application/vnd.ms-lrm"],
1536
+ ["ltf", "application/vnd.frogans.ltf"],
1537
+ ["lua", "text/x-lua"],
1538
+ ["luac", "application/x-lua-bytecode"],
1539
+ ["lvp", "audio/vnd.lucent.voice"],
1540
+ ["lwp", "application/vnd.lotus-wordpro"],
1541
+ ["lzh", "application/octet-stream"],
1542
+ ["m1v", "video/mpeg"],
1543
+ ["m2a", "audio/mpeg"],
1544
+ ["m2v", "video/mpeg"],
1545
+ ["m3a", "audio/mpeg"],
1546
+ ["m3u", "text/plain"],
1547
+ ["m3u8", "application/vnd.apple.mpegurl"],
1548
+ ["m4a", "audio/x-m4a"],
1549
+ ["m4p", "application/mp4"],
1550
+ ["m4s", "video/iso.segment"],
1551
+ ["m4u", "application/vnd.mpegurl"],
1552
+ ["m4v", "video/x-m4v"],
1553
+ ["m13", "application/x-msmediaview"],
1554
+ ["m14", "application/x-msmediaview"],
1555
+ ["m21", "application/mp21"],
1556
+ ["ma", "application/mathematica"],
1557
+ ["mads", "application/mads+xml"],
1558
+ ["maei", "application/mmt-aei+xml"],
1559
+ ["mag", "application/vnd.ecowin.chart"],
1560
+ ["maker", "application/vnd.framemaker"],
1561
+ ["man", "text/troff"],
1562
+ ["manifest", "text/cache-manifest"],
1563
+ ["map", "application/json"],
1564
+ ["mar", "application/octet-stream"],
1565
+ ["markdown", "text/markdown"],
1566
+ ["mathml", "application/mathml+xml"],
1567
+ ["mb", "application/mathematica"],
1568
+ ["mbk", "application/vnd.mobius.mbk"],
1569
+ ["mbox", "application/mbox"],
1570
+ ["mc1", "application/vnd.medcalcdata"],
1571
+ ["mcd", "application/vnd.mcd"],
1572
+ ["mcurl", "text/vnd.curl.mcurl"],
1573
+ ["md", "text/markdown"],
1574
+ ["mdb", "application/x-msaccess"],
1575
+ ["mdi", "image/vnd.ms-modi"],
1576
+ ["mdx", "text/mdx"],
1577
+ ["me", "text/troff"],
1578
+ ["mesh", "model/mesh"],
1579
+ ["meta4", "application/metalink4+xml"],
1580
+ ["metalink", "application/metalink+xml"],
1581
+ ["mets", "application/mets+xml"],
1582
+ ["mfm", "application/vnd.mfmp"],
1583
+ ["mft", "application/rpki-manifest"],
1584
+ ["mgp", "application/vnd.osgeo.mapguide.package"],
1585
+ ["mgz", "application/vnd.proteus.magazine"],
1586
+ ["mid", "audio/midi"],
1587
+ ["midi", "audio/midi"],
1588
+ ["mie", "application/x-mie"],
1589
+ ["mif", "application/vnd.mif"],
1590
+ ["mime", "message/rfc822"],
1591
+ ["mj2", "video/mj2"],
1592
+ ["mjp2", "video/mj2"],
1593
+ ["mjs", "application/javascript"],
1594
+ ["mk3d", "video/x-matroska"],
1595
+ ["mka", "audio/x-matroska"],
1596
+ ["mkd", "text/x-markdown"],
1597
+ ["mks", "video/x-matroska"],
1598
+ ["mkv", "video/x-matroska"],
1599
+ ["mlp", "application/vnd.dolby.mlp"],
1600
+ ["mmd", "application/vnd.chipnuts.karaoke-mmd"],
1601
+ ["mmf", "application/vnd.smaf"],
1602
+ ["mml", "text/mathml"],
1603
+ ["mmr", "image/vnd.fujixerox.edmics-mmr"],
1604
+ ["mng", "video/x-mng"],
1605
+ ["mny", "application/x-msmoney"],
1606
+ ["mobi", "application/x-mobipocket-ebook"],
1607
+ ["mods", "application/mods+xml"],
1608
+ ["mov", "video/quicktime"],
1609
+ ["movie", "video/x-sgi-movie"],
1610
+ ["mp2", "audio/mpeg"],
1611
+ ["mp2a", "audio/mpeg"],
1612
+ ["mp3", "audio/mpeg"],
1613
+ ["mp4", "video/mp4"],
1614
+ ["mp4a", "audio/mp4"],
1615
+ ["mp4s", "application/mp4"],
1616
+ ["mp4v", "video/mp4"],
1617
+ ["mp21", "application/mp21"],
1618
+ ["mpc", "application/vnd.mophun.certificate"],
1619
+ ["mpd", "application/dash+xml"],
1620
+ ["mpe", "video/mpeg"],
1621
+ ["mpeg", "video/mpeg"],
1622
+ ["mpg", "video/mpeg"],
1623
+ ["mpg4", "video/mp4"],
1624
+ ["mpga", "audio/mpeg"],
1625
+ ["mpkg", "application/vnd.apple.installer+xml"],
1626
+ ["mpm", "application/vnd.blueice.multipass"],
1627
+ ["mpn", "application/vnd.mophun.application"],
1628
+ ["mpp", "application/vnd.ms-project"],
1629
+ ["mpt", "application/vnd.ms-project"],
1630
+ ["mpy", "application/vnd.ibm.minipay"],
1631
+ ["mqy", "application/vnd.mobius.mqy"],
1632
+ ["mrc", "application/marc"],
1633
+ ["mrcx", "application/marcxml+xml"],
1634
+ ["ms", "text/troff"],
1635
+ ["mscml", "application/mediaservercontrol+xml"],
1636
+ ["mseed", "application/vnd.fdsn.mseed"],
1637
+ ["mseq", "application/vnd.mseq"],
1638
+ ["msf", "application/vnd.epson.msf"],
1639
+ ["msg", "application/vnd.ms-outlook"],
1640
+ ["msh", "model/mesh"],
1641
+ ["msi", "application/x-msdownload"],
1642
+ ["msl", "application/vnd.mobius.msl"],
1643
+ ["msm", "application/octet-stream"],
1644
+ ["msp", "application/octet-stream"],
1645
+ ["msty", "application/vnd.muvee.style"],
1646
+ ["mtl", "model/mtl"],
1647
+ ["mts", "model/vnd.mts"],
1648
+ ["mus", "application/vnd.musician"],
1649
+ ["musd", "application/mmt-usd+xml"],
1650
+ ["musicxml", "application/vnd.recordare.musicxml+xml"],
1651
+ ["mvb", "application/x-msmediaview"],
1652
+ ["mvt", "application/vnd.mapbox-vector-tile"],
1653
+ ["mwf", "application/vnd.mfer"],
1654
+ ["mxf", "application/mxf"],
1655
+ ["mxl", "application/vnd.recordare.musicxml"],
1656
+ ["mxmf", "audio/mobile-xmf"],
1657
+ ["mxml", "application/xv+xml"],
1658
+ ["mxs", "application/vnd.triscape.mxs"],
1659
+ ["mxu", "video/vnd.mpegurl"],
1660
+ ["n-gage", "application/vnd.nokia.n-gage.symbian.install"],
1661
+ ["n3", "text/n3"],
1662
+ ["nb", "application/mathematica"],
1663
+ ["nbp", "application/vnd.wolfram.player"],
1664
+ ["nc", "application/x-netcdf"],
1665
+ ["ncx", "application/x-dtbncx+xml"],
1666
+ ["nfo", "text/x-nfo"],
1667
+ ["ngdat", "application/vnd.nokia.n-gage.data"],
1668
+ ["nitf", "application/vnd.nitf"],
1669
+ ["nlu", "application/vnd.neurolanguage.nlu"],
1670
+ ["nml", "application/vnd.enliven"],
1671
+ ["nnd", "application/vnd.noblenet-directory"],
1672
+ ["nns", "application/vnd.noblenet-sealer"],
1673
+ ["nnw", "application/vnd.noblenet-web"],
1674
+ ["npx", "image/vnd.net-fpx"],
1675
+ ["nq", "application/n-quads"],
1676
+ ["nsc", "application/x-conference"],
1677
+ ["nsf", "application/vnd.lotus-notes"],
1678
+ ["nt", "application/n-triples"],
1679
+ ["ntf", "application/vnd.nitf"],
1680
+ ["numbers", "application/x-iwork-numbers-sffnumbers"],
1681
+ ["nzb", "application/x-nzb"],
1682
+ ["oa2", "application/vnd.fujitsu.oasys2"],
1683
+ ["oa3", "application/vnd.fujitsu.oasys3"],
1684
+ ["oas", "application/vnd.fujitsu.oasys"],
1685
+ ["obd", "application/x-msbinder"],
1686
+ ["obgx", "application/vnd.openblox.game+xml"],
1687
+ ["obj", "model/obj"],
1688
+ ["oda", "application/oda"],
1689
+ ["odb", "application/vnd.oasis.opendocument.database"],
1690
+ ["odc", "application/vnd.oasis.opendocument.chart"],
1691
+ ["odf", "application/vnd.oasis.opendocument.formula"],
1692
+ ["odft", "application/vnd.oasis.opendocument.formula-template"],
1693
+ ["odg", "application/vnd.oasis.opendocument.graphics"],
1694
+ ["odi", "application/vnd.oasis.opendocument.image"],
1695
+ ["odm", "application/vnd.oasis.opendocument.text-master"],
1696
+ ["odp", "application/vnd.oasis.opendocument.presentation"],
1697
+ ["ods", "application/vnd.oasis.opendocument.spreadsheet"],
1698
+ ["odt", "application/vnd.oasis.opendocument.text"],
1699
+ ["oga", "audio/ogg"],
1700
+ ["ogex", "model/vnd.opengex"],
1701
+ ["ogg", "audio/ogg"],
1702
+ ["ogv", "video/ogg"],
1703
+ ["ogx", "application/ogg"],
1704
+ ["omdoc", "application/omdoc+xml"],
1705
+ ["onepkg", "application/onenote"],
1706
+ ["onetmp", "application/onenote"],
1707
+ ["onetoc", "application/onenote"],
1708
+ ["onetoc2", "application/onenote"],
1709
+ ["opf", "application/oebps-package+xml"],
1710
+ ["opml", "text/x-opml"],
1711
+ ["oprc", "application/vnd.palm"],
1712
+ ["opus", "audio/ogg"],
1713
+ ["org", "text/x-org"],
1714
+ ["osf", "application/vnd.yamaha.openscoreformat"],
1715
+ ["osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml"],
1716
+ ["osm", "application/vnd.openstreetmap.data+xml"],
1717
+ ["otc", "application/vnd.oasis.opendocument.chart-template"],
1718
+ ["otf", "font/otf"],
1719
+ ["otg", "application/vnd.oasis.opendocument.graphics-template"],
1720
+ ["oth", "application/vnd.oasis.opendocument.text-web"],
1721
+ ["oti", "application/vnd.oasis.opendocument.image-template"],
1722
+ ["otp", "application/vnd.oasis.opendocument.presentation-template"],
1723
+ ["ots", "application/vnd.oasis.opendocument.spreadsheet-template"],
1724
+ ["ott", "application/vnd.oasis.opendocument.text-template"],
1725
+ ["ova", "application/x-virtualbox-ova"],
1726
+ ["ovf", "application/x-virtualbox-ovf"],
1727
+ ["owl", "application/rdf+xml"],
1728
+ ["oxps", "application/oxps"],
1729
+ ["oxt", "application/vnd.openofficeorg.extension"],
1730
+ ["p", "text/x-pascal"],
1731
+ ["p7a", "application/x-pkcs7-signature"],
1732
+ ["p7b", "application/x-pkcs7-certificates"],
1733
+ ["p7c", "application/pkcs7-mime"],
1734
+ ["p7m", "application/pkcs7-mime"],
1735
+ ["p7r", "application/x-pkcs7-certreqresp"],
1736
+ ["p7s", "application/pkcs7-signature"],
1737
+ ["p8", "application/pkcs8"],
1738
+ ["p10", "application/x-pkcs10"],
1739
+ ["p12", "application/x-pkcs12"],
1740
+ ["pac", "application/x-ns-proxy-autoconfig"],
1741
+ ["pages", "application/x-iwork-pages-sffpages"],
1742
+ ["pas", "text/x-pascal"],
1743
+ ["paw", "application/vnd.pawaafile"],
1744
+ ["pbd", "application/vnd.powerbuilder6"],
1745
+ ["pbm", "image/x-portable-bitmap"],
1746
+ ["pcap", "application/vnd.tcpdump.pcap"],
1747
+ ["pcf", "application/x-font-pcf"],
1748
+ ["pcl", "application/vnd.hp-pcl"],
1749
+ ["pclxl", "application/vnd.hp-pclxl"],
1750
+ ["pct", "image/x-pict"],
1751
+ ["pcurl", "application/vnd.curl.pcurl"],
1752
+ ["pcx", "image/x-pcx"],
1753
+ ["pdb", "application/x-pilot"],
1754
+ ["pde", "text/x-processing"],
1755
+ ["pdf", "application/pdf"],
1756
+ ["pem", "application/x-x509-user-cert"],
1757
+ ["pfa", "application/x-font-type1"],
1758
+ ["pfb", "application/x-font-type1"],
1759
+ ["pfm", "application/x-font-type1"],
1760
+ ["pfr", "application/font-tdpfr"],
1761
+ ["pfx", "application/x-pkcs12"],
1762
+ ["pgm", "image/x-portable-graymap"],
1763
+ ["pgn", "application/x-chess-pgn"],
1764
+ ["pgp", "application/pgp"],
1765
+ ["php", "application/x-httpd-php"],
1766
+ ["php3", "application/x-httpd-php"],
1767
+ ["php4", "application/x-httpd-php"],
1768
+ ["phps", "application/x-httpd-php-source"],
1769
+ ["phtml", "application/x-httpd-php"],
1770
+ ["pic", "image/x-pict"],
1771
+ ["pkg", "application/octet-stream"],
1772
+ ["pki", "application/pkixcmp"],
1773
+ ["pkipath", "application/pkix-pkipath"],
1774
+ ["pkpass", "application/vnd.apple.pkpass"],
1775
+ ["pl", "application/x-perl"],
1776
+ ["plb", "application/vnd.3gpp.pic-bw-large"],
1777
+ ["plc", "application/vnd.mobius.plc"],
1778
+ ["plf", "application/vnd.pocketlearn"],
1779
+ ["pls", "application/pls+xml"],
1780
+ ["pm", "application/x-perl"],
1781
+ ["pml", "application/vnd.ctc-posml"],
1782
+ ["png", "image/png"],
1783
+ ["pnm", "image/x-portable-anymap"],
1784
+ ["portpkg", "application/vnd.macports.portpkg"],
1785
+ ["pot", "application/vnd.ms-powerpoint"],
1786
+ ["potm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"],
1787
+ ["potx", "application/vnd.openxmlformats-officedocument.presentationml.template"],
1788
+ ["ppa", "application/vnd.ms-powerpoint"],
1789
+ ["ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"],
1790
+ ["ppd", "application/vnd.cups-ppd"],
1791
+ ["ppm", "image/x-portable-pixmap"],
1792
+ ["pps", "application/vnd.ms-powerpoint"],
1793
+ ["ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],
1794
+ ["ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"],
1795
+ ["ppt", "application/powerpoint"],
1796
+ ["pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"],
1797
+ ["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
1798
+ ["pqa", "application/vnd.palm"],
1799
+ ["prc", "application/x-pilot"],
1800
+ ["pre", "application/vnd.lotus-freelance"],
1801
+ ["prf", "application/pics-rules"],
1802
+ ["provx", "application/provenance+xml"],
1803
+ ["ps", "application/postscript"],
1804
+ ["psb", "application/vnd.3gpp.pic-bw-small"],
1805
+ ["psd", "application/x-photoshop"],
1806
+ ["psf", "application/x-font-linux-psf"],
1807
+ ["pskcxml", "application/pskc+xml"],
1808
+ ["pti", "image/prs.pti"],
1809
+ ["ptid", "application/vnd.pvi.ptid1"],
1810
+ ["pub", "application/x-mspublisher"],
1811
+ ["pvb", "application/vnd.3gpp.pic-bw-var"],
1812
+ ["pwn", "application/vnd.3m.post-it-notes"],
1813
+ ["pya", "audio/vnd.ms-playready.media.pya"],
1814
+ ["pyv", "video/vnd.ms-playready.media.pyv"],
1815
+ ["qam", "application/vnd.epson.quickanime"],
1816
+ ["qbo", "application/vnd.intu.qbo"],
1817
+ ["qfx", "application/vnd.intu.qfx"],
1818
+ ["qps", "application/vnd.publishare-delta-tree"],
1819
+ ["qt", "video/quicktime"],
1820
+ ["qwd", "application/vnd.quark.quarkxpress"],
1821
+ ["qwt", "application/vnd.quark.quarkxpress"],
1822
+ ["qxb", "application/vnd.quark.quarkxpress"],
1823
+ ["qxd", "application/vnd.quark.quarkxpress"],
1824
+ ["qxl", "application/vnd.quark.quarkxpress"],
1825
+ ["qxt", "application/vnd.quark.quarkxpress"],
1826
+ ["ra", "audio/x-realaudio"],
1827
+ ["ram", "audio/x-pn-realaudio"],
1828
+ ["raml", "application/raml+yaml"],
1829
+ ["rapd", "application/route-apd+xml"],
1830
+ ["rar", "application/x-rar"],
1831
+ ["ras", "image/x-cmu-raster"],
1832
+ ["rcprofile", "application/vnd.ipunplugged.rcprofile"],
1833
+ ["rdf", "application/rdf+xml"],
1834
+ ["rdz", "application/vnd.data-vision.rdz"],
1835
+ ["relo", "application/p2p-overlay+xml"],
1836
+ ["rep", "application/vnd.businessobjects"],
1837
+ ["res", "application/x-dtbresource+xml"],
1838
+ ["rgb", "image/x-rgb"],
1839
+ ["rif", "application/reginfo+xml"],
1840
+ ["rip", "audio/vnd.rip"],
1841
+ ["ris", "application/x-research-info-systems"],
1842
+ ["rl", "application/resource-lists+xml"],
1843
+ ["rlc", "image/vnd.fujixerox.edmics-rlc"],
1844
+ ["rld", "application/resource-lists-diff+xml"],
1845
+ ["rm", "audio/x-pn-realaudio"],
1846
+ ["rmi", "audio/midi"],
1847
+ ["rmp", "audio/x-pn-realaudio-plugin"],
1848
+ ["rms", "application/vnd.jcp.javame.midlet-rms"],
1849
+ ["rmvb", "application/vnd.rn-realmedia-vbr"],
1850
+ ["rnc", "application/relax-ng-compact-syntax"],
1851
+ ["rng", "application/xml"],
1852
+ ["roa", "application/rpki-roa"],
1853
+ ["roff", "text/troff"],
1854
+ ["rp9", "application/vnd.cloanto.rp9"],
1855
+ ["rpm", "audio/x-pn-realaudio-plugin"],
1856
+ ["rpss", "application/vnd.nokia.radio-presets"],
1857
+ ["rpst", "application/vnd.nokia.radio-preset"],
1858
+ ["rq", "application/sparql-query"],
1859
+ ["rs", "application/rls-services+xml"],
1860
+ ["rsa", "application/x-pkcs7"],
1861
+ ["rsat", "application/atsc-rsat+xml"],
1862
+ ["rsd", "application/rsd+xml"],
1863
+ ["rsheet", "application/urc-ressheet+xml"],
1864
+ ["rss", "application/rss+xml"],
1865
+ ["rtf", "text/rtf"],
1866
+ ["rtx", "text/richtext"],
1867
+ ["run", "application/x-makeself"],
1868
+ ["rusd", "application/route-usd+xml"],
1869
+ ["rv", "video/vnd.rn-realvideo"],
1870
+ ["s", "text/x-asm"],
1871
+ ["s3m", "audio/s3m"],
1872
+ ["saf", "application/vnd.yamaha.smaf-audio"],
1873
+ ["sass", "text/x-sass"],
1874
+ ["sbml", "application/sbml+xml"],
1875
+ ["sc", "application/vnd.ibm.secure-container"],
1876
+ ["scd", "application/x-msschedule"],
1877
+ ["scm", "application/vnd.lotus-screencam"],
1878
+ ["scq", "application/scvp-cv-request"],
1879
+ ["scs", "application/scvp-cv-response"],
1880
+ ["scss", "text/x-scss"],
1881
+ ["scurl", "text/vnd.curl.scurl"],
1882
+ ["sda", "application/vnd.stardivision.draw"],
1883
+ ["sdc", "application/vnd.stardivision.calc"],
1884
+ ["sdd", "application/vnd.stardivision.impress"],
1885
+ ["sdkd", "application/vnd.solent.sdkm+xml"],
1886
+ ["sdkm", "application/vnd.solent.sdkm+xml"],
1887
+ ["sdp", "application/sdp"],
1888
+ ["sdw", "application/vnd.stardivision.writer"],
1889
+ ["sea", "application/octet-stream"],
1890
+ ["see", "application/vnd.seemail"],
1891
+ ["seed", "application/vnd.fdsn.seed"],
1892
+ ["sema", "application/vnd.sema"],
1893
+ ["semd", "application/vnd.semd"],
1894
+ ["semf", "application/vnd.semf"],
1895
+ ["senmlx", "application/senml+xml"],
1896
+ ["sensmlx", "application/sensml+xml"],
1897
+ ["ser", "application/java-serialized-object"],
1898
+ ["setpay", "application/set-payment-initiation"],
1899
+ ["setreg", "application/set-registration-initiation"],
1900
+ ["sfd-hdstx", "application/vnd.hydrostatix.sof-data"],
1901
+ ["sfs", "application/vnd.spotfire.sfs"],
1902
+ ["sfv", "text/x-sfv"],
1903
+ ["sgi", "image/sgi"],
1904
+ ["sgl", "application/vnd.stardivision.writer-global"],
1905
+ ["sgm", "text/sgml"],
1906
+ ["sgml", "text/sgml"],
1907
+ ["sh", "application/x-sh"],
1908
+ ["shar", "application/x-shar"],
1909
+ ["shex", "text/shex"],
1910
+ ["shf", "application/shf+xml"],
1911
+ ["shtml", "text/html"],
1912
+ ["sid", "image/x-mrsid-image"],
1913
+ ["sieve", "application/sieve"],
1914
+ ["sig", "application/pgp-signature"],
1915
+ ["sil", "audio/silk"],
1916
+ ["silo", "model/mesh"],
1917
+ ["sis", "application/vnd.symbian.install"],
1918
+ ["sisx", "application/vnd.symbian.install"],
1919
+ ["sit", "application/x-stuffit"],
1920
+ ["sitx", "application/x-stuffitx"],
1921
+ ["siv", "application/sieve"],
1922
+ ["skd", "application/vnd.koan"],
1923
+ ["skm", "application/vnd.koan"],
1924
+ ["skp", "application/vnd.koan"],
1925
+ ["skt", "application/vnd.koan"],
1926
+ ["sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12"],
1927
+ ["sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"],
1928
+ ["slim", "text/slim"],
1929
+ ["slm", "text/slim"],
1930
+ ["sls", "application/route-s-tsid+xml"],
1931
+ ["slt", "application/vnd.epson.salt"],
1932
+ ["sm", "application/vnd.stepmania.stepchart"],
1933
+ ["smf", "application/vnd.stardivision.math"],
1934
+ ["smi", "application/smil"],
1935
+ ["smil", "application/smil"],
1936
+ ["smv", "video/x-smv"],
1937
+ ["smzip", "application/vnd.stepmania.package"],
1938
+ ["snd", "audio/basic"],
1939
+ ["snf", "application/x-font-snf"],
1940
+ ["so", "application/octet-stream"],
1941
+ ["spc", "application/x-pkcs7-certificates"],
1942
+ ["spdx", "text/spdx"],
1943
+ ["spf", "application/vnd.yamaha.smaf-phrase"],
1944
+ ["spl", "application/x-futuresplash"],
1945
+ ["spot", "text/vnd.in3d.spot"],
1946
+ ["spp", "application/scvp-vp-response"],
1947
+ ["spq", "application/scvp-vp-request"],
1948
+ ["spx", "audio/ogg"],
1949
+ ["sql", "application/x-sql"],
1950
+ ["src", "application/x-wais-source"],
1951
+ ["srt", "application/x-subrip"],
1952
+ ["sru", "application/sru+xml"],
1953
+ ["srx", "application/sparql-results+xml"],
1954
+ ["ssdl", "application/ssdl+xml"],
1955
+ ["sse", "application/vnd.kodak-descriptor"],
1956
+ ["ssf", "application/vnd.epson.ssf"],
1957
+ ["ssml", "application/ssml+xml"],
1958
+ ["sst", "application/octet-stream"],
1959
+ ["st", "application/vnd.sailingtracker.track"],
1960
+ ["stc", "application/vnd.sun.xml.calc.template"],
1961
+ ["std", "application/vnd.sun.xml.draw.template"],
1962
+ ["stf", "application/vnd.wt.stf"],
1963
+ ["sti", "application/vnd.sun.xml.impress.template"],
1964
+ ["stk", "application/hyperstudio"],
1965
+ ["stl", "model/stl"],
1966
+ ["stpx", "model/step+xml"],
1967
+ ["stpxz", "model/step-xml+zip"],
1968
+ ["stpz", "model/step+zip"],
1969
+ ["str", "application/vnd.pg.format"],
1970
+ ["stw", "application/vnd.sun.xml.writer.template"],
1971
+ ["styl", "text/stylus"],
1972
+ ["stylus", "text/stylus"],
1973
+ ["sub", "text/vnd.dvb.subtitle"],
1974
+ ["sus", "application/vnd.sus-calendar"],
1975
+ ["susp", "application/vnd.sus-calendar"],
1976
+ ["sv4cpio", "application/x-sv4cpio"],
1977
+ ["sv4crc", "application/x-sv4crc"],
1978
+ ["svc", "application/vnd.dvb.service"],
1979
+ ["svd", "application/vnd.svd"],
1980
+ ["svg", "image/svg+xml"],
1981
+ ["svgz", "image/svg+xml"],
1982
+ ["swa", "application/x-director"],
1983
+ ["swf", "application/x-shockwave-flash"],
1984
+ ["swi", "application/vnd.aristanetworks.swi"],
1985
+ ["swidtag", "application/swid+xml"],
1986
+ ["sxc", "application/vnd.sun.xml.calc"],
1987
+ ["sxd", "application/vnd.sun.xml.draw"],
1988
+ ["sxg", "application/vnd.sun.xml.writer.global"],
1989
+ ["sxi", "application/vnd.sun.xml.impress"],
1990
+ ["sxm", "application/vnd.sun.xml.math"],
1991
+ ["sxw", "application/vnd.sun.xml.writer"],
1992
+ ["t", "text/troff"],
1993
+ ["t3", "application/x-t3vm-image"],
1994
+ ["t38", "image/t38"],
1995
+ ["taglet", "application/vnd.mynfc"],
1996
+ ["tao", "application/vnd.tao.intent-module-archive"],
1997
+ ["tap", "image/vnd.tencent.tap"],
1998
+ ["tar", "application/x-tar"],
1999
+ ["tcap", "application/vnd.3gpp2.tcap"],
2000
+ ["tcl", "application/x-tcl"],
2001
+ ["td", "application/urc-targetdesc+xml"],
2002
+ ["teacher", "application/vnd.smart.teacher"],
2003
+ ["tei", "application/tei+xml"],
2004
+ ["teicorpus", "application/tei+xml"],
2005
+ ["tex", "application/x-tex"],
2006
+ ["texi", "application/x-texinfo"],
2007
+ ["texinfo", "application/x-texinfo"],
2008
+ ["text", "text/plain"],
2009
+ ["tfi", "application/thraud+xml"],
2010
+ ["tfm", "application/x-tex-tfm"],
2011
+ ["tfx", "image/tiff-fx"],
2012
+ ["tga", "image/x-tga"],
2013
+ ["tgz", "application/x-tar"],
2014
+ ["thmx", "application/vnd.ms-officetheme"],
2015
+ ["tif", "image/tiff"],
2016
+ ["tiff", "image/tiff"],
2017
+ ["tk", "application/x-tcl"],
2018
+ ["tmo", "application/vnd.tmobile-livetv"],
2019
+ ["toml", "application/toml"],
2020
+ ["torrent", "application/x-bittorrent"],
2021
+ ["tpl", "application/vnd.groove-tool-template"],
2022
+ ["tpt", "application/vnd.trid.tpt"],
2023
+ ["tr", "text/troff"],
2024
+ ["tra", "application/vnd.trueapp"],
2025
+ ["trig", "application/trig"],
2026
+ ["trm", "application/x-msterminal"],
2027
+ ["ts", "video/mp2t"],
2028
+ ["tsd", "application/timestamped-data"],
2029
+ ["tsv", "text/tab-separated-values"],
2030
+ ["ttc", "font/collection"],
2031
+ ["ttf", "font/ttf"],
2032
+ ["ttl", "text/turtle"],
2033
+ ["ttml", "application/ttml+xml"],
2034
+ ["twd", "application/vnd.simtech-mindmapper"],
2035
+ ["twds", "application/vnd.simtech-mindmapper"],
2036
+ ["txd", "application/vnd.genomatix.tuxedo"],
2037
+ ["txf", "application/vnd.mobius.txf"],
2038
+ ["txt", "text/plain"],
2039
+ ["u8dsn", "message/global-delivery-status"],
2040
+ ["u8hdr", "message/global-headers"],
2041
+ ["u8mdn", "message/global-disposition-notification"],
2042
+ ["u8msg", "message/global"],
2043
+ ["u32", "application/x-authorware-bin"],
2044
+ ["ubj", "application/ubjson"],
2045
+ ["udeb", "application/x-debian-package"],
2046
+ ["ufd", "application/vnd.ufdl"],
2047
+ ["ufdl", "application/vnd.ufdl"],
2048
+ ["ulx", "application/x-glulx"],
2049
+ ["umj", "application/vnd.umajin"],
2050
+ ["unityweb", "application/vnd.unity"],
2051
+ ["uoml", "application/vnd.uoml+xml"],
2052
+ ["uri", "text/uri-list"],
2053
+ ["uris", "text/uri-list"],
2054
+ ["urls", "text/uri-list"],
2055
+ ["usdz", "model/vnd.usdz+zip"],
2056
+ ["ustar", "application/x-ustar"],
2057
+ ["utz", "application/vnd.uiq.theme"],
2058
+ ["uu", "text/x-uuencode"],
2059
+ ["uva", "audio/vnd.dece.audio"],
2060
+ ["uvd", "application/vnd.dece.data"],
2061
+ ["uvf", "application/vnd.dece.data"],
2062
+ ["uvg", "image/vnd.dece.graphic"],
2063
+ ["uvh", "video/vnd.dece.hd"],
2064
+ ["uvi", "image/vnd.dece.graphic"],
2065
+ ["uvm", "video/vnd.dece.mobile"],
2066
+ ["uvp", "video/vnd.dece.pd"],
2067
+ ["uvs", "video/vnd.dece.sd"],
2068
+ ["uvt", "application/vnd.dece.ttml+xml"],
2069
+ ["uvu", "video/vnd.uvvu.mp4"],
2070
+ ["uvv", "video/vnd.dece.video"],
2071
+ ["uvva", "audio/vnd.dece.audio"],
2072
+ ["uvvd", "application/vnd.dece.data"],
2073
+ ["uvvf", "application/vnd.dece.data"],
2074
+ ["uvvg", "image/vnd.dece.graphic"],
2075
+ ["uvvh", "video/vnd.dece.hd"],
2076
+ ["uvvi", "image/vnd.dece.graphic"],
2077
+ ["uvvm", "video/vnd.dece.mobile"],
2078
+ ["uvvp", "video/vnd.dece.pd"],
2079
+ ["uvvs", "video/vnd.dece.sd"],
2080
+ ["uvvt", "application/vnd.dece.ttml+xml"],
2081
+ ["uvvu", "video/vnd.uvvu.mp4"],
2082
+ ["uvvv", "video/vnd.dece.video"],
2083
+ ["uvvx", "application/vnd.dece.unspecified"],
2084
+ ["uvvz", "application/vnd.dece.zip"],
2085
+ ["uvx", "application/vnd.dece.unspecified"],
2086
+ ["uvz", "application/vnd.dece.zip"],
2087
+ ["vbox", "application/x-virtualbox-vbox"],
2088
+ ["vbox-extpack", "application/x-virtualbox-vbox-extpack"],
2089
+ ["vcard", "text/vcard"],
2090
+ ["vcd", "application/x-cdlink"],
2091
+ ["vcf", "text/x-vcard"],
2092
+ ["vcg", "application/vnd.groove-vcard"],
2093
+ ["vcs", "text/x-vcalendar"],
2094
+ ["vcx", "application/vnd.vcx"],
2095
+ ["vdi", "application/x-virtualbox-vdi"],
2096
+ ["vds", "model/vnd.sap.vds"],
2097
+ ["vhd", "application/x-virtualbox-vhd"],
2098
+ ["vis", "application/vnd.visionary"],
2099
+ ["viv", "video/vnd.vivo"],
2100
+ ["vlc", "application/videolan"],
2101
+ ["vmdk", "application/x-virtualbox-vmdk"],
2102
+ ["vob", "video/x-ms-vob"],
2103
+ ["vor", "application/vnd.stardivision.writer"],
2104
+ ["vox", "application/x-authorware-bin"],
2105
+ ["vrml", "model/vrml"],
2106
+ ["vsd", "application/vnd.visio"],
2107
+ ["vsf", "application/vnd.vsf"],
2108
+ ["vss", "application/vnd.visio"],
2109
+ ["vst", "application/vnd.visio"],
2110
+ ["vsw", "application/vnd.visio"],
2111
+ ["vtf", "image/vnd.valve.source.texture"],
2112
+ ["vtt", "text/vtt"],
2113
+ ["vtu", "model/vnd.vtu"],
2114
+ ["vxml", "application/voicexml+xml"],
2115
+ ["w3d", "application/x-director"],
2116
+ ["wad", "application/x-doom"],
2117
+ ["wadl", "application/vnd.sun.wadl+xml"],
2118
+ ["war", "application/java-archive"],
2119
+ ["wasm", "application/wasm"],
2120
+ ["wav", "audio/x-wav"],
2121
+ ["wax", "audio/x-ms-wax"],
2122
+ ["wbmp", "image/vnd.wap.wbmp"],
2123
+ ["wbs", "application/vnd.criticaltools.wbs+xml"],
2124
+ ["wbxml", "application/wbxml"],
2125
+ ["wcm", "application/vnd.ms-works"],
2126
+ ["wdb", "application/vnd.ms-works"],
2127
+ ["wdp", "image/vnd.ms-photo"],
2128
+ ["weba", "audio/webm"],
2129
+ ["webapp", "application/x-web-app-manifest+json"],
2130
+ ["webm", "video/webm"],
2131
+ ["webmanifest", "application/manifest+json"],
2132
+ ["webp", "image/webp"],
2133
+ ["wg", "application/vnd.pmi.widget"],
2134
+ ["wgt", "application/widget"],
2135
+ ["wks", "application/vnd.ms-works"],
2136
+ ["wm", "video/x-ms-wm"],
2137
+ ["wma", "audio/x-ms-wma"],
2138
+ ["wmd", "application/x-ms-wmd"],
2139
+ ["wmf", "image/wmf"],
2140
+ ["wml", "text/vnd.wap.wml"],
2141
+ ["wmlc", "application/wmlc"],
2142
+ ["wmls", "text/vnd.wap.wmlscript"],
2143
+ ["wmlsc", "application/vnd.wap.wmlscriptc"],
2144
+ ["wmv", "video/x-ms-wmv"],
2145
+ ["wmx", "video/x-ms-wmx"],
2146
+ ["wmz", "application/x-msmetafile"],
2147
+ ["woff", "font/woff"],
2148
+ ["woff2", "font/woff2"],
2149
+ ["word", "application/msword"],
2150
+ ["wpd", "application/vnd.wordperfect"],
2151
+ ["wpl", "application/vnd.ms-wpl"],
2152
+ ["wps", "application/vnd.ms-works"],
2153
+ ["wqd", "application/vnd.wqd"],
2154
+ ["wri", "application/x-mswrite"],
2155
+ ["wrl", "model/vrml"],
2156
+ ["wsc", "message/vnd.wfa.wsc"],
2157
+ ["wsdl", "application/wsdl+xml"],
2158
+ ["wspolicy", "application/wspolicy+xml"],
2159
+ ["wtb", "application/vnd.webturbo"],
2160
+ ["wvx", "video/x-ms-wvx"],
2161
+ ["x3d", "model/x3d+xml"],
2162
+ ["x3db", "model/x3d+fastinfoset"],
2163
+ ["x3dbz", "model/x3d+binary"],
2164
+ ["x3dv", "model/x3d-vrml"],
2165
+ ["x3dvz", "model/x3d+vrml"],
2166
+ ["x3dz", "model/x3d+xml"],
2167
+ ["x32", "application/x-authorware-bin"],
2168
+ ["x_b", "model/vnd.parasolid.transmit.binary"],
2169
+ ["x_t", "model/vnd.parasolid.transmit.text"],
2170
+ ["xaml", "application/xaml+xml"],
2171
+ ["xap", "application/x-silverlight-app"],
2172
+ ["xar", "application/vnd.xara"],
2173
+ ["xav", "application/xcap-att+xml"],
2174
+ ["xbap", "application/x-ms-xbap"],
2175
+ ["xbd", "application/vnd.fujixerox.docuworks.binder"],
2176
+ ["xbm", "image/x-xbitmap"],
2177
+ ["xca", "application/xcap-caps+xml"],
2178
+ ["xcs", "application/calendar+xml"],
2179
+ ["xdf", "application/xcap-diff+xml"],
2180
+ ["xdm", "application/vnd.syncml.dm+xml"],
2181
+ ["xdp", "application/vnd.adobe.xdp+xml"],
2182
+ ["xdssc", "application/dssc+xml"],
2183
+ ["xdw", "application/vnd.fujixerox.docuworks"],
2184
+ ["xel", "application/xcap-el+xml"],
2185
+ ["xenc", "application/xenc+xml"],
2186
+ ["xer", "application/patch-ops-error+xml"],
2187
+ ["xfdf", "application/vnd.adobe.xfdf"],
2188
+ ["xfdl", "application/vnd.xfdl"],
2189
+ ["xht", "application/xhtml+xml"],
2190
+ ["xhtml", "application/xhtml+xml"],
2191
+ ["xhvml", "application/xv+xml"],
2192
+ ["xif", "image/vnd.xiff"],
2193
+ ["xl", "application/excel"],
2194
+ ["xla", "application/vnd.ms-excel"],
2195
+ ["xlam", "application/vnd.ms-excel.addin.macroEnabled.12"],
2196
+ ["xlc", "application/vnd.ms-excel"],
2197
+ ["xlf", "application/xliff+xml"],
2198
+ ["xlm", "application/vnd.ms-excel"],
2199
+ ["xls", "application/vnd.ms-excel"],
2200
+ ["xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"],
2201
+ ["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
2202
+ ["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
2203
+ ["xlt", "application/vnd.ms-excel"],
2204
+ ["xltm", "application/vnd.ms-excel.template.macroEnabled.12"],
2205
+ ["xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"],
2206
+ ["xlw", "application/vnd.ms-excel"],
2207
+ ["xm", "audio/xm"],
2208
+ ["xml", "application/xml"],
2209
+ ["xns", "application/xcap-ns+xml"],
2210
+ ["xo", "application/vnd.olpc-sugar"],
2211
+ ["xop", "application/xop+xml"],
2212
+ ["xpi", "application/x-xpinstall"],
2213
+ ["xpl", "application/xproc+xml"],
2214
+ ["xpm", "image/x-xpixmap"],
2215
+ ["xpr", "application/vnd.is-xpr"],
2216
+ ["xps", "application/vnd.ms-xpsdocument"],
2217
+ ["xpw", "application/vnd.intercon.formnet"],
2218
+ ["xpx", "application/vnd.intercon.formnet"],
2219
+ ["xsd", "application/xml"],
2220
+ ["xsl", "application/xml"],
2221
+ ["xslt", "application/xslt+xml"],
2222
+ ["xsm", "application/vnd.syncml+xml"],
2223
+ ["xspf", "application/xspf+xml"],
2224
+ ["xul", "application/vnd.mozilla.xul+xml"],
2225
+ ["xvm", "application/xv+xml"],
2226
+ ["xvml", "application/xv+xml"],
2227
+ ["xwd", "image/x-xwindowdump"],
2228
+ ["xyz", "chemical/x-xyz"],
2229
+ ["xz", "application/x-xz"],
2230
+ ["yaml", "text/yaml"],
2231
+ ["yang", "application/yang"],
2232
+ ["yin", "application/yin+xml"],
2233
+ ["yml", "text/yaml"],
2234
+ ["ymp", "text/x-suse-ymp"],
2235
+ ["z", "application/x-compress"],
2236
+ ["z1", "application/x-zmachine"],
2237
+ ["z2", "application/x-zmachine"],
2238
+ ["z3", "application/x-zmachine"],
2239
+ ["z4", "application/x-zmachine"],
2240
+ ["z5", "application/x-zmachine"],
2241
+ ["z6", "application/x-zmachine"],
2242
+ ["z7", "application/x-zmachine"],
2243
+ ["z8", "application/x-zmachine"],
2244
+ ["zaz", "application/vnd.zzazz.deck+xml"],
2245
+ ["zip", "application/zip"],
2246
+ ["zir", "application/vnd.zul"],
2247
+ ["zirz", "application/vnd.zul"],
2248
+ ["zmm", "application/vnd.handheld-entertainment+xml"],
2249
+ ["zsh", "text/x-scriptzsh"]
2250
+ ]);
2251
+ function toFileWithPath(file, path, h) {
2252
+ const f = withMimeType(file);
2253
+ const { webkitRelativePath } = file;
2254
+ const p = typeof path === "string" ? path : typeof webkitRelativePath === "string" && webkitRelativePath.length > 0 ? webkitRelativePath : `./${file.name}`;
2255
+ if (typeof f.path !== "string") {
2256
+ setObjProp(f, "path", p);
2257
+ }
2258
+ setObjProp(f, "relativePath", p);
2259
+ return f;
2260
+ }
2261
+ function withMimeType(file) {
2262
+ const { name } = file;
2263
+ const hasExtension = name && name.lastIndexOf(".") !== -1;
2264
+ if (hasExtension && !file.type) {
2265
+ const ext = name.split(".").pop().toLowerCase();
2266
+ const type = COMMON_MIME_TYPES.get(ext);
2267
+ if (type) {
2268
+ Object.defineProperty(file, "type", {
2269
+ value: type,
2270
+ writable: false,
2271
+ configurable: false,
2272
+ enumerable: true
2273
+ });
2274
+ }
2275
+ }
2276
+ return file;
2277
+ }
2278
+ function setObjProp(f, key, value) {
2279
+ Object.defineProperty(f, key, {
2280
+ value,
2281
+ writable: false,
2282
+ configurable: false,
2283
+ enumerable: true
2284
+ });
2285
+ }
2286
+ const FILES_TO_IGNORE = [
2287
+ // Thumbnail cache files for macOS and Windows
2288
+ ".DS_Store",
2289
+ // macOs
2290
+ "Thumbs.db"
2291
+ // Windows
2292
+ ];
2293
+ function fromEvent(evt) {
2294
+ return __awaiter(this, void 0, void 0, function* () {
2295
+ if (isObject(evt) && isDataTransfer(evt.dataTransfer)) {
2296
+ return getDataTransferFiles(evt.dataTransfer, evt.type);
2297
+ } else if (isChangeEvt(evt)) {
2298
+ return getInputFiles(evt);
2299
+ } else if (Array.isArray(evt) && evt.every((item) => "getFile" in item && typeof item.getFile === "function")) {
2300
+ return getFsHandleFiles(evt);
2301
+ }
2302
+ return [];
2303
+ });
2304
+ }
2305
+ function isDataTransfer(value) {
2306
+ return isObject(value);
2307
+ }
2308
+ function isChangeEvt(value) {
2309
+ return isObject(value) && isObject(value.target);
2310
+ }
2311
+ function isObject(v) {
2312
+ return typeof v === "object" && v !== null;
2313
+ }
2314
+ function getInputFiles(evt) {
2315
+ return fromList(evt.target.files).map((file) => toFileWithPath(file));
2316
+ }
2317
+ function getFsHandleFiles(handles) {
2318
+ return __awaiter(this, void 0, void 0, function* () {
2319
+ const files = yield Promise.all(handles.map((h) => h.getFile()));
2320
+ return files.map((file) => toFileWithPath(file));
2321
+ });
2322
+ }
2323
+ function getDataTransferFiles(dt, type) {
2324
+ return __awaiter(this, void 0, void 0, function* () {
2325
+ if (dt.items) {
2326
+ const items = fromList(dt.items).filter((item) => item.kind === "file");
2327
+ if (type !== "drop") {
2328
+ return items;
2329
+ }
2330
+ const files = yield Promise.all(items.map(toFilePromises));
2331
+ return noIgnoredFiles(flatten(files));
2332
+ }
2333
+ return noIgnoredFiles(fromList(dt.files).map((file) => toFileWithPath(file)));
2334
+ });
2335
+ }
2336
+ function noIgnoredFiles(files) {
2337
+ return files.filter((file) => FILES_TO_IGNORE.indexOf(file.name) === -1);
2338
+ }
2339
+ function fromList(items) {
2340
+ if (items === null) {
2341
+ return [];
2342
+ }
2343
+ const files = [];
2344
+ for (let i = 0; i < items.length; i++) {
2345
+ const file = items[i];
2346
+ files.push(file);
2347
+ }
2348
+ return files;
2349
+ }
2350
+ function toFilePromises(item) {
2351
+ if (typeof item.webkitGetAsEntry !== "function") {
2352
+ return fromDataTransferItem(item);
2353
+ }
2354
+ const entry = item.webkitGetAsEntry();
2355
+ if (entry && entry.isDirectory) {
2356
+ return fromDirEntry(entry);
2357
+ }
2358
+ return fromDataTransferItem(item, entry);
2359
+ }
2360
+ function flatten(items) {
2361
+ return items.reduce((acc, files) => [
2362
+ ...acc,
2363
+ ...Array.isArray(files) ? flatten(files) : [files]
2364
+ ], []);
2365
+ }
2366
+ function fromDataTransferItem(item, entry) {
2367
+ return __awaiter(this, void 0, void 0, function* () {
2368
+ var _a;
2369
+ if (globalThis.isSecureContext && typeof item.getAsFileSystemHandle === "function") {
2370
+ const h = yield item.getAsFileSystemHandle();
2371
+ if (h === null) {
2372
+ throw new Error(`${item} is not a File`);
2373
+ }
2374
+ if (h !== void 0) {
2375
+ const file2 = yield h.getFile();
2376
+ file2.handle = h;
2377
+ return toFileWithPath(file2);
2378
+ }
2379
+ }
2380
+ const file = item.getAsFile();
2381
+ if (!file) {
2382
+ throw new Error(`${item} is not a File`);
2383
+ }
2384
+ const fwp = toFileWithPath(file, (_a = entry === null || entry === void 0 ? void 0 : entry.fullPath) !== null && _a !== void 0 ? _a : void 0);
2385
+ return fwp;
2386
+ });
2387
+ }
2388
+ function fromEntry(entry) {
2389
+ return __awaiter(this, void 0, void 0, function* () {
2390
+ return entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry);
2391
+ });
2392
+ }
2393
+ function fromDirEntry(entry) {
2394
+ const reader = entry.createReader();
2395
+ return new Promise((resolve, reject) => {
2396
+ const entries = [];
2397
+ function readEntries() {
2398
+ reader.readEntries((batch) => __awaiter(this, void 0, void 0, function* () {
2399
+ if (!batch.length) {
2400
+ try {
2401
+ const files = yield Promise.all(entries);
2402
+ resolve(files);
2403
+ } catch (err) {
2404
+ reject(err);
2405
+ }
2406
+ } else {
2407
+ const items = Promise.all(batch.map(fromEntry));
2408
+ entries.push(items);
2409
+ readEntries();
2410
+ }
2411
+ }), (err) => {
2412
+ reject(err);
2413
+ });
2414
+ }
2415
+ readEntries();
2416
+ });
2417
+ }
2418
+ function fromFileEntry(entry) {
2419
+ return __awaiter(this, void 0, void 0, function* () {
2420
+ return new Promise((resolve, reject) => {
2421
+ entry.file((file) => {
2422
+ const fwp = toFileWithPath(file, entry.fullPath);
2423
+ resolve(fwp);
2424
+ }, (err) => {
2425
+ reject(err);
2426
+ });
2427
+ });
2428
+ });
2429
+ }
2430
+ var es = {};
2431
+ var hasRequiredEs;
2432
+ function requireEs() {
2433
+ if (hasRequiredEs) return es;
2434
+ hasRequiredEs = 1;
2435
+ es.__esModule = true;
2436
+ es.default = function(file, acceptedFiles) {
2437
+ if (file && acceptedFiles) {
2438
+ var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
2439
+ if (acceptedFilesArray.length === 0) {
2440
+ return true;
2441
+ }
2442
+ var fileName = file.name || "";
2443
+ var mimeType = (file.type || "").toLowerCase();
2444
+ var baseMimeType = mimeType.replace(/\/.*$/, "");
2445
+ return acceptedFilesArray.some(function(type) {
2446
+ var validType = type.trim().toLowerCase();
2447
+ if (validType.charAt(0) === ".") {
2448
+ return fileName.toLowerCase().endsWith(validType);
2449
+ } else if (validType.endsWith("/*")) {
2450
+ return baseMimeType === validType.replace(/\/.*$/, "");
2451
+ }
2452
+ return mimeType === validType;
2453
+ });
2454
+ }
2455
+ return true;
2456
+ };
2457
+ return es;
2458
+ }
2459
+ var esExports = requireEs();
2460
+ const _accepts = /* @__PURE__ */ getDefaultExportFromCjs(esExports);
2461
+ function _toConsumableArray$1(arr) {
2462
+ return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1();
2463
+ }
2464
+ function _nonIterableSpread$1() {
2465
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2466
+ }
2467
+ function _iterableToArray$1(iter) {
2468
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2469
+ }
2470
+ function _arrayWithoutHoles$1(arr) {
2471
+ if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
2472
+ }
2473
+ function ownKeys$1(object, enumerableOnly) {
2474
+ var keys = Object.keys(object);
2475
+ if (Object.getOwnPropertySymbols) {
2476
+ var symbols = Object.getOwnPropertySymbols(object);
2477
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
2478
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2479
+ })), keys.push.apply(keys, symbols);
2480
+ }
2481
+ return keys;
2482
+ }
2483
+ function _objectSpread$1(target) {
2484
+ for (var i = 1; i < arguments.length; i++) {
2485
+ var source = null != arguments[i] ? arguments[i] : {};
2486
+ i % 2 ? ownKeys$1(Object(source), true).forEach(function(key) {
2487
+ _defineProperty$1(target, key, source[key]);
2488
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function(key) {
2489
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2490
+ });
2491
+ }
2492
+ return target;
2493
+ }
2494
+ function _defineProperty$1(obj, key, value) {
2495
+ if (key in obj) {
2496
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
2497
+ } else {
2498
+ obj[key] = value;
2499
+ }
2500
+ return obj;
2501
+ }
2502
+ function _slicedToArray$1(arr, i) {
2503
+ return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
2504
+ }
2505
+ function _nonIterableRest$1() {
2506
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2507
+ }
2508
+ function _unsupportedIterableToArray$1(o, minLen) {
2509
+ if (!o) return;
2510
+ if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
2511
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2512
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2513
+ if (n === "Map" || n === "Set") return Array.from(o);
2514
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
2515
+ }
2516
+ function _arrayLikeToArray$1(arr, len) {
2517
+ if (len == null || len > arr.length) len = arr.length;
2518
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2519
+ arr2[i] = arr[i];
2520
+ }
2521
+ return arr2;
2522
+ }
2523
+ function _iterableToArrayLimit$1(arr, i) {
2524
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2525
+ if (_i == null) return;
2526
+ var _arr = [];
2527
+ var _n = true;
2528
+ var _d = false;
2529
+ var _s, _e;
2530
+ try {
2531
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
2532
+ _arr.push(_s.value);
2533
+ if (i && _arr.length === i) break;
2534
+ }
2535
+ } catch (err) {
2536
+ _d = true;
2537
+ _e = err;
2538
+ } finally {
2539
+ try {
2540
+ if (!_n && _i["return"] != null) _i["return"]();
2541
+ } finally {
2542
+ if (_d) throw _e;
2543
+ }
2544
+ }
2545
+ return _arr;
2546
+ }
2547
+ function _arrayWithHoles$1(arr) {
2548
+ if (Array.isArray(arr)) return arr;
2549
+ }
2550
+ var accepts = typeof _accepts === "function" ? _accepts : _accepts.default;
2551
+ var FILE_INVALID_TYPE = "file-invalid-type";
2552
+ var FILE_TOO_LARGE = "file-too-large";
2553
+ var FILE_TOO_SMALL = "file-too-small";
2554
+ var TOO_MANY_FILES = "too-many-files";
2555
+ var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr2() {
2556
+ var accept = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
2557
+ var acceptArr = accept.split(",");
2558
+ var msg = acceptArr.length > 1 ? "one of ".concat(acceptArr.join(", ")) : acceptArr[0];
2559
+ return {
2560
+ code: FILE_INVALID_TYPE,
2561
+ message: "File type must be ".concat(msg)
2562
+ };
2563
+ };
2564
+ var getTooLargeRejectionErr = function getTooLargeRejectionErr2(maxSize) {
2565
+ return {
2566
+ code: FILE_TOO_LARGE,
2567
+ message: "File is larger than ".concat(maxSize, " ").concat(maxSize === 1 ? "byte" : "bytes")
2568
+ };
2569
+ };
2570
+ var getTooSmallRejectionErr = function getTooSmallRejectionErr2(minSize) {
2571
+ return {
2572
+ code: FILE_TOO_SMALL,
2573
+ message: "File is smaller than ".concat(minSize, " ").concat(minSize === 1 ? "byte" : "bytes")
2574
+ };
2575
+ };
2576
+ var TOO_MANY_FILES_REJECTION = {
2577
+ code: TOO_MANY_FILES,
2578
+ message: "Too many files"
2579
+ };
2580
+ function fileAccepted(file, accept) {
2581
+ var isAcceptable = file.type === "application/x-moz-file" || accepts(file, accept);
2582
+ return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];
2583
+ }
2584
+ function fileMatchSize(file, minSize, maxSize) {
2585
+ if (isDefined(file.size)) {
2586
+ if (isDefined(minSize) && isDefined(maxSize)) {
2587
+ if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
2588
+ if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
2589
+ } else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
2590
+ else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
2591
+ }
2592
+ return [true, null];
2593
+ }
2594
+ function isDefined(value) {
2595
+ return value !== void 0 && value !== null;
2596
+ }
2597
+ function allFilesAccepted(_ref) {
2598
+ var files = _ref.files, accept = _ref.accept, minSize = _ref.minSize, maxSize = _ref.maxSize, multiple = _ref.multiple, maxFiles = _ref.maxFiles, validator = _ref.validator;
2599
+ if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {
2600
+ return false;
2601
+ }
2602
+ return files.every(function(file) {
2603
+ var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray$1(_fileAccepted, 1), accepted = _fileAccepted2[0];
2604
+ var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray$1(_fileMatchSize, 1), sizeMatch = _fileMatchSize2[0];
2605
+ var customErrors = validator ? validator(file) : null;
2606
+ return accepted && sizeMatch && !customErrors;
2607
+ });
2608
+ }
2609
+ function isPropagationStopped(event) {
2610
+ if (typeof event.isPropagationStopped === "function") {
2611
+ return event.isPropagationStopped();
2612
+ } else if (typeof event.cancelBubble !== "undefined") {
2613
+ return event.cancelBubble;
2614
+ }
2615
+ return false;
2616
+ }
2617
+ function isEvtWithFiles(event) {
2618
+ if (!event.dataTransfer) {
2619
+ return !!event.target && !!event.target.files;
2620
+ }
2621
+ return Array.prototype.some.call(event.dataTransfer.types, function(type) {
2622
+ return type === "Files" || type === "application/x-moz-file";
2623
+ });
2624
+ }
2625
+ function onDocumentDragOver(event) {
2626
+ event.preventDefault();
2627
+ }
2628
+ function isIe(userAgent) {
2629
+ return userAgent.indexOf("MSIE") !== -1 || userAgent.indexOf("Trident/") !== -1;
2630
+ }
2631
+ function isEdge(userAgent) {
2632
+ return userAgent.indexOf("Edge/") !== -1;
2633
+ }
2634
+ function isIeOrEdge() {
2635
+ var userAgent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
2636
+ return isIe(userAgent) || isEdge(userAgent);
2637
+ }
2638
+ function composeEventHandlers() {
2639
+ for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
2640
+ fns[_key] = arguments[_key];
2641
+ }
2642
+ return function(event) {
2643
+ for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
2644
+ args[_key2 - 1] = arguments[_key2];
2645
+ }
2646
+ return fns.some(function(fn) {
2647
+ if (!isPropagationStopped(event) && fn) {
2648
+ fn.apply(void 0, [event].concat(args));
2649
+ }
2650
+ return isPropagationStopped(event);
2651
+ });
2652
+ };
2653
+ }
2654
+ function canUseFileSystemAccessAPI() {
2655
+ return "showOpenFilePicker" in window;
2656
+ }
2657
+ function pickerOptionsFromAccept(accept) {
2658
+ if (isDefined(accept)) {
2659
+ var acceptForPicker = Object.entries(accept).filter(function(_ref2) {
2660
+ var _ref3 = _slicedToArray$1(_ref2, 2), mimeType = _ref3[0], ext = _ref3[1];
2661
+ var ok = true;
2662
+ if (!isMIMEType(mimeType)) {
2663
+ console.warn('Skipped "'.concat(mimeType, '" 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.'));
2664
+ ok = false;
2665
+ }
2666
+ if (!Array.isArray(ext) || !ext.every(isExt)) {
2667
+ console.warn('Skipped "'.concat(mimeType, '" because an invalid file extension was provided.'));
2668
+ ok = false;
2669
+ }
2670
+ return ok;
2671
+ }).reduce(function(agg, _ref4) {
2672
+ var _ref5 = _slicedToArray$1(_ref4, 2), mimeType = _ref5[0], ext = _ref5[1];
2673
+ return _objectSpread$1(_objectSpread$1({}, agg), {}, _defineProperty$1({}, mimeType, ext));
2674
+ }, {});
2675
+ return [{
2676
+ // description is required due to https://crbug.com/1264708
2677
+ description: "Files",
2678
+ accept: acceptForPicker
2679
+ }];
2680
+ }
2681
+ return accept;
2682
+ }
2683
+ function acceptPropAsAcceptAttr(accept) {
2684
+ if (isDefined(accept)) {
2685
+ return Object.entries(accept).reduce(function(a, _ref6) {
2686
+ var _ref7 = _slicedToArray$1(_ref6, 2), mimeType = _ref7[0], ext = _ref7[1];
2687
+ return [].concat(_toConsumableArray$1(a), [mimeType], _toConsumableArray$1(ext));
2688
+ }, []).filter(function(v) {
2689
+ return isMIMEType(v) || isExt(v);
2690
+ }).join(",");
2691
+ }
2692
+ return void 0;
2693
+ }
2694
+ function isAbort(v) {
2695
+ return v instanceof DOMException && (v.name === "AbortError" || v.code === v.ABORT_ERR);
2696
+ }
2697
+ function isSecurityError(v) {
2698
+ return v instanceof DOMException && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
2699
+ }
2700
+ function isMIMEType(v) {
2701
+ return v === "audio/*" || v === "video/*" || v === "image/*" || v === "text/*" || v === "application/*" || /\w+\/[-+.\w]+/g.test(v);
2702
+ }
2703
+ function isExt(v) {
2704
+ return /^.*\.[\w]+$/.test(v);
2705
+ }
2706
+ var _excluded = ["children"], _excluded2 = ["open"], _excluded3 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], _excluded4 = ["refKey", "onChange", "onClick"];
2707
+ function _toConsumableArray(arr) {
2708
+ return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
2709
+ }
2710
+ function _nonIterableSpread() {
2711
+ throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2712
+ }
2713
+ function _iterableToArray(iter) {
2714
+ if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
2715
+ }
2716
+ function _arrayWithoutHoles(arr) {
2717
+ if (Array.isArray(arr)) return _arrayLikeToArray(arr);
2718
+ }
2719
+ function _slicedToArray(arr, i) {
2720
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
2721
+ }
2722
+ function _nonIterableRest() {
2723
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
2724
+ }
2725
+ function _unsupportedIterableToArray(o, minLen) {
2726
+ if (!o) return;
2727
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
2728
+ var n = Object.prototype.toString.call(o).slice(8, -1);
2729
+ if (n === "Object" && o.constructor) n = o.constructor.name;
2730
+ if (n === "Map" || n === "Set") return Array.from(o);
2731
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
2732
+ }
2733
+ function _arrayLikeToArray(arr, len) {
2734
+ if (len == null || len > arr.length) len = arr.length;
2735
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
2736
+ arr2[i] = arr[i];
2737
+ }
2738
+ return arr2;
2739
+ }
2740
+ function _iterableToArrayLimit(arr, i) {
2741
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
2742
+ if (_i == null) return;
2743
+ var _arr = [];
2744
+ var _n = true;
2745
+ var _d = false;
2746
+ var _s, _e;
2747
+ try {
2748
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
2749
+ _arr.push(_s.value);
2750
+ if (i && _arr.length === i) break;
2751
+ }
2752
+ } catch (err) {
2753
+ _d = true;
2754
+ _e = err;
2755
+ } finally {
2756
+ try {
2757
+ if (!_n && _i["return"] != null) _i["return"]();
2758
+ } finally {
2759
+ if (_d) throw _e;
2760
+ }
2761
+ }
2762
+ return _arr;
2763
+ }
2764
+ function _arrayWithHoles(arr) {
2765
+ if (Array.isArray(arr)) return arr;
2766
+ }
2767
+ function ownKeys(object, enumerableOnly) {
2768
+ var keys = Object.keys(object);
2769
+ if (Object.getOwnPropertySymbols) {
2770
+ var symbols = Object.getOwnPropertySymbols(object);
2771
+ enumerableOnly && (symbols = symbols.filter(function(sym) {
2772
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
2773
+ })), keys.push.apply(keys, symbols);
2774
+ }
2775
+ return keys;
2776
+ }
2777
+ function _objectSpread(target) {
2778
+ for (var i = 1; i < arguments.length; i++) {
2779
+ var source = null != arguments[i] ? arguments[i] : {};
2780
+ i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
2781
+ _defineProperty(target, key, source[key]);
2782
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
2783
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
2784
+ });
2785
+ }
2786
+ return target;
2787
+ }
2788
+ function _defineProperty(obj, key, value) {
2789
+ if (key in obj) {
2790
+ Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
2791
+ } else {
2792
+ obj[key] = value;
2793
+ }
2794
+ return obj;
2795
+ }
2796
+ function _objectWithoutProperties(source, excluded) {
2797
+ if (source == null) return {};
2798
+ var target = _objectWithoutPropertiesLoose(source, excluded);
2799
+ var key, i;
2800
+ if (Object.getOwnPropertySymbols) {
2801
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
2802
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
2803
+ key = sourceSymbolKeys[i];
2804
+ if (excluded.indexOf(key) >= 0) continue;
2805
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
2806
+ target[key] = source[key];
2807
+ }
2808
+ }
2809
+ return target;
2810
+ }
2811
+ function _objectWithoutPropertiesLoose(source, excluded) {
2812
+ if (source == null) return {};
2813
+ var target = {};
2814
+ var sourceKeys = Object.keys(source);
2815
+ var key, i;
2816
+ for (i = 0; i < sourceKeys.length; i++) {
2817
+ key = sourceKeys[i];
2818
+ if (excluded.indexOf(key) >= 0) continue;
2819
+ target[key] = source[key];
2820
+ }
2821
+ return target;
2822
+ }
2823
+ var Dropzone$1 = /* @__PURE__ */ forwardRef(function(_ref, ref) {
2824
+ var children = _ref.children, params = _objectWithoutProperties(_ref, _excluded);
2825
+ var _useDropzone = useDropzone(params), open = _useDropzone.open, props = _objectWithoutProperties(_useDropzone, _excluded2);
2826
+ useImperativeHandle(ref, function() {
2827
+ return {
2828
+ open
2829
+ };
2830
+ }, [open]);
2831
+ return /* @__PURE__ */ React.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {
2832
+ open
2833
+ })));
2834
+ });
2835
+ Dropzone$1.displayName = "Dropzone";
2836
+ var defaultProps = {
2837
+ disabled: false,
2838
+ getFilesFromEvent: fromEvent,
2839
+ maxSize: Infinity,
2840
+ minSize: 0,
2841
+ multiple: true,
2842
+ maxFiles: 0,
2843
+ preventDropOnDocument: true,
2844
+ noClick: false,
2845
+ noKeyboard: false,
2846
+ noDrag: false,
2847
+ noDragEventsBubbling: false,
2848
+ validator: null,
2849
+ useFsAccessApi: false,
2850
+ autoFocus: false
2851
+ };
2852
+ Dropzone$1.defaultProps = defaultProps;
2853
+ Dropzone$1.propTypes = {
2854
+ /**
2855
+ * Render function that exposes the dropzone state and prop getter fns
2856
+ *
2857
+ * @param {object} params
2858
+ * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
2859
+ * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
2860
+ * @param {Function} params.open Open the native file selection dialog
2861
+ * @param {boolean} params.isFocused Dropzone area is in focus
2862
+ * @param {boolean} params.isFileDialogActive File dialog is opened
2863
+ * @param {boolean} params.isDragActive Active drag is in progress
2864
+ * @param {boolean} params.isDragAccept Dragged files are accepted
2865
+ * @param {boolean} params.isDragReject Some dragged files are rejected
2866
+ * @param {File[]} params.acceptedFiles Accepted files
2867
+ * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
2868
+ */
2869
+ children: PropTypes.func,
2870
+ /**
2871
+ * Set accepted file types.
2872
+ * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
2873
+ * Keep in mind that mime type determination is not reliable across platforms. CSV files,
2874
+ * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
2875
+ * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
2876
+ */
2877
+ accept: PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),
2878
+ /**
2879
+ * Allow drag 'n' drop (or selection from the file dialog) of multiple files
2880
+ */
2881
+ multiple: PropTypes.bool,
2882
+ /**
2883
+ * If false, allow dropped items to take over the current browser window
2884
+ */
2885
+ preventDropOnDocument: PropTypes.bool,
2886
+ /**
2887
+ * If true, disables click to open the native file selection dialog
2888
+ */
2889
+ noClick: PropTypes.bool,
2890
+ /**
2891
+ * If true, disables SPACE/ENTER to open the native file selection dialog.
2892
+ * Note that it also stops tracking the focus state.
2893
+ */
2894
+ noKeyboard: PropTypes.bool,
2895
+ /**
2896
+ * If true, disables drag 'n' drop
2897
+ */
2898
+ noDrag: PropTypes.bool,
2899
+ /**
2900
+ * If true, stops drag event propagation to parents
2901
+ */
2902
+ noDragEventsBubbling: PropTypes.bool,
2903
+ /**
2904
+ * Minimum file size (in bytes)
2905
+ */
2906
+ minSize: PropTypes.number,
2907
+ /**
2908
+ * Maximum file size (in bytes)
2909
+ */
2910
+ maxSize: PropTypes.number,
2911
+ /**
2912
+ * Maximum accepted number of files
2913
+ * The default value is 0 which means there is no limitation to how many files are accepted.
2914
+ */
2915
+ maxFiles: PropTypes.number,
2916
+ /**
2917
+ * Enable/disable the dropzone
2918
+ */
2919
+ disabled: PropTypes.bool,
2920
+ /**
2921
+ * Use this to provide a custom file aggregator
2922
+ *
2923
+ * @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
2924
+ */
2925
+ getFilesFromEvent: PropTypes.func,
2926
+ /**
2927
+ * Cb for when closing the file dialog with no selection
2928
+ */
2929
+ onFileDialogCancel: PropTypes.func,
2930
+ /**
2931
+ * Cb for when opening the file dialog
2932
+ */
2933
+ onFileDialogOpen: PropTypes.func,
2934
+ /**
2935
+ * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
2936
+ * to open the file picker instead of using an `<input type="file">` click event.
2937
+ */
2938
+ useFsAccessApi: PropTypes.bool,
2939
+ /**
2940
+ * Set to true to focus the root element on render
2941
+ */
2942
+ autoFocus: PropTypes.bool,
2943
+ /**
2944
+ * Cb for when the `dragenter` event occurs.
2945
+ *
2946
+ * @param {DragEvent} event
2947
+ */
2948
+ onDragEnter: PropTypes.func,
2949
+ /**
2950
+ * Cb for when the `dragleave` event occurs
2951
+ *
2952
+ * @param {DragEvent} event
2953
+ */
2954
+ onDragLeave: PropTypes.func,
2955
+ /**
2956
+ * Cb for when the `dragover` event occurs
2957
+ *
2958
+ * @param {DragEvent} event
2959
+ */
2960
+ onDragOver: PropTypes.func,
2961
+ /**
2962
+ * Cb for when the `drop` event occurs.
2963
+ * Note that this callback is invoked after the `getFilesFromEvent` callback is done.
2964
+ *
2965
+ * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
2966
+ * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension.
2967
+ * If `multiple` is set to false and additional files are dropped,
2968
+ * all files besides the first will be rejected.
2969
+ * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
2970
+ *
2971
+ * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
2972
+ * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
2973
+ *
2974
+ * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server.
2975
+ * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
2976
+ *
2977
+ * ```js
2978
+ * function onDrop(acceptedFiles) {
2979
+ * const req = request.post('/upload')
2980
+ * acceptedFiles.forEach(file => {
2981
+ * req.attach(file.name, file)
2982
+ * })
2983
+ * req.end(callback)
2984
+ * }
2985
+ * ```
2986
+ *
2987
+ * @param {File[]} acceptedFiles
2988
+ * @param {FileRejection[]} fileRejections
2989
+ * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
2990
+ */
2991
+ onDrop: PropTypes.func,
2992
+ /**
2993
+ * Cb for when the `drop` event occurs.
2994
+ * Note that if no files are accepted, this callback is not invoked.
2995
+ *
2996
+ * @param {File[]} files
2997
+ * @param {(DragEvent|Event)} event
2998
+ */
2999
+ onDropAccepted: PropTypes.func,
3000
+ /**
3001
+ * Cb for when the `drop` event occurs.
3002
+ * Note that if no files are rejected, this callback is not invoked.
3003
+ *
3004
+ * @param {FileRejection[]} fileRejections
3005
+ * @param {(DragEvent|Event)} event
3006
+ */
3007
+ onDropRejected: PropTypes.func,
3008
+ /**
3009
+ * Cb for when there's some error from any of the promises.
3010
+ *
3011
+ * @param {Error} error
3012
+ */
3013
+ onError: PropTypes.func,
3014
+ /**
3015
+ * Custom validation function. It must return null if there's no errors.
3016
+ * @param {File} file
3017
+ * @returns {FileError|FileError[]|null}
3018
+ */
3019
+ validator: PropTypes.func
3020
+ };
3021
+ var initialState = {
3022
+ isFocused: false,
3023
+ isFileDialogActive: false,
3024
+ isDragActive: false,
3025
+ isDragAccept: false,
3026
+ isDragReject: false,
3027
+ acceptedFiles: [],
3028
+ fileRejections: []
3029
+ };
3030
+ function useDropzone() {
3031
+ var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
3032
+ var _defaultProps$props = _objectSpread(_objectSpread({}, defaultProps), props), accept = _defaultProps$props.accept, disabled = _defaultProps$props.disabled, getFilesFromEvent = _defaultProps$props.getFilesFromEvent, maxSize = _defaultProps$props.maxSize, minSize = _defaultProps$props.minSize, multiple = _defaultProps$props.multiple, maxFiles = _defaultProps$props.maxFiles, onDragEnter = _defaultProps$props.onDragEnter, onDragLeave = _defaultProps$props.onDragLeave, onDragOver = _defaultProps$props.onDragOver, onDrop = _defaultProps$props.onDrop, onDropAccepted = _defaultProps$props.onDropAccepted, onDropRejected = _defaultProps$props.onDropRejected, onFileDialogCancel = _defaultProps$props.onFileDialogCancel, onFileDialogOpen = _defaultProps$props.onFileDialogOpen, useFsAccessApi = _defaultProps$props.useFsAccessApi, autoFocus = _defaultProps$props.autoFocus, preventDropOnDocument = _defaultProps$props.preventDropOnDocument, noClick = _defaultProps$props.noClick, noKeyboard = _defaultProps$props.noKeyboard, noDrag = _defaultProps$props.noDrag, noDragEventsBubbling = _defaultProps$props.noDragEventsBubbling, onError = _defaultProps$props.onError, validator = _defaultProps$props.validator;
3033
+ var acceptAttr = useMemo(function() {
3034
+ return acceptPropAsAcceptAttr(accept);
3035
+ }, [accept]);
3036
+ var pickerTypes = useMemo(function() {
3037
+ return pickerOptionsFromAccept(accept);
3038
+ }, [accept]);
3039
+ var onFileDialogOpenCb = useMemo(function() {
3040
+ return typeof onFileDialogOpen === "function" ? onFileDialogOpen : noop;
3041
+ }, [onFileDialogOpen]);
3042
+ var onFileDialogCancelCb = useMemo(function() {
3043
+ return typeof onFileDialogCancel === "function" ? onFileDialogCancel : noop;
3044
+ }, [onFileDialogCancel]);
3045
+ var rootRef = useRef(null);
3046
+ var inputRef = useRef(null);
3047
+ var _useReducer = useReducer(reducer, initialState), _useReducer2 = _slicedToArray(_useReducer, 2), state = _useReducer2[0], dispatch = _useReducer2[1];
3048
+ var isFocused = state.isFocused, isFileDialogActive = state.isFileDialogActive;
3049
+ var fsAccessApiWorksRef = useRef(typeof window !== "undefined" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI());
3050
+ var onWindowFocus = function onWindowFocus2() {
3051
+ if (!fsAccessApiWorksRef.current && isFileDialogActive) {
3052
+ setTimeout(function() {
3053
+ if (inputRef.current) {
3054
+ var files = inputRef.current.files;
3055
+ if (!files.length) {
3056
+ dispatch({
3057
+ type: "closeDialog"
3058
+ });
3059
+ onFileDialogCancelCb();
3060
+ }
3061
+ }
3062
+ }, 300);
3063
+ }
3064
+ };
3065
+ useEffect(function() {
3066
+ window.addEventListener("focus", onWindowFocus, false);
3067
+ return function() {
3068
+ window.removeEventListener("focus", onWindowFocus, false);
3069
+ };
3070
+ }, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);
3071
+ var dragTargetsRef = useRef([]);
3072
+ var onDocumentDrop = function onDocumentDrop2(event) {
3073
+ if (rootRef.current && rootRef.current.contains(event.target)) {
3074
+ return;
3075
+ }
3076
+ event.preventDefault();
3077
+ dragTargetsRef.current = [];
3078
+ };
3079
+ useEffect(function() {
3080
+ if (preventDropOnDocument) {
3081
+ document.addEventListener("dragover", onDocumentDragOver, false);
3082
+ document.addEventListener("drop", onDocumentDrop, false);
3083
+ }
3084
+ return function() {
3085
+ if (preventDropOnDocument) {
3086
+ document.removeEventListener("dragover", onDocumentDragOver);
3087
+ document.removeEventListener("drop", onDocumentDrop);
3088
+ }
3089
+ };
3090
+ }, [rootRef, preventDropOnDocument]);
3091
+ useEffect(function() {
3092
+ if (!disabled && autoFocus && rootRef.current) {
3093
+ rootRef.current.focus();
3094
+ }
3095
+ return function() {
3096
+ };
3097
+ }, [rootRef, autoFocus, disabled]);
3098
+ var onErrCb = useCallback(function(e) {
3099
+ if (onError) {
3100
+ onError(e);
3101
+ } else {
3102
+ console.error(e);
3103
+ }
3104
+ }, [onError]);
3105
+ var onDragEnterCb = useCallback(function(event) {
3106
+ event.preventDefault();
3107
+ event.persist();
3108
+ stopPropagation(event);
3109
+ dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);
3110
+ if (isEvtWithFiles(event)) {
3111
+ Promise.resolve(getFilesFromEvent(event)).then(function(files) {
3112
+ if (isPropagationStopped(event) && !noDragEventsBubbling) {
3113
+ return;
3114
+ }
3115
+ var fileCount = files.length;
3116
+ var isDragAccept = fileCount > 0 && allFilesAccepted({
3117
+ files,
3118
+ accept: acceptAttr,
3119
+ minSize,
3120
+ maxSize,
3121
+ multiple,
3122
+ maxFiles,
3123
+ validator
3124
+ });
3125
+ var isDragReject = fileCount > 0 && !isDragAccept;
3126
+ dispatch({
3127
+ isDragAccept,
3128
+ isDragReject,
3129
+ isDragActive: true,
3130
+ type: "setDraggedFiles"
3131
+ });
3132
+ if (onDragEnter) {
3133
+ onDragEnter(event);
3134
+ }
3135
+ }).catch(function(e) {
3136
+ return onErrCb(e);
3137
+ });
3138
+ }
3139
+ }, [getFilesFromEvent, onDragEnter, onErrCb, noDragEventsBubbling, acceptAttr, minSize, maxSize, multiple, maxFiles, validator]);
3140
+ var onDragOverCb = useCallback(function(event) {
3141
+ event.preventDefault();
3142
+ event.persist();
3143
+ stopPropagation(event);
3144
+ var hasFiles = isEvtWithFiles(event);
3145
+ if (hasFiles && event.dataTransfer) {
3146
+ try {
3147
+ event.dataTransfer.dropEffect = "copy";
3148
+ } catch (_unused) {
3149
+ }
3150
+ }
3151
+ if (hasFiles && onDragOver) {
3152
+ onDragOver(event);
3153
+ }
3154
+ return false;
3155
+ }, [onDragOver, noDragEventsBubbling]);
3156
+ var onDragLeaveCb = useCallback(function(event) {
3157
+ event.preventDefault();
3158
+ event.persist();
3159
+ stopPropagation(event);
3160
+ var targets = dragTargetsRef.current.filter(function(target) {
3161
+ return rootRef.current && rootRef.current.contains(target);
3162
+ });
3163
+ var targetIdx = targets.indexOf(event.target);
3164
+ if (targetIdx !== -1) {
3165
+ targets.splice(targetIdx, 1);
3166
+ }
3167
+ dragTargetsRef.current = targets;
3168
+ if (targets.length > 0) {
3169
+ return;
3170
+ }
3171
+ dispatch({
3172
+ type: "setDraggedFiles",
3173
+ isDragActive: false,
3174
+ isDragAccept: false,
3175
+ isDragReject: false
3176
+ });
3177
+ if (isEvtWithFiles(event) && onDragLeave) {
3178
+ onDragLeave(event);
3179
+ }
3180
+ }, [rootRef, onDragLeave, noDragEventsBubbling]);
3181
+ var setFiles = useCallback(function(files, event) {
3182
+ var acceptedFiles = [];
3183
+ var fileRejections = [];
3184
+ files.forEach(function(file) {
3185
+ var _fileAccepted = fileAccepted(file, acceptAttr), _fileAccepted2 = _slicedToArray(_fileAccepted, 2), accepted = _fileAccepted2[0], acceptError = _fileAccepted2[1];
3186
+ var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2), sizeMatch = _fileMatchSize2[0], sizeError = _fileMatchSize2[1];
3187
+ var customErrors = validator ? validator(file) : null;
3188
+ if (accepted && sizeMatch && !customErrors) {
3189
+ acceptedFiles.push(file);
3190
+ } else {
3191
+ var errors = [acceptError, sizeError];
3192
+ if (customErrors) {
3193
+ errors = errors.concat(customErrors);
3194
+ }
3195
+ fileRejections.push({
3196
+ file,
3197
+ errors: errors.filter(function(e) {
3198
+ return e;
3199
+ })
3200
+ });
3201
+ }
3202
+ });
3203
+ if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {
3204
+ acceptedFiles.forEach(function(file) {
3205
+ fileRejections.push({
3206
+ file,
3207
+ errors: [TOO_MANY_FILES_REJECTION]
3208
+ });
3209
+ });
3210
+ acceptedFiles.splice(0);
3211
+ }
3212
+ dispatch({
3213
+ acceptedFiles,
3214
+ fileRejections,
3215
+ isDragReject: fileRejections.length > 0,
3216
+ type: "setFiles"
3217
+ });
3218
+ if (onDrop) {
3219
+ onDrop(acceptedFiles, fileRejections, event);
3220
+ }
3221
+ if (fileRejections.length > 0 && onDropRejected) {
3222
+ onDropRejected(fileRejections, event);
3223
+ }
3224
+ if (acceptedFiles.length > 0 && onDropAccepted) {
3225
+ onDropAccepted(acceptedFiles, event);
3226
+ }
3227
+ }, [dispatch, multiple, acceptAttr, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);
3228
+ var onDropCb = useCallback(function(event) {
3229
+ event.preventDefault();
3230
+ event.persist();
3231
+ stopPropagation(event);
3232
+ dragTargetsRef.current = [];
3233
+ if (isEvtWithFiles(event)) {
3234
+ Promise.resolve(getFilesFromEvent(event)).then(function(files) {
3235
+ if (isPropagationStopped(event) && !noDragEventsBubbling) {
3236
+ return;
3237
+ }
3238
+ setFiles(files, event);
3239
+ }).catch(function(e) {
3240
+ return onErrCb(e);
3241
+ });
3242
+ }
3243
+ dispatch({
3244
+ type: "reset"
3245
+ });
3246
+ }, [getFilesFromEvent, setFiles, onErrCb, noDragEventsBubbling]);
3247
+ var openFileDialog = useCallback(function() {
3248
+ if (fsAccessApiWorksRef.current) {
3249
+ dispatch({
3250
+ type: "openDialog"
3251
+ });
3252
+ onFileDialogOpenCb();
3253
+ var opts = {
3254
+ multiple,
3255
+ types: pickerTypes
3256
+ };
3257
+ window.showOpenFilePicker(opts).then(function(handles) {
3258
+ return getFilesFromEvent(handles);
3259
+ }).then(function(files) {
3260
+ setFiles(files, null);
3261
+ dispatch({
3262
+ type: "closeDialog"
3263
+ });
3264
+ }).catch(function(e) {
3265
+ if (isAbort(e)) {
3266
+ onFileDialogCancelCb(e);
3267
+ dispatch({
3268
+ type: "closeDialog"
3269
+ });
3270
+ } else if (isSecurityError(e)) {
3271
+ fsAccessApiWorksRef.current = false;
3272
+ if (inputRef.current) {
3273
+ inputRef.current.value = null;
3274
+ inputRef.current.click();
3275
+ } else {
3276
+ onErrCb(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."));
3277
+ }
3278
+ } else {
3279
+ onErrCb(e);
3280
+ }
3281
+ });
3282
+ return;
3283
+ }
3284
+ if (inputRef.current) {
3285
+ dispatch({
3286
+ type: "openDialog"
3287
+ });
3288
+ onFileDialogOpenCb();
3289
+ inputRef.current.value = null;
3290
+ inputRef.current.click();
3291
+ }
3292
+ }, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, onErrCb, pickerTypes, multiple]);
3293
+ var onKeyDownCb = useCallback(function(event) {
3294
+ if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
3295
+ return;
3296
+ }
3297
+ if (event.key === " " || event.key === "Enter" || event.keyCode === 32 || event.keyCode === 13) {
3298
+ event.preventDefault();
3299
+ openFileDialog();
3300
+ }
3301
+ }, [rootRef, openFileDialog]);
3302
+ var onFocusCb = useCallback(function() {
3303
+ dispatch({
3304
+ type: "focus"
3305
+ });
3306
+ }, []);
3307
+ var onBlurCb = useCallback(function() {
3308
+ dispatch({
3309
+ type: "blur"
3310
+ });
3311
+ }, []);
3312
+ var onClickCb = useCallback(function() {
3313
+ if (noClick) {
3314
+ return;
3315
+ }
3316
+ if (isIeOrEdge()) {
3317
+ setTimeout(openFileDialog, 0);
3318
+ } else {
3319
+ openFileDialog();
3320
+ }
3321
+ }, [noClick, openFileDialog]);
3322
+ var composeHandler = function composeHandler2(fn) {
3323
+ return disabled ? null : fn;
3324
+ };
3325
+ var composeKeyboardHandler = function composeKeyboardHandler2(fn) {
3326
+ return noKeyboard ? null : composeHandler(fn);
3327
+ };
3328
+ var composeDragHandler = function composeDragHandler2(fn) {
3329
+ return noDrag ? null : composeHandler(fn);
3330
+ };
3331
+ var stopPropagation = function stopPropagation2(event) {
3332
+ if (noDragEventsBubbling) {
3333
+ event.stopPropagation();
3334
+ }
3335
+ };
3336
+ var getRootProps = useMemo(function() {
3337
+ return function() {
3338
+ var _ref2 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref2$refKey = _ref2.refKey, refKey = _ref2$refKey === void 0 ? "ref" : _ref2$refKey, role = _ref2.role, onKeyDown = _ref2.onKeyDown, onFocus = _ref2.onFocus, onBlur = _ref2.onBlur, onClick = _ref2.onClick, onDragEnter2 = _ref2.onDragEnter, onDragOver2 = _ref2.onDragOver, onDragLeave2 = _ref2.onDragLeave, onDrop2 = _ref2.onDrop, rest = _objectWithoutProperties(_ref2, _excluded3);
3339
+ return _objectSpread(_objectSpread(_defineProperty({
3340
+ onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
3341
+ onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
3342
+ onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
3343
+ onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),
3344
+ onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter2, onDragEnterCb)),
3345
+ onDragOver: composeDragHandler(composeEventHandlers(onDragOver2, onDragOverCb)),
3346
+ onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave2, onDragLeaveCb)),
3347
+ onDrop: composeDragHandler(composeEventHandlers(onDrop2, onDropCb)),
3348
+ role: typeof role === "string" && role !== "" ? role : "presentation"
3349
+ }, refKey, rootRef), !disabled && !noKeyboard ? {
3350
+ tabIndex: 0
3351
+ } : {}), rest);
3352
+ };
3353
+ }, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);
3354
+ var onInputElementClick = useCallback(function(event) {
3355
+ event.stopPropagation();
3356
+ }, []);
3357
+ var getInputProps = useMemo(function() {
3358
+ return function() {
3359
+ var _ref3 = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, _ref3$refKey = _ref3.refKey, refKey = _ref3$refKey === void 0 ? "ref" : _ref3$refKey, onChange = _ref3.onChange, onClick = _ref3.onClick, rest = _objectWithoutProperties(_ref3, _excluded4);
3360
+ var inputProps = _defineProperty({
3361
+ accept: acceptAttr,
3362
+ multiple,
3363
+ type: "file",
3364
+ style: {
3365
+ border: 0,
3366
+ clip: "rect(0, 0, 0, 0)",
3367
+ clipPath: "inset(50%)",
3368
+ height: "1px",
3369
+ margin: "0 -1px -1px 0",
3370
+ overflow: "hidden",
3371
+ padding: 0,
3372
+ position: "absolute",
3373
+ width: "1px",
3374
+ whiteSpace: "nowrap"
3375
+ },
3376
+ onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),
3377
+ onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),
3378
+ tabIndex: -1
3379
+ }, refKey, inputRef);
3380
+ return _objectSpread(_objectSpread({}, inputProps), rest);
3381
+ };
3382
+ }, [inputRef, accept, multiple, onDropCb, disabled]);
3383
+ return _objectSpread(_objectSpread({}, state), {}, {
3384
+ isFocused: isFocused && !disabled,
3385
+ getRootProps,
3386
+ getInputProps,
3387
+ rootRef,
3388
+ inputRef,
3389
+ open: composeHandler(openFileDialog)
3390
+ });
3391
+ }
3392
+ function reducer(state, action) {
3393
+ switch (action.type) {
3394
+ case "focus":
3395
+ return _objectSpread(_objectSpread({}, state), {}, {
3396
+ isFocused: true
3397
+ });
3398
+ case "blur":
3399
+ return _objectSpread(_objectSpread({}, state), {}, {
3400
+ isFocused: false
3401
+ });
3402
+ case "openDialog":
3403
+ return _objectSpread(_objectSpread({}, initialState), {}, {
3404
+ isFileDialogActive: true
3405
+ });
3406
+ case "closeDialog":
3407
+ return _objectSpread(_objectSpread({}, state), {}, {
3408
+ isFileDialogActive: false
3409
+ });
3410
+ case "setDraggedFiles":
3411
+ return _objectSpread(_objectSpread({}, state), {}, {
3412
+ isDragActive: action.isDragActive,
3413
+ isDragAccept: action.isDragAccept,
3414
+ isDragReject: action.isDragReject
3415
+ });
3416
+ case "setFiles":
3417
+ return _objectSpread(_objectSpread({}, state), {}, {
3418
+ acceptedFiles: action.acceptedFiles,
3419
+ fileRejections: action.fileRejections,
3420
+ isDragReject: action.isDragReject
3421
+ });
3422
+ case "reset":
3423
+ return _objectSpread({}, initialState);
3424
+ default:
3425
+ return state;
3426
+ }
3427
+ }
3428
+ function noop() {
3429
+ }
94
3430
  const baseStyle = {
95
3431
  flex: 1,
96
3432
  display: "flex",