@arcgis/core 4.29.0-next.20231219 → 4.29.0-next.20231221
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.
- package/analysis/Analysis.js +1 -1
- package/applications/WebEditor/sketchUtils.js +1 -1
- package/assets/components/assets/icon/hexagon16.json +1 -0
- package/assets/components/assets/icon/hexagon24.json +1 -0
- package/assets/components/assets/icon/hexagon32.json +1 -0
- package/assets/components/assets/icon/octagon16.json +1 -0
- package/assets/components/assets/icon/octagon24.json +1 -0
- package/assets/components/assets/icon/octagon32.json +1 -0
- package/assets/esri/core/libs/libtess/libtess.wasm +0 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/00b340b4495bfabd4ca2.js +1 -0
- package/assets/esri/core/workers/chunks/{4301736368af52b94ee2.js → 02d6e2f0b1003534a077.js} +1 -1
- package/assets/esri/core/workers/chunks/050132142f4887c62724.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/0e315452f11b112523f0.js +1 -0
- package/assets/esri/core/workers/chunks/0f5a197f0a4b3a354bcd.js +1 -0
- package/assets/esri/core/workers/chunks/1187ba315883ff27e2d9.js +1 -0
- package/assets/esri/core/workers/chunks/1254a544d369d99ccf59.js +1 -0
- package/assets/esri/core/workers/chunks/138d138a5d33b2f5d8a4.js +1 -0
- package/assets/esri/core/workers/chunks/1a73dcbb49d17f16ed5a.js +1 -0
- package/assets/esri/core/workers/chunks/1c2b17d22f97d56f6212.js +1 -0
- package/assets/esri/core/workers/chunks/{0be38fd63e870341c660.js → 220fcc25578b2ef316da.js} +1 -1
- package/assets/esri/core/workers/chunks/251ceefdea4b345698a4.js +1 -0
- package/assets/esri/core/workers/chunks/28aafc7ea522663909b8.js +1 -0
- package/assets/esri/core/workers/chunks/30749bcd1a7b98a38386.js +1 -0
- package/assets/esri/core/workers/chunks/320a75ff760295d9af91.js +1 -0
- package/assets/esri/core/workers/chunks/{c9f8354d51f701cd69e5.js → 321dcff84c31c739ed93.js} +1 -1
- package/assets/esri/core/workers/chunks/36eb1e0471eb61a6bc38.js +1 -0
- package/assets/esri/core/workers/chunks/{57176c0968e07357126d.js → 3a429bb09b89e84021ab.js} +1 -1
- package/assets/esri/core/workers/chunks/444adb8a310024ec969c.js +1 -0
- package/assets/esri/core/workers/chunks/48aebd650b6eccde01f8.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/4f7459402b5910288ab1.js +1 -0
- package/assets/esri/core/workers/chunks/4fcd94fbf7c68996ad31.js +1 -0
- package/assets/esri/core/workers/chunks/573ad8aa1c2cfad61eb8.js +1 -0
- package/assets/esri/core/workers/chunks/5e12871a267742de6d22.js +1 -0
- package/assets/esri/core/workers/chunks/5f3104051f5267c58dda.js +2 -0
- package/assets/esri/core/workers/chunks/{76d0c4d6192449f22e51.js.LICENSE.txt → 5f3104051f5267c58dda.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/{f350378a0d93dda39425.js → 7205c1680afee0cc0aac.js} +1 -1
- package/assets/esri/core/workers/chunks/77b3dff9fdcfe1222749.js +1 -0
- package/assets/esri/core/workers/chunks/77c29cfa3d245ff0afa0.js +1 -0
- package/assets/esri/core/workers/chunks/82dac92c1c611dea077f.js +1 -0
- package/assets/esri/core/workers/chunks/831283ac6653d7af90b6.js +1 -0
- package/assets/esri/core/workers/chunks/8485562b452686c6c3f2.js +1 -0
- package/assets/esri/core/workers/chunks/85a39b0f928f817a4b1b.js +1 -0
- package/assets/esri/core/workers/chunks/882fec2317740f6c118f.js +1 -0
- package/assets/esri/core/workers/chunks/8e1ac19a6188da157c0b.js +1 -0
- package/assets/esri/core/workers/chunks/8e2723dbc09400202aea.js +1 -0
- package/assets/esri/core/workers/chunks/{d3860693a40394723c99.js → 9249371cb2437e68a304.js} +1 -1
- package/assets/esri/core/workers/chunks/9528dfed701ad37ea551.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/{419f4aaecc4231fdd171.js → 9dc0331885cb8150d9ca.js} +1 -1
- package/assets/esri/core/workers/chunks/9ebf8288046aa0fa51f1.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/a0b8164928a331ffc1b4.js +2 -0
- package/assets/esri/core/workers/chunks/{5c71a14417cdd11a1e8d.js.LICENSE.txt → a0b8164928a331ffc1b4.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a6e3783cc10fb505473e.js +1 -0
- package/assets/esri/core/workers/chunks/a6fec91863abaa670301.js +2 -0
- package/assets/esri/core/workers/chunks/{359297c87764ae8db386.js.LICENSE.txt → a6fec91863abaa670301.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/a98cdf10ff7b2923abd5.js +1 -0
- package/assets/esri/core/workers/chunks/aa43b12a71957da2e678.js +1 -0
- package/assets/esri/core/workers/chunks/ac85f9d88f5583407d66.js +1 -0
- package/assets/esri/core/workers/chunks/{418988591e8068adefe2.js → b7c2244c27790ccaca92.js} +1 -1
- package/assets/esri/core/workers/chunks/da70e2c191e7d1d2df64.js +1 -0
- package/assets/esri/core/workers/chunks/dbded06d7a944dd97b01.js +1 -0
- package/assets/esri/core/workers/chunks/dcf857dc23b152fe74ff.js +1 -0
- package/assets/esri/core/workers/chunks/dcfc48bf5c27774fa05c.js +1 -0
- package/assets/esri/core/workers/chunks/dd368833c042127360ad.js +1 -0
- package/assets/esri/core/workers/chunks/e4049e498b3eaa9c8596.js +1 -0
- package/assets/esri/core/workers/chunks/e730a930d8a551552db5.js +1 -0
- package/assets/esri/core/workers/chunks/eb55835b8d3829f75e1e.js +1 -0
- package/assets/esri/core/workers/chunks/ef6fc6c92eae4f51e689.js +2 -0
- package/assets/esri/core/workers/chunks/{931063b2654ff763d15e.js.LICENSE.txt → ef6fc6c92eae4f51e689.js.LICENSE.txt} +1 -1
- package/assets/esri/core/workers/chunks/f4124bf5b674811332bd.js.LICENSE.txt +1 -1
- package/assets/esri/core/workers/chunks/fd03cd19d0d4db699dca.js +1 -0
- package/assets/esri/libs/vxl/vxlLayer.wasm +0 -0
- package/assets/esri/themes/base/widgets/_Directions.scss +4 -0
- package/assets/esri/themes/base/widgets/_Grid.scss +8 -2
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/libtess-asm.js +1 -1
- package/chunks/libtess.js +1 -1
- package/chunks/vec32.js +1 -1
- package/chunks/vxlLayer.js +1 -1
- package/core/PooledArray.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/scheduling.js +1 -1
- package/core/sql.js +1 -1
- package/geometry/ellipsoidUtils.js +1 -1
- package/geometry/libtess.js +1 -1
- package/geometry/support/meshUtils/loadExternal.js +1 -1
- package/geometry/support/meshUtils/loadGLTFMesh.js +1 -1
- package/interfaces.d.ts +391 -49
- package/layers/BuildingSceneLayer.js +1 -1
- package/layers/GeoJSONLayer.js +1 -1
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/IntegratedMeshLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/OGCFeatureLayer.js +1 -1
- package/layers/PointCloudLayer.js +1 -1
- package/layers/SceneLayer.js +1 -1
- package/layers/VoxelLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/buildingSublayers/BuildingComponentSublayer.js +1 -1
- package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
- package/layers/graphics/sources/WFSSource.js +1 -1
- package/layers/graphics/sources/support/uploads.js +1 -1
- package/layers/mixins/SceneService.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/support/I3SIndexInfo.js +1 -1
- package/layers/support/Sublayer.js +1 -1
- package/layers/support/associatedFeatureServiceUtils.js +1 -1
- package/layers/support/rasterDatasets/WCSRaster.js +1 -1
- package/layers/support/rasterFunctions/BandArithmeticFunction.js +1 -1
- package/layers/support/rasterFunctions/bandIndexUtils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/buildingSceneLayerItem.js +1 -1
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/integratedMeshLayerItem.js +1 -1
- package/portal/schemas/pointCloudLayerItem.js +1 -1
- package/portal/schemas/sceneLayerItem.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLayerView2D.js +1 -1
- package/views/2d/layers/SubtypeGroupLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +5 -0
- package/views/2d/layers/features/layerAdapters/featureReductionUtils.js +5 -0
- package/views/2d/layers/features/layerAdapters/floorFilterUtils.js +5 -0
- package/views/2d/layers/features/support/NormalizedField.js +1 -1
- package/views/2d/layers/support/DebugOverlay.js +1 -1
- package/views/3d/analysis/AnalysisView3D.js +1 -1
- package/views/3d/analysis/Dimension/lengthDimensionUtils.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesViewPerformanceInfo.js +5 -0
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SUtil.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/i3s/PagedNodeIndex.js +1 -1
- package/views/3d/layers/support/DefinitionExpressionSceneLayerView.js +1 -1
- package/views/3d/layers/support/TemporalSceneLayerView.js +1 -1
- package/views/3d/layers/support/Tiles3DIntersectionHandler.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/SphericalPatch.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodeCollection.js +1 -1
- package/views/3d/webgl-engine/effects/ScreenSpaceGeometry.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
- package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
- package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/glUtil3D.js +1 -1
- package/views/3d/webgl-engine/lib/rendererUtils.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/interactive/AnalysisToolBase.js +1 -1
- package/views/interactive/tooltip/Tooltip.js +1 -1
- package/views/interactive/tooltip/content/TooltipContent.js +1 -1
- package/views/layers/DimensionLayerView.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/widgets/BasemapLayerList/BasemapLayerListVisibleElements.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/DirectionalPad/DirectionalPadViewModel.d.ts +4 -0
- package/widgets/DirectionalPad.d.ts +4 -0
- package/widgets/Directions/css.js +1 -1
- package/widgets/Directions.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/FeatureTable/FieldColumn.js +1 -1
- package/widgets/FeatureTable/Grid/Column.js +1 -1
- package/widgets/FeatureTable/Grid/Grid.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/LayerList/support/layerListUtils.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/TableList.js +1 -1
- package/widgets/support/AnchorElementViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/040e0122efe1cb716431.js +0 -1
- package/assets/esri/core/workers/chunks/04c89069761f7d6bf69d.js +0 -1
- package/assets/esri/core/workers/chunks/0c05900239e372f49f7e.js +0 -1
- package/assets/esri/core/workers/chunks/104e943cfffd093572a8.js +0 -1
- package/assets/esri/core/workers/chunks/1f5a4da5773ba48addfa.js +0 -1
- package/assets/esri/core/workers/chunks/24087961564e5b8cc20c.js +0 -1
- package/assets/esri/core/workers/chunks/26d8f6e0b9d67c75a781.js +0 -1
- package/assets/esri/core/workers/chunks/3441ae1ee2b11cf2c3f6.js +0 -1
- package/assets/esri/core/workers/chunks/359297c87764ae8db386.js +0 -2
- package/assets/esri/core/workers/chunks/37f71dac3208e74a76fc.js +0 -1
- package/assets/esri/core/workers/chunks/3913cf13681761afa596.js +0 -1
- package/assets/esri/core/workers/chunks/4a4dfe393c4c5e9435f9.js +0 -1
- package/assets/esri/core/workers/chunks/530306592924eb06d30c.js +0 -1
- package/assets/esri/core/workers/chunks/5558e8acc1bee29a0e9b.js +0 -1
- package/assets/esri/core/workers/chunks/587c81abcbe118ea89ae.js +0 -1
- package/assets/esri/core/workers/chunks/5c71a14417cdd11a1e8d.js +0 -2
- package/assets/esri/core/workers/chunks/5db76bdc4916d11cbcfe.js +0 -1
- package/assets/esri/core/workers/chunks/642e652bf21a7fa463c9.js +0 -1
- package/assets/esri/core/workers/chunks/649c3cbf6b3ec94cbdf1.js +0 -1
- package/assets/esri/core/workers/chunks/67e4bec7950f09ffe4a7.js +0 -1
- package/assets/esri/core/workers/chunks/68b2743411ef5e09862b.js +0 -1
- package/assets/esri/core/workers/chunks/76d0c4d6192449f22e51.js +0 -2
- package/assets/esri/core/workers/chunks/78123fa25903d376bd49.js +0 -1
- package/assets/esri/core/workers/chunks/7918a1c53ce9e7c95030.js +0 -1
- package/assets/esri/core/workers/chunks/80498a2a85e1aeadd569.js +0 -1
- package/assets/esri/core/workers/chunks/8407cf549c0c59a206f1.js +0 -1
- package/assets/esri/core/workers/chunks/89299923c92540455513.js +0 -1
- package/assets/esri/core/workers/chunks/8932cdbb7cfab9258d5a.js +0 -1
- package/assets/esri/core/workers/chunks/931063b2654ff763d15e.js +0 -2
- package/assets/esri/core/workers/chunks/969a22814dc765ac1061.js +0 -1
- package/assets/esri/core/workers/chunks/aa4d3276917421abaa12.js +0 -1
- package/assets/esri/core/workers/chunks/be924cb8ab2d40abea6c.js +0 -1
- package/assets/esri/core/workers/chunks/c6d1a6db8cfa0a7e3bd2.js +0 -1
- package/assets/esri/core/workers/chunks/c87e3d55ecdbbb584dfc.js +0 -1
- package/assets/esri/core/workers/chunks/cf9bf7d57341d00a92a6.js +0 -1
- package/assets/esri/core/workers/chunks/d72121b17640e302d6a9.js +0 -1
- package/assets/esri/core/workers/chunks/de01e106ca3daf6c2f49.js +0 -1
- package/assets/esri/core/workers/chunks/e3154ef5dbd851224452.js +0 -1
- package/assets/esri/core/workers/chunks/f0c62bb406bb93b1408a.js +0 -1
- package/assets/esri/core/workers/chunks/f4c4e0fe6be09fa49784.js +0 -1
- package/assets/esri/core/workers/chunks/f64a4349f895f92b6338.js +0 -1
- package/assets/esri/core/workers/chunks/f7a31ac1251c9c0ba713.js +0 -1
- package/assets/esri/core/workers/chunks/f842b3b50059aa70f1af.js +0 -1
- package/assets/esri/core/workers/chunks/fab270f3a45914f8df9e.js +0 -1
package/chunks/libtess.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{g as
|
|
5
|
+
import{g as t}from"./_commonjsHelpers.js";function n(t,n){for(var e=0;e<n.length;e++){const r=n[e];if("string"!=typeof r&&!Array.isArray(r))for(const n in r)if("default"!==n&&!(n in t)){const e=Object.getOwnPropertyDescriptor(r,n);e&&Object.defineProperty(t,n,e.get?e:{enumerable:!0,get:()=>r[n]})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}var e,r,o,i={exports:{}};e=i,r="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,o=function(t={}){var n,e,o=t;o.ready=new Promise(((t,r)=>{n=t,e=r}));var i=Object.assign({},o),a="object"==typeof window,u="function"==typeof importScripts;"object"==typeof process&&"object"==typeof process.versions&&process.versions.node;var f,s="";function c(t){return o.locateFile?o.locateFile(t,s):s+t}(a||u)&&(u?s=self.location.href:"undefined"!=typeof document&&document.currentScript&&(s=document.currentScript.src),r&&(s=r),s=0!==s.indexOf("blob:")?s.substr(0,s.replace(/[?#].*/,"").lastIndexOf("/")+1):"",u&&(f=t=>{var n=new XMLHttpRequest;return n.open("GET",t,!1),n.responseType="arraybuffer",n.send(null),new Uint8Array(n.response)}));var l,p,h=o.print||console.log.bind(console),m=o.printErr||console.error.bind(console);Object.assign(o,i),i=null,o.arguments&&o.arguments,o.thisProgram&&o.thisProgram,o.quit&&o.quit,o.wasmBinary&&(l=o.wasmBinary),"object"!=typeof WebAssembly&&O("no native wasm support detected");var y,d,v=!1;function g(){var t=p.buffer;o.HEAP8=new Int8Array(t),o.HEAP16=new Int16Array(t),o.HEAPU8=y=new Uint8Array(t),o.HEAPU16=new Uint16Array(t),o.HEAP32=new Int32Array(t),o.HEAPU32=d=new Uint32Array(t),o.HEAPF32=new Float32Array(t),o.HEAPF64=new Float64Array(t)}var b=[],w=[],A=[];function E(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)S(o.preRun.shift());q(b)}function R(){q(w)}function P(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)H(o.postRun.shift());q(A)}function S(t){b.unshift(t)}function _(t){w.unshift(t)}function H(t){A.unshift(t)}var j=0,I=null;function x(t){j++,o.monitorRunDependencies?.(j)}function T(t){if(j--,o.monitorRunDependencies?.(j),0==j&&I){var n=I;I=null,n()}}function O(t){o.onAbort?.(t),m(t="Aborted("+t+")"),v=!0,t+=". Build with -sASSERTIONS for more info.";var n=new WebAssembly.RuntimeError(t);throw e(n),n}var W,C="data:application/octet-stream;base64,",F=t=>t.startsWith(C);function M(t){if(t==W&&l)return new Uint8Array(l);if(f)return f(t);throw"both async and sync fetching of the wasm failed"}function U(t){return l||!a&&!u||"function"!=typeof fetch?Promise.resolve().then((()=>M(t))):fetch(t,{credentials:"same-origin"}).then((n=>{if(!n.ok)throw"failed to load wasm binary file at '"+t+"'";return n.arrayBuffer()})).catch((()=>M(t)))}function B(t,n,e){return U(t).then((t=>WebAssembly.instantiate(t,n))).then((t=>t)).then(e,(t=>{m(`failed to asynchronously prepare wasm: ${t}`),O(t)}))}function D(t,n,e,r){return t||"function"!=typeof WebAssembly.instantiateStreaming||F(n)||"function"!=typeof fetch?B(n,e,r):fetch(n,{credentials:"same-origin"}).then((t=>WebAssembly.instantiateStreaming(t,e).then(r,(function(t){return m(`wasm streaming compile failed: ${t}`),m("falling back to ArrayBuffer instantiation"),B(n,e,r)}))))}function k(){var t={a:tt};function n(t,n){return nt=t.exports,p=nt.i,g(),L=nt.m,_(nt.j),T(),nt}function r(t){n(t.instance)}if(x(),o.instantiateWasm)try{return o.instantiateWasm(t,n)}catch(i){m(`Module.instantiateWasm callback failed with error: ${i}`),e(i)}return D(l,W,t,r).catch(e),{}}F(W="libtess.wasm")||(W=c(W));var q=t=>{for(;t.length>0;)t.shift()(o)};o.noExitRuntime;var L,z=()=>{throw 1/0},N=(t,n,e)=>y.copyWithin(t,n,n+e),$=()=>2147483648,Y=t=>{var n=(t-p.buffer.byteLength+65535)/65536;try{return p.grow(n),g(),1}catch(e){}},G=t=>{var n=y.length;t>>>=0;var e=$();if(t>e)return!1;for(var r=(t,n)=>t+(n-t%n)%n,o=1;o<=4;o*=2){var i=n*(1+.2/o);i=Math.min(i,t+100663296);var a=Math.min(e,r(Math.max(t,i),65536));if(Y(a))return!0}return!1},X=[null,[],[]],J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,K=(t,n,e)=>{for(var r=n+e,o=n;t[o]&&!(o>=r);)++o;if(o-n>16&&t.buffer&&J)return J.decode(t.subarray(n,o));for(var i="";n<o;){var a=t[n++];if(128&a){var u=63&t[n++];if(192!=(224&a)){var f=63&t[n++];if((a=224==(240&a)?(15&a)<<12|u<<6|f:(7&a)<<18|u<<12|f<<6|63&t[n++])<65536)i+=String.fromCharCode(a);else{var s=a-65536;i+=String.fromCharCode(55296|s>>10,56320|1023&s)}}else i+=String.fromCharCode((31&a)<<6|u)}else i+=String.fromCharCode(a)}return i},Q=(t,n)=>{var e=X[t];0===n||10===n?((1===t?h:m)(K(e,0)),e.length=0):e.push(n)},V=[],Z=t=>{var n=V[t];return n||(t>=V.length&&(V.length=t+1),V[t]=n=L.get(t)),n},tt={e:z,g:N,f:G,c:(t,n,e,r)=>{for(var o=0,i=0;i<e;i++){var a=d[n>>2],u=d[n+4>>2];n+=8;for(var f=0;f<u;f++)Q(t,y[a+f]);o+=u}return d[r>>2]=o,0},b:ft,h:st,d:ut,a:at},nt=k();o._malloc=t=>(o._malloc=nt.k)(t),o._free=t=>(o._free=nt.l)(t),o._triangulate=(t,n,e,r,i,a)=>(o._triangulate=nt.n)(t,n,e,r,i,a);var et,rt=(t,n)=>(rt=nt.o)(t,n),ot=()=>(ot=nt.p)(),it=t=>(it=nt.q)(t);function at(t,n,e){var r=ot();try{Z(t)(n,e)}catch(o){if(it(r),o!==o+0)throw o;rt(1,0)}}function ut(t,n){var e=ot();try{Z(t)(n)}catch(r){if(it(e),r!==r+0)throw r;rt(1,0)}}function ft(t,n){var e=ot();try{return Z(t)(n)}catch(r){if(it(e),r!==r+0)throw r;rt(1,0)}}function st(t,n,e,r){var o=ot();try{return Z(t)(n,e,r)}catch(i){if(it(o),i!==i+0)throw i;rt(1,0)}}function ct(){function t(){et||(et=!0,o.calledRun=!0,v||(R(),n(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),P()))}j>0||(E(),j>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),t()}),1)):t()))}if(I=function t(){et||ct(),et||(I=t)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();ct();let lt=null,pt=null,ht=null,mt=null;const yt=2,dt=4e3;let vt=0;const gt=(t,n,e)=>{lt||(lt=o._triangulate);let r=o.HEAPF32;const i=o.HEAP32.BYTES_PER_ELEMENT,a=2,u=r.BYTES_PER_ELEMENT;e>vt&&(vt=e,ht&&(o._free(ht),ht=0),pt&&(o._free(pt),pt=0)),ht||(ht=o._malloc(e*u)),mt||(mt=o._malloc(dt*i));const f=e*yt;pt||(pt=o._malloc(f*u)),r=o.HEAPF32,r.set(t,ht/u),o.HEAP32.set(n,mt/i);const s=f/a,c=lt(ht,mt,Math.min(n.length,dt),a,pt,s),l=c*a;r=o.HEAPF32;const p=r.slice(pt/u,pt/u+l),h={};return h.buffer=p,h.vertexCount=c,h};return o.triangulate=gt,t.ready},e.exports=o;var a=i.exports;const u=n({__proto__:null,default:t(a)},[a]);export{u as l};
|
package/chunks/vec32.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function s(t){const n=t[0],a=t[1],s=t[2];return Math.sqrt(n*n+a*a+s*s)}function r(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,s){return t[0]=n,t[1]=a,t[2]=s,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function e(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function c(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function b(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function d(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,s){return t[0]=n[0]+a[0]*s,t[1]=n[1]+a[1]*s,t[2]=n[2]+a[2]*s,t}function x(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return Math.sqrt(a*a+s*s+r*r)}function p(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return a*a+s*s+r*r}function v(t){const n=t[0],a=t[1],s=t[2];return n*n+a*a+s*s}function j(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function z(t,n){const a=n[0],s=n[1],r=n[2];let o=a*a+s*s+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const s=n[0],r=n[1],o=n[2],u=a[0],e=a[1],c=a[2];return t[0]=r*c-o*e,t[1]=o*u-s*c,t[2]=s*e-r*u,t}function A(t,n,a,s){const r=n[0],o=n[1],u=n[2];return t[0]=r+s*(a[0]-r),t[1]=o+s*(a[1]-o),t[2]=u+s*(a[2]-u),t}function D(t,n,a,s,r,o){const u=o*o,e=u*(2*o-3)+1,c=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*e+a[0]*c+s[0]*i+r[0]*h,t[1]=n[1]*e+a[1]*c+s[1]*i+r[1]*h,t[2]=n[2]*e+a[2]*c+s[2]*i+r[2]*h,t}function I(t,n,a,s,r,o){const u=1-o,e=u*u,c=o*o,i=e*u,h=3*o*e,M=3*c*u,f=c*o;return t[0]=n[0]*i+a[0]*h+s[0]*M+r[0]*f,t[1]=n[1]*i+a[1]*h+s[1]*M+r[1]*f,t[2]=n[2]*i+a[2]*h+s[2]*M+r[2]*f,t}function L(t,n){n=n||1;const s=a,r=2*s()*Math.PI,o=2*s()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=o*n,t}function O(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=a[0]*s+a[4]*r+a[8]*o+a[12],t[1]=a[1]*s+a[5]*r+a[9]*o+a[13],t[2]=a[2]*s+a[6]*r+a[10]*o+a[14],t}function S(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=s*a[0]+r*a[3]+o*a[6],t[1]=s*a[1]+r*a[4]+o*a[7],t[2]=s*a[2]+r*a[5]+o*a[8],t}function E(t,n,a){const s=a[0],r=a[1],o=a[2],u=a[3],e=n[0],c=n[1],i=n[2];let h=r*i-o*c,M=o*e-s*i,f=s*c-r*e,l=r*f-o*M,m=o*h-s*f,b=s*M-r*h;const d=2*u;return h*=d,M*=d,f*=d,l*=2,m*=2,b*=2,t[0]=e+h+l,t[1]=c+M+m,t[2]=i+f+b,t}function Q(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0],o[1]=r[1]*Math.cos(s)-r[2]*Math.sin(s),o[2]=r[1]*Math.sin(s)+r[2]*Math.cos(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function T(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[2]*Math.sin(s)+r[0]*Math.cos(s),o[1]=r[1],o[2]=r[2]*Math.cos(s)-r[0]*Math.sin(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0]*Math.cos(s)-r[1]*Math.sin(s),o[1]=r[0]*Math.sin(s)+r[1]*Math.cos(s),o[2]=r[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n){r(B,t),r(C,n),z(B,B),z(C,C);const a=P(B,C);return a>1?0:a<-1?Math.PI:Math.acos(a)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,a){if(t===a)return!0;const s=t[0],r=t[1],o=t[2],u=a[0],e=a[1],c=a[2],i=n();return Math.abs(s-u)<=i*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(r-e)<=i*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))}function J(t,n,a){const s=a[0]-n[0],r=a[1]-n[1],o=a[2]-n[2];let u=s*s+r*r+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=s*u,t[1]=r*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=e,N=c,R=i,U=x,X=p,Y=s,Z=v,V=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:w,bezier:I,ceil:h,copy:r,cross:_,direction:J,dist:U,distance:x,div:R,divide:i,dot:P,equals:H,exactEquals:G,floor:M,hermite:D,inverse:y,len:Y,length:s,lerp:A,max:b,min:m,mul:N,multiply:c,negate:j,normalize:z,random:L,rotateX:Q,rotateY:T,rotateZ:k,round:d,scale:g,scaleAndAdd:q,set:o,sign:l,sqrDist:X,sqrLen:Z,squaredDistance:p,squaredLength:v,str:F,sub:K,subtract:e,transformMat3:S,transformMat4:O,transformQuat:E},Symbol.toStringTag,{value:"Module"}));export{b as A,J as B,j as C,H as D,i as E,Z as F,Y as G,V as H,M as I,k as J,h as K,d as L,y as M,D as N,I as O,L as P,Q,T as R,F as S,N as T,R as U,p as a,_ as b,r as c,w as d,O as e,e as f,u as g,G as h,g as i,P as j,x as k,s as l,v as m,z as n,A as o,q as p,U as q,E as r,o as s,S as t,f as u,
|
|
5
|
+
import{create as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{getEpsilon as n,RANDOM as a}from"../core/libs/gl-matrix-2/math/common.js";function s(t){const n=t[0],a=t[1],s=t[2];return Math.sqrt(n*n+a*a+s*s)}function r(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}function o(t,n,a,s){return t[0]=n,t[1]=a,t[2]=s,t}function u(t,n,a){return t[0]=n[0]+a[0],t[1]=n[1]+a[1],t[2]=n[2]+a[2],t}function e(t,n,a){return t[0]=n[0]-a[0],t[1]=n[1]-a[1],t[2]=n[2]-a[2],t}function c(t,n,a){return t[0]=n[0]*a[0],t[1]=n[1]*a[1],t[2]=n[2]*a[2],t}function i(t,n,a){return t[0]=n[0]/a[0],t[1]=n[1]/a[1],t[2]=n[2]/a[2],t}function h(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}function M(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}function f(t,n){return t[0]=Math.abs(n[0]),t[1]=Math.abs(n[1]),t[2]=Math.abs(n[2]),t}function l(t,n){return t[0]=Math.sign(n[0]),t[1]=Math.sign(n[1]),t[2]=Math.sign(n[2]),t}function m(t,n,a){return t[0]=Math.min(n[0],a[0]),t[1]=Math.min(n[1],a[1]),t[2]=Math.min(n[2],a[2]),t}function b(t,n,a){return t[0]=Math.max(n[0],a[0]),t[1]=Math.max(n[1],a[1]),t[2]=Math.max(n[2],a[2]),t}function d(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}function g(t,n,a){return t[0]=n[0]*a,t[1]=n[1]*a,t[2]=n[2]*a,t}function q(t,n,a,s){return t[0]=n[0]+a[0]*s,t[1]=n[1]+a[1]*s,t[2]=n[2]+a[2]*s,t}function x(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return Math.sqrt(a*a+s*s+r*r)}function p(t,n){const a=n[0]-t[0],s=n[1]-t[1],r=n[2]-t[2];return a*a+s*s+r*r}function v(t){const n=t[0],a=t[1],s=t[2];return n*n+a*a+s*s}function j(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t}function y(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t}function z(t,n){const a=n[0],s=n[1],r=n[2];let o=a*a+s*s+r*r;return o>0&&(o=1/Math.sqrt(o),t[0]=n[0]*o,t[1]=n[1]*o,t[2]=n[2]*o),t}function P(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}function _(t,n,a){const s=n[0],r=n[1],o=n[2],u=a[0],e=a[1],c=a[2];return t[0]=r*c-o*e,t[1]=o*u-s*c,t[2]=s*e-r*u,t}function A(t,n,a,s){const r=n[0],o=n[1],u=n[2];return t[0]=r+s*(a[0]-r),t[1]=o+s*(a[1]-o),t[2]=u+s*(a[2]-u),t}function D(t,n,a,s,r,o){const u=o*o,e=u*(2*o-3)+1,c=u*(o-2)+o,i=u*(o-1),h=u*(3-2*o);return t[0]=n[0]*e+a[0]*c+s[0]*i+r[0]*h,t[1]=n[1]*e+a[1]*c+s[1]*i+r[1]*h,t[2]=n[2]*e+a[2]*c+s[2]*i+r[2]*h,t}function I(t,n,a,s,r,o){const u=1-o,e=u*u,c=o*o,i=e*u,h=3*o*e,M=3*c*u,f=c*o;return t[0]=n[0]*i+a[0]*h+s[0]*M+r[0]*f,t[1]=n[1]*i+a[1]*h+s[1]*M+r[1]*f,t[2]=n[2]*i+a[2]*h+s[2]*M+r[2]*f,t}function L(t,n){n=n||1;const s=a,r=2*s()*Math.PI,o=2*s()-1,u=Math.sqrt(1-o*o)*n;return t[0]=Math.cos(r)*u,t[1]=Math.sin(r)*u,t[2]=o*n,t}function O(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=a[0]*s+a[4]*r+a[8]*o+a[12],t[1]=a[1]*s+a[5]*r+a[9]*o+a[13],t[2]=a[2]*s+a[6]*r+a[10]*o+a[14],t}function S(t,n,a){const s=n[0],r=n[1],o=n[2];return t[0]=s*a[0]+r*a[3]+o*a[6],t[1]=s*a[1]+r*a[4]+o*a[7],t[2]=s*a[2]+r*a[5]+o*a[8],t}function E(t,n,a){const s=a[0],r=a[1],o=a[2],u=a[3],e=n[0],c=n[1],i=n[2];let h=r*i-o*c,M=o*e-s*i,f=s*c-r*e,l=r*f-o*M,m=o*h-s*f,b=s*M-r*h;const d=2*u;return h*=d,M*=d,f*=d,l*=2,m*=2,b*=2,t[0]=e+h+l,t[1]=c+M+m,t[2]=i+f+b,t}function Q(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0],o[1]=r[1]*Math.cos(s)-r[2]*Math.sin(s),o[2]=r[1]*Math.sin(s)+r[2]*Math.cos(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function T(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[2]*Math.sin(s)+r[0]*Math.cos(s),o[1]=r[1],o[2]=r[2]*Math.cos(s)-r[0]*Math.sin(s),t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function k(t,n,a,s){const r=[],o=[];return r[0]=n[0]-a[0],r[1]=n[1]-a[1],r[2]=n[2]-a[2],o[0]=r[0]*Math.cos(s)-r[1]*Math.sin(s),o[1]=r[0]*Math.sin(s)+r[1]*Math.cos(s),o[2]=r[2],t[0]=o[0]+a[0],t[1]=o[1]+a[1],t[2]=o[2]+a[2],t}function w(t,n){r(B,t),r(C,n),z(B,B),z(C,C);const a=P(B,C);return a>1?0:a<-1?Math.PI:Math.acos(a)}const B=t(),C=t();function F(t){return"vec3("+t[0]+", "+t[1]+", "+t[2]+")"}function G(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}function H(t,a){if(t===a)return!0;const s=t[0],r=t[1],o=t[2],u=a[0],e=a[1],c=a[2],i=n();return Math.abs(s-u)<=i*Math.max(1,Math.abs(s),Math.abs(u))&&Math.abs(r-e)<=i*Math.max(1,Math.abs(r),Math.abs(e))&&Math.abs(o-c)<=i*Math.max(1,Math.abs(o),Math.abs(c))}function J(t,n,a){const s=a[0]-n[0],r=a[1]-n[1],o=a[2]-n[2];let u=s*s+r*r+o*o;return u>0?(u=1/Math.sqrt(u),t[0]=s*u,t[1]=r*u,t[2]=o*u,t):(t[0]=0,t[1]=0,t[2]=0,t)}const K=e,N=c,R=i,U=x,X=p,Y=s,Z=v,V=Object.freeze(Object.defineProperty({__proto__:null,abs:f,add:u,angle:w,bezier:I,ceil:h,copy:r,cross:_,direction:J,dist:U,distance:x,div:R,divide:i,dot:P,equals:H,exactEquals:G,floor:M,hermite:D,inverse:y,len:Y,length:s,lerp:A,max:b,min:m,mul:N,multiply:c,negate:j,normalize:z,random:L,rotateX:Q,rotateY:T,rotateZ:k,round:d,scale:g,scaleAndAdd:q,set:o,sign:l,sqrDist:X,sqrLen:Z,squaredDistance:p,squaredLength:v,str:F,sub:K,subtract:e,transformMat3:S,transformMat4:O,transformQuat:E},Symbol.toStringTag,{value:"Module"}));export{b as A,J as B,j as C,H as D,i as E,Z as F,Y as G,V as H,M as I,k as J,h as K,d as L,y as M,D as N,I as O,L as P,Q,T as R,F as S,N as T,R as U,p as a,_ as b,r as c,w as d,O as e,e as f,u as g,G as h,g as i,P as j,x as k,s as l,v as m,z as n,A as o,q as p,U as q,E as r,o as s,S as t,f as u,X as v,m as w,K as x,l as y,c as z};
|
package/chunks/vxlLayer.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{g as e}from"./_commonjsHelpers.js";var r,t,n,o={exports:{}};r=o,t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,n=function(e={}){var r,n,o=e;o.ready=new Promise(((e,t)=>{r=e,n=t}));var a,i,s=Object.assign({},o),u="./this.program",l=!0,d="";function c(e){return o.locateFile?o.locateFile(e,d):d+e}"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),t&&(d=t),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var f,m,p=o.print||console.log.bind(console),h=o.printErr||console.error.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(f=o.wasmBinary),"object"!=typeof WebAssembly&&z("no native wasm support detected");var v,g,_,y,w,E,b,k,x=!1;function F(e,r){e||z(r)}function S(){var e=m.buffer;o.HEAP8=v=new Int8Array(e),o.HEAP16=_=new Int16Array(e),o.HEAPU8=g=new Uint8Array(e),o.HEAPU16=y=new Uint16Array(e),o.HEAP32=w=new Int32Array(e),o.HEAPU32=E=new Uint32Array(e),o.HEAPF32=b=new Float32Array(e),o.HEAPF64=k=new Float64Array(e)}var A=[],P=[],C=[];function D(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)M(o.preRun.shift());K(A)}function T(){o.noFSInit||Fe.init.initialized||Fe.init(),Fe.ignorePermissions=!1,K(P)}function j(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)L(o.postRun.shift());K(C)}function M(e){A.unshift(e)}function B(e){P.unshift(e)}function L(e){C.unshift(e)}var I=0,R=null;function N(e){return e}function O(e){I++,o.monitorRunDependencies&&o.monitorRunDependencies(I)}function W(e){if(I--,o.monitorRunDependencies&&o.monitorRunDependencies(I),0==I&&R){var r=R;R=null,r()}}function z(e){o.onAbort&&o.onAbort(e),h(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var H,Z,U,$="data:application/octet-stream;base64,",q=e=>e.startsWith($);function G(e){if(e==H&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function V(e){return!f&&l&&"function"==typeof fetch?fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>G(e))):Promise.resolve().then((()=>G(e)))}function Y(e,r,t){return V(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{h(`failed to asynchronously prepare wasm: ${e}`),z(e)}))}function X(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||q(r)||"function"!=typeof fetch?Y(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return h(`wasm streaming compile failed: ${e}`),h("falling back to ArrayBuffer instantiation"),Y(r,t,n)}))))}function Q(){var e={a:Fo};function r(e,r){return So=e.exports,m=So.Xa,S(),_r=So.Za,B(So.Ya),W(),So}function t(e){r(e.instance)}if(O(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(a){h(`Module.instantiateWasm callback failed with error: ${a}`),n(a)}return X(f,H,e,t).catch(n),{}}q(H="vxlLayer.wasm")||(H=c(H));var K=e=>{for(;e.length>0;)e.shift()(o)};o.noExitRuntime;var J="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ee=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&J)return J.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},re=(e,r)=>e?ee(g,e,r):"",te=(e,r,t,n)=>{z(`Assertion failed: ${re(e)}, at: `+[r?re(r):"unknown filename",t,n?re(n):"unknown function"])};function ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){E[this.ptr+4>>2]=e},this.get_type=function(){return E[this.ptr+4>>2]},this.set_destructor=function(e){E[this.ptr+8>>2]=e},this.get_destructor=function(){return E[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){E[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return E[this.ptr+16>>2]},this.get_exception_ptr=function(){if(jo(this.get_type()))return E[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var oe=(e,r,t)=>{throw new ne(e).init(r,t),e},ae=e=>(w[To()>>2]=e,e),ie={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=ie.isAbs(e),t="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=ie.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ie.normalize(e.join("/"))},join2:(e,r)=>ie.normalize(e+"/"+r)},se=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);z("initRandomDevice")},ue=e=>(ue=se())(e),le={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=ie.isAbs(n)}return(r?"/":"")+(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=le.resolve(e).substr(1),r=le.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},de=[],ce=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},fe=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function me(e,r,t){var n=t>0?t:ce(e)+1,o=new Array(n),a=fe(e,o,0,o.length);return r&&(o.length=a),o}var pe=()=>{if(!de.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;de=me(e,!0)}return de.shift()},he={ttys:[],init(){},shutdown(){},register(e,r){he.ttys[e]={input:[],output:[],ops:r},Fe.registerDevice(e,he.stream_ops)},stream_ops:{open(e){var r=he.ttys[e.node.rdev];if(!r)throw new Fe.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Fe.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new Fe.ErrnoError(29)}if(void 0===s&&0===a)throw new Fe.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Fe.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(i){throw new Fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>pe(),put_char(e,r){null===r||10===r?(p(ee(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(ee(e.output,0)),e.output=[])},ioctl_tcgets:e=>({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:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(h(ee(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(h(ee(e.output,0)),e.output=[])}}},ve=e=>{z()},ge={ops_table:null,mount:e=>ge.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Fe.isBlkdev(t)||Fe.isFIFO(t))throw new Fe.ErrnoError(63);ge.ops_table||(ge.ops_table={dir:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,lookup:ge.node_ops.lookup,mknod:ge.node_ops.mknod,rename:ge.node_ops.rename,unlink:ge.node_ops.unlink,rmdir:ge.node_ops.rmdir,readdir:ge.node_ops.readdir,symlink:ge.node_ops.symlink},stream:{llseek:ge.stream_ops.llseek}},file:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:{llseek:ge.stream_ops.llseek,read:ge.stream_ops.read,write:ge.stream_ops.write,allocate:ge.stream_ops.allocate,mmap:ge.stream_ops.mmap,msync:ge.stream_ops.msync}},link:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,readlink:ge.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:Fe.chrdev_stream_ops}});var o=Fe.createNode(e,r,t,n);return Fe.isDir(o.mode)?(o.node_ops=ge.ops_table.dir.node,o.stream_ops=ge.ops_table.dir.stream,o.contents={}):Fe.isFile(o.mode)?(o.node_ops=ge.ops_table.file.node,o.stream_ops=ge.ops_table.file.stream,o.usedBytes=0,o.contents=null):Fe.isLink(o.mode)?(o.node_ops=ge.ops_table.link.node,o.stream_ops=ge.ops_table.link.stream):Fe.isChrdev(o.mode)&&(o.node_ops=ge.ops_table.chrdev.node,o.stream_ops=ge.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var o=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Fe.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Fe.isDir(e.mode)?r.size=4096:Fe.isFile(e.mode)?r.size=e.usedBytes:Fe.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ge.resizeFileStorage(e,r.size)},lookup(e,r){throw Fe.genericErrors[44]},mknod:(e,r,t,n)=>ge.createNode(e,r,t,n),rename(e,r,t){if(Fe.isDir(e.mode)){var n;try{n=Fe.lookupNode(r,t)}catch(a){}if(n)for(var o in n.contents)throw new Fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Fe.lookupNode(e,r);for(var n in t.contents)throw new Fe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=ge.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Fe.isLink(e.mode))throw new Fe.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(ge.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Fe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Fe.ErrnoError(28);return n},allocate(e,r,t){ge.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!Fe.isFile(e.node.mode))throw new Fe.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ve()))throw new Fe.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(ge.stream_ops.write(e,r,0,n,t,!1),0)}},_e=(e,r,t,n)=>{var o=n?"":N(`al ${e}`);i(e,(t=>{F(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&W()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&O()},ye=(e,r,t,n,o,a)=>Fe.createDataFile(e,r,t,n,o,a),we=o.preloadPlugins||[],Ee=(e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return we.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o},be=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?le.resolve(ie.join2(e,r)):e;function c(t){function c(t){l&&l(),s||ye(e,r,t,n,o,u),a&&a(),W()}Ee(t,d,c,(()=>{i&&i(),W()}))||c(t)}O(),"string"==typeof t?_e(t,(e=>c(e)),i):c(t)},ke=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},xe=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=le.resolve(e)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((r=Object.assign(t,r)).recurse_count>8)throw new Fe.ErrnoError(32);for(var n=e.split("/").filter((e=>!!e)),o=Fe.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if(o=Fe.lookupNode(o,n[i]),a=ie.join2(a,n[i]),Fe.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow)for(var u=0;Fe.isLink(o.mode);){var l=Fe.readlink(a);if(a=le.resolve(ie.dirname(a),l),o=Fe.lookupPath(a,{recurse_count:r.recurse_count+1}).node,u++>40)throw new Fe.ErrnoError(32)}}return{path:a,node:o}},getPath(e){for(var r;;){if(Fe.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Fe.nameTable.length},hashAddNode(e){var r=Fe.hashName(e.parent.id,e.name);e.name_next=Fe.nameTable[r],Fe.nameTable[r]=e},hashRemoveNode(e){var r=Fe.hashName(e.parent.id,e.name);if(Fe.nameTable[r]===e)Fe.nameTable[r]=e.name_next;else for(var t=Fe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Fe.mayLookup(e);if(t)throw new Fe.ErrnoError(t,e);for(var n=Fe.hashName(e.id,r),o=Fe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Fe.lookup(e,r)},createNode(e,r,t,n){var o=new Fe.FSNode(e,r,t,n);return Fe.hashAddNode(o),o},destroyNode(e){Fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Fe.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=Fe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return Fe.lookupNode(e,r),20}catch(t){}return Fe.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Fe.lookupNode(e,r)}catch(a){return a.errno}var o=Fe.nodePermissions(e,"wx");if(o)return o;if(t){if(!Fe.isDir(n.mode))return 54;if(Fe.isRoot(n)||Fe.getPath(n)===Fe.cwd())return 10}else if(Fe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Fe.isLink(e.mode)?32:Fe.isDir(e.mode)&&("r"!==Fe.flagsToPermissionString(r)||512&r)?31:Fe.nodePermissions(e,Fe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Fe.MAX_OPEN_FDS;e++)if(!Fe.streams[e])return e;throw new Fe.ErrnoError(33)},getStreamChecked(e){var r=Fe.getStream(e);if(!r)throw new Fe.ErrnoError(8);return r},getStream:e=>Fe.streams[e],createStream:(e,r=-1)=>(Fe.FSStream||(Fe.FSStream=function(){this.shared={}},Fe.FSStream.prototype={},Object.defineProperties(Fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Fe.FSStream,e),-1==r&&(r=Fe.nextfd()),e.fd=r,Fe.streams[r]=e,e),closeStream(e){Fe.streams[e]=null},chrdev_stream_ops:{open(e){var r=Fe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Fe.devices[e]={stream_ops:r}},getDevice:e=>Fe.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Fe.syncFSRequests++,Fe.syncFSRequests>1&&h(`warning: ${Fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Fe.getMounts(Fe.root.mount),n=0;function o(e){return Fe.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&Fe.root)throw new Fe.ErrnoError(10);if(!o&&!a){var i=Fe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Fe.isMountpoint(n))throw new Fe.ErrnoError(10);if(!Fe.isDir(n.mode))throw new Fe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Fe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=Fe.lookupPath(e,{follow_mount:!1});if(!Fe.isMountpoint(r.node))throw new Fe.ErrnoError(28);var t=r.node,n=t.mounted,o=Fe.getMounts(n);Object.keys(Fe.nameTable).forEach((e=>{for(var r=Fe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Fe.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Fe.lookupPath(e,{parent:!0}).node,o=ie.basename(e);if(!o||"."===o||".."===o)throw new Fe.ErrnoError(28);var a=Fe.mayCreate(n,o);if(a)throw new Fe.ErrnoError(a);if(!n.node_ops.mknod)throw new Fe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Fe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Fe.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Fe.mkdir(n,r)}catch(a){if(20!=a.errno)throw a}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,Fe.mknod(e,r,t)),symlink(e,r){if(!le.resolve(e))throw new Fe.ErrnoError(44);var t=Fe.lookupPath(r,{parent:!0}).node;if(!t)throw new Fe.ErrnoError(44);var n=ie.basename(r),o=Fe.mayCreate(t,n);if(o)throw new Fe.ErrnoError(o);if(!t.node_ops.symlink)throw new Fe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=ie.dirname(e),a=ie.dirname(r),i=ie.basename(e),s=ie.basename(r);if(t=Fe.lookupPath(e,{parent:!0}).node,n=Fe.lookupPath(r,{parent:!0}).node,!t||!n)throw new Fe.ErrnoError(44);if(t.mount!==n.mount)throw new Fe.ErrnoError(75);var u,l=Fe.lookupNode(t,i),d=le.relative(e,a);if("."!==d.charAt(0))throw new Fe.ErrnoError(28);if("."!==(d=le.relative(r,o)).charAt(0))throw new Fe.ErrnoError(55);try{u=Fe.lookupNode(n,s)}catch(m){}if(l!==u){var c=Fe.isDir(l.mode),f=Fe.mayDelete(t,i,c);if(f)throw new Fe.ErrnoError(f);if(f=u?Fe.mayDelete(n,s,c):Fe.mayCreate(n,s))throw new Fe.ErrnoError(f);if(!t.node_ops.rename)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(l)||u&&Fe.isMountpoint(u))throw new Fe.ErrnoError(10);if(n!==t&&(f=Fe.nodePermissions(t,"w")))throw new Fe.ErrnoError(f);Fe.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(m){throw m}finally{Fe.hashAddNode(l)}}},rmdir(e){var r=Fe.lookupPath(e,{parent:!0}).node,t=ie.basename(e),n=Fe.lookupNode(r,t),o=Fe.mayDelete(r,t,!0);if(o)throw new Fe.ErrnoError(o);if(!r.node_ops.rmdir)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);r.node_ops.rmdir(r,t),Fe.destroyNode(n)},readdir(e){var r=Fe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Fe.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Fe.lookupPath(e,{parent:!0}).node;if(!r)throw new Fe.ErrnoError(44);var t=ie.basename(e),n=Fe.lookupNode(r,t),o=Fe.mayDelete(r,t,!1);if(o)throw new Fe.ErrnoError(o);if(!r.node_ops.unlink)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);r.node_ops.unlink(r,t),Fe.destroyNode(n)},readlink(e){var r=Fe.lookupPath(e).node;if(!r)throw new Fe.ErrnoError(44);if(!r.node_ops.readlink)throw new Fe.ErrnoError(28);return le.resolve(Fe.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Fe.lookupPath(e,{follow:!r}).node;if(!t)throw new Fe.ErrnoError(44);if(!t.node_ops.getattr)throw new Fe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Fe.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Fe.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Fe.chmod(e,r,!0)},fchmod(e,r){var t=Fe.getStreamChecked(e);Fe.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Fe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Fe.chown(e,r,t,!0)},fchown(e,r,t){var n=Fe.getStreamChecked(e);Fe.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Fe.ErrnoError(28);var t;if(!(t="string"==typeof e?Fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);if(Fe.isDir(t.mode))throw new Fe.ErrnoError(31);if(!Fe.isFile(t.mode))throw new Fe.ErrnoError(28);var n=Fe.nodePermissions(t,"w");if(n)throw new Fe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Fe.getStreamChecked(e);if(0==(2097155&t.flags))throw new Fe.ErrnoError(28);Fe.truncate(t.node,r)},utime(e,r,t){var n=Fe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Fe.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?ke(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=ie.normalize(e);try{n=Fe.lookupPath(e,{follow:!(131072&r)}).node}catch(u){}}var a=!1;if(64&r)if(n){if(128&r)throw new Fe.ErrnoError(20)}else n=Fe.mknod(e,t,0),a=!0;if(!n)throw new Fe.ErrnoError(44);if(Fe.isChrdev(n.mode)&&(r&=-513),65536&r&&!Fe.isDir(n.mode))throw new Fe.ErrnoError(54);if(!a){var i=Fe.mayOpen(n,r);if(i)throw new Fe.ErrnoError(i)}512&r&&!a&&Fe.truncate(n,0),r&=-131713;var s=Fe.createStream({node:n,path:Fe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(Fe.readFiles||(Fe.readFiles={}),e in Fe.readFiles||(Fe.readFiles[e]=1)),s},close(e){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{Fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Fe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(1==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.read)throw new Fe.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Fe.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.write)throw new Fe.ErrnoError(28);e.seekable&&1024&e.flags&&Fe.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Fe.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(r<0||t<=0)throw new Fe.ErrnoError(28);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(!Fe.isFile(e.node.mode)&&!Fe.isDir(e.node.mode))throw new Fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new Fe.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Fe.ErrnoError(2);if(1==(2097155&e.flags))throw new Fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new Fe.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Fe.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Fe.open(e,r.flags),o=Fe.stat(e).size,a=new Uint8Array(o);return Fe.read(n,a,0,o,0),"utf8"===r.encoding?t=ee(a,0):"binary"===r.encoding&&(t=a),Fe.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=Fe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ce(r)+1),a=fe(r,o,0,o.length);Fe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Fe.write(n,r,0,r.byteLength,void 0,t.canOwn)}Fe.close(n)},cwd:()=>Fe.currentPath,chdir(e){var r=Fe.lookupPath(e,{follow:!0});if(null===r.node)throw new Fe.ErrnoError(44);if(!Fe.isDir(r.node.mode))throw new Fe.ErrnoError(54);var t=Fe.nodePermissions(r.node,"x");if(t)throw new Fe.ErrnoError(t);Fe.currentPath=r.path},createDefaultDirectories(){Fe.mkdir("/tmp"),Fe.mkdir("/home"),Fe.mkdir("/home/web_user")},createDefaultDevices(){Fe.mkdir("/dev"),Fe.registerDevice(Fe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Fe.mkdev("/dev/null",Fe.makedev(1,3)),he.register(Fe.makedev(5,0),he.default_tty_ops),he.register(Fe.makedev(6,0),he.default_tty1_ops),Fe.mkdev("/dev/tty",Fe.makedev(5,0)),Fe.mkdev("/dev/tty1",Fe.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ue(e).byteLength),e[--r]);Fe.createDevice("/dev","random",t),Fe.createDevice("/dev","urandom",t),Fe.mkdir("/dev/shm"),Fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Fe.mkdir("/proc");var e=Fe.mkdir("/proc/self");Fe.mkdir("/proc/self/fd"),Fe.mount({mount(){var r=Fe.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Fe.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?Fe.createDevice("/dev","stdin",o.stdin):Fe.symlink("/dev/tty","/dev/stdin"),o.stdout?Fe.createDevice("/dev","stdout",null,o.stdout):Fe.symlink("/dev/tty","/dev/stdout"),o.stderr?Fe.createDevice("/dev","stderr",null,o.stderr):Fe.symlink("/dev/tty1","/dev/stderr"),Fe.open("/dev/stdin",0),Fe.open("/dev/stdout",1),Fe.open("/dev/stderr",1)},ensureErrnoError(){Fe.ErrnoError||(Fe.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Fe.ErrnoError.prototype=new Error,Fe.ErrnoError.prototype.constructor=Fe.ErrnoError,[44].forEach((e=>{Fe.genericErrors[e]=new Fe.ErrnoError(e),Fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){Fe.ensureErrnoError(),Fe.nameTable=new Array(4096),Fe.mount(ge,{},"/"),Fe.createDefaultDirectories(),Fe.createDefaultDevices(),Fe.createSpecialDirectories(),Fe.filesystems={MEMFS:ge}},init(e,r,t){Fe.init.initialized=!0,Fe.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,Fe.createStandardStreams()},quit(){Fe.init.initialized=!1;for(var e=0;e<Fe.streams.length;e++){var r=Fe.streams[e];r&&Fe.close(r)}},findObject(e,r){var t=Fe.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=Fe.lookupPath(e,{follow:!r})).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=Fe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=ie.basename(e),n=Fe.lookupPath(e,{follow:!r}),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(e,r,t,n){e="string"==typeof e?e:Fe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=ie.join2(e,a);try{Fe.mkdir(i)}catch(s){}e=i}}return i},createFile(e,r,t,n,o){var a=ie.join2("string"==typeof e?e:Fe.getPath(e),r),i=xe(n,o);return Fe.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:Fe.getPath(e),i=r?ie.join2(e,r):e);var s=xe(n,o),u=Fe.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}Fe.chmod(u,146|s);var f=Fe.open(u,577);Fe.write(f,t,0,t.length,0,a),Fe.close(f),Fe.chmod(u,s)}return u},createDevice(e,r,t,n){var o=ie.join2("string"==typeof e?e:Fe.getPath(e),r),a=xe(!!t,!!n);Fe.createDevice.major||(Fe.createDevice.major=64);var i=Fe.makedev(Fe.createDevice.major++,0);return Fe.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(l){throw new Fe.ErrnoError(29)}if(void 0===u&&0===i)throw new Fe.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(s){throw new Fe.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),Fe.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.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.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=me(a(e.url),!0),e.usedBytes=e.contents.length}catch(r){throw new Fe.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>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="+e+"-"+r),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||[]):me(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!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},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=Fe.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.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++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return Fe.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(Fe.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{Fe.forceLoadFile(s);var a=ve();if(!a)throw new Fe.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},Se={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(ie.isAbs(r))return r;var n;if(n=-100===e?Fe.cwd():Se.getStreamFromFD(e).path,0==r.length){if(!t)throw new Fe.ErrnoError(44);return n}return ie.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(s){if(s&&s.node&&ie.normalize(r)!==ie.normalize(Fe.getPath(s.node)))return-54;throw s}w[t>>2]=n.dev,w[t+4>>2]=n.mode,E[t+8>>2]=n.nlink,w[t+12>>2]=n.uid,w[t+16>>2]=n.gid,w[t+20>>2]=n.rdev,U=[n.size>>>0,(Z=n.size,+Math.abs(Z)>=1?Z>0?+Math.floor(Z/4294967296)>>>0:~~+Math.ceil((Z-+(~~Z>>>0))/4294967296)>>>0:0)],w[t+24>>2]=U[0],w[t+28>>2]=U[1],w[t+32>>2]=4096,w[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return U=[Math.floor(o/1e3)>>>0,(Z=Math.floor(o/1e3),+Math.abs(Z)>=1?Z>0?+Math.floor(Z/4294967296)>>>0:~~+Math.ceil((Z-+(~~Z>>>0))/4294967296)>>>0:0)],w[t+40>>2]=U[0],w[t+44>>2]=U[1],E[t+48>>2]=o%1e3*1e3,U=[Math.floor(a/1e3)>>>0,(Z=Math.floor(a/1e3),+Math.abs(Z)>=1?Z>0?+Math.floor(Z/4294967296)>>>0:~~+Math.ceil((Z-+(~~Z>>>0))/4294967296)>>>0:0)],w[t+56>>2]=U[0],w[t+60>>2]=U[1],E[t+64>>2]=a%1e3*1e3,U=[Math.floor(i/1e3)>>>0,(Z=Math.floor(i/1e3),+Math.abs(Z)>=1?Z>0?+Math.floor(Z/4294967296)>>>0:~~+Math.ceil((Z-+(~~Z>>>0))/4294967296)>>>0:0)],w[t+72>>2]=U[0],w[t+76>>2]=U[1],E[t+80>>2]=i%1e3*1e3,U=[n.ino>>>0,(Z=n.ino,+Math.abs(Z)>=1?Z>0?+Math.floor(Z/4294967296)>>>0:~~+Math.ceil((Z-+(~~Z>>>0))/4294967296)>>>0:0)],w[t+88>>2]=U[0],w[t+92>>2]=U[1],0},doMsync(e,r,t,n,o){if(!Fe.isFile(r.node.mode))throw new Fe.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);Fe.msync(r,a,o,t,n)},varargs:void 0,get(){var e=w[+Se.varargs>>2];return Se.varargs+=4,e},getp:()=>Se.get(),getStr:e=>re(e),getStreamFromFD:e=>Fe.getStreamChecked(e)};function Ae(e,r,t){Se.varargs=t;try{var n=Se.getStreamFromFD(e);switch(r){case 0:if((o=Se.get())<0)return-28;for(;Fe.streams[o];)o++;return Fe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Se.get();return n.flags|=o,0;case 5:return o=Se.getp(),_[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(a){if(void 0===Fe||"ErrnoError"!==a.name)throw a;return-a.errno}}function Pe(e,r,t){Se.varargs=t;try{var n=Se.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=Se.getp();w[a>>2]=o.c_iflag||0,w[a+4>>2]=o.c_oflag||0,w[a+8>>2]=o.c_cflag||0,w[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=Se.getp();var s=w[a>>2],u=w[a+4>>2],l=w[a+8>>2],d=w[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=Se.getp(),w[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=Se.getp(),Fe.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=Se.getp(),_[a>>1]=f[0],_[a+2>>1]=f[1]}return 0;default:return-28}}catch(m){if(void 0===Fe||"ErrnoError"!==m.name)throw m;return-m.errno}}function Ce(e,r,t,n){Se.varargs=n;try{r=Se.getStr(r),r=Se.calculateAt(e,r);var o=n?Se.get():0;return Fe.open(r,t,o).fd}catch(a){if(void 0===Fe||"ErrnoError"!==a.name)throw a;return-a.errno}}var De={},Te=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function je(e){return this.fromWireType(w[e>>2])}var Me,Be,Le,Ie={},Re={},Ne={},Oe=e=>{throw new Me(e)},We=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Oe("Mismatched type converter count");for(var o=0;o<e.length;++o)Ge(e[o],n[o])}e.forEach((function(e){Ne[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Re.hasOwnProperty(e)?o[r]=Re[e]:(a.push(e),Ie.hasOwnProperty(e)||(Ie[e]=[]),Ie[e].push((()=>{o[r]=Re[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},ze=e=>{var r=De[e];delete De[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));We([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),Te(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:Ve,readValueFromPointer:je,destructorFunction:n}]}))},He=(e,r,t,n,o)=>{},Ze=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);Be=e},Ue=e=>{for(var r="",t=e;g[t];)r+=Be[g[t++]];return r},$e=e=>{throw new Le(e)};function qe(e,r,t={}){var n=r.name;if(e||$e(`type "${n}" must have a positive integer typeid pointer`),Re.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;$e(`Cannot register type '${n}' twice`)}if(Re[e]=r,delete Ne[e],Ie.hasOwnProperty(e)){var o=Ie[e];delete Ie[e],o.forEach((e=>e()))}}function Ge(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return qe(e,r,t)}var Ve=8,Ye=(e,r,t,n)=>{Ge(e,{name:r=Ue(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:Ve,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})};function Xe(){Object.assign(Qe.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Qe(){this.allocated=[void 0],this.freelist=[]}var Ke=new Qe,Je=e=>{e>=Ke.reserved&&0==--Ke.get(e).refcount&&Ke.free(e)},er=()=>{for(var e=0,r=Ke.reserved;r<Ke.allocated.length;++r)void 0!==Ke.allocated[r]&&++e;return e},rr=()=>{Ke.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Ke.reserved=Ke.allocated.length,o.count_emval_handles=er},tr={toValue:e=>(e||$e("Cannot use deleted val. handle = "+e),Ke.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Ke.allocate({refcount:1,value:e})}}},nr=(e,r)=>{Ge(e,{name:r=Ue(r),fromWireType:e=>{var r=tr.toValue(e);return Je(e),r},toWireType:(e,r)=>tr.toHandle(r),argPackAdvance:Ve,readValueFromPointer:je,destructorFunction:null})},or=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||$e(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},ar=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&$e(`Cannot register public name '${e}' twice`),or(o,e,e),o.hasOwnProperty(t)&&$e(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))},ir=(e,r,t)=>{switch(r){case 1:return t?function(e){return this.fromWireType(v[e>>0])}:function(e){return this.fromWireType(g[e>>0])};case 2:return t?function(e){return this.fromWireType(_[e>>1])}:function(e){return this.fromWireType(y[e>>1])};case 4:return t?function(e){return this.fromWireType(w[e>>2])}:function(e){return this.fromWireType(E[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},sr=(e,r,t,n)=>{function o(){}r=Ue(r),o.values={},Ge(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:Ve,readValueFromPointer:ir(r,t,n),destructorFunction:null}),ar(r,o)},ur=48,lr=57,dr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=ur&&r<=lr?`_${e}`:e};function cr(e,r){return{[e=dr(e)]:function(){return r.apply(this,arguments)}}[e]}var fr=e=>{var r=Co(e),t=Ue(r);return Ao(r),t},mr=(e,r)=>{var t=Re[e];return void 0===t&&$e(r+" has unknown type "+fr(e)),t},pr=(e,r,t)=>{var n=mr(e,"enum");r=Ue(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:cr(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},hr=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},vr=(e,r,t)=>{Ge(e,{name:r=Ue(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:Ve,readValueFromPointer:hr(r,t),destructorFunction:null})};function gr(e,r,t,n,o,a){var i=r.length;i<2&&$e("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),m=[],p=[];return function(){var t;arguments.length!==c&&$e(`function ${e} called with ${arguments.length} arguments, expected ${c}`),p.length=0,m.length=s?2:1,m[0]=o,s&&(t=r[1].toWireType(p,this),m[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(p,arguments[a]),m.push(f[a]);function i(e){if(u)Te(p);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}return i(n.apply(null,m))}}var _r,yr,wr=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(E[r+4*n>>2]);return t},Er=(e,r,t)=>{o.hasOwnProperty(e)||Oe("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},br=(e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)},kr=[],xr=e=>{var r=kr[e];return r||(e>=kr.length&&(kr.length=e+1),kr[e]=r=_r.get(e)),r},Fr=(e,r,t)=>e.includes("j")?br(e,r,t):xr(r).apply(null,t),Sr=(e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),Fr(e,r,t)}},Ar=(e,r)=>{function t(){return e.includes("j")?Sr(e,r):xr(r)}e=Ue(e);var n=t();return"function"!=typeof n&&$e(`unknown function pointer with signature ${e}: ${r}`),n},Pr=(e,r)=>{var t=cr(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Cr=(e,r)=>{var t=[],n={};function o(e){n[e]||Re[e]||(Ne[e]?Ne[e].forEach(o):(t.push(e),n[e]=!0))}throw r.forEach(o),new yr(`${e}: `+t.map(fr).join([", "]))},Dr=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(F(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e},Tr=(e,r,t,n,o,a,i)=>{var s=wr(r,t);e=Ue(e),e=Dr(e),o=Ar(n,o),ar(e,(function(){Cr(`Cannot call ${e} due to unbound types`,s)}),r-1),We([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return Er(e,gr(e,n,null,o,a),r-1),[]}))},jr=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>g[e>>0];case 2:return t?e=>_[e>>1]:e=>y[e>>1];case 4:return t?e=>w[e>>2]:e=>E[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Mr=(e,r,t,n,o)=>{r=Ue(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned"),u=(e,r)=>{};Ge(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return u(r,this.name),r>>>0}:function(e,r){return u(r,this.name),r},argPackAdvance:Ve,readValueFromPointer:jr(r,t,0!==n),destructorFunction:null})},Br=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=E[e>>2],t=E[e+4>>2];return new n(v.buffer,t,r)}Ge(e,{name:t=Ue(t),fromWireType:o,argPackAdvance:Ve,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})};function Lr(e){return this.fromWireType(E[e>>2])}var Ir=(e,r,t)=>fe(e,g,r,t),Rr=(e,r)=>{var t="std::string"===(r=Ue(r));Ge(e,{name:r,fromWireType(e){var r,n=E[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==g[s]){var u=re(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(g[o+i]);r=l.join("")}return Ao(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||$e("Cannot pass non-string to std::string"),n=t&&o?ce(r):r.length;var a=Po(4+n+1),i=a+4;if(E[a>>2]=n,t&&o)Ir(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(Ao(i),$e("String has UTF-16 code units that do not fit in 8 bits")),g[i+s]=u}else for(s=0;s<n;++s)g[i+s]=r[s];return null!==e&&e.push(Ao,a),a},argPackAdvance:Ve,readValueFromPointer:Lr,destructorFunction(e){Ao(e)}})},Nr="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Or=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&y[n];)++n;if((t=n<<1)-e>32&&Nr)return Nr.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=_[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Wr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);_[r>>1]=i,r+=2}return _[r>>1]=0,r-n},zr=e=>2*e.length,Hr=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=w[e+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},Zr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),w[r>>2]=i,(r+=4)+4>o)break}return w[r>>2]=0,r-n},Ur=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},$r=(e,r,t)=>{var n,o,a,i,s;t=Ue(t),2===r?(n=Or,o=Wr,i=zr,a=()=>y,s=1):4===r&&(n=Hr,o=Zr,i=Ur,a=()=>E,s=2),Ge(e,{name:t,fromWireType:e=>{for(var t,o=E[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return Ao(e),t},toWireType:(e,n)=>{"string"!=typeof n&&$e(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=Po(4+a+r);return E[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(Ao,u),u},argPackAdvance:Ve,readValueFromPointer:je,destructorFunction(e){Ao(e)}})},qr=(e,r,t,n,o,a)=>{De[e]={name:Ue(r),rawConstructor:Ar(t,n),rawDestructor:Ar(o,a),fields:[]}},Gr=(e,r,t,n,o,a,i,s,u,l)=>{De[e].fields.push({fieldName:Ue(r),getterReturnType:t,getter:Ar(n,o),getterContext:a,setterArgumentType:i,setter:Ar(s,u),setterContext:l})},Vr=(e,r)=>{Ge(e,{isVoid:!0,name:r=Ue(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Yr=e=>{do{var r=E[e>>2],t=E[(e+=4)>>2],n=E[(e+=4)>>2];e+=4;var o=re(r);Fe.createPath("/",ie.dirname(o),!0,!0),Fe.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(E[e>>2])},Xr=e=>{e>4&&(Ke.get(e).refcount+=1)},Qr={},Kr=e=>{var r=Qr[e];return void 0===r?Ue(e):r},Jr=e=>tr.toHandle(Kr(e)),et=()=>tr.toHandle({}),rt=(e,r,t)=>{e=tr.toValue(e),r=tr.toValue(r),t=tr.toValue(t),e[r]=t},tt=(e,r)=>{var t=(e=mr(e,"_emval_take_value")).readValueFromPointer(r);return tr.toHandle(t)},nt=()=>{z("")},ot=(e,r,t)=>g.copyWithin(e,r,r+t),at=()=>2147483648,it=e=>{var r=(e-m.buffer.byteLength+65535)/65536;try{return m.grow(r),S(),1}catch(t){}},st=e=>{var r=g.length;e>>>=0;var t=at();if(e>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(it(i))return!0}return!1},ut=e=>!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")),lt=e=>!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")),dt=e=>!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")),ct={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){ct.lastError||(ct.lastError=e)},getNewId:e=>{for(var r=ct.counter++,t=e.length;t<r;t++)e[t]=null;return r},getSource:(e,r,t,n)=>{for(var o="",a=0;a<r;++a){var i=n?w[n+4*a>>2]:-1;o+=re(w[t+4*a>>2],i<0?void 0:i)}return o},createContext:(e,r)=>{if(o.preinitializedWebGLContext){var t=o.preinitializedWebGLContext;r.majorVersion=Number(t.getParameter(t.VERSION).match(/^WebGL (\d+).\d+/)[1])}else{if(!e.getContextSafariWebGL2Fixed){function n(r,t){var n=e.getContextSafariWebGL2Fixed(r,t);return"webgl"==r==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=n}t=e.getContext("webgl2",r)}return t?ct.registerContext(t,r):0},registerContext:(e,r)=>{var t=ct.getNewId(ct.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),ct.contexts[t]=n,(void 0===r.enableExtensionsByDefault||r.enableExtensionsByDefault)&&ct.initExtensions(n),t},makeContextCurrent:e=>(ct.currentContext=ct.contexts[e],o.ctx=Gn=ct.currentContext&&ct.currentContext.GLctx,!(e&&!Gn)),getContext:e=>ct.contexts[e],deleteContext:e=>{ct.currentContext===ct.contexts[e]&&(ct.currentContext=null),"object"==typeof ft&&ft.removeAllHandlersOnTarget(ct.contexts[e].GLctx.canvas),ct.contexts[e]&&ct.contexts[e].GLctx.canvas&&(ct.contexts[e].GLctx.canvas.GLctxObject=void 0),ct.contexts[e]=null},initExtensions:e=>{if(e||(e=ct.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;ut(r),lt(r),e.version>=2&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!r.disjointTimerQueryExt)&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query")),dt(r),(r.getSupportedExtensions()||[]).forEach((e=>{e.includes("lose_context")||e.includes("debug")||r.getExtension(e)}))}}},ft={inEventHandler:0,removeAllEventListeners(){for(var e=ft.eventHandlers.length-1;e>=0;--e)ft._removeHandler(e);ft.eventHandlers=[],ft.deferredCalls=[]},registerRemoveEventListeners(){ft.removeEventListenersRegistered||(ft.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall(e,r,t){function n(e,r){if(e.length!=r.length)return!1;for(var t in e)if(e[t]!=r[t])return!1;return!0}for(var o in ft.deferredCalls){var a=ft.deferredCalls[o];if(a.targetFunction==e&&n(a.argsList,t))return}ft.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),ft.deferredCalls.sort(((e,r)=>e.precedence<r.precedence))},removeDeferredCalls(e){for(var r=0;r<ft.deferredCalls.length;++r)ft.deferredCalls[r].targetFunction==e&&(ft.deferredCalls.splice(r,1),--r)},canPerformEventHandlerRequests:()=>navigator.userActivation?navigator.userActivation.isActive:ft.inEventHandler&&ft.currentEventHandler.allowsDeferredCalls,runDeferredCalls(){if(ft.canPerformEventHandlerRequests())for(var e=0;e<ft.deferredCalls.length;++e){var r=ft.deferredCalls[e];ft.deferredCalls.splice(e,1),--e,r.targetFunction.apply(null,r.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(e,r)=>{for(var t=0;t<ft.eventHandlers.length;++t)ft.eventHandlers[t].target!=e||r&&r!=ft.eventHandlers[t].eventTypeString||ft._removeHandler(t--)},_removeHandler(e){var r=ft.eventHandlers[e];r.target.removeEventListener(r.eventTypeString,r.eventListenerFunc,r.useCapture),ft.eventHandlers.splice(e,1)},registerOrRemoveHandler(e){if(!e.target)return-4;var r=function(r){++ft.inEventHandler,ft.currentEventHandler=e,ft.runDeferredCalls(),e.handlerFunc(r),ft.runDeferredCalls(),--ft.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=r,e.target.addEventListener(e.eventTypeString,r,e.useCapture),ft.eventHandlers.push(e),ft.registerRemoveEventListeners();else for(var t=0;t<ft.eventHandlers.length;++t)ft.eventHandlers[t].target==e.target&&ft.eventHandlers[t].eventTypeString==e.eventTypeString&&ft._removeHandler(t--);return 0},getNodeNameForTarget:e=>e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":"",fullscreenEnabled:()=>document.fullscreenEnabled||document.webkitFullscreenEnabled},mt=["default","low-power","high-performance"],pt=e=>e>2?re(e):e,ht=[0,document,window],vt=e=>(e=pt(e),ht[e]||document.querySelector(e)),gt=e=>vt(e),_t=(e,r)=>{var t=r>>2,n=w[t+6],o={alpha:!!w[t+0],depth:!!w[t+1],stencil:!!w[t+2],antialias:!!w[t+3],premultipliedAlpha:!!w[t+4],preserveDrawingBuffer:!!w[t+5],powerPreference:mt[n],failIfMajorPerformanceCaveat:!!w[t+7],majorVersion:w[t+8],minorVersion:w[t+9],enableExtensionsByDefault:w[t+10],explicitSwapControl:w[t+11],proxyContextToMainThread:w[t+12],renderViaOffscreenBackBuffer:w[t+13]},a=gt(e);return a?o.explicitSwapControl?0:ct.createContext(a,o):0},yt=e=>{for(var r=e>>2,t=0;t<14;++t)w[r+t]=0;w[r+0]=w[r+1]=w[r+3]=w[r+4]=w[r+8]=w[r+10]=1},wt=e=>ct.makeContextCurrent(e)?0:-5,Et={},bt=()=>u||"./this.program",kt=()=>{if(!kt.strings){var e={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",_:bt()};for(var r in Et)void 0===Et[r]?delete e[r]:e[r]=Et[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);kt.strings=t}return kt.strings},xt=(e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0},Ft=(e,r)=>{var t=0;return kt().forEach(((n,o)=>{var a=r+t;E[e+4*o>>2]=a,xt(n,a),t+=n.length+1})),0},St=(e,r)=>{var t=kt();E[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),E[r>>2]=n,0};function At(e){try{var r=Se.getStreamFromFD(e);return Fe.close(r),0}catch(t){if(void 0===Fe||"ErrnoError"!==t.name)throw t;return t.errno}}var Pt=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=E[r>>2],s=E[r+4>>2];r+=8;var u=Fe.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o};function Ct(e,r,t,n){try{var o=Se.getStreamFromFD(e),a=Pt(o,r,t);return E[n>>2]=a,0}catch(i){if(void 0===Fe||"ErrnoError"!==i.name)throw i;return i.errno}}var Dt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN;function Tt(e,r,t,n,o){var a=Dt(r,t);try{if(isNaN(a))return 61;var i=Se.getStreamFromFD(e);return Fe.llseek(i,a,n),U=[i.position>>>0,(Z=i.position,+Math.abs(Z)>=1?Z>0?+Math.floor(Z/4294967296)>>>0:~~+Math.ceil((Z-+(~~Z>>>0))/4294967296)>>>0:0)],w[o>>2]=U[0],w[o+4>>2]=U[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===Fe||"ErrnoError"!==s.name)throw s;return s.errno}}var jt=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=E[r>>2],s=E[r+4>>2];r+=8;var u=Fe.write(e,v,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o};function Mt(e,r,t,n){try{var o=Se.getStreamFromFD(e),a=jt(o,r,t);return E[n>>2]=a,0}catch(i){if(void 0===Fe||"ErrnoError"!==i.name)throw i;return i.errno}}function Bt(e){Gn.activeTexture(e)}var Lt=(e,r)=>{Gn.attachShader(ct.programs[e],ct.shaders[r])},It=(e,r,t)=>{Gn.bindAttribLocation(ct.programs[e],r,re(t))},Rt=(e,r)=>{35051==e?Gn.currentPixelPackBufferBinding=r:35052==e&&(Gn.currentPixelUnpackBufferBinding=r),Gn.bindBuffer(e,ct.buffers[r])},Nt=(e,r,t)=>{Gn.bindBufferBase(e,r,ct.buffers[t])},Ot=(e,r,t,n,o)=>{Gn.bindBufferRange(e,r,ct.buffers[t],n,o)},Wt=(e,r)=>{Gn.bindFramebuffer(e,ct.framebuffers[r])},zt=(e,r)=>{Gn.bindTexture(e,ct.textures[r])},Ht=e=>{Gn.bindVertexArray(ct.vaos[e])},Zt=(e,r,t,n)=>{t&&r?Gn.bufferData(e,g,n,t,r):Gn.bufferData(e,r,n)},Ut=(e,r,t,n)=>{t&&Gn.bufferSubData(e,r,g,n,t)};function $t(e){Gn.clear(e)}function qt(e,r,t,n){Gn.clearBufferfi(e,r,t,n)}var Gt=(e,r,t)=>{Gn.clearBufferfv(e,r,b,t>>2)},Vt=(e,r,t)=>{Gn.clearBufferiv(e,r,w,t>>2)},Yt=(e,r,t)=>{Gn.clearBufferuiv(e,r,E,t>>2)};function Xt(e,r,t,n){Gn.clearColor(e,r,t,n)}function Qt(e){Gn.clearDepth(e)}function Kt(e){Gn.clearStencil(e)}var Jt=(e,r,t,n)=>{Gn.colorMask(!!e,!!r,!!t,!!n)},en=e=>{Gn.compileShader(ct.shaders[e])},rn=()=>{var e=ct.getNewId(ct.programs),r=Gn.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,ct.programs[e]=r,e},tn=e=>{var r=ct.getNewId(ct.shaders);return ct.shaders[r]=Gn.createShader(e),r},nn=(e,r)=>{for(var t=0;t<e;t++){var n=w[r+4*t>>2],o=ct.buffers[n];o&&(Gn.deleteBuffer(o),o.name=0,ct.buffers[n]=null,n==Gn.currentPixelPackBufferBinding&&(Gn.currentPixelPackBufferBinding=0),n==Gn.currentPixelUnpackBufferBinding&&(Gn.currentPixelUnpackBufferBinding=0))}},on=(e,r)=>{for(var t=0;t<e;++t){var n=w[r+4*t>>2],o=ct.framebuffers[n];o&&(Gn.deleteFramebuffer(o),o.name=0,ct.framebuffers[n]=null)}},an=e=>{if(e){var r=ct.programs[e];r?(Gn.deleteProgram(r),r.name=0,ct.programs[e]=null):ct.recordError(1281)}},sn=(e,r)=>{for(var t=0;t<e;t++){var n=w[r+4*t>>2],o=ct.queries[n];o&&(Gn.deleteQuery(o),ct.queries[n]=null)}},un=e=>{if(e){var r=ct.shaders[e];r?(Gn.deleteShader(r),ct.shaders[e]=null):ct.recordError(1281)}},ln=(e,r)=>{for(var t=0;t<e;t++){var n=w[r+4*t>>2],o=ct.textures[n];o&&(Gn.deleteTexture(o),o.name=0,ct.textures[n]=null)}},dn=(e,r)=>{for(var t=0;t<e;t++){var n=w[r+4*t>>2];Gn.deleteVertexArray(ct.vaos[n]),ct.vaos[n]=null}},cn=(e,r,t)=>{Gn.drawArrays(e,r,t)},fn=[],mn=(e,r)=>{for(var t=fn[e],n=0;n<e;n++)t[n]=w[r+4*n>>2];Gn.drawBuffers(t)},pn=(e,r,t,n)=>{Gn.drawElements(e,r,t,n)},hn=(e,r,t,n,o)=>{Gn.drawElementsInstanced(e,r,t,n,o)},vn=e=>{Gn.enableVertexAttribArray(e)},gn=(e,r,t,n,o)=>{Gn.framebufferTexture2D(e,r,t,ct.textures[n],o)},_n=(e,r,t,n)=>{for(var o=0;o<e;o++){var a=Gn[t](),i=a&&ct.getNewId(n);a?(a.name=i,n[i]=a):ct.recordError(1282),w[r+4*o>>2]=i}},yn=(e,r)=>{_n(e,r,"createBuffer",ct.buffers)},wn=(e,r)=>{_n(e,r,"createFramebuffer",ct.framebuffers)},En=(e,r)=>{_n(e,r,"createQuery",ct.queries)},bn=(e,r)=>{_n(e,r,"createTexture",ct.textures)};function kn(e,r){_n(e,r,"createVertexArray",ct.vaos)}function xn(e){Gn.generateMipmap(e)}var Fn=(e,r)=>{E[e>>2]=r;var t=E[e>>2];E[e+4>>2]=(r-t)/4294967296},Sn=(e,r,t)=>{if(r){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=t&&1!=t&&ct.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=Gn.getParameter(34467);n=o?o.length:0;break;case 33309:if(ct.currentContext.version<2)return void ct.recordError(1282);n=2*(Gn.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(ct.currentContext.version<2)return void ct.recordError(1280);n=33307==e?3:0}if(void 0===n){var a=Gn.getParameter(e);switch(typeof a){case"number":n=a;break;case"boolean":n=a?1:0;break;case"string":return void ct.recordError(1280);case"object":if(null===a)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void ct.recordError(1280)}else{if(a instanceof Float32Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Array){for(var i=0;i<a.length;++i)switch(t){case 0:w[r+4*i>>2]=a[i];break;case 2:b[r+4*i>>2]=a[i];break;case 4:v[r+i>>0]=a[i]?1:0}return}try{n=0|a.name}catch(s){return ct.recordError(1280),void h("GL_INVALID_ENUM in glGet"+t+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+s+")")}}break;default:return ct.recordError(1280),void h("GL_INVALID_ENUM in glGet"+t+"v: Native code calling glGet"+t+"v("+e+") and it returns "+a+" of type "+typeof a+"!")}}switch(t){case 1:Fn(r,n);break;case 0:w[r>>2]=n;break;case 2:b[r>>2]=n;break;case 4:v[r>>0]=n?1:0}}else ct.recordError(1281)},An=(e,r)=>{Sn(e,r,0)},Pn=(e,r,t)=>{if(t){var n,o=ct.queries[e];n=ct.currentContext.version<2?Gn.disjointTimerQueryExt.getQueryObjectEXT(o,r):Gn.getQueryParameter(o,r),Fn(t,"boolean"==typeof n?n?1:0:n)}else ct.recordError(1281)},Cn=(e,r,t)=>{if(t){var n,o=ct.queries[e],a=Gn.disjointTimerQueryExt.getQueryObjectEXT(o,r);n="boolean"==typeof a?a?1:0:a,w[t>>2]=n}else ct.recordError(1281)},Dn=(e,r)=>Gn.getUniformBlockIndex(ct.programs[e],re(r)),Tn=e=>parseInt(e),jn=e=>"]"==e.slice(-1)&&e.lastIndexOf("["),Mn=e=>{var r,t,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},r=0;r<Gn.getProgramParameter(e,35718);++r){var a=Gn.getActiveUniform(e,r),i=a.name,s=a.size,u=jn(i),l=u>0?i.slice(0,u):i,d=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[l]=[s,d],t=0;t<s;++t)n[d]=t,e.uniformArrayNamesById[d++]=l}},Bn=(e,r)=>{if(r=re(r),e=ct.programs[e]){Mn(e);var t=e.uniformLocsById,n=0,o=r,a=jn(r);a>0&&(n=Tn(r.slice(a+1))>>>0,o=r.slice(0,a));var i=e.uniformSizeAndIdsByName[o];if(i&&n<i[0]&&(t[n+=i[1]]=t[n]||Gn.getUniformLocation(e,r)))return n}else ct.recordError(1281);return-1},Ln=e=>{e=ct.programs[e],Gn.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}},In=(e,r)=>{3317==e&&(ct.unpackAlignment=r),Gn.pixelStorei(e,r)},Rn=(e,r)=>{Gn.disjointTimerQueryExt.queryCounterEXT(ct.queries[e],r)};function Nn(e){Gn.readBuffer(e)}var On=e=>0==(e-=5120)?v:1==e?g:2==e?_:4==e?w:6==e?b:5==e||28922==e||28520==e||30779==e||30782==e?E:y,Wn=e=>31-Math.clz32(e.BYTES_PER_ELEMENT),zn=(e,r,t,n,o,a,i)=>{if(Gn.currentPixelPackBufferBinding)Gn.readPixels(e,r,t,n,o,a,i);else{var s=On(a);Gn.readPixels(e,r,t,n,o,a,s,i>>Wn(s))}},Hn=(e,r,t,n)=>{var o=ct.getSource(e,r,t,n);Gn.shaderSource(ct.shaders[e],o)},Zn=(e,r,t,n,o,a,i,s,u,l)=>{if(Gn.currentPixelUnpackBufferBinding)Gn.texImage3D(e,r,t,n,o,a,i,s,u,l);else if(l){var d=On(u);Gn.texImage3D(e,r,t,n,o,a,i,s,u,d,l>>Wn(d))}else Gn.texImage3D(e,r,t,n,o,a,i,s,u,null)};function Un(e,r,t){Gn.texParameteri(e,r,t)}function $n(e,r,t,n,o){Gn.texStorage2D(e,r,t,n,o)}var qn,Gn,Vn=(e,r,t,n,o,a,i,s,u)=>{if(Gn.currentPixelUnpackBufferBinding)Gn.texSubImage2D(e,r,t,n,o,a,i,s,u);else if(u){var l=On(s);Gn.texSubImage2D(e,r,t,n,o,a,i,s,l,u>>Wn(l))}else Gn.texSubImage2D(e,r,t,n,o,a,i,s,null)},Yn=(e,r,t,n,o,a,i,s,u,l,d)=>{if(Gn.currentPixelUnpackBufferBinding)Gn.texSubImage3D(e,r,t,n,o,a,i,s,u,l,d);else if(d){var c=On(l);Gn.texSubImage3D(e,r,t,n,o,a,i,s,u,l,c,d>>Wn(c))}else Gn.texSubImage3D(e,r,t,n,o,a,i,s,u,l,null)},Xn=e=>{var r=Gn.currentProgram;if(r){var t=r.uniformLocsById[e];return"number"==typeof t&&(r.uniformLocsById[e]=t=Gn.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?"["+t+"]":""))),t}ct.recordError(1282)},Qn=(e,r)=>{Gn.uniform1i(Xn(e),r)},Kn=(e,r,t)=>{e=ct.programs[e],Gn.uniformBlockBinding(e,r,t)},Jn=e=>{e=ct.programs[e],Gn.useProgram(e),Gn.currentProgram=e},eo=(e,r,t,n,o)=>{Gn.vertexAttribIPointer(e,r,t,n,o)},ro=(e,r,t,n,o,a)=>{Gn.vertexAttribPointer(e,r,t,!!n,o,a)},to=e=>e%4==0&&(e%100!=0||e%400==0),no=(e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t},oo=[31,29,31,30,31,30,31,31,30,31,30,31],ao=[31,28,31,30,31,30,31,31,30,31,30,31],io=(e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=to(t.getFullYear()),o=t.getMonth(),a=(n?oo:ao)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t},so=(e,r)=>{v.set(e,r)},uo=(e,r,t,n)=>{var o=E[n+40>>2],a={tm_sec:w[n>>2],tm_min:w[n+4>>2],tm_hour:w[n+8>>2],tm_mday:w[n+12>>2],tm_mon:w[n+16>>2],tm_year:w[n+20>>2],tm_wday:w[n+24>>2],tm_yday:w[n+28>>2],tm_isdst:w[n+32>>2],tm_gmtoff:w[n+36>>2],tm_zone:o?re(o):""},i=re(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function m(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function p(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function h(e){var r=io(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=p(t),a=p(n);return m(o,r)<=0?m(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var v={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>h(e).toString().substring(2),"%G":e=>h(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+no(to(e.tm_year+1900)?oo:ao,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&to(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&to(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var g=me(i=i.replace(/\0\0/g,"%"),!1);return g.length>r?0:(so(g,e),g.length-1)},lo=(e,r,t,n,o)=>uo(e,r,t,n),co=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},fo=e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t},mo=(e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),co(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])},po=(e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(fo(r),e);var t=[1];mo(r,t);var n=[0,97,115,109,1,0,0,0,1];co(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f},ho=(e,r)=>{if(qn)for(var t=e;t<e+r;t++){var n=xr(t);n&&qn.set(n,t)}},vo=e=>(qn||(qn=new WeakMap,ho(0,_r.length)),qn.get(e)||0),go=[],_o=()=>{if(go.length)return go.pop();try{_r.grow(1)}catch(h){if(!(h instanceof RangeError))throw h;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return _r.length-1},yo=(e,r)=>{_r.set(e,r),kr[e]=_r.get(e)},wo=(e,r)=>{var t=vo(e);if(t)return t;var n=_o();try{yo(n,e)}catch(h){if(!(h instanceof TypeError))throw h;var o=po(e,r);yo(n,o)}return qn.set(e,n),n},Eo=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Fe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},bo=365,ko=146;Object.defineProperties(Eo.prototype,{read:{get:function(){return(this.mode&bo)===bo},set:function(e){e?this.mode|=bo:this.mode&=~bo}},write:{get:function(){return(this.mode&ko)===ko},set:function(e){e?this.mode|=ko:this.mode&=~ko}},isFolder:{get:function(){return Fe.isDir(this.mode)}},isDevice:{get:function(){return Fe.isChrdev(this.mode)}}}),Fe.FSNode=Eo,Fe.createPreloadedFile=be,Fe.staticInit(),o.FS_createPath=Fe.createPath,o.FS_createDataFile=Fe.createDataFile,o.FS_createPreloadedFile=Fe.createPreloadedFile,o.FS_unlink=Fe.unlink,o.FS_createLazyFile=Fe.createLazyFile,o.FS_createDevice=Fe.createDevice,Me=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Ze(),Le=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Xe(),rr(),yr=o.UnboundTypeError=Pr(Error,"UnboundTypeError");for(var xo=0;xo<32;++xo)fn.push(new Array(xo));var Fo={X:te,m:oe,z:Ae,$:Pe,aa:Ce,ia:ze,Ta:He,ea:Ye,da:nr,F:sr,k:pr,E:vr,e:Tr,g:Mr,f:Br,D:Rr,w:$r,ja:qr,o:Gr,fa:Vr,ga:Yr,a:Je,n:Xr,b:Jr,h:et,c:rt,d:tt,A:nt,ca:ot,ba:st,la:_t,oa:yt,ha:wt,Y:Ft,Z:St,B:At,_:Ct,Sa:Tt,C:Mt,La:Bt,q:Lt,Ca:It,Oa:Rt,Ma:Nt,Na:Ot,t:Wt,i:zt,u:Ht,Va:Zt,P:Ut,S:$t,Ga:qt,y:Gt,Fa:Vt,Q:Yt,Ja:Xt,Ia:Qt,Ha:Kt,ka:Jt,L:en,Da:rn,N:tn,W:nn,T:on,Ea:an,I:sn,p:un,R:ln,K:dn,Pa:cn,Ka:mn,Qa:pn,Ra:hn,qa:vn,s:gn,Wa:yn,U:wn,J:En,xa:bn,ra:kn,sa:xn,v:An,G:Pn,ma:Cn,Ba:Dn,za:Bn,O:Ln,j:In,H:Rn,x:Nn,r:zn,M:Hn,va:Zn,l:Un,wa:$n,ta:Vn,ua:Yn,ya:Qn,Aa:Kn,V:Jn,na:eo,pa:ro,Ua:lo},So=Q(),Ao=o._free=e=>(Ao=o._free=So._a)(e),Po=o._malloc=e=>(Po=o._malloc=So.$a)(e);o.__Z16get_new_requestsi=(e,r)=>(o.__Z16get_new_requestsi=So.ab)(e,r),o.__Z7respondiiN6i3slib3vxl13Wasm_responseE=(e,r,t)=>(o.__Z7respondiiN6i3slib3vxl13Wasm_responseE=So.bb)(e,r,t),o.__Z9add_layerRKNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEjjddddbi=(e,r,t,n,a,i,s,u,l)=>(o.__Z9add_layerRKNSt3__212basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEEjjddddbi=So.cb)(e,r,t,n,a,i,s,u,l),o.__Z12remove_layeri=e=>(o.__Z12remove_layeri=So.db)(e),o.__Z21initialize_voxel_wasmiiiiiiiiddbbb=(e,r,t,n,a,i,s,u,l,d,c,f,m)=>(o.__Z21initialize_voxel_wasmiiiiiiiiddbbb=So.eb)(e,r,t,n,a,i,s,u,l,d,c,f,m),o.__Z23uninitialize_voxel_wasmv=()=>(o.__Z23uninitialize_voxel_wasmv=So.fb)(),o.__Z15set_view_matrixffffffffffffffff=(e,r,t,n,a,i,s,u,l,d,c,f,m,p,h,v)=>(o.__Z15set_view_matrixffffffffffffffff=So.gb)(e,r,t,n,a,i,s,u,l,d,c,f,m,p,h,v),o.__Z21set_projection_matrixffffffffffffffff=(e,r,t,n,a,i,s,u,l,d,c,f,m,p,h,v)=>(o.__Z21set_projection_matrixffffffffffffffff=So.hb)(e,r,t,n,a,i,s,u,l,d,c,f,m,p,h,v),o.__Z12set_near_fardd=(e,r)=>(o.__Z12set_near_fardd=So.ib)(e,r),o.__Z4cullv=()=>(o.__Z4cullv=So.jb)(),o.__Z31update_camera_pos_and_directiondddddd=(e,r,t,n,a,i)=>(o.__Z31update_camera_pos_and_directiondddddd=So.kb)(e,r,t,n,a,i),o.__Z8get_nearv=()=>(o.__Z8get_nearv=So.lb)(),o.__Z7get_farv=()=>(o.__Z7get_farv=So.mb)(),o.__Z17begin_color_framebddd=(e,r,t,n)=>(o.__Z17begin_color_framebddd=So.nb)(e,r,t,n),o.__Z11begin_framev=()=>(o.__Z11begin_framev=So.ob)(),o.__Z32get_texture_units_bound_in_framev=e=>(o.__Z32get_texture_units_bound_in_framev=So.pb)(e),o.__Z23get_active_texture_unitv=()=>(o.__Z23get_active_texture_unitv=So.qb)(),o.__Z12set_viewportii=(e,r)=>(o.__Z12set_viewportii=So.rb)(e,r),o.__Z4drawv=()=>(o.__Z4drawv=So.sb)(),o.__Z11set_qualityi=e=>(o.__Z11set_qualityi=So.tb)(e),o.__Z10pick_depthii=(e,r,t)=>(o.__Z10pick_depthii=So.ub)(e,r,t),o.__Z11pick_objectiijj=(e,r,t,n,a)=>(o.__Z11pick_objectiijj=So.vb)(e,r,t,n,a),o.__Z11set_enabledib=(e,r)=>(o.__Z11set_enabledib=So.wb)(e,r),o.__Z23handle_masked_ui_updateijj=(e,r,t)=>(o.__Z23handle_masked_ui_updateijj=So.xb)(e,r,t),o.__Z21set_scene_time_extentddb=(e,r,t)=>(o.__Z21set_scene_time_extentddb=So.yb)(e,r,t),o.__Z20set_upscaling_limitsidd=(e,r,t)=>(o.__Z20set_upscaling_limitsidd=So.zb)(e,r,t),o.__Z21estimate_memory_usagei=e=>(o.__Z21estimate_memory_usagei=So.Ab)(e),o.__Z16add_generic_meshjjjjjjjj=(e,r,t,n,a,i,s,u)=>(o.__Z16add_generic_meshjjjjjjjj=So.Bb)(e,r,t,n,a,i,s,u),o.__Z19remove_generic_meshi=e=>(o.__Z19remove_generic_meshi=So.Cb)(e),o.__Z30toggle_full_volume_extent_drawi=e=>(o.__Z30toggle_full_volume_extent_drawi=So.Db)(e),o.__Z21get_layer_epoch_timesii=(e,r,t)=>(o.__Z21get_layer_epoch_timesii=So.Eb)(e,r,t),o.__Z25get_layer_current_time_idi=e=>(o.__Z25get_layer_current_time_idi=So.Fb)(e),o.__Z27get_locked_isosurface_coloriid=(e,r,t,n)=>(o.__Z27get_locked_isosurface_coloriid=So.Gb)(e,r,t,n);var Co=e=>(Co=So.Hb)(e);o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=So.Ib)();var Do,To=()=>(To=So.Jb)(),jo=e=>(jo=So.Kb)(e);function Mo(){function e(){Do||(Do=!0,o.calledRun=!0,x||(T(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),j()))}I>0||(D(),I>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iij=(e,r,t,n)=>(o.dynCall_iij=So.Lb)(e,r,t,n),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=So.Mb)(e,r,t,n,a),o.dynCall_viijii=(e,r,t,n,a,i,s)=>(o.dynCall_viijii=So.Nb)(e,r,t,n,a,i,s),o.dynCall_iiiiij=(e,r,t,n,a,i,s)=>(o.dynCall_iiiiij=So.Ob)(e,r,t,n,a,i,s),o.dynCall_iiiiijj=(e,r,t,n,a,i,s,u,l)=>(o.dynCall_iiiiijj=So.Pb)(e,r,t,n,a,i,s,u,l),o.dynCall_iiiiiijj=(e,r,t,n,a,i,s,u,l,d)=>(o.dynCall_iiiiiijj=So.Qb)(e,r,t,n,a,i,s,u,l,d),o.___emscripten_embedded_file_data=139576,o.addRunDependency=O,o.removeRunDependency=W,o.FS_createPath=Fe.createPath,o.FS_createLazyFile=Fe.createLazyFile,o.FS_createDevice=Fe.createDevice,o.addFunction=wo,o.stringToUTF8=Ir,o.lengthBytesUTF8=ce,o.FS_createPreloadedFile=Fe.createPreloadedFile,o.FS_createDataFile=Fe.createDataFile,o.FS_unlink=Fe.unlink,R=function e(){Do||Mo(),Do||(R=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Mo(),e.ready},r.exports=n;const a=e(o.exports),i=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{i as v};
|
|
5
|
+
import{g as e}from"./_commonjsHelpers.js";var r,t,n,o={exports:{}};r=o,t="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,n=function(e={}){var r,n,o=e;o.ready=new Promise(((e,t)=>{r=e,n=t}));var a,i,s=Object.assign({},o),u="./this.program",l=!0,d="";function c(e){return o.locateFile?o.locateFile(e,d):d+e}"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),t&&(d=t),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",a=e=>{var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},i=(e,r,t)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?r(n.response):t()},n.onerror=t,n.send(null)};var f,m,h=o.print||console.log.bind(console),p=o.printErr||console.error.bind(console);Object.assign(o,s),s=null,o.arguments&&o.arguments,o.thisProgram&&(u=o.thisProgram),o.quit&&o.quit,o.wasmBinary&&(f=o.wasmBinary),"object"!=typeof WebAssembly&&H("no native wasm support detected");var v,g,y,w,E,_,b,k,x=!1;function F(e,r){e||H(r)}function S(){var e=m.buffer;o.HEAP8=v=new Int8Array(e),o.HEAP16=y=new Int16Array(e),o.HEAPU8=g=new Uint8Array(e),o.HEAPU16=w=new Uint16Array(e),o.HEAP32=E=new Int32Array(e),o.HEAPU32=_=new Uint32Array(e),o.HEAPF32=b=new Float32Array(e),o.HEAPF64=k=new Float64Array(e)}var A=[],P=[],C=[];function D(){if(o.preRun)for("function"==typeof o.preRun&&(o.preRun=[o.preRun]);o.preRun.length;)B(o.preRun.shift());K(A)}function T(){o.noFSInit||Fe.init.initialized||Fe.init(),Fe.ignorePermissions=!1,K(P)}function M(){if(o.postRun)for("function"==typeof o.postRun&&(o.postRun=[o.postRun]);o.postRun.length;)L(o.postRun.shift());K(C)}function B(e){A.unshift(e)}function j(e){P.unshift(e)}function L(e){C.unshift(e)}var R=0,I=null;function O(e){return e}function N(e){R++,o.monitorRunDependencies&&o.monitorRunDependencies(R)}function W(e){if(R--,o.monitorRunDependencies&&o.monitorRunDependencies(R),0==R&&I){var r=I;I=null,r()}}function H(e){o.onAbort&&o.onAbort(e),p(e="Aborted("+e+")"),x=!0,e+=". Build with -sASSERTIONS for more info.";var r=new WebAssembly.RuntimeError(e);throw n(r),r}var z,U,$,V="data:application/octet-stream;base64,",G=e=>e.startsWith(V);function q(e){if(e==z&&f)return new Uint8Array(f);throw"both async and sync fetching of the wasm failed"}function Y(e){return!f&&l&&"function"==typeof fetch?fetch(e,{credentials:"same-origin"}).then((r=>{if(!r.ok)throw"failed to load wasm binary file at '"+e+"'";return r.arrayBuffer()})).catch((()=>q(e))):Promise.resolve().then((()=>q(e)))}function X(e,r,t){return Y(e).then((e=>WebAssembly.instantiate(e,r))).then((e=>e)).then(t,(e=>{p(`failed to asynchronously prepare wasm: ${e}`),H(e)}))}function Q(e,r,t,n){return e||"function"!=typeof WebAssembly.instantiateStreaming||G(r)||"function"!=typeof fetch?X(r,t,n):fetch(r,{credentials:"same-origin"}).then((e=>WebAssembly.instantiateStreaming(e,t).then(n,(function(e){return p(`wasm streaming compile failed: ${e}`),p("falling back to ArrayBuffer instantiation"),X(r,t,n)}))))}function J(){var e={a:Fo};function r(e,r){return So=e.exports,m=So.Xa,S(),yr=So.Za,j(So.Ya),W(),So}function t(e){r(e.instance)}if(N(),o.instantiateWasm)try{return o.instantiateWasm(e,r)}catch(a){p(`Module.instantiateWasm callback failed with error: ${a}`),n(a)}return Q(f,z,e,t).catch(n),{}}G(z="vxlLayer.wasm")||(z=c(z));var K=e=>{for(;e.length>0;)e.shift()(o)};o.noExitRuntime;var Z="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,ee=(e,r,t)=>{for(var n=r+t,o=r;e[o]&&!(o>=n);)++o;if(o-r>16&&e.buffer&&Z)return Z.decode(e.subarray(r,o));for(var a="";r<o;){var i=e[r++];if(128&i){var s=63&e[r++];if(192!=(224&i)){var u=63&e[r++];if((i=224==(240&i)?(15&i)<<12|s<<6|u:(7&i)<<18|s<<12|u<<6|63&e[r++])<65536)a+=String.fromCharCode(i);else{var l=i-65536;a+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else a+=String.fromCharCode((31&i)<<6|s)}else a+=String.fromCharCode(i)}return a},re=(e,r)=>e?ee(g,e,r):"",te=(e,r,t,n)=>{H(`Assertion failed: ${re(e)}, at: `+[r?re(r):"unknown filename",t,n?re(n):"unknown function"])};function ne(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){_[this.ptr+4>>2]=e},this.get_type=function(){return _[this.ptr+4>>2]},this.set_destructor=function(e){_[this.ptr+8>>2]=e},this.get_destructor=function(){return _[this.ptr+8>>2]},this.set_caught=function(e){e=e?1:0,v[this.ptr+12>>0]=e},this.get_caught=function(){return 0!=v[this.ptr+12>>0]},this.set_rethrown=function(e){e=e?1:0,v[this.ptr+13>>0]=e},this.get_rethrown=function(){return 0!=v[this.ptr+13>>0]},this.init=function(e,r){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(r)},this.set_adjusted_ptr=function(e){_[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return _[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Mo(this.get_type()))return _[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}var oe=(e,r,t)=>{throw new ne(e).init(r,t),e},ae=e=>(E[To()>>2]=e,e),ie={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,r)=>{for(var t=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),t++):t&&(e.splice(n,1),t--)}if(r)for(;t;t--)e.unshift("..");return e},normalize:e=>{var r=ie.isAbs(e),t="/"===e.substr(-1);return(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||r||(e="."),e&&t&&(e+="/"),(r?"/":"")+e},dirname:e=>{var r=ie.splitPath(e),t=r[0],n=r[1];return t||n?(n&&(n=n.substr(0,n.length-1)),t+n):"."},basename:e=>{if("/"===e)return"/";var r=(e=(e=ie.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===r?e:e.substr(r+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ie.normalize(e.join("/"))},join2:(e,r)=>ie.normalize(e+"/"+r)},se=()=>{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);H("initRandomDevice")},ue=e=>(ue=se())(e),le={resolve:function(){for(var e="",r=!1,t=arguments.length-1;t>=-1&&!r;t--){var n=t>=0?arguments[t]:Fe.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,r=ie.isAbs(n)}return(r?"/":"")+(e=ie.normalizeArray(e.split("/").filter((e=>!!e)),!r).join("/"))||"."},relative:(e,r)=>{function t(e){for(var r=0;r<e.length&&""===e[r];r++);for(var t=e.length-1;t>=0&&""===e[t];t--);return r>t?[]:e.slice(r,t-r+1)}e=le.resolve(e).substr(1),r=le.resolve(r).substr(1);for(var n=t(e.split("/")),o=t(r.split("/")),a=Math.min(n.length,o.length),i=a,s=0;s<a;s++)if(n[s]!==o[s]){i=s;break}var u=[];for(s=i;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(i))).join("/")}},de=[],ce=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n<=127?r++:n<=2047?r+=2:n>=55296&&n<=57343?(r+=4,++t):r+=3}return r},fe=(e,r,t,n)=>{if(!(n>0))return 0;for(var o=t,a=t+n-1,i=0;i<e.length;++i){var s=e.charCodeAt(i);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++i)),s<=127){if(t>=a)break;r[t++]=s}else if(s<=2047){if(t+1>=a)break;r[t++]=192|s>>6,r[t++]=128|63&s}else if(s<=65535){if(t+2>=a)break;r[t++]=224|s>>12,r[t++]=128|s>>6&63,r[t++]=128|63&s}else{if(t+3>=a)break;r[t++]=240|s>>18,r[t++]=128|s>>12&63,r[t++]=128|s>>6&63,r[t++]=128|63&s}}return r[t]=0,t-o};function me(e,r,t){var n=t>0?t:ce(e)+1,o=new Array(n),a=fe(e,o,0,o.length);return r&&(o.length=a),o}var he=()=>{if(!de.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(e=window.prompt("Input: "))&&(e+="\n"):"function"==typeof readline&&null!==(e=readline())&&(e+="\n"),!e)return null;de=me(e,!0)}return de.shift()},pe={ttys:[],init(){},shutdown(){},register(e,r){pe.ttys[e]={input:[],output:[],ops:r},Fe.registerDevice(e,pe.stream_ops)},stream_ops:{open(e){var r=pe.ttys[e.node.rdev];if(!r)throw new Fe.ErrnoError(43);e.tty=r,e.seekable=!1},close(e){e.tty.ops.fsync(e.tty)},fsync(e){e.tty.ops.fsync(e.tty)},read(e,r,t,n,o){if(!e.tty||!e.tty.ops.get_char)throw new Fe.ErrnoError(60);for(var a=0,i=0;i<n;i++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(u){throw new Fe.ErrnoError(29)}if(void 0===s&&0===a)throw new Fe.ErrnoError(6);if(null==s)break;a++,r[t+i]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,r,t,n,o){if(!e.tty||!e.tty.ops.put_char)throw new Fe.ErrnoError(60);try{for(var a=0;a<n;a++)e.tty.ops.put_char(e.tty,r[t+a])}catch(i){throw new Fe.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),a}},default_tty_ops:{get_char:e=>he(),put_char(e,r){null===r||10===r?(h(ee(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(h(ee(e.output,0)),e.output=[])},ioctl_tcgets:e=>({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:(e,r,t)=>0,ioctl_tiocgwinsz:e=>[24,80]},default_tty1_ops:{put_char(e,r){null===r||10===r?(p(ee(e.output,0)),e.output=[]):0!=r&&e.output.push(r)},fsync(e){e.output&&e.output.length>0&&(p(ee(e.output,0)),e.output=[])}}},ve=e=>{H()},ge={ops_table:null,mount:e=>ge.createNode(null,"/",16895,0),createNode(e,r,t,n){if(Fe.isBlkdev(t)||Fe.isFIFO(t))throw new Fe.ErrnoError(63);ge.ops_table||(ge.ops_table={dir:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,lookup:ge.node_ops.lookup,mknod:ge.node_ops.mknod,rename:ge.node_ops.rename,unlink:ge.node_ops.unlink,rmdir:ge.node_ops.rmdir,readdir:ge.node_ops.readdir,symlink:ge.node_ops.symlink},stream:{llseek:ge.stream_ops.llseek}},file:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:{llseek:ge.stream_ops.llseek,read:ge.stream_ops.read,write:ge.stream_ops.write,allocate:ge.stream_ops.allocate,mmap:ge.stream_ops.mmap,msync:ge.stream_ops.msync}},link:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr,readlink:ge.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ge.node_ops.getattr,setattr:ge.node_ops.setattr},stream:Fe.chrdev_stream_ops}});var o=Fe.createNode(e,r,t,n);return Fe.isDir(o.mode)?(o.node_ops=ge.ops_table.dir.node,o.stream_ops=ge.ops_table.dir.stream,o.contents={}):Fe.isFile(o.mode)?(o.node_ops=ge.ops_table.file.node,o.stream_ops=ge.ops_table.file.stream,o.usedBytes=0,o.contents=null):Fe.isLink(o.mode)?(o.node_ops=ge.ops_table.link.node,o.stream_ops=ge.ops_table.link.stream):Fe.isChrdev(o.mode)&&(o.node_ops=ge.ops_table.chrdev.node,o.stream_ops=ge.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[r]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:e=>e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0),expandFileStorage(e,r){var t=e.contents?e.contents.length:0;if(!(t>=r)){var n=1048576;r=Math.max(r,t*(t<n?2:1.125)>>>0),0!=t&&(r=Math.max(r,256));var o=e.contents;e.contents=new Uint8Array(r),e.usedBytes>0&&e.contents.set(o.subarray(0,e.usedBytes),0)}},resizeFileStorage(e,r){if(e.usedBytes!=r)if(0==r)e.contents=null,e.usedBytes=0;else{var t=e.contents;e.contents=new Uint8Array(r),t&&e.contents.set(t.subarray(0,Math.min(r,e.usedBytes))),e.usedBytes=r}},node_ops:{getattr(e){var r={};return r.dev=Fe.isChrdev(e.mode)?e.id:1,r.ino=e.id,r.mode=e.mode,r.nlink=1,r.uid=0,r.gid=0,r.rdev=e.rdev,Fe.isDir(e.mode)?r.size=4096:Fe.isFile(e.mode)?r.size=e.usedBytes:Fe.isLink(e.mode)?r.size=e.link.length:r.size=0,r.atime=new Date(e.timestamp),r.mtime=new Date(e.timestamp),r.ctime=new Date(e.timestamp),r.blksize=4096,r.blocks=Math.ceil(r.size/r.blksize),r},setattr(e,r){void 0!==r.mode&&(e.mode=r.mode),void 0!==r.timestamp&&(e.timestamp=r.timestamp),void 0!==r.size&&ge.resizeFileStorage(e,r.size)},lookup(e,r){throw Fe.genericErrors[44]},mknod:(e,r,t,n)=>ge.createNode(e,r,t,n),rename(e,r,t){if(Fe.isDir(e.mode)){var n;try{n=Fe.lookupNode(r,t)}catch(a){}if(n)for(var o in n.contents)throw new Fe.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=t,r.contents[t]=e,r.timestamp=e.parent.timestamp,e.parent=r},unlink(e,r){delete e.contents[r],e.timestamp=Date.now()},rmdir(e,r){var t=Fe.lookupNode(e,r);for(var n in t.contents)throw new Fe.ErrnoError(55);delete e.contents[r],e.timestamp=Date.now()},readdir(e){var r=[".",".."];for(var t in e.contents)e.contents.hasOwnProperty(t)&&r.push(t);return r},symlink(e,r,t){var n=ge.createNode(e,r,41471,0);return n.link=t,n},readlink(e){if(!Fe.isLink(e.mode))throw new Fe.ErrnoError(28);return e.link}},stream_ops:{read(e,r,t,n,o){var a=e.node.contents;if(o>=e.node.usedBytes)return 0;var i=Math.min(e.node.usedBytes-o,n);if(i>8&&a.subarray)r.set(a.subarray(o,o+i),t);else for(var s=0;s<i;s++)r[t+s]=a[o+s];return i},write(e,r,t,n,o,a){if(r.buffer===v.buffer&&(a=!1),!n)return 0;var i=e.node;if(i.timestamp=Date.now(),r.subarray&&(!i.contents||i.contents.subarray)){if(a)return i.contents=r.subarray(t,t+n),i.usedBytes=n,n;if(0===i.usedBytes&&0===o)return i.contents=r.slice(t,t+n),i.usedBytes=n,n;if(o+n<=i.usedBytes)return i.contents.set(r.subarray(t,t+n),o),n}if(ge.expandFileStorage(i,o+n),i.contents.subarray&&r.subarray)i.contents.set(r.subarray(t,t+n),o);else for(var s=0;s<n;s++)i.contents[o+s]=r[t+s];return i.usedBytes=Math.max(i.usedBytes,o+n),n},llseek(e,r,t){var n=r;if(1===t?n+=e.position:2===t&&Fe.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new Fe.ErrnoError(28);return n},allocate(e,r,t){ge.expandFileStorage(e.node,r+t),e.node.usedBytes=Math.max(e.node.usedBytes,r+t)},mmap(e,r,t,n,o){if(!Fe.isFile(e.node.mode))throw new Fe.ErrnoError(43);var a,i,s=e.node.contents;if(2&o||s.buffer!==v.buffer){if((t>0||t+r<s.length)&&(s=s.subarray?s.subarray(t,t+r):Array.prototype.slice.call(s,t,t+r)),i=!0,!(a=ve()))throw new Fe.ErrnoError(48);v.set(s,a)}else i=!1,a=s.byteOffset;return{ptr:a,allocated:i}},msync:(e,r,t,n,o)=>(ge.stream_ops.write(e,r,0,n,t,!1),0)}},ye=(e,r,t,n)=>{var o=n?"":O(`al ${e}`);i(e,(t=>{F(t,`Loading data file "${e}" failed (no arrayBuffer).`),r(new Uint8Array(t)),o&&W()}),(r=>{if(!t)throw`Loading data file "${e}" failed.`;t()})),o&&N()},we=(e,r,t,n,o,a)=>Fe.createDataFile(e,r,t,n,o,a),Ee=o.preloadPlugins||[],_e=(e,r,t,n)=>{"undefined"!=typeof Browser&&Browser.init();var o=!1;return Ee.forEach((a=>{o||a.canHandle(r)&&(a.handle(e,r,t,n),o=!0)})),o},be=(e,r,t,n,o,a,i,s,u,l)=>{var d=r?le.resolve(ie.join2(e,r)):e;function c(t){function c(t){l&&l(),s||we(e,r,t,n,o,u),a&&a(),W()}_e(t,d,c,(()=>{i&&i(),W()}))||c(t)}N(),"string"==typeof t?ye(t,(e=>c(e)),i):c(t)},ke=e=>{var r={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[e];if(void 0===r)throw new Error(`Unknown file open mode: ${e}`);return r},xe=(e,r)=>{var t=0;return e&&(t|=365),r&&(t|=146),t},Fe={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath(e,r={}){if(!(e=le.resolve(e)))return{path:"",node:null};var t={follow_mount:!0,recurse_count:0};if((r=Object.assign(t,r)).recurse_count>8)throw new Fe.ErrnoError(32);for(var n=e.split("/").filter((e=>!!e)),o=Fe.root,a="/",i=0;i<n.length;i++){var s=i===n.length-1;if(s&&r.parent)break;if(o=Fe.lookupNode(o,n[i]),a=ie.join2(a,n[i]),Fe.isMountpoint(o)&&(!s||s&&r.follow_mount)&&(o=o.mounted.root),!s||r.follow)for(var u=0;Fe.isLink(o.mode);){var l=Fe.readlink(a);if(a=le.resolve(ie.dirname(a),l),o=Fe.lookupPath(a,{recurse_count:r.recurse_count+1}).node,u++>40)throw new Fe.ErrnoError(32)}}return{path:a,node:o}},getPath(e){for(var r;;){if(Fe.isRoot(e)){var t=e.mount.mountpoint;return r?"/"!==t[t.length-1]?`${t}/${r}`:t+r:t}r=r?`${e.name}/${r}`:e.name,e=e.parent}},hashName(e,r){for(var t=0,n=0;n<r.length;n++)t=(t<<5)-t+r.charCodeAt(n)|0;return(e+t>>>0)%Fe.nameTable.length},hashAddNode(e){var r=Fe.hashName(e.parent.id,e.name);e.name_next=Fe.nameTable[r],Fe.nameTable[r]=e},hashRemoveNode(e){var r=Fe.hashName(e.parent.id,e.name);if(Fe.nameTable[r]===e)Fe.nameTable[r]=e.name_next;else for(var t=Fe.nameTable[r];t;){if(t.name_next===e){t.name_next=e.name_next;break}t=t.name_next}},lookupNode(e,r){var t=Fe.mayLookup(e);if(t)throw new Fe.ErrnoError(t,e);for(var n=Fe.hashName(e.id,r),o=Fe.nameTable[n];o;o=o.name_next){var a=o.name;if(o.parent.id===e.id&&a===r)return o}return Fe.lookup(e,r)},createNode(e,r,t,n){var o=new Fe.FSNode(e,r,t,n);return Fe.hashAddNode(o),o},destroyNode(e){Fe.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>49152==(49152&e),flagsToPermissionString(e){var r=["r","w","rw"][3&e];return 512&e&&(r+="w"),r},nodePermissions:(e,r)=>Fe.ignorePermissions||(!r.includes("r")||292&e.mode)&&(!r.includes("w")||146&e.mode)&&(!r.includes("x")||73&e.mode)?0:2,mayLookup(e){var r=Fe.nodePermissions(e,"x");return r||(e.node_ops.lookup?0:2)},mayCreate(e,r){try{return Fe.lookupNode(e,r),20}catch(t){}return Fe.nodePermissions(e,"wx")},mayDelete(e,r,t){var n;try{n=Fe.lookupNode(e,r)}catch(a){return a.errno}var o=Fe.nodePermissions(e,"wx");if(o)return o;if(t){if(!Fe.isDir(n.mode))return 54;if(Fe.isRoot(n)||Fe.getPath(n)===Fe.cwd())return 10}else if(Fe.isDir(n.mode))return 31;return 0},mayOpen:(e,r)=>e?Fe.isLink(e.mode)?32:Fe.isDir(e.mode)&&("r"!==Fe.flagsToPermissionString(r)||512&r)?31:Fe.nodePermissions(e,Fe.flagsToPermissionString(r)):44,MAX_OPEN_FDS:4096,nextfd(){for(var e=0;e<=Fe.MAX_OPEN_FDS;e++)if(!Fe.streams[e])return e;throw new Fe.ErrnoError(33)},getStreamChecked(e){var r=Fe.getStream(e);if(!r)throw new Fe.ErrnoError(8);return r},getStream:e=>Fe.streams[e],createStream:(e,r=-1)=>(Fe.FSStream||(Fe.FSStream=function(){this.shared={}},Fe.FSStream.prototype={},Object.defineProperties(Fe.FSStream.prototype,{object:{get(){return this.node},set(e){this.node=e}},isRead:{get(){return 1!=(2097155&this.flags)}},isWrite:{get(){return 0!=(2097155&this.flags)}},isAppend:{get(){return 1024&this.flags}},flags:{get(){return this.shared.flags},set(e){this.shared.flags=e}},position:{get(){return this.shared.position},set(e){this.shared.position=e}}})),e=Object.assign(new Fe.FSStream,e),-1==r&&(r=Fe.nextfd()),e.fd=r,Fe.streams[r]=e,e),closeStream(e){Fe.streams[e]=null},chrdev_stream_ops:{open(e){var r=Fe.getDevice(e.node.rdev);e.stream_ops=r.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek(){throw new Fe.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,r)=>e<<8|r,registerDevice(e,r){Fe.devices[e]={stream_ops:r}},getDevice:e=>Fe.devices[e],getMounts(e){for(var r=[],t=[e];t.length;){var n=t.pop();r.push(n),t.push.apply(t,n.mounts)}return r},syncfs(e,r){"function"==typeof e&&(r=e,e=!1),Fe.syncFSRequests++,Fe.syncFSRequests>1&&p(`warning: ${Fe.syncFSRequests} FS.syncfs operations in flight at once, probably just doing extra work`);var t=Fe.getMounts(Fe.root.mount),n=0;function o(e){return Fe.syncFSRequests--,r(e)}function a(e){if(e)return a.errored?void 0:(a.errored=!0,o(e));++n>=t.length&&o(null)}t.forEach((r=>{if(!r.type.syncfs)return a(null);r.type.syncfs(r,e,a)}))},mount(e,r,t){var n,o="/"===t,a=!t;if(o&&Fe.root)throw new Fe.ErrnoError(10);if(!o&&!a){var i=Fe.lookupPath(t,{follow_mount:!1});if(t=i.path,n=i.node,Fe.isMountpoint(n))throw new Fe.ErrnoError(10);if(!Fe.isDir(n.mode))throw new Fe.ErrnoError(54)}var s={type:e,opts:r,mountpoint:t,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?Fe.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount(e){var r=Fe.lookupPath(e,{follow_mount:!1});if(!Fe.isMountpoint(r.node))throw new Fe.ErrnoError(28);var t=r.node,n=t.mounted,o=Fe.getMounts(n);Object.keys(Fe.nameTable).forEach((e=>{for(var r=Fe.nameTable[e];r;){var t=r.name_next;o.includes(r.mount)&&Fe.destroyNode(r),r=t}})),t.mounted=null;var a=t.mount.mounts.indexOf(n);t.mount.mounts.splice(a,1)},lookup:(e,r)=>e.node_ops.lookup(e,r),mknod(e,r,t){var n=Fe.lookupPath(e,{parent:!0}).node,o=ie.basename(e);if(!o||"."===o||".."===o)throw new Fe.ErrnoError(28);var a=Fe.mayCreate(n,o);if(a)throw new Fe.ErrnoError(a);if(!n.node_ops.mknod)throw new Fe.ErrnoError(63);return n.node_ops.mknod(n,o,r,t)},create:(e,r)=>(r=void 0!==r?r:438,r&=4095,r|=32768,Fe.mknod(e,r,0)),mkdir:(e,r)=>(r=void 0!==r?r:511,r&=1023,r|=16384,Fe.mknod(e,r,0)),mkdirTree(e,r){for(var t=e.split("/"),n="",o=0;o<t.length;++o)if(t[o]){n+="/"+t[o];try{Fe.mkdir(n,r)}catch(a){if(20!=a.errno)throw a}}},mkdev:(e,r,t)=>(void 0===t&&(t=r,r=438),r|=8192,Fe.mknod(e,r,t)),symlink(e,r){if(!le.resolve(e))throw new Fe.ErrnoError(44);var t=Fe.lookupPath(r,{parent:!0}).node;if(!t)throw new Fe.ErrnoError(44);var n=ie.basename(r),o=Fe.mayCreate(t,n);if(o)throw new Fe.ErrnoError(o);if(!t.node_ops.symlink)throw new Fe.ErrnoError(63);return t.node_ops.symlink(t,n,e)},rename(e,r){var t,n,o=ie.dirname(e),a=ie.dirname(r),i=ie.basename(e),s=ie.basename(r);if(t=Fe.lookupPath(e,{parent:!0}).node,n=Fe.lookupPath(r,{parent:!0}).node,!t||!n)throw new Fe.ErrnoError(44);if(t.mount!==n.mount)throw new Fe.ErrnoError(75);var u,l=Fe.lookupNode(t,i),d=le.relative(e,a);if("."!==d.charAt(0))throw new Fe.ErrnoError(28);if("."!==(d=le.relative(r,o)).charAt(0))throw new Fe.ErrnoError(55);try{u=Fe.lookupNode(n,s)}catch(m){}if(l!==u){var c=Fe.isDir(l.mode),f=Fe.mayDelete(t,i,c);if(f)throw new Fe.ErrnoError(f);if(f=u?Fe.mayDelete(n,s,c):Fe.mayCreate(n,s))throw new Fe.ErrnoError(f);if(!t.node_ops.rename)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(l)||u&&Fe.isMountpoint(u))throw new Fe.ErrnoError(10);if(n!==t&&(f=Fe.nodePermissions(t,"w")))throw new Fe.ErrnoError(f);Fe.hashRemoveNode(l);try{t.node_ops.rename(l,n,s)}catch(m){throw m}finally{Fe.hashAddNode(l)}}},rmdir(e){var r=Fe.lookupPath(e,{parent:!0}).node,t=ie.basename(e),n=Fe.lookupNode(r,t),o=Fe.mayDelete(r,t,!0);if(o)throw new Fe.ErrnoError(o);if(!r.node_ops.rmdir)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);r.node_ops.rmdir(r,t),Fe.destroyNode(n)},readdir(e){var r=Fe.lookupPath(e,{follow:!0}).node;if(!r.node_ops.readdir)throw new Fe.ErrnoError(54);return r.node_ops.readdir(r)},unlink(e){var r=Fe.lookupPath(e,{parent:!0}).node;if(!r)throw new Fe.ErrnoError(44);var t=ie.basename(e),n=Fe.lookupNode(r,t),o=Fe.mayDelete(r,t,!1);if(o)throw new Fe.ErrnoError(o);if(!r.node_ops.unlink)throw new Fe.ErrnoError(63);if(Fe.isMountpoint(n))throw new Fe.ErrnoError(10);r.node_ops.unlink(r,t),Fe.destroyNode(n)},readlink(e){var r=Fe.lookupPath(e).node;if(!r)throw new Fe.ErrnoError(44);if(!r.node_ops.readlink)throw new Fe.ErrnoError(28);return le.resolve(Fe.getPath(r.parent),r.node_ops.readlink(r))},stat(e,r){var t=Fe.lookupPath(e,{follow:!r}).node;if(!t)throw new Fe.ErrnoError(44);if(!t.node_ops.getattr)throw new Fe.ErrnoError(63);return t.node_ops.getattr(t)},lstat:e=>Fe.stat(e,!0),chmod(e,r,t){var n;if(!(n="string"==typeof e?Fe.lookupPath(e,{follow:!t}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&r|-4096&n.mode,timestamp:Date.now()})},lchmod(e,r){Fe.chmod(e,r,!0)},fchmod(e,r){var t=Fe.getStreamChecked(e);Fe.chmod(t.node,r)},chown(e,r,t,n){var o;if(!(o="string"==typeof e?Fe.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown(e,r,t){Fe.chown(e,r,t,!0)},fchown(e,r,t){var n=Fe.getStreamChecked(e);Fe.chown(n.node,r,t)},truncate(e,r){if(r<0)throw new Fe.ErrnoError(28);var t;if(!(t="string"==typeof e?Fe.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new Fe.ErrnoError(63);if(Fe.isDir(t.mode))throw new Fe.ErrnoError(31);if(!Fe.isFile(t.mode))throw new Fe.ErrnoError(28);var n=Fe.nodePermissions(t,"w");if(n)throw new Fe.ErrnoError(n);t.node_ops.setattr(t,{size:r,timestamp:Date.now()})},ftruncate(e,r){var t=Fe.getStreamChecked(e);if(0==(2097155&t.flags))throw new Fe.ErrnoError(28);Fe.truncate(t.node,r)},utime(e,r,t){var n=Fe.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(r,t)})},open(e,r,t){if(""===e)throw new Fe.ErrnoError(44);var n;if(t=void 0===t?438:t,t=64&(r="string"==typeof r?ke(r):r)?4095&t|32768:0,"object"==typeof e)n=e;else{e=ie.normalize(e);try{n=Fe.lookupPath(e,{follow:!(131072&r)}).node}catch(u){}}var a=!1;if(64&r)if(n){if(128&r)throw new Fe.ErrnoError(20)}else n=Fe.mknod(e,t,0),a=!0;if(!n)throw new Fe.ErrnoError(44);if(Fe.isChrdev(n.mode)&&(r&=-513),65536&r&&!Fe.isDir(n.mode))throw new Fe.ErrnoError(54);if(!a){var i=Fe.mayOpen(n,r);if(i)throw new Fe.ErrnoError(i)}512&r&&!a&&Fe.truncate(n,0),r&=-131713;var s=Fe.createStream({node:n,path:Fe.getPath(n),flags:r,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!o.logReadFiles||1&r||(Fe.readFiles||(Fe.readFiles={}),e in Fe.readFiles||(Fe.readFiles[e]=1)),s},close(e){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(r){throw r}finally{Fe.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek(e,r,t){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new Fe.ErrnoError(70);if(0!=t&&1!=t&&2!=t)throw new Fe.ErrnoError(28);return e.position=e.stream_ops.llseek(e,r,t),e.ungotten=[],e.position},read(e,r,t,n,o){if(n<0||o<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(1==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.read)throw new Fe.ErrnoError(28);var a=void 0!==o;if(a){if(!e.seekable)throw new Fe.ErrnoError(70)}else o=e.position;var i=e.stream_ops.read(e,r,t,n,o);return a||(e.position+=i),i},write(e,r,t,n,o,a){if(n<0||o<0)throw new Fe.ErrnoError(28);if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(Fe.isDir(e.node.mode))throw new Fe.ErrnoError(31);if(!e.stream_ops.write)throw new Fe.ErrnoError(28);e.seekable&&1024&e.flags&&Fe.llseek(e,0,2);var i=void 0!==o;if(i){if(!e.seekable)throw new Fe.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,r,t,n,o,a);return i||(e.position+=s),s},allocate(e,r,t){if(Fe.isClosed(e))throw new Fe.ErrnoError(8);if(r<0||t<=0)throw new Fe.ErrnoError(28);if(0==(2097155&e.flags))throw new Fe.ErrnoError(8);if(!Fe.isFile(e.node.mode)&&!Fe.isDir(e.node.mode))throw new Fe.ErrnoError(43);if(!e.stream_ops.allocate)throw new Fe.ErrnoError(138);e.stream_ops.allocate(e,r,t)},mmap(e,r,t,n,o){if(0!=(2&n)&&0==(2&o)&&2!=(2097155&e.flags))throw new Fe.ErrnoError(2);if(1==(2097155&e.flags))throw new Fe.ErrnoError(2);if(!e.stream_ops.mmap)throw new Fe.ErrnoError(43);return e.stream_ops.mmap(e,r,t,n,o)},msync:(e,r,t,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,r,t,n,o):0,munmap:e=>0,ioctl(e,r,t){if(!e.stream_ops.ioctl)throw new Fe.ErrnoError(59);return e.stream_ops.ioctl(e,r,t)},readFile(e,r={}){if(r.flags=r.flags||0,r.encoding=r.encoding||"binary","utf8"!==r.encoding&&"binary"!==r.encoding)throw new Error(`Invalid encoding type "${r.encoding}"`);var t,n=Fe.open(e,r.flags),o=Fe.stat(e).size,a=new Uint8Array(o);return Fe.read(n,a,0,o,0),"utf8"===r.encoding?t=ee(a,0):"binary"===r.encoding&&(t=a),Fe.close(n),t},writeFile(e,r,t={}){t.flags=t.flags||577;var n=Fe.open(e,t.flags,t.mode);if("string"==typeof r){var o=new Uint8Array(ce(r)+1),a=fe(r,o,0,o.length);Fe.write(n,o,0,a,void 0,t.canOwn)}else{if(!ArrayBuffer.isView(r))throw new Error("Unsupported data type");Fe.write(n,r,0,r.byteLength,void 0,t.canOwn)}Fe.close(n)},cwd:()=>Fe.currentPath,chdir(e){var r=Fe.lookupPath(e,{follow:!0});if(null===r.node)throw new Fe.ErrnoError(44);if(!Fe.isDir(r.node.mode))throw new Fe.ErrnoError(54);var t=Fe.nodePermissions(r.node,"x");if(t)throw new Fe.ErrnoError(t);Fe.currentPath=r.path},createDefaultDirectories(){Fe.mkdir("/tmp"),Fe.mkdir("/home"),Fe.mkdir("/home/web_user")},createDefaultDevices(){Fe.mkdir("/dev"),Fe.registerDevice(Fe.makedev(1,3),{read:()=>0,write:(e,r,t,n,o)=>n}),Fe.mkdev("/dev/null",Fe.makedev(1,3)),pe.register(Fe.makedev(5,0),pe.default_tty_ops),pe.register(Fe.makedev(6,0),pe.default_tty1_ops),Fe.mkdev("/dev/tty",Fe.makedev(5,0)),Fe.mkdev("/dev/tty1",Fe.makedev(6,0));var e=new Uint8Array(1024),r=0,t=()=>(0===r&&(r=ue(e).byteLength),e[--r]);Fe.createDevice("/dev","random",t),Fe.createDevice("/dev","urandom",t),Fe.mkdir("/dev/shm"),Fe.mkdir("/dev/shm/tmp")},createSpecialDirectories(){Fe.mkdir("/proc");var e=Fe.mkdir("/proc/self");Fe.mkdir("/proc/self/fd"),Fe.mount({mount(){var r=Fe.createNode(e,"fd",16895,73);return r.node_ops={lookup(e,r){var t=+r,n=Fe.getStreamChecked(t),o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},r}},{},"/proc/self/fd")},createStandardStreams(){o.stdin?Fe.createDevice("/dev","stdin",o.stdin):Fe.symlink("/dev/tty","/dev/stdin"),o.stdout?Fe.createDevice("/dev","stdout",null,o.stdout):Fe.symlink("/dev/tty","/dev/stdout"),o.stderr?Fe.createDevice("/dev","stderr",null,o.stderr):Fe.symlink("/dev/tty1","/dev/stderr"),Fe.open("/dev/stdin",0),Fe.open("/dev/stdout",1),Fe.open("/dev/stderr",1)},ensureErrnoError(){Fe.ErrnoError||(Fe.ErrnoError=function(e,r){this.name="ErrnoError",this.node=r,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},Fe.ErrnoError.prototype=new Error,Fe.ErrnoError.prototype.constructor=Fe.ErrnoError,[44].forEach((e=>{Fe.genericErrors[e]=new Fe.ErrnoError(e),Fe.genericErrors[e].stack="<generic error, no stack>"})))},staticInit(){Fe.ensureErrnoError(),Fe.nameTable=new Array(4096),Fe.mount(ge,{},"/"),Fe.createDefaultDirectories(),Fe.createDefaultDevices(),Fe.createSpecialDirectories(),Fe.filesystems={MEMFS:ge}},init(e,r,t){Fe.init.initialized=!0,Fe.ensureErrnoError(),o.stdin=e||o.stdin,o.stdout=r||o.stdout,o.stderr=t||o.stderr,Fe.createStandardStreams()},quit(){Fe.init.initialized=!1;for(var e=0;e<Fe.streams.length;e++){var r=Fe.streams[e];r&&Fe.close(r)}},findObject(e,r){var t=Fe.analyzePath(e,r);return t.exists?t.object:null},analyzePath(e,r){try{e=(n=Fe.lookupPath(e,{follow:!r})).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=Fe.lookupPath(e,{parent:!0});t.parentExists=!0,t.parentPath=n.path,t.parentObject=n.node,t.name=ie.basename(e),n=Fe.lookupPath(e,{follow:!r}),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(e,r,t,n){e="string"==typeof e?e:Fe.getPath(e);for(var o=r.split("/").reverse();o.length;){var a=o.pop();if(a){var i=ie.join2(e,a);try{Fe.mkdir(i)}catch(s){}e=i}}return i},createFile(e,r,t,n,o){var a=ie.join2("string"==typeof e?e:Fe.getPath(e),r),i=xe(n,o);return Fe.create(a,i)},createDataFile(e,r,t,n,o,a){var i=r;e&&(e="string"==typeof e?e:Fe.getPath(e),i=r?ie.join2(e,r):e);var s=xe(n,o),u=Fe.create(i,s);if(t){if("string"==typeof t){for(var l=new Array(t.length),d=0,c=t.length;d<c;++d)l[d]=t.charCodeAt(d);t=l}Fe.chmod(u,146|s);var f=Fe.open(u,577);Fe.write(f,t,0,t.length,0,a),Fe.close(f),Fe.chmod(u,s)}return u},createDevice(e,r,t,n){var o=ie.join2("string"==typeof e?e:Fe.getPath(e),r),a=xe(!!t,!!n);Fe.createDevice.major||(Fe.createDevice.major=64);var i=Fe.makedev(Fe.createDevice.major++,0);return Fe.registerDevice(i,{open(e){e.seekable=!1},close(e){n&&n.buffer&&n.buffer.length&&n(10)},read(e,r,n,o,a){for(var i=0,s=0;s<o;s++){var u;try{u=t()}catch(l){throw new Fe.ErrnoError(29)}if(void 0===u&&0===i)throw new Fe.ErrnoError(6);if(null==u)break;i++,r[n+s]=u}return i&&(e.node.timestamp=Date.now()),i},write(e,r,t,o,a){for(var i=0;i<o;i++)try{n(r[t+i])}catch(s){throw new Fe.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),i}}),Fe.mkdev(o,a,i)},forceLoadFile(e){if(e.isDevice||e.isFolder||e.link||e.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.");if(!a)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=me(a(e.url),!0),e.usedBytes=e.contents.length}catch(r){throw new Fe.ErrnoError(29)}},createLazyFile(e,r,t,n,o){function a(){this.lengthKnown=!1,this.chunks=[]}if(a.prototype.get=function(e){if(!(e>this.length-1||e<0)){var r=e%this.chunkSize,t=e/this.chunkSize|0;return this.getter(t)[r]}},a.prototype.setDataGetter=function(e){this.getter=e},a.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",t,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+t+". Status: "+e.status);var r,n=Number(e.getResponseHeader("Content-length")),o=(r=e.getResponseHeader("Accept-Ranges"))&&"bytes"===r,a=(r=e.getResponseHeader("Content-Encoding"))&&"gzip"===r,i=1048576;o||(i=n);var s=(e,r)=>{if(e>r)throw new Error("invalid range ("+e+", "+r+") or no bytes requested!");if(r>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="+e+"-"+r),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||[]):me(o.responseText||"",!0)},u=this;u.setDataGetter((e=>{var r=e*i,t=(e+1)*i-1;if(t=Math.min(t,n-1),void 0===u.chunks[e]&&(u.chunks[e]=s(r,t)),void 0===u.chunks[e])throw new Error("doXHR failed!");return u.chunks[e]})),!a&&n||(i=n=1,n=this.getter(0).length,i=n,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=i,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var i={isDevice:!1,url:t},s=Fe.createFile(e,r,i,n,o);i.contents?s.contents=i.contents:i.url&&(s.contents=null,s.url=i.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var u={};function l(e,r,t,n,o){var a=e.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++)r[t+s]=a[o+s];else for(s=0;s<i;s++)r[t+s]=a.get(o+s);return i}return Object.keys(s.stream_ops).forEach((e=>{var r=s.stream_ops[e];u[e]=function(){return Fe.forceLoadFile(s),r.apply(null,arguments)}})),u.read=(e,r,t,n,o)=>(Fe.forceLoadFile(s),l(e,r,t,n,o)),u.mmap=(e,r,t,n,o)=>{Fe.forceLoadFile(s);var a=ve();if(!a)throw new Fe.ErrnoError(48);return l(e,v,a,r,t),{ptr:a,allocated:!0}},s.stream_ops=u,s}},Se={DEFAULT_POLLMASK:5,calculateAt(e,r,t){if(ie.isAbs(r))return r;var n;if(n=-100===e?Fe.cwd():Se.getStreamFromFD(e).path,0==r.length){if(!t)throw new Fe.ErrnoError(44);return n}return ie.join2(n,r)},doStat(e,r,t){try{var n=e(r)}catch(s){if(s&&s.node&&ie.normalize(r)!==ie.normalize(Fe.getPath(s.node)))return-54;throw s}E[t>>2]=n.dev,E[t+4>>2]=n.mode,_[t+8>>2]=n.nlink,E[t+12>>2]=n.uid,E[t+16>>2]=n.gid,E[t+20>>2]=n.rdev,$=[n.size>>>0,(U=n.size,+Math.abs(U)>=1?U>0?+Math.floor(U/4294967296)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],E[t+24>>2]=$[0],E[t+28>>2]=$[1],E[t+32>>2]=4096,E[t+36>>2]=n.blocks;var o=n.atime.getTime(),a=n.mtime.getTime(),i=n.ctime.getTime();return $=[Math.floor(o/1e3)>>>0,(U=Math.floor(o/1e3),+Math.abs(U)>=1?U>0?+Math.floor(U/4294967296)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],E[t+40>>2]=$[0],E[t+44>>2]=$[1],_[t+48>>2]=o%1e3*1e3,$=[Math.floor(a/1e3)>>>0,(U=Math.floor(a/1e3),+Math.abs(U)>=1?U>0?+Math.floor(U/4294967296)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],E[t+56>>2]=$[0],E[t+60>>2]=$[1],_[t+64>>2]=a%1e3*1e3,$=[Math.floor(i/1e3)>>>0,(U=Math.floor(i/1e3),+Math.abs(U)>=1?U>0?+Math.floor(U/4294967296)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],E[t+72>>2]=$[0],E[t+76>>2]=$[1],_[t+80>>2]=i%1e3*1e3,$=[n.ino>>>0,(U=n.ino,+Math.abs(U)>=1?U>0?+Math.floor(U/4294967296)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],E[t+88>>2]=$[0],E[t+92>>2]=$[1],0},doMsync(e,r,t,n,o){if(!Fe.isFile(r.node.mode))throw new Fe.ErrnoError(43);if(2&n)return 0;var a=g.slice(e,e+t);Fe.msync(r,a,o,t,n)},varargs:void 0,get(){var e=E[+Se.varargs>>2];return Se.varargs+=4,e},getp:()=>Se.get(),getStr:e=>re(e),getStreamFromFD:e=>Fe.getStreamChecked(e)};function Ae(e,r,t){Se.varargs=t;try{var n=Se.getStreamFromFD(e);switch(r){case 0:if((o=Se.get())<0)return-28;for(;Fe.streams[o];)o++;return Fe.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=Se.get();return n.flags|=o,0;case 5:return o=Se.getp(),y[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return ae(28),-1}}catch(a){if(void 0===Fe||"ErrnoError"!==a.name)throw a;return-a.errno}}function Pe(e,r,t){Se.varargs=t;try{var n=Se.getStreamFromFD(e);switch(r){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return n.tty?0:-59;case 21505:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcgets){var o=n.tty.ops.ioctl_tcgets(n),a=Se.getp();E[a>>2]=o.c_iflag||0,E[a+4>>2]=o.c_oflag||0,E[a+8>>2]=o.c_cflag||0,E[a+12>>2]=o.c_lflag||0;for(var i=0;i<32;i++)v[a+i+17>>0]=o.c_cc[i]||0;return 0}return 0;case 21506:case 21507:case 21508:if(!n.tty)return-59;if(n.tty.ops.ioctl_tcsets){a=Se.getp();var s=E[a>>2],u=E[a+4>>2],l=E[a+8>>2],d=E[a+12>>2],c=[];for(i=0;i<32;i++)c.push(v[a+i+17>>0]);return n.tty.ops.ioctl_tcsets(n.tty,r,{c_iflag:s,c_oflag:u,c_cflag:l,c_lflag:d,c_cc:c})}return 0;case 21519:return n.tty?(a=Se.getp(),E[a>>2]=0,0):-59;case 21520:return n.tty?-28:-59;case 21531:return a=Se.getp(),Fe.ioctl(n,r,a);case 21523:if(!n.tty)return-59;if(n.tty.ops.ioctl_tiocgwinsz){var f=n.tty.ops.ioctl_tiocgwinsz(n.tty);a=Se.getp(),y[a>>1]=f[0],y[a+2>>1]=f[1]}return 0;default:return-28}}catch(m){if(void 0===Fe||"ErrnoError"!==m.name)throw m;return-m.errno}}function Ce(e,r,t,n){Se.varargs=n;try{r=Se.getStr(r),r=Se.calculateAt(e,r);var o=n?Se.get():0;return Fe.open(r,t,o).fd}catch(a){if(void 0===Fe||"ErrnoError"!==a.name)throw a;return-a.errno}}var De={},Te=e=>{for(;e.length;){var r=e.pop();e.pop()(r)}};function Me(e){return this.fromWireType(E[e>>2])}var Be,je,Le,Re={},Ie={},Oe={},Ne=e=>{throw new Be(e)},We=(e,r,t)=>{function n(r){var n=t(r);n.length!==e.length&&Ne("Mismatched type converter count");for(var o=0;o<e.length;++o)qe(e[o],n[o])}e.forEach((function(e){Oe[e]=r}));var o=new Array(r.length),a=[],i=0;r.forEach(((e,r)=>{Ie.hasOwnProperty(e)?o[r]=Ie[e]:(a.push(e),Re.hasOwnProperty(e)||(Re[e]=[]),Re[e].push((()=>{o[r]=Ie[e],++i===a.length&&n(o)})))})),0===a.length&&n(o)},He=e=>{var r=De[e];delete De[e];var t=r.rawConstructor,n=r.rawDestructor,o=r.fields,a=o.map((e=>e.getterReturnType)).concat(o.map((e=>e.setterArgumentType)));We([e],a,(e=>{var a={};return o.forEach(((r,t)=>{var n=r.fieldName,i=e[t],s=r.getter,u=r.getterContext,l=e[t+o.length],d=r.setter,c=r.setterContext;a[n]={read:e=>i.fromWireType(s(u,e)),write:(e,r)=>{var t=[];d(c,e,l.toWireType(t,r)),Te(t)}}})),[{name:r.name,fromWireType:e=>{var r={};for(var t in a)r[t]=a[t].read(e);return n(e),r},toWireType:(e,r)=>{for(var o in a)if(!(o in r))throw new TypeError(`Missing field: "${o}"`);var i=t();for(o in a)a[o].write(i,r[o]);return null!==e&&e.push(n,i),i},argPackAdvance:Ye,readValueFromPointer:Me,destructorFunction:n}]}))},ze=(e,r,t,n,o)=>{},Ue=()=>{for(var e=new Array(256),r=0;r<256;++r)e[r]=String.fromCharCode(r);je=e},$e=e=>{for(var r="",t=e;g[t];)r+=je[g[t++]];return r},Ve=e=>{throw new Le(e)};function Ge(e,r,t={}){var n=r.name;if(e||Ve(`type "${n}" must have a positive integer typeid pointer`),Ie.hasOwnProperty(e)){if(t.ignoreDuplicateRegistrations)return;Ve(`Cannot register type '${n}' twice`)}if(Ie[e]=r,delete Oe[e],Re.hasOwnProperty(e)){var o=Re[e];delete Re[e],o.forEach((e=>e()))}}function qe(e,r,t={}){if(!("argPackAdvance"in r))throw new TypeError("registerType registeredInstance requires argPackAdvance");return Ge(e,r,t)}var Ye=8,Xe=(e,r,t,n)=>{qe(e,{name:r=$e(r),fromWireType:function(e){return!!e},toWireType:function(e,r){return r?t:n},argPackAdvance:Ye,readValueFromPointer:function(e){return this.fromWireType(g[e])},destructorFunction:null})};function Qe(){Object.assign(Je.prototype,{get(e){return this.allocated[e]},has(e){return void 0!==this.allocated[e]},allocate(e){var r=this.freelist.pop()||this.allocated.length;return this.allocated[r]=e,r},free(e){this.allocated[e]=void 0,this.freelist.push(e)}})}function Je(){this.allocated=[void 0],this.freelist=[]}var Ke=new Je,Ze=e=>{e>=Ke.reserved&&0==--Ke.get(e).refcount&&Ke.free(e)},er=()=>{for(var e=0,r=Ke.reserved;r<Ke.allocated.length;++r)void 0!==Ke.allocated[r]&&++e;return e},rr=()=>{Ke.allocated.push({value:void 0},{value:null},{value:!0},{value:!1}),Ke.reserved=Ke.allocated.length,o.count_emval_handles=er},tr={toValue:e=>(e||Ve("Cannot use deleted val. handle = "+e),Ke.get(e).value),toHandle:e=>{switch(e){case void 0:return 1;case null:return 2;case!0:return 3;case!1:return 4;default:return Ke.allocate({refcount:1,value:e})}}},nr=(e,r)=>{qe(e,{name:r=$e(r),fromWireType:e=>{var r=tr.toValue(e);return Ze(e),r},toWireType:(e,r)=>tr.toHandle(r),argPackAdvance:Ye,readValueFromPointer:Me,destructorFunction:null})},or=(e,r,t)=>{if(void 0===e[r].overloadTable){var n=e[r];e[r]=function(){return e[r].overloadTable.hasOwnProperty(arguments.length)||Ve(`Function '${t}' called with an invalid number of arguments (${arguments.length}) - expects one of (${e[r].overloadTable})!`),e[r].overloadTable[arguments.length].apply(this,arguments)},e[r].overloadTable=[],e[r].overloadTable[n.argCount]=n}},ar=(e,r,t)=>{o.hasOwnProperty(e)?((void 0===t||void 0!==o[e].overloadTable&&void 0!==o[e].overloadTable[t])&&Ve(`Cannot register public name '${e}' twice`),or(o,e,e),o.hasOwnProperty(t)&&Ve(`Cannot register multiple overloads of a function with the same number of arguments (${t})!`),o[e].overloadTable[t]=r):(o[e]=r,void 0!==t&&(o[e].numArguments=t))},ir=(e,r,t)=>{switch(r){case 1:return t?function(e){return this.fromWireType(v[e>>0])}:function(e){return this.fromWireType(g[e>>0])};case 2:return t?function(e){return this.fromWireType(y[e>>1])}:function(e){return this.fromWireType(w[e>>1])};case 4:return t?function(e){return this.fromWireType(E[e>>2])}:function(e){return this.fromWireType(_[e>>2])};default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},sr=(e,r,t,n)=>{function o(){}r=$e(r),o.values={},qe(e,{name:r,constructor:o,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,r)=>r.value,argPackAdvance:Ye,readValueFromPointer:ir(r,t,n),destructorFunction:null}),ar(r,o)},ur=48,lr=57,dr=e=>{if(void 0===e)return"_unknown";var r=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return r>=ur&&r<=lr?`_${e}`:e};function cr(e,r){return{[e=dr(e)]:function(){return r.apply(this,arguments)}}[e]}var fr=e=>{var r=Co(e),t=$e(r);return Ao(r),t},mr=(e,r)=>{var t=Ie[e];return void 0===t&&Ve(r+" has unknown type "+fr(e)),t},hr=(e,r,t)=>{var n=mr(e,"enum");r=$e(r);var o=n.constructor,a=Object.create(n.constructor.prototype,{value:{value:t},constructor:{value:cr(`${n.name}_${r}`,(function(){}))}});o.values[t]=a,o[r]=a},pr=(e,r)=>{switch(r){case 4:return function(e){return this.fromWireType(b[e>>2])};case 8:return function(e){return this.fromWireType(k[e>>3])};default:throw new TypeError(`invalid float width (${r}): ${e}`)}},vr=(e,r,t)=>{qe(e,{name:r=$e(r),fromWireType:e=>e,toWireType:(e,r)=>r,argPackAdvance:Ye,readValueFromPointer:pr(r,t),destructorFunction:null})};function gr(e,r,t,n,o,a){var i=r.length;i<2&&Ve("argTypes array size mismatch! Must at least get return value and 'this' types!");for(var s=null!==r[1]&&null!==t,u=!1,l=1;l<r.length;++l)if(null!==r[l]&&void 0===r[l].destructorFunction){u=!0;break}var d="void"!==r[0].name,c=i-2,f=new Array(c),m=[],h=[];return function(){var t;arguments.length!==c&&Ve(`function ${e} called with ${arguments.length} arguments, expected ${c}`),h.length=0,m.length=s?2:1,m[0]=o,s&&(t=r[1].toWireType(h,this),m[1]=t);for(var a=0;a<c;++a)f[a]=r[a+2].toWireType(h,arguments[a]),m.push(f[a]);function i(e){if(u)Te(h);else for(var n=s?1:2;n<r.length;n++){var o=1===n?t:f[n-2];null!==r[n].destructorFunction&&r[n].destructorFunction(o)}if(d)return r[0].fromWireType(e)}return i(n.apply(null,m))}}var yr,wr,Er=(e,r)=>{for(var t=[],n=0;n<e;n++)t.push(_[r+4*n>>2]);return t},_r=(e,r,t)=>{o.hasOwnProperty(e)||Ne("Replacing nonexistant public symbol"),void 0!==o[e].overloadTable&&void 0!==t?o[e].overloadTable[t]=r:(o[e]=r,o[e].argCount=t)},br=(e,r,t)=>{var n=o["dynCall_"+e];return t&&t.length?n.apply(null,[r].concat(t)):n.call(null,r)},kr=[],xr=e=>{var r=kr[e];return r||(e>=kr.length&&(kr.length=e+1),kr[e]=r=yr.get(e)),r},Fr=(e,r,t)=>e.includes("j")?br(e,r,t):xr(r).apply(null,t),Sr=(e,r)=>{var t=[];return function(){return t.length=0,Object.assign(t,arguments),Fr(e,r,t)}},Ar=(e,r)=>{function t(){return e.includes("j")?Sr(e,r):xr(r)}e=$e(e);var n=t();return"function"!=typeof n&&Ve(`unknown function pointer with signature ${e}: ${r}`),n},Pr=(e,r)=>{var t=cr(r,(function(e){this.name=r,this.message=e;var t=new Error(e).stack;void 0!==t&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))}));return t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},t},Cr=(e,r)=>{var t=[],n={};function o(e){n[e]||Ie[e]||(Oe[e]?Oe[e].forEach(o):(t.push(e),n[e]=!0))}throw r.forEach(o),new wr(`${e}: `+t.map(fr).join([", "]))},Dr=e=>{const r=(e=e.trim()).indexOf("(");return-1!==r?(F(")"==e[e.length-1],"Parentheses for argument names should match."),e.substr(0,r)):e},Tr=(e,r,t,n,o,a,i)=>{var s=Er(r,t);e=$e(e),e=Dr(e),o=Ar(n,o),ar(e,(function(){Cr(`Cannot call ${e} due to unbound types`,s)}),r-1),We([],s,(function(t){var n=[t[0],null].concat(t.slice(1));return _r(e,gr(e,n,null,o,a),r-1),[]}))},Mr=(e,r,t)=>{switch(r){case 1:return t?e=>v[e>>0]:e=>g[e>>0];case 2:return t?e=>y[e>>1]:e=>w[e>>1];case 4:return t?e=>E[e>>2]:e=>_[e>>2];default:throw new TypeError(`invalid integer width (${r}): ${e}`)}},Br=(e,r,t,n,o)=>{r=$e(r);var a=e=>e;if(0===n){var i=32-8*t;a=e=>e<<i>>>i}var s=r.includes("unsigned"),u=(e,r)=>{};qe(e,{name:r,fromWireType:a,toWireType:s?function(e,r){return u(r,this.name),r>>>0}:function(e,r){return u(r,this.name),r},argPackAdvance:Ye,readValueFromPointer:Mr(r,t,0!==n),destructorFunction:null})},jr=(e,r,t)=>{var n=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][r];function o(e){var r=_[e>>2],t=_[e+4>>2];return new n(v.buffer,t,r)}qe(e,{name:t=$e(t),fromWireType:o,argPackAdvance:Ye,readValueFromPointer:o},{ignoreDuplicateRegistrations:!0})};function Lr(e){return this.fromWireType(_[e>>2])}var Rr=(e,r,t)=>fe(e,g,r,t),Ir=(e,r)=>{var t="std::string"===(r=$e(r));qe(e,{name:r,fromWireType(e){var r,n=_[e>>2],o=e+4;if(t)for(var a=o,i=0;i<=n;++i){var s=o+i;if(i==n||0==g[s]){var u=re(a,s-a);void 0===r?r=u:(r+=String.fromCharCode(0),r+=u),a=s+1}}else{var l=new Array(n);for(i=0;i<n;++i)l[i]=String.fromCharCode(g[o+i]);r=l.join("")}return Ao(e),r},toWireType(e,r){var n;r instanceof ArrayBuffer&&(r=new Uint8Array(r));var o="string"==typeof r;o||r instanceof Uint8Array||r instanceof Uint8ClampedArray||r instanceof Int8Array||Ve("Cannot pass non-string to std::string"),n=t&&o?ce(r):r.length;var a=Po(4+n+1),i=a+4;if(_[a>>2]=n,t&&o)Rr(r,i,n+1);else if(o)for(var s=0;s<n;++s){var u=r.charCodeAt(s);u>255&&(Ao(i),Ve("String has UTF-16 code units that do not fit in 8 bits")),g[i+s]=u}else for(s=0;s<n;++s)g[i+s]=r[s];return null!==e&&e.push(Ao,a),a},argPackAdvance:Ye,readValueFromPointer:Lr,destructorFunction(e){Ao(e)}})},Or="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,Nr=(e,r)=>{for(var t=e,n=t>>1,o=n+r/2;!(n>=o)&&w[n];)++n;if((t=n<<1)-e>32&&Or)return Or.decode(g.subarray(e,t));for(var a="",i=0;!(i>=r/2);++i){var s=y[e+2*i>>1];if(0==s)break;a+=String.fromCharCode(s)}return a},Wr=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<2)return 0;for(var n=r,o=(t-=2)<2*e.length?t/2:e.length,a=0;a<o;++a){var i=e.charCodeAt(a);y[r>>1]=i,r+=2}return y[r>>1]=0,r-n},Hr=e=>2*e.length,zr=(e,r)=>{for(var t=0,n="";!(t>=r/4);){var o=E[e+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},Ur=(e,r,t)=>{if(void 0===t&&(t=2147483647),t<4)return 0;for(var n=r,o=n+t-4,a=0;a<e.length;++a){var i=e.charCodeAt(a);if(i>=55296&&i<=57343&&(i=65536+((1023&i)<<10)|1023&e.charCodeAt(++a)),E[r>>2]=i,(r+=4)+4>o)break}return E[r>>2]=0,r-n},$r=e=>{for(var r=0,t=0;t<e.length;++t){var n=e.charCodeAt(t);n>=55296&&n<=57343&&++t,r+=4}return r},Vr=(e,r,t)=>{var n,o,a,i,s;t=$e(t),2===r?(n=Nr,o=Wr,i=Hr,a=()=>w,s=1):4===r&&(n=zr,o=Ur,i=$r,a=()=>_,s=2),qe(e,{name:t,fromWireType:e=>{for(var t,o=_[e>>2],i=a(),u=e+4,l=0;l<=o;++l){var d=e+4+l*r;if(l==o||0==i[d>>s]){var c=n(u,d-u);void 0===t?t=c:(t+=String.fromCharCode(0),t+=c),u=d+r}}return Ao(e),t},toWireType:(e,n)=>{"string"!=typeof n&&Ve(`Cannot pass non-string to C++ string type ${t}`);var a=i(n),u=Po(4+a+r);return _[u>>2]=a>>s,o(n,u+4,a+r),null!==e&&e.push(Ao,u),u},argPackAdvance:Ye,readValueFromPointer:Me,destructorFunction(e){Ao(e)}})},Gr=(e,r,t,n,o,a)=>{De[e]={name:$e(r),rawConstructor:Ar(t,n),rawDestructor:Ar(o,a),fields:[]}},qr=(e,r,t,n,o,a,i,s,u,l)=>{De[e].fields.push({fieldName:$e(r),getterReturnType:t,getter:Ar(n,o),getterContext:a,setterArgumentType:i,setter:Ar(s,u),setterContext:l})},Yr=(e,r)=>{qe(e,{isVoid:!0,name:r=$e(r),argPackAdvance:0,fromWireType:()=>{},toWireType:(e,r)=>{}})},Xr=e=>{do{var r=_[e>>2],t=_[(e+=4)>>2],n=_[(e+=4)>>2];e+=4;var o=re(r);Fe.createPath("/",ie.dirname(o),!0,!0),Fe.createDataFile(o,null,v.subarray(n,n+t),!0,!0,!0)}while(_[e>>2])},Qr=e=>{e>4&&(Ke.get(e).refcount+=1)},Jr={},Kr=e=>{var r=Jr[e];return void 0===r?$e(e):r},Zr=e=>tr.toHandle(Kr(e)),et=()=>tr.toHandle({}),rt=(e,r,t)=>{e=tr.toValue(e),r=tr.toValue(r),t=tr.toValue(t),e[r]=t},tt=(e,r)=>{var t=(e=mr(e,"_emval_take_value")).readValueFromPointer(r);return tr.toHandle(t)},nt=()=>{H("")},ot=(e,r,t)=>g.copyWithin(e,r,r+t),at=()=>2147483648,it=e=>{var r=(e-m.buffer.byteLength+65535)/65536;try{return m.grow(r),S(),1}catch(t){}},st=e=>{var r=g.length;e>>>=0;var t=at();if(e>t)return!1;for(var n=(e,r)=>e+(r-e%r)%r,o=1;o<=4;o*=2){var a=r*(1+.2/o);a=Math.min(a,e+100663296);var i=Math.min(t,n(Math.max(e,a),65536));if(it(i))return!0}return!1},ut=e=>!!(e.dibvbi=e.getExtension("WEBGL_draw_instanced_base_vertex_base_instance")),lt=e=>!!(e.mdibvbi=e.getExtension("WEBGL_multi_draw_instanced_base_vertex_base_instance")),dt=e=>!!(e.multiDrawWebgl=e.getExtension("WEBGL_multi_draw")),ct={counter:1,buffers:[],programs:[],framebuffers:[],renderbuffers:[],textures:[],shaders:[],vaos:[],contexts:[],offscreenCanvases:{},queries:[],samplers:[],transformFeedbacks:[],syncs:[],stringCache:{},stringiCache:{},unpackAlignment:4,recordError:function(e){ct.lastError||(ct.lastError=e)},getNewId:e=>{for(var r=ct.counter++,t=e.length;t<r;t++)e[t]=null;return r},getSource:(e,r,t,n)=>{for(var o="",a=0;a<r;++a){var i=n?E[n+4*a>>2]:-1;o+=re(E[t+4*a>>2],i<0?void 0:i)}return o},createContext:(e,r)=>{if(o.preinitializedWebGLContext){var t=o.preinitializedWebGLContext;r.majorVersion=Number(t.getParameter(t.VERSION).match(/^WebGL (\d+).\d+/)[1])}else{if(!e.getContextSafariWebGL2Fixed){function n(r,t){var n=e.getContextSafariWebGL2Fixed(r,t);return"webgl"==r==n instanceof WebGLRenderingContext?n:null}e.getContextSafariWebGL2Fixed=e.getContext,e.getContext=n}t=e.getContext("webgl2",r)}return t?ct.registerContext(t,r):0},registerContext:(e,r)=>{var t=ct.getNewId(ct.contexts),n={handle:t,attributes:r,version:r.majorVersion,GLctx:e};return e.canvas&&(e.canvas.GLctxObject=n),ct.contexts[t]=n,(void 0===r.enableExtensionsByDefault||r.enableExtensionsByDefault)&&ct.initExtensions(n),t},makeContextCurrent:e=>(ct.currentContext=ct.contexts[e],o.ctx=qn=ct.currentContext&&ct.currentContext.GLctx,!(e&&!qn)),getContext:e=>ct.contexts[e],deleteContext:e=>{ct.currentContext===ct.contexts[e]&&(ct.currentContext=null),"object"==typeof ft&&ft.removeAllHandlersOnTarget(ct.contexts[e].GLctx.canvas),ct.contexts[e]&&ct.contexts[e].GLctx.canvas&&(ct.contexts[e].GLctx.canvas.GLctxObject=void 0),ct.contexts[e]=null},initExtensions:e=>{if(e||(e=ct.currentContext),!e.initExtensionsDone){e.initExtensionsDone=!0;var r=e.GLctx;ut(r),lt(r),e.version>=2&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query_webgl2")),(e.version<2||!r.disjointTimerQueryExt)&&(r.disjointTimerQueryExt=r.getExtension("EXT_disjoint_timer_query")),dt(r),(r.getSupportedExtensions()||[]).forEach((e=>{e.includes("lose_context")||e.includes("debug")||r.getExtension(e)}))}}},ft={inEventHandler:0,removeAllEventListeners(){for(var e=ft.eventHandlers.length-1;e>=0;--e)ft._removeHandler(e);ft.eventHandlers=[],ft.deferredCalls=[]},registerRemoveEventListeners(){ft.removeEventListenersRegistered||(ft.removeEventListenersRegistered=!0)},deferredCalls:[],deferCall(e,r,t){function n(e,r){if(e.length!=r.length)return!1;for(var t in e)if(e[t]!=r[t])return!1;return!0}for(var o in ft.deferredCalls){var a=ft.deferredCalls[o];if(a.targetFunction==e&&n(a.argsList,t))return}ft.deferredCalls.push({targetFunction:e,precedence:r,argsList:t}),ft.deferredCalls.sort(((e,r)=>e.precedence<r.precedence))},removeDeferredCalls(e){for(var r=0;r<ft.deferredCalls.length;++r)ft.deferredCalls[r].targetFunction==e&&(ft.deferredCalls.splice(r,1),--r)},canPerformEventHandlerRequests:()=>navigator.userActivation?navigator.userActivation.isActive:ft.inEventHandler&&ft.currentEventHandler.allowsDeferredCalls,runDeferredCalls(){if(ft.canPerformEventHandlerRequests())for(var e=0;e<ft.deferredCalls.length;++e){var r=ft.deferredCalls[e];ft.deferredCalls.splice(e,1),--e,r.targetFunction.apply(null,r.argsList)}},eventHandlers:[],removeAllHandlersOnTarget:(e,r)=>{for(var t=0;t<ft.eventHandlers.length;++t)ft.eventHandlers[t].target!=e||r&&r!=ft.eventHandlers[t].eventTypeString||ft._removeHandler(t--)},_removeHandler(e){var r=ft.eventHandlers[e];r.target.removeEventListener(r.eventTypeString,r.eventListenerFunc,r.useCapture),ft.eventHandlers.splice(e,1)},registerOrRemoveHandler(e){if(!e.target)return-4;var r=function(r){++ft.inEventHandler,ft.currentEventHandler=e,ft.runDeferredCalls(),e.handlerFunc(r),ft.runDeferredCalls(),--ft.inEventHandler};if(e.callbackfunc)e.eventListenerFunc=r,e.target.addEventListener(e.eventTypeString,r,e.useCapture),ft.eventHandlers.push(e),ft.registerRemoveEventListeners();else for(var t=0;t<ft.eventHandlers.length;++t)ft.eventHandlers[t].target==e.target&&ft.eventHandlers[t].eventTypeString==e.eventTypeString&&ft._removeHandler(t--);return 0},getNodeNameForTarget:e=>e?e==window?"#window":e==screen?"#screen":e&&e.nodeName?e.nodeName:"":"",fullscreenEnabled:()=>document.fullscreenEnabled||document.webkitFullscreenEnabled},mt=["default","low-power","high-performance"],ht=e=>e>2?re(e):e,pt=[0,document,window],vt=e=>(e=ht(e),pt[e]||document.querySelector(e)),gt=e=>vt(e),yt=(e,r)=>{var t=r>>2,n=E[t+6],o={alpha:!!E[t+0],depth:!!E[t+1],stencil:!!E[t+2],antialias:!!E[t+3],premultipliedAlpha:!!E[t+4],preserveDrawingBuffer:!!E[t+5],powerPreference:mt[n],failIfMajorPerformanceCaveat:!!E[t+7],majorVersion:E[t+8],minorVersion:E[t+9],enableExtensionsByDefault:E[t+10],explicitSwapControl:E[t+11],proxyContextToMainThread:E[t+12],renderViaOffscreenBackBuffer:E[t+13]},a=gt(e);return a?o.explicitSwapControl?0:ct.createContext(a,o):0},wt=e=>{for(var r=e>>2,t=0;t<14;++t)E[r+t]=0;E[r+0]=E[r+1]=E[r+3]=E[r+4]=E[r+8]=E[r+10]=1},Et=e=>ct.makeContextCurrent(e)?0:-5,_t={},bt=()=>u||"./this.program",kt=()=>{if(!kt.strings){var e={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",_:bt()};for(var r in _t)void 0===_t[r]?delete e[r]:e[r]=_t[r];var t=[];for(var r in e)t.push(`${r}=${e[r]}`);kt.strings=t}return kt.strings},xt=(e,r)=>{for(var t=0;t<e.length;++t)v[r++>>0]=e.charCodeAt(t);v[r>>0]=0},Ft=(e,r)=>{var t=0;return kt().forEach(((n,o)=>{var a=r+t;_[e+4*o>>2]=a,xt(n,a),t+=n.length+1})),0},St=(e,r)=>{var t=kt();_[e>>2]=t.length;var n=0;return t.forEach((e=>n+=e.length+1)),_[r>>2]=n,0};function At(e){try{var r=Se.getStreamFromFD(e);return Fe.close(r),0}catch(t){if(void 0===Fe||"ErrnoError"!==t.name)throw t;return t.errno}}var Pt=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=Fe.read(e,v,i,s,n);if(u<0)return-1;if(o+=u,u<s)break;void 0!==n&&(n+=u)}return o};function Ct(e,r,t,n){try{var o=Se.getStreamFromFD(e),a=Pt(o,r,t);return _[n>>2]=a,0}catch(i){if(void 0===Fe||"ErrnoError"!==i.name)throw i;return i.errno}}var Dt=(e,r)=>r+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*r:NaN;function Tt(e,r,t,n,o){var a=Dt(r,t);try{if(isNaN(a))return 61;var i=Se.getStreamFromFD(e);return Fe.llseek(i,a,n),$=[i.position>>>0,(U=i.position,+Math.abs(U)>=1?U>0?+Math.floor(U/4294967296)>>>0:~~+Math.ceil((U-+(~~U>>>0))/4294967296)>>>0:0)],E[o>>2]=$[0],E[o+4>>2]=$[1],i.getdents&&0===a&&0===n&&(i.getdents=null),0}catch(s){if(void 0===Fe||"ErrnoError"!==s.name)throw s;return s.errno}}var Mt=(e,r,t,n)=>{for(var o=0,a=0;a<t;a++){var i=_[r>>2],s=_[r+4>>2];r+=8;var u=Fe.write(e,v,i,s,n);if(u<0)return-1;o+=u,void 0!==n&&(n+=u)}return o};function Bt(e,r,t,n){try{var o=Se.getStreamFromFD(e),a=Mt(o,r,t);return _[n>>2]=a,0}catch(i){if(void 0===Fe||"ErrnoError"!==i.name)throw i;return i.errno}}function jt(e){qn.activeTexture(e)}var Lt=(e,r)=>{qn.attachShader(ct.programs[e],ct.shaders[r])},Rt=(e,r,t)=>{qn.bindAttribLocation(ct.programs[e],r,re(t))},It=(e,r)=>{35051==e?qn.currentPixelPackBufferBinding=r:35052==e&&(qn.currentPixelUnpackBufferBinding=r),qn.bindBuffer(e,ct.buffers[r])},Ot=(e,r,t)=>{qn.bindBufferBase(e,r,ct.buffers[t])},Nt=(e,r,t,n,o)=>{qn.bindBufferRange(e,r,ct.buffers[t],n,o)},Wt=(e,r)=>{qn.bindFramebuffer(e,ct.framebuffers[r])},Ht=(e,r)=>{qn.bindTexture(e,ct.textures[r])},zt=e=>{qn.bindVertexArray(ct.vaos[e])},Ut=(e,r,t,n)=>{t&&r?qn.bufferData(e,g,n,t,r):qn.bufferData(e,r,n)},$t=(e,r,t,n)=>{t&&qn.bufferSubData(e,r,g,n,t)};function Vt(e){qn.clear(e)}function Gt(e,r,t,n){qn.clearBufferfi(e,r,t,n)}var qt=(e,r,t)=>{qn.clearBufferfv(e,r,b,t>>2)},Yt=(e,r,t)=>{qn.clearBufferiv(e,r,E,t>>2)},Xt=(e,r,t)=>{qn.clearBufferuiv(e,r,_,t>>2)};function Qt(e,r,t,n){qn.clearColor(e,r,t,n)}function Jt(e){qn.clearDepth(e)}function Kt(e){qn.clearStencil(e)}var Zt=(e,r,t,n)=>{qn.colorMask(!!e,!!r,!!t,!!n)},en=e=>{qn.compileShader(ct.shaders[e])},rn=()=>{var e=ct.getNewId(ct.programs),r=qn.createProgram();return r.name=e,r.maxUniformLength=r.maxAttributeLength=r.maxUniformBlockNameLength=0,r.uniformIdCounter=1,ct.programs[e]=r,e},tn=e=>{var r=ct.getNewId(ct.shaders);return ct.shaders[r]=qn.createShader(e),r},nn=(e,r)=>{for(var t=0;t<e;t++){var n=E[r+4*t>>2],o=ct.buffers[n];o&&(qn.deleteBuffer(o),o.name=0,ct.buffers[n]=null,n==qn.currentPixelPackBufferBinding&&(qn.currentPixelPackBufferBinding=0),n==qn.currentPixelUnpackBufferBinding&&(qn.currentPixelUnpackBufferBinding=0))}},on=(e,r)=>{for(var t=0;t<e;++t){var n=E[r+4*t>>2],o=ct.framebuffers[n];o&&(qn.deleteFramebuffer(o),o.name=0,ct.framebuffers[n]=null)}},an=e=>{if(e){var r=ct.programs[e];r?(qn.deleteProgram(r),r.name=0,ct.programs[e]=null):ct.recordError(1281)}},sn=(e,r)=>{for(var t=0;t<e;t++){var n=E[r+4*t>>2],o=ct.queries[n];o&&(qn.deleteQuery(o),ct.queries[n]=null)}},un=e=>{if(e){var r=ct.shaders[e];r?(qn.deleteShader(r),ct.shaders[e]=null):ct.recordError(1281)}},ln=(e,r)=>{for(var t=0;t<e;t++){var n=E[r+4*t>>2],o=ct.textures[n];o&&(qn.deleteTexture(o),o.name=0,ct.textures[n]=null)}},dn=(e,r)=>{for(var t=0;t<e;t++){var n=E[r+4*t>>2];qn.deleteVertexArray(ct.vaos[n]),ct.vaos[n]=null}},cn=(e,r,t)=>{qn.drawArrays(e,r,t)},fn=[],mn=(e,r)=>{for(var t=fn[e],n=0;n<e;n++)t[n]=E[r+4*n>>2];qn.drawBuffers(t)},hn=(e,r,t,n)=>{qn.drawElements(e,r,t,n)},pn=(e,r,t,n,o)=>{qn.drawElementsInstanced(e,r,t,n,o)},vn=e=>{qn.enableVertexAttribArray(e)},gn=(e,r,t,n,o)=>{qn.framebufferTexture2D(e,r,t,ct.textures[n],o)},yn=(e,r,t,n)=>{for(var o=0;o<e;o++){var a=qn[t](),i=a&&ct.getNewId(n);a?(a.name=i,n[i]=a):ct.recordError(1282),E[r+4*o>>2]=i}},wn=(e,r)=>{yn(e,r,"createBuffer",ct.buffers)},En=(e,r)=>{yn(e,r,"createFramebuffer",ct.framebuffers)},_n=(e,r)=>{yn(e,r,"createQuery",ct.queries)},bn=(e,r)=>{yn(e,r,"createTexture",ct.textures)};function kn(e,r){yn(e,r,"createVertexArray",ct.vaos)}function xn(e){qn.generateMipmap(e)}var Fn=(e,r)=>{_[e>>2]=r;var t=_[e>>2];_[e+4>>2]=(r-t)/4294967296},Sn=(e,r,t)=>{if(r){var n=void 0;switch(e){case 36346:n=1;break;case 36344:return void(0!=t&&1!=t&&ct.recordError(1280));case 34814:case 36345:n=0;break;case 34466:var o=qn.getParameter(34467);n=o?o.length:0;break;case 33309:if(ct.currentContext.version<2)return void ct.recordError(1282);n=2*(qn.getSupportedExtensions()||[]).length;break;case 33307:case 33308:if(ct.currentContext.version<2)return void ct.recordError(1280);n=33307==e?3:0}if(void 0===n){var a=qn.getParameter(e);switch(typeof a){case"number":n=a;break;case"boolean":n=a?1:0;break;case"string":return void ct.recordError(1280);case"object":if(null===a)switch(e){case 34964:case 35725:case 34965:case 36006:case 36007:case 32873:case 34229:case 36662:case 36663:case 35053:case 35055:case 36010:case 35097:case 35869:case 32874:case 36389:case 35983:case 35368:case 34068:n=0;break;default:return void ct.recordError(1280)}else{if(a instanceof Float32Array||a instanceof Uint32Array||a instanceof Int32Array||a instanceof Array){for(var i=0;i<a.length;++i)switch(t){case 0:E[r+4*i>>2]=a[i];break;case 2:b[r+4*i>>2]=a[i];break;case 4:v[r+i>>0]=a[i]?1:0}return}try{n=0|a.name}catch(s){return ct.recordError(1280),void p("GL_INVALID_ENUM in glGet"+t+"v: Unknown object returned from WebGL getParameter("+e+")! (error: "+s+")")}}break;default:return ct.recordError(1280),void p("GL_INVALID_ENUM in glGet"+t+"v: Native code calling glGet"+t+"v("+e+") and it returns "+a+" of type "+typeof a+"!")}}switch(t){case 1:Fn(r,n);break;case 0:E[r>>2]=n;break;case 2:b[r>>2]=n;break;case 4:v[r>>0]=n?1:0}}else ct.recordError(1281)},An=(e,r)=>{Sn(e,r,0)},Pn=(e,r,t)=>{if(t){var n,o=ct.queries[e];n=ct.currentContext.version<2?qn.disjointTimerQueryExt.getQueryObjectEXT(o,r):qn.getQueryParameter(o,r),Fn(t,"boolean"==typeof n?n?1:0:n)}else ct.recordError(1281)},Cn=(e,r,t)=>{if(t){var n,o=ct.queries[e],a=qn.disjointTimerQueryExt.getQueryObjectEXT(o,r);n="boolean"==typeof a?a?1:0:a,E[t>>2]=n}else ct.recordError(1281)},Dn=(e,r)=>qn.getUniformBlockIndex(ct.programs[e],re(r)),Tn=e=>parseInt(e),Mn=e=>"]"==e.slice(-1)&&e.lastIndexOf("["),Bn=e=>{var r,t,n=e.uniformLocsById,o=e.uniformSizeAndIdsByName;if(!n)for(e.uniformLocsById=n={},e.uniformArrayNamesById={},r=0;r<qn.getProgramParameter(e,35718);++r){var a=qn.getActiveUniform(e,r),i=a.name,s=a.size,u=Mn(i),l=u>0?i.slice(0,u):i,d=e.uniformIdCounter;for(e.uniformIdCounter+=s,o[l]=[s,d],t=0;t<s;++t)n[d]=t,e.uniformArrayNamesById[d++]=l}},jn=(e,r)=>{if(r=re(r),e=ct.programs[e]){Bn(e);var t=e.uniformLocsById,n=0,o=r,a=Mn(r);a>0&&(n=Tn(r.slice(a+1))>>>0,o=r.slice(0,a));var i=e.uniformSizeAndIdsByName[o];if(i&&n<i[0]&&(t[n+=i[1]]=t[n]||qn.getUniformLocation(e,r)))return n}else ct.recordError(1281);return-1},Ln=e=>{e=ct.programs[e],qn.linkProgram(e),e.uniformLocsById=0,e.uniformSizeAndIdsByName={}},Rn=(e,r)=>{3317==e&&(ct.unpackAlignment=r),qn.pixelStorei(e,r)},In=(e,r)=>{qn.disjointTimerQueryExt.queryCounterEXT(ct.queries[e],r)};function On(e){qn.readBuffer(e)}var Nn=e=>0==(e-=5120)?v:1==e?g:2==e?y:4==e?E:6==e?b:5==e||28922==e||28520==e||30779==e||30782==e?_:w,Wn=e=>31-Math.clz32(e.BYTES_PER_ELEMENT),Hn=(e,r,t,n,o,a,i)=>{if(qn.currentPixelPackBufferBinding)qn.readPixels(e,r,t,n,o,a,i);else{var s=Nn(a);qn.readPixels(e,r,t,n,o,a,s,i>>Wn(s))}},zn=(e,r,t,n)=>{var o=ct.getSource(e,r,t,n);qn.shaderSource(ct.shaders[e],o)},Un=(e,r,t,n,o,a,i,s,u,l)=>{if(qn.currentPixelUnpackBufferBinding)qn.texImage3D(e,r,t,n,o,a,i,s,u,l);else if(l){var d=Nn(u);qn.texImage3D(e,r,t,n,o,a,i,s,u,d,l>>Wn(d))}else qn.texImage3D(e,r,t,n,o,a,i,s,u,null)};function $n(e,r,t){qn.texParameteri(e,r,t)}function Vn(e,r,t,n,o){qn.texStorage2D(e,r,t,n,o)}var Gn,qn,Yn=(e,r,t,n,o,a,i,s,u)=>{if(qn.currentPixelUnpackBufferBinding)qn.texSubImage2D(e,r,t,n,o,a,i,s,u);else if(u){var l=Nn(s);qn.texSubImage2D(e,r,t,n,o,a,i,s,l,u>>Wn(l))}else qn.texSubImage2D(e,r,t,n,o,a,i,s,null)},Xn=(e,r,t,n,o,a,i,s,u,l,d)=>{if(qn.currentPixelUnpackBufferBinding)qn.texSubImage3D(e,r,t,n,o,a,i,s,u,l,d);else if(d){var c=Nn(l);qn.texSubImage3D(e,r,t,n,o,a,i,s,u,l,c,d>>Wn(c))}else qn.texSubImage3D(e,r,t,n,o,a,i,s,u,l,null)},Qn=e=>{var r=qn.currentProgram;if(r){var t=r.uniformLocsById[e];return"number"==typeof t&&(r.uniformLocsById[e]=t=qn.getUniformLocation(r,r.uniformArrayNamesById[e]+(t>0?"["+t+"]":""))),t}ct.recordError(1282)},Jn=(e,r)=>{qn.uniform1i(Qn(e),r)},Kn=(e,r,t)=>{e=ct.programs[e],qn.uniformBlockBinding(e,r,t)},Zn=e=>{e=ct.programs[e],qn.useProgram(e),qn.currentProgram=e},eo=(e,r,t,n,o)=>{qn.vertexAttribIPointer(e,r,t,n,o)},ro=(e,r,t,n,o,a)=>{qn.vertexAttribPointer(e,r,t,!!n,o,a)},to=e=>e%4==0&&(e%100!=0||e%400==0),no=(e,r)=>{for(var t=0,n=0;n<=r;t+=e[n++]);return t},oo=[31,29,31,30,31,30,31,31,30,31,30,31],ao=[31,28,31,30,31,30,31,31,30,31,30,31],io=(e,r)=>{for(var t=new Date(e.getTime());r>0;){var n=to(t.getFullYear()),o=t.getMonth(),a=(n?oo:ao)[o];if(!(r>a-t.getDate()))return t.setDate(t.getDate()+r),t;r-=a-t.getDate()+1,t.setDate(1),o<11?t.setMonth(o+1):(t.setMonth(0),t.setFullYear(t.getFullYear()+1))}return t},so=(e,r)=>{v.set(e,r)},uo=(e,r,t,n)=>{var o=_[n+40>>2],a={tm_sec:E[n>>2],tm_min:E[n+4>>2],tm_hour:E[n+8>>2],tm_mday:E[n+12>>2],tm_mon:E[n+16>>2],tm_year:E[n+20>>2],tm_wday:E[n+24>>2],tm_yday:E[n+28>>2],tm_isdst:E[n+32>>2],tm_gmtoff:E[n+36>>2],tm_zone:o?re(o):""},i=re(t),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)i=i.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d=["January","February","March","April","May","June","July","August","September","October","November","December"];function c(e,r,t){for(var n="number"==typeof e?e.toString():e||"";n.length<r;)n=t[0]+n;return n}function f(e,r){return c(e,r,"0")}function m(e,r){function t(e){return e<0?-1:e>0?1:0}var n;return 0===(n=t(e.getFullYear()-r.getFullYear()))&&0===(n=t(e.getMonth()-r.getMonth()))&&(n=t(e.getDate()-r.getDate())),n}function h(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var r=io(new Date(e.tm_year+1900,0,1),e.tm_yday),t=new Date(r.getFullYear(),0,4),n=new Date(r.getFullYear()+1,0,4),o=h(t),a=h(n);return m(o,r)<=0?m(a,r)<=0?r.getFullYear()+1:r.getFullYear():r.getFullYear()-1}var v={"%a":e=>l[e.tm_wday].substring(0,3),"%A":e=>l[e.tm_wday],"%b":e=>d[e.tm_mon].substring(0,3),"%B":e=>d[e.tm_mon],"%C":e=>f((e.tm_year+1900)/100|0,2),"%d":e=>f(e.tm_mday,2),"%e":e=>c(e.tm_mday,2," "),"%g":e=>p(e).toString().substring(2),"%G":e=>p(e),"%H":e=>f(e.tm_hour,2),"%I":e=>{var r=e.tm_hour;return 0==r?r=12:r>12&&(r-=12),f(r,2)},"%j":e=>f(e.tm_mday+no(to(e.tm_year+1900)?oo:ao,e.tm_mon-1),3),"%m":e=>f(e.tm_mon+1,2),"%M":e=>f(e.tm_min,2),"%n":()=>"\n","%p":e=>e.tm_hour>=0&&e.tm_hour<12?"AM":"PM","%S":e=>f(e.tm_sec,2),"%t":()=>"\t","%u":e=>e.tm_wday||7,"%U":e=>{var r=e.tm_yday+7-e.tm_wday;return f(Math.floor(r/7),2)},"%V":e=>{var r=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&r++,r){if(53==r){var t=(e.tm_wday+371-e.tm_yday)%7;4==t||3==t&&to(e.tm_year)||(r=1)}}else{r=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&to(e.tm_year%400-1))&&r++}return f(r,2)},"%w":e=>e.tm_wday,"%W":e=>{var r=e.tm_yday+7-(e.tm_wday+6)%7;return f(Math.floor(r/7),2)},"%y":e=>(e.tm_year+1900).toString().substring(2),"%Y":e=>e.tm_year+1900,"%z":e=>{var r=e.tm_gmtoff,t=r>=0;return r=(r=Math.abs(r)/60)/60*100+r%60,(t?"+":"-")+String("0000"+r).slice(-4)},"%Z":e=>e.tm_zone,"%%":()=>"%"};for(var u in i=i.replace(/%%/g,"\0\0"),v)i.includes(u)&&(i=i.replace(new RegExp(u,"g"),v[u](a)));var g=me(i=i.replace(/\0\0/g,"%"),!1);return g.length>r?0:(so(g,e),g.length-1)},lo=(e,r,t,n,o)=>uo(e,r,t,n),co=(e,r)=>{e<128?r.push(e):r.push(e%128|128,e>>7)},fo=e=>{for(var r={i:"i32",j:"i64",f:"f32",d:"f64",e:"externref",p:"i32"},t={parameters:[],results:"v"==e[0]?[]:[r[e[0]]]},n=1;n<e.length;++n)t.parameters.push(r[e[n]]);return t},mo=(e,r)=>{var t=e.slice(0,1),n=e.slice(1),o={i:127,p:127,j:126,f:125,d:124,e:111};r.push(96),co(n.length,r);for(var a=0;a<n.length;++a)r.push(o[n[a]]);"v"==t?r.push(0):r.push(1,o[t])},ho=(e,r)=>{if("function"==typeof WebAssembly.Function)return new WebAssembly.Function(fo(r),e);var t=[1];mo(r,t);var n=[0,97,115,109,1,0,0,0,1];co(t.length,n),n.push.apply(n,t),n.push(2,7,1,1,101,1,102,0,0,7,5,1,1,102,0,0);var o=new WebAssembly.Module(new Uint8Array(n));return new WebAssembly.Instance(o,{e:{f:e}}).exports.f},po=(e,r)=>{if(Gn)for(var t=e;t<e+r;t++){var n=xr(t);n&&Gn.set(n,t)}},vo=e=>(Gn||(Gn=new WeakMap,po(0,yr.length)),Gn.get(e)||0),go=[],yo=()=>{if(go.length)return go.pop();try{yr.grow(1)}catch(p){if(!(p instanceof RangeError))throw p;throw"Unable to grow wasm table. Set ALLOW_TABLE_GROWTH."}return yr.length-1},wo=(e,r)=>{yr.set(e,r),kr[e]=yr.get(e)},Eo=(e,r)=>{var t=vo(e);if(t)return t;var n=yo();try{wo(n,e)}catch(p){if(!(p instanceof TypeError))throw p;var o=ho(e,r);wo(n,o)}return Gn.set(e,n),n},_o=function(e,r,t,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=Fe.nextInode++,this.name=r,this.mode=t,this.node_ops={},this.stream_ops={},this.rdev=n},bo=365,ko=146;Object.defineProperties(_o.prototype,{read:{get:function(){return(this.mode&bo)===bo},set:function(e){e?this.mode|=bo:this.mode&=~bo}},write:{get:function(){return(this.mode&ko)===ko},set:function(e){e?this.mode|=ko:this.mode&=~ko}},isFolder:{get:function(){return Fe.isDir(this.mode)}},isDevice:{get:function(){return Fe.isChrdev(this.mode)}}}),Fe.FSNode=_o,Fe.createPreloadedFile=be,Fe.staticInit(),o.FS_createPath=Fe.createPath,o.FS_createDataFile=Fe.createDataFile,o.FS_createPreloadedFile=Fe.createPreloadedFile,o.FS_unlink=Fe.unlink,o.FS_createLazyFile=Fe.createLazyFile,o.FS_createDevice=Fe.createDevice,Be=o.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Ue(),Le=o.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},Qe(),rr(),wr=o.UnboundTypeError=Pr(Error,"UnboundTypeError");for(var xo=0;xo<32;++xo)fn.push(new Array(xo));var Fo={X:te,m:oe,z:Ae,$:Pe,aa:Ce,ia:He,Ta:ze,ea:Xe,da:nr,F:sr,k:hr,E:vr,e:Tr,g:Br,f:jr,D:Ir,w:Vr,ja:Gr,o:qr,fa:Yr,ga:Xr,a:Ze,n:Qr,b:Zr,h:et,c:rt,d:tt,A:nt,ca:ot,ba:st,la:yt,oa:wt,ha:Et,Y:Ft,Z:St,B:At,_:Ct,Sa:Tt,C:Bt,La:jt,q:Lt,Ca:Rt,Oa:It,Ma:Ot,Na:Nt,t:Wt,i:Ht,u:zt,Va:Ut,P:$t,S:Vt,Ga:Gt,y:qt,Fa:Yt,Q:Xt,Ja:Qt,Ia:Jt,Ha:Kt,ka:Zt,L:en,Da:rn,N:tn,W:nn,T:on,Ea:an,I:sn,p:un,R:ln,K:dn,Pa:cn,Ka:mn,Qa:hn,Ra:pn,qa:vn,s:gn,Wa:wn,U:En,J:_n,xa:bn,ra:kn,sa:xn,v:An,G:Pn,ma:Cn,Ba:Dn,za:jn,O:Ln,j:Rn,H:In,x:On,r:Hn,M:zn,va:Un,l:$n,wa:Vn,ta:Yn,ua:Xn,ya:Jn,Aa:Kn,V:Zn,na:eo,pa:ro,Ua:lo},So=J(),Ao=o._free=e=>(Ao=o._free=So._a)(e),Po=o._malloc=e=>(Po=o._malloc=So.$a)(e),Co=e=>(Co=So.ab)(e);o.__embind_initialize_bindings=()=>(o.__embind_initialize_bindings=So.bb)();var Do,To=()=>(To=So.cb)(),Mo=e=>(Mo=So.db)(e);function Bo(){function e(){Do||(Do=!0,o.calledRun=!0,x||(T(),r(o),o.onRuntimeInitialized&&o.onRuntimeInitialized(),M()))}R>0||(D(),R>0||(o.setStatus?(o.setStatus("Running..."),setTimeout((function(){setTimeout((function(){o.setStatus("")}),1),e()}),1)):e()))}if(o.dynCall_iij=(e,r,t,n)=>(o.dynCall_iij=So.eb)(e,r,t,n),o.dynCall_jiji=(e,r,t,n,a)=>(o.dynCall_jiji=So.fb)(e,r,t,n,a),o.dynCall_viijii=(e,r,t,n,a,i,s)=>(o.dynCall_viijii=So.gb)(e,r,t,n,a,i,s),o.dynCall_iiiiij=(e,r,t,n,a,i,s)=>(o.dynCall_iiiiij=So.hb)(e,r,t,n,a,i,s),o.dynCall_iiiiijj=(e,r,t,n,a,i,s,u,l)=>(o.dynCall_iiiiijj=So.ib)(e,r,t,n,a,i,s,u,l),o.dynCall_iiiiiijj=(e,r,t,n,a,i,s,u,l,d)=>(o.dynCall_iiiiiijj=So.jb)(e,r,t,n,a,i,s,u,l,d),o.___emscripten_embedded_file_data=139592,o.addRunDependency=N,o.removeRunDependency=W,o.FS_createPath=Fe.createPath,o.FS_createLazyFile=Fe.createLazyFile,o.FS_createDevice=Fe.createDevice,o.addFunction=Eo,o.stringToUTF8=Rr,o.lengthBytesUTF8=ce,o.FS_createPreloadedFile=Fe.createPreloadedFile,o.FS_createDataFile=Fe.createDataFile,o.FS_unlink=Fe.unlink,I=function e(){Do||Bo(),Do||(I=e)},o.preInit)for("function"==typeof o.preInit&&(o.preInit=[o.preInit]);o.preInit.length>0;)o.preInit.pop()();return Bo(),e.ready},r.exports=n;const a=e(o.exports),i=Object.freeze(Object.defineProperty({__proto__:null,default:a},Symbol.toStringTag,{value:"Module"}));export{i as v};
|
package/core/PooledArray.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{PositionHint as t,indexOf as h,removeUnorderedMany as i}from"./arrayUtils.js";import s from"./HeapSort.js";const a=1.5,e=1.1;class l{constructor(h){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new t,h&&(h.initialSize&&(this.data=new Array(h.initialSize)),h.allocator&&(this._allocator=h.allocator),void 0!==h.deallocator&&(this._deallocator=h.deallocator),h.shrink&&(this._shrink=()=>n(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const h=new Array;for(let i=0;i<this._length;i++){const s=this.data[i];t(s)&&h.push(s)}return h}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,h){const i=this.data.indexOf(t,h);return-1!==i&&i<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let h=t;h<this._length;++h)this.data[h]=this._deallocator(this.data[h]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,h=t.length){for(let i=0;i<h;i++)this.data[this._length++]=t[i]}fill(t,h){for(let i=0;i<h;i++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,n(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const i=h(this.data,t,this.length,this._hint);if(-1!==i)return this.data.splice(i,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex(h(this.data,t,this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,h=t.length,s){this.length=i(this.data,t,this.length,h,this._hint,s),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,h){if(t>=this.length||h>=this.length||t===h)return;const i=this.data[t];this.data[t]=this.data[h],this.data[h]=i}sort(t){s.sort(this.data,0,this.length,t)}iterableSort(t){return s.iterableSort(this.data,0,this.length,t)}some(t,h){for(let i=0;i<this.length;++i)if(t.call(h,this.data[i],i,this.data))return!0;return!1}find(t,h){for(let i=0;i<this.length;++i){const s=this.data[i];if(t.call(h,s,i))return s}}filterInPlace(t,h){let i=0;for(let s=0;s<this._length;++s){const a=this.data[s];t.call(h,a,s,this.data)&&(this.data[s]=this.data[i],this.data[i]=a,i++)}if(this._deallocator)for(let s=i;s<this._length;s++)this.data[s]=this._deallocator(this.data[s]);return this._length=i,this._shrink(),this}forAll(t,h){const
|
|
5
|
+
import{PositionHint as t,indexOf as h,removeUnorderedMany as i}from"./arrayUtils.js";import s from"./HeapSort.js";const a=1.5,e=1.1;class l{constructor(h){this.data=[],this._length=0,this._allocator=void 0,this._deallocator=()=>null,this._shrink=()=>{},this._hint=new t,h&&(h.initialSize&&(this.data=new Array(h.initialSize)),h.allocator&&(this._allocator=h.allocator),void 0!==h.deallocator&&(this._deallocator=h.deallocator),h.shrink&&(this._shrink=()=>n(this)))}toArray(){return this.data.slice(0,this.length)}filter(t){const h=new Array;for(let i=0;i<this._length;i++){const s=this.data[i];t(s)&&h.push(s)}return h}at(t){if((t=Math.trunc(t)||0)<0&&(t+=this._length),!(t<0||t>=this._length))return this.data[t]}includes(t,h){const i=this.data.indexOf(t,h);return-1!==i&&i<this.length}get length(){return this._length}set length(t){if(t>this._length){if(this._allocator){for(;this._length<t;)this.data[this._length++]=this._allocator(this.data[this._length]);return}this._length=t}else{if(this._deallocator)for(let h=t;h<this._length;++h)this.data[h]=this._deallocator(this.data[h]);this._length=t,this._shrink()}}clear(){this.length=0}prune(){this.clear(),this.data=[]}push(t){this.data[this._length++]=t}pushArray(t,h=t.length){for(let i=0;i<h;i++)this.data[this._length++]=t[i]}fill(t,h){for(let i=0;i<h;i++)this.data[this._length++]=t}pushNew(){this._allocator&&(this.data[this.length]=this._allocator(this.data[this.length]));const t=this.data[this._length];return++this._length,t}unshift(t){this.data.unshift(t),this._length++,n(this)}pop(){if(0===this.length)return;const t=this.data[this.length-1];return this.length=this.length-1,this._shrink(),t}remove(t){const i=h(this.data,t,this.length,this._hint);if(-1!==i)return this.data.splice(i,1),this.length=this.length-1,t}removeUnordered(t){return this.removeUnorderedIndex(h(this.data,t,this.length,this._hint))}removeUnorderedIndex(t){if(!(t>=this.length||t<0))return this.swapElements(t,this.length-1),this.pop()}removeUnorderedMany(t,h=t.length,s){this.length=i(this.data,t,this.length,h,this._hint,s),this._shrink()}front(){if(0!==this.length)return this.data[0]}back(){if(0!==this.length)return this.data[this.length-1]}swapElements(t,h){if(t>=this.length||h>=this.length||t===h)return;const i=this.data[t];this.data[t]=this.data[h],this.data[h]=i}sort(t){s.sort(this.data,0,this.length,t)}iterableSort(t){return s.iterableSort(this.data,0,this.length,t)}some(t,h){for(let i=0;i<this.length;++i)if(t.call(h,this.data[i],i,this.data))return!0;return!1}find(t,h){for(let i=0;i<this.length;++i){const s=this.data[i];if(t.call(h,s,i))return s}}filterInPlace(t,h){let i=0;for(let s=0;s<this._length;++s){const a=this.data[s];t.call(h,a,s,this.data)&&(this.data[s]=this.data[i],this.data[i]=a,i++)}if(this._deallocator)for(let s=i;s<this._length;s++)this.data[s]=this._deallocator(this.data[s]);return this._length=i,this._shrink(),this}forAll(t,h){const{data:i,length:s}=this;for(let a=0;a<s;++a)t.call(h,i[a],a,i)}forEach(t,h){for(let i=0;i<this.length;++i)t.call(h,this.data[i],i,this.data)}map(t,h){const i=new Array(this.length);for(let s=0;s<this.length;++s)i[s]=t.call(h,this.data[s],s,this.data);return i}reduce(t,h){let i=h;for(let s=0;s<this.length;++s)i=t(i,this.data[s],s,this.data);return i}has(t){const h=this.length,i=this.data;for(let s=0;s<h;++s)if(i[s]===t)return!0;return!1}*[Symbol.iterator](){for(let t=0;t<this.length;t++)yield this.data[t]}}function n(t){t.data.length>a*t.length&&(t.data.length=Math.floor(t.length*e))}export{l as default};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"../factories/vec3f64.js";import"./common.js";export{u as abs,g as add,d as angle,O as bezier,K as ceil,c as copy,b as cross,B as direction,q as dist,k as distance,U as div,E as divide,j as dot,D as equals,h as exactEquals,I as floor,N as hermite,M as inverse,G as len,l as length,o as lerp,A as max,
|
|
5
|
+
import"../factories/vec3f64.js";import"./common.js";export{u as abs,g as add,d as angle,O as bezier,K as ceil,c as copy,b as cross,B as direction,q as dist,k as distance,U as div,E as divide,j as dot,D as equals,h as exactEquals,I as floor,N as hermite,M as inverse,G as len,l as length,o as lerp,A as max,w as min,T as mul,z as multiply,C as negate,n as normalize,P as random,Q as rotateX,R as rotateY,J as rotateZ,L as round,i as scale,p as scaleAndAdd,s as set,y as sign,v as sqrDist,F as sqrLen,a as squaredDistance,m as squaredLength,S as str,x as sub,f as subtract,t as transformMat3,e as transformMat4,r as transformQuat}from"../../../../chunks/vec32.js";
|
package/core/scheduling.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{nextTick as e}from"./nextTick.js";import t from"./PerformanceSampler.js";import r from"./PooledArray.js";import{createResolver as n,isAborted as s,createAbortError as o}from"./promiseUtils.js";import{Milliseconds as a}from"./time.js";class i{constructor(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1}}class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let m=0,l=0;const u={time:a(0),deltaTime:a(0),elapsedFrameTime:a(0),frameDuration:a(0)},p=["prepare","preRender","render","postRender","update","finish"],f=[],h=new r;class d{constructor(e){this._task=e}remove(){this._task.removed=!0}pause(){this._task.paused=!0}resume(){this._task.paused=!1}}
|
|
5
|
+
import{nextTick as e}from"./nextTick.js";import t from"./PerformanceSampler.js";import r from"./PooledArray.js";import{createResolver as n,isAborted as s,createAbortError as o}from"./promiseUtils.js";import{Milliseconds as a}from"./time.js";class i{constructor(e){this.phases=e,this.paused=!1,this.ticks=-1,this.removed=!1}}class c{constructor(e){this.callback=e,this.isActive=!0}remove(){this.isActive=!1}}let m=0,l=0;const u={time:a(0),deltaTime:a(0),elapsedFrameTime:a(0),frameDuration:a(0)},p=["prepare","preRender","render","postRender","update","finish"],f=[],h=new r;class d{constructor(e){this._task=e}remove(){this._task.removed=!0}pause(){this._task.paused=!0}resume(){this._task.paused=!1}}function w(){null!=F&&(cancelAnimationFrame(F),F=requestAnimationFrame(x))}const k={frameTasks:h,willDispatch:!1,clearFrameTasks:T,dispatch:_,executeFrameTasks:D,reschedule:w};function v(t){const r=new c(t);return f.push(r),k.willDispatch||(k.willDispatch=!0,e(_)),r}function A(e){const t=new i(e);return h.push(t),null==F&&(m=performance.now(),F=requestAnimationFrame(x)),new d(t)}let F=null;function T(e=!1){h.forAll((e=>{e.removed=!0})),e&&q()}function j(e){l=Math.max(0,e)}function x(){const e=performance.now();F=null,F=h.length>0?requestAnimationFrame(x):null,k.executeFrameTasks(e)}function D(e){const t=a(e-m);m=e;const r=l>0?l:1e3/60,n=Math.max(0,t-r);u.time=e,u.frameDuration=a(r-n);for(let s=0;s<p.length;s++){const r=performance.now(),n=p[s];h.forAll((r=>{if(r.paused||r.removed)return;0===s&&r.ticks++;r.phases[n]&&(u.elapsedFrameTime=a(performance.now()-e),u.deltaTime=0===r.ticks?a(0):t,r.phases[n]?.call(r,u))})),b[s].record(performance.now()-r)}q(),U.record(performance.now()-e)}const g=new r;function q(){h.forAll((e=>{e.removed&&g.push(e)})),h.removeUnorderedMany(g.data,g.length),g.clear()}function _(){for(;f.length;){const e=f.shift();e.isActive&&e.callback()}k.willDispatch=!1}function y(t=1,r){const a=n(),i=()=>{s(r)?a.reject(o()):0===t?a():(--t,e((()=>i())))};return i(),a.promise}function M(e){return y(1,e)}function P(){const e=n(),t=A({postRender:()=>{t.remove(),v(e)}});return e.promise}async function R(){await M(),await new Promise((e=>requestAnimationFrame(e)))}const b=p.map((e=>new t(e))),U=new t("total");export{d as FrameTaskHandle,A as addFrameTask,k as debug,b as performanceInfo,U as performanceTotal,v as schedule,j as setFrameDuration,R as waitAnimationFrame,P as waitRender,M as waitTick,y as waitTicks};
|
package/core/sql.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
async function e(e,n){const{WhereClause:r}=await import("./sql/WhereClause.js");return r.create(e,n)}function n(e,n){return null!=e?null!=n?`(${e}) AND (${n})`:e:n}export{e as parseWhereClause,n as sqlAnd};
|
|
5
|
+
async function e(e,n){const{WhereClause:r}=await import("./sql/WhereClause.js");return r.create(e,n)}function n(e,n){return null!=e&&""!==e?null!=n&&""!==n?`(${e}) AND (${n})`:e:n}export{e as parseWhereClause,n as sqlAnd};
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{earth as n,mars as e,moon as r}from"./support/Ellipsoid.js";import{
|
|
5
|
+
import{earth as n,mars as e,moon as r}from"./support/Ellipsoid.js";import{isValid as t,isWKIDFromMars as i,isWKIDFromMoon as c,equals as o}from"./support/spatialReferenceUtils.js";function S(n){return{wkt:`GEOCCS["Spherical geocentric",\n DATUM["Not specified",\n SPHEROID["Sphere",${n.radius},0]],\n PRIMEM["Greenwich",0.0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",EAST],\n AXIS["Geocentric Z",NORTH]\n ]`}}const T=S(n),G=S(e),p=S(r),u={wkt:`GEOCCS["WGS 84",\n DATUM["WGS_1984",\n SPHEROID["WGS 84",${n.radius},298.257223563,\n AUTHORITY["EPSG","7030"]],\n AUTHORITY["EPSG","6326"]],\n PRIMEM["Greenwich",0,\n AUTHORITY["EPSG","8901"]],\n UNIT["m",1.0,\n AUTHORITY["EPSG","9001"]],\n AXIS["Geocentric X",OTHER],\n AXIS["Geocentric Y",OTHER],\n AXIS["Geocentric Z",NORTH],\n AUTHORITY["EPSG","4978"]\n]`},I=G.wkt.toUpperCase(),E=p.wkt.toUpperCase();function s(o){if(null!=o&&t(o)){const n=o.wkid,t=o.wkt2??o.wkt;if(i(n))return e;const S=t?.toUpperCase();if(t&&S===I)return e;if(c(n)||S&&S===E)return r}return n}function R(t){return i(t)?e:c(t)?r:n}function A(n){return o(n,T)}function O(n){return A(n)||o(n,G)||o(n,p)}export{T as SphericalECEFSpatialReferenceLike,G as SphericalPCPFMarsLike,p as SphericalPCPFMoonLike,u as WGS84ECEFSpatialReferenceLike,s as getReferenceEllipsoid,R as getReferenceEllipsoidFromWKID,A as isSphericalECEF,O as isSphericalPCPF};
|
package/geometry/libtess.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.29/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import{getAssetUrl as t}from"../assets.js";import has from"../core/has.js";const s=128e3;let n=null,e=null;async function i(){return n||(n=
|
|
5
|
+
import{getAssetUrl as t}from"../assets.js";import has from"../core/has.js";const s=128e3;let n=null,e=null;async function i(){return n||(n=r()),n}async function r(){const s=has("esri-csp-restrictions")?await import("../chunks/libtess-asm.js").then((t=>t.l)):await import("../chunks/libtess.js").then((t=>t.l));e=await s.default({locateFile:s=>t(`esri/core/libs/libtess/${s}`)})}function a(t,n){const i=Math.max(t.length,s);return e.triangulate(t,n,i)}export{i as loadLibtess,a as triangulate};
|