@zip.js/zip.js 2.8.44 → 2.8.46

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.
Files changed (61) hide show
  1. package/README.md +28 -2
  2. package/deno.json +32 -2
  3. package/dist/zip-core-external.js +199 -149
  4. package/dist/zip-core-external.min.js +1 -1
  5. package/dist/zip-core.js +196 -120
  6. package/dist/zip-core.min.js +1 -1
  7. package/dist/zip-fs-core-external.js +251 -157
  8. package/dist/zip-fs-core-external.min.js +1 -1
  9. package/dist/zip-fs-core.js +227 -126
  10. package/dist/zip-fs-core.min.js +1 -1
  11. package/dist/zip-fs-external.js +272 -1751
  12. package/dist/zip-fs-external.min.js +1 -1
  13. package/dist/zip-fs-native.js +273 -1726
  14. package/dist/zip-fs-native.min.js +1 -1
  15. package/dist/zip-fs.js +273 -1726
  16. package/dist/zip-fs.min.js +1 -1
  17. package/dist/zip-legacy.js +198 -122
  18. package/dist/zip-legacy.min.js +1 -1
  19. package/dist/zip-native.js +200 -124
  20. package/dist/zip-native.min.js +1 -1
  21. package/dist/zip-web-worker-native.js +1 -1
  22. package/dist/zip-web-worker.js +1 -1
  23. package/dist/zip.js +200 -124
  24. package/dist/zip.min.js +1 -1
  25. package/eslint.config.mjs +31 -2
  26. package/index-native.cjs +273 -1726
  27. package/index-native.min.js +1 -1
  28. package/index.cjs +273 -1726
  29. package/index.d.cts +140 -2
  30. package/index.d.ts +140 -2
  31. package/index.min.js +1 -1
  32. package/lib/core/codec-pool.js +3 -2
  33. package/lib/core/codec-worker.js +30 -14
  34. package/lib/core/configuration.js +20 -2
  35. package/lib/core/constants.js +4 -0
  36. package/lib/core/options.js +2 -0
  37. package/lib/core/streams/aes-crypto-stream.js +15 -18
  38. package/lib/core/streams/codec-stream.js +2 -2
  39. package/lib/core/streams/zip-entry-stream.js +13 -18
  40. package/lib/core/util/mime-type-data.js +3 -0
  41. package/lib/core/util/mime-type.js +23 -1596
  42. package/lib/core/web-worker-base.js +29 -2
  43. package/lib/core/web-worker-inline-native.js +1 -1
  44. package/lib/core/web-worker-inline-wasm.js +1 -1
  45. package/lib/core/web-worker-native.js +7 -9
  46. package/lib/core/web-worker-wasm.js +9 -12
  47. package/lib/core/zip-entry.js +8 -1
  48. package/lib/core/zip-fs.js +62 -5
  49. package/lib/core/zip-reader.js +45 -17
  50. package/lib/core/zip-writer.js +58 -44
  51. package/lib/{core/web-worker-inline-template.js → zip-core-custom.js} +13 -20
  52. package/lib/zip-core-external.js +2 -0
  53. package/lib/zip-fs-core-external.js +2 -0
  54. package/lib/zip-fs-external.js +2 -0
  55. package/lib/zip-mime-types.js +2 -0
  56. package/lib/zip-module-native.js +3 -3
  57. package/lib/zip-module-wasm-base.js +3 -3
  58. package/package.json +28 -4
  59. package/worker-message-property-names.js +1 -1
  60. package/lib/core/web-worker-inline-template-native.js +0 -48
  61. package/lib/core/zlib-streams-inline-template.js +0 -45
@@ -62,6 +62,8 @@ const EXTRAFIELD_TYPE_UNICODE_COMMENT = 0x6375;
62
62
  const EXTRAFIELD_TYPE_USDZ = 0x1986;
63
63
  const EXTRAFIELD_TYPE_INFOZIP = 0x7875;
64
64
  const EXTRAFIELD_TYPE_UNIX = 0x7855;
65
+ const EXTRAFIELD_TYPE_UNIX_TYPE1 = 0x5855;
66
+ const EXTRAFIELD_TYPE_PKWARE_UNIX = 0x000d;
65
67
 
66
68
  const BITFLAG_ENCRYPTED = 0b1;
67
69
  const BITFLAG_LEVEL = 0b0110;
@@ -165,6 +167,7 @@ const CONFIGURABLE_PROPERTY_NAMES = [
165
167
  "baseURI",
166
168
  "wasmURI",
167
169
  "workerURI",
170
+ "createWorker",
168
171
  "chunkSize",
169
172
  "maxWorkers",
170
173
  "terminateWorkerTimeout",
@@ -175,8 +178,8 @@ const CONFIGURABLE_PROPERTY_NAMES = [
175
178
  "transferStreams",
176
179
  "CompressionStream",
177
180
  "DecompressionStream",
178
- "CompressionStreamZlib",
179
- "DecompressionStreamZlib"
181
+ "CompressionStreamFallback",
182
+ "DecompressionStreamFallback"
180
183
  ];
181
184
 
182
185
  const config = { ...DEFAULT_CONFIGURATION };
@@ -190,6 +193,7 @@ function getChunkSize(config) {
190
193
  }
191
194
 
192
195
  function configure(configuration) {
196
+ configuration = normalizeConfiguration(configuration);
193
197
  for (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {
194
198
  const propertyValue = configuration[propertyName];
195
199
  if (propertyValue !== UNDEFINED_VALUE) {
@@ -198,7 +202,23 @@ function configure(configuration) {
198
202
  }
199
203
  }
200
204
 
205
+ function normalizeConfiguration(configuration) {
206
+ const { CompressionStreamZlib, DecompressionStreamZlib } = configuration;
207
+ if (CompressionStreamZlib === UNDEFINED_VALUE && DecompressionStreamZlib === UNDEFINED_VALUE) {
208
+ return configuration;
209
+ }
210
+ const normalizedConfiguration = Object.assign({}, configuration);
211
+ if (normalizedConfiguration.CompressionStreamFallback === UNDEFINED_VALUE) {
212
+ normalizedConfiguration.CompressionStreamFallback = CompressionStreamZlib;
213
+ }
214
+ if (normalizedConfiguration.DecompressionStreamFallback === UNDEFINED_VALUE) {
215
+ normalizedConfiguration.DecompressionStreamFallback = DecompressionStreamZlib;
216
+ }
217
+ return normalizedConfiguration;
218
+ }
219
+
201
220
  function setDefaultConfiguration(configuration) {
221
+ configuration = normalizeConfiguration(configuration);
202
222
  for (const propertyName of CONFIGURABLE_PROPERTY_NAMES) {
203
223
  const propertyValue = configuration[propertyName];
204
224
  if (propertyValue !== UNDEFINED_VALUE) {
@@ -1447,7 +1467,7 @@ const DERIVED_BITS_ALGORITHM = Object.assign({ iterations: 1000, hash: { name: H
1447
1467
  const DERIVED_BITS_USAGE = ["deriveBits"];
1448
1468
  const SALT_LENGTH = [8, 12, 16];
1449
1469
  const KEY_LENGTH = [16, 24, 32];
1450
- const SIGNATURE_LENGTH = 10;
1470
+ const AUTHENTICATION_CODE_LENGTH = 10;
1451
1471
  const COUNTER_DEFAULT_VALUE = [0, 0, 0, 0];
1452
1472
  // deno-lint-ignore valid-typeof
1453
1473
  const CRYPTO_API_SUPPORTED = typeof crypto != UNDEFINED_TYPE;
@@ -1487,8 +1507,8 @@ class AESDecryptionStream extends TransformStream {
1487
1507
  } else {
1488
1508
  await ready;
1489
1509
  }
1490
- const output = new Uint8Array(chunk.length - SIGNATURE_LENGTH - ((chunk.length - SIGNATURE_LENGTH) % BLOCK_LENGTH));
1491
- controller.enqueue(append(aesCrypto, chunk, output, 0, SIGNATURE_LENGTH, true));
1510
+ const output = new Uint8Array(chunk.length - AUTHENTICATION_CODE_LENGTH - ((chunk.length - AUTHENTICATION_CODE_LENGTH) % BLOCK_LENGTH));
1511
+ controller.enqueue(append(aesCrypto, chunk, output, 0, AUTHENTICATION_CODE_LENGTH, true));
1492
1512
  },
1493
1513
  async flush(controller) {
1494
1514
  const {
@@ -1499,8 +1519,8 @@ class AESDecryptionStream extends TransformStream {
1499
1519
  } = this;
1500
1520
  if (hmac && ctr) {
1501
1521
  await ready;
1502
- const chunkToDecrypt = subarray(pending, 0, pending.length - SIGNATURE_LENGTH);
1503
- const originalSignature = subarray(pending, pending.length - SIGNATURE_LENGTH);
1522
+ const chunkToDecrypt = subarray(pending, 0, pending.length - AUTHENTICATION_CODE_LENGTH);
1523
+ const originalAuthenticationCode = subarray(pending, pending.length - AUTHENTICATION_CODE_LENGTH);
1504
1524
  let decryptedChunkArray = EMPTY_UINT8_ARRAY;
1505
1525
  if (chunkToDecrypt.length) {
1506
1526
  const encryptedChunk = toBits(codecBytes, chunkToDecrypt);
@@ -1508,12 +1528,12 @@ class AESDecryptionStream extends TransformStream {
1508
1528
  const decryptedChunk = ctr.update(encryptedChunk);
1509
1529
  decryptedChunkArray = fromBits(codecBytes, decryptedChunk);
1510
1530
  }
1511
- const signature = subarray(fromBits(codecBytes, hmac.digest()), 0, SIGNATURE_LENGTH);
1512
- let invalidSignature = pending.length < SIGNATURE_LENGTH ? 1 : 0;
1513
- for (let indexSignature = 0; indexSignature < SIGNATURE_LENGTH; indexSignature++) {
1514
- invalidSignature |= signature[indexSignature] ^ originalSignature[indexSignature];
1531
+ const authenticationCode = subarray(fromBits(codecBytes, hmac.digest()), 0, AUTHENTICATION_CODE_LENGTH);
1532
+ let invalidAuthenticationCode = pending.length < AUTHENTICATION_CODE_LENGTH ? 1 : 0;
1533
+ for (let indexByte = 0; indexByte < AUTHENTICATION_CODE_LENGTH; indexByte++) {
1534
+ invalidAuthenticationCode |= authenticationCode[indexByte] ^ originalAuthenticationCode[indexByte];
1515
1535
  }
1516
- if (invalidSignature && checkAuthenticationCode) {
1536
+ if (invalidAuthenticationCode && checkAuthenticationCode) {
1517
1537
  throw new Error(ERR_INVALID_AUTHENTICATION_CODE);
1518
1538
  }
1519
1539
  controller.enqueue(decryptedChunkArray);
@@ -1526,8 +1546,6 @@ class AESDecryptionStream extends TransformStream {
1526
1546
  class AESEncryptionStream extends TransformStream {
1527
1547
 
1528
1548
  constructor({ password, rawPassword, encryptionStrength }) {
1529
- // deno-lint-ignore prefer-const
1530
- let stream;
1531
1549
  super({
1532
1550
  start() {
1533
1551
  initAesCrypto(this, password, rawPassword, encryptionStrength);
@@ -1566,12 +1584,11 @@ class AESEncryptionStream extends TransformStream {
1566
1584
  hmac.update(encryptedChunk);
1567
1585
  encryptedChunkArray = fromBits(codecBytes, encryptedChunk);
1568
1586
  }
1569
- stream.signature = fromBits(codecBytes, hmac.digest()).slice(0, SIGNATURE_LENGTH);
1570
- controller.enqueue(concat(encryptedChunkArray, stream.signature));
1587
+ const authenticationCode = fromBits(codecBytes, hmac.digest()).slice(0, AUTHENTICATION_CODE_LENGTH);
1588
+ controller.enqueue(concat(encryptedChunkArray, authenticationCode));
1571
1589
  }
1572
1590
  }
1573
1591
  });
1574
- stream = this;
1575
1592
  }
1576
1593
  }
1577
1594
 
@@ -1584,7 +1601,7 @@ function initAesCrypto(aesCrypto, password, rawPassword, encryptionStrength) {
1584
1601
  });
1585
1602
  }
1586
1603
 
1587
- function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignature) {
1604
+ function append(aesCrypto, input, output, paddingStart, paddingEnd, verifyAuthenticationCode) {
1588
1605
  const {
1589
1606
  ctr,
1590
1607
  hmac,
@@ -1598,11 +1615,11 @@ function append(aesCrypto, input, output, paddingStart, paddingEnd, verifySignat
1598
1615
  let offset;
1599
1616
  for (offset = 0; offset <= inputLength - BLOCK_LENGTH; offset += BLOCK_LENGTH) {
1600
1617
  const inputChunk = toBits(codecBytes, subarray(input, offset, offset + BLOCK_LENGTH));
1601
- if (verifySignature) {
1618
+ if (verifyAuthenticationCode) {
1602
1619
  hmac.update(inputChunk);
1603
1620
  }
1604
1621
  const outputChunk = ctr.update(inputChunk);
1605
- if (!verifySignature) {
1622
+ if (!verifyAuthenticationCode) {
1606
1623
  hmac.update(outputChunk);
1607
1624
  }
1608
1625
  output.set(fromBits(codecBytes, outputChunk), offset + paddingStart);
@@ -1964,7 +1981,7 @@ const GZIP_OUTPUT_STALL_TIMEOUT = 5000;
1964
1981
 
1965
1982
  class DeflateStream extends TransformStream {
1966
1983
 
1967
- constructor(options, { chunkSize, CompressionStreamZlib, CompressionStream }) {
1984
+ constructor(options, { chunkSize, CompressionStreamFallback, CompressionStream }) {
1968
1985
  super({});
1969
1986
  const { compressed, encrypted, useCompressionStream, zipCrypto, computeCrc32, level, deflate64, format, compressionMethod } = options;
1970
1987
  const stream = this;
@@ -1986,7 +2003,7 @@ class DeflateStream extends TransformStream {
1986
2003
  readable = pipeThrough(readable, gzipCrc32Stream);
1987
2004
  } else {
1988
2005
  try {
1989
- readable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream, CompressionStreamZlib);
2006
+ readable = pipeThroughCompressionStream(readable, useCompressionStream, { level, chunkSize }, CompressionStream, CompressionStreamFallback);
1990
2007
  } catch (error) {
1991
2008
  let gzipStream;
1992
2009
  try {
@@ -2008,14 +2025,9 @@ class DeflateStream extends TransformStream {
2008
2025
  }
2009
2026
  }
2010
2027
  setReadable(stream, readable, () => {
2011
- let signature;
2012
- if (encrypted && !zipCrypto) {
2013
- signature = encryptionStream.signature;
2014
- }
2015
2028
  if ((!encrypted || zipCrypto) && computeCrc32) {
2016
- signature = useGzipCrc32 ? gzipCrc32Stream.signature : new DataView(crc32Stream.value.buffer).getUint32(0);
2029
+ stream.crc32 = useGzipCrc32 ? gzipCrc32Stream.crc32 : new DataView(crc32Stream.value.buffer).getUint32(0);
2017
2030
  }
2018
- stream.signature = signature;
2019
2031
  });
2020
2032
  }
2021
2033
  }
@@ -2053,7 +2065,7 @@ class GzipToRawDeflateStream extends TransformStream {
2053
2065
  },
2054
2066
  flush() {
2055
2067
  const dataView = getDataView(trailerCandidate);
2056
- stream.signature = dataView.getUint32(0, true);
2068
+ stream.crc32 = dataView.getUint32(0, true);
2057
2069
  stream.uncompressedSize = dataView.getUint32(4, true);
2058
2070
  }
2059
2071
  });
@@ -2133,9 +2145,9 @@ function pipeThroughGzipDecompressionStream(readable, gzipStream, outputSize) {
2133
2145
 
2134
2146
  class InflateStream extends TransformStream {
2135
2147
 
2136
- constructor(options, { chunkSize, DecompressionStreamZlib, DecompressionStream }) {
2148
+ constructor(options, { chunkSize, DecompressionStreamFallback, DecompressionStream }) {
2137
2149
  super({});
2138
- const { zipCrypto, encrypted, checkCrc32, signature, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;
2150
+ const { zipCrypto, encrypted, checkCrc32, crc32, compressed, useCompressionStream, deflate64, format, compressionMethod, rawBitFlag, outputSize } = options;
2139
2151
  let crc32Stream, decryptionStream;
2140
2152
  let readable = super.readable;
2141
2153
  if (encrypted) {
@@ -2152,7 +2164,7 @@ class InflateStream extends TransformStream {
2152
2164
  readable = pipeThroughBackpressured(readable, createCodecStream(codecStreams.DecompressionStream, format, { chunkSize, compressionMethod, rawBitFlag, uncompressedSize: outputSize }));
2153
2165
  } else {
2154
2166
  try {
2155
- readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamZlib);
2167
+ readable = pipeThroughCompressionStream(readable, useCompressionStream, { chunkSize, deflate64 }, DecompressionStream, DecompressionStreamFallback);
2156
2168
  } catch (error) {
2157
2169
  if (deflate64 || outputSize === UNDEFINED_VALUE) {
2158
2170
  throw error;
@@ -2174,8 +2186,8 @@ class InflateStream extends TransformStream {
2174
2186
  }
2175
2187
  setReadable(this, readable, () => {
2176
2188
  if (checkCrc32) {
2177
- const dataViewSignature = new DataView(crc32Stream.value.buffer);
2178
- if (signature != dataViewSignature.getUint32(0, false)) {
2189
+ const computedCrc32View = new DataView(crc32Stream.value.buffer);
2190
+ if (crc32 != computedCrc32View.getUint32(0, false)) {
2179
2191
  throw new Error(ERR_INVALID_CRC32);
2180
2192
  }
2181
2193
  }
@@ -2231,17 +2243,17 @@ function createCodecStream(CodecStreamClass, format, options) {
2231
2243
  return new CodecStreamClass(format, options);
2232
2244
  }
2233
2245
 
2234
- function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamZlib) {
2246
+ function pipeThroughCompressionStream(readable, useCompressionStream, options, CompressionStreamNative, CompressionStreamFallback) {
2235
2247
  const Stream = useCompressionStream && CompressionStreamNative ?
2236
2248
  CompressionStreamNative :
2237
- CompressionStreamZlib || CompressionStreamNative;
2249
+ CompressionStreamFallback || CompressionStreamNative;
2238
2250
  const format = options.deflate64 ? FORMAT_DEFLATE64_RAW : FORMAT_DEFLATE_RAW;
2239
2251
  let codecStream;
2240
2252
  try {
2241
2253
  codecStream = new Stream(format, options);
2242
2254
  } catch (error) {
2243
- if (useCompressionStream && CompressionStreamZlib && Stream != CompressionStreamZlib) {
2244
- codecStream = new CompressionStreamZlib(format, options);
2255
+ if (useCompressionStream && CompressionStreamFallback && Stream != CompressionStreamFallback) {
2256
+ codecStream = new CompressionStreamFallback(format, options);
2245
2257
  } else {
2246
2258
  throw error;
2247
2259
  }
@@ -2400,9 +2412,9 @@ class CodecStream extends TransformStream {
2400
2412
  }
2401
2413
  },
2402
2414
  flush() {
2403
- const { signature } = stream;
2415
+ const { crc32 } = stream;
2404
2416
  Object.assign(codec, {
2405
- signature,
2417
+ crc32,
2406
2418
  inputSize
2407
2419
  });
2408
2420
  }
@@ -2504,7 +2516,7 @@ const ERROR_EVENT_TYPE = "error";
2504
2516
  const MESSAGE_ERROR_EVENT_TYPE = "messageerror";
2505
2517
  const ERR_WORKER_STARTUP_TIMEOUT = "Worker startup timeout";
2506
2518
 
2507
- let webWorkerSupported, webWorkerSource, webWorkerURI, webWorkerOptions;
2519
+ let webWorkerSupported, webWorkerSource, webWorkerURI, webWorkerOptions, createWorkerFailed;
2508
2520
  let transferStreamsSupported = true;
2509
2521
  try {
2510
2522
  transferStreamsSupported = typeof structuredClone == FUNCTION_TYPE && structuredClone(new DOMException("", "AbortError")).code !== UNDEFINED_VALUE;
@@ -2518,14 +2530,14 @@ function configureWorker({ initModule: initModuleFunction }) {
2518
2530
  }
2519
2531
 
2520
2532
  async function supportsDeflate(config) {
2521
- const { CompressionStream: NativeStream, CompressionStreamZlib: ZlibStream } = config;
2522
- if (ZlibStream && !ZlibStream.requiresModule) {
2533
+ const { CompressionStream: NativeStream, CompressionStreamFallback: FallbackStream } = config;
2534
+ if (FallbackStream && !FallbackStream.requiresModule) {
2523
2535
  return true;
2524
2536
  }
2525
2537
  if (supportsDeflateRaw(NativeStream) || supportsGzip(NativeStream)) {
2526
2538
  return true;
2527
2539
  }
2528
- if (ZlibStream) {
2540
+ if (FallbackStream) {
2529
2541
  try {
2530
2542
  await initModule$1(config);
2531
2543
  return true;
@@ -2538,12 +2550,16 @@ async function supportsDeflate(config) {
2538
2550
 
2539
2551
  function resetWebWorkerSupport() {
2540
2552
  webWorkerSupported = UNDEFINED_VALUE;
2553
+ createWorkerFailed = false;
2541
2554
  }
2542
2555
 
2543
2556
  class CodecWorker {
2544
2557
 
2545
- constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, workerURI }, onTaskFinished) {
2558
+ constructor(workerData, { readable, writable }, { options, config, streamOptions, useWebWorkers, transferStreams, workerURI, createWorker }, onTaskFinished) {
2546
2559
  const { signal } = streamOptions;
2560
+ if (createWorkerFailed) {
2561
+ createWorker = UNDEFINED_VALUE;
2562
+ }
2547
2563
  Object.assign(workerData, {
2548
2564
  busy: true,
2549
2565
  generation: (workerData.generation || 0) + 1,
@@ -2553,6 +2569,7 @@ class CodecWorker {
2553
2569
  writable,
2554
2570
  options: Object.assign({}, options),
2555
2571
  workerURI,
2572
+ createWorker,
2556
2573
  transferStreams,
2557
2574
  terminate() {
2558
2575
  return new Promise(resolve => {
@@ -2588,7 +2605,7 @@ class CodecWorker {
2588
2605
  // deno-lint-ignore valid-typeof
2589
2606
  webWorkerSupported = typeof Worker != UNDEFINED_TYPE;
2590
2607
  }
2591
- return (useWebWorkers && webWorkerSupported ? createWebWorkerInterface : createWorkerInterface)(workerData, config);
2608
+ return (useWebWorkers && ((webWorkerSupported && workerURI) || createWorker) ? createWebWorkerInterface : createWorkerInterface)(workerData, config);
2592
2609
  }
2593
2610
  }
2594
2611
 
@@ -2645,7 +2662,11 @@ function createWebWorkerInterface(workerData, config) {
2645
2662
  try {
2646
2663
  worker = getWebWorker(workerData.workerURI, baseURI, workerData);
2647
2664
  } catch {
2648
- webWorkerSupported = false;
2665
+ if (workerData.createWorker) {
2666
+ createWorkerFailed = true;
2667
+ } else {
2668
+ webWorkerSupported = false;
2669
+ }
2649
2670
  return createWorkerInterface(workerData, config);
2650
2671
  }
2651
2672
  Object.assign(workerData, {
@@ -2658,7 +2679,11 @@ function createWebWorkerInterface(workerData, config) {
2658
2679
  return await runWebWorker(workerData, { chunkSize, wasmURI, baseURI, workerStartupTimeout });
2659
2680
  } catch (error) {
2660
2681
  if (error && error.workerStartupFailed) {
2661
- webWorkerSupported = false;
2682
+ if (workerData.createWorker) {
2683
+ createWorkerFailed = true;
2684
+ } else {
2685
+ webWorkerSupported = false;
2686
+ }
2662
2687
  const { reader } = workerData;
2663
2688
  if (reader) {
2664
2689
  reader.releaseLock();
@@ -2681,17 +2706,17 @@ async function runWorker$1({ options, readable, writable, onTaskFinished }, conf
2681
2706
  try {
2682
2707
  if (options.compressed && !options.format) {
2683
2708
  const deflate = options.codecType.startsWith(CODEC_DEFLATE);
2684
- const ZlibStream = deflate ? config.CompressionStreamZlib : config.DecompressionStreamZlib;
2709
+ const FallbackStream = deflate ? config.CompressionStreamFallback : config.DecompressionStreamFallback;
2685
2710
  const NativeStream = deflate ? config.CompressionStream : config.DecompressionStream;
2686
2711
  if (!options.useCompressionStream) {
2687
2712
  try {
2688
2713
  await initModule$1(config);
2689
2714
  } catch {
2690
- if (!ZlibStream || ZlibStream.requiresModule) {
2715
+ if (!FallbackStream || FallbackStream.requiresModule) {
2691
2716
  options.useCompressionStream = true;
2692
2717
  }
2693
2718
  }
2694
- } else if (ZlibStream && ZlibStream.requiresModule && !supportsDeflateRaw(NativeStream)) {
2719
+ } else if (FallbackStream && FallbackStream.requiresModule && !supportsDeflateRaw(NativeStream)) {
2695
2720
  try {
2696
2721
  await initModule$1(config);
2697
2722
  } catch {
@@ -2705,12 +2730,12 @@ async function runWorker$1({ options, readable, writable, onTaskFinished }, conf
2705
2730
  .pipeThrough(new ChunkStream(getChunkSize(config)))
2706
2731
  .pipeTo(writable, { preventClose: true, preventAbort: true });
2707
2732
  const {
2708
- signature,
2733
+ crc32,
2709
2734
  inputSize,
2710
2735
  outputSize
2711
2736
  } = codecStream;
2712
2737
  return {
2713
- signature,
2738
+ crc32,
2714
2739
  inputSize,
2715
2740
  outputSize
2716
2741
  };
@@ -2816,8 +2841,11 @@ function terminateWorker$1(workerData) {
2816
2841
  }
2817
2842
 
2818
2843
  function getWebWorker(url, baseURI, workerData, isModuleType, useBlobURI = true) {
2844
+ const { createWorker } = workerData;
2819
2845
  let worker, resolvedURI, resolvedOptions;
2820
- if (webWorkerURI === UNDEFINED_VALUE || webWorkerSource !== url) {
2846
+ if (createWorker) {
2847
+ worker = createWorker();
2848
+ } else if (webWorkerURI === UNDEFINED_VALUE || webWorkerSource !== url) {
2821
2849
  // deno-lint-ignore valid-typeof
2822
2850
  const isFunctionURI = typeof url == FUNCTION_TYPE;
2823
2851
  if (isFunctionURI) {
@@ -3072,7 +3100,7 @@ let indexWorker = 0;
3072
3100
  async function runWorker(stream, workerOptions) {
3073
3101
  const { options, config } = workerOptions;
3074
3102
  const { transferStreams, useWebWorkers, useCompressionStream, compressed, checkCrc32, computeCrc32, encrypted, format, codecURI } = options;
3075
- const { workerURI, maxWorkers } = config;
3103
+ const { workerURI, createWorker, maxWorkers } = config;
3076
3104
  if (format) {
3077
3105
  if (codecURI) {
3078
3106
  options.codecURI = resolveCodecURI(codecURI, config.baseURI);
@@ -3084,6 +3112,7 @@ async function runWorker(stream, workerOptions) {
3084
3112
  const workerSupported = format === UNDEFINED_VALUE || Boolean(options.codecURI);
3085
3113
  workerOptions.useWebWorkers = !streamCopy && workerSupported && (useWebWorkers || (useWebWorkers === UNDEFINED_VALUE && config.useWebWorkers));
3086
3114
  workerOptions.workerURI = workerOptions.useWebWorkers && workerURI ? workerURI : UNDEFINED_VALUE;
3115
+ workerOptions.createWorker = workerOptions.useWebWorkers && createWorker ? createWorker : UNDEFINED_VALUE;
3087
3116
  options.useCompressionStream = useCompressionStream || (useCompressionStream === UNDEFINED_VALUE && config.useCompressionStream);
3088
3117
  return (await getWorker()).run();
3089
3118
 
@@ -3147,7 +3176,7 @@ function onWorkerStarvation() {
3147
3176
  starvationTimeout = null;
3148
3177
  if (pendingRequests.length) {
3149
3178
  const [{ resolve, stream, workerOptions }] = pendingRequests.splice(0, 1);
3150
- const inlineWorkerOptions = Object.assign({}, workerOptions, { useWebWorkers: false, workerURI: UNDEFINED_VALUE });
3179
+ const inlineWorkerOptions = Object.assign({}, workerOptions, { useWebWorkers: false, workerURI: UNDEFINED_VALUE, createWorker: UNDEFINED_VALUE });
3151
3180
  resolve(new CodecWorker({}, stream, inlineWorkerOptions, onInlineTaskFinished));
3152
3181
  armStarvationTimeout();
3153
3182
  }
@@ -4308,6 +4337,8 @@ const PROPERTY_NAME_CRC32 = "crc32";
4308
4337
  const PROPERTY_NAME_EXTRA_FIELD = "extraField";
4309
4338
  const PROPERTY_NAME_EXTRA_FIELD_INFOZIP = "extraFieldInfoZip";
4310
4339
  const PROPERTY_NAME_EXTRA_FIELD_UNIX = "extraFieldUnix";
4340
+ const PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1 = "extraFieldUnixType1";
4341
+ const PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX = "extraFieldPkwareUnix";
4311
4342
  const PROPERTY_NAME_UID = "uid";
4312
4343
  const PROPERTY_NAME_GID = "gid";
4313
4344
  const PROPERTY_NAME_UNIX_MODE = "unixMode";
@@ -4324,6 +4355,7 @@ const PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT = "extraFieldUnicodeComment";
4324
4355
  const PROPERTY_NAME_EXTRA_FIELD_AES = "extraFieldAES";
4325
4356
  const PROPERTY_NAME_EXTRA_FIELD_NTFS = "extraFieldNTFS";
4326
4357
  const PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP = "extraFieldExtendedTimestamp";
4358
+ const PROPERTY_NAME_EXTRA_FIELD_USDZ = "extraFieldUSDZ";
4327
4359
 
4328
4360
  const PROPERTY_NAMES = [
4329
4361
  PROPERTY_NAME_FILENAME,
@@ -4335,6 +4367,7 @@ const PROPERTY_NAMES = [
4335
4367
  PROPERTY_NAME_COMMENT,
4336
4368
  PROPERTY_NAME_RAW_COMMENT,
4337
4369
  PROPERTY_NAME_LAST_ACCESS_DATE,
4370
+ PROPERTY_NAME_RAW_LAST_ACCESS_DATE,
4338
4371
  PROPERTY_NAME_CREATION_DATE,
4339
4372
  PROPERTY_NAME_RAW_CREATION_DATE,
4340
4373
  PROPERTY_NAME_OFFSET,
@@ -4357,6 +4390,8 @@ const PROPERTY_NAMES = [
4357
4390
  PROPERTY_NAME_EXTRA_FIELD,
4358
4391
  PROPERTY_NAME_EXTRA_FIELD_UNIX,
4359
4392
  PROPERTY_NAME_EXTRA_FIELD_INFOZIP,
4393
+ PROPERTY_NAME_EXTRA_FIELD_UNIX_TYPE1,
4394
+ PROPERTY_NAME_EXTRA_FIELD_PKWARE_UNIX,
4360
4395
  PROPERTY_NAME_UID,
4361
4396
  PROPERTY_NAME_GID,
4362
4397
  PROPERTY_NAME_UNIX_MODE,
@@ -4372,7 +4407,8 @@ const PROPERTY_NAMES = [
4372
4407
  PROPERTY_NAME_EXTRA_FIELD_UNICODE_COMMENT,
4373
4408
  PROPERTY_NAME_EXTRA_FIELD_AES,
4374
4409
  PROPERTY_NAME_EXTRA_FIELD_NTFS,
4375
- PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP
4410
+ PROPERTY_NAME_EXTRA_FIELD_EXTENDED_TIMESTAMP,
4411
+ PROPERTY_NAME_EXTRA_FIELD_USDZ
4376
4412
  ];
4377
4413
 
4378
4414
  class Entry {
@@ -4446,6 +4482,7 @@ const OPTION_ENCODE_TEXT = "encodeText";
4446
4482
  const OPTION_OFFSET = "offset";
4447
4483
  const OPTION_USDZ = "usdz";
4448
4484
  const OPTION_UNIX_EXTRA_FIELD_TYPE = "unixExtraFieldType";
4485
+ const OPTION_LOCAL_EXTRA_FIELD = "localExtraField";
4449
4486
  const OPTION_STRICTNESS = "strictness";
4450
4487
  const OPTION_MAX_APPENDED_DATA_SIZE = "maxAppendedDataSize";
4451
4488
  const STRICTNESS_STRICT = "strict";
@@ -4498,7 +4535,7 @@ const CHARSET_UTF8 = "utf-8";
4498
4535
  const PROPERTY_NAME_UTF8_SUFFIX = "UTF8";
4499
4536
  const CHARSET_CP437 = "cp437";
4500
4537
  const BITFLAG_AMBIGUITY_MASK = BITFLAG_ENCRYPTED | BITFLAG_DATA_DESCRIPTOR | BITFLAG_LANG_ENCODING_FLAG;
4501
- const VENDOR_VERSION_AE_1 = 1;
4538
+ const VENDOR_VERSION_AE_1$1 = 1;
4502
4539
  const ZIP64_PROPERTIES = [
4503
4540
  [PROPERTY_NAME_UNCOMPRESSED_SIZE, MAX_32_BITS],
4504
4541
  [PROPERTY_NAME_COMPRESSED_SIZE, MAX_32_BITS],
@@ -4891,7 +4928,7 @@ let ZipEntry$1 = class ZipEntry {
4891
4928
  config,
4892
4929
  bitFlag,
4893
4930
  rawBitFlag,
4894
- signature,
4931
+ crc32,
4895
4932
  rawLastModDate,
4896
4933
  uncompressedSize,
4897
4934
  compressedSize
@@ -4982,7 +5019,7 @@ let ZipEntry$1 = class ZipEntry {
4982
5019
  const checkCrc32 = (checkCrc32Option === UNDEFINED_VALUE ?
4983
5020
  getOptionValue$1(zipEntry, options, OPTION_CHECK_SIGNATURE) :
4984
5021
  checkCrc32Option) && !passThrough &&
4985
- (!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1));
5022
+ (!encrypted || zipCrypto || (extraFieldAES && extraFieldAES.vendorVersion == VENDOR_VERSION_AE_1$1));
4986
5023
  const workerOptions = {
4987
5024
  options: {
4988
5025
  codecType: CODEC_INFLATE,
@@ -4992,9 +5029,9 @@ let ZipEntry$1 = class ZipEntry {
4992
5029
  encryptionStrength: extraFieldAES && extraFieldAES.strength,
4993
5030
  checkCrc32,
4994
5031
  checkAuthenticationCode: getOptionValue$1(zipEntry, options, OPTION_CHECK_AUTHENTICATION_CODE),
4995
- passwordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((signature >>> 24) & MAX_8_BITS)),
5032
+ passwordVerification: zipCrypto && (dataDescriptor ? ((rawLastModDate >>> 8) & MAX_8_BITS) : ((crc32 >>> 24) & MAX_8_BITS)),
4996
5033
  outputSize: passThrough ? compressedSize : uncompressedSize,
4997
- signature,
5034
+ crc32,
4998
5035
  compressed: compressionMethod != 0 && !passThrough,
4999
5036
  encrypted,
5000
5037
  useWebWorkers: getOptionValue$1(zipEntry, options, OPTION_USE_WEB_WORKERS),
@@ -5016,7 +5053,7 @@ let ZipEntry$1 = class ZipEntry {
5016
5053
  fileEntry,
5017
5054
  index,
5018
5055
  offset: localHeaderOffset,
5019
- signature,
5056
+ crc32,
5020
5057
  compressedSize,
5021
5058
  uncompressedSize,
5022
5059
  dataOffset,
@@ -5133,6 +5170,16 @@ function readCommonFooter(fileEntry, directory, dataView, offset, localDirectory
5133
5170
  } else {
5134
5171
  directory.compressionMethod = compressionMethod;
5135
5172
  }
5173
+ const extraFieldPkwareUnix = extraField.get(EXTRAFIELD_TYPE_PKWARE_UNIX);
5174
+ if (extraFieldPkwareUnix) {
5175
+ readExtraFieldUnixDates(extraFieldPkwareUnix, directory);
5176
+ directory.extraFieldPkwareUnix = extraFieldPkwareUnix;
5177
+ }
5178
+ const extraFieldUnixType1 = extraField.get(EXTRAFIELD_TYPE_UNIX_TYPE1);
5179
+ if (extraFieldUnixType1) {
5180
+ readExtraFieldUnixDates(extraFieldUnixType1, directory);
5181
+ directory.extraFieldUnixType1 = extraFieldUnixType1;
5182
+ }
5136
5183
  const extraFieldNTFS = extraField.get(EXTRAFIELD_TYPE_NTFS);
5137
5184
  if (extraFieldNTFS) {
5138
5185
  readExtraFieldNTFS(extraFieldNTFS, directory);
@@ -5182,15 +5229,15 @@ function readExtraFieldUnicode(extraFieldUnicode, propertyName, rawPropertyName,
5182
5229
  return;
5183
5230
  }
5184
5231
  const extraFieldView = getDataView(extraFieldUnicode.data);
5185
- const crc32 = new Crc32();
5186
- crc32.append(fileEntry[rawPropertyName]);
5187
- const dataViewSignature = getDataView(new Uint8Array(4));
5188
- dataViewSignature.setUint32(0, crc32.get(), true);
5189
- const signature = getUint32(extraFieldView, 1);
5232
+ const computedCrc32 = new Crc32();
5233
+ computedCrc32.append(fileEntry[rawPropertyName]);
5234
+ const computedCrc32View = getDataView(new Uint8Array(4));
5235
+ computedCrc32View.setUint32(0, computedCrc32.get(), true);
5236
+ const nameCrc32 = getUint32(extraFieldView, 1);
5190
5237
  Object.assign(extraFieldUnicode, {
5191
5238
  version: getUint8(extraFieldView, 0),
5192
5239
  [propertyName]: decodeText(extraFieldUnicode.data.subarray(5)),
5193
- valid: !fileEntry.bitFlag.languageEncodingFlag && signature == getUint32(dataViewSignature, 0)
5240
+ valid: !fileEntry.bitFlag.languageEncodingFlag && nameCrc32 == getUint32(computedCrc32View, 0)
5194
5241
  });
5195
5242
  if (extraFieldUnicode.valid) {
5196
5243
  directory[propertyName] = extraFieldUnicode[propertyName];
@@ -5209,7 +5256,7 @@ function readExtraFieldAES(extraFieldAES, directory, compressionMethod) {
5209
5256
  compressionMethod: getUint16(extraFieldView, 5)
5210
5257
  });
5211
5258
  directory.compressionMethod = extraFieldAES.compressionMethod;
5212
- if (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1) {
5259
+ if (extraFieldAES.vendorVersion != VENDOR_VERSION_AE_1$1) {
5213
5260
  directory.crc32 = UNDEFINED_VALUE;
5214
5261
  }
5215
5262
  }
@@ -5249,6 +5296,22 @@ function readExtraFieldNTFS(extraFieldNTFS, directory) {
5249
5296
  }
5250
5297
  }
5251
5298
 
5299
+ function readExtraFieldUnixDates(extraField, directory) {
5300
+ if (extraField.data.length < 8) {
5301
+ return;
5302
+ }
5303
+ const extraFieldView = getDataView(extraField.data);
5304
+ const lastAccessDate = new Date(getUint32(extraFieldView, 0) * 1000);
5305
+ const lastModDate = new Date(getUint32(extraFieldView, 4) * 1000);
5306
+ const extraFieldData = { lastAccessDate, lastModDate };
5307
+ if (extraField.data.length >= 12) {
5308
+ extraFieldData.uid = getUint16(extraFieldView, 8);
5309
+ extraFieldData.gid = getUint16(extraFieldView, 10);
5310
+ }
5311
+ Object.assign(extraField, extraFieldData);
5312
+ Object.assign(directory, extraFieldData);
5313
+ }
5314
+
5252
5315
  function readExtraFieldUnix(extraField, directory, isInfoZip) {
5253
5316
  try {
5254
5317
  const view = getDataView(extraField.data);
@@ -5327,7 +5390,7 @@ async function detectOverlappingEntry({
5327
5390
  fileEntry,
5328
5391
  index,
5329
5392
  offset,
5330
- signature,
5393
+ crc32,
5331
5394
  compressedSize,
5332
5395
  uncompressedSize,
5333
5396
  dataOffset,
@@ -5348,7 +5411,7 @@ async function detectOverlappingEntry({
5348
5411
  const dataDescriptorSignature = dataDescriptorArray.length == dataDescriptorLength + DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH &&
5349
5412
  getUint32(getDataView(dataDescriptorArray), 0) == DATA_DESCRIPTOR_RECORD_SIGNATURE;
5350
5413
  if (dataDescriptorSignature) {
5351
- const readSignature = getUint32(getDataView(dataDescriptorArray), 4);
5414
+ const readCrc32 = getUint32(getDataView(dataDescriptorArray), 4);
5352
5415
  let readCompressedSize;
5353
5416
  let readUncompressedSize;
5354
5417
  if (extraFieldZip64) {
@@ -5358,8 +5421,8 @@ async function detectOverlappingEntry({
5358
5421
  readCompressedSize = getUint32(getDataView(dataDescriptorArray), 8);
5359
5422
  readUncompressedSize = getUint32(getDataView(dataDescriptorArray), 12);
5360
5423
  }
5361
- const matchSignature = (fileEntry.encrypted && !fileEntry.zipCrypto) || readSignature == signature;
5362
- if (matchSignature &&
5424
+ const matchCrc32 = (fileEntry.encrypted && !fileEntry.zipCrypto) || readCrc32 == crc32;
5425
+ if (matchCrc32 &&
5363
5426
  readCompressedSize == compressedSize &&
5364
5427
  readUncompressedSize == uncompressedSize) {
5365
5428
  dataDescriptorLength += DATA_DESCRIPTOR_RECORD_SIGNATURE_LENGTH;
@@ -5528,11 +5591,11 @@ function checkLocalDirectory(zipEntry, localDirectory, rawLocalFilename) {
5528
5591
  throwAmbiguousArchive("mismatched local file header (compression method)");
5529
5592
  }
5530
5593
  if (!localDirectory.bitFlag.dataDescriptor &&
5531
- (localDirectory.signature || localDirectory.compressedSize || localDirectory.uncompressedSize) &&
5532
- (localDirectory.signature != zipEntry.signature ||
5594
+ (localDirectory.crc32 || localDirectory.compressedSize || localDirectory.uncompressedSize) &&
5595
+ (localDirectory.crc32 != zipEntry.crc32 ||
5533
5596
  localDirectory.compressedSize != zipEntry.compressedSize ||
5534
5597
  localDirectory.uncompressedSize != zipEntry.uncompressedSize)) {
5535
- throwAmbiguousArchive("mismatched local file header (signature or sizes)");
5598
+ throwAmbiguousArchive("mismatched local file header (crc32 or sizes)");
5536
5599
  }
5537
5600
  }
5538
5601
 
@@ -5652,7 +5715,9 @@ const ERR_INVALID_MSDOS_ATTRIBUTES = "Invalid msdosAttributesRaw (must be intege
5652
5715
  const ERR_INVALID_MSDOS_DATA = "Invalid msdosAttributes (must be an object with boolean flags)";
5653
5716
 
5654
5717
  const EXTRAFIELD_DATA_AES = new Uint8Array([0x07, 0x00, 0x02, 0x00, 0x41, 0x45, 0x03, 0x00, 0x00]);
5655
- const INFOZIP_EXTRA_FIELD_TYPE = "infozip";
5718
+ const EXTRAFIELD_OFFSET_AES_VENDOR_VERSION = 4;
5719
+ const VENDOR_VERSION_AE_1 = 1;
5720
+ const INFOZIP_EXTRA_FIELD_TYPE$1 = "infozip";
5656
5721
  const UNIX_EXTRA_FIELD_TYPE = "unix";
5657
5722
 
5658
5723
  let workers = 0;
@@ -5746,9 +5811,9 @@ class ZipWriter {
5746
5811
  zip64UncompressedSize,
5747
5812
  extraFieldLength
5748
5813
  });
5749
- const { signature } = entry;
5750
- if (signature !== UNDEFINED_VALUE) {
5751
- setUint32(headerView, HEADER_OFFSET_SIGNATURE, signature);
5814
+ const { crc32 } = entry;
5815
+ if (crc32 !== UNDEFINED_VALUE) {
5816
+ setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
5752
5817
  }
5753
5818
  Object.assign(entry, {
5754
5819
  zip64UncompressedSize,
@@ -5933,6 +5998,7 @@ async function addFile(zipWriter, name, reader, options) {
5933
5998
  internalFileAttribute: metadataInfo.resolvedOptions.internalFileAttributes,
5934
5999
  externalFileAttribute: attributesInfo.resolvedOptions.externalFileAttributes,
5935
6000
  signature: options[PROPERTY_NAME_SIGNATURE],
6001
+ crc32: options.crc32 === UNDEFINED_VALUE ? options[PROPERTY_NAME_SIGNATURE] : options.crc32,
5936
6002
  offset: zipWriter.offset - diskOffset,
5937
6003
  diskNumberStart: diskNumber
5938
6004
  });
@@ -5969,7 +6035,7 @@ function resolveAttributes(zipWriter, name, options) {
5969
6035
  if (unixMode !== UNDEFINED_VALUE && (unixMode < 0 || unixMode > MAX_16_BITS)) {
5970
6036
  throw new Error(ERR_INVALID_UNIX_MODE);
5971
6037
  }
5972
- if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
6038
+ if (unixExtraFieldType !== UNDEFINED_VALUE && unixExtraFieldType !== INFOZIP_EXTRA_FIELD_TYPE$1 && unixExtraFieldType !== UNIX_EXTRA_FIELD_TYPE) {
5973
6039
  throw new Error(ERR_INVALID_UNIX_EXTRA_FIELD_TYPE);
5974
6040
  }
5975
6041
  if (unixExtraFieldType === UNIX_EXTRA_FIELD_TYPE &&
@@ -5977,7 +6043,7 @@ function resolveAttributes(zipWriter, name, options) {
5977
6043
  throw new Error(ERR_INVALID_UNIX_ID_SIZE);
5978
6044
  }
5979
6045
  if (unixExtraFieldType === UNDEFINED_VALUE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
5980
- unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE;
6046
+ unixExtraFieldType = INFOZIP_EXTRA_FIELD_TYPE$1;
5981
6047
  }
5982
6048
  let msdosAttributesRaw = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES_RAW);
5983
6049
  let msdosAttributes = getOptionValue(zipWriter, options, PROPERTY_NAME_MSDOS_ATTRIBUTES);
@@ -6149,27 +6215,8 @@ function resolveMetadata(zipWriter, name, options) {
6149
6215
  if (!zipCrypto && (password !== UNDEFINED_VALUE || rawPassword !== UNDEFINED_VALUE) && !(encryptionStrength >= 1 && encryptionStrength <= 3)) {
6150
6216
  throw new Error(ERR_INVALID_ENCRYPTION_STRENGTH);
6151
6217
  }
6152
- let rawExtraField = EMPTY_UINT8_ARRAY;
6153
- const extraField = options[PROPERTY_NAME_EXTRA_FIELD];
6154
- if (extraField) {
6155
- let extraFieldSize = 0;
6156
- let offset = 0;
6157
- extraField.forEach(data => extraFieldSize += 4 + getLength(data));
6158
- rawExtraField = new Uint8Array(extraFieldSize);
6159
- const rawExtraFieldView = getDataView(rawExtraField);
6160
- extraField.forEach((data, type) => {
6161
- if (type > MAX_16_BITS) {
6162
- throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
6163
- }
6164
- if (getLength(data) > MAX_16_BITS) {
6165
- throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
6166
- }
6167
- setUint16(rawExtraFieldView, offset, type);
6168
- setUint16(rawExtraFieldView, offset + 2, getLength(data));
6169
- arraySet(rawExtraField, data, offset + 4);
6170
- offset += 4 + getLength(data);
6171
- });
6172
- }
6218
+ const rawExtraField = serializeExtraField(options[PROPERTY_NAME_EXTRA_FIELD]);
6219
+ const rawLocalExtraField = serializeExtraField(options[OPTION_LOCAL_EXTRA_FIELD]);
6173
6220
  return {
6174
6221
  comment,
6175
6222
  resolvedOptions: {
@@ -6203,11 +6250,36 @@ function resolveMetadata(zipWriter, name, options) {
6203
6250
  useCompressionStream,
6204
6251
  dataDescriptor,
6205
6252
  zip64,
6206
- rawExtraField
6253
+ rawExtraField,
6254
+ rawLocalExtraField
6207
6255
  }
6208
6256
  };
6209
6257
  }
6210
6258
 
6259
+ function serializeExtraField(extraField) {
6260
+ if (!extraField) {
6261
+ return EMPTY_UINT8_ARRAY;
6262
+ }
6263
+ let extraFieldSize = 0;
6264
+ let offset = 0;
6265
+ extraField.forEach(data => extraFieldSize += 4 + getLength(data));
6266
+ const rawExtraField = new Uint8Array(extraFieldSize);
6267
+ const rawExtraFieldView = getDataView(rawExtraField);
6268
+ extraField.forEach((data, type) => {
6269
+ if (type > MAX_16_BITS) {
6270
+ throw new Error(ERR_INVALID_EXTRAFIELD_TYPE);
6271
+ }
6272
+ if (getLength(data) > MAX_16_BITS) {
6273
+ throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
6274
+ }
6275
+ setUint16(rawExtraFieldView, offset, type);
6276
+ setUint16(rawExtraFieldView, offset + 2, getLength(data));
6277
+ arraySet(rawExtraField, data, offset + 4);
6278
+ offset += 4 + getLength(data);
6279
+ });
6280
+ return rawExtraField;
6281
+ }
6282
+
6211
6283
  async function resolveSizes(zipWriter, reader, { resolvedOptions: metadata }, options) {
6212
6284
  const { passThrough, zipCrypto, password, rawPassword, encryptionStrength } = metadata;
6213
6285
  let { dataDescriptor, zip64, level, compressionMethod } = metadata;
@@ -6532,12 +6604,9 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
6532
6604
  msdosAttributes
6533
6605
  };
6534
6606
  let {
6535
- crc32: signature,
6607
+ crc32,
6536
6608
  uncompressedSize
6537
6609
  } = options;
6538
- if (signature === UNDEFINED_VALUE) {
6539
- ({ signature } = options);
6540
- }
6541
6610
  let compressedSize = 0;
6542
6611
  if (!passThrough) {
6543
6612
  uncompressedSize = 0;
@@ -6575,7 +6644,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
6575
6644
  if (!passThrough) {
6576
6645
  uncompressedSize = result.inputSize;
6577
6646
  if (!encrypted || zipCrypto) {
6578
- signature = result.signature;
6647
+ crc32 = result.crc32;
6579
6648
  }
6580
6649
  }
6581
6650
  if ((!zip64CompressedSize && compressedSize >= MAX_32_BITS) ||
@@ -6591,7 +6660,7 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
6591
6660
 
6592
6661
  }
6593
6662
  setEntryInfo({
6594
- signature,
6663
+ crc32,
6595
6664
  compressedSize,
6596
6665
  uncompressedSize,
6597
6666
  headerInfo,
@@ -6614,8 +6683,8 @@ async function createFileEntry(reader, writer, { diskNumberStart, lock }, entryI
6614
6683
  version,
6615
6684
  headerArray,
6616
6685
  headerView,
6617
- signature,
6618
- crc32: encrypted && !zipCrypto ? UNDEFINED_VALUE : signature,
6686
+ signature: crc32,
6687
+ crc32: encrypted && !zipCrypto && !passThrough ? UNDEFINED_VALUE : crc32,
6619
6688
  extraFieldExtendedTimestampFlag,
6620
6689
  zip64UncompressedSize,
6621
6690
  zip64CompressedSize
@@ -6636,6 +6705,7 @@ function getHeaderInfo(options) {
6636
6705
  dataDescriptor,
6637
6706
  directory,
6638
6707
  rawExtraField,
6708
+ rawLocalExtraField,
6639
6709
  encryptionStrength,
6640
6710
  extendedTimestamp,
6641
6711
  ntfsTimestamp,
@@ -6643,7 +6713,8 @@ function getHeaderInfo(options) {
6643
6713
  encrypted,
6644
6714
  zip64UncompressedSize,
6645
6715
  zip64CompressedSize,
6646
- uncompressedSize
6716
+ uncompressedSize,
6717
+ crc32
6647
6718
  } = options;
6648
6719
  let { version, compressionMethod } = options;
6649
6720
  const compressed = !directory && (compressionMethod === UNDEFINED_VALUE
@@ -6731,7 +6802,7 @@ function getHeaderInfo(options) {
6731
6802
  let rawExtraFieldUnix;
6732
6803
  try {
6733
6804
  const { uid, gid, unixExtraFieldType } = options;
6734
- if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
6805
+ if (unixExtraFieldType == INFOZIP_EXTRA_FIELD_TYPE$1 && (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE)) {
6735
6806
  const uidBytes = packUnixId(uid);
6736
6807
  const gidBytes = packUnixId(gid);
6737
6808
  const payloadLength = 3 + uidBytes.length + gidBytes.length;
@@ -6769,11 +6840,14 @@ function getHeaderInfo(options) {
6769
6840
  }
6770
6841
  if (encrypted && !zipCrypto) {
6771
6842
  version = version > VERSION_AES ? version : VERSION_AES;
6843
+ if (passThrough && crc32 !== UNDEFINED_VALUE) {
6844
+ rawExtraFieldAES[EXTRAFIELD_OFFSET_AES_VENDOR_VERSION] = VENDOR_VERSION_AE_1;
6845
+ }
6772
6846
  rawExtraFieldAES[9] = compressionMethod;
6773
6847
  compressionMethod = COMPRESSION_METHOD_AES;
6774
6848
  }
6775
6849
  const localExtraFieldZip64Length = writeLocalExtraFieldZip64 ? getLength(rawLocalExtraFieldZip64) : 0;
6776
- const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField);
6850
+ const extraFieldLength = localExtraFieldZip64Length + getLength(rawExtraFieldAES, rawExtraFieldExtendedTimestamp, rawExtraFieldNTFS, rawExtraFieldUnix, rawExtraField, rawLocalExtraField);
6777
6851
  if (extraFieldLength > MAX_16_BITS) {
6778
6852
  throw new Error(ERR_INVALID_EXTRAFIELD_DATA);
6779
6853
  }
@@ -6807,6 +6881,7 @@ function getHeaderInfo(options) {
6807
6881
  localHeader.bytes(rawExtraFieldNTFS);
6808
6882
  localHeader.bytes(rawExtraFieldUnix);
6809
6883
  localHeader.bytes(rawExtraField);
6884
+ localHeader.bytes(rawLocalExtraField);
6810
6885
  if (dataDescriptor) {
6811
6886
  if (!zip64CompressedSize) {
6812
6887
  setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, 0);
@@ -6925,7 +7000,7 @@ function getDataDescriptorInfo({
6925
7000
  }
6926
7001
 
6927
7002
  function setEntryInfo({
6928
- signature,
7003
+ crc32,
6929
7004
  compressedSize,
6930
7005
  uncompressedSize,
6931
7006
  headerInfo,
@@ -6933,6 +7008,7 @@ function setEntryInfo({
6933
7008
  }, {
6934
7009
  zip64,
6935
7010
  zipCrypto,
7011
+ passThrough,
6936
7012
  dataDescriptor
6937
7013
  }) {
6938
7014
  const {
@@ -6943,10 +7019,10 @@ function setEntryInfo({
6943
7019
  dataDescriptorView,
6944
7020
  dataDescriptorOffset
6945
7021
  } = dataDescriptorInfo;
6946
- if ((!encrypted || zipCrypto) && signature !== UNDEFINED_VALUE) {
6947
- setUint32(headerView, HEADER_OFFSET_SIGNATURE, signature);
7022
+ if ((!encrypted || zipCrypto || passThrough) && crc32 !== UNDEFINED_VALUE) {
7023
+ setUint32(headerView, HEADER_OFFSET_SIGNATURE, crc32);
6948
7024
  if (dataDescriptor) {
6949
- setUint32(dataDescriptorView, dataDescriptorOffset, signature);
7025
+ setUint32(dataDescriptorView, dataDescriptorOffset, crc32);
6950
7026
  }
6951
7027
  }
6952
7028
  if (zip64) {
@@ -6969,15 +7045,15 @@ function updateLocalHeader({
6969
7045
  encrypted,
6970
7046
  zip64,
6971
7047
  localExtraFieldZip64Length,
6972
- signature,
7048
+ crc32,
6973
7049
  compressedSize,
6974
7050
  uncompressedSize,
6975
7051
  zip64UncompressedSize,
6976
7052
  zip64CompressedSize
6977
- }, localHeaderView, { dataDescriptor }) {
7053
+ }, localHeaderView, { dataDescriptor, passThrough }) {
6978
7054
  if (!dataDescriptor) {
6979
- if (!encrypted) {
6980
- setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, signature);
7055
+ if (!encrypted || (passThrough && crc32 !== UNDEFINED_VALUE)) {
7056
+ setUint32(localHeaderView, HEADER_OFFSET_SIGNATURE + LOCAL_HEADER_COMMON_OFFSET, crc32);
6981
7057
  }
6982
7058
  if (!zip64CompressedSize) {
6983
7059
  setUint32(localHeaderView, HEADER_OFFSET_COMPRESSED_SIZE + LOCAL_HEADER_COMMON_OFFSET, compressedSize);
@@ -8237,8 +8313,8 @@ configureWorker({
8237
8313
  }
8238
8314
  });
8239
8315
  setDefaultConfiguration({
8240
- CompressionStreamZlib,
8241
- DecompressionStreamZlib
8316
+ CompressionStreamFallback: CompressionStreamZlib,
8317
+ DecompressionStreamFallback: DecompressionStreamZlib
8242
8318
  });
8243
8319
 
8244
8320
  function terminateWorkersAndModule() {
@@ -8247,33 +8323,7 @@ function terminateWorkersAndModule() {
8247
8323
  resetWasmModule();
8248
8324
  }
8249
8325
 
8250
- /*
8251
- Copyright (c) 2025 Gildas Lormeau. All rights reserved.
8252
-
8253
- Redistribution and use in source and binary forms, with or without
8254
- modification, are permitted provided that the following conditions are met:
8255
-
8256
- 1. Redistributions of source code must retain the above copyright notice,
8257
- this list of conditions and the following disclaimer.
8258
-
8259
- 2. Redistributions in binary form must reproduce the above copyright
8260
- notice, this list of conditions and the following disclaimer in
8261
- the documentation and/or other materials provided with the distribution.
8262
-
8263
- 3. The names of the authors may not be used to endorse or promote products
8264
- derived from this software without specific prior written permission.
8265
-
8266
- THIS SOFTWARE IS PROVIDED ''AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
8267
- INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
8268
- FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT,
8269
- INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT,
8270
- INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8271
- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
8272
- OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
8273
- LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
8274
- NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
8275
- EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8276
- */
8326
+ /// <reference types="../index.d.ts" />
8277
8327
 
8278
8328
 
8279
8329
  configureExternalAssets();
@@ -8309,6 +8359,20 @@ configureExternalAssets();
8309
8359
 
8310
8360
  const ERR_ENTRY_EXISTS = "Entry filename already exists";
8311
8361
  const ERR_READABLE_CONSUMED = "Readable stream already consumed";
8362
+ const INFOZIP_EXTRA_FIELD_TYPE = "infozip";
8363
+ const INTERPRETED_EXTRA_FIELD_TYPES = new Set([
8364
+ EXTRAFIELD_TYPE_ZIP64,
8365
+ EXTRAFIELD_TYPE_AES,
8366
+ EXTRAFIELD_TYPE_NTFS,
8367
+ EXTRAFIELD_TYPE_EXTENDED_TIMESTAMP,
8368
+ EXTRAFIELD_TYPE_UNICODE_PATH,
8369
+ EXTRAFIELD_TYPE_UNICODE_COMMENT,
8370
+ EXTRAFIELD_TYPE_USDZ,
8371
+ EXTRAFIELD_TYPE_INFOZIP,
8372
+ EXTRAFIELD_TYPE_UNIX,
8373
+ EXTRAFIELD_TYPE_UNIX_TYPE1,
8374
+ EXTRAFIELD_TYPE_PKWARE_UNIX
8375
+ ]);
8312
8376
 
8313
8377
  class ZipEntry {
8314
8378
 
@@ -9046,6 +9110,20 @@ function detach(entry) {
9046
9110
  }
9047
9111
  }
9048
9112
 
9113
+ function getUserExtraField(extraField) {
9114
+ if (extraField) {
9115
+ const userExtraField = new Map();
9116
+ extraField.forEach((field, type) => {
9117
+ if (!INTERPRETED_EXTRA_FIELD_TYPES.has(type)) {
9118
+ userExtraField.set(type, field.data);
9119
+ }
9120
+ });
9121
+ if (userExtraField.size) {
9122
+ return userExtraField;
9123
+ }
9124
+ }
9125
+ }
9126
+
9049
9127
  async function exportZip(zipWriter, entry, totalSize, options, readers) {
9050
9128
  const selectedEntry = entry;
9051
9129
  const entryOffsets = new Map();
@@ -9083,9 +9161,13 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
9083
9161
  uncompressedSize,
9084
9162
  encrypted,
9085
9163
  zipCrypto,
9086
- signature,
9164
+ crc32,
9087
9165
  compressionMethod,
9088
- extraFieldAES
9166
+ extraFieldAES,
9167
+ internalFileAttributes,
9168
+ extraField,
9169
+ uid,
9170
+ gid
9089
9171
  } = child.data;
9090
9172
  zipEntryOptions = {
9091
9173
  externalFileAttributes,
@@ -9093,8 +9175,20 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
9093
9175
  comment,
9094
9176
  lastModDate,
9095
9177
  creationDate,
9096
- lastAccessDate
9178
+ lastAccessDate,
9179
+ internalFileAttributes
9097
9180
  };
9181
+ const userExtraField = getUserExtraField(extraField);
9182
+ if (userExtraField) {
9183
+ zipEntryOptions.extraField = userExtraField;
9184
+ }
9185
+ if (uid !== UNDEFINED_VALUE || gid !== UNDEFINED_VALUE) {
9186
+ Object.assign(zipEntryOptions, {
9187
+ uid,
9188
+ gid,
9189
+ unixExtraFieldType: options.unixExtraFieldType || INFOZIP_EXTRA_FIELD_TYPE
9190
+ });
9191
+ }
9098
9192
  if (child.passThrough) {
9099
9193
  let level, encryptionStrength;
9100
9194
  if (compressionMethod === 0) {
@@ -9107,7 +9201,7 @@ async function exportZip(zipWriter, entry, totalSize, options, readers) {
9107
9201
  passThrough: true,
9108
9202
  encrypted,
9109
9203
  zipCrypto,
9110
- signature,
9204
+ crc32,
9111
9205
  uncompressedSize,
9112
9206
  level,
9113
9207
  encryptionStrength,
@@ -9294,6 +9388,8 @@ function addChild(parent, name, params, directory) {
9294
9388
  }
9295
9389
  }
9296
9390
 
9391
+ const encodedMimeTypes = "application:0andrew-inset ez,2nodex anx,1pplixware aw,1tom!,4cat!,4serv! atomsrv,5vc!,0bbolin lin,0ccxml!,1dmi-capability cdmia,6ontainer cdmic,5domain cdmid,5object cdmio,5queue cdmiq,1u-seeme cu,0davmount!,1ocbook! dbk,1sptype tsp,2sc+der,4! xdssc,0ecmascript es ecma,1mma!,1nvoy evy,1pub+zip,1xi,0font-tdpfr pfr,1ractals fif,1uturesplash spl,0gml!,1px!,1xf,1zip gz tgz,0hta,1yperstudio stk,0inkml! ink inkml,2ternet-property-stream acx,1pfix,0java-archive jar,5serialized-object ser,5vm class,1sonml+json,0lost! lostxml,0m3g,1ac-binhex40 hqx,2ds!,2rc mrc,4xml! mrcx,2thematica nb ma mb,4ml! mathml mml,1box,1ediaservercontrol! mscml,2talink!,84! meta4,3s!,1ods!,1p21 m21 mp21,24 mp4s,1saccess mdb,2word doc dot wiz,1xf,0oda,1ebps-package! opf,1gg ogx,1lescript axs,1mdoc!,1nenote onetoc onetoc2 onetmp onepkg,1xps,0patch-ops-error! xer,1df,1gp-encrypted pgp,4keys key,4signature asc sig,1ics-rules prf,1kcs10 p10,47-mime p7m p7c,6signature p7s,48 p8,2ix-attr-cert ac,5crl crl,5pkipath pkipath,4cmp pki,1ls!,1ostscript ps ai eps epsi epsf eps2 eps3,1rs.cww cww,1skc! pskcxml,0rar,1df!,1eginfo! rif,2lax-ng-compact-syntax rnc,2source-lists! rl,e-diff! rld,1ls-services! rs,1pki-ghostbusters gbr,5manifest mft,5roa roa,1sd!,2s!,1tf,0sbml!,1cvp-cv-request scq,asponse scs,5vp-request spq,asponse spp,1dp,1et-payment-initiation setpay,4registration-initiation setreg,1hf!,1mil! smi smil,1parql-query rq,7results! srx,1rgs gram,4! grxml,2u!,1sdl!,2ml!,0tei! tei teicorpus,1hraud! tfi,1imestamped-data tsd,0vnd.3gpp.pic-bw-large plb,gsmall psb,gvar pvb,82.tcap tcap,5m.post-it-notes pwn,4accpac.simply.aso aso,iimp imp,6ucobol acu,9rp atc acutc,5dobe.air-application-installer-package+zip air,aformscentral.fcdt fcdt,bxp fxp fxpl,axdp! xdp,bfdf xfdf,5head.space ahead,5irzip.filesecure.azf azf,os azs,5mazon.ebook azw,6ericandynamics.acc acc,6iga.ami ami,5ndroid.package-archive apk,6ser-web-certificate-issue-initiation cii,efunds-transfer-initiation fti,6tix.game-component atx,5pple.installer! mpkg,ampegurl m3u8,5ristanetworks.swi swi,5straea-software.iota iota,5udiograph aep,4blueice.multipass mpm,5mi bmi,5usinessobjects rep,4chemdraw! cdxml,6ipnuts.karaoke-mmd mmd,5inderella cdy,5laymore cla,6oanto.rp9 rp9,7nk.c4group c4g c4d c4f c4p c4u,6uetrust.cartomobile-config c11amc,w-pkg c11amz,5ommonspace csp,6ntact.cmsg cdbcmsg,6smocaller cmc,5rick.clicker clkx,h.keyboard clkk,ipalette clkp,itemplate clkt,iwordbank clkw,7ticaltools.wbs! wbs,5tc-posml pml,5ups-ppd ppd,6rl.car car,9pcurl pcurl,4dart dart,6ta-vision.rdz rdz,5ebian.binary-package deb udeb,6ce.data uvf uvvf uvd uvvd,9ttml! uvt uvvt,9unspecified uvx uvvx,9zip uvz uvvz,6novo.fcselayout-link fe_launch,5na dna,5olby.mlp mlp,5pgraph dpg,5reamfactory dfac,5s-keypoint kpxx,5vb.ait ait,8service svc,5ynageo geo,4ecowin.chart mag,5nliven nml,5pson.esf esf,amsf msf,aquickanime qam,asalt slt,bsf ssf,5szigno3! es3 et3,5zpix-album ez2,apackage ez3,4fdf fdf,6sn.mseed mseed,9seed seed dataless,5lographit gph,6uxtime.clip ftc,5ramemaker fm frame maker book,6ogans.fnc fnc,cltf ltf,5sc.weblaunch fsc,5ujitsu.oasys oas,h2 oa2,h3 oa3,hgp fg5,hprs bh2,8xerox.ddd ddd,focuworks xdw,n.binder xbd,6zzysheet fzs,4genomatix.tuxedo txd,6ogebra.file ggb,dtool ggt,7metry-explorer gex gre,7next gxt,7plan g2w,7space g3w,5mx gmx,5oogle-earth.kml! kml,jz kmz,5rafeq gqf gqs,6oove-account gac,bhelp ghf,bidentity-message gim,cnjector grv,btool-message gtm,gtemplate tpl,bvcard vcg,4hal! hal,6ndheld-entertainment! zmm,5bci hbci,5he.lesson-player les,5p-hpgl hpgl,9id hpid,9s hps,7jlyt jlt,7pcl pcl,axl pclxl,5ydrostatix.sof-data sfd-hdstx,5zn-3d-crossword x3d,4ibm.minipay mpy,9odcap afp listafp list3820,8rights-management irm,8secure-container sc,5ccprofile icc icm,5gloader igl,5mmervision-ivp ivp,iu ivu,5nsors.igm igm,6tercon.formnet xpw xpx,9geo i2g,7u.qbo qbo,afx qfx,5punplugged.rcprofile rcprofile,5repository.package! irp,5s-xpr xpr,6ac.fcs fcs,4jam jam,5cp.javame.midlet-rms rms,5isp jisp,5oost.joda-archive joda,4kahootz ktz ktr,5de.karbon karbon,9chart chrt,9formula kfo,9ivio flw,9ontour kon,9presenter kpr kpt,9spread ksp,9word kwd kwt,5enameaapp htke,5idspiration kia,6nar kne knp,5oan skp skd skt skm,6dak-descriptor sse,4las.las! lasxml,5lamagraphics.life-balance.desktop lbd,vexchange! lbe,5otus-1-2-3 123,aapproach apr,afreelance pre,anotes nsf,aorganizer org,ascreencam scm,awordpro lwp,4macports.portpkg portpkg,5cd mcd,5edcalcdata mc1,7iastation.cdkey cdkey,5fer mwf,6mp mfm,5icrografx.flo flo,figx igx,6f mif,5obius.daf daf,cis dis,bmbk mbk,cqy mqy,csl msl,bplc plc,btxf txf,6phun.application mpn,bcertificate mpc,6zilla.xul! xul,5s-artgalry cil,7cab-compressed cab,7excel xls xlb xlt xlm xla xlc xlw,c.addin.macroenabled.12 xlam,dsheet.binary.macroenabled.12 xlsb,jmacroenabled.12 xlsm,dtemplate.macroenabled.12 xltm,7fontobject eot,7htmlhelp chm,7ims ims,7lrm lrm,7officetheme thmx,8utlook msg,7pki.seccat cat,ctl stl,acertstore sst,8owerpoint ppt pps pot ppa pwz,h.addin.macroenabled.12 ppam,ipresentation.macroenabled.12 pptm,islide.macroenabled.12 sldm,nshow.macroenabled.12 ppsm,itemplate.macroenabled.12 potm,8roject mpp mpt,7word.document.macroenabled.12 docm,ctemplate.macroenabled.12 dotm,aks wps wks wcm wdb,8pl wpl,7xpsdocument xps,6eq mseq,5usician mus,6vee.style msty,5ynfc taglet,4neurolanguage.nlu nlu,5itf ntf nitf,5oblenet-directory nnd,dsealer nns,dweb nnw,6kia.n-gage.data ngdat,hsymbian.install n-gage,aradio-preset rpst,ms rpss,6vadigm.edm edm,fx edx,ext ext,4oasis.opendocument.chart odc,s-template otc,ndatabase odb,nformula odf,u-template odft,ngraphics odg,v-template otg,nimage odi,s-template oti,npresentation odp,z-template otp,nspreadsheet ods,y-template ots,ntext odt,r-master odm otm,stemplate ott,sweb oth,5lpc-sugar xo,5ma.dd2! dd2,5penofficeorg.extension oxt,8xmlformats-officedocument.presentationml.presentation pptx,zresentationml.slide sldx,zresentationml.slideshow ppsx,zresentationml.template potx,yspreadsheetml.sheet xlsx,zpreadsheetml.template xltx,ywordprocessingml.document docx,zordprocessingml.template dotx,5sgeo.mapguide.package mgp,7i.dp dp,9subsystem esa,4palm pdb pqa oprc,6waafile paw,5g.format str,7osasli ei6,5icsel efif,5mi.widget wg,5ocketlearn plf,6werbuilder6 pbd,5reviewsystems.box box,6oteus.magazine mgz,5ublishare-delta-tree qps,5vi.ptid1 ptid,4quark.quarkxpress qxd qxt qwd qwt qxl qxb,4realvnc.bed bed,6cordare.musicxml mxl,m! musicxml,5ig.cryptonote cryptonote,5n-realmedia rm,g-vbr rmvb,5oute66.link66! link66,4sailingtracker.track st,5eemail see,6ma sema,7d semd,7f semf,5hana.informed.formdata ifm,ntemplate itp,jinterchange iif,jpackage ipk,5imtech-mindmapper twd twds,5maf mmf,7rt.teacher teacher,5olent.sdkm! sdkm sdkd,5potfire.dxp dxp,dsfs sfs,5qlite3 db sqlite sqlite3 db-wal sqlite-wal db-shm sqlite-shm,5tardivision.calc sdc,ihart sds,hdraw sda,himpress sdd,hmath sdf smf,hwriter sdw vor,n-global sgl,6epmania.package smzip,estepchart sm,5un.xml.calc sxc,g.template stc,cdraw sxd,g.template std,cimpress sxi,j.template sti,cmath sxm,cwriter sxw,i.global sxg,jtemplate stw,6s-calendar sus susp,5vd svd,5ymbian.install sis sisx,6ncml! xsm,a.dm+wbxml bdm,d! xdm,4tao.intent-module-archive tao,5cpdump.pcap pcap cap dmp,5mobile-livetv tmo,5rid.tpt tpt,7scape.mxs mxs,6ueapp tra,4ufdl ufd ufdl,5iq.theme utz,5majin umj,5nity unityweb,5oml! uoml,4vcx vcx,5isio vsd vst vss vsw vsdx vssx vstx vssm vstm,9nary vis,5sf vsf,4wap.sic sic,9lc slc,8wbxml wbxml,9mlc wmlc,bscriptc wmlsc,5ebturbo wtb,5olfram.player nbp,6rdperfect wpd,f5.1 wp5,5qd wqd,5t.stf stf,4xara xar,5fdl xfdl,4yamaha.hv-dic hvd,escript hvs,evoice hvp,bopenscoreformat osf,q.osfpvg! osfpvg,bsmaf-audio saf,gphrase spf,5ellowriver-custom-menu cmp,4zul zir zirz,5zazz.deck! zaz,1oicexml! vxml,0widget wgt,2nhlp hlp,1sdl!,2policy!,0x-123 wk,27z-compressed 7z,2abiword abw,3ce-compressed ace,3pple-diskimage dmg,3uthorware-bin aab x32 u32 vox,dmap aam,dseg aas,2bcpio bcpio,3ittorrent torrent,3lorb blb blorb,3zip bz,62 bz2 boz,2cbr cbr cba cbt cb7,4z cbz,3df cdf cda,4link vcd,3fs-compressed cfs,3hat chat,4ess-pgn pgn,3ompress z,4nference nsc,3pio cpio,3sh csh,2dgc-compressed dgc,3irector dir dxr cst cct cxt w3d fgd swa,3ms dms,3oom wad,3tbncx! ncx,5ook! dtb,5resource! res,3vi dvi,2eva eva,2font-bdf bdf,7ghostscript gsf,7linux-psf psf,7pcf pcf,7snf snf,7ttf ttf ttc,8ype1 pfa pfb pfm afm,3reearc arc,6mind mm,2gca-compressed gca,3lulx ulx,3numeric gnumeric,3o-sgf sgf,3ramps-xml gramps,5phing-calculator gcf,3tar gtar taz,2hdf hdf,3ttpd-eruby rhtml,8php phtml pht php,b-source phps,b3 php3,c-preprocessed php3p,b4 php4,b5 php5,2ica ica,3nfo info,4stall-instructions install,4ternet-signup ins isp,3phone iii,3so9660-image iso,2java-jnlp-file jnlp,3mol jmz,2killustrator kil,3rita kra krz,2latex latex,3yx lyx,3zh-compressed lzh lha,4x lzx,2maker frm fb fbdoc,3ie mie,3obipocket-ebook prc mobi,3s-application application,5installer msi,5shortcut lnk,5wmd wmd,5xbap xbap,4binder obd,4cardfile crd,5lip clp,4dos-program com exe bat dll,4mediaview mvb m13 m14,6tafile wmf wmz emf emz,5oney mny,4publisher pub,4schedule scd,4terminal trm,4write wri,2netcdf nc,3s-proxy-autoconfig pac dat,3wc nwc,3zb nzb,2object o,3z-application oza,2perfmon pma pmc pmr pmw,5l pm pl,3kcs12 p12 pfx,67-certificates p7b spc,creqresp p7r,3ython-code pyc pyo,2qgis qgs shp shx,3uicktimeplayer qtl,2redhat-package-manager rpm rpa,4search-info-systems ris,3uby rb,2sh sh,4ar shar,4ockwave-flash swf swfl,3ilverlight scr,d-app xap,3ql sql,3tuffit sit,9x sitx,3ubrip srt,3v4cpio sv4cpio,6rc sv4crc,2t3vm-image t3,3ar tar,3ex-gf gf,6pk pk,6tfm tfm,5info texinfo texi,3gif obj,3rash ~ % bak old sik,2ustar ustar,2wais-source src,3ingz wz,2x509-ca-cert crt der cer,3cf xcf,3fig fig,3liff! xlf,3pinstall xpi,3z xz,2zmachine z1 z2 z3 z4 z5 z6 z7 z8,1aml!,1cap-diff! xdf,1enc!,1html! xhtml xht,1ml xml xsl xsd xpdl,3-dtd dtd,1op!,1proc! xpl,1slt!,2pf!,1v! mxml xhvml xvml xvm,0yaml yaml yml,2ng,1in!,1nd.ms-pkipko pko,0zip;audio:0aac,1dpcm adp,1iff aiff aif aff,1mr,3-wb awb,1nnodex axa,0basic au snd,0flac,0midi mid midi kar rmi,1p4 mp4a,2eg mpga mpega mp3 m4a mp2a m2a m3a,4url m3u,0ogg oga ogg spx,1pus,0prs.sid sid,0s3m,1ilk sil,0vnd.dece.audio uva uvva,5igital-winds eol,5ra dra,5ts dts,7.hd dtshd,4lucent.voice lvp,4ms-playready.media.pya pya,4nuera.ecelp4800 ecelp4800,f7470 ecelp7470,f9600 ecelp9600,4rip rip,0wav,1ebm weba,0x-aiff aifc,2caf caf,2gsm gsm,2matroska mka,3s-wax wax,6ma wma,2pn-realaudio ram,e-plugin rmp,2realaudio ra,2sd2 sd2,1m;chemical:0x-alchemy alc,2cache cac cache,7-csf csf,5tvs-binary cbin cascii ctab,3dx cdx,3hem3d c3d,3if cif,3mdf cmdf,4l cml,3ompass cpa,3rossfire bsd,3sml csml csm,3tx ctx,3xf cxf cef,2embl-dl-nucleotide emb embl,2gamess-input inp gam gamin,4ussian-checkpoint fch fchk,cube cub,binput gau gjc gjf,blog gal,3cg8-sequence gcg,3enbank gen,2hin hin,2isostar istr ist,2jcamp-dx jdx dx,2kinemage kin,2macmolecule mcm,5romodel-input mmod,3dl-molfile mol,6rdfile rd,7xnfile rxn,6sdfile sd,6tgf tgf,3mcif mcif,3ol2 mol2,5conn-Z b,4pac-graph gpt,8input mop mopcrt zmt,8out moo,2ncbi-asn1 asn,b-ascii prt ent,cbinary val,2rosdal ros,2swissprot sw,2vamas-iso14976 vms,3md vmd,2xtel xtel,3yz xyz;font:0otf,0woff,42;image:0avif avif avifs,0bmp,0cgm,1is-cod cod,0g3fax g3,1if,0heic heif heic,0ief,0jpeg jpeg jpg jpe jfif jfif-tbnl jif,0ktx,0pcx,1jpeg pjpg,1ng,1rs.btif btif,0sgi,1vg! svg svgz,0tiff tiff tif,0vnd.adobe.photoshop psd,4dece.graphic uvi uvvi uvg uvvg,5jvu djvu djv,5wg dwg,5xf dxf,4fastbidsheet fbs,5px fpx,5st fst,5ujixerox.edmics-mmr mmr,lrlc rlc,4ms-modi mdi,7photo wdp,4net-fpx npx,4wap.wbmp wbmp,4xiff xif,0webp,0x-3ds 3ds,2adobe-dng dng,2canon-cr2 cr2,aw crw,3mu-raster ras,4x cmx,3oreldraw cdr,bpattern pat,btemplate cdt,7photopaint cpt,2epson-erf erf,2freehand fh fhc fh4 fh5 fh7,3uji-raf raf,2icns icns,4on ico,2jg art,3ng jng,2kodak-dcr dcr,8k25 k25,9dc kdc,2minolta-mrw mrw,2nikon-nef nef,2olympus-orf orf,2panasonic-raw raw rw2 rwl,3entax-pef pef ptx,3ict pic pct,3ortable-anymap pnm,bbitmap pbm,bgraymap pgm,bpixmap ppm,2rgb rgb,2sigma-x3f x3f,3ony-arw arw,7sr2 sr2,9f srf,2tga tga,2xbitmap xbm,3pixmap xpm,3windowdump xwd;message:0rfc822 eml mime mht mhtml nws;model:0iges igs iges,0mesh msh mesh silo,0vnd.collada! dae,4dwf dwf,4gdl gdl,5tw gtw,4mts mts,4usdz+zip usdz,4vtu vtu,1rml wrl vrml,0x3d+binary x3db x3dbz,4vrml x3dv x3dvz,3! x3dz;text:0cache-manifest manifest appcache,2lendar ics icz ifb,1ss,2v,0h323 323,1tml html htm shtml stm,0iuls uls,0javascript js,1son,0markdown md markdown mdown markdn,0n3,0plain txt text brf conf def list log in bas diff ksh,1rs.lines.tag dsc,0richtext rtx,0scriptlet sct wsc,1gml sgml sgm,0tab-separated-values tsv,1exmacs tm,1roff t tr roff man me ms,1urtle ttl,0uri-list uri uris urls,0vcard,1nd.curl curl,8.dcurl dcurl,9mcurl mcurl,9scurl scurl,4dvb.subtitle sub,4fly fly,5mi.flexstor flx,4graphviz gv,4in3d.3dml 3dml,9spot spot,4sun.j2me.app-descriptor jad,4wap.si si,9l sl,8wml wml,bscript wmls,0webviewhtml htt,0x-asm s asm,2bibtex bib,3oo boo,2c c h dic,3++hdr h++ hpp hxx hh,5src c++ cpp cxx cc,3omponent htc,2diff patch,3src d,2fortran f for f77 f90,2haskell hs,2java java,2literate-haskell lhs,2moc moc,2nfo nfo,2opml opml,2pascal p pas pp inc,3cs-gcd gcd,3ython py,2scala scala,3etext etx,3fv sfv,2tcl tcl tk,3ex tex ltx sty cls,2uuencode uu,2vcalendar vcs,5rd vcf;video:03gpp 3gp,42 3g2,0annodex axv,0dl,1v dif dv,0fli,0gl,0h261,33,34,0jpeg jpgv,2m jpm jpgm,0mj2 mj2 mjp2,1p2t ts,24 mp4 mp4v mpg4,2eg mpeg mpg mpe m1v m2v mp2 mpa mpv2,0ogg ogv,0quicktime qt mov,0vnd.dece.hd uvh uvvh,9mobile uvm uvvm,9pd uvp uvvp,9sd uvs uvvs,9video uvv uvvv,5vb.file dvb,4fvt fvt,4mpegurl mxu m4u,5s-playready.media.pyv pyv,4uvvu.mp4 uvu uvvu,4vivo viv,0webm,0x-f4v f4v,3lv flv,2la-asf lsf lsx,2m4v m4v,3atroska mpv mkv mk3d mks,3ng mng,3s-asf asf asx asr,5vob vob,5wm wm,7v wmv,7x wmx,6vx wvx,4video avi,2sgi-movie movie,3mv smv;x-conference:0x-cooltalk ice;x-world:0x-vrml vrm flr wrz xaf xof";
9392
+
9297
9393
  /*
9298
9394
  Copyright (c) 2022 Gildas Lormeau. All rights reserved.
9299
9395
 
@@ -9323,1589 +9419,6 @@ function addChild(parent, name, params, directory) {
9323
9419
  */
9324
9420
 
9325
9421
 
9326
- const table = {
9327
- "application": {
9328
- "andrew-inset": "ez",
9329
- "annodex": "anx",
9330
- "atom+xml": "atom",
9331
- "atomcat+xml": "atomcat",
9332
- "atomserv+xml": "atomsrv",
9333
- "bbolin": "lin",
9334
- "cu-seeme": "cu",
9335
- "davmount+xml": "davmount",
9336
- "dsptype": "tsp",
9337
- "ecmascript": [
9338
- "es",
9339
- "ecma"
9340
- ],
9341
- "futuresplash": "spl",
9342
- "hta": "hta",
9343
- "java-archive": "jar",
9344
- "java-serialized-object": "ser",
9345
- "java-vm": "class",
9346
- "m3g": "m3g",
9347
- "mac-binhex40": "hqx",
9348
- "mathematica": [
9349
- "nb",
9350
- "ma",
9351
- "mb"
9352
- ],
9353
- "msaccess": "mdb",
9354
- "msword": [
9355
- "doc",
9356
- "dot",
9357
- "wiz"
9358
- ],
9359
- "mxf": "mxf",
9360
- "oda": "oda",
9361
- "ogg": "ogx",
9362
- "pdf": "pdf",
9363
- "pgp-keys": "key",
9364
- "pgp-signature": [
9365
- "asc",
9366
- "sig"
9367
- ],
9368
- "pics-rules": "prf",
9369
- "postscript": [
9370
- "ps",
9371
- "ai",
9372
- "eps",
9373
- "epsi",
9374
- "epsf",
9375
- "eps2",
9376
- "eps3"
9377
- ],
9378
- "rar": "rar",
9379
- "rdf+xml": "rdf",
9380
- "rss+xml": "rss",
9381
- "rtf": "rtf",
9382
- "xhtml+xml": [
9383
- "xhtml",
9384
- "xht"
9385
- ],
9386
- "xml": [
9387
- "xml",
9388
- "xsl",
9389
- "xsd",
9390
- "xpdl"
9391
- ],
9392
- "xspf+xml": "xspf",
9393
- "zip": "zip",
9394
- "vnd.android.package-archive": "apk",
9395
- "vnd.cinderella": "cdy",
9396
- "vnd.google-earth.kml+xml": "kml",
9397
- "vnd.google-earth.kmz": "kmz",
9398
- "vnd.mozilla.xul+xml": "xul",
9399
- "vnd.ms-excel": [
9400
- "xls",
9401
- "xlb",
9402
- "xlt",
9403
- "xlm",
9404
- "xla",
9405
- "xlc",
9406
- "xlw"
9407
- ],
9408
- "vnd.ms-pki.seccat": "cat",
9409
- "vnd.ms-pki.stl": "stl",
9410
- "vnd.ms-powerpoint": [
9411
- "ppt",
9412
- "pps",
9413
- "pot",
9414
- "ppa",
9415
- "pwz"
9416
- ],
9417
- "vnd.oasis.opendocument.chart": "odc",
9418
- "vnd.oasis.opendocument.database": "odb",
9419
- "vnd.oasis.opendocument.formula": "odf",
9420
- "vnd.oasis.opendocument.graphics": "odg",
9421
- "vnd.oasis.opendocument.graphics-template": "otg",
9422
- "vnd.oasis.opendocument.image": "odi",
9423
- "vnd.oasis.opendocument.presentation": "odp",
9424
- "vnd.oasis.opendocument.presentation-template": "otp",
9425
- "vnd.oasis.opendocument.spreadsheet": "ods",
9426
- "vnd.oasis.opendocument.spreadsheet-template": "ots",
9427
- "vnd.oasis.opendocument.text": "odt",
9428
- "vnd.oasis.opendocument.text-master": [
9429
- "odm",
9430
- "otm"
9431
- ],
9432
- "vnd.oasis.opendocument.text-template": "ott",
9433
- "vnd.oasis.opendocument.text-web": "oth",
9434
- "vnd.openxmlformats-officedocument.spreadsheetml.sheet": "xlsx",
9435
- "vnd.openxmlformats-officedocument.spreadsheetml.template": "xltx",
9436
- "vnd.openxmlformats-officedocument.presentationml.presentation": "pptx",
9437
- "vnd.openxmlformats-officedocument.presentationml.slideshow": "ppsx",
9438
- "vnd.openxmlformats-officedocument.presentationml.template": "potx",
9439
- "vnd.openxmlformats-officedocument.wordprocessingml.document": "docx",
9440
- "vnd.openxmlformats-officedocument.wordprocessingml.template": "dotx",
9441
- "vnd.smaf": "mmf",
9442
- "vnd.stardivision.calc": "sdc",
9443
- "vnd.stardivision.chart": "sds",
9444
- "vnd.stardivision.draw": "sda",
9445
- "vnd.stardivision.impress": "sdd",
9446
- "vnd.stardivision.math": [
9447
- "sdf",
9448
- "smf"
9449
- ],
9450
- "vnd.stardivision.writer": [
9451
- "sdw",
9452
- "vor"
9453
- ],
9454
- "vnd.stardivision.writer-global": "sgl",
9455
- "vnd.sun.xml.calc": "sxc",
9456
- "vnd.sun.xml.calc.template": "stc",
9457
- "vnd.sun.xml.draw": "sxd",
9458
- "vnd.sun.xml.draw.template": "std",
9459
- "vnd.sun.xml.impress": "sxi",
9460
- "vnd.sun.xml.impress.template": "sti",
9461
- "vnd.sun.xml.math": "sxm",
9462
- "vnd.sun.xml.writer": "sxw",
9463
- "vnd.sun.xml.writer.global": "sxg",
9464
- "vnd.sun.xml.writer.template": "stw",
9465
- "vnd.symbian.install": [
9466
- "sis",
9467
- "sisx"
9468
- ],
9469
- "vnd.visio": [
9470
- "vsd",
9471
- "vst",
9472
- "vss",
9473
- "vsw",
9474
- "vsdx",
9475
- "vssx",
9476
- "vstx",
9477
- "vssm",
9478
- "vstm"
9479
- ],
9480
- "vnd.wap.wbxml": "wbxml",
9481
- "vnd.wap.wmlc": "wmlc",
9482
- "vnd.wap.wmlscriptc": "wmlsc",
9483
- "vnd.wordperfect": "wpd",
9484
- "vnd.wordperfect5.1": "wp5",
9485
- "x-123": "wk",
9486
- "x-7z-compressed": "7z",
9487
- "x-abiword": "abw",
9488
- "x-apple-diskimage": "dmg",
9489
- "x-bcpio": "bcpio",
9490
- "x-bittorrent": "torrent",
9491
- "x-cbr": [
9492
- "cbr",
9493
- "cba",
9494
- "cbt",
9495
- "cb7"
9496
- ],
9497
- "x-cbz": "cbz",
9498
- "x-cdf": [
9499
- "cdf",
9500
- "cda"
9501
- ],
9502
- "x-cdlink": "vcd",
9503
- "x-chess-pgn": "pgn",
9504
- "x-cpio": "cpio",
9505
- "x-csh": "csh",
9506
- "x-director": [
9507
- "dir",
9508
- "dxr",
9509
- "cst",
9510
- "cct",
9511
- "cxt",
9512
- "w3d",
9513
- "fgd",
9514
- "swa"
9515
- ],
9516
- "x-dms": "dms",
9517
- "x-doom": "wad",
9518
- "x-dvi": "dvi",
9519
- "x-httpd-eruby": "rhtml",
9520
- "x-freemind": "mm",
9521
- "x-gnumeric": "gnumeric",
9522
- "x-go-sgf": "sgf",
9523
- "x-graphing-calculator": "gcf",
9524
- "x-gtar": [
9525
- "gtar",
9526
- "taz"
9527
- ],
9528
- "x-hdf": "hdf",
9529
- "x-httpd-php": [
9530
- "phtml",
9531
- "pht",
9532
- "php"
9533
- ],
9534
- "x-httpd-php-source": "phps",
9535
- "x-httpd-php3": "php3",
9536
- "x-httpd-php3-preprocessed": "php3p",
9537
- "x-httpd-php4": "php4",
9538
- "x-httpd-php5": "php5",
9539
- "x-ica": "ica",
9540
- "x-info": "info",
9541
- "x-internet-signup": [
9542
- "ins",
9543
- "isp"
9544
- ],
9545
- "x-iphone": "iii",
9546
- "x-iso9660-image": "iso",
9547
- "x-java-jnlp-file": "jnlp",
9548
- "x-jmol": "jmz",
9549
- "x-killustrator": "kil",
9550
- "x-latex": "latex",
9551
- "x-lyx": "lyx",
9552
- "x-lzx": "lzx",
9553
- "x-maker": [
9554
- "frm",
9555
- "fb",
9556
- "fbdoc"
9557
- ],
9558
- "x-ms-wmd": "wmd",
9559
- "x-msdos-program": [
9560
- "com",
9561
- "exe",
9562
- "bat",
9563
- "dll"
9564
- ],
9565
- "x-netcdf": [
9566
- "nc"
9567
- ],
9568
- "x-ns-proxy-autoconfig": [
9569
- "pac",
9570
- "dat"
9571
- ],
9572
- "x-nwc": "nwc",
9573
- "x-object": "o",
9574
- "x-oz-application": "oza",
9575
- "x-pkcs7-certreqresp": "p7r",
9576
- "x-python-code": [
9577
- "pyc",
9578
- "pyo"
9579
- ],
9580
- "x-qgis": [
9581
- "qgs",
9582
- "shp",
9583
- "shx"
9584
- ],
9585
- "x-quicktimeplayer": "qtl",
9586
- "x-redhat-package-manager": [
9587
- "rpm",
9588
- "rpa"
9589
- ],
9590
- "x-ruby": "rb",
9591
- "x-sh": "sh",
9592
- "x-shar": "shar",
9593
- "x-shockwave-flash": [
9594
- "swf",
9595
- "swfl"
9596
- ],
9597
- "x-silverlight": "scr",
9598
- "x-stuffit": "sit",
9599
- "x-sv4cpio": "sv4cpio",
9600
- "x-sv4crc": "sv4crc",
9601
- "x-tar": "tar",
9602
- "x-tex-gf": "gf",
9603
- "x-tex-pk": "pk",
9604
- "x-texinfo": [
9605
- "texinfo",
9606
- "texi"
9607
- ],
9608
- "x-trash": [
9609
- "~",
9610
- "%",
9611
- "bak",
9612
- "old",
9613
- "sik"
9614
- ],
9615
- "x-ustar": "ustar",
9616
- "x-wais-source": "src",
9617
- "x-wingz": "wz",
9618
- "x-x509-ca-cert": [
9619
- "crt",
9620
- "der",
9621
- "cer"
9622
- ],
9623
- "x-xcf": "xcf",
9624
- "x-xfig": "fig",
9625
- "x-xpinstall": "xpi",
9626
- "applixware": "aw",
9627
- "atomsvc+xml": "atomsvc",
9628
- "ccxml+xml": "ccxml",
9629
- "cdmi-capability": "cdmia",
9630
- "cdmi-container": "cdmic",
9631
- "cdmi-domain": "cdmid",
9632
- "cdmi-object": "cdmio",
9633
- "cdmi-queue": "cdmiq",
9634
- "docbook+xml": "dbk",
9635
- "dssc+der": "dssc",
9636
- "dssc+xml": "xdssc",
9637
- "emma+xml": "emma",
9638
- "epub+zip": "epub",
9639
- "exi": "exi",
9640
- "font-tdpfr": "pfr",
9641
- "gml+xml": "gml",
9642
- "gpx+xml": "gpx",
9643
- "gxf": "gxf",
9644
- "hyperstudio": "stk",
9645
- "inkml+xml": [
9646
- "ink",
9647
- "inkml"
9648
- ],
9649
- "ipfix": "ipfix",
9650
- "jsonml+json": "jsonml",
9651
- "lost+xml": "lostxml",
9652
- "mads+xml": "mads",
9653
- "marc": "mrc",
9654
- "marcxml+xml": "mrcx",
9655
- "mathml+xml": [
9656
- "mathml",
9657
- "mml"
9658
- ],
9659
- "mbox": "mbox",
9660
- "mediaservercontrol+xml": "mscml",
9661
- "metalink+xml": "metalink",
9662
- "metalink4+xml": "meta4",
9663
- "mets+xml": "mets",
9664
- "mods+xml": "mods",
9665
- "mp21": [
9666
- "m21",
9667
- "mp21"
9668
- ],
9669
- "mp4": "mp4s",
9670
- "oebps-package+xml": "opf",
9671
- "omdoc+xml": "omdoc",
9672
- "onenote": [
9673
- "onetoc",
9674
- "onetoc2",
9675
- "onetmp",
9676
- "onepkg"
9677
- ],
9678
- "oxps": "oxps",
9679
- "patch-ops-error+xml": "xer",
9680
- "pgp-encrypted": "pgp",
9681
- "pkcs10": "p10",
9682
- "pkcs7-mime": [
9683
- "p7m",
9684
- "p7c"
9685
- ],
9686
- "pkcs7-signature": "p7s",
9687
- "pkcs8": "p8",
9688
- "pkix-attr-cert": "ac",
9689
- "pkix-crl": "crl",
9690
- "pkix-pkipath": "pkipath",
9691
- "pkixcmp": "pki",
9692
- "pls+xml": "pls",
9693
- "prs.cww": "cww",
9694
- "pskc+xml": "pskcxml",
9695
- "reginfo+xml": "rif",
9696
- "relax-ng-compact-syntax": "rnc",
9697
- "resource-lists+xml": "rl",
9698
- "resource-lists-diff+xml": "rld",
9699
- "rls-services+xml": "rs",
9700
- "rpki-ghostbusters": "gbr",
9701
- "rpki-manifest": "mft",
9702
- "rpki-roa": "roa",
9703
- "rsd+xml": "rsd",
9704
- "sbml+xml": "sbml",
9705
- "scvp-cv-request": "scq",
9706
- "scvp-cv-response": "scs",
9707
- "scvp-vp-request": "spq",
9708
- "scvp-vp-response": "spp",
9709
- "sdp": "sdp",
9710
- "set-payment-initiation": "setpay",
9711
- "set-registration-initiation": "setreg",
9712
- "shf+xml": "shf",
9713
- "sparql-query": "rq",
9714
- "sparql-results+xml": "srx",
9715
- "srgs": "gram",
9716
- "srgs+xml": "grxml",
9717
- "sru+xml": "sru",
9718
- "ssdl+xml": "ssdl",
9719
- "ssml+xml": "ssml",
9720
- "tei+xml": [
9721
- "tei",
9722
- "teicorpus"
9723
- ],
9724
- "thraud+xml": "tfi",
9725
- "timestamped-data": "tsd",
9726
- "vnd.3gpp.pic-bw-large": "plb",
9727
- "vnd.3gpp.pic-bw-small": "psb",
9728
- "vnd.3gpp.pic-bw-var": "pvb",
9729
- "vnd.3gpp2.tcap": "tcap",
9730
- "vnd.3m.post-it-notes": "pwn",
9731
- "vnd.accpac.simply.aso": "aso",
9732
- "vnd.accpac.simply.imp": "imp",
9733
- "vnd.acucobol": "acu",
9734
- "vnd.acucorp": [
9735
- "atc",
9736
- "acutc"
9737
- ],
9738
- "vnd.adobe.air-application-installer-package+zip": "air",
9739
- "vnd.adobe.formscentral.fcdt": "fcdt",
9740
- "vnd.adobe.fxp": [
9741
- "fxp",
9742
- "fxpl"
9743
- ],
9744
- "vnd.adobe.xdp+xml": "xdp",
9745
- "vnd.adobe.xfdf": "xfdf",
9746
- "vnd.ahead.space": "ahead",
9747
- "vnd.airzip.filesecure.azf": "azf",
9748
- "vnd.airzip.filesecure.azs": "azs",
9749
- "vnd.amazon.ebook": "azw",
9750
- "vnd.americandynamics.acc": "acc",
9751
- "vnd.amiga.ami": "ami",
9752
- "vnd.anser-web-certificate-issue-initiation": "cii",
9753
- "vnd.anser-web-funds-transfer-initiation": "fti",
9754
- "vnd.antix.game-component": "atx",
9755
- "vnd.apple.installer+xml": "mpkg",
9756
- "vnd.apple.mpegurl": "m3u8",
9757
- "vnd.aristanetworks.swi": "swi",
9758
- "vnd.astraea-software.iota": "iota",
9759
- "vnd.audiograph": "aep",
9760
- "vnd.blueice.multipass": "mpm",
9761
- "vnd.bmi": "bmi",
9762
- "vnd.businessobjects": "rep",
9763
- "vnd.chemdraw+xml": "cdxml",
9764
- "vnd.chipnuts.karaoke-mmd": "mmd",
9765
- "vnd.claymore": "cla",
9766
- "vnd.cloanto.rp9": "rp9",
9767
- "vnd.clonk.c4group": [
9768
- "c4g",
9769
- "c4d",
9770
- "c4f",
9771
- "c4p",
9772
- "c4u"
9773
- ],
9774
- "vnd.cluetrust.cartomobile-config": "c11amc",
9775
- "vnd.cluetrust.cartomobile-config-pkg": "c11amz",
9776
- "vnd.commonspace": "csp",
9777
- "vnd.contact.cmsg": "cdbcmsg",
9778
- "vnd.cosmocaller": "cmc",
9779
- "vnd.crick.clicker": "clkx",
9780
- "vnd.crick.clicker.keyboard": "clkk",
9781
- "vnd.crick.clicker.palette": "clkp",
9782
- "vnd.crick.clicker.template": "clkt",
9783
- "vnd.crick.clicker.wordbank": "clkw",
9784
- "vnd.criticaltools.wbs+xml": "wbs",
9785
- "vnd.ctc-posml": "pml",
9786
- "vnd.cups-ppd": "ppd",
9787
- "vnd.curl.car": "car",
9788
- "vnd.curl.pcurl": "pcurl",
9789
- "vnd.dart": "dart",
9790
- "vnd.data-vision.rdz": "rdz",
9791
- "vnd.dece.data": [
9792
- "uvf",
9793
- "uvvf",
9794
- "uvd",
9795
- "uvvd"
9796
- ],
9797
- "vnd.dece.ttml+xml": [
9798
- "uvt",
9799
- "uvvt"
9800
- ],
9801
- "vnd.dece.unspecified": [
9802
- "uvx",
9803
- "uvvx"
9804
- ],
9805
- "vnd.dece.zip": [
9806
- "uvz",
9807
- "uvvz"
9808
- ],
9809
- "vnd.denovo.fcselayout-link": "fe_launch",
9810
- "vnd.dna": "dna",
9811
- "vnd.dolby.mlp": "mlp",
9812
- "vnd.dpgraph": "dpg",
9813
- "vnd.dreamfactory": "dfac",
9814
- "vnd.ds-keypoint": "kpxx",
9815
- "vnd.dvb.ait": "ait",
9816
- "vnd.dvb.service": "svc",
9817
- "vnd.dynageo": "geo",
9818
- "vnd.ecowin.chart": "mag",
9819
- "vnd.enliven": "nml",
9820
- "vnd.epson.esf": "esf",
9821
- "vnd.epson.msf": "msf",
9822
- "vnd.epson.quickanime": "qam",
9823
- "vnd.epson.salt": "slt",
9824
- "vnd.epson.ssf": "ssf",
9825
- "vnd.eszigno3+xml": [
9826
- "es3",
9827
- "et3"
9828
- ],
9829
- "vnd.ezpix-album": "ez2",
9830
- "vnd.ezpix-package": "ez3",
9831
- "vnd.fdf": "fdf",
9832
- "vnd.fdsn.mseed": "mseed",
9833
- "vnd.fdsn.seed": [
9834
- "seed",
9835
- "dataless"
9836
- ],
9837
- "vnd.flographit": "gph",
9838
- "vnd.fluxtime.clip": "ftc",
9839
- "vnd.framemaker": [
9840
- "fm",
9841
- "frame",
9842
- "maker",
9843
- "book"
9844
- ],
9845
- "vnd.frogans.fnc": "fnc",
9846
- "vnd.frogans.ltf": "ltf",
9847
- "vnd.fsc.weblaunch": "fsc",
9848
- "vnd.fujitsu.oasys": "oas",
9849
- "vnd.fujitsu.oasys2": "oa2",
9850
- "vnd.fujitsu.oasys3": "oa3",
9851
- "vnd.fujitsu.oasysgp": "fg5",
9852
- "vnd.fujitsu.oasysprs": "bh2",
9853
- "vnd.fujixerox.ddd": "ddd",
9854
- "vnd.fujixerox.docuworks": "xdw",
9855
- "vnd.fujixerox.docuworks.binder": "xbd",
9856
- "vnd.fuzzysheet": "fzs",
9857
- "vnd.genomatix.tuxedo": "txd",
9858
- "vnd.geogebra.file": "ggb",
9859
- "vnd.geogebra.tool": "ggt",
9860
- "vnd.geometry-explorer": [
9861
- "gex",
9862
- "gre"
9863
- ],
9864
- "vnd.geonext": "gxt",
9865
- "vnd.geoplan": "g2w",
9866
- "vnd.geospace": "g3w",
9867
- "vnd.gmx": "gmx",
9868
- "vnd.grafeq": [
9869
- "gqf",
9870
- "gqs"
9871
- ],
9872
- "vnd.groove-account": "gac",
9873
- "vnd.groove-help": "ghf",
9874
- "vnd.groove-identity-message": "gim",
9875
- "vnd.groove-injector": "grv",
9876
- "vnd.groove-tool-message": "gtm",
9877
- "vnd.groove-tool-template": "tpl",
9878
- "vnd.groove-vcard": "vcg",
9879
- "vnd.hal+xml": "hal",
9880
- "vnd.handheld-entertainment+xml": "zmm",
9881
- "vnd.hbci": "hbci",
9882
- "vnd.hhe.lesson-player": "les",
9883
- "vnd.hp-hpgl": "hpgl",
9884
- "vnd.hp-hpid": "hpid",
9885
- "vnd.hp-hps": "hps",
9886
- "vnd.hp-jlyt": "jlt",
9887
- "vnd.hp-pcl": "pcl",
9888
- "vnd.hp-pclxl": "pclxl",
9889
- "vnd.hydrostatix.sof-data": "sfd-hdstx",
9890
- "vnd.ibm.minipay": "mpy",
9891
- "vnd.ibm.modcap": [
9892
- "afp",
9893
- "listafp",
9894
- "list3820"
9895
- ],
9896
- "vnd.ibm.rights-management": "irm",
9897
- "vnd.ibm.secure-container": "sc",
9898
- "vnd.iccprofile": [
9899
- "icc",
9900
- "icm"
9901
- ],
9902
- "vnd.igloader": "igl",
9903
- "vnd.immervision-ivp": "ivp",
9904
- "vnd.immervision-ivu": "ivu",
9905
- "vnd.insors.igm": "igm",
9906
- "vnd.intercon.formnet": [
9907
- "xpw",
9908
- "xpx"
9909
- ],
9910
- "vnd.intergeo": "i2g",
9911
- "vnd.intu.qbo": "qbo",
9912
- "vnd.intu.qfx": "qfx",
9913
- "vnd.ipunplugged.rcprofile": "rcprofile",
9914
- "vnd.irepository.package+xml": "irp",
9915
- "vnd.is-xpr": "xpr",
9916
- "vnd.isac.fcs": "fcs",
9917
- "vnd.jam": "jam",
9918
- "vnd.jcp.javame.midlet-rms": "rms",
9919
- "vnd.jisp": "jisp",
9920
- "vnd.joost.joda-archive": "joda",
9921
- "vnd.kahootz": [
9922
- "ktz",
9923
- "ktr"
9924
- ],
9925
- "vnd.kde.karbon": "karbon",
9926
- "vnd.kde.kchart": "chrt",
9927
- "vnd.kde.kformula": "kfo",
9928
- "vnd.kde.kivio": "flw",
9929
- "vnd.kde.kontour": "kon",
9930
- "vnd.kde.kpresenter": [
9931
- "kpr",
9932
- "kpt"
9933
- ],
9934
- "vnd.kde.kspread": "ksp",
9935
- "vnd.kde.kword": [
9936
- "kwd",
9937
- "kwt"
9938
- ],
9939
- "vnd.kenameaapp": "htke",
9940
- "vnd.kidspiration": "kia",
9941
- "vnd.kinar": [
9942
- "kne",
9943
- "knp"
9944
- ],
9945
- "vnd.koan": [
9946
- "skp",
9947
- "skd",
9948
- "skt",
9949
- "skm"
9950
- ],
9951
- "vnd.kodak-descriptor": "sse",
9952
- "vnd.las.las+xml": "lasxml",
9953
- "vnd.llamagraphics.life-balance.desktop": "lbd",
9954
- "vnd.llamagraphics.life-balance.exchange+xml": "lbe",
9955
- "vnd.lotus-1-2-3": "123",
9956
- "vnd.lotus-approach": "apr",
9957
- "vnd.lotus-freelance": "pre",
9958
- "vnd.lotus-notes": "nsf",
9959
- "vnd.lotus-organizer": "org",
9960
- "vnd.lotus-screencam": "scm",
9961
- "vnd.lotus-wordpro": "lwp",
9962
- "vnd.macports.portpkg": "portpkg",
9963
- "vnd.mcd": "mcd",
9964
- "vnd.medcalcdata": "mc1",
9965
- "vnd.mediastation.cdkey": "cdkey",
9966
- "vnd.mfer": "mwf",
9967
- "vnd.mfmp": "mfm",
9968
- "vnd.micrografx.flo": "flo",
9969
- "vnd.micrografx.igx": "igx",
9970
- "vnd.mif": "mif",
9971
- "vnd.mobius.daf": "daf",
9972
- "vnd.mobius.dis": "dis",
9973
- "vnd.mobius.mbk": "mbk",
9974
- "vnd.mobius.mqy": "mqy",
9975
- "vnd.mobius.msl": "msl",
9976
- "vnd.mobius.plc": "plc",
9977
- "vnd.mobius.txf": "txf",
9978
- "vnd.mophun.application": "mpn",
9979
- "vnd.mophun.certificate": "mpc",
9980
- "vnd.ms-artgalry": "cil",
9981
- "vnd.ms-cab-compressed": "cab",
9982
- "vnd.ms-excel.addin.macroenabled.12": "xlam",
9983
- "vnd.ms-excel.sheet.binary.macroenabled.12": "xlsb",
9984
- "vnd.ms-excel.sheet.macroenabled.12": "xlsm",
9985
- "vnd.ms-excel.template.macroenabled.12": "xltm",
9986
- "vnd.ms-fontobject": "eot",
9987
- "vnd.ms-htmlhelp": "chm",
9988
- "vnd.ms-ims": "ims",
9989
- "vnd.ms-lrm": "lrm",
9990
- "vnd.ms-officetheme": "thmx",
9991
- "vnd.ms-powerpoint.addin.macroenabled.12": "ppam",
9992
- "vnd.ms-powerpoint.presentation.macroenabled.12": "pptm",
9993
- "vnd.ms-powerpoint.slide.macroenabled.12": "sldm",
9994
- "vnd.ms-powerpoint.slideshow.macroenabled.12": "ppsm",
9995
- "vnd.ms-powerpoint.template.macroenabled.12": "potm",
9996
- "vnd.ms-project": [
9997
- "mpp",
9998
- "mpt"
9999
- ],
10000
- "vnd.ms-word.document.macroenabled.12": "docm",
10001
- "vnd.ms-word.template.macroenabled.12": "dotm",
10002
- "vnd.ms-works": [
10003
- "wps",
10004
- "wks",
10005
- "wcm",
10006
- "wdb"
10007
- ],
10008
- "vnd.ms-wpl": "wpl",
10009
- "vnd.ms-xpsdocument": "xps",
10010
- "vnd.mseq": "mseq",
10011
- "vnd.musician": "mus",
10012
- "vnd.muvee.style": "msty",
10013
- "vnd.mynfc": "taglet",
10014
- "vnd.neurolanguage.nlu": "nlu",
10015
- "vnd.nitf": [
10016
- "ntf",
10017
- "nitf"
10018
- ],
10019
- "vnd.noblenet-directory": "nnd",
10020
- "vnd.noblenet-sealer": "nns",
10021
- "vnd.noblenet-web": "nnw",
10022
- "vnd.nokia.n-gage.data": "ngdat",
10023
- "vnd.nokia.n-gage.symbian.install": "n-gage",
10024
- "vnd.nokia.radio-preset": "rpst",
10025
- "vnd.nokia.radio-presets": "rpss",
10026
- "vnd.novadigm.edm": "edm",
10027
- "vnd.novadigm.edx": "edx",
10028
- "vnd.novadigm.ext": "ext",
10029
- "vnd.oasis.opendocument.chart-template": "otc",
10030
- "vnd.oasis.opendocument.formula-template": "odft",
10031
- "vnd.oasis.opendocument.image-template": "oti",
10032
- "vnd.olpc-sugar": "xo",
10033
- "vnd.oma.dd2+xml": "dd2",
10034
- "vnd.openofficeorg.extension": "oxt",
10035
- "vnd.openxmlformats-officedocument.presentationml.slide": "sldx",
10036
- "vnd.osgeo.mapguide.package": "mgp",
10037
- "vnd.osgi.dp": "dp",
10038
- "vnd.osgi.subsystem": "esa",
10039
- "vnd.palm": [
10040
- "pdb",
10041
- "pqa",
10042
- "oprc"
10043
- ],
10044
- "vnd.pawaafile": "paw",
10045
- "vnd.pg.format": "str",
10046
- "vnd.pg.osasli": "ei6",
10047
- "vnd.picsel": "efif",
10048
- "vnd.pmi.widget": "wg",
10049
- "vnd.pocketlearn": "plf",
10050
- "vnd.powerbuilder6": "pbd",
10051
- "vnd.previewsystems.box": "box",
10052
- "vnd.proteus.magazine": "mgz",
10053
- "vnd.publishare-delta-tree": "qps",
10054
- "vnd.pvi.ptid1": "ptid",
10055
- "vnd.quark.quarkxpress": [
10056
- "qxd",
10057
- "qxt",
10058
- "qwd",
10059
- "qwt",
10060
- "qxl",
10061
- "qxb"
10062
- ],
10063
- "vnd.realvnc.bed": "bed",
10064
- "vnd.recordare.musicxml": "mxl",
10065
- "vnd.recordare.musicxml+xml": "musicxml",
10066
- "vnd.rig.cryptonote": "cryptonote",
10067
- "vnd.rn-realmedia": "rm",
10068
- "vnd.rn-realmedia-vbr": "rmvb",
10069
- "vnd.route66.link66+xml": "link66",
10070
- "vnd.sailingtracker.track": "st",
10071
- "vnd.seemail": "see",
10072
- "vnd.sema": "sema",
10073
- "vnd.semd": "semd",
10074
- "vnd.semf": "semf",
10075
- "vnd.shana.informed.formdata": "ifm",
10076
- "vnd.shana.informed.formtemplate": "itp",
10077
- "vnd.shana.informed.interchange": "iif",
10078
- "vnd.shana.informed.package": "ipk",
10079
- "vnd.simtech-mindmapper": [
10080
- "twd",
10081
- "twds"
10082
- ],
10083
- "vnd.smart.teacher": "teacher",
10084
- "vnd.solent.sdkm+xml": [
10085
- "sdkm",
10086
- "sdkd"
10087
- ],
10088
- "vnd.spotfire.dxp": "dxp",
10089
- "vnd.spotfire.sfs": "sfs",
10090
- "vnd.stepmania.package": "smzip",
10091
- "vnd.stepmania.stepchart": "sm",
10092
- "vnd.sus-calendar": [
10093
- "sus",
10094
- "susp"
10095
- ],
10096
- "vnd.svd": "svd",
10097
- "vnd.syncml+xml": "xsm",
10098
- "vnd.syncml.dm+wbxml": "bdm",
10099
- "vnd.syncml.dm+xml": "xdm",
10100
- "vnd.tao.intent-module-archive": "tao",
10101
- "vnd.tcpdump.pcap": [
10102
- "pcap",
10103
- "cap",
10104
- "dmp"
10105
- ],
10106
- "vnd.tmobile-livetv": "tmo",
10107
- "vnd.trid.tpt": "tpt",
10108
- "vnd.triscape.mxs": "mxs",
10109
- "vnd.trueapp": "tra",
10110
- "vnd.ufdl": [
10111
- "ufd",
10112
- "ufdl"
10113
- ],
10114
- "vnd.uiq.theme": "utz",
10115
- "vnd.umajin": "umj",
10116
- "vnd.unity": "unityweb",
10117
- "vnd.uoml+xml": "uoml",
10118
- "vnd.vcx": "vcx",
10119
- "vnd.visionary": "vis",
10120
- "vnd.vsf": "vsf",
10121
- "vnd.webturbo": "wtb",
10122
- "vnd.wolfram.player": "nbp",
10123
- "vnd.wqd": "wqd",
10124
- "vnd.wt.stf": "stf",
10125
- "vnd.xara": "xar",
10126
- "vnd.xfdl": "xfdl",
10127
- "vnd.yamaha.hv-dic": "hvd",
10128
- "vnd.yamaha.hv-script": "hvs",
10129
- "vnd.yamaha.hv-voice": "hvp",
10130
- "vnd.yamaha.openscoreformat": "osf",
10131
- "vnd.yamaha.openscoreformat.osfpvg+xml": "osfpvg",
10132
- "vnd.yamaha.smaf-audio": "saf",
10133
- "vnd.yamaha.smaf-phrase": "spf",
10134
- "vnd.yellowriver-custom-menu": "cmp",
10135
- "vnd.zul": [
10136
- "zir",
10137
- "zirz"
10138
- ],
10139
- "vnd.zzazz.deck+xml": "zaz",
10140
- "voicexml+xml": "vxml",
10141
- "widget": "wgt",
10142
- "winhlp": "hlp",
10143
- "wsdl+xml": "wsdl",
10144
- "wspolicy+xml": "wspolicy",
10145
- "x-ace-compressed": "ace",
10146
- "x-authorware-bin": [
10147
- "aab",
10148
- "x32",
10149
- "u32",
10150
- "vox"
10151
- ],
10152
- "x-authorware-map": "aam",
10153
- "x-authorware-seg": "aas",
10154
- "x-blorb": [
10155
- "blb",
10156
- "blorb"
10157
- ],
10158
- "x-bzip": "bz",
10159
- "x-bzip2": [
10160
- "bz2",
10161
- "boz"
10162
- ],
10163
- "x-cfs-compressed": "cfs",
10164
- "x-chat": "chat",
10165
- "x-conference": "nsc",
10166
- "x-dgc-compressed": "dgc",
10167
- "x-dtbncx+xml": "ncx",
10168
- "x-dtbook+xml": "dtb",
10169
- "x-dtbresource+xml": "res",
10170
- "x-eva": "eva",
10171
- "x-font-bdf": "bdf",
10172
- "x-font-ghostscript": "gsf",
10173
- "x-font-linux-psf": "psf",
10174
- "x-font-pcf": "pcf",
10175
- "x-font-snf": "snf",
10176
- "x-font-ttf": [
10177
- "ttf",
10178
- "ttc"
10179
- ],
10180
- "x-font-type1": [
10181
- "pfa",
10182
- "pfb",
10183
- "pfm",
10184
- "afm"
10185
- ],
10186
- "x-freearc": "arc",
10187
- "x-gca-compressed": "gca",
10188
- "x-glulx": "ulx",
10189
- "x-gramps-xml": "gramps",
10190
- "x-install-instructions": "install",
10191
- "x-lzh-compressed": [
10192
- "lzh",
10193
- "lha"
10194
- ],
10195
- "x-mie": "mie",
10196
- "x-mobipocket-ebook": [
10197
- "prc",
10198
- "mobi"
10199
- ],
10200
- "x-ms-application": "application",
10201
- "x-ms-shortcut": "lnk",
10202
- "x-ms-xbap": "xbap",
10203
- "x-msbinder": "obd",
10204
- "x-mscardfile": "crd",
10205
- "x-msclip": "clp",
10206
- "x-ms-installer": "msi",
10207
- "x-msmediaview": [
10208
- "mvb",
10209
- "m13",
10210
- "m14"
10211
- ],
10212
- "x-msmetafile": [
10213
- "wmf",
10214
- "wmz",
10215
- "emf",
10216
- "emz"
10217
- ],
10218
- "x-msmoney": "mny",
10219
- "x-mspublisher": "pub",
10220
- "x-msschedule": "scd",
10221
- "x-msterminal": "trm",
10222
- "x-mswrite": "wri",
10223
- "x-nzb": "nzb",
10224
- "x-pkcs12": [
10225
- "p12",
10226
- "pfx"
10227
- ],
10228
- "x-pkcs7-certificates": [
10229
- "p7b",
10230
- "spc"
10231
- ],
10232
- "x-research-info-systems": "ris",
10233
- "x-silverlight-app": "xap",
10234
- "x-sql": "sql",
10235
- "x-stuffitx": "sitx",
10236
- "x-subrip": "srt",
10237
- "x-t3vm-image": "t3",
10238
- "x-tex-tfm": "tfm",
10239
- "x-tgif": "obj",
10240
- "x-xliff+xml": "xlf",
10241
- "x-xz": "xz",
10242
- "x-zmachine": [
10243
- "z1",
10244
- "z2",
10245
- "z3",
10246
- "z4",
10247
- "z5",
10248
- "z6",
10249
- "z7",
10250
- "z8"
10251
- ],
10252
- "xaml+xml": "xaml",
10253
- "xcap-diff+xml": "xdf",
10254
- "xenc+xml": "xenc",
10255
- "xml-dtd": "dtd",
10256
- "xop+xml": "xop",
10257
- "xproc+xml": "xpl",
10258
- "xslt+xml": "xslt",
10259
- "xv+xml": [
10260
- "mxml",
10261
- "xhvml",
10262
- "xvml",
10263
- "xvm"
10264
- ],
10265
- "yang": "yang",
10266
- "yin+xml": "yin",
10267
- "envoy": "evy",
10268
- "fractals": "fif",
10269
- "internet-property-stream": "acx",
10270
- "olescript": "axs",
10271
- "vnd.ms-outlook": "msg",
10272
- "vnd.ms-pkicertstore": "sst",
10273
- "x-compress": "z",
10274
- "x-perfmon": [
10275
- "pma",
10276
- "pmc",
10277
- "pmr",
10278
- "pmw"
10279
- ],
10280
- "ynd.ms-pkipko": "pko",
10281
- "gzip": [
10282
- "gz",
10283
- "tgz"
10284
- ],
10285
- "smil+xml": [
10286
- "smi",
10287
- "smil"
10288
- ],
10289
- "vnd.debian.binary-package": [
10290
- "deb",
10291
- "udeb"
10292
- ],
10293
- "vnd.hzn-3d-crossword": "x3d",
10294
- "vnd.sqlite3": [
10295
- "db",
10296
- "sqlite",
10297
- "sqlite3",
10298
- "db-wal",
10299
- "sqlite-wal",
10300
- "db-shm",
10301
- "sqlite-shm"
10302
- ],
10303
- "vnd.wap.sic": "sic",
10304
- "vnd.wap.slc": "slc",
10305
- "x-krita": [
10306
- "kra",
10307
- "krz"
10308
- ],
10309
- "x-perl": [
10310
- "pm",
10311
- "pl"
10312
- ],
10313
- "yaml": [
10314
- "yaml",
10315
- "yml"
10316
- ]
10317
- },
10318
- "audio": {
10319
- "amr": "amr",
10320
- "amr-wb": "awb",
10321
- "annodex": "axa",
10322
- "basic": [
10323
- "au",
10324
- "snd"
10325
- ],
10326
- "flac": "flac",
10327
- "midi": [
10328
- "mid",
10329
- "midi",
10330
- "kar",
10331
- "rmi"
10332
- ],
10333
- "mpeg": [
10334
- "mpga",
10335
- "mpega",
10336
- "mp3",
10337
- "m4a",
10338
- "mp2a",
10339
- "m2a",
10340
- "m3a"
10341
- ],
10342
- "mpegurl": "m3u",
10343
- "ogg": [
10344
- "oga",
10345
- "ogg",
10346
- "spx"
10347
- ],
10348
- "prs.sid": "sid",
10349
- "x-aiff": "aifc",
10350
- "x-gsm": "gsm",
10351
- "x-ms-wma": "wma",
10352
- "x-ms-wax": "wax",
10353
- "x-pn-realaudio": "ram",
10354
- "x-realaudio": "ra",
10355
- "x-sd2": "sd2",
10356
- "adpcm": "adp",
10357
- "mp4": "mp4a",
10358
- "s3m": "s3m",
10359
- "silk": "sil",
10360
- "vnd.dece.audio": [
10361
- "uva",
10362
- "uvva"
10363
- ],
10364
- "vnd.digital-winds": "eol",
10365
- "vnd.dra": "dra",
10366
- "vnd.dts": "dts",
10367
- "vnd.dts.hd": "dtshd",
10368
- "vnd.lucent.voice": "lvp",
10369
- "vnd.ms-playready.media.pya": "pya",
10370
- "vnd.nuera.ecelp4800": "ecelp4800",
10371
- "vnd.nuera.ecelp7470": "ecelp7470",
10372
- "vnd.nuera.ecelp9600": "ecelp9600",
10373
- "vnd.rip": "rip",
10374
- "webm": "weba",
10375
- "x-caf": "caf",
10376
- "x-matroska": "mka",
10377
- "x-pn-realaudio-plugin": "rmp",
10378
- "xm": "xm",
10379
- "aac": "aac",
10380
- "aiff": [
10381
- "aiff",
10382
- "aif",
10383
- "aff"
10384
- ],
10385
- "opus": "opus",
10386
- "wav": "wav"
10387
- },
10388
- "chemical": {
10389
- "x-alchemy": "alc",
10390
- "x-cache": [
10391
- "cac",
10392
- "cache"
10393
- ],
10394
- "x-cache-csf": "csf",
10395
- "x-cactvs-binary": [
10396
- "cbin",
10397
- "cascii",
10398
- "ctab"
10399
- ],
10400
- "x-cdx": "cdx",
10401
- "x-chem3d": "c3d",
10402
- "x-cif": "cif",
10403
- "x-cmdf": "cmdf",
10404
- "x-cml": "cml",
10405
- "x-compass": "cpa",
10406
- "x-crossfire": "bsd",
10407
- "x-csml": [
10408
- "csml",
10409
- "csm"
10410
- ],
10411
- "x-ctx": "ctx",
10412
- "x-cxf": [
10413
- "cxf",
10414
- "cef"
10415
- ],
10416
- "x-embl-dl-nucleotide": [
10417
- "emb",
10418
- "embl"
10419
- ],
10420
- "x-gamess-input": [
10421
- "inp",
10422
- "gam",
10423
- "gamin"
10424
- ],
10425
- "x-gaussian-checkpoint": [
10426
- "fch",
10427
- "fchk"
10428
- ],
10429
- "x-gaussian-cube": "cub",
10430
- "x-gaussian-input": [
10431
- "gau",
10432
- "gjc",
10433
- "gjf"
10434
- ],
10435
- "x-gaussian-log": "gal",
10436
- "x-gcg8-sequence": "gcg",
10437
- "x-genbank": "gen",
10438
- "x-hin": "hin",
10439
- "x-isostar": [
10440
- "istr",
10441
- "ist"
10442
- ],
10443
- "x-jcamp-dx": [
10444
- "jdx",
10445
- "dx"
10446
- ],
10447
- "x-kinemage": "kin",
10448
- "x-macmolecule": "mcm",
10449
- "x-macromodel-input": "mmod",
10450
- "x-mdl-molfile": "mol",
10451
- "x-mdl-rdfile": "rd",
10452
- "x-mdl-rxnfile": "rxn",
10453
- "x-mdl-sdfile": "sd",
10454
- "x-mdl-tgf": "tgf",
10455
- "x-mmcif": "mcif",
10456
- "x-mol2": "mol2",
10457
- "x-molconn-Z": "b",
10458
- "x-mopac-graph": "gpt",
10459
- "x-mopac-input": [
10460
- "mop",
10461
- "mopcrt",
10462
- "zmt"
10463
- ],
10464
- "x-mopac-out": "moo",
10465
- "x-ncbi-asn1": "asn",
10466
- "x-ncbi-asn1-ascii": [
10467
- "prt",
10468
- "ent"
10469
- ],
10470
- "x-ncbi-asn1-binary": "val",
10471
- "x-rosdal": "ros",
10472
- "x-swissprot": "sw",
10473
- "x-vamas-iso14976": "vms",
10474
- "x-vmd": "vmd",
10475
- "x-xtel": "xtel",
10476
- "x-xyz": "xyz"
10477
- },
10478
- "font": {
10479
- "otf": "otf",
10480
- "woff": "woff",
10481
- "woff2": "woff2"
10482
- },
10483
- "image": {
10484
- "gif": "gif",
10485
- "ief": "ief",
10486
- "jpeg": [
10487
- "jpeg",
10488
- "jpg",
10489
- "jpe",
10490
- "jfif",
10491
- "jfif-tbnl",
10492
- "jif"
10493
- ],
10494
- "pcx": "pcx",
10495
- "png": "png",
10496
- "svg+xml": [
10497
- "svg",
10498
- "svgz"
10499
- ],
10500
- "tiff": [
10501
- "tiff",
10502
- "tif"
10503
- ],
10504
- "vnd.djvu": [
10505
- "djvu",
10506
- "djv"
10507
- ],
10508
- "vnd.wap.wbmp": "wbmp",
10509
- "x-canon-cr2": "cr2",
10510
- "x-canon-crw": "crw",
10511
- "x-cmu-raster": "ras",
10512
- "x-coreldraw": "cdr",
10513
- "x-coreldrawpattern": "pat",
10514
- "x-coreldrawtemplate": "cdt",
10515
- "x-corelphotopaint": "cpt",
10516
- "x-epson-erf": "erf",
10517
- "x-icon": "ico",
10518
- "x-jg": "art",
10519
- "x-jng": "jng",
10520
- "x-nikon-nef": "nef",
10521
- "x-olympus-orf": "orf",
10522
- "x-portable-anymap": "pnm",
10523
- "x-portable-bitmap": "pbm",
10524
- "x-portable-graymap": "pgm",
10525
- "x-portable-pixmap": "ppm",
10526
- "x-rgb": "rgb",
10527
- "x-xbitmap": "xbm",
10528
- "x-xpixmap": "xpm",
10529
- "x-xwindowdump": "xwd",
10530
- "bmp": "bmp",
10531
- "cgm": "cgm",
10532
- "g3fax": "g3",
10533
- "ktx": "ktx",
10534
- "prs.btif": "btif",
10535
- "sgi": "sgi",
10536
- "vnd.dece.graphic": [
10537
- "uvi",
10538
- "uvvi",
10539
- "uvg",
10540
- "uvvg"
10541
- ],
10542
- "vnd.dwg": "dwg",
10543
- "vnd.dxf": "dxf",
10544
- "vnd.fastbidsheet": "fbs",
10545
- "vnd.fpx": "fpx",
10546
- "vnd.fst": "fst",
10547
- "vnd.fujixerox.edmics-mmr": "mmr",
10548
- "vnd.fujixerox.edmics-rlc": "rlc",
10549
- "vnd.ms-modi": "mdi",
10550
- "vnd.ms-photo": "wdp",
10551
- "vnd.net-fpx": "npx",
10552
- "vnd.xiff": "xif",
10553
- "webp": "webp",
10554
- "x-3ds": "3ds",
10555
- "x-cmx": "cmx",
10556
- "x-freehand": [
10557
- "fh",
10558
- "fhc",
10559
- "fh4",
10560
- "fh5",
10561
- "fh7"
10562
- ],
10563
- "x-pict": [
10564
- "pic",
10565
- "pct"
10566
- ],
10567
- "x-tga": "tga",
10568
- "cis-cod": "cod",
10569
- "avif": [
10570
- "avif",
10571
- "avifs"
10572
- ],
10573
- "heic": [
10574
- "heif",
10575
- "heic"
10576
- ],
10577
- "pjpeg": [
10578
- "pjpg"
10579
- ],
10580
- "vnd.adobe.photoshop": "psd",
10581
- "x-adobe-dng": "dng",
10582
- "x-fuji-raf": "raf",
10583
- "x-icns": "icns",
10584
- "x-kodak-dcr": "dcr",
10585
- "x-kodak-k25": "k25",
10586
- "x-kodak-kdc": "kdc",
10587
- "x-minolta-mrw": "mrw",
10588
- "x-panasonic-raw": [
10589
- "raw",
10590
- "rw2",
10591
- "rwl"
10592
- ],
10593
- "x-pentax-pef": [
10594
- "pef",
10595
- "ptx"
10596
- ],
10597
- "x-sigma-x3f": "x3f",
10598
- "x-sony-arw": "arw",
10599
- "x-sony-sr2": "sr2",
10600
- "x-sony-srf": "srf"
10601
- },
10602
- "message": {
10603
- "rfc822": [
10604
- "eml",
10605
- "mime",
10606
- "mht",
10607
- "mhtml",
10608
- "nws"
10609
- ]
10610
- },
10611
- "model": {
10612
- "iges": [
10613
- "igs",
10614
- "iges"
10615
- ],
10616
- "mesh": [
10617
- "msh",
10618
- "mesh",
10619
- "silo"
10620
- ],
10621
- "vrml": [
10622
- "wrl",
10623
- "vrml"
10624
- ],
10625
- "x3d+vrml": [
10626
- "x3dv",
10627
- "x3dvz"
10628
- ],
10629
- "x3d+xml": "x3dz",
10630
- "x3d+binary": [
10631
- "x3db",
10632
- "x3dbz"
10633
- ],
10634
- "vnd.collada+xml": "dae",
10635
- "vnd.dwf": "dwf",
10636
- "vnd.gdl": "gdl",
10637
- "vnd.gtw": "gtw",
10638
- "vnd.mts": "mts",
10639
- "vnd.usdz+zip": "usdz",
10640
- "vnd.vtu": "vtu"
10641
- },
10642
- "text": {
10643
- "cache-manifest": [
10644
- "manifest",
10645
- "appcache"
10646
- ],
10647
- "calendar": [
10648
- "ics",
10649
- "icz",
10650
- "ifb"
10651
- ],
10652
- "css": "css",
10653
- "csv": "csv",
10654
- "h323": "323",
10655
- "html": [
10656
- "html",
10657
- "htm",
10658
- "shtml",
10659
- "stm"
10660
- ],
10661
- "iuls": "uls",
10662
- "plain": [
10663
- "txt",
10664
- "text",
10665
- "brf",
10666
- "conf",
10667
- "def",
10668
- "list",
10669
- "log",
10670
- "in",
10671
- "bas",
10672
- "diff",
10673
- "ksh"
10674
- ],
10675
- "richtext": "rtx",
10676
- "scriptlet": [
10677
- "sct",
10678
- "wsc"
10679
- ],
10680
- "texmacs": "tm",
10681
- "tab-separated-values": "tsv",
10682
- "vnd.sun.j2me.app-descriptor": "jad",
10683
- "vnd.wap.wml": "wml",
10684
- "vnd.wap.wmlscript": "wmls",
10685
- "x-bibtex": "bib",
10686
- "x-boo": "boo",
10687
- "x-c++hdr": [
10688
- "h++",
10689
- "hpp",
10690
- "hxx",
10691
- "hh"
10692
- ],
10693
- "x-c++src": [
10694
- "c++",
10695
- "cpp",
10696
- "cxx",
10697
- "cc"
10698
- ],
10699
- "x-component": "htc",
10700
- "x-dsrc": "d",
10701
- "x-diff": "patch",
10702
- "x-haskell": "hs",
10703
- "x-java": "java",
10704
- "x-literate-haskell": "lhs",
10705
- "x-moc": "moc",
10706
- "x-pascal": [
10707
- "p",
10708
- "pas",
10709
- "pp",
10710
- "inc"
10711
- ],
10712
- "x-pcs-gcd": "gcd",
10713
- "x-python": "py",
10714
- "x-scala": "scala",
10715
- "x-setext": "etx",
10716
- "x-tcl": [
10717
- "tcl",
10718
- "tk"
10719
- ],
10720
- "x-tex": [
10721
- "tex",
10722
- "ltx",
10723
- "sty",
10724
- "cls"
10725
- ],
10726
- "x-vcalendar": "vcs",
10727
- "x-vcard": "vcf",
10728
- "n3": "n3",
10729
- "prs.lines.tag": "dsc",
10730
- "sgml": [
10731
- "sgml",
10732
- "sgm"
10733
- ],
10734
- "troff": [
10735
- "t",
10736
- "tr",
10737
- "roff",
10738
- "man",
10739
- "me",
10740
- "ms"
10741
- ],
10742
- "turtle": "ttl",
10743
- "uri-list": [
10744
- "uri",
10745
- "uris",
10746
- "urls"
10747
- ],
10748
- "vcard": "vcard",
10749
- "vnd.curl": "curl",
10750
- "vnd.curl.dcurl": "dcurl",
10751
- "vnd.curl.scurl": "scurl",
10752
- "vnd.curl.mcurl": "mcurl",
10753
- "vnd.dvb.subtitle": "sub",
10754
- "vnd.fly": "fly",
10755
- "vnd.fmi.flexstor": "flx",
10756
- "vnd.graphviz": "gv",
10757
- "vnd.in3d.3dml": "3dml",
10758
- "vnd.in3d.spot": "spot",
10759
- "x-asm": [
10760
- "s",
10761
- "asm"
10762
- ],
10763
- "x-c": [
10764
- "c",
10765
- "h",
10766
- "dic"
10767
- ],
10768
- "x-fortran": [
10769
- "f",
10770
- "for",
10771
- "f77",
10772
- "f90"
10773
- ],
10774
- "x-opml": "opml",
10775
- "x-nfo": "nfo",
10776
- "x-sfv": "sfv",
10777
- "x-uuencode": "uu",
10778
- "webviewhtml": "htt",
10779
- "javascript": "js",
10780
- "json": "json",
10781
- "markdown": [
10782
- "md",
10783
- "markdown",
10784
- "mdown",
10785
- "markdn"
10786
- ],
10787
- "vnd.wap.si": "si",
10788
- "vnd.wap.sl": "sl"
10789
- },
10790
- "video": {
10791
- "3gpp": "3gp",
10792
- "annodex": "axv",
10793
- "dl": "dl",
10794
- "dv": [
10795
- "dif",
10796
- "dv"
10797
- ],
10798
- "fli": "fli",
10799
- "gl": "gl",
10800
- "mpeg": [
10801
- "mpeg",
10802
- "mpg",
10803
- "mpe",
10804
- "m1v",
10805
- "m2v",
10806
- "mp2",
10807
- "mpa",
10808
- "mpv2"
10809
- ],
10810
- "mp4": [
10811
- "mp4",
10812
- "mp4v",
10813
- "mpg4"
10814
- ],
10815
- "quicktime": [
10816
- "qt",
10817
- "mov"
10818
- ],
10819
- "ogg": "ogv",
10820
- "vnd.mpegurl": [
10821
- "mxu",
10822
- "m4u"
10823
- ],
10824
- "x-flv": "flv",
10825
- "x-la-asf": [
10826
- "lsf",
10827
- "lsx"
10828
- ],
10829
- "x-mng": "mng",
10830
- "x-ms-asf": [
10831
- "asf",
10832
- "asx",
10833
- "asr"
10834
- ],
10835
- "x-ms-wm": "wm",
10836
- "x-ms-wmv": "wmv",
10837
- "x-ms-wmx": "wmx",
10838
- "x-ms-wvx": "wvx",
10839
- "x-msvideo": "avi",
10840
- "x-sgi-movie": "movie",
10841
- "x-matroska": [
10842
- "mpv",
10843
- "mkv",
10844
- "mk3d",
10845
- "mks"
10846
- ],
10847
- "3gpp2": "3g2",
10848
- "h261": "h261",
10849
- "h263": "h263",
10850
- "h264": "h264",
10851
- "jpeg": "jpgv",
10852
- "jpm": [
10853
- "jpm",
10854
- "jpgm"
10855
- ],
10856
- "mj2": [
10857
- "mj2",
10858
- "mjp2"
10859
- ],
10860
- "vnd.dece.hd": [
10861
- "uvh",
10862
- "uvvh"
10863
- ],
10864
- "vnd.dece.mobile": [
10865
- "uvm",
10866
- "uvvm"
10867
- ],
10868
- "vnd.dece.pd": [
10869
- "uvp",
10870
- "uvvp"
10871
- ],
10872
- "vnd.dece.sd": [
10873
- "uvs",
10874
- "uvvs"
10875
- ],
10876
- "vnd.dece.video": [
10877
- "uvv",
10878
- "uvvv"
10879
- ],
10880
- "vnd.dvb.file": "dvb",
10881
- "vnd.fvt": "fvt",
10882
- "vnd.ms-playready.media.pyv": "pyv",
10883
- "vnd.uvvu.mp4": [
10884
- "uvu",
10885
- "uvvu"
10886
- ],
10887
- "vnd.vivo": "viv",
10888
- "webm": "webm",
10889
- "x-f4v": "f4v",
10890
- "x-m4v": "m4v",
10891
- "x-ms-vob": "vob",
10892
- "x-smv": "smv",
10893
- "mp2t": "ts"
10894
- },
10895
- "x-conference": {
10896
- "x-cooltalk": "ice"
10897
- },
10898
- "x-world": {
10899
- "x-vrml": [
10900
- "vrm",
10901
- "flr",
10902
- "wrz",
10903
- "xaf",
10904
- "xof"
10905
- ]
10906
- }
10907
- };
10908
-
10909
9422
  let mimeTypes;
10910
9423
 
10911
9424
  function getMimeType(filename) {
@@ -10914,17 +9427,25 @@ function getMimeType(filename) {
10914
9427
 
10915
9428
  function getMimeTypes() {
10916
9429
  if (!mimeTypes) {
10917
- mimeTypes = {};
10918
- for (const type of Object.keys(table)) {
10919
- for (const subtype of Object.keys(table[type])) {
10920
- const value = table[type][subtype];
10921
- if (typeof value == "string") {
10922
- mimeTypes[value] = type + "/" + subtype;
10923
- } else {
10924
- for (let indexMimeType = 0; indexMimeType < value.length; indexMimeType++) {
10925
- mimeTypes[value[indexMimeType]] = type + "/" + subtype;
10926
- }
10927
- }
9430
+ mimeTypes = decodeMimeTypes(encodedMimeTypes);
9431
+ }
9432
+ return mimeTypes;
9433
+ }
9434
+
9435
+ function decodeMimeTypes(data) {
9436
+ const mimeTypes = Object.create(null);
9437
+ for (const block of data.split(";")) {
9438
+ const colonIndex = block.indexOf(":");
9439
+ const type = block.slice(0, colonIndex);
9440
+ let previousSubtype = "";
9441
+ for (const entry of block.slice(colonIndex + 1).split(",")) {
9442
+ const tokens = entry.split(" ");
9443
+ const subtype = previousSubtype.slice(0, Number.parseInt(tokens[0][0], 36)) + tokens[0].slice(1);
9444
+ previousSubtype = subtype;
9445
+ const expandedSubtype = subtype.replace(/!/g, "+xml");
9446
+ const extensions = tokens.length > 1 ? tokens.slice(1) : [expandedSubtype.split("+")[0]];
9447
+ for (const extension of extensions) {
9448
+ mimeTypes[extension] = type + "/" + expandedSubtype;
10928
9449
  }
10929
9450
  }
10930
9451
  }