wcz-test 6.24.3 → 6.24.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/{DialogsHooks-DOT0O_b4.js → DialogsHooks-DVnj8xmz.js} +178 -3
- package/dist/chunks/DialogsHooks-DVnj8xmz.js.map +1 -0
- package/dist/chunks/FileHooks-GprjzNKW.js +3554 -0
- package/dist/chunks/FileHooks-GprjzNKW.js.map +1 -0
- package/dist/chunks/RouterListItemButton-BvsZysDL.js +959 -0
- package/dist/chunks/RouterListItemButton-BvsZysDL.js.map +1 -0
- package/dist/chunks/_commonjsHelpers-BGn2FbsY.js +35 -0
- package/dist/chunks/_commonjsHelpers-BGn2FbsY.js.map +1 -0
- package/dist/chunks/env-Di2sjb5X.js +104 -0
- package/dist/chunks/env-Di2sjb5X.js.map +1 -0
- package/dist/chunks/i18next-Dx0Bahhj.js +2203 -0
- package/dist/chunks/i18next-Dx0Bahhj.js.map +1 -0
- package/dist/chunks/index-BrFiyyyk.js +327 -0
- package/dist/chunks/index-BrFiyyyk.js.map +1 -0
- package/dist/chunks/session-CPSUX_HJ.js +12970 -0
- package/dist/chunks/session-CPSUX_HJ.js.map +1 -0
- package/dist/chunks/useTranslation-D7I_DXWv.js +406 -0
- package/dist/chunks/useTranslation-D7I_DXWv.js.map +1 -0
- package/dist/chunks/utils-DtlCJSvY.js +2582 -0
- package/dist/chunks/utils-DtlCJSvY.js.map +1 -0
- package/dist/client.js +4 -4
- package/dist/components.js +2418 -7
- package/dist/components.js.map +1 -1
- package/dist/hooks.js +1011 -5
- package/dist/hooks.js.map +1 -1
- package/dist/index.js +448 -951
- package/dist/index.js.map +1 -1
- package/dist/queries.js +3 -3
- package/dist/server.js +5213 -4
- package/dist/server.js.map +1 -1
- package/dist/utils.js +5 -5
- package/package.json +1 -1
- package/dist/chunks/DialogsHooks-DOT0O_b4.js.map +0 -1
- package/dist/chunks/FileHooks-CF1bPDoe.js +0 -493
- package/dist/chunks/FileHooks-CF1bPDoe.js.map +0 -1
- package/dist/chunks/RouterListItemButton-DTYXk1kh.js +0 -35
- package/dist/chunks/RouterListItemButton-DTYXk1kh.js.map +0 -1
- package/dist/chunks/env-gsqZ6zZD.js +0 -30
- package/dist/chunks/env-gsqZ6zZD.js.map +0 -1
- package/dist/chunks/session-vW7WZadj.js +0 -91
- package/dist/chunks/session-vW7WZadj.js.map +0 -1
- package/dist/chunks/utils-MD9YwOtu.js +0 -91
- package/dist/chunks/utils-MD9YwOtu.js.map +0 -1
package/dist/components.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import { Typography, Stack, Box, useTheme, Paper, ListItemButton, ListItemIcon, ListItemText, List, Menu, ImageListItemBar, IconButton, Tooltip, ImageListItem, Dialog, Fab, Chip, Button, Link, Tab, Divider } from "@mui/material";
|
|
4
|
-
import React__default, { useRef, useState, useEffectEvent, useEffect,
|
|
4
|
+
import React__default, { useRef, useState, useEffectEvent, useEffect, useMemo, useReducer, useCallback, forwardRef, useImperativeHandle, Fragment, createContext, useContext } from "react";
|
|
5
5
|
import CloudUpload from "@mui/icons-material/CloudUpload";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { p as propTypesExports } from "./chunks/RouterListItemButton-BvsZysDL.js";
|
|
7
|
+
import { R } from "./chunks/RouterListItemButton-BvsZysDL.js";
|
|
8
|
+
import { u as useTranslation } from "./chunks/useTranslation-D7I_DXWv.js";
|
|
8
9
|
import MoreVert from "@mui/icons-material/MoreVert";
|
|
9
10
|
import { grey } from "@mui/material/colors";
|
|
10
|
-
import { useInView } from "
|
|
11
|
+
import { u as useDialogs, a as useInView } from "./chunks/DialogsHooks-DVnj8xmz.js";
|
|
11
12
|
import Delete from "@mui/icons-material/Delete";
|
|
12
13
|
import FileDownload from "@mui/icons-material/FileDownload";
|
|
13
|
-
import { u as
|
|
14
|
-
import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./chunks/FileHooks-CF1bPDoe.js";
|
|
14
|
+
import { c as useDownloadFile, f as useDeleteFile, a as useGetFileThumbnail, d as useOpenFile, b as useGetFile, u as useGetFileMetas } from "./chunks/FileHooks-GprjzNKW.js";
|
|
15
15
|
import AttachFile from "@mui/icons-material/AttachFile";
|
|
16
16
|
import Image from "@mui/icons-material/Image";
|
|
17
17
|
import SmartDisplay from "@mui/icons-material/SmartDisplay";
|
|
@@ -19,7 +19,6 @@ import Close from "@mui/icons-material/Close";
|
|
|
19
19
|
import Edit from "@mui/icons-material/Edit";
|
|
20
20
|
import { createLink } from "@tanstack/react-router";
|
|
21
21
|
import { GridActionsCellItem } from "@mui/x-data-grid-premium";
|
|
22
|
-
import { R } from "./chunks/RouterListItemButton-DTYXk1kh.js";
|
|
23
22
|
const TypographyWithIcon = (t0) => {
|
|
24
23
|
const $ = c(22);
|
|
25
24
|
let children;
|
|
@@ -226,6 +225,2418 @@ const Fullscreen = (t0) => {
|
|
|
226
225
|
}
|
|
227
226
|
return t5;
|
|
228
227
|
};
|
|
228
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
229
|
+
function adopt(value) {
|
|
230
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
231
|
+
resolve(value);
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
235
|
+
function fulfilled(value) {
|
|
236
|
+
try {
|
|
237
|
+
step(generator.next(value));
|
|
238
|
+
} catch (e) {
|
|
239
|
+
reject(e);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
function rejected(value) {
|
|
243
|
+
try {
|
|
244
|
+
step(generator["throw"](value));
|
|
245
|
+
} catch (e) {
|
|
246
|
+
reject(e);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
function step(result) {
|
|
250
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
251
|
+
}
|
|
252
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
253
|
+
});
|
|
254
|
+
}
|
|
255
|
+
typeof SuppressedError === "function" ? SuppressedError : function(error, suppressed, message) {
|
|
256
|
+
var e = new Error(message);
|
|
257
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
258
|
+
};
|
|
259
|
+
const COMMON_MIME_TYPES = /* @__PURE__ */ new Map([
|
|
260
|
+
// https://github.com/guzzle/psr7/blob/2d9260799e713f1c475d3c5fdc3d6561ff7441b2/src/MimeType.php
|
|
261
|
+
["1km", "application/vnd.1000minds.decision-model+xml"],
|
|
262
|
+
["3dml", "text/vnd.in3d.3dml"],
|
|
263
|
+
["3ds", "image/x-3ds"],
|
|
264
|
+
["3g2", "video/3gpp2"],
|
|
265
|
+
["3gp", "video/3gp"],
|
|
266
|
+
["3gpp", "video/3gpp"],
|
|
267
|
+
["3mf", "model/3mf"],
|
|
268
|
+
["7z", "application/x-7z-compressed"],
|
|
269
|
+
["7zip", "application/x-7z-compressed"],
|
|
270
|
+
["123", "application/vnd.lotus-1-2-3"],
|
|
271
|
+
["aab", "application/x-authorware-bin"],
|
|
272
|
+
["aac", "audio/x-acc"],
|
|
273
|
+
["aam", "application/x-authorware-map"],
|
|
274
|
+
["aas", "application/x-authorware-seg"],
|
|
275
|
+
["abw", "application/x-abiword"],
|
|
276
|
+
["ac", "application/vnd.nokia.n-gage.ac+xml"],
|
|
277
|
+
["ac3", "audio/ac3"],
|
|
278
|
+
["acc", "application/vnd.americandynamics.acc"],
|
|
279
|
+
["ace", "application/x-ace-compressed"],
|
|
280
|
+
["acu", "application/vnd.acucobol"],
|
|
281
|
+
["acutc", "application/vnd.acucorp"],
|
|
282
|
+
["adp", "audio/adpcm"],
|
|
283
|
+
["aep", "application/vnd.audiograph"],
|
|
284
|
+
["afm", "application/x-font-type1"],
|
|
285
|
+
["afp", "application/vnd.ibm.modcap"],
|
|
286
|
+
["ahead", "application/vnd.ahead.space"],
|
|
287
|
+
["ai", "application/pdf"],
|
|
288
|
+
["aif", "audio/x-aiff"],
|
|
289
|
+
["aifc", "audio/x-aiff"],
|
|
290
|
+
["aiff", "audio/x-aiff"],
|
|
291
|
+
["air", "application/vnd.adobe.air-application-installer-package+zip"],
|
|
292
|
+
["ait", "application/vnd.dvb.ait"],
|
|
293
|
+
["ami", "application/vnd.amiga.ami"],
|
|
294
|
+
["amr", "audio/amr"],
|
|
295
|
+
["apk", "application/vnd.android.package-archive"],
|
|
296
|
+
["apng", "image/apng"],
|
|
297
|
+
["appcache", "text/cache-manifest"],
|
|
298
|
+
["application", "application/x-ms-application"],
|
|
299
|
+
["apr", "application/vnd.lotus-approach"],
|
|
300
|
+
["arc", "application/x-freearc"],
|
|
301
|
+
["arj", "application/x-arj"],
|
|
302
|
+
["asc", "application/pgp-signature"],
|
|
303
|
+
["asf", "video/x-ms-asf"],
|
|
304
|
+
["asm", "text/x-asm"],
|
|
305
|
+
["aso", "application/vnd.accpac.simply.aso"],
|
|
306
|
+
["asx", "video/x-ms-asf"],
|
|
307
|
+
["atc", "application/vnd.acucorp"],
|
|
308
|
+
["atom", "application/atom+xml"],
|
|
309
|
+
["atomcat", "application/atomcat+xml"],
|
|
310
|
+
["atomdeleted", "application/atomdeleted+xml"],
|
|
311
|
+
["atomsvc", "application/atomsvc+xml"],
|
|
312
|
+
["atx", "application/vnd.antix.game-component"],
|
|
313
|
+
["au", "audio/x-au"],
|
|
314
|
+
["avi", "video/x-msvideo"],
|
|
315
|
+
["avif", "image/avif"],
|
|
316
|
+
["aw", "application/applixware"],
|
|
317
|
+
["azf", "application/vnd.airzip.filesecure.azf"],
|
|
318
|
+
["azs", "application/vnd.airzip.filesecure.azs"],
|
|
319
|
+
["azv", "image/vnd.airzip.accelerator.azv"],
|
|
320
|
+
["azw", "application/vnd.amazon.ebook"],
|
|
321
|
+
["b16", "image/vnd.pco.b16"],
|
|
322
|
+
["bat", "application/x-msdownload"],
|
|
323
|
+
["bcpio", "application/x-bcpio"],
|
|
324
|
+
["bdf", "application/x-font-bdf"],
|
|
325
|
+
["bdm", "application/vnd.syncml.dm+wbxml"],
|
|
326
|
+
["bdoc", "application/x-bdoc"],
|
|
327
|
+
["bed", "application/vnd.realvnc.bed"],
|
|
328
|
+
["bh2", "application/vnd.fujitsu.oasysprs"],
|
|
329
|
+
["bin", "application/octet-stream"],
|
|
330
|
+
["blb", "application/x-blorb"],
|
|
331
|
+
["blorb", "application/x-blorb"],
|
|
332
|
+
["bmi", "application/vnd.bmi"],
|
|
333
|
+
["bmml", "application/vnd.balsamiq.bmml+xml"],
|
|
334
|
+
["bmp", "image/bmp"],
|
|
335
|
+
["book", "application/vnd.framemaker"],
|
|
336
|
+
["box", "application/vnd.previewsystems.box"],
|
|
337
|
+
["boz", "application/x-bzip2"],
|
|
338
|
+
["bpk", "application/octet-stream"],
|
|
339
|
+
["bpmn", "application/octet-stream"],
|
|
340
|
+
["bsp", "model/vnd.valve.source.compiled-map"],
|
|
341
|
+
["btif", "image/prs.btif"],
|
|
342
|
+
["buffer", "application/octet-stream"],
|
|
343
|
+
["bz", "application/x-bzip"],
|
|
344
|
+
["bz2", "application/x-bzip2"],
|
|
345
|
+
["c", "text/x-c"],
|
|
346
|
+
["c4d", "application/vnd.clonk.c4group"],
|
|
347
|
+
["c4f", "application/vnd.clonk.c4group"],
|
|
348
|
+
["c4g", "application/vnd.clonk.c4group"],
|
|
349
|
+
["c4p", "application/vnd.clonk.c4group"],
|
|
350
|
+
["c4u", "application/vnd.clonk.c4group"],
|
|
351
|
+
["c11amc", "application/vnd.cluetrust.cartomobile-config"],
|
|
352
|
+
["c11amz", "application/vnd.cluetrust.cartomobile-config-pkg"],
|
|
353
|
+
["cab", "application/vnd.ms-cab-compressed"],
|
|
354
|
+
["caf", "audio/x-caf"],
|
|
355
|
+
["cap", "application/vnd.tcpdump.pcap"],
|
|
356
|
+
["car", "application/vnd.curl.car"],
|
|
357
|
+
["cat", "application/vnd.ms-pki.seccat"],
|
|
358
|
+
["cb7", "application/x-cbr"],
|
|
359
|
+
["cba", "application/x-cbr"],
|
|
360
|
+
["cbr", "application/x-cbr"],
|
|
361
|
+
["cbt", "application/x-cbr"],
|
|
362
|
+
["cbz", "application/x-cbr"],
|
|
363
|
+
["cc", "text/x-c"],
|
|
364
|
+
["cco", "application/x-cocoa"],
|
|
365
|
+
["cct", "application/x-director"],
|
|
366
|
+
["ccxml", "application/ccxml+xml"],
|
|
367
|
+
["cdbcmsg", "application/vnd.contact.cmsg"],
|
|
368
|
+
["cda", "application/x-cdf"],
|
|
369
|
+
["cdf", "application/x-netcdf"],
|
|
370
|
+
["cdfx", "application/cdfx+xml"],
|
|
371
|
+
["cdkey", "application/vnd.mediastation.cdkey"],
|
|
372
|
+
["cdmia", "application/cdmi-capability"],
|
|
373
|
+
["cdmic", "application/cdmi-container"],
|
|
374
|
+
["cdmid", "application/cdmi-domain"],
|
|
375
|
+
["cdmio", "application/cdmi-object"],
|
|
376
|
+
["cdmiq", "application/cdmi-queue"],
|
|
377
|
+
["cdr", "application/cdr"],
|
|
378
|
+
["cdx", "chemical/x-cdx"],
|
|
379
|
+
["cdxml", "application/vnd.chemdraw+xml"],
|
|
380
|
+
["cdy", "application/vnd.cinderella"],
|
|
381
|
+
["cer", "application/pkix-cert"],
|
|
382
|
+
["cfs", "application/x-cfs-compressed"],
|
|
383
|
+
["cgm", "image/cgm"],
|
|
384
|
+
["chat", "application/x-chat"],
|
|
385
|
+
["chm", "application/vnd.ms-htmlhelp"],
|
|
386
|
+
["chrt", "application/vnd.kde.kchart"],
|
|
387
|
+
["cif", "chemical/x-cif"],
|
|
388
|
+
["cii", "application/vnd.anser-web-certificate-issue-initiation"],
|
|
389
|
+
["cil", "application/vnd.ms-artgalry"],
|
|
390
|
+
["cjs", "application/node"],
|
|
391
|
+
["cla", "application/vnd.claymore"],
|
|
392
|
+
["class", "application/octet-stream"],
|
|
393
|
+
["clkk", "application/vnd.crick.clicker.keyboard"],
|
|
394
|
+
["clkp", "application/vnd.crick.clicker.palette"],
|
|
395
|
+
["clkt", "application/vnd.crick.clicker.template"],
|
|
396
|
+
["clkw", "application/vnd.crick.clicker.wordbank"],
|
|
397
|
+
["clkx", "application/vnd.crick.clicker"],
|
|
398
|
+
["clp", "application/x-msclip"],
|
|
399
|
+
["cmc", "application/vnd.cosmocaller"],
|
|
400
|
+
["cmdf", "chemical/x-cmdf"],
|
|
401
|
+
["cml", "chemical/x-cml"],
|
|
402
|
+
["cmp", "application/vnd.yellowriver-custom-menu"],
|
|
403
|
+
["cmx", "image/x-cmx"],
|
|
404
|
+
["cod", "application/vnd.rim.cod"],
|
|
405
|
+
["coffee", "text/coffeescript"],
|
|
406
|
+
["com", "application/x-msdownload"],
|
|
407
|
+
["conf", "text/plain"],
|
|
408
|
+
["cpio", "application/x-cpio"],
|
|
409
|
+
["cpp", "text/x-c"],
|
|
410
|
+
["cpt", "application/mac-compactpro"],
|
|
411
|
+
["crd", "application/x-mscardfile"],
|
|
412
|
+
["crl", "application/pkix-crl"],
|
|
413
|
+
["crt", "application/x-x509-ca-cert"],
|
|
414
|
+
["crx", "application/x-chrome-extension"],
|
|
415
|
+
["cryptonote", "application/vnd.rig.cryptonote"],
|
|
416
|
+
["csh", "application/x-csh"],
|
|
417
|
+
["csl", "application/vnd.citationstyles.style+xml"],
|
|
418
|
+
["csml", "chemical/x-csml"],
|
|
419
|
+
["csp", "application/vnd.commonspace"],
|
|
420
|
+
["csr", "application/octet-stream"],
|
|
421
|
+
["css", "text/css"],
|
|
422
|
+
["cst", "application/x-director"],
|
|
423
|
+
["csv", "text/csv"],
|
|
424
|
+
["cu", "application/cu-seeme"],
|
|
425
|
+
["curl", "text/vnd.curl"],
|
|
426
|
+
["cww", "application/prs.cww"],
|
|
427
|
+
["cxt", "application/x-director"],
|
|
428
|
+
["cxx", "text/x-c"],
|
|
429
|
+
["dae", "model/vnd.collada+xml"],
|
|
430
|
+
["daf", "application/vnd.mobius.daf"],
|
|
431
|
+
["dart", "application/vnd.dart"],
|
|
432
|
+
["dataless", "application/vnd.fdsn.seed"],
|
|
433
|
+
["davmount", "application/davmount+xml"],
|
|
434
|
+
["dbf", "application/vnd.dbf"],
|
|
435
|
+
["dbk", "application/docbook+xml"],
|
|
436
|
+
["dcr", "application/x-director"],
|
|
437
|
+
["dcurl", "text/vnd.curl.dcurl"],
|
|
438
|
+
["dd2", "application/vnd.oma.dd2+xml"],
|
|
439
|
+
["ddd", "application/vnd.fujixerox.ddd"],
|
|
440
|
+
["ddf", "application/vnd.syncml.dmddf+xml"],
|
|
441
|
+
["dds", "image/vnd.ms-dds"],
|
|
442
|
+
["deb", "application/x-debian-package"],
|
|
443
|
+
["def", "text/plain"],
|
|
444
|
+
["deploy", "application/octet-stream"],
|
|
445
|
+
["der", "application/x-x509-ca-cert"],
|
|
446
|
+
["dfac", "application/vnd.dreamfactory"],
|
|
447
|
+
["dgc", "application/x-dgc-compressed"],
|
|
448
|
+
["dic", "text/x-c"],
|
|
449
|
+
["dir", "application/x-director"],
|
|
450
|
+
["dis", "application/vnd.mobius.dis"],
|
|
451
|
+
["disposition-notification", "message/disposition-notification"],
|
|
452
|
+
["dist", "application/octet-stream"],
|
|
453
|
+
["distz", "application/octet-stream"],
|
|
454
|
+
["djv", "image/vnd.djvu"],
|
|
455
|
+
["djvu", "image/vnd.djvu"],
|
|
456
|
+
["dll", "application/octet-stream"],
|
|
457
|
+
["dmg", "application/x-apple-diskimage"],
|
|
458
|
+
["dmn", "application/octet-stream"],
|
|
459
|
+
["dmp", "application/vnd.tcpdump.pcap"],
|
|
460
|
+
["dms", "application/octet-stream"],
|
|
461
|
+
["dna", "application/vnd.dna"],
|
|
462
|
+
["doc", "application/msword"],
|
|
463
|
+
["docm", "application/vnd.ms-word.template.macroEnabled.12"],
|
|
464
|
+
["docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"],
|
|
465
|
+
["dot", "application/msword"],
|
|
466
|
+
["dotm", "application/vnd.ms-word.template.macroEnabled.12"],
|
|
467
|
+
["dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"],
|
|
468
|
+
["dp", "application/vnd.osgi.dp"],
|
|
469
|
+
["dpg", "application/vnd.dpgraph"],
|
|
470
|
+
["dra", "audio/vnd.dra"],
|
|
471
|
+
["drle", "image/dicom-rle"],
|
|
472
|
+
["dsc", "text/prs.lines.tag"],
|
|
473
|
+
["dssc", "application/dssc+der"],
|
|
474
|
+
["dtb", "application/x-dtbook+xml"],
|
|
475
|
+
["dtd", "application/xml-dtd"],
|
|
476
|
+
["dts", "audio/vnd.dts"],
|
|
477
|
+
["dtshd", "audio/vnd.dts.hd"],
|
|
478
|
+
["dump", "application/octet-stream"],
|
|
479
|
+
["dvb", "video/vnd.dvb.file"],
|
|
480
|
+
["dvi", "application/x-dvi"],
|
|
481
|
+
["dwd", "application/atsc-dwd+xml"],
|
|
482
|
+
["dwf", "model/vnd.dwf"],
|
|
483
|
+
["dwg", "image/vnd.dwg"],
|
|
484
|
+
["dxf", "image/vnd.dxf"],
|
|
485
|
+
["dxp", "application/vnd.spotfire.dxp"],
|
|
486
|
+
["dxr", "application/x-director"],
|
|
487
|
+
["ear", "application/java-archive"],
|
|
488
|
+
["ecelp4800", "audio/vnd.nuera.ecelp4800"],
|
|
489
|
+
["ecelp7470", "audio/vnd.nuera.ecelp7470"],
|
|
490
|
+
["ecelp9600", "audio/vnd.nuera.ecelp9600"],
|
|
491
|
+
["ecma", "application/ecmascript"],
|
|
492
|
+
["edm", "application/vnd.novadigm.edm"],
|
|
493
|
+
["edx", "application/vnd.novadigm.edx"],
|
|
494
|
+
["efif", "application/vnd.picsel"],
|
|
495
|
+
["ei6", "application/vnd.pg.osasli"],
|
|
496
|
+
["elc", "application/octet-stream"],
|
|
497
|
+
["emf", "image/emf"],
|
|
498
|
+
["eml", "message/rfc822"],
|
|
499
|
+
["emma", "application/emma+xml"],
|
|
500
|
+
["emotionml", "application/emotionml+xml"],
|
|
501
|
+
["emz", "application/x-msmetafile"],
|
|
502
|
+
["eol", "audio/vnd.digital-winds"],
|
|
503
|
+
["eot", "application/vnd.ms-fontobject"],
|
|
504
|
+
["eps", "application/postscript"],
|
|
505
|
+
["epub", "application/epub+zip"],
|
|
506
|
+
["es", "application/ecmascript"],
|
|
507
|
+
["es3", "application/vnd.eszigno3+xml"],
|
|
508
|
+
["esa", "application/vnd.osgi.subsystem"],
|
|
509
|
+
["esf", "application/vnd.epson.esf"],
|
|
510
|
+
["et3", "application/vnd.eszigno3+xml"],
|
|
511
|
+
["etx", "text/x-setext"],
|
|
512
|
+
["eva", "application/x-eva"],
|
|
513
|
+
["evy", "application/x-envoy"],
|
|
514
|
+
["exe", "application/octet-stream"],
|
|
515
|
+
["exi", "application/exi"],
|
|
516
|
+
["exp", "application/express"],
|
|
517
|
+
["exr", "image/aces"],
|
|
518
|
+
["ext", "application/vnd.novadigm.ext"],
|
|
519
|
+
["ez", "application/andrew-inset"],
|
|
520
|
+
["ez2", "application/vnd.ezpix-album"],
|
|
521
|
+
["ez3", "application/vnd.ezpix-package"],
|
|
522
|
+
["f", "text/x-fortran"],
|
|
523
|
+
["f4v", "video/mp4"],
|
|
524
|
+
["f77", "text/x-fortran"],
|
|
525
|
+
["f90", "text/x-fortran"],
|
|
526
|
+
["fbs", "image/vnd.fastbidsheet"],
|
|
527
|
+
["fcdt", "application/vnd.adobe.formscentral.fcdt"],
|
|
528
|
+
["fcs", "application/vnd.isac.fcs"],
|
|
529
|
+
["fdf", "application/vnd.fdf"],
|
|
530
|
+
["fdt", "application/fdt+xml"],
|
|
531
|
+
["fe_launch", "application/vnd.denovo.fcselayout-link"],
|
|
532
|
+
["fg5", "application/vnd.fujitsu.oasysgp"],
|
|
533
|
+
["fgd", "application/x-director"],
|
|
534
|
+
["fh", "image/x-freehand"],
|
|
535
|
+
["fh4", "image/x-freehand"],
|
|
536
|
+
["fh5", "image/x-freehand"],
|
|
537
|
+
["fh7", "image/x-freehand"],
|
|
538
|
+
["fhc", "image/x-freehand"],
|
|
539
|
+
["fig", "application/x-xfig"],
|
|
540
|
+
["fits", "image/fits"],
|
|
541
|
+
["flac", "audio/x-flac"],
|
|
542
|
+
["fli", "video/x-fli"],
|
|
543
|
+
["flo", "application/vnd.micrografx.flo"],
|
|
544
|
+
["flv", "video/x-flv"],
|
|
545
|
+
["flw", "application/vnd.kde.kivio"],
|
|
546
|
+
["flx", "text/vnd.fmi.flexstor"],
|
|
547
|
+
["fly", "text/vnd.fly"],
|
|
548
|
+
["fm", "application/vnd.framemaker"],
|
|
549
|
+
["fnc", "application/vnd.frogans.fnc"],
|
|
550
|
+
["fo", "application/vnd.software602.filler.form+xml"],
|
|
551
|
+
["for", "text/x-fortran"],
|
|
552
|
+
["fpx", "image/vnd.fpx"],
|
|
553
|
+
["frame", "application/vnd.framemaker"],
|
|
554
|
+
["fsc", "application/vnd.fsc.weblaunch"],
|
|
555
|
+
["fst", "image/vnd.fst"],
|
|
556
|
+
["ftc", "application/vnd.fluxtime.clip"],
|
|
557
|
+
["fti", "application/vnd.anser-web-funds-transfer-initiation"],
|
|
558
|
+
["fvt", "video/vnd.fvt"],
|
|
559
|
+
["fxp", "application/vnd.adobe.fxp"],
|
|
560
|
+
["fxpl", "application/vnd.adobe.fxp"],
|
|
561
|
+
["fzs", "application/vnd.fuzzysheet"],
|
|
562
|
+
["g2w", "application/vnd.geoplan"],
|
|
563
|
+
["g3", "image/g3fax"],
|
|
564
|
+
["g3w", "application/vnd.geospace"],
|
|
565
|
+
["gac", "application/vnd.groove-account"],
|
|
566
|
+
["gam", "application/x-tads"],
|
|
567
|
+
["gbr", "application/rpki-ghostbusters"],
|
|
568
|
+
["gca", "application/x-gca-compressed"],
|
|
569
|
+
["gdl", "model/vnd.gdl"],
|
|
570
|
+
["gdoc", "application/vnd.google-apps.document"],
|
|
571
|
+
["geo", "application/vnd.dynageo"],
|
|
572
|
+
["geojson", "application/geo+json"],
|
|
573
|
+
["gex", "application/vnd.geometry-explorer"],
|
|
574
|
+
["ggb", "application/vnd.geogebra.file"],
|
|
575
|
+
["ggt", "application/vnd.geogebra.tool"],
|
|
576
|
+
["ghf", "application/vnd.groove-help"],
|
|
577
|
+
["gif", "image/gif"],
|
|
578
|
+
["gim", "application/vnd.groove-identity-message"],
|
|
579
|
+
["glb", "model/gltf-binary"],
|
|
580
|
+
["gltf", "model/gltf+json"],
|
|
581
|
+
["gml", "application/gml+xml"],
|
|
582
|
+
["gmx", "application/vnd.gmx"],
|
|
583
|
+
["gnumeric", "application/x-gnumeric"],
|
|
584
|
+
["gpg", "application/gpg-keys"],
|
|
585
|
+
["gph", "application/vnd.flographit"],
|
|
586
|
+
["gpx", "application/gpx+xml"],
|
|
587
|
+
["gqf", "application/vnd.grafeq"],
|
|
588
|
+
["gqs", "application/vnd.grafeq"],
|
|
589
|
+
["gram", "application/srgs"],
|
|
590
|
+
["gramps", "application/x-gramps-xml"],
|
|
591
|
+
["gre", "application/vnd.geometry-explorer"],
|
|
592
|
+
["grv", "application/vnd.groove-injector"],
|
|
593
|
+
["grxml", "application/srgs+xml"],
|
|
594
|
+
["gsf", "application/x-font-ghostscript"],
|
|
595
|
+
["gsheet", "application/vnd.google-apps.spreadsheet"],
|
|
596
|
+
["gslides", "application/vnd.google-apps.presentation"],
|
|
597
|
+
["gtar", "application/x-gtar"],
|
|
598
|
+
["gtm", "application/vnd.groove-tool-message"],
|
|
599
|
+
["gtw", "model/vnd.gtw"],
|
|
600
|
+
["gv", "text/vnd.graphviz"],
|
|
601
|
+
["gxf", "application/gxf"],
|
|
602
|
+
["gxt", "application/vnd.geonext"],
|
|
603
|
+
["gz", "application/gzip"],
|
|
604
|
+
["gzip", "application/gzip"],
|
|
605
|
+
["h", "text/x-c"],
|
|
606
|
+
["h261", "video/h261"],
|
|
607
|
+
["h263", "video/h263"],
|
|
608
|
+
["h264", "video/h264"],
|
|
609
|
+
["hal", "application/vnd.hal+xml"],
|
|
610
|
+
["hbci", "application/vnd.hbci"],
|
|
611
|
+
["hbs", "text/x-handlebars-template"],
|
|
612
|
+
["hdd", "application/x-virtualbox-hdd"],
|
|
613
|
+
["hdf", "application/x-hdf"],
|
|
614
|
+
["heic", "image/heic"],
|
|
615
|
+
["heics", "image/heic-sequence"],
|
|
616
|
+
["heif", "image/heif"],
|
|
617
|
+
["heifs", "image/heif-sequence"],
|
|
618
|
+
["hej2", "image/hej2k"],
|
|
619
|
+
["held", "application/atsc-held+xml"],
|
|
620
|
+
["hh", "text/x-c"],
|
|
621
|
+
["hjson", "application/hjson"],
|
|
622
|
+
["hlp", "application/winhlp"],
|
|
623
|
+
["hpgl", "application/vnd.hp-hpgl"],
|
|
624
|
+
["hpid", "application/vnd.hp-hpid"],
|
|
625
|
+
["hps", "application/vnd.hp-hps"],
|
|
626
|
+
["hqx", "application/mac-binhex40"],
|
|
627
|
+
["hsj2", "image/hsj2"],
|
|
628
|
+
["htc", "text/x-component"],
|
|
629
|
+
["htke", "application/vnd.kenameaapp"],
|
|
630
|
+
["htm", "text/html"],
|
|
631
|
+
["html", "text/html"],
|
|
632
|
+
["hvd", "application/vnd.yamaha.hv-dic"],
|
|
633
|
+
["hvp", "application/vnd.yamaha.hv-voice"],
|
|
634
|
+
["hvs", "application/vnd.yamaha.hv-script"],
|
|
635
|
+
["i2g", "application/vnd.intergeo"],
|
|
636
|
+
["icc", "application/vnd.iccprofile"],
|
|
637
|
+
["ice", "x-conference/x-cooltalk"],
|
|
638
|
+
["icm", "application/vnd.iccprofile"],
|
|
639
|
+
["ico", "image/x-icon"],
|
|
640
|
+
["ics", "text/calendar"],
|
|
641
|
+
["ief", "image/ief"],
|
|
642
|
+
["ifb", "text/calendar"],
|
|
643
|
+
["ifm", "application/vnd.shana.informed.formdata"],
|
|
644
|
+
["iges", "model/iges"],
|
|
645
|
+
["igl", "application/vnd.igloader"],
|
|
646
|
+
["igm", "application/vnd.insors.igm"],
|
|
647
|
+
["igs", "model/iges"],
|
|
648
|
+
["igx", "application/vnd.micrografx.igx"],
|
|
649
|
+
["iif", "application/vnd.shana.informed.interchange"],
|
|
650
|
+
["img", "application/octet-stream"],
|
|
651
|
+
["imp", "application/vnd.accpac.simply.imp"],
|
|
652
|
+
["ims", "application/vnd.ms-ims"],
|
|
653
|
+
["in", "text/plain"],
|
|
654
|
+
["ini", "text/plain"],
|
|
655
|
+
["ink", "application/inkml+xml"],
|
|
656
|
+
["inkml", "application/inkml+xml"],
|
|
657
|
+
["install", "application/x-install-instructions"],
|
|
658
|
+
["iota", "application/vnd.astraea-software.iota"],
|
|
659
|
+
["ipfix", "application/ipfix"],
|
|
660
|
+
["ipk", "application/vnd.shana.informed.package"],
|
|
661
|
+
["irm", "application/vnd.ibm.rights-management"],
|
|
662
|
+
["irp", "application/vnd.irepository.package+xml"],
|
|
663
|
+
["iso", "application/x-iso9660-image"],
|
|
664
|
+
["itp", "application/vnd.shana.informed.formtemplate"],
|
|
665
|
+
["its", "application/its+xml"],
|
|
666
|
+
["ivp", "application/vnd.immervision-ivp"],
|
|
667
|
+
["ivu", "application/vnd.immervision-ivu"],
|
|
668
|
+
["jad", "text/vnd.sun.j2me.app-descriptor"],
|
|
669
|
+
["jade", "text/jade"],
|
|
670
|
+
["jam", "application/vnd.jam"],
|
|
671
|
+
["jar", "application/java-archive"],
|
|
672
|
+
["jardiff", "application/x-java-archive-diff"],
|
|
673
|
+
["java", "text/x-java-source"],
|
|
674
|
+
["jhc", "image/jphc"],
|
|
675
|
+
["jisp", "application/vnd.jisp"],
|
|
676
|
+
["jls", "image/jls"],
|
|
677
|
+
["jlt", "application/vnd.hp-jlyt"],
|
|
678
|
+
["jng", "image/x-jng"],
|
|
679
|
+
["jnlp", "application/x-java-jnlp-file"],
|
|
680
|
+
["joda", "application/vnd.joost.joda-archive"],
|
|
681
|
+
["jp2", "image/jp2"],
|
|
682
|
+
["jpe", "image/jpeg"],
|
|
683
|
+
["jpeg", "image/jpeg"],
|
|
684
|
+
["jpf", "image/jpx"],
|
|
685
|
+
["jpg", "image/jpeg"],
|
|
686
|
+
["jpg2", "image/jp2"],
|
|
687
|
+
["jpgm", "video/jpm"],
|
|
688
|
+
["jpgv", "video/jpeg"],
|
|
689
|
+
["jph", "image/jph"],
|
|
690
|
+
["jpm", "video/jpm"],
|
|
691
|
+
["jpx", "image/jpx"],
|
|
692
|
+
["js", "application/javascript"],
|
|
693
|
+
["json", "application/json"],
|
|
694
|
+
["json5", "application/json5"],
|
|
695
|
+
["jsonld", "application/ld+json"],
|
|
696
|
+
// https://jsonlines.org/
|
|
697
|
+
["jsonl", "application/jsonl"],
|
|
698
|
+
["jsonml", "application/jsonml+json"],
|
|
699
|
+
["jsx", "text/jsx"],
|
|
700
|
+
["jxr", "image/jxr"],
|
|
701
|
+
["jxra", "image/jxra"],
|
|
702
|
+
["jxrs", "image/jxrs"],
|
|
703
|
+
["jxs", "image/jxs"],
|
|
704
|
+
["jxsc", "image/jxsc"],
|
|
705
|
+
["jxsi", "image/jxsi"],
|
|
706
|
+
["jxss", "image/jxss"],
|
|
707
|
+
["kar", "audio/midi"],
|
|
708
|
+
["karbon", "application/vnd.kde.karbon"],
|
|
709
|
+
["kdb", "application/octet-stream"],
|
|
710
|
+
["kdbx", "application/x-keepass2"],
|
|
711
|
+
["key", "application/x-iwork-keynote-sffkey"],
|
|
712
|
+
["kfo", "application/vnd.kde.kformula"],
|
|
713
|
+
["kia", "application/vnd.kidspiration"],
|
|
714
|
+
["kml", "application/vnd.google-earth.kml+xml"],
|
|
715
|
+
["kmz", "application/vnd.google-earth.kmz"],
|
|
716
|
+
["kne", "application/vnd.kinar"],
|
|
717
|
+
["knp", "application/vnd.kinar"],
|
|
718
|
+
["kon", "application/vnd.kde.kontour"],
|
|
719
|
+
["kpr", "application/vnd.kde.kpresenter"],
|
|
720
|
+
["kpt", "application/vnd.kde.kpresenter"],
|
|
721
|
+
["kpxx", "application/vnd.ds-keypoint"],
|
|
722
|
+
["ksp", "application/vnd.kde.kspread"],
|
|
723
|
+
["ktr", "application/vnd.kahootz"],
|
|
724
|
+
["ktx", "image/ktx"],
|
|
725
|
+
["ktx2", "image/ktx2"],
|
|
726
|
+
["ktz", "application/vnd.kahootz"],
|
|
727
|
+
["kwd", "application/vnd.kde.kword"],
|
|
728
|
+
["kwt", "application/vnd.kde.kword"],
|
|
729
|
+
["lasxml", "application/vnd.las.las+xml"],
|
|
730
|
+
["latex", "application/x-latex"],
|
|
731
|
+
["lbd", "application/vnd.llamagraphics.life-balance.desktop"],
|
|
732
|
+
["lbe", "application/vnd.llamagraphics.life-balance.exchange+xml"],
|
|
733
|
+
["les", "application/vnd.hhe.lesson-player"],
|
|
734
|
+
["less", "text/less"],
|
|
735
|
+
["lgr", "application/lgr+xml"],
|
|
736
|
+
["lha", "application/octet-stream"],
|
|
737
|
+
["link66", "application/vnd.route66.link66+xml"],
|
|
738
|
+
["list", "text/plain"],
|
|
739
|
+
["list3820", "application/vnd.ibm.modcap"],
|
|
740
|
+
["listafp", "application/vnd.ibm.modcap"],
|
|
741
|
+
["litcoffee", "text/coffeescript"],
|
|
742
|
+
["lnk", "application/x-ms-shortcut"],
|
|
743
|
+
["log", "text/plain"],
|
|
744
|
+
["lostxml", "application/lost+xml"],
|
|
745
|
+
["lrf", "application/octet-stream"],
|
|
746
|
+
["lrm", "application/vnd.ms-lrm"],
|
|
747
|
+
["ltf", "application/vnd.frogans.ltf"],
|
|
748
|
+
["lua", "text/x-lua"],
|
|
749
|
+
["luac", "application/x-lua-bytecode"],
|
|
750
|
+
["lvp", "audio/vnd.lucent.voice"],
|
|
751
|
+
["lwp", "application/vnd.lotus-wordpro"],
|
|
752
|
+
["lzh", "application/octet-stream"],
|
|
753
|
+
["m1v", "video/mpeg"],
|
|
754
|
+
["m2a", "audio/mpeg"],
|
|
755
|
+
["m2v", "video/mpeg"],
|
|
756
|
+
["m3a", "audio/mpeg"],
|
|
757
|
+
["m3u", "text/plain"],
|
|
758
|
+
["m3u8", "application/vnd.apple.mpegurl"],
|
|
759
|
+
["m4a", "audio/x-m4a"],
|
|
760
|
+
["m4p", "application/mp4"],
|
|
761
|
+
["m4s", "video/iso.segment"],
|
|
762
|
+
["m4u", "application/vnd.mpegurl"],
|
|
763
|
+
["m4v", "video/x-m4v"],
|
|
764
|
+
["m13", "application/x-msmediaview"],
|
|
765
|
+
["m14", "application/x-msmediaview"],
|
|
766
|
+
["m21", "application/mp21"],
|
|
767
|
+
["ma", "application/mathematica"],
|
|
768
|
+
["mads", "application/mads+xml"],
|
|
769
|
+
["maei", "application/mmt-aei+xml"],
|
|
770
|
+
["mag", "application/vnd.ecowin.chart"],
|
|
771
|
+
["maker", "application/vnd.framemaker"],
|
|
772
|
+
["man", "text/troff"],
|
|
773
|
+
["manifest", "text/cache-manifest"],
|
|
774
|
+
["map", "application/json"],
|
|
775
|
+
["mar", "application/octet-stream"],
|
|
776
|
+
["markdown", "text/markdown"],
|
|
777
|
+
["mathml", "application/mathml+xml"],
|
|
778
|
+
["mb", "application/mathematica"],
|
|
779
|
+
["mbk", "application/vnd.mobius.mbk"],
|
|
780
|
+
["mbox", "application/mbox"],
|
|
781
|
+
["mc1", "application/vnd.medcalcdata"],
|
|
782
|
+
["mcd", "application/vnd.mcd"],
|
|
783
|
+
["mcurl", "text/vnd.curl.mcurl"],
|
|
784
|
+
["md", "text/markdown"],
|
|
785
|
+
["mdb", "application/x-msaccess"],
|
|
786
|
+
["mdi", "image/vnd.ms-modi"],
|
|
787
|
+
["mdx", "text/mdx"],
|
|
788
|
+
["me", "text/troff"],
|
|
789
|
+
["mesh", "model/mesh"],
|
|
790
|
+
["meta4", "application/metalink4+xml"],
|
|
791
|
+
["metalink", "application/metalink+xml"],
|
|
792
|
+
["mets", "application/mets+xml"],
|
|
793
|
+
["mfm", "application/vnd.mfmp"],
|
|
794
|
+
["mft", "application/rpki-manifest"],
|
|
795
|
+
["mgp", "application/vnd.osgeo.mapguide.package"],
|
|
796
|
+
["mgz", "application/vnd.proteus.magazine"],
|
|
797
|
+
["mid", "audio/midi"],
|
|
798
|
+
["midi", "audio/midi"],
|
|
799
|
+
["mie", "application/x-mie"],
|
|
800
|
+
["mif", "application/vnd.mif"],
|
|
801
|
+
["mime", "message/rfc822"],
|
|
802
|
+
["mj2", "video/mj2"],
|
|
803
|
+
["mjp2", "video/mj2"],
|
|
804
|
+
["mjs", "application/javascript"],
|
|
805
|
+
["mk3d", "video/x-matroska"],
|
|
806
|
+
["mka", "audio/x-matroska"],
|
|
807
|
+
["mkd", "text/x-markdown"],
|
|
808
|
+
["mks", "video/x-matroska"],
|
|
809
|
+
["mkv", "video/x-matroska"],
|
|
810
|
+
["mlp", "application/vnd.dolby.mlp"],
|
|
811
|
+
["mmd", "application/vnd.chipnuts.karaoke-mmd"],
|
|
812
|
+
["mmf", "application/vnd.smaf"],
|
|
813
|
+
["mml", "text/mathml"],
|
|
814
|
+
["mmr", "image/vnd.fujixerox.edmics-mmr"],
|
|
815
|
+
["mng", "video/x-mng"],
|
|
816
|
+
["mny", "application/x-msmoney"],
|
|
817
|
+
["mobi", "application/x-mobipocket-ebook"],
|
|
818
|
+
["mods", "application/mods+xml"],
|
|
819
|
+
["mov", "video/quicktime"],
|
|
820
|
+
["movie", "video/x-sgi-movie"],
|
|
821
|
+
["mp2", "audio/mpeg"],
|
|
822
|
+
["mp2a", "audio/mpeg"],
|
|
823
|
+
["mp3", "audio/mpeg"],
|
|
824
|
+
["mp4", "video/mp4"],
|
|
825
|
+
["mp4a", "audio/mp4"],
|
|
826
|
+
["mp4s", "application/mp4"],
|
|
827
|
+
["mp4v", "video/mp4"],
|
|
828
|
+
["mp21", "application/mp21"],
|
|
829
|
+
["mpc", "application/vnd.mophun.certificate"],
|
|
830
|
+
["mpd", "application/dash+xml"],
|
|
831
|
+
["mpe", "video/mpeg"],
|
|
832
|
+
["mpeg", "video/mpeg"],
|
|
833
|
+
["mpg", "video/mpeg"],
|
|
834
|
+
["mpg4", "video/mp4"],
|
|
835
|
+
["mpga", "audio/mpeg"],
|
|
836
|
+
["mpkg", "application/vnd.apple.installer+xml"],
|
|
837
|
+
["mpm", "application/vnd.blueice.multipass"],
|
|
838
|
+
["mpn", "application/vnd.mophun.application"],
|
|
839
|
+
["mpp", "application/vnd.ms-project"],
|
|
840
|
+
["mpt", "application/vnd.ms-project"],
|
|
841
|
+
["mpy", "application/vnd.ibm.minipay"],
|
|
842
|
+
["mqy", "application/vnd.mobius.mqy"],
|
|
843
|
+
["mrc", "application/marc"],
|
|
844
|
+
["mrcx", "application/marcxml+xml"],
|
|
845
|
+
["ms", "text/troff"],
|
|
846
|
+
["mscml", "application/mediaservercontrol+xml"],
|
|
847
|
+
["mseed", "application/vnd.fdsn.mseed"],
|
|
848
|
+
["mseq", "application/vnd.mseq"],
|
|
849
|
+
["msf", "application/vnd.epson.msf"],
|
|
850
|
+
["msg", "application/vnd.ms-outlook"],
|
|
851
|
+
["msh", "model/mesh"],
|
|
852
|
+
["msi", "application/x-msdownload"],
|
|
853
|
+
["msl", "application/vnd.mobius.msl"],
|
|
854
|
+
["msm", "application/octet-stream"],
|
|
855
|
+
["msp", "application/octet-stream"],
|
|
856
|
+
["msty", "application/vnd.muvee.style"],
|
|
857
|
+
["mtl", "model/mtl"],
|
|
858
|
+
["mts", "model/vnd.mts"],
|
|
859
|
+
["mus", "application/vnd.musician"],
|
|
860
|
+
["musd", "application/mmt-usd+xml"],
|
|
861
|
+
["musicxml", "application/vnd.recordare.musicxml+xml"],
|
|
862
|
+
["mvb", "application/x-msmediaview"],
|
|
863
|
+
["mvt", "application/vnd.mapbox-vector-tile"],
|
|
864
|
+
["mwf", "application/vnd.mfer"],
|
|
865
|
+
["mxf", "application/mxf"],
|
|
866
|
+
["mxl", "application/vnd.recordare.musicxml"],
|
|
867
|
+
["mxmf", "audio/mobile-xmf"],
|
|
868
|
+
["mxml", "application/xv+xml"],
|
|
869
|
+
["mxs", "application/vnd.triscape.mxs"],
|
|
870
|
+
["mxu", "video/vnd.mpegurl"],
|
|
871
|
+
["n-gage", "application/vnd.nokia.n-gage.symbian.install"],
|
|
872
|
+
["n3", "text/n3"],
|
|
873
|
+
["nb", "application/mathematica"],
|
|
874
|
+
["nbp", "application/vnd.wolfram.player"],
|
|
875
|
+
["nc", "application/x-netcdf"],
|
|
876
|
+
["ncx", "application/x-dtbncx+xml"],
|
|
877
|
+
["nfo", "text/x-nfo"],
|
|
878
|
+
["ngdat", "application/vnd.nokia.n-gage.data"],
|
|
879
|
+
["nitf", "application/vnd.nitf"],
|
|
880
|
+
["nlu", "application/vnd.neurolanguage.nlu"],
|
|
881
|
+
["nml", "application/vnd.enliven"],
|
|
882
|
+
["nnd", "application/vnd.noblenet-directory"],
|
|
883
|
+
["nns", "application/vnd.noblenet-sealer"],
|
|
884
|
+
["nnw", "application/vnd.noblenet-web"],
|
|
885
|
+
["npx", "image/vnd.net-fpx"],
|
|
886
|
+
["nq", "application/n-quads"],
|
|
887
|
+
["nsc", "application/x-conference"],
|
|
888
|
+
["nsf", "application/vnd.lotus-notes"],
|
|
889
|
+
["nt", "application/n-triples"],
|
|
890
|
+
["ntf", "application/vnd.nitf"],
|
|
891
|
+
["numbers", "application/x-iwork-numbers-sffnumbers"],
|
|
892
|
+
["nzb", "application/x-nzb"],
|
|
893
|
+
["oa2", "application/vnd.fujitsu.oasys2"],
|
|
894
|
+
["oa3", "application/vnd.fujitsu.oasys3"],
|
|
895
|
+
["oas", "application/vnd.fujitsu.oasys"],
|
|
896
|
+
["obd", "application/x-msbinder"],
|
|
897
|
+
["obgx", "application/vnd.openblox.game+xml"],
|
|
898
|
+
["obj", "model/obj"],
|
|
899
|
+
["oda", "application/oda"],
|
|
900
|
+
["odb", "application/vnd.oasis.opendocument.database"],
|
|
901
|
+
["odc", "application/vnd.oasis.opendocument.chart"],
|
|
902
|
+
["odf", "application/vnd.oasis.opendocument.formula"],
|
|
903
|
+
["odft", "application/vnd.oasis.opendocument.formula-template"],
|
|
904
|
+
["odg", "application/vnd.oasis.opendocument.graphics"],
|
|
905
|
+
["odi", "application/vnd.oasis.opendocument.image"],
|
|
906
|
+
["odm", "application/vnd.oasis.opendocument.text-master"],
|
|
907
|
+
["odp", "application/vnd.oasis.opendocument.presentation"],
|
|
908
|
+
["ods", "application/vnd.oasis.opendocument.spreadsheet"],
|
|
909
|
+
["odt", "application/vnd.oasis.opendocument.text"],
|
|
910
|
+
["oga", "audio/ogg"],
|
|
911
|
+
["ogex", "model/vnd.opengex"],
|
|
912
|
+
["ogg", "audio/ogg"],
|
|
913
|
+
["ogv", "video/ogg"],
|
|
914
|
+
["ogx", "application/ogg"],
|
|
915
|
+
["omdoc", "application/omdoc+xml"],
|
|
916
|
+
["onepkg", "application/onenote"],
|
|
917
|
+
["onetmp", "application/onenote"],
|
|
918
|
+
["onetoc", "application/onenote"],
|
|
919
|
+
["onetoc2", "application/onenote"],
|
|
920
|
+
["opf", "application/oebps-package+xml"],
|
|
921
|
+
["opml", "text/x-opml"],
|
|
922
|
+
["oprc", "application/vnd.palm"],
|
|
923
|
+
["opus", "audio/ogg"],
|
|
924
|
+
["org", "text/x-org"],
|
|
925
|
+
["osf", "application/vnd.yamaha.openscoreformat"],
|
|
926
|
+
["osfpvg", "application/vnd.yamaha.openscoreformat.osfpvg+xml"],
|
|
927
|
+
["osm", "application/vnd.openstreetmap.data+xml"],
|
|
928
|
+
["otc", "application/vnd.oasis.opendocument.chart-template"],
|
|
929
|
+
["otf", "font/otf"],
|
|
930
|
+
["otg", "application/vnd.oasis.opendocument.graphics-template"],
|
|
931
|
+
["oth", "application/vnd.oasis.opendocument.text-web"],
|
|
932
|
+
["oti", "application/vnd.oasis.opendocument.image-template"],
|
|
933
|
+
["otp", "application/vnd.oasis.opendocument.presentation-template"],
|
|
934
|
+
["ots", "application/vnd.oasis.opendocument.spreadsheet-template"],
|
|
935
|
+
["ott", "application/vnd.oasis.opendocument.text-template"],
|
|
936
|
+
["ova", "application/x-virtualbox-ova"],
|
|
937
|
+
["ovf", "application/x-virtualbox-ovf"],
|
|
938
|
+
["owl", "application/rdf+xml"],
|
|
939
|
+
["oxps", "application/oxps"],
|
|
940
|
+
["oxt", "application/vnd.openofficeorg.extension"],
|
|
941
|
+
["p", "text/x-pascal"],
|
|
942
|
+
["p7a", "application/x-pkcs7-signature"],
|
|
943
|
+
["p7b", "application/x-pkcs7-certificates"],
|
|
944
|
+
["p7c", "application/pkcs7-mime"],
|
|
945
|
+
["p7m", "application/pkcs7-mime"],
|
|
946
|
+
["p7r", "application/x-pkcs7-certreqresp"],
|
|
947
|
+
["p7s", "application/pkcs7-signature"],
|
|
948
|
+
["p8", "application/pkcs8"],
|
|
949
|
+
["p10", "application/x-pkcs10"],
|
|
950
|
+
["p12", "application/x-pkcs12"],
|
|
951
|
+
["pac", "application/x-ns-proxy-autoconfig"],
|
|
952
|
+
["pages", "application/x-iwork-pages-sffpages"],
|
|
953
|
+
["pas", "text/x-pascal"],
|
|
954
|
+
["paw", "application/vnd.pawaafile"],
|
|
955
|
+
["pbd", "application/vnd.powerbuilder6"],
|
|
956
|
+
["pbm", "image/x-portable-bitmap"],
|
|
957
|
+
["pcap", "application/vnd.tcpdump.pcap"],
|
|
958
|
+
["pcf", "application/x-font-pcf"],
|
|
959
|
+
["pcl", "application/vnd.hp-pcl"],
|
|
960
|
+
["pclxl", "application/vnd.hp-pclxl"],
|
|
961
|
+
["pct", "image/x-pict"],
|
|
962
|
+
["pcurl", "application/vnd.curl.pcurl"],
|
|
963
|
+
["pcx", "image/x-pcx"],
|
|
964
|
+
["pdb", "application/x-pilot"],
|
|
965
|
+
["pde", "text/x-processing"],
|
|
966
|
+
["pdf", "application/pdf"],
|
|
967
|
+
["pem", "application/x-x509-user-cert"],
|
|
968
|
+
["pfa", "application/x-font-type1"],
|
|
969
|
+
["pfb", "application/x-font-type1"],
|
|
970
|
+
["pfm", "application/x-font-type1"],
|
|
971
|
+
["pfr", "application/font-tdpfr"],
|
|
972
|
+
["pfx", "application/x-pkcs12"],
|
|
973
|
+
["pgm", "image/x-portable-graymap"],
|
|
974
|
+
["pgn", "application/x-chess-pgn"],
|
|
975
|
+
["pgp", "application/pgp"],
|
|
976
|
+
["php", "application/x-httpd-php"],
|
|
977
|
+
["php3", "application/x-httpd-php"],
|
|
978
|
+
["php4", "application/x-httpd-php"],
|
|
979
|
+
["phps", "application/x-httpd-php-source"],
|
|
980
|
+
["phtml", "application/x-httpd-php"],
|
|
981
|
+
["pic", "image/x-pict"],
|
|
982
|
+
["pkg", "application/octet-stream"],
|
|
983
|
+
["pki", "application/pkixcmp"],
|
|
984
|
+
["pkipath", "application/pkix-pkipath"],
|
|
985
|
+
["pkpass", "application/vnd.apple.pkpass"],
|
|
986
|
+
["pl", "application/x-perl"],
|
|
987
|
+
["plb", "application/vnd.3gpp.pic-bw-large"],
|
|
988
|
+
["plc", "application/vnd.mobius.plc"],
|
|
989
|
+
["plf", "application/vnd.pocketlearn"],
|
|
990
|
+
["pls", "application/pls+xml"],
|
|
991
|
+
["pm", "application/x-perl"],
|
|
992
|
+
["pml", "application/vnd.ctc-posml"],
|
|
993
|
+
["png", "image/png"],
|
|
994
|
+
["pnm", "image/x-portable-anymap"],
|
|
995
|
+
["portpkg", "application/vnd.macports.portpkg"],
|
|
996
|
+
["pot", "application/vnd.ms-powerpoint"],
|
|
997
|
+
["potm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"],
|
|
998
|
+
["potx", "application/vnd.openxmlformats-officedocument.presentationml.template"],
|
|
999
|
+
["ppa", "application/vnd.ms-powerpoint"],
|
|
1000
|
+
["ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"],
|
|
1001
|
+
["ppd", "application/vnd.cups-ppd"],
|
|
1002
|
+
["ppm", "image/x-portable-pixmap"],
|
|
1003
|
+
["pps", "application/vnd.ms-powerpoint"],
|
|
1004
|
+
["ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"],
|
|
1005
|
+
["ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"],
|
|
1006
|
+
["ppt", "application/powerpoint"],
|
|
1007
|
+
["pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"],
|
|
1008
|
+
["pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"],
|
|
1009
|
+
["pqa", "application/vnd.palm"],
|
|
1010
|
+
["prc", "application/x-pilot"],
|
|
1011
|
+
["pre", "application/vnd.lotus-freelance"],
|
|
1012
|
+
["prf", "application/pics-rules"],
|
|
1013
|
+
["provx", "application/provenance+xml"],
|
|
1014
|
+
["ps", "application/postscript"],
|
|
1015
|
+
["psb", "application/vnd.3gpp.pic-bw-small"],
|
|
1016
|
+
["psd", "application/x-photoshop"],
|
|
1017
|
+
["psf", "application/x-font-linux-psf"],
|
|
1018
|
+
["pskcxml", "application/pskc+xml"],
|
|
1019
|
+
["pti", "image/prs.pti"],
|
|
1020
|
+
["ptid", "application/vnd.pvi.ptid1"],
|
|
1021
|
+
["pub", "application/x-mspublisher"],
|
|
1022
|
+
["pvb", "application/vnd.3gpp.pic-bw-var"],
|
|
1023
|
+
["pwn", "application/vnd.3m.post-it-notes"],
|
|
1024
|
+
["pya", "audio/vnd.ms-playready.media.pya"],
|
|
1025
|
+
["pyv", "video/vnd.ms-playready.media.pyv"],
|
|
1026
|
+
["qam", "application/vnd.epson.quickanime"],
|
|
1027
|
+
["qbo", "application/vnd.intu.qbo"],
|
|
1028
|
+
["qfx", "application/vnd.intu.qfx"],
|
|
1029
|
+
["qps", "application/vnd.publishare-delta-tree"],
|
|
1030
|
+
["qt", "video/quicktime"],
|
|
1031
|
+
["qwd", "application/vnd.quark.quarkxpress"],
|
|
1032
|
+
["qwt", "application/vnd.quark.quarkxpress"],
|
|
1033
|
+
["qxb", "application/vnd.quark.quarkxpress"],
|
|
1034
|
+
["qxd", "application/vnd.quark.quarkxpress"],
|
|
1035
|
+
["qxl", "application/vnd.quark.quarkxpress"],
|
|
1036
|
+
["qxt", "application/vnd.quark.quarkxpress"],
|
|
1037
|
+
["ra", "audio/x-realaudio"],
|
|
1038
|
+
["ram", "audio/x-pn-realaudio"],
|
|
1039
|
+
["raml", "application/raml+yaml"],
|
|
1040
|
+
["rapd", "application/route-apd+xml"],
|
|
1041
|
+
["rar", "application/x-rar"],
|
|
1042
|
+
["ras", "image/x-cmu-raster"],
|
|
1043
|
+
["rcprofile", "application/vnd.ipunplugged.rcprofile"],
|
|
1044
|
+
["rdf", "application/rdf+xml"],
|
|
1045
|
+
["rdz", "application/vnd.data-vision.rdz"],
|
|
1046
|
+
["relo", "application/p2p-overlay+xml"],
|
|
1047
|
+
["rep", "application/vnd.businessobjects"],
|
|
1048
|
+
["res", "application/x-dtbresource+xml"],
|
|
1049
|
+
["rgb", "image/x-rgb"],
|
|
1050
|
+
["rif", "application/reginfo+xml"],
|
|
1051
|
+
["rip", "audio/vnd.rip"],
|
|
1052
|
+
["ris", "application/x-research-info-systems"],
|
|
1053
|
+
["rl", "application/resource-lists+xml"],
|
|
1054
|
+
["rlc", "image/vnd.fujixerox.edmics-rlc"],
|
|
1055
|
+
["rld", "application/resource-lists-diff+xml"],
|
|
1056
|
+
["rm", "audio/x-pn-realaudio"],
|
|
1057
|
+
["rmi", "audio/midi"],
|
|
1058
|
+
["rmp", "audio/x-pn-realaudio-plugin"],
|
|
1059
|
+
["rms", "application/vnd.jcp.javame.midlet-rms"],
|
|
1060
|
+
["rmvb", "application/vnd.rn-realmedia-vbr"],
|
|
1061
|
+
["rnc", "application/relax-ng-compact-syntax"],
|
|
1062
|
+
["rng", "application/xml"],
|
|
1063
|
+
["roa", "application/rpki-roa"],
|
|
1064
|
+
["roff", "text/troff"],
|
|
1065
|
+
["rp9", "application/vnd.cloanto.rp9"],
|
|
1066
|
+
["rpm", "audio/x-pn-realaudio-plugin"],
|
|
1067
|
+
["rpss", "application/vnd.nokia.radio-presets"],
|
|
1068
|
+
["rpst", "application/vnd.nokia.radio-preset"],
|
|
1069
|
+
["rq", "application/sparql-query"],
|
|
1070
|
+
["rs", "application/rls-services+xml"],
|
|
1071
|
+
["rsa", "application/x-pkcs7"],
|
|
1072
|
+
["rsat", "application/atsc-rsat+xml"],
|
|
1073
|
+
["rsd", "application/rsd+xml"],
|
|
1074
|
+
["rsheet", "application/urc-ressheet+xml"],
|
|
1075
|
+
["rss", "application/rss+xml"],
|
|
1076
|
+
["rtf", "text/rtf"],
|
|
1077
|
+
["rtx", "text/richtext"],
|
|
1078
|
+
["run", "application/x-makeself"],
|
|
1079
|
+
["rusd", "application/route-usd+xml"],
|
|
1080
|
+
["rv", "video/vnd.rn-realvideo"],
|
|
1081
|
+
["s", "text/x-asm"],
|
|
1082
|
+
["s3m", "audio/s3m"],
|
|
1083
|
+
["saf", "application/vnd.yamaha.smaf-audio"],
|
|
1084
|
+
["sass", "text/x-sass"],
|
|
1085
|
+
["sbml", "application/sbml+xml"],
|
|
1086
|
+
["sc", "application/vnd.ibm.secure-container"],
|
|
1087
|
+
["scd", "application/x-msschedule"],
|
|
1088
|
+
["scm", "application/vnd.lotus-screencam"],
|
|
1089
|
+
["scq", "application/scvp-cv-request"],
|
|
1090
|
+
["scs", "application/scvp-cv-response"],
|
|
1091
|
+
["scss", "text/x-scss"],
|
|
1092
|
+
["scurl", "text/vnd.curl.scurl"],
|
|
1093
|
+
["sda", "application/vnd.stardivision.draw"],
|
|
1094
|
+
["sdc", "application/vnd.stardivision.calc"],
|
|
1095
|
+
["sdd", "application/vnd.stardivision.impress"],
|
|
1096
|
+
["sdkd", "application/vnd.solent.sdkm+xml"],
|
|
1097
|
+
["sdkm", "application/vnd.solent.sdkm+xml"],
|
|
1098
|
+
["sdp", "application/sdp"],
|
|
1099
|
+
["sdw", "application/vnd.stardivision.writer"],
|
|
1100
|
+
["sea", "application/octet-stream"],
|
|
1101
|
+
["see", "application/vnd.seemail"],
|
|
1102
|
+
["seed", "application/vnd.fdsn.seed"],
|
|
1103
|
+
["sema", "application/vnd.sema"],
|
|
1104
|
+
["semd", "application/vnd.semd"],
|
|
1105
|
+
["semf", "application/vnd.semf"],
|
|
1106
|
+
["senmlx", "application/senml+xml"],
|
|
1107
|
+
["sensmlx", "application/sensml+xml"],
|
|
1108
|
+
["ser", "application/java-serialized-object"],
|
|
1109
|
+
["setpay", "application/set-payment-initiation"],
|
|
1110
|
+
["setreg", "application/set-registration-initiation"],
|
|
1111
|
+
["sfd-hdstx", "application/vnd.hydrostatix.sof-data"],
|
|
1112
|
+
["sfs", "application/vnd.spotfire.sfs"],
|
|
1113
|
+
["sfv", "text/x-sfv"],
|
|
1114
|
+
["sgi", "image/sgi"],
|
|
1115
|
+
["sgl", "application/vnd.stardivision.writer-global"],
|
|
1116
|
+
["sgm", "text/sgml"],
|
|
1117
|
+
["sgml", "text/sgml"],
|
|
1118
|
+
["sh", "application/x-sh"],
|
|
1119
|
+
["shar", "application/x-shar"],
|
|
1120
|
+
["shex", "text/shex"],
|
|
1121
|
+
["shf", "application/shf+xml"],
|
|
1122
|
+
["shtml", "text/html"],
|
|
1123
|
+
["sid", "image/x-mrsid-image"],
|
|
1124
|
+
["sieve", "application/sieve"],
|
|
1125
|
+
["sig", "application/pgp-signature"],
|
|
1126
|
+
["sil", "audio/silk"],
|
|
1127
|
+
["silo", "model/mesh"],
|
|
1128
|
+
["sis", "application/vnd.symbian.install"],
|
|
1129
|
+
["sisx", "application/vnd.symbian.install"],
|
|
1130
|
+
["sit", "application/x-stuffit"],
|
|
1131
|
+
["sitx", "application/x-stuffitx"],
|
|
1132
|
+
["siv", "application/sieve"],
|
|
1133
|
+
["skd", "application/vnd.koan"],
|
|
1134
|
+
["skm", "application/vnd.koan"],
|
|
1135
|
+
["skp", "application/vnd.koan"],
|
|
1136
|
+
["skt", "application/vnd.koan"],
|
|
1137
|
+
["sldm", "application/vnd.ms-powerpoint.slide.macroenabled.12"],
|
|
1138
|
+
["sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"],
|
|
1139
|
+
["slim", "text/slim"],
|
|
1140
|
+
["slm", "text/slim"],
|
|
1141
|
+
["sls", "application/route-s-tsid+xml"],
|
|
1142
|
+
["slt", "application/vnd.epson.salt"],
|
|
1143
|
+
["sm", "application/vnd.stepmania.stepchart"],
|
|
1144
|
+
["smf", "application/vnd.stardivision.math"],
|
|
1145
|
+
["smi", "application/smil"],
|
|
1146
|
+
["smil", "application/smil"],
|
|
1147
|
+
["smv", "video/x-smv"],
|
|
1148
|
+
["smzip", "application/vnd.stepmania.package"],
|
|
1149
|
+
["snd", "audio/basic"],
|
|
1150
|
+
["snf", "application/x-font-snf"],
|
|
1151
|
+
["so", "application/octet-stream"],
|
|
1152
|
+
["spc", "application/x-pkcs7-certificates"],
|
|
1153
|
+
["spdx", "text/spdx"],
|
|
1154
|
+
["spf", "application/vnd.yamaha.smaf-phrase"],
|
|
1155
|
+
["spl", "application/x-futuresplash"],
|
|
1156
|
+
["spot", "text/vnd.in3d.spot"],
|
|
1157
|
+
["spp", "application/scvp-vp-response"],
|
|
1158
|
+
["spq", "application/scvp-vp-request"],
|
|
1159
|
+
["spx", "audio/ogg"],
|
|
1160
|
+
["sql", "application/x-sql"],
|
|
1161
|
+
["src", "application/x-wais-source"],
|
|
1162
|
+
["srt", "application/x-subrip"],
|
|
1163
|
+
["sru", "application/sru+xml"],
|
|
1164
|
+
["srx", "application/sparql-results+xml"],
|
|
1165
|
+
["ssdl", "application/ssdl+xml"],
|
|
1166
|
+
["sse", "application/vnd.kodak-descriptor"],
|
|
1167
|
+
["ssf", "application/vnd.epson.ssf"],
|
|
1168
|
+
["ssml", "application/ssml+xml"],
|
|
1169
|
+
["sst", "application/octet-stream"],
|
|
1170
|
+
["st", "application/vnd.sailingtracker.track"],
|
|
1171
|
+
["stc", "application/vnd.sun.xml.calc.template"],
|
|
1172
|
+
["std", "application/vnd.sun.xml.draw.template"],
|
|
1173
|
+
["stf", "application/vnd.wt.stf"],
|
|
1174
|
+
["sti", "application/vnd.sun.xml.impress.template"],
|
|
1175
|
+
["stk", "application/hyperstudio"],
|
|
1176
|
+
["stl", "model/stl"],
|
|
1177
|
+
["stpx", "model/step+xml"],
|
|
1178
|
+
["stpxz", "model/step-xml+zip"],
|
|
1179
|
+
["stpz", "model/step+zip"],
|
|
1180
|
+
["str", "application/vnd.pg.format"],
|
|
1181
|
+
["stw", "application/vnd.sun.xml.writer.template"],
|
|
1182
|
+
["styl", "text/stylus"],
|
|
1183
|
+
["stylus", "text/stylus"],
|
|
1184
|
+
["sub", "text/vnd.dvb.subtitle"],
|
|
1185
|
+
["sus", "application/vnd.sus-calendar"],
|
|
1186
|
+
["susp", "application/vnd.sus-calendar"],
|
|
1187
|
+
["sv4cpio", "application/x-sv4cpio"],
|
|
1188
|
+
["sv4crc", "application/x-sv4crc"],
|
|
1189
|
+
["svc", "application/vnd.dvb.service"],
|
|
1190
|
+
["svd", "application/vnd.svd"],
|
|
1191
|
+
["svg", "image/svg+xml"],
|
|
1192
|
+
["svgz", "image/svg+xml"],
|
|
1193
|
+
["swa", "application/x-director"],
|
|
1194
|
+
["swf", "application/x-shockwave-flash"],
|
|
1195
|
+
["swi", "application/vnd.aristanetworks.swi"],
|
|
1196
|
+
["swidtag", "application/swid+xml"],
|
|
1197
|
+
["sxc", "application/vnd.sun.xml.calc"],
|
|
1198
|
+
["sxd", "application/vnd.sun.xml.draw"],
|
|
1199
|
+
["sxg", "application/vnd.sun.xml.writer.global"],
|
|
1200
|
+
["sxi", "application/vnd.sun.xml.impress"],
|
|
1201
|
+
["sxm", "application/vnd.sun.xml.math"],
|
|
1202
|
+
["sxw", "application/vnd.sun.xml.writer"],
|
|
1203
|
+
["t", "text/troff"],
|
|
1204
|
+
["t3", "application/x-t3vm-image"],
|
|
1205
|
+
["t38", "image/t38"],
|
|
1206
|
+
["taglet", "application/vnd.mynfc"],
|
|
1207
|
+
["tao", "application/vnd.tao.intent-module-archive"],
|
|
1208
|
+
["tap", "image/vnd.tencent.tap"],
|
|
1209
|
+
["tar", "application/x-tar"],
|
|
1210
|
+
["tcap", "application/vnd.3gpp2.tcap"],
|
|
1211
|
+
["tcl", "application/x-tcl"],
|
|
1212
|
+
["td", "application/urc-targetdesc+xml"],
|
|
1213
|
+
["teacher", "application/vnd.smart.teacher"],
|
|
1214
|
+
["tei", "application/tei+xml"],
|
|
1215
|
+
["teicorpus", "application/tei+xml"],
|
|
1216
|
+
["tex", "application/x-tex"],
|
|
1217
|
+
["texi", "application/x-texinfo"],
|
|
1218
|
+
["texinfo", "application/x-texinfo"],
|
|
1219
|
+
["text", "text/plain"],
|
|
1220
|
+
["tfi", "application/thraud+xml"],
|
|
1221
|
+
["tfm", "application/x-tex-tfm"],
|
|
1222
|
+
["tfx", "image/tiff-fx"],
|
|
1223
|
+
["tga", "image/x-tga"],
|
|
1224
|
+
["tgz", "application/x-tar"],
|
|
1225
|
+
["thmx", "application/vnd.ms-officetheme"],
|
|
1226
|
+
["tif", "image/tiff"],
|
|
1227
|
+
["tiff", "image/tiff"],
|
|
1228
|
+
["tk", "application/x-tcl"],
|
|
1229
|
+
["tmo", "application/vnd.tmobile-livetv"],
|
|
1230
|
+
["toml", "application/toml"],
|
|
1231
|
+
["torrent", "application/x-bittorrent"],
|
|
1232
|
+
["tpl", "application/vnd.groove-tool-template"],
|
|
1233
|
+
["tpt", "application/vnd.trid.tpt"],
|
|
1234
|
+
["tr", "text/troff"],
|
|
1235
|
+
["tra", "application/vnd.trueapp"],
|
|
1236
|
+
["trig", "application/trig"],
|
|
1237
|
+
["trm", "application/x-msterminal"],
|
|
1238
|
+
["ts", "video/mp2t"],
|
|
1239
|
+
["tsd", "application/timestamped-data"],
|
|
1240
|
+
["tsv", "text/tab-separated-values"],
|
|
1241
|
+
["ttc", "font/collection"],
|
|
1242
|
+
["ttf", "font/ttf"],
|
|
1243
|
+
["ttl", "text/turtle"],
|
|
1244
|
+
["ttml", "application/ttml+xml"],
|
|
1245
|
+
["twd", "application/vnd.simtech-mindmapper"],
|
|
1246
|
+
["twds", "application/vnd.simtech-mindmapper"],
|
|
1247
|
+
["txd", "application/vnd.genomatix.tuxedo"],
|
|
1248
|
+
["txf", "application/vnd.mobius.txf"],
|
|
1249
|
+
["txt", "text/plain"],
|
|
1250
|
+
["u8dsn", "message/global-delivery-status"],
|
|
1251
|
+
["u8hdr", "message/global-headers"],
|
|
1252
|
+
["u8mdn", "message/global-disposition-notification"],
|
|
1253
|
+
["u8msg", "message/global"],
|
|
1254
|
+
["u32", "application/x-authorware-bin"],
|
|
1255
|
+
["ubj", "application/ubjson"],
|
|
1256
|
+
["udeb", "application/x-debian-package"],
|
|
1257
|
+
["ufd", "application/vnd.ufdl"],
|
|
1258
|
+
["ufdl", "application/vnd.ufdl"],
|
|
1259
|
+
["ulx", "application/x-glulx"],
|
|
1260
|
+
["umj", "application/vnd.umajin"],
|
|
1261
|
+
["unityweb", "application/vnd.unity"],
|
|
1262
|
+
["uoml", "application/vnd.uoml+xml"],
|
|
1263
|
+
["uri", "text/uri-list"],
|
|
1264
|
+
["uris", "text/uri-list"],
|
|
1265
|
+
["urls", "text/uri-list"],
|
|
1266
|
+
["usdz", "model/vnd.usdz+zip"],
|
|
1267
|
+
["ustar", "application/x-ustar"],
|
|
1268
|
+
["utz", "application/vnd.uiq.theme"],
|
|
1269
|
+
["uu", "text/x-uuencode"],
|
|
1270
|
+
["uva", "audio/vnd.dece.audio"],
|
|
1271
|
+
["uvd", "application/vnd.dece.data"],
|
|
1272
|
+
["uvf", "application/vnd.dece.data"],
|
|
1273
|
+
["uvg", "image/vnd.dece.graphic"],
|
|
1274
|
+
["uvh", "video/vnd.dece.hd"],
|
|
1275
|
+
["uvi", "image/vnd.dece.graphic"],
|
|
1276
|
+
["uvm", "video/vnd.dece.mobile"],
|
|
1277
|
+
["uvp", "video/vnd.dece.pd"],
|
|
1278
|
+
["uvs", "video/vnd.dece.sd"],
|
|
1279
|
+
["uvt", "application/vnd.dece.ttml+xml"],
|
|
1280
|
+
["uvu", "video/vnd.uvvu.mp4"],
|
|
1281
|
+
["uvv", "video/vnd.dece.video"],
|
|
1282
|
+
["uvva", "audio/vnd.dece.audio"],
|
|
1283
|
+
["uvvd", "application/vnd.dece.data"],
|
|
1284
|
+
["uvvf", "application/vnd.dece.data"],
|
|
1285
|
+
["uvvg", "image/vnd.dece.graphic"],
|
|
1286
|
+
["uvvh", "video/vnd.dece.hd"],
|
|
1287
|
+
["uvvi", "image/vnd.dece.graphic"],
|
|
1288
|
+
["uvvm", "video/vnd.dece.mobile"],
|
|
1289
|
+
["uvvp", "video/vnd.dece.pd"],
|
|
1290
|
+
["uvvs", "video/vnd.dece.sd"],
|
|
1291
|
+
["uvvt", "application/vnd.dece.ttml+xml"],
|
|
1292
|
+
["uvvu", "video/vnd.uvvu.mp4"],
|
|
1293
|
+
["uvvv", "video/vnd.dece.video"],
|
|
1294
|
+
["uvvx", "application/vnd.dece.unspecified"],
|
|
1295
|
+
["uvvz", "application/vnd.dece.zip"],
|
|
1296
|
+
["uvx", "application/vnd.dece.unspecified"],
|
|
1297
|
+
["uvz", "application/vnd.dece.zip"],
|
|
1298
|
+
["vbox", "application/x-virtualbox-vbox"],
|
|
1299
|
+
["vbox-extpack", "application/x-virtualbox-vbox-extpack"],
|
|
1300
|
+
["vcard", "text/vcard"],
|
|
1301
|
+
["vcd", "application/x-cdlink"],
|
|
1302
|
+
["vcf", "text/x-vcard"],
|
|
1303
|
+
["vcg", "application/vnd.groove-vcard"],
|
|
1304
|
+
["vcs", "text/x-vcalendar"],
|
|
1305
|
+
["vcx", "application/vnd.vcx"],
|
|
1306
|
+
["vdi", "application/x-virtualbox-vdi"],
|
|
1307
|
+
["vds", "model/vnd.sap.vds"],
|
|
1308
|
+
["vhd", "application/x-virtualbox-vhd"],
|
|
1309
|
+
["vis", "application/vnd.visionary"],
|
|
1310
|
+
["viv", "video/vnd.vivo"],
|
|
1311
|
+
["vlc", "application/videolan"],
|
|
1312
|
+
["vmdk", "application/x-virtualbox-vmdk"],
|
|
1313
|
+
["vob", "video/x-ms-vob"],
|
|
1314
|
+
["vor", "application/vnd.stardivision.writer"],
|
|
1315
|
+
["vox", "application/x-authorware-bin"],
|
|
1316
|
+
["vrml", "model/vrml"],
|
|
1317
|
+
["vsd", "application/vnd.visio"],
|
|
1318
|
+
["vsf", "application/vnd.vsf"],
|
|
1319
|
+
["vss", "application/vnd.visio"],
|
|
1320
|
+
["vst", "application/vnd.visio"],
|
|
1321
|
+
["vsw", "application/vnd.visio"],
|
|
1322
|
+
["vtf", "image/vnd.valve.source.texture"],
|
|
1323
|
+
["vtt", "text/vtt"],
|
|
1324
|
+
["vtu", "model/vnd.vtu"],
|
|
1325
|
+
["vxml", "application/voicexml+xml"],
|
|
1326
|
+
["w3d", "application/x-director"],
|
|
1327
|
+
["wad", "application/x-doom"],
|
|
1328
|
+
["wadl", "application/vnd.sun.wadl+xml"],
|
|
1329
|
+
["war", "application/java-archive"],
|
|
1330
|
+
["wasm", "application/wasm"],
|
|
1331
|
+
["wav", "audio/x-wav"],
|
|
1332
|
+
["wax", "audio/x-ms-wax"],
|
|
1333
|
+
["wbmp", "image/vnd.wap.wbmp"],
|
|
1334
|
+
["wbs", "application/vnd.criticaltools.wbs+xml"],
|
|
1335
|
+
["wbxml", "application/wbxml"],
|
|
1336
|
+
["wcm", "application/vnd.ms-works"],
|
|
1337
|
+
["wdb", "application/vnd.ms-works"],
|
|
1338
|
+
["wdp", "image/vnd.ms-photo"],
|
|
1339
|
+
["weba", "audio/webm"],
|
|
1340
|
+
["webapp", "application/x-web-app-manifest+json"],
|
|
1341
|
+
["webm", "video/webm"],
|
|
1342
|
+
["webmanifest", "application/manifest+json"],
|
|
1343
|
+
["webp", "image/webp"],
|
|
1344
|
+
["wg", "application/vnd.pmi.widget"],
|
|
1345
|
+
["wgt", "application/widget"],
|
|
1346
|
+
["wks", "application/vnd.ms-works"],
|
|
1347
|
+
["wm", "video/x-ms-wm"],
|
|
1348
|
+
["wma", "audio/x-ms-wma"],
|
|
1349
|
+
["wmd", "application/x-ms-wmd"],
|
|
1350
|
+
["wmf", "image/wmf"],
|
|
1351
|
+
["wml", "text/vnd.wap.wml"],
|
|
1352
|
+
["wmlc", "application/wmlc"],
|
|
1353
|
+
["wmls", "text/vnd.wap.wmlscript"],
|
|
1354
|
+
["wmlsc", "application/vnd.wap.wmlscriptc"],
|
|
1355
|
+
["wmv", "video/x-ms-wmv"],
|
|
1356
|
+
["wmx", "video/x-ms-wmx"],
|
|
1357
|
+
["wmz", "application/x-msmetafile"],
|
|
1358
|
+
["woff", "font/woff"],
|
|
1359
|
+
["woff2", "font/woff2"],
|
|
1360
|
+
["word", "application/msword"],
|
|
1361
|
+
["wpd", "application/vnd.wordperfect"],
|
|
1362
|
+
["wpl", "application/vnd.ms-wpl"],
|
|
1363
|
+
["wps", "application/vnd.ms-works"],
|
|
1364
|
+
["wqd", "application/vnd.wqd"],
|
|
1365
|
+
["wri", "application/x-mswrite"],
|
|
1366
|
+
["wrl", "model/vrml"],
|
|
1367
|
+
["wsc", "message/vnd.wfa.wsc"],
|
|
1368
|
+
["wsdl", "application/wsdl+xml"],
|
|
1369
|
+
["wspolicy", "application/wspolicy+xml"],
|
|
1370
|
+
["wtb", "application/vnd.webturbo"],
|
|
1371
|
+
["wvx", "video/x-ms-wvx"],
|
|
1372
|
+
["x3d", "model/x3d+xml"],
|
|
1373
|
+
["x3db", "model/x3d+fastinfoset"],
|
|
1374
|
+
["x3dbz", "model/x3d+binary"],
|
|
1375
|
+
["x3dv", "model/x3d-vrml"],
|
|
1376
|
+
["x3dvz", "model/x3d+vrml"],
|
|
1377
|
+
["x3dz", "model/x3d+xml"],
|
|
1378
|
+
["x32", "application/x-authorware-bin"],
|
|
1379
|
+
["x_b", "model/vnd.parasolid.transmit.binary"],
|
|
1380
|
+
["x_t", "model/vnd.parasolid.transmit.text"],
|
|
1381
|
+
["xaml", "application/xaml+xml"],
|
|
1382
|
+
["xap", "application/x-silverlight-app"],
|
|
1383
|
+
["xar", "application/vnd.xara"],
|
|
1384
|
+
["xav", "application/xcap-att+xml"],
|
|
1385
|
+
["xbap", "application/x-ms-xbap"],
|
|
1386
|
+
["xbd", "application/vnd.fujixerox.docuworks.binder"],
|
|
1387
|
+
["xbm", "image/x-xbitmap"],
|
|
1388
|
+
["xca", "application/xcap-caps+xml"],
|
|
1389
|
+
["xcs", "application/calendar+xml"],
|
|
1390
|
+
["xdf", "application/xcap-diff+xml"],
|
|
1391
|
+
["xdm", "application/vnd.syncml.dm+xml"],
|
|
1392
|
+
["xdp", "application/vnd.adobe.xdp+xml"],
|
|
1393
|
+
["xdssc", "application/dssc+xml"],
|
|
1394
|
+
["xdw", "application/vnd.fujixerox.docuworks"],
|
|
1395
|
+
["xel", "application/xcap-el+xml"],
|
|
1396
|
+
["xenc", "application/xenc+xml"],
|
|
1397
|
+
["xer", "application/patch-ops-error+xml"],
|
|
1398
|
+
["xfdf", "application/vnd.adobe.xfdf"],
|
|
1399
|
+
["xfdl", "application/vnd.xfdl"],
|
|
1400
|
+
["xht", "application/xhtml+xml"],
|
|
1401
|
+
["xhtml", "application/xhtml+xml"],
|
|
1402
|
+
["xhvml", "application/xv+xml"],
|
|
1403
|
+
["xif", "image/vnd.xiff"],
|
|
1404
|
+
["xl", "application/excel"],
|
|
1405
|
+
["xla", "application/vnd.ms-excel"],
|
|
1406
|
+
["xlam", "application/vnd.ms-excel.addin.macroEnabled.12"],
|
|
1407
|
+
["xlc", "application/vnd.ms-excel"],
|
|
1408
|
+
["xlf", "application/xliff+xml"],
|
|
1409
|
+
["xlm", "application/vnd.ms-excel"],
|
|
1410
|
+
["xls", "application/vnd.ms-excel"],
|
|
1411
|
+
["xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"],
|
|
1412
|
+
["xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"],
|
|
1413
|
+
["xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],
|
|
1414
|
+
["xlt", "application/vnd.ms-excel"],
|
|
1415
|
+
["xltm", "application/vnd.ms-excel.template.macroEnabled.12"],
|
|
1416
|
+
["xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"],
|
|
1417
|
+
["xlw", "application/vnd.ms-excel"],
|
|
1418
|
+
["xm", "audio/xm"],
|
|
1419
|
+
["xml", "application/xml"],
|
|
1420
|
+
["xns", "application/xcap-ns+xml"],
|
|
1421
|
+
["xo", "application/vnd.olpc-sugar"],
|
|
1422
|
+
["xop", "application/xop+xml"],
|
|
1423
|
+
["xpi", "application/x-xpinstall"],
|
|
1424
|
+
["xpl", "application/xproc+xml"],
|
|
1425
|
+
["xpm", "image/x-xpixmap"],
|
|
1426
|
+
["xpr", "application/vnd.is-xpr"],
|
|
1427
|
+
["xps", "application/vnd.ms-xpsdocument"],
|
|
1428
|
+
["xpw", "application/vnd.intercon.formnet"],
|
|
1429
|
+
["xpx", "application/vnd.intercon.formnet"],
|
|
1430
|
+
["xsd", "application/xml"],
|
|
1431
|
+
["xsl", "application/xml"],
|
|
1432
|
+
["xslt", "application/xslt+xml"],
|
|
1433
|
+
["xsm", "application/vnd.syncml+xml"],
|
|
1434
|
+
["xspf", "application/xspf+xml"],
|
|
1435
|
+
["xul", "application/vnd.mozilla.xul+xml"],
|
|
1436
|
+
["xvm", "application/xv+xml"],
|
|
1437
|
+
["xvml", "application/xv+xml"],
|
|
1438
|
+
["xwd", "image/x-xwindowdump"],
|
|
1439
|
+
["xyz", "chemical/x-xyz"],
|
|
1440
|
+
["xz", "application/x-xz"],
|
|
1441
|
+
["yaml", "text/yaml"],
|
|
1442
|
+
["yang", "application/yang"],
|
|
1443
|
+
["yin", "application/yin+xml"],
|
|
1444
|
+
["yml", "text/yaml"],
|
|
1445
|
+
["ymp", "text/x-suse-ymp"],
|
|
1446
|
+
["z", "application/x-compress"],
|
|
1447
|
+
["z1", "application/x-zmachine"],
|
|
1448
|
+
["z2", "application/x-zmachine"],
|
|
1449
|
+
["z3", "application/x-zmachine"],
|
|
1450
|
+
["z4", "application/x-zmachine"],
|
|
1451
|
+
["z5", "application/x-zmachine"],
|
|
1452
|
+
["z6", "application/x-zmachine"],
|
|
1453
|
+
["z7", "application/x-zmachine"],
|
|
1454
|
+
["z8", "application/x-zmachine"],
|
|
1455
|
+
["zaz", "application/vnd.zzazz.deck+xml"],
|
|
1456
|
+
["zip", "application/zip"],
|
|
1457
|
+
["zir", "application/vnd.zul"],
|
|
1458
|
+
["zirz", "application/vnd.zul"],
|
|
1459
|
+
["zmm", "application/vnd.handheld-entertainment+xml"],
|
|
1460
|
+
["zsh", "text/x-scriptzsh"]
|
|
1461
|
+
]);
|
|
1462
|
+
function toFileWithPath(file, path, h) {
|
|
1463
|
+
const f = withMimeType(file);
|
|
1464
|
+
const { webkitRelativePath } = file;
|
|
1465
|
+
const p = typeof path === "string" ? path : typeof webkitRelativePath === "string" && webkitRelativePath.length > 0 ? webkitRelativePath : `./${file.name}`;
|
|
1466
|
+
if (typeof f.path !== "string") {
|
|
1467
|
+
setObjProp(f, "path", p);
|
|
1468
|
+
}
|
|
1469
|
+
setObjProp(f, "relativePath", p);
|
|
1470
|
+
return f;
|
|
1471
|
+
}
|
|
1472
|
+
function withMimeType(file) {
|
|
1473
|
+
const { name } = file;
|
|
1474
|
+
const hasExtension = name && name.lastIndexOf(".") !== -1;
|
|
1475
|
+
if (hasExtension && !file.type) {
|
|
1476
|
+
const ext = name.split(".").pop().toLowerCase();
|
|
1477
|
+
const type = COMMON_MIME_TYPES.get(ext);
|
|
1478
|
+
if (type) {
|
|
1479
|
+
Object.defineProperty(file, "type", {
|
|
1480
|
+
value: type,
|
|
1481
|
+
writable: false,
|
|
1482
|
+
configurable: false,
|
|
1483
|
+
enumerable: true
|
|
1484
|
+
});
|
|
1485
|
+
}
|
|
1486
|
+
}
|
|
1487
|
+
return file;
|
|
1488
|
+
}
|
|
1489
|
+
function setObjProp(f, key, value) {
|
|
1490
|
+
Object.defineProperty(f, key, {
|
|
1491
|
+
value,
|
|
1492
|
+
writable: false,
|
|
1493
|
+
configurable: false,
|
|
1494
|
+
enumerable: true
|
|
1495
|
+
});
|
|
1496
|
+
}
|
|
1497
|
+
const FILES_TO_IGNORE = [
|
|
1498
|
+
// Thumbnail cache files for macOS and Windows
|
|
1499
|
+
".DS_Store",
|
|
1500
|
+
// macOs
|
|
1501
|
+
"Thumbs.db"
|
|
1502
|
+
// Windows
|
|
1503
|
+
];
|
|
1504
|
+
function fromEvent(evt) {
|
|
1505
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1506
|
+
if (isObject(evt) && isDataTransfer(evt.dataTransfer)) {
|
|
1507
|
+
return getDataTransferFiles(evt.dataTransfer, evt.type);
|
|
1508
|
+
} else if (isChangeEvt(evt)) {
|
|
1509
|
+
return getInputFiles(evt);
|
|
1510
|
+
} else if (Array.isArray(evt) && evt.every((item) => "getFile" in item && typeof item.getFile === "function")) {
|
|
1511
|
+
return getFsHandleFiles(evt);
|
|
1512
|
+
}
|
|
1513
|
+
return [];
|
|
1514
|
+
});
|
|
1515
|
+
}
|
|
1516
|
+
function isDataTransfer(value) {
|
|
1517
|
+
return isObject(value);
|
|
1518
|
+
}
|
|
1519
|
+
function isChangeEvt(value) {
|
|
1520
|
+
return isObject(value) && isObject(value.target);
|
|
1521
|
+
}
|
|
1522
|
+
function isObject(v) {
|
|
1523
|
+
return typeof v === "object" && v !== null;
|
|
1524
|
+
}
|
|
1525
|
+
function getInputFiles(evt) {
|
|
1526
|
+
return fromList(evt.target.files).map((file) => toFileWithPath(file));
|
|
1527
|
+
}
|
|
1528
|
+
function getFsHandleFiles(handles) {
|
|
1529
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1530
|
+
const files = yield Promise.all(handles.map((h) => h.getFile()));
|
|
1531
|
+
return files.map((file) => toFileWithPath(file));
|
|
1532
|
+
});
|
|
1533
|
+
}
|
|
1534
|
+
function getDataTransferFiles(dt, type) {
|
|
1535
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1536
|
+
if (dt.items) {
|
|
1537
|
+
const items = fromList(dt.items).filter((item) => item.kind === "file");
|
|
1538
|
+
if (type !== "drop") {
|
|
1539
|
+
return items;
|
|
1540
|
+
}
|
|
1541
|
+
const files = yield Promise.all(items.map(toFilePromises));
|
|
1542
|
+
return noIgnoredFiles(flatten(files));
|
|
1543
|
+
}
|
|
1544
|
+
return noIgnoredFiles(fromList(dt.files).map((file) => toFileWithPath(file)));
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1547
|
+
function noIgnoredFiles(files) {
|
|
1548
|
+
return files.filter((file) => FILES_TO_IGNORE.indexOf(file.name) === -1);
|
|
1549
|
+
}
|
|
1550
|
+
function fromList(items) {
|
|
1551
|
+
if (items === null) {
|
|
1552
|
+
return [];
|
|
1553
|
+
}
|
|
1554
|
+
const files = [];
|
|
1555
|
+
for (let i = 0; i < items.length; i++) {
|
|
1556
|
+
const file = items[i];
|
|
1557
|
+
files.push(file);
|
|
1558
|
+
}
|
|
1559
|
+
return files;
|
|
1560
|
+
}
|
|
1561
|
+
function toFilePromises(item) {
|
|
1562
|
+
if (typeof item.webkitGetAsEntry !== "function") {
|
|
1563
|
+
return fromDataTransferItem(item);
|
|
1564
|
+
}
|
|
1565
|
+
const entry = item.webkitGetAsEntry();
|
|
1566
|
+
if (entry && entry.isDirectory) {
|
|
1567
|
+
return fromDirEntry(entry);
|
|
1568
|
+
}
|
|
1569
|
+
return fromDataTransferItem(item, entry);
|
|
1570
|
+
}
|
|
1571
|
+
function flatten(items) {
|
|
1572
|
+
return items.reduce((acc, files) => [
|
|
1573
|
+
...acc,
|
|
1574
|
+
...Array.isArray(files) ? flatten(files) : [files]
|
|
1575
|
+
], []);
|
|
1576
|
+
}
|
|
1577
|
+
function fromDataTransferItem(item, entry) {
|
|
1578
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1579
|
+
var _a;
|
|
1580
|
+
if (globalThis.isSecureContext && typeof item.getAsFileSystemHandle === "function") {
|
|
1581
|
+
const h = yield item.getAsFileSystemHandle();
|
|
1582
|
+
if (h === null) {
|
|
1583
|
+
throw new Error(`${item} is not a File`);
|
|
1584
|
+
}
|
|
1585
|
+
if (h !== void 0) {
|
|
1586
|
+
const file2 = yield h.getFile();
|
|
1587
|
+
file2.handle = h;
|
|
1588
|
+
return toFileWithPath(file2);
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1591
|
+
const file = item.getAsFile();
|
|
1592
|
+
if (!file) {
|
|
1593
|
+
throw new Error(`${item} is not a File`);
|
|
1594
|
+
}
|
|
1595
|
+
const fwp = toFileWithPath(file, (_a = entry === null || entry === void 0 ? void 0 : entry.fullPath) !== null && _a !== void 0 ? _a : void 0);
|
|
1596
|
+
return fwp;
|
|
1597
|
+
});
|
|
1598
|
+
}
|
|
1599
|
+
function fromEntry(entry) {
|
|
1600
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1601
|
+
return entry.isDirectory ? fromDirEntry(entry) : fromFileEntry(entry);
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
function fromDirEntry(entry) {
|
|
1605
|
+
const reader = entry.createReader();
|
|
1606
|
+
return new Promise((resolve, reject) => {
|
|
1607
|
+
const entries = [];
|
|
1608
|
+
function readEntries() {
|
|
1609
|
+
reader.readEntries((batch) => __awaiter(this, void 0, void 0, function* () {
|
|
1610
|
+
if (!batch.length) {
|
|
1611
|
+
try {
|
|
1612
|
+
const files = yield Promise.all(entries);
|
|
1613
|
+
resolve(files);
|
|
1614
|
+
} catch (err) {
|
|
1615
|
+
reject(err);
|
|
1616
|
+
}
|
|
1617
|
+
} else {
|
|
1618
|
+
const items = Promise.all(batch.map(fromEntry));
|
|
1619
|
+
entries.push(items);
|
|
1620
|
+
readEntries();
|
|
1621
|
+
}
|
|
1622
|
+
}), (err) => {
|
|
1623
|
+
reject(err);
|
|
1624
|
+
});
|
|
1625
|
+
}
|
|
1626
|
+
readEntries();
|
|
1627
|
+
});
|
|
1628
|
+
}
|
|
1629
|
+
function fromFileEntry(entry) {
|
|
1630
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1631
|
+
return new Promise((resolve, reject) => {
|
|
1632
|
+
entry.file((file) => {
|
|
1633
|
+
const fwp = toFileWithPath(file, entry.fullPath);
|
|
1634
|
+
resolve(fwp);
|
|
1635
|
+
}, (err) => {
|
|
1636
|
+
reject(err);
|
|
1637
|
+
});
|
|
1638
|
+
});
|
|
1639
|
+
});
|
|
1640
|
+
}
|
|
1641
|
+
var es = {};
|
|
1642
|
+
var hasRequiredEs;
|
|
1643
|
+
function requireEs() {
|
|
1644
|
+
if (hasRequiredEs) return es;
|
|
1645
|
+
hasRequiredEs = 1;
|
|
1646
|
+
es.__esModule = true;
|
|
1647
|
+
es.default = function(file, acceptedFiles) {
|
|
1648
|
+
if (file && acceptedFiles) {
|
|
1649
|
+
var acceptedFilesArray = Array.isArray(acceptedFiles) ? acceptedFiles : acceptedFiles.split(",");
|
|
1650
|
+
if (acceptedFilesArray.length === 0) {
|
|
1651
|
+
return true;
|
|
1652
|
+
}
|
|
1653
|
+
var fileName = file.name || "";
|
|
1654
|
+
var mimeType = (file.type || "").toLowerCase();
|
|
1655
|
+
var baseMimeType = mimeType.replace(/\/.*$/, "");
|
|
1656
|
+
return acceptedFilesArray.some(function(type) {
|
|
1657
|
+
var validType = type.trim().toLowerCase();
|
|
1658
|
+
if (validType.charAt(0) === ".") {
|
|
1659
|
+
return fileName.toLowerCase().endsWith(validType);
|
|
1660
|
+
} else if (validType.endsWith("/*")) {
|
|
1661
|
+
return baseMimeType === validType.replace(/\/.*$/, "");
|
|
1662
|
+
}
|
|
1663
|
+
return mimeType === validType;
|
|
1664
|
+
});
|
|
1665
|
+
}
|
|
1666
|
+
return true;
|
|
1667
|
+
};
|
|
1668
|
+
return es;
|
|
1669
|
+
}
|
|
1670
|
+
var esExports = requireEs();
|
|
1671
|
+
function _toConsumableArray$1(arr) {
|
|
1672
|
+
return _arrayWithoutHoles$1(arr) || _iterableToArray$1(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread$1();
|
|
1673
|
+
}
|
|
1674
|
+
function _nonIterableSpread$1() {
|
|
1675
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1676
|
+
}
|
|
1677
|
+
function _iterableToArray$1(iter) {
|
|
1678
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1679
|
+
}
|
|
1680
|
+
function _arrayWithoutHoles$1(arr) {
|
|
1681
|
+
if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
|
|
1682
|
+
}
|
|
1683
|
+
function ownKeys$1(object, enumerableOnly) {
|
|
1684
|
+
var keys = Object.keys(object);
|
|
1685
|
+
if (Object.getOwnPropertySymbols) {
|
|
1686
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1687
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
1688
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1689
|
+
})), keys.push.apply(keys, symbols);
|
|
1690
|
+
}
|
|
1691
|
+
return keys;
|
|
1692
|
+
}
|
|
1693
|
+
function _objectSpread$1(target) {
|
|
1694
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1695
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
1696
|
+
i % 2 ? ownKeys$1(Object(source), true).forEach(function(key) {
|
|
1697
|
+
_defineProperty$1(target, key, source[key]);
|
|
1698
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function(key) {
|
|
1699
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
return target;
|
|
1703
|
+
}
|
|
1704
|
+
function _defineProperty$1(obj, key, value) {
|
|
1705
|
+
if (key in obj) {
|
|
1706
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
1707
|
+
} else {
|
|
1708
|
+
obj[key] = value;
|
|
1709
|
+
}
|
|
1710
|
+
return obj;
|
|
1711
|
+
}
|
|
1712
|
+
function _slicedToArray$1(arr, i) {
|
|
1713
|
+
return _arrayWithHoles$1(arr) || _iterableToArrayLimit$1(arr, i) || _unsupportedIterableToArray$1(arr, i) || _nonIterableRest$1();
|
|
1714
|
+
}
|
|
1715
|
+
function _nonIterableRest$1() {
|
|
1716
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1717
|
+
}
|
|
1718
|
+
function _unsupportedIterableToArray$1(o, minLen) {
|
|
1719
|
+
if (!o) return;
|
|
1720
|
+
if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
|
|
1721
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1722
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1723
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1724
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
|
|
1725
|
+
}
|
|
1726
|
+
function _arrayLikeToArray$1(arr, len) {
|
|
1727
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1728
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1729
|
+
arr2[i] = arr[i];
|
|
1730
|
+
}
|
|
1731
|
+
return arr2;
|
|
1732
|
+
}
|
|
1733
|
+
function _iterableToArrayLimit$1(arr, i) {
|
|
1734
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1735
|
+
if (_i == null) return;
|
|
1736
|
+
var _arr = [];
|
|
1737
|
+
var _n = true;
|
|
1738
|
+
var _d = false;
|
|
1739
|
+
var _s, _e;
|
|
1740
|
+
try {
|
|
1741
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
1742
|
+
_arr.push(_s.value);
|
|
1743
|
+
if (i && _arr.length === i) break;
|
|
1744
|
+
}
|
|
1745
|
+
} catch (err) {
|
|
1746
|
+
_d = true;
|
|
1747
|
+
_e = err;
|
|
1748
|
+
} finally {
|
|
1749
|
+
try {
|
|
1750
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
1751
|
+
} finally {
|
|
1752
|
+
if (_d) throw _e;
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
return _arr;
|
|
1756
|
+
}
|
|
1757
|
+
function _arrayWithHoles$1(arr) {
|
|
1758
|
+
if (Array.isArray(arr)) return arr;
|
|
1759
|
+
}
|
|
1760
|
+
var accepts = typeof esExports === "function" ? esExports : esExports.default;
|
|
1761
|
+
var FILE_INVALID_TYPE = "file-invalid-type";
|
|
1762
|
+
var FILE_TOO_LARGE = "file-too-large";
|
|
1763
|
+
var FILE_TOO_SMALL = "file-too-small";
|
|
1764
|
+
var TOO_MANY_FILES = "too-many-files";
|
|
1765
|
+
var getInvalidTypeRejectionErr = function getInvalidTypeRejectionErr2() {
|
|
1766
|
+
var accept = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
1767
|
+
var acceptArr = accept.split(",");
|
|
1768
|
+
var msg = acceptArr.length > 1 ? "one of ".concat(acceptArr.join(", ")) : acceptArr[0];
|
|
1769
|
+
return {
|
|
1770
|
+
code: FILE_INVALID_TYPE,
|
|
1771
|
+
message: "File type must be ".concat(msg)
|
|
1772
|
+
};
|
|
1773
|
+
};
|
|
1774
|
+
var getTooLargeRejectionErr = function getTooLargeRejectionErr2(maxSize) {
|
|
1775
|
+
return {
|
|
1776
|
+
code: FILE_TOO_LARGE,
|
|
1777
|
+
message: "File is larger than ".concat(maxSize, " ").concat(maxSize === 1 ? "byte" : "bytes")
|
|
1778
|
+
};
|
|
1779
|
+
};
|
|
1780
|
+
var getTooSmallRejectionErr = function getTooSmallRejectionErr2(minSize) {
|
|
1781
|
+
return {
|
|
1782
|
+
code: FILE_TOO_SMALL,
|
|
1783
|
+
message: "File is smaller than ".concat(minSize, " ").concat(minSize === 1 ? "byte" : "bytes")
|
|
1784
|
+
};
|
|
1785
|
+
};
|
|
1786
|
+
var TOO_MANY_FILES_REJECTION = {
|
|
1787
|
+
code: TOO_MANY_FILES,
|
|
1788
|
+
message: "Too many files"
|
|
1789
|
+
};
|
|
1790
|
+
function fileAccepted(file, accept) {
|
|
1791
|
+
var isAcceptable = file.type === "application/x-moz-file" || accepts(file, accept);
|
|
1792
|
+
return [isAcceptable, isAcceptable ? null : getInvalidTypeRejectionErr(accept)];
|
|
1793
|
+
}
|
|
1794
|
+
function fileMatchSize(file, minSize, maxSize) {
|
|
1795
|
+
if (isDefined(file.size)) {
|
|
1796
|
+
if (isDefined(minSize) && isDefined(maxSize)) {
|
|
1797
|
+
if (file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
|
|
1798
|
+
if (file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
|
|
1799
|
+
} else if (isDefined(minSize) && file.size < minSize) return [false, getTooSmallRejectionErr(minSize)];
|
|
1800
|
+
else if (isDefined(maxSize) && file.size > maxSize) return [false, getTooLargeRejectionErr(maxSize)];
|
|
1801
|
+
}
|
|
1802
|
+
return [true, null];
|
|
1803
|
+
}
|
|
1804
|
+
function isDefined(value) {
|
|
1805
|
+
return value !== void 0 && value !== null;
|
|
1806
|
+
}
|
|
1807
|
+
function allFilesAccepted(_ref) {
|
|
1808
|
+
var files = _ref.files, accept = _ref.accept, minSize = _ref.minSize, maxSize = _ref.maxSize, multiple = _ref.multiple, maxFiles = _ref.maxFiles, validator = _ref.validator;
|
|
1809
|
+
if (!multiple && files.length > 1 || multiple && maxFiles >= 1 && files.length > maxFiles) {
|
|
1810
|
+
return false;
|
|
1811
|
+
}
|
|
1812
|
+
return files.every(function(file) {
|
|
1813
|
+
var _fileAccepted = fileAccepted(file, accept), _fileAccepted2 = _slicedToArray$1(_fileAccepted, 1), accepted = _fileAccepted2[0];
|
|
1814
|
+
var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray$1(_fileMatchSize, 1), sizeMatch = _fileMatchSize2[0];
|
|
1815
|
+
var customErrors = validator ? validator(file) : null;
|
|
1816
|
+
return accepted && sizeMatch && !customErrors;
|
|
1817
|
+
});
|
|
1818
|
+
}
|
|
1819
|
+
function isPropagationStopped(event) {
|
|
1820
|
+
if (typeof event.isPropagationStopped === "function") {
|
|
1821
|
+
return event.isPropagationStopped();
|
|
1822
|
+
} else if (typeof event.cancelBubble !== "undefined") {
|
|
1823
|
+
return event.cancelBubble;
|
|
1824
|
+
}
|
|
1825
|
+
return false;
|
|
1826
|
+
}
|
|
1827
|
+
function isEvtWithFiles(event) {
|
|
1828
|
+
if (!event.dataTransfer) {
|
|
1829
|
+
return !!event.target && !!event.target.files;
|
|
1830
|
+
}
|
|
1831
|
+
return Array.prototype.some.call(event.dataTransfer.types, function(type) {
|
|
1832
|
+
return type === "Files" || type === "application/x-moz-file";
|
|
1833
|
+
});
|
|
1834
|
+
}
|
|
1835
|
+
function onDocumentDragOver(event) {
|
|
1836
|
+
event.preventDefault();
|
|
1837
|
+
}
|
|
1838
|
+
function isIe(userAgent) {
|
|
1839
|
+
return userAgent.indexOf("MSIE") !== -1 || userAgent.indexOf("Trident/") !== -1;
|
|
1840
|
+
}
|
|
1841
|
+
function isEdge(userAgent) {
|
|
1842
|
+
return userAgent.indexOf("Edge/") !== -1;
|
|
1843
|
+
}
|
|
1844
|
+
function isIeOrEdge() {
|
|
1845
|
+
var userAgent = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : window.navigator.userAgent;
|
|
1846
|
+
return isIe(userAgent) || isEdge(userAgent);
|
|
1847
|
+
}
|
|
1848
|
+
function composeEventHandlers() {
|
|
1849
|
+
for (var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1850
|
+
fns[_key] = arguments[_key];
|
|
1851
|
+
}
|
|
1852
|
+
return function(event) {
|
|
1853
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
1854
|
+
args[_key2 - 1] = arguments[_key2];
|
|
1855
|
+
}
|
|
1856
|
+
return fns.some(function(fn) {
|
|
1857
|
+
if (!isPropagationStopped(event) && fn) {
|
|
1858
|
+
fn.apply(void 0, [event].concat(args));
|
|
1859
|
+
}
|
|
1860
|
+
return isPropagationStopped(event);
|
|
1861
|
+
});
|
|
1862
|
+
};
|
|
1863
|
+
}
|
|
1864
|
+
function canUseFileSystemAccessAPI() {
|
|
1865
|
+
return "showOpenFilePicker" in window;
|
|
1866
|
+
}
|
|
1867
|
+
function pickerOptionsFromAccept(accept) {
|
|
1868
|
+
if (isDefined(accept)) {
|
|
1869
|
+
var acceptForPicker = Object.entries(accept).filter(function(_ref2) {
|
|
1870
|
+
var _ref3 = _slicedToArray$1(_ref2, 2), mimeType = _ref3[0], ext = _ref3[1];
|
|
1871
|
+
var ok = true;
|
|
1872
|
+
if (!isMIMEType(mimeType)) {
|
|
1873
|
+
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.'));
|
|
1874
|
+
ok = false;
|
|
1875
|
+
}
|
|
1876
|
+
if (!Array.isArray(ext) || !ext.every(isExt)) {
|
|
1877
|
+
console.warn('Skipped "'.concat(mimeType, '" because an invalid file extension was provided.'));
|
|
1878
|
+
ok = false;
|
|
1879
|
+
}
|
|
1880
|
+
return ok;
|
|
1881
|
+
}).reduce(function(agg, _ref4) {
|
|
1882
|
+
var _ref5 = _slicedToArray$1(_ref4, 2), mimeType = _ref5[0], ext = _ref5[1];
|
|
1883
|
+
return _objectSpread$1(_objectSpread$1({}, agg), {}, _defineProperty$1({}, mimeType, ext));
|
|
1884
|
+
}, {});
|
|
1885
|
+
return [{
|
|
1886
|
+
// description is required due to https://crbug.com/1264708
|
|
1887
|
+
description: "Files",
|
|
1888
|
+
accept: acceptForPicker
|
|
1889
|
+
}];
|
|
1890
|
+
}
|
|
1891
|
+
return accept;
|
|
1892
|
+
}
|
|
1893
|
+
function acceptPropAsAcceptAttr(accept) {
|
|
1894
|
+
if (isDefined(accept)) {
|
|
1895
|
+
return Object.entries(accept).reduce(function(a, _ref6) {
|
|
1896
|
+
var _ref7 = _slicedToArray$1(_ref6, 2), mimeType = _ref7[0], ext = _ref7[1];
|
|
1897
|
+
return [].concat(_toConsumableArray$1(a), [mimeType], _toConsumableArray$1(ext));
|
|
1898
|
+
}, []).filter(function(v) {
|
|
1899
|
+
return isMIMEType(v) || isExt(v);
|
|
1900
|
+
}).join(",");
|
|
1901
|
+
}
|
|
1902
|
+
return void 0;
|
|
1903
|
+
}
|
|
1904
|
+
function isAbort(v) {
|
|
1905
|
+
return v instanceof DOMException && (v.name === "AbortError" || v.code === v.ABORT_ERR);
|
|
1906
|
+
}
|
|
1907
|
+
function isSecurityError(v) {
|
|
1908
|
+
return v instanceof DOMException && (v.name === "SecurityError" || v.code === v.SECURITY_ERR);
|
|
1909
|
+
}
|
|
1910
|
+
function isMIMEType(v) {
|
|
1911
|
+
return v === "audio/*" || v === "video/*" || v === "image/*" || v === "text/*" || v === "application/*" || /\w+\/[-+.\w]+/g.test(v);
|
|
1912
|
+
}
|
|
1913
|
+
function isExt(v) {
|
|
1914
|
+
return /^.*\.[\w]+$/.test(v);
|
|
1915
|
+
}
|
|
1916
|
+
var _excluded = ["children"], _excluded2 = ["open"], _excluded3 = ["refKey", "role", "onKeyDown", "onFocus", "onBlur", "onClick", "onDragEnter", "onDragOver", "onDragLeave", "onDrop"], _excluded4 = ["refKey", "onChange", "onClick"];
|
|
1917
|
+
function _toConsumableArray(arr) {
|
|
1918
|
+
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
|
1919
|
+
}
|
|
1920
|
+
function _nonIterableSpread() {
|
|
1921
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1922
|
+
}
|
|
1923
|
+
function _iterableToArray(iter) {
|
|
1924
|
+
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
1925
|
+
}
|
|
1926
|
+
function _arrayWithoutHoles(arr) {
|
|
1927
|
+
if (Array.isArray(arr)) return _arrayLikeToArray(arr);
|
|
1928
|
+
}
|
|
1929
|
+
function _slicedToArray(arr, i) {
|
|
1930
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
1931
|
+
}
|
|
1932
|
+
function _nonIterableRest() {
|
|
1933
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
1934
|
+
}
|
|
1935
|
+
function _unsupportedIterableToArray(o, minLen) {
|
|
1936
|
+
if (!o) return;
|
|
1937
|
+
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
1938
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
1939
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
1940
|
+
if (n === "Map" || n === "Set") return Array.from(o);
|
|
1941
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
1942
|
+
}
|
|
1943
|
+
function _arrayLikeToArray(arr, len) {
|
|
1944
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
1945
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) {
|
|
1946
|
+
arr2[i] = arr[i];
|
|
1947
|
+
}
|
|
1948
|
+
return arr2;
|
|
1949
|
+
}
|
|
1950
|
+
function _iterableToArrayLimit(arr, i) {
|
|
1951
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
1952
|
+
if (_i == null) return;
|
|
1953
|
+
var _arr = [];
|
|
1954
|
+
var _n = true;
|
|
1955
|
+
var _d = false;
|
|
1956
|
+
var _s, _e;
|
|
1957
|
+
try {
|
|
1958
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
|
|
1959
|
+
_arr.push(_s.value);
|
|
1960
|
+
if (i && _arr.length === i) break;
|
|
1961
|
+
}
|
|
1962
|
+
} catch (err) {
|
|
1963
|
+
_d = true;
|
|
1964
|
+
_e = err;
|
|
1965
|
+
} finally {
|
|
1966
|
+
try {
|
|
1967
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
1968
|
+
} finally {
|
|
1969
|
+
if (_d) throw _e;
|
|
1970
|
+
}
|
|
1971
|
+
}
|
|
1972
|
+
return _arr;
|
|
1973
|
+
}
|
|
1974
|
+
function _arrayWithHoles(arr) {
|
|
1975
|
+
if (Array.isArray(arr)) return arr;
|
|
1976
|
+
}
|
|
1977
|
+
function ownKeys(object, enumerableOnly) {
|
|
1978
|
+
var keys = Object.keys(object);
|
|
1979
|
+
if (Object.getOwnPropertySymbols) {
|
|
1980
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
1981
|
+
enumerableOnly && (symbols = symbols.filter(function(sym) {
|
|
1982
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
1983
|
+
})), keys.push.apply(keys, symbols);
|
|
1984
|
+
}
|
|
1985
|
+
return keys;
|
|
1986
|
+
}
|
|
1987
|
+
function _objectSpread(target) {
|
|
1988
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
1989
|
+
var source = null != arguments[i] ? arguments[i] : {};
|
|
1990
|
+
i % 2 ? ownKeys(Object(source), true).forEach(function(key) {
|
|
1991
|
+
_defineProperty(target, key, source[key]);
|
|
1992
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
|
|
1993
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
1994
|
+
});
|
|
1995
|
+
}
|
|
1996
|
+
return target;
|
|
1997
|
+
}
|
|
1998
|
+
function _defineProperty(obj, key, value) {
|
|
1999
|
+
if (key in obj) {
|
|
2000
|
+
Object.defineProperty(obj, key, { value, enumerable: true, configurable: true, writable: true });
|
|
2001
|
+
} else {
|
|
2002
|
+
obj[key] = value;
|
|
2003
|
+
}
|
|
2004
|
+
return obj;
|
|
2005
|
+
}
|
|
2006
|
+
function _objectWithoutProperties(source, excluded) {
|
|
2007
|
+
if (source == null) return {};
|
|
2008
|
+
var target = _objectWithoutPropertiesLoose(source, excluded);
|
|
2009
|
+
var key, i;
|
|
2010
|
+
if (Object.getOwnPropertySymbols) {
|
|
2011
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
2012
|
+
for (i = 0; i < sourceSymbolKeys.length; i++) {
|
|
2013
|
+
key = sourceSymbolKeys[i];
|
|
2014
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2015
|
+
if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
|
|
2016
|
+
target[key] = source[key];
|
|
2017
|
+
}
|
|
2018
|
+
}
|
|
2019
|
+
return target;
|
|
2020
|
+
}
|
|
2021
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
2022
|
+
if (source == null) return {};
|
|
2023
|
+
var target = {};
|
|
2024
|
+
var sourceKeys = Object.keys(source);
|
|
2025
|
+
var key, i;
|
|
2026
|
+
for (i = 0; i < sourceKeys.length; i++) {
|
|
2027
|
+
key = sourceKeys[i];
|
|
2028
|
+
if (excluded.indexOf(key) >= 0) continue;
|
|
2029
|
+
target[key] = source[key];
|
|
2030
|
+
}
|
|
2031
|
+
return target;
|
|
2032
|
+
}
|
|
2033
|
+
var Dropzone$1 = /* @__PURE__ */ forwardRef(function(_ref, ref) {
|
|
2034
|
+
var children = _ref.children, params = _objectWithoutProperties(_ref, _excluded);
|
|
2035
|
+
var _useDropzone = useDropzone(params), open = _useDropzone.open, props = _objectWithoutProperties(_useDropzone, _excluded2);
|
|
2036
|
+
useImperativeHandle(ref, function() {
|
|
2037
|
+
return {
|
|
2038
|
+
open
|
|
2039
|
+
};
|
|
2040
|
+
}, [open]);
|
|
2041
|
+
return /* @__PURE__ */ React__default.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {
|
|
2042
|
+
open
|
|
2043
|
+
})));
|
|
2044
|
+
});
|
|
2045
|
+
Dropzone$1.displayName = "Dropzone";
|
|
2046
|
+
var defaultProps = {
|
|
2047
|
+
disabled: false,
|
|
2048
|
+
getFilesFromEvent: fromEvent,
|
|
2049
|
+
maxSize: Infinity,
|
|
2050
|
+
minSize: 0,
|
|
2051
|
+
multiple: true,
|
|
2052
|
+
maxFiles: 0,
|
|
2053
|
+
preventDropOnDocument: true,
|
|
2054
|
+
noClick: false,
|
|
2055
|
+
noKeyboard: false,
|
|
2056
|
+
noDrag: false,
|
|
2057
|
+
noDragEventsBubbling: false,
|
|
2058
|
+
validator: null,
|
|
2059
|
+
useFsAccessApi: false,
|
|
2060
|
+
autoFocus: false
|
|
2061
|
+
};
|
|
2062
|
+
Dropzone$1.defaultProps = defaultProps;
|
|
2063
|
+
Dropzone$1.propTypes = {
|
|
2064
|
+
/**
|
|
2065
|
+
* Render function that exposes the dropzone state and prop getter fns
|
|
2066
|
+
*
|
|
2067
|
+
* @param {object} params
|
|
2068
|
+
* @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render
|
|
2069
|
+
* @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render
|
|
2070
|
+
* @param {Function} params.open Open the native file selection dialog
|
|
2071
|
+
* @param {boolean} params.isFocused Dropzone area is in focus
|
|
2072
|
+
* @param {boolean} params.isFileDialogActive File dialog is opened
|
|
2073
|
+
* @param {boolean} params.isDragActive Active drag is in progress
|
|
2074
|
+
* @param {boolean} params.isDragAccept Dragged files are accepted
|
|
2075
|
+
* @param {boolean} params.isDragReject Some dragged files are rejected
|
|
2076
|
+
* @param {File[]} params.acceptedFiles Accepted files
|
|
2077
|
+
* @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected
|
|
2078
|
+
*/
|
|
2079
|
+
children: propTypesExports.func,
|
|
2080
|
+
/**
|
|
2081
|
+
* Set accepted file types.
|
|
2082
|
+
* Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information.
|
|
2083
|
+
* Keep in mind that mime type determination is not reliable across platforms. CSV files,
|
|
2084
|
+
* for example, are reported as text/plain under macOS but as application/vnd.ms-excel under
|
|
2085
|
+
* Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276).
|
|
2086
|
+
*/
|
|
2087
|
+
accept: propTypesExports.objectOf(propTypesExports.arrayOf(propTypesExports.string)),
|
|
2088
|
+
/**
|
|
2089
|
+
* Allow drag 'n' drop (or selection from the file dialog) of multiple files
|
|
2090
|
+
*/
|
|
2091
|
+
multiple: propTypesExports.bool,
|
|
2092
|
+
/**
|
|
2093
|
+
* If false, allow dropped items to take over the current browser window
|
|
2094
|
+
*/
|
|
2095
|
+
preventDropOnDocument: propTypesExports.bool,
|
|
2096
|
+
/**
|
|
2097
|
+
* If true, disables click to open the native file selection dialog
|
|
2098
|
+
*/
|
|
2099
|
+
noClick: propTypesExports.bool,
|
|
2100
|
+
/**
|
|
2101
|
+
* If true, disables SPACE/ENTER to open the native file selection dialog.
|
|
2102
|
+
* Note that it also stops tracking the focus state.
|
|
2103
|
+
*/
|
|
2104
|
+
noKeyboard: propTypesExports.bool,
|
|
2105
|
+
/**
|
|
2106
|
+
* If true, disables drag 'n' drop
|
|
2107
|
+
*/
|
|
2108
|
+
noDrag: propTypesExports.bool,
|
|
2109
|
+
/**
|
|
2110
|
+
* If true, stops drag event propagation to parents
|
|
2111
|
+
*/
|
|
2112
|
+
noDragEventsBubbling: propTypesExports.bool,
|
|
2113
|
+
/**
|
|
2114
|
+
* Minimum file size (in bytes)
|
|
2115
|
+
*/
|
|
2116
|
+
minSize: propTypesExports.number,
|
|
2117
|
+
/**
|
|
2118
|
+
* Maximum file size (in bytes)
|
|
2119
|
+
*/
|
|
2120
|
+
maxSize: propTypesExports.number,
|
|
2121
|
+
/**
|
|
2122
|
+
* Maximum accepted number of files
|
|
2123
|
+
* The default value is 0 which means there is no limitation to how many files are accepted.
|
|
2124
|
+
*/
|
|
2125
|
+
maxFiles: propTypesExports.number,
|
|
2126
|
+
/**
|
|
2127
|
+
* Enable/disable the dropzone
|
|
2128
|
+
*/
|
|
2129
|
+
disabled: propTypesExports.bool,
|
|
2130
|
+
/**
|
|
2131
|
+
* Use this to provide a custom file aggregator
|
|
2132
|
+
*
|
|
2133
|
+
* @param {(DragEvent|Event|Array<FileSystemFileHandle>)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2134
|
+
*/
|
|
2135
|
+
getFilesFromEvent: propTypesExports.func,
|
|
2136
|
+
/**
|
|
2137
|
+
* Cb for when closing the file dialog with no selection
|
|
2138
|
+
*/
|
|
2139
|
+
onFileDialogCancel: propTypesExports.func,
|
|
2140
|
+
/**
|
|
2141
|
+
* Cb for when opening the file dialog
|
|
2142
|
+
*/
|
|
2143
|
+
onFileDialogOpen: propTypesExports.func,
|
|
2144
|
+
/**
|
|
2145
|
+
* Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API
|
|
2146
|
+
* to open the file picker instead of using an `<input type="file">` click event.
|
|
2147
|
+
*/
|
|
2148
|
+
useFsAccessApi: propTypesExports.bool,
|
|
2149
|
+
/**
|
|
2150
|
+
* Set to true to focus the root element on render
|
|
2151
|
+
*/
|
|
2152
|
+
autoFocus: propTypesExports.bool,
|
|
2153
|
+
/**
|
|
2154
|
+
* Cb for when the `dragenter` event occurs.
|
|
2155
|
+
*
|
|
2156
|
+
* @param {DragEvent} event
|
|
2157
|
+
*/
|
|
2158
|
+
onDragEnter: propTypesExports.func,
|
|
2159
|
+
/**
|
|
2160
|
+
* Cb for when the `dragleave` event occurs
|
|
2161
|
+
*
|
|
2162
|
+
* @param {DragEvent} event
|
|
2163
|
+
*/
|
|
2164
|
+
onDragLeave: propTypesExports.func,
|
|
2165
|
+
/**
|
|
2166
|
+
* Cb for when the `dragover` event occurs
|
|
2167
|
+
*
|
|
2168
|
+
* @param {DragEvent} event
|
|
2169
|
+
*/
|
|
2170
|
+
onDragOver: propTypesExports.func,
|
|
2171
|
+
/**
|
|
2172
|
+
* Cb for when the `drop` event occurs.
|
|
2173
|
+
* Note that this callback is invoked after the `getFilesFromEvent` callback is done.
|
|
2174
|
+
*
|
|
2175
|
+
* Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props.
|
|
2176
|
+
* `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.
|
|
2177
|
+
* If `multiple` is set to false and additional files are dropped,
|
|
2178
|
+
* all files besides the first will be rejected.
|
|
2179
|
+
* Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well.
|
|
2180
|
+
*
|
|
2181
|
+
* Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected.
|
|
2182
|
+
* If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props.
|
|
2183
|
+
*
|
|
2184
|
+
* `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.
|
|
2185
|
+
* For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library:
|
|
2186
|
+
*
|
|
2187
|
+
* ```js
|
|
2188
|
+
* function onDrop(acceptedFiles) {
|
|
2189
|
+
* const req = request.post('/upload')
|
|
2190
|
+
* acceptedFiles.forEach(file => {
|
|
2191
|
+
* req.attach(file.name, file)
|
|
2192
|
+
* })
|
|
2193
|
+
* req.end(callback)
|
|
2194
|
+
* }
|
|
2195
|
+
* ```
|
|
2196
|
+
*
|
|
2197
|
+
* @param {File[]} acceptedFiles
|
|
2198
|
+
* @param {FileRejection[]} fileRejections
|
|
2199
|
+
* @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog)
|
|
2200
|
+
*/
|
|
2201
|
+
onDrop: propTypesExports.func,
|
|
2202
|
+
/**
|
|
2203
|
+
* Cb for when the `drop` event occurs.
|
|
2204
|
+
* Note that if no files are accepted, this callback is not invoked.
|
|
2205
|
+
*
|
|
2206
|
+
* @param {File[]} files
|
|
2207
|
+
* @param {(DragEvent|Event)} event
|
|
2208
|
+
*/
|
|
2209
|
+
onDropAccepted: propTypesExports.func,
|
|
2210
|
+
/**
|
|
2211
|
+
* Cb for when the `drop` event occurs.
|
|
2212
|
+
* Note that if no files are rejected, this callback is not invoked.
|
|
2213
|
+
*
|
|
2214
|
+
* @param {FileRejection[]} fileRejections
|
|
2215
|
+
* @param {(DragEvent|Event)} event
|
|
2216
|
+
*/
|
|
2217
|
+
onDropRejected: propTypesExports.func,
|
|
2218
|
+
/**
|
|
2219
|
+
* Cb for when there's some error from any of the promises.
|
|
2220
|
+
*
|
|
2221
|
+
* @param {Error} error
|
|
2222
|
+
*/
|
|
2223
|
+
onError: propTypesExports.func,
|
|
2224
|
+
/**
|
|
2225
|
+
* Custom validation function. It must return null if there's no errors.
|
|
2226
|
+
* @param {File} file
|
|
2227
|
+
* @returns {FileError|FileError[]|null}
|
|
2228
|
+
*/
|
|
2229
|
+
validator: propTypesExports.func
|
|
2230
|
+
};
|
|
2231
|
+
var initialState = {
|
|
2232
|
+
isFocused: false,
|
|
2233
|
+
isFileDialogActive: false,
|
|
2234
|
+
isDragActive: false,
|
|
2235
|
+
isDragAccept: false,
|
|
2236
|
+
isDragReject: false,
|
|
2237
|
+
acceptedFiles: [],
|
|
2238
|
+
fileRejections: []
|
|
2239
|
+
};
|
|
2240
|
+
function useDropzone() {
|
|
2241
|
+
var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
2242
|
+
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;
|
|
2243
|
+
var acceptAttr = useMemo(function() {
|
|
2244
|
+
return acceptPropAsAcceptAttr(accept);
|
|
2245
|
+
}, [accept]);
|
|
2246
|
+
var pickerTypes = useMemo(function() {
|
|
2247
|
+
return pickerOptionsFromAccept(accept);
|
|
2248
|
+
}, [accept]);
|
|
2249
|
+
var onFileDialogOpenCb = useMemo(function() {
|
|
2250
|
+
return typeof onFileDialogOpen === "function" ? onFileDialogOpen : noop;
|
|
2251
|
+
}, [onFileDialogOpen]);
|
|
2252
|
+
var onFileDialogCancelCb = useMemo(function() {
|
|
2253
|
+
return typeof onFileDialogCancel === "function" ? onFileDialogCancel : noop;
|
|
2254
|
+
}, [onFileDialogCancel]);
|
|
2255
|
+
var rootRef = useRef(null);
|
|
2256
|
+
var inputRef = useRef(null);
|
|
2257
|
+
var _useReducer = useReducer(reducer, initialState), _useReducer2 = _slicedToArray(_useReducer, 2), state = _useReducer2[0], dispatch = _useReducer2[1];
|
|
2258
|
+
var isFocused = state.isFocused, isFileDialogActive = state.isFileDialogActive;
|
|
2259
|
+
var fsAccessApiWorksRef = useRef(typeof window !== "undefined" && window.isSecureContext && useFsAccessApi && canUseFileSystemAccessAPI());
|
|
2260
|
+
var onWindowFocus = function onWindowFocus2() {
|
|
2261
|
+
if (!fsAccessApiWorksRef.current && isFileDialogActive) {
|
|
2262
|
+
setTimeout(function() {
|
|
2263
|
+
if (inputRef.current) {
|
|
2264
|
+
var files = inputRef.current.files;
|
|
2265
|
+
if (!files.length) {
|
|
2266
|
+
dispatch({
|
|
2267
|
+
type: "closeDialog"
|
|
2268
|
+
});
|
|
2269
|
+
onFileDialogCancelCb();
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
}, 300);
|
|
2273
|
+
}
|
|
2274
|
+
};
|
|
2275
|
+
useEffect(function() {
|
|
2276
|
+
window.addEventListener("focus", onWindowFocus, false);
|
|
2277
|
+
return function() {
|
|
2278
|
+
window.removeEventListener("focus", onWindowFocus, false);
|
|
2279
|
+
};
|
|
2280
|
+
}, [inputRef, isFileDialogActive, onFileDialogCancelCb, fsAccessApiWorksRef]);
|
|
2281
|
+
var dragTargetsRef = useRef([]);
|
|
2282
|
+
var onDocumentDrop = function onDocumentDrop2(event) {
|
|
2283
|
+
if (rootRef.current && rootRef.current.contains(event.target)) {
|
|
2284
|
+
return;
|
|
2285
|
+
}
|
|
2286
|
+
event.preventDefault();
|
|
2287
|
+
dragTargetsRef.current = [];
|
|
2288
|
+
};
|
|
2289
|
+
useEffect(function() {
|
|
2290
|
+
if (preventDropOnDocument) {
|
|
2291
|
+
document.addEventListener("dragover", onDocumentDragOver, false);
|
|
2292
|
+
document.addEventListener("drop", onDocumentDrop, false);
|
|
2293
|
+
}
|
|
2294
|
+
return function() {
|
|
2295
|
+
if (preventDropOnDocument) {
|
|
2296
|
+
document.removeEventListener("dragover", onDocumentDragOver);
|
|
2297
|
+
document.removeEventListener("drop", onDocumentDrop);
|
|
2298
|
+
}
|
|
2299
|
+
};
|
|
2300
|
+
}, [rootRef, preventDropOnDocument]);
|
|
2301
|
+
useEffect(function() {
|
|
2302
|
+
if (!disabled && autoFocus && rootRef.current) {
|
|
2303
|
+
rootRef.current.focus();
|
|
2304
|
+
}
|
|
2305
|
+
return function() {
|
|
2306
|
+
};
|
|
2307
|
+
}, [rootRef, autoFocus, disabled]);
|
|
2308
|
+
var onErrCb = useCallback(function(e) {
|
|
2309
|
+
if (onError) {
|
|
2310
|
+
onError(e);
|
|
2311
|
+
} else {
|
|
2312
|
+
console.error(e);
|
|
2313
|
+
}
|
|
2314
|
+
}, [onError]);
|
|
2315
|
+
var onDragEnterCb = useCallback(function(event) {
|
|
2316
|
+
event.preventDefault();
|
|
2317
|
+
event.persist();
|
|
2318
|
+
stopPropagation(event);
|
|
2319
|
+
dragTargetsRef.current = [].concat(_toConsumableArray(dragTargetsRef.current), [event.target]);
|
|
2320
|
+
if (isEvtWithFiles(event)) {
|
|
2321
|
+
Promise.resolve(getFilesFromEvent(event)).then(function(files) {
|
|
2322
|
+
if (isPropagationStopped(event) && !noDragEventsBubbling) {
|
|
2323
|
+
return;
|
|
2324
|
+
}
|
|
2325
|
+
var fileCount = files.length;
|
|
2326
|
+
var isDragAccept = fileCount > 0 && allFilesAccepted({
|
|
2327
|
+
files,
|
|
2328
|
+
accept: acceptAttr,
|
|
2329
|
+
minSize,
|
|
2330
|
+
maxSize,
|
|
2331
|
+
multiple,
|
|
2332
|
+
maxFiles,
|
|
2333
|
+
validator
|
|
2334
|
+
});
|
|
2335
|
+
var isDragReject = fileCount > 0 && !isDragAccept;
|
|
2336
|
+
dispatch({
|
|
2337
|
+
isDragAccept,
|
|
2338
|
+
isDragReject,
|
|
2339
|
+
isDragActive: true,
|
|
2340
|
+
type: "setDraggedFiles"
|
|
2341
|
+
});
|
|
2342
|
+
if (onDragEnter) {
|
|
2343
|
+
onDragEnter(event);
|
|
2344
|
+
}
|
|
2345
|
+
}).catch(function(e) {
|
|
2346
|
+
return onErrCb(e);
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
}, [getFilesFromEvent, onDragEnter, onErrCb, noDragEventsBubbling, acceptAttr, minSize, maxSize, multiple, maxFiles, validator]);
|
|
2350
|
+
var onDragOverCb = useCallback(function(event) {
|
|
2351
|
+
event.preventDefault();
|
|
2352
|
+
event.persist();
|
|
2353
|
+
stopPropagation(event);
|
|
2354
|
+
var hasFiles = isEvtWithFiles(event);
|
|
2355
|
+
if (hasFiles && event.dataTransfer) {
|
|
2356
|
+
try {
|
|
2357
|
+
event.dataTransfer.dropEffect = "copy";
|
|
2358
|
+
} catch (_unused) {
|
|
2359
|
+
}
|
|
2360
|
+
}
|
|
2361
|
+
if (hasFiles && onDragOver) {
|
|
2362
|
+
onDragOver(event);
|
|
2363
|
+
}
|
|
2364
|
+
return false;
|
|
2365
|
+
}, [onDragOver, noDragEventsBubbling]);
|
|
2366
|
+
var onDragLeaveCb = useCallback(function(event) {
|
|
2367
|
+
event.preventDefault();
|
|
2368
|
+
event.persist();
|
|
2369
|
+
stopPropagation(event);
|
|
2370
|
+
var targets = dragTargetsRef.current.filter(function(target) {
|
|
2371
|
+
return rootRef.current && rootRef.current.contains(target);
|
|
2372
|
+
});
|
|
2373
|
+
var targetIdx = targets.indexOf(event.target);
|
|
2374
|
+
if (targetIdx !== -1) {
|
|
2375
|
+
targets.splice(targetIdx, 1);
|
|
2376
|
+
}
|
|
2377
|
+
dragTargetsRef.current = targets;
|
|
2378
|
+
if (targets.length > 0) {
|
|
2379
|
+
return;
|
|
2380
|
+
}
|
|
2381
|
+
dispatch({
|
|
2382
|
+
type: "setDraggedFiles",
|
|
2383
|
+
isDragActive: false,
|
|
2384
|
+
isDragAccept: false,
|
|
2385
|
+
isDragReject: false
|
|
2386
|
+
});
|
|
2387
|
+
if (isEvtWithFiles(event) && onDragLeave) {
|
|
2388
|
+
onDragLeave(event);
|
|
2389
|
+
}
|
|
2390
|
+
}, [rootRef, onDragLeave, noDragEventsBubbling]);
|
|
2391
|
+
var setFiles = useCallback(function(files, event) {
|
|
2392
|
+
var acceptedFiles = [];
|
|
2393
|
+
var fileRejections = [];
|
|
2394
|
+
files.forEach(function(file) {
|
|
2395
|
+
var _fileAccepted = fileAccepted(file, acceptAttr), _fileAccepted2 = _slicedToArray(_fileAccepted, 2), accepted = _fileAccepted2[0], acceptError = _fileAccepted2[1];
|
|
2396
|
+
var _fileMatchSize = fileMatchSize(file, minSize, maxSize), _fileMatchSize2 = _slicedToArray(_fileMatchSize, 2), sizeMatch = _fileMatchSize2[0], sizeError = _fileMatchSize2[1];
|
|
2397
|
+
var customErrors = validator ? validator(file) : null;
|
|
2398
|
+
if (accepted && sizeMatch && !customErrors) {
|
|
2399
|
+
acceptedFiles.push(file);
|
|
2400
|
+
} else {
|
|
2401
|
+
var errors = [acceptError, sizeError];
|
|
2402
|
+
if (customErrors) {
|
|
2403
|
+
errors = errors.concat(customErrors);
|
|
2404
|
+
}
|
|
2405
|
+
fileRejections.push({
|
|
2406
|
+
file,
|
|
2407
|
+
errors: errors.filter(function(e) {
|
|
2408
|
+
return e;
|
|
2409
|
+
})
|
|
2410
|
+
});
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
if (!multiple && acceptedFiles.length > 1 || multiple && maxFiles >= 1 && acceptedFiles.length > maxFiles) {
|
|
2414
|
+
acceptedFiles.forEach(function(file) {
|
|
2415
|
+
fileRejections.push({
|
|
2416
|
+
file,
|
|
2417
|
+
errors: [TOO_MANY_FILES_REJECTION]
|
|
2418
|
+
});
|
|
2419
|
+
});
|
|
2420
|
+
acceptedFiles.splice(0);
|
|
2421
|
+
}
|
|
2422
|
+
dispatch({
|
|
2423
|
+
acceptedFiles,
|
|
2424
|
+
fileRejections,
|
|
2425
|
+
isDragReject: fileRejections.length > 0,
|
|
2426
|
+
type: "setFiles"
|
|
2427
|
+
});
|
|
2428
|
+
if (onDrop) {
|
|
2429
|
+
onDrop(acceptedFiles, fileRejections, event);
|
|
2430
|
+
}
|
|
2431
|
+
if (fileRejections.length > 0 && onDropRejected) {
|
|
2432
|
+
onDropRejected(fileRejections, event);
|
|
2433
|
+
}
|
|
2434
|
+
if (acceptedFiles.length > 0 && onDropAccepted) {
|
|
2435
|
+
onDropAccepted(acceptedFiles, event);
|
|
2436
|
+
}
|
|
2437
|
+
}, [dispatch, multiple, acceptAttr, minSize, maxSize, maxFiles, onDrop, onDropAccepted, onDropRejected, validator]);
|
|
2438
|
+
var onDropCb = useCallback(function(event) {
|
|
2439
|
+
event.preventDefault();
|
|
2440
|
+
event.persist();
|
|
2441
|
+
stopPropagation(event);
|
|
2442
|
+
dragTargetsRef.current = [];
|
|
2443
|
+
if (isEvtWithFiles(event)) {
|
|
2444
|
+
Promise.resolve(getFilesFromEvent(event)).then(function(files) {
|
|
2445
|
+
if (isPropagationStopped(event) && !noDragEventsBubbling) {
|
|
2446
|
+
return;
|
|
2447
|
+
}
|
|
2448
|
+
setFiles(files, event);
|
|
2449
|
+
}).catch(function(e) {
|
|
2450
|
+
return onErrCb(e);
|
|
2451
|
+
});
|
|
2452
|
+
}
|
|
2453
|
+
dispatch({
|
|
2454
|
+
type: "reset"
|
|
2455
|
+
});
|
|
2456
|
+
}, [getFilesFromEvent, setFiles, onErrCb, noDragEventsBubbling]);
|
|
2457
|
+
var openFileDialog = useCallback(function() {
|
|
2458
|
+
if (fsAccessApiWorksRef.current) {
|
|
2459
|
+
dispatch({
|
|
2460
|
+
type: "openDialog"
|
|
2461
|
+
});
|
|
2462
|
+
onFileDialogOpenCb();
|
|
2463
|
+
var opts = {
|
|
2464
|
+
multiple,
|
|
2465
|
+
types: pickerTypes
|
|
2466
|
+
};
|
|
2467
|
+
window.showOpenFilePicker(opts).then(function(handles) {
|
|
2468
|
+
return getFilesFromEvent(handles);
|
|
2469
|
+
}).then(function(files) {
|
|
2470
|
+
setFiles(files, null);
|
|
2471
|
+
dispatch({
|
|
2472
|
+
type: "closeDialog"
|
|
2473
|
+
});
|
|
2474
|
+
}).catch(function(e) {
|
|
2475
|
+
if (isAbort(e)) {
|
|
2476
|
+
onFileDialogCancelCb(e);
|
|
2477
|
+
dispatch({
|
|
2478
|
+
type: "closeDialog"
|
|
2479
|
+
});
|
|
2480
|
+
} else if (isSecurityError(e)) {
|
|
2481
|
+
fsAccessApiWorksRef.current = false;
|
|
2482
|
+
if (inputRef.current) {
|
|
2483
|
+
inputRef.current.value = null;
|
|
2484
|
+
inputRef.current.click();
|
|
2485
|
+
} else {
|
|
2486
|
+
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."));
|
|
2487
|
+
}
|
|
2488
|
+
} else {
|
|
2489
|
+
onErrCb(e);
|
|
2490
|
+
}
|
|
2491
|
+
});
|
|
2492
|
+
return;
|
|
2493
|
+
}
|
|
2494
|
+
if (inputRef.current) {
|
|
2495
|
+
dispatch({
|
|
2496
|
+
type: "openDialog"
|
|
2497
|
+
});
|
|
2498
|
+
onFileDialogOpenCb();
|
|
2499
|
+
inputRef.current.value = null;
|
|
2500
|
+
inputRef.current.click();
|
|
2501
|
+
}
|
|
2502
|
+
}, [dispatch, onFileDialogOpenCb, onFileDialogCancelCb, useFsAccessApi, setFiles, onErrCb, pickerTypes, multiple]);
|
|
2503
|
+
var onKeyDownCb = useCallback(function(event) {
|
|
2504
|
+
if (!rootRef.current || !rootRef.current.isEqualNode(event.target)) {
|
|
2505
|
+
return;
|
|
2506
|
+
}
|
|
2507
|
+
if (event.key === " " || event.key === "Enter" || event.keyCode === 32 || event.keyCode === 13) {
|
|
2508
|
+
event.preventDefault();
|
|
2509
|
+
openFileDialog();
|
|
2510
|
+
}
|
|
2511
|
+
}, [rootRef, openFileDialog]);
|
|
2512
|
+
var onFocusCb = useCallback(function() {
|
|
2513
|
+
dispatch({
|
|
2514
|
+
type: "focus"
|
|
2515
|
+
});
|
|
2516
|
+
}, []);
|
|
2517
|
+
var onBlurCb = useCallback(function() {
|
|
2518
|
+
dispatch({
|
|
2519
|
+
type: "blur"
|
|
2520
|
+
});
|
|
2521
|
+
}, []);
|
|
2522
|
+
var onClickCb = useCallback(function() {
|
|
2523
|
+
if (noClick) {
|
|
2524
|
+
return;
|
|
2525
|
+
}
|
|
2526
|
+
if (isIeOrEdge()) {
|
|
2527
|
+
setTimeout(openFileDialog, 0);
|
|
2528
|
+
} else {
|
|
2529
|
+
openFileDialog();
|
|
2530
|
+
}
|
|
2531
|
+
}, [noClick, openFileDialog]);
|
|
2532
|
+
var composeHandler = function composeHandler2(fn) {
|
|
2533
|
+
return disabled ? null : fn;
|
|
2534
|
+
};
|
|
2535
|
+
var composeKeyboardHandler = function composeKeyboardHandler2(fn) {
|
|
2536
|
+
return noKeyboard ? null : composeHandler(fn);
|
|
2537
|
+
};
|
|
2538
|
+
var composeDragHandler = function composeDragHandler2(fn) {
|
|
2539
|
+
return noDrag ? null : composeHandler(fn);
|
|
2540
|
+
};
|
|
2541
|
+
var stopPropagation = function stopPropagation2(event) {
|
|
2542
|
+
if (noDragEventsBubbling) {
|
|
2543
|
+
event.stopPropagation();
|
|
2544
|
+
}
|
|
2545
|
+
};
|
|
2546
|
+
var getRootProps = useMemo(function() {
|
|
2547
|
+
return function() {
|
|
2548
|
+
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);
|
|
2549
|
+
return _objectSpread(_objectSpread(_defineProperty({
|
|
2550
|
+
onKeyDown: composeKeyboardHandler(composeEventHandlers(onKeyDown, onKeyDownCb)),
|
|
2551
|
+
onFocus: composeKeyboardHandler(composeEventHandlers(onFocus, onFocusCb)),
|
|
2552
|
+
onBlur: composeKeyboardHandler(composeEventHandlers(onBlur, onBlurCb)),
|
|
2553
|
+
onClick: composeHandler(composeEventHandlers(onClick, onClickCb)),
|
|
2554
|
+
onDragEnter: composeDragHandler(composeEventHandlers(onDragEnter2, onDragEnterCb)),
|
|
2555
|
+
onDragOver: composeDragHandler(composeEventHandlers(onDragOver2, onDragOverCb)),
|
|
2556
|
+
onDragLeave: composeDragHandler(composeEventHandlers(onDragLeave2, onDragLeaveCb)),
|
|
2557
|
+
onDrop: composeDragHandler(composeEventHandlers(onDrop2, onDropCb)),
|
|
2558
|
+
role: typeof role === "string" && role !== "" ? role : "presentation"
|
|
2559
|
+
}, refKey, rootRef), !disabled && !noKeyboard ? {
|
|
2560
|
+
tabIndex: 0
|
|
2561
|
+
} : {}), rest);
|
|
2562
|
+
};
|
|
2563
|
+
}, [rootRef, onKeyDownCb, onFocusCb, onBlurCb, onClickCb, onDragEnterCb, onDragOverCb, onDragLeaveCb, onDropCb, noKeyboard, noDrag, disabled]);
|
|
2564
|
+
var onInputElementClick = useCallback(function(event) {
|
|
2565
|
+
event.stopPropagation();
|
|
2566
|
+
}, []);
|
|
2567
|
+
var getInputProps = useMemo(function() {
|
|
2568
|
+
return function() {
|
|
2569
|
+
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);
|
|
2570
|
+
var inputProps = _defineProperty({
|
|
2571
|
+
accept: acceptAttr,
|
|
2572
|
+
multiple,
|
|
2573
|
+
type: "file",
|
|
2574
|
+
style: {
|
|
2575
|
+
border: 0,
|
|
2576
|
+
clip: "rect(0, 0, 0, 0)",
|
|
2577
|
+
clipPath: "inset(50%)",
|
|
2578
|
+
height: "1px",
|
|
2579
|
+
margin: "0 -1px -1px 0",
|
|
2580
|
+
overflow: "hidden",
|
|
2581
|
+
padding: 0,
|
|
2582
|
+
position: "absolute",
|
|
2583
|
+
width: "1px",
|
|
2584
|
+
whiteSpace: "nowrap"
|
|
2585
|
+
},
|
|
2586
|
+
onChange: composeHandler(composeEventHandlers(onChange, onDropCb)),
|
|
2587
|
+
onClick: composeHandler(composeEventHandlers(onClick, onInputElementClick)),
|
|
2588
|
+
tabIndex: -1
|
|
2589
|
+
}, refKey, inputRef);
|
|
2590
|
+
return _objectSpread(_objectSpread({}, inputProps), rest);
|
|
2591
|
+
};
|
|
2592
|
+
}, [inputRef, accept, multiple, onDropCb, disabled]);
|
|
2593
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2594
|
+
isFocused: isFocused && !disabled,
|
|
2595
|
+
getRootProps,
|
|
2596
|
+
getInputProps,
|
|
2597
|
+
rootRef,
|
|
2598
|
+
inputRef,
|
|
2599
|
+
open: composeHandler(openFileDialog)
|
|
2600
|
+
});
|
|
2601
|
+
}
|
|
2602
|
+
function reducer(state, action) {
|
|
2603
|
+
switch (action.type) {
|
|
2604
|
+
case "focus":
|
|
2605
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2606
|
+
isFocused: true
|
|
2607
|
+
});
|
|
2608
|
+
case "blur":
|
|
2609
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2610
|
+
isFocused: false
|
|
2611
|
+
});
|
|
2612
|
+
case "openDialog":
|
|
2613
|
+
return _objectSpread(_objectSpread({}, initialState), {}, {
|
|
2614
|
+
isFileDialogActive: true
|
|
2615
|
+
});
|
|
2616
|
+
case "closeDialog":
|
|
2617
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2618
|
+
isFileDialogActive: false
|
|
2619
|
+
});
|
|
2620
|
+
case "setDraggedFiles":
|
|
2621
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2622
|
+
isDragActive: action.isDragActive,
|
|
2623
|
+
isDragAccept: action.isDragAccept,
|
|
2624
|
+
isDragReject: action.isDragReject
|
|
2625
|
+
});
|
|
2626
|
+
case "setFiles":
|
|
2627
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
2628
|
+
acceptedFiles: action.acceptedFiles,
|
|
2629
|
+
fileRejections: action.fileRejections,
|
|
2630
|
+
isDragReject: action.isDragReject
|
|
2631
|
+
});
|
|
2632
|
+
case "reset":
|
|
2633
|
+
return _objectSpread({}, initialState);
|
|
2634
|
+
default:
|
|
2635
|
+
return state;
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
function noop() {
|
|
2639
|
+
}
|
|
229
2640
|
const baseStyle = {
|
|
230
2641
|
flex: 1,
|
|
231
2642
|
display: "flex",
|