@cesium/engine 26.3.0 → 26.3.1-wasm.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +504 -535
  2. package/Build/Workers/chunk-2P3WKV6V.js +290 -0
  3. package/Build/Workers/{chunk-MUW4DJV7.js → chunk-2U5272QU.js} +17 -17
  4. package/Build/Workers/{chunk-7WXBTNRV.js → chunk-4KCOC6OZ.js} +8 -10
  5. package/Build/Workers/{chunk-GS7RY2DH.js → chunk-5FULJNWY.js} +11 -13
  6. package/Build/Workers/{chunk-2PWVICP6.js → chunk-65ZF23AQ.js} +1 -1
  7. package/Build/Workers/{chunk-SEJIXZZ4.js → chunk-6D5534B7.js} +10 -12
  8. package/Build/Workers/{chunk-MDDKCLMF.js → chunk-6GFMBHBD.js} +19 -19
  9. package/Build/Workers/{chunk-PKZA44LH.js → chunk-6VRGQF3D.js} +4 -4
  10. package/Build/Workers/{chunk-JBJ6BRIM.js → chunk-6XUIECFB.js} +4 -6
  11. package/Build/Workers/{chunk-DKSANM4A.js → chunk-7KWUH6RK.js} +14 -14
  12. package/Build/Workers/{chunk-6BSNYZZG.js → chunk-7ZBJRQQT.js} +7 -7
  13. package/Build/Workers/{chunk-XRZCS3HE.js → chunk-AEHANE5A.js} +991 -5612
  14. package/Build/Workers/chunk-AUU74SIZ.js +2420 -0
  15. package/Build/Workers/{chunk-2YY724ZX.js → chunk-B6V5NMIE.js} +13 -11
  16. package/Build/Workers/{chunk-5JCZHJUU.js → chunk-BRQ52ASU.js} +15 -17
  17. package/Build/Workers/{chunk-Z2DW5NM2.js → chunk-FVLSQBPH.js} +7 -14
  18. package/Build/Workers/{chunk-L73K5UPP.js → chunk-IFKM2GZR.js} +12 -12
  19. package/Build/Workers/{chunk-F34TJJLA.js → chunk-KF6OEWVT.js} +17 -17
  20. package/Build/Workers/{chunk-JL4NWWQY.js → chunk-KOAXSU77.js} +5 -7
  21. package/Build/Workers/{chunk-CKK6CUXK.js → chunk-KRVYCMGN.js} +6 -6
  22. package/Build/Workers/{chunk-KBGAHN5R.js → chunk-LTZRLNQP.js} +1 -1
  23. package/Build/Workers/{chunk-CQ4TZXAT.js → chunk-M7WEAGWT.js} +8 -8
  24. package/Build/Workers/{chunk-A7SMPV6B.js → chunk-MJTLGN63.js} +14 -14
  25. package/Build/Workers/{chunk-DZK34ZVD.js → chunk-MUNZ77KV.js} +1 -1
  26. package/Build/Workers/{chunk-X27HKF5E.js → chunk-NC5BUJEF.js} +2 -2
  27. package/Build/Workers/chunk-NYKURYFR.js +2131 -0
  28. package/Build/Workers/{chunk-5KG7KDDW.js → chunk-NZAQG57U.js} +7 -7
  29. package/Build/Workers/{chunk-JKTWW7IO.js → chunk-O5GUOP2G.js} +5 -7
  30. package/Build/Workers/{chunk-6R6SGKYN.js → chunk-OQUOLQTN.js} +8 -10
  31. package/Build/Workers/chunk-OUG5JB2K.js +46 -0
  32. package/Build/Workers/{chunk-HDD3RFLT.js → chunk-P4SDLSGF.js} +13 -6
  33. package/Build/Workers/{chunk-M6W46OAP.js → chunk-P6PC2OIM.js} +7 -7
  34. package/Build/Workers/{chunk-XSIUYAT6.js → chunk-PPRK3XQU.js} +31 -35
  35. package/Build/Workers/{chunk-4LRFYRBX.js → chunk-QGTYLWOT.js} +2 -2
  36. package/Build/Workers/{chunk-COKOYTRS.js → chunk-QHTLIQUH.js} +5 -7
  37. package/Build/Workers/{chunk-N5YK44FS.js → chunk-ROHWZQZ5.js} +5 -5
  38. package/Build/Workers/{chunk-XBY3354M.js → chunk-SNUWISJO.js} +6 -8
  39. package/Build/Workers/{chunk-EDETO6NY.js → chunk-T67YY3KP.js} +4 -2
  40. package/Build/Workers/{chunk-4DMAXPKB.js → chunk-TF5473GK.js} +13 -13
  41. package/Build/Workers/{chunk-B7Q2WF6Q.js → chunk-THHFTMAL.js} +4 -6
  42. package/Build/Workers/{chunk-SL2HCFYW.js → chunk-UFCZ62WM.js} +15 -13
  43. package/Build/Workers/{chunk-NZQUP52G.js → chunk-UV2YC2Q5.js} +11 -11
  44. package/Build/Workers/{chunk-E7G32DWL.js → chunk-V4ICCWYA.js} +1 -1
  45. package/Build/Workers/{chunk-75BC2IHI.js → chunk-VC6XXI2Z.js} +9 -9
  46. package/Build/Workers/{chunk-JMUUAW4X.js → chunk-VXJ6P4UI.js} +10 -10
  47. package/Build/Workers/{chunk-QTAEVUED.js → chunk-W2BKP7G7.js} +15 -17
  48. package/Build/Workers/{chunk-VRECSMG3.js → chunk-WMVGNBSH.js} +2 -2
  49. package/Build/Workers/{chunk-7SESBH2I.js → chunk-XFZMQZSZ.js} +4 -4
  50. package/Build/Workers/{chunk-Q2JS5LCB.js → chunk-XJ532R6R.js} +20 -20
  51. package/Build/Workers/{chunk-SLHK3KAR.js → chunk-YJNU4SM4.js} +5 -5
  52. package/Build/Workers/{chunk-LL2SGJYH.js → chunk-YJRDTEHQ.js} +8 -8
  53. package/Build/Workers/chunk-YUICDZKO.js +2660 -0
  54. package/Build/Workers/{chunk-ATSXKJ3L.js → chunk-Z3DEVGJV.js} +7 -7
  55. package/Build/Workers/{chunk-6V2KDEHL.js → chunk-ZECGI7UZ.js} +4 -4
  56. package/Build/Workers/{chunk-LYJUL4XQ.js → chunk-ZFLPVPUJ.js} +6 -8
  57. package/Build/Workers/{chunk-BNDSDQ7D.js → chunk-ZIM5H2DB.js} +11 -11
  58. package/Build/Workers/{chunk-KEWK6VZL.js → chunk-ZSQMGGSB.js} +14 -16
  59. package/Build/Workers/{chunk-2DKJSPYF.js → chunk-ZWYRGMBK.js} +16 -18
  60. package/Build/Workers/{chunk-UZY5XRL2.js → chunk-ZY733NZA.js} +1 -1
  61. package/Build/Workers/combineGeometry.js +24 -24
  62. package/Build/Workers/createBoxGeometry.js +18 -18
  63. package/Build/Workers/createBoxOutlineGeometry.js +20 -19
  64. package/Build/Workers/createCircleGeometry.js +28 -27
  65. package/Build/Workers/createCircleOutlineGeometry.js +21 -20
  66. package/Build/Workers/createCoplanarPolygonGeometry.js +34 -34
  67. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +33 -32
  68. package/Build/Workers/createCorridorGeometry.js +31 -31
  69. package/Build/Workers/createCorridorOutlineGeometry.js +30 -30
  70. package/Build/Workers/createCylinderGeometry.js +20 -20
  71. package/Build/Workers/createCylinderOutlineGeometry.js +22 -21
  72. package/Build/Workers/createEllipseGeometry.js +26 -26
  73. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  74. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  75. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  76. package/Build/Workers/createFrustumGeometry.js +18 -18
  77. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  78. package/Build/Workers/createGeometry.js +27 -26
  79. package/Build/Workers/createGroundPolylineGeometry.js +27 -26
  80. package/Build/Workers/createPlaneGeometry.js +18 -17
  81. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  82. package/Build/Workers/createPolygonGeometry.js +35 -35
  83. package/Build/Workers/createPolygonOutlineGeometry.js +34 -34
  84. package/Build/Workers/createPolylineGeometry.js +28 -29
  85. package/Build/Workers/createPolylineVolumeGeometry.js +34 -35
  86. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +30 -31
  87. package/Build/Workers/createRectangleGeometry.js +30 -30
  88. package/Build/Workers/createRectangleOutlineGeometry.js +23 -24
  89. package/Build/Workers/createSimplePolylineGeometry.js +26 -27
  90. package/Build/Workers/createSphereGeometry.js +19 -19
  91. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  92. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  93. package/Build/Workers/createVectorTileClampedPolylines.js +17 -16
  94. package/Build/Workers/createVectorTileGeometries.js +24 -24
  95. package/Build/Workers/createVectorTilePoints.js +13 -13
  96. package/Build/Workers/createVectorTilePolygons.js +22 -22
  97. package/Build/Workers/createVectorTilePolylines.js +17 -16
  98. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +36 -26
  99. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +24 -24
  100. package/Build/Workers/createVerticesFromHeightmap.js +24 -25
  101. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
  102. package/Build/Workers/createWallGeometry.js +27 -28
  103. package/Build/Workers/createWallOutlineGeometry.js +26 -27
  104. package/Build/Workers/decodeDraco.js +16 -12
  105. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +336 -337
  106. package/Build/Workers/decodeI3S.js +17 -12
  107. package/Build/Workers/{chunk-GLHDTTTO.js → decodeMeshopt.js} +23 -29
  108. package/Build/Workers/decodeSpz.js +1960 -0
  109. package/Build/Workers/gaussianSplatSorter.js +13 -6
  110. package/Build/Workers/gaussianSplatTextureGenerator.js +13 -6
  111. package/Build/Workers/incrementallyBuildTerrainPicker.js +9 -10
  112. package/Build/Workers/transcodeKTX2.js +26 -12
  113. package/Build/Workers/transferTypedArrayTest.js +1 -1
  114. package/Build/Workers/upsampleQuantizedTerrainMesh.js +24 -24
  115. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
  116. package/Source/Core/Cesium3DTilesTerrainData.js +11 -1
  117. package/Source/Core/Cesium3DTilesTerrainGeometryProcessor.js +33 -23
  118. package/Source/Core/KTX2Transcoder.js +99 -5
  119. package/Source/Core/Resource.js +2 -0
  120. package/Source/Core/TaskProcessor.js +249 -129
  121. package/Source/Core/TrustedServers.js +34 -1
  122. package/Source/Core/WebAssemblyWorkerInitializer.js +125 -0
  123. package/Source/Core/fetchWebAssemblyBinary.js +52 -0
  124. package/Source/Scene/GaussianSplatPrimitive.js +153 -66
  125. package/Source/Scene/GltfBufferViewLoader.js +25 -13
  126. package/Source/Scene/GltfSpzLoader.js +5 -4
  127. package/Source/Scene/SpzDecoder.js +106 -0
  128. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  129. package/Source/ThirdParty/zip-module.wasm +0 -0
  130. package/Source/Workers/createTaskProcessorWorker.js +2 -0
  131. package/Source/Workers/createVerticesFromCesium3DTilesTerrain.js +13 -1
  132. package/Source/Workers/decodeDraco.js +7 -3
  133. package/Source/Workers/decodeI3S.js +7 -3
  134. package/Source/Workers/decodeMeshopt.js +21 -0
  135. package/Source/Workers/decodeSpz.js +20 -0
  136. package/Source/Workers/gaussianSplatSorter.js +7 -3
  137. package/Source/Workers/gaussianSplatTextureGenerator.js +7 -3
  138. package/Source/Workers/transcodeKTX2.js +22 -5
  139. package/index.d.ts +93 -0
  140. package/index.js +4 -1
  141. package/package.json +1 -1
  142. package/Build/Workers/chunk-B4AVL7VI.js +0 -82
  143. package/Build/Workers/chunk-HDPNFEPP.js +0 -3820
@@ -1,6 +1,6 @@
1
1
  !(function() {
2
2
  "use strict";
3
- const { Array: t, Object: n, Number: e, Math: s, Error: r, Uint8Array: o, Uint16Array: c, Uint32Array: i, Int32Array: a, Map: f, DataView: u, Promise: l, TextEncoder: w, crypto: h, postMessage: p, TransformStream: d, ReadableStream: y, WritableStream: m, CompressionStream: S, DecompressionStream: g } = self, v = void 0, b = "undefined", k = "function", z = new o(), C = [[], [], [], [], [], [], [], []];
3
+ const { Array: t, Object: n, Number: e, Math: o, Error: r, Uint8Array: s, Uint16Array: c, Uint32Array: i, Int32Array: a, Map: f, DataView: u, Promise: w, TextEncoder: l, crypto: h, postMessage: p, TransformStream: d, ReadableStream: y, WritableStream: m, CompressionStream: S, DecompressionStream: g } = self, v = void 0, z = "undefined", b = "function", k = new s(), C = [[], [], [], [], [], [], [], []];
4
4
  for (let t2 = 0; t2 < 256; t2++) {
5
5
  let n2 = t2;
6
6
  for (let t3 = 0; t3 < 8; t3++) n2 = 1 & n2 ? n2 >>> 1 ^ 3988292384 : n2 >>> 1;
@@ -10,7 +10,7 @@
10
10
  const e2 = C[n2 - 1][t2];
11
11
  C[n2][t2] = e2 >>> 8 ^ C[0][255 & e2];
12
12
  }
13
- const [I, A, x, M, P, B, D, F] = C;
13
+ const [I, A, x, M, P, D, F, E] = C;
14
14
  class R {
15
15
  constructor(t2) {
16
16
  this.o = t2 || -1;
@@ -18,15 +18,15 @@
18
18
  append(t2) {
19
19
  let n2 = 0 | this.o;
20
20
  const e2 = 0 | t2.length;
21
- let s2 = 0;
21
+ let o2 = 0;
22
22
  if (e2 >= 8 && t2.buffer) {
23
- const r2 = new u(t2.buffer, t2.byteOffset, e2), o2 = e2 - 8;
24
- for (; s2 <= o2; s2 += 8) {
25
- const t3 = n2 ^ r2.getInt32(s2, true), e3 = r2.getInt32(s2 + 4, true);
26
- n2 = F[255 & t3] ^ D[t3 >>> 8 & 255] ^ B[t3 >>> 16 & 255] ^ P[t3 >>> 24 & 255] ^ M[255 & e3] ^ x[e3 >>> 8 & 255] ^ A[e3 >>> 16 & 255] ^ I[e3 >>> 24 & 255];
23
+ const r2 = new u(t2.buffer, t2.byteOffset, e2), s2 = e2 - 8;
24
+ for (; o2 <= s2; o2 += 8) {
25
+ const t3 = n2 ^ r2.getInt32(o2, true), e3 = r2.getInt32(o2 + 4, true);
26
+ n2 = E[255 & t3] ^ F[t3 >>> 8 & 255] ^ D[t3 >>> 16 & 255] ^ P[t3 >>> 24 & 255] ^ M[255 & e3] ^ x[e3 >>> 8 & 255] ^ A[e3 >>> 16 & 255] ^ I[e3 >>> 24 & 255];
27
27
  }
28
28
  }
29
- for (; s2 < e2; s2++) n2 = n2 >>> 8 ^ I[255 & (n2 ^ t2[s2])];
29
+ for (; o2 < e2; o2++) n2 = n2 >>> 8 ^ I[255 & (n2 ^ t2[o2])];
30
30
  this.o = n2;
31
31
  }
32
32
  get() {
@@ -40,509 +40,428 @@
40
40
  super({ transform(t3, e2) {
41
41
  n2.append(t3), e2.enqueue(t3);
42
42
  }, flush() {
43
- const e2 = new o(4);
43
+ const e2 = new s(4);
44
44
  new u(e2.buffer).setUint32(0, n2.get()), t2.value = e2;
45
45
  } }), t2 = this;
46
46
  }
47
47
  }
48
- function W(t2, n2) {
49
- const e2 = new o(t2.length + n2.length);
48
+ function B(t2, n2) {
49
+ const e2 = new s(t2.length + n2.length);
50
50
  return e2.set(t2), e2.set(n2, t2.length), e2;
51
51
  }
52
- function _(t2) {
52
+ function T(t2) {
53
53
  return new u(t2.buffer, t2.byteOffset, t2.byteLength);
54
54
  }
55
- const T = { concat(t2, n2) {
56
- if (0 === t2.length || 0 === n2.length) return t2.concat(n2);
57
- const e2 = t2[t2.length - 1], s2 = T.l(e2);
58
- return 32 === s2 ? t2.concat(n2) : T.h(n2, s2, 0 | e2, t2.slice(0, t2.length - 1));
59
- }, bitLength(t2) {
60
- const n2 = t2.length;
61
- if (0 === n2) return 0;
62
- const e2 = t2[n2 - 1];
63
- return 32 * (n2 - 1) + T.l(e2);
64
- }, m(t2, n2) {
65
- if (32 * t2.length < n2) return t2;
66
- const e2 = (t2 = t2.slice(0, s.ceil(n2 / 32))).length;
67
- return n2 &= 31, e2 > 0 && n2 && (t2[e2 - 1] = T.S(n2, t2[e2 - 1] & 2147483648 >> n2 - 1, 1)), t2;
68
- }, S: (t2, n2, e2) => 32 === t2 ? n2 : (e2 ? 0 | n2 : n2 << 32 - t2) + 1099511627776 * t2, l: (t2) => s.round(t2 / 1099511627776) || 32, h(t2, n2, e2, s2) {
69
- for (void 0 === s2 && (s2 = []); n2 >= 32; n2 -= 32) s2.push(e2), e2 = 0;
70
- if (0 === n2) return s2.concat(t2);
71
- for (let r3 = 0; r3 < t2.length; r3++) s2.push(e2 | t2[r3] >>> n2), e2 = t2[r3] << 32 - n2;
72
- const r2 = t2.length ? t2[t2.length - 1] : 0, o2 = T.l(r2);
73
- return s2.push(T.S(n2 + o2 & 31, n2 + o2 > 32 ? e2 : s2.pop(), 1)), s2;
74
- } }, V = { bytes: { v(t2) {
75
- const n2 = T.bitLength(t2) / 8, e2 = new o(n2);
76
- let s2;
77
- for (let r2 = 0; r2 < n2; r2++) 3 & r2 || (s2 = t2[r2 / 4]), e2[r2] = s2 >>> 24, s2 <<= 8;
78
- return e2;
79
- }, C(t2) {
80
- const n2 = [];
81
- let e2, s2 = 0;
82
- for (e2 = 0; e2 < t2.length; e2++) s2 = s2 << 8 | t2[e2], 3 & ~e2 || (n2.push(s2), s2 = 0);
83
- return 3 & e2 && n2.push(T.S(8 * (3 & e2), s2)), n2;
84
- } } }, K = class {
85
- constructor(t2) {
86
- const n2 = this;
87
- n2.blockSize = 512, n2.I = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], n2.A = [1518500249, 1859775393, 2400959708, 3395469782], t2 ? (n2.M = t2.M.slice(0), n2.P = t2.P.slice(0), n2.B = t2.B) : n2.reset();
88
- }
89
- reset() {
90
- const t2 = this;
91
- return t2.M = t2.I.slice(0), t2.P = [], t2.B = 0, t2;
92
- }
93
- update(t2) {
94
- const n2 = this;
95
- "string" == typeof t2 && (t2 = V.D.C(t2));
96
- const e2 = n2.P = T.concat(n2.P, t2), s2 = n2.B, o2 = n2.B = s2 + T.bitLength(t2);
97
- if (o2 > 9007199254740991) throw new r("Cannot hash more than 2^53 - 1 bits");
98
- const c2 = new i(e2);
99
- let a2 = 0;
100
- for (let t3 = n2.blockSize + s2 - (n2.blockSize + s2 & n2.blockSize - 1); t3 <= o2; t3 += n2.blockSize) n2.F(c2.subarray(16 * a2, 16 * (a2 + 1))), a2 += 1;
101
- return e2.splice(0, 16 * a2), n2;
102
- }
103
- R() {
104
- const t2 = this;
105
- let n2 = t2.P;
106
- const e2 = t2.M;
107
- n2 = T.concat(n2, [T.S(1, 1)]);
108
- for (let t3 = n2.length + 2; 15 & t3; t3++) n2.push(0);
109
- for (n2.push(s.floor(t2.B / 4294967296)), n2.push(0 | t2.B); n2.length; ) t2.F(n2.splice(0, 16));
110
- return t2.reset(), e2;
111
- }
112
- U(t2, n2, e2, s2) {
113
- return t2 <= 19 ? n2 & e2 | ~n2 & s2 : t2 <= 39 ? n2 ^ e2 ^ s2 : t2 <= 59 ? n2 & e2 | n2 & s2 | e2 & s2 : t2 <= 79 ? n2 ^ e2 ^ s2 : void 0;
114
- }
115
- W(t2, n2) {
116
- return n2 << t2 | n2 >>> 32 - t2;
117
- }
118
- F(n2) {
119
- const e2 = this, r2 = e2.M, o2 = t(80);
120
- for (let t2 = 0; t2 < 16; t2++) o2[t2] = n2[t2];
121
- let c2 = r2[0], i2 = r2[1], a2 = r2[2], f2 = r2[3], u2 = r2[4];
122
- for (let t2 = 0; t2 <= 79; t2++) {
123
- t2 >= 16 && (o2[t2] = e2.W(1, o2[t2 - 3] ^ o2[t2 - 8] ^ o2[t2 - 14] ^ o2[t2 - 16]));
124
- const n3 = e2.W(5, c2) + e2.U(t2, i2, a2, f2) + u2 + o2[t2] + e2.A[s.floor(t2 / 20)] | 0;
125
- u2 = f2, f2 = a2, a2 = e2.W(30, i2), i2 = c2, c2 = n3;
126
- }
127
- r2[0] = r2[0] + c2 | 0, r2[1] = r2[1] + i2 | 0, r2[2] = r2[2] + a2 | 0, r2[3] = r2[3] + f2 | 0, r2[4] = r2[4] + u2 | 0;
128
- }
129
- }, E = { importKey: (t2) => new E._(V.bytes.C(t2)), T(t2, n2, e2, s2) {
130
- if (e2 = e2 || 1e4, s2 < 0 || e2 < 0) throw new r("invalid params to pbkdf2");
131
- const o2 = 1 + (s2 >> 5) << 2;
132
- let c2, i2, a2, f2, l2;
133
- const w2 = new ArrayBuffer(o2), h2 = new u(w2);
134
- let p2 = 0;
135
- const d2 = T;
136
- for (n2 = V.bytes.C(n2), l2 = 1; p2 < (o2 || 1); l2++) {
137
- for (c2 = i2 = t2.encrypt(d2.concat(n2, [l2])), a2 = 1; a2 < e2; a2++) for (i2 = t2.encrypt(i2), f2 = 0; f2 < i2.length; f2++) c2[f2] ^= i2[f2];
138
- for (a2 = 0; p2 < (o2 || 1) && a2 < c2.length; a2++) h2.setInt32(p2, c2[a2]), p2 += 4;
139
- }
140
- return w2.slice(0, s2 / 8);
141
- }, _: class {
142
- constructor(t2) {
143
- const n2 = this, e2 = n2.V = K, s2 = [[], []];
144
- n2.K = [new e2(), new e2()];
145
- const r2 = n2.K[0].blockSize / 32;
146
- t2.length > r2 && (t2 = new e2().update(t2).R());
147
- for (let n3 = 0; n3 < r2; n3++) s2[0][n3] = 909522486 ^ t2[n3], s2[1][n3] = 1549556828 ^ t2[n3];
148
- n2.K[0].update(s2[0]), n2.K[1].update(s2[1]), n2.L = new e2(n2.K[0]);
149
- }
150
- reset() {
151
- const t2 = this;
152
- t2.L = new t2.V(t2.K[0]), t2.O = false;
153
- }
154
- update(t2) {
155
- this.O = true, this.L.update(t2);
156
- }
157
- digest() {
158
- const t2 = this, n2 = t2.L.R(), e2 = new t2.V(t2.K[1]).update(n2).R();
159
- return t2.reset(), e2;
160
- }
161
- encrypt(t2) {
162
- if (this.O) throw new r("encrypt on already updated hmac called!");
163
- return this.update(t2), this.digest(t2);
164
- }
165
- } }, L = typeof h != b && typeof h.getRandomValues == k, O = "Invalid password", j = "Invalid signature", H = j, N = "zipjs-abort-check-password";
166
- function q(t2) {
167
- if (L) return h.getRandomValues(t2);
168
- throw new r("Crypto API not supported");
169
- }
170
- const G = 16, J = { name: "PBKDF2" }, Q = n.assign({ hash: { name: "HMAC" } }, J), X = n.assign({ iterations: 1e3, hash: { name: "SHA-1" } }, J), Y = ["deriveBits"], Z = [8, 12, 16], $ = [16, 24, 32], tt = 10, nt = [0, 0, 0, 0], et = typeof h != b, st = et && h.subtle, rt = et && typeof st != b, ot = V.bytes, ct = class {
171
- constructor(t2) {
172
- const n2 = this;
173
- n2.j = [[[], [], [], [], []], [[], [], [], [], []]], n2.j[0][0][0] || n2.H();
174
- const e2 = n2.j[0][4], s2 = n2.j[1], o2 = t2.length;
175
- let c2, i2, a2, f2 = 1;
176
- if (4 !== o2 && 6 !== o2 && 8 !== o2) throw new r("invalid aes key size");
177
- for (n2.A = [i2 = t2.slice(0), a2 = []], c2 = o2; c2 < 4 * o2 + 28; c2++) {
178
- let t3 = i2[c2 - 1];
179
- (c2 % o2 === 0 || 8 === o2 && c2 % o2 === 4) && (t3 = e2[t3 >>> 24] << 24 ^ e2[t3 >> 16 & 255] << 16 ^ e2[t3 >> 8 & 255] << 8 ^ e2[255 & t3], c2 % o2 === 0 && (t3 = t3 << 8 ^ t3 >>> 24 ^ f2 << 24, f2 = f2 << 1 ^ 283 * (f2 >> 7))), i2[c2] = i2[c2 - o2] ^ t3;
180
- }
181
- for (let t3 = 0; c2; t3++, c2--) {
182
- const n3 = i2[3 & t3 ? c2 : c2 - 4];
183
- a2[t3] = c2 <= 4 || t3 < 4 ? n3 : s2[0][e2[n3 >>> 24]] ^ s2[1][e2[n3 >> 16 & 255]] ^ s2[2][e2[n3 >> 8 & 255]] ^ s2[3][e2[255 & n3]];
55
+ const V = 64, W = 20, j = new s([128]), K = new s(1), O = new a([1732584193, 4023233417, 2562383102, 271733878, 3285377520]), H = new s(256), L = new a(256), N = new a(256), q = new a(256), G = new a(256);
56
+ let J = false;
57
+ function Q(t2, n2) {
58
+ !(function() {
59
+ if (!J) {
60
+ let t3 = 1, n3 = 1;
61
+ do {
62
+ t3 = 255 & (t3 ^ t3 << 1 ^ (128 & t3 ? 27 : 0)), n3 = 255 & (n3 ^ n3 << 1), n3 = 255 & (n3 ^ n3 << 2), n3 = 255 & (n3 ^ n3 << 4), 128 & n3 && (n3 ^= 9), H[t3] = 255 & (n3 ^ (n3 << 1 | n3 >> 7) ^ (n3 << 2 | n3 >> 6) ^ (n3 << 3 | n3 >> 5) ^ (n3 << 4 | n3 >> 4) ^ 99);
63
+ } while (1 != t3);
64
+ H[0] = 99;
65
+ for (let t4 = 0; t4 < 256; t4++) {
66
+ const n4 = H[t4], e3 = $(n4), o3 = e3 << 24 | n4 << 16 | n4 << 8 | e3 ^ n4;
67
+ L[t4] = o3, N[t4] = o3 >>> 8 | o3 << 24, q[t4] = o3 >>> 16 | o3 << 16, G[t4] = o3 >>> 24 | o3 << 8;
68
+ }
69
+ J = true;
184
70
  }
185
- }
186
- encrypt(t2) {
187
- return this.N(t2, 0);
188
- }
189
- decrypt(t2) {
190
- return this.N(t2, 1);
191
- }
192
- H() {
193
- const t2 = this.j[0], n2 = this.j[1], e2 = t2[4], s2 = n2[4], r2 = [], o2 = [];
194
- let c2, i2, a2, f2;
195
- for (let t3 = 0; t3 < 256; t3++) o2[(r2[t3] = t3 << 1 ^ 283 * (t3 >> 7)) ^ t3] = t3;
196
- for (let u2 = c2 = 0; !e2[u2]; u2 ^= i2 || 1, c2 = o2[c2] || 1) {
197
- let o3 = c2 ^ c2 << 1 ^ c2 << 2 ^ c2 << 3 ^ c2 << 4;
198
- o3 = o3 >> 8 ^ 255 & o3 ^ 99, e2[u2] = o3, s2[o3] = u2, f2 = r2[a2 = r2[i2 = r2[u2]]];
199
- let l2 = 16843009 * f2 ^ 65537 * a2 ^ 257 * i2 ^ 16843008 * u2, w2 = 257 * r2[o3] ^ 16843008 * o3;
200
- for (let e3 = 0; e3 < 4; e3++) t2[e3][u2] = w2 = w2 << 24 ^ w2 >>> 8, n2[e3][o3] = l2 = l2 << 24 ^ l2 >>> 8;
71
+ })();
72
+ const e2 = new a(60), o2 = (function(t3, n3) {
73
+ const e3 = t3.length >> 2, o3 = e3 + 6, r3 = 4 * (o3 + 1);
74
+ let s3 = 1;
75
+ for (let o4 = 0; o4 < e3; o4++) n3[o4] = t3[4 * o4] << 24 | t3[4 * o4 + 1] << 16 | t3[4 * o4 + 2] << 8 | t3[4 * o4 + 3];
76
+ for (let t4 = e3; t4 < r3; t4++) {
77
+ let o4 = n3[t4 - 1];
78
+ t4 % e3 == 0 ? (o4 = Y(o4 << 8 | o4 >>> 24) ^ s3 << 24, s3 = $(s3)) : e3 > 6 && t4 % e3 == 4 && (o4 = Y(o4)), n3[t4] = n3[t4 - e3] ^ o4;
201
79
  }
202
- for (let e3 = 0; e3 < 5; e3++) t2[e3] = t2[e3].slice(0), n2[e3] = n2[e3].slice(0);
203
- }
204
- N(t2, n2) {
205
- if (4 !== t2.length) throw new r("invalid aes block size");
206
- const e2 = this.A[n2], s2 = e2.length / 4 - 2, o2 = [0, 0, 0, 0], c2 = this.j[n2], i2 = c2[0], a2 = c2[1], f2 = c2[2], u2 = c2[3], l2 = c2[4];
207
- let w2, h2, p2, d2 = t2[0] ^ e2[0], y2 = t2[n2 ? 3 : 1] ^ e2[1], m2 = t2[2] ^ e2[2], S2 = t2[n2 ? 1 : 3] ^ e2[3], g2 = 4;
208
- for (let t3 = 0; t3 < s2; t3++) w2 = i2[d2 >>> 24] ^ a2[y2 >> 16 & 255] ^ f2[m2 >> 8 & 255] ^ u2[255 & S2] ^ e2[g2], h2 = i2[y2 >>> 24] ^ a2[m2 >> 16 & 255] ^ f2[S2 >> 8 & 255] ^ u2[255 & d2] ^ e2[g2 + 1], p2 = i2[m2 >>> 24] ^ a2[S2 >> 16 & 255] ^ f2[d2 >> 8 & 255] ^ u2[255 & y2] ^ e2[g2 + 2], S2 = i2[S2 >>> 24] ^ a2[d2 >> 16 & 255] ^ f2[y2 >> 8 & 255] ^ u2[255 & m2] ^ e2[g2 + 3], g2 += 4, d2 = w2, y2 = h2, m2 = p2;
209
- for (let t3 = 0; t3 < 4; t3++) o2[n2 ? 3 & -t3 : t3] = l2[d2 >>> 24] << 24 ^ l2[y2 >> 16 & 255] << 16 ^ l2[m2 >> 8 & 255] << 8 ^ l2[255 & S2] ^ e2[g2++], w2 = d2, d2 = y2, y2 = m2, m2 = S2, S2 = w2;
210
- return o2;
211
- }
212
- }, it = class {
213
- constructor(t2, n2) {
214
- this.G = t2, this.J = n2, this.X = n2;
215
- }
216
- reset() {
217
- this.X = this.J;
218
- }
219
- update(t2) {
220
- return this.Y(this.G, t2, this.X);
221
- }
222
- Z(t2) {
223
- if (255 & ~(t2 >> 24)) t2 += 1 << 24;
224
- else {
225
- let n2 = t2 >> 16 & 255, e2 = t2 >> 8 & 255, s2 = 255 & t2;
226
- 255 === n2 ? (n2 = 0, 255 === e2 ? (e2 = 0, 255 === s2 ? s2 = 0 : ++s2) : ++e2) : ++n2, t2 = 0, t2 += n2 << 16, t2 += e2 << 8, t2 += s2;
80
+ return o3;
81
+ })(t2, e2), r2 = new a(4), s2 = X(n2);
82
+ let c2 = 0, i2 = 0, f2 = 0, w2 = 0;
83
+ return { process(t3, n3) {
84
+ n3 && s2.update(t3, 0, t3.length), (function(t4) {
85
+ const n4 = new u(t4.buffer, t4.byteOffset, t4.byteLength), e3 = t4.length;
86
+ let o3 = 0;
87
+ for (; o3 + 16 <= e3; o3 += 16) l2(), n4.setInt32(o3, n4.getInt32(o3) ^ r2[0]), n4.setInt32(o3 + 4, n4.getInt32(o3 + 4) ^ r2[1]), n4.setInt32(o3 + 8, n4.getInt32(o3 + 8) ^ r2[2]), n4.setInt32(o3 + 12, n4.getInt32(o3 + 12) ^ r2[3]);
88
+ if (o3 < e3) {
89
+ l2();
90
+ for (let n5 = 0; o3 < e3; o3++, n5++) t4[o3] ^= r2[n5 >> 2] >>> 24 - 8 * (3 & n5);
91
+ }
92
+ })(t3), n3 || s2.update(t3, 0, t3.length);
93
+ }, digest: () => s2.digest() };
94
+ function l2() {
95
+ c2 = c2 + 1 | 0, c2 || (i2 = i2 + 1 | 0, i2 || (f2 = f2 + 1 | 0, f2 || (w2 = w2 + 1 | 0)));
96
+ let t3 = Z(c2) ^ e2[0], n3 = Z(i2) ^ e2[1], s3 = Z(f2) ^ e2[2], a2 = Z(w2) ^ e2[3], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[4], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[5], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[6], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[7];
97
+ t3 = L[u2 >>> 24] ^ N[l3 >>> 16 & 255] ^ q[h2 >>> 8 & 255] ^ G[255 & p2] ^ e2[8], n3 = L[l3 >>> 24] ^ N[h2 >>> 16 & 255] ^ q[p2 >>> 8 & 255] ^ G[255 & u2] ^ e2[9], s3 = L[h2 >>> 24] ^ N[p2 >>> 16 & 255] ^ q[u2 >>> 8 & 255] ^ G[255 & l3] ^ e2[10], a2 = L[p2 >>> 24] ^ N[u2 >>> 16 & 255] ^ q[l3 >>> 8 & 255] ^ G[255 & h2] ^ e2[11], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[12], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[13], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[14], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[15], t3 = L[u2 >>> 24] ^ N[l3 >>> 16 & 255] ^ q[h2 >>> 8 & 255] ^ G[255 & p2] ^ e2[16], n3 = L[l3 >>> 24] ^ N[h2 >>> 16 & 255] ^ q[p2 >>> 8 & 255] ^ G[255 & u2] ^ e2[17], s3 = L[h2 >>> 24] ^ N[p2 >>> 16 & 255] ^ q[u2 >>> 8 & 255] ^ G[255 & l3] ^ e2[18], a2 = L[p2 >>> 24] ^ N[u2 >>> 16 & 255] ^ q[l3 >>> 8 & 255] ^ G[255 & h2] ^ e2[19], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[20], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[21], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[22], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[23], t3 = L[u2 >>> 24] ^ N[l3 >>> 16 & 255] ^ q[h2 >>> 8 & 255] ^ G[255 & p2] ^ e2[24], n3 = L[l3 >>> 24] ^ N[h2 >>> 16 & 255] ^ q[p2 >>> 8 & 255] ^ G[255 & u2] ^ e2[25], s3 = L[h2 >>> 24] ^ N[p2 >>> 16 & 255] ^ q[u2 >>> 8 & 255] ^ G[255 & l3] ^ e2[26], a2 = L[p2 >>> 24] ^ N[u2 >>> 16 & 255] ^ q[l3 >>> 8 & 255] ^ G[255 & h2] ^ e2[27], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[28], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[29], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[30], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[31], t3 = L[u2 >>> 24] ^ N[l3 >>> 16 & 255] ^ q[h2 >>> 8 & 255] ^ G[255 & p2] ^ e2[32], n3 = L[l3 >>> 24] ^ N[h2 >>> 16 & 255] ^ q[p2 >>> 8 & 255] ^ G[255 & u2] ^ e2[33], s3 = L[h2 >>> 24] ^ N[p2 >>> 16 & 255] ^ q[u2 >>> 8 & 255] ^ G[255 & l3] ^ e2[34], a2 = L[p2 >>> 24] ^ N[u2 >>> 16 & 255] ^ q[l3 >>> 8 & 255] ^ G[255 & h2] ^ e2[35], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[36], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[37], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[38], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[39];
98
+ let d2 = 40;
99
+ o2 > 10 && (t3 = L[u2 >>> 24] ^ N[l3 >>> 16 & 255] ^ q[h2 >>> 8 & 255] ^ G[255 & p2] ^ e2[40], n3 = L[l3 >>> 24] ^ N[h2 >>> 16 & 255] ^ q[p2 >>> 8 & 255] ^ G[255 & u2] ^ e2[41], s3 = L[h2 >>> 24] ^ N[p2 >>> 16 & 255] ^ q[u2 >>> 8 & 255] ^ G[255 & l3] ^ e2[42], a2 = L[p2 >>> 24] ^ N[u2 >>> 16 & 255] ^ q[l3 >>> 8 & 255] ^ G[255 & h2] ^ e2[43], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[44], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[45], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[46], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[47], d2 = 48), o2 > 12 && (t3 = L[u2 >>> 24] ^ N[l3 >>> 16 & 255] ^ q[h2 >>> 8 & 255] ^ G[255 & p2] ^ e2[48], n3 = L[l3 >>> 24] ^ N[h2 >>> 16 & 255] ^ q[p2 >>> 8 & 255] ^ G[255 & u2] ^ e2[49], s3 = L[h2 >>> 24] ^ N[p2 >>> 16 & 255] ^ q[u2 >>> 8 & 255] ^ G[255 & l3] ^ e2[50], a2 = L[p2 >>> 24] ^ N[u2 >>> 16 & 255] ^ q[l3 >>> 8 & 255] ^ G[255 & h2] ^ e2[51], u2 = L[t3 >>> 24] ^ N[n3 >>> 16 & 255] ^ q[s3 >>> 8 & 255] ^ G[255 & a2] ^ e2[52], l3 = L[n3 >>> 24] ^ N[s3 >>> 16 & 255] ^ q[a2 >>> 8 & 255] ^ G[255 & t3] ^ e2[53], h2 = L[s3 >>> 24] ^ N[a2 >>> 16 & 255] ^ q[t3 >>> 8 & 255] ^ G[255 & n3] ^ e2[54], p2 = L[a2 >>> 24] ^ N[t3 >>> 16 & 255] ^ q[n3 >>> 8 & 255] ^ G[255 & s3] ^ e2[55], d2 = 56), r2[0] = (H[u2 >>> 24] << 24 | H[l3 >>> 16 & 255] << 16 | H[h2 >>> 8 & 255] << 8 | H[255 & p2]) ^ e2[d2], r2[1] = (H[l3 >>> 24] << 24 | H[h2 >>> 16 & 255] << 16 | H[p2 >>> 8 & 255] << 8 | H[255 & u2]) ^ e2[d2 + 1], r2[2] = (H[h2 >>> 24] << 24 | H[p2 >>> 16 & 255] << 16 | H[u2 >>> 8 & 255] << 8 | H[255 & l3]) ^ e2[d2 + 2], r2[3] = (H[p2 >>> 24] << 24 | H[u2 >>> 16 & 255] << 16 | H[l3 >>> 8 & 255] << 8 | H[255 & h2]) ^ e2[d2 + 3];
100
+ }
101
+ }
102
+ function X(t2) {
103
+ const n2 = (function() {
104
+ const t3 = new a(O), n3 = new a(16), e3 = new s(V), r3 = new u(e3.buffer), c2 = new s(8);
105
+ let i2 = 0, f2 = 0;
106
+ return { update: w2, digest: function() {
107
+ const n4 = 8 * f2, e4 = o.floor(n4 / 4294967296), r4 = n4 >>> 0;
108
+ for (w2(j, 0, 1); 56 != i2; ) w2(K, 0, 1);
109
+ c2[0] = e4 >>> 24, c2[1] = e4 >>> 16, c2[2] = e4 >>> 8, c2[3] = e4, c2[4] = r4 >>> 24, c2[5] = r4 >>> 16, c2[6] = r4 >>> 8, c2[7] = r4, w2(c2, 0, 8);
110
+ const a2 = new s(W), l3 = new u(a2.buffer);
111
+ for (let n5 = 0; n5 < t3.length; n5++) l3.setInt32(4 * n5, t3[n5]);
112
+ return t3.set(O), i2 = 0, f2 = 0, a2;
113
+ } };
114
+ function w2(t4, n4, o2) {
115
+ const s2 = n4 + o2;
116
+ if (f2 += o2, i2) {
117
+ for (; n4 < s2 && i2 < V; ) e3[i2++] = t4[n4++];
118
+ i2 == V && (l2(r3, 0), i2 = 0);
119
+ }
120
+ if (n4 + V <= s2) {
121
+ const e4 = new u(t4.buffer, t4.byteOffset, t4.byteLength);
122
+ for (; n4 + V <= s2; n4 += V) l2(e4, n4);
123
+ }
124
+ for (; n4 < s2; ) e3[i2++] = t4[n4++];
227
125
  }
228
- return t2;
229
- }
230
- $(t2) {
231
- 0 === (t2[0] = this.Z(t2[0])) && (t2[1] = this.Z(t2[1]));
232
- }
233
- Y(t2, n2, e2) {
234
- let s2;
235
- if (!(s2 = n2.length)) return [];
236
- const r2 = T.bitLength(n2);
237
- for (let r3 = 0; r3 < s2; r3 += 4) {
238
- this.$(e2);
239
- const s3 = t2.encrypt(e2);
240
- n2[r3] ^= s3[0], n2[r3 + 1] ^= s3[1], n2[r3 + 2] ^= s3[2], n2[r3 + 3] ^= s3[3];
126
+ function l2(e4, o2) {
127
+ for (let t4 = 0; t4 < 16; t4++) n3[t4] = e4.getInt32(o2 + 4 * t4);
128
+ let r4, s2 = t3[0], c3 = t3[1], i3 = t3[2], a2 = t3[3], f3 = t3[4];
129
+ for (let t4 = 0; t4 < 15; t4 += 5) f3 = (s2 << 5 | s2 >>> 27) + ((i3 ^ a2) & c3 ^ a2) + f3 + 1518500249 + n3[t4] | 0, c3 = c3 << 30 | c3 >>> 2, a2 = (f3 << 5 | f3 >>> 27) + ((c3 ^ i3) & s2 ^ i3) + a2 + 1518500249 + n3[t4 + 1] | 0, s2 = s2 << 30 | s2 >>> 2, i3 = (a2 << 5 | a2 >>> 27) + ((s2 ^ c3) & f3 ^ c3) + i3 + 1518500249 + n3[t4 + 2] | 0, f3 = f3 << 30 | f3 >>> 2, c3 = (i3 << 5 | i3 >>> 27) + ((f3 ^ s2) & a2 ^ s2) + c3 + 1518500249 + n3[t4 + 3] | 0, a2 = a2 << 30 | a2 >>> 2, s2 = (c3 << 5 | c3 >>> 27) + ((a2 ^ f3) & i3 ^ f3) + s2 + 1518500249 + n3[t4 + 4] | 0, i3 = i3 << 30 | i3 >>> 2;
130
+ f3 = (s2 << 5 | s2 >>> 27) + ((i3 ^ a2) & c3 ^ a2) + f3 + 1518500249 + n3[15] | 0, c3 = c3 << 30 | c3 >>> 2, r4 = n3[13] ^ n3[8] ^ n3[2] ^ n3[0], r4 = r4 << 1 | r4 >>> 31, n3[0] = r4, a2 = (f3 << 5 | f3 >>> 27) + ((c3 ^ i3) & s2 ^ i3) + a2 + 1518500249 + r4 | 0, s2 = s2 << 30 | s2 >>> 2, r4 = n3[14] ^ n3[9] ^ n3[3] ^ n3[1], r4 = r4 << 1 | r4 >>> 31, n3[1] = r4, i3 = (a2 << 5 | a2 >>> 27) + ((s2 ^ c3) & f3 ^ c3) + i3 + 1518500249 + r4 | 0, f3 = f3 << 30 | f3 >>> 2, r4 = n3[15] ^ n3[10] ^ n3[4] ^ n3[2], r4 = r4 << 1 | r4 >>> 31, n3[2] = r4, c3 = (i3 << 5 | i3 >>> 27) + ((f3 ^ s2) & a2 ^ s2) + c3 + 1518500249 + r4 | 0, a2 = a2 << 30 | a2 >>> 2, r4 = n3[0] ^ n3[11] ^ n3[5] ^ n3[3], r4 = r4 << 1 | r4 >>> 31, n3[3] = r4, s2 = (c3 << 5 | c3 >>> 27) + ((a2 ^ f3) & i3 ^ f3) + s2 + 1518500249 + r4 | 0, i3 = i3 << 30 | i3 >>> 2;
131
+ for (let t4 = 20; t4 < 40; t4 += 5) r4 = n3[t4 - 3 & 15] ^ n3[t4 - 8 & 15] ^ n3[t4 - 14 & 15] ^ n3[15 & t4], r4 = r4 << 1 | r4 >>> 31, n3[15 & t4] = r4, f3 = (s2 << 5 | s2 >>> 27) + (c3 ^ i3 ^ a2) + f3 + 1859775393 + r4 | 0, c3 = c3 << 30 | c3 >>> 2, r4 = n3[t4 - 2 & 15] ^ n3[t4 - 7 & 15] ^ n3[t4 - 13 & 15] ^ n3[t4 + 1 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 1 & 15] = r4, a2 = (f3 << 5 | f3 >>> 27) + (s2 ^ c3 ^ i3) + a2 + 1859775393 + r4 | 0, s2 = s2 << 30 | s2 >>> 2, r4 = n3[t4 - 1 & 15] ^ n3[t4 - 6 & 15] ^ n3[t4 - 12 & 15] ^ n3[t4 + 2 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 2 & 15] = r4, i3 = (a2 << 5 | a2 >>> 27) + (f3 ^ s2 ^ c3) + i3 + 1859775393 + r4 | 0, f3 = f3 << 30 | f3 >>> 2, r4 = n3[15 & t4] ^ n3[t4 - 5 & 15] ^ n3[t4 - 11 & 15] ^ n3[t4 + 3 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 3 & 15] = r4, c3 = (i3 << 5 | i3 >>> 27) + (a2 ^ f3 ^ s2) + c3 + 1859775393 + r4 | 0, a2 = a2 << 30 | a2 >>> 2, r4 = n3[t4 + 1 & 15] ^ n3[t4 - 4 & 15] ^ n3[t4 - 10 & 15] ^ n3[t4 + 4 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 4 & 15] = r4, s2 = (c3 << 5 | c3 >>> 27) + (i3 ^ a2 ^ f3) + s2 + 1859775393 + r4 | 0, i3 = i3 << 30 | i3 >>> 2;
132
+ for (let t4 = 40; t4 < 60; t4 += 5) r4 = n3[t4 - 3 & 15] ^ n3[t4 - 8 & 15] ^ n3[t4 - 14 & 15] ^ n3[15 & t4], r4 = r4 << 1 | r4 >>> 31, n3[15 & t4] = r4, f3 = (s2 << 5 | s2 >>> 27) + (c3 & i3 | (c3 | i3) & a2) + f3 + 2400959708 + r4 | 0, c3 = c3 << 30 | c3 >>> 2, r4 = n3[t4 - 2 & 15] ^ n3[t4 - 7 & 15] ^ n3[t4 - 13 & 15] ^ n3[t4 + 1 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 1 & 15] = r4, a2 = (f3 << 5 | f3 >>> 27) + (s2 & c3 | (s2 | c3) & i3) + a2 + 2400959708 + r4 | 0, s2 = s2 << 30 | s2 >>> 2, r4 = n3[t4 - 1 & 15] ^ n3[t4 - 6 & 15] ^ n3[t4 - 12 & 15] ^ n3[t4 + 2 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 2 & 15] = r4, i3 = (a2 << 5 | a2 >>> 27) + (f3 & s2 | (f3 | s2) & c3) + i3 + 2400959708 + r4 | 0, f3 = f3 << 30 | f3 >>> 2, r4 = n3[15 & t4] ^ n3[t4 - 5 & 15] ^ n3[t4 - 11 & 15] ^ n3[t4 + 3 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 3 & 15] = r4, c3 = (i3 << 5 | i3 >>> 27) + (a2 & f3 | (a2 | f3) & s2) + c3 + 2400959708 + r4 | 0, a2 = a2 << 30 | a2 >>> 2, r4 = n3[t4 + 1 & 15] ^ n3[t4 - 4 & 15] ^ n3[t4 - 10 & 15] ^ n3[t4 + 4 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 4 & 15] = r4, s2 = (c3 << 5 | c3 >>> 27) + (i3 & a2 | (i3 | a2) & f3) + s2 + 2400959708 + r4 | 0, i3 = i3 << 30 | i3 >>> 2;
133
+ for (let t4 = 60; t4 < 80; t4 += 5) r4 = n3[t4 - 3 & 15] ^ n3[t4 - 8 & 15] ^ n3[t4 - 14 & 15] ^ n3[15 & t4], r4 = r4 << 1 | r4 >>> 31, n3[15 & t4] = r4, f3 = (s2 << 5 | s2 >>> 27) + (c3 ^ i3 ^ a2) + f3 + 3395469782 + r4 | 0, c3 = c3 << 30 | c3 >>> 2, r4 = n3[t4 - 2 & 15] ^ n3[t4 - 7 & 15] ^ n3[t4 - 13 & 15] ^ n3[t4 + 1 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 1 & 15] = r4, a2 = (f3 << 5 | f3 >>> 27) + (s2 ^ c3 ^ i3) + a2 + 3395469782 + r4 | 0, s2 = s2 << 30 | s2 >>> 2, r4 = n3[t4 - 1 & 15] ^ n3[t4 - 6 & 15] ^ n3[t4 - 12 & 15] ^ n3[t4 + 2 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 2 & 15] = r4, i3 = (a2 << 5 | a2 >>> 27) + (f3 ^ s2 ^ c3) + i3 + 3395469782 + r4 | 0, f3 = f3 << 30 | f3 >>> 2, r4 = n3[15 & t4] ^ n3[t4 - 5 & 15] ^ n3[t4 - 11 & 15] ^ n3[t4 + 3 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 3 & 15] = r4, c3 = (i3 << 5 | i3 >>> 27) + (a2 ^ f3 ^ s2) + c3 + 3395469782 + r4 | 0, a2 = a2 << 30 | a2 >>> 2, r4 = n3[t4 + 1 & 15] ^ n3[t4 - 4 & 15] ^ n3[t4 - 10 & 15] ^ n3[t4 + 4 & 15], r4 = r4 << 1 | r4 >>> 31, n3[t4 + 4 & 15] = r4, s2 = (c3 << 5 | c3 >>> 27) + (i3 ^ a2 ^ f3) + s2 + 3395469782 + r4 | 0, i3 = i3 << 30 | i3 >>> 2;
134
+ t3[0] = t3[0] + s2 | 0, t3[1] = t3[1] + c3 | 0, t3[2] = t3[2] + i3 | 0, t3[3] = t3[3] + a2 | 0, t3[4] = t3[4] + f3 | 0;
241
135
  }
242
- return T.m(n2, r2);
243
- }
244
- }, at = E._;
245
- let ft = et && rt && typeof st.importKey == k, ut = et && rt && typeof st.deriveBits == k;
246
- class lt extends d {
247
- constructor({ password: t2, rawPassword: n2, encryptionStrength: e2, checkPasswordOnly: s2, checkAuthenticationCode: c2 = true }) {
136
+ })(), e2 = new s(V), r2 = new s(V);
137
+ t2.length > V && (n2.update(t2, 0, t2.length), t2 = n2.digest());
138
+ for (let n3 = 0; n3 < V; n3++) {
139
+ const o2 = n3 < t2.length ? t2[n3] : 0;
140
+ e2[n3] = 54 ^ o2, r2[n3] = 92 ^ o2;
141
+ }
142
+ return n2.update(e2, 0, V), { update(t3, e3, o2) {
143
+ n2.update(t3, e3, o2);
144
+ }, digest() {
145
+ const t3 = n2.digest();
146
+ n2.update(r2, 0, V), n2.update(t3, 0, W);
147
+ const o2 = n2.digest();
148
+ return n2.update(e2, 0, V), o2;
149
+ } };
150
+ }
151
+ function Y(t2) {
152
+ return H[t2 >>> 24] << 24 | H[t2 >>> 16 & 255] << 16 | H[t2 >>> 8 & 255] << 8 | H[255 & t2];
153
+ }
154
+ function Z(t2) {
155
+ return t2 << 24 | (65280 & t2) << 8 | t2 >>> 8 & 65280 | t2 >>> 24;
156
+ }
157
+ function $(t2) {
158
+ return 255 & (t2 << 1 ^ 27 * (t2 >> 7));
159
+ }
160
+ const _ = typeof h != z && typeof h.getRandomValues == b, tt = "Invalid password", nt = "zipjs-abort-check-password";
161
+ function et(t2) {
162
+ if (_) return h.getRandomValues(t2);
163
+ throw new r("Crypto API not supported");
164
+ }
165
+ const ot = { name: "PBKDF2" }, rt = n.assign({ hash: { name: "HMAC" } }, ot), st = n.assign({ iterations: 1e3, hash: { name: "SHA-1" } }, ot), ct = ["deriveBits"], it = [8, 12, 16], at = [16, 24, 32], ft = 10, ut = typeof h != z, wt = ut && h.subtle;
166
+ let lt = ut && typeof wt != z && typeof wt.importKey == b && typeof wt.deriveBits == b, ht = Q;
167
+ class pt extends d {
168
+ constructor({ password: t2, rawPassword: n2, encryptionStrength: e2, checkPasswordOnly: o2, checkAuthenticationCode: c2 = true }) {
248
169
  super({ start() {
249
- ht(this, t2, n2, e2);
170
+ yt(this, t2, n2, e2);
250
171
  }, async transform(t3, n3) {
251
- const e3 = this, { password: c3, strength: i2, nt: a2, ready: f2 } = e3;
252
- c3 ? (await (async function(t4, n4, e4, s3) {
253
- const o2 = await dt(t4, n4, e4, mt(s3, 0, Z[n4])), c4 = mt(s3, Z[n4]);
254
- if (o2[0] != c4[0] || o2[1] != c4[1]) throw new r(O);
255
- })(e3, i2, c3, mt(t3, 0, Z[i2] + 2)), t3 = mt(t3, Z[i2] + 2), s2 ? n3.error(new r(N)) : a2()) : await f2;
256
- const u2 = new o(t3.length - tt - (t3.length - tt) % G);
257
- n3.enqueue(pt(e3, t3, u2, 0, tt, true));
172
+ const e3 = this, { password: c3, strength: i2, l: a2, ready: f2 } = e3;
173
+ c3 ? (await (async function(t4, n4, e4, o3) {
174
+ const s2 = await gt(t4, n4, e4, zt(o3, 0, it[n4])), c4 = zt(o3, it[n4]);
175
+ if (s2[0] != c4[0] || s2[1] != c4[1]) throw St(t4), new r(tt);
176
+ })(e3, i2, c3, zt(t3, 0, it[i2] + 2)), t3 = zt(t3, it[i2] + 2), o2 ? (St(e3), n3.error(new r(nt))) : a2()) : await f2;
177
+ const u2 = new s(t3.length - ft - (t3.length - ft) % 16);
178
+ n3.enqueue(mt(e3, t3, u2, 0, ft, true));
258
179
  }, async flush(t3) {
259
- const { et: n3, st: e3, ot: s3, ready: o2 } = this;
260
- if (e3 && n3) {
261
- await o2;
262
- const i2 = mt(s3, 0, s3.length - tt), a2 = mt(s3, s3.length - tt);
263
- let f2 = z;
264
- if (i2.length) {
265
- const t4 = gt(ot, i2);
266
- e3.update(t4);
267
- const s4 = n3.update(t4);
268
- f2 = St(ot, s4);
269
- }
270
- const u2 = mt(St(ot, e3.digest()), 0, tt);
271
- let l2 = s3.length < tt ? 1 : 0;
272
- for (let t4 = 0; t4 < tt; t4++) l2 |= u2[t4] ^ a2[t4];
273
- if (l2 && c2) throw new r(H);
274
- t3.enqueue(f2);
180
+ const { h: n3, m: e3, ready: o3 } = this;
181
+ if (n3) {
182
+ await o3;
183
+ const i2 = zt(e3, e3.length - ft), a2 = new s(zt(e3, 0, e3.length - ft));
184
+ n3.process(a2, true);
185
+ const f2 = n3.digest();
186
+ let u2 = e3.length < ft ? 1 : 0;
187
+ for (let t4 = 0; t4 < ft; t4++) u2 |= f2[t4] ^ i2[t4];
188
+ if (u2 && c2) throw new r("Invalid authentication code");
189
+ t3.enqueue(a2);
275
190
  }
191
+ }, cancel() {
192
+ St(this);
276
193
  } });
277
194
  }
278
195
  }
279
- class wt extends d {
196
+ class dt extends d {
280
197
  constructor({ password: t2, rawPassword: n2, encryptionStrength: e2 }) {
281
198
  super({ start() {
282
- ht(this, t2, n2, e2);
199
+ yt(this, t2, n2, e2);
283
200
  }, async transform(t3, n3) {
284
- const e3 = this, { password: s2, strength: r2, nt: c2, ready: i2 } = e3;
285
- let a2 = z;
286
- s2 ? (a2 = await (async function(t4, n4, e4) {
287
- const s3 = q(new o(Z[n4]));
288
- return W(s3, await dt(t4, n4, e4, s3));
289
- })(e3, r2, s2), c2()) : await i2;
290
- const f2 = new o(a2.length + t3.length - t3.length % G);
291
- f2.set(a2, 0), n3.enqueue(pt(e3, t3, f2, a2.length, 0));
201
+ const e3 = this, { password: o2, strength: r2, l: c2, ready: i2 } = e3;
202
+ let a2 = k;
203
+ o2 ? (a2 = await (async function(t4, n4, e4) {
204
+ const o3 = et(new s(it[n4]));
205
+ return B(o3, await gt(t4, n4, e4, o3));
206
+ })(e3, r2, o2), c2()) : await i2;
207
+ const f2 = new s(a2.length + t3.length - t3.length % 16);
208
+ f2.set(a2, 0), n3.enqueue(mt(e3, t3, f2, a2.length, 0, false));
292
209
  }, async flush(t3) {
293
- const { et: n3, st: e3, ot: s2, ready: r2 } = this;
294
- if (e3 && n3) {
295
- await r2;
296
- let o2 = z;
297
- if (s2.length) {
298
- const t4 = n3.update(gt(ot, s2));
299
- e3.update(t4), o2 = St(ot, t4);
300
- }
301
- const c2 = St(ot, e3.digest()).slice(0, tt);
302
- t3.enqueue(W(o2, c2));
210
+ const { h: n3, m: e3, ready: o2 } = this;
211
+ if (n3) {
212
+ await o2;
213
+ const r2 = new s(e3);
214
+ n3.process(r2, false);
215
+ const c2 = zt(n3.digest(), 0, ft);
216
+ t3.enqueue(B(r2, c2));
303
217
  }
218
+ }, cancel() {
219
+ St(this);
304
220
  } });
305
221
  }
306
222
  }
307
- function ht(t2, e2, s2, r2) {
308
- n.assign(t2, { ready: new l((n2) => t2.nt = n2), password: yt(e2, s2), strength: r2 - 1, ot: z });
223
+ function yt(t2, e2, o2, r2) {
224
+ n.assign(t2, { ready: new w((n2) => t2.l = n2), password: vt(e2, o2), strength: r2 - 1, m: k });
309
225
  }
310
- function pt(t2, n2, e2, s2, r2, c2) {
311
- const { et: i2, st: a2, ot: f2 } = t2;
312
- f2.length && (n2 = W(f2, n2));
313
- const u2 = n2.length - r2;
314
- let l2;
315
- for (e2 = (function(t3, n3) {
226
+ function mt(t2, n2, e2, o2, r2, c2) {
227
+ const { h: i2, m: a2 } = t2;
228
+ a2.length && (n2 = B(a2, n2));
229
+ const f2 = n2.length - r2, u2 = f2 - f2 % 16;
230
+ if (e2 = (function(t3, n3) {
316
231
  if (n3 && n3 > t3.length) {
317
232
  const e3 = t3;
318
- (t3 = new o(n3)).set(e3, 0);
233
+ (t3 = new s(n3)).set(e3, 0);
319
234
  }
320
235
  return t3;
321
- })(e2, s2 + (u2 - u2 % G)), l2 = 0; l2 <= u2 - G; l2 += G) {
322
- const t3 = gt(ot, mt(n2, l2, l2 + G));
323
- c2 && a2.update(t3);
324
- const r3 = i2.update(t3);
325
- c2 || a2.update(r3), e2.set(St(ot, r3), l2 + s2);
236
+ })(e2, o2 + u2), u2) {
237
+ const t3 = zt(e2, o2, o2 + u2);
238
+ t3.set(zt(n2, 0, u2)), i2.process(t3, c2);
326
239
  }
327
- return t2.ot = mt(n2, l2), e2;
240
+ return t2.m = zt(n2, u2), e2;
328
241
  }
329
- async function dt(e2, s2, r2, c2) {
330
- e2.password = null;
331
- const i2 = await (async function(t2, n2, e3, s3, r3) {
332
- if (!ft) return E.importKey(n2);
333
- try {
334
- return await st.importKey("raw", n2, e3, false, r3);
335
- } catch {
336
- return ft = false, E.importKey(n2);
337
- }
338
- })(0, r2, Q, 0, Y), a2 = await (async function(t2, n2, e3) {
339
- if (!ut) return E.T(n2, t2.salt, X.iterations, e3);
340
- try {
341
- return await st.deriveBits(t2, n2, e3);
242
+ function St({ h: t2 }) {
243
+ t2 && t2.dispose && t2.dispose();
244
+ }
245
+ async function gt(t2, e2, r2, c2) {
246
+ t2.password = null;
247
+ const i2 = at[e2], a2 = await (async function(t3, e3, r3) {
248
+ if (lt) try {
249
+ const o2 = await wt.importKey("raw", t3, rt, false, ct);
250
+ return new s(await wt.deriveBits(n.assign({ salt: e3 }, st), o2, 8 * r3));
342
251
  } catch {
343
- return ut = false, E.T(n2, t2.salt, X.iterations, e3);
252
+ lt = false;
344
253
  }
345
- })(n.assign({ salt: c2 }, X), i2, 8 * (2 * $[s2] + 2)), f2 = new o(a2), u2 = gt(ot, mt(f2, 0, $[s2])), l2 = gt(ot, mt(f2, $[s2], 2 * $[s2])), w2 = mt(f2, 2 * $[s2]);
346
- return n.assign(e2, { keys: { key: u2, ct: l2, passwordVerification: w2 }, et: new it(new ct(u2), t.from(nt)), st: new at(l2) }), w2;
254
+ return (function(t4, n2, e4, r4) {
255
+ const c3 = X(t4), i3 = new s(r4), a3 = new s(n2.length + 4), f2 = new u(a3.buffer);
256
+ a3.set(n2);
257
+ for (let t5 = 1, e5 = 0; e5 < r4; t5++, e5 += W) {
258
+ f2.setUint32(n2.length, t5), c3.update(a3, 0, a3.length);
259
+ let s2 = c3.digest();
260
+ const u2 = s2.slice();
261
+ for (let t6 = 1; t6 < 1e3; t6++) {
262
+ c3.update(s2, 0, W), s2 = c3.digest();
263
+ for (let t7 = 0; t7 < W; t7++) u2[t7] ^= s2[t7];
264
+ }
265
+ i3.set(u2.subarray(0, o.min(W, r4 - e5)), e5);
266
+ }
267
+ return i3;
268
+ })(t3, e3, 0, r3);
269
+ })(r2, c2, 2 * i2 + 2);
270
+ return t2.h = ht(zt(a2, 0, i2), zt(a2, i2, 2 * i2)), zt(a2, 2 * i2);
347
271
  }
348
- function yt(t2, n2) {
272
+ function vt(t2, n2) {
349
273
  return n2 === v ? (function(t3) {
350
- if (typeof w == b) {
274
+ if (typeof l == z) {
351
275
  t3 = unescape(encodeURIComponent(t3));
352
- const n3 = new o(t3.length);
276
+ const n3 = new s(t3.length);
353
277
  for (let e2 = 0; e2 < n3.length; e2++) n3[e2] = t3.charCodeAt(e2);
354
278
  return n3;
355
279
  }
356
- return new w().encode(t3);
280
+ return new l().encode(t3);
357
281
  })(t2) : n2;
358
282
  }
359
- function mt(t2, n2, e2) {
283
+ function zt(t2, n2, e2) {
360
284
  return t2.subarray(n2, e2);
361
285
  }
362
- function St(t2, n2) {
363
- return t2.v(n2);
364
- }
365
- function gt(t2, n2) {
366
- return t2.C(n2);
367
- }
368
- class vt extends d {
369
- constructor({ password: t2, rawPassword: n2, passwordVerification: e2, checkPasswordOnly: s2 }) {
286
+ class bt extends d {
287
+ constructor({ password: t2, rawPassword: n2, passwordVerification: e2, checkPasswordOnly: o2 }) {
370
288
  super({ start() {
371
- kt(this, t2, n2, e2);
289
+ Ct(this, t2, n2, e2);
372
290
  }, transform(t3, n3) {
373
291
  const e3 = this;
374
292
  if (e3.password || e3.rawPassword) {
375
- const n4 = zt(e3, t3.subarray(0, 12));
376
- if (e3.password = e3.rawPassword = null, 0 != (n4[11] ^ e3.passwordVerification)) throw new r(O);
293
+ const n4 = It(e3, t3.subarray(0, 12));
294
+ if (e3.password = e3.rawPassword = null, 0 != (n4[11] ^ e3.passwordVerification)) throw new r(tt);
377
295
  t3 = t3.subarray(12);
378
296
  }
379
- s2 ? n3.error(new r(N)) : n3.enqueue(zt(e3, t3));
297
+ o2 ? n3.error(new r(nt)) : n3.enqueue(It(e3, t3));
380
298
  } });
381
299
  }
382
300
  }
383
- class bt extends d {
301
+ class kt extends d {
384
302
  constructor({ password: t2, rawPassword: n2, passwordVerification: e2 }) {
385
303
  super({ start() {
386
- kt(this, t2, n2, e2);
304
+ Ct(this, t2, n2, e2);
387
305
  }, transform(t3, n3) {
388
306
  const e3 = this;
389
- let s2, r2;
307
+ let o2, r2;
390
308
  if (e3.password || e3.rawPassword) {
391
309
  e3.password = e3.rawPassword = null;
392
- const n4 = q(new o(12));
393
- n4[11] = e3.passwordVerification, s2 = new o(t3.length + n4.length), s2.set(Ct(e3, n4), 0), r2 = 12;
394
- } else s2 = new o(t3.length), r2 = 0;
395
- s2.set(Ct(e3, t3), r2), n3.enqueue(s2);
310
+ const n4 = et(new s(12));
311
+ n4[11] = e3.passwordVerification, o2 = new s(t3.length + n4.length), o2.set(At(e3, n4), 0), r2 = 12;
312
+ } else o2 = new s(t3.length), r2 = 0;
313
+ o2.set(At(e3, t3), r2), n3.enqueue(o2);
396
314
  } });
397
315
  }
398
316
  }
399
- function kt(t2, e2, s2, r2) {
400
- n.assign(t2, { password: e2, rawPassword: s2, passwordVerification: r2 }), (function(t3, e3, s3) {
317
+ function Ct(t2, e2, o2, r2) {
318
+ n.assign(t2, { password: e2, rawPassword: o2, passwordVerification: r2 }), (function(t3, e3, o3) {
401
319
  const r3 = [305419896, 591751049, 878082192];
402
- if (n.assign(t3, { keys: r3, it: new R(r3[0]), ft: new R(r3[2]) }), s3) for (let n2 = 0; n2 < s3.length; n2++) It(t3, s3[n2]);
403
- else for (let n2 = 0; n2 < e3.length; n2++) It(t3, e3.charCodeAt(n2));
404
- })(t2, e2, s2);
320
+ if (n.assign(t3, { keys: r3, S: new R(r3[0]), v: new R(r3[2]) }), o3) for (let n2 = 0; n2 < o3.length; n2++) xt(t3, o3[n2]);
321
+ else for (let n2 = 0; n2 < e3.length; n2++) xt(t3, e3.charCodeAt(n2));
322
+ })(t2, e2, o2);
405
323
  }
406
- function zt(t2, n2) {
407
- const e2 = new o(n2.length);
408
- for (let s2 = 0; s2 < n2.length; s2++) e2[s2] = At(t2) ^ n2[s2], It(t2, e2[s2]);
324
+ function It(t2, n2) {
325
+ const e2 = new s(n2.length);
326
+ for (let o2 = 0; o2 < n2.length; o2++) e2[o2] = Mt(t2) ^ n2[o2], xt(t2, e2[o2]);
409
327
  return e2;
410
328
  }
411
- function Ct(t2, n2) {
412
- const e2 = new o(n2.length);
413
- for (let s2 = 0; s2 < n2.length; s2++) e2[s2] = At(t2) ^ n2[s2], It(t2, n2[s2]);
329
+ function At(t2, n2) {
330
+ const e2 = new s(n2.length);
331
+ for (let o2 = 0; o2 < n2.length; o2++) e2[o2] = Mt(t2) ^ n2[o2], xt(t2, n2[o2]);
414
332
  return e2;
415
333
  }
416
- function It(t2, n2) {
334
+ function xt(t2, n2) {
417
335
  let [, e2] = t2.keys;
418
- t2.it.append([n2]);
419
- const r2 = ~t2.it.get();
420
- e2 = Mt(s.imul(Mt(e2 + xt(r2)), 134775813) + 1), t2.ft.append([e2 >>> 24]);
421
- const o2 = ~t2.ft.get();
422
- t2.keys = [r2, e2, o2];
336
+ t2.S.append([n2]);
337
+ const r2 = ~t2.S.get();
338
+ e2 = Dt(o.imul(Dt(e2 + Pt(r2)), 134775813) + 1), t2.v.append([e2 >>> 24]);
339
+ const s2 = ~t2.v.get();
340
+ t2.keys = [r2, e2, s2];
423
341
  }
424
- function At(t2) {
342
+ function Mt(t2) {
425
343
  const n2 = 2 | t2.keys[2];
426
- return xt(s.imul(n2, 1 ^ n2) >>> 8);
344
+ return Pt(o.imul(n2, 1 ^ n2) >>> 8);
427
345
  }
428
- function xt(t2) {
346
+ function Pt(t2) {
429
347
  return 255 & t2;
430
348
  }
431
- function Mt(t2) {
349
+ function Dt(t2) {
432
350
  return 4294967295 & t2;
433
351
  }
434
- function Pt(t2) {
352
+ function Ft(t2) {
435
353
  if (t2 instanceof y) return t2;
436
354
  const n2 = t2.getReader();
437
355
  return new y({ async pull(t3) {
438
- const { value: e2, done: s2 } = await n2.read();
439
- s2 ? t3.close() : t3.enqueue(e2);
356
+ const { value: e2, done: o2 } = await n2.read();
357
+ o2 ? t3.close() : t3.enqueue(e2);
440
358
  }, cancel: (t3) => n2.cancel(t3) });
441
359
  }
442
- const Bt = new f();
443
- function Dt(t2) {
444
- return Bt.get(t2);
360
+ const Et = new f();
361
+ function Rt(t2) {
362
+ return Et.get(t2);
445
363
  }
446
- const Ft = "Invalid uncompressed size", Rt = j, Ut = "deflate-raw", Wt = "gzip", _t = [31, 139, 8];
447
- class Tt extends d {
448
- constructor(t2, { chunkSize: n2, CompressionStreamFallback: e2, CompressionStream: s2 }) {
364
+ const Ut = "Invalid uncompressed size", Bt = "deflate-raw", Tt = "gzip", Vt = [31, 139, 8];
365
+ class Wt extends d {
366
+ constructor(t2, { chunkSize: n2, CompressionStreamFallback: e2, CompressionStream: o2 }) {
449
367
  super({});
450
- const { compressed: r2, encrypted: o2, useCompressionStream: c2, zipCrypto: i2, computeCrc32: a2, level: f2, deflate64: l2, format: w2, compressionMethod: h2, inputSize: p2 } = t2, d2 = this;
368
+ const { compressed: r2, encrypted: s2, useCompressionStream: c2, zipCrypto: i2, computeCrc32: a2, level: f2, deflate64: w2, format: l2, compressionMethod: h2, inputSize: p2 } = t2, d2 = this;
451
369
  let y2, m2, S2, g2 = super.readable;
452
- const v2 = w2 && Dt(w2), b2 = a2 && r2 && !l2 && !v2 && (!o2 || i2) && Boolean(c2 && s2);
453
- if (o2 && !i2 || !a2 || b2 || (y2 = new U(), g2 = Ht(g2, y2)), r2) if (v2) g2 = Nt(g2, Ot(v2.CompressionStream, w2, { level: f2, chunkSize: n2, compressionMethod: h2, uncompressedSize: p2 }));
454
- else if (b2) S2 = new Vt(), g2 = Nt(g2, new s2(Wt)), g2 = Ht(g2, S2);
370
+ const v2 = l2 && Rt(l2), z2 = (function(t3, n3, e3) {
371
+ return t3 && n3 ? n3 : e3 && e3.C ? e3 : void 0;
372
+ })(c2, o2, e2), b2 = a2 && r2 && !w2 && !v2 && (!s2 || i2) && Boolean(z2);
373
+ if (s2 && !i2 || !a2 || b2 || (y2 = new U(), g2 = qt(g2, y2)), r2) if (v2) g2 = Gt(g2, Lt(v2.CompressionStream, l2, { level: f2, chunkSize: n2, compressionMethod: h2, uncompressedSize: p2 }));
374
+ else if (b2) S2 = new jt(), g2 = Gt(g2, new z2(Tt, { level: f2, chunkSize: n2 })), g2 = qt(g2, S2);
455
375
  else try {
456
- g2 = jt(g2, c2, { level: f2, chunkSize: n2 }, s2, e2);
376
+ g2 = Nt(g2, c2, { level: f2, chunkSize: n2 }, o2, e2);
457
377
  } catch (t3) {
458
378
  let n3;
459
379
  try {
460
- n3 = new s2(Wt);
380
+ n3 = new o2(Tt);
461
381
  } catch {
462
382
  throw t3;
463
383
  }
464
- g2 = Nt(g2, n3), g2 = Ht(g2, new Vt());
384
+ g2 = Gt(g2, n3), g2 = qt(g2, new jt());
465
385
  }
466
- o2 && (i2 ? g2 = Ht(g2, new bt(t2)) : (m2 = new wt(t2), g2 = Ht(g2, m2))), Lt(d2, g2, () => {
467
- o2 && !i2 || !a2 || (d2.crc32 = b2 ? S2.crc32 : new u(y2.value.buffer).getUint32(0));
386
+ s2 && (i2 ? g2 = qt(g2, new kt(t2)) : (m2 = new dt(t2), g2 = qt(g2, m2))), Ht(d2, g2, () => {
387
+ s2 && !i2 || !a2 || (d2.crc32 = b2 ? S2.crc32 : new u(y2.value.buffer).getUint32(0));
468
388
  });
469
389
  }
470
390
  }
471
- class Vt extends d {
391
+ class jt extends d {
472
392
  constructor() {
473
- let t2, n2 = 10, e2 = new o(0);
393
+ let t2, n2 = 10, e2 = new s(0);
474
394
  super({ transform(t3, r2) {
475
395
  if (n2) {
476
- const e3 = s.min(n2, t3.length);
396
+ const e3 = o.min(n2, t3.length);
477
397
  if (n2 -= e3, !(t3 = t3.subarray(e3)).length) return;
478
398
  }
479
- const o2 = e2.length + t3.length;
480
- if (o2 <= 8) return void (e2 = W(e2, t3));
481
- const c2 = o2 - 8, i2 = s.min(c2, e2.length);
482
- r2.enqueue(W(e2.subarray(0, i2), t3.subarray(0, c2 - i2))), e2 = W(e2.subarray(i2), t3.subarray(c2 - i2));
399
+ const s2 = e2.length + t3.length;
400
+ if (s2 <= 8) return void (e2 = B(e2, t3));
401
+ const c2 = s2 - 8, i2 = o.min(c2, e2.length);
402
+ r2.enqueue(B(e2.subarray(0, i2), t3.subarray(0, c2 - i2))), e2 = B(e2.subarray(i2), t3.subarray(c2 - i2));
483
403
  }, flush() {
484
- const n3 = _(e2);
404
+ const n3 = T(e2);
485
405
  t2.crc32 = n3.getUint32(0, true), t2.uncompressedSize = n3.getUint32(4, true);
486
406
  } }), t2 = this;
487
407
  }
488
408
  }
489
409
  class Kt extends d {
490
- constructor(t2, { chunkSize: n2, DecompressionStreamFallback: e2, DecompressionStream: s2 }) {
410
+ constructor(t2, { chunkSize: n2, DecompressionStreamFallback: e2, DecompressionStream: o2 }) {
491
411
  super({});
492
- const { zipCrypto: c2, encrypted: i2, checkCrc32: a2, crc32: f2, compressed: w2, useCompressionStream: h2, deflate64: p2, format: m2, compressionMethod: S2, rawBitFlag: g2, outputSize: b2 } = t2;
493
- let k2, z2, C2 = super.readable;
494
- if (i2 && (c2 ? C2 = Ht(C2, new vt(t2)) : (z2 = new lt(t2), C2 = Ht(C2, z2))), w2) {
495
- const t3 = m2 && Dt(m2);
496
- if (t3) C2 = Nt(C2, Ot(t3.DecompressionStream, m2, { chunkSize: n2, compressionMethod: S2, rawBitFlag: g2, uncompressedSize: b2 }));
412
+ const { zipCrypto: c2, encrypted: i2, checkCrc32: a2, crc32: f2, compressed: l2, useCompressionStream: h2, deflate64: p2, format: m2, compressionMethod: S2, rawBitFlag: g2, outputSize: z2 } = t2;
413
+ let b2, k2, C2, I2 = super.readable;
414
+ if (i2 && (c2 ? I2 = qt(I2, new bt(t2)) : (k2 = new pt(t2), I2 = qt(I2, k2))), l2) {
415
+ const t3 = m2 && Rt(m2);
416
+ if (t3) I2 = Gt(I2, Lt(t3.DecompressionStream, m2, { chunkSize: n2, compressionMethod: S2, rawBitFlag: g2, uncompressedSize: z2 }));
497
417
  else try {
498
- C2 = jt(C2, h2, { chunkSize: n2, deflate64: p2 }, s2, e2);
418
+ I2 = Nt(I2, h2, { chunkSize: n2, deflate64: p2 }, o2, e2);
499
419
  } catch (t4) {
500
- if (p2 || b2 === v) throw t4;
420
+ if (p2 || z2 === v) throw t4;
501
421
  let n3;
502
422
  try {
503
- n3 = new s2(Wt);
423
+ n3 = new o2(Tt);
504
424
  } catch {
505
425
  throw t4;
506
426
  }
507
- C2 = (function(t5, n4, e3) {
508
- const s3 = new R();
427
+ C2 = new R(), I2 = (function(t5, n4, e3, o3) {
509
428
  let c3, i3, a3, f3 = 0, u2 = false;
510
- const w3 = new l((t6, n5) => {
429
+ const l3 = new w((t6, n5) => {
511
430
  i3 = t6, a3 = n5;
512
431
  });
513
- w3.catch(() => {
432
+ l3.catch(() => {
514
433
  }), e3 || i3();
515
434
  const h3 = new d({ start(t6) {
516
- const n5 = new o(10);
517
- n5.set(_t), t6.enqueue(n5);
435
+ const n5 = new s(10);
436
+ n5.set(Vt), t6.enqueue(n5);
518
437
  }, transform(t6, n5) {
519
438
  n5.enqueue(t6);
520
439
  }, async flush(t6) {
521
440
  u2 = true, y2();
522
441
  try {
523
- await w3;
442
+ await l3;
524
443
  } finally {
525
444
  m3();
526
445
  }
527
- const n5 = new o(8), r2 = _(n5);
528
- r2.setUint32(0, s3.get(), true), r2.setUint32(4, e3, true), t6.enqueue(n5);
446
+ const n5 = new s(8), r2 = T(n5);
447
+ r2.setUint32(0, o3.get(), true), r2.setUint32(4, e3, true), t6.enqueue(n5);
529
448
  }, cancel(t6) {
530
449
  a3(t6);
531
450
  } }), p3 = new d({ transform(t6, n5) {
532
- s3.append(t6), f3 += t6.length, f3 >= e3 ? i3() : u2 && y2(), n5.enqueue(t6);
451
+ o3.append(t6), f3 += t6.length, f3 >= e3 ? i3() : u2 && y2(), n5.enqueue(t6);
533
452
  }, cancel(t6) {
534
453
  a3(t6);
535
454
  } });
536
- return t5 = Ht(t5, h3), Ht(t5 = Nt(t5, n4), p3);
455
+ return t5 = qt(t5, h3), qt(t5 = Gt(t5, n4), p3);
537
456
  function y2() {
538
- m3(), c3 = setTimeout(() => a3(new r(Ft)), 5e3);
457
+ m3(), c3 = setTimeout(() => a3(new r(Ut)), 5e3);
539
458
  }
540
459
  function m3() {
541
460
  clearTimeout(c3);
542
461
  }
543
- })(C2, n3, b2);
462
+ })(I2, n3, z2, C2);
544
463
  }
545
- C2 = (function(t4) {
464
+ I2 = (function(t4) {
546
465
  const n3 = t4.getReader();
547
466
  return new y({ async pull(t5) {
548
467
  let e3;
@@ -553,48 +472,48 @@
553
472
  const n4 = new r("Invalid compressed data");
554
473
  throw n4.cause = t6, n4;
555
474
  }
556
- const { value: s3, done: o2 } = e3;
557
- o2 ? t5.close() : t5.enqueue(s3);
475
+ const { value: o3, done: s2 } = e3;
476
+ s2 ? t5.close() : t5.enqueue(o3);
558
477
  }, cancel: (t5) => n3.cancel(t5) });
559
- })(C2);
478
+ })(I2);
560
479
  }
561
- a2 && (k2 = new U(), C2 = Ht(C2, k2)), Lt(this, C2, () => {
480
+ a2 && !C2 && (b2 = new U(), I2 = qt(I2, b2)), Ht(this, I2, () => {
562
481
  if (a2) {
563
- const t3 = new u(k2.value.buffer);
564
- if (f2 != t3.getUint32(0, false)) throw new r(Rt);
482
+ const t3 = C2 ? C2.get() >>> 0 : new u(b2.value.buffer).getUint32(0, false);
483
+ if (f2 != t3) throw new r("Invalid CRC32");
565
484
  }
566
485
  });
567
486
  }
568
487
  }
569
- const Et = new f();
570
- function Lt(t2, e2, s2) {
571
- e2 = Ht(e2, new d({ flush: s2 })), n.defineProperty(t2, "readable", { get: () => e2 });
488
+ const Ot = new f();
489
+ function Ht(t2, e2, o2) {
490
+ e2 = qt(e2, new d({ flush: o2 })), n.defineProperty(t2, "readable", { get: () => e2 });
572
491
  }
573
- function Ot(t2, n2, e2) {
492
+ function Lt(t2, n2, e2) {
574
493
  if (!t2) throw new r("Compression method not supported");
575
494
  return new t2(n2, e2);
576
495
  }
577
- function jt(t2, n2, e2, s2, r2) {
578
- const o2 = n2 && s2 ? s2 : r2 || s2, c2 = e2.deflate64 ? "deflate64-raw" : Ut;
496
+ function Nt(t2, n2, e2, o2, r2) {
497
+ const s2 = n2 && o2 ? o2 : r2 || o2, c2 = e2.deflate64 ? "deflate64-raw" : Bt;
579
498
  let i2;
580
499
  try {
581
- i2 = new o2(c2, e2);
500
+ i2 = new s2(c2, e2);
582
501
  } catch (t3) {
583
- if (!n2 || !r2 || o2 == r2) throw t3;
502
+ if (!n2 || !r2 || s2 == r2) throw t3;
584
503
  i2 = new r2(c2, e2);
585
504
  }
586
- return Nt(t2, i2);
505
+ return Gt(t2, i2);
587
506
  }
588
- function Ht(t2, n2) {
589
- return Pt(t2).pipeThrough(n2);
507
+ function qt(t2, n2) {
508
+ return Ft(t2).pipeThrough(n2);
590
509
  }
591
- function Nt(t2, n2) {
592
- const e2 = n2.writable.getWriter(), s2 = t2.getReader();
510
+ function Gt(t2, n2) {
511
+ const e2 = n2.writable.getWriter(), o2 = t2.getReader();
593
512
  return (async function() {
594
513
  try {
595
514
  for (; ; ) {
596
515
  await e2.ready;
597
- const t3 = await s2.read();
516
+ const t3 = await o2.read();
598
517
  if (t3.done) {
599
518
  await e2.close();
600
519
  break;
@@ -612,141 +531,161 @@
612
531
  await t4.cancel(n3);
613
532
  } catch {
614
533
  }
615
- })(s2, t3);
534
+ })(o2, t3);
616
535
  }
617
536
  })(), n2.readable;
618
537
  }
619
- const qt = "data", Gt = "close", Jt = "deflate";
620
- class Qt extends d {
538
+ const Jt = "data", Qt = "deflate";
539
+ class Xt extends d {
621
540
  constructor(t2, e2) {
622
541
  super({});
623
- const s2 = this, { codecType: o2 } = t2;
542
+ const o2 = this, { codecType: s2 } = t2;
624
543
  let c2;
625
- o2.startsWith(Jt) ? c2 = Tt : o2.startsWith("inflate") && (c2 = Kt), s2.outputSize = 0;
544
+ s2.startsWith(Qt) ? c2 = Wt : s2.startsWith("inflate") && (c2 = Kt), o2.outputSize = 0;
626
545
  let i2 = 0;
627
546
  const a2 = new c2(t2, e2), f2 = super.readable, u2 = new d({ transform(t3, n2) {
628
547
  t3 && t3.length && (i2 += t3.length, n2.enqueue(t3));
629
548
  }, flush() {
630
- n.assign(s2, { inputSize: i2 });
631
- } }), l2 = new d({ transform(n2, e3) {
632
- if (n2 && n2.length && (e3.enqueue(n2), s2.outputSize += n2.length, t2.outputSize !== v && s2.outputSize > t2.outputSize)) throw new r(Ft);
549
+ n.assign(o2, { inputSize: i2 });
550
+ } }), w2 = new d({ transform(n2, e3) {
551
+ if (n2 && n2.length && (e3.enqueue(n2), o2.outputSize += n2.length, t2.outputSize !== v && o2.outputSize > t2.outputSize)) throw new r(Ut);
633
552
  }, flush() {
634
553
  const { crc32: t3 } = a2;
635
- n.assign(s2, { crc32: t3, inputSize: i2 });
554
+ n.assign(o2, { crc32: t3, inputSize: i2 });
636
555
  } });
637
- n.defineProperty(s2, "readable", { get: () => f2.pipeThrough(u2).pipeThrough(a2).pipeThrough(l2) });
556
+ n.defineProperty(o2, "readable", { get: () => f2.pipeThrough(u2).pipeThrough(a2).pipeThrough(w2) });
638
557
  }
639
558
  }
640
- class Xt extends d {
559
+ class Yt extends d {
641
560
  constructor(t2) {
642
- const n2 = [];
643
- let s2 = 0;
644
- function r2() {
645
- const e2 = new o(t2);
646
- let r3 = 0;
647
- for (; r3 < t2; ) {
648
- const s3 = n2[0], o2 = t2 - r3;
649
- s3.length <= o2 ? (e2.set(s3, r3), r3 += s3.length, n2.shift()) : (e2.set(s3.subarray(0, o2), r3), n2[0] = s3.subarray(o2), r3 += o2);
561
+ const o2 = [];
562
+ let r2 = 0, c2 = 0;
563
+ function i2() {
564
+ const n2 = new s(t2);
565
+ let e2 = 0;
566
+ for (; e2 < t2; ) {
567
+ const r3 = o2[0], s2 = t2 - e2;
568
+ r3.length <= s2 ? (n2.set(r3, e2), e2 += r3.length, o2.shift()) : (n2.set(r3.subarray(0, s2), e2), o2[0] = r3.subarray(s2), e2 += s2);
650
569
  }
651
- return s2 -= t2, e2;
570
+ return r2 -= t2, n2;
652
571
  }
653
- (!e.isFinite(t2) || t2 < 1) && (t2 = 65536), super({ transform(e2, o2) {
654
- for (n2.push(e2), s2 += e2.length; s2 > t2; ) o2.enqueue(r2());
572
+ (!e.isFinite(t2) || t2 < 1) && (t2 = 65536), super({ transform(n2, e2) {
573
+ for (o2.push(n2), r2 += n2.length; r2 > t2; ) c2 += t2, e2.enqueue(i2());
655
574
  }, flush(t3) {
656
- s2 && t3.enqueue((function(t4, n3) {
657
- const e2 = new o(n3);
658
- let s3 = 0;
659
- for (const n4 of t4) e2.set(n4, s3), s3 += n4.length;
575
+ r2 && (c2 += r2, t3.enqueue((function(t4, n2) {
576
+ const e2 = new s(n2);
577
+ let o3 = 0;
578
+ for (const n3 of t4) e2.set(n3, o3), o3 += n3.length;
660
579
  return e2;
661
- })(n2, s2));
662
- } });
580
+ })(o2, r2)));
581
+ } }), n.defineProperty(this, "outputSize", { get: () => c2 });
663
582
  }
664
583
  }
665
- let Yt = 2;
584
+ let Zt = 2;
666
585
  try {
667
- typeof navigator != b && navigator.hardwareConcurrency && (Yt = navigator.hardwareConcurrency);
586
+ typeof navigator != z && navigator.hardwareConcurrency && (Zt = navigator.hardwareConcurrency);
668
587
  } catch {
669
588
  }
670
- const Zt = new f(), $t = new f();
671
- let tn, nn = 0;
672
- async function en(t2) {
673
- let n2, o2;
589
+ function $t(t2) {
590
+ return Boolean(t2) && "object" == typeof t2;
591
+ }
592
+ const _t = new f(), tn = new f(), nn = (function() {
593
+ try {
594
+ return structuredClone(new r()) instanceof r;
595
+ } catch {
596
+ return false;
597
+ }
598
+ })();
599
+ let en = 0;
600
+ async function on(t2) {
601
+ let n2, s2, c2;
674
602
  try {
675
- const { options: c2, config: i2 } = t2;
676
- if (c2.format) try {
603
+ const { options: i2, config: a2 } = t2;
604
+ if (i2.format) try {
677
605
  await (async function(t3, n3) {
678
- !Bt.has(t3) && n3 && (function(t4, n4) {
679
- const { CompressionStream: e2, DecompressionStream: s2 } = n4;
680
- if (typeof e2 != k && typeof s2 != k) throw new r("Invalid codec module");
681
- Bt.set(t4, { CompressionStream: e2, DecompressionStream: s2 });
606
+ !Et.has(t3) && n3 && (function(t4, n4) {
607
+ const { CompressionStream: e2, DecompressionStream: o2 } = n4;
608
+ if (typeof e2 != b && typeof o2 != b) throw new r("Invalid codec module");
609
+ Et.set(t4, { CompressionStream: e2, DecompressionStream: o2 });
682
610
  })(t3, await import(
683
611
  /* webpackIgnore: true */
684
612
  /* @vite-ignore */
685
613
  n3
686
614
  ));
687
- })(c2.format, c2.codecURI);
615
+ })(i2.format, i2.codecURI);
688
616
  } catch (t3) {
689
- throw t3.codecImportFailed = true, t3;
617
+ if ($t(t3)) try {
618
+ t3.codecImportFailed = true;
619
+ } catch {
620
+ }
621
+ throw t3;
690
622
  }
691
- if (i2.CompressionStream = self.CompressionStream, i2.DecompressionStream = self.DecompressionStream, c2.compressed && !c2.format) if (c2.useCompressionStream) {
623
+ if (a2.CompressionStream = self.CompressionStream, a2.DecompressionStream = self.DecompressionStream, i2.compressed && !i2.format) if (i2.useCompressionStream) {
692
624
  if (!(function(t3, n3) {
693
625
  if (!t3) return false;
694
- let e2 = Et.get(t3);
695
- e2 || (e2 = new f(), Et.set(t3, e2));
696
- let s2 = e2.get(n3);
697
- if (s2 === v) {
626
+ let e2 = Ot.get(t3);
627
+ e2 || (e2 = new f(), Ot.set(t3, e2));
628
+ let o2 = e2.get(n3);
629
+ if (o2 === v) {
698
630
  try {
699
- new t3(n3), s2 = true;
631
+ new t3(n3), o2 = true;
700
632
  } catch {
701
- s2 = false;
633
+ o2 = false;
702
634
  }
703
- e2.set(n3, s2);
635
+ e2.set(n3, o2);
704
636
  }
705
- return s2;
706
- })(c2.codecType.startsWith(Jt) ? i2.CompressionStream : i2.DecompressionStream, Ut)) try {
637
+ return o2;
638
+ })(i2.codecType.startsWith(Qt) ? a2.CompressionStream : a2.DecompressionStream, Bt)) try {
707
639
  await self.initModule(t2.config);
708
640
  } catch {
709
641
  }
710
642
  } else try {
711
643
  await self.initModule(t2.config);
712
644
  } catch {
713
- c2.useCompressionStream = true;
645
+ i2.useCompressionStream = true;
714
646
  }
715
- !i2.CompressionStreamFallback && i2.CompressionStreamZlib && (i2.CompressionStreamFallback = i2.CompressionStreamZlib), !i2.DecompressionStreamFallback && i2.DecompressionStreamZlib && (i2.DecompressionStreamFallback = i2.DecompressionStreamZlib);
716
- const a2 = { highWaterMark: 1 }, u2 = t2.readable ? Pt(t2.readable) : new y({ async pull(t3) {
717
- const n3 = new l((t4) => Zt.set(nn, t4));
718
- sn({ type: "pull", messageId: nn }), nn = (nn + 1) % e.MAX_SAFE_INTEGER;
719
- const { value: s2, done: r2 } = await n3;
720
- t3.enqueue(s2), r2 && t3.close();
721
- } }, a2);
722
- o2 = t2.writable ? (function(t3) {
647
+ if (i2.encrypted && !i2.zipCrypto) try {
648
+ await self.initModule(t2.config);
649
+ } catch {
650
+ }
651
+ !a2.CompressionStreamFallback && a2.CompressionStreamZlib && (a2.CompressionStreamFallback = a2.CompressionStreamZlib), !a2.DecompressionStreamFallback && a2.DecompressionStreamZlib && (a2.DecompressionStreamFallback = a2.DecompressionStreamZlib);
652
+ const u2 = { highWaterMark: 1 }, l2 = t2.readable ? Ft(t2.readable) : new y({ async pull(t3) {
653
+ const n3 = new w((t4) => _t.set(en, t4));
654
+ rn({ type: "pull", messageId: en }), en = (en + 1) % e.MAX_SAFE_INTEGER;
655
+ const { value: o2, done: r2 } = await n3;
656
+ t3.enqueue(o2), r2 && t3.close();
657
+ } }, u2);
658
+ c2 = t2.writable ? (function(t3) {
723
659
  if (t3 instanceof m) return t3;
724
660
  const n3 = t3.getWriter();
725
661
  return new m({ write: (t4) => n3.write(t4), close: () => n3.close(), abort: (t4) => n3.abort(t4) });
726
662
  })(t2.writable) : new m({ async write(t3) {
727
663
  let n3;
728
- const s2 = new l((t4) => n3 = t4);
729
- $t.set(nn, n3), sn({ type: qt, value: t3, messageId: nn }), nn = (nn + 1) % e.MAX_SAFE_INTEGER, await s2;
730
- } }, a2), n2 = new Qt(c2, i2), tn = new AbortController();
731
- const { signal: w2 } = tn;
732
- await u2.pipeThrough(n2).pipeThrough(new Xt((function(t3) {
733
- return r2 = "string" == typeof (n3 = r2 = t3.chunkSize) && n3.trim() ? e(n3) : n3, e.isInteger(r2) && r2 >= 1 ? s.max(r2, 64) : 65536;
664
+ const o2 = new w((t4) => n3 = t4);
665
+ tn.set(en, n3), rn({ type: Jt, value: t3, messageId: en }), en = (en + 1) % e.MAX_SAFE_INTEGER, await o2;
666
+ } }, u2), n2 = new Xt(i2, a2), s2 = new Yt((function(t3) {
667
+ return r2 = "string" == typeof (n3 = r2 = t3.chunkSize) && n3.trim() ? e(n3) : n3, e.isInteger(r2) && r2 >= 1 ? o.max(r2, 64) : 65536;
734
668
  var n3, r2;
735
- })(i2))).pipeTo(o2, { signal: w2, preventClose: true, preventAbort: true }), await o2.getWriter().close();
669
+ })(a2)), await l2.pipeThrough(n2).pipeThrough(s2).pipeTo(c2, { preventClose: true, preventAbort: true }), await c2.getWriter().close();
736
670
  const { crc32: h2, inputSize: p2, outputSize: d2 } = n2;
737
- sn({ type: Gt, result: { crc32: h2, inputSize: p2, outputSize: d2 } });
671
+ rn({ type: "close", result: { crc32: h2, inputSize: p2, outputSize: d2 } });
738
672
  } catch (t3) {
739
- if (t3.outputSize = n2 ? n2.outputSize : 0, o2 && !o2.locked) try {
740
- await o2.getWriter().close();
673
+ const n3 = s2 ? s2.outputSize : 0;
674
+ if ($t(t3)) try {
675
+ t3.outputSize = n3;
676
+ } catch {
677
+ }
678
+ if (c2 && !c2.locked) try {
679
+ await c2.getWriter().close();
741
680
  } catch {
742
681
  }
743
- rn(t3);
682
+ sn(t3, n3);
744
683
  }
745
684
  }
746
- function sn(t2) {
685
+ function rn(t2) {
747
686
  const { value: n2 } = t2;
748
687
  if (n2) if (n2.length) try {
749
- t2.value = (e2 = n2, e2.byteOffset || e2.byteLength != e2.buffer.byteLength ? new o(e2) : e2).buffer, p(t2, [t2.value]);
688
+ t2.value = (e2 = n2, e2.byteOffset || e2.byteLength != e2.buffer.byteLength ? new s(e2) : e2).buffer, p(t2, [t2.value]);
750
689
  } catch {
751
690
  p(t2);
752
691
  }
@@ -754,130 +693,160 @@
754
693
  else p(t2);
755
694
  var e2;
756
695
  }
757
- function rn(t2 = new r("Unknown error")) {
758
- const { message: n2, stack: e2, code: s2, name: o2, outputSize: c2, cause: i2, codecImportFailed: a2 } = t2, f2 = { message: n2, stack: e2, code: s2, name: o2, outputSize: c2 };
759
- i2 && (f2.cause = { name: i2.name, message: i2.message }), a2 && (f2.codecImportFailed = true), p({ error: f2 });
696
+ function sn(t2, n2) {
697
+ const { message: e2, stack: o2, code: s2, name: c2, outputSize: i2, cause: a2, codecImportFailed: f2 } = (function(t3 = new r("Unknown error")) {
698
+ return $t(t3) ? t3 : new r(String(t3));
699
+ })(t2), u2 = { message: e2, stack: o2, code: s2, name: c2, outputSize: i2 === v ? n2 : i2 };
700
+ if (a2 && (u2.cause = { name: a2.name, message: a2.message }), f2 && (u2.codecImportFailed = true), nn) try {
701
+ return void p({ error: u2, errorValue: { value: t2 } });
702
+ } catch {
703
+ }
704
+ p({ error: u2 });
760
705
  }
761
706
  addEventListener("message", ({ data: t2 }) => {
762
- const { type: n2, messageId: e2, value: s2, done: r2 } = t2;
707
+ const { type: n2, messageId: e2, value: o2, done: r2 } = t2;
763
708
  try {
764
- if ("start" == n2 && en(t2), n2 == qt) {
765
- const t3 = Zt.get(e2);
766
- Zt.delete(e2), t3({ value: s2 || new o(), done: r2 });
709
+ if ("start" == n2 && on(t2), n2 == Jt) {
710
+ const t3 = _t.get(e2);
711
+ _t.delete(e2), t3({ value: o2 || new s(), done: r2 });
767
712
  }
768
713
  if ("ack" == n2) {
769
- const t3 = $t.get(e2);
770
- $t.delete(e2), t3();
714
+ const t3 = tn.get(e2);
715
+ tn.delete(e2), t3();
771
716
  }
772
- n2 == Gt && tn.abort();
773
717
  } catch (t3) {
774
- rn(t3);
718
+ sn(t3);
775
719
  }
776
720
  }), p({ type: "ready" });
777
- const on = "deflate", cn = "deflate-raw", an = "deflate64-raw", fn = "gzip";
778
- let un, ln, wn, hn, pn;
779
- function dn(t2, n2, e2 = {}) {
780
- if (!un) {
721
+ const cn = "deflate", an = "deflate-raw", fn = "deflate64-raw", un = "gzip";
722
+ let wn, ln, hn, pn, dn;
723
+ function yn(t2, n2, e2 = {}) {
724
+ if (!wn) {
781
725
  const t3 = new r("WASM module not loaded");
782
- throw t3.cause = pn, t3;
726
+ throw t3.cause = dn, t3;
783
727
  }
784
728
  const c2 = "number" == typeof e2.level ? e2.level : -1, i2 = "number" == typeof e2.outBuffer ? e2.outBuffer : 65536, a2 = "number" == typeof e2.inBufferSize ? e2.inBufferSize : 65536;
785
729
  return new d({ start() {
786
730
  try {
787
731
  let e3;
788
- if (this.ut = ln(i2), this.in = ln(a2), this.inBufferSize = a2, !this.ut || !this.in) throw new r("allocation failed");
789
- if (this.lt = new o(i2), t2 ? (this.wt = un.deflate_process, this.ht = un.deflate_last_consumed, this.yt = un.deflate_end, this.St = un.deflate_new(), e3 = n2 === fn ? un.deflate_init_gzip(this.St, c2) : n2 === cn ? un.deflate_init_raw(this.St, c2) : un.deflate_init(this.St, c2)) : n2 === an ? (this.wt = un.inflate9_process, this.ht = un.inflate9_last_consumed, this.yt = un.inflate9_end, this.St = un.inflate9_new(), e3 = un.inflate9_init_raw(this.St)) : (this.wt = un.inflate_process, this.ht = un.inflate_last_consumed, this.yt = un.inflate_end, this.St = un.inflate_new(), e3 = n2 === cn ? un.inflate_init_raw(this.St) : n2 === fn ? un.inflate_init_gzip(this.St) : un.inflate_init(this.St)), 0 !== e3) throw new r("init failed:" + e3);
732
+ if (this.I = ln(i2), this.in = ln(a2), this.inBufferSize = a2, !this.I || !this.in) throw new r("allocation failed");
733
+ if (t2 ? (this.A = wn.deflate_process, this.M = wn.deflate_last_consumed, this.P = wn.deflate_end, this.D = wn.deflate_new(), e3 = n2 === un ? wn.deflate_init_gzip(this.D, c2) : n2 === an ? wn.deflate_init_raw(this.D, c2) : wn.deflate_init(this.D, c2)) : n2 === fn ? (this.A = wn.inflate9_process, this.M = wn.inflate9_last_consumed, this.P = wn.inflate9_end, this.D = wn.inflate9_new(), e3 = wn.inflate9_init_raw(this.D)) : (this.A = wn.inflate_process, this.M = wn.inflate_last_consumed, this.P = wn.inflate_end, this.D = wn.inflate_new(), e3 = n2 === an ? wn.inflate_init_raw(this.D) : n2 === un ? wn.inflate_init_gzip(this.D) : wn.inflate_init(this.D)), 0 !== e3) throw new r("init failed:" + e3);
790
734
  } catch (t3) {
791
735
  throw f2(this), t3;
792
736
  }
793
- }, transform(n3, e3) {
737
+ }, transform(t3, n3) {
794
738
  try {
795
- const c3 = n3, a3 = new o(hn.buffer), f3 = this.wt, u2 = this.ht, l2 = this.ut, w2 = this.lt;
796
- let h2 = 0;
797
- for (; h2 < c3.length; ) {
798
- const n4 = s.min(c3.length - h2, 32768);
799
- if ((!this.in || this.inBufferSize < n4) && (this.in && wn && (wn(this.in), this.in = 0), this.in = ln(n4), this.inBufferSize = n4, !this.in)) throw new r("allocation failed");
800
- a3.set(c3.subarray(h2, h2 + n4), this.in);
801
- const o2 = f3(this.St, this.in, n4, l2, i2, 0), p2 = 16777215 & o2;
802
- if (p2 && (w2.set(a3.subarray(l2, l2 + p2), 0), e3.enqueue(w2.slice(0, p2))), !t2) {
803
- const t3 = o2 >> 24 & 255, n5 = 128 & t3 ? t3 - 256 : t3;
804
- if (n5 < 0) throw new r("process error:" + n5);
805
- }
806
- const d2 = u2(this.St);
807
- if (0 === d2) break;
808
- h2 += d2;
739
+ const e3 = t3, c3 = new s(pn.buffer), a3 = this.A, f3 = this.M, u2 = this.I;
740
+ let w2 = 0;
741
+ for (; w2 < e3.length; ) {
742
+ const t4 = o.min(e3.length - w2, 32768);
743
+ if ((!this.in || this.inBufferSize < t4) && (this.in && hn && (hn(this.in), this.in = 0), this.in = ln(t4), this.inBufferSize = t4, !this.in)) throw new r("allocation failed");
744
+ c3.set(e3.subarray(w2, w2 + t4), this.in);
745
+ const s2 = a3(this.D, this.in, t4, u2, i2, 0), l2 = s2 >> 24 & 255, h2 = 128 & l2 ? l2 - 256 : l2;
746
+ if (h2 < 0) throw new r("process error:" + h2);
747
+ const p2 = 16777215 & s2;
748
+ p2 && n3.enqueue(c3.slice(u2, u2 + p2));
749
+ const d2 = f3(this.D);
750
+ if (0 === d2 && 0 === p2) break;
751
+ w2 += d2;
809
752
  }
810
- } catch (t3) {
811
- f2(this), e3.error(t3);
753
+ } catch (t4) {
754
+ f2(this), n3.error(t4);
812
755
  }
813
- }, flush(n3) {
756
+ }, flush(t3) {
814
757
  try {
815
- const e3 = new o(hn.buffer), s2 = this.wt, c3 = this.ut, a3 = this.lt;
758
+ const n3 = new s(pn.buffer), e3 = this.A, o2 = this.I;
816
759
  for (; ; ) {
817
- const o2 = s2(this.St, 0, 0, c3, i2, 4), f3 = 16777215 & o2, u2 = o2 >> 24 & 255;
818
- if (!t2) {
819
- const t3 = 128 & u2 ? u2 - 256 : u2;
820
- if (t3 < 0) throw new r("process error:" + t3);
821
- }
822
- if (f3 && (a3.set(e3.subarray(c3, c3 + f3), 0), n3.enqueue(a3.slice(0, f3))), 1 === u2 || 0 === f3) break;
760
+ const s2 = e3(this.D, 0, 0, o2, i2, 4), c3 = s2 >> 24 & 255, a3 = 128 & c3 ? c3 - 256 : c3;
761
+ if (a3 < 0) throw new r("process error:" + a3);
762
+ const f3 = 16777215 & s2;
763
+ if (f3 && t3.enqueue(n3.slice(o2, o2 + f3)), 1 === c3 || 0 === f3) break;
823
764
  }
824
- } catch (t3) {
825
- n3.error(t3);
765
+ } catch (n3) {
766
+ t3.error(n3);
826
767
  } finally {
827
- const t3 = f2(this);
828
- 0 !== t3 && n3.error(new r("end error:" + t3));
768
+ const n3 = f2(this);
769
+ 0 !== n3 && t3.error(new r("end error:" + n3));
829
770
  }
830
771
  }, cancel() {
831
772
  f2(this);
832
773
  } });
833
774
  function f2(t3) {
834
775
  let n3 = 0;
835
- return t3.St && t3.yt && (n3 = t3.yt(t3.St)), t3.St = 0, t3.in && wn && wn(t3.in), t3.in = 0, t3.ut && wn && wn(t3.ut), t3.ut = 0, n3;
776
+ return t3.D && t3.P && (n3 = t3.P(t3.D)), t3.D = 0, t3.in && hn && hn(t3.in), t3.in = 0, t3.I && hn && hn(t3.I), t3.I = 0, n3;
836
777
  }
837
778
  }
838
- class yn {
839
- constructor(t2 = on, n2) {
840
- return dn(true, t2, n2);
779
+ class mn {
780
+ constructor(t2 = cn, n2) {
781
+ return yn(true, t2, n2);
841
782
  }
842
783
  }
843
- class mn {
844
- constructor(t2 = on, n2) {
845
- return dn(false, t2, n2);
784
+ class Sn {
785
+ constructor(t2 = cn, n2) {
786
+ return yn(false, t2, n2);
846
787
  }
847
788
  }
848
- yn.gt = true, mn.gt = true, yn.vt = [on, cn, fn], mn.vt = [on, cn, fn, an];
849
- let Sn = false;
789
+ mn.C = true, Sn.C = true, mn.F = [cn, an, un], Sn.F = [cn, an, un, fn];
790
+ const gn = 65536;
791
+ let vn, zn;
792
+ function bn(t2) {
793
+ return new s(t2.memory.buffer);
794
+ }
795
+ let kn = false;
850
796
  !(function(t2 = {}) {
851
- const { init: n2 } = t2, e2 = t2.CompressionStreamFallback || t2.CompressionStreamZlib, s2 = t2.DecompressionStreamFallback || t2.DecompressionStreamZlib;
852
- self.initModule = async (t3) => {
853
- n2 && await n2(t3), e2 && (t3.CompressionStreamFallback = e2), s2 && (t3.DecompressionStreamFallback = s2);
797
+ const { init: n2, R: e2 } = t2, o2 = t2.CompressionStreamFallback || t2.CompressionStreamZlib, r2 = t2.DecompressionStreamFallback || t2.DecompressionStreamZlib;
798
+ e2 && (ht = e2 || Q), self.initModule = async (t3) => {
799
+ n2 && await n2(t3), o2 && (t3.CompressionStreamFallback = o2), r2 && (t3.DecompressionStreamFallback = r2);
854
800
  };
855
- })({ CompressionStreamFallback: yn, DecompressionStreamFallback: mn, init: (t2) => (async function(t3, { baseURI: n2 }) {
856
- if (!Sn) try {
801
+ })({ CompressionStreamFallback: mn, DecompressionStreamFallback: Sn, R: function(t2, n2) {
802
+ const e2 = vn;
803
+ let o2 = e2 ? (function(t3, n3, e3) {
804
+ zn || (zn = t3.malloc(gn));
805
+ const o3 = zn ? t3.aes_hmac_new() : 0;
806
+ if (o3) {
807
+ const r3 = bn(t3);
808
+ if (r3.set(n3, zn), r3.set(e3, zn + n3.length), t3.aes_hmac_init(o3, zn, n3.length, zn + n3.length, e3.length)) return t3.aes_hmac_end(o3, 0), 0;
809
+ }
810
+ return o3;
811
+ })(e2, t2, n2) : 0;
812
+ if (!o2) return Q(t2, n2);
813
+ const r2 = zn;
814
+ return { process(t3, n3) {
815
+ for (let s2 = 0; s2 < t3.length; s2 += gn) {
816
+ const c2 = t3.subarray(s2, s2 + gn), i2 = bn(e2);
817
+ i2.set(c2, r2), e2.aes_hmac_process(o2, r2, c2.length, n3 ? 1 : 0), c2.set(i2.subarray(r2, r2 + c2.length));
818
+ }
819
+ }, digest: () => (e2.aes_hmac_end(o2, r2), o2 = 0, bn(e2).slice(r2, r2 + 20)), dispose() {
820
+ o2 && (e2.aes_hmac_end(o2, 0), o2 = 0);
821
+ } };
822
+ }, init: (t2) => (async function(t3, { baseURI: n2 }) {
823
+ if (!kn) try {
857
824
  await (async function(t4, n3) {
858
- let e2, s2;
825
+ let e2, o2;
859
826
  try {
860
827
  try {
861
- s2 = new URL(t4, n3);
828
+ o2 = new URL(t4, n3);
862
829
  } catch {
863
830
  }
864
- const r2 = await fetch(s2);
831
+ const r2 = await fetch(o2);
865
832
  e2 = await r2.arrayBuffer();
866
833
  } catch (n4) {
867
834
  if (!t4.startsWith("data:application/wasm;base64,")) throw n4;
868
835
  e2 = (function(t5) {
869
- const n5 = t5.split(",")[1], e3 = atob(n5), s3 = e3.length, r2 = new o(s3);
870
- for (let t6 = 0; t6 < s3; ++t6) r2[t6] = e3.charCodeAt(t6);
836
+ const n5 = t5.split(",")[1], e3 = atob(n5), o3 = e3.length, r2 = new s(o3);
837
+ for (let t6 = 0; t6 < o3; ++t6) r2[t6] = e3.charCodeAt(t6);
871
838
  return r2.buffer;
872
839
  })(t4);
873
840
  }
874
- !(function(t5) {
875
- if (un = t5, { malloc: ln, free: wn, memory: hn } = un, "function" != typeof ln || "function" != typeof wn || !hn) throw un = ln = wn = hn = null, new r("Invalid WASM module");
876
- })((await WebAssembly.instantiate(e2)).instance.exports);
877
- })(t3, n2), Sn = true;
841
+ const c2 = await WebAssembly.instantiate(e2);
842
+ var i2;
843
+ (function(t5) {
844
+ if (wn = t5, { malloc: ln, free: hn, memory: pn } = wn, "function" != typeof ln || "function" != typeof hn || !pn) throw wn = ln = hn = pn = null, new r("Invalid WASM module");
845
+ })(c2.instance.exports), typeof (i2 = c2.instance.exports).aes_hmac_new == b && (vn = i2, zn = 0);
846
+ })(t3, n2), kn = true;
878
847
  } catch (t4) {
879
848
  throw (function(t5) {
880
- pn = t5;
849
+ dn = t5;
881
850
  })(t4), t4;
882
851
  }
883
852
  })(t2.wasmURI, t2) });