@hztxi/cesium-engine 25.0.2 → 25.0.3

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 (227) hide show
  1. package/Build/ThirdParty/Workers/zip-web-worker.js +761 -520
  2. package/Build/Workers/chunk-2KZP32NE.js +3201 -0
  3. package/Build/Workers/chunk-2P5SGQUU.js +44 -0
  4. package/Build/Workers/chunk-2PFSIZOR.js +959 -0
  5. package/Build/Workers/chunk-2RC5GQMH.js +82 -0
  6. package/Build/Workers/chunk-2TM5FET3.js +241 -0
  7. package/Build/Workers/chunk-2ZYMQXBB.js +519 -0
  8. package/Build/Workers/chunk-37IVAHRF.js +3201 -0
  9. package/Build/Workers/chunk-3CSWK42O.js +3648 -0
  10. package/Build/Workers/chunk-3GDVUAIX.js +1287 -0
  11. package/Build/Workers/chunk-3L5NZHVW.js +288 -0
  12. package/Build/Workers/chunk-3LQDIJFX.js +2719 -0
  13. package/Build/Workers/chunk-3WIDW5QO.js +1800 -0
  14. package/Build/Workers/chunk-4L4ZXXL7.js +57 -0
  15. package/Build/Workers/chunk-4QK5RZ5I.js +171 -0
  16. package/Build/Workers/chunk-4RWSLDVO.js +198 -0
  17. package/Build/Workers/chunk-53HFLKT5.js +76 -0
  18. package/Build/Workers/chunk-5DJBLQEH.js +56 -0
  19. package/Build/Workers/chunk-5FNZGB4U.js +368 -0
  20. package/Build/Workers/chunk-5KOCUIKQ.js +476 -0
  21. package/Build/Workers/chunk-5PK42ITB.js +219 -0
  22. package/Build/Workers/chunk-5SGB3BKM.js +73 -0
  23. package/Build/Workers/chunk-5ZWRS2E6.js +280 -0
  24. package/Build/Workers/chunk-6FU5LWYG.js +352 -0
  25. package/Build/Workers/chunk-6IYEGXEW.js +1344 -0
  26. package/Build/Workers/chunk-6KWWDFT4.js +278 -0
  27. package/Build/Workers/chunk-73DJHI53.js +398 -0
  28. package/Build/Workers/chunk-73OT3YBQ.js +1054 -0
  29. package/Build/Workers/chunk-73T2E2OA.js +454 -0
  30. package/Build/Workers/chunk-752QDGCS.js +778 -0
  31. package/Build/Workers/chunk-76HD3HYN.js +2342 -0
  32. package/Build/Workers/chunk-7I4AKIEV.js +58 -0
  33. package/Build/Workers/chunk-7ZYD7GL6.js +414 -0
  34. package/Build/Workers/chunk-ALJYMECF.js +973 -0
  35. package/Build/Workers/chunk-ANGZAKVP.js +257 -0
  36. package/Build/Workers/chunk-ATT5UEK6.js +97 -0
  37. package/Build/Workers/chunk-AW3UT5RP.js +97 -0
  38. package/Build/Workers/chunk-AZGPL6BR.js +38 -0
  39. package/Build/Workers/chunk-B7SMDRPA.js +476 -0
  40. package/Build/Workers/chunk-BADQ2G5E.js +837 -0
  41. package/Build/Workers/chunk-BAPOWX62.js +368 -0
  42. package/Build/Workers/chunk-BE5ULV4I.js +1800 -0
  43. package/Build/Workers/chunk-BII4UB3C.js +476 -0
  44. package/Build/Workers/chunk-BPL3HT2R.js +837 -0
  45. package/Build/Workers/chunk-BVAMP4M3.js +101 -0
  46. package/Build/Workers/chunk-BVFS5LSK.js +1067 -0
  47. package/Build/Workers/chunk-CKWUU4JK.js +138 -0
  48. package/Build/Workers/chunk-CMMHWVUF.js +2719 -0
  49. package/Build/Workers/chunk-CQNFIAZU.js +56 -0
  50. package/Build/Workers/chunk-CSUBL77L.js +140 -0
  51. package/Build/Workers/chunk-DHCQSFRN.js +301 -0
  52. package/Build/Workers/chunk-DKFSOFKR.js +241 -0
  53. package/Build/Workers/chunk-DLHFYNG6.js +52 -0
  54. package/Build/Workers/chunk-ETABYWY4.js +973 -0
  55. package/Build/Workers/chunk-EYVCQUVQ.js +1067 -0
  56. package/Build/Workers/chunk-FE7VHPNW.js +102 -0
  57. package/Build/Workers/chunk-FFEVCOBU.js +387 -0
  58. package/Build/Workers/chunk-FWABE4BL.js +305 -0
  59. package/Build/Workers/chunk-GC24BPCQ.js +305 -0
  60. package/Build/Workers/chunk-GCTHMF35.js +387 -0
  61. package/Build/Workers/chunk-GDHSPLWC.js +9237 -0
  62. package/Build/Workers/chunk-GGK7SA4Y.js +414 -0
  63. package/Build/Workers/chunk-GGVG7G5Z.js +1483 -0
  64. package/Build/Workers/chunk-GL7W3I3A.js +959 -0
  65. package/Build/Workers/chunk-H52M4HMP.js +9230 -0
  66. package/Build/Workers/chunk-H7QGY7HB.js +1054 -0
  67. package/Build/Workers/chunk-H7ZXQIV2.js +398 -0
  68. package/Build/Workers/chunk-HBJKIDKK.js +76 -0
  69. package/Build/Workers/chunk-HERVRBJW.js +76 -0
  70. package/Build/Workers/chunk-HFMS7MXO.js +511 -0
  71. package/Build/Workers/chunk-HH6PJ22V.js +455 -0
  72. package/Build/Workers/chunk-HQ2PXPP7.js +102 -0
  73. package/Build/Workers/chunk-HTO45L3X.js +454 -0
  74. package/Build/Workers/chunk-HW5TLMPQ.js +57 -0
  75. package/Build/Workers/chunk-IC3HVJBG.js +301 -0
  76. package/Build/Workers/chunk-IEKP7CEH.js +387 -0
  77. package/Build/Workers/chunk-ILUFUAF3.js +1992 -0
  78. package/Build/Workers/chunk-ILX5N5QR.js +2342 -0
  79. package/Build/Workers/chunk-IRSD4EJW.js +630 -0
  80. package/Build/Workers/chunk-J3A3XMTG.js +672 -0
  81. package/Build/Workers/chunk-JK54NBBO.js +778 -0
  82. package/Build/Workers/chunk-JSFKPEFK.js +352 -0
  83. package/Build/Workers/chunk-JTSSQ3RH.js +147 -0
  84. package/Build/Workers/chunk-JZVZDHC2.js +288 -0
  85. package/Build/Workers/chunk-K724BR5O.js +455 -0
  86. package/Build/Workers/chunk-KJOVSN7J.js +56 -0
  87. package/Build/Workers/chunk-KKEMKV5G.js +44 -0
  88. package/Build/Workers/chunk-KXNXQXP5.js +682 -0
  89. package/Build/Workers/chunk-KYXZ3XTC.js +497 -0
  90. package/Build/Workers/chunk-L65LWRUE.js +3648 -0
  91. package/Build/Workers/chunk-LAN4XQR6.js +162 -0
  92. package/Build/Workers/chunk-LVO4J36T.js +1800 -0
  93. package/Build/Workers/chunk-LY5KUQ2L.js +57 -0
  94. package/Build/Workers/chunk-M2XWG5VC.js +124 -0
  95. package/Build/Workers/chunk-MUPWJMPP.js +44 -0
  96. package/Build/Workers/chunk-MVBEMXN4.js +163 -0
  97. package/Build/Workers/chunk-MVQYVX6D.js +511 -0
  98. package/Build/Workers/chunk-N4RF6TUL.js +301 -0
  99. package/Build/Workers/chunk-NCH4P66E.js +219 -0
  100. package/Build/Workers/chunk-NCL22ZUX.js +56 -0
  101. package/Build/Workers/chunk-NNJDVVEG.js +3794 -0
  102. package/Build/Workers/chunk-NYQSZLRF.js +78 -0
  103. package/Build/Workers/chunk-O2V4I3I5.js +682 -0
  104. package/Build/Workers/chunk-O453S45W.js +1483 -0
  105. package/Build/Workers/chunk-O5CYW2IR.js +1046 -0
  106. package/Build/Workers/chunk-OJ7O7DKV.js +973 -0
  107. package/Build/Workers/chunk-OJK33YVT.js +171 -0
  108. package/Build/Workers/chunk-OKFC4PDV.js +1344 -0
  109. package/Build/Workers/chunk-OKUXJIW3.js +124 -0
  110. package/Build/Workers/chunk-OWDZ5BX4.js +280 -0
  111. package/Build/Workers/chunk-PCERHV4S.js +198 -0
  112. package/Build/Workers/chunk-PJT22BD4.js +352 -0
  113. package/Build/Workers/chunk-PKV3R77E.js +672 -0
  114. package/Build/Workers/chunk-PQ2MGY7X.js +162 -0
  115. package/Build/Workers/chunk-PR62UBKE.js +693 -0
  116. package/Build/Workers/chunk-QJJ3GXSH.js +140 -0
  117. package/Build/Workers/chunk-QM4HZZYW.js +219 -0
  118. package/Build/Workers/chunk-QQ2BBL7Z.js +162 -0
  119. package/Build/Workers/chunk-QYC6Y25A.js +124 -0
  120. package/Build/Workers/chunk-RBAZR7R2.js +280 -0
  121. package/Build/Workers/chunk-REZJEC6F.js +241 -0
  122. package/Build/Workers/chunk-RS3LRHOK.js +73 -0
  123. package/Build/Workers/chunk-S2WTOFGB.js +102 -0
  124. package/Build/Workers/chunk-SGLJWWWY.js +352 -0
  125. package/Build/Workers/chunk-SJZMU3OS.js +2342 -0
  126. package/Build/Workers/chunk-SMZXVFCA.js +1344 -0
  127. package/Build/Workers/chunk-SND4KNB6.js +754 -0
  128. package/Build/Workers/chunk-SRH2XIWS.js +1067 -0
  129. package/Build/Workers/chunk-SXSP3JHS.js +38 -0
  130. package/Build/Workers/chunk-T6SVKD76.js +511 -0
  131. package/Build/Workers/chunk-TA3PH4Q7.js +519 -0
  132. package/Build/Workers/chunk-TDJ2NSYJ.js +171 -0
  133. package/Build/Workers/chunk-TJCD5NV5.js +837 -0
  134. package/Build/Workers/chunk-TXBADNRA.js +9237 -0
  135. package/Build/Workers/chunk-TYW2D7VU.js +2719 -0
  136. package/Build/Workers/chunk-U3KB4HMG.js +1054 -0
  137. package/Build/Workers/chunk-U6OMVSBY.js +368 -0
  138. package/Build/Workers/chunk-UAVMVBMC.js +754 -0
  139. package/Build/Workers/chunk-UCOZLNHF.js +1284 -0
  140. package/Build/Workers/chunk-UDKEO3UF.js +163 -0
  141. package/Build/Workers/chunk-UIQUUY4A.js +73 -0
  142. package/Build/Workers/chunk-ULY2FDDP.js +454 -0
  143. package/Build/Workers/chunk-UT7YX565.js +1992 -0
  144. package/Build/Workers/chunk-UTOYFI3Q.js +1992 -0
  145. package/Build/Workers/chunk-UUXWWJI7.js +101 -0
  146. package/Build/Workers/chunk-V5AWAGL2.js +97 -0
  147. package/Build/Workers/chunk-V5AXOGPW.js +682 -0
  148. package/Build/Workers/chunk-VAUX2Q2X.js +138 -0
  149. package/Build/Workers/chunk-VDX4SJKV.js +58 -0
  150. package/Build/Workers/chunk-W7WEPLZL.js +414 -0
  151. package/Build/Workers/chunk-WNAG4FHY.js +305 -0
  152. package/Build/Workers/chunk-WNQX2CP3.js +455 -0
  153. package/Build/Workers/chunk-XCASHPVG.js +778 -0
  154. package/Build/Workers/chunk-XJUIVTHG.js +1483 -0
  155. package/Build/Workers/chunk-XQVSSVT2.js +140 -0
  156. package/Build/Workers/chunk-Y5E2LVSX.js +138 -0
  157. package/Build/Workers/chunk-YEMKJOOG.js +352 -0
  158. package/Build/Workers/chunk-YGFVAGYF.js +630 -0
  159. package/Build/Workers/chunk-YNWTO2WN.js +147 -0
  160. package/Build/Workers/chunk-YZAMLSIA.js +352 -0
  161. package/Build/Workers/chunk-Z6LUW5FN.js +198 -0
  162. package/Build/Workers/chunk-ZDUCDVKX.js +288 -0
  163. package/Build/Workers/chunk-ZEEPTE4R.js +147 -0
  164. package/Build/Workers/chunk-ZIBW2BFB.js +1284 -0
  165. package/Build/Workers/chunk-ZOYVNCFZ.js +754 -0
  166. package/Build/Workers/chunk-ZSWY7UNG.js +3201 -0
  167. package/Build/Workers/chunk-ZXRWKKJP.js +398 -0
  168. package/Build/Workers/combineGeometry.js +24 -24
  169. package/Build/Workers/createBoxGeometry.js +18 -18
  170. package/Build/Workers/createBoxOutlineGeometry.js +16 -16
  171. package/Build/Workers/createCircleGeometry.js +26 -26
  172. package/Build/Workers/createCircleOutlineGeometry.js +19 -19
  173. package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
  174. package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
  175. package/Build/Workers/createCorridorGeometry.js +29 -29
  176. package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
  177. package/Build/Workers/createCylinderGeometry.js +20 -20
  178. package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
  179. package/Build/Workers/createEllipseGeometry.js +26 -26
  180. package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
  181. package/Build/Workers/createEllipsoidGeometry.js +19 -19
  182. package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
  183. package/Build/Workers/createFrustumGeometry.js +18 -18
  184. package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
  185. package/Build/Workers/createGeometry.js +24 -24
  186. package/Build/Workers/createGroundPolylineGeometry.js +23 -23
  187. package/Build/Workers/createMvtTile.js +1815 -0
  188. package/Build/Workers/createPlaneGeometry.js +16 -16
  189. package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
  190. package/Build/Workers/createPolygonGeometry.js +32 -32
  191. package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
  192. package/Build/Workers/createPolylineGeometry.js +25 -25
  193. package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
  194. package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
  195. package/Build/Workers/createRectangleGeometry.js +27 -27
  196. package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
  197. package/Build/Workers/createSimplePolylineGeometry.js +23 -23
  198. package/Build/Workers/createSphereGeometry.js +19 -19
  199. package/Build/Workers/createSphereOutlineGeometry.js +18 -18
  200. package/Build/Workers/createTaskProcessorWorker.js +3 -3
  201. package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
  202. package/Build/Workers/createVectorTileGeometries.js +24 -24
  203. package/Build/Workers/createVectorTilePoints.js +13 -13
  204. package/Build/Workers/createVectorTilePolygons.js +22 -22
  205. package/Build/Workers/createVectorTilePolylines.js +14 -14
  206. package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +26 -26
  207. package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +23 -23
  208. package/Build/Workers/createVerticesFromHeightmap.js +25 -25
  209. package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +21 -21
  210. package/Build/Workers/createWallGeometry.js +24 -24
  211. package/Build/Workers/createWallOutlineGeometry.js +23 -23
  212. package/Build/Workers/decodeDraco.js +10 -10
  213. package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +58 -44
  214. package/Build/Workers/decodeI3S.js +10 -10
  215. package/Build/Workers/gaussianSplatSorter.js +4 -4
  216. package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
  217. package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
  218. package/Build/Workers/transcodeKTX2.js +7 -7
  219. package/Build/Workers/transferTypedArrayTest.js +1 -1
  220. package/Build/Workers/upsampleQuantizedTerrainMesh.js +23 -23
  221. package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +26 -26
  222. package/Source/Core/ScreenSpaceEventHandler.js +19 -0
  223. package/Source/ThirdParty/Workers/zip-web-worker.js +1 -1
  224. package/Source/ThirdParty/zip-module.wasm +0 -0
  225. package/index.d.ts +48305 -0
  226. package/index.js +373 -373
  227. package/package.json +10 -10
@@ -1,640 +1,881 @@
1
1
  !(function() {
2
2
  "use strict";
3
- const { Array: e, Object: t, Number: n, Math: s, Error: r, Uint8Array: i, Uint16Array: a, Uint32Array: o, Int32Array: c, Map: l, DataView: u, Promise: h, TextEncoder: f, crypto: p, postMessage: d, TransformStream: w, ReadableStream: g, WritableStream: m, CompressionStream: _, DecompressionStream: y } = self, b = void 0, S = "undefined", z = "function", k = [];
4
- for (let e2 = 0; 256 > e2; e2++) {
5
- let t2 = e2;
6
- for (let e3 = 0; 8 > e3; e3++) 1 & t2 ? t2 = t2 >>> 1 ^ 3988292384 : t2 >>>= 1;
7
- k[e2] = t2;
8
- }
9
- class v {
10
- constructor(e2) {
11
- this.crc = e2 || -1;
12
- }
13
- append(e2) {
14
- let t2 = 0 | this.crc;
15
- for (let n2 = 0, s2 = 0 | e2.length; s2 > n2; n2++) t2 = t2 >>> 8 ^ k[255 & (t2 ^ e2[n2])];
16
- this.crc = t2;
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 = [[], [], [], [], [], [], [], []];
4
+ for (let t2 = 0; t2 < 256; t2++) {
5
+ let n2 = t2;
6
+ for (let t3 = 0; t3 < 8; t3++) n2 = 1 & n2 ? n2 >>> 1 ^ 3988292384 : n2 >>> 1;
7
+ C[0][t2] = n2;
8
+ }
9
+ for (let t2 = 0; t2 < 256; t2++) for (let n2 = 1; n2 < 8; n2++) {
10
+ const e2 = C[n2 - 1][t2];
11
+ C[n2][t2] = e2 >>> 8 ^ C[0][255 & e2];
12
+ }
13
+ const [I, A, x, M, P, B, D, F] = C;
14
+ class R {
15
+ constructor(t2) {
16
+ this.o = t2 || -1;
17
+ }
18
+ append(t2) {
19
+ let n2 = 0 | this.o;
20
+ const e2 = 0 | t2.length;
21
+ let s2 = 0;
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];
27
+ }
28
+ }
29
+ for (; s2 < e2; s2++) n2 = n2 >>> 8 ^ I[255 & (n2 ^ t2[s2])];
30
+ this.o = n2;
17
31
  }
18
32
  get() {
19
- return ~this.crc;
33
+ return ~this.o;
20
34
  }
21
35
  }
22
- class H extends w {
36
+ class U extends d {
23
37
  constructor() {
24
- let e2;
25
- const t2 = new v();
26
- super({ transform(e3, n2) {
27
- t2.append(e3), n2.enqueue(e3);
38
+ let t2;
39
+ const n2 = new R();
40
+ super({ transform(t3, e2) {
41
+ n2.append(t3), e2.enqueue(t3);
28
42
  }, flush() {
29
- const n2 = new i(4);
30
- new u(n2.buffer).setUint32(0, t2.get()), e2.value = n2;
31
- } }), e2 = this;
32
- }
33
- }
34
- const C = { concat(e2, t2) {
35
- if (0 === e2.length || 0 === t2.length) return e2.concat(t2);
36
- const n2 = e2[e2.length - 1], s2 = C.getPartial(n2);
37
- return 32 === s2 ? e2.concat(t2) : C._shiftRight(t2, s2, 0 | n2, e2.slice(0, e2.length - 1));
38
- }, bitLength(e2) {
39
- const t2 = e2.length;
40
- if (0 === t2) return 0;
41
- const n2 = e2[t2 - 1];
42
- return 32 * (t2 - 1) + C.getPartial(n2);
43
- }, clamp(e2, t2) {
44
- if (32 * e2.length < t2) return e2;
45
- const n2 = (e2 = e2.slice(0, s.ceil(t2 / 32))).length;
46
- return t2 &= 31, n2 > 0 && t2 && (e2[n2 - 1] = C.partial(t2, e2[n2 - 1] & 2147483648 >> t2 - 1, 1)), e2;
47
- }, partial: (e2, t2, n2) => 32 === e2 ? t2 : (n2 ? 0 | t2 : t2 << 32 - e2) + 1099511627776 * e2, getPartial: (e2) => s.round(e2 / 1099511627776) || 32, _shiftRight(e2, t2, n2, s2) {
48
- for (void 0 === s2 && (s2 = []); t2 >= 32; t2 -= 32) s2.push(n2), n2 = 0;
49
- if (0 === t2) return s2.concat(e2);
50
- for (let r3 = 0; r3 < e2.length; r3++) s2.push(n2 | e2[r3] >>> t2), n2 = e2[r3] << 32 - t2;
51
- const r2 = e2.length ? e2[e2.length - 1] : 0, i2 = C.getPartial(r2);
52
- return s2.push(C.partial(t2 + i2 & 31, t2 + i2 > 32 ? n2 : s2.pop(), 1)), s2;
53
- } }, B = { bytes: { fromBits(e2) {
54
- const t2 = C.bitLength(e2) / 8, n2 = new i(t2);
43
+ const e2 = new o(4);
44
+ new u(e2.buffer).setUint32(0, n2.get()), t2.value = e2;
45
+ } }), t2 = this;
46
+ }
47
+ }
48
+ function W(t2, n2) {
49
+ const e2 = new o(t2.length + n2.length);
50
+ return e2.set(t2), e2.set(n2, t2.length), e2;
51
+ }
52
+ function _(t2) {
53
+ return new u(t2.buffer, t2.byteOffset, t2.byteLength);
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);
55
76
  let s2;
56
- for (let r2 = 0; t2 > r2; r2++) 3 & r2 || (s2 = e2[r2 / 4]), n2[r2] = s2 >>> 24, s2 <<= 8;
57
- return n2;
58
- }, toBits(e2) {
59
- const t2 = [];
60
- let n2, s2 = 0;
61
- for (n2 = 0; n2 < e2.length; n2++) s2 = s2 << 8 | e2[n2], 3 & ~n2 || (t2.push(s2), s2 = 0);
62
- return 3 & n2 && t2.push(C.partial(8 * (3 & n2), s2)), t2;
63
- } } }, A = class {
64
- constructor(e2) {
65
- const t2 = this;
66
- t2.blockSize = 512, t2._init = [1732584193, 4023233417, 2562383102, 271733878, 3285377520], t2._key = [1518500249, 1859775393, 2400959708, 3395469782], e2 ? (t2._h = e2._h.slice(0), t2._buffer = e2._buffer.slice(0), t2._length = e2._length) : t2.reset();
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();
67
88
  }
68
89
  reset() {
69
- const e2 = this;
70
- return e2._h = e2._init.slice(0), e2._buffer = [], e2._length = 0, e2;
71
- }
72
- update(e2) {
73
90
  const t2 = this;
74
- "string" == typeof e2 && (e2 = B.utf8String.toBits(e2));
75
- const n2 = t2._buffer = C.concat(t2._buffer, e2), s2 = t2._length, i2 = t2._length = s2 + C.bitLength(e2);
76
- if (i2 > 9007199254740991) throw new r("Cannot hash more than 2^53 - 1 bits");
77
- const a2 = new o(n2);
78
- let c2 = 0;
79
- for (let e3 = t2.blockSize + s2 - (t2.blockSize + s2 & t2.blockSize - 1); i2 >= e3; e3 += t2.blockSize) t2._block(a2.subarray(16 * c2, 16 * (c2 + 1))), c2 += 1;
80
- return n2.splice(0, 16 * c2), t2;
81
- }
82
- finalize() {
83
- const e2 = this;
84
- let t2 = e2._buffer;
85
- const n2 = e2._h;
86
- t2 = C.concat(t2, [C.partial(1, 1)]);
87
- for (let e3 = t2.length + 2; 15 & e3; e3++) t2.push(0);
88
- for (t2.push(s.floor(e2._length / 4294967296)), t2.push(0 | e2._length); t2.length; ) e2._block(t2.splice(0, 16));
89
- return e2.reset(), n2;
90
- }
91
- _f(e2, t2, n2, s2) {
92
- return e2 > 19 ? e2 > 39 ? e2 > 59 ? e2 > 79 ? void 0 : t2 ^ n2 ^ s2 : t2 & n2 | t2 & s2 | n2 & s2 : t2 ^ n2 ^ s2 : t2 & n2 | ~t2 & s2;
93
- }
94
- _S(e2, t2) {
95
- return t2 << e2 | t2 >>> 32 - e2;
96
- }
97
- _block(t2) {
98
- const n2 = this, r2 = n2._h, i2 = e(80);
99
- for (let e2 = 0; 16 > e2; e2++) i2[e2] = t2[e2];
100
- let a2 = r2[0], o2 = r2[1], c2 = r2[2], l2 = r2[3], u2 = r2[4];
101
- for (let e2 = 0; 79 >= e2; e2++) {
102
- 16 > e2 || (i2[e2] = n2._S(1, i2[e2 - 3] ^ i2[e2 - 8] ^ i2[e2 - 14] ^ i2[e2 - 16]));
103
- const t3 = n2._S(5, a2) + n2._f(e2, o2, c2, l2) + u2 + i2[e2] + n2._key[s.floor(e2 / 20)] | 0;
104
- u2 = l2, l2 = c2, c2 = n2._S(30, o2), o2 = a2, a2 = t3;
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;
105
126
  }
106
- r2[0] = r2[0] + a2 | 0, r2[1] = r2[1] + o2 | 0, r2[2] = r2[2] + c2 | 0, r2[3] = r2[3] + l2 | 0, r2[4] = r2[4] + u2 | 0;
107
- }
108
- }, R = { getRandomValues(e2) {
109
- const t2 = new o(e2.buffer), n2 = (e3) => {
110
- let t3 = 987654321;
111
- const n3 = 4294967295;
112
- return () => (t3 = 36969 * (65535 & t3) + (t3 >> 16) & n3, (((t3 << 16) + (e3 = 18e3 * (65535 & e3) + (e3 >> 16) & n3) & n3) / 4294967296 + 0.5) * (s.random() > 0.5 ? 1 : -1));
113
- };
114
- for (let r2, i2 = 0; i2 < e2.length; i2 += 4) {
115
- const e3 = n2(4294967296 * (r2 || s.random()));
116
- r2 = 987654071 * e3(), t2[i2 / 4] = 4294967296 * e3() | 0;
117
- }
118
- return e2;
119
- } }, I = { importKey: (e2) => new I.hmacSha1(B.bytes.toBits(e2)), pbkdf2(e2, t2, n2, s2) {
120
- if (n2 = n2 || 1e4, 0 > s2 || 0 > n2) throw new r("invalid params to pbkdf2");
121
- const i2 = 1 + (s2 >> 5) << 2;
122
- let a2, o2, c2, l2, h2;
123
- const f2 = new ArrayBuffer(i2), p2 = new u(f2);
124
- let d2 = 0;
125
- const w2 = C;
126
- for (t2 = B.bytes.toBits(t2), h2 = 1; (i2 || 1) > d2; h2++) {
127
- for (a2 = o2 = e2.encrypt(w2.concat(t2, [h2])), c2 = 1; n2 > c2; c2++) for (o2 = e2.encrypt(o2), l2 = 0; l2 < o2.length; l2++) a2[l2] ^= o2[l2];
128
- for (c2 = 0; (i2 || 1) > d2 && c2 < a2.length; c2++) p2.setInt32(d2, a2[c2]), d2 += 4;
129
- }
130
- return f2.slice(0, s2 / 8);
131
- }, hmacSha1: class {
132
- constructor(e2) {
133
- const t2 = this, n2 = t2._hash = A, s2 = [[], []];
134
- t2._baseHash = [new n2(), new n2()];
135
- const r2 = t2._baseHash[0].blockSize / 32;
136
- e2.length > r2 && (e2 = new n2().update(e2).finalize());
137
- for (let t3 = 0; r2 > t3; t3++) s2[0][t3] = 909522486 ^ e2[t3], s2[1][t3] = 1549556828 ^ e2[t3];
138
- t2._baseHash[0].update(s2[0]), t2._baseHash[1].update(s2[1]), t2._resultHash = new n2(t2._baseHash[0]);
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]);
139
149
  }
140
150
  reset() {
141
- const e2 = this;
142
- e2._resultHash = new e2._hash(e2._baseHash[0]), e2._updated = false;
151
+ const t2 = this;
152
+ t2.L = new t2.V(t2.K[0]), t2.O = false;
143
153
  }
144
- update(e2) {
145
- this._updated = true, this._resultHash.update(e2);
154
+ update(t2) {
155
+ this.O = true, this.L.update(t2);
146
156
  }
147
157
  digest() {
148
- const e2 = this, t2 = e2._resultHash.finalize(), n2 = new e2._hash(e2._baseHash[1]).update(t2).finalize();
149
- return e2.reset(), n2;
150
- }
151
- encrypt(e2) {
152
- if (this._updated) throw new r("encrypt on already updated hmac called!");
153
- return this.update(e2), this.digest(e2);
154
- }
155
- } }, q = typeof p != S && typeof p.getRandomValues == z, K = "Invalid password", P = "Invalid signature", T = "zipjs-abort-check-password";
156
- function V(e2) {
157
- return q ? p.getRandomValues(e2) : R.getRandomValues(e2);
158
- }
159
- const x = 16, U = { name: "PBKDF2" }, W = t.assign({ hash: { name: "HMAC" } }, U), M = t.assign({ iterations: 1e3, hash: { name: "SHA-1" } }, U), E = ["deriveBits"], D = [8, 12, 16], L = [16, 24, 32], Z = 10, F = [0, 0, 0, 0], N = typeof p != S, O = N && p.subtle, j = N && typeof O != S, G = B.bytes, X = class {
160
- constructor(e2) {
161
- const t2 = this;
162
- t2._tables = [[[], [], [], [], []], [[], [], [], [], []]], t2._tables[0][0][0] || t2._precompute();
163
- const n2 = t2._tables[0][4], s2 = t2._tables[1], i2 = e2.length;
164
- let a2, o2, c2, l2 = 1;
165
- if (4 !== i2 && 6 !== i2 && 8 !== i2) throw new r("invalid aes key size");
166
- for (t2._key = [o2 = e2.slice(0), c2 = []], a2 = i2; 4 * i2 + 28 > a2; a2++) {
167
- let e3 = o2[a2 - 1];
168
- (a2 % i2 === 0 || 8 === i2 && a2 % i2 === 4) && (e3 = n2[e3 >>> 24] << 24 ^ n2[e3 >> 16 & 255] << 16 ^ n2[e3 >> 8 & 255] << 8 ^ n2[255 & e3], a2 % i2 === 0 && (e3 = e3 << 8 ^ e3 >>> 24 ^ l2 << 24, l2 = l2 << 1 ^ 283 * (l2 >> 7))), o2[a2] = o2[a2 - i2] ^ e3;
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 = "zipjs-abort-check-password";
166
+ function H(t2) {
167
+ if (L) return h.getRandomValues(t2);
168
+ throw new r("Crypto API not supported");
169
+ }
170
+ const N = 16, q = { name: "PBKDF2" }, G = n.assign({ hash: { name: "HMAC" } }, q), J = n.assign({ iterations: 1e3, hash: { name: "SHA-1" } }, q), Q = ["deriveBits"], X = [8, 12, 16], Y = [16, 24, 32], Z = 10, $ = [0, 0, 0, 0], tt = typeof h != b, nt = tt && h.subtle, et = tt && typeof nt != b, st = V.bytes, rt = 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;
169
180
  }
170
- for (let e3 = 0; a2; e3++, a2--) {
171
- const t3 = o2[3 & e3 ? a2 : a2 - 4];
172
- c2[e3] = 4 >= a2 || 4 > e3 ? t3 : s2[0][n2[t3 >>> 24]] ^ s2[1][n2[t3 >> 16 & 255]] ^ s2[2][n2[t3 >> 8 & 255]] ^ s2[3][n2[255 & t3]];
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]];
173
184
  }
174
185
  }
175
- encrypt(e2) {
176
- return this._crypt(e2, 0);
177
- }
178
- decrypt(e2) {
179
- return this._crypt(e2, 1);
180
- }
181
- _precompute() {
182
- const e2 = this._tables[0], t2 = this._tables[1], n2 = e2[4], s2 = t2[4], r2 = [], i2 = [];
183
- let a2, o2, c2, l2;
184
- for (let e3 = 0; 256 > e3; e3++) i2[(r2[e3] = e3 << 1 ^ 283 * (e3 >> 7)) ^ e3] = e3;
185
- for (let u2 = a2 = 0; !n2[u2]; u2 ^= o2 || 1, a2 = i2[a2] || 1) {
186
- let i3 = a2 ^ a2 << 1 ^ a2 << 2 ^ a2 << 3 ^ a2 << 4;
187
- i3 = i3 >> 8 ^ 255 & i3 ^ 99, n2[u2] = i3, s2[i3] = u2, l2 = r2[c2 = r2[o2 = r2[u2]]];
188
- let h2 = 16843009 * l2 ^ 65537 * c2 ^ 257 * o2 ^ 16843008 * u2, f2 = 257 * r2[i3] ^ 16843008 * i3;
189
- for (let n3 = 0; 4 > n3; n3++) e2[n3][u2] = f2 = f2 << 24 ^ f2 >>> 8, t2[n3][i3] = h2 = h2 << 24 ^ h2 >>> 8;
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;
190
201
  }
191
- for (let n3 = 0; 5 > n3; n3++) e2[n3] = e2[n3].slice(0), t2[n3] = t2[n3].slice(0);
202
+ for (let e3 = 0; e3 < 5; e3++) t2[e3] = t2[e3].slice(0), n2[e3] = n2[e3].slice(0);
192
203
  }
193
- _crypt(e2, t2) {
194
- if (4 !== e2.length) throw new r("invalid aes block size");
195
- const n2 = this._key[t2], s2 = n2.length / 4 - 2, i2 = [0, 0, 0, 0], a2 = this._tables[t2], o2 = a2[0], c2 = a2[1], l2 = a2[2], u2 = a2[3], h2 = a2[4];
196
- let f2, p2, d2, w2 = e2[0] ^ n2[0], g2 = e2[t2 ? 3 : 1] ^ n2[1], m2 = e2[2] ^ n2[2], _2 = e2[t2 ? 1 : 3] ^ n2[3], y2 = 4;
197
- for (let e3 = 0; s2 > e3; e3++) f2 = o2[w2 >>> 24] ^ c2[g2 >> 16 & 255] ^ l2[m2 >> 8 & 255] ^ u2[255 & _2] ^ n2[y2], p2 = o2[g2 >>> 24] ^ c2[m2 >> 16 & 255] ^ l2[_2 >> 8 & 255] ^ u2[255 & w2] ^ n2[y2 + 1], d2 = o2[m2 >>> 24] ^ c2[_2 >> 16 & 255] ^ l2[w2 >> 8 & 255] ^ u2[255 & g2] ^ n2[y2 + 2], _2 = o2[_2 >>> 24] ^ c2[w2 >> 16 & 255] ^ l2[g2 >> 8 & 255] ^ u2[255 & m2] ^ n2[y2 + 3], y2 += 4, w2 = f2, g2 = p2, m2 = d2;
198
- for (let e3 = 0; 4 > e3; e3++) i2[t2 ? 3 & -e3 : e3] = h2[w2 >>> 24] << 24 ^ h2[g2 >> 16 & 255] << 16 ^ h2[m2 >> 8 & 255] << 8 ^ h2[255 & _2] ^ n2[y2++], f2 = w2, w2 = g2, g2 = m2, m2 = _2, _2 = f2;
199
- return i2;
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;
200
211
  }
201
- }, J = class {
202
- constructor(e2, t2) {
203
- this._prf = e2, this._initIv = t2, this._iv = t2;
212
+ }, ot = class {
213
+ constructor(t2, n2) {
214
+ this.G = t2, this.J = n2, this.X = n2;
204
215
  }
205
216
  reset() {
206
- this._iv = this._initIv;
217
+ this.X = this.J;
207
218
  }
208
- update(e2) {
209
- return this.calculate(this._prf, e2, this._iv);
219
+ update(t2) {
220
+ return this.Y(this.G, t2, this.X);
210
221
  }
211
- incWord(e2) {
212
- if (255 & ~(e2 >> 24)) e2 += 1 << 24;
222
+ Z(t2) {
223
+ if (255 & ~(t2 >> 24)) t2 += 1 << 24;
213
224
  else {
214
- let t2 = e2 >> 16 & 255, n2 = e2 >> 8 & 255, s2 = 255 & e2;
215
- 255 === t2 ? (t2 = 0, 255 === n2 ? (n2 = 0, 255 === s2 ? s2 = 0 : ++s2) : ++n2) : ++t2, e2 = 0, e2 += t2 << 16, e2 += n2 << 8, e2 += s2;
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;
216
227
  }
217
- return e2;
228
+ return t2;
218
229
  }
219
- incCounter(e2) {
220
- 0 === (e2[0] = this.incWord(e2[0])) && (e2[1] = this.incWord(e2[1]));
230
+ $(t2) {
231
+ 0 === (t2[0] = this.Z(t2[0])) && (t2[1] = this.Z(t2[1]));
221
232
  }
222
- calculate(e2, t2, n2) {
233
+ Y(t2, n2, e2) {
223
234
  let s2;
224
- if (!(s2 = t2.length)) return [];
225
- const r2 = C.bitLength(t2);
226
- for (let r3 = 0; s2 > r3; r3 += 4) {
227
- this.incCounter(n2);
228
- const s3 = e2.encrypt(n2);
229
- t2[r3] ^= s3[0], t2[r3 + 1] ^= s3[1], t2[r3 + 2] ^= s3[2], t2[r3 + 3] ^= s3[3];
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];
230
241
  }
231
- return C.clamp(t2, r2);
242
+ return T.m(n2, r2);
232
243
  }
233
- }, Q = I.hmacSha1;
234
- let Y = N && j && typeof O.importKey == z, $ = N && j && typeof O.deriveBits == z;
235
- class ee extends w {
236
- constructor({ password: e2, rawPassword: n2, signed: s2, encryptionStrength: a2, checkPasswordOnly: o2 }) {
244
+ }, ct = E._;
245
+ let it = tt && et && typeof nt.importKey == k, at = tt && et && typeof nt.deriveBits == k;
246
+ class ft extends d {
247
+ constructor({ password: t2, rawPassword: n2, encryptionStrength: e2, checkPasswordOnly: s2, checkAuthenticationCode: c2 = true }) {
237
248
  super({ start() {
238
- t.assign(this, { ready: new h((e3) => this.resolveReady = e3), password: re(e2, n2), signed: s2, strength: a2 - 1, pending: new i() });
239
- }, async transform(e3, t2) {
240
- const n3 = this, { password: s3, strength: a3, resolveReady: c2, ready: l2 } = n3;
241
- s3 ? (await (async (e4, t3, n4, s4) => {
242
- const i2 = await se(e4, t3, n4, ae(s4, 0, D[t3])), a4 = ae(s4, D[t3]);
243
- if (i2[0] != a4[0] || i2[1] != a4[1]) throw new r(K);
244
- })(n3, a3, s3, ae(e3, 0, D[a3] + 2)), e3 = ae(e3, D[a3] + 2), o2 ? t2.error(new r(T)) : c2()) : await l2;
245
- const u2 = new i(e3.length - Z - (e3.length - Z) % x);
246
- t2.enqueue(ne(n3, e3, u2, 0, Z, true));
247
- }, async flush(e3) {
248
- const { signed: t2, ctr: n3, hmac: s3, pending: a3, ready: o3 } = this;
249
- if (s3 && n3) {
250
- await o3;
251
- const c2 = ae(a3, 0, a3.length - Z), l2 = ae(a3, a3.length - Z);
252
- let u2 = new i();
253
- if (c2.length) {
254
- const e4 = ce(G, c2);
255
- s3.update(e4);
256
- const t3 = n3.update(e4);
257
- u2 = oe(G, t3);
249
+ lt(this, t2, n2, e2);
250
+ }, 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 ht(t4, n4, e4, dt(s3, 0, X[n4])), c4 = dt(s3, X[n4]);
254
+ if (o2[0] != c4[0] || o2[1] != c4[1]) throw new r(O);
255
+ })(e3, i2, c3, dt(t3, 0, X[i2] + 2)), t3 = dt(t3, X[i2] + 2), s2 ? n3.error(new r(j)) : a2()) : await f2;
256
+ const u2 = new o(t3.length - Z - (t3.length - Z) % N);
257
+ n3.enqueue(wt(e3, t3, u2, 0, Z, true));
258
+ }, async flush(t3) {
259
+ const { et: n3, st: e3, ot: s3, ready: o2 } = this;
260
+ if (e3 && n3) {
261
+ await o2;
262
+ const i2 = dt(s3, 0, s3.length - Z), a2 = dt(s3, s3.length - Z);
263
+ let f2 = z;
264
+ if (i2.length) {
265
+ const t4 = mt(st, i2);
266
+ e3.update(t4);
267
+ const s4 = n3.update(t4);
268
+ f2 = yt(st, s4);
258
269
  }
259
- if (t2) {
260
- const e4 = ae(oe(G, s3.digest()), 0, Z);
261
- for (let t3 = 0; Z > t3; t3++) if (e4[t3] != l2[t3]) throw new r(P);
262
- }
263
- e3.enqueue(u2);
270
+ const u2 = dt(yt(st, e3.digest()), 0, Z);
271
+ let l2 = s3.length < Z ? 1 : 0;
272
+ for (let t4 = 0; t4 < Z; t4++) l2 |= u2[t4] ^ a2[t4];
273
+ if (l2 && c2) throw new r("Invalid authentication code");
274
+ t3.enqueue(f2);
264
275
  }
265
276
  } });
266
277
  }
267
278
  }
268
- class te extends w {
269
- constructor({ password: e2, rawPassword: n2, encryptionStrength: s2 }) {
270
- let r2;
279
+ class ut extends d {
280
+ constructor({ password: t2, rawPassword: n2, encryptionStrength: e2 }) {
271
281
  super({ start() {
272
- t.assign(this, { ready: new h((e3) => this.resolveReady = e3), password: re(e2, n2), strength: s2 - 1, pending: new i() });
273
- }, async transform(e3, t2) {
274
- const n3 = this, { password: s3, strength: r3, resolveReady: a2, ready: o2 } = n3;
275
- let c2 = new i();
276
- s3 ? (c2 = await (async (e4, t3, n4) => {
277
- const s4 = V(new i(D[t3]));
278
- return ie(s4, await se(e4, t3, n4, s4));
279
- })(n3, r3, s3), a2()) : await o2;
280
- const l2 = new i(c2.length + e3.length - e3.length % x);
281
- l2.set(c2, 0), t2.enqueue(ne(n3, e3, l2, c2.length, 0));
282
- }, async flush(e3) {
283
- const { ctr: t2, hmac: n3, pending: s3, ready: a2 } = this;
284
- if (n3 && t2) {
285
- await a2;
286
- let o2 = new i();
287
- if (s3.length) {
288
- const e4 = t2.update(ce(G, s3));
289
- n3.update(e4), o2 = oe(G, e4);
282
+ lt(this, t2, n2, e2);
283
+ }, 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 = H(new o(X[n4]));
288
+ return W(s3, await ht(t4, n4, e4, s3));
289
+ })(e3, r2, s2), c2()) : await i2;
290
+ const f2 = new o(a2.length + t3.length - t3.length % N);
291
+ f2.set(a2, 0), n3.enqueue(wt(e3, t3, f2, a2.length, 0));
292
+ }, 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(mt(st, s2));
299
+ e3.update(t4), o2 = yt(st, t4);
290
300
  }
291
- r2.signature = oe(G, n3.digest()).slice(0, Z), e3.enqueue(ie(o2, r2.signature));
301
+ const c2 = yt(st, e3.digest()).slice(0, Z);
302
+ t3.enqueue(W(o2, c2));
292
303
  }
293
- } }), r2 = this;
304
+ } });
294
305
  }
295
306
  }
296
- function ne(e2, t2, n2, s2, r2, a2) {
297
- const { ctr: o2, hmac: c2, pending: l2 } = e2, u2 = t2.length - r2;
298
- let h2;
299
- for (l2.length && (t2 = ie(l2, t2), n2 = ((e3, t3) => {
300
- if (t3 && t3 > e3.length) {
301
- const n3 = e3;
302
- (e3 = new i(t3)).set(n3, 0);
307
+ function lt(t2, e2, s2, r2) {
308
+ n.assign(t2, { ready: new l((n2) => t2.nt = n2), password: pt(e2, s2), strength: r2 - 1, ot: z });
309
+ }
310
+ function wt(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) {
316
+ if (n3 && n3 > t3.length) {
317
+ const e3 = t3;
318
+ (t3 = new o(n3)).set(e3, 0);
303
319
  }
304
- return e3;
305
- })(n2, u2 - u2 % x)), h2 = 0; u2 - x >= h2; h2 += x) {
306
- const e3 = ce(G, ae(t2, h2, h2 + x));
307
- a2 && c2.update(e3);
308
- const r3 = o2.update(e3);
309
- a2 || c2.update(r3), n2.set(oe(G, r3), h2 + s2);
310
- }
311
- return e2.pending = ae(t2, h2), n2;
312
- }
313
- async function se(n2, s2, r2, a2) {
314
- n2.password = null;
315
- const o2 = await (async (e2, t2, n3, s3, r3) => {
316
- if (!Y) return I.importKey(t2);
320
+ return t3;
321
+ })(e2, s2 + (u2 - u2 % N)), l2 = 0; l2 <= u2 - N; l2 += N) {
322
+ const t3 = mt(st, dt(n2, l2, l2 + N));
323
+ c2 && a2.update(t3);
324
+ const r3 = i2.update(t3);
325
+ c2 || a2.update(r3), e2.set(yt(st, r3), l2 + s2);
326
+ }
327
+ return t2.ot = dt(n2, l2), e2;
328
+ }
329
+ async function ht(e2, s2, r2, c2) {
330
+ e2.password = null;
331
+ const i2 = await (async function(t2, n2, e3, s3, r3) {
332
+ if (!it) return E.importKey(n2);
317
333
  try {
318
- return await O.importKey("raw", t2, n3, false, r3);
334
+ return await nt.importKey("raw", n2, e3, false, r3);
319
335
  } catch {
320
- return Y = false, I.importKey(t2);
336
+ return it = false, E.importKey(n2);
321
337
  }
322
- })(0, r2, W, 0, E), c2 = await (async (e2, t2, n3) => {
323
- if (!$) return I.pbkdf2(t2, e2.salt, M.iterations, n3);
338
+ })(0, r2, G, 0, Q), a2 = await (async function(t2, n2, e3) {
339
+ if (!at) return E.T(n2, t2.salt, J.iterations, e3);
324
340
  try {
325
- return await O.deriveBits(e2, t2, n3);
341
+ return await nt.deriveBits(t2, n2, e3);
326
342
  } catch {
327
- return $ = false, I.pbkdf2(t2, e2.salt, M.iterations, n3);
343
+ return at = false, E.T(n2, t2.salt, J.iterations, e3);
328
344
  }
329
- })(t.assign({ salt: a2 }, M), o2, 8 * (2 * L[s2] + 2)), l2 = new i(c2), u2 = ce(G, ae(l2, 0, L[s2])), h2 = ce(G, ae(l2, L[s2], 2 * L[s2])), f2 = ae(l2, 2 * L[s2]);
330
- return t.assign(n2, { keys: { key: u2, authentication: h2, passwordVerification: f2 }, ctr: new J(new X(u2), e.from(F)), hmac: new Q(h2) }), f2;
331
- }
332
- function re(e2, t2) {
333
- return t2 === b ? ((e3) => {
334
- if (typeof f == S) {
335
- const t3 = new i((e3 = unescape(encodeURIComponent(e3))).length);
336
- for (let n2 = 0; n2 < t3.length; n2++) t3[n2] = e3.charCodeAt(n2);
337
- return t3;
345
+ })(n.assign({ salt: c2 }, J), i2, 8 * (2 * Y[s2] + 2)), f2 = new o(a2), u2 = mt(st, dt(f2, 0, Y[s2])), l2 = mt(st, dt(f2, Y[s2], 2 * Y[s2])), w2 = dt(f2, 2 * Y[s2]);
346
+ return n.assign(e2, { keys: { key: u2, ct: l2, passwordVerification: w2 }, et: new ot(new rt(u2), t.from($)), st: new ct(l2) }), w2;
347
+ }
348
+ function pt(t2, n2) {
349
+ return n2 === v ? (function(t3) {
350
+ if (typeof w == b) {
351
+ t3 = unescape(encodeURIComponent(t3));
352
+ const n3 = new o(t3.length);
353
+ for (let e2 = 0; e2 < n3.length; e2++) n3[e2] = t3.charCodeAt(e2);
354
+ return n3;
338
355
  }
339
- return new f().encode(e3);
340
- })(e2) : t2;
356
+ return new w().encode(t3);
357
+ })(t2) : n2;
341
358
  }
342
- function ie(e2, t2) {
343
- let n2 = e2;
344
- return e2.length + t2.length && (n2 = new i(e2.length + t2.length), n2.set(e2, 0), n2.set(t2, e2.length)), n2;
359
+ function dt(t2, n2, e2) {
360
+ return t2.subarray(n2, e2);
345
361
  }
346
- function ae(e2, t2, n2) {
347
- return e2.subarray(t2, n2);
362
+ function yt(t2, n2) {
363
+ return t2.v(n2);
348
364
  }
349
- function oe(e2, t2) {
350
- return e2.fromBits(t2);
365
+ function mt(t2, n2) {
366
+ return t2.C(n2);
351
367
  }
352
- function ce(e2, t2) {
353
- return e2.toBits(t2);
354
- }
355
- class le extends w {
356
- constructor({ password: e2, passwordVerification: n2, checkPasswordOnly: s2 }) {
368
+ class St extends d {
369
+ constructor({ password: t2, rawPassword: n2, passwordVerification: e2, checkPasswordOnly: s2 }) {
357
370
  super({ start() {
358
- t.assign(this, { password: e2, passwordVerification: n2 }), pe(this, e2);
359
- }, transform(e3, t2) {
360
- const n3 = this;
361
- if (n3.password) {
362
- const t3 = he(n3, e3.subarray(0, 12));
363
- if (n3.password = null, t3.at(-1) != n3.passwordVerification) throw new r(K);
364
- e3 = e3.subarray(12);
371
+ vt(this, t2, n2, e2);
372
+ }, transform(t3, n3) {
373
+ const e3 = this;
374
+ if (e3.password || e3.rawPassword) {
375
+ const n4 = bt(e3, t3.subarray(0, 12));
376
+ if (e3.password = e3.rawPassword = null, 0 != (n4[11] ^ e3.passwordVerification)) throw new r(O);
377
+ t3 = t3.subarray(12);
365
378
  }
366
- s2 ? t2.error(new r(T)) : t2.enqueue(he(n3, e3));
379
+ s2 ? n3.error(new r(j)) : n3.enqueue(bt(e3, t3));
367
380
  } });
368
381
  }
369
382
  }
370
- class ue extends w {
371
- constructor({ password: e2, passwordVerification: n2 }) {
383
+ class gt extends d {
384
+ constructor({ password: t2, rawPassword: n2, passwordVerification: e2 }) {
372
385
  super({ start() {
373
- t.assign(this, { password: e2, passwordVerification: n2 }), pe(this, e2);
374
- }, transform(e3, t2) {
375
- const n3 = this;
386
+ vt(this, t2, n2, e2);
387
+ }, transform(t3, n3) {
388
+ const e3 = this;
376
389
  let s2, r2;
377
- if (n3.password) {
378
- n3.password = null;
379
- const t3 = V(new i(12));
380
- t3[11] = n3.passwordVerification, s2 = new i(e3.length + t3.length), s2.set(fe(n3, t3), 0), r2 = 12;
381
- } else s2 = new i(e3.length), r2 = 0;
382
- s2.set(fe(n3, e3), r2), t2.enqueue(s2);
390
+ if (e3.password || e3.rawPassword) {
391
+ e3.password = e3.rawPassword = null;
392
+ const n4 = H(new o(12));
393
+ n4[11] = e3.passwordVerification, s2 = new o(t3.length + n4.length), s2.set(kt(e3, n4), 0), r2 = 12;
394
+ } else s2 = new o(t3.length), r2 = 0;
395
+ s2.set(kt(e3, t3), r2), n3.enqueue(s2);
383
396
  } });
384
397
  }
385
398
  }
386
- function he(e2, t2) {
387
- const n2 = new i(t2.length);
388
- for (let s2 = 0; s2 < t2.length; s2++) n2[s2] = we(e2) ^ t2[s2], de(e2, n2[s2]);
389
- return n2;
390
- }
391
- function fe(e2, t2) {
392
- const n2 = new i(t2.length);
393
- for (let s2 = 0; s2 < t2.length; s2++) n2[s2] = we(e2) ^ t2[s2], de(e2, t2[s2]);
394
- return n2;
395
- }
396
- function pe(e2, n2) {
397
- const s2 = [305419896, 591751049, 878082192];
398
- t.assign(e2, { keys: s2, crcKey0: new v(s2[0]), crcKey2: new v(s2[2]) });
399
- for (let t2 = 0; t2 < n2.length; t2++) de(e2, n2.charCodeAt(t2));
399
+ function vt(t2, e2, s2, r2) {
400
+ n.assign(t2, { password: e2, rawPassword: s2, passwordVerification: r2 }), (function(t3, e3, s3) {
401
+ 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++) zt(t3, s3[n2]);
403
+ else for (let n2 = 0; n2 < e3.length; n2++) zt(t3, e3.charCodeAt(n2));
404
+ })(t2, e2, s2);
400
405
  }
401
- function de(e2, t2) {
402
- let [n2, r2, i2] = e2.keys;
403
- e2.crcKey0.append([t2]), n2 = ~e2.crcKey0.get(), r2 = me(s.imul(me(r2 + ge(n2)), 134775813) + 1), e2.crcKey2.append([r2 >>> 24]), i2 = ~e2.crcKey2.get(), e2.keys = [n2, r2, i2];
404
- }
405
- function we(e2) {
406
- const t2 = 2 | e2.keys[2];
407
- return ge(s.imul(t2, 1 ^ t2) >>> 8);
408
- }
409
- function ge(e2) {
410
- return 255 & e2;
406
+ function bt(t2, n2) {
407
+ const e2 = new o(n2.length);
408
+ for (let s2 = 0; s2 < n2.length; s2++) e2[s2] = Ct(t2) ^ n2[s2], zt(t2, e2[s2]);
409
+ return e2;
411
410
  }
412
- function me(e2) {
413
- return 4294967295 & e2;
411
+ function kt(t2, n2) {
412
+ const e2 = new o(n2.length);
413
+ for (let s2 = 0; s2 < n2.length; s2++) e2[s2] = Ct(t2) ^ n2[s2], zt(t2, n2[s2]);
414
+ return e2;
414
415
  }
415
- class _e extends w {
416
- constructor(e2, { chunkSize: t2, CompressionStreamZlib: n2, CompressionStream: s2 }) {
416
+ function zt(t2, n2) {
417
+ let [, e2] = t2.keys;
418
+ t2.it.append([n2]);
419
+ const r2 = ~t2.it.get();
420
+ e2 = At(s.imul(At(e2 + It(r2)), 134775813) + 1), t2.ft.append([e2 >>> 24]);
421
+ const o2 = ~t2.ft.get();
422
+ t2.keys = [r2, e2, o2];
423
+ }
424
+ function Ct(t2) {
425
+ const n2 = 2 | t2.keys[2];
426
+ return It(s.imul(n2, 1 ^ n2) >>> 8);
427
+ }
428
+ function It(t2) {
429
+ return 255 & t2;
430
+ }
431
+ function At(t2) {
432
+ return 4294967295 & t2;
433
+ }
434
+ function xt(t2) {
435
+ if (t2 instanceof y) return t2;
436
+ const n2 = t2.getReader();
437
+ return new y({ async pull(t3) {
438
+ const { value: e2, done: s2 } = await n2.read();
439
+ s2 ? t3.close() : t3.enqueue(e2);
440
+ }, cancel: (t3) => n2.cancel(t3) });
441
+ }
442
+ const Mt = new f();
443
+ function Pt(t2) {
444
+ return Mt.get(t2);
445
+ }
446
+ const Bt = "Invalid uncompressed size", Dt = "deflate-raw", Ft = "gzip", Rt = [31, 139, 8];
447
+ class Ut extends d {
448
+ constructor(t2, { chunkSize: n2, CompressionStreamFallback: e2, CompressionStream: s2 }) {
417
449
  super({});
418
- const { compressed: r2, encrypted: i2, useCompressionStream: a2, zipCrypto: o2, signed: c2, level: l2 } = e2, h2 = this;
419
- let f2, p2, d2 = super.readable;
420
- i2 && !o2 || !c2 || (f2 = new H(), d2 = ze(d2, f2)), r2 && (d2 = Se(d2, a2, { level: l2, chunkSize: t2 }, s2, n2, s2)), i2 && (o2 ? d2 = ze(d2, new ue(e2)) : (p2 = new te(e2), d2 = ze(d2, p2))), be(h2, d2, () => {
421
- let e3;
422
- i2 && !o2 && (e3 = p2.signature), i2 && !o2 || !c2 || (e3 = new u(f2.value.buffer).getUint32(0)), h2.signature = e3;
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;
451
+ let y2, m2, S2, g2 = super.readable;
452
+ const v2 = w2 && Pt(w2), b2 = a2 && r2 && !l2 && !v2 && (!o2 || i2) && Boolean(c2 && s2);
453
+ if (o2 && !i2 || !a2 || b2 || (y2 = new U(), g2 = Lt(g2, y2)), r2) if (v2) g2 = Ot(g2, Kt(v2.CompressionStream, w2, { level: f2, chunkSize: n2, compressionMethod: h2, uncompressedSize: p2 }));
454
+ else if (b2) S2 = new Wt(), g2 = Ot(g2, new s2(Ft)), g2 = Lt(g2, S2);
455
+ else try {
456
+ g2 = Et(g2, c2, { level: f2, chunkSize: n2 }, s2, e2);
457
+ } catch (t3) {
458
+ let n3;
459
+ try {
460
+ n3 = new s2(Ft);
461
+ } catch {
462
+ throw t3;
463
+ }
464
+ g2 = Ot(g2, n3), g2 = Lt(g2, new Wt());
465
+ }
466
+ o2 && (i2 ? g2 = Lt(g2, new gt(t2)) : (m2 = new ut(t2), g2 = Lt(g2, m2))), Vt(d2, g2, () => {
467
+ o2 && !i2 || !a2 || (d2.crc32 = b2 ? S2.crc32 : new u(y2.value.buffer).getUint32(0));
423
468
  });
424
469
  }
425
470
  }
426
- class ye extends w {
427
- constructor(e2, { chunkSize: t2, DecompressionStreamZlib: n2, DecompressionStream: s2 }) {
471
+ class Wt extends d {
472
+ constructor() {
473
+ let t2, n2 = 10, e2 = new o(0);
474
+ super({ transform(t3, r2) {
475
+ if (n2) {
476
+ const e3 = s.min(n2, t3.length);
477
+ if (n2 -= e3, !(t3 = t3.subarray(e3)).length) return;
478
+ }
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));
483
+ }, flush() {
484
+ const n3 = _(e2);
485
+ t2.crc32 = n3.getUint32(0, true), t2.uncompressedSize = n3.getUint32(4, true);
486
+ } }), t2 = this;
487
+ }
488
+ }
489
+ class _t extends d {
490
+ constructor(t2, { chunkSize: n2, DecompressionStreamFallback: e2, DecompressionStream: s2 }) {
428
491
  super({});
429
- const { zipCrypto: i2, encrypted: a2, signed: o2, signature: c2, compressed: l2, useCompressionStream: h2, deflate64: f2 } = e2;
430
- let p2, d2, w2 = super.readable;
431
- a2 && (i2 ? w2 = ze(w2, new le(e2)) : (d2 = new ee(e2), w2 = ze(w2, d2))), l2 && (w2 = Se(w2, h2, { chunkSize: t2, deflate64: f2 }, s2, n2, s2)), a2 && !i2 || !o2 || (p2 = new H(), w2 = ze(w2, p2)), be(this, w2, () => {
432
- if ((!a2 || i2) && o2) {
433
- const e3 = new u(p2.value.buffer);
434
- if (c2 != e3.getUint32(0, false)) throw new r(P);
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 = Lt(C2, new St(t2)) : (z2 = new ft(t2), C2 = Lt(C2, z2))), w2) {
495
+ const t3 = m2 && Pt(m2);
496
+ if (t3) C2 = Ot(C2, Kt(t3.DecompressionStream, m2, { chunkSize: n2, compressionMethod: S2, rawBitFlag: g2, uncompressedSize: b2 }));
497
+ else try {
498
+ C2 = Et(C2, h2, { chunkSize: n2, deflate64: p2 }, s2, e2);
499
+ } catch (t4) {
500
+ if (p2 || b2 === v) throw t4;
501
+ let n3;
502
+ try {
503
+ n3 = new s2(Ft);
504
+ } catch {
505
+ throw t4;
506
+ }
507
+ C2 = (function(t5, n4, e3) {
508
+ const s3 = new R();
509
+ let c3, i3, a3, f3 = 0, u2 = false;
510
+ const w3 = new l((t6, n5) => {
511
+ i3 = t6, a3 = n5;
512
+ });
513
+ w3.catch(() => {
514
+ }), e3 || i3();
515
+ const h3 = new d({ start(t6) {
516
+ const n5 = new o(10);
517
+ n5.set(Rt), t6.enqueue(n5);
518
+ }, transform(t6, n5) {
519
+ n5.enqueue(t6);
520
+ }, async flush(t6) {
521
+ u2 = true, y2();
522
+ try {
523
+ await w3;
524
+ } finally {
525
+ m3();
526
+ }
527
+ const n5 = new o(8), r2 = _(n5);
528
+ r2.setUint32(0, s3.get(), true), r2.setUint32(4, e3, true), t6.enqueue(n5);
529
+ }, cancel(t6) {
530
+ a3(t6);
531
+ } }), p3 = new d({ transform(t6, n5) {
532
+ s3.append(t6), f3 += t6.length, f3 >= e3 ? i3() : u2 && y2(), n5.enqueue(t6);
533
+ }, cancel(t6) {
534
+ a3(t6);
535
+ } });
536
+ return t5 = Lt(t5, h3), Lt(t5 = Ot(t5, n4), p3);
537
+ function y2() {
538
+ m3(), c3 = setTimeout(() => a3(new r(Bt)), 5e3);
539
+ }
540
+ function m3() {
541
+ clearTimeout(c3);
542
+ }
543
+ })(C2, n3, b2);
544
+ }
545
+ C2 = (function(t4) {
546
+ const n3 = t4.getReader();
547
+ return new y({ async pull(t5) {
548
+ let e3;
549
+ try {
550
+ e3 = await n3.read();
551
+ } catch (t6) {
552
+ if (t6 && t6.message) throw t6;
553
+ const n4 = new r("Invalid compressed data");
554
+ throw n4.cause = t6, n4;
555
+ }
556
+ const { value: s3, done: o2 } = e3;
557
+ o2 ? t5.close() : t5.enqueue(s3);
558
+ }, cancel: (t5) => n3.cancel(t5) });
559
+ })(C2);
560
+ }
561
+ a2 && (k2 = new U(), C2 = Lt(C2, k2)), Vt(this, C2, () => {
562
+ if (a2) {
563
+ const t3 = new u(k2.value.buffer);
564
+ if (f2 != t3.getUint32(0, false)) throw new r("Invalid CRC32");
435
565
  }
436
566
  });
437
567
  }
438
568
  }
439
- function be(e2, n2, s2) {
440
- n2 = ze(n2, new w({ flush: s2 })), t.defineProperty(e2, "readable", { get: () => n2 });
569
+ const Tt = new f();
570
+ function Vt(t2, e2, s2) {
571
+ e2 = Lt(e2, new d({ flush: s2 })), n.defineProperty(t2, "readable", { get: () => e2 });
572
+ }
573
+ function Kt(t2, n2, e2) {
574
+ if (!t2) throw new r("Compression method not supported");
575
+ return new t2(n2, e2);
441
576
  }
442
- function Se(e2, t2, n2, s2, r2, i2) {
443
- const a2 = t2 && s2 ? s2 : r2 || i2, o2 = n2.deflate64 ? "deflate64-raw" : "deflate-raw";
577
+ function Et(t2, n2, e2, s2, r2) {
578
+ const o2 = n2 && s2 ? s2 : r2 || s2, c2 = e2.deflate64 ? "deflate64-raw" : Dt;
579
+ let i2;
444
580
  try {
445
- e2 = ze(e2, new a2(o2, n2));
446
- } catch (s3) {
447
- if (!t2) throw s3;
448
- if (r2) e2 = ze(e2, new r2(o2, n2));
449
- else {
450
- if (!i2) throw s3;
451
- e2 = ze(e2, new i2(o2, n2));
452
- }
581
+ i2 = new o2(c2, e2);
582
+ } catch (t3) {
583
+ if (!n2 || !r2 || o2 == r2) throw t3;
584
+ i2 = new r2(c2, e2);
453
585
  }
454
- return e2;
586
+ return Ot(t2, i2);
587
+ }
588
+ function Lt(t2, n2) {
589
+ return xt(t2).pipeThrough(n2);
455
590
  }
456
- function ze(e2, t2) {
457
- return e2.pipeThrough(t2);
591
+ function Ot(t2, n2) {
592
+ const e2 = n2.writable.getWriter(), s2 = t2.getReader();
593
+ return (async function() {
594
+ try {
595
+ for (; ; ) {
596
+ await e2.ready;
597
+ const t3 = await s2.read();
598
+ if (t3.done) {
599
+ await e2.close();
600
+ break;
601
+ }
602
+ await e2.write(t3.value);
603
+ }
604
+ } catch (t3) {
605
+ await (async function(t4, n3) {
606
+ try {
607
+ await t4.abort(n3);
608
+ } catch {
609
+ }
610
+ })(e2, t3), await (async function(t4, n3) {
611
+ try {
612
+ await t4.cancel(n3);
613
+ } catch {
614
+ }
615
+ })(s2, t3);
616
+ }
617
+ })(), n2.readable;
458
618
  }
459
- const ke = "data", ve = "close";
460
- class He extends w {
461
- constructor(e2, n2) {
619
+ const jt = "data", Ht = "close", Nt = "deflate";
620
+ class qt extends d {
621
+ constructor(t2, e2) {
462
622
  super({});
463
- const s2 = this, { codecType: i2 } = e2;
464
- let a2;
465
- i2.startsWith("deflate") ? a2 = _e : i2.startsWith("inflate") && (a2 = ye), s2.outputSize = 0;
466
- let o2 = 0;
467
- const c2 = new a2(e2, n2), l2 = super.readable, u2 = new w({ transform(e3, t2) {
468
- e3 && e3.length && (o2 += e3.length, t2.enqueue(e3));
623
+ const s2 = this, { codecType: o2 } = t2;
624
+ let c2;
625
+ o2.startsWith(Nt) ? c2 = Ut : o2.startsWith("inflate") && (c2 = _t), s2.outputSize = 0;
626
+ let i2 = 0;
627
+ const a2 = new c2(t2, e2), f2 = super.readable, u2 = new d({ transform(t3, n2) {
628
+ t3 && t3.length && (i2 += t3.length, n2.enqueue(t3));
469
629
  }, flush() {
470
- t.assign(s2, { inputSize: o2 });
471
- } }), h2 = new w({ transform(t2, n3) {
472
- if (t2 && t2.length && (n3.enqueue(t2), s2.outputSize += t2.length, e2.outputSize !== b && s2.outputSize > e2.outputSize)) throw new r("Invalid uncompressed size");
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(Bt);
473
633
  }, flush() {
474
- const { signature: e3 } = c2;
475
- t.assign(s2, { signature: e3, inputSize: o2 });
634
+ const { crc32: t3 } = a2;
635
+ n.assign(s2, { crc32: t3, inputSize: i2 });
476
636
  } });
477
- t.defineProperty(s2, "readable", { get: () => l2.pipeThrough(u2).pipeThrough(c2).pipeThrough(h2) });
478
- }
479
- }
480
- class Ce extends w {
481
- constructor(e2) {
482
- let t2;
483
- super({ transform: function n2(s2, r2) {
484
- if (t2) {
485
- const e3 = new i(t2.length + s2.length);
486
- e3.set(t2), e3.set(s2, t2.length), s2 = e3, t2 = null;
637
+ n.defineProperty(s2, "readable", { get: () => f2.pipeThrough(u2).pipeThrough(a2).pipeThrough(l2) });
638
+ }
639
+ }
640
+ class Gt extends d {
641
+ 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);
487
650
  }
488
- s2.length > e2 ? (r2.enqueue(s2.slice(0, e2)), n2(s2.slice(e2), r2)) : t2 = s2;
489
- }, flush(e3) {
490
- t2 && t2.length && e3.enqueue(t2);
651
+ return s2 -= t2, e2;
652
+ }
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());
655
+ }, 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;
660
+ return e2;
661
+ })(n2, s2));
491
662
  } });
492
663
  }
493
664
  }
494
- const Be = new l(), Ae = new l();
495
- let Re, Ie, qe, Ke, Pe, Te = 0;
496
- async function Ve(e2) {
665
+ let Jt = 2;
666
+ try {
667
+ typeof navigator != b && navigator.hardwareConcurrency && (Jt = navigator.hardwareConcurrency);
668
+ } catch {
669
+ }
670
+ const Qt = new f(), Xt = new f();
671
+ let Yt, Zt = 0;
672
+ async function $t(t2) {
673
+ let n2, o2;
497
674
  try {
498
- const { options: t2, config: s2 } = e2;
499
- if (!t2.useCompressionStream) try {
500
- await self.initModule(e2.config);
675
+ const { options: c2, config: i2 } = t2;
676
+ if (c2.format) try {
677
+ await (async function(t3, n3) {
678
+ !Mt.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
+ Mt.set(t4, { CompressionStream: e2, DecompressionStream: s2 });
682
+ })(t3, await import(
683
+ /* webpackIgnore: true */
684
+ /* @vite-ignore */
685
+ n3
686
+ ));
687
+ })(c2.format, c2.codecURI);
688
+ } catch (t3) {
689
+ throw t3.codecImportFailed = true, t3;
690
+ }
691
+ if (i2.CompressionStream = self.CompressionStream, i2.DecompressionStream = self.DecompressionStream, c2.compressed && !c2.format) if (c2.useCompressionStream) {
692
+ if (!(function(t3, n3) {
693
+ if (!t3) return false;
694
+ let e2 = Tt.get(t3);
695
+ e2 || (e2 = new f(), Tt.set(t3, e2));
696
+ let s2 = e2.get(n3);
697
+ if (s2 === v) {
698
+ try {
699
+ new t3(n3), s2 = true;
700
+ } catch {
701
+ s2 = false;
702
+ }
703
+ e2.set(n3, s2);
704
+ }
705
+ return s2;
706
+ })(c2.codecType.startsWith(Nt) ? i2.CompressionStream : i2.DecompressionStream, Dt)) try {
707
+ await self.initModule(t2.config);
708
+ } catch {
709
+ }
710
+ } else try {
711
+ await self.initModule(t2.config);
712
+ } catch {
713
+ c2.useCompressionStream = true;
714
+ }
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 ? xt(t2.readable) : new y({ async pull(t3) {
717
+ const n3 = new l((t4) => Qt.set(Zt, t4));
718
+ tn({ type: "pull", messageId: Zt }), Zt = (Zt + 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) {
723
+ if (t3 instanceof m) return t3;
724
+ const n3 = t3.getWriter();
725
+ return new m({ write: (t4) => n3.write(t4), close: () => n3.close(), abort: (t4) => n3.abort(t4) });
726
+ })(t2.writable) : new m({ async write(t3) {
727
+ let n3;
728
+ const s2 = new l((t4) => n3 = t4);
729
+ Xt.set(Zt, n3), tn({ type: jt, value: t3, messageId: Zt }), Zt = (Zt + 1) % e.MAX_SAFE_INTEGER, await s2;
730
+ } }, a2), n2 = new qt(c2, i2), Yt = new AbortController();
731
+ const { signal: w2 } = Yt;
732
+ await u2.pipeThrough(n2).pipeThrough(new Gt((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;
734
+ var n3, r2;
735
+ })(i2))).pipeTo(o2, { signal: w2, preventClose: true, preventAbort: true }), await o2.getWriter().close();
736
+ const { crc32: h2, inputSize: p2, outputSize: d2 } = n2;
737
+ tn({ type: Ht, result: { crc32: h2, inputSize: p2, outputSize: d2 } });
738
+ } catch (t3) {
739
+ if (t3.outputSize = n2 ? n2.outputSize : 0, o2 && !o2.locked) try {
740
+ await o2.getWriter().close();
501
741
  } catch {
502
- t2.useCompressionStream = true;
503
742
  }
504
- s2.CompressionStream = self.CompressionStream, s2.DecompressionStream = self.DecompressionStream;
505
- const r2 = { highWaterMark: 1 }, i2 = e2.readable || new g({ async pull(e3) {
506
- const t3 = new h((e4) => Be.set(Te, e4));
507
- xe({ type: "pull", messageId: Te }), Te = (Te + 1) % n.MAX_SAFE_INTEGER;
508
- const { value: s3, done: r3 } = await t3;
509
- e3.enqueue(s3), r3 && e3.close();
510
- } }, r2), a2 = e2.writable || new m({ async write(e3) {
511
- let t3;
512
- const s3 = new h((e4) => t3 = e4);
513
- Ae.set(Te, t3), xe({ type: ke, value: e3, messageId: Te }), Te = (Te + 1) % n.MAX_SAFE_INTEGER, await s3;
514
- } }, r2), o2 = new He(t2, s2);
515
- Re = new AbortController();
516
- const { signal: c2 } = Re;
517
- await i2.pipeThrough(o2).pipeThrough(new Ce(s2.chunkSize)).pipeTo(a2, { signal: c2, preventClose: true, preventAbort: true }), await a2.getWriter().close();
518
- const { signature: l2, inputSize: u2, outputSize: f2 } = o2;
519
- xe({ type: ve, result: { signature: l2, inputSize: u2, outputSize: f2 } });
520
- } catch (e3) {
521
- e3.outputSize = 0, Ue(e3);
522
- }
523
- }
524
- function xe(e2) {
525
- let { value: t2 } = e2;
526
- if (t2) if (t2.length) try {
527
- t2 = new i(t2), e2.value = t2.buffer, d(e2, [e2.value]);
743
+ nn(t3);
744
+ }
745
+ }
746
+ function tn(t2) {
747
+ const { value: n2 } = t2;
748
+ 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]);
528
750
  } catch {
529
- d(e2);
751
+ p(t2);
530
752
  }
531
- else d(e2);
532
- else d(e2);
753
+ else p(t2);
754
+ else p(t2);
755
+ var e2;
533
756
  }
534
- function Ue(e2 = new r("Unknown error")) {
535
- const { message: t2, stack: n2, code: s2, name: i2, outputSize: a2 } = e2;
536
- d({ error: { message: t2, stack: n2, code: s2, name: i2, outputSize: a2 } });
757
+ function nn(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 });
537
760
  }
538
- function We(e2, t2, n2 = {}) {
539
- const a2 = "number" == typeof n2.level ? n2.level : -1, o2 = "number" == typeof n2.outBuffer ? n2.outBuffer : 65536, c2 = "number" == typeof n2.inBufferSize ? n2.inBufferSize : 65536;
540
- return new w({ start() {
541
- let n3;
542
- if (this.out = qe(o2), this.in = qe(c2), this.inBufferSize = c2, this._scratch = new i(o2), e2 ? (this._process = Ie.deflate_process, this._last_consumed = Ie.deflate_last_consumed, this._end = Ie.deflate_end, this.streamHandle = Ie.deflate_new(), n3 = "gzip" === t2 ? Ie.deflate_init_gzip(this.streamHandle, a2) : "deflate-raw" === t2 ? Ie.deflate_init_raw(this.streamHandle, a2) : Ie.deflate_init(this.streamHandle, a2)) : "deflate64-raw" === t2 ? (this._process = Ie.inflate9_process, this._last_consumed = Ie.inflate9_last_consumed, this._end = Ie.inflate9_end, this.streamHandle = Ie.inflate9_new(), n3 = Ie.inflate9_init_raw(this.streamHandle)) : (this._process = Ie.inflate_process, this._last_consumed = Ie.inflate_last_consumed, this._end = Ie.inflate_end, this.streamHandle = Ie.inflate_new(), n3 = "deflate-raw" === t2 ? Ie.inflate_init_raw(this.streamHandle) : "gzip" === t2 ? Ie.inflate_init_gzip(this.streamHandle) : Ie.inflate_init(this.streamHandle)), 0 !== n3) throw new r("init failed:" + n3);
761
+ addEventListener("message", ({ data: t2 }) => {
762
+ const { type: n2, messageId: e2, value: s2, done: r2 } = t2;
763
+ try {
764
+ if ("start" == n2 && $t(t2), n2 == jt) {
765
+ const t3 = Qt.get(e2);
766
+ Qt.delete(e2), t3({ value: s2 || new o(), done: r2 });
767
+ }
768
+ if ("ack" == n2) {
769
+ const t3 = Xt.get(e2);
770
+ Xt.delete(e2), t3();
771
+ }
772
+ n2 == Ht && Yt.abort();
773
+ } catch (t3) {
774
+ nn(t3);
775
+ }
776
+ }), p({ type: "ready" });
777
+ const en = "deflate", sn = "deflate-raw", rn = "deflate64-raw", on = "gzip";
778
+ let cn, an, fn, un, ln;
779
+ function wn(t2, n2, e2 = {}) {
780
+ if (!cn) {
781
+ const t3 = new r("WASM module not loaded");
782
+ throw t3.cause = ln, t3;
783
+ }
784
+ 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
+ return new d({ start() {
786
+ try {
787
+ let e3;
788
+ if (this.ut = an(i2), this.in = an(a2), this.inBufferSize = a2, !this.ut || !this.in) throw new r("allocation failed");
789
+ if (this.lt = new o(i2), t2 ? (this.wt = cn.deflate_process, this.ht = cn.deflate_last_consumed, this.yt = cn.deflate_end, this.St = cn.deflate_new(), e3 = n2 === on ? cn.deflate_init_gzip(this.St, c2) : n2 === sn ? cn.deflate_init_raw(this.St, c2) : cn.deflate_init(this.St, c2)) : n2 === rn ? (this.wt = cn.inflate9_process, this.ht = cn.inflate9_last_consumed, this.yt = cn.inflate9_end, this.St = cn.inflate9_new(), e3 = cn.inflate9_init_raw(this.St)) : (this.wt = cn.inflate_process, this.ht = cn.inflate_last_consumed, this.yt = cn.inflate_end, this.St = cn.inflate_new(), e3 = n2 === sn ? cn.inflate_init_raw(this.St) : n2 === on ? cn.inflate_init_gzip(this.St) : cn.inflate_init(this.St)), 0 !== e3) throw new r("init failed:" + e3);
790
+ } catch (t3) {
791
+ throw f2(this), t3;
792
+ }
543
793
  }, transform(t3, n3) {
544
794
  try {
545
- const a3 = t3, c3 = new i(Pe.buffer), l2 = this._process, u2 = this._last_consumed, h2 = this.out, f2 = this._scratch;
546
- let p2 = 0;
547
- for (; p2 < a3.length; ) {
548
- const t4 = s.min(a3.length - p2, 32768);
549
- this.in && this.inBufferSize >= t4 || (this.in && Ke && Ke(this.in), this.in = qe(t4), this.inBufferSize = t4), c3.set(a3.subarray(p2, p2 + t4), this.in);
550
- const i2 = l2(this.streamHandle, this.in, t4, h2, o2, 0), d2 = 16777215 & i2;
551
- if (d2 && (f2.set(c3.subarray(h2, h2 + d2), 0), n3.enqueue(f2.slice(0, d2))), !e2) {
552
- const e3 = i2 >> 24 & 255, t5 = 128 & e3 ? e3 - 256 : e3;
553
- if (0 > t5) throw new r("process error:" + t5);
554
- }
555
- const w2 = u2(this.streamHandle);
556
- if (0 === w2) break;
557
- p2 += w2;
795
+ const e3 = t3, c3 = new o(un.buffer), a3 = this.wt, f3 = this.ht, u2 = this.ut, l2 = this.lt;
796
+ let w2 = 0;
797
+ for (; w2 < e3.length; ) {
798
+ const t4 = s.min(e3.length - w2, 32768);
799
+ if ((!this.in || this.inBufferSize < t4) && (this.in && fn && (fn(this.in), this.in = 0), this.in = an(t4), this.inBufferSize = t4, !this.in)) throw new r("allocation failed");
800
+ c3.set(e3.subarray(w2, w2 + t4), this.in);
801
+ const o2 = a3(this.St, this.in, t4, u2, i2, 0), h2 = o2 >> 24 & 255, p2 = 128 & h2 ? h2 - 256 : h2;
802
+ if (p2 < 0) throw new r("process error:" + p2);
803
+ const d2 = 16777215 & o2;
804
+ d2 && (l2.set(c3.subarray(u2, u2 + d2), 0), n3.enqueue(l2.slice(0, d2)));
805
+ const y2 = f3(this.St);
806
+ if (0 === y2 && 0 === d2) break;
807
+ w2 += y2;
558
808
  }
559
- } catch (e3) {
560
- this._end && this.streamHandle && this._end(this.streamHandle), this.in && Ke && Ke(this.in), this.out && Ke && Ke(this.out), n3.error(e3);
809
+ } catch (t4) {
810
+ f2(this), n3.error(t4);
561
811
  }
562
812
  }, flush(t3) {
563
813
  try {
564
- const n3 = new i(Pe.buffer), s2 = this._process, a3 = this.out, c3 = this._scratch;
814
+ const n3 = new o(un.buffer), e3 = this.wt, s2 = this.ut, c3 = this.lt;
565
815
  for (; ; ) {
566
- const i2 = s2(this.streamHandle, 0, 0, a3, o2, 4), l2 = 16777215 & i2, u2 = i2 >> 24 & 255;
567
- if (!e2) {
568
- const e3 = 128 & u2 ? u2 - 256 : u2;
569
- if (0 > e3) throw new r("process error:" + e3);
570
- }
571
- if (l2 && (c3.set(n3.subarray(a3, a3 + l2), 0), t3.enqueue(c3.slice(0, l2))), 1 === u2 || 0 === l2) break;
816
+ const o2 = e3(this.St, 0, 0, s2, i2, 4), a3 = o2 >> 24 & 255, f3 = 128 & a3 ? a3 - 256 : a3;
817
+ if (f3 < 0) throw new r("process error:" + f3);
818
+ const u2 = 16777215 & o2;
819
+ if (u2 && (c3.set(n3.subarray(s2, s2 + u2), 0), t3.enqueue(c3.slice(0, u2))), 1 === a3 || 0 === u2) break;
572
820
  }
573
- } catch (e3) {
574
- t3.error(e3);
821
+ } catch (n3) {
822
+ t3.error(n3);
575
823
  } finally {
576
- if (this._end && this.streamHandle) {
577
- const e3 = this._end(this.streamHandle);
578
- 0 !== e3 && t3.error(new r("end error:" + e3));
579
- }
580
- this.in && Ke && Ke(this.in), this.out && Ke && Ke(this.out);
824
+ const n3 = f2(this);
825
+ 0 !== n3 && t3.error(new r("end error:" + n3));
581
826
  }
827
+ }, cancel() {
828
+ f2(this);
582
829
  } });
583
- }
584
- addEventListener("message", ({ data: e2 }) => {
585
- const { type: t2, messageId: n2, value: s2, done: r2 } = e2;
586
- try {
587
- if ("start" == t2 && Ve(e2), t2 == ke) {
588
- const e3 = Be.get(n2);
589
- Be.delete(n2), e3({ value: new i(s2), done: r2 });
590
- }
591
- if ("ack" == t2) {
592
- const e3 = Ae.get(n2);
593
- Ae.delete(n2), e3();
594
- }
595
- t2 == ve && Re.abort();
596
- } catch (e3) {
597
- Ue(e3);
830
+ function f2(t3) {
831
+ let n3 = 0;
832
+ return t3.St && t3.yt && (n3 = t3.yt(t3.St)), t3.St = 0, t3.in && fn && fn(t3.in), t3.in = 0, t3.ut && fn && fn(t3.ut), t3.ut = 0, n3;
598
833
  }
599
- });
600
- class Me {
601
- constructor(e2 = "deflate", t2) {
602
- return We(true, e2, t2);
834
+ }
835
+ class hn {
836
+ constructor(t2 = en, n2) {
837
+ return wn(true, t2, n2);
603
838
  }
604
839
  }
605
- class Ee {
606
- constructor(e2 = "deflate", t2) {
607
- return We(false, e2, t2);
840
+ class pn {
841
+ constructor(t2 = en, n2) {
842
+ return wn(false, t2, n2);
608
843
  }
609
844
  }
610
- let De = false;
611
- self.initModule = async (e2) => {
612
- try {
613
- const t2 = await (async (e3, { baseURI: t3 }) => {
614
- if (!De) {
615
- let n2, s2;
845
+ hn.gt = true, pn.gt = true, hn.vt = [en, sn, on], pn.vt = [en, sn, on, rn];
846
+ let dn = false;
847
+ !(function(t2 = {}) {
848
+ const { init: n2 } = t2, e2 = t2.CompressionStreamFallback || t2.CompressionStreamZlib, s2 = t2.DecompressionStreamFallback || t2.DecompressionStreamZlib;
849
+ self.initModule = async (t3) => {
850
+ n2 && await n2(t3), e2 && (t3.CompressionStreamFallback = e2), s2 && (t3.DecompressionStreamFallback = s2);
851
+ };
852
+ })({ CompressionStreamFallback: hn, DecompressionStreamFallback: pn, init: (t2) => (async function(t3, { baseURI: n2 }) {
853
+ if (!dn) try {
854
+ await (async function(t4, n3) {
855
+ let e2, s2;
856
+ try {
616
857
  try {
617
- try {
618
- s2 = new URL(e3, t3);
619
- } catch {
620
- }
621
- const r2 = await fetch(s2);
622
- n2 = await r2.arrayBuffer();
623
- } catch (t4) {
624
- if (!e3.startsWith("data:application/wasm;base64,")) throw t4;
625
- n2 = ((e4) => {
626
- const t5 = e4.split(",")[1], n3 = atob(t5), s3 = n3.length, r2 = new i(s3);
627
- for (let e5 = 0; s3 > e5; ++e5) r2[e5] = n3.charCodeAt(e5);
628
- return r2.buffer;
629
- })(e3);
858
+ s2 = new URL(t4, n3);
859
+ } catch {
630
860
  }
631
- ((e4) => {
632
- if (Ie = e4, { malloc: qe, free: Ke, memory: Pe } = Ie, "function" != typeof qe || "function" != typeof Ke || !Pe) throw Ie = qe = Ke = Pe = null, new r("Invalid WASM module");
633
- })((await WebAssembly.instantiate(n2)).instance.exports), De = true;
861
+ const r2 = await fetch(s2);
862
+ e2 = await r2.arrayBuffer();
863
+ } catch (n4) {
864
+ if (!t4.startsWith("data:application/wasm;base64,")) throw n4;
865
+ e2 = (function(t5) {
866
+ const n5 = t5.split(",")[1], e3 = atob(n5), s3 = e3.length, r2 = new o(s3);
867
+ for (let t6 = 0; t6 < s3; ++t6) r2[t6] = e3.charCodeAt(t6);
868
+ return r2.buffer;
869
+ })(t4);
634
870
  }
635
- })(e2.wasmURI, e2);
636
- return e2.CompressionStreamZlib = Me, e2.DecompressionStreamZlib = Ee, t2;
637
- } catch {
638
- }
639
- };
871
+ !(function(t5) {
872
+ if (cn = t5, { malloc: an, free: fn, memory: un } = cn, "function" != typeof an || "function" != typeof fn || !un) throw cn = an = fn = un = null, new r("Invalid WASM module");
873
+ })((await WebAssembly.instantiate(e2)).instance.exports);
874
+ })(t3, n2), dn = true;
875
+ } catch (t4) {
876
+ throw (function(t5) {
877
+ ln = t5;
878
+ })(t4), t4;
879
+ }
880
+ })(t2.wasmURI, t2) });
640
881
  })();