@arcgis/core 5.2.0-next.42 → 5.2.0-next.44

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 (182) hide show
  1. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0115681a3de6df0aebdf.js +1 -0
  4. package/assets/esri/core/workers/chunks/025caafc70ac26f0a4ed.js +1 -0
  5. package/assets/esri/core/workers/chunks/{d66d58ed5d66520ab1bf.js → 04a167c110fb7811169d.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{72fe7fb03c156f26a589.js → 08e18fb12533fc76e49c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{2e79fb1b8445b2091cdb.js → 0a0732ba8271d7dc985c.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{e6b5c015205d38abe037.js → 127b111ee53e4b9184f8.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{2d7cfc68a38dabd8898a.js → 176c5eaaa23a479c88e0.js} +1 -1
  10. package/assets/esri/core/workers/chunks/1d1f5578c7d8619f7a46.js +1 -0
  11. package/assets/esri/core/workers/chunks/268637fd6c50264acfc3.js +1 -0
  12. package/assets/esri/core/workers/chunks/296fa9fb80e521c30cb1.js +1 -0
  13. package/assets/esri/core/workers/chunks/{c50e4e8c6188e64e7d45.js → 2974cddb0b0f67df7d2d.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{e9511627418c6864148a.js → 305ee2dd597c48a38e64.js} +1 -1
  15. package/assets/esri/core/workers/chunks/3252da57b800356116af.js +1 -0
  16. package/assets/esri/core/workers/chunks/{fd47ee8598e37fea03fe.js → 384b619854ef8a3f6e94.js} +1 -1
  17. package/assets/esri/core/workers/chunks/3af923abeb6e65c4468f.js +1 -0
  18. package/assets/esri/core/workers/chunks/3f4f1595c8a77d072b04.js +1 -0
  19. package/assets/esri/core/workers/chunks/4f09f208ece2ec1db727.js +1 -0
  20. package/assets/esri/core/workers/chunks/{67468c50ecb1fbedda87.js → 549295a5db9bf1536491.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{284e88805184334396fe.js → 57374213084bef59b776.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{2a8d791aef3123e6a3c4.js → 57970d43cdcc5cf57a30.js} +1 -1
  23. package/assets/esri/core/workers/chunks/{dedf678490572c500a19.js → 5b937c405788fd14be8b.js} +2 -2
  24. package/assets/esri/core/workers/chunks/5f9c4dad6952c4c58ebf.js +1 -0
  25. package/assets/esri/core/workers/chunks/706230b70a36d2e038f7.js +1 -0
  26. package/assets/esri/core/workers/chunks/76713b700e053f8bad29.js +1 -0
  27. package/assets/esri/core/workers/chunks/{90ace5f9b4af1beea6bf.js → 7b6b8d0673976c6c26de.js} +1 -1
  28. package/assets/esri/core/workers/chunks/{321dbc60f44819c2b4de.js → 81d55594cee124040565.js} +1 -1
  29. package/assets/esri/core/workers/chunks/8a01fe8d78ca85ea4784.js +1 -0
  30. package/assets/esri/core/workers/chunks/9114a575b78a7ea18d0f.js +1 -0
  31. package/assets/esri/core/workers/chunks/93e705c1147cc8ceca02.js +1 -0
  32. package/assets/esri/core/workers/chunks/{d082de5dd83bd73d209b.js → 94cebc34e49da1e295ed.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{34fcb776e4de1d870bbd.js → a38a7e3a5aa9294ab918.js} +2 -2
  34. package/assets/esri/core/workers/chunks/a8033e606b2db1ee332d.js +1 -0
  35. package/assets/esri/core/workers/chunks/{6f408397e2c8a2ea9805.js → aea247138617e12b699b.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{26e7884d8639df4d994b.js → b03dcf3d55266745f3d1.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{f1d3cf674b6bea89e122.js → b3cefc1895bfd62fc440.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{ec1a2e68957fae48e60b.js → b75db3b1becf8265ec59.js} +3 -3
  39. package/assets/esri/core/workers/chunks/{82f4aa0533db009b11d8.js → bac4d4a9f3a9b7f6864d.js} +2 -2
  40. package/assets/esri/core/workers/chunks/{2f29f08cddd5add9388e.js → c01a121ebe571a848452.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{c1845682cc9a5aac8703.js → c316234837b7ca406b1c.js} +3 -3
  42. package/assets/esri/core/workers/chunks/c3cd38ca8690286d40d7.js +1 -0
  43. package/assets/esri/core/workers/chunks/c6042825f61cd70d54d8.js +1 -0
  44. package/assets/esri/core/workers/chunks/{0646524250bb9fe82935.js → d8b67ca02cdc1e8191e3.js} +1 -1
  45. package/assets/esri/core/workers/chunks/db416ba3132034e20642.js +1 -0
  46. package/assets/esri/core/workers/chunks/{590e977f8eeb379b86c8.js → e5c19e9b6fa53abdca8c.js} +21 -27
  47. package/assets/esri/core/workers/chunks/f9b2727b41943d83d4ca.js +1 -0
  48. package/assets/esri/core/workers/chunks/{934044f2ef6ce199b399.js → fc880b275f5eaf42171e.js} +1 -1
  49. package/assets/esri/libs/basisu/basis_encoder.wasm +0 -0
  50. package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
  51. package/chunks/Component.glsl.js +2 -2
  52. package/chunks/CutFillTargetDepth.glsl.js +1 -2
  53. package/chunks/Fog.glsl.js +3 -3
  54. package/chunks/GlobalIllumination.glsl.js +21 -21
  55. package/chunks/GlobalIlluminationBlur.glsl.js +1 -1
  56. package/chunks/GlowComposition.glsl.js +3 -3
  57. package/chunks/OITAddEmission.glsl.js +1 -1
  58. package/chunks/Path.glsl.js +4 -4
  59. package/chunks/Terrain.glsl.js +2 -2
  60. package/chunks/basis_encoder.js +1 -1
  61. package/chunks/dxt_encoder.js +1 -1
  62. package/config.js +1 -1
  63. package/geometry/support/aaBoundingBox.js +1 -1
  64. package/geometry/support/frustum.js +1 -1
  65. package/kernel.js +1 -1
  66. package/layers/IntegratedMesh3DTilesLayer.js +1 -1
  67. package/package.json +2 -2
  68. package/support/revision.js +1 -1
  69. package/third-party-notices.txt +156 -0
  70. package/views/2d/engine/webgl/Painter.js +1 -1
  71. package/views/2d/engine/webgl/RenderingDevice.js +1 -1
  72. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  73. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedLineShader.js +1 -1
  74. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedTechnique.js +1 -1
  75. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimationUniformInfo.js +1 -1
  76. package/views/2d/engine/webgl/shaderGraph/techniques/blend/BlendTechnique.js +1 -1
  77. package/views/2d/engine/webgl/shaderGraph/techniques/bloom/BloomTechnique.js +1 -1
  78. package/views/2d/engine/webgl/shaderGraph/techniques/blur/BlurTechnique.js +1 -1
  79. package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
  80. package/views/2d/engine/webgl/shaderGraph/techniques/raster/RasterHighlightTechnique.js +1 -1
  81. package/views/2d/engine/webgl/shaderGraph/techniques/raster/processor/BaseRasterProcessorTechnique.js +1 -1
  82. package/views/2d/engine/webgl/shaderGraph/techniques/utility/BitBlitTechnique.js +1 -1
  83. package/views/2d/engine/webgl/shaderGraph/techniques/utility/HighlightTechnique.js +1 -1
  84. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  85. package/views/2d/layers/features/sources/strategies/FeatureDrillDownTileLoadStrategy.js +1 -1
  86. package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
  87. package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
  88. package/views/2d/webglDeps.js +1 -1
  89. package/views/3d/analysis/LineOfSight/LineOfSightAggregateManipulatedObject3D.js +1 -1
  90. package/views/3d/analysis/LineOfSight/LineOfSightConfiguration.js +1 -1
  91. package/views/3d/analysis/LineOfSight/LineOfSightDrawToolRenderer.js +1 -1
  92. package/views/3d/analysis/LineOfSight/LineOfSightManipulators.js +1 -1
  93. package/views/3d/analysis/LineOfSight/LineOfSightReshapeTool3D.js +1 -1
  94. package/views/3d/analysis/LineOfSight/LineOfSightTool2.js +1 -1
  95. package/views/3d/input/SceneInputManager.js +1 -1
  96. package/views/3d/layers/I3SMeshView3D.js +1 -1
  97. package/views/3d/layers/i3s/I3SGeometryUtil.js +1 -1
  98. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  99. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  100. package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
  101. package/views/3d/terrain/GeometryState.js +1 -1
  102. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  103. package/views/3d/terrain/PatchRenderData.js +1 -1
  104. package/views/3d/terrain/TerrainSurface.js +1 -1
  105. package/views/3d/terrain/Tile.js +1 -1
  106. package/views/3d/terrain/TileAgent.js +1 -1
  107. package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
  108. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  109. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  110. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
  111. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  112. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  113. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  114. package/views/3d/webgl-engine/collections/Component/Material/ComponentData.glsl.js +1 -1
  115. package/views/3d/webgl-engine/collections/Component/Transform.js +1 -1
  116. package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +1 -1
  117. package/views/3d/webgl-engine/core/shaderLibrary/output/Emissions.glsl.js +4 -4
  118. package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +4 -10
  119. package/views/3d/webgl-engine/effects/WeatherFader.js +1 -1
  120. package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
  121. package/views/3d/webgl-engine/effects/fog/Fog.glsl.js +1 -1
  122. package/views/3d/webgl-engine/effects/fog/FogTechniqueConfiguration.js +1 -1
  123. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  124. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  125. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +1 -1
  126. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechniqueConfiguration.js +1 -1
  127. package/views/3d/webgl-engine/effects/glow/Glow.js +1 -1
  128. package/views/3d/webgl-engine/effects/glow/GlowBlurTechniqueConfiguration.js +1 -1
  129. package/views/3d/webgl-engine/effects/glow/GlowComposition.glsl.js +1 -1
  130. package/views/3d/webgl-engine/effects/glow/GlowCompositionTechniqueConfiguration.js +1 -1
  131. package/views/3d/webgl-engine/effects/transparency/OITAddEmission.glsl.js +1 -1
  132. package/views/3d/webgl-engine/effects/transparency/OITBlend.js +1 -1
  133. package/views/3d/webgl-engine/effects/transparency/OITBlendFragmentTechniqueConfiguration.js +1 -1
  134. package/views/3d/webgl-engine/effects/transparency/oitBlendFragment.glsl.js +1 -1
  135. package/views/3d/webgl-engine/lib/CutFillComputation.js +1 -1
  136. package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
  137. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  138. package/views/3d/webgl-engine/lib/screenPolygonTriangleIntersections.js +1 -1
  139. package/views/3d/webgl-engine/shaders/CutFillTargetDepth.glsl.js +1 -1
  140. package/views/3d/webgl-engine/shaders/GaussianSplatCompositionTechniqueConfiguration.js +1 -1
  141. package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +2 -2
  142. package/views/3d/webgl-engine/shaders/{oitResolution.glsl.js → floatBlendScale.glsl.js} +1 -1
  143. package/views/GroundView.js +1 -1
  144. package/views/input/BrowserEventSource.js +1 -1
  145. package/views/input/InputManager.js +1 -1
  146. package/views/support/LayerViewManager.js +1 -1
  147. package/views/support/TextureCompressionWorker.js +1 -1
  148. package/views/support/imageReprojection.js +1 -1
  149. package/widgets/BatchAttributeForm/expressions/ExpressionsManager.js +1 -1
  150. package/widgets/BatchAttributeForm/inputs/FieldInput.js +1 -1
  151. package/widgets/BatchAttributeForm.js +1 -1
  152. package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
  153. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  154. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  155. package/widgets/Sketch/SketchViewModel.js +1 -1
  156. package/widgets/support/dateUtils.js +1 -1
  157. package/assets/esri/core/workers/chunks/0d6afba80d2f8dcb5cf7.js +0 -1
  158. package/assets/esri/core/workers/chunks/1276df03201c1b855fee.js +0 -1
  159. package/assets/esri/core/workers/chunks/18d874739ee9ffad7480.js +0 -1
  160. package/assets/esri/core/workers/chunks/23570397304969f724b3.js +0 -1
  161. package/assets/esri/core/workers/chunks/474ea8c97d101e41b3f5.js +0 -1
  162. package/assets/esri/core/workers/chunks/551d0c5432f7a08dea77.js +0 -1
  163. package/assets/esri/core/workers/chunks/5923ebadd4f75be2c9cc.js +0 -1
  164. package/assets/esri/core/workers/chunks/7cb0681cc6a5e956cb15.js +0 -1
  165. package/assets/esri/core/workers/chunks/8b73694d5a97638a3a61.js +0 -1
  166. package/assets/esri/core/workers/chunks/8dee03779b569f233daf.js +0 -1
  167. package/assets/esri/core/workers/chunks/9ebc98746b1f085b82b7.js +0 -1
  168. package/assets/esri/core/workers/chunks/9ee3741eef73f3edb18b.js +0 -1
  169. package/assets/esri/core/workers/chunks/af97e19516dbbcfb5286.js +0 -1
  170. package/assets/esri/core/workers/chunks/b4047333265a2665aef9.js +0 -1
  171. package/assets/esri/core/workers/chunks/c3fae4f4522604a9c17e.js +0 -1
  172. package/assets/esri/core/workers/chunks/cce83896093279c70449.js +0 -1
  173. package/assets/esri/core/workers/chunks/d5561dff043789494845.js +0 -1
  174. package/assets/esri/core/workers/chunks/e2c9393bec747f7876bb.js +0 -1
  175. package/assets/esri/core/workers/chunks/e94f2d6037fba042dc6e.js +0 -1
  176. package/assets/esri/core/workers/chunks/f5d7f69047e1b1116202.js +0 -1
  177. package/views/2d/engine/webgl/MaterialManager.js +0 -2
  178. package/views/2d/engine/webgl/shaders/MaterialPrograms.js +0 -2
  179. package/views/2d/engine/webgl/shaders/sources/resolver.js +0 -2
  180. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +0 -2
  181. package/views/webgl/ShaderCompiler.js +0 -2
  182. /package/assets/esri/core/workers/chunks/{82f4aa0533db009b11d8.js.LICENSE.txt → bac4d4a9f3a9b7f6864d.js.LICENSE.txt} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- var r,e=(r="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var t,n,o=e,a=new Promise((r,e)=>{t=r,n=e}),i="object"==typeof window,s="undefined"!=typeof WorkerGlobalScope;"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&process.type;var l,u,d=Object.assign({},o),c="./this.program",f="";function h(r){return o.locateFile?o.locateFile(r,f):f+r}(i||s)&&(s?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=f.startsWith("blob:")?"":f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(u=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),l=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)});var p=o.print||console.log.bind(console),m=o.printErr||console.error.bind(console);Object.assign(o,d),d=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram);var v,w,y,g,E,k,b,_,A,F=o.wasmBinary,P=!1;function D(){var r=v.buffer;o.HEAP8=w=new Int8Array(r),o.HEAP16=g=new Int16Array(r),o.HEAPU8=y=new Uint8Array(r),o.HEAPU16=E=new Uint16Array(r),o.HEAP32=k=new Int32Array(r),o.HEAPU32=b=new Uint32Array(r),o.HEAPF32=_=new Float32Array(r),o.HEAPF64=A=new Float64Array(r)}var S=[],T=[],C=[];function M(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)R(o.preRun.shift());rr(S)}function j(){o.noFSInit||ft.initialized||ft.init(),ft.ignorePermissions=!1,rr(T)}function x(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)N(o.postRun.shift());rr(C)}function R(r){S.unshift(r)}function $(r){T.unshift(r)}function N(r){C.unshift(r)}var z=0,O=null;function W(r){z++,o.monitorRunDependencies?.(z)}function B(r){if(z--,o.monitorRunDependencies?.(z),0==z&&O){var e=O;O=null,e()}}function U(r){o.onAbort?.(r),m(r="Aborted("+r+")"),P=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var L,H,I,V="data:application/octet-stream;base64,",q=r=>r.startsWith(V);function X(){var r="dxt_encoder.wasm";return q(r)?r:h(r)}function G(r){if(r==L&&F)return new Uint8Array(F);if(u)return u(r);throw"both async and sync fetching of the wasm failed"}async function K(r){if(!F)try{var e=await l(r);return new Uint8Array(e)}catch{}return G(r)}async function J(r,e){try{var t=await K(r);return await WebAssembly.instantiate(t,e)}catch(n){m(`failed to asynchronously prepare wasm: ${n}`),U(n)}}async function Q(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming&&!q(e)&&"function"==typeof fetch)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(o){m(`wasm streaming compile failed: ${o}`),m("falling back to ArrayBuffer instantiation")}return J(e,t)}function Y(){return{a:bt}}async function Z(){function r(r,e){return kt=r.exports,v=kt.G,D(),zr=kt.J,$(kt.H),B(),kt}function e(e){r(e.instance)}W();var t=Y();if(o.instantiateWasm)try{return o.instantiateWasm(t,r)}catch(i){m(`Module.instantiateWasm callback failed with error: ${i}`),n(i)}L??=X();try{var a=await Q(F,L,t);return e(a),a}catch(i){return void n(i)}}var rr=r=>{for(;r.length>0;)r.shift()(o)};o.noExitRuntime;class er{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){b[this.ptr+4>>2]=r}get_type(){return b[this.ptr+4>>2]}set_destructor(r){b[this.ptr+8>>2]=r}get_destructor(){return b[this.ptr+8>>2]}set_caught(r){r=r?1:0,w[this.ptr+12]=r}get_caught(){return 0!=w[this.ptr+12]}set_rethrown(r){r=r?1:0,w[this.ptr+13]=r}get_rethrown(){return 0!=w[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){b[this.ptr+16>>2]=r}get_adjusted_ptr(){return b[this.ptr+16>>2]}}var tr,nr,or,ar=(r,e,t)=>{throw new er(r).init(e,t),r},ir=()=>U(""),sr=(r,e,t,n,o)=>{},lr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);tr=r},ur=r=>{for(var e="",t=r;y[t];)e+=tr[y[t++]];return e},dr={},cr={},fr={},hr=r=>{throw new nr(r)},pr=r=>{throw new or(r)},mr=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&pr("Mismatched type converter count");for(var o=0;o<r.length;++o)wr(r[o],n[o])}r.forEach(r=>fr[r]=e);var o=new Array(e.length),a=[],i=0;e.forEach((r,e)=>{cr.hasOwnProperty(r)?o[e]=cr[r]:(a.push(r),dr.hasOwnProperty(r)||(dr[r]=[]),dr[r].push(()=>{o[e]=cr[r],++i===a.length&&n(o)}))}),0===a.length&&n(o)};function vr(r,e,t={}){var n=e.name;if(r||hr(`type "${n}" must have a positive integer typeid pointer`),cr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;hr(`Cannot register type '${n}' twice`)}if(cr[r]=e,delete fr[r],dr.hasOwnProperty(r)){var o=dr[r];delete dr[r],o.forEach(r=>r())}}function wr(r,e,t={}){return vr(r,e,t)}var yr=8,gr=(r,e,t,n)=>{wr(r,{name:e=ur(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:yr,readValueFromPointer:function(r){return this.fromWireType(y[r])},destructorFunction:null})},Er=[],kr=[],br=r=>{r>9&&0===--kr[r+1]&&(kr[r]=void 0,Er.push(r))},_r=()=>kr.length/2-5-Er.length,Ar=()=>{kr.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=_r},Fr={toValue:r=>(r||hr("Cannot use deleted val. handle = "+r),kr[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Er.pop()||kr.length;return kr[e]=r,kr[e+1]=1,e}}}};function Pr(r){return this.fromWireType(b[r>>2])}var Dr={name:"emscripten::val",fromWireType:r=>{var e=Fr.toValue(r);return br(r),e},toWireType:(r,e)=>Fr.toHandle(e),argPackAdvance:yr,readValueFromPointer:Pr,destructorFunction:null},Sr=r=>wr(r,Dr),Tr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(_[r>>2])};case 8:return function(r){return this.fromWireType(A[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},Cr=(r,e,t)=>{wr(r,{name:e=ur(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:yr,readValueFromPointer:Tr(e,t),destructorFunction:null})},Mr=(r,e)=>Object.defineProperty(e,"name",{value:r}),jr=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function xr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function Rr(r,e){if(!(r instanceof Function))throw new TypeError(`new_ called with constructor type ${typeof r} which is not a function`);var t=Mr(r.name||"unknownFunctionName",function(){});t.prototype=r.prototype;var n=new t,o=r.apply(n,e);return o instanceof Object?o:n}function $r(r,e,t,n){for(var o=xr(r),a=r.length-2,i=[],s=["fn"],l=0;l<a;++l)i.push(`arg${l}`),s.push(`arg${l}Wired`);i=i.join(","),s=s.join(",");var u=`return function (${i}) {\n`;o&&(u+="var destructors = [];\n");var d=o?"destructors":"null",c=["humanName","throwBindingError","invoker","fn","runDestructors","retType","classParam"];for(l=0;l<a;++l)u+=`var arg${l}Wired = argType${l}['toWireType'](${d}, arg${l});\n`,c.push(`argType${l}`);if(u+=(t||n?"var rv = ":"")+`invoker(${s});\n`,o)u+="runDestructors(destructors);\n";else for(l=2;l<r.length;++l){var f=1===l?"thisWired":"arg"+(l-2)+"Wired";null!==r[l].destructorFunction&&(u+=`${f}_dtor(${f});\n`,c.push(`${f}_dtor`))}return t&&(u+="var ret = retType['fromWireType'](rv);\nreturn ret;\n"),[c,u+="}\n"]}function Nr(r,e,t,n,o,a){var i=e.length;i<2&&hr("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==e[1]&&null!==t,l=xr(e),u="void"!==e[0].name,d=[r,hr,n,o,jr,e[0],e[1]],c=0;c<i-2;++c)d.push(e[c+2]);if(!l)for(c=2;c<e.length;++c)null!==e[c].destructorFunction&&d.push(e[c].destructorFunction);let[f,h]=$r(e,s,u,a);f.push(h);var p=Rr(Function,f)(...d);return Mr(r,p)}var zr,Or,Wr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||hr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Br=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&hr(`Cannot register public name '${r}' twice`),Wr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&hr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},Ur=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(b[e+4*n>>2]);return t},Lr=(r,e,t)=>{o.hasOwnProperty(r)||pr("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},Hr=(r,e,t)=>(r=r.replace(/p/g,"i"),(0,o["dynCall_"+r])(e,...t)),Ir=[],Vr=r=>{var e=Ir[r];return e||(r>=Ir.length&&(Ir.length=r+1),Ir[r]=e=zr.get(r)),e},qr=(r,e,t=[])=>r.includes("j")?Hr(r,e,t):Vr(e)(...t),Xr=(r,e)=>(...t)=>qr(r,e,t),Gr=(r,e)=>{function t(){return r.includes("j")?Xr(r,e):Vr(e)}r=ur(r);var n=t();return"function"!=typeof n&&hr(`unknown function pointer with signature ${r}: ${e}`),n},Kr=(r,e)=>{var t=Mr(e,function(r){this.name=e,this.message=r;var t=new Error(r).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Jr=r=>{var e=At(r),t=ur(e);return Pt(e),t},Qr=(r,e)=>{var t=[],n={};function o(r){n[r]||cr[r]||(fr[r]?fr[r].forEach(o):(t.push(r),n[r]=!0))}throw e.forEach(o),new Or(`${r}: `+t.map(Jr).join([", "]))},Yr=r=>{const e=(r=r.trim()).indexOf("(");return-1!==e?r.substr(0,e):r},Zr=(r,e,t,n,o,a,i,s)=>{var l=Ur(e,t);r=ur(r),r=Yr(r),o=Gr(n,o),Br(r,function(){Qr(`Cannot call ${r} due to unbound types`,l)},e-1),mr([],l,t=>{var n=[t[0],null].concat(t.slice(1));return Lr(r,Nr(r,n,null,o,a,i),e-1),[]})},re=(r,e,t)=>{switch(e){case 1:return t?r=>w[r]:r=>y[r];case 2:return t?r=>g[r>>1]:r=>E[r>>1];case 4:return t?r=>k[r>>2]:r=>b[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},ee=(r,e,t,n,o)=>{e=ur(e);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned"),l=(r,e)=>{};wr(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return l(e,this.name),e>>>0}:function(r,e){return l(e,this.name),e},argPackAdvance:yr,readValueFromPointer:re(e,t,0!==n),destructorFunction:null})},te=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(r){var e=b[r>>2],t=b[r+4>>2];return new n(w.buffer,t,e)}wr(r,{name:t=ur(t),fromWireType:o,argPackAdvance:yr,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ne=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o},oe=(r,e,t)=>ne(r,y,e,t),ae=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},ie="undefined"!=typeof TextDecoder?new TextDecoder:void 0,se=(r,e=0,t=NaN)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&ie)return ie.decode(r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var l=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var u=i-65536;a+=String.fromCharCode(55296|u>>10,56320|1023&u)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},le=(r,e)=>r?se(y,r,e):"",ue=(r,e)=>{wr(r,{name:e=ur(e),fromWireType(r){for(var e,t=b[r>>2],n=r+4,o=n,a=0;a<=t;++a){var i=n+a;if(a==t||0==y[i]){var s=le(o,i-o);void 0===e?e=s:(e+=String.fromCharCode(0),e+=s),o=i+1}}return Pt(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||hr("Cannot pass non-string to std::string"),t=n?ae(e):e.length;var o=Ft(4+t+1),a=o+4;if(b[o>>2]=t,n)oe(e,a,t+1);else if(n)for(var i=0;i<t;++i){var s=e.charCodeAt(i);s>255&&(Pt(a),hr("String has UTF-16 code units that do not fit in 8 bits")),y[a+i]=s}else for(i=0;i<t;++i)y[a+i]=e[i];return null!==r&&r.push(Pt,o),o},argPackAdvance:yr,readValueFromPointer:Pr,destructorFunction(r){Pt(r)}})},de="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,ce=(r,e)=>{for(var t=r,n=t>>1,o=n+e/2;!(n>=o)&&E[n];)++n;if((t=n<<1)-r>32&&de)return de.decode(y.subarray(r,t));for(var a="",i=0;!(i>=e/2);++i){var s=g[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},fe=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,o=(t-=2)<2*r.length?t/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);g[e>>1]=i,e+=2}return g[e>>1]=0,e-n},he=r=>2*r.length,pe=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=k[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},me=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),k[e>>2]=i,(e+=4)+4>o)break}return k[e>>2]=0,e-n},ve=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},we=(r,e,t)=>{var n,o,a,i;t=ur(t),2===e?(n=ce,o=fe,i=he,a=r=>E[r>>1]):4===e&&(n=pe,o=me,i=ve,a=r=>b[r>>2]),wr(r,{name:t,fromWireType:r=>{for(var t,o=b[r>>2],i=r+4,s=0;s<=o;++s){var l=r+4+s*e;if(s==o||0==a(l)){var u=n(i,l-i);void 0===t?t=u:(t+=String.fromCharCode(0),t+=u),i=l+e}}return Pt(r),t},toWireType:(r,n)=>{"string"!=typeof n&&hr(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=Ft(4+a+e);return b[s>>2]=a/e,o(n,s+4,a+e),null!==r&&r.push(Pt,s),s},argPackAdvance:yr,readValueFromPointer:Pr,destructorFunction(r){Pt(r)}})},ye=(r,e)=>{wr(r,{isVoid:!0,name:e=ur(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},ge=(r,e,t)=>y.copyWithin(r,e,e+t),Ee=(r,e)=>{var t=cr[r];return void 0===t&&hr(`${e} has unknown type ${Jr(r)}`),t},ke=(r,e,t)=>{var n=[],o=r.toWireType(n,t);return n.length&&(b[e>>2]=Fr.toHandle(n)),o},be=(r,e,t)=>(r=Fr.toValue(r),e=Ee(e,"emval::as"),ke(e,t,r)),_e=[],Ae=(r,e,t,n)=>(r=_e[r])(null,e=Fr.toValue(e),t,n),Fe={},Pe=r=>{var e=Fe[r];return void 0===e?ur(r):e},De=(r,e,t,n,o)=>(r=_e[r])(e=Fr.toValue(e),e[t=Pe(t)],n,o),Se=()=>"object"==typeof globalThis?globalThis:Function("return this")(),Te=r=>0===r?Fr.toHandle(Se()):(r=Pe(r),Fr.toHandle(Se()[r])),Ce=r=>{var e=_e.length;return _e.push(r),e},Me=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=Ee(b[e+4*n>>2],"parameter "+n);return t},je=(r,e,t)=>{var n=Me(r,e),o=n.shift();r--;var a="return function (obj, func, destructorsRef, args) {\n",i=0,s=[];0===t&&s.push("obj");for(var l=["retType"],u=[o],d=0;d<r;++d)s.push("arg"+d),l.push("argType"+d),u.push(n[d]),a+=` var arg${d} = argType${d}.readValueFromPointer(args${i?"+"+i:""});\n`,i+=n[d].argPackAdvance;a+=` var rv = ${1===t?"new func":"func.call"}(${s.join(", ")});\n`,o.isVoid||(l.push("emval_returnValue"),u.push(ke),a+=" return emval_returnValue(retType, destructorsRef, rv);\n"),a+="};\n",l.push(a);var c=Rr(Function,l)(...u),f=`methodCaller<(${n.map(r=>r.name).join(", ")}) => ${o.name}>`;return Ce(Mr(f,c))},xe=r=>(r=Pe(r),Fr.toHandle(o[r])),Re=(r,e)=>(r=Fr.toValue(r),e=Fr.toValue(e),Fr.toHandle(r[e])),$e=r=>{r>9&&(kr[r+1]+=1)},Ne=r=>Fr.toHandle(Pe(r)),ze=r=>{var e=Fr.toValue(r);jr(e),br(r)},Oe=(r,e,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),u=Math.max(s,l);b[r>>2]=60*u,k[e>>2]=Number(s!=l);var d=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=d(s),f=d(l);l<s?(oe(c,t,17),oe(f,n,17)):(oe(c,n,17),oe(f,t,17))},We=()=>2147483648,Be=(r,e)=>Math.ceil(r/e)*e,Ue=r=>{var e=(r-v.buffer.byteLength+65535)/65536|0;try{return v.grow(e),D(),1}catch(t){}},Le=r=>{var e=y.length;r>>>=0;var t=We();if(r>t)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,r+100663296);var a=Math.min(t,Be(Math.max(r,o),65536));if(Ue(a))return!0}return!1},He={},Ie=()=>c||"./this.program",Ve=()=>{if(!Ve.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:Ie()};for(var e in He)void 0===He[e]?delete r[e]:r[e]=He[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Ve.strings=t}return Ve.strings},qe=(r,e)=>{for(var t=0;t<r.length;++t)w[e++]=r.charCodeAt(t);w[e]=0},Xe=(r,e)=>{var t=0;return Ve().forEach((n,o)=>{var a=e+t;b[r+4*o>>2]=a,qe(n,a),t+=n.length+1}),0},Ge=(r,e)=>{var t=Ve();b[r>>2]=t.length;var n=0;return t.forEach(r=>n+=r.length+1),b[e>>2]=n,0},Ke={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Ke.isAbs(r),t="/"===r.substr(-1);return(r=Ke.normalizeArray(r.split("/").filter(r=>!!r),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Ke.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=Ke.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:(...r)=>Ke.normalize(r.join("/")),join2:(r,e)=>Ke.normalize(r+"/"+e)},Je=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>crypto.getRandomValues(r);U("initRandomDevice")},Qe=r=>(Qe=Je())(r),Ye={resolve:(...r)=>{for(var e="",t=!1,n=r.length-1;n>=-1&&!t;n--){var o=n>=0?r[n]:ft.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";e=o+"/"+e,t=Ke.isAbs(o)}return(t?"/":"")+(e=Ke.normalizeArray(e.split("/").filter(r=>!!r),!t).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Ye.resolve(r).substr(1),e=Ye.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},Ze=[];function rt(r,e,t){var n=ae(r)+1,o=new Array(n),a=ne(r,o,0,o.length);return o.length=a,o}var et=()=>{if(!Ze.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(r=window.prompt("Input: "))&&(r+="\n"),!r)return null;Ze=rt(r)}return Ze.shift()},tt={ttys:[],init(){},shutdown(){},register(r,e){tt.ttys[r]={input:[],output:[],ops:e},ft.registerDevice(r,tt.stream_ops)},stream_ops:{open(r){var e=tt.ttys[r.node.rdev];if(!e)throw new ft.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ft.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(l){throw new ft.ErrnoError(29)}if(void 0===s&&0===a)throw new ft.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.atime=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ft.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(i){throw new ft.ErrnoError(29)}return n&&(r.node.mtime=r.node.ctime=Date.now()),a}},default_tty_ops:{get_char:r=>et(),put_char(r,e){null===e||10===e?(p(se(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(p(se(r.output)),r.output=[])},ioctl_tcgets:r=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(m(se(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(m(se(r.output)),r.output=[])}}},nt=r=>{U()},ot={ops_table:null,mount:r=>ot.createNode(null,"/",16895,0),createNode(r,e,t,n){if(ft.isBlkdev(t)||ft.isFIFO(t))throw new ft.ErrnoError(63);ot.ops_table||={dir:{node:{getattr:ot.node_ops.getattr,setattr:ot.node_ops.setattr,lookup:ot.node_ops.lookup,mknod:ot.node_ops.mknod,rename:ot.node_ops.rename,unlink:ot.node_ops.unlink,rmdir:ot.node_ops.rmdir,readdir:ot.node_ops.readdir,symlink:ot.node_ops.symlink},stream:{llseek:ot.stream_ops.llseek}},file:{node:{getattr:ot.node_ops.getattr,setattr:ot.node_ops.setattr},stream:{llseek:ot.stream_ops.llseek,read:ot.stream_ops.read,write:ot.stream_ops.write,allocate:ot.stream_ops.allocate,mmap:ot.stream_ops.mmap,msync:ot.stream_ops.msync}},link:{node:{getattr:ot.node_ops.getattr,setattr:ot.node_ops.setattr,readlink:ot.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ot.node_ops.getattr,setattr:ot.node_ops.setattr},stream:ft.chrdev_stream_ops}};var o=ft.createNode(r,e,t,n);return ft.isDir(o.mode)?(o.node_ops=ot.ops_table.dir.node,o.stream_ops=ot.ops_table.dir.stream,o.contents={}):ft.isFile(o.mode)?(o.node_ops=ot.ops_table.file.node,o.stream_ops=ot.ops_table.file.stream,o.usedBytes=0,o.contents=null):ft.isLink(o.mode)?(o.node_ops=ot.ops_table.link.node,o.stream_ops=ot.ops_table.link.stream):ft.isChrdev(o.mode)&&(o.node_ops=ot.ops_table.chrdev.node,o.stream_ops=ot.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),r&&(r.contents[e]=o,r.atime=r.mtime=r.ctime=o.atime),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=ft.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,ft.isDir(r.mode)?e.size=4096:ft.isFile(r.mode)?e.size=r.usedBytes:ft.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.atime),e.mtime=new Date(r.mtime),e.ctime=new Date(r.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){for(const t of["mode","atime","mtime","ctime"])e[t]&&(r[t]=e[t]);void 0!==e.size&&ot.resizeFileStorage(r,e.size)},lookup(r,e){throw ot.doesNotExistError},mknod:(r,e,t,n)=>ot.createNode(r,e,t,n),rename(r,e,t){var n;try{n=ft.lookupNode(e,t)}catch(a){}if(n){if(ft.isDir(r.mode))for(var o in n.contents)throw new ft.ErrnoError(55);ft.hashRemoveNode(n)}delete r.parent.contents[r.name],e.contents[t]=r,r.name=t,e.ctime=e.mtime=r.parent.ctime=r.parent.mtime=Date.now()},unlink(r,e){delete r.contents[e],r.ctime=r.mtime=Date.now()},rmdir(r,e){var t=ft.lookupNode(r,e);for(var n in t.contents)throw new ft.ErrnoError(55);delete r.contents[e],r.ctime=r.mtime=Date.now()},readdir:r=>[".","..",...Object.keys(r.contents)],symlink(r,e,t){var n=ot.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!ft.isLink(r.mode))throw new ft.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,t,n,o,a){if(e.buffer===w.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.mtime=i.ctime=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(ot.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ft.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ft.ErrnoError(28);return n},allocate(r,e,t){ot.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,t,n,o){if(!ft.isFile(r.node.mode))throw new ft.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||!s||s.buffer!==w.buffer){if(i=!0,!(a=nt()))throw new ft.ErrnoError(48);s&&((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),w.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(r,e,t,n,o)=>(ot.stream_ops.write(r,e,0,n,t,!1),0)}},at=async r=>{var e=await l(r);return new Uint8Array(e)},it=(r,e,t,n,o,a)=>{ft.createDataFile(r,e,t,n,o,a)},st=o.preloadPlugins||[],lt=(r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return st.forEach(a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)}),o},ut=(r,e,t,n,o,a,i,s,l,u)=>{var d=e?Ye.resolve(Ke.join2(r,e)):r;function c(t){function c(t){u?.(),s||it(r,e,t,n,o,l),a?.(),B()}lt(t,d,c,()=>{i?.(),B()})||c(t)}W(),"string"==typeof t?at(t).then(c,i):c(t)},dt=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(void 0===e)throw new Error(`Unknown file open mode: ${r}`);return e},ct=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},ft={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(r){this.errno=r}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(r){this.node=r}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.id=ft.nextInode++,this.name=e,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return ft.isDir(this.mode)}get isDevice(){return ft.isChrdev(this.mode)}},lookupPath(r,e={}){if(!r)return{path:"",node:null};e.follow_mount??=!0,Ke.isAbs(r)||(r=ft.cwd()+"/"+r);r:for(var t=0;t<40;t++){for(var n=r.split("/").filter(r=>!!r&&"."!==r),o=ft.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&e.parent)break;if(".."!==n[i]){a=Ke.join2(a,n[i]);try{o=ft.lookupNode(o,n[i])}catch(u){if(44===u?.errno&&s&&e.noent_okay)return{path:a};throw u}if(!ft.isMountpoint(o)||s&&!e.follow_mount||(o=o.mounted.root),ft.isLink(o.mode)&&(!s||e.follow)){if(!o.node_ops.readlink)throw new ft.ErrnoError(52);var l=o.node_ops.readlink(o);Ke.isAbs(l)||(l=Ke.dirname(a)+"/"+l),r=l+"/"+n.slice(i+1).join("/");continue r}}else a=Ke.dirname(a),o=o.parent}return{path:a,node:o}}throw new ft.ErrnoError(32)},getPath(r){for(var e;;){if(ft.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%ft.nameTable.length},hashAddNode(r){var e=ft.hashName(r.parent.id,r.name);r.name_next=ft.nameTable[e],ft.nameTable[e]=r},hashRemoveNode(r){var e=ft.hashName(r.parent.id,r.name);if(ft.nameTable[e]===r)ft.nameTable[e]=r.name_next;else for(var t=ft.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=ft.mayLookup(r);if(t)throw new ft.ErrnoError(t);for(var n=ft.hashName(r.id,e),o=ft.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ft.lookup(r,e)},createNode(r,e,t,n){var o=new ft.FSNode(r,e,t,n);return ft.hashAddNode(o),o},destroyNode(r){ft.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ft.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){if(!ft.isDir(r.mode))return 54;var e=ft.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){if(!ft.isDir(r.mode))return 54;try{return ft.lookupNode(r,e),20}catch(t){}return ft.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=ft.lookupNode(r,e)}catch(a){return a.errno}var o=ft.nodePermissions(r,"wx");if(o)return o;if(t){if(!ft.isDir(n.mode))return 54;if(ft.isRoot(n)||ft.getPath(n)===ft.cwd())return 10}else if(ft.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ft.isLink(r.mode)?32:ft.isDir(r.mode)&&("r"!==ft.flagsToPermissionString(e)||512&e)?31:ft.nodePermissions(r,ft.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=ft.MAX_OPEN_FDS;r++)if(!ft.streams[r])return r;throw new ft.ErrnoError(33)},getStreamChecked(r){var e=ft.getStream(r);if(!e)throw new ft.ErrnoError(8);return e},getStream:r=>ft.streams[r],createStream:(r,e=-1)=>(r=Object.assign(new ft.FSStream,r),-1==e&&(e=ft.nextfd()),r.fd=e,ft.streams[e]=r,r),closeStream(r){ft.streams[r]=null},dupStream(r,e=-1){var t=ft.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=ft.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r)},llseek(){throw new ft.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){ft.devices[r]={stream_ops:e}},getDevice:r=>ft.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),ft.syncFSRequests++,ft.syncFSRequests>1&&m(`warning: ${ft.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ft.getMounts(ft.root.mount),n=0;function o(r){return ft.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach(e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)})},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&ft.root)throw new ft.ErrnoError(10);if(!o&&!a){var i=ft.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ft.isMountpoint(n))throw new ft.ErrnoError(10);if(!ft.isDir(n.mode))throw new ft.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},l=r.mount(s);return l.mount=s,s.root=l,o?ft.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(r){var e=ft.lookupPath(r,{follow_mount:!1});if(!ft.isMountpoint(e.node))throw new ft.ErrnoError(28);var t=e.node,n=t.mounted,o=ft.getMounts(n);Object.keys(ft.nameTable).forEach(r=>{for(var e=ft.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ft.destroyNode(e),e=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=ft.lookupPath(r,{parent:!0}).node,o=Ke.basename(r);if(!o||"."===o||".."===o)throw new ft.ErrnoError(28);var a=ft.mayCreate(n,o);if(a)throw new ft.ErrnoError(a);if(!n.node_ops.mknod)throw new ft.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},statfs(r){var e={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:ft.nextInode,ffree:ft.nextInode-1,fsid:42,flags:2,namelen:255},t=ft.lookupPath(r,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(e,t.node_ops.statfs(t.mount.opts.root)),e},create:(r,e=438)=>(e&=4095,e|=32768,ft.mknod(r,e,0)),mkdir:(r,e=511)=>(e&=1023,e|=16384,ft.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ft.mkdir(n,e)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ft.mknod(r,e,t)),symlink(r,e){if(!Ye.resolve(r))throw new ft.ErrnoError(44);var t=ft.lookupPath(e,{parent:!0}).node;if(!t)throw new ft.ErrnoError(44);var n=Ke.basename(e),o=ft.mayCreate(t,n);if(o)throw new ft.ErrnoError(o);if(!t.node_ops.symlink)throw new ft.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=Ke.dirname(r),a=Ke.dirname(e),i=Ke.basename(r),s=Ke.basename(e);if(t=ft.lookupPath(r,{parent:!0}).node,n=ft.lookupPath(e,{parent:!0}).node,!t||!n)throw new ft.ErrnoError(44);if(t.mount!==n.mount)throw new ft.ErrnoError(75);var l,u=ft.lookupNode(t,i),d=Ye.relative(r,a);if("."!==d.charAt(0))throw new ft.ErrnoError(28);if("."!==(d=Ye.relative(e,o)).charAt(0))throw new ft.ErrnoError(55);try{l=ft.lookupNode(n,s)}catch(h){}if(u!==l){var c=ft.isDir(u.mode),f=ft.mayDelete(t,i,c);if(f)throw new ft.ErrnoError(f);if(f=l?ft.mayDelete(n,s,c):ft.mayCreate(n,s))throw new ft.ErrnoError(f);if(!t.node_ops.rename)throw new ft.ErrnoError(63);if(ft.isMountpoint(u)||l&&ft.isMountpoint(l))throw new ft.ErrnoError(10);if(n!==t&&(f=ft.nodePermissions(t,"w")))throw new ft.ErrnoError(f);ft.hashRemoveNode(u);try{t.node_ops.rename(u,n,s),u.parent=n}catch(h){throw h}finally{ft.hashAddNode(u)}}},rmdir(r){var e=ft.lookupPath(r,{parent:!0}).node,t=Ke.basename(r),n=ft.lookupNode(e,t),o=ft.mayDelete(e,t,!0);if(o)throw new ft.ErrnoError(o);if(!e.node_ops.rmdir)throw new ft.ErrnoError(63);if(ft.isMountpoint(n))throw new ft.ErrnoError(10);e.node_ops.rmdir(e,t),ft.destroyNode(n)},readdir(r){var e=ft.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ft.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=ft.lookupPath(r,{parent:!0}).node;if(!e)throw new ft.ErrnoError(44);var t=Ke.basename(r),n=ft.lookupNode(e,t),o=ft.mayDelete(e,t,!1);if(o)throw new ft.ErrnoError(o);if(!e.node_ops.unlink)throw new ft.ErrnoError(63);if(ft.isMountpoint(n))throw new ft.ErrnoError(10);e.node_ops.unlink(e,t),ft.destroyNode(n)},readlink(r){var e=ft.lookupPath(r).node;if(!e)throw new ft.ErrnoError(44);if(!e.node_ops.readlink)throw new ft.ErrnoError(28);return e.node_ops.readlink(e)},stat(r,e){var t=ft.lookupPath(r,{follow:!e}).node;if(!t)throw new ft.ErrnoError(44);if(!t.node_ops.getattr)throw new ft.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ft.stat(r,!0),chmod(r,e,t){var n;if(!(n="string"==typeof r?ft.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new ft.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,ctime:Date.now()})},lchmod(r,e){ft.chmod(r,e,!0)},fchmod(r,e){var t=ft.getStreamChecked(r);ft.chmod(t.node,e)},chown(r,e,t,n){var o;if(!(o="string"==typeof r?ft.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new ft.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){ft.chown(r,e,t,!0)},fchown(r,e,t){var n=ft.getStreamChecked(r);ft.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new ft.ErrnoError(28);var t;if(!(t="string"==typeof r?ft.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new ft.ErrnoError(63);if(ft.isDir(t.mode))throw new ft.ErrnoError(31);if(!ft.isFile(t.mode))throw new ft.ErrnoError(28);var n=ft.nodePermissions(t,"w");if(n)throw new ft.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=ft.getStreamChecked(r);if(!(2097155&t.flags))throw new ft.ErrnoError(28);ft.truncate(t.node,e)},utime(r,e,t){var n=ft.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{atime:e,mtime:t})},open(r,e,t=438){if(""===r)throw new ft.ErrnoError(44);var n;if(t=64&(e="string"==typeof e?dt(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{var a=ft.lookupPath(r,{follow:!(131072&e),noent_okay:!0});n=a.node,r=a.path}var i=!1;if(64&e)if(n){if(128&e)throw new ft.ErrnoError(20)}else n=ft.mknod(r,t,0),i=!0;if(!n)throw new ft.ErrnoError(44);if(ft.isChrdev(n.mode)&&(e&=-513),65536&e&&!ft.isDir(n.mode))throw new ft.ErrnoError(54);if(!i){var s=ft.mayOpen(n,e);if(s)throw new ft.ErrnoError(s)}512&e&&!i&&ft.truncate(n,0),e&=-131713;var l=ft.createStream({node:n,path:ft.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),!o.logReadFiles||1&e||r in ft.readFiles||(ft.readFiles[r]=1),l},close(r){if(ft.isClosed(r))throw new ft.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{ft.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(ft.isClosed(r))throw new ft.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ft.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ft.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new ft.ErrnoError(28);if(ft.isClosed(r))throw new ft.ErrnoError(8);if(1==(2097155&r.flags))throw new ft.ErrnoError(8);if(ft.isDir(r.node.mode))throw new ft.ErrnoError(31);if(!r.stream_ops.read)throw new ft.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ft.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new ft.ErrnoError(28);if(ft.isClosed(r))throw new ft.ErrnoError(8);if(!(2097155&r.flags))throw new ft.ErrnoError(8);if(ft.isDir(r.node.mode))throw new ft.ErrnoError(31);if(!r.stream_ops.write)throw new ft.ErrnoError(28);r.seekable&&1024&r.flags&&ft.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new ft.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(ft.isClosed(r))throw new ft.ErrnoError(8);if(e<0||t<=0)throw new ft.ErrnoError(28);if(!(2097155&r.flags))throw new ft.ErrnoError(8);if(!ft.isFile(r.node.mode)&&!ft.isDir(r.node.mode))throw new ft.ErrnoError(43);if(!r.stream_ops.allocate)throw new ft.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new ft.ErrnoError(2);if(1==(2097155&r.flags))throw new ft.ErrnoError(2);if(!r.stream_ops.mmap)throw new ft.ErrnoError(43);if(!e)throw new ft.ErrnoError(28);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new ft.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=ft.open(r,e.flags),o=ft.stat(r).size,a=new Uint8Array(o);return ft.read(n,a,0,o,0),"utf8"===e.encoding?t=se(a):"binary"===e.encoding&&(t=a),ft.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=ft.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(ae(e)+1),a=ne(e,o,0,o.length);ft.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ft.write(n,e,0,e.byteLength,void 0,t.canOwn)}ft.close(n)},cwd:()=>ft.currentPath,chdir(r){var e=ft.lookupPath(r,{follow:!0});if(null===e.node)throw new ft.ErrnoError(44);if(!ft.isDir(e.node.mode))throw new ft.ErrnoError(54);var t=ft.nodePermissions(e.node,"x");if(t)throw new ft.ErrnoError(t);ft.currentPath=e.path},createDefaultDirectories(){ft.mkdir("/tmp"),ft.mkdir("/home"),ft.mkdir("/home/web_user")},createDefaultDevices(){ft.mkdir("/dev"),ft.registerDevice(ft.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n,llseek:()=>0}),ft.mkdev("/dev/null",ft.makedev(1,3)),tt.register(ft.makedev(5,0),tt.default_tty_ops),tt.register(ft.makedev(6,0),tt.default_tty1_ops),ft.mkdev("/dev/tty",ft.makedev(5,0)),ft.mkdev("/dev/tty1",ft.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=Qe(r).byteLength),r[--e]);ft.createDevice("/dev","random",t),ft.createDevice("/dev","urandom",t),ft.mkdir("/dev/shm"),ft.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ft.mkdir("/proc");var r=ft.mkdir("/proc/self");ft.mkdir("/proc/self/fd"),ft.mount({mount(){var e=ft.createNode(r,"fd",16895,73);return e.stream_ops={llseek:ot.stream_ops.llseek},e.node_ops={lookup(r,e){var t=+e,n=ft.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(ft.streams.entries()).filter(([r,e])=>e).map(([r,e])=>r.toString())},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?ft.createDevice("/dev","stdin",r):ft.symlink("/dev/tty","/dev/stdin"),e?ft.createDevice("/dev","stdout",null,e):ft.symlink("/dev/tty","/dev/stdout"),t?ft.createDevice("/dev","stderr",null,t):ft.symlink("/dev/tty1","/dev/stderr"),ft.open("/dev/stdin",0),ft.open("/dev/stdout",1),ft.open("/dev/stderr",1)},staticInit(){ft.nameTable=new Array(4096),ft.mount(ot,{},"/"),ft.createDefaultDirectories(),ft.createDefaultDevices(),ft.createSpecialDirectories(),ft.filesystems={MEMFS:ot}},init(r,e,t){ft.initialized=!0,r??=o.stdin,e??=o.stdout,t??=o.stderr,ft.createStandardStreams(r,e,t)},quit(){ft.initialized=!1;for(var r=0;r<ft.streams.length;r++){var e=ft.streams[r];e&&ft.close(e)}},findObject(r,e){var t=ft.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=ft.lookupPath(r,{follow:!e})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ft.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Ke.basename(r),n=ft.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:ft.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Ke.join2(r,a);try{ft.mkdir(i)}catch(s){}r=i}}return i},createFile(r,e,t,n,o){var a=Ke.join2("string"==typeof r?r:ft.getPath(r),e),i=ct(n,o);return ft.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:ft.getPath(r),i=e?Ke.join2(r,e):r);var s=ct(n,o),l=ft.create(i,s);if(t){if("string"==typeof t){for(var u=new Array(t.length),d=0,c=t.length;d<c;++d)u[d]=t.charCodeAt(d);t=u}ft.chmod(l,146|s);var f=ft.open(l,577);ft.write(f,t,0,t.length,0,a),ft.close(f),ft.chmod(l,s)}},createDevice(r,e,t,n){var o=Ke.join2("string"==typeof r?r:ft.getPath(r),e),a=ct(!!t,!!n);ft.createDevice.major??=64;var i=ft.makedev(ft.createDevice.major++,0);return ft.registerDevice(i,{open(r){r.seekable=!1},close(r){n?.buffer?.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(u){throw new ft.ErrnoError(29)}if(void 0===l&&0===i)throw new ft.ErrnoError(6);if(null==l)break;i++,e[n+s]=l}return i&&(r.node.atime=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(s){throw new ft.ErrnoError(29)}return o&&(r.node.mtime=r.node.ctime=Date.now()),i}}),ft.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{r.contents=u(r.url),r.usedBytes=r.contents.length}catch(e){throw new ft.ErrnoError(29)}},createLazyFile(r,e,t,n,o){class a{lengthKnown=!1;chunks=[];get(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}}setDataGetter(r){this.getter=r}cacheLength(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):rt(o.responseText||"")},l=this;l.setDataGetter(r=>{var e=r*i,t=(r+1)*i-1;if(t=Math.min(t,n-1),void 0===l.chunks[r]&&(l.chunks[r]=s(e,t)),void 0===l.chunks[r])throw new Error("doXHR failed!");return l.chunks[r]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!s)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var l=ft.createFile(r,e,i,n,o);i.contents?l.contents=i.contents:i.url&&(l.contents=null,l.url=i.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var u={};function d(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(l.stream_ops).forEach(r=>{var e=l.stream_ops[r];u[r]=(...r)=>(ft.forceLoadFile(l),e(...r))}),u.read=(r,e,t,n,o)=>(ft.forceLoadFile(l),d(r,e,t,n,o)),u.mmap=(r,e,t,n,o)=>{ft.forceLoadFile(l);var a=nt();if(!a)throw new ft.ErrnoError(48);return d(r,w,a,e,t),{ptr:a,allocated:!0}},l.stream_ops=u,l}},ht={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(Ke.isAbs(e))return e;var n;if(n=-100===r?ft.cwd():ht.getStreamFromFD(r).path,0==e.length){if(!t)throw new ft.ErrnoError(44);return n}return n+"/"+e},doStat(r,e,t){var n=r(e);k[t>>2]=n.dev,k[t+4>>2]=n.mode,b[t+8>>2]=n.nlink,k[t+12>>2]=n.uid,k[t+16>>2]=n.gid,k[t+20>>2]=n.rdev,I=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+24>>2]=I[0],k[t+28>>2]=I[1],k[t+32>>2]=4096,k[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return I=[Math.floor(o/1e3)>>>0,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+40>>2]=I[0],k[t+44>>2]=I[1],b[t+48>>2]=o%1e3*1e3*1e3,I=[Math.floor(a/1e3)>>>0,(H=Math.floor(a/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+56>>2]=I[0],k[t+60>>2]=I[1],b[t+64>>2]=a%1e3*1e3*1e3,I=[Math.floor(i/1e3)>>>0,(H=Math.floor(i/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+72>>2]=I[0],k[t+76>>2]=I[1],b[t+80>>2]=i%1e3*1e3*1e3,I=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[t+88>>2]=I[0],k[t+92>>2]=I[1],0},doMsync(r,e,t,n,o){if(!ft.isFile(e.node.mode))throw new ft.ErrnoError(43);if(2&n)return 0;var a=y.slice(r,r+t);ft.msync(e,a,o,t,n)},getStreamFromFD:r=>ft.getStreamChecked(r),varargs:void 0,getStr:r=>le(r)};function pt(r){try{var e=ht.getStreamFromFD(r);return ft.close(e),0}catch(t){if(void 0===ft||"ErrnoError"!==t.name)throw t;return t.errno}}var mt=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=b[e>>2],s=b[e+4>>2];e+=8;var l=ft.read(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function vt(r,e,t,n){try{var o=ht.getStreamFromFD(r),a=mt(o,e,t);return b[n>>2]=a,0}catch(i){if(void 0===ft||"ErrnoError"!==i.name)throw i;return i.errno}}var wt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function yt(r,e,t,n,o){var a=wt(e,t);try{if(isNaN(a))return 61;var i=ht.getStreamFromFD(r);return ft.llseek(i,a,n),I=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],k[o>>2]=I[0],k[o+4>>2]=I[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===ft||"ErrnoError"!==s.name)throw s;return s.errno}}var gt=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=b[e>>2],s=b[e+4>>2];e+=8;var l=ft.write(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function Et(r,e,t,n){try{var o=ht.getStreamFromFD(r),a=gt(o,e,t);return b[n>>2]=a,0}catch(i){if(void 0===ft||"ErrnoError"!==i.name)throw i;return i.errno}}lr(),nr=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},or=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},Ar(),Or=o.UnboundTypeError=Kr(Error,"UnboundTypeError"),ft.createPreloadedFile=ut,ft.staticInit(),ot.doesNotExistError=new ft.ErrnoError(44),ot.doesNotExistError.stack="<generic error, no stack>";var kt,bt={q:ar,w:ir,s:sr,D:gr,B:Sr,p:Cr,i:Zr,c:ee,a:te,C:ue,j:we,E:ye,A:ge,n:be,l:Ae,k:De,b:br,F:Te,g:je,m:xe,e:Re,h:$e,f:Ne,d:ze,t:Oe,z:Le,u:Xe,v:Ge,x:pt,y:vt,r:yt,o:Et};Z();var _t,At=r=>(At=kt.I)(r),Ft=r=>(Ft=kt.K)(r),Pt=r=>(Pt=kt.L)(r);function Dt(){function r(){_t||(_t=!0,o.calledRun=!0,P||(j(),t(o),o.onRuntimeInitialized?.(),x()))}z>0||(M(),z>0||(o.setStatus?(o.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>o.setStatus(""),1),r()},1)):r()))}if(o.dynCall_jiji=(r,e,t,n,a)=>(o.dynCall_jiji=kt.M)(r,e,t,n,a),o.dynCall_viijii=(r,e,t,n,a,i,s)=>(o.dynCall_viijii=kt.N)(r,e,t,n,a,i,s),o.dynCall_iiiiij=(r,e,t,n,a,i,s)=>(o.dynCall_iiiiij=kt.O)(r,e,t,n,a,i,s),o.dynCall_iiiiijj=(r,e,t,n,a,i,s,l,u)=>(o.dynCall_iiiiijj=kt.P)(r,e,t,n,a,i,s,l,u),o.dynCall_iiiiiijj=(r,e,t,n,a,i,s,l,u,d)=>(o.dynCall_iiiiiijj=kt.Q)(r,e,t,n,a,i,s,l,u,d),O=function r(){_t||Dt(),_t||(O=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Dt(),a});export{e as default};
2
+ var r,e=(r="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var t,n,o=e,a=new Promise((r,e)=>{t=r,n=e}),i="object"==typeof window,s="undefined"!=typeof WorkerGlobalScope;"object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node&&process.type;var l,d,u=Object.assign({},o),c="./this.program",f="";function h(r){return o.locateFile?o.locateFile(r,f):f+r}(i||s)&&(s?f=self.location.href:"undefined"!=typeof document&&document.currentScript&&(f=document.currentScript.src),r&&(f=r),f=f.startsWith("blob:")?"":f.substr(0,f.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(d=r=>{var e=new XMLHttpRequest;return e.open("GET",r,!1),e.responseType="arraybuffer",e.send(null),new Uint8Array(e.response)}),l=async r=>{var e=await fetch(r,{credentials:"same-origin"});if(e.ok)return e.arrayBuffer();throw new Error(e.status+" : "+e.url)});var m=o.print||console.log.bind(console),p=o.printErr||console.error.bind(console);Object.assign(o,u),u=null,o.arguments&&o.arguments,o.thisProgram&&(c=o.thisProgram);var v,w,g,y,E,b,k,_,A,P=o.wasmBinary,$=!1;function D(){var r=v.buffer;o.HEAP8=w=new Int8Array(r),o.HEAP16=y=new Int16Array(r),o.HEAPU8=g=new Uint8Array(r),o.HEAPU16=E=new Uint16Array(r),o.HEAP32=b=new Int32Array(r),o.HEAPU32=k=new Uint32Array(r),o.HEAPF32=_=new Float32Array(r),o.HEAPF64=A=new Float64Array(r)}var F=[],S=[],C=[];function T(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)x(o.preRun.shift());rr(F)}function M(){o.noFSInit||ct.initialized||ct.init(),ct.ignorePermissions=!1,rr(S)}function j(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)N(o.postRun.shift());rr(C)}function x(r){F.unshift(r)}function R(r){S.unshift(r)}function N(r){C.unshift(r)}var z=0,O=null;function B(r){z++,o.monitorRunDependencies?.(z)}function U(r){if(z--,o.monitorRunDependencies?.(z),0==z&&O){var e=O;O=null,e()}}function W(r){o.onAbort?.(r),p(r="Aborted("+r+")"),$=!0,r+=". Build with -sASSERTIONS for more info.";var e=new WebAssembly.RuntimeError(r);throw n(e),e}var L,H,I,V="data:application/octet-stream;base64,",q=r=>r.startsWith(V);function X(){var r="dxt_encoder.wasm";return q(r)?r:h(r)}function G(r){if(r==L&&P)return new Uint8Array(P);if(d)return d(r);throw"both async and sync fetching of the wasm failed"}async function K(r){if(!P)try{var e=await l(r);return new Uint8Array(e)}catch{}return G(r)}async function J(r,e){try{var t=await K(r);return await WebAssembly.instantiate(t,e)}catch(n){p(`failed to asynchronously prepare wasm: ${n}`),W(n)}}async function Q(r,e,t){if(!r&&"function"==typeof WebAssembly.instantiateStreaming&&!q(e)&&"function"==typeof fetch)try{var n=fetch(e,{credentials:"same-origin"});return await WebAssembly.instantiateStreaming(n,t)}catch(o){p(`wasm streaming compile failed: ${o}`),p("falling back to ArrayBuffer instantiation")}return J(e,t)}function Y(){return{a:bt}}async function Z(){function r(r,e){return Et=r.exports,v=Et.G,D(),Rr=Et.J,R(Et.H),U(),Et}function e(e){r(e.instance)}B();var t=Y();if(o.instantiateWasm)try{return o.instantiateWasm(t,r)}catch(i){p(`Module.instantiateWasm callback failed with error: ${i}`),n(i)}L??=X();try{var a=await Q(P,L,t);return e(a),a}catch(i){return void n(i)}}var rr=r=>{for(;r.length>0;)r.shift()(o)};o.noExitRuntime;class er{constructor(r){this.excPtr=r,this.ptr=r-24}set_type(r){k[this.ptr+4>>2]=r}get_type(){return k[this.ptr+4>>2]}set_destructor(r){k[this.ptr+8>>2]=r}get_destructor(){return k[this.ptr+8>>2]}set_caught(r){r=r?1:0,w[this.ptr+12]=r}get_caught(){return 0!=w[this.ptr+12]}set_rethrown(r){r=r?1:0,w[this.ptr+13]=r}get_rethrown(){return 0!=w[this.ptr+13]}init(r,e){this.set_adjusted_ptr(0),this.set_type(r),this.set_destructor(e)}set_adjusted_ptr(r){k[this.ptr+16>>2]=r}get_adjusted_ptr(){return k[this.ptr+16>>2]}}var tr,nr,or,ar=(r,e,t)=>{throw new er(r).init(e,t),r},ir=()=>W(""),sr=(r,e,t,n,o)=>{},lr=()=>{for(var r=new Array(256),e=0;e<256;++e)r[e]=String.fromCharCode(e);tr=r},dr=r=>{for(var e="",t=r;g[t];)e+=tr[g[t++]];return e},ur={},cr={},fr={},hr=r=>{throw new nr(r)},mr=r=>{throw new or(r)},pr=(r,e,t)=>{function n(e){var n=t(e);n.length!==r.length&&mr("Mismatched type converter count");for(var o=0;o<r.length;++o)wr(r[o],n[o])}r.forEach(r=>fr[r]=e);var o=new Array(e.length),a=[],i=0;e.forEach((r,e)=>{cr.hasOwnProperty(r)?o[e]=cr[r]:(a.push(r),ur.hasOwnProperty(r)||(ur[r]=[]),ur[r].push(()=>{o[e]=cr[r],++i===a.length&&n(o)}))}),0===a.length&&n(o)};function vr(r,e,t={}){var n=e.name;if(r||hr(`type "${n}" must have a positive integer typeid pointer`),cr.hasOwnProperty(r)){if(t.ignoreDuplicateRegistrations)return;hr(`Cannot register type '${n}' twice`)}if(cr[r]=e,delete fr[r],ur.hasOwnProperty(r)){var o=ur[r];delete ur[r],o.forEach(r=>r())}}function wr(r,e,t={}){return vr(r,e,t)}var gr=8,yr=(r,e,t,n)=>{wr(r,{name:e=dr(e),fromWireType:function(r){return!!r},toWireType:function(r,e){return e?t:n},argPackAdvance:gr,readValueFromPointer:function(r){return this.fromWireType(g[r])},destructorFunction:null})},Er=[],br=[],kr=r=>{r>9&&0===--br[r+1]&&(br[r]=void 0,Er.push(r))},_r=()=>br.length/2-5-Er.length,Ar=()=>{br.push(0,1,void 0,1,null,1,!0,1,!1,1),o.count_emval_handles=_r},Pr={toValue:r=>(r||hr("Cannot use deleted val. handle = "+r),br[r]),toHandle:r=>{switch(r){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{const e=Er.pop()||br.length;return br[e]=r,br[e+1]=1,e}}}};function $r(r){return this.fromWireType(k[r>>2])}var Dr={name:"emscripten::val",fromWireType:r=>{var e=Pr.toValue(r);return kr(r),e},toWireType:(r,e)=>Pr.toHandle(e),argPackAdvance:gr,readValueFromPointer:$r,destructorFunction:null},Fr=r=>wr(r,Dr),Sr=(r,e)=>{switch(e){case 4:return function(r){return this.fromWireType(_[r>>2])};case 8:return function(r){return this.fromWireType(A[r>>3])};default:throw new TypeError(`invalid float width (${e}): ${r}`)}},Cr=(r,e,t)=>{wr(r,{name:e=dr(e),fromWireType:r=>r,toWireType:(r,e)=>e,argPackAdvance:gr,readValueFromPointer:Sr(e,t),destructorFunction:null})},Tr=(r,e)=>Object.defineProperty(e,"name",{value:r}),Mr=r=>{for(;r.length;){var e=r.pop();r.pop()(e)}};function jr(r){for(var e=1;e<r.length;++e)if(null!==r[e]&&void 0===r[e].destructorFunction)return!0;return!1}function xr(r,e,t,n,o,a){var i=e.length;i<2&&hr("argTypes array size mismatch! Must at least get return value and 'this' types!"),e[1];var s=jr(e),l="void"!==e[0].name,d=i-2,u=new Array(d),c=[],f=[];return Tr(r,function(...r){var t;f.length=0,c.length=1,c[0]=o;for(var a=0;a<d;++a)u[a]=e[a+2].toWireType(f,r[a]),c.push(u[a]);function i(r){if(s)Mr(f);else for(var n=2;n<e.length;n++){var o=1===n?t:u[n-2];null!==e[n].destructorFunction&&e[n].destructorFunction(o)}if(l)return e[0].fromWireType(r)}return i(n(...c))})}var Rr,Nr,zr=(r,e,t)=>{if(void 0===r[e].overloadTable){var n=r[e];r[e]=function(...n){return r[e].overloadTable.hasOwnProperty(n.length)||hr(`Function '${t}' called with an invalid number of arguments (${n.length}) - expects one of (${r[e].overloadTable})!`),r[e].overloadTable[n.length].apply(this,n)},r[e].overloadTable=[],r[e].overloadTable[n.argCount]=n}},Or=(r,e,t)=>{o.hasOwnProperty(r)?((void 0===t||void 0!==o[r].overloadTable&&void 0!==o[r].overloadTable[t])&&hr(`Cannot register public name '${r}' twice`),zr(o,r,r),o[r].overloadTable.hasOwnProperty(t)&&hr(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[r].overloadTable[t]=e):(o[r]=e,o[r].argCount=t)},Br=(r,e)=>{for(var t=[],n=0;n<r;n++)t.push(k[e+4*n>>2]);return t},Ur=(r,e,t)=>{o.hasOwnProperty(r)||mr("Replacing nonexistent public symbol"),void 0!==o[r].overloadTable&&void 0!==t?o[r].overloadTable[t]=e:(o[r]=e,o[r].argCount=t)},Wr=(r,e,t)=>(r=r.replace(/p/g,"i"),(0,o["dynCall_"+r])(e,...t)),Lr=[],Hr=r=>{var e=Lr[r];return e||(r>=Lr.length&&(Lr.length=r+1),Lr[r]=e=Rr.get(r)),e},Ir=(r,e,t=[])=>r.includes("j")?Wr(r,e,t):Hr(e)(...t),Vr=(r,e)=>(...t)=>Ir(r,e,t),qr=(r,e)=>{function t(){return r.includes("j")?Vr(r,e):Hr(e)}r=dr(r);var n=t();return"function"!=typeof n&&hr(`unknown function pointer with signature ${r}: ${e}`),n},Xr=(r,e)=>{var t=Tr(e,function(r){this.name=e,this.message=r;var t=new Error(r).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return t.prototype=Object.create(r.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Gr=r=>{var e=_t(r),t=dr(e);return Pt(e),t},Kr=(r,e)=>{var t=[],n={};function o(r){n[r]||cr[r]||(fr[r]?fr[r].forEach(o):(t.push(r),n[r]=!0))}throw e.forEach(o),new Nr(`${r}: `+t.map(Gr).join([", "]))},Jr=r=>{const e=(r=r.trim()).indexOf("(");return-1!==e?r.substr(0,e):r},Qr=(r,e,t,n,o,a,i,s)=>{var l=Br(e,t);r=dr(r),r=Jr(r),o=qr(n,o),Or(r,function(){Kr(`Cannot call ${r} due to unbound types`,l)},e-1),pr([],l,t=>{var n=[t[0],null].concat(t.slice(1));return Ur(r,xr(r,n,null,o,a),e-1),[]})},Yr=(r,e,t)=>{switch(e){case 1:return t?r=>w[r]:r=>g[r];case 2:return t?r=>y[r>>1]:r=>E[r>>1];case 4:return t?r=>b[r>>2]:r=>k[r>>2];default:throw new TypeError(`invalid integer width (${e}): ${r}`)}},Zr=(r,e,t,n,o)=>{e=dr(e);var a=r=>r;if(0===n){var i=32-8*t;a=r=>r<<i>>>i}var s=e.includes("unsigned"),l=(r,e)=>{};wr(r,{name:e,fromWireType:a,toWireType:s?function(r,e){return l(e,this.name),e>>>0}:function(r,e){return l(e,this.name),e},argPackAdvance:gr,readValueFromPointer:Yr(e,t,0!==n),destructorFunction:null})},re=(r,e,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][e];function o(r){var e=k[r>>2],t=k[r+4>>2];return new n(w.buffer,t,e)}wr(r,{name:t=dr(t),fromWireType:o,argPackAdvance:gr,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})},ee=(r,e,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<r.length;++i){var s=r.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&r.charCodeAt(++i)),s<=127){if(t>=a)break;e[t++]=s}else if(s<=2047){if(t+1>=a)break;e[t++]=192|s>>6,e[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;e[t++]=224|s>>12,e[t++]=128|s>>6&63,e[t++]=128|63&s}else{if(t+3>=a)break;e[t++]=240|s>>18,e[t++]=128|s>>12&63,e[t++]=128|s>>6&63,e[t++]=128|63&s}}return e[t]=0,t-o},te=(r,e,t)=>ee(r,g,e,t),ne=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n<=127?e++:n<=2047?e+=2:n>=55296&&n<=57343?(e+=4,++t):e+=3}return e},oe="undefined"!=typeof TextDecoder?new TextDecoder:void 0,ae=(r,e=0,t=NaN)=>{for(var n=e+t,o=e;r[o]&&!(o>=n);)++o;if(o-e>16&&r.buffer&&oe)return oe.decode(r.subarray(e,o));for(var a="";e<o;){var i=r[e++];if(128&i){var s=63&r[e++];if(192!=(224&i)){var l=63&r[e++];if((i=224==(240&i)?(15&i)<<12|s<<6|l:(7&i)<<18|s<<12|l<<6|63&r[e++])<65536)a+=String.fromCharCode(i);else{var d=i-65536;a+=String.fromCharCode(55296|d>>10,56320|1023&d)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},ie=(r,e)=>r?ae(g,r,e):"",se=(r,e)=>{wr(r,{name:e=dr(e),fromWireType(r){for(var e,t=k[r>>2],n=r+4,o=n,a=0;a<=t;++a){var i=n+a;if(a==t||0==g[i]){var s=ie(o,i-o);void 0===e?e=s:(e+=String.fromCharCode(0),e+=s),o=i+1}}return Pt(r),e},toWireType(r,e){var t;e instanceof ArrayBuffer&&(e=new Uint8Array(e));var n="string"==typeof e;n||e instanceof Uint8Array||e instanceof Uint8ClampedArray||e instanceof Int8Array||hr("Cannot pass non-string to std::string"),t=n?ne(e):e.length;var o=At(4+t+1),a=o+4;if(k[o>>2]=t,n)te(e,a,t+1);else if(n)for(var i=0;i<t;++i){var s=e.charCodeAt(i);s>255&&(Pt(a),hr("String has UTF-16 code units that do not fit in 8 bits")),g[a+i]=s}else for(i=0;i<t;++i)g[a+i]=e[i];return null!==r&&r.push(Pt,o),o},argPackAdvance:gr,readValueFromPointer:$r,destructorFunction(r){Pt(r)}})},le="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,de=(r,e)=>{for(var t=r,n=t>>1,o=n+e/2;!(n>=o)&&E[n];)++n;if((t=n<<1)-r>32&&le)return le.decode(g.subarray(r,t));for(var a="",i=0;!(i>=e/2);++i){var s=y[r+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},ue=(r,e,t)=>{if(t??=2147483647,t<2)return 0;for(var n=e,o=(t-=2)<2*r.length?t/2:r.length,a=0;a<o;++a){var i=r.charCodeAt(a);y[e>>1]=i,e+=2}return y[e>>1]=0,e-n},ce=r=>2*r.length,fe=(r,e)=>{for(var t=0,n="";!(t>=e/4);){var o=b[r+4*t>>2];if(0==o)break;if(++t,o>=65536){var a=o-65536;n+=String.fromCharCode(55296|a>>10,56320|1023&a)}else n+=String.fromCharCode(o)}return n},he=(r,e,t)=>{if(t??=2147483647,t<4)return 0;for(var n=e,o=n+t-4,a=0;a<r.length;++a){var i=r.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&r.charCodeAt(++a)),b[e>>2]=i,(e+=4)+4>o)break}return b[e>>2]=0,e-n},me=r=>{for(var e=0,t=0;t<r.length;++t){var n=r.charCodeAt(t);n>=55296&&n<=57343&&++t,e+=4}return e},pe=(r,e,t)=>{var n,o,a,i;t=dr(t),2===e?(n=de,o=ue,i=ce,a=r=>E[r>>1]):4===e&&(n=fe,o=he,i=me,a=r=>k[r>>2]),wr(r,{name:t,fromWireType:r=>{for(var t,o=k[r>>2],i=r+4,s=0;s<=o;++s){var l=r+4+s*e;if(s==o||0==a(l)){var d=n(i,l-i);void 0===t?t=d:(t+=String.fromCharCode(0),t+=d),i=l+e}}return Pt(r),t},toWireType:(r,n)=>{"string"!=typeof n&&hr(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),s=At(4+a+e);return k[s>>2]=a/e,o(n,s+4,a+e),null!==r&&r.push(Pt,s),s},argPackAdvance:gr,readValueFromPointer:$r,destructorFunction(r){Pt(r)}})},ve=(r,e)=>{wr(r,{isVoid:!0,name:e=dr(e),argPackAdvance:0,fromWireType:()=>{},toWireType:(r,e)=>{}})},we=(r,e,t)=>g.copyWithin(r,e,e+t),ge=(r,e)=>{var t=cr[r];return void 0===t&&hr(`${e} has unknown type ${Gr(r)}`),t},ye=(r,e,t)=>{var n=[],o=r.toWireType(n,t);return n.length&&(k[e>>2]=Pr.toHandle(n)),o},Ee=(r,e,t)=>(r=Pr.toValue(r),e=ge(e,"emval::as"),ye(e,t,r)),be=[],ke=(r,e,t,n)=>(r=be[r])(null,e=Pr.toValue(e),t,n),_e={},Ae=r=>{var e=_e[r];return void 0===e?dr(r):e},Pe=(r,e,t,n,o)=>(r=be[r])(e=Pr.toValue(e),e[t=Ae(t)],n,o),$e=()=>{if("object"==typeof globalThis)return globalThis;function r(r){r.$$$embind_global$$$=r;var e="object"==typeof $$$embind_global$$$&&r.$$$embind_global$$$==r;return e||delete r.$$$embind_global$$$,e}if("object"==typeof $$$embind_global$$$)return $$$embind_global$$$;if("object"==typeof global&&r(global)?$$$embind_global$$$=global:"object"==typeof self&&r(self)&&($$$embind_global$$$=self),"object"==typeof $$$embind_global$$$)return $$$embind_global$$$;throw Error("unable to get global object.")},De=r=>0===r?Pr.toHandle($e()):(r=Ae(r),Pr.toHandle($e()[r])),Fe=r=>{var e=be.length;return be.push(r),e},Se=(r,e)=>{for(var t=new Array(r),n=0;n<r;++n)t[n]=ge(k[e+4*n>>2],"parameter "+n);return t},Ce=Reflect.construct,Te=(r,e,t)=>{var n=Se(r,e),o=n.shift();r--;var a=new Array(r),i=(e,i,s,l)=>{for(var d=0,u=0;u<r;++u)a[u]=n[u].readValueFromPointer(l+d),d+=n[u].argPackAdvance;var c=1===t?Ce(i,a):i.apply(e,a);return ye(o,s,c)},s=`methodCaller<(${n.map(r=>r.name).join(", ")}) => ${o.name}>`;return Fe(Tr(s,i))},Me=r=>(r=Ae(r),Pr.toHandle(o[r])),je=(r,e)=>(r=Pr.toValue(r),e=Pr.toValue(e),Pr.toHandle(r[e])),xe=r=>{r>9&&(br[r+1]+=1)},Re=r=>Pr.toHandle(Ae(r)),Ne=r=>{var e=Pr.toValue(r);Mr(e),kr(r)},ze=(r,e,t,n)=>{var o=(new Date).getFullYear(),a=new Date(o,0,1),i=new Date(o,6,1),s=a.getTimezoneOffset(),l=i.getTimezoneOffset(),d=Math.max(s,l);k[r>>2]=60*d,b[e>>2]=Number(s!=l);var u=r=>{var e=r>=0?"-":"+",t=Math.abs(r);return`UTC${e}${String(Math.floor(t/60)).padStart(2,"0")}${String(t%60).padStart(2,"0")}`},c=u(s),f=u(l);l<s?(te(c,t,17),te(f,n,17)):(te(c,n,17),te(f,t,17))},Oe=()=>2147483648,Be=(r,e)=>Math.ceil(r/e)*e,Ue=r=>{var e=(r-v.buffer.byteLength+65535)/65536|0;try{return v.grow(e),D(),1}catch(t){}},We=r=>{var e=g.length;r>>>=0;var t=Oe();if(r>t)return!1;for(var n=1;n<=4;n*=2){var o=e*(1+.2/n);o=Math.min(o,r+100663296);var a=Math.min(t,Be(Math.max(r,o),65536));if(Ue(a))return!0}return!1},Le={},He=()=>c||"./this.program",Ie=()=>{if(!Ie.strings){var r={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:He()};for(var e in Le)void 0===Le[e]?delete r[e]:r[e]=Le[e];var t=[];for(var e in r)t.push(`${e}=${r[e]}`);Ie.strings=t}return Ie.strings},Ve=(r,e)=>{for(var t=0;t<r.length;++t)w[e++]=r.charCodeAt(t);w[e]=0},qe=(r,e)=>{var t=0;return Ie().forEach((n,o)=>{var a=e+t;k[r+4*o>>2]=a,Ve(n,a),t+=n.length+1}),0},Xe=(r,e)=>{var t=Ie();k[r>>2]=t.length;var n=0;return t.forEach(r=>n+=r.length+1),k[e>>2]=n,0},Ge={isAbs:r=>"/"===r.charAt(0),splitPath:r=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(r).slice(1),normalizeArray:(r,e)=>{for(var t=0,n=r.length-1;n>=0;n--){var o=r[n];"."===o?r.splice(n,1):".."===o?(r.splice(n,1),t++):t&&(r.splice(n,1),t--)}if(e)for(;t;t--)r.unshift("..");return r},normalize:r=>{var e=Ge.isAbs(r),t="/"===r.substr(-1);return(r=Ge.normalizeArray(r.split("/").filter(r=>!!r),!e).join("/"))||e||(r="."),r&&t&&(r+="/"),(e?"/":"")+r},dirname:r=>{var e=Ge.splitPath(r),t=e[0],n=e[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:r=>{if("/"===r)return"/";var e=(r=(r=Ge.normalize(r)).replace(/\/$/,"")).lastIndexOf("/");return-1===e?r:r.substr(e+1)},join:(...r)=>Ge.normalize(r.join("/")),join2:(r,e)=>Ge.normalize(r+"/"+e)},Ke=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return r=>crypto.getRandomValues(r);W("initRandomDevice")},Je=r=>(Je=Ke())(r),Qe={resolve:(...r)=>{for(var e="",t=!1,n=r.length-1;n>=-1&&!t;n--){var o=n>=0?r[n]:ct.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");if(!o)return"";e=o+"/"+e,t=Ge.isAbs(o)}return(t?"/":"")+(e=Ge.normalizeArray(e.split("/").filter(r=>!!r),!t).join("/"))||"."},relative:(r,e)=>{function t(r){for(var e=0;e<r.length&&""===r[e];e++);for(var t=r.length-1;t>=0&&""===r[t];t--);return e>t?[]:r.slice(e,t-e+1)}r=Qe.resolve(r).substr(1),e=Qe.resolve(e).substr(1);for(var n=t(r.split("/")),o=t(e.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var l=[];for(s=i;s<n.length;s++)l.push("..");return(l=l.concat(o.slice(i))).join("/")}},Ye=[];function Ze(r,e,t){var n=ne(r)+1,o=new Array(n),a=ee(r,o,0,o.length);return o.length=a,o}var rt=()=>{if(!Ye.length){var r=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(r=window.prompt("Input: "))&&(r+="\n"),!r)return null;Ye=Ze(r)}return Ye.shift()},et={ttys:[],init(){},shutdown(){},register(r,e){et.ttys[r]={input:[],output:[],ops:e},ct.registerDevice(r,et.stream_ops)},stream_ops:{open(r){var e=et.ttys[r.node.rdev];if(!e)throw new ct.ErrnoError(43);r.tty=e,r.seekable=!1},close(r){r.tty.ops.fsync(r.tty)},fsync(r){r.tty.ops.fsync(r.tty)},read(r,e,t,n,o){if(!r.tty||!r.tty.ops.get_char)throw new ct.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=r.tty.ops.get_char(r.tty)}catch(l){throw new ct.ErrnoError(29)}if(void 0===s&&0===a)throw new ct.ErrnoError(6);if(null==s)break;a++,e[t+i]=s}return a&&(r.node.atime=Date.now()),a},write(r,e,t,n,o){if(!r.tty||!r.tty.ops.put_char)throw new ct.ErrnoError(60);try{for(var a=0;a<n;a++)r.tty.ops.put_char(r.tty,e[t+a])}catch(i){throw new ct.ErrnoError(29)}return n&&(r.node.mtime=r.node.ctime=Date.now()),a}},default_tty_ops:{get_char:r=>rt(),put_char(r,e){null===e||10===e?(m(ae(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(m(ae(r.output)),r.output=[])},ioctl_tcgets:r=>({c_iflag:25856,c_oflag:5,c_cflag:191,c_lflag:35387,c_cc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),ioctl_tcsets:(r,e,t)=>0,ioctl_tiocgwinsz:r=>[24,80]},default_tty1_ops:{put_char(r,e){null===e||10===e?(p(ae(r.output)),r.output=[]):0!=e&&r.output.push(e)},fsync(r){r.output&&r.output.length>0&&(p(ae(r.output)),r.output=[])}}},tt=r=>{W()},nt={ops_table:null,mount:r=>nt.createNode(null,"/",16895,0),createNode(r,e,t,n){if(ct.isBlkdev(t)||ct.isFIFO(t))throw new ct.ErrnoError(63);nt.ops_table||={dir:{node:{getattr:nt.node_ops.getattr,setattr:nt.node_ops.setattr,lookup:nt.node_ops.lookup,mknod:nt.node_ops.mknod,rename:nt.node_ops.rename,unlink:nt.node_ops.unlink,rmdir:nt.node_ops.rmdir,readdir:nt.node_ops.readdir,symlink:nt.node_ops.symlink},stream:{llseek:nt.stream_ops.llseek}},file:{node:{getattr:nt.node_ops.getattr,setattr:nt.node_ops.setattr},stream:{llseek:nt.stream_ops.llseek,read:nt.stream_ops.read,write:nt.stream_ops.write,allocate:nt.stream_ops.allocate,mmap:nt.stream_ops.mmap,msync:nt.stream_ops.msync}},link:{node:{getattr:nt.node_ops.getattr,setattr:nt.node_ops.setattr,readlink:nt.node_ops.readlink},stream:{}},chrdev:{node:{getattr:nt.node_ops.getattr,setattr:nt.node_ops.setattr},stream:ct.chrdev_stream_ops}};var o=ct.createNode(r,e,t,n);return ct.isDir(o.mode)?(o.node_ops=nt.ops_table.dir.node,o.stream_ops=nt.ops_table.dir.stream,o.contents={}):ct.isFile(o.mode)?(o.node_ops=nt.ops_table.file.node,o.stream_ops=nt.ops_table.file.stream,o.usedBytes=0,o.contents=null):ct.isLink(o.mode)?(o.node_ops=nt.ops_table.link.node,o.stream_ops=nt.ops_table.link.stream):ct.isChrdev(o.mode)&&(o.node_ops=nt.ops_table.chrdev.node,o.stream_ops=nt.ops_table.chrdev.stream),o.atime=o.mtime=o.ctime=Date.now(),r&&(r.contents[e]=o,r.atime=r.mtime=r.ctime=o.atime),o},getFileDataAsTypedArray:r=>r.contents?r.contents.subarray?r.contents.subarray(0,r.usedBytes):new Uint8Array(r.contents):new Uint8Array(0),expandFileStorage(r,e){var t=r.contents?r.contents.length:0;if(!(t>=e)){var n=1048576;e=Math.max(e,t*(t<n?2:1.125)>>>0),0!=t&&(e=Math.max(e,256));var o=r.contents;r.contents=new Uint8Array(e),r.usedBytes>0&&r.contents.set(o.subarray(0,r.usedBytes),0)}},resizeFileStorage(r,e){if(r.usedBytes!=e)if(0==e)r.contents=null,r.usedBytes=0;else{var t=r.contents;r.contents=new Uint8Array(e),t&&r.contents.set(t.subarray(0,Math.min(e,r.usedBytes))),r.usedBytes=e}},node_ops:{getattr(r){var e={};return e.dev=ct.isChrdev(r.mode)?r.id:1,e.ino=r.id,e.mode=r.mode,e.nlink=1,e.uid=0,e.gid=0,e.rdev=r.rdev,ct.isDir(r.mode)?e.size=4096:ct.isFile(r.mode)?e.size=r.usedBytes:ct.isLink(r.mode)?e.size=r.link.length:e.size=0,e.atime=new Date(r.atime),e.mtime=new Date(r.mtime),e.ctime=new Date(r.ctime),e.blksize=4096,e.blocks=Math.ceil(e.size/e.blksize),e},setattr(r,e){for(const t of["mode","atime","mtime","ctime"])e[t]&&(r[t]=e[t]);void 0!==e.size&&nt.resizeFileStorage(r,e.size)},lookup(r,e){throw nt.doesNotExistError},mknod:(r,e,t,n)=>nt.createNode(r,e,t,n),rename(r,e,t){var n;try{n=ct.lookupNode(e,t)}catch(a){}if(n){if(ct.isDir(r.mode))for(var o in n.contents)throw new ct.ErrnoError(55);ct.hashRemoveNode(n)}delete r.parent.contents[r.name],e.contents[t]=r,r.name=t,e.ctime=e.mtime=r.parent.ctime=r.parent.mtime=Date.now()},unlink(r,e){delete r.contents[e],r.ctime=r.mtime=Date.now()},rmdir(r,e){var t=ct.lookupNode(r,e);for(var n in t.contents)throw new ct.ErrnoError(55);delete r.contents[e],r.ctime=r.mtime=Date.now()},readdir:r=>[".","..",...Object.keys(r.contents)],symlink(r,e,t){var n=nt.createNode(r,e,41471,0);return n.link=t,n},readlink(r){if(!ct.isLink(r.mode))throw new ct.ErrnoError(28);return r.link}},stream_ops:{read(r,e,t,n,o){var a=r.node.contents;if(o>=r.node.usedBytes)return 0;var i=Math.min(r.node.usedBytes-o,n);if(i>8&&a.subarray)e.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)e[t+s]=a[o+s];return i},write(r,e,t,n,o,a){if(e.buffer===w.buffer&&(a=!1),!n)return 0;var i=r.node;if(i.mtime=i.ctime=Date.now(),e.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=e.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=e.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(e.subarray(t,t+n),o),n}if(nt.expandFileStorage(i,o+n),i.contents.subarray&&e.subarray)i.contents.set(e.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=e[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(r,e,t){var n=e;if(1===t?n+=r.position:2===t&&ct.isFile(r.node.mode)&&(n+=r.node.usedBytes),n<0)throw new ct.ErrnoError(28);return n},allocate(r,e,t){nt.expandFileStorage(r.node,e+t),r.node.usedBytes=Math.max(r.node.usedBytes,e+t)},mmap(r,e,t,n,o){if(!ct.isFile(r.node.mode))throw new ct.ErrnoError(43);var a,i,s=r.node.contents;if(2&o||!s||s.buffer!==w.buffer){if(i=!0,!(a=tt()))throw new ct.ErrnoError(48);s&&((t>0||t+e<s.length)&&(s=s.subarray?s.subarray(t,t+e):Array.prototype.slice.call(s,t,t+e)),w.set(s,a))}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(r,e,t,n,o)=>(nt.stream_ops.write(r,e,0,n,t,!1),0)}},ot=async r=>{var e=await l(r);return new Uint8Array(e)},at=(r,e,t,n,o,a)=>{ct.createDataFile(r,e,t,n,o,a)},it=o.preloadPlugins||[],st=(r,e,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return it.forEach(a=>{o||a.canHandle(e)&&(a.handle(r,e,t,n),o=!0)}),o},lt=(r,e,t,n,o,a,i,s,l,d)=>{var u=e?Qe.resolve(Ge.join2(r,e)):r;function c(t){function c(t){d?.(),s||at(r,e,t,n,o,l),a?.(),U()}st(t,u,c,()=>{i?.(),U()})||c(t)}B(),"string"==typeof t?ot(t).then(c,i):c(t)},dt=r=>{var e={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[r];if(void 0===e)throw new Error(`Unknown file open mode: ${r}`);return e},ut=(r,e)=>{var t=0;return r&&(t|=365),e&&(t|=146),t},ct={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:class{name="ErrnoError";constructor(r){this.errno=r}},filesystems:null,syncFSRequests:0,readFiles:{},FSStream:class{shared={};get object(){return this.node}set object(r){this.node=r}get isRead(){return 1!=(2097155&this.flags)}get isWrite(){return!!(2097155&this.flags)}get isAppend(){return 1024&this.flags}get flags(){return this.shared.flags}set flags(r){this.shared.flags=r}get position(){return this.shared.position}set position(r){this.shared.position=r}},FSNode:class{node_ops={};stream_ops={};readMode=365;writeMode=146;mounted=null;constructor(r,e,t,n){r||(r=this),this.parent=r,this.mount=r.mount,this.id=ct.nextInode++,this.name=e,this.mode=t,this.rdev=n,this.atime=this.mtime=this.ctime=Date.now()}get read(){return(this.mode&this.readMode)===this.readMode}set read(r){r?this.mode|=this.readMode:this.mode&=~this.readMode}get write(){return(this.mode&this.writeMode)===this.writeMode}set write(r){r?this.mode|=this.writeMode:this.mode&=~this.writeMode}get isFolder(){return ct.isDir(this.mode)}get isDevice(){return ct.isChrdev(this.mode)}},lookupPath(r,e={}){if(!r)return{path:"",node:null};e.follow_mount??=!0,Ge.isAbs(r)||(r=ct.cwd()+"/"+r);r:for(var t=0;t<40;t++){for(var n=r.split("/").filter(r=>!!r&&"."!==r),o=ct.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&e.parent)break;if(".."!==n[i]){a=Ge.join2(a,n[i]);try{o=ct.lookupNode(o,n[i])}catch(d){if(44===d?.errno&&s&&e.noent_okay)return{path:a};throw d}if(!ct.isMountpoint(o)||s&&!e.follow_mount||(o=o.mounted.root),ct.isLink(o.mode)&&(!s||e.follow)){if(!o.node_ops.readlink)throw new ct.ErrnoError(52);var l=o.node_ops.readlink(o);Ge.isAbs(l)||(l=Ge.dirname(a)+"/"+l),r=l+"/"+n.slice(i+1).join("/");continue r}}else a=Ge.dirname(a),o=o.parent}return{path:a,node:o}}throw new ct.ErrnoError(32)},getPath(r){for(var e;;){if(ct.isRoot(r)){var t=r.mount.mountpoint;return e?"/"!==t[t.length-1]?`${t}/${e}`:t+e:t}e=e?`${r.name}/${e}`:r.name,r=r.parent}},hashName(r,e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n)|0;return(r+t>>>0)%ct.nameTable.length},hashAddNode(r){var e=ct.hashName(r.parent.id,r.name);r.name_next=ct.nameTable[e],ct.nameTable[e]=r},hashRemoveNode(r){var e=ct.hashName(r.parent.id,r.name);if(ct.nameTable[e]===r)ct.nameTable[e]=r.name_next;else for(var t=ct.nameTable[e];t;){if(t.name_next===r){t.name_next=r.name_next;break}t=t.name_next}},lookupNode(r,e){var t=ct.mayLookup(r);if(t)throw new ct.ErrnoError(t);for(var n=ct.hashName(r.id,e),o=ct.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===r.id&&a===e)return o}return ct.lookup(r,e)},createNode(r,e,t,n){var o=new ct.FSNode(r,e,t,n);return ct.hashAddNode(o),o},destroyNode(r){ct.hashRemoveNode(r)},isRoot:r=>r===r.parent,isMountpoint:r=>!!r.mounted,isFile:r=>32768==(61440&r),isDir:r=>16384==(61440&r),isLink:r=>40960==(61440&r),isChrdev:r=>8192==(61440&r),isBlkdev:r=>24576==(61440&r),isFIFO:r=>4096==(61440&r),isSocket:r=>!(49152&~r),flagsToPermissionString(r){var e=["r","w","rw"][3&r];return 512&r&&(e+="w"),e},nodePermissions:(r,e)=>ct.ignorePermissions||(!e.includes("r")||292&r.mode)&&(!e.includes("w")||146&r.mode)&&(!e.includes("x")||73&r.mode)?0:2,mayLookup(r){if(!ct.isDir(r.mode))return 54;var e=ct.nodePermissions(r,"x");return e||(r.node_ops.lookup?0:2)},mayCreate(r,e){if(!ct.isDir(r.mode))return 54;try{return ct.lookupNode(r,e),20}catch(t){}return ct.nodePermissions(r,"wx")},mayDelete(r,e,t){var n;try{n=ct.lookupNode(r,e)}catch(a){return a.errno}var o=ct.nodePermissions(r,"wx");if(o)return o;if(t){if(!ct.isDir(n.mode))return 54;if(ct.isRoot(n)||ct.getPath(n)===ct.cwd())return 10}else if(ct.isDir(n.mode))return 31;return 0},mayOpen:(r,e)=>r?ct.isLink(r.mode)?32:ct.isDir(r.mode)&&("r"!==ct.flagsToPermissionString(e)||512&e)?31:ct.nodePermissions(r,ct.flagsToPermissionString(e)):44,MAX_OPEN_FDS:4096,nextfd(){for(var r=0;r<=ct.MAX_OPEN_FDS;r++)if(!ct.streams[r])return r;throw new ct.ErrnoError(33)},getStreamChecked(r){var e=ct.getStream(r);if(!e)throw new ct.ErrnoError(8);return e},getStream:r=>ct.streams[r],createStream:(r,e=-1)=>(r=Object.assign(new ct.FSStream,r),-1==e&&(e=ct.nextfd()),r.fd=e,ct.streams[e]=r,r),closeStream(r){ct.streams[r]=null},dupStream(r,e=-1){var t=ct.createStream(r,e);return t.stream_ops?.dup?.(t),t},chrdev_stream_ops:{open(r){var e=ct.getDevice(r.node.rdev);r.stream_ops=e.stream_ops,r.stream_ops.open?.(r)},llseek(){throw new ct.ErrnoError(70)}},major:r=>r>>8,minor:r=>255&r,makedev:(r,e)=>r<<8|e,registerDevice(r,e){ct.devices[r]={stream_ops:e}},getDevice:r=>ct.devices[r],getMounts(r){for(var e=[],t=[r];t.length;){var n=t.pop();e.push(n),t.push(...n.mounts)}return e},syncfs(r,e){"function"==typeof r&&(e=r,r=!1),ct.syncFSRequests++,ct.syncFSRequests>1&&p(`warning: ${ct.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=ct.getMounts(ct.root.mount),n=0;function o(r){return ct.syncFSRequests--,e(r)}function a(r){if(r)return a.errored?void 0:(a.errored=!0,o(r));++n>=t.length&&o(null)}t.forEach(e=>{if(!e.type.syncfs)return a(null);e.type.syncfs(e,r,a)})},mount(r,e,t){var n,o="/"===t,a=!t;if(o&&ct.root)throw new ct.ErrnoError(10);if(!o&&!a){var i=ct.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,ct.isMountpoint(n))throw new ct.ErrnoError(10);if(!ct.isDir(n.mode))throw new ct.ErrnoError(54)}var s={type:r,opts:e,mountpoint:t,mounts:[]},l=r.mount(s);return l.mount=s,s.root=l,o?ct.root=l:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),l},unmount(r){var e=ct.lookupPath(r,{follow_mount:!1});if(!ct.isMountpoint(e.node))throw new ct.ErrnoError(28);var t=e.node,n=t.mounted,o=ct.getMounts(n);Object.keys(ct.nameTable).forEach(r=>{for(var e=ct.nameTable[r];e;){var t=e.name_next;o.includes(e.mount)&&ct.destroyNode(e),e=t}}),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(r,e)=>r.node_ops.lookup(r,e),mknod(r,e,t){var n=ct.lookupPath(r,{parent:!0}).node,o=Ge.basename(r);if(!o||"."===o||".."===o)throw new ct.ErrnoError(28);var a=ct.mayCreate(n,o);if(a)throw new ct.ErrnoError(a);if(!n.node_ops.mknod)throw new ct.ErrnoError(63);return n.node_ops.mknod(n,o,e,t)},statfs(r){var e={bsize:4096,frsize:4096,blocks:1e6,bfree:5e5,bavail:5e5,files:ct.nextInode,ffree:ct.nextInode-1,fsid:42,flags:2,namelen:255},t=ct.lookupPath(r,{follow:!0}).node;return t?.node_ops.statfs&&Object.assign(e,t.node_ops.statfs(t.mount.opts.root)),e},create:(r,e=438)=>(e&=4095,e|=32768,ct.mknod(r,e,0)),mkdir:(r,e=511)=>(e&=1023,e|=16384,ct.mknod(r,e,0)),mkdirTree(r,e){for(var t=r.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{ct.mkdir(n,e)}catch(a){if(20!=a.errno)throw a}}},mkdev:(r,e,t)=>(void 0===t&&(t=e,e=438),e|=8192,ct.mknod(r,e,t)),symlink(r,e){if(!Qe.resolve(r))throw new ct.ErrnoError(44);var t=ct.lookupPath(e,{parent:!0}).node;if(!t)throw new ct.ErrnoError(44);var n=Ge.basename(e),o=ct.mayCreate(t,n);if(o)throw new ct.ErrnoError(o);if(!t.node_ops.symlink)throw new ct.ErrnoError(63);return t.node_ops.symlink(t,n,r)},rename(r,e){var t,n,o=Ge.dirname(r),a=Ge.dirname(e),i=Ge.basename(r),s=Ge.basename(e);if(t=ct.lookupPath(r,{parent:!0}).node,n=ct.lookupPath(e,{parent:!0}).node,!t||!n)throw new ct.ErrnoError(44);if(t.mount!==n.mount)throw new ct.ErrnoError(75);var l,d=ct.lookupNode(t,i),u=Qe.relative(r,a);if("."!==u.charAt(0))throw new ct.ErrnoError(28);if("."!==(u=Qe.relative(e,o)).charAt(0))throw new ct.ErrnoError(55);try{l=ct.lookupNode(n,s)}catch(h){}if(d!==l){var c=ct.isDir(d.mode),f=ct.mayDelete(t,i,c);if(f)throw new ct.ErrnoError(f);if(f=l?ct.mayDelete(n,s,c):ct.mayCreate(n,s))throw new ct.ErrnoError(f);if(!t.node_ops.rename)throw new ct.ErrnoError(63);if(ct.isMountpoint(d)||l&&ct.isMountpoint(l))throw new ct.ErrnoError(10);if(n!==t&&(f=ct.nodePermissions(t,"w")))throw new ct.ErrnoError(f);ct.hashRemoveNode(d);try{t.node_ops.rename(d,n,s),d.parent=n}catch(h){throw h}finally{ct.hashAddNode(d)}}},rmdir(r){var e=ct.lookupPath(r,{parent:!0}).node,t=Ge.basename(r),n=ct.lookupNode(e,t),o=ct.mayDelete(e,t,!0);if(o)throw new ct.ErrnoError(o);if(!e.node_ops.rmdir)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);e.node_ops.rmdir(e,t),ct.destroyNode(n)},readdir(r){var e=ct.lookupPath(r,{follow:!0}).node;if(!e.node_ops.readdir)throw new ct.ErrnoError(54);return e.node_ops.readdir(e)},unlink(r){var e=ct.lookupPath(r,{parent:!0}).node;if(!e)throw new ct.ErrnoError(44);var t=Ge.basename(r),n=ct.lookupNode(e,t),o=ct.mayDelete(e,t,!1);if(o)throw new ct.ErrnoError(o);if(!e.node_ops.unlink)throw new ct.ErrnoError(63);if(ct.isMountpoint(n))throw new ct.ErrnoError(10);e.node_ops.unlink(e,t),ct.destroyNode(n)},readlink(r){var e=ct.lookupPath(r).node;if(!e)throw new ct.ErrnoError(44);if(!e.node_ops.readlink)throw new ct.ErrnoError(28);return e.node_ops.readlink(e)},stat(r,e){var t=ct.lookupPath(r,{follow:!e}).node;if(!t)throw new ct.ErrnoError(44);if(!t.node_ops.getattr)throw new ct.ErrnoError(63);return t.node_ops.getattr(t)},lstat:r=>ct.stat(r,!0),chmod(r,e,t){var n;if(!(n="string"==typeof r?ct.lookupPath(r,{follow:!t}).node:r).node_ops.setattr)throw new ct.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&e|-4096&n.mode,ctime:Date.now()})},lchmod(r,e){ct.chmod(r,e,!0)},fchmod(r,e){var t=ct.getStreamChecked(r);ct.chmod(t.node,e)},chown(r,e,t,n){var o;if(!(o="string"==typeof r?ct.lookupPath(r,{follow:!n}).node:r).node_ops.setattr)throw new ct.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(r,e,t){ct.chown(r,e,t,!0)},fchown(r,e,t){var n=ct.getStreamChecked(r);ct.chown(n.node,e,t)},truncate(r,e){if(e<0)throw new ct.ErrnoError(28);var t;if(!(t="string"==typeof r?ct.lookupPath(r,{follow:!0}).node:r).node_ops.setattr)throw new ct.ErrnoError(63);if(ct.isDir(t.mode))throw new ct.ErrnoError(31);if(!ct.isFile(t.mode))throw new ct.ErrnoError(28);var n=ct.nodePermissions(t,"w");if(n)throw new ct.ErrnoError(n);t.node_ops.setattr(t,{size:e,timestamp:Date.now()})},ftruncate(r,e){var t=ct.getStreamChecked(r);if(!(2097155&t.flags))throw new ct.ErrnoError(28);ct.truncate(t.node,e)},utime(r,e,t){var n=ct.lookupPath(r,{follow:!0}).node;n.node_ops.setattr(n,{atime:e,mtime:t})},open(r,e,t=438){if(""===r)throw new ct.ErrnoError(44);var n;if(t=64&(e="string"==typeof e?dt(e):e)?4095&t|32768:0,"object"==typeof r)n=r;else{var a=ct.lookupPath(r,{follow:!(131072&e),noent_okay:!0});n=a.node,r=a.path}var i=!1;if(64&e)if(n){if(128&e)throw new ct.ErrnoError(20)}else n=ct.mknod(r,t,0),i=!0;if(!n)throw new ct.ErrnoError(44);if(ct.isChrdev(n.mode)&&(e&=-513),65536&e&&!ct.isDir(n.mode))throw new ct.ErrnoError(54);if(!i){var s=ct.mayOpen(n,e);if(s)throw new ct.ErrnoError(s)}512&e&&!i&&ct.truncate(n,0),e&=-131713;var l=ct.createStream({node:n,path:ct.getPath(n),flags:e,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return l.stream_ops.open&&l.stream_ops.open(l),!o.logReadFiles||1&e||r in ct.readFiles||(ct.readFiles[r]=1),l},close(r){if(ct.isClosed(r))throw new ct.ErrnoError(8);r.getdents&&(r.getdents=null);try{r.stream_ops.close&&r.stream_ops.close(r)}catch(e){throw e}finally{ct.closeStream(r.fd)}r.fd=null},isClosed:r=>null===r.fd,llseek(r,e,t){if(ct.isClosed(r))throw new ct.ErrnoError(8);if(!r.seekable||!r.stream_ops.llseek)throw new ct.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new ct.ErrnoError(28);return r.position=r.stream_ops.llseek(r,e,t),r.ungotten=[],r.position},read(r,e,t,n,o){if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(r))throw new ct.ErrnoError(8);if(1==(2097155&r.flags))throw new ct.ErrnoError(8);if(ct.isDir(r.node.mode))throw new ct.ErrnoError(31);if(!r.stream_ops.read)throw new ct.ErrnoError(28);var a=void 0!==o;if(a){if(!r.seekable)throw new ct.ErrnoError(70)}else o=r.position;var i=r.stream_ops.read(r,e,t,n,o);return a||(r.position+=i),i},write(r,e,t,n,o,a){if(n<0||o<0)throw new ct.ErrnoError(28);if(ct.isClosed(r))throw new ct.ErrnoError(8);if(!(2097155&r.flags))throw new ct.ErrnoError(8);if(ct.isDir(r.node.mode))throw new ct.ErrnoError(31);if(!r.stream_ops.write)throw new ct.ErrnoError(28);r.seekable&&1024&r.flags&&ct.llseek(r,0,2);var i=void 0!==o;if(i){if(!r.seekable)throw new ct.ErrnoError(70)}else o=r.position;var s=r.stream_ops.write(r,e,t,n,o,a);return i||(r.position+=s),s},allocate(r,e,t){if(ct.isClosed(r))throw new ct.ErrnoError(8);if(e<0||t<=0)throw new ct.ErrnoError(28);if(!(2097155&r.flags))throw new ct.ErrnoError(8);if(!ct.isFile(r.node.mode)&&!ct.isDir(r.node.mode))throw new ct.ErrnoError(43);if(!r.stream_ops.allocate)throw new ct.ErrnoError(138);r.stream_ops.allocate(r,e,t)},mmap(r,e,t,n,o){if(2&n&&!(2&o)&&2!=(2097155&r.flags))throw new ct.ErrnoError(2);if(1==(2097155&r.flags))throw new ct.ErrnoError(2);if(!r.stream_ops.mmap)throw new ct.ErrnoError(43);if(!e)throw new ct.ErrnoError(28);return r.stream_ops.mmap(r,e,t,n,o)},msync:(r,e,t,n,o)=>r.stream_ops.msync?r.stream_ops.msync(r,e,t,n,o):0,ioctl(r,e,t){if(!r.stream_ops.ioctl)throw new ct.ErrnoError(59);return r.stream_ops.ioctl(r,e,t)},readFile(r,e={}){if(e.flags=e.flags||0,e.encoding=e.encoding||"binary","utf8"!==e.encoding&&"binary"!==e.encoding)throw new Error(`Invalid encoding type "${e.encoding}"`);var t,n=ct.open(r,e.flags),o=ct.stat(r).size,a=new Uint8Array(o);return ct.read(n,a,0,o,0),"utf8"===e.encoding?t=ae(a):"binary"===e.encoding&&(t=a),ct.close(n),t},writeFile(r,e,t={}){t.flags=t.flags||577;var n=ct.open(r,t.flags,t.mode);if("string"==typeof e){var o=new Uint8Array(ne(e)+1),a=ee(e,o,0,o.length);ct.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(e))throw new Error("Unsupported data type");ct.write(n,e,0,e.byteLength,void 0,t.canOwn)}ct.close(n)},cwd:()=>ct.currentPath,chdir(r){var e=ct.lookupPath(r,{follow:!0});if(null===e.node)throw new ct.ErrnoError(44);if(!ct.isDir(e.node.mode))throw new ct.ErrnoError(54);var t=ct.nodePermissions(e.node,"x");if(t)throw new ct.ErrnoError(t);ct.currentPath=e.path},createDefaultDirectories(){ct.mkdir("/tmp"),ct.mkdir("/home"),ct.mkdir("/home/web_user")},createDefaultDevices(){ct.mkdir("/dev"),ct.registerDevice(ct.makedev(1,3),{read:()=>0,write:(r,e,t,n,o)=>n,llseek:()=>0}),ct.mkdev("/dev/null",ct.makedev(1,3)),et.register(ct.makedev(5,0),et.default_tty_ops),et.register(ct.makedev(6,0),et.default_tty1_ops),ct.mkdev("/dev/tty",ct.makedev(5,0)),ct.mkdev("/dev/tty1",ct.makedev(6,0));var r=new Uint8Array(1024),e=0,t=()=>(0===e&&(e=Je(r).byteLength),r[--e]);ct.createDevice("/dev","random",t),ct.createDevice("/dev","urandom",t),ct.mkdir("/dev/shm"),ct.mkdir("/dev/shm/tmp")},createSpecialDirectories(){ct.mkdir("/proc");var r=ct.mkdir("/proc/self");ct.mkdir("/proc/self/fd"),ct.mount({mount(){var e=ct.createNode(r,"fd",16895,73);return e.stream_ops={llseek:nt.stream_ops.llseek},e.node_ops={lookup(r,e){var t=+e,n=ct.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path},id:t+1};return o.parent=o,o},readdir:()=>Array.from(ct.streams.entries()).filter(([r,e])=>e).map(([r,e])=>r.toString())},e}},{},"/proc/self/fd")},createStandardStreams(r,e,t){r?ct.createDevice("/dev","stdin",r):ct.symlink("/dev/tty","/dev/stdin"),e?ct.createDevice("/dev","stdout",null,e):ct.symlink("/dev/tty","/dev/stdout"),t?ct.createDevice("/dev","stderr",null,t):ct.symlink("/dev/tty1","/dev/stderr"),ct.open("/dev/stdin",0),ct.open("/dev/stdout",1),ct.open("/dev/stderr",1)},staticInit(){ct.nameTable=new Array(4096),ct.mount(nt,{},"/"),ct.createDefaultDirectories(),ct.createDefaultDevices(),ct.createSpecialDirectories(),ct.filesystems={MEMFS:nt}},init(r,e,t){ct.initialized=!0,r??=o.stdin,e??=o.stdout,t??=o.stderr,ct.createStandardStreams(r,e,t)},quit(){ct.initialized=!1;for(var r=0;r<ct.streams.length;r++){var e=ct.streams[r];e&&ct.close(e)}},findObject(r,e){var t=ct.analyzePath(r,e);return t.exists?t.object:null},analyzePath(r,e){try{r=(n=ct.lookupPath(r,{follow:!e})).path}catch(o){}var t={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=ct.lookupPath(r,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=Ge.basename(r),n=ct.lookupPath(r,{follow:!e}),t.exists=!0,t.path=n.path,t.object=n.node,t.name=n.node.name,t.isRoot="/"===n.path}catch(o){t.error=o.errno}return t},createPath(r,e,t,n){r="string"==typeof r?r:ct.getPath(r);for(var o=e.split("/").reverse();o.length;){var a=o.pop();if(a){var i=Ge.join2(r,a);try{ct.mkdir(i)}catch(s){}r=i}}return i},createFile(r,e,t,n,o){var a=Ge.join2("string"==typeof r?r:ct.getPath(r),e),i=ut(n,o);return ct.create(a,i)},createDataFile(r,e,t,n,o,a){var i=e;r&&(r="string"==typeof r?r:ct.getPath(r),i=e?Ge.join2(r,e):r);var s=ut(n,o),l=ct.create(i,s);if(t){if("string"==typeof t){for(var d=new Array(t.length),u=0,c=t.length;u<c;++u)d[u]=t.charCodeAt(u);t=d}ct.chmod(l,146|s);var f=ct.open(l,577);ct.write(f,t,0,t.length,0,a),ct.close(f),ct.chmod(l,s)}},createDevice(r,e,t,n){var o=Ge.join2("string"==typeof r?r:ct.getPath(r),e),a=ut(!!t,!!n);ct.createDevice.major??=64;var i=ct.makedev(ct.createDevice.major++,0);return ct.registerDevice(i,{open(r){r.seekable=!1},close(r){n?.buffer?.length&&n(10)},read(r,e,n,o,a){for(var i=0,s=0;s<o;s++){var l;try{l=t()}catch(d){throw new ct.ErrnoError(29)}if(void 0===l&&0===i)throw new ct.ErrnoError(6);if(null==l)break;i++,e[n+s]=l}return i&&(r.node.atime=Date.now()),i},write(r,e,t,o,a){for(var i=0;i<o;i++)try{n(e[t+i])}catch(s){throw new ct.ErrnoError(29)}return o&&(r.node.mtime=r.node.ctime=Date.now()),i}}),ct.mkdev(o,a,i)},forceLoadFile(r){if(r.isDevice||r.isFolder||r.link||r.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");try{r.contents=d(r.url),r.usedBytes=r.contents.length}catch(e){throw new ct.ErrnoError(29)}},createLazyFile(r,e,t,n,o){class a{lengthKnown=!1;chunks=[];get(r){if(!(r>this.length-1||r<0)){var e=r%this.chunkSize,t=r/this.chunkSize|0;return this.getter(t)[e]}}setDataGetter(r){this.getter=r}cacheLength(){var r=new XMLHttpRequest;if(r.open("HEAD",t,!1),r.send(null),!(r.status>=200&&r.status<300||304===r.status))throw new Error("Couldn't load "+t+". Status: "+r.status);var e,n=Number(r.getResponseHeader("Content-length")),o=(e=r.getResponseHeader("Accept-Ranges"))&&"bytes"===e,a=(e=r.getResponseHeader("Content-Encoding"))&&"gzip"===e,i=1048576;o||(i=n);var s=(r,e)=>{if(r>e)throw new Error("invalid range ("+r+", "+e+") or no bytes requested!");if(e>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",t,!1),n!==i&&o.setRequestHeader("Range","bytes="+r+"-"+e),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+t+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):Ze(o.responseText||"")},l=this;l.setDataGetter(r=>{var e=r*i,t=(r+1)*i-1;if(t=Math.min(t,n-1),void 0===l.chunks[r]&&(l.chunks[r]=s(e,t)),void 0===l.chunks[r])throw new Error("doXHR failed!");return l.chunks[r]}),!a&&n||(i=n=1,n=this.getter(0).length,i=n,m("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0}get length(){return this.lengthKnown||this.cacheLength(),this._length}get chunkSize(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}if("undefined"!=typeof XMLHttpRequest){if(!s)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,contents:new a}}else i={isDevice:!1,url:t};var l=ct.createFile(r,e,i,n,o);i.contents?l.contents=i.contents:i.url&&(l.contents=null,l.url=i.url),Object.defineProperties(l,{usedBytes:{get:function(){return this.contents.length}}});var d={};function u(r,e,t,n,o){var a=r.node.contents;if(o>=a.length)return 0;var i=Math.min(a.length-o,n);if(a.slice)for(var s=0;s<i;s++)e[t+s]=a[o+s];else for(s=0;s<i;s++)e[t+s]=a.get(o+s);return i}return Object.keys(l.stream_ops).forEach(r=>{var e=l.stream_ops[r];d[r]=(...r)=>(ct.forceLoadFile(l),e(...r))}),d.read=(r,e,t,n,o)=>(ct.forceLoadFile(l),u(r,e,t,n,o)),d.mmap=(r,e,t,n,o)=>{ct.forceLoadFile(l);var a=tt();if(!a)throw new ct.ErrnoError(48);return u(r,w,a,e,t),{ptr:a,allocated:!0}},l.stream_ops=d,l}},ft={DEFAULT_POLLMASK:5,calculateAt(r,e,t){if(Ge.isAbs(e))return e;var n;if(n=-100===r?ct.cwd():ft.getStreamFromFD(r).path,0==e.length){if(!t)throw new ct.ErrnoError(44);return n}return n+"/"+e},doStat(r,e,t){var n=r(e);b[t>>2]=n.dev,b[t+4>>2]=n.mode,k[t+8>>2]=n.nlink,b[t+12>>2]=n.uid,b[t+16>>2]=n.gid,b[t+20>>2]=n.rdev,I=[n.size>>>0,(H=n.size,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],b[t+24>>2]=I[0],b[t+28>>2]=I[1],b[t+32>>2]=4096,b[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return I=[Math.floor(o/1e3)>>>0,(H=Math.floor(o/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],b[t+40>>2]=I[0],b[t+44>>2]=I[1],k[t+48>>2]=o%1e3*1e3*1e3,I=[Math.floor(a/1e3)>>>0,(H=Math.floor(a/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],b[t+56>>2]=I[0],b[t+60>>2]=I[1],k[t+64>>2]=a%1e3*1e3*1e3,I=[Math.floor(i/1e3)>>>0,(H=Math.floor(i/1e3),+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],b[t+72>>2]=I[0],b[t+76>>2]=I[1],k[t+80>>2]=i%1e3*1e3*1e3,I=[n.ino>>>0,(H=n.ino,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],b[t+88>>2]=I[0],b[t+92>>2]=I[1],0},doMsync(r,e,t,n,o){if(!ct.isFile(e.node.mode))throw new ct.ErrnoError(43);if(2&n)return 0;var a=g.slice(r,r+t);ct.msync(e,a,o,t,n)},getStreamFromFD:r=>ct.getStreamChecked(r),varargs:void 0,getStr:r=>ie(r)};function ht(r){try{var e=ft.getStreamFromFD(r);return ct.close(e),0}catch(t){if(void 0===ct||"ErrnoError"!==t.name)throw t;return t.errno}}var mt=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=k[e>>2],s=k[e+4>>2];e+=8;var l=ct.read(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function pt(r,e,t,n){try{var o=ft.getStreamFromFD(r),a=mt(o,e,t);return k[n>>2]=a,0}catch(i){if(void 0===ct||"ErrnoError"!==i.name)throw i;return i.errno}}var vt=(r,e)=>e+2097152>>>0<4194305-!!r?(r>>>0)+4294967296*e:NaN;function wt(r,e,t,n,o){var a=vt(e,t);try{if(isNaN(a))return 61;var i=ft.getStreamFromFD(r);return ct.llseek(i,a,n),I=[i.position>>>0,(H=i.position,+Math.abs(H)>=1?H>0?+Math.floor(H/4294967296)>>>0:~~+Math.ceil((H-+(~~H>>>0))/4294967296)>>>0:0)],b[o>>2]=I[0],b[o+4>>2]=I[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===ct||"ErrnoError"!==s.name)throw s;return s.errno}}var gt=(r,e,t,n)=>{for(var o=0,a=0;a<t;a++){var i=k[e>>2],s=k[e+4>>2];e+=8;var l=ct.write(r,w,i,s,n);if(l<0)return-1;if(o+=l,l<s)break}return o};function yt(r,e,t,n){try{var o=ft.getStreamFromFD(r),a=gt(o,e,t);return k[n>>2]=a,0}catch(i){if(void 0===ct||"ErrnoError"!==i.name)throw i;return i.errno}}lr(),nr=o.BindingError=class extends Error{constructor(r){super(r),this.name="BindingError"}},or=o.InternalError=class extends Error{constructor(r){super(r),this.name="InternalError"}},Ar(),Nr=o.UnboundTypeError=Xr(Error,"UnboundTypeError"),ct.createPreloadedFile=lt,ct.staticInit(),nt.doesNotExistError=new ct.ErrnoError(44),nt.doesNotExistError.stack="<generic error, no stack>";var Et,bt={q:ar,w:ir,s:sr,D:yr,B:Fr,p:Cr,i:Qr,c:Zr,a:re,C:se,j:pe,E:ve,A:we,n:Ee,l:ke,k:Pe,b:kr,F:De,g:Te,m:Me,e:je,h:xe,f:Re,d:Ne,t:ze,z:We,u:qe,v:Xe,x:ht,y:pt,r:wt,o:yt};Z();var kt,_t=r=>(_t=Et.I)(r),At=r=>(At=Et.K)(r),Pt=r=>(Pt=Et.L)(r);function $t(){function r(){kt||(kt=!0,o.calledRun=!0,$||(M(),t(o),o.onRuntimeInitialized?.(),j()))}z>0||(T(),z>0||(o.setStatus?(o.setStatus("Running..."),setTimeout(()=>{setTimeout(()=>o.setStatus(""),1),r()},1)):r()))}if(o.dynCall_jiji=(r,e,t,n,a)=>(o.dynCall_jiji=Et.M)(r,e,t,n,a),o.dynCall_viijii=(r,e,t,n,a,i,s)=>(o.dynCall_viijii=Et.N)(r,e,t,n,a,i,s),o.dynCall_iiiiij=(r,e,t,n,a,i,s)=>(o.dynCall_iiiiij=Et.O)(r,e,t,n,a,i,s),o.dynCall_iiiiijj=(r,e,t,n,a,i,s,l,d)=>(o.dynCall_iiiiijj=Et.P)(r,e,t,n,a,i,s,l,d),o.dynCall_iiiiiijj=(r,e,t,n,a,i,s,l,d,u)=>(o.dynCall_iiiiiijj=Et.Q)(r,e,t,n,a,i,s,l,d,u),O=function r(){kt||$t(),kt||(O=r)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return $t(),a});export{e as default};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.42";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.44";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{len as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import t from"../Extent.js";import{create as r}from"./aaBoundingRect.js";import{newDoubleArray as a}from"./DoubleArray.js";function i(n){return n}function u(n=en){return i([n[0],n[1],n[2],n[3],n[4],n[5]])}function e(n,t){for(let r=0;r<6;r++)n[r]=t[r]}function m(n,t,r,a,i,e,m=u()){return m[0]=n,m[1]=t,m[2]=r,m[3]=a,m[4]=i,m[5]=e,m}function o(n,t=u()){return t[0]=n.xmin,t[1]=n.ymin,t[2]=n.hasZ?n.zmin:-1/0,t[3]=n.xmax,t[4]=n.ymax,t[5]=n.hasZ?n.zmax:1/0,t}function f(n,t=u()){return c(n,0,n.length/3,t)}function c(n,t,r,a=u()){return L(a,un),g(a,n,t,r),a}function h(n){n[0]=1/0,n[1]=1/0,n[2]=1/0,n[3]=-1/0,n[4]=-1/0,n[5]=-1/0}function M(n,t){for(let r=0;r<6;r++)if(n[r]!==t[r])return!1;return!0}function x(n){return!(n[0]<=n[3]&&n[1]<=n[4]&&n[2]<=n[5])}function l(n,t=a(24)){const[r,i,u,e,m,o]=n;return t[0]=r,t[1]=i,t[2]=u,t[3]=r,t[4]=i,t[5]=o,t[6]=r,t[7]=m,t[8]=u,t[9]=r,t[10]=m,t[11]=o,t[12]=e,t[13]=i,t[14]=u,t[15]=e,t[16]=i,t[17]=o,t[18]=e,t[19]=m,t[20]=u,t[21]=e,t[22]=m,t[23]=o,t}function s(n,r){const a=isFinite(n[2])||isFinite(n[5]);return new t(a?{xmin:n[0],xmax:n[3],ymin:n[1],ymax:n[4],zmin:n[2],zmax:n[5],spatialReference:r}:{xmin:n[0],xmax:n[3],ymin:n[1],ymax:n[4],spatialReference:r})}function N(n,t,r=u()){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=t[0],r[4]=t[1],r[5]=t[2],r}function I(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[3]),n[4]=Math.max(n[4],t[4]),n[5]=Math.max(n[5],t[5])}function b(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[3]=Math.max(n[3],t[2]),n[4]=Math.max(n[4],t[3])}function y(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[0]),n[4]=Math.max(n[4],t[1]),n[5]=Math.max(n[5],t[2])}function g(n,t,r=0,a=t.length/3){let i=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];for(let c=0;c<a;c++)i=Math.min(i,t[r+3*c]),u=Math.min(u,t[r+3*c+1]),e=Math.min(e,t[r+3*c+2]),m=Math.max(m,t[r+3*c]),o=Math.max(o,t[r+3*c+1]),f=Math.max(f,t[r+3*c+2]);n[0]=i,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function T(n,t,r,a){n[0]=Math.min(n[0],n[0]+t),n[3]=Math.max(n[3],n[3]+t),n[1]=Math.min(n[1],n[1]+r),n[4]=Math.max(n[4],n[4]+r),n[2]=Math.min(n[2],n[2]+a),n[5]=Math.max(n[5],n[5]+a)}function p(n,{xmin:t,ymin:r,zmin:a,xmax:i,ymax:u,zmax:e}){n[0]=Math.min(n[0],t),n[3]=Math.max(n[3],i),n[1]=Math.min(n[1],r),n[4]=Math.max(n[4],u),n[2]=Math.min(n[2],a??-1/0),n[5]=Math.max(n[5],e??1/0)}function E(n,t,r){const a=t.length;let i=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];if(r)for(let c=0;c<a;c++){const n=t[c];i=Math.min(i,n[0]),u=Math.min(u,n[1]),e=Math.min(e,n[2]),m=Math.max(m,n[0]),o=Math.max(o,n[1]),f=Math.max(f,n[2])}else for(let c=0;c<a;c++){const n=t[c];i=Math.min(i,n[0]),u=Math.min(u,n[1]),m=Math.max(m,n[0]),o=Math.max(o,n[1])}n[0]=i,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function F(n){for(let t=0;t<6;t++)if(!isFinite(n[t]))return!1;return!0}function z(n){return n[0]>=n[3]?0:n[3]-n[0]}function j(n){return n[1]>=n[4]?0:n[4]-n[1]}function V(n){return n[2]>=n[5]?0:n[5]-n[2]}function Y(n){const t=z(n),r=V(n),a=j(n);return Math.sqrt(t*t+r*r+a*a)}function _(n,t=[0,0,0]){return t[0]=n[0]+z(n)/2,t[1]=n[1]+j(n)/2,t[2]=n[2]+V(n)/2,t}function d(n,t=[0,0,0]){return t[0]=z(n),t[1]=j(n),t[2]=V(n),t}function A(n){return Math.max(z(n),V(n),j(n))}function R(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[0]<=n[3]&&t[1]<=n[4]&&t[2]<=n[5]}function G(n,t,r){return t[0]>=n[0]-r&&t[1]>=n[1]-r&&t[2]>=n[2]-r&&t[0]<=n[3]+r&&t[1]<=n[4]+r&&t[2]<=n[5]+r}function O(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[3]<=n[3]&&t[4]<=n[4]&&t[5]<=n[5]}function P(n,t){const{center:r,radius:a}=t;let i=0;for(let u=0;u<3;u++)i+=Math.max(Math.abs(n[u]-r[u]),Math.abs(n[u+3]-r[u]))**2;return i<=a**2}function S(n,t){return Math.max(t[0],n[0])<=Math.min(t[3],n[3])&&Math.max(t[1],n[1])<=Math.min(t[4],n[4])&&Math.max(t[2],n[2])<=Math.min(t[5],n[5])}function Z(n,t){return null==t||S(n,t)}function k(n,t,r){let a=0,i=1;for(let u=0;u<3;++u){const e=n[u],m=n[u+3],o=t[u],f=r[u],c=f<o,h=c?f:o,M=c?o:f,x=Math.max(e,h),l=Math.min(m,M);if(x>l)return!1;if(M===h)break;const s=M-h,N=(x-h)/s,I=(l-h)/s;if(a=Math.max(a,c?1-I:N),i=Math.min(i,c?1-N:I),a>i)return!1}return!0}function q(n,t){const{center:r,radius:a}=t;let i=0;for(let u=0;u<3;u++){const t=Math.max(0,n[u]-r[u],r[u]-n[u+3]);if(t>a)return!1;i+=t**2}return i<=a**2}function v(t,r,a,i){const u=1e-8;let{tMin:e,tMax:m}=i;if(!(e<m))return null;if(!(Math.abs(n(a)-1)<1e-4))return null;for(let n=0;n<3;n++){const i=a[n],o=r[n],f=t[n],c=t[n+3];if(!(f<c))return null;if(Math.abs(i)<u){if(o<f||o>c)return null;continue}const h=1/i,M=(f-o)*h,x=(c-o)*h,l=h<0?x:M,s=h<0?M:x;if(e=Math.max(e,l),m=Math.min(m,s),m<=e)return null}return{tMin:e,tMax:m}}function w(n,t){const r=t[3];let a=r,i=r;for(let u=0;u<3;u++){const r=t[u],e=r*n[u],m=r*n[u+3];a+=Math.min(e,m),i+=Math.max(e,m)}return a>0?a:i<0?i:0}function B(n,t,r,a,i=n){return i[0]=n[0]+t,i[1]=n[1]+r,i[2]=n[2]+a,i[3]=n[3]+t,i[4]=n[4]+r,i[5]=n[5]+a,i}function D(n,t,r=n){const a=n[0]+z(n)/2,i=n[1]+j(n)/2,u=n[2]+V(n)/2;return r[0]=a+(n[0]-a)*t,r[1]=i+(n[1]-i)*t,r[2]=u+(n[2]-u)*t,r[3]=a+(n[3]-a)*t,r[4]=i+(n[4]-i)*t,r[5]=u+(n[5]-u)*t,r}function C(n,t){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function H(n,t){return t[0]=n[3],t[1]=n[4],t[2]=n[5],t}function J(n,t,r=n){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==n&&(r[3]=n[3],r[4]=n[4],r[5]=n[5]),r}function K(n,t,r=n){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==n&&(r[0]=n[0],r[1]=n[1],r[2]=n[2]),n}function L(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function Q(n){return n?L(n,un):u(un)}function U(n,t=r()){return t[0]=n[0],t[1]=n[1],t[2]=n[3],t[3]=n[4],t}function W(n,t){return n[0]=t[0],n[1]=t[1],n[2]=Number.NEGATIVE_INFINITY,n[3]=t[2],n[4]=t[3],n[5]=Number.POSITIVE_INFINITY,n}function X(n,t,r,a,i){return n[0]=t,n[1]=r,n[2]=Number.NEGATIVE_INFINITY,n[3]=a,n[4]=i,n[5]=Number.POSITIVE_INFINITY,n}function $(n){return 6===n.length}function nn(n){return 0===z(n)&&0===j(n)&&0===V(n)}function tn(n,t,r){if(null==n||null==t)return n===t;if(!$(n)||!$(t))return!1;if(r){for(let a=0;a<n.length;a++)if(!r(n[a],t[a]))return!1}else for(let a=0;a<n.length;a++)if(n[a]!==t[a])return!1;return!0}function rn(n,t,r,a,i,u){return m(n,t,r,a,i,u,on)}const an=i([-1/0,-1/0,-1/0,1/0,1/0,1/0]),un=i([1/0,1/0,1/0,-1/0,-1/0,-1/0]),en=i([0,0,0,0,0,0]),mn=i([NaN,NaN,NaN,NaN,NaN,NaN]),on=u();export{F as allFinite,_ as center,P as containedBySphere,O as contains,R as containsPoint,G as containsPointWithMargin,e as copy,u as create,j as depth,Y as diameter,Q as empty,tn as equals,M as exactEquals,I as expandWithAABB,g as expandWithBuffer,p as expandWithExtent,E as expandWithNestedArray,T as expandWithOffset,b as expandWithRect,y as expandWithVec3,f as fromBuffer,o as fromExtent,N as fromMinMax,W as fromRect,X as fromRectValues,c as fromSubBuffer,m as fromValues,H as getMax,C as getMin,V as height,S as intersects,Z as intersectsClippingArea,v as intersectsRay,k as intersectsSegment,q as intersectsSphere,$ as is,x as isEmpty,nn as isPoint,A as maximumDimension,mn as nan,un as negativeInfinity,B as offset,an as positiveInfinity,D as scale,L as set,h as setEmpty,K as setMax,J as setMin,w as signedDistanceFromPlane,d as size,l as toCorners,s as toExtent,U as toRect,z as width,rn as wrap,en as zero};
2
+ import{len as n}from"../../core/libs/gl-matrix-2/math/vec3.js";import t from"../Extent.js";import{create as r}from"./aaBoundingRect.js";import{newDoubleArray as a}from"./DoubleArray.js";function i(n){return n}function u(n=en){return i([n[0],n[1],n[2],n[3],n[4],n[5]])}function e(n,t){for(let r=0;r<6;r++)n[r]=t[r];return n}function m(n,t,r,a,i,e,m=u()){return m[0]=n,m[1]=t,m[2]=r,m[3]=a,m[4]=i,m[5]=e,m}function o(n,t=u()){return t[0]=n.xmin,t[1]=n.ymin,t[2]=n.hasZ?n.zmin:-1/0,t[3]=n.xmax,t[4]=n.ymax,t[5]=n.hasZ?n.zmax:1/0,t}function f(n,t=u()){return c(n,0,n.length/3,t)}function c(n,t,r,a=u()){return L(a,un),g(a,n,t,r),a}function h(n){n[0]=1/0,n[1]=1/0,n[2]=1/0,n[3]=-1/0,n[4]=-1/0,n[5]=-1/0}function M(n,t){for(let r=0;r<6;r++)if(n[r]!==t[r])return!1;return!0}function x(n){return!(n[0]<=n[3]&&n[1]<=n[4]&&n[2]<=n[5])}function l(n,t=a(24)){const[r,i,u,e,m,o]=n;return t[0]=r,t[1]=i,t[2]=u,t[3]=r,t[4]=i,t[5]=o,t[6]=r,t[7]=m,t[8]=u,t[9]=r,t[10]=m,t[11]=o,t[12]=e,t[13]=i,t[14]=u,t[15]=e,t[16]=i,t[17]=o,t[18]=e,t[19]=m,t[20]=u,t[21]=e,t[22]=m,t[23]=o,t}function s(n,r){const a=isFinite(n[2])||isFinite(n[5]);return new t(a?{xmin:n[0],xmax:n[3],ymin:n[1],ymax:n[4],zmin:n[2],zmax:n[5],spatialReference:r}:{xmin:n[0],xmax:n[3],ymin:n[1],ymax:n[4],spatialReference:r})}function N(n,t,r=u()){return r[0]=n[0],r[1]=n[1],r[2]=n[2],r[3]=t[0],r[4]=t[1],r[5]=t[2],r}function I(n,t,r=n){r[0]=Math.min(n[0],t[0]),r[1]=Math.min(n[1],t[1]),r[2]=Math.min(n[2],t[2]),r[3]=Math.max(n[3],t[3]),r[4]=Math.max(n[4],t[4]),r[5]=Math.max(n[5],t[5])}function b(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[3]=Math.max(n[3],t[2]),n[4]=Math.max(n[4],t[3])}function y(n,t){n[0]=Math.min(n[0],t[0]),n[1]=Math.min(n[1],t[1]),n[2]=Math.min(n[2],t[2]),n[3]=Math.max(n[3],t[0]),n[4]=Math.max(n[4],t[1]),n[5]=Math.max(n[5],t[2])}function g(n,t,r=0,a=t.length/3){let i=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];for(let c=0;c<a;c++)i=Math.min(i,t[r+3*c]),u=Math.min(u,t[r+3*c+1]),e=Math.min(e,t[r+3*c+2]),m=Math.max(m,t[r+3*c]),o=Math.max(o,t[r+3*c+1]),f=Math.max(f,t[r+3*c+2]);n[0]=i,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function T(n,t,r,a){n[0]=Math.min(n[0],n[0]+t),n[3]=Math.max(n[3],n[3]+t),n[1]=Math.min(n[1],n[1]+r),n[4]=Math.max(n[4],n[4]+r),n[2]=Math.min(n[2],n[2]+a),n[5]=Math.max(n[5],n[5]+a)}function p(n,{xmin:t,ymin:r,zmin:a,xmax:i,ymax:u,zmax:e}){n[0]=Math.min(n[0],t),n[3]=Math.max(n[3],i),n[1]=Math.min(n[1],r),n[4]=Math.max(n[4],u),n[2]=Math.min(n[2],a??-1/0),n[5]=Math.max(n[5],e??1/0)}function E(n,t,r){const a=t.length;let i=n[0],u=n[1],e=n[2],m=n[3],o=n[4],f=n[5];if(r)for(let c=0;c<a;c++){const n=t[c];i=Math.min(i,n[0]),u=Math.min(u,n[1]),e=Math.min(e,n[2]),m=Math.max(m,n[0]),o=Math.max(o,n[1]),f=Math.max(f,n[2])}else for(let c=0;c<a;c++){const n=t[c];i=Math.min(i,n[0]),u=Math.min(u,n[1]),m=Math.max(m,n[0]),o=Math.max(o,n[1])}n[0]=i,n[1]=u,n[2]=e,n[3]=m,n[4]=o,n[5]=f}function F(n){for(let t=0;t<6;t++)if(!isFinite(n[t]))return!1;return!0}function z(n){return n[0]>=n[3]?0:n[3]-n[0]}function j(n){return n[1]>=n[4]?0:n[4]-n[1]}function V(n){return n[2]>=n[5]?0:n[5]-n[2]}function Y(n){const t=z(n),r=V(n),a=j(n);return Math.sqrt(t*t+r*r+a*a)}function _(n,t=[0,0,0]){return t[0]=n[0]+z(n)/2,t[1]=n[1]+j(n)/2,t[2]=n[2]+V(n)/2,t}function d(n,t=[0,0,0]){return t[0]=z(n),t[1]=j(n),t[2]=V(n),t}function A(n){return Math.max(z(n),V(n),j(n))}function R(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[0]<=n[3]&&t[1]<=n[4]&&t[2]<=n[5]}function G(n,t,r){return t[0]>=n[0]-r&&t[1]>=n[1]-r&&t[2]>=n[2]-r&&t[0]<=n[3]+r&&t[1]<=n[4]+r&&t[2]<=n[5]+r}function O(n,t){return t[0]>=n[0]&&t[1]>=n[1]&&t[2]>=n[2]&&t[3]<=n[3]&&t[4]<=n[4]&&t[5]<=n[5]}function P(n,t){const{center:r,radius:a}=t;let i=0;for(let u=0;u<3;u++)i+=Math.max(Math.abs(n[u]-r[u]),Math.abs(n[u+3]-r[u]))**2;return i<=a**2}function S(n,t){return Math.max(t[0],n[0])<=Math.min(t[3],n[3])&&Math.max(t[1],n[1])<=Math.min(t[4],n[4])&&Math.max(t[2],n[2])<=Math.min(t[5],n[5])}function Z(n,t){return null==t||S(n,t)}function k(n,t,r){let a=0,i=1;for(let u=0;u<3;++u){const e=n[u],m=n[u+3],o=t[u],f=r[u],c=f<o,h=c?f:o,M=c?o:f,x=Math.max(e,h),l=Math.min(m,M);if(x>l)return!1;if(M===h)break;const s=M-h,N=(x-h)/s,I=(l-h)/s;if(a=Math.max(a,c?1-I:N),i=Math.min(i,c?1-N:I),a>i)return!1}return!0}function q(n,t){const{center:r,radius:a}=t;let i=0;for(let u=0;u<3;u++){const t=Math.max(0,n[u]-r[u],r[u]-n[u+3]);if(t>a)return!1;i+=t**2}return i<=a**2}function v(t,r,a,i){const u=1e-8;let{tMin:e,tMax:m}=i;if(!(e<m))return null;if(!(Math.abs(n(a)-1)<1e-4))return null;for(let n=0;n<3;n++){const i=a[n],o=r[n],f=t[n],c=t[n+3];if(!(f<c))return null;if(Math.abs(i)<u){if(o<f||o>c)return null;continue}const h=1/i,M=(f-o)*h,x=(c-o)*h,l=h<0?x:M,s=h<0?M:x;if(e=Math.max(e,l),m=Math.min(m,s),m<=e)return null}return{tMin:e,tMax:m}}function w(n,t){const r=t[3];let a=r,i=r;for(let u=0;u<3;u++){const r=t[u],e=r*n[u],m=r*n[u+3];a+=Math.min(e,m),i+=Math.max(e,m)}return a>0?a:i<0?i:0}function B(n,t,r,a,i=n){return i[0]=n[0]+t,i[1]=n[1]+r,i[2]=n[2]+a,i[3]=n[3]+t,i[4]=n[4]+r,i[5]=n[5]+a,i}function D(n,t,r=n){const a=n[0]+z(n)/2,i=n[1]+j(n)/2,u=n[2]+V(n)/2;return r[0]=a+(n[0]-a)*t,r[1]=i+(n[1]-i)*t,r[2]=u+(n[2]-u)*t,r[3]=a+(n[3]-a)*t,r[4]=i+(n[4]-i)*t,r[5]=u+(n[5]-u)*t,r}function C(n,t){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function H(n,t){return t[0]=n[3],t[1]=n[4],t[2]=n[5],t}function J(n,t,r=n){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==n&&(r[3]=n[3],r[4]=n[4],r[5]=n[5]),r}function K(n,t,r=n){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==n&&(r[0]=n[0],r[1]=n[1],r[2]=n[2]),n}function L(n,t){return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n[4]=t[4],n[5]=t[5],n}function Q(n){return n?L(n,un):u(un)}function U(n,t=r()){return t[0]=n[0],t[1]=n[1],t[2]=n[3],t[3]=n[4],t}function W(n,t){return n[0]=t[0],n[1]=t[1],n[2]=Number.NEGATIVE_INFINITY,n[3]=t[2],n[4]=t[3],n[5]=Number.POSITIVE_INFINITY,n}function X(n,t,r,a,i){return n[0]=t,n[1]=r,n[2]=Number.NEGATIVE_INFINITY,n[3]=a,n[4]=i,n[5]=Number.POSITIVE_INFINITY,n}function $(n){return 6===n.length}function nn(n){return 0===z(n)&&0===j(n)&&0===V(n)}function tn(n,t,r){if(null==n||null==t)return n===t;if(!$(n)||!$(t))return!1;if(r){for(let a=0;a<n.length;a++)if(!r(n[a],t[a]))return!1}else for(let a=0;a<n.length;a++)if(n[a]!==t[a])return!1;return!0}function rn(n,t,r,a,i,u){return m(n,t,r,a,i,u,on)}const an=i([-1/0,-1/0,-1/0,1/0,1/0,1/0]),un=i([1/0,1/0,1/0,-1/0,-1/0,-1/0]),en=i([0,0,0,0,0,0]),mn=i([NaN,NaN,NaN,NaN,NaN,NaN]),on=u();export{F as allFinite,_ as center,P as containedBySphere,O as contains,R as containsPoint,G as containsPointWithMargin,e as copy,u as create,j as depth,Y as diameter,Q as empty,tn as equals,M as exactEquals,I as expandWithAABB,g as expandWithBuffer,p as expandWithExtent,E as expandWithNestedArray,T as expandWithOffset,b as expandWithRect,y as expandWithVec3,f as fromBuffer,o as fromExtent,N as fromMinMax,W as fromRect,X as fromRectValues,c as fromSubBuffer,m as fromValues,H as getMax,C as getMin,V as height,S as intersects,Z as intersectsClippingArea,v as intersectsRay,k as intersectsSegment,q as intersectsSphere,$ as is,x as isEmpty,nn as isPoint,A as maximumDimension,mn as nan,un as negativeInfinity,B as offset,an as positiveInfinity,D as scale,L as set,h as setEmpty,K as setMax,J as setMin,w as signedDistanceFromPlane,d as size,l as toCorners,s as toExtent,U as toRect,z as width,rn as wrap,en as zero};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ObjectStack as r}from"../../core/ObjectStack.js";import{multiply as t,invert as o}from"../../core/libs/gl-matrix-2/math/mat4.js";import{set as e}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as n}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transformMat4 as i}from"../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as c}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as f,fromLineSegmentAndDirection as m,create as s}from"./clipRay.js";import{create as u,fromPoints as a,signedDistance as l,clip as p,clipInfinite as g,copy as j}from"./plane.js";import{sm4d as b,sv4d as x}from"./vectorStacks.js";function v(r){return r?[u(r[0]),u(r[1]),u(r[2]),u(r[3]),u(r[4]),u(r[5])]:[u(),u(),u(),u(),u(),u()]}function h(){return[n(),n(),n(),n(),n(),n(),n(),n()]}function k(r,t){for(let o=0;o<C;o++)j(r[o],t[o]);return r}function y(r,n,c,f=G){const m=t(b.get(),n,r);o(m,m);for(let t=0;t<D;++t){const r=i(x.get(),E[t],m);e(f[t],r[0]/r[3],r[1]/r[3],r[2]/r[3])}S(c,f)}function S(r,t){a(t[4],t[0],t[3],r[0]),a(t[1],t[5],t[6],r[1]),a(t[4],t[5],t[1],r[2]),a(t[3],t[2],t[6],r[3]),a(t[0],t[1],t[2],r[4]),a(t[5],t[4],t[7],r[5])}function d(r,t){return w(r,t.center,t.radius)}function w(r,t,o){for(let e=0;e<C;e++){const n=r[e];if(n[0]*t[0]+n[1]*t[1]+n[2]*t[2]+n[3]>=o)return!1}return!0}function O(r,t){return A(r,f(t,F.get()))}function R(r,t){for(let o=0;o<C;o++){const e=r[o];if(!g(e,t))return!1}return!0}function q(r,t,o){return A(r,m(t,o,F.get()))}function z(r,t){for(let o=0;o<C;o++){if(l(r[o],t)>0)return!1}return!0}function A(r,t){for(let o=0;o<C;o++)if(!p(r[o],t))return!1;return!0}const B={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},C=6,D=8,E=[c(-1,-1,-1,1),c(1,-1,-1,1),c(1,1,-1,1),c(-1,1,-1,1),c(-1,-1,1,1),c(1,-1,1,1),c(1,1,1,1),c(-1,1,1,1)],F=new r(s),G=h();export{S as computePlanes,k as copy,v as create,h as createPoints,y as fromMatrix,R as intersectClipRay,q as intersectsLineSegment,z as intersectsPoint,O as intersectsRay,d as intersectsSphere,w as intersectsSphereCenterRadius,C as numPlanes,D as numPoints,B as planePointIndices};
2
+ import{ObjectStack as t}from"../../core/ObjectStack.js";import{multiply as r,invert as n}from"../../core/libs/gl-matrix-2/math/mat4.js";import{set as o}from"../../core/libs/gl-matrix-2/math/vec3.js";import{create as e}from"../../core/libs/gl-matrix-2/factories/vec3f64.js";import{transformMat4 as c}from"../../core/libs/gl-matrix-2/math/vec4.js";import{fromValues as i}from"../../core/libs/gl-matrix-2/factories/vec4f64.js";import{fromRay as f,fromLineSegmentAndDirection as u,create as a}from"./clipRay.js";import{create as s,fromPoints as m,signedDistance as l,clip as p,clipInfinite as b,copy as g}from"./plane.js";import{sm4d as h,sv4d as j}from"./vectorStacks.js";function x(t){return t?[s(t[0]),s(t[1]),s(t[2]),s(t[3]),s(t[4]),s(t[5])]:[s(),s(),s(),s(),s(),s()]}function M(){return[e(),e(),e(),e(),e(),e(),e(),e()]}function v(t,r){for(let n=0;n<H;n++)g(t[n],r[n]);return t}function k(t,e,i,f=L){const u=r(h.get(),e,t);n(u,u);for(let r=0;r<I;++r){const t=c(j.get(),J[r],u);o(f[r],t[0]/t[3],t[1]/t[3],t[2]/t[3])}y(i,f)}function y(t,r){m(r[4],r[0],r[3],t[0]),m(r[1],r[5],r[6],t[1]),m(r[4],r[5],r[1],t[2]),m(r[3],r[2],r[6],t[3]),m(r[0],r[1],r[2],t[4]),m(r[5],r[4],r[7],t[5])}function S(t,r){return d(t,r.center,r.radius)}function d(t,r,n){for(let o=0;o<H;o++){const e=t[o];if(e[0]*r[0]+e[1]*r[1]+e[2]*r[2]+e[3]>=n)return!1}return!0}function w(t,r,n){return O(t,r[0],r[1],r[2],n[0],n[1],n[2])}function O(t,r,n,o,e,c,i){const f=(r+e)/2,u=(n+c)/2,a=(o+i)/2,s=(e-r)/2,m=(c-n)/2,l=(i-o)/2;for(let p=0;p<H;p++){const r=t[p];if(r[0]*f+r[1]*u+r[2]*a+r[3]-(Math.abs(r[0])*s+Math.abs(r[1])*m+Math.abs(r[2])*l)>0)return!1}return!0}function R(t,r,n){return n?z(t,r[0],r[1],r[2],r[3],r[4],r[5],n):O(t,r[0],r[1],r[2],r[3],r[4],r[5])}function q(t,r,n,o){return o?z(t,r[0],r[1],r[2],n[0],n[1],n[2],o):O(t,r[0],r[1],r[2],n[0],n[1],n[2])}function z(t,r,n,o,e,c,i,f){return F(t,(r+e)/2,(n+c)/2,(o+i)/2,(e-r)/2,(c-n)/2,(i-o)/2,f)}function A(t,r){return E(t,f(r,K.get()))}function B(t,r){for(let n=0;n<H;n++){const o=t[n];if(!b(o,r))return!1}return!0}function C(t,r,n){return E(t,u(r,n,K.get()))}function D(t,r){for(let n=0;n<H;n++){if(l(t[n],r)>0)return!1}return!0}function E(t,r){for(let n=0;n<H;n++)if(!p(t[n],r))return!1;return!0}function F(t,r,n,o,e,c,i,f){const u=f[0]*r+f[4]*n+f[8]*o+f[12],a=f[1]*r+f[5]*n+f[9]*o+f[13],s=f[2]*r+f[6]*n+f[10]*o+f[14];for(let m=0;m<H;m++){const r=t[m];if(r[0]*u+r[1]*a+r[2]*s+r[3]-(Math.abs(r[0]*f[0]+r[1]*f[1]+r[2]*f[2])*e+Math.abs(r[0]*f[4]+r[1]*f[5]+r[2]*f[6])*c+Math.abs(r[0]*f[8]+r[1]*f[9]+r[2]*f[10])*i)>0)return!1}return!0}const G={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},H=6,I=8,J=[i(-1,-1,-1,1),i(1,-1,-1,1),i(1,1,-1,1),i(-1,1,-1,1),i(-1,-1,1,1),i(1,-1,1,1),i(1,1,1,1),i(-1,1,1,1)],K=new t(a),L=M();export{y as computePlanes,v as copy,x as create,M as createPoints,k as fromMatrix,B as intersectClipRay,w as intersectsAabbFromMinMax,C as intersectsLineSegment,D as intersectsPoint,A as intersectsRay,S as intersectsSphere,d as intersectsSphereCenterRadius,R as intersectsTransformedAabb,q as intersectsTransformedAabbFromMinMax,H as numPlanes,I as numPoints,G as planePointIndices};
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.42",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.44",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as n}from"../core/promiseUtils.js";import{on as a,sync as l}from"../core/reactiveUtils.js";import{property as p,subclass as c}from"../core/accessorSupport/decorators.js";import{persistable as m}from"../core/accessorSupport/decorators/persistable.js";import u from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import h from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as v}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as j,url as T}from"./support/commonProperties.js";import x from"./support/SceneModifications.js";import{default3DTilesSpatialReference as w,default3DTilesFullExtent as b,initFullExtent as R,hasEsriCrs as L}from"./support/tiles3DUtils.js";import E from"../portal/Portal.js";import{logInvalidElevationInfoWarning as P,elevationModeRequiredMessage as k,featureExpressionUnsupportedMessage as I}from"../support/elevationInfoUtils.js";import{f as O}from"../chunks/persistableUrlUtils.js";import{isBasemap as D}from"../support/userTypeGuards/isBasemap.js";import{initialize as U,switchMeshModificationPolygonVCSSync as M}from"../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as C,fromWasmModification as G}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{reader as N}from"../core/accessorSupport/decorators/reader.js";let q=class extends(y(S(_(v(s(g(f(r(h))))))))){readModifications(e,t,r){this._modificationsSource={url:O(e,r),context:r}}initialize(){this.addHandles(a(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=w,this.fullExtent=b,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[w,this.esriCrsSpatialReference]:[w]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[b,this.esriCrsFullExtent]:[b]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[i,o]of Object.entries(e)){if("uri"===i)try{const e=new URL("https://tmp"+o).searchParams.get("session");if(e)return e}catch(r){}"object"==typeof o&&null!==o&&t.push(o)}}return null}async requestRootAndSession(e){const r=(e,t)=>new i("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((i,s)=>{this.url||s(r("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,i)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||E.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>i(r("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):i(r("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>i(r("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void s(r("root-parse-failed","Error parsing root tile, details: "+t))}if(!this._rootTilesetJSON)return void s(r("root-is-null","Root tile is null."));this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=R(this._rootTilesetJSON);L(this._rootTilesetJSON)&&(this.esriCrsFullExtent=R(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),i(),this._rootRequestPromise=null},e=>{n(e),s(r("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>s(e))})),this._rootRequestPromise}_haveWGS84ZModifications(e){for(const t of e){if(!t.geometry?.spatialReference)return!0;if(115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0}return!1}async _doLoad(e){const t=null!=e?e.signal:null;if(this.isUsedAsGroundLayer&&!has("enable-feature:basemap-groundlayers"))throw new i("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new i("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(r){n(r)}if(null!=this._modificationsSource){const t=await x.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await U();try{const e=C(null,t.toArray(),d.WGS84),r=M({modifications:e,inVCS:115700});r.success&&r.modifications&&G(r.modifications,t)}catch(s){o.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",s)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){const{modifications:e}=this;return void(e&&e.length>0&&await U())}await this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";P(o.getLogger(this),k(t,"absolute-height",e)),P(o.getLogger(this),I(t,e))}get replacesTerrain(){return!!has("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return D(this.parent)}get hasGoogleUrl(){return!!this.url?.match(/.+\.googleapis.com/)}};e([p({type:["IntegratedMesh3DTilesLayer"]})],q.prototype,"operationalLayerType",void 0),e([p({type:x,clonable:e=>e?.clone()??null}),m({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],q.prototype,"modifications",void 0),e([p({clonable:e=>e?{...e}:null})],q.prototype,"_modificationsSource",void 0),e([N(["web-scene","portal-item"],"modifications")],q.prototype,"readModifications",null),e([p({type:d})],q.prototype,"spatialReference",void 0),e([p({type:u})],q.prototype,"fullExtent",void 0),e([p({readOnly:!0})],q.prototype,"supportedSpatialReferences",null),e([p({type:[u]})],q.prototype,"fullExtents",null),e([p(j)],q.prototype,"elevationInfo",null),e([p({type:["show","hide"]})],q.prototype,"listMode",void 0),e([p(T)],q.prototype,"url",void 0),e([p({readOnly:!0})],q.prototype,"type",void 0),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),e([p({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],q.prototype,"minScale",void 0),e([p({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],q.prototype,"maxScale",void 0),e([p({readOnly:!0})],q.prototype,"hasAttributionData",null),e([p()],q.prototype,"replacesTerrain",null),e([p()],q.prototype,"isUsedAsGroundLayer",null),e([p()],q.prototype,"hasGoogleUrl",null),q=e([c("esri.layers.IntegratedMesh3DTilesLayer")],q);const A=q;export{A as default};
2
+ import{__decorate as e}from"tslib";import t from"../request.js";import{ClonableMixin as i}from"../core/Clonable.js";import r from"../core/Error.js";import has from"../core/has.js";import o from"../core/Logger.js";import{MultiOriginJSONSupportMixin as s}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as a}from"../core/promiseUtils.js";import{on as n,sync as l}from"../core/reactiveUtils.js";import{property as p,subclass as m}from"../core/accessorSupport/decorators.js";import{persistable as c}from"../core/accessorSupport/decorators/persistable.js";import u from"../geometry/Extent.js";import d from"../geometry/SpatialReference.js";import h from"./Layer.js";import{APIKeyMixin as f}from"./mixins/APIKeyMixin.js";import{ArcGISService as y}from"./mixins/ArcGISService.js";import{CustomParametersMixin as g}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as v}from"./mixins/ScaleRangeLayer.js";import{elevationInfo as j,url as T}from"./support/commonProperties.js";import x from"./support/SceneModifications.js";import{default3DTilesSpatialReference as w,default3DTilesFullExtent as b,initFullExtent as R,hasEsriCrs as L}from"./support/tiles3DUtils.js";import E from"../portal/Portal.js";import{logInvalidElevationInfoWarning as P,elevationModeRequiredMessage as k,featureExpressionUnsupportedMessage as I}from"../support/elevationInfoUtils.js";import{f as U}from"../chunks/persistableUrlUtils.js";import{isBasemap as O}from"../support/userTypeGuards/isBasemap.js";import{initialize as G,switchMeshModificationPolygonVCSSync as D}from"../views/3d/layers/Lyr3DWorker.js";import{toWasmModification as M,fromWasmModification as C}from"../views/3d/layers/SceneLayerWorkerHandle.js";import{reader as N}from"../core/accessorSupport/decorators/reader.js";let q=class extends(y(S(_(v(s(g(f(i(h))))))))){readModifications(e,t,i){this._modificationsSource={url:U(e,i),context:i}}initialize(){this.addHandles(n(()=>this.modifications,"after-changes",()=>this.modifications=this.modifications,l))}constructor(e){super(e),this.operationalLayerType="IntegratedMesh3DTilesLayer",this.modifications=null,this._modificationsSource=null,this.spatialReference=w,this.fullExtent=b,this.esriCrsSpatialReference=null,this.esriCrsFullExtent=null,this.url=null,this.type="integrated-mesh-3dtiles",this.path=null,this.minScale=0,this.maxScale=0,this._rootTilesetJSON=null,this._rootTileset=null,this._key=null,this._session=null,this._rootRequestPromise=null,this.queryElevationCallback=null,this._simulateGoogleUrl=!1}get supportedSpatialReferences(){return this.initialized&&this.esriCrsSpatialReference?[w,this.esriCrsSpatialReference]:[w]}get fullExtents(){return this.initialized&&this.esriCrsFullExtent?[b,this.esriCrsFullExtent]:[b]}set elevationInfo(e){null!=e&&"absolute-height"!==e.mode||this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get rootTilesetJSON(){return this._rootTilesetJSON}get rootTileset(){return this._rootTileset}get key(){return this._key}get session(){return this._session}_findSessionParameter(e){const t=[e];for(;t?.length>0;){const e=t.pop();if(!e)return;for(const[r,o]of Object.entries(e)){if("uri"===r)try{const e=new URL("https://tmp"+o).searchParams.get("session");if(e)return e}catch(i){}"object"==typeof o&&null!==o&&t.push(o)}}return null}async requestRootAndSession(e){const i=(e,t)=>new r("3dtiles-init:"+e,t);return this._rootRequestPromise||(this._rootRequestPromise=new Promise((r,s)=>{this.url||s(i("url-missing","Layer url missing")),this._key=this.customParameters?this.customParameters.key:null;new Promise((e,r)=>{if(this.replacesTerrain&&!this._key){const o=this.portalItem?.portal||this.parent?.portalItem?.portal||E.getDefault();o.signIn().then(()=>{o.g3dTilesEnabled?t(o.restUrl+"/portals/self/modules/g3dtiles",{responseType:"json",query:{f:"json"}}).then(t=>{this._key=t.data.keyString,e()},()=>r(i("g3dtiles-key-error","Error fetching Google 3D Tiles key from portal"))):r(i("g3dTilesEnabled-false","Google 3D Tiles are not enabled on Portal "+o.url))},()=>r(i("sign-in-failed","Error signing in to Portal")))}else e()}).then(()=>{t(this.url,{query:this._key?{key:this._key,token:this.apiKey}:{token:this.apiKey},responseType:"array-buffer",signal:e}).then(e=>{try{this._rootTilesetJSON=JSON.parse((new TextDecoder).decode(e.data))}catch(t){return void s(i("root-parse-failed","Error parsing root tile, details: "+t))}if(!this._rootTilesetJSON)return void s(i("root-is-null","Root tile is null."));this._session=this._findSessionParameter(this._rootTilesetJSON),this._rootTileset=e.data,this.fullExtent=R(this._rootTilesetJSON);L(this._rootTilesetJSON)&&(this.esriCrsFullExtent=R(this._rootTilesetJSON,!0),this.esriCrsSpatialReference=this.esriCrsFullExtent.spatialReference,this.spatialReference=this.esriCrsSpatialReference),r(),this._rootRequestPromise=null},e=>{a(e),s(i("root-load-failed","Error loading root tile")),this._rootRequestPromise=null,o.getLogger("IntegratedMesh3DTilesLayer").error("Layer loading failed",e)})},e=>s(e))})),this._rootRequestPromise}_haveWGS84ZModifications(e){for(const t of e){if(!t.geometry?.spatialReference)return!0;if(115700===t.geometry?.spatialReference.vcsWkid&&4326===t.geometry?.spatialReference.wkid)return!0}return!1}async _doLoad(e){const t=null!=e?e.signal:null;if(this.isUsedAsGroundLayer&&!has("enable-feature:basemap-groundlayers"))throw new r("3dtiles-init:not-supported-in-groundlayers","Layer is not supported in basemap.");try{await this.loadFromPortal({supportedTypes:["3DTiles Service"],validateItem:e=>{if(e.typeKeywords?.includes("IntegratedMesh"))return!0;throw new r("portal:invalid-layer-item-type","Invalid layer item, expected '${expectedType}' ",{expectedType:"3DTiles Service containing IntegratedMesh"})}},e)}catch(i){a(i)}if(null!=this._modificationsSource){const t=await x.fromUrl(this._modificationsSource.url,this.spatialReference,e,!0);if(this._haveWGS84ZModifications(t)){await G();try{const e=M(null,t.toArray(),d.WGS84),i=D({modifications:e,inVCS:115700});i.success&&i.modifications&&C(i.modifications,t)}catch(s){o.getLogger(this).error("convert-mesh-modification-z-error","Error when converting:",s)}}this.setAtOrigin("modifications",t,this._modificationsSource.context.origin),this._modificationsSource=null}await this.requestRootAndSession(t)}async beforeSave(){if(null==this._modificationsSource){const{modifications:e}=this;return void(e&&e.length>0&&await G())}await this.load().then(()=>{},()=>{})}get hasAttributionData(){return!1}_validateElevationInfo(e){const t="Integrated mesh 3d tiles layers";P(o.getLogger(this),k(t,"absolute-height",e)),P(o.getLogger(this),I(t,e))}get replacesTerrain(){return!!has("enable-feature:basemap-groundlayers")&&this.hasGoogleUrl&&this.isUsedAsGroundLayer}get isUsedAsGroundLayer(){return O(this.parent)}get hasGoogleUrl(){return this._simulateGoogleUrl||!!this.url?.match(/.+\.googleapis.com/)}get test(){}};e([p({type:["IntegratedMesh3DTilesLayer"]})],q.prototype,"operationalLayerType",void 0),e([p({type:x,clonable:e=>e?.clone()??null}),c({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],q.prototype,"modifications",void 0),e([p({clonable:e=>e?{...e}:null})],q.prototype,"_modificationsSource",void 0),e([N(["web-scene","portal-item"],"modifications")],q.prototype,"readModifications",null),e([p({type:d})],q.prototype,"spatialReference",void 0),e([p({type:u})],q.prototype,"fullExtent",void 0),e([p({readOnly:!0})],q.prototype,"supportedSpatialReferences",null),e([p({type:[u]})],q.prototype,"fullExtents",null),e([p(j)],q.prototype,"elevationInfo",null),e([p({type:["show","hide"]})],q.prototype,"listMode",void 0),e([p(T)],q.prototype,"url",void 0),e([p({readOnly:!0})],q.prototype,"type",void 0),e([p({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],q.prototype,"path",void 0),e([p({type:Number,json:{name:"layerDefinition.minScale",write:!0,origins:{service:{read:!1,write:!1}}}})],q.prototype,"minScale",void 0),e([p({type:Number,json:{name:"layerDefinition.maxScale",write:!0,origins:{service:{read:!1,write:!1}}}})],q.prototype,"maxScale",void 0),e([p({readOnly:!0})],q.prototype,"hasAttributionData",null),e([p()],q.prototype,"replacesTerrain",null),e([p()],q.prototype,"isUsedAsGroundLayer",null),e([p()],q.prototype,"hasGoogleUrl",null),e([p()],q.prototype,"_simulateGoogleUrl",void 0),q=e([m("esri.layers.IntegratedMesh3DTilesLayer")],q);const A=q;export{A as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.42",
3
+ "version": "5.2.0-next.44",
4
4
  "type": "module",
5
5
  "homepage": "https://js.arcgis.com",
6
6
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
@@ -20,7 +20,7 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.19.1",
23
- "@arcgis/toolkit": "^5.2.0-next.37",
23
+ "@arcgis/toolkit": "^5.2.0-next.40",
24
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
25
25
  "@esri/calcite-components": "^5.1.1",
26
26
  "@vaadin/grid": "~25.2.1",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- const c="20260708",e="771be63626c8b28a6673e2c519283ef27774a09c";export{c as buildDate,e as commitHash};
2
+ const d="20260710",e="b5206383d42a7e3eedc3869a697d216d690baf4b";export{d as buildDate,e as commitHash};
@@ -2062,3 +2062,159 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2062
2062
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2063
2063
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2064
2064
  SOFTWARE.
2065
+
2066
+ -----------------------------------------------------------------
2067
+
2068
+ snapdom/
2069
+
2070
+ https://github.com/zumerlab/snapdom
2071
+
2072
+ MIT License
2073
+
2074
+ Copyright (c) 2025 ZumerLab
2075
+
2076
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2077
+ of this software and associated documentation files (the "Software"), to deal
2078
+ in the Software without restriction, including without limitation the rights
2079
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2080
+ copies of the Software, and to permit persons to whom the Software is
2081
+ furnished to do so, subject to the following conditions:
2082
+
2083
+ The above copyright notice and this permission notice shall be included in all
2084
+ copies or substantial portions of the Software.
2085
+
2086
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2087
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2088
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2089
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2090
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2091
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2092
+ SOFTWARE.
2093
+
2094
+ -----------------------------------------------------------------
2095
+
2096
+ d3/d3-shape
2097
+
2098
+ https://github.com/d3/d3-shape
2099
+
2100
+ ISC License
2101
+
2102
+ Copyright 2010-2022 Mike Bostock
2103
+
2104
+ Permission to use, copy, modify, and/or distribute this software for any purpose
2105
+ with or without fee is hereby granted, provided that the above copyright notice
2106
+ and this permission notice appear in all copies.
2107
+
2108
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2109
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
2110
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2111
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
2112
+ OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
2113
+ TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
2114
+ THIS SOFTWARE.
2115
+
2116
+ -----------------------------------------------------------------
2117
+
2118
+ jszip/
2119
+
2120
+ https://github.com/Stuk/jszip
2121
+
2122
+ MIT License
2123
+
2124
+ Copyright (c) 2009-2016 Stuart Knightley, David Duponchel, Franz Buchinger, António Afonso
2125
+
2126
+ Permission is hereby granted, free of charge, to any person obtaining a copy
2127
+ of this software and associated documentation files (the "Software"), to deal
2128
+ in the Software without restriction, including without limitation the rights
2129
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
2130
+ copies of the Software, and to permit persons to whom the Software is
2131
+ furnished to do so, subject to the following conditions:
2132
+
2133
+ The above copyright notice and this permission notice shall be included in
2134
+ all copies or substantial portions of the Software.
2135
+
2136
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
2137
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
2138
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
2139
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
2140
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
2141
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2142
+ THE SOFTWARE.
2143
+
2144
+ -----------------------------------------------------------------
2145
+
2146
+ lodash/
2147
+
2148
+ https://github.com/lodash/lodash
2149
+
2150
+ MIT License
2151
+
2152
+ Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
2153
+
2154
+ Based on Underscore.js, copyright Jeremy Ashkenas,
2155
+ DocumentCloud and Investigative Reporters & Editors <http://underscorejs.org/>
2156
+
2157
+ This software consists of voluntary contributions made by many
2158
+ individuals. For exact contribution history, see the revision history
2159
+ available at https://github.com/lodash/lodash
2160
+
2161
+ The following license applies to all parts of this software except as
2162
+ documented below:
2163
+
2164
+ ====
2165
+
2166
+ Permission is hereby granted, free of charge, to any person obtaining
2167
+ a copy of this software and associated documentation files (the
2168
+ "Software"), to deal in the Software without restriction, including
2169
+ without limitation the rights to use, copy, modify, merge, publish,
2170
+ distribute, sublicense, and/or sell copies of the Software, and to
2171
+ permit persons to whom the Software is furnished to do so, subject to
2172
+ the following conditions:
2173
+
2174
+ The above copyright notice and this permission notice shall be
2175
+ included in all copies or substantial portions of the Software.
2176
+
2177
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
2178
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2179
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
2180
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
2181
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
2182
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
2183
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2184
+
2185
+ ====
2186
+
2187
+ Copyright and related rights for sample code are waived via CC0. Sample
2188
+ code is defined as all source code displayed within the prose of the
2189
+ documentation.
2190
+
2191
+ CC0: http://creativecommons.org/publicdomain/zero/1.0/
2192
+
2193
+ ====
2194
+
2195
+ Files located in the node_modules and vendor directories are externally
2196
+ maintained libraries used by this software which have their own
2197
+ licenses; we recommend you read them, as their terms may differ from the
2198
+ terms above.
2199
+
2200
+ -----------------------------------------------------------------
2201
+
2202
+ simple-statistics/
2203
+
2204
+ https://github.com/simple-statistics/simple-statistics
2205
+
2206
+ ISC License
2207
+
2208
+ Copyright (c) 2014, Tom MacWright
2209
+
2210
+ Permission to use, copy, modify, and/or distribute this software for any
2211
+ purpose with or without fee is hereby granted, provided that the above
2212
+ copyright notice and this permission notice appear in all copies.
2213
+
2214
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
2215
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
2216
+ FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
2217
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2218
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
2219
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2220
+ PERFORMANCE OF THIS SOFTWARE.