deeptwins-engine-3d 0.1.76 → 0.2.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 (238) hide show
  1. package/dist/assets/Build/DeepTwins/Image/noise.png +0 -0
  2. package/dist/assets/Build/DeepTwins/Workers/CustomRasterClip.worker.js +1 -2
  3. package/dist/assets/Build/DeepTwins/Workers/MvtVector.worker.js +1 -1
  4. package/dist/assets/Build/Map3d/ThirdParty/Workers/zip-web-worker.js +640 -0
  5. package/dist/assets/Build/Map3d/ThirdParty/wasm_splats_bg.wasm +0 -0
  6. package/dist/assets/Build/Map3d/ThirdParty/zip-module.wasm +0 -0
  7. package/dist/assets/Build/Map3d/Workers/chunk-27NG6PQR.js +456 -0
  8. package/dist/assets/Build/Map3d/Workers/chunk-2JVMMMWT.js +353 -0
  9. package/dist/assets/Build/Map3d/Workers/chunk-2Y2XYQCS.js +1481 -0
  10. package/dist/assets/Build/Map3d/Workers/chunk-34RF3V5G.js +220 -0
  11. package/dist/assets/Build/Map3d/Workers/chunk-35H7BYLJ.js +1800 -0
  12. package/dist/assets/Build/Map3d/Workers/chunk-57OGEF5V.js +435 -0
  13. package/dist/assets/Build/Map3d/Workers/chunk-5PX3DYJA.js +196 -0
  14. package/dist/assets/Build/Map3d/Workers/chunk-7B5XGQRN.js +171 -0
  15. package/dist/assets/Build/Map3d/Workers/chunk-ATLWOZFF.js +39 -0
  16. package/dist/assets/Build/Map3d/Workers/chunk-BMSUECTA.js +1055 -0
  17. package/dist/assets/Build/Map3d/Workers/chunk-C6IA4TKW.js +476 -0
  18. package/dist/assets/Build/Map3d/Workers/chunk-CZ44I32U.js +157 -0
  19. package/dist/assets/Build/Map3d/Workers/chunk-DE6UV44R.js +122 -0
  20. package/dist/assets/Build/Map3d/Workers/chunk-DUCCKVOG.js +834 -0
  21. package/dist/assets/Build/Map3d/Workers/chunk-EBJBPIYX.js +239 -0
  22. package/dist/assets/Build/Map3d/Workers/chunk-EYSYQ2R6.js +138 -0
  23. package/dist/assets/Build/Map3d/Workers/chunk-FMCAAUQI.js +368 -0
  24. package/dist/assets/Build/Map3d/Workers/chunk-GMYZNRRQ.js +2717 -0
  25. package/dist/assets/Build/Map3d/Workers/chunk-GWPNZZV4.js +781 -0
  26. package/dist/assets/Build/Map3d/Workers/chunk-HLP2U4KW.js +758 -0
  27. package/dist/assets/Build/Map3d/Workers/chunk-HSJSUPQV.js +500 -0
  28. package/dist/assets/Build/Map3d/Workers/chunk-I73Q3AG7.js +58 -0
  29. package/dist/assets/Build/Map3d/Workers/chunk-IMZ4YIMV.js +511 -0
  30. package/dist/assets/Build/Map3d/Workers/chunk-IZSK4DVF.js +421 -0
  31. package/dist/assets/Build/Map3d/Workers/chunk-JKLMRPKK.js +75 -0
  32. package/dist/assets/Build/Map3d/Workers/chunk-KGM345JM.js +691 -0
  33. package/dist/assets/Build/Map3d/Workers/chunk-L4IR5U4G.js +102 -0
  34. package/dist/assets/Build/Map3d/Workers/chunk-MG4EVQH2.js +44 -0
  35. package/dist/assets/Build/Map3d/Workers/chunk-NXWEFAZJ.js +300 -0
  36. package/dist/assets/Build/Map3d/Workers/chunk-PDFAJISJ.js +59 -0
  37. package/dist/assets/Build/Map3d/Workers/chunk-PHWZFJR5.js +100 -0
  38. package/dist/assets/Build/Map3d/Workers/chunk-PLE7CHBE.js +101 -0
  39. package/dist/assets/Build/Map3d/Workers/chunk-PN3GIZ5Q.js +163 -0
  40. package/dist/assets/Build/Map3d/Workers/chunk-PXL5XLHV.js +1073 -0
  41. package/dist/assets/Build/Map3d/Workers/chunk-QYXOF5JC.js +959 -0
  42. package/dist/assets/Build/Map3d/Workers/chunk-R2LIFXV3.js +115 -0
  43. package/dist/assets/Build/Map3d/Workers/chunk-R4W6IRJZ.js +10357 -0
  44. package/dist/assets/Build/Map3d/Workers/chunk-R5PZXG56.js +1258 -0
  45. package/dist/assets/Build/Map3d/Workers/chunk-RZQLZIUI.js +629 -0
  46. package/dist/assets/Build/Map3d/Workers/chunk-SIBDD6Y4.js +390 -0
  47. package/dist/assets/Build/Map3d/Workers/chunk-U5NN6JTQ.js +398 -0
  48. package/dist/assets/Build/Map3d/Workers/chunk-UA5RPPP3.js +73 -0
  49. package/dist/assets/Build/Map3d/Workers/chunk-UXLKFS3C.js +305 -0
  50. package/dist/assets/Build/Map3d/Workers/chunk-VUX4BQIM.js +37 -0
  51. package/dist/assets/Build/Map3d/Workers/chunk-WJDUUUJS.js +684 -0
  52. package/dist/assets/Build/Map3d/Workers/chunk-XBJOJHWX.js +139 -0
  53. package/dist/assets/Build/Map3d/Workers/chunk-XJDMTNKD.js +634 -0
  54. package/dist/assets/Build/Map3d/Workers/chunk-XUCXZZE5.js +963 -0
  55. package/dist/assets/Build/Map3d/Workers/chunk-YIKGVMJ5.js +287 -0
  56. package/dist/assets/Build/Map3d/Workers/chunk-YTNCIBPQ.js +262 -0
  57. package/dist/assets/Build/Map3d/Workers/chunk-ZMDUYETO.js +55 -0
  58. package/dist/assets/Build/Map3d/Workers/chunk-ZW52HXFN.js +2857 -0
  59. package/dist/esm/analyze/LineOfSightAnalysis.js +1 -326
  60. package/dist/esm/analyze/SubmergenceAnalysis.js +1 -137
  61. package/dist/esm/analyze/SunLightAnalysis.js +1 -91
  62. package/dist/esm/analyze/TerrainExcavationAnalysis.js +1 -612
  63. package/dist/esm/analyze/ViewshedAnalysis.js +1 -292
  64. package/dist/esm/cameraControl/ModelRoamHistory.js +1 -639
  65. package/dist/esm/cameraControl/ModelRoamRealTime.js +1 -874
  66. package/dist/esm/cameraControl/Roam.js +1 -418
  67. package/dist/esm/cameraControl/Rotate.js +1 -134
  68. package/dist/esm/cameraControl/RotateInPlace.js +1 -99
  69. package/dist/esm/constant.d.ts +90 -0
  70. package/dist/esm/constant.js +1 -1287
  71. package/dist/esm/deepTwins/index.js +1 -121
  72. package/dist/esm/drawCommand/index.js +1 -3
  73. package/dist/esm/drawCommand/viewShed/Event.js +1 -142
  74. package/dist/esm/drawCommand/viewShed/RectangularSensorPrimitive.js +1 -1306
  75. package/dist/esm/drawCommand/viewShed/ViewShadowPrimitive.js +1 -66
  76. package/dist/esm/drawCommand/viewShed/ViewShedAnalyserLayer.js +1 -466
  77. package/dist/esm/drawCommand/viewShed/ViewShedMap.js +1 -1238
  78. package/dist/esm/drawCommand/viewShed/config.js +1 -21
  79. package/dist/esm/drawCommand/volumeCloud/GeometryPrimitive.js +1 -89
  80. package/dist/esm/drawCommand/volumeCloud/ImprovedNoise.js +1 -112
  81. package/dist/esm/drawCommand/volumeCloud/VolumeClouds.js +1 -91
  82. package/dist/esm/drawer/algorithm.js +1 -314
  83. package/dist/esm/drawer/common.js +1 -965
  84. package/dist/esm/drawer/coordinate.js +1 -184
  85. package/dist/esm/drawer/index.d.ts +1 -1
  86. package/dist/esm/drawer/index.js +1 -688
  87. package/dist/esm/drawer/plotUtil.js +1 -266
  88. package/dist/esm/drawer/shape/Assemble.js +1 -415
  89. package/dist/esm/drawer/shape/AttackArrow.js +1 -442
  90. package/dist/esm/drawer/shape/BaseShape.js +1 -383
  91. package/dist/esm/drawer/shape/Bow.js +1 -375
  92. package/dist/esm/drawer/shape/Circle.js +1 -461
  93. package/dist/esm/drawer/shape/Curve.js +1 -386
  94. package/dist/esm/drawer/shape/DragPoint.js +1 -211
  95. package/dist/esm/drawer/shape/Elliptic.js +1 -491
  96. package/dist/esm/drawer/shape/Formation.js +1 -395
  97. package/dist/esm/drawer/shape/PincerArrow.js +1 -445
  98. package/dist/esm/drawer/shape/Point.js +1 -131
  99. package/dist/esm/drawer/shape/Polygon.js +1 -368
  100. package/dist/esm/drawer/shape/Polyline.js +1 -325
  101. package/dist/esm/drawer/shape/RegularPolygon.js +1 -468
  102. package/dist/esm/drawer/shape/RightAngleArrow.js +1 -423
  103. package/dist/esm/drawer/shape/Sector.js +1 -568
  104. package/dist/esm/drawer/shape/StraightArrow.js +1 -422
  105. package/dist/esm/drawer/shape/SwallowtailArrow.js +1 -438
  106. package/dist/esm/drawer/types.js +1 -11
  107. package/dist/esm/drawer/utils.js +1 -381
  108. package/dist/esm/global.css +22 -1
  109. package/dist/esm/graphicLayer/BaseEntity.js +1 -51
  110. package/dist/esm/graphicLayer/BaseLayer.js +1 -730
  111. package/dist/esm/graphicLayer/BasePointPrimitive.js +1 -45
  112. package/dist/esm/graphicLayer/BasePrimitive.js +1 -36
  113. package/dist/esm/graphicLayer/BasePrimitiveInstance.js +1 -37
  114. package/dist/esm/graphicLayer/BaseSource.d.ts +1 -1
  115. package/dist/esm/graphicLayer/BaseSource.js +1 -630
  116. package/dist/esm/graphicLayer/BillboardEntity.js +1 -106
  117. package/dist/esm/graphicLayer/BillboardPrimitive.js +1 -119
  118. package/dist/esm/graphicLayer/BoxEntity.js +1 -99
  119. package/dist/esm/graphicLayer/BoxPrimitive.js +1 -48
  120. package/dist/esm/graphicLayer/BoxPrimitiveInstance.js +1 -91
  121. package/dist/esm/graphicLayer/EllipseEntity.js +1 -110
  122. package/dist/esm/graphicLayer/EllipsePrimitive.js +1 -47
  123. package/dist/esm/graphicLayer/EllipsePrimitiveInstance.js +1 -98
  124. package/dist/esm/graphicLayer/EllipsoidEntity.js +1 -118
  125. package/dist/esm/graphicLayer/EllipsoidPrimitive.js +1 -48
  126. package/dist/esm/graphicLayer/EllipsoidPrimitiveInstance.js +1 -113
  127. package/dist/esm/graphicLayer/GraphicLayerCollection.js +1 -491
  128. package/dist/esm/graphicLayer/HtmlEntity.d.ts +4 -0
  129. package/dist/esm/graphicLayer/HtmlEntity.js +1 -189
  130. package/dist/esm/graphicLayer/LabelEntity.js +1 -110
  131. package/dist/esm/graphicLayer/LabelPrimitive.js +1 -127
  132. package/dist/esm/graphicLayer/ModelEntity.js +1 -122
  133. package/dist/esm/graphicLayer/ModelPrimitive.js +1 -59
  134. package/dist/esm/graphicLayer/ModelPrimitiveInstance.js +1 -86
  135. package/dist/esm/graphicLayer/PointEntity.js +1 -94
  136. package/dist/esm/graphicLayer/PointPrimitive.js +1 -107
  137. package/dist/esm/graphicLayer/PolygonEntity.js +1 -103
  138. package/dist/esm/graphicLayer/PolygonGroundPrimitive.js +1 -49
  139. package/dist/esm/graphicLayer/PolygonGroundPrimitiveImageMaterialInstance.js +1 -87
  140. package/dist/esm/graphicLayer/PolygonPrimitive.js +1 -60
  141. package/dist/esm/graphicLayer/PolygonPrimitiveImageMaterialInstance.js +1 -84
  142. package/dist/esm/graphicLayer/PolygonPrimitiveInstance.js +1 -101
  143. package/dist/esm/graphicLayer/PolylineEntity.js +1 -96
  144. package/dist/esm/graphicLayer/PolylineGroundPrimitive.js +1 -55
  145. package/dist/esm/graphicLayer/PolylineGroundPrimitiveInstance.js +1 -85
  146. package/dist/esm/graphicLayer/PolylinePrimitive.js +1 -53
  147. package/dist/esm/graphicLayer/PolylinePrimitiveInstance.js +1 -85
  148. package/dist/esm/graphicLayer/PolylineVolumeEntity.js +1 -105
  149. package/dist/esm/graphicLayer/PolylineVolumePrimitive.js +1 -47
  150. package/dist/esm/graphicLayer/PolylineVolumePrimitiveInstance.js +1 -94
  151. package/dist/esm/graphicLayer/WallEntity.js +1 -96
  152. package/dist/esm/graphicLayer/WallPrimitive.js +1 -47
  153. package/dist/esm/graphicLayer/WallPrimitiveInstance.js +1 -88
  154. package/dist/esm/index.d.ts +4 -0
  155. package/dist/esm/index.js +1 -175
  156. package/dist/esm/lowAltitude/BarrierLayer.js +1 -172
  157. package/dist/esm/lowAltitude/BaseGridMvtLayer.js +1 -122
  158. package/dist/esm/lowAltitude/FactorLayer.js +1 -199
  159. package/dist/esm/lowAltitude/FlightPlanning.js +1 -411
  160. package/dist/esm/lowAltitude/FlightRiskEvaluation.js +1 -543
  161. package/dist/esm/lowAltitude/GridDraw.js +1 -137
  162. package/dist/esm/lowAltitude/PoiLayer.js +1 -74
  163. package/dist/esm/lowAltitude/RoutePlanning.js +1 -318
  164. package/dist/esm/lowAltitude/VisitLayer.js +1 -180
  165. package/dist/esm/map/Event.js +1 -377
  166. package/dist/esm/map/GroundSkyBox.js +1 -166
  167. package/dist/esm/map/Map.js +1 -881
  168. package/dist/esm/map/Property.js +1 -35
  169. package/dist/esm/material/AtmosphericDispersion.js +1 -569
  170. package/dist/esm/material/GlobalVolumetricCloud.js +1 -377
  171. package/dist/esm/material/VolumeCloud.js +1 -115
  172. package/dist/esm/material/WeatherEffects.js +1 -351
  173. package/dist/esm/material/entity/BaseMaterialProperty.js +1 -51
  174. package/dist/esm/material/entity/CircleWaveMaterialProperty.js +1 -101
  175. package/dist/esm/material/entity/DynamicWallMaterialProperty.js +1 -101
  176. package/dist/esm/material/entity/ImageGlowingMaterialProperty.js +1 -89
  177. package/dist/esm/material/entity/ImageMaterialProperty.js +1 -34
  178. package/dist/esm/material/entity/PolylineTrailLinkMaterialProperty.js +1 -132
  179. package/dist/esm/material/primitive/BaseMaterialAppearance.js +1 -28
  180. package/dist/esm/material/primitive/ImageGlowingMaterialAppearance.js +1 -77
  181. package/dist/esm/material/primitive/ImageMaterialAppearance.js +1 -77
  182. package/dist/esm/measure/Area.js +1 -220
  183. package/dist/esm/measure/BaseDraw.js +1 -105
  184. package/dist/esm/measure/Distance.js +1 -223
  185. package/dist/esm/measure/index.js +1 -266
  186. package/dist/esm/measure/types.js +1 -17
  187. package/dist/esm/measure/utils.js +1 -319
  188. package/dist/esm/particle/BaseParticle.js +1 -196
  189. package/dist/esm/particle/FireParticle.js +1 -65
  190. package/dist/esm/particle/FountainParticle.js +1 -80
  191. package/dist/esm/particle/SmokeParticle.js +1 -65
  192. package/dist/esm/particle/common.js +1 -23
  193. package/dist/esm/particle/index.js +1 -5
  194. package/dist/esm/property/PositionProperty.js +1 -56
  195. package/dist/esm/tileLayer/ArcGisLayer.js +1 -41
  196. package/dist/esm/tileLayer/CustomRasterClipWorkerClient.js +1 -147
  197. package/dist/esm/tileLayer/CustomRasterLayer.js +1 -1136
  198. package/dist/esm/tileLayer/ImageryLayer.js +1 -44
  199. package/dist/esm/tileLayer/MvtVectorLoad.js +1 -1549
  200. package/dist/esm/tileLayer/MvtVectorWorkerClient.js +1 -126
  201. package/dist/esm/tileLayer/RasterLayer.js +1 -23
  202. package/dist/esm/tileLayer/WmsLayer.js +1 -26
  203. package/dist/esm/tileLayer/WmtsLayer.js +1 -23
  204. package/dist/esm/tool/BuildClampedPolygonGrid.js +1 -278
  205. package/dist/esm/tool/Compass.js +1 -282
  206. package/dist/esm/tool/PrimitiveCluster.js +1 -706
  207. package/dist/esm/tool/TimerInterval.js +1 -58
  208. package/dist/esm/tool/common.js +1 -405
  209. package/dist/esm/tool/fetch.js +1 -222
  210. package/dist/esm/tool/heatmap.js +1 -631
  211. package/dist/esm/tool/utils.d.ts +1 -0
  212. package/dist/esm/tool/utils.js +1 -501
  213. package/dist/esm/toolTip/index.js +1 -79
  214. package/dist/esm/videoFusion/BaseVideo.d.ts +7 -0
  215. package/dist/esm/videoFusion/BaseVideo.js +1 -330
  216. package/dist/esm/videoFusion/VideoProject.js +1 -230
  217. package/dist/esm/videoFusion/VideoTexture.js +1 -163
  218. package/dist/esm/visualization/BaseHeatmap.js +1 -271
  219. package/dist/esm/visualization/BoundaryHighlight.d.ts +136 -0
  220. package/dist/esm/visualization/BoundaryHighlight.js +1 -0
  221. package/dist/esm/visualization/DynamicWater.js +1 -289
  222. package/dist/esm/visualization/Frustum.js +1 -248
  223. package/dist/esm/visualization/Heatmap2d.js +1 -97
  224. package/dist/esm/visualization/Heatmap3d.js +1 -281
  225. package/dist/esm/visualization/MigrationEffect.js +1 -397
  226. package/dist/esm/visualization/PointCluster.js +1 -220
  227. package/dist/esm/visualization/RadarScan.js +1 -333
  228. package/dist/esm/visualization/SampledTerrainRiver.d.ts +180 -0
  229. package/dist/esm/visualization/SampledTerrainRiver.js +1 -0
  230. package/dist/esm/visualization/SampledTerrainWater.d.ts +170 -0
  231. package/dist/esm/visualization/SampledTerrainWater.js +1 -0
  232. package/dist/esm/visualization/WindField.d.ts +72 -0
  233. package/dist/esm/visualization/WindField.js +1 -0
  234. package/dist/esm/visualization/windCore.d.ts +161 -0
  235. package/dist/esm/visualization/windCore.js +8 -0
  236. package/dist/umd/deeptwins-engine-3d.min.css +1 -1
  237. package/dist/umd/deeptwins-engine-3d.min.js +1 -1
  238. package/package.json +6 -4
@@ -1 +1 @@
1
- (()=>{"use strict";const e=Object.fromEntries(Object.entries({Point:1,MultiPoint:2,LineString:3,MultiLineString:4,Polygon:5,MultiPolygon:6}).map(([e,t])=>[t,e])),t=(new TextEncoder,new TextDecoder);class r{constructor(e){this.bytes=function(e){if(e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return new Uint8Array(e);if(ArrayBuffer.isView(e))return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);throw new Error("输入不是可解码的二进制数据。")}(e),this.offset=0}isEnd(){return this.offset>=this.bytes.length}readVarint(){let e=0,t=0;for(;;){if(this.offset>=this.bytes.length)throw new Error("读取 protobuf varint 时遇到意外 EOF。");const r=this.bytes[this.offset];if(this.offset+=1,e+=(127&r)*2**t,!(128&r))return e;if(t+=7,t>49)throw new Error("protobuf varint 超出当前实现支持范围。")}}readDouble(){if(this.offset+8>this.bytes.length)throw new Error("读取 protobuf double 时遇到意外 EOF。");const e=new DataView(this.bytes.buffer,this.bytes.byteOffset+this.offset,8).getFloat64(0,!0);return this.offset+=8,e}readBytes(){const e=this.readVarint(),t=this.offset+e;if(t>this.bytes.length)throw new Error("读取 protobuf bytes 时遇到意外 EOF。");const r=this.bytes.slice(this.offset,t);return this.offset=t,r}readString(){return t.decode(this.readBytes())}readTag(){const e=this.readVarint();return{fieldNumber:e>>3,wireType:7&e}}skip(e){switch(e){case 0:return void this.readVarint();case 1:if(this.offset+8>this.bytes.length)throw new Error("跳过 protobuf fixed64 时遇到意外 EOF。");return void(this.offset+=8);case 2:{const e=this.readVarint();if(this.offset+e>this.bytes.length)throw new Error("跳过 protobuf bytes 时遇到意外 EOF。");return void(this.offset+=e)}default:throw new Error(`不支持跳过的 protobuf wire type:${e}`)}}}function s(e){const t=new r(e),s=[];let i;for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||1!==r?2!==e||1!==r?3!==e||1!==r?t.skip(r):i=t.readDouble():s[1]=t.readDouble():s[0]=t.readDouble()}if(!Number.isFinite(s[0])||!Number.isFinite(s[1]))throw new Error("解码 Position 失败:缺少合法经纬度。");return void 0===i?s:[s[0],s[1],i]}function i(e){const t=new r(e),i=[];for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||2!==r?t.skip(r):i.push(s(t.readBytes()))}return i}function o(e){const t=new r(e),i=[];for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||2!==r?t.skip(r):i.push(s(t.readBytes()))}return i}function n(e){const t=new r(e),s=[];for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||2!==r?t.skip(r):s.push(o(t.readBytes()))}return s}function a(t){const o=new r(t),a={type:"Feature",id:0,properties:{},geometry:{type:"Point",coordinates:[]}},f=[],u=[],d=[];let y=0,c="{}";for(;!o.isEnd();){const{fieldNumber:e,wireType:t}=o.readTag();1!==e||0!==t?2!==e||0!==t?3!==e||2!==t?4!==e||2!==t?5!==e||2!==t?6!==e||2!==t?o.skip(t):d.push(n(o.readBytes())):u.push(i(o.readBytes())):f.push(s(o.readBytes())):c=o.readString():y=o.readVarint():a.id=o.readVarint()}try{a.properties=JSON.parse(c||"{}")}catch(e){throw new Error(`解码 feature 失败:properties 不是合法 JSON:${e.message}`)}const h=e[y];if(!h)throw new Error(`解码 feature 失败:未知 geometryType=${y}`);switch(h){case"Point":a.geometry={type:"Point",coordinates:f[0]};break;case"MultiPoint":a.geometry={type:"MultiPoint",coordinates:f};break;case"LineString":a.geometry={type:"LineString",coordinates:u[0]||[]};break;case"MultiLineString":a.geometry={type:"MultiLineString",coordinates:u};break;case"Polygon":a.geometry={type:"Polygon",coordinates:d[0]||[]};break;case"MultiPolygon":a.geometry={type:"MultiPolygon",coordinates:d};break;default:throw new Error(`解码 feature 失败:未知几何类型 ${h}`)}return a}function f(e){const t=new r(e),s={version:1,z:0,x:0,y:0,features:[]};for(;!t.isEnd();){const{fieldNumber:e,wireType:r}=t.readTag();1!==e||0!==r?2!==e||0!==r?3!==e||0!==r?4!==e||0!==r?5!==e||2!==r?t.skip(r):s.features.push(a(t.readBytes())):s.y=t.readVarint():s.x=t.readVarint():s.z=t.readVarint():s.version=t.readVarint()}return s}const u=self;u.onmessage=e=>{const{id:t,buffer:r}=e.data;try{u.postMessage({id:t,raw:f(r)})}catch(e){u.postMessage({id:t,error:e instanceof Error&&e.message?e.message:"MVT 解码失败"})}}})();
1
+ (function(_0x452ebe,_0x390bc8){const _0x224858=_0x50a7,_0x465795=_0x452ebe();while(!![]){try{const _0x198ce0=-parseInt(_0x224858(0xc2))/0x1+parseInt(_0x224858(0xb6))/0x2*(parseInt(_0x224858(0xd8))/0x3)+-parseInt(_0x224858(0xd6))/0x4+-parseInt(_0x224858(0xbb))/0x5+-parseInt(_0x224858(0xc9))/0x6*(-parseInt(_0x224858(0xc5))/0x7)+parseInt(_0x224858(0xc8))/0x8*(parseInt(_0x224858(0xd1))/0x9)+-parseInt(_0x224858(0xd4))/0xa*(parseInt(_0x224858(0xb8))/0xb);if(_0x198ce0===_0x390bc8)break;else _0x465795['push'](_0x465795['shift']());}catch(_0x4b7803){_0x465795['push'](_0x465795['shift']());}}}(_0x3dcf,0x8d09d),((()=>{'use strict';const _0x49627e=_0x50a7;const _0x1be15f=Object[_0x49627e(0xb7)](Object[_0x49627e(0xb9)]({'Point':0x1,'MultiPoint':0x2,'LineString':0x3,'MultiLineString':0x4,'Polygon':0x5,'MultiPolygon':0x6})['map'](([_0x5e44be,_0x1dc362])=>[_0x1dc362,_0x5e44be])),_0x182822=(new TextEncoder(),new TextDecoder());class _0x4014df{constructor(_0xea1aa){this['bytes']=function(_0x34a004){const _0x4798c5=_0x50a7;if(_0x34a004 instanceof Uint8Array)return _0x34a004;if(_0x34a004 instanceof ArrayBuffer)return new Uint8Array(_0x34a004);if(ArrayBuffer['isView'](_0x34a004))return new Uint8Array(_0x34a004[_0x4798c5(0xd3)],_0x34a004['byteOffset'],_0x34a004['byteLength']);throw new Error(_0x4798c5(0xbf));}(_0xea1aa),this['offset']=0x0;}[_0x49627e(0xb2)](){const _0x32b693=_0x49627e;return this['offset']>=this[_0x32b693(0xda)]['length'];}['readVarint'](){const _0x58dcff=_0x49627e;let _0x480f84=0x0,_0x4629c9=0x0;for(;;){if(this['offset']>=this[_0x58dcff(0xda)]['length'])throw new Error(_0x58dcff(0xbe));const _0xb907a0=this[_0x58dcff(0xda)][this[_0x58dcff(0xc6)]];if(this['offset']+=0x1,_0x480f84+=(0x7f&_0xb907a0)*0x2**_0x4629c9,!(0x80&_0xb907a0))return _0x480f84;if(_0x4629c9+=0x7,_0x4629c9>0x31)throw new Error('protobuf\x20varint\x20超出当前实现支持范围。');}}['readDouble'](){const _0x5139ac=_0x49627e;if(this[_0x5139ac(0xc6)]+0x8>this['bytes'][_0x5139ac(0xd9)])throw new Error('读取\x20protobuf\x20double\x20时遇到意外\x20EOF。');const _0x4da1af=new DataView(this[_0x5139ac(0xda)][_0x5139ac(0xd3)],this[_0x5139ac(0xda)]['byteOffset']+this['offset'],0x8)[_0x5139ac(0xb5)](0x0,!0x0);return this[_0x5139ac(0xc6)]+=0x8,_0x4da1af;}['readBytes'](){const _0x63f50f=_0x49627e,_0x26ba1d=this[_0x63f50f(0xba)](),_0x339574=this[_0x63f50f(0xc6)]+_0x26ba1d;if(_0x339574>this['bytes'][_0x63f50f(0xd9)])throw new Error('读取\x20protobuf\x20bytes\x20时遇到意外\x20EOF。');const _0x3670b1=this[_0x63f50f(0xda)][_0x63f50f(0xb3)](this['offset'],_0x339574);return this['offset']=_0x339574,_0x3670b1;}[_0x49627e(0xcc)](){const _0xdd7804=_0x49627e;return _0x182822['decode'](this[_0xdd7804(0xbd)]());}['readTag'](){const _0x2ade21=_0x49627e,_0x2200fd=this[_0x2ade21(0xba)]();return{'fieldNumber':_0x2200fd>>0x3,'wireType':0x7&_0x2200fd};}[_0x49627e(0xd0)](_0x282cbe){const _0x48e810=_0x49627e;switch(_0x282cbe){case 0x0:return void this['readVarint']();case 0x1:if(this[_0x48e810(0xc6)]+0x8>this['bytes'][_0x48e810(0xd9)])throw new Error(_0x48e810(0xbc));return void(this[_0x48e810(0xc6)]+=0x8);case 0x2:{const _0x5a3e7d=this[_0x48e810(0xba)]();if(this['offset']+_0x5a3e7d>this[_0x48e810(0xda)]['length'])throw new Error('跳过\x20protobuf\x20bytes\x20时遇到意外\x20EOF。');return void(this['offset']+=_0x5a3e7d);}default:throw new Error(_0x48e810(0xcf)+_0x282cbe);}}}function _0x6cebf2(_0x4b6d54){const _0x1c3149=_0x49627e,_0x545437=new _0x4014df(_0x4b6d54),_0x4e21a2=[];let _0x130918;for(;!_0x545437[_0x1c3149(0xb2)]();){const {fieldNumber:_0x55b5f6,wireType:_0xe46b80}=_0x545437[_0x1c3149(0xd7)]();0x1!==_0x55b5f6||0x1!==_0xe46b80?0x2!==_0x55b5f6||0x1!==_0xe46b80?0x3!==_0x55b5f6||0x1!==_0xe46b80?_0x545437['skip'](_0xe46b80):_0x130918=_0x545437[_0x1c3149(0xb1)]():_0x4e21a2[0x1]=_0x545437['readDouble']():_0x4e21a2[0x0]=_0x545437['readDouble']();}if(!Number[_0x1c3149(0xd5)](_0x4e21a2[0x0])||!Number[_0x1c3149(0xd5)](_0x4e21a2[0x1]))throw new Error('解码\x20Position\x20失败:缺少合法经纬度。');return void 0x0===_0x130918?_0x4e21a2:[_0x4e21a2[0x0],_0x4e21a2[0x1],_0x130918];}function _0x2765d9(_0xcca099){const _0x287513=_0x49627e,_0x2c7446=new _0x4014df(_0xcca099),_0x23dbba=[];for(;!_0x2c7446[_0x287513(0xb2)]();){const {fieldNumber:_0x3fe4be,wireType:_0x5e3ee1}=_0x2c7446[_0x287513(0xd7)]();0x1!==_0x3fe4be||0x2!==_0x5e3ee1?_0x2c7446[_0x287513(0xd0)](_0x5e3ee1):_0x23dbba['push'](_0x6cebf2(_0x2c7446['readBytes']()));}return _0x23dbba;}function _0x25c005(_0x7cb8bf){const _0x382a57=_0x49627e,_0x218bb9=new _0x4014df(_0x7cb8bf),_0x195c21=[];for(;!_0x218bb9['isEnd']();){const {fieldNumber:_0x243496,wireType:_0x595f5c}=_0x218bb9['readTag']();0x1!==_0x243496||0x2!==_0x595f5c?_0x218bb9['skip'](_0x595f5c):_0x195c21[_0x382a57(0xc4)](_0x6cebf2(_0x218bb9[_0x382a57(0xbd)]()));}return _0x195c21;}function _0xd8281d(_0x30408f){const _0x31ae36=_0x49627e,_0x2e0447=new _0x4014df(_0x30408f),_0x50afae=[];for(;!_0x2e0447['isEnd']();){const {fieldNumber:_0x29deaa,wireType:_0x54d81d}=_0x2e0447['readTag']();0x1!==_0x29deaa||0x2!==_0x54d81d?_0x2e0447[_0x31ae36(0xd0)](_0x54d81d):_0x50afae[_0x31ae36(0xc4)](_0x25c005(_0x2e0447['readBytes']()));}return _0x50afae;}function _0x4cf009(_0x115cc1){const _0x41ad84=_0x49627e,_0x4abafb=new _0x4014df(_0x115cc1),_0x40ca8e={'type':_0x41ad84(0xc7),'id':0x0,'properties':{},'geometry':{'type':_0x41ad84(0xc3),'coordinates':[]}},_0x14f0ff=[],_0xb4df13=[],_0x1732be=[];let _0x3355d2=0x0,_0x3e18d9='{}';for(;!_0x4abafb[_0x41ad84(0xb2)]();){const {fieldNumber:_0x4576bc,wireType:_0x1cd793}=_0x4abafb['readTag']();0x1!==_0x4576bc||0x0!==_0x1cd793?0x2!==_0x4576bc||0x0!==_0x1cd793?0x3!==_0x4576bc||0x2!==_0x1cd793?0x4!==_0x4576bc||0x2!==_0x1cd793?0x5!==_0x4576bc||0x2!==_0x1cd793?0x6!==_0x4576bc||0x2!==_0x1cd793?_0x4abafb['skip'](_0x1cd793):_0x1732be[_0x41ad84(0xc4)](_0xd8281d(_0x4abafb[_0x41ad84(0xbd)]())):_0xb4df13[_0x41ad84(0xc4)](_0x2765d9(_0x4abafb['readBytes']())):_0x14f0ff['push'](_0x6cebf2(_0x4abafb[_0x41ad84(0xbd)]())):_0x3e18d9=_0x4abafb[_0x41ad84(0xcc)]():_0x3355d2=_0x4abafb['readVarint']():_0x40ca8e['id']=_0x4abafb['readVarint']();}try{_0x40ca8e['properties']=JSON['parse'](_0x3e18d9||'{}');}catch(_0x2edc17){throw new Error('解码\x20feature\x20失败:properties\x20不是合法\x20JSON:'+_0x2edc17['message']);}const _0x58da55=_0x1be15f[_0x3355d2];if(!_0x58da55)throw new Error('解码\x20feature\x20失败:未知\x20geometryType='+_0x3355d2);switch(_0x58da55){case _0x41ad84(0xc3):_0x40ca8e[_0x41ad84(0xca)]={'type':_0x41ad84(0xc3),'coordinates':_0x14f0ff[0x0]};break;case'MultiPoint':_0x40ca8e[_0x41ad84(0xca)]={'type':_0x41ad84(0xcd),'coordinates':_0x14f0ff};break;case'LineString':_0x40ca8e[_0x41ad84(0xca)]={'type':_0x41ad84(0xb4),'coordinates':_0xb4df13[0x0]||[]};break;case'MultiLineString':_0x40ca8e[_0x41ad84(0xca)]={'type':'MultiLineString','coordinates':_0xb4df13};break;case _0x41ad84(0xc0):_0x40ca8e['geometry']={'type':_0x41ad84(0xc0),'coordinates':_0x1732be[0x0]||[]};break;case _0x41ad84(0xc1):_0x40ca8e[_0x41ad84(0xca)]={'type':'MultiPolygon','coordinates':_0x1732be};break;default:throw new Error('解码\x20feature\x20失败:未知几何类型\x20'+_0x58da55);}return _0x40ca8e;}function _0x5bc87d(_0x58a0fa){const _0x6c3dd1=_0x49627e,_0x4fbfb0=new _0x4014df(_0x58a0fa),_0x121385={'version':0x1,'z':0x0,'x':0x0,'y':0x0,'features':[]};for(;!_0x4fbfb0['isEnd']();){const {fieldNumber:_0x363ada,wireType:_0x3d1d7f}=_0x4fbfb0['readTag']();0x1!==_0x363ada||0x0!==_0x3d1d7f?0x2!==_0x363ada||0x0!==_0x3d1d7f?0x3!==_0x363ada||0x0!==_0x3d1d7f?0x4!==_0x363ada||0x0!==_0x3d1d7f?0x5!==_0x363ada||0x2!==_0x3d1d7f?_0x4fbfb0['skip'](_0x3d1d7f):_0x121385[_0x6c3dd1(0xd2)]['push'](_0x4cf009(_0x4fbfb0[_0x6c3dd1(0xbd)]())):_0x121385['y']=_0x4fbfb0[_0x6c3dd1(0xba)]():_0x121385['x']=_0x4fbfb0['readVarint']():_0x121385['z']=_0x4fbfb0['readVarint']():_0x121385[_0x6c3dd1(0xb0)]=_0x4fbfb0[_0x6c3dd1(0xba)]();}return _0x121385;}const _0x1656b3=self;_0x1656b3['onmessage']=_0x4a5d53=>{const _0x4a0d60=_0x49627e,{id:_0x3e7462,buffer:_0x13ece3}=_0x4a5d53['data'];try{_0x1656b3[_0x4a0d60(0xce)]({'id':_0x3e7462,'raw':_0x5bc87d(_0x13ece3)});}catch(_0x386905){_0x1656b3['postMessage']({'id':_0x3e7462,'error':_0x386905 instanceof Error&&_0x386905['message']?_0x386905[_0x4a0d60(0xcb)]:'MVT\x20解码失败'});}};})()));function _0x50a7(_0x2fc100,_0x4dca40){_0x2fc100=_0x2fc100-0xb0;const _0x3dcfec=_0x3dcf();let _0x50a7c6=_0x3dcfec[_0x2fc100];if(_0x50a7['asKgMP']===undefined){var _0x1fc345=function(_0x51032b){const _0x410a7b='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x1be15f='',_0x182822='';for(let _0x4014df=0x0,_0x6cebf2,_0x2765d9,_0x25c005=0x0;_0x2765d9=_0x51032b['charAt'](_0x25c005++);~_0x2765d9&&(_0x6cebf2=_0x4014df%0x4?_0x6cebf2*0x40+_0x2765d9:_0x2765d9,_0x4014df++%0x4)?_0x1be15f+=String['fromCharCode'](0xff&_0x6cebf2>>(-0x2*_0x4014df&0x6)):0x0){_0x2765d9=_0x410a7b['indexOf'](_0x2765d9);}for(let _0xd8281d=0x0,_0x4cf009=_0x1be15f['length'];_0xd8281d<_0x4cf009;_0xd8281d++){_0x182822+='%'+('00'+_0x1be15f['charCodeAt'](_0xd8281d)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x182822);};_0x50a7['EUiDqr']=_0x1fc345,_0x50a7['lumoOT']={},_0x50a7['asKgMP']=!![];}const _0x3ced7f=_0x3dcfec[0x0],_0x19f522=_0x2fc100+_0x3ced7f,_0x310e64=_0x50a7['lumoOT'][_0x19f522];return!_0x310e64?(_0x50a7c6=_0x50a7['EUiDqr'](_0x50a7c6),_0x50a7['lumoOT'][_0x19f522]=_0x50a7c6):_0x50a7c6=_0x310e64,_0x50a7c6;}function _0x3dcf(){const _0x199f0c=['AxngAw5PDgu','mtGZmZe2mevnwKjZwG','CMvHzfrHzW','nJG1mJLKrMX0DK4','BgvUz3rO','yNL0zxm','DMvYC2LVBG','CMvHzerVDwjSzq','AxnfBMq','C2XPy2u','tgLUzvn0CMLUzW','z2v0rMXVyxq2na','nJjbCeXlBMi','zNjVBuvUDhjPzxm','mZiWotHfsu12B3K','zw50CMLLCW','CMvHzfzHCMLUDa','ndG1ntCXnur3q3D5Aa','6lEZ6l+hihbYB3rVyNvMigzPEgvKnJqG5PE26ygh5yIW5Osp5AswievprUoaGG','CMvHzej5DgvZ','6k+75y+wihbYB3rVyNvMihzHCMLUDcdML7BPGyFLIldMHi/LPjyGru9g44cc','6l6t5ywL5lIn5PIV5y+V6kEJ56cb55Qe5lQm6l+B5yI25PwW5O2U44cc','ug9SEwDVBG','txvSDgLqB2X5z29U','otmZotvnD3zdDxq','ug9PBNq','ChvZAa','ndyZmZm3meXbvK5iEq','B2zMC2v0','rMvHDhvYzq','mtK4mdm2me1cBw5Lrq','nMHjyxn1vG','z2vVBwv0CNK','BwvZC2fNzq','CMvHzfn0CMLUzW','txvSDgLqB2LUDa','Cg9ZDe1LC3nHz2u','5lIn5PsV5OYb6lEZ6l+h55QeihbYB3rVyNvMihDPCMuGDhLWzE+8MG','C2TPCa','mZzgAuDXAeK','zMvHDhvYzxm','yNvMzMvY','odKWsw9ut2TZ'];_0x3dcf=function(){return _0x199f0c;};return _0x3dcf();}
@@ -0,0 +1,640 @@
1
+ !(function() {
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;
17
+ }
18
+ get() {
19
+ return ~this.crc;
20
+ }
21
+ }
22
+ class H extends w {
23
+ constructor() {
24
+ let e2;
25
+ const t2 = new v();
26
+ super({ transform(e3, n2) {
27
+ t2.append(e3), n2.enqueue(e3);
28
+ }, 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);
55
+ 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();
67
+ }
68
+ reset() {
69
+ const e2 = this;
70
+ return e2._h = e2._init.slice(0), e2._buffer = [], e2._length = 0, e2;
71
+ }
72
+ update(e2) {
73
+ 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;
105
+ }
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]);
139
+ }
140
+ reset() {
141
+ const e2 = this;
142
+ e2._resultHash = new e2._hash(e2._baseHash[0]), e2._updated = false;
143
+ }
144
+ update(e2) {
145
+ this._updated = true, this._resultHash.update(e2);
146
+ }
147
+ 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;
169
+ }
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]];
173
+ }
174
+ }
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;
190
+ }
191
+ for (let n3 = 0; 5 > n3; n3++) e2[n3] = e2[n3].slice(0), t2[n3] = t2[n3].slice(0);
192
+ }
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;
200
+ }
201
+ }, J = class {
202
+ constructor(e2, t2) {
203
+ this._prf = e2, this._initIv = t2, this._iv = t2;
204
+ }
205
+ reset() {
206
+ this._iv = this._initIv;
207
+ }
208
+ update(e2) {
209
+ return this.calculate(this._prf, e2, this._iv);
210
+ }
211
+ incWord(e2) {
212
+ if (255 & ~(e2 >> 24)) e2 += 1 << 24;
213
+ 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;
216
+ }
217
+ return e2;
218
+ }
219
+ incCounter(e2) {
220
+ 0 === (e2[0] = this.incWord(e2[0])) && (e2[1] = this.incWord(e2[1]));
221
+ }
222
+ calculate(e2, t2, n2) {
223
+ 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];
230
+ }
231
+ return C.clamp(t2, r2);
232
+ }
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 }) {
237
+ 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);
258
+ }
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);
264
+ }
265
+ } });
266
+ }
267
+ }
268
+ class te extends w {
269
+ constructor({ password: e2, rawPassword: n2, encryptionStrength: s2 }) {
270
+ let r2;
271
+ 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);
290
+ }
291
+ r2.signature = oe(G, n3.digest()).slice(0, Z), e3.enqueue(ie(o2, r2.signature));
292
+ }
293
+ } }), r2 = this;
294
+ }
295
+ }
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);
303
+ }
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);
317
+ try {
318
+ return await O.importKey("raw", t2, n3, false, r3);
319
+ } catch {
320
+ return Y = false, I.importKey(t2);
321
+ }
322
+ })(0, r2, W, 0, E), c2 = await (async (e2, t2, n3) => {
323
+ if (!$) return I.pbkdf2(t2, e2.salt, M.iterations, n3);
324
+ try {
325
+ return await O.deriveBits(e2, t2, n3);
326
+ } catch {
327
+ return $ = false, I.pbkdf2(t2, e2.salt, M.iterations, n3);
328
+ }
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;
338
+ }
339
+ return new f().encode(e3);
340
+ })(e2) : t2;
341
+ }
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;
345
+ }
346
+ function ae(e2, t2, n2) {
347
+ return e2.subarray(t2, n2);
348
+ }
349
+ function oe(e2, t2) {
350
+ return e2.fromBits(t2);
351
+ }
352
+ function ce(e2, t2) {
353
+ return e2.toBits(t2);
354
+ }
355
+ class le extends w {
356
+ constructor({ password: e2, passwordVerification: n2, checkPasswordOnly: s2 }) {
357
+ 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);
365
+ }
366
+ s2 ? t2.error(new r(T)) : t2.enqueue(he(n3, e3));
367
+ } });
368
+ }
369
+ }
370
+ class ue extends w {
371
+ constructor({ password: e2, passwordVerification: n2 }) {
372
+ super({ start() {
373
+ t.assign(this, { password: e2, passwordVerification: n2 }), pe(this, e2);
374
+ }, transform(e3, t2) {
375
+ const n3 = this;
376
+ 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);
383
+ } });
384
+ }
385
+ }
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));
400
+ }
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;
411
+ }
412
+ function me(e2) {
413
+ return 4294967295 & e2;
414
+ }
415
+ class _e extends w {
416
+ constructor(e2, { chunkSize: t2, CompressionStreamZlib: n2, CompressionStream: s2 }) {
417
+ 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;
423
+ });
424
+ }
425
+ }
426
+ class ye extends w {
427
+ constructor(e2, { chunkSize: t2, DecompressionStreamZlib: n2, DecompressionStream: s2 }) {
428
+ 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);
435
+ }
436
+ });
437
+ }
438
+ }
439
+ function be(e2, n2, s2) {
440
+ n2 = ze(n2, new w({ flush: s2 })), t.defineProperty(e2, "readable", { get: () => n2 });
441
+ }
442
+ function Se(e2, t2, n2, s2, r2, i2) {
443
+ const a2 = t2 && s2 ? s2 : r2 || i2, o2 = n2.deflate64 ? "deflate64-raw" : "deflate-raw";
444
+ 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
+ }
453
+ }
454
+ return e2;
455
+ }
456
+ function ze(e2, t2) {
457
+ return e2.pipeThrough(t2);
458
+ }
459
+ const ke = "data", ve = "close";
460
+ class He extends w {
461
+ constructor(e2, n2) {
462
+ 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));
469
+ }, 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");
473
+ }, flush() {
474
+ const { signature: e3 } = c2;
475
+ t.assign(s2, { signature: e3, inputSize: o2 });
476
+ } });
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;
487
+ }
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);
491
+ } });
492
+ }
493
+ }
494
+ const Be = new l(), Ae = new l();
495
+ let Re, Ie, qe, Ke, Pe, Te = 0;
496
+ async function Ve(e2) {
497
+ try {
498
+ const { options: t2, config: s2 } = e2;
499
+ if (!t2.useCompressionStream) try {
500
+ await self.initModule(e2.config);
501
+ } catch {
502
+ t2.useCompressionStream = true;
503
+ }
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]);
528
+ } catch {
529
+ d(e2);
530
+ }
531
+ else d(e2);
532
+ else d(e2);
533
+ }
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 } });
537
+ }
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);
543
+ }, transform(t3, n3) {
544
+ 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;
558
+ }
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);
561
+ }
562
+ }, flush(t3) {
563
+ try {
564
+ const n3 = new i(Pe.buffer), s2 = this._process, a3 = this.out, c3 = this._scratch;
565
+ 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;
572
+ }
573
+ } catch (e3) {
574
+ t3.error(e3);
575
+ } 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);
581
+ }
582
+ } });
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);
598
+ }
599
+ });
600
+ class Me {
601
+ constructor(e2 = "deflate", t2) {
602
+ return We(true, e2, t2);
603
+ }
604
+ }
605
+ class Ee {
606
+ constructor(e2 = "deflate", t2) {
607
+ return We(false, e2, t2);
608
+ }
609
+ }
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;
616
+ 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);
630
+ }
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;
634
+ }
635
+ })(e2.wasmURI, e2);
636
+ return e2.CompressionStreamZlib = Me, e2.DecompressionStreamZlib = Ee, t2;
637
+ } catch {
638
+ }
639
+ };
640
+ })();