@arcgis/core 5.1.0-next.52 → 5.1.0-next.54
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/applications/Components/SketchTooltipControls.d.ts +3 -2
- package/applications/Components/SketchTooltipControls.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +1 -0
- package/assets/esri/core/workers/chunks/097c037705ab485372ee.js +1 -0
- package/assets/esri/core/workers/chunks/0ab19ad980fda1cf402a.js +1 -0
- package/assets/esri/core/workers/chunks/0b79630ad435a7734104.js +1 -0
- package/assets/esri/core/workers/chunks/0f4759efc0982fb0ea03.js +1 -0
- package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js → 0fc60b4c44c4e865b699.js} +2 -2
- package/assets/esri/core/workers/chunks/{f4d31d96681b649ddc95.js → 0ff12fe9e358100668d9.js} +1 -1
- package/assets/esri/core/workers/chunks/11fed97adc9bca0f95e9.js +1 -0
- package/assets/esri/core/workers/chunks/123e15c9e068a053d54e.js +1 -0
- package/assets/esri/core/workers/chunks/1613123918e9b0f7cfdb.js +1 -0
- package/assets/esri/core/workers/chunks/16a46688df5fad5cf8d5.js +1 -0
- package/assets/esri/core/workers/chunks/16ed8c0af8bb8b400163.js +1 -0
- package/assets/esri/core/workers/chunks/16f5cd740321a3539bf1.js +1 -0
- package/assets/esri/core/workers/chunks/173d94e162b210dee0a2.js +1 -0
- package/assets/esri/core/workers/chunks/199f70c0373f6008a545.js +1 -0
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +1 -0
- package/assets/esri/core/workers/chunks/1fdd736c4932655ff1d9.js +1 -0
- package/assets/esri/core/workers/chunks/{d2af5342fbe80e2d8c60.js → 20f9f3470cad47d01803.js} +1 -1
- package/assets/esri/core/workers/chunks/2304f7b8173cf86dd805.js +1 -0
- package/assets/esri/core/workers/chunks/2327b368673a974dee8b.js +1 -0
- package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +1 -0
- package/assets/esri/core/workers/chunks/{eedeff8b344ff699b0b9.js → 2714ec856c2b3223425b.js} +1 -1
- package/assets/esri/core/workers/chunks/2757cf54656b5d318b11.js +1 -0
- package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +1 -0
- package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +1 -0
- package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +1 -0
- package/assets/esri/core/workers/chunks/{cdeb6aec578a1c07d663.js → 3cb0f020f9bfc6653c5d.js} +1 -1
- package/assets/esri/core/workers/chunks/40bcfc4f8efe7de7ec9d.js +1 -0
- package/assets/esri/core/workers/chunks/42e084704dea6e4135b6.js +1 -0
- package/assets/esri/core/workers/chunks/{5b3bb636e3bec625e515.js → 4301cb9670fa7c907460.js} +1 -1
- package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +1 -0
- package/assets/esri/core/workers/chunks/4c38af9ae023fde2b5cd.js +1 -0
- package/assets/esri/core/workers/chunks/4c8c69d081ed37bf5bc5.js +1 -0
- package/assets/esri/core/workers/chunks/{cc1f3a2f281a2f6e0f94.js → 4d54beab8ae5ff31e7b0.js} +1 -1
- package/assets/esri/core/workers/chunks/4e7bb224bde9e5039263.js +1 -0
- package/assets/esri/core/workers/chunks/4f847a426973bd350c11.js +1 -0
- package/assets/esri/core/workers/chunks/52c90975cf22add7ee2b.js +1 -0
- package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +1 -0
- package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +1 -0
- package/assets/esri/core/workers/chunks/57dc80942e51dedd8335.js +1 -0
- package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +1 -0
- package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +1 -0
- package/assets/esri/core/workers/chunks/5d202f60891fcae7174d.js +1 -0
- package/assets/esri/core/workers/chunks/{f7fb121169b7e5a5adbc.js → 6666ef3fd6ce877a4509.js} +1 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +1 -0
- package/assets/esri/core/workers/chunks/6ab8ed12d162d79a8c55.js +1 -0
- package/assets/esri/core/workers/chunks/796d27d1bbb2eed53cbd.js +1 -0
- package/assets/esri/core/workers/chunks/7d56b2ac5030dd8b748e.js +1 -0
- package/assets/esri/core/workers/chunks/7ef1c1f765b6d423e474.js +1 -0
- package/assets/esri/core/workers/chunks/{720a33a7f118d2769133.js → 851dd71d28681d4eccfd.js} +1 -1
- package/assets/esri/core/workers/chunks/8569ae372fc64641b6b1.js +1 -0
- package/assets/esri/core/workers/chunks/{88c6cc90606409b5c884.js → 87d2021e91d025a2a142.js} +1 -1
- package/assets/esri/core/workers/chunks/929b26999321519824b9.js +1 -0
- package/assets/esri/core/workers/chunks/932a0b39d85a76377d52.js +1 -0
- package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +1 -0
- package/assets/esri/core/workers/chunks/{fe7dec83e40014c55a6b.js → 96e799ca97989a6ed448.js} +1 -1
- package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +1 -0
- package/assets/esri/core/workers/chunks/{617328964d480d4a3a45.js → 9806cc96414065ae0afe.js} +1 -1
- package/assets/esri/core/workers/chunks/9db2ff1d4cbb5d1b623e.js +1 -0
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +1 -0
- package/assets/esri/core/workers/chunks/{987dc23fdc0a8c7150b9.js → a5bf2718c02a0e645013.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5fd59291cb161fdc05b.js → a787fe09d3df9d4254ba.js} +1 -1
- package/assets/esri/core/workers/chunks/a7b315a660f0f4e1d197.js +1 -0
- package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +1 -0
- package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +1 -0
- package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +1 -0
- package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +1 -0
- package/assets/esri/core/workers/chunks/b39b4db86a1049f0b901.js +1 -0
- package/assets/esri/core/workers/chunks/{3fa5f102b6f77c523a76.js → b3e5dcb530cef678c8f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6a0e770c1a89d3b5913.js → b43889ed9737c27e89f1.js} +1 -1
- package/assets/esri/core/workers/chunks/b59f03c64e4965d87291.js +1 -0
- package/assets/esri/core/workers/chunks/bad82ce3f84f7efb7ab7.js +1 -0
- package/assets/esri/core/workers/chunks/bae1d6dd2376dff271e8.js +1 -0
- package/assets/esri/core/workers/chunks/bb047157f09471ecea53.js +1 -0
- package/assets/esri/core/workers/chunks/bbb9659f79511c2c4690.js +1 -0
- package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +1 -0
- package/assets/esri/core/workers/chunks/be60a6e210186ff09ae2.js +1 -0
- package/assets/esri/core/workers/chunks/c03190faca955bffc8c1.js +1 -0
- package/assets/esri/core/workers/chunks/c1ad062ccc1817cbee4c.js +1 -0
- package/assets/esri/core/workers/chunks/{daf65bccc45dc5c400ae.js → c460ca93ed8e20d8b53a.js} +1 -1
- package/assets/esri/core/workers/chunks/c86b15f6a18880f921cd.js +1 -0
- package/assets/esri/core/workers/chunks/c93454e37ae0f124bcb0.js +1 -0
- package/assets/esri/core/workers/chunks/{3fcc8c455af56ae89030.js → ccf845ac0ac354507a25.js} +1 -1
- package/assets/esri/core/workers/chunks/cd14b6157862f33ab116.js +1 -0
- package/assets/esri/core/workers/chunks/ce59ec4f0cfbdf780bcb.js +1 -0
- package/assets/esri/core/workers/chunks/{7480bd6f892abf444cac.js → d1aa1d51662f4a01e793.js} +3 -3
- package/assets/esri/core/workers/chunks/d31e68e73527c88b8276.js +1 -0
- package/assets/esri/core/workers/chunks/{15a45e26964c2eb381a6.js → d4961d307651431328a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{81b830f0d620587966ca.js → d53c6fc10425adc2c0cf.js} +1 -1
- package/assets/esri/core/workers/chunks/d69cdee402ba4fc3735f.js +1 -0
- package/assets/esri/core/workers/chunks/d6f1ed8d8f76a32bc81d.js +1 -0
- package/assets/esri/core/workers/chunks/d7456829e404874a9e2f.js +1 -0
- package/assets/esri/core/workers/chunks/d9444dd0d40aa8332b28.js +1 -0
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +1 -0
- package/assets/esri/core/workers/chunks/{9ae90a4b281d4103e8bb.js → dc07dc1cd30edc0c4193.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdf8fe0f50a9ae548c16.js → ddc7956d80498518551e.js} +1 -1
- package/assets/esri/core/workers/chunks/{29c91b5c9ddcea85f39a.js → e23fc5853e2f4016936b.js} +1 -1
- package/assets/esri/core/workers/chunks/e2d1d9929ed7744785a1.js +1 -0
- package/assets/esri/core/workers/chunks/e543bb228f3f9d937d43.js +1 -0
- package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +1 -0
- package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +1 -0
- package/assets/esri/core/workers/chunks/{eb36417edc11fa80e312.js → ee8cd91c27e9cdfc3b2e.js} +1 -1
- package/assets/esri/core/workers/chunks/f3f26f6116ab9126c2e7.js +1 -0
- package/assets/esri/core/workers/chunks/f4472e3486fdc33abb9a.js +1 -0
- package/assets/esri/core/workers/chunks/f80f04657762666b9165.js +1 -0
- package/assets/esri/core/workers/chunks/f8eb14170f927aecfbc8.js +1 -0
- package/assets/esri/core/workers/chunks/f8ee1a99580a7da42cde.js +1 -0
- package/assets/esri/core/workers/chunks/fcda652fb5262696d59c.js +1 -0
- package/assets/esri/core/workers/chunks/{792219a079c28bcdc003.js → fcfaaced184f8da3e28d.js} +1 -1
- package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +1 -0
- package/assets/esri/core/workers/chunks/ff0cb1eec14d34214f12.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/chunks/OITBlend.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Viewshed.glsl.js +2 -2
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/maybe.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/raster/datasets/FunctionRaster.js +1 -1
- package/layers/raster/functions/AspectFunction.js +1 -1
- package/layers/raster/functions/BaseRasterFunction.js +1 -1
- package/layers/raster/functions/ConvolutionFunction.js +1 -1
- package/layers/raster/functions/CurvatureFunction.js +1 -1
- package/layers/raster/functions/HillshadeFunction.js +1 -1
- package/layers/raster/functions/ShadedReliefFunction.js +1 -1
- package/layers/raster/functions/SlopeFunction.js +1 -1
- package/layers/raster/functions/StatisticsFunction.js +1 -1
- package/layers/raster/functions/pixelUtils.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +3 -3
- package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/particleConstants.js +2 -0
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +1 -0
- package/views/3d/webgl/ManagedFBOResource.d.ts +1 -0
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialLoader.js +2 -0
- package/views/3d/webgl-engine/lib/GLMaterialParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +2 -0
- package/views/3d/webgl-engine/lib/ScreenSpaceReflectionsUniforms.js +2 -0
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/ShapePlugin.js +1 -1
- package/views/draw/support/managers/GlobalStateManager.js +1 -1
- package/views/draw/support/types.d.ts +9 -0
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/webgl/AllocationTracer.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +0 -1
- package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +0 -1
- package/assets/esri/core/workers/chunks/01dd849a2d335e9f3e16.js +0 -1
- package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +0 -1
- package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +0 -1
- package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +0 -1
- package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +0 -1
- package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +0 -1
- package/assets/esri/core/workers/chunks/0b661b90f7ee3ae23425.js +0 -1
- package/assets/esri/core/workers/chunks/0d8294982853308225da.js +0 -1
- package/assets/esri/core/workers/chunks/156aecac067213642aae.js +0 -1
- package/assets/esri/core/workers/chunks/167e4ff7cbc88b42db71.js +0 -1
- package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +0 -1
- package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +0 -1
- package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +0 -1
- package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +0 -1
- package/assets/esri/core/workers/chunks/30654845ca1334f1c206.js +0 -1
- package/assets/esri/core/workers/chunks/3104b10770903c265626.js +0 -1
- package/assets/esri/core/workers/chunks/33f00633131581e06328.js +0 -1
- package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +0 -1
- package/assets/esri/core/workers/chunks/35dbe1eeb6932b03aea2.js +0 -1
- package/assets/esri/core/workers/chunks/365ad1ffd496ed86637b.js +0 -1
- package/assets/esri/core/workers/chunks/380bb57bccc266d6442a.js +0 -1
- package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +0 -1
- package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +0 -1
- package/assets/esri/core/workers/chunks/39f3bea123f20c816ab2.js +0 -1
- package/assets/esri/core/workers/chunks/3e9700445518b8f9ae1b.js +0 -1
- package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +0 -1
- package/assets/esri/core/workers/chunks/436941ec88439667022e.js +0 -1
- package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +0 -1
- package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +0 -1
- package/assets/esri/core/workers/chunks/5351e71ce7839636d06d.js +0 -1
- package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +0 -1
- package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +0 -1
- package/assets/esri/core/workers/chunks/55edd712c6d2d044e550.js +0 -1
- package/assets/esri/core/workers/chunks/5e5b358e603b13b4d7d7.js +0 -1
- package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +0 -1
- package/assets/esri/core/workers/chunks/64da1ad9df9094ef5c12.js +0 -1
- package/assets/esri/core/workers/chunks/666f201d222c50ab8428.js +0 -1
- package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +0 -1
- package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +0 -1
- package/assets/esri/core/workers/chunks/6f58ec80abebb7bfbbb0.js +0 -1
- package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +0 -1
- package/assets/esri/core/workers/chunks/7380177f16d914fdbc63.js +0 -1
- package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +0 -1
- package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +0 -1
- package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +0 -1
- package/assets/esri/core/workers/chunks/7dba4121cdd20dbc4b20.js +0 -1
- package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +0 -1
- package/assets/esri/core/workers/chunks/816a4b03f2ea49238a6c.js +0 -1
- package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +0 -1
- package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +0 -1
- package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +0 -1
- package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +0 -1
- package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +0 -1
- package/assets/esri/core/workers/chunks/953f671bdeb2ca9b9f37.js +0 -1
- package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +0 -1
- package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +0 -1
- package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +0 -1
- package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +0 -1
- package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +0 -1
- package/assets/esri/core/workers/chunks/a84d67c1a1008bca2075.js +0 -1
- package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +0 -1
- package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +0 -1
- package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +0 -1
- package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +0 -1
- package/assets/esri/core/workers/chunks/bb659dcd297b895830df.js +0 -1
- package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +0 -1
- package/assets/esri/core/workers/chunks/c20aaca8085ce897bd12.js +0 -1
- package/assets/esri/core/workers/chunks/c3e711dc608eedda2d14.js +0 -1
- package/assets/esri/core/workers/chunks/c48d1ee37c207bfb0aac.js +0 -1
- package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +0 -1
- package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +0 -1
- package/assets/esri/core/workers/chunks/cb8c17daec7055bf99cc.js +0 -1
- package/assets/esri/core/workers/chunks/d7439d357f68160844cb.js +0 -1
- package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +0 -1
- package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +0 -1
- package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +0 -1
- package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +0 -1
- package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +0 -1
- package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +0 -1
- package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +0 -1
- package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +0 -1
- package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +0 -1
- package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +0 -1
- package/assets/esri/themes/base/colors/css/brand_colors.css +0 -76
- package/assets/esri/themes/base/colors/css/calcite_core_colors.css +0 -169
- package/assets/esri/themes/base/colors/css/calcite_core_colors_dark.css +0 -169
- package/assets/esri/themes/base/colors/css/calcite_gray_colors.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_gray_colors_dark.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_highlight_colors.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_highlight_colors_dark.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_vibrant_colors.css +0 -67
- package/assets/esri/themes/base/colors/css/calcite_vibrant_colors_dark.css +0 -67
- package/assets/esri/themes/base/colors/css/complete.css +0 -610
- package/assets/esri/themes/base/colors/css/scss/brand_colors.scss +0 -128
- package/assets/esri/themes/base/colors/css/scss/calcite_core_colors.scss +0 -289
- package/assets/esri/themes/base/colors/css/scss/calcite_core_colors_dark.scss +0 -285
- package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors.scss +0 -96
- package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors_dark.scss +0 -91
- package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors.scss +0 -69
- package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors_dark.scss +0 -65
- package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors.scss +0 -128
- package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors_dark.scss +0 -124
- package/assets/esri/themes/base/colors/css/scss/complete.scss +0 -11
- package/assets/esri/themes/base/colors/patterns_json/brand_colors.css +0 -366
- package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors.css +0 -687
- package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors_dark.css +0 -673
- package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors.css +0 -177
- package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors_dark.css +0 -169
- package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors.css +0 -178
- package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors_dark.css +0 -169
- package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors.css +0 -273
- package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors_dark.css +0 -265
- package/assets/esri/themes/base/colors/patterns_json/complete.css +0 -2847
- package/assets/esri/themes/base/colors/patterns_json/scss/brand_colors.scss +0 -464
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors.scss +0 -967
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors_dark.scss +0 -964
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors.scss +0 -265
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors_dark.scss +0 -263
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors.scss +0 -237
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors_dark.scss +0 -235
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors.scss +0 -376
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors_dark.scss +0 -347
- package/assets/esri/themes/base/colors/patterns_json/scss/complete.scss +0 -12
- package/assets/esri/themes/base/icons/readme/download.png +0 -0
- package/assets/esri/themes/base/icons/readme/import-icons.png +0 -0
- package/assets/esri/themes/base/icons/readme/import.png +0 -0
- package/assets/esri/themes/base/icons/readme/load.png +0 -0
- package/assets/esri/themes/base/icons/selection.json +0 -1
- package/assets/esri/themes/base/icons/style.css +0 -774
- package/views/2d/engine/brushes.js +0 -2
- package/views/2d/engine/flow/BrushFlow.js +0 -2
- package/views/2d/engine/rasterBrushes.js +0 -2
- package/views/2d/engine/webgl/brushes/BrushClip.js +0 -2
- package/views/2d/engine/webgl/brushes/WGLBrush.js +0 -2
- package/views/2d/engine/webgl/painter/RenderPass.js +0 -2
- package/views/2d/engine/webgl/shaders/BackgroundPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/TileInfoPrograms.js +0 -2
- package/views/3d/webgl-engine/lib/GLMaterials.js +0 -2
- /package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js.LICENSE.txt → 0fc60b4c44c4e865b699.js.LICENSE.txt} +0 -0
|
@@ -230,7 +230,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
230
230
|
vec2 uvOffset = uv + rf * blurSize;
|
|
231
231
|
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
232
232
|
}
|
|
233
|
-
fragBlur = b / w_total;`),e}const d=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>o,f:()=>s,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let s=0,a=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],s+=r,a+=n;return}const c=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[s]=Math.max(t[a]/c,-1),e[s+1]=Math.max(t[a+1]/c,-1),s+=r,a+=n;else for(let i=0;i<o;++i)e[s]=t[a]/c,e[s+1]=t[a+1]/c,s+=r,a+=n}function s(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,s=i?.count??e.count;let a=(i?.dstIndex??0)*o;for(let e=0;e<s;++e)n[a]=t,n[a+1]=r,a+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:s,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>c,c:()=>a,d:()=>o,e:()=>f,f:()=>h,l:()=>u,n:()=>m,t:()=>s});var i=r(40876),n=(r(44208),r(72727));function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[4],f=r[5],m=r[6],p=r[8],g=r[9],v=r[10],_=r[12],x=r[13],y=r[14];let w=0,b=0;for(let r=0;r<c;r++){const r=t[w],n=t[w+1],s=t[w+2];e[b]=l*r+d*n+p*s+_,e[b+1]=u*r+f*n+g*s+x,e[b+2]=h*r+m*n+v*s+y,w+=o,b+=i}return e}function a(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[3],f=r[4],m=r[5],p=r[6],g=r[7],v=r[8];let _=0,x=0;for(let r=0;r<c;r++){const r=t[_],n=t[_+1],s=t[_+2];e[x]=l*r+d*n+p*s,e[x+1]=u*r+f*n+g*s,e[x+2]=h*r+m*n+v*s,_+=o,x+=i}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let s=0,a=0;for(let c=0;c<o;c++)e[a]=r*t[s],e[a+1]=r*t[s+1],e[a+2]=r*t[s+2],s+=n,a+=i;return e}function u(e,t,r,i){h(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r,n,o=3,s=o){const a=Math.min(e.length/o,t.length/s);let c=0,l=0;const u=1/i.Tf;for(let i=0;i<a;i++)e[l]=n*(r*t[c])**u,e[l+1]=n*(r*t[c+1])**u,e[l+2]=n*(r*t[c+2])**u,c+=s,l+=o}function d(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a);let l=0,u=0;for(let n=0;n<c;n++)e[u]=t[l]+r[0],e[u+1]=t[l+1]+r[1],e[u+2]=t[l+2]+r[2],l+=o,u+=i;return e}function f(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,s=0;for(let a=0;a<n;a++){const n=t[o],a=t[o+1],c=t[o+2],l=n*n+a*a+c*c;if(l>0){const t=1/Math.sqrt(l);e[s]=t*n,e[s+1]=t*a,e[s+2]=t*c}o+=i,s+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:h,linearToSRGBView:u,normalize:m,normalizeView:f,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let c=0,l=0;for(let e=0;e<i;e++)n[l]=s[c]>>r,n[l+1]=s[c+1]>>r,n[l+2]=s[c+2]>>r,c+=a,l+=o},transformMat3:c,transformMat3View:a,transformMat4:s,transformMat4View:o,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),c=parseInt(o,10);return new n(a,c,t)}}},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,s=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,c=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,s,/^jsapps\.esri\.com$/,a,c]},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function s(){return n(1,1)}function a(){return n(1,0)}function c(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>l,vt:()=>i});const l=o(),u=s(),h=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:s,unitX:a,unitY:c,zeros:o},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>c,Qh:()=>s,RS:()=>n,Ul:()=>f,i5:()=>d,lM:()=>o,qK:()=>u});var i=r(34275);const n=16;function o(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=h;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,n):0:0),0)}function l(e,t){return h+e.length*t}const u=32,h=16,d=145,f=64},65806(e,t,r){r.d(t,{g:()=>s});var i=r(51850),n=r(91218),o=r(9762);function s(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return a[0]=e.x,a[1]=e.y,a[2]=e.z??0,(0,o.projectBuffer)(a,e.spatialReference,0,t,r,0);const s=(0,n.tryProject)(e,r,i);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const a=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>a});var i=r(91218),n=r(16930),o=r(9762),s=r(65806);function a(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(c.x=e[0],c.y=e[1],c.z=e[2],c.spatialReference=t,(0,s.g)(c,r,n)))}const c={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,my:()=>s,tM:()=>u,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<i.y9)return e}else if(e.length<i.y9)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<i.y9)return new Array(e).fill(0);if(e>d.length){const t=Math.max(2*d.length,e);d=new Uint8Array(t)}return new Uint8Array(d.buffer,0,e)}(e.length):n?u(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=i.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=h(131072);const c=[0],l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){return 1===e?c:e<i.y9?Array.from(new Uint16Array(l.buffer,0,e)):e<l.length?new Uint16Array(l.buffer,0,e):(e>a.length&&(a=h(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function h(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let d=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;const i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},82919(e,t,r){r.d(t,{DV:()=>v,C:()=>p,vt:()=>f,Qy:()=>m,ui:()=>g,ST:()=>y,bU:()=>w,pw:()=>x,m7:()=>_,c8:()=>T});var i=r(4341),n=r(58083),o=r(35522),s=r(51850),a=r(78955),c=r(91829),l=r(71351);function u(e){return e?{ray:(0,l.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,l.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>u());var h=r(27921),d=r(32114);function f(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function m(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function p(e,t){for(let r=0;r<M;r++)(0,h.C)(e[r],t[r]);return e}function g(e,t,r,i=A){const s=(0,n.lw)(d.Rc.get(),t,e);(0,n.B8)(s,s);for(let e=0;e<S;++e){const t=(0,a.Z0)(d.Km.get(),C[e],s);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<M;r++){const i=e[r];if(i[0]*t.center[0]+i[1]*t.center[1]+i[2]*t.center[2]+i[3]>=t.radius)return!1}return!0}function x(e,t){return b(e,function(e,t=u()){return(0,l.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,E.get()))}function y(e,t,r){return b(e,function(e,t,r=u()){const i=(0,o.Bw)(e.vector);return(0,l.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,E.get()))}function w(e,t){for(let r=0;r<M;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<M;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const T={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},M=6,S=8,C=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],E=new i.I(u),A=m()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>l,_I:()=>h,vt:()=>c});var i=r(34727),n=r(4341),o=r(35522),s=r(51850),a=r(32114);function c(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function l(e,t){const r=d.get();return r.origin=e,r.vector=t,r}function u(e,t,r=c()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function h(e,t,r){return function(e,t,r,n,s){const{vector:c,origin:l}=e,u=(0,o.Re)(a.rq.get(),t,l),h=(0,o.Om)(c,u)/(0,o.m3)(c);return(0,o.hs)(s,c,(0,i.qE)(h,0,1)),(0,o.WQ)(s,s,e.origin)}(e,t,0,0,r)}(0,s.vt)(),(0,s.vt)();const d=new n.I(()=>c())},17136(e,t,r){r.d(t,{Y_:()=>A,O7:()=>C,el:()=>S});var i=r(92602),n=r(69052),o=r(49186),s=r(53966),a=r(39829),c=r(82799),l=r(16930),u=r(80754),h=r(21325),d=r(28735),f=r(11254),m=r(60408),p=r(65864),g=r(2272),v=r(84952),_=r(92300);const x=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new o.A("internal:geometry",e)}const r=(0,u.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],c=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),l=(a-o)/c,u=(s-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,s=u*i+n,a=l*i+o;r.push([s,a])}const e=(c+Math.floor(h-1)*t)/2,i=u*e+n,s=l*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new c.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,u.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,u.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,u.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,u.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,u.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(y(e))for(const t of(0,u.r8)(o))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,s,l,y,w,C,E,A,R=0;const I=[],O=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,h.Vp)(o),l=o.isWebMercator,C=l?102100:4326,y=u.j7[C].maxX,w=u.j7[C].minX,E=u.j7[C].plus180Line,A=u.j7[C].minus180Line),s)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(T(t.clone(),y,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,y,w)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);O.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,w)*(2*y);let i=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(E)&&o!==y?(R=o>R?o:R,i=b(i,l),I.push(i),O.push("cut")):e.intersects(A)&&n!==w?(R=o*(2*y)>R?o*(2*y):R,i=b(i,l,360),I.push(i),O.push("cut")):O.push(i)}else O.push(t.clone());else O.push(t);else O.push(t);let F=(0,u.kd)(R,y),N=-90;const D=F,P=new c.A;for(;F>0;){const e=360*F-180;P.addPath([[e,N],[e,-1*N]]),N*=-1,F--}if(I.length>0&&D>0){const t=M(I,await async function(e,t,r,i){const n=(0,g.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,m.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",s),{cutIndexes:c,geometries:l=[]}=a.data;return{cutIndexes:c,geometries:l.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=o,t})}}(n,I,P,r)),i=[],o=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(l?(0,d.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,v.An)(e):e,n=t[0].spatialReference,o=(0,m.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,_.X)(t))}},{data:a}=await(0,f.A)(i.path+"/simplify",s);return(0,_.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(l?(0,d.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)B.push(t);else{const e=I.shift();B.push(!0===l?(0,d.Gh)(e):e)}}return B}function C(e,t,r){const i=(0,h.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,c=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?c=Math.ceil(Math.abs(e-o)/s):e<n&&(c=-Math.ceil(Math.abs(e-n)/s));let l=e+(a-c)*s;const u=l-t;return u>o?l-=s:u<n&&(l+=s),l}function E(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,i]=t.valid;return new n.hr(r,i)}const A=E(l.A.WGS84);E(l.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>a,r8:()=>l});var i=r(82799),n=r(16930),o=r(60408);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=l(e);for(const e of r)for(const r of e)r[0]+=t;return e}function l(e){return(0,o.Bi)(e)?e.rings:e.paths}},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>h,LV:()=>l,fA:()=>d,oC:()=>f,vt:()=>a}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),s=r(51850);function a(e){return e?c((0,s.o8)(e.origin),(0,s.o8)(e.direction)):c((0,s.vt)(),(0,s.vt)())}function c(e,t){return{origin:e,direction:t}}function l(e,t){const r=m.get();return r.origin=e,r.direction=t,r}function u(e,t=a()){return d(e.origin,e.direction,t)}function h(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function d(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}function f(e,t,r){const i=(0,o.Om)(e.direction,(0,o.Re)(r,t,e.origin));return(0,o.WQ)(r,e.origin,(0,o.hs)(r,e.direction,i)),r}r(32114);const m=new i.I(()=>a());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,n.vt)()},94008(e,t,r){r.d(t,{iy:()=>f}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),s=r(35522),a=r(51850),c=r(91829),l=r(34275);var u=r(71351),h=r(44280),d=r(32114);class f{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,a.fA)(e,t,r):function(e){return t=e,(0,l.vZ)(t)&&t.length>=3||function(e){return((0,l.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,a.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,a.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new f(this.center,this.radius)}toVec4(){return(0,c.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,m))return!1;let{t0:r,t1:i}=m;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,m))return[];const{origin:i,direction:o}=r,{t0:c,t1:l}=m,h=e=>{const t=(0,a.vt)();return(0,s.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(c-l)<(0,n.FD)()?[h(c)]:[h(c),h(l)]}_intersect(e,t){const{origin:r,direction:i}=e,n=p;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),a=s*s-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(a<0)return!1;const c=Math.sqrt(a);return t.t0=(-s-c)/(2*o),t.t1=(-s+c)/(2*o),!0}projectPoint(e,t){const r=(0,s.Re)(d.rq.get(),e,this.center),i=(0,s.hs)(d.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=d.rq.get(),i=d.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),a=(0,h.g7)(e.origin,t);return(0,o.$0)(i,a+n,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,s=t*t+n-2*Math.cos(o)*t*i,a=Math.sqrt(s),c=s-n;if(c<=0)return.5;const l=Math.sqrt(c),u=Math.acos(l/a)-Math.asin(i/(a/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,s.Re)(d.rq.get(),e,this.center),r=(0,s.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){const{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new f;const m={t0:0,t1:0},p=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>s,X:()=>o});var i=r(60408),n=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const i=(0,n.xD)(t);return e.map(e=>{const t=i.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>c});var i=r(11254),n=r(60999),o=r(49186),s=r(17676),a=r(84952);class c{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,s.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const a=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,s.QP)(a.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},84498(e,t,r){r.d(t,{x:()=>s});var i=r(34275),n=r(97146),o=r(63907);function s(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],s=0;for(let t=0;t<r;++t){const r=e[t+2];i[s++]=n,i[s++]=o,i[s++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>a,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const s=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(s)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),s.removeEventListener("load",r),s.removeEventListener("error",i)};s.addEventListener("load",r),s.addEventListener("error",i),s.src=o});try{s.src=o,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(o),s}},91202(e,t,r){r.d(t,{fetch:()=>Mr});var i=r(40876),n=r(61473),o=r(34727),s=r(77690),a=r(29242),c=r(58083),l=r(9093),u=r(48163),h=r(35522),d=r(51850),f=r(70328),m=r(34275);function p(e,t=!1){return e<=m.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var g=r(13030),v=r(73354),_=r(50867),x=r(43609),y=r(21015),w=r(84498),b=r(51530),T=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:T.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),c=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),l=(0,a.vt)();return(0,s.lw)(l,o,c),(0,s.lw)(l,n,l),l}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var E=r(11254),A=r(60999),R=r(49186),I=r(53966),O=r(69397);class F{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new F;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var N=r(17676),D=r(46140),P=r(97146);async function B(e,t){return(await(0,E.A)(e,{responseType:"image",...t})).data}var H=r(46610),L=r(20498);function z(e){if(e.length<m.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,m.LW)(e)?(0,L.pX)().from(e):(0,m.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var U=r(15142),G=r(620);class V{get center(){return(0,d.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,d.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,d.fA)(this._data[7],this._data[8],this._data[9])}constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,G.vA)(e.length>=1),(0,G.vA)(3===r.size||4===r.size);const{data:i,size:n,indices:o}=r;(0,G.vA)(o.length%this._numIndexPerPrimitive===0),(0,G.vA)(o.length>=e.length*this._numIndexPerPrimitive);const s=e.length;let a=n*o[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(a);const c=(0,d.fA)(i[a],i[a+1],i[a+2]),l=(0,d.o8)(c);for(let t=0;t<s;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){a=n*o[r+e],j.push(a);let t=i[a];c[0]=Math.min(t,c[0]),l[0]=Math.max(t,l[0]),t=i[a+1],c[1]=Math.min(t,c[1]),l[1]=Math.max(t,l[1]),t=i[a+2],c[2]=Math.min(t,c[2]),l[2]=Math.max(t,l[2])}}for(let e=0;e<3;++e)this._data[4+e]=c[e],this._data[7+e]=l[e];const u=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5);let f=.5*Math.max(Math.max(l[0]-c[0],l[1]-c[1]),l[2]-c[2]),m=f*f;for(let e=0;e<j.length;++e){a=j.at(e);const t=i[a]-u[0],r=i[a+1]-u[1],n=i[a+2]-u[2],o=t*t+r*r+n*n;if(o<=m)continue;const s=Math.sqrt(o),c=.5*(s-f);f+=c,m=f*f;const l=c/s;u[0]+=t*l,u[1]+=r*l,u[2]+=n*l}this._data[3]=f;for(let e=0;e<3;++e)this._data[0+e]=u[e];j.clear()}getChildren(){if(this._children||(0,h.hG)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:n,size:o,indices:s}=this.position;for(let a=0;a<t;++a){let t=0;const c=this._numIndexPerPrimitive*this.primitiveIndices[a];let l=o*s[c],u=n[l],h=n[l+1],d=n[l+2];for(let e=1;e<this._numIndexPerPrimitive;++e){l=o*s[c+e];const t=n[l],r=n[l+1],i=n[l+2];t<u&&(u=t),r<h&&(h=r),i<d&&(d=i)}u<e[0]&&(t|=1),h<e[1]&&(t|=2),d<e[2]&&(t|=4),r[a]=t,++i[t]}let a=0;for(let e=0;e<8;++e)i[e]>0&&++a;if(a<2)return;const c=new Array(8);for(let e=0;e<8;++e)c[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];c[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==c[e]&&this._children.push(new V(c[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new U.A({deallocator:null});var k=r(24326);class W{constructor(e){this.id=(0,k.c)(),this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,P.Dg)(r.indices)})}get attributes(){return this._attributes}}var $=r(4341),Z=r(11964);function q(e,t,r){return(0,h.Re)(Y,t,e),(0,h.Re)(X,r,e),.5*(0,h.Bw)((0,h.$A)(Y,Y,X))}r(32114),new $.I(Z.vt),new $.I(()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e});const Y=(0,d.vt)(),X=(0,d.vt)(),J=(0,d.vt)(),K=(0,d.vt)(),Q=(0,d.vt)(),ee=(0,d.vt)();class te{constructor(){this.uid=(0,k.c)()}}class re extends te{constructor(e){super(),this.highlightName=e,this.channel=0}}var ie=r(94656);class ne extends W{constructor(e,t,r=null,i=0,n=null,o=-1,s,a){super(t),this.material=e,this.mapPositions=r,this.type=i,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=s,this.drawIndices=a,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,G.vA)((e?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match");const c=this.positionAttribute;null!=c&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=c.indices.length)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:z(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,ie.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){const r=new Array;for(const i of e)r.push(t.indices[i]);this._vertexPositionIndicesCache=r}else this._vertexPositionIndicesCache=t?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this.drawIndices??this.positionAttribute?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,h.Z0)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let o=0,s=0;for(let t=0;t<r.length-2;t+=3){const a=r[t]*i,c=r[t+1]*i,l=r[t+2]*i;(0,h.hZ)(J,n[a],n[a+1],n[a+2]),(0,h.hZ)(K,n[c],n[c+1],n[c+2]),(0,h.hZ)(Q,n[l],n[l+1],n[l+2]);const u=q(J,K,Q);u?((0,h.WQ)(J,J,K),(0,h.WQ)(J,J,Q),(0,h.hs)(J,J,1/3*u),(0,h.WQ)(e,e,J),o+=u):((0,h.WQ)(ee,ee,J),(0,h.WQ)(ee,ee,K),(0,h.WQ)(ee,ee,Q),s+=3)}return!(0===s&&0===o||(0!==o?((0,h.hs)(e,e,1/o),0):0===s||((0,h.hs)(e,ee,1/s),0)))}(e,this.positionAttribute,this.primitivePositionIndices)}_computeAttachmentOriginLines(e){const t=this.positionAttribute,r=this.primitivePositionIndices;return function(e,t,r,i=t?.indices){if(!t||!i)return!1;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let n=0,o=0;const{size:s,data:a}=t,c=i.length-1,l=c+(r?2:0);for(let t=0;t<l;t+=2){const r=t<c?t+1:0,l=i[t<c?t:c]*s,u=i[r]*s;J[0]=a[l],J[1]=a[l+1],J[2]=a[l+2],K[0]=a[u],K[1]=a[u+1],K[2]=a[u+2],(0,h.hs)(J,(0,h.WQ)(J,J,K),.5);const d=(0,h.xg)(J,K);d>0?((0,h.WQ)(e,e,(0,h.hs)(J,J,d)),n+=d):0===n&&((0,h.WQ)(ee,ee,J),o++)}return 0!==n?((0,h.hs)(e,e,1/n),!0):0!==o&&((0,h.hs)(e,ee,1/o),!0)}(e,t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),r)}_computeAttachmentOriginPoints(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0);let o=-1,s=0;for(let t=0;t<r.length;t++){const a=r[t]*i;o!==a&&(e[0]+=n[a],e[1]+=n[a+1],e[2]+=n[a+2],s++),o=a}return s>1&&(0,h.hs)(e,e,1/s),s>0}(e,this.positionAttribute,this.primitivePositionIndices)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const e=this.positionAttribute,t=this.primitivePositionIndices;if(!e||!t||0===t.length)return null;const r=t===e.indices?e:new H.n(e.data,t,e.size,!1,e.stride),i=0===this.type?3:1;(0,G.vA)(t.length%i===0,"Indexing error: "+t.length+" not divisible by "+i);const n=(0,P.tM)(t.length/i);return new V(n,i,r)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}get highlights(){return this._highlights||oe}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new re(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const oe=new Set;var se=r(65529),ae=r(97768),ce=r(84952),le=r(38969),ue=r(95117),he=r(2741);let de;var fe=r(63907),me=r(76284),pe=r(42293);let ge=null,ve=null;async function _e(){return null==ve&&(de??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,he.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),ve=de,ge=await ve),ve}function xe(e,t,r,i,n){const o=(0,pe.MW)(t?fe.CQ.COMPRESSED_RGBA8_ETC2_EAC:fe.CQ.COMPRESSED_RGB8_ETC2),s=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*s)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function we(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function be(e,t,r,i,n,o,s,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,h]=c?i?[1,fe.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,fe.CQ.COMPRESSED_RGB8_ETC2]:l?i?[3,fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=t.hasMipmap?r:Math.min(1,r),f=[];for(let e=0;e<d;e++)f.push(new Uint8Array(s(e,u))),a(e,u,f[e]);return t.internalFormat=h,t.hasMipmap=f.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new me.A(e,t,{type:"compressed",levels:f})}const Te=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function Me(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Se=Me("DXT1"),Ce=Me("DXT3"),Ee=Me("DXT5");function Ae(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Re(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const s=Math.min(Math.sqrt(r/o),i/n);return[Ae(Math.round(e*s),i),Ae(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Ie(e,r,i)}function Ie(e,t,r){if(e instanceof ImageData)return Ie(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Oe=r(67171);class Fe{constructor(e,t){this._data=e,this.id=(0,k.c)(),this.events=new se.bk,this._parameters={...De,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,ce.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,le.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,ce.DB)(e.src)||(0,ce.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Oe.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,m.mw)(e)||(0,m.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.KTX2File(new Uint8Array(e)),i=we(r)?xe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.BasisFile(new Uint8Array(e)),i=ye(r)?xe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Ne(e):t,n=t.pixelFormat??6408,o=(0,pe.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new me.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,m.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,m.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,m.mw)(t)||(0,m.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,m.mw)(t)||(0,m.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,m.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,m.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return Te().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Te().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case Se:n=8,o=fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ee:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Te().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let s=1,a=r[4],c=r[3];(3&a||3&c)&&(Te().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let h,d;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let f=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<s;++t)d=(a+3>>2)*(c+3>>2)*n,h=new Uint8Array(e.buffer,f,d),m.push(h),f+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:l,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:s,height:a}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=s,t.height=a,new me.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.KTX2File(new Uint8Array(r));if(!we(i))return null;i.startTranscoding();const n=be(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.BasisFile(new Uint8Array(r));if(!ye(i))return null;i.startTranscoding();const n=be(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new me.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await B(t,{signal:r});return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ue.y)(t,t.src,!1,r);return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",s),t.removeEventListener("error",a),(0,ae.xt)(c)},s=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},a=e=>{o(),n(e||new R.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",s),t.addEventListener("error",a);const c=(0,N.u7)(r,()=>a((0,N.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Re(r,e.parameters));const i=Ne(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new me.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,ae.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Ne(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const De={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Pe=r(49255);class Be{constructor(e){this._material=e.material,this._techniques=e.techniques,this._output=e.output}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var He=r(65786);class Le extends Be{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,ae.Gz)(this._texture),this._textureNormal=(0,ae.Gz)(this._textureNormal),this._textureEmissive=(0,ae.Gz)(this._textureEmissive),this._textureOcclusion=(0,ae.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,ae.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ue(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,ae.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,N.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,ae.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ze extends He.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ue extends ze{constructor(e,t,r,i,n,o,s){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=s}}var Ge=r(19245);class Ve{constructor(e,t){this.id=(0,k.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,Ge.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,Ge.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,Pe._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value}}He.Y;class je{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const ke=(0,f.vt)();function We(e,t,r,i,n,o){if(!e.visible)return;const s=(0,h.jb)(nt,i,r),a=(e,t,r)=>o(e,r,t),{tolerance:c}=t,l=new je(c,!1,t.options.normalRequired);if(e.boundingInfo)(0,G.vA)(0===e.type),Ze(e.boundingInfo,r,s,c,n,l,a);else{const t=e.positionAttribute,i=e.primitivePositionIndices;!function(e,t,r,i,n,o,s,a,c,l){const u=t,d=ot,f=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),g=f>=m?f>=p?0:2:m>=p?1:2,v=g,_=u[v]<0?2:1,x=(g+_)%3,y=(g+(3-_))%3,w=u[x]/u[v],b=u[y]/u[v],T=1/u[v],M=Ye,S=Xe,C=Je,{normalRequired:E}=c;for(let t=r;t<i;++t){const r=3*t,i=s*n[r];(0,h.hZ)(d[0],o[i+0],o[i+1],o[i+2]);const c=s*n[r+1];(0,h.hZ)(d[1],o[c+0],o[c+1],o[c+2]);const u=s*n[r+2];(0,h.hZ)(d[2],o[u+0],o[u+1],o[u+2]),a&&((0,h.C)(d[0],a.applyToVertex(d[0][0],d[0][1],d[0][2],t)),(0,h.C)(d[1],a.applyToVertex(d[1][0],d[1][1],d[1][2],t)),(0,h.C)(d[2],a.applyToVertex(d[2][0],d[2][1],d[2][2],t))),(0,h.jb)(M,d[0],e),(0,h.jb)(S,d[1],e),(0,h.jb)(C,d[2],e);const f=M[x]-w*M[v],m=M[y]-b*M[v],p=S[x]-w*S[v],g=S[y]-b*S[v],_=C[x]-w*C[v],A=C[y]-b*C[v],R=_*g-A*p,I=f*A-m*_,O=p*m-g*f;if((R<0||I<0||O<0)&&(R>0||I>0||O>0))continue;const F=R+I+O;if(0===F)continue;const N=R*(T*M[v])+I*(T*S[v])+O*(T*C[v]);if(N*Math.sign(F)<0)continue;const D=N/F;D>=0&&l(D,t,E?Qe(d):null)}}(r,s,0,i.length/3,i,t.data,t.stride,n,l,a)}}const $e=(0,d.vt)();function Ze(e,t,r,i,n,o,s){if(null==e)return;const a=function(e,t){return(0,h.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,$e);if((0,f.Ne)(ke,e.bbMin),(0,f.vI)(ke,e.bbMax),null!=n&&n.applyToAabb(ke),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let s=Math.min(n,o),a=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(a=Math.min(a,Math.max(c,l)),a<0)return!1;if(s=Math.max(s,Math.min(c,l)),s>a)return!1;const u=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return a=Math.min(a,Math.max(u,h)),!(a<0)&&(s=Math.max(s,Math.min(u,h)),!(s>a)&&s<1/0)}(e,t,r,i)}(ke,t,a,i)){const{primitiveIndices:a,position:c}=e,l=a?a.length:c.indices.length/3;if(l>rt){const a=e.getChildren();if(void 0!==a){for(const e of a)Ze(e,t,r,i,n,o,s);return}}!function(e,t,r,i,n,o,s,a,c,l,u){const h=e[0],d=e[1],f=e[2],m=t[0],p=t[1],g=t[2],{normalRequired:v}=l;for(let e=0;e<i;++e){const t=a[e],r=3*t,i=s*n[r];let l=o[i],_=o[i+1],x=o[i+2];const y=s*n[r+1];let w=o[y],b=o[y+1],T=o[y+2];const M=s*n[r+2];let S=o[M],C=o[M+1],E=o[M+2];null!=c&&([l,_,x]=c.applyToVertex(l,_,x,e),[w,b,T]=c.applyToVertex(w,b,T,e),[S,C,E]=c.applyToVertex(S,C,E,e));const A=w-l,R=b-_,I=T-x,O=S-l,F=C-_,N=E-x,D=p*N-F*g,P=g*O-N*m,B=m*F-O*p,H=A*D+R*P+I*B;if(Math.abs(H)<=it)continue;const L=h-l,z=d-_,U=f-x,G=L*D+z*P+U*B;if(H>0){if(G<0||G>H)continue}else if(G>0||G<H)continue;const V=z*I-R*U,j=U*A-I*L,k=L*R-A*z,W=m*V+p*j+g*k;if(H>0){if(W<0||G+W>H)continue}else if(W>0||G+W<H)continue;const $=(O*V+F*j+N*k)/H;$>=0&&u($,t,v?Ke(A,R,I,O,F,N,qe):null)}}(t,r,0,l,c.indices,c.data,c.stride,a,n,o,s)}}const qe=(0,d.vt)();const Ye=(0,d.vt)(),Xe=(0,d.vt)(),Je=(0,d.vt)();function Ke(e,t,r,i,n,o,s){return(0,h.hZ)(et,e,t,r),(0,h.hZ)(tt,i,n,o),(0,h.$A)(s,et,tt),(0,h.S8)(s,s),s}function Qe(e){return(0,h.jb)(et,e[1],e[0]),(0,h.jb)(tt,e[2],e[0]),(0,h.$A)(qe,et,tt),(0,h.S8)(qe,qe),qe}const et=(0,d.vt)(),tt=(0,d.vt)(),rt=1e3,it=1e-7,nt=(0,d.vt)(),ot=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()];var st=r(16396);function at(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length;r*=s;for(let e=0;e<a;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=s}}function ct(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=3*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}}function lt(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}}function ut(e,t,r,i,n=1){const o=t.typedBuffer,s=t.typedBufferStride;if(i*=s,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s}function ht(e,t,r,i,n,o){switch(e){case"position":{(0,G.vA)(3===t.size);const i=n.getField(e,g.xs);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=r.typedBuffer,l=r.typedBufferStride,u=s.length,h=t[0],d=t[1],f=t[2],m=t[4],p=t[5],g=t[6],v=t[8],_=t[9],x=t[10],y=t[12],w=t[13],b=t[14];i*=l;let T=0,M=0,S=0;const C=(0,c.tZ)(t)?e=>{T=o[e]+y,M=o[e+1]+w,S=o[e+2]+b}:e=>{const t=o[e],r=o[e+1],i=o[e+2];T=h*t+m*r+v*i+y,M=d*t+p*r+_*i+w,S=f*t+g*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),a[i]=T,a[i+1]=M,a[i+2]=S,i+=l;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)a[i]=T,a[i+1]=M,a[i+2]=S,i+=l}}(t,r,i,o);break}case"normal":{(0,G.vA)(3===t.size);const r=n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;i*=u;let M=0,S=0,C=0;const E=(0,c.tZ)(a)?e=>{M=o[e],S=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=d*t+p*r+_*i,S=f*t+g*r+x*i,C=m*t+v*r+y*i};if(1===n)if(w)for(let e=0;e<h;++e){E(3*s[e]);const t=M*M+S*S+C*C;if(t<T&&t>b){const e=1/Math.sqrt(t);l[i]=M*e,l[i+1]=S*e,l[i+2]=C*e}else l[i]=M,l[i+1]=S,l[i+2]=C;i+=u}else for(let e=0;e<h;++e)E(3*s[e]),l[i]=M,l[i+1]=S,l[i+2]=C,i+=u;else for(let e=0;e<h;++e){if(E(3*s[e]),w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uv0":{(0,G.vA)(2===t.size);const r=n.getField(e,g.ZD)??n.getField(e,g.gH);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uvi":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,g.XP);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(3===t.size||4===t.size),function(e,t,r,i,n=1){const{data:o,indices:s}=e,a=r.typedBuffer,c=r.typedBufferStride,l=s.length;if(i*=c,t===o.length&&4===t){a[i]=o[0],a[i+1]=o[1],a[i+2]=o[2],a[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,s=e[i/=4];i+=t;const u=l*n;for(let r=1;r<u;++r)e[i]=s,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}}}(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,g.Y$)??n.getField(e,g.Y$);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length,c=i[0];r*=s;for(let e=0;e<a;++e)o[r]=c,r+=s}(t,r,o);break}case"tangent":{(0,G.vA)(4===t.size);const i=n.getField(e,g.Eq);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void lt(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=o[t],n=o[t+1],a=o[t+2],c=o[t+3];let h=d*r+p*n+_*a,M=f*r+g*n+x*a,S=m*r+v*n+y*a;if(w){const e=h*h+M*M+S*S;if(e<T&&e>b){const t=1/Math.sqrt(e);h*=t,M*=t,S*=t}}l[i]=h,l[i+1]=M,l[i+2]=S,l[i+3]=c,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=o[t],a=o[t+1],c=o[t+2],h=o[t+3];let M=d*r+p*a+_*c,S=f*r+g*a+x*c,C=m*r+v*a+y*c;if(w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,l[i+3]=h,i+=u}}(t,r,i,o);break}case"profileVertexAndNormal":{(0,G.vA)(4===t.size);const r=n.getField(e,g.jz)??n.getField(e,g.Eq);(0,G.vA)(!!r,`No buffer view for ${e}`),lt(t,r,o);break}case"profileAuxData":{(0,G.vA)(3===t.size);const r=n.getField(e,g.EC)??n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),ct(t,r,o);break}}}(0,d.vt)();class dt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return function(e,t,r,i,n,o,s){let a={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),l=r?.indices;if(r&&l)"position"===c&&(a={numItems:1,numVerticesPerItem:l.length}),ht(c,r,i,n,o,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;ut(t,o.getField(c,g.XP),e,s)}}}return a}(r,i,this.layout,e,t,n,o)}}var ft=r(5482),mt=r(91429),pt=r(91829),gt=r(4431),vt=r(1843),_t=r(72824),xt=r(13840),yt=r(42958),wt=r(16943);const bt={factor:-1,units:-2},Tt=new Array;Tt[0]=null,Tt[1]={factor:1,units:1},Tt[2]={factor:-1,units:-1},Tt[3]={factor:0,units:-4};var Mt=r(90644);const St=(0,Mt.p3)(1,0,1,771);function Ct(e,t=!1){switch(e){case 0:return t?Mt.RC:Mt.T8;case 1:return St;default:return null}}function Et(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?Mt.Uy:null;case 1:return null}}function At(e,t=513){return{func:(0,Pe.Sp)(e)?515:t}}function Rt({output:e,enableOITOffset:t,polygonOffset:r}){return(0,Pe.Sp)(e)?t?bt:null:Tt[r]}const It={mask:255},Ot={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},Ft={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var Nt=r(4576);r(66289);var Dt=r(69622),Pt=r(32728);class Bt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",g.Eq),this.color=e.getField("instanceColor",g.XP),this.olidColor=e.getField("instanceOlidColor",g.XP),this.state=e.getField("state",g.SL),this.lodLevel=e.getField("lodLevel",g.SL)}}let Ht=class extends Dt.A{constructor(e,t){super(e),this.events=new se.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return zt(Lt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=kt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new Bt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=Ut,i=Gt;t.localTransform.getMat(e,Vt),t.globalTransform.getMat(e,jt);const n=(0,c.lw)(jt,jt,Vt);(0,h.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,s.z0)(i,n),t.model.setMat(e,i);const o=(0,Pt.wp)(Ut,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,s.B8)(i,i),(0,s.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Gt),r.modelOrigin.getVec(e,Ut),t[0]=Gt[0],t[1]=Gt[1],t[2]=Gt[2],t[3]=0,t[4]=Gt[3],t[5]=Gt[4],t[6]=Gt[5],t[7]=0,t[8]=Gt[6],t[9]=Gt[7],t[10]=Gt[8],t[11]=0,t[12]=Ut[0],t[13]=Ut[1],t[14]=Ut[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ut,this,e),t*=Math.max(Ut[0],Ut[1],Ut[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ut,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ut[0],Ut[1],Ut[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(kt,Math.floor(this._capacity*Nt.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new Bt(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,ft.Cg)([(0,mt.MZ)({constructOnly:!0})],Ht.prototype,"shaderTransformation",void 0),(0,ft.Cg)([(0,mt.MZ)()],Ht.prototype,"_size",void 0),(0,ft.Cg)([(0,mt.MZ)({readOnly:!0})],Ht.prototype,"size",null),Ht=(0,ft.Cg)([(0,mt.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ht);const Lt=(0,vt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function zt(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,wt.E)()&&e.vec4u8("instanceOlidColor"),e}const Ut=(0,d.vt)(),Gt=(0,a.vt)(),Vt=(0,l.vt)(),jt=(0,l.vt)(),kt=64,Wt=(0,vt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var $t=r(74810),Zt=r(28491),qt=r(49788);class Yt extends _t.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=$t.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,pt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=qt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}_t.gy;let Xt=class extends yt.w{constructor(e,t){let i=(0,gt.U)(Qt(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,gt.U)(function(e){return zt(Wt.clone(),e)}(t)))),super(e,t,i),this.shader=new xt.r(Zt.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:s}=e;return(0,Mt.Ey)({blending:i?Ct(r):null,culling:Kt(e)?(0,Mt.Xt)(n):null,depthTest:At(r,Jt(o)),depthWrite:Et(e),colorWrite:Mt.kn,stencilWrite:s?It:null,stencilTest:s?t?Ft:Ot:null,polygonOffset:Rt(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function Jt(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Kt(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Qt(e){const t=(0,vt.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,wt.E)()&&t.vec4u8("olidColor"),t}Xt=(0,ft.Cg)([(0,mt.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Xt);var er=r(51976),tr=r(68317);class rr extends tr.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,ft.Cg)([(0,er.W)()],rr.prototype,"hasHighlightMixTexture",void 0);class ir extends rr{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,ft.Cg)([(0,er.W)({count:4})],ir.prototype,"polygonOffset",void 0),(0,ft.Cg)([(0,er.W)()],ir.prototype,"transparent",void 0),(0,ft.Cg)([(0,er.W)()],ir.prototype,"enableOITOffset",void 0);class nr extends ir{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,ft.Cg)([(0,er.W)({count:4})],nr.prototype,"alphaDiscardMode",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"doubleSidedMode",void 0),(0,ft.Cg)([(0,er.W)({count:7})],nr.prototype,"pbrMode",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"cullFace",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"normalType",void 0),(0,ft.Cg)([(0,er.W)({count:3})],nr.prototype,"customDepthTest",void 0),(0,ft.Cg)([(0,er.W)({count:8})],nr.prototype,"emissionSource",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVertexColors",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasSymbolColors",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVerticalOffset",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasColorTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasMetallicRoughnessTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasOcclusionTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasNormalTexture",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasScreenSizePerspective",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVertexTangents",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasOccludees",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instanced",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instancedDoublePrecision",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasModelTransformation",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"offsetBackfaces",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVVSize",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasVVColor",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"receiveShadows",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"receiveAmbientOcclusion",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"textureAlphaPremultiplied",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instancedFeatureAttribute",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"instancedColor",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"writeDepth",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"terrainDepthTest",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"cullAboveTerrain",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"snowCover",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasColorTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasEmissionTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasNormalTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasOcclusionTextureTransform",void 0),(0,ft.Cg)([(0,er.W)()],nr.prototype,"hasMetallicRoughnessTextureTransform",void 0);var or=r(57323);let sr=class extends Xt{constructor(){super(...arguments),this.shader=new xt.r(or.R,()=>r.e(2314).then(r.bind(r,39933)))}};sr=(0,ft.Cg)([(0,mt.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],sr);class ar extends Ve{constructor(e,t){super(e,lr),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&!this.transparent],[4,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&this.parameters.writeDepth],[9,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Qt(this.parameters),this._configuration=new nr(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=qt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,h.t2)(this.parameters.emissiveBaseColor,d.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.cullAboveTerrain=e.cullAboveTerrain,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,Pe._o)(e.output)?(r.terrainDepthTest=e.terrainDepthTest,r.receiveShadows=t.receiveShadows,r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao):(r.terrainDepthTest=!1,r.receiveShadows=r.receiveAmbientOcclusion=!1),r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,i,n,o){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,h.hZ)(pr,t[12],t[13],t[14]);let o=null;switch(r.viewingMode){case 1:o=(0,h.S8)(fr,pr);break;case 2:o=(0,h.C)(fr,dr)}const s=(0,h.Re)(gr,pr,e.eye),a=(0,h.Bw)(s),c=(0,h.hs)(s,s,1/a);let l=null;this.parameters.screenSizePerspective&&(l=(0,h.Om)(o,c));const u=(0,Ge.kE)(e,a,this.parameters.verticalOffset,l??0,this.parameters.screenSizePerspective,null);(0,h.hs)(o,o,u),(0,h.ei)(mr,o,r.transform.inverseRotation),i=(0,h.Re)(ur,i,mr),n=(0,h.Re)(hr,n,mr)}We(e,r,i,n,(0,st.ou)(r.verticalOffset),o)}createGLMaterial(e){return new cr(e)}createBufferWriter(){return new dt(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:s,textureAlphaMode:a,colorMixMode:c}=e,l=i[3];return t||r<1&&"replace"!==c||l<1&&"ignore"!==c||n<1||(null!=o||null!=s)&&1!==a&&2!==a&&"replace"!==c}(this.parameters)}}class cr extends Le{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,h.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?sr:Xt,e)}}class lr extends Yt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const ur=(0,d.vt)(),hr=(0,d.vt)(),dr=(0,d.fA)(0,0,1),fr=(0,d.vt)(),mr=(0,d.vt)(),pr=(0,d.vt)(),gr=(0,d.vt)(),vr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class _r{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function xr(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(vr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(vr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(vr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(vr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else vr().warn("Indexed geometries must specify faces"),i=!1;break}default:vr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(vr().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(vr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function yr(e){const t=(0,f.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,f.iT)(t,r.bbMin),(0,f.iT)(t,r.bbMax))}),t}function wr(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function br(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Tr=new D.A(1,2,"wosr");async function Mr(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,A.Ke)((0,E.A)(e,t));if(r.ok)return r.value.data;(0,N.QP)(r.error),function(e){throw new R.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){vr().warn("Externally referenced texture data is not yet supported");continue}const s=n.encoding+";base64,"+o,a="/textureDefinitions/"+i,c="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==wr(c)},u=t?.disableTextures?Promise.resolve(null):B(s,t);r.push(u.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:c})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new _r(r,i,n+(0,O.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new F,s=e.resource,a=D.A.parse(s.version||"1.0","wosr");Tr.validate(a);const c=s.model.name,l=s.model.geometries,u=s.materialDefinitions??{},h=e.textures;let f=0;const m=new Map;for(let e=0;e<l.length;e++){const s=l[e];if(!xr(s))continue;const a=br(s),c=s.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===s.params.topology)return null;const t=s.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=c.position,_=v.values.length/v.valuesPerElement;for(const e in c){const t=c[e],r=t.values,i=g(e)??(0,P.tM)(_);p.push([e,new H.n(r,i,t.valuesPerElement,!0)])}const x=a.texture,y=h&&h[x];if(y&&!m.has(x)){const{image:e,parameters:t}=y,r=new Fe(e,t);i.push(r),m.set(x,r)}const w=m.get(x),b=w?w.id:void 0,T=a.material;let M=o.get(T,x);if(null==M){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?wr(y.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:b,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),M=new ar(i,t),o.set(T,x,M)}n.push(M);const S=new ne(M,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:c,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:s.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:yr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let m;if(t.cache)m=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));m=await e(new y.R,a.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:S}=function(e,t,r){const n=e.model,a=e.meta,m=n.meta?.ESRI_proxyEllipsoid,y=a.isEsriSymbolResource&&null!=m&&"EsriRealisticTreesStyle"===a.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const n=e.model.lods[r];for(const o of n.parts){const n=o.attributes.normal;if(null==n)return;const s=o.attributes.position,a=s.count,u=(0,d.vt)(),f=(0,d.vt)(),m=(0,d.vt)(),p=new Float32Array(4*a),v=new Float32Array(3*a),_=(0,c.B8)((0,l.vt)(),o.transform);let x=0,y=0;for(let c=0;c<a;c++){s.getVec(c,f),n.getVec(c,u),(0,h.Z0)(f,f,o.transform),(0,h.Re)(m,f,t.center),(0,h.Qr)(m,m,t.radius);const a=m[2],l=(0,h.Bw)(m),d=Math.min(.45+.55*l*l,1)**i.Tf;(0,h.Qr)(m,m,t.radius),null!==_&&(0,h.Z0)(m,m,_),(0,h.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,h.Cc)(m,m,u,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,p[y]=d,p[y+1]=d,p[y+2]=d,p[y+3]=1,y+=4}o.attributes.normal=new g.xs(v.buffer),o.attributes.color=new g.Eq(p.buffer)}}}(e,m));const T=!!t.usePBR,S=a.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:y,mrrFactors:$t.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:$t.mb},E={...t.materialParameters,treeRendering:y},A=new Array,R=new Map,I=new Map,O=n.lods.length,F=(0,f.Ie)();return n.lods.forEach((e,a)=>{const c=!0===t.skipHighLods&&(O>1&&0===a||O>3&&1===a)||!1===t.skipHighLods&&null!=r&&a!==r;if(c&&0!==a)return;const l=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=c?new ar({},t):function(e,t,r,n,o,s,a,c,l){const h=e.materials.get(t.material);if(null==h)return null;const{normal:d,color:f,texCoord0:m,tangent:p}=t.attributes,g=t.material+(d?"_normal":"")+(f?"_color":"")+(m?"_texCoord0":"")+(p?"_tangent":""),v=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,x=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!s.has(g)){if(v){const t=(t,r=!1,i=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?c.compressionOptions:void 0;a.set(t,new Fe((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==x&&!l;t(h.colorTexture,r,1!==x),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}const r=(0,i.xV)(h.color[0]),d=(0,i.xV)(h.color[1]),f=(0,i.xV)(h.color[2]),m=null!=h.colorTexture&&v?a.get(h.colorTexture):null,p=(0,$t.Jr)(h),y=null!=h.normalTextureTransform?.scale?h.normalTextureTransform?.scale:u.Un;s.set(g,new ar({...n,customDepthTest:1,textureAlphaMode:x,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,d,f],ambient:[r,d,f],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,textureId:null!=m?m.id:void 0,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&v?a.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=m&&!!m.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&v?a.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&v?a.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&v?a.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null!=h.emissiveStrengthKHR?h.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:p?$t.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},c))}const y=s.get(g);if(r.stageResources.materials.push(y),v){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return y}(n,e,l,S,E,R,I,t,y),{geometry:h,vertexCount:d}=function(e,t){const r=e.attributes.position.count,i=(0,w.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,v.t)(n,a,e.transform,3,c);const l=[["position",new H.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,s.Ge)(Sr,e.transform),(0,v.b)(t,n,Sr,3,a),(0,o.or)(Sr)&&(0,v.n)(t,t),l.push(["normal",new H.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,s.z0)(Sr,e.transform),(0,_.t)(t,n,Sr,4,a),(0,o.or)(Sr)&&(0,v.n)(t,t,4),l.push(["tangent",new H.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),l.push(["uv0",new H.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof g.Eq?(0,_.b)(t,u,1,255):(u instanceof g.XP||u instanceof g.Uz)&&(0,_.b)(t,u,1/255,255):(t.fill(255),u instanceof g.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof g.eI||e.attributes.color instanceof g.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new H.n(t,i,4,!0)])}return{geometry:new ne(t,l),vertexCount:r}}(e,r??new ar({},t)),m=h.boundingInfo;null!=m&&0===a&&((0,f.iT)(F,m.bbMin),(0,f.iT)(F,m.bbMax)),null!=r&&(l.stageResources.geometries.push(h),l.numberOfVertices+=d)}),c||A.push(l)}),{engineResources:A,referenceBoundingBox:F}}(m,t,a.specifiedLodIndex);return{lods:T,referenceBoundingBox:S,isEsriSymbolResource:m.meta.isEsriSymbolResource,isWosr:!1}}const Sr=(0,a.vt)()},1843(e,t,r){r.d(t,{BP:()=>h,l5:()=>d});var i=r(20498),n=r(13030),o=r(90239),s=r(4431),a=r(620),c=r(85079);class l{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new l(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class u{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:p(e[1].constructor)})))}freeze(){return this}get locations(){return(0,c.Xk)((0,s.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}vec4i16(e,t){return this._appendField(e,n.E7,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new l(this,e)}createView(e,t){return new l(this,e,t)}clone(){const e=new u;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function h(){return new u}class d{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const f=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function p(e){return g.get(e)}const g=new Map;f.forEach(e=>g.set(m(e),e))},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const s=e.fields.get(o),a=s.constructor.ElementCount,c=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(s.constructor.ElementType),l=s.offset,u=s.optional?.glNormalized??!1,h=s.optional?.integer??!1;return new n._(o,a,c,l,r,u,t,h)})}},26857(e,t,r){r.d(t,{b:()=>a});var i=r(5482),n=r(69622),o=r(91429);let s=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),s=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],s);const a=new s},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
|
|
233
|
+
fragBlur = b / w_total;`),e}const d=Object.freeze(Object.defineProperty({__proto__:null,build:h},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>o,f:()=>s,n:()=>n});var i=r(34275);function n(e,t){o(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function o(e,t,r=2,n=r){const o=t.length/2;let s=0,a=0;if(!(0,i.iu)(t)||(0,i.dk)(t)){for(let i=0;i<o;++i)e[s]=t[a],e[s+1]=t[a+1],s+=r,a+=n;return}const c=(0,i.a3)(t);if((0,i.JI)(t))for(let i=0;i<o;++i)e[s]=Math.max(t[a]/c,-1),e[s+1]=Math.max(t[a+1]/c,-1),s+=r,a+=n;else for(let i=0;i<o;++i)e[s]=t[a]/c,e[s+1]=t[a+1]/c,s+=r,a+=n}function s(e,t,r,i){const n=e.typedBuffer,o=e.typedBufferStride,s=i?.count??e.count;let a=(i?.dstIndex??0)*o;for(let e=0;e<s;++e)n[a]=t,n[a+1]=r,a+=o}Object.freeze(Object.defineProperty({__proto__:null,fill:s,normalizeIntegerBuffer:o,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>d,b:()=>c,c:()=>a,d:()=>o,e:()=>f,f:()=>h,l:()=>u,n:()=>m,t:()=>s});var i=r(40876),n=(r(44208),r(72727));function o(e,t,r){s(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function s(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[4],f=r[5],m=r[6],p=r[8],g=r[9],v=r[10],_=r[12],x=r[13],y=r[14];let w=0,b=0;for(let r=0;r<c;r++){const r=t[w],n=t[w+1],s=t[w+2];e[b]=l*r+d*n+p*s+_,e[b+1]=u*r+f*n+g*s+x,e[b+2]=h*r+m*n+v*s+y,w+=o,b+=i}return e}function a(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function c(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a),l=r[0],u=r[1],h=r[2],d=r[3],f=r[4],m=r[5],p=r[6],g=r[7],v=r[8];let _=0,x=0;for(let r=0;r<c;r++){const r=t[_],n=t[_+1],s=t[_+2];e[x]=l*r+d*n+p*s,e[x+1]=u*r+f*n+g*s,e[x+2]=h*r+m*n+v*s,_+=o,x+=i}}function l(e,t,r,i=3,n=i){const o=Math.min(e.length/i,t.length/n);let s=0,a=0;for(let c=0;c<o;c++)e[a]=r*t[s],e[a+1]=r*t[s+1],e[a+2]=r*t[s+2],s+=n,a+=i;return e}function u(e,t,r,i){h(e.typedBuffer,t.typedBuffer,r,i,e.typedBufferStride,t.typedBufferStride)}function h(e,t,r,n,o=3,s=o){const a=Math.min(e.length/o,t.length/s);let c=0,l=0;const u=1/i.Tf;for(let i=0;i<a;i++)e[l]=n*(r*t[c])**u,e[l+1]=n*(r*t[c+1])**u,e[l+2]=n*(r*t[c+2])**u,c+=s,l+=o}function d(e,t,r,i=3,o=i){const s=(0,n.k)(e.length,i,3),a=(0,n.k)(t.length,o,3),c=Math.min(s,a);let l=0,u=0;for(let n=0;n<c;n++)e[u]=t[l]+r[0],e[u+1]=t[l+1]+r[1],e[u+2]=t[l+2]+r[2],l+=o,u+=i;return e}function f(e,t){m(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function m(e,t,r=3,i=r){const n=Math.min(e.length/r,t.length/i);let o=0,s=0;for(let a=0;a<n;a++){const n=t[o],a=t[o+1],c=t[o+2],l=n*n+a*a+c*c;if(l>0){const t=1/Math.sqrt(l);e[s]=t*n,e[s+1]=t*a,e[s+2]=t*c}o+=i,s+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:h,linearToSRGBView:u,normalize:m,normalizeView:f,scale:l,scaleView:function(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const i=Math.min(e.count,t.count),n=e.typedBuffer,o=e.typedBufferStride,s=t.typedBuffer,a=t.typedBufferStride;let c=0,l=0;for(let e=0;e<i;e++)n[l]=s[c]>>r,n[l+1]=s[c+1]>>r,n[l+2]=s[c+2]>>r,c+=a,l+=o},transformMat3:c,transformMat3View:a,transformMat4:s,transformMat4View:o,translate:d},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>c,uC:()=>a});var i=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return o(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,i.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+s(this.range,e-t,r)}minimalMonotonic(e,t,r){return o(this.range,e,e+this.range,t,r)}center(e,t,r){return t=this.monotonic(e,t,r),this.normalize((e+t)/2,r)}diff(e,t,r){return this.monotonic(e,t,r)-e}shortestSignedDiff(e,t){e=this.normalize(e);const r=(t=this.normalize(t))-e,i=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(i)?r:i}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function o(e,t,r,i,n=0,o=!1){return(i-=n)<t?i+=s(e,t-i):i>r&&(i-=s(e,i-r)),o&&i===r&&(i=t),i+n}function s(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const a=new n(0,2*Math.PI),c=(new n(-Math.PI,Math.PI),new n(0,360))},4341(e,t,r){r.d(t,{I:()=>n});var i=r(26390);class n{constructor(e){this._allocator=e,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)(()=>this._reset()),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const e=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(e,this._items.length),this._itemsPtr=0}_grow(){for(let e=0;e<Math.max(8,Math.min(this._items.length,o));e++)this._items.push(this._allocator())}}const o=1024},46140(e,t,r){r.d(t,{A:()=>n});var i=r(49186);class n{constructor(e,t,r=""){this.major=e,this.minor=t,this._context=r}lessThan(e,t){return this.major<e||e===this.major&&this.minor<t}greaterEqual(e,t){return!this.lessThan(e,t)}toString(){return`${this.major}.${this.minor}`}validate(e){if(this.major!==e.major){const t=this._context&&this._context+":",r=this._context&&this._context+" ";throw new i.A(t+"unsupported-version",`Required major ${r}version is '${this.major}', but got '\${version.major}.\${version.minor}'`,{version:e})}}clone(){return new n(this.major,this.minor,this._context)}static parse(e,t=""){const[r,o]=e.split("."),s=/^\s*\d+\s*$/;if(!r?.match||!s.test(r))throw new i.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!o?.match||!s.test(o))throw new i.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const a=parseInt(r,10),c=parseInt(o,10);return new n(a,c,t)}}},61473(e,t,r){function i(e){return e=e||globalThis.location.hostname,l.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(o)||null!=t.match(a)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(s)||null!=t.match(c)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>i});const o=/^devext\.arcgis\.com$/,s=/^qaext\.arcgis\.com$/,a=/^[\w-]*\.mapsdevext\.arcgis\.com$/,c=/^[\w-]*\.mapsqa\.arcgis\.com$/,l=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,o,s,/^jsapps\.esri\.com$/,a,c]},88340(e,t,r){function i(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function o(){return i()}function s(){return n(1,1)}function a(){return n(1,0)}function c(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>l,vt:()=>i});const l=o(),u=s(),h=a(),d=c();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:h,UNIT_Y:d,ZEROS:l,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:i,fromValues:n,ones:s,unitX:a,unitY:c,zeros:o},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>c,Qh:()=>s,RS:()=>n,Ul:()=>f,i5:()=>d,lM:()=>o,qK:()=>u});var i=r(34275);const n=16;function o(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r],!1));return t}function s(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return l(e,8);let r=h;for(let i=0;i<t;i++)r+=a(e[i]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=a(e[r]));return t}function a(e,t=!0){switch(typeof e){case"object":return t?s(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,i.iu)(t)?t.byteLength+d:Array.isArray(t)?l(t,n):0:0),0)}function l(e,t){return h+e.length*t}const u=32,h=16,d=145,f=64},65806(e,t,r){r.d(t,{g:()=>s});var i=r(51850),n=r(91218),o=r(9762);function s(e,t,r,i){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return a[0]=e.x,a[1]=e.y,a[2]=e.z??0,(0,o.projectBuffer)(a,e.spatialReference,0,t,r,0);const s=(0,n.tryProject)(e,r,i);return!!s&&(t[0]=s.x,t[1]=s.y,t[2]=s.z??0,!0)}const a=(0,i.vt)()},27993(e,t,r){r.d(t,{F:()=>a});var i=r(91218),n=r(16930),o=r(9762),s=r(65806);function a(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,i.canProjectWithoutEngine)(t,n)?(0,o.projectBuffer)(e,t,0,r,n,0,1):(c.x=e[0],c.y=e[1],c.z=e[2],c.spatialReference=t,(0,s.g)(c,r,n)))}const c={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},97146(e,t,r){r.d(t,{Dg:()=>o,my:()=>s,tM:()=>u,uW:()=>n});var i=r(34275);function n(e){return o(e,!0)}function o(e,t){if(Array.isArray(e)){if(e.length<i.y9)return e}else if(e.length<i.y9)return Array.from(e);let r=!0,n=!0;return e.some((e,t)=>(r=r&&0===e,n=n&&e===t,!r&&!n)),r?function(e){if(1===e)return c;if(e<i.y9)return new Array(e).fill(0);if(e>d.length){const t=Math.max(2*d.length,e);d=new Uint8Array(t)}return new Uint8Array(d.buffer,0,e)}(e.length):n?u(e.length):(0,i.iu)(e)&&e.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?e:function(e,t){for(const r of e){if(r>=65536)return(0,i.iu)(e)?e:new Uint32Array(e);r>=256&&(t=!1)}return t?new Uint8Array(e):new Uint16Array(e)}(e,!t)}function s(e){return e<=i.y9?new Array(e):e<=65536?new Uint16Array(e):new Uint32Array(e)}let a=h(131072);const c=[0],l=(()=>{const e=new Uint16Array(65536);for(let t=0;t<e.length;++t)e[t]=t;return e})();function u(e){return 1===e?c:e<i.y9?Array.from(new Uint16Array(l.buffer,0,e)):e<l.length?new Uint16Array(l.buffer,0,e):(e>a.length&&(a=h(Math.max(2*a.length,e))),new Uint32Array(a.buffer,0,e))}function h(e){const t=new Uint32Array(e);for(let e=0;e<t.length;e++)t[e]=e;return t}let d=new Uint8Array(65536)},72727(e,t,r){function i(e,t,r){if(t<=0)return 0;const i=e-r;return i<0?0:Math.floor(i/t)+1}r.d(t,{k:()=>i}),r(53966)},90239(e,t,r){function i(e){switch(e){case"u8":case"i8":return 1;case"u16":case"i16":case"f16":return 2;case"u32":case"i32":case"f32":return 4;case"f64":return 8}}r.d(t,{GJ:()=>i})},82919(e,t,r){r.d(t,{DV:()=>v,C:()=>p,vt:()=>f,Qy:()=>m,ui:()=>g,ST:()=>y,bU:()=>w,pw:()=>x,m7:()=>_,c8:()=>T});var i=r(4341),n=r(58083),o=r(35522),s=r(51850),a=r(78955),c=r(91829),l=r(71351);function u(e){return e?{ray:(0,l.vt)(e.ray),c0:e.c0,c1:e.c1}:{ray:(0,l.vt)(),c0:0,c1:Number.MAX_VALUE}}new i.I(()=>u());var h=r(27921),d=r(32114);function f(e){return e?[(0,h.vt)(e[0]),(0,h.vt)(e[1]),(0,h.vt)(e[2]),(0,h.vt)(e[3]),(0,h.vt)(e[4]),(0,h.vt)(e[5])]:[(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)(),(0,h.vt)()]}function m(){return[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()]}function p(e,t){for(let r=0;r<M;r++)(0,h.C)(e[r],t[r]);return e}function g(e,t,r,i=A){const s=(0,n.lw)(d.Rc.get(),t,e);(0,n.B8)(s,s);for(let e=0;e<S;++e){const t=(0,a.Z0)(d.Km.get(),C[e],s);(0,o.hZ)(i[e],t[0]/t[3],t[1]/t[3],t[2]/t[3])}v(r,i)}function v(e,t){(0,h.Cr)(t[4],t[0],t[3],e[0]),(0,h.Cr)(t[1],t[5],t[6],e[1]),(0,h.Cr)(t[4],t[5],t[1],e[2]),(0,h.Cr)(t[3],t[2],t[6],e[3]),(0,h.Cr)(t[0],t[1],t[2],e[4]),(0,h.Cr)(t[5],t[4],t[7],e[5])}function _(e,t){for(let r=0;r<M;r++){const i=e[r];if(i[0]*t.center[0]+i[1]*t.center[1]+i[2]*t.center[2]+i[3]>=t.radius)return!1}return!0}function x(e,t){return b(e,function(e,t=u()){return(0,l.C)(e,t.ray),t.c0=0,t.c1=Number.MAX_VALUE,t}(t,E.get()))}function y(e,t,r){return b(e,function(e,t,r=u()){const i=(0,o.Bw)(e.vector);return(0,l.fA)(e.origin,t,r.ray),r.c0=0,r.c1=i,r}(t,r,E.get()))}function w(e,t){for(let r=0;r<M;r++)if((0,h.mN)(e[r],t)>0)return!1;return!0}function b(e,t){for(let r=0;r<M;r++)if(!(0,h.$Q)(e[r],t))return!1;return!0}const T={bottom:[5,1,0,4],near:[0,1,2,3],far:[5,4,7,6],right:[1,5,6,2],left:[4,0,3,7],top:[7,3,2,6]},M=6,S=8,C=[(0,c.fA)(-1,-1,-1,1),(0,c.fA)(1,-1,-1,1),(0,c.fA)(1,1,-1,1),(0,c.fA)(-1,1,-1,1),(0,c.fA)(-1,-1,1,1),(0,c.fA)(1,-1,1,1),(0,c.fA)(1,1,1,1),(0,c.fA)(-1,1,1,1)],E=new i.I(u),A=m()},11964(e,t,r){r.d(t,{Cr:()=>u,LV:()=>l,_I:()=>h,vt:()=>c});var i=r(34727),n=r(4341),o=r(35522),s=r(51850),a=r(32114);function c(e){return e?{origin:(0,s.o8)(e.origin),vector:(0,s.o8)(e.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function l(e,t){const r=d.get();return r.origin=e,r.vector=t,r}function u(e,t,r=c()){return(0,o.C)(r.origin,e),(0,o.Re)(r.vector,t,e),r}function h(e,t,r){return function(e,t,r,n,s){const{vector:c,origin:l}=e,u=(0,o.Re)(a.rq.get(),t,l),h=(0,o.Om)(c,u)/(0,o.m3)(c);return(0,o.hs)(s,c,(0,i.qE)(h,0,1)),(0,o.WQ)(s,s,e.origin)}(e,t,0,0,r)}(0,s.vt)(),(0,s.vt)();const d=new n.I(()=>c())},17136(e,t,r){r.d(t,{Y_:()=>A,O7:()=>C,el:()=>S});var i=r(92602),n=r(69052),o=r(49186),s=r(53966),a=r(39829),c=r(82799),l=r(16930),u=r(80754),h=r(21325),d=r(28735),f=r(11254),m=r(60408),p=r(65864),g=r(2272),v=r(84952),_=r(92300);const x=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function y(e){return"polygon"===e[0].type}function w(e){return"polyline"===e[0].type}function b(e,t,r){if(t){const t=function(e,t){if(!(e instanceof c.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw x().error(e),new o.A("internal:geometry",e)}const r=(0,u.r8)(e),i=[];for(const e of r){const r=[];i.push(r),r.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const n=e[i][0],o=e[i][1],s=e[i+1][0],a=e[i+1][1],c=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),l=(a-o)/c,u=(s-n)/c,h=c/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,s=u*i+n,a=l*i+o;r.push([s,a])}const e=(c+Math.floor(h-1)*t)/2,i=u*e+n,s=l*e+o;r.push([i,s])}r.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new c.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const i=e[0];if(i>t){const r=(0,u.kd)(i,t);e[0]=i+r*(-2*t)}else if(i<r){const t=(0,u.kd)(i,r);e[0]=i+t*(-2*r)}}else{const i=e.x;if(i>t){const r=(0,u.kd)(i,t);e=e.clone().offset(r*(-2*t),0)}else if(i<r){const t=(0,u.kd)(i,r);e=e.clone().offset(t*(-2*r),0)}}return e}function M(e,t){let r=-1;for(let i=0;i<t.cutIndexes.length;i++){const n=t.cutIndexes[i],o=t.geometries[i],s=(0,u.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const i=t[e][0];r=i>r?i:r}r=Number(r.toFixed(9));const i=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=o.getPoint(e,r);o.setPoint(e,r,t.clone().offset(i,0))}return!0}})}if(n===r){if(y(e))for(const t of(0,u.r8)(o))e[n]=e[n].addRing(t);else if(w(e))for(const t of(0,u.r8)(o))e[n]=e[n].addPath(t)}else r=n,e[n]=o}return e}async function S(e,t,r){if(!Array.isArray(e))return S([e],t);t&&"string"!=typeof t&&x().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let o,s,l,y,w,C,E,A,R=0;const I=[],O=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,h.Vp)(o),l=o.isWebMercator,C=l?102100:4326,y=u.j7[C].maxX,w=u.j7[C].minX,E=u.j7[C].plus180Line,A=u.j7[C].minus180Line),s)if("mesh"===t.type)O.push(t);else if("point"===t.type)O.push(T(t.clone(),y,w));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,y,w)),O.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);O.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,w)*(2*y);let i=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(E)&&o!==y?(R=o>R?o:R,i=b(i,l),I.push(i),O.push("cut")):e.intersects(A)&&n!==w?(R=o*(2*y)>R?o*(2*y):R,i=b(i,l,360),I.push(i),O.push("cut")):O.push(i)}else O.push(t.clone());else O.push(t);else O.push(t);let F=(0,u.kd)(R,y),N=-90;const D=F,P=new c.A;for(;F>0;){const e=360*F-180;P.addPath([[e,N],[e,-1*N]]),N*=-1,F--}if(I.length>0&&D>0){const t=M(I,await async function(e,t,r,i){const n=(0,g.Dl)(e),o=t[0].spatialReference,s={...i,responseType:"json",query:{...n.query,f:"json",sr:(0,h.YX)(o),target:JSON.stringify({geometryType:(0,m.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},a=await(0,f.A)(n.path+"/cut",s),{cutIndexes:c,geometries:l=[]}=a.data;return{cutIndexes:c,geometries:l.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=o,t})}}(n,I,P,r)),i=[],o=[];for(let r=0;r<O.length;r++){const n=O[r];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[r];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(i.push(n),o.push("simplify")):o.push(l?(0,d.Gh)(n):n)}}if(!i.length)return o;const s=await async function(e,t,r){const i="string"==typeof e?(0,v.An)(e):e,n=t[0].spatialReference,o=(0,m.$B)(t[0]),s={...r,query:{...i.query,f:"json",sr:(0,h.YX)(n),geometries:JSON.stringify((0,_.X)(t))}},{data:a}=await(0,f.A)(i.path+"/simplify",s);return(0,_.V)(a.geometries,o,n)}(n,i,r),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(l?(0,d.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<O.length;e++){const t=O[e];if("cut"!==t)B.push(t);else{const e=I.shift();B.push(!0===l?(0,d.Gh)(e):e)}}return B}function C(e,t,r){const i=(0,h.Vp)(r);if(null==i)return e;const[n,o]=i.valid,s=2*o;let a=0,c=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?c=Math.ceil(Math.abs(e-o)/s):e<n&&(c=-Math.ceil(Math.abs(e-n)/s));let l=e+(a-c)*s;const u=l-t;return u>o?l-=s:u<n&&(l+=s),l}function E(e){const t=(0,h.Vp)(e);if(null==t)return null;const[r,i]=t.valid;return new n.hr(r,i)}const A=E(l.A.WGS84);E(l.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>s,kS:()=>c,kd:()=>a,r8:()=>l});var i=r(82799),n=r(16930),o=r(60408);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function c(e,t){const r=l(e);for(const e of r)for(const r of e)r[0]+=t;return e}function l(e){return(0,o.Bi)(e)?e.rings:e.paths}},71351(e,t,r){r.d(t,{C:()=>u,Cr:()=>h,LV:()=>l,fA:()=>d,oC:()=>f,vt:()=>a}),r(4576);var i=r(4341),n=(r(77690),r(29242)),o=r(35522),s=r(51850);function a(e){return e?c((0,s.o8)(e.origin),(0,s.o8)(e.direction)):c((0,s.vt)(),(0,s.vt)())}function c(e,t){return{origin:e,direction:t}}function l(e,t){const r=m.get();return r.origin=e,r.direction=t,r}function u(e,t=a()){return d(e.origin,e.direction,t)}function h(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.Re)(r.direction,t,e),r}function d(e,t,r=a()){return(0,o.C)(r.origin,e),(0,o.C)(r.direction,t),r}function f(e,t,r){const i=(0,o.Om)(e.direction,(0,o.Re)(r,t,e.origin));return(0,o.WQ)(r,e.origin,(0,o.hs)(r,e.direction,i)),r}r(32114);const m=new i.I(()=>a());(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,n.vt)()},94008(e,t,r){r.d(t,{iy:()=>f}),r(44208),r(53966);var i=r(34727),n=r(34304),o=r(58083),s=r(35522),a=r(51850),c=r(91829),l=r(34275);var u=r(71351),h=r(44280),d=r(32114);class f{constructor(e=0,t=0,r=0,i=0){this.radius=i,"number"==typeof e?this._center=(0,a.fA)(e,t,r):function(e){return t=e,(0,l.vZ)(t)&&t.length>=3||function(e){return((0,l.aI)(e)||Array.isArray(e))&&e.length>=3}(e);var t}(e)||function(e){return(t=e)instanceof Float32Array&&t.length>=4||function(e){return Array.isArray(e)&&e.length>=4}(e);var t}(e)?(this._center=(0,a.ci)(e),this.radius=4===e.length?e[3]:t):(this._center=(0,a.o8)(e.center),this.radius=e.radius)}get isValid(){return this.radius>=0}invalidate(){this.radius=-1}get center(){return this._center}set center(e){(0,s.C)(this.center,e)}exactEquals(e){return(0,s.aI)(this._center,e.center)&&this.radius===e.radius}copyFrom(e){return e!==this&&((0,s.C)(this._center,e.center),this.radius=e.radius),this}clone(){return new f(this.center,this.radius)}toVec4(){return(0,c.fA)(this.center[0],this.center[1],this.center[2],this.radius)}contains(e){return(0,s.hG)(this.center,e)<=this.radius**2}intersectRay(e,t){if(null==e)return!1;if(!this._intersect(e,m))return!1;let{t0:r,t1:i}=m;if((r<0||i<r&&i>0)&&(r=i),r<0)return!1;if(t){const{origin:i,direction:n}=e;t[0]=i[0]+n[0]*r,t[1]=i[1]+n[1]*r,t[2]=i[2]+n[2]*r}return!0}intersectLine(e,t){const r=(0,u.Cr)(e,t);if(!this._intersect(r,m))return[];const{origin:i,direction:o}=r,{t0:c,t1:l}=m,h=e=>{const t=(0,a.vt)();return(0,s.Ln)(t,i,o,e),this.projectPoint(t,t)};return Math.abs(c-l)<(0,n.FD)()?[h(c)]:[h(c),h(l)]}_intersect(e,t){const{origin:r,direction:i}=e,n=p;n[0]=r[0]-this.center[0],n[1]=r[1]-this.center[1],n[2]=r[2]-this.center[2];const o=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===o)return!1;const s=2*(i[0]*n[0]+i[1]*n[1]+i[2]*n[2]),a=s*s-4*o*(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]-this.radius**2);if(a<0)return!1;const c=Math.sqrt(a);return t.t0=(-s-c)/(2*o),t.t1=(-s+c)/(2*o),!0}projectPoint(e,t){const r=(0,s.Re)(d.rq.get(),e,this.center),i=(0,s.hs)(d.rq.get(),r,this.radius/(0,s.Bw)(r));return(0,s.WQ)(t,i,this.center)}closestPointOnSilhouette(e,t){const r=d.rq.get(),i=d.Rc.get();(0,s.$A)(r,e.origin,e.direction),(0,s.$A)(t,r,e.origin),(0,s.hs)(t,t,1/(0,s.Bw)(t)*this.radius);const n=this._angleToSilhouette(e.origin),a=(0,h.g7)(e.origin,t);return(0,o.$0)(i,a+n,r),(0,s.Z0)(t,t,i),t}frustumCoverage(e,t,r){const i=this.radius,n=i*i,o=e+.5*Math.PI,s=t*t+n-2*Math.cos(o)*t*i,a=Math.sqrt(s),c=s-n;if(c<=0)return.5;const l=Math.sqrt(c),u=Math.acos(l/a)-Math.asin(i/(a/Math.sin(o)));return Math.min(1,(u+.5*r)/r)}_angleToSilhouette(e){const t=(0,s.Re)(d.rq.get(),e,this.center),r=(0,s.Bw)(t),n=this.radius,o=n+Math.abs(n-r);return(0,i.XM)(n/o)}union(e){const t=(0,s.Io)(this._center,e.center),r=this.radius,i=e.radius;return t+i<r?this:t+r<i?(this.copyFrom(e),this):((0,s.Cc)(this._center,this._center,e.center,(t+i-r)/(2*t)),this.radius=(t+r+i)/2,this)}toJSON(){return{center:this.center,radius:this.radius}}signedDistanceToPlane(e){const{center:t,radius:r}=this,i=e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3];return i<0?Math.min(i+r,0):Math.max(i-r,0)}}new f;const m={t0:0,t1:0},p=(0,a.vt)();(0,a.vt)(),(0,a.vt)()},38969(e,t,r){r.d(t,{i:()=>n});var i=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,i.Oo)(e,"canplay",r)),t((0,i.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>s,X:()=>o});var i=r(60408),n=r(65864);function o(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function s(e,t,r){const i=(0,n.xD)(t);return e.map(e=>{const t=i.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>c});var i=r(11254),n=r(60999),o=r(49186),s=r(17676),a=r(84952);class c{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,a.DB)(e)?((0,s.Te)(t),(0,a.lJ)(e)):this._load("array-buffer",e,t)}async loadImage(e,t){return this._load("image",e,t)}async _load(e,t,r){t=this._resolveURI(t);const a=await(0,n.Ke)((0,i.A)(t,{responseType:e,...r}));if(a.ok)return a.value.data;throw(0,s.QP)(a.error),new o.A("gltf-loader-request-error",`Request for resource failed: ${a.error}`)}}},84498(e,t,r){r.d(t,{x:()=>s});var i=r(34275),n=r(97146),o=r(63907);function s(e,t){switch(t){case o.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,i.mg)(e)?new Uint16Array(e):e}(e);case o.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,i=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(i[e++]=t,i[e++]=t+1,i[e++]=t+2):(i[e++]=t+1,i[e++]=t,i[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(i[t++]=e[n],i[t++]=e[n+1],i[t++]=e[n+2]):(i[t++]=e[n+1],i[t++]=e[n],i[t++]=e[n+2])}return i}(e);case o.WR.TRIANGLE_FAN:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return new Uint16Array(0);const r=t-2,i=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)i[e++]=0,i[e++]=t+1,i[e++]=t+2;return i}const n=e[0];let o=e[1],s=0;for(let t=0;t<r;++t){const r=e[t+2];i[s++]=n,i[s++]=o,i[s++]=r,o=r}return i}(e)}}},51530(e,t,r){r.d(t,{KB:()=>s,Xi:()=>n,pn:()=>a,x3:()=>o});var i=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function o(e){return"encoded-mesh-texture"===e?.type}async function s(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function a(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let o=URL.createObjectURL(r);switch(t){case"image/jpeg":o+="#.jpg";break;case"image/png":o+="#.png"}const s=new Image;if((0,i.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(s)},i=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(o),s.removeEventListener("load",r),s.removeEventListener("error",i)};s.addEventListener("load",r),s.addEventListener("error",i),s.src=o});try{s.src=o,await s.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(o),s}},91202(e,t,r){r.d(t,{fetch:()=>Er});var i=r(40876),n=r(61473),o=r(34727),s=r(77690),a=r(29242),c=r(58083),l=r(9093),u=r(48163),h=r(35522),d=r(51850),f=r(70328),m=r(34275);function p(e,t=!1){return e<=m.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var g=r(13030),v=r(73354),_=r(50867),x=r(43609),y=r(21015),w=r(84498),b=r(51530),T=r(88340);function M(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,i=null!=e.scale?e.scale:T.Un,n=(0,a.fA)(1,0,0,0,1,0,t[0],t[1],1),o=(0,a.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),c=(0,a.fA)(i[0],0,0,0,i[1],0,0,0,1),l=(0,a.vt)();return(0,s.lw)(l,o,c),(0,s.lw)(l,n,l),l}class S{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class C{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new S,this.numberOfVertices=0}}var E=r(11254),A=r(60999),R=r(49186),I=r(53966),O=r(69397);class F{constructor(){this._outer=new Map}clear(){this._outer.clear()}get empty(){return 0===this._outer.size}get outerSize(){return this._outer.size}get size(){let e=0;for(const t of this._outer.values())e+=t.size;return e}get(e,t){return this._outer.get(e)?.get(t)}getInner(e){return this._outer.get(e)}set(e,t,r){const i=this._outer.get(e);i?i.set(t,r):this._outer.set(e,new Map([[t,r]]))}delete(e,t){const r=this._outer.get(e);r&&(r.delete(t),0===r.size&&this._outer.delete(e))}pop(e,t){const r=this.get(e,t);return this.delete(e,t),r}*outerMap(){for(const e of this._outer)yield e}*values(){for(const e of this._outer.values())yield*e.values()}*[Symbol.iterator](){for(const[e,t]of this._outer)for(const[r,i]of t)yield[e,r,i]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,i)=>e(t,r,i)))}copy(){const e=new F;return this.forAll((t,r,i)=>e.set(r,i,t)),e}}var N=r(17676),D=r(46140),P=r(97146);async function B(e,t){return(await(0,E.A)(e,{responseType:"image",...t})).data}var H=r(46610),L=r(20498);function z(e){if(e.length<m.y9)return Array.from(e);if(Array.isArray(e))return Float64Array.from(e);if(!("BYTES_PER_ELEMENT"in e))return Array.from(e);switch(e.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(e);case 2:return(0,m.LW)(e)?(0,L.pX)().from(e):(0,m.jq)(e)?Uint16Array.from(e):Int16Array.from(e);case 4:return Float32Array.from(e);default:return Float64Array.from(e)}}var U=r(15142),G=r(620);class V{get center(){return(0,d.fA)(this._data[0],this._data[1],this._data[2])}get radius(){return this._data[3]}get bbMin(){return(0,d.fA)(this._data[4],this._data[5],this._data[6])}get bbMax(){return(0,d.fA)(this._data[7],this._data[8],this._data[9])}constructor(e,t,r){this.primitiveIndices=e,this._numIndexPerPrimitive=t,this.position=r,this._data=[.1,0,0,0,0,0,0,0,0,0],this._children=void 0,(0,G.vA)(e.length>=1),(0,G.vA)(3===r.size||4===r.size);const{data:i,size:n,indices:o}=r;(0,G.vA)(o.length%this._numIndexPerPrimitive===0),(0,G.vA)(o.length>=e.length*this._numIndexPerPrimitive);const s=e.length;let a=n*o[this._numIndexPerPrimitive*e[0]];j.clear(),j.push(a);const c=(0,d.fA)(i[a],i[a+1],i[a+2]),l=(0,d.o8)(c);for(let t=0;t<s;++t){const r=this._numIndexPerPrimitive*e[t];for(let e=0;e<this._numIndexPerPrimitive;++e){a=n*o[r+e],j.push(a);let t=i[a];c[0]=Math.min(t,c[0]),l[0]=Math.max(t,l[0]),t=i[a+1],c[1]=Math.min(t,c[1]),l[1]=Math.max(t,l[1]),t=i[a+2],c[2]=Math.min(t,c[2]),l[2]=Math.max(t,l[2])}}for(let e=0;e<3;++e)this._data[4+e]=c[e],this._data[7+e]=l[e];const u=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5);let f=.5*Math.max(Math.max(l[0]-c[0],l[1]-c[1]),l[2]-c[2]),m=f*f;for(let e=0;e<j.length;++e){a=j.at(e);const t=i[a]-u[0],r=i[a+1]-u[1],n=i[a+2]-u[2],o=t*t+r*r+n*n;if(o<=m)continue;const s=Math.sqrt(o),c=.5*(s-f);f+=c,m=f*f;const l=c/s;u[0]+=t*l,u[1]+=r*l,u[2]+=n*l}this._data[3]=f;for(let e=0;e<3;++e)this._data[0+e]=u[e];j.clear()}getChildren(){if(this._children||(0,h.hG)(this.bbMin,this.bbMax)<=1)return this._children;const e=(0,h.Cc)((0,d.vt)(),this.bbMin,this.bbMax,.5),t=this.primitiveIndices.length,r=new Uint8Array(t),i=new Array(8);for(let e=0;e<8;++e)i[e]=0;const{data:n,size:o,indices:s}=this.position;for(let a=0;a<t;++a){let t=0;const c=this._numIndexPerPrimitive*this.primitiveIndices[a];let l=o*s[c],u=n[l],h=n[l+1],d=n[l+2];for(let e=1;e<this._numIndexPerPrimitive;++e){l=o*s[c+e];const t=n[l],r=n[l+1],i=n[l+2];t<u&&(u=t),r<h&&(h=r),i<d&&(d=i)}u<e[0]&&(t|=1),h<e[1]&&(t|=2),d<e[2]&&(t|=4),r[a]=t,++i[t]}let a=0;for(let e=0;e<8;++e)i[e]>0&&++a;if(a<2)return;const c=new Array(8);for(let e=0;e<8;++e)c[e]=i[e]>0?new Uint32Array(i[e]):void 0;for(let e=0;e<8;++e)i[e]=0;for(let e=0;e<t;++e){const t=r[e];c[t][i[t]++]=this.primitiveIndices[e]}this._children=new Array;for(let e=0;e<8;++e)void 0!==c[e]&&this._children.push(new V(c[e],this._numIndexPerPrimitive,this.position));return this._children}static prune(){j.prune()}}const j=new U.A({deallocator:null});var k=r(24326);class W{constructor(e){this.id=(0,k.c)(),this._attributes=new Map;for(const[t,r]of e)this._attributes.set(t,{...r,indices:(0,P.Dg)(r.indices)})}get attributes(){return this._attributes}}var $=r(4341),Z=r(11964);function q(e,t,r){return(0,h.Re)(Y,t,e),(0,h.Re)(X,r,e),.5*(0,h.Bw)((0,h.$A)(Y,Y,X))}r(32114),new $.I(Z.vt),new $.I(()=>{return e?{p0:(0,d.o8)(e.p0),p1:(0,d.o8)(e.p1),p2:(0,d.o8)(e.p2)}:{p0:(0,d.vt)(),p1:(0,d.vt)(),p2:(0,d.vt)()};var e});const Y=(0,d.vt)(),X=(0,d.vt)(),J=(0,d.vt)(),K=(0,d.vt)(),Q=(0,d.vt)(),ee=(0,d.vt)();class te{constructor(){this.uid=(0,k.c)()}}class re extends te{constructor(e){super(),this.highlightName=e,this.channel=0}}var ie=r(94656);class ne extends W{constructor(e,t,r=null,i=0,n=null,o=-1,s,a){super(t),this.material=e,this.mapPositions=r,this.type=i,this.olidColor=n,this.edgeIndicesLength=o,this.baseGeometry=s,this.drawIndices=a,this._vertexPositionIndicesCache=void 0,this._highlights=null,this._highlightOptionsCounts=null,this.visible=!0,this._boundingInfo=null,(0,G.vA)((e?.useIndexing??!1)===(null!=a),"Material index requirement and Geometry must match");const c=this.positionAttribute;null!=c&&this.edgeIndicesLength<0&&(this.edgeIndicesLength=c.indices.length)}instantiate(e={}){const t=new ne(e.material||this.material,[],this.mapPositions,this.type,this.olidColor,this.edgeIndicesLength,this.baseGeometry,this.drawIndices);return this._attributes.forEach((e,r)=>{e.exclusive=!1,t._attributes.set(r,e)}),t._boundingInfo=this._boundingInfo,t.transformation=e.transformation||this.transformation,t}getMutableAttribute(e){let t=this._attributes.get(e);return t&&!t.exclusive&&(t={...t,exclusive:!0,data:z(t.data)},this._attributes.set(e,t)),t}setAttributeData(e,t){const r=this._attributes.get(e);r?this._attributes.set(e,{...r,exclusive:!0,data:t}):(0,ie.en)()&&console.warn(`Setting undefined attribute ${e} data`)}get primitivePositionIndices(){if(void 0!==this._vertexPositionIndicesCache)return this._vertexPositionIndicesCache;const{drawIndices:e}=this,t=this.positionAttribute;if(null!=e&&null!=t){const r=new Array;for(const i of e)r.push(t.indices[i]);this._vertexPositionIndicesCache=r}else this._vertexPositionIndicesCache=t?.indices??null;return this._vertexPositionIndicesCache}get positionAttribute(){return this.attributes.get("position")??this.baseGeometry?.attributes.get("position")}get indexCount(){const e=this.drawIndices??this.positionAttribute?.indices;return e?.length??0}get faceCount(){return this.indexCount/3}get boundingInfo(){return this._boundingInfo??=this._calculateBoundingInfo(),this._boundingInfo}computeAttachmentOrigin(e){return!!(0===this.type?this._computeAttachmentOriginTriangles(e):2===this.type?this._computeAttachmentOriginLines(e):this._computeAttachmentOriginPoints(e))&&(null!=this._transformation&&(0,h.Z0)(e,e,this._transformation),!0)}_computeAttachmentOriginTriangles(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let o=0,s=0;for(let t=0;t<r.length-2;t+=3){const a=r[t]*i,c=r[t+1]*i,l=r[t+2]*i;(0,h.hZ)(J,n[a],n[a+1],n[a+2]),(0,h.hZ)(K,n[c],n[c+1],n[c+2]),(0,h.hZ)(Q,n[l],n[l+1],n[l+2]);const u=q(J,K,Q);u?((0,h.WQ)(J,J,K),(0,h.WQ)(J,J,Q),(0,h.hs)(J,J,1/3*u),(0,h.WQ)(e,e,J),o+=u):((0,h.WQ)(ee,ee,J),(0,h.WQ)(ee,ee,K),(0,h.WQ)(ee,ee,Q),s+=3)}return!(0===s&&0===o||(0!==o?((0,h.hs)(e,e,1/o),0):0===s||((0,h.hs)(e,ee,1/s),0)))}(e,this.positionAttribute,this.primitivePositionIndices)}_computeAttachmentOriginLines(e){const t=this.positionAttribute,r=this.primitivePositionIndices;return function(e,t,r,i=t?.indices){if(!t||!i)return!1;(0,h.hZ)(e,0,0,0),(0,h.hZ)(ee,0,0,0);let n=0,o=0;const{size:s,data:a}=t,c=i.length-1,l=c+(r?2:0);for(let t=0;t<l;t+=2){const r=t<c?t+1:0,l=i[t<c?t:c]*s,u=i[r]*s;J[0]=a[l],J[1]=a[l+1],J[2]=a[l+2],K[0]=a[u],K[1]=a[u+1],K[2]=a[u+2],(0,h.hs)(J,(0,h.WQ)(J,J,K),.5);const d=(0,h.xg)(J,K);d>0?((0,h.WQ)(e,e,(0,h.hs)(J,J,d)),n+=d):0===n&&((0,h.WQ)(ee,ee,J),o++)}return 0!==n?((0,h.hs)(e,e,1/n),!0):0!==o&&((0,h.hs)(e,ee,1/o),!0)}(e,t,function(e,t){return!(!("isClosed"in e)||!e.isClosed)&&t.indices.length>2}(this.material.parameters,t),r)}_computeAttachmentOriginPoints(e){return function(e,t,r=t?.indices){if(!t||!r)return!1;const{size:i,data:n}=t;(0,h.hZ)(e,0,0,0);let o=-1,s=0;for(let t=0;t<r.length;t++){const a=r[t]*i;o!==a&&(e[0]+=n[a],e[1]+=n[a+1],e[2]+=n[a+2],s++),o=a}return s>1&&(0,h.hs)(e,e,1/s),s>0}(e,this.positionAttribute,this.primitivePositionIndices)}invalidateBoundingInfo(){this._boundingInfo=null,this._vertexPositionIndicesCache=void 0}_calculateBoundingInfo(){const e=this.positionAttribute,t=this.primitivePositionIndices;if(!e||!t||0===t.length)return null;const r=t===e.indices?e:new H.n(e.data,t,e.size,!1,e.stride),i=0===this.type?3:1;(0,G.vA)(t.length%i===0,"Indexing error: "+t.length+" not divisible by "+i);const n=(0,P.tM)(t.length/i);return new V(n,i,r)}get transformation(){return this._transformation??l.zK}set transformation(e){this._transformation=e&&e!==l.zK?(0,l.o8)(e):null}get highlights(){return this._highlights||oe}get hasHighlights(){return(this._highlightOptionsCounts?.size??0)>0}foreachHighlightOptions(e){this._highlightOptionsCounts?.forEach((t,r)=>e(r))}allocateIdAndHighlight(e){const t=new re(e);return this.addHighlight(t)}addHighlight(e){this._ensureHighlights().add(e);const{highlightName:t}=e,r=(this._highlightOptionsCounts?.get(t)??0)+1;return this._ensureHighlightOptionsCounts().set(t,r),e}_ensureHighlights(){let e=this._highlights;return e||(e=new Set,this._highlights=e),e}_ensureHighlightOptionsCounts(){let e=this._highlightOptionsCounts;return e||(e=new Map,this._highlightOptionsCounts=e),e}removeHighlight(e){if(this._highlights?.delete(e)){const{highlightName:t}=e,r=this._highlightOptionsCounts?.get(t)??0;r<=1?this._highlightOptionsCounts?.delete(t):this._ensureHighlightOptionsCounts().set(t,r-1)}}}const oe=new Set;var se=r(65529),ae=r(97768),ce=r(84952),le=r(38969),ue=r(95117),he=r(2741);let de;var fe=r(63907),me=r(76284),pe=r(42293);let ge=null,ve=null;async function _e(){return null==ve&&(de??=(async()=>{const e=await r.e(9321).then(r.bind(r,49321)),t=await e.default({locateFile:e=>(0,he.s)(`esri/libs/basisu/${e}`)});return t.initializeBasis(),t})(),ve=de,ge=await ve),ve}function xe(e,t,r,i,n){const o=(0,pe.MW)(t?fe.CQ.COMPRESSED_RGBA8_ETC2_EAC:fe.CQ.COMPRESSED_RGB8_ETC2),s=n&&e>1?(4**e-1)/(3*4**(e-1)):1;return Math.ceil(r*i*o*s)}function ye(e){return e.getNumImages()>=1&&!e.isUASTC()}function we(e){return e.getFaces()>=1&&(e.isETC1S()||e.isUASTC())}function be(e,t,r,i,n,o,s,a){const{compressedTextureETC:c,compressedTextureS3TC:l}=e.capabilities,[u,h]=c?i?[1,fe.CQ.COMPRESSED_RGBA8_ETC2_EAC]:[0,fe.CQ.COMPRESSED_RGB8_ETC2]:l?i?[3,fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT]:[2,fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT]:[13,6408],d=t.hasMipmap?r:Math.min(1,r),f=[];for(let e=0;e<d;e++)f.push(new Uint8Array(s(e,u))),a(e,u,f[e]);return t.internalFormat=h,t.hasMipmap=f.length>1,t.samplingMode=t.hasMipmap?9987:9729,t.width=n,t.height=o,new me.A(e,t,{type:"compressed",levels:f})}const Te=()=>I.A.getLogger("esri.views.3d.webgl-engine.lib.DDSUtil");function Me(e){return e.charCodeAt(0)+(e.charCodeAt(1)<<8)+(e.charCodeAt(2)<<16)+(e.charCodeAt(3)<<24)}const Se=Me("DXT1"),Ce=Me("DXT3"),Ee=Me("DXT5");function Ae(e,t){return t=16*Math.floor(t/16),Math.min(16*Math.round(e/16),t)}function Re(e,t){const[r,i]=function({width:e,height:t},{maxPreferredTexturePixels:r,maxTextureSize:i}){const n=Math.max(e,t),o=e*t;if(n<=i&&o<=r)return[e,t];const s=Math.min(Math.sqrt(r/o),i/n);return[Ae(Math.round(e*s),i),Ae(Math.round(t*s),i)]}(e,t);return e.width===r&&e.height===i?e:Ie(e,r,i)}function Ie(e,t,r){if(e instanceof ImageData)return Ie(function(e){const t=document.createElement("canvas");t.width=e.width,t.height=e.height;const r=t.getContext("2d");if(null==r)throw new R.A("texture:context-failed","Failed to create 2d context from HTMLCanvasElement");return r.putImageData(e,0,0),t}(e),t,r);const i=document.createElement("canvas");return i.width=t,i.height=r,i.getContext("2d").drawImage(e,0,0,i.width,i.height),i}var Oe=r(67171);class Fe{constructor(e,t){this._data=e,this.id=(0,k.c)(),this.events=new se.bk,this._parameters={...De,...t},this._startPreload(e)}dispose(){this.unload(),this._data=this.update=void 0}_startPreload(e){e instanceof HTMLVideoElement?(this.update=t=>this._update(e,t),this._startPreloadVideoElement(e)):e instanceof HTMLImageElement&&this._startPreloadImageElement(e)}_startPreloadVideoElement(e){if(!((0,ce.w8)(e.src)||"auto"===e.preload&&e.crossOrigin)&&(e.preload="auto",e.crossOrigin="anonymous",e.src=e.src,e.paused&&e.autoplay)){const t=[];(0,le.i)(e,e=>t.push(e)).then(()=>{e.play()}).finally(()=>t.forEach(e=>e.remove()))}}_startPreloadImageElement(e){(0,ce.DB)(e.src)||(0,ce.w8)(e.src)||e.crossOrigin||(e.crossOrigin="anonymous",e.src=e.src)}_createDescriptor(e){const t=new Oe.R;return t.wrapMode=this._parameters.wrap??10497,t.flipped=!this._parameters.noUnpackFlip,t.samplingMode=this._parameters.mipmap?9987:9729,t.hasMipmap=!!this._parameters.mipmap,t.preMultiplyAlpha=!!this._parameters.preMultiplyAlpha,t.maxAnisotropy=this._parameters.maxAnisotropy??(this._parameters.mipmap?e.parameters.maxMaxAnisotropy:1),t.dataType=this._parameters.dataType??t.dataType,t.pixelFormat=this._parameters.pixelFormat??t.pixelFormat,t.internalFormat=this._parameters.internalFormat??t.internalFormat,t}get texture(){return this._texture??this._emptyTexture}get loaded(){return null!=this._texture}get usedMemory(){return this._texture?.usedMemory||function(e,t){if(null==e)return 0;if((0,m.mw)(e)||(0,m.mg)(e))return"image/ktx2"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.KTX2File(new Uint8Array(e)),i=we(r)?xe(r.getLevels(),r.getHasAlpha(),r.getWidth(),r.getHeight(),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):"image/x.basis"===t.encoding?function(e,t){if(null==ge)return e.byteLength;const r=new ge.BasisFile(new Uint8Array(e)),i=ye(r)?xe(r.getNumLevels(0),r.getHasAlpha(),r.getImageWidth(0,0),r.getImageHeight(0,0),t):0;return r.close(),r.delete(),i}(e,!!t.mipmap):e.byteLength;const{width:r,height:i}=e instanceof Image||e instanceof ImageData||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement?Ne(e):t,n=t.pixelFormat??6408,o=(0,pe.wH)(n);return(t.mipmap?4/3:1)*r*i*o||0}(this._data,this._parameters)}load(e){if(this._loadingPromise)return this._loadingPromise;if(this._texture)return this._texture;const t=this._data;return null==t?(this._texture=new me.A(e,this._createDescriptor(e),null),this._texture):(this._emptyTexture=e.emptyTexture,this._parameters.reloadable||(this._data=void 0),"string"==typeof t?this._loadFromURL(e,t):t instanceof Image?this._loadFromImageElement(e,t):t instanceof HTMLVideoElement?this._loadFromVideoElement(e,t):t instanceof ImageData||t instanceof HTMLCanvasElement?this._loadFromImage(e,t):(0,m.mg)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,t):(0,m.mw)(t)&&"image/vnd-ms.dds"===this._parameters.encoding?this._loadFromDDSData(e,new Uint8Array(t)):((0,m.mw)(t)||(0,m.mg)(t))&&"image/ktx2"===this._parameters.encoding?this._loadFromKTX2(e,t):((0,m.mw)(t)||(0,m.mg)(t))&&"image/x.basis"===this._parameters.encoding?this._loadFromBasis(e,t):(0,m.mw)(t)?this._loadFromPixelData(e,new Uint8Array(t)):(0,m.iu)(t)?this._loadFromPixelData(e,t):null)}_update(e,t){return null==this._texture||e.readyState<HTMLMediaElement.HAVE_CURRENT_DATA||t===e.currentTime?t:(this._texture.setData(e),this._texture.descriptor.hasMipmap&&this._texture.generateMipmap(),this._parameters.updateCallback&&this._parameters.updateCallback(),e.currentTime)}_loadFromDDSData(e,t){return this._texture=function(e,t,r){const i=function(e,t){const r=new Int32Array(e.buffer,e.byteOffset,31);if(542327876!==r[0])return Te().error("Invalid magic number in DDS header"),null;if(!(4&r[20]))return Te().error("Unsupported format, must contain a FourCC code"),null;const i=r[21];let n,o;switch(i){case Se:n=8,o=fe.CQ.COMPRESSED_RGB_S3TC_DXT1_EXT;break;case Ce:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT3_EXT;break;case Ee:n=16,o=fe.CQ.COMPRESSED_RGBA_S3TC_DXT5_EXT;break;default:return Te().error("Unsupported FourCC code:",function(e){return String.fromCharCode(255&e,e>>8&255,e>>16&255,e>>24&255)}(i)),null}let s=1,a=r[4],c=r[3];(3&a||3&c)&&(Te().warn("Rounding up compressed texture size to nearest multiple of 4."),a=a+3&-4,c=c+3&-4);const l=a,u=c;let h,d;131072&r[2]&&!1!==t&&(s=Math.max(1,r[7]));let f=e.byteOffset+r[1]+4;const m=[];for(let t=0;t<s;++t)d=(a+3>>2)*(c+3>>2)*n,h=new Uint8Array(e.buffer,f,d),m.push(h),f+=d,a=Math.max(1,a>>1),c=Math.max(1,c>>1);return{textureData:{type:"compressed",levels:m},internalFormat:o,width:l,height:u}}(r,t.hasMipmap??!1);if(null==i)throw new Error("DDS texture data is null");const{textureData:n,internalFormat:o,width:s,height:a}=i;return t.samplingMode=n.levels.length>1?9987:9729,t.hasMipmap=n.levels.length>1,t.internalFormat=o,t.width=s,t.height=a,new me.A(e,t,n)}(e,this._createDescriptor(e),t),this._emptyTexture=null,this._texture}_loadFromKTX2(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.KTX2File(new Uint8Array(r));if(!we(i))return null;i.startTranscoding();const n=be(e,t,i.getLevels(),i.getHasAlpha(),i.getWidth(),i.getHeight(),(e,t)=>i.getImageTranscodedSizeInBytes(e,0,0,t),(e,t,r)=>i.transcodeImage(r,e,0,0,t,0,-1,-1));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromBasis(e,t){return this._loadAsync(()=>async function(e,t,r){null==ge&&(ge=await _e());const i=new ge.BasisFile(new Uint8Array(r));if(!ye(i))return null;i.startTranscoding();const n=be(e,t,i.getNumLevels(0),i.getHasAlpha(),i.getImageWidth(0,0),i.getImageHeight(0,0),(e,t)=>i.getImageTranscodedSizeInBytes(0,e,t),(e,t,r)=>i.transcodeImage(r,0,e,t,0,0));return i.close(),i.delete(),n}(e,this._createDescriptor(e),t).then(e=>(this._texture=e,e)))}_loadFromPixelData(e,t){(0,G.vA)(this._parameters.width>0&&this._parameters.height>0);const r=this._createDescriptor(e);return 6407!==r.pixelFormat&&6408!==r.pixelFormat||(r.compress=this._parameters.compressionOptions),r.width=this._parameters.width??0,r.height=this._parameters.height??0,this._texture=new me.A(e,r,t),this._texture}_loadFromURL(e,t){return this._loadAsync(async r=>{const i=await B(t,{signal:r});return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromImageElement(e,t){return t.complete?this._loadFromImage(e,t):this._loadAsync(async r=>{const i=await(0,ue.y)(t,t.src,!1,r);return(0,N.Te)(r),this._loadFromImage(e,i)})}_loadFromVideoElement(e,t){return t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?this._loadFromImage(e,t):this._loadFromVideoElementAsync(e,t)}_loadFromVideoElementAsync(e,t){return this._loadAsync(r=>new Promise((i,n)=>{const o=()=>{t.removeEventListener("loadeddata",s),t.removeEventListener("error",a),(0,ae.xt)(c)},s=()=>{t.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA&&(o(),i(this._loadFromImage(e,t)))},a=e=>{o(),n(e||new R.A("texture:load-error","Failed to load video"))};t.addEventListener("loadeddata",s),t.addEventListener("error",a);const c=(0,N.u7)(r,()=>a((0,N.NK)()))}))}_loadFromImage(e,t){let r=t;r instanceof HTMLVideoElement||(r=Re(r,e.parameters));const i=Ne(r);this._parameters.width=i.width,this._parameters.height=i.height;const n=this._createDescriptor(e);return n.width=i.width,n.height=i.height,n.compress=this._parameters.compressionOptions,this._texture=new me.A(e,n,r),this._emptyTexture=null,this.events.emit("loaded"),this._texture}_loadAsync(e){const t=new AbortController;this._loadingController=t;const r=e(t.signal);this._loadingPromise=r;const i=()=>{this._loadingController===t&&(this._loadingController=null),this._loadingPromise===r&&(this._loadingPromise=null),this._emptyTexture=null};return r.then(i,i),r}unload(){if(this._texture=(0,ae.WD)(this._texture),this._emptyTexture=null,null!=this._loadingController){const e=this._loadingController;this._loadingController=null,this._loadingPromise=null,e.abort()}this.events.emit("unloaded")}get parameters(){return this._parameters}}function Ne(e){return e instanceof HTMLVideoElement?{width:e.videoWidth,height:e.videoHeight}:e}const De={wrap:{s:10497,t:10497},mipmap:!0,noUnpackFlip:!1,preMultiplyAlpha:!1};var Pe=r(49255);class Be{constructor(e){this._material=e.material,this._techniques=e.techniques}dispose(){}get _stippleTextures(){return this._techniques.context?.stippleTextures}get _markerTextures(){return this._techniques.context?.markerTextures}getTechnique(e,t){return this._techniques.get(e,this._material.getConfiguration(t))}ensureResources(e){return 2}}var He=r(65786);class Le extends Be{constructor(e){super(e),this._numLoading=0,this._disposed=!1,this._textures=e.textures,this.updateTexture(e.textureId),this._acquire(e.normalTextureId,e=>this._textureNormal=e),this._acquire(e.emissiveTextureId,e=>this._textureEmissive=e),this._acquire(e.occlusionTextureId,e=>this._textureOcclusion=e),this._acquire(e.metallicRoughnessTextureId,e=>this._textureMetallicRoughness=e)}dispose(){super.dispose(),this._texture=(0,ae.Gz)(this._texture),this._textureNormal=(0,ae.Gz)(this._textureNormal),this._textureEmissive=(0,ae.Gz)(this._textureEmissive),this._textureOcclusion=(0,ae.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,ae.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new Ue(this._texture?.texture??null,this._textureNormal?.texture??null,this._textureEmissive?.texture??null,this._textureOcclusion?.texture??null,this._textureMetallicRoughness?.texture??null)}updateTexture(e){null!=this._texture&&e===this._texture.id||(this._texture=(0,ae.Gz)(this._texture),this._acquire(e,e=>this._texture=e))}_acquire(e,t){if(null==e)return void t(null);const r=this._textures.acquire(e);if((0,N.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,ae.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class ze extends He.Y{constructor(e=null){super(),this.textureEmissive=e}}class Ue extends ze{constructor(e,t,r,i,n,o,s){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=i,this.textureMetallicRoughness=n,this.scale=o,this.normalTextureTransformMatrix=s}}var Ge=r(19245);class Ve{constructor(e,t){this.id=(0,k.c)(),this.supportsEdges=!1,this._renderPriority=0,this._parameters=new t,(0,Ge.MB)(this._parameters,e),this.validateParameters(this._parameters)}get useIndexing(){return this.parameters.useIndexing??!1}get parameters(){return this._parameters}update(e){return!1}setParameters(e,t=!0){(0,Ge.MB)(this._parameters,e)&&(this.validateParameters(this._parameters),t&&this._parametersChanged())}validateParameters(e){}shouldRender(e){return this.visible&&this.isVisibleForOutput(e.output)&&(!this.parameters.isDecoration||e.bind.decorations)&&0!==(this.parameters.renderOccluded&e.renderOccludedMask)}isVisibleForOutput(e){return!0}get renderPriority(){return this._renderPriority}set renderPriority(e){e!==this._renderPriority&&(this._renderPriority=e,this._parametersChanged())}_parametersChanged(){this.repository?.materialChanged(this)}get renderOccludedFlags(){return this.visible?this.parameters.renderOccluded:0}get testsTransparentRenderOrder(){return this.parameters.testsTransparentRenderOrder}get hasEmissions(){return!1}getConfiguration(e){return this.updateConfiguration(e),this._configuration}updateConfiguration(e){this._configuration.output=e.output,this._configuration.hasEmission=e.hasEmission&&(0,Pe._o)(e.output),this._configuration.hasHighlightMixTexture=10===e.output&&null!=e.highlightMixTexture,this._configuration.useFloatBlend=e.useFloatBlend.value}}He.Y;class je{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const ke=(0,f.vt)();function We(e,t,r,i,n,o){if(!e.visible)return;const s=(0,h.jb)(nt,i,r),{tolerance:a}=t,c=new je(a,!1,t.options.normalRequired);if(e.boundingInfo)(0,G.vA)(0===e.type),Ze(e.boundingInfo,r,s,a,n,c,o);else{const t=e.positionAttribute,i=e.primitivePositionIndices;!function(e,t,r,i,n,o,s,a,c,l){const u=t,d=ot,f=Math.abs(u[0]),m=Math.abs(u[1]),p=Math.abs(u[2]),g=f>=m?f>=p?0:2:m>=p?1:2,v=g,_=u[v]<0?2:1,x=(g+_)%3,y=(g+(3-_))%3,w=u[x]/u[v],b=u[y]/u[v],T=1/u[v],M=Ye,S=Xe,C=Je,{normalRequired:E}=c;for(let t=r;t<i;++t){const r=3*t,i=s*n[r];(0,h.hZ)(d[0],o[i+0],o[i+1],o[i+2]);const c=s*n[r+1];(0,h.hZ)(d[1],o[c+0],o[c+1],o[c+2]);const u=s*n[r+2];(0,h.hZ)(d[2],o[u+0],o[u+1],o[u+2]),a&&((0,h.C)(d[0],a.applyToVertex(d[0][0],d[0][1],d[0][2],t)),(0,h.C)(d[1],a.applyToVertex(d[1][0],d[1][1],d[1][2],t)),(0,h.C)(d[2],a.applyToVertex(d[2][0],d[2][1],d[2][2],t))),(0,h.jb)(M,d[0],e),(0,h.jb)(S,d[1],e),(0,h.jb)(C,d[2],e);const f=M[x]-w*M[v],m=M[y]-b*M[v],p=S[x]-w*S[v],g=S[y]-b*S[v],_=C[x]-w*C[v],A=C[y]-b*C[v],R=_*g-A*p,I=f*A-m*_,O=p*m-g*f;if((R<0||I<0||O<0)&&(R>0||I>0||O>0))continue;const F=R+I+O;if(0===F)continue;const N=R*(T*M[v])+I*(T*S[v])+O*(T*C[v]);if(N*Math.sign(F)<0)continue;const D=N/F;D>=0&&l(D,E?Qe(d):null,t)}}(r,s,0,i.length/3,i,t.data,t.stride,n,c,o)}}const $e=(0,d.vt)();function Ze(e,t,r,i,n,o,s){if(null==e)return;const a=function(e,t){return(0,h.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,$e);if((0,f.Ne)(ke,e.bbMin),(0,f.vI)(ke,e.bbMax),null!=n&&n.applyToAabb(ke),function(e,t,r,i){return function(e,t,r,i){const n=(e[0]-i-t[0])*r[0],o=(e[3]+i-t[0])*r[0];let s=Math.min(n,o),a=Math.max(n,o);const c=(e[1]-i-t[1])*r[1],l=(e[4]+i-t[1])*r[1];if(a=Math.min(a,Math.max(c,l)),a<0)return!1;if(s=Math.max(s,Math.min(c,l)),s>a)return!1;const u=(e[2]-i-t[2])*r[2],h=(e[5]+i-t[2])*r[2];return a=Math.min(a,Math.max(u,h)),!(a<0)&&(s=Math.max(s,Math.min(u,h)),!(s>a)&&s<1/0)}(e,t,r,i)}(ke,t,a,i)){const{primitiveIndices:a,position:c}=e,l=a?a.length:c.indices.length/3;if(l>rt){const a=e.getChildren();if(void 0!==a){for(const e of a)Ze(e,t,r,i,n,o,s);return}}!function(e,t,r,i,n,o,s,a,c,l,u){const h=e[0],d=e[1],f=e[2],m=t[0],p=t[1],g=t[2],{normalRequired:v}=l;for(let e=0;e<i;++e){const t=a[e],r=3*t,i=s*n[r];let l=o[i],_=o[i+1],x=o[i+2];const y=s*n[r+1];let w=o[y],b=o[y+1],T=o[y+2];const M=s*n[r+2];let S=o[M],C=o[M+1],E=o[M+2];null!=c&&([l,_,x]=c.applyToVertex(l,_,x,e),[w,b,T]=c.applyToVertex(w,b,T,e),[S,C,E]=c.applyToVertex(S,C,E,e));const A=w-l,R=b-_,I=T-x,O=S-l,F=C-_,N=E-x,D=p*N-F*g,P=g*O-N*m,B=m*F-O*p,H=A*D+R*P+I*B;if(Math.abs(H)<=it)continue;const L=h-l,z=d-_,U=f-x,G=L*D+z*P+U*B;if(H>0){if(G<0||G>H)continue}else if(G>0||G<H)continue;const V=z*I-R*U,j=U*A-I*L,k=L*R-A*z,W=m*V+p*j+g*k;if(H>0){if(W<0||G+W>H)continue}else if(W>0||G+W<H)continue;const $=(O*V+F*j+N*k)/H;$>=0&&u($,v?Ke(A,R,I,O,F,N,qe):null,t)}}(t,r,0,l,c.indices,c.data,c.stride,a,n,o,s)}}const qe=(0,d.vt)();const Ye=(0,d.vt)(),Xe=(0,d.vt)(),Je=(0,d.vt)();function Ke(e,t,r,i,n,o,s){return(0,h.hZ)(et,e,t,r),(0,h.hZ)(tt,i,n,o),(0,h.$A)(s,et,tt),(0,h.S8)(s,s),s}function Qe(e){return(0,h.jb)(et,e[1],e[0]),(0,h.jb)(tt,e[2],e[0]),(0,h.$A)(qe,et,tt),(0,h.S8)(qe,qe),qe}const et=(0,d.vt)(),tt=(0,d.vt)(),rt=1e3,it=1e-7,nt=(0,d.vt)(),ot=[(0,d.vt)(),(0,d.vt)(),(0,d.vt)()];var st=r(16396);function at(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length;r*=s;for(let e=0;e<a;++e){const t=2*n[e];o[r]=i[t],o[r+1]=i[t+1],r+=s}}function ct(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=3*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}else for(let e=0;e<c;++e){const t=3*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],r+=a}}function lt(e,t,r,i=1){const{data:n,indices:o}=e,s=t.typedBuffer,a=t.typedBufferStride,c=o.length;if(r*=a,1===i)for(let e=0;e<c;++e){const t=4*o[e];s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}else for(let e=0;e<c;++e){const t=4*o[e];for(let e=0;e<i;++e)s[r]=n[t],s[r+1]=n[t+1],s[r+2]=n[t+2],s[r+3]=n[t+3],r+=a}}function ut(e,t,r,i,n=1){const o=t.typedBuffer,s=t.typedBufferStride;if(i*=s,1===n)for(let t=0;t<r;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s;else for(let t=0;t<r;++t)for(let t=0;t<n;++t)o[i]=e[0],o[i+1]=e[1],o[i+2]=e[2],o[i+3]=e[3],i+=s}function ht(e,t,r,i,n,o){switch(e){case"position":{(0,G.vA)(3===t.size);const i=n.getField(e,g.xs);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=r.typedBuffer,l=r.typedBufferStride,u=s.length,h=t[0],d=t[1],f=t[2],m=t[4],p=t[5],g=t[6],v=t[8],_=t[9],x=t[10],y=t[12],w=t[13],b=t[14];i*=l;let T=0,M=0,S=0;const C=(0,c.tZ)(t)?e=>{T=o[e]+y,M=o[e+1]+w,S=o[e+2]+b}:e=>{const t=o[e],r=o[e+1],i=o[e+2];T=h*t+m*r+v*i+y,M=d*t+p*r+_*i+w,S=f*t+g*r+x*i+b};if(1===n)for(let e=0;e<u;++e)C(3*s[e]),a[i]=T,a[i+1]=M,a[i+2]=S,i+=l;else for(let e=0;e<u;++e){C(3*s[e]);for(let e=0;e<n;++e)a[i]=T,a[i+1]=M,a[i+2]=S,i+=l}}(t,r,i,o);break}case"normal":{(0,G.vA)(3===t.size);const r=n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void ct(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;i*=u;let M=0,S=0,C=0;const E=(0,c.tZ)(a)?e=>{M=o[e],S=o[e+1],C=o[e+2]}:e=>{const t=o[e],r=o[e+1],i=o[e+2];M=d*t+p*r+_*i,S=f*t+g*r+x*i,C=m*t+v*r+y*i};if(1===n)if(w)for(let e=0;e<h;++e){E(3*s[e]);const t=M*M+S*S+C*C;if(t<T&&t>b){const e=1/Math.sqrt(t);l[i]=M*e,l[i+1]=S*e,l[i+2]=C*e}else l[i]=M,l[i+1]=S,l[i+2]=C;i+=u}else for(let e=0;e<h;++e)E(3*s[e]),l[i]=M,l[i+1]=S,l[i+2]=C,i+=u;else for(let e=0;e<h;++e){if(E(3*s[e]),w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,i+=u}}(t,i,r,o);break}case"normalCompressed":case"profileRight":case"profileUp":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uv0":{(0,G.vA)(2===t.size);const r=n.getField(e,g.ZD)??n.getField(e,g.gH);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"uvi":{(0,G.vA)(2===t.size);const r=n.getField(e,g.mJ);(0,G.vA)(!!r,`No buffer view for ${e}`),at(t,r,o);break}case"color":case"symbolColor":{const r=n.getField(e,g.XP);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(3===t.size||4===t.size),function(e,t,r,i,n=1){const{data:o,indices:s}=e,a=r.typedBuffer,c=r.typedBufferStride,l=s.length;if(i*=c,t===o.length&&4===t){a[i]=o[0],a[i+1]=o[1],a[i+2]=o[2],a[i+3]=o[3];const e=new Uint32Array(r.typedBuffer.buffer,r.start),t=c/4,s=e[i/=4];i+=t;const u=l*n;for(let r=1;r<u;++r)e[i]=s,i+=t;return}if(1!==n)if(4!==t)for(let e=0;e<l;++e){const t=3*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}else for(let e=0;e<l;++e){const t=4*s[e];for(let e=0;e<n;++e)a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}else{if(4===t){for(let e=0;e<l;++e){const t=4*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=o[t+3],i+=c}return}for(let e=0;e<l;++e){const t=3*s[e];a[i]=o[t],a[i+1]=o[t+1],a[i+2]=o[t+2],a[i+3]=255,i+=c}}}(t,t.size,r,o);break}case"colorFeatureAttribute":case"opacityFeatureAttribute":case"sizeFeatureAttribute":{const r=n.getField(e,g.Y$)??n.getField(e,g.Y$);(0,G.vA)(!!r,`No buffer view for ${e}`),(0,G.vA)(1===t.size),function(e,t,r){const{data:i,indices:n}=e,o=t.typedBuffer,s=t.typedBufferStride,a=n.length,c=i[0];r*=s;for(let e=0;e<a;++e)o[r]=c,r+=s}(t,r,o);break}case"tangent":{(0,G.vA)(4===t.size);const i=n.getField(e,g.Eq);(0,G.vA)(!!i,`No buffer view for ${e}`),function(e,t,r,i,n=1){if(!t)return void lt(e,r,i,n);const{data:o,indices:s}=e,a=t,l=r.typedBuffer,u=r.typedBufferStride,h=s.length,d=a[0],f=a[1],m=a[2],p=a[4],g=a[5],v=a[6],_=a[8],x=a[9],y=a[10],w=!(0,c.ut)(a),b=1e-6,T=1-b;if(i*=u,1===n)for(let e=0;e<h;++e){const t=4*s[e],r=o[t],n=o[t+1],a=o[t+2],c=o[t+3];let h=d*r+p*n+_*a,M=f*r+g*n+x*a,S=m*r+v*n+y*a;if(w){const e=h*h+M*M+S*S;if(e<T&&e>b){const t=1/Math.sqrt(e);h*=t,M*=t,S*=t}}l[i]=h,l[i+1]=M,l[i+2]=S,l[i+3]=c,i+=u}else for(let e=0;e<h;++e){const t=4*s[e],r=o[t],a=o[t+1],c=o[t+2],h=o[t+3];let M=d*r+p*a+_*c,S=f*r+g*a+x*c,C=m*r+v*a+y*c;if(w){const e=M*M+S*S+C*C;if(e<T&&e>b){const t=1/Math.sqrt(e);M*=t,S*=t,C*=t}}for(let e=0;e<n;++e)l[i]=M,l[i+1]=S,l[i+2]=C,l[i+3]=h,i+=u}}(t,r,i,o);break}case"profileVertexAndNormal":{(0,G.vA)(4===t.size);const r=n.getField(e,g.jz)??n.getField(e,g.Eq);(0,G.vA)(!!r,`No buffer view for ${e}`),lt(t,r,o);break}case"profileAuxData":{(0,G.vA)(3===t.size);const r=n.getField(e,g.EC)??n.getField(e,g.xs);(0,G.vA)(!!r,`No buffer view for ${e}`),ct(t,r,o);break}}}(0,d.vt)();class dt{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,i,n,o){return function(e,t,r,i,n,o,s){let a={numItems:0,numVerticesPerItem:0};for(const c of r.fields.keys()){const r=e.get(c),l=r?.indices;if(r&&l)"position"===c&&(a={numItems:1,numVerticesPerItem:l.length}),ht(c,r,i,n,o,s);else if("olidColor"===c&&null!=t){const r=e.get("position")?.indices;if(r){const e=r.length;ut(t,o.getField(c,g.XP),e,s)}}}return a}(r,i,this.layout,e,t,n,o)}}const ft={factor:1,units:1},mt={factor:-1,units:-2},pt=new Array;pt[0]=null,pt[1]=ft,pt[2]={factor:-5,units:-5},pt[3]={factor:0,units:-4},pt[4]={factor:1,units:2};const gt=pt.map(e=>function(e,t){return t?{factor:e.factor+t.factor,units:e.units+t.units}:e}(mt,e));function vt({output:e,enableOITOffset:t,polygonOffset:r}){return(0,Pe.Sp)(e)&&t?gt[r]:pt[r]}pt[1]=ft;const _t=(0,d.vt)();var xt=r(5482),yt=r(91429),wt=r(91829),bt=r(4431),Tt=r(1843),Mt=r(72824),St=r(13840),Ct=r(42958),Et=r(16943),At=r(90644);const Rt=(0,At.p3)(1,0,1,771);function It(e,t=!1){switch(e){case 0:return t?At.RC:At.T8;case 1:return Rt;default:return null}}function Ot(e){if(e.draped)return null;switch(e.output){case 0:case 2:default:return e.writeDepth?At.Uy:null;case 1:return null}}function Ft(e,t=513){return{func:(0,Pe.Sp)(e)?515:t}}const Nt={mask:255},Dt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:0}},Pt={function:{func:519,ref:2,mask:2},operation:{fail:7680,zFail:7680,zPass:7681}};var Bt=r(4576);r(66289);var Ht=r(69622),Lt=r(32728);class zt{constructor(e){this.localTransform=e.localTransform,this.globalTransform=e.globalTransform,this.modelOrigin=e.modelOrigin,this.model=e.instanceModel,this.modelNormal=e.instanceModelNormal,this.modelScaleFactors=e.modelScaleFactors,this.boundingSphere=e.boundingSphere,this.featureAttribute=e.getField("instanceFeatureAttribute",g.Eq),this.color=e.getField("instanceColor",g.XP),this.olidColor=e.getField("instanceOlidColor",g.XP),this.state=e.getField("state",g.SL),this.lodLevel=e.getField("lodLevel",g.SL)}}let Ut=class extends Ht.A{constructor(e,t){super(e),this.events=new se.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return Vt(Gt.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Zt,this._buffer=this._layout.createBuffer(this._capacity),this._view=new zt(this._buffer)}get capacity(){return this._capacity}get size(){return this._size}get view(){return this._view}addInstance(){this._size+1>this._capacity&&this._grow();const e=this._findSlot();return this._view.state.set(e,1),this._size++,this.events.emit("instances-changed"),e}removeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),this._getStateFlag(e,18)?this._setStateFlags(e,32):this.freeInstance(e),this.events.emit("instances-changed")}freeInstance(e){const t=this._view.state;(0,G.vA)(e>=0&&e<this._capacity&&!!(1&t.get(e)),"invalid instance handle"),t.set(e,0),this._size--}setLocalTransform(e,t,r=!0){this._view.localTransform.setMat(e,t),r&&this.updateModelTransform(e)}getLocalTransform(e,t){this._view.localTransform.getMat(e,t)}setGlobalTransform(e,t,r=!0){this._view.globalTransform.setMat(e,t),r&&this.updateModelTransform(e)}getGlobalTransform(e,t){this._view.globalTransform.getMat(e,t)}updateModelTransform(e){const t=this._view,r=jt,i=kt;t.localTransform.getMat(e,Wt),t.globalTransform.getMat(e,$t);const n=(0,c.lw)($t,$t,Wt);(0,h.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,s.z0)(i,n),t.model.setMat(e,i);const o=(0,Lt.wp)(jt,n);o.sort(),t.modelScaleFactors.set(e,0,o[1]),t.modelScaleFactors.set(e,1,o[2]),(0,s.B8)(i,i),(0,s.mg)(i,i),t.modelNormal.setMat(e,i),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,kt),r.modelOrigin.getVec(e,jt),t[0]=kt[0],t[1]=kt[1],t[2]=kt[2],t[3]=0,t[4]=kt[3],t[5]=kt[4],t[6]=kt[5],t[7]=0,t[8]=kt[6],t[9]=kt[7],t[10]=kt[8],t[11]=0,t[12]=jt[0],t[13]=jt[1],t[14]=jt[2],t[15]=1}applyShaderTransformation(e,t){null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedModelTransform(e,t){return this.getModelTransform(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t),t}getCombinedLocalTransform(e,t){this._view.localTransform.getMat(e,t),null!=this.shaderTransformation&&this.shaderTransformation.applyTransform(this,e,t)}getCombinedMaxScaleFactor(e){let t=this._view.modelScaleFactors.get(e,1);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=Math.max(jt[0],jt[1],jt[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(jt,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(jt[0],jt[1],jt[2])),t}getModel(e,t){this._view.model.getMat(e,t)}setFeatureAttribute(e,t){this._view.featureAttribute?.setVec(e,t)}getFeatureAttribute(e,t){this._view.featureAttribute?.getVec(e,t)}setColor(e,t){this._view.color?.setVec(e,t)}setObjectAndLayerIdColor(e,t){this._view.olidColor?.setVec(e,t)}setVisible(e,t){t!==this.getVisible(e)&&(this._setStateFlag(e,4,t),this.events.emit("instance-visibility-changed",{index:e}))}getVisible(e){return this._getStateFlag(e,4)}setHighlight(e,t){const{_highlightOptionsMap:r}=this,i=r.get(e);t?t!==i&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):i&&(r.delete(e),this._setStateFlag(e,8,!1),this.events.emit("instance-highlight-changed"))}get highlightOptionsMap(){return this._highlightOptionsMap}getHighlightStateFlag(e){return this._getStateFlag(e,8)}geHighlightOptionsPrev(e){const t=this._highlightOptionsMapPrev.get(e)??null;return this._highlightOptionsMapPrev.delete(e),t}getHighlightName(e){const t=this.highlightOptionsMap.get(e)??null;return t?this._highlightOptionsMapPrev.set(e,t):this._highlightOptionsMapPrev.delete(e),t}getState(e){return this._view.state.get(e)}getLodLevel(e){return this._view.lodLevel.get(e)}countFlags(e){let t=0;for(let r=0;r<this._capacity;++r)this.getState(r)&e&&++t;return t}_setStateFlags(e,t){const r=this._view.state;t=r.get(e)|t,r.set(e,t)}_clearStateFlags(e,t){const r=this._view.state;t=r.get(e)&~t,r.set(e,t)}_setStateFlag(e,t,r){r?this._setStateFlags(e,t):this._clearStateFlags(e,t)}_getStateFlag(e,t){return!!(this._view.state.get(e)&t)}_grow(){this._capacity=Math.max(Zt,Math.floor(this._capacity*Bt.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new zt(this._buffer)}_findSlot(){const e=this._view.state;let t=this._next;for(;1&e.get(t);)t=t+1===this._capacity?0:t+1;return this._next=t+1===this._capacity?0:t+1,t}};(0,xt.Cg)([(0,yt.MZ)({constructOnly:!0})],Ut.prototype,"shaderTransformation",void 0),(0,xt.Cg)([(0,yt.MZ)()],Ut.prototype,"_size",void 0),(0,xt.Cg)([(0,yt.MZ)({readOnly:!0})],Ut.prototype,"size",null),Ut=(0,xt.Cg)([(0,yt.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ut);const Gt=(0,Tt.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function Vt(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Et.E)()&&e.vec4u8("instanceOlidColor"),e}const jt=(0,d.vt)(),kt=(0,a.vt)(),Wt=(0,l.vt)(),$t=(0,l.vt)(),Zt=64,qt=(0,Tt.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Yt=r(74810),Xt=r(28491),Jt=r(49788);class Kt extends Mt.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Yt.mb,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.doubleSided=!1,this.doubleSidedType="normal",this.cullFace=2,this.instanced=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.instanceColorEncodesAlphaIgnore=!1,this.emissiveStrengthFromSymbol=0,this.emissiveStrengthKHR=1,this.emissiveSource=1,this.emissiveBaseColor=d.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,d.CN)(.2,.2,.2),this.diffuse=(0,d.CN)(.8,.8,.8),this.externalColor=(0,wt.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,d.vt)(),this.hasSlicePlane=!1,this.offsetTransparentBackfaces=!1,this.vvSize=null,this.vvColor=null,this.vvOpacity=null,this.modelTransformation=null,this.drivenOpacity=!1,this.writeDepth=!0,this.customDepthTest=0,this.textureAlphaMode=0,this.textureAlphaCutoff=Jt.Q,this.textureAlphaPremultiplied=!1,this.renderOccluded=1,this.testsTransparentRenderOrder=0,this.isDecoration=!1}get hasVVSize(){return!!this.vvSize}get hasVVColor(){return!!this.vvColor}get hasVVOpacity(){return!!this.vvOpacity}}Mt.gy;let Qt=class extends Ct.w{constructor(e,t){let i=(0,bt.U)(rr(t));t.instanced&&t.instancedDoublePrecision&&(i=i.concat((0,bt.U)(function(e){return Vt(qt.clone(),e)}(t)))),super(e,t,i),this.shader=new St.r(Xt.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:i,cullFace:n,customDepthTest:o,hasOccludees:s}=e;return(0,At.Ey)({blending:i?It(r):null,culling:tr(e)?(0,At.Xt)(n):null,depthTest:Ft(r,er(o)),depthWrite:Ot(e),colorWrite:At.kn,stencilWrite:s?Nt:null,stencilTest:s?t?Pt:Dt:null,polygonOffset:vt(e)})}initializePipeline(e){return this._occludeePipelineState=this._makePipeline(e,!0),this._makePipeline(e,!1)}getPipeline(e,t){return t?this._occludeePipelineState:super.getPipeline(e)}};function er(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function tr(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function rr(e){const t=(0,Tt.BP)().vec3f("position");return 1===e.normalType?t.vec2i16("normalCompressed",{glNormalized:!0}):t.vec3f("normal"),e.hasVertexTangents&&t.vec4f("tangent"),e.hasTextures&&t.vec2f16("uv0"),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),e.hasSymbolColors&&t.vec4u8("symbolColor"),!e.instanced&&(0,Et.E)()&&t.vec4u8("olidColor"),t}Qt=(0,xt.Cg)([(0,yt.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Qt);var ir=r(51976),nr=r(68317);class or extends nr.Hz{constructor(){super(...arguments),this.hasHighlightMixTexture=!1,this.bindType=1,this.instanced=!1,this.writeDepth=!0,this.oitPremultipliedAlpha=!1}}(0,xt.Cg)([(0,ir.W)()],or.prototype,"hasHighlightMixTexture",void 0);class sr extends or{constructor(){super(...arguments),this.polygonOffset=0,this.transparent=!1,this.enableOITOffset=!0}}(0,xt.Cg)([(0,ir.W)({count:5})],sr.prototype,"polygonOffset",void 0),(0,xt.Cg)([(0,ir.W)()],sr.prototype,"transparent",void 0),(0,xt.Cg)([(0,ir.W)()],sr.prototype,"enableOITOffset",void 0);class ar extends sr{constructor(e){super(),this.spherical=e,this.alphaDiscardMode=1,this.doubleSidedMode=0,this.pbrMode=0,this.cullFace=0,this.normalType=0,this.customDepthTest=0,this.emissionSource=0,this.hasVertexColors=!1,this.hasSymbolColors=!1,this.hasVerticalOffset=!1,this.hasColorTexture=!1,this.hasMetallicRoughnessTexture=!1,this.hasOcclusionTexture=!1,this.hasNormalTexture=!1,this.hasScreenSizePerspective=!1,this.hasVertexTangents=!1,this.hasOccludees=!1,this.instanced=!1,this.instancedDoublePrecision=!1,this.hasModelTransformation=!1,this.offsetBackfaces=!1,this.hasVVSize=!1,this.hasVVColor=!1,this.receiveShadows=!1,this.receiveAmbientOcclusion=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,this.terrainDepthTest=!1,this.cullAboveTerrain=!1,this.snowCover=!1,this.hasColorTextureTransform=!1,this.hasEmissionTextureTransform=!1,this.hasNormalTextureTransform=!1,this.hasOcclusionTextureTransform=!1,this.hasMetallicRoughnessTextureTransform=!1,this.useCustomDTRExponentForWater=!1,this.useFillLights=!0,this.draped=!1}get textureCoordinateType(){return this.hasTextures?1:0}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}get hasVVInstancing(){return this.instanced}get discardInvisibleFragments(){return this.transparent}}(0,xt.Cg)([(0,ir.W)({count:4})],ar.prototype,"alphaDiscardMode",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"doubleSidedMode",void 0),(0,xt.Cg)([(0,ir.W)({count:7})],ar.prototype,"pbrMode",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"cullFace",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"normalType",void 0),(0,xt.Cg)([(0,ir.W)({count:3})],ar.prototype,"customDepthTest",void 0),(0,xt.Cg)([(0,ir.W)({count:8})],ar.prototype,"emissionSource",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVertexColors",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasSymbolColors",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVerticalOffset",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasColorTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasMetallicRoughnessTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasOcclusionTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasNormalTexture",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasScreenSizePerspective",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVertexTangents",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasOccludees",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instanced",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instancedDoublePrecision",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasModelTransformation",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"offsetBackfaces",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVVSize",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasVVColor",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"receiveShadows",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"receiveAmbientOcclusion",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"textureAlphaPremultiplied",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instancedFeatureAttribute",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"instancedColor",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"writeDepth",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"terrainDepthTest",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"cullAboveTerrain",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"snowCover",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasColorTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasEmissionTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasNormalTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasOcclusionTextureTransform",void 0),(0,xt.Cg)([(0,ir.W)()],ar.prototype,"hasMetallicRoughnessTextureTransform",void 0);var cr=r(57323);let lr=class extends Qt{constructor(){super(...arguments),this.shader=new St.r(cr.R,()=>r.e(2314).then(r.bind(r,39933)))}};lr=(0,xt.Cg)([(0,yt.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],lr);class ur extends Ve{constructor(e,t){super(e,dr),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&!this.transparent],[4,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&this.parameters.writeDepth],[9,e=>((0,Pe.iq)(e)||(0,Pe.yT)(e))&&this.transparent&&!this.parameters.writeDepth]]),this._layout=rr(this.parameters),this._configuration=new ar(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:i}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(i[3])?1:i[3])>=Jt.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,h.t2)(this.parameters.emissiveBaseColor,d.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)}updateConfiguration(e){super.updateConfiguration(e);const{parameters:t,_configuration:r}=this;r.hasNormalTexture=t.hasNormalTexture,r.hasColorTexture=t.hasColorTexture,r.hasMetallicRoughnessTexture=t.hasMetallicRoughnessTexture,r.hasOcclusionTexture=t.hasOcclusionTexture;const{treeRendering:i,doubleSided:n,doubleSidedType:o}=t;r.hasVertexTangents=!i&&t.hasVertexTangents,r.instanced=t.instanced,r.instancedDoublePrecision=t.instancedDoublePrecision,r.hasVVColor=!!t.vvColor,r.hasVVSize=!!t.vvSize,r.hasVerticalOffset=null!=t.verticalOffset,r.hasScreenSizePerspective=null!=t.screenSizePerspective,r.hasSlicePlane=t.hasSlicePlane,r.alphaDiscardMode=t.textureAlphaMode,r.normalType=i?0:t.normalType,r.transparent=this.transparent,r.enableOITOffset=e.enableOITOffset,r.writeDepth=t.writeDepth,r.customDepthTest=t.customDepthTest??0,r.hasOccludees=e.hasOccludees,r.cullFace=t.hasSlicePlane?0:t.cullFace,r.cullAboveTerrain=e.cullAboveTerrain,r.hasModelTransformation=!i&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=i?2:n&&"normal"===o?1:n&&"winding-order"===o?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,Pe._o)(e.output)?(r.terrainDepthTest=e.terrainDepthTest,r.receiveShadows=t.receiveShadows,r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao):(r.terrainDepthTest=!1,r.receiveShadows=r.receiveAmbientOcclusion=!1),r.textureAlphaPremultiplied=!!t.textureAlphaPremultiplied,r.pbrMode=t.usePBR?t.isSchematic?2:1:0,r.emissionSource=t.emissionSource,r.offsetBackfaces=!(!this.transparent||!t.offsetTransparentBackfaces),r.snowCover=e.snowCover>0,r.hasColorTextureTransform=!!t.colorTextureTransformMatrix,r.hasNormalTextureTransform=!!t.normalTextureTransformMatrix,r.hasEmissionTextureTransform=!!t.emissiveTextureTransformMatrix,r.hasOcclusionTextureTransform=!!t.occlusionTextureTransformMatrix,r.hasMetallicRoughnessTextureTransform=!!t.metallicRoughnessTextureTransformMatrix}intersect(e,t,r,i,n,o){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,h.hZ)(_r,t[12],t[13],t[14]);let o=null;switch(r.viewingMode){case 1:o=(0,h.S8)(gr,_r);break;case 2:o=(0,h.C)(gr,pr)}const s=(0,h.Re)(xr,_r,e.eye),a=(0,h.Bw)(s),c=(0,h.hs)(s,s,1/a);let l=null;this.parameters.screenSizePerspective&&(l=(0,h.Om)(o,c));const u=(0,Ge.kE)(e,a,this.parameters.verticalOffset,l??0,this.parameters.screenSizePerspective,null);(0,h.hs)(o,o,u),(0,h.ei)(vr,o,r.transform.inverseRotation),i=(0,h.Re)(fr,i,vr),n=(0,h.Re)(mr,n,vr)}o=function(e,t,r,i){const n=vt(t);if(!n)return e;const o=5e-6*n.units,s=(0,h.S8)(_t,(0,h.jb)(_t,i,r));return(t,r,i)=>{const a=(r?1-Math.abs((0,h.Om)(s,r)):0)*n.factor*5e-5+o;return e(t+a,r,i)}}(o,this._configuration,i,n),We(e,r,i,n,(0,st.ou)(r.verticalOffset),o)}createGLMaterial(e){return new hr(e)}createBufferWriter(){return new dt(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:i,layerOpacity:n,texture:o,textureId:s,textureAlphaMode:a,colorMixMode:c}=e,l=i[3];return t||r<1&&"replace"!==c||l<1&&"ignore"!==c||n<1||(null!=o||null!=s)&&1!==a&&2!==a&&"replace"!==c}(this.parameters)}}class hr extends Le{constructor(e){super({...e,...e.material.parameters})}beginSlot(e){this._material.setParameters({receiveShadows:e.shadowMap.enabled});const t=this._material.parameters;this.updateTexture(t.textureId);const r=e.camera.viewInverseTransposeMatrix;return(0,h.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?lr:Qt,e)}}class dr extends Kt{constructor(){super(...arguments),this.treeRendering=!1,this.useIndexing=!1,this.hasVertexTangents=!1}get hasNormalTexture(){return!this.treeRendering&&!!this.normalTextureId}get hasColorTexture(){return!!this.textureId}get hasMetallicRoughnessTexture(){return!this.treeRendering&&!!this.metallicRoughnessTextureId}get hasOcclusionTexture(){return!this.treeRendering&&!!this.occlusionTextureId}get emissiveStrength(){return this.emissiveStrengthFromSymbol*this.emissiveStrengthKHR}get emissionSource(){return this.treeRendering?0:null!=this.emissiveTextureId&&0===this.emissiveSource?3:0===this.emissiveSource?2:1}get hasTextures(){return this.hasColorTexture||this.hasNormalTexture||this.hasMetallicRoughnessTexture||3===this.emissionSource||this.hasOcclusionTexture}}const fr=(0,d.vt)(),mr=(0,d.vt)(),pr=(0,d.fA)(0,0,1),gr=(0,d.vt)(),vr=(0,d.vt)(),_r=(0,d.vt)(),xr=(0,d.vt)(),yr=()=>I.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class wr{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function br(e){const t=e.params,r=t.topology;let i=!0;switch(t.vertexAttributes||(yr().warn("Geometry must specify vertex attributes"),i=!1),t.topology){case"PerAttributeArray":break;case"Indexed":case null:case void 0:{const e=t.faces;if(e){if(t.vertexAttributes)for(const r in t.vertexAttributes){const t=e[r];t?.values?(null!=t.valueType&&"UInt32"!==t.valueType&&(yr().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),i=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(yr().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),i=!1)):(yr().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),i=!1)}}else yr().warn("Indexed geometries must specify faces"),i=!1;break}default:yr().warn(`Unsupported topology '${r}'`),i=!1}e.params.material||(yr().warn("Geometry requires material"),i=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(yr().warn("Geometries with externally defined attributes are not yet supported"),i=!1);return i}function Tr(e){const t=(0,f.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,f.iT)(t,r.bbMin),(0,f.iT)(t,r.bbMax))}),t}function Mr(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function Sr(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const Cr=new D.A(1,2,"wosr");async function Er(e,t){const a=function(e){const t=e.match(/(.*\.(gltf|glb))(\?lod=([0-9]+))?$/);return t?{fileType:"gltf",url:t[1],specifiedLodIndex:null!=t[4]?Number(t[4]):null}:e.match(/(.*\.(json|json\.gz))$/)?{fileType:"wosr",url:e,specifiedLodIndex:null}:{fileType:"unknown",url:e,specifiedLodIndex:null}}((0,n.EM)(e));if("wosr"===a.fileType){const e=await(t.cache?t.cache.loadWOSR(a.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,A.Ke)((0,E.A)(e,t));if(r.ok)return r.value.data;(0,N.QP)(r.error),function(e){throw new R.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),i=await async function(e,t){const r=new Array;for(const i in e){const n=e[i],o=n.images[0].data;if(!o){yr().warn("Externally referenced texture data is not yet supported");continue}const s=n.encoding+";base64,"+o,a="/textureDefinitions/"+i,c="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",l={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==Mr(c)},u=t?.disableTextures?Promise.resolve(null):B(s,t);r.push(u.then(e=>({refId:a,image:e,parameters:l,alphaChannelUsage:c})))}const i=await Promise.all(r),n={};for(const e of i)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in i)if(i.hasOwnProperty(e)){const t=i[e];n+=t?.image?t.image.width*t.image.height*4:0}return new wr(r,i,n+(0,O.Qh)(r))}(a.url,t)),{engineResources:r,referenceBoundingBox:i}=function(e,t){const r=new Array,i=new Array,n=new Array,o=new F,s=e.resource,a=D.A.parse(s.version||"1.0","wosr");Cr.validate(a);const c=s.model.name,l=s.model.geometries,u=s.materialDefinitions??{},h=e.textures;let f=0;const m=new Map;for(let e=0;e<l.length;e++){const s=l[e];if(!br(s))continue;const a=Sr(s),c=s.params.vertexAttributes,p=[],g=e=>{if("PerAttributeArray"===s.params.topology)return null;const t=s.params.faces;for(const r in t)if(r===e)return t[r].values;return null},v=c.position,_=v.values.length/v.valuesPerElement;for(const e in c){const t=c[e],r=t.values,i=g(e)??(0,P.tM)(_);p.push([e,new H.n(r,i,t.valuesPerElement,!0)])}const x=a.texture,y=h&&h[x];if(y&&!m.has(x)){const{image:e,parameters:t}=y,r=new Fe(e,t);i.push(r),m.set(x,r)}const w=m.get(x),b=w?w.id:void 0,T=a.material;let M=o.get(T,x);if(null==M){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=y?Mr(y.alphaChannelUsage):void 0,i={ambient:(0,d.ci)(e.diffuse),diffuse:(0,d.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:b,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:y?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(i,t.materialParameters),M=new ur(i,t),o.set(T,x,M)}n.push(M);const S=new ne(M,p);f+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(S)}return{engineResources:[{name:c,stageResources:{textures:i,materials:n,geometries:r},pivotOffset:s.model.pivotOffset,numberOfVertices:f,lodThreshold:null}],referenceBoundingBox:Tr(r)}}(e,t);return{lods:r,referenceBoundingBox:i,isEsriSymbolResource:!1,isWosr:!0}}let m;if(t.cache)m=await t.cache.loadGLTF(a.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));m=await e(new y.R,a.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:S}=function(e,t,r){const n=e.model,a=e.meta,m=n.meta?.ESRI_proxyEllipsoid,y=a.isEsriSymbolResource&&null!=m&&"EsriRealisticTreesStyle"===a.ESRI_webstyle;y&&!e.customMeta.esriTreeRendering&&(e.customMeta.esriTreeRendering=!0,function(e,t){for(let r=0;r<e.model.lods.length;++r){const n=e.model.lods[r];for(const o of n.parts){const n=o.attributes.normal;if(null==n)return;const s=o.attributes.position,a=s.count,u=(0,d.vt)(),f=(0,d.vt)(),m=(0,d.vt)(),p=new Float32Array(4*a),v=new Float32Array(3*a),_=(0,c.B8)((0,l.vt)(),o.transform);let x=0,y=0;for(let c=0;c<a;c++){s.getVec(c,f),n.getVec(c,u),(0,h.Z0)(f,f,o.transform),(0,h.Re)(m,f,t.center),(0,h.Qr)(m,m,t.radius);const a=m[2],l=(0,h.Bw)(m),d=Math.min(.45+.55*l*l,1)**i.Tf;(0,h.Qr)(m,m,t.radius),null!==_&&(0,h.Z0)(m,m,_),(0,h.S8)(m,m),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,h.Cc)(m,m,u,a>-1?.2:Math.min(-4*a-3.8,1)),v[x]=m[0],v[x+1]=m[1],v[x+2]=m[2],x+=3,p[y]=d,p[y+1]=d,p[y+2]=d,p[y+3]=1,y+=4}o.attributes.normal=new g.xs(v.buffer),o.attributes.color=new g.Eq(p.buffer)}}}(e,m));const T=!!t.usePBR,S=a.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:y,mrrFactors:Yt.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:Yt.mb},E={...t.materialParameters,treeRendering:y},A=new Array,R=new Map,I=new Map,O=n.lods.length,F=(0,f.Ie)();return n.lods.forEach((e,a)=>{const c=!0===t.skipHighLods&&(O>1&&0===a||O>3&&1===a)||!1===t.skipHighLods&&null!=r&&a!==r;if(c&&0!==a)return;const l=new C(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=c?new ur({},t):function(e,t,r,n,o,s,a,c,l){const h=e.materials.get(t.material);if(null==h)return null;const{normal:d,color:f,texCoord0:m,tangent:p}=t.attributes,g=t.material+(d?"_normal":"")+(f?"_color":"")+(m?"_texCoord0":"")+(p?"_tangent":""),v=null!=t.attributes.texCoord0,_=null!=t.attributes.normal,x=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(h.alphaMode);if(!s.has(g)){if(v){const t=(t,r=!1,i=!1)=>{if(null!=t&&!a.has(t)){const n=e.textures.get(t);if(n){const e=n.data,o=r&&!(0,b.x3)(e)?c.compressionOptions:void 0;a.set(t,new Fe((0,b.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,b.x3)(e)&&i,encoding:(0,b.x3)(e)?e.encoding:void 0,compressionOptions:o}))}}},r=1!==x&&!l;t(h.colorTexture,r,1!==x),t(h.normalTexture),t(h.occlusionTexture,!0),t(h.emissiveTexture),t(h.metallicRoughnessTexture,!0)}const r=(0,i.xV)(h.color[0]),d=(0,i.xV)(h.color[1]),f=(0,i.xV)(h.color[2]),m=null!=h.colorTexture&&v?a.get(h.colorTexture):null,p=(0,Yt.Jr)(h),y=null!=h.normalTextureTransform?.scale?h.normalTextureTransform?.scale:u.Un;s.set(g,new ur({...n,customDepthTest:1,textureAlphaMode:x,textureAlphaCutoff:h.alphaCutoff,diffuse:[r,d,f],ambient:[r,d,f],opacity:"OPAQUE"===h.alphaMode?1:h.opacity,doubleSided:h.doubleSided,doubleSidedType:"winding-order",cullFace:h.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:_?0:2,castShadows:!0,receiveShadows:h.receiveShadows,receiveAmbientOcclusion:h.receiveAmbientOcclusion,textureId:null!=m?m.id:void 0,colorMixMode:h.colorMixMode,normalTextureId:null!=h.normalTexture&&v?a.get(h.normalTexture).id:void 0,textureAlphaPremultiplied:null!=m&&!!m.parameters.preMultiplyAlpha,occlusionTextureId:null!=h.occlusionTexture&&v?a.get(h.occlusionTexture).id:void 0,emissiveTextureId:null!=h.emissiveTexture&&v?a.get(h.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=h.metallicRoughnessTexture&&v?a.get(h.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[h.emissiveFactor[0],h.emissiveFactor[1],h.emissiveFactor[2]],emissiveStrengthKHR:null!=h.emissiveStrengthKHR?h.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=o.emissiveStrengthFromSymbol?o.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Yt.Bt:[h.metallicFactor,h.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:M(h.colorTextureTransform),normalTextureTransformMatrix:M(h.normalTextureTransform),scale:[y[0],y[1]],occlusionTextureTransformMatrix:M(h.occlusionTextureTransform),emissiveTextureTransformMatrix:M(h.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:M(h.metallicRoughnessTextureTransform),...o},c))}const y=s.get(g);if(r.stageResources.materials.push(y),v){const e=e=>{null!=e&&r.stageResources.textures.push(a.get(e))};e(h.colorTexture),e(h.normalTexture),e(h.occlusionTexture),e(h.emissiveTexture),e(h.metallicRoughnessTexture)}return y}(n,e,l,S,E,R,I,t,y),{geometry:h,vertexCount:d}=function(e,t){const r=e.attributes.position.count,i=(0,w.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:a,typedBufferStride:c}=e.attributes.position;(0,v.t)(n,a,e.transform,3,c);const l=[["position",new H.n(n,i,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.normal;(0,s.Ge)(Ar,e.transform),(0,v.b)(t,n,Ar,3,a),(0,o.or)(Ar)&&(0,v.n)(t,t),l.push(["normal",new H.n(t,i,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.tangent;(0,s.z0)(Ar,e.transform),(0,_.t)(t,n,Ar,4,a),(0,o.or)(Ar)&&(0,v.n)(t,t,4),l.push(["tangent",new H.n(t,i,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:o}=e.attributes.texCoord0;(0,x.a)(t,n,2,o),l.push(["uv0",new H.n(t,i,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof g.Eq?(0,_.b)(t,u,1,255):(u instanceof g.XP||u instanceof g.Uz)&&(0,_.b)(t,u,1/255,255):(t.fill(255),u instanceof g.xs?(0,v.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof g.eI||e.attributes.color instanceof g.nS)&&(0,v.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),l.push(["color",new H.n(t,i,4,!0)])}return{geometry:new ne(t,l),vertexCount:r}}(e,r??new ur({},t)),m=h.boundingInfo;null!=m&&0===a&&((0,f.iT)(F,m.bbMin),(0,f.iT)(F,m.bbMax)),null!=r&&(l.stageResources.geometries.push(h),l.numberOfVertices+=d)}),c||A.push(l)}),{engineResources:A,referenceBoundingBox:F}}(m,t,a.specifiedLodIndex);return{lods:T,referenceBoundingBox:S,isEsriSymbolResource:m.meta.isEsriSymbolResource,isWosr:!1}}const Ar=(0,a.vt)()},1843(e,t,r){r.d(t,{BP:()=>h,l5:()=>d});var i=r(20498),n=r(13030),o=r(90239),s=r(4431),a=r(620),c=r(85079);class l{constructor(e,t,r=0){this.layout=e,this.byteOffset=r,this.buffer="number"==typeof t?new ArrayBuffer(t*e.stride):t;for(const t of e.fields.keys()){const i=e.fields.get(t);this[t]=new i.constructor(this.buffer,r+i.offset,this.stride)}}get stride(){return this.layout.stride}get count(){return this.byteLength/this.stride}get byteLength(){return this.buffer.byteLength-this.byteOffset}getField(e,t){const r=this[e];return r&&r.elementCount===t.ElementCount&&r.elementType===t.ElementType?r:null}slice(e,t){return new l(this.layout,this.buffer.slice(e*this.stride,t*this.stride))}copyFrom(e,t=0,r=0,i=e.count){const n=this.stride;if(n%4==0){const o=new Uint32Array(e.buffer,t*n,i*n/4);new Uint32Array(this.buffer,r*n,i*n/4).set(o)}else{const o=new Uint8Array(e.buffer,t*n,i*n);new Uint8Array(this.buffer,r*n,i*n).set(o)}return this}get usedMemory(){return this.byteLength}dispose(){}}class u{constructor(e){this._stride=0,this._fields=new Map,e&&(this._stride=e.stride,e.fields.forEach(e=>this._fields.set(e[0],{...e[1],constructor:p(e[1].constructor)})))}freeze(){return this}get locations(){return(0,c.Xk)((0,s.U)(this))}vec2f16(e,t){return this._appendField(e,i.SX?n.ZD:n.gH,t),this}vec2f(e,t){return this._appendField(e,n.gH,t),this}vec2f64(e,t){return this._appendField(e,n.si,t),this}vec3f16(e,t){return this._appendField(e,i.SX?n.EC:n.xs,t),this}vec3f(e,t){return this._appendField(e,n.xs,t),this}vec3f64(e,t){return this._appendField(e,n.Xm,t),this}vec4f16(e,t){return this._appendField(e,i.SX?n.jz:n.Eq,t),this}vec4f(e,t){return this._appendField(e,n.Eq,t),this}vec4f64(e,t){return this._appendField(e,n.Aj,t),this}mat3f(e,t){return this._appendField(e,n.jZ,t),this}mat3f64(e,t){return this._appendField(e,n.j0,t),this}mat4f(e,t){return this._appendField(e,n.Sx,t),this}mat4f64(e,t){return this._appendField(e,n.E$,t),this}vec4u8(e,t){return this._appendField(e,n.XP,t),this}f16(e,t){return this._appendField(e,i.SX?n.XW:n.Y$,t),this}f32(e,t){return this._appendField(e,n.Y$,t),this}f64(e,t){return this._appendField(e,n.qB,t),this}u8(e,t){return this._appendField(e,n.SL,t),this}u16(e,t){return this._appendField(e,n.h,t),this}i8(e,t){return this._appendField(e,n.bf,t),this}vec2i8(e,t){return this._appendField(e,n.D6,t),this}vec2i16(e,t){return this._appendField(e,n.mJ,t),this}vec2u8(e,t){return this._appendField(e,n.LC,t),this}vec2u16(e,t){return this._appendField(e,n.Yi,t),this}vec4u16(e,t){return this._appendField(e,n.Uz,t),this}vec4i16(e,t){return this._appendField(e,n.E7,t),this}u32(e,t){return this._appendField(e,n.P,t),this}_appendField(e,t,r){this._fields.has(e)&&(0,a.vA)(!1,`${e} already added to vertex buffer layout`);const i=t.ElementCount*(0,o.GJ)(t.ElementType),n=this._stride;this._fields.set(e,{constructor:t,size:i,offset:n,optional:r}),this._alignFields()}_alignFields(){let e=0,t=1;this._fields.forEach(r=>{const i=(0,o.GJ)(r.constructor.ElementType);e=Math.floor((e+i-1)/i)*i,r.offset=e,e+=r.size,t=Math.max(t,i)}),e=Math.floor((e+t-1)/t)*t,this._stride=e}createBuffer(e){return new l(this,e)}createView(e,t){return new l(this,e,t)}clone(){const e=new u;return e._stride=this._stride,e._fields=new Map,this._fields.forEach((t,r)=>e._fields.set(r,t)),e.BufferType=this.BufferType,e}get stride(){return this._stride}get fields(){return this._fields}}function h(){return new u}class d{constructor(e){this.fields=new Array,e.fields.forEach((e,t)=>{const r={...e,constructor:m(e.constructor)};this.fields.push([t,r])}),this.stride=e.stride}}const f=[n.Y$,n.gH,n.xs,n.Eq,n.jZ,n.Sx,n.qB,n.si,n.Xm,n.Aj,n.j0,n.E$,n.SL,n.LC,n.eI,n.XP,n.h,n.Yi,n.nS,n.Uz,n.P,n.An,n.H$,n.ml,n.bf,n.D6,n.m8,n.TX,n.Qt,n.mJ,n.Vp,n.E7,n.My,n.UL,n.zD,n.Y4];function m(e){return`${e.ElementType}_${e.ElementCount}`}function p(e){return g.get(e)}const g=new Map;f.forEach(e=>g.set(m(e),e))},4431(e,t,r){r.d(t,{U:()=>o});var i=r(63907),n=r(74038);function o(e,t=0){const r=e.stride;return Array.from(e.fields.keys()).map(o=>{const s=e.fields.get(o),a=s.constructor.ElementCount,c=function(e){switch(e){case"u8":return i.pe.UNSIGNED_BYTE;case"u16":return i.pe.UNSIGNED_SHORT;case"u32":return i.pe.UNSIGNED_INT;case"i8":return i.pe.BYTE;case"i16":return i.pe.SHORT;case"i32":return i.pe.INT;case"f16":return i.pe.HALF_FLOAT;case"f32":return i.pe.FLOAT;default:throw new Error("BufferType not supported in WebGL")}}(s.constructor.ElementType),l=s.offset,u=s.optional?.glNormalized??!1,h=s.optional?.integer??!1;return new n._(o,a,c,l,r,u,t,h)})}},26857(e,t,r){r.d(t,{b:()=>a});var i=r(5482),n=r(69622),o=r(91429);let s=class extends n.A{constructor(){super(...arguments),this.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,this.DECONFLICTOR_SHOW_VISIBLE=!1,this.DECONFLICTOR_SHOW_INVISIBLE=!1,this.DECONFLICTOR_SHOW_GRID=!1,this.LABELS_SHOW_BORDER=!1,this.TEXT_SHOW_BASELINE=!1,this.TEXT_SHOW_BORDER=!1,this.OVERLAY_DRAW_DEBUG_TEXTURE=!1,this.OVERLAY_SHOW_CENTER=!1,this.SHOW_POI=!1,this.OCCLUSION_QUERY_DEBUG_PIXEL=!1,this.ENABLE_OPTIMIZATIONS=!0,this.TESTS_DISABLE_FAST_UPDATES=!1,this.DRAW_MESH_GEOMETRY_NORMALS=!1,this.FEATURE_TILE_FETCH_SHOW_TILES=!1,this.FEATURE_TILE_TREE_SHOW_TILES=!1,this.TERRAIN_TILE_TREE_SHOW_TILES=!1,this.I3S_TREE_SHOW_TILES=!1,this.I3S_SHOW_MODIFICATIONS=!1,this.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,this.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,this.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,this.LINE_WIREFRAMES=!1,this.FLOW_GLOBAL_SCALE_THRESHOLD=null}};(0,i.Cg)([(0,o.MZ)()],s.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DECONFLICTOR_SHOW_GRID",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LABELS_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BASELINE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TEXT_SHOW_BORDER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OVERLAY_SHOW_CENTER",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"SHOW_POI",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"OCCLUSION_QUERY_DEBUG_PIXEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"ENABLE_OPTIMIZATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TESTS_DISABLE_FAST_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"TERRAIN_TILE_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_TREE_SHOW_TILES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"I3S_SHOW_MODIFICATIONS",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"LINE_WIREFRAMES",void 0),(0,i.Cg)([(0,o.MZ)()],s.prototype,"FLOW_GLOBAL_SCALE_THRESHOLD",void 0),s=(0,i.Cg)([(0,o.$K)("esri.views.3d.support.debugFlags")],s);const a=new s},46686(e,t,r){r.d(t,{o:()=>n});var i=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(i.H`
|
|
234
234
|
void forwardLinearDepth(float _linearDepth) { ${(0,i.If)(t,"linearDepth = _linearDepth;")} }
|
|
235
235
|
`)}},33120(e,t,r){r.d(t,{i$:()=>s,xJ:()=>o}),r(46686),r(62308);var i=r(77108),n=r(31821);function o(e){e.vertex.uniforms.add(new i.E("nearFar",e=>e.camera.nearFar))}function s(e){e.vertex.code.add(n.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
236
236
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
@@ -560,7 +560,7 @@ vec3 rawNormal = textureLookup(normalTexture, uv).rgb * 2.0 - 1.0;`),v&&r.code.a
|
|
|
560
560
|
normalTextureTransformMatrix[1][0]/scale[0], normalTextureTransformMatrix[1][1]/scale[1], 0.0,
|
|
561
561
|
0.0, 0.0, 0.0 );
|
|
562
562
|
rawNormal.xy = (normalRotation * vec3(rawNormal.x, rawNormal.y, 1.0)).xy;`),r.code.add(c.H`return tangentSpace * rawNormal;
|
|
563
|
-
}`))}(e,t)}},43730(e,t,r){r.d(t,{n:()=>Ht});var i=r(31821),n=r(12791),o=r(5482),s=r(34727),a=r(97768),c=r(36708),l=r(78659),u=r(91429),h=r(37585),d=r(69540);let f=class extends d.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,u.$K)("esri.CameraLayout")],f);const m=f;var p=r(69052),g=r(25482),v=r(56507),_=r(86738),x=r(43937),y=r(36005);let w=class extends((0,d.OU)(g.o)){constructor(...e){super(...e),this.position=new _.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new m}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,v.GB)(e.x||0),n.y=(0,v.GB)(e.y||0),n.z=e.hasZ?(0,v.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new _.A;return r.read(e,t),r.x=(0,v.GB)(r.x||0),r.y=(0,v.GB)(r.y||0),r.z=r.hasZ?(0,v.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,u.MZ)({type:_.A,json:{write:{isRequired:!0}}})],w.prototype,"position",void 0),(0,o.Cg)([(0,x.K)("position")],w.prototype,"writePosition",null),(0,o.Cg)([(0,y.w)("position")],w.prototype,"readPosition",null),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>p.ie.normalize((0,v.GB)(e)))],w.prototype,"heading",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>(0,s.qE)((0,v.GB)(e),-180,180))],w.prototype,"tilt",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,u.wg)(e=>(0,s.qE)((0,v.GB)(e,55),1,170))],w.prototype,"fov",void 0),(0,o.Cg)([(0,u.MZ)({type:m,nonNullable:!0,json:{read:!1,write:!1}})],w.prototype,"layout",void 0),w=(0,o.Cg)([(0,u.$K)("esri.Camera")],w);var b=r(9093),T=r(35522),M=r(51850),S=r(16930),C=(r(48353),r(9762),r(65806)),E=r(27993),A=r(73941),R=(r(19419),r(71351)),I=r(69622),O=r(53966),F=r(90629),N=r(58083),D=r(48163),P=r(78955),B=r(91829),H=r(82919),L=r(44280);function z(e,t,r){e.worldUpAtPosition(t,U),(0,T.Re)(G,r,t);const i=(0,T.Bw)(G);return 0===i?0:(0,s.XM)((0,T.Om)(G,U)/i)}const U=(0,M.vt)(),G=(0,M.vt)();var V;let j=V=class extends I.A{constructor(e){super(e),this._ray=(0,R.vt)(),this._viewport=(0,B.fA)(0,0,1,1),this._padding=(0,B.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,D.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,b.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,b.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,b.vt)(),this._frustumDirty=!0,this._frustum=(0,H.vt)(),this._fullViewport=(0,B.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,M.vt)(),this._up=(0,M.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,T.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,N.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,T.hZ)((0,M.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,T.hZ)((0,M.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,T.hZ)((0,M.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,P.hs)((0,B.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,P.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,P.hs)((0,B.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,P.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,P.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,P.C)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,N.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,N.B8)((0,b.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,b.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,T.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,N.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,N.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,s=-i/2+this.column*o,a=s+o,c=-r/2+this.row*n,l=c+n,u=(0,N.$h)((0,b.vt)(),s*(1+2*this._padding[3]/e),a*(1+2*this._padding[1]/e),c*(1+2*this._padding[2]/t),l*(1+2*this._padding[0]/t),this.near,this.far),h=this._get("projectionMatrix");return h&&(0,N.aI)(h,u)?h:u}copyFrom(e){(0,T.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,P.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,P.C)(this._padding,e.padding),this.notifyChange("_padding"),(0,h.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,N.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,H.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,N.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,P.C)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new V).copyFrom(this)}equals(e){return(0,T.t2)(this.eye,e.eye)&&(0,T.t2)(this.center,e.center)&&(0,T.t2)(this.up,e.up)&&(0,P.t2)(this._viewport,e.viewport)&&(0,P.t2)(this._padding,e.padding)&&(0,h.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,P.hG)(e.screenPadding,this.screenPadding)>=t||(0,P.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,T.jb)($,e.eye,e.center),(0,T.jb)(Z,this.eye,this.center);const r=(0,T.Om)($,Z),i=(0,T.uE)($),n=(0,T.uE)(Z),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,T.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,T.Re)($,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==k&&(0,T.C)(k,e),k[3]=1,(0,P.Z0)(k,k,this.projectionMatrix);const r=Math.abs(k[3]);(0,T.hs)(k,k,1/r);const i=this.fullViewport;t[0]=(0,s.Cc)(0,i[0]+i[2],.5+.5*k[0]),t[1]=(0,s.Cc)(0,i[1]+i[3],.5+.5*k[1]),t[2]=.5*(k[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;k[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],k[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],k[2]=(2*e[2]-1)*e[3],k[3]=e[3],null!=this.inverseProjectionMatrix&&((0,P.Z0)(k,k,this.inverseProjectionMatrix),t[0]=k[0],t[1]=k[1],t[2]=k[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,q),this.renderToScreen(q,t),t}projectToRenderScreen(e,t){if(k[0]=e[0],k[1]=e[1],k[2]=e[2],k[3]=1,(0,P.Z0)(k,k,this.viewProjectionMatrix),0===k[3])return null;const r=k;(0,T.hs)(r,r,1/Math.abs(k[3]));const i=this.fullViewport,n=(0,s.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,s.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,q),t)}unprojectFromRenderScreen(e,t){if((0,N.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,N.B8)(W,W))return null;const r=this.fullViewport;return k[0]=2*(e[0]-r[0])/r[2]-1,k[1]=2*(e[1]-r[1])/r[3]-1,k[2]=2*e[2]-1,k[3]=1,(0,P.Z0)(k,k,W),0===k[3]?null:(t[0]=k[0]/k[3],t[1]=k[1]/k[3],t[2]=k[2]/k[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,s=Math.max(n-r/2,0),a=Math.max(this.fullHeight-o-i/2,0),c=-Math.min(n-r/2,0),l=-Math.min(this.fullHeight-o-i/2,0),u=r-c- -Math.min(this.fullWidth-n-r/2,0),h=i-l- -Math.min(o-i/2,0);return[Math.round(s),Math.round(a),Math.round(u),Math.round(h)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,s=Math.abs(Math.PI/2-z(t,r,i));return e.frustumCoverage(s,n,o)}_computeUpGlobal(){(0,T.Re)($,this.center,this.eye);const e=(0,T.Bw)(this.center);e<1?(0,T.t2)(this._up,M.Cb)&&((0,T.C)(this._up,M.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,T.Om)($,this.center))>.9999*(0,T.Bw)($)*e||((0,T.$A)(Z,$,this.center),(0,T.$A)(Z,Z,$),(0,T.S8)(Z,Z),(0,T.t2)(this._up,Z)||((0,T.C)(this._up,Z),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,T.oW)($,this.eye,this.center),Math.abs($[2])<=.9999&&((0,T.hs)($,$,$[2]),(0,T.hZ)($,-$[0],-$[1],1-$[2]),(0,T.S8)($,$),(0,T.t2)(this._up,$)||((0,T.C)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,T.t2)(e,t)||((0,T.C)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):O.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,H.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,N.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,u.MZ)()],j.prototype,"_viewport",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_padding",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_fov",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_nearFar",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"pixelRatio",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_rows",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"rows",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_columns",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"columns",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"eye",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"center",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_center",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"up",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_up",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"viewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"viewForward",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"viewUp",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"viewRight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"nearFar",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"near",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"far",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"viewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"screenViewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"screenPadding",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"x",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"y",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"width",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"height",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fullWidth",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fullHeight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"_aspect",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"padding",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"projectionMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fov",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fovX",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fovY",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"relativeElevation",void 0),j=V=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl.RenderCamera")],j);const k=(0,B.vt)(),W=(0,b.vt)(),$=(0,M.vt)(),Z=(0,M.vt)(),q=(0,F.r_)();r(49718),r(6867),r(16396),(0,M.vt)(),(0,M.vt)(),(0,M.vt)();var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,s)=>{if(t[r]<i&&s[r]<i)return 1===n?0:1;if(t[r]>i&&s[r]>i)return 1===n?1:0;const a=(s[o]-t[o])/(s[r]-t[r]),c=t[o]+a*(i-t[r]);return e[r]=i,e[o]=c,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,D.o8)(ee));break;case 2:Q(e,(0,D.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,h.aI)(e.at(-1),t)||e.push(t)}const ee=(0,D.vt)();var te=r(11964),re=r(27921);const ie=(0,M.vt)(),ne=(0,M.vt)();function oe(){return{direction:(0,M.vt)(),up:(0,M.vt)()}}function se(e,t,r,i,n){let o=(0,T.S8)(ie,e),a=(0,T.Om)(o,i);const c=a>0;a=Math.abs(a),a>.99&&(a=Math.abs((0,T.Om)(t,i)),a<.99?((0,T.C)(o,t),c&&(0,T.hs)(o,o,-1)):o=null);let l=0;if(o){(0,T.hs)(ne,i,(0,T.Om)(i,o)),(0,T.Re)(o,o,ne);const e=(0,T.Om)(o,n)/((0,T.Bw)(o)*(0,T.Bw)(n));(0,T.$A)(ne,o,n),l=((0,T.Om)(ne,i)>0?1:-1)*(0,s.KJ)((0,s.XM)(e))}const u=(0,s.KJ)((0,s.XM)(-(0,T.Om)(i,e)/(0,T.Bw)(e)));return r?(r.heading=l,r.tilt=u,r):{heading:l,tilt:u}}function ae(e,t,r,i){(0,T.Re)(ce,r,t),(0,re.T7)(i,(0,te.LV)(t,ce),e)||e===r||(0,T.C)(e,r)}const ce=(0,M.vt)(),le=(0,M.fA)(0,1,0),ue=(0,M.fA)(0,0,1),he=(0,b.vt)(),de=(0,M.vt)(),fe=(0,M.vt)();function me(e,t,r,i=oe()){const{direction:n,up:o}=i;return(0,N.N9)(he,-(0,s.kU)(t)),(0,N.eL)(he,he,(0,s.kU)(r)),(0,T.Z0)(n,ue,he),(0,T.hs)(n,n,-1),(0,T.Z0)(o,le,he),i}function pe(e,t,r,i,n){const o=t.lines[11].direction,s=(n-r.getAltitude(i))/o[2];(0,T.Ln)(e,i,o,s)}const ge=(0,M.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return se(t,r,i,ue,le)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,M.vt)();return(0,T.hs)(o,n.direction,-t),(0,T.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,s.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,s.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,s=e.state.camera.eye,a=[],c=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,R.LV)(t.origin,t.direction),n,ge)||pe(ge,r,i,t.endpoint,n),ae(ge,s,ge,c),a.push((0,D.fA)(ge[0],ge[1]))}return function(e,t,r){const i=e.map(e=>((0,T.hZ)(ge,e[0],e[1],0),t.fromRenderCoords(ge,ge,r),[ge[0],ge[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(a,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,s=e.spatialReference??t.spatialReference;return(0,C.g)(t,de,o),(0,C.g)(t,fe,o),de[0]-=r/2,fe[0]+=r/2,de[1]-=i/2,fe[1]+=i/2,(0,E.F)(de,o,de,s),(0,E.F)(fe,o,fe,s),n?(n.xmin=de[0],n.ymin=de[1],n.xmax=fe[0],n.ymax=fe[1],n.spatialReference=s):n=new Y.A(de[0],de[1],fe[0],fe[1],s),n}},Symbol.toStringTag,{value:"Module"}));var ve=r(34304),_e=r(17136),xe=r(94008),ye=r(28735);class we{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,H.vt)(),this._points=(0,H.Qy)(),this.lines=new Array(12),this._origin=(0,M.vt)(),this._direction=(0,M.vt)(),this._boundingSphere=new xe.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,M.vt)(),endpoint:null}}update(e){(0,H.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,T.C)(this._origin,e.eye),(0,T.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,T.C)(this._points[t],e[t]);(0,H.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,H.m7)(this.frustum,e)}intersectsRay(e){return(0,H.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,H.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,H.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;be(this.lines[t],e[t],e[r]),be(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),be(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=Me;(0,T.S8)(t,this.direction);const r=Te;(0,T.jb)(r,this.points[4],e);const i=.5*(0,T.Om)(r,r)/(0,T.Om)(t,r),n=this._boundingSphere,o=(0,T.Ln)(Se,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=H.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function be(e,t,r){e.origin=t,e.endpoint=r,(0,T.oW)(e.direction,t,r)}const Te=(0,M.vt)(),Me=(0,M.vt)(),Se=(0,M.vt)();r(86211);const Ce=(0,M.fA)(5802e-9,13558e-9,331e-7),Ee=(0,M.fA)(65e-8*3,5643e-9,255e-9);(0,M.fA)(Ce[0]+Ee[0],Ce[1]+Ee[1],Ce[2]+Ee[2]);class Ae{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ae(0,0)}static{this.Infinite=new Ae}}(0,M.vt)(),(0,M.vt)(),new xe.iy,(0,R.vt)(),new Y.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Re=r(32728);const Ie=(0,M.fA)(0,0,1),Oe=(0,T.S8)((0,M.vt)(),(0,M.fA)(1,1,1)),Fe=(0,b.vt)(),Ne=(0,M.vt)(),De=(0,M.vt)();function Pe(e,t,r,i=oe()){(0,T.$A)(Ne,e,Ie),0===(0,T.Om)(Ne,Ne)&&(0,T.$A)(Ne,e,Oe),(0,N.$0)(Fe,-(0,s.kU)(t),e),(0,N.e$)(Fe,Fe,-(0,s.kU)(r),Ne);const{up:n,direction:o}=i;return(0,T.$A)(n,Ne,e),(0,T.S8)(n,n),(0,T.Z0)(n,n,Fe),(0,T.S8)(o,e),(0,T.ze)(o,o),(0,T.Z0)(o,o,Fe),i}function Be(e){const t=e[1];e[1]=-e[2],e[2]=t}function He(e,t){const r=Pe(t,e.heading,e.tilt);return e.up=r.up,e}function Le(e,t){const r=[],i=[],n=(0,ve.FD)();for(let o=0;o<e.length;o++){const s=e[o],a=o===e.length-1?e[0]:e[o+1],c=(0,te.Cr)(s,a,$e),l=(0,re.vE)(t,c.origin,c.vector,0,ke);switch(l){case 2:r.push(s);break;case 3:i.push(s);break;case 0:case 1:{const[e,o,a]=0===l?[1,r,i]:[-1,i,r],c=(0,re.Qj)(t),u=(0,T.Ln)((0,M.vt)(),ke,c,e*n),h=(0,T.Ln)((0,M.vt)(),ke,c,e*-n);o.push(s),o.push(u),a.push(h)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const ze={minCurvature:(0,s.kU)(5),maxCurvature:(0,s.kU)(50),minSamples:1,maxSamples:6},Ue=(0,M.fA)(1,0,0),Ge=(0,M.fA)(0,1,0),Ve=(0,M.vt)(),je=(0,M.vt)(),ke=(0,M.vt)(),We=new xe.iy,$e=(0,te.vt)(),Ze=(0,B.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Ne,o=De;return(0,T.S8)(n,e),(0,T.$A)(De,n,Ie),0===(0,T.Om)(De,De)&&(0,T.$A)(De,n,Oe),(0,T.$A)(o,De,n),se(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,M.vt)(),up:null,tilt:i,heading:r},o=Ne;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const a=t,c=(0,s.kU)(r),l=(0,s.kU)(i),u=Math.sin(c),h=Math.cos(c),d=Math.sin(l),f=Math.cos(l),m=(0,T.Bw)(o);let p;if(Math.abs(l)<1e-8)p=a+m;else{const e=m/d,t=(0,s.YN)(a/e),r=Math.PI-l-t;p=e*Math.sin(r)}const g=f*a,v=a*a*(d*d),_=h*h*v,x=p-g,y=x*x,w=_*(_+y-o[1]*o[1]);if(w<0)return(0,T.hs)(n.eye,o,p/m),n.tilt=0,He(n,e);const b=Math.sqrt(w),S=o[1]*x,C=_+y;let E;if(E=h>0?-b+S:b+S,Math.abs(C)<1e-8)return m<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=a):(0,T.hs)(n.eye,o,p/m),n.tilt=0,Be(n.eye),He(n,e);n.eye[1]=E/C;const A=u*u*v,R=d*a,I=h*R*n.eye[1],O=n.eye[1]*n.eye[1],F=1-O,N=Math.sqrt(F),D=_*O+A-2*I*N*x+F*y;return Math.abs(D)<1e-8?((0,T.hs)(n.eye,o,p/m),n.tilt=0,Be(n.eye),He(n,e)):(n.eye[0]=(F*(p*o[0]-g*o[0])-R*N*(o[0]*n.eye[1]*h+o[2]*u))/D,n.eye[2]=(F*(p*o[2]-g*o[2])-R*N*(o[2]*n.eye[1]*h-o[0]*u))/D,(0,T.hs)(n.eye,n.eye,p),Be(n.eye),He(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,s.kU)(e),n=(0,T.Bw)(t);return(0,s.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:Pe,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,T.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,s.YN)(r/(n/Math.sin(e)));return(0,s.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new we(r);i.near=2,n.update(i);const o=r.getAltitude(t),a=e.spatialReference,c=r.referenceEllipsoid.radius,l=i.eye,u=1+(0,T.Io)(l,t)/(c+o),h=Math.sqrt(u*u-1),{minCurvature:d,maxCurvature:f,minSamples:m,maxSamples:p}=ze,g=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return We.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(We,t)}(e),v=(0,s.qE)((h-d)/(f-d),0,1),_=Math.round((0,s.Cc)(m,p,v)),x=i.aboveGround,y=n.planes[5],w=[],b=(0,re.O_)(M.uY,Ue,(0,re.vt)()),S=(0,re.O_)(M.uY,Ge,(0,re.vt)());(0,P.hZ)(Ze,0,0,0,0);const C=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-g:0,i=1===e&&x||3===e&&!x?g:1,a=n.lines[e],c=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const u=n/_,h=0===n?0:(0,s.Cc)(t,i,1===e?1-(1-u)**2:3===e?u**2:u),d=(0,T.Cc)(je,a.origin,c.origin,h),f=(0,Re.nu)(a.direction,c.direction,h,Ve);r.intersectManifoldClosestSilhouette((0,R.LV)(d,f),o,ke),ae(ke,l,ke,y),w.push((0,M.o8)(ke)),0!==w.length&&C((0,T.lo)(w.at(-1),ke));const m=((0,re.Tj)(b,ke)?1:0)|((0,re.Tj)(S,ke)?2:0);Ze[m]=1}}w.length>2&&(0,T.lo)(w[0],w.at(-1));const E=function(e,t,r){const i=2*(0,ve.FD)();return e.map(e=>{const n=[];let o=!1;for(const s of e)t.fromRenderCoords(s,ke,r),Math.abs(s[0])<i&&Math.abs(s[1])<i?(n.push([null,ke[1]]),n.push([null,ke[1]]),o=!0):n.push([ke[0],ke[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,P.m3)(Ze)>1?function(e,t){const r=[];for(const i of e)r.push(...Le(i,t));return r}(Le(w,b),S):[w],r,a);return new X.A({rings:E,spatialReference:a})},toExtent:function(e,t,r,i,n){let o,a,c,l;const u=t.latitude,h=(0,A.tO)(e.spatialReference).radius,d=t.longitude,f=function(e,t,r){const i=t/r,n=(0,s.kU)(e),o=Math.sin(i/2),a=Math.cos(n),c=2*(0,s.YN)(Math.sqrt(o*o/(a*a)));return(0,s.KJ)(c)}(u,r,h)/2;o=d-f,a=d+f;const m=(0,s.kU)(u),g=(1+Math.sin(m))/(1-Math.sin(m)),v=(g+1)*Math.tan(i/h/2),_=v*v;function x(e){const t=Math.PI/2;return(e=p.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(c=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*g+_))),l=c+i/h,c=x(c),l=x(l),l<c){const e=l;l=c,c=e}if(c=Math.max((0,s.KJ)(c),-90),l=Math.min((0,s.KJ)(l),90),a=_e.Y_.monotonic(o,a),a-o>180){const e=(a-o-180)/2;o+=e,a-=e}const y=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:S.A.WGS84;return n?(n.xmin=o,n.ymin=c,n.xmax=a,n.ymax=l,n.spatialReference=y):n=new Y.A(o,c,a,l,y),e.spatialReference&&e.spatialReference.isWebMercator&&(0,ye.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const qe="composite-color",Ye=["final-color",qe,"opaque-color","transparent-color"],Xe={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",PRE_TRANSPARENT:"pre-transparent-color",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserline-color",MAGNIFIER:"magnifier-color",OCCLUDED:"occluded-color",OPAQUE_ENVIRONMENT:"opaque-environment-color",AMBIENT_ILLUMINATION:"ambient-illumination",TRANSPARENT_ENVIRONMENT:"transparent-environment-color",VIEWSHED:"viewshed-color"};Array.from(Object.values(Xe)).concat(Ye),(0,M.vt)();var Je=r(49186),Ke=r(10107),Qe=r(64108),et=r(44208),tt=(r(17676),r(94656)),rt=r(63907);r(93637),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,et.A)("esri-tests-disable-gpu-memory-measurements"),(0,tt.en)();(0,tt.en)();var it=r(90644),nt=r(76284),ot=r(48852),st=r(42293);const at=!!(0,et.A)("esri-tests-disable-gpu-memory-measurements");class ct{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(rt.vt.Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:i,height:n,internalFormat:o,multisampled:s}=t;s?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return at?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,st.MW)(e.internalFormat);var e}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(rt.vt.Renderbuffer,this),this._context=null)}}class lt{constructor(e,t,r){if(this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(rt.vt.FramebufferObject,this),null!=t){const r=function(e,t){return ut(t)||ht(t)?t:dt(t)?new nt.A(e,t):function(e){return 3===ft(e)||null!=e&&"samples"in e}(t)?new ct(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(rt.r6,r),ut(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(rt.r6)}if(null!=r)if(function(e){return ut(e)||dt(e)}(r))this._depthStencilTexture=ut(r)?r:new nt.A(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const t=ht(r)?r:new ct(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}dispose(){const{_colorAttachments:e,_glName:t}=this;if(0===e.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;const{_context:r}=this,i=r.getBoundFramebufferObject(),n=Array.from(e.values());this.detachColorTextures(...e.keys()),n.forEach(e=>e.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(t),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(rt.vt.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){const e=this._colorAttachments.get(rt.r6);return ut(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(rt.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(rt.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((e,[t,r])=>e+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&ut(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=rt.r6){if(!e)return;this._validateColorAttachmentPoint(t);const{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=rt.r6){const t=this._colorAttachments.get(e);if(!t)return;const r=ut(t);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,e);else{const t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._initialized){const t=this._context.gl;this._context.temporaryBindFramebufferObject(this,()=>{e.forEach(e=>{ut(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=rt.r6,r=0){const i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,0,r):this._framebufferTexture2D(i.glName,t,e,36160,0))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041===r||6402===r?34041!==r||i===rt.ld.UNSIGNED_INT_24_8?6402!==r||i===rt.ld.UNSIGNED_INT||i===rt.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,gt(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,gt(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){const{_context:t}=this,r=t.getBoundFramebufferObject();t.bindFramebuffer(this);const{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){const{_context:t}=this;t.temporaryBindFramebufferObject(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,s){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const a=s.descriptor;3553!==s.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||e+r>this.width||t+i>this.height||n+r>a.width||o+i>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,l=c.bindTexture(s,nt.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(nt.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),c.bindTexture(l,nt.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,s){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),s||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,s)}async readPixelsAsync(e,t,r,i,n,o,s){const{gl:a}=this._context,c=ot.g.createPixelPack(this._context,35041,s.byteLength);this._context.bindBuffer(c);const l=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),a.readPixels(e,t,r,i,n,o,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l),await c.getSubDataAsync(s),c.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};if(mt(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(mt(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,tt.en)())){const{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){const{gl:t}=this._context;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();if(t.bindFramebuffer(e,r),this._colorAttachments.forEach((t,r)=>{if(ut(t)){const i=pt(t);35866===i?this._framebufferTextureLayer(t.glName,r,e,0,0):this._framebufferTexture2D(t.glName,r,i,e)}else if(ht(t)){const i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const t=gt(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,pt(this._depthStencilTexture),e)}(0,tt.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=rt.r6,r=3553,i=36160,n=0){this._context.gl.framebufferTexture2D(i,t,r,e,n)}_framebufferTextureLayer(e,t=rt.r6,r=36160,i=0,n=0){this._context.gl.framebufferTextureLayer(r,t,e,i,n)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,a.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,gt(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,a.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),mt(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){mt(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case rt.SB.DEPTH_COMPONENT16:case rt.SB.DEPTH_COMPONENT24:case rt.SB.DEPTH_COMPONENT32F:return rt.xL;case rt.iE.DEPTH24_STENCIL8:case rt.iE.DEPTH32F_STENCIL8:return rt.nI;case 36168:return rt.uH;default:return rt.r6}}_validateColorAttachmentPoint(e){if(-1===lt._MAX_COLOR_ATTACHMENTS){const{gl:e}=this._context;lt._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}const t=e-rt.r6;t+1>lt._MAX_COLOR_ATTACHMENTS&&O.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${lt._MAX_COLOR_ATTACHMENTS} color attachments`)}}function ut(e){return 1===ft(e)}function ht(e){return 2===ft(e)}function dt(e){return 0===ft(e)}function ft(e){return null!=e&&"type"in e?e.type:null}function mt(e,t){const r=Math.max(e.width,e.height);if(r>t){O.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function pt(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function gt(e){return 6402===e?rt.xL:rt.nI}var vt=r(67171),_t=(r(21818),r(69397),r(85079)),xt=r(74038);const yt=[new xt._("position",2,rt.pe.UNSIGNED_SHORT,0,4)];new xt._("a_pos",2,rt.pe.BYTE,0,2),new xt._("a_pos",2,rt.pe.BYTE,0,4),new xt._("a_tex",2,rt.pe.BYTE,2,4),(0,_t.Xk)(yt),r(66289);const wt=new Image;wt.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",wt.width=5,wt.height=5,wt.decode();let bt=class extends I.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=qe,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,c.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},c.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Je.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){var t;e.initializeAndBind(),this.gl.drawBuffers((t=e)?t.colorAttachments.length>0?t.colorAttachments:[rt.$0]:[rt.C5])}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,Ke.MZ)({constructOnly:!0})],bt.prototype,"view",void 0),(0,o.Cg)([(0,Ke.MZ)({constructOnly:!0})],bt.prototype,"consumes",void 0),(0,o.Cg)([(0,Ke.MZ)()],bt.prototype,"produces",void 0),(0,o.Cg)([(0,Ke.MZ)({readOnly:!0})],bt.prototype,"techniques",null),bt=(0,o.Cg)([(0,Qe.$)("esri.views.3d.webgl.RenderNode")],bt);const Tt=bt;var Mt=r(15581),St=r(13840),Ct=r(42958),Et=r(95774);let At=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Et.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,it.Ey)({colorWrite:it.kn})}};At=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],At);var Rt=r(65786);class It extends Rt.Y{constructor(){super(...arguments),this.projScale=1}}class Ot extends It{constructor(){super(...arguments),this.intensity=1}}class Ft extends Rt.Y{}class Nt extends Ft{constructor(){super(...arguments),this.blurSize=(0,D.vt)()}}let Dt=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Mt.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,it.Ey)({colorWrite:it.kn})}};Dt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],Dt);let Pt=class extends Tt{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=Xe.AMBIENT_ILLUMINATION,this.isEnabled=()=>!1,this._enableTime=(0,l.l5)(0),this._passParameters=new Ot,this._drawParameters=new Nt}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new vt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new nt.A(this.renderingContext,t,e),this.addHandles((0,c.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,l.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,a.WD)(this._passParameters.noiseTexture)}precompile(){this.techniques.precompile(Dt),this.techniques.precompile(At)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(rt.nI);if(!r||!i)return;const n=this.techniques.getCompiled(Dt),o=this.techniques.getCompiled(At);if(!n||!o)return this._enableTime=(0,l.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,l.l5)(performance.now()));const a=this.renderingContext,c=this.view.qualitySettings.fadeDuration,u=this.bindParameters,d=u.camera,f=d.relativeElevation,m=(0,s.qE)((5e5-f)/2e5,0,1),p=c>0?Math.min(c,performance.now()-this._enableTime)/c:1,g=p*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/d.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*Bt/(0,Mt.g)(d)**6*g;const v=d.fullViewport[2],_=d.fullViewport[3],x=this.fboCache.acquire(v,_,"ssao input",2);a.bindFramebuffer(x.fbo),a.setViewport(0,0,v,_),a.bindTechnique(n,u,this._passParameters,this._drawParameters),a.screen.draw();const y=Math.round(v/2),w=Math.round(_/2),b=this.fboCache.acquire(y,w,"ssao blur",0);a.bindFramebuffer(b.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,h.hZ)(this._drawParameters.blurSize,0,2/_),a.bindTechnique(o,u,this._passParameters,this._drawParameters),a.setViewport(0,0,y,w),a.screen.draw(),x.release();const T=this.fboCache.acquire(y,w,Xe.AMBIENT_ILLUMINATION,0);return a.bindFramebuffer(T.fbo),a.setViewport(0,0,v,_),a.setClearColor(1,1,1,0),a.clear(16384),this._drawParameters.colorTexture=b.getTexture(),(0,h.hZ)(this._drawParameters.blurSize,2/v,0),a.bindTechnique(o,u,this._passParameters,this._drawParameters),a.setViewport(0,0,y,w),a.screen.draw(),a.setViewport4fv(d.fullViewport),b.release(),p<1&&this.requestRender(2),T}};(0,o.Cg)([(0,u.MZ)()],Pt.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],Pt.prototype,"produces",void 0),(0,o.Cg)([(0,u.MZ)({constructOnly:!0})],Pt.prototype,"isEnabled",void 0),Pt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Pt);const Bt=.5;function Ht(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
563
|
+
}`))}(e,t)}},43730(e,t,r){r.d(t,{n:()=>Ht});var i=r(31821),n=r(12791),o=r(5482),s=r(34727),a=r(97768),c=r(36708),l=r(78659),u=r(91429),h=r(37585),d=r(69540);let f=class extends d.Pw{constructor(e){super(e),this.row=0,this.column=0,this.rows=1,this.columns=1}equals(e){return null!=e&&this.row===e.row&&this.rows===e.rows&&this.column===e.column&&this.columns===e.columns}};(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"rows",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{read:!1,write:!1}})],f.prototype,"columns",void 0),f=(0,o.Cg)([(0,u.$K)("esri.CameraLayout")],f);const m=f;var p=r(69052),g=r(25482),v=r(56507),_=r(86738),x=r(43937),y=r(36005);let w=class extends((0,d.OU)(g.o)){constructor(...e){super(...e),this.position=new _.A([0,0,0]),this.heading=0,this.tilt=0,this.fov=55,this.layout=new m}normalizeCtorArgs(e,t,r,i){if(e&&"object"==typeof e&&("x"in e||Array.isArray(e))){const n={position:e};return null!=t&&(n.heading=t),null!=r&&(n.tilt=r),null!=i&&(n.fov=i),n}return e}writePosition(e,t,r,i){const n=e.clone();n.x=(0,v.GB)(e.x||0),n.y=(0,v.GB)(e.y||0),n.z=e.hasZ?(0,v.GB)(e.z||0):e.z,t[r]=n.write({},i)}readPosition(e,t){const r=new _.A;return r.read(e,t),r.x=(0,v.GB)(r.x||0),r.y=(0,v.GB)(r.y||0),r.z=r.hasZ?(0,v.GB)(r.z||0):r.z,r}equals(e){return null!=e&&this.tilt===e.tilt&&this.heading===e.heading&&this.fov===e.fov&&this.position.equals(e.position)&&this.layout.equals(e.layout)}};(0,o.Cg)([(0,u.MZ)({type:_.A,json:{write:{isRequired:!0}}})],w.prototype,"position",void 0),(0,o.Cg)([(0,x.K)("position")],w.prototype,"writePosition",null),(0,o.Cg)([(0,y.w)("position")],w.prototype,"readPosition",null),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>p.ie.normalize((0,v.GB)(e)))],w.prototype,"heading",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,u.wg)(e=>(0,s.qE)((0,v.GB)(e),-180,180))],w.prototype,"tilt",void 0),(0,o.Cg)([(0,u.MZ)({type:Number,nonNullable:!0,json:{default:55,write:!0}}),(0,u.wg)(e=>(0,s.qE)((0,v.GB)(e,55),1,170))],w.prototype,"fov",void 0),(0,o.Cg)([(0,u.MZ)({type:m,nonNullable:!0,json:{read:!1,write:!1}})],w.prototype,"layout",void 0),w=(0,o.Cg)([(0,u.$K)("esri.Camera")],w);var b=r(9093),T=r(35522),M=r(51850),S=r(16930),C=(r(48353),r(9762),r(65806)),E=r(27993),A=r(73941),R=(r(19419),r(71351)),I=r(69622),O=r(53966),F=r(90629),N=r(58083),D=r(48163),P=r(78955),B=r(91829),H=r(82919),L=r(44280);function z(e,t,r){e.worldUpAtPosition(t,U),(0,T.Re)(G,r,t);const i=(0,T.Bw)(G);return 0===i?0:(0,s.XM)((0,T.Om)(G,U)/i)}const U=(0,M.vt)(),G=(0,M.vt)();var V;let j=V=class extends I.A{constructor(e){super(e),this._ray=(0,R.vt)(),this._viewport=(0,B.fA)(0,0,1,1),this._padding=(0,B.fA)(0,0,0,0),this._fov=55/180*Math.PI,this._nearFar=(0,D.fA)(1,1e3),this._viewDirty=!0,this._viewMatrix=(0,b.vt)(),this._viewProjectionDirty=!0,this._viewProjectionMatrix=(0,b.vt)(),this._viewInverseTransposeMatrixDirty=!0,this._viewInverseTransposeMatrix=(0,b.vt)(),this._frustumDirty=!0,this._frustum=(0,H.vt)(),this._fullViewport=(0,B.vt)(),this._pixelRatio=1,this.row=0,this.column=0,this._rows=1,this._columns=1,this._center=(0,M.vt)(),this._up=(0,M.vt)(),this.relativeElevation=0}get pixelRatio(){return this._pixelRatio}set pixelRatio(e){this._pixelRatio=e>0?e:1}get rows(){return this._rows}set rows(e){this._rows=Math.max(1,e)}get columns(){return this._columns}set columns(e){this._columns=Math.max(1,e)}get eye(){return this._ray.origin}set eye(e){this._compareAndSetView(e,this._ray.origin)}get center(){return this._center}set center(e){this._compareAndSetView(e,this._center,"_center")}get ray(){return(0,T.Re)(this._ray.direction,this.center,this.eye),this._ray}get up(){return this._up}set up(e){this._compareAndSetView(e,this._up,"_up")}get viewMatrix(){return this._ensureViewClean(),this._viewMatrix}set viewMatrix(e){(0,N.C)(this._viewMatrix,e),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0,this._viewProjectionDirty=!0,this._frustumDirty=!0}get viewForward(){return this._ensureViewClean(),(0,T.hZ)((0,M.vt)(),-this._viewMatrix[2],-this._viewMatrix[6],-this._viewMatrix[10])}get viewUp(){return this._ensureViewClean(),(0,T.hZ)((0,M.vt)(),this._viewMatrix[1],this._viewMatrix[5],this._viewMatrix[9])}get viewRight(){return this._ensureViewClean(),(0,T.hZ)((0,M.vt)(),this._viewMatrix[0],this._viewMatrix[4],this._viewMatrix[8])}get nearFar(){return this._nearFar}get near(){return this._nearFar[0]}set near(e){this._nearFar[0]!==e&&(this._nearFar[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get far(){return this._nearFar[1]}set far(e){this._nearFar[1]!==e&&(this._nearFar[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_nearFar"))}get viewport(){return this._viewport}set viewport(e){this.x=e[0],this.y=e[1],this.width=e[2],this.height=e[3]}get screenViewport(){if(1===this.pixelRatio)return this._viewport;const e=(0,P.hs)((0,B.vt)(),this._viewport,1/this.pixelRatio),t=this._get("screenViewport");return t&&(0,P.aI)(e,t)?t:e}get screenPadding(){if(1===this.pixelRatio)return this._padding;const e=(0,P.hs)((0,B.vt)(),this._padding,1/this.pixelRatio),t=this._get("screenPadding");return t&&(0,P.aI)(e,t)?t:e}get x(){return this._viewport[0]}set x(e){e+=this._padding[3],this._viewport[0]!==e&&(this._viewport[0]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get y(){return this._viewport[1]}set y(e){e+=this._padding[2],this._viewport[1]!==e&&(this._viewport[1]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get width(){return this._viewport[2]}set width(e){this._viewport[2]!==e&&(this._viewport[2]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get height(){return this._viewport[3]}set height(e){this._viewport[3]!==e&&(this._viewport[3]=e,this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_viewport"))}get fullWidth(){return this._viewport[2]+this._padding[1]+this._padding[3]}set fullWidth(e){this.width=e-(this._padding[1]+this._padding[3])}get fullHeight(){return this._viewport[3]+this._padding[0]+this._padding[2]}set fullHeight(e){this.height=e-(this._padding[0]+this._padding[2])}get fullViewport(){return this._fullViewport[0]=this._viewport[0]-this._padding[3],this._fullViewport[1]=this._viewport[1]-this._padding[2],this._fullViewport[2]=this.fullWidth,this._fullViewport[3]=this.fullHeight,this._fullViewport}get _aspect(){return this.width/this.height}get padding(){return this._padding}set padding(e){(0,P.t2)(this._padding,e)||(this._viewport[0]+=e[3]-this._padding[3],this._viewport[1]+=e[2]-this._padding[2],this._viewport[2]-=e[1]+e[3]-(this._padding[1]+this._padding[3]),this._viewport[3]-=e[0]+e[2]-(this._padding[0]+this._padding[2]),(0,P.C)(this._padding,e),this._viewProjectionDirty=!0,this._frustumDirty=!0,this.notifyChange("_padding"),this.notifyChange("_viewport"))}get viewProjectionMatrix(){return this._viewProjectionDirty&&((0,N.lw)(this._viewProjectionMatrix,this.projectionMatrix,this.viewMatrix),this._viewProjectionDirty=!1),this._viewProjectionMatrix}get projectionMatrix(){return this._projectionMatrixInternal}get inverseProjectionMatrix(){return(0,N.B8)((0,b.vt)(),this.projectionMatrix)||this._get("inverseProjectionMatrix")||(0,b.vt)()}get fov(){return this._fov}set fov(e){this._fov=e,this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovX(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(t*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovX(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/t)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get fovY(){return e=this._fov,t=this.width,r=this.height,2*Math.atan(r*Math.tan(.5*e)/Math.sqrt(t*t+r*r));var e,t,r}set fovY(e){this._fov=function(e,t,r){return 2*Math.atan(Math.sqrt(t*t+r*r)*Math.tan(.5*e)/r)}(e,this.width,this.height),this._viewProjectionDirty=!0,this._frustumDirty=!0}get distance(){return(0,T.Io)(this.center,this.eye)}get frustum(){return this._recomputeFrustum(),this._frustum}get viewInverseTransposeMatrix(){return(this._viewInverseTransposeMatrixDirty||this._viewDirty)&&((0,N.B8)(this._viewInverseTransposeMatrix,this.viewMatrix),(0,N.mg)(this._viewInverseTransposeMatrix,this._viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),this._viewInverseTransposeMatrix}depthNDCToWorld(e){const{near:t,far:r}=this;return 2*t*r/(r+t-e*(r-t))}get perRenderPixelRatio(){return Math.tan(this.fovX/2)/(this.width/2)}get perScreenPixelRatio(){return this.perRenderPixelRatio*this.pixelRatio}get aboveGround(){return null!=this.relativeElevation&&this.relativeElevation>=0}get _projectionMatrixInternal(){const e=this.width,t=this.height,r=this.near*Math.tan(this.fovY/2)*2,i=r*this._aspect,n=r/this.rows,o=i/this.columns,s=-i/2+this.column*o,a=s+o,c=-r/2+this.row*n,l=c+n,u=(0,N.$h)((0,b.vt)(),s*(1+2*this._padding[3]/e),a*(1+2*this._padding[1]/e),c*(1+2*this._padding[2]/t),l*(1+2*this._padding[0]/t),this.near,this.far),h=this._get("projectionMatrix");return h&&(0,N.aI)(h,u)?h:u}copyFrom(e){(0,T.C)(this._ray.origin,e.eye),this.center=e.center,this.up=e.up,(0,P.C)(this._viewport,e.viewport),this.notifyChange("_viewport"),(0,P.C)(this._padding,e.padding),this.notifyChange("_padding"),(0,h.C)(this._nearFar,e.nearFar),this.notifyChange("_nearFar"),this._fov=e.fov,this.row=e.row,this.column=e.column,this.rows=e.rows,this.columns=e.columns,this.relativeElevation=e.relativeElevation;const t=e;return this._viewDirty=t._viewDirty,this._viewDirty||((0,N.C)(this._viewMatrix,e.viewMatrix),this.notifyChange("_viewMatrix")),this._viewProjectionDirty=!0,this._frustumDirty=t._frustumDirty,this._frustumDirty||((0,H.C)(this._frustum,e.frustum),this._frustumDirty=!1),t._viewInverseTransposeMatrixDirty?this._viewInverseTransposeMatrixDirty=!0:((0,N.C)(this._viewInverseTransposeMatrix,e.viewInverseTransposeMatrix),this._viewInverseTransposeMatrixDirty=!1),(0,P.C)(this._fullViewport,e.fullViewport),this.pixelRatio=e.pixelRatio,this}copyViewFrom(e){this.eye=e.eye,this.center=e.center,this.up=e.up,this.fov=e.fov}clone(){return(new V).copyFrom(this)}equals(e){return(0,T.t2)(this.eye,e.eye)&&(0,T.t2)(this.center,e.center)&&(0,T.t2)(this.up,e.up)&&(0,P.t2)(this._viewport,e.viewport)&&(0,P.t2)(this._padding,e.padding)&&(0,h.t2)(this.nearFar,e.nearFar)&&this._fov===e.fov&&this.pixelRatio===e.pixelRatio&&this.relativeElevation===e.relativeElevation&&this.row===e.row&&this.column===e.column&&this.rows===e.rows&&this.columns===e.columns}almostEquals(e){const t=Math.max(1,1/this.pixelRatio,1/e.pixelRatio);if(Math.abs(e.fov-this._fov)>=.001||(0,P.hG)(e.screenPadding,this.screenPadding)>=t||(0,P.hG)(this.screenViewport,e.screenViewport)>=t||this.row!==e.row||this.column!==e.column||this.rows!==e.rows||this.columns!==e.columns)return!1;(0,T.jb)($,e.eye,e.center),(0,T.jb)(Z,this.eye,this.center);const r=(0,T.Om)($,Z),i=(0,T.uE)($),n=(0,T.uE)(Z),o=5e-4;return r*r>=(1-1e-10)*i*n&&(0,T.lo)(e.eye,this.eye)<Math.max(i,n)*o*o}computeRenderPixelSizeAt(e){return this.computeRenderPixelSizeAtDist(this._viewDirectionDistance(e))}computeRenderPixelSizeAtDist(e){return e*this.perRenderPixelRatio}computeScreenPixelSizeAt(e){return this.computeScreenPixelSizeAtDist(this._viewDirectionDistance(e))}_viewDirectionDistance(e){return Math.abs((0,L.gr)(this.viewForward,(0,T.Re)($,e,this.eye)))}computeScreenPixelSizeAtDist(e){return e*this.perScreenPixelRatio}computeDistanceFromRadius(e,t){return e/Math.tan(Math.min(this.fovX,this.fovY)/(2*(t||1)))}getScreenCenter(e=(0,F.gs)()){return e[0]=(this.padding[3]+this.width/2)/this.pixelRatio,e[1]=(this.padding[0]+this.height/2)/this.pixelRatio,e}getRenderCenter(e,t=.5,r=.5){return e[0]=this.padding[3]+this.width*t,e[1]=this.padding[2]+this.height*r,e[2]=.5,e}setGLViewport(e){const t=this.viewport,r=this.padding;e.setViewport(t[0]-r[3],t[1]-r[2],t[2]+r[1]+r[3],t[3]+r[0]+r[2])}applyProjection(e,t){e!==k&&(0,T.C)(k,e),k[3]=1,(0,P.Z0)(k,k,this.projectionMatrix);const r=Math.abs(k[3]);(0,T.hs)(k,k,1/r);const i=this.fullViewport;t[0]=(0,s.Cc)(0,i[0]+i[2],.5+.5*k[0]),t[1]=(0,s.Cc)(0,i[1]+i[3],.5+.5*k[1]),t[2]=.5*(k[2]+1),t[3]=r}unapplyProjection(e,t){const r=this.fullViewport;k[0]=(e[0]/(r[0]+r[2])*2-1)*e[3],k[1]=(e[1]/(r[1]+r[3])*2-1)*e[3],k[2]=(2*e[2]-1)*e[3],k[3]=e[3],null!=this.inverseProjectionMatrix&&((0,P.Z0)(k,k,this.inverseProjectionMatrix),t[0]=k[0],t[1]=k[1],t[2]=k[2])}projectToScreen(e,t){return this.projectToRenderScreen(e,q),this.renderToScreen(q,t),t}projectToRenderScreen(e,t){if(k[0]=e[0],k[1]=e[1],k[2]=e[2],k[3]=1,(0,P.Z0)(k,k,this.viewProjectionMatrix),0===k[3])return null;const r=k;(0,T.hs)(r,r,1/Math.abs(k[3]));const i=this.fullViewport,n=(0,s.Cc)(0,i[0]+i[2],.5+.5*r[0]),o=(0,s.Cc)(0,i[1]+i[3],.5+.5*r[1]);return"x"in t?(t.x=n,t.y=o):(t[0]=n,t[1]=o,t.length>2&&(t[2]=.5*(r[2]+1))),t}unprojectFromScreen(e,t){return this.unprojectFromRenderScreen(this.screenToRender(e,q),t)}unprojectFromRenderScreen(e,t){if((0,N.lw)(W,this.projectionMatrix,this.viewMatrix),!(0,N.B8)(W,W))return null;const r=this.fullViewport;return k[0]=2*(e[0]-r[0])/r[2]-1,k[1]=2*(e[1]-r[1])/r[3]-1,k[2]=2*e[2]-1,k[3]=1,(0,P.Z0)(k,k,W),0===k[3]?null:(t[0]=k[0]/k[3],t[1]=k[1]/k[3],t[2]=k[2]/k[3],t)}constrainWindowSize(e,t,r,i){const n=e*this.pixelRatio,o=t*this.pixelRatio,s=Math.max(n-r/2,0),a=Math.max(this.fullHeight-o-i/2,0),c=-Math.min(n-r/2,0),l=-Math.min(this.fullHeight-o-i/2,0),u=r-c- -Math.min(this.fullWidth-n-r/2,0),h=i-l- -Math.min(o-i/2,0);return[Math.round(s),Math.round(a),Math.round(u),Math.round(h)]}computeUp(e){1===e?this._computeUpGlobal():this._computeUpLocal()}screenToRender(e,t){const r=e[0]*this.pixelRatio,i=this.fullHeight-e[1]*this.pixelRatio;return t[0]=r,t[1]=i,t}renderToScreen(e,t){const r=e[0]/this.pixelRatio,i=(this.fullHeight-e[1])/this.pixelRatio;t[0]=r,t[1]=i}sphereFrustumCoverage(e,t){const{center:r,eye:i,distance:n,fovY:o}=this,s=Math.abs(Math.PI/2-z(t,r,i));return e.frustumCoverage(s,n,o)}_computeUpGlobal(){(0,T.Re)($,this.center,this.eye);const e=(0,T.Bw)(this.center);e<1?(0,T.t2)(this._up,M.Cb)&&((0,T.C)(this._up,M.Cb),this._markViewDirty(),this.notifyChange("_up")):Math.abs((0,T.Om)($,this.center))>.9999*(0,T.Bw)($)*e||((0,T.$A)(Z,$,this.center),(0,T.$A)(Z,Z,$),(0,T.S8)(Z,Z),(0,T.t2)(this._up,Z)||((0,T.C)(this._up,Z),this.notifyChange("_up"),this._markViewDirty()))}_computeUpLocal(){(0,T.oW)($,this.eye,this.center),Math.abs($[2])<=.9999&&((0,T.hs)($,$,$[2]),(0,T.hZ)($,-$[0],-$[1],1-$[2]),(0,T.S8)($,$),(0,T.t2)(this._up,$)||((0,T.C)(this._up,$),this.notifyChange("_up"),this._markViewDirty()))}_compareAndSetView(e,t,r=""){"number"==typeof e[0]&&isFinite(e[0])&&"number"==typeof e[1]&&isFinite(e[1])&&"number"==typeof e[2]&&isFinite(e[2])?(0,T.t2)(e,t)||((0,T.C)(t,e),this._markViewDirty(),r.length&&this.notifyChange(r)):O.A.getLogger("esri.views.3d.webgl-engine.lib.RenderCamera").warn("RenderCamera vector contains invalid number, ignoring value")}_markViewDirty(){this._viewDirty=!0,this._frustumDirty=!0,this._viewProjectionDirty=!0}_recomputeFrustum(){this._frustumDirty&&((0,H.ui)(this.viewMatrix,this.projectionMatrix,this._frustum),this._frustumDirty=!1)}_ensureViewClean(){this._viewDirty&&((0,N.t5)(this._viewMatrix,this.eye,this.center,this.up),this.notifyChange("_viewMatrix"),this._viewDirty=!1,this._viewInverseTransposeMatrixDirty=!0)}};(0,o.Cg)([(0,u.MZ)()],j.prototype,"_viewport",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_padding",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_fov",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_nearFar",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_viewDirty",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_viewMatrix",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_pixelRatio",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"pixelRatio",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"row",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"column",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_rows",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"rows",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_columns",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"columns",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"eye",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"center",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_center",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"up",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"_up",void 0),(0,o.Cg)([(0,u.MZ)()],j.prototype,"viewMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"viewForward",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"viewUp",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"viewRight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"nearFar",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"near",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"far",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"viewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"screenViewport",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"screenPadding",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"x",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"y",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"width",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"height",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fullWidth",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fullHeight",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"_aspect",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"padding",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"projectionMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"inverseProjectionMatrix",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fov",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fovX",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"fovY",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"viewInverseTransposeMatrix",null),(0,o.Cg)([(0,u.MZ)({readOnly:!0})],j.prototype,"_projectionMatrixInternal",null),(0,o.Cg)([(0,u.MZ)()],j.prototype,"relativeElevation",void 0),j=V=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl.RenderCamera")],j);const k=(0,B.vt)(),W=(0,b.vt)(),$=(0,M.vt)(),Z=(0,M.vt)(),q=(0,F.r_)();r(49718),r(6867),r(16396),(0,M.vt)(),(0,M.vt)(),(0,M.vt)();var Y=r(5443),X=r(39829),J=r(95108);function K(e,t,r,i){const n=function(e,t){const r=0===t||2===t?0:1,i=e[t],n=0===t||1===t?1:-1,o=0===r?1:0;return(e,t,s)=>{if(t[r]<i&&s[r]<i)return 1===n?0:1;if(t[r]>i&&s[r]>i)return 1===n?1:0;const a=(s[o]-t[o])/(s[r]-t[r]),c=t[o]+a*(i-t[r]);return e[r]=i,e[o]=c,(t[r]<i?1:-1)*n>0?2:3}}(r,i);if(e.length=0,t.length){1===n(ee,t[0],t[0])&&Q(e,t[0]);for(let r=0;r<t.length;r++){const i=t[r===t.length-1?0:r+1];switch(n(ee,t[r],i)){case 1:Q(e,i);break;case 3:Q(e,(0,D.o8)(ee));break;case 2:Q(e,(0,D.o8)(ee)),Q(e,i)}}}}function Q(e,t){0!==e.length&&(0,h.aI)(e.at(-1),t)||e.push(t)}const ee=(0,D.vt)();var te=r(11964),re=r(27921);const ie=(0,M.vt)(),ne=(0,M.vt)();function oe(){return{direction:(0,M.vt)(),up:(0,M.vt)()}}function se(e,t,r,i,n){let o=(0,T.S8)(ie,e),a=(0,T.Om)(o,i);const c=a>0;a=Math.abs(a),a>.99&&(a=Math.abs((0,T.Om)(t,i)),a<.99?((0,T.C)(o,t),c&&(0,T.hs)(o,o,-1)):o=null);let l=0;if(o){(0,T.hs)(ne,i,(0,T.Om)(i,o)),(0,T.Re)(o,o,ne);const e=(0,T.Om)(o,n)/((0,T.Bw)(o)*(0,T.Bw)(n));(0,T.$A)(ne,o,n),l=((0,T.Om)(ne,i)>0?1:-1)*(0,s.KJ)((0,s.XM)(e))}const u=(0,s.KJ)((0,s.XM)(-(0,T.Om)(i,e)/(0,T.Bw)(e)));return r?(r.heading=l,r.tilt=u,r):{heading:l,tilt:u}}function ae(e,t,r,i){(0,T.Re)(ce,r,t),(0,re.T7)(i,(0,te.LV)(t,ce),e)||e===r||(0,T.C)(e,r)}const ce=(0,M.vt)(),le=(0,M.fA)(0,1,0),ue=(0,M.fA)(0,0,1),he=(0,b.vt)(),de=(0,M.vt)(),fe=(0,M.vt)();function me(e,t,r,i=oe()){const{direction:n,up:o}=i;return(0,N.N9)(he,-(0,s.kU)(t)),(0,N.eL)(he,he,(0,s.kU)(r)),(0,T.Z0)(n,ue,he),(0,T.hs)(n,n,-1),(0,T.Z0)(o,le,he),i}function pe(e,t,r,i,n){const o=t.lines[11].direction,s=(n-r.getAltitude(i))/o[2];(0,T.Ln)(e,i,o,s)}const ge=(0,M.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){return se(t,r,i,ue,le)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n=me(0,r,i),o=(0,M.vt)();return(0,T.hs)(o,n.direction,-t),(0,T.WQ)(o,o,e),{up:n.up,eye:o,heading:r,tilt:i}},eyeTiltToLookAtTilt:function(e){return(0,s.kU)(e)},headingTiltToDirectionUp:me,lookAtTiltToEyeTilt:function(e){return(0,s.KJ)(e)},toArea:function(e,t){const r=e.frustum,{renderCoordsHelper:i}=e,n=i.getAltitude(t),o=e.spatialReference,s=e.state.camera.eye,a=[],c=r.planes[5];for(let e=0;e<4;e++){const t=r.lines[e];i.intersectInfiniteManifold((0,R.LV)(t.origin,t.direction),n,ge)||pe(ge,r,i,t.endpoint,n),ae(ge,s,ge,c),a.push((0,D.fA)(ge[0],ge[1]))}return function(e,t,r){const i=e.map(e=>((0,T.hZ)(ge,e[0],e[1],0),t.fromRenderCoords(ge,ge,r),[ge[0],ge[1]]));return i.length<=2?new X.A({spatialReference:r}):(i.push(i[0].slice()),(0,J.$3)(i)||i.reverse(),new X.A({rings:[i],spatialReference:r}))}(function(e,t){const r=[],i=[];return K(r,e,t,0),K(i,r,t,1),K(r,i,t,2),K(i,r,t,3),i}(a,i.extent),i,o)},toExtent:function(e,t,r,i,n){const o=e.renderSpatialReference,s=e.spatialReference??t.spatialReference;return(0,C.g)(t,de,o),(0,C.g)(t,fe,o),de[0]-=r/2,fe[0]+=r/2,de[1]-=i/2,fe[1]+=i/2,(0,E.F)(de,o,de,s),(0,E.F)(fe,o,fe,s),n?(n.xmin=de[0],n.ymin=de[1],n.xmax=fe[0],n.ymax=fe[1],n.spatialReference=s):n=new Y.A(de[0],de[1],fe[0],fe[1],s),n}},Symbol.toStringTag,{value:"Module"}));var ve=r(34304),_e=r(17136),xe=r(94008),ye=r(28735);class we{get planes(){return this.frustum}get points(){return this._points}get mutablePoints(){return this._points}get direction(){return this._direction}get origin(){return this._origin}get boundingSphere(){return this._boundingSphereDirty&&this._updateBoundingSphere(),this._boundingSphere}constructor(e){this.renderCoordsHelper=e,this.frustum=(0,H.vt)(),this._points=(0,H.Qy)(),this.lines=new Array(12),this._origin=(0,M.vt)(),this._direction=(0,M.vt)(),this._boundingSphere=new xe.iy,this._altitude=null,this._boundingSphereDirty=!0;for(let e=0;e<12;e++)this.lines[e]={origin:null,direction:(0,M.vt)(),endpoint:null}}update(e){(0,H.ui)(e.viewMatrix,e.projectionMatrix,this.frustum,this._points),(0,T.C)(this._origin,e.eye),(0,T.C)(this._direction,e.viewForward),this._altitude=this.renderCoordsHelper.getAltitude(this._origin),this._updateLines(),this._boundingSphereDirty=!0}updatePoints(e){for(let t=0;t<this._points.length;t++)(0,T.C)(this._points[t],e[t]);(0,H.DV)(this.frustum,this._points),this._updateLines()}get altitude(){return this._altitude}intersectsSphere(e){return(0,H.m7)(this.frustum,e)}intersectsRay(e){return(0,H.pw)(this.frustum,e)}intersectsLineSegment(e,t){return(0,H.ST)(this.frustum,e,t)}intersectsPoint(e){return(0,H.bU)(this.frustum,e)}_updateLines(){const e=this._points;for(let t=0;t<4;t++){const r=t+4;be(this.lines[t],e[t],e[r]),be(this.lines[t+4],e[t],3===t?e[0]:e[t+1]),be(this.lines[t+8],e[r],3===t?e[4]:e[r+1])}}_updateBoundingSphere(){const{origin:e}=this,t=Me;(0,T.S8)(t,this.direction);const r=Te;(0,T.jb)(r,this.points[4],e);const i=.5*(0,T.Om)(r,r)/(0,T.Om)(t,r),n=this._boundingSphere,o=(0,T.Ln)(Se,e,t,i);n.center=o,n.radius=i}static{this.planePointIndices=H.c8}static{this.nearFarLineIndices=[[0,4],[1,5],[2,6],[3,7]]}}function be(e,t,r){e.origin=t,e.endpoint=r,(0,T.oW)(e.direction,t,r)}const Te=(0,M.vt)(),Me=(0,M.vt)(),Se=(0,M.vt)();r(86211);const Ce=(0,M.fA)(5802e-9,13558e-9,331e-7),Ee=(0,M.fA)(65e-8*3,5643e-9,255e-9);(0,M.fA)(Ce[0]+Ee[0],Ce[1]+Ee[1],Ce[2]+Ee[2]);class Ae{constructor(e=1/0,t=-1/0){this.near=e,this.far=t}set(e,t){this.near=e,this.far=t}union(e){return null!=e&&(this.near=Math.min(this.near,e.near),this.far=Math.max(this.far,e.far)),this}within(e){return this.near<=e&&e<=this.far}equals(e){return this.near===e.near&&this.far===e.far}static{this.Zero=new Ae(0,0)}static{this.Infinite=new Ae}}(0,M.vt)(),(0,M.vt)(),new xe.iy,(0,R.vt)(),new Y.A({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0});var Re=r(32728);const Ie=(0,M.fA)(0,0,1),Oe=(0,T.S8)((0,M.vt)(),(0,M.fA)(1,1,1)),Fe=(0,b.vt)(),Ne=(0,M.vt)(),De=(0,M.vt)();function Pe(e,t,r,i=oe()){(0,T.$A)(Ne,e,Ie),0===(0,T.Om)(Ne,Ne)&&(0,T.$A)(Ne,e,Oe),(0,N.$0)(Fe,-(0,s.kU)(t),e),(0,N.e$)(Fe,Fe,-(0,s.kU)(r),Ne);const{up:n,direction:o}=i;return(0,T.$A)(n,Ne,e),(0,T.S8)(n,n),(0,T.Z0)(n,n,Fe),(0,T.S8)(o,e),(0,T.ze)(o,o),(0,T.Z0)(o,o,Fe),i}function Be(e){const t=e[1];e[1]=-e[2],e[2]=t}function He(e,t){const r=Pe(t,e.heading,e.tilt);return e.up=r.up,e}function Le(e,t){const r=[],i=[],n=(0,ve.FD)();for(let o=0;o<e.length;o++){const s=e[o],a=o===e.length-1?e[0]:e[o+1],c=(0,te.Cr)(s,a,$e),l=(0,re.vE)(t,c.origin,c.vector,0,ke);switch(l){case 2:r.push(s);break;case 3:i.push(s);break;case 0:case 1:{const[e,o,a]=0===l?[1,r,i]:[-1,i,r],c=(0,re.Qj)(t),u=(0,T.Ln)((0,M.vt)(),ke,c,e*n),h=(0,T.Ln)((0,M.vt)(),ke,c,e*-n);o.push(s),o.push(u),a.push(h)}}}const o=[];return r.length&&o.push(r),i.length&&o.push(i),o}const ze={minCurvature:(0,s.kU)(5),maxCurvature:(0,s.kU)(50),minSamples:1,maxSamples:6},Ue=(0,M.fA)(1,0,0),Ge=(0,M.fA)(0,1,0),Ve=(0,M.vt)(),je=(0,M.vt)(),ke=(0,M.vt)(),We=new xe.iy,$e=(0,te.vt)(),Ze=(0,B.vt)();Object.freeze(Object.defineProperty({__proto__:null,directionToHeadingTilt:function(e,t,r,i){const n=Ne,o=De;return(0,T.S8)(n,e),(0,T.$A)(De,n,Ie),0===(0,T.Om)(De,De)&&(0,T.$A)(De,n,Oe),(0,T.$A)(o,De,n),se(t,r,i,n,o)},eyeForCenterWithHeadingTilt:function(e,t,r,i){const n={eye:(0,M.vt)(),up:null,tilt:i,heading:r},o=Ne;o[0]=e[0],o[1]=e[2],o[2]=-e[1];const a=t,c=(0,s.kU)(r),l=(0,s.kU)(i),u=Math.sin(c),h=Math.cos(c),d=Math.sin(l),f=Math.cos(l),m=(0,T.Bw)(o);let p;if(Math.abs(l)<1e-8)p=a+m;else{const e=m/d,t=(0,s.YN)(a/e),r=Math.PI-l-t;p=e*Math.sin(r)}const g=f*a,v=a*a*(d*d),_=h*h*v,x=p-g,y=x*x,w=_*(_+y-o[1]*o[1]);if(w<0)return(0,T.hs)(n.eye,o,p/m),n.tilt=0,He(n,e);const b=Math.sqrt(w),S=o[1]*x,C=_+y;let E;if(E=h>0?-b+S:b+S,Math.abs(C)<1e-8)return m<1e-8?(n.eye[0]=0,n.eye[1]=0,n.eye[2]=a):(0,T.hs)(n.eye,o,p/m),n.tilt=0,Be(n.eye),He(n,e);n.eye[1]=E/C;const A=u*u*v,R=d*a,I=h*R*n.eye[1],O=n.eye[1]*n.eye[1],F=1-O,N=Math.sqrt(F),D=_*O+A-2*I*N*x+F*y;return Math.abs(D)<1e-8?((0,T.hs)(n.eye,o,p/m),n.tilt=0,Be(n.eye),He(n,e)):(n.eye[0]=(F*(p*o[0]-g*o[0])-R*N*(o[0]*n.eye[1]*h+o[2]*u))/D,n.eye[2]=(F*(p*o[2]-g*o[2])-R*N*(o[2]*n.eye[1]*h-o[0]*u))/D,(0,T.hs)(n.eye,n.eye,p),Be(n.eye),He(n,e))},eyeTiltToLookAtTilt:function(e,t,r){const i=(0,s.kU)(e),n=(0,T.Bw)(t);return(0,s.YN)(r/(n/Math.sin(i)))+i},headingTiltToDirectionUp:Pe,lookAtTiltToEyeTilt:function(e,t,r){const i=(0,T.Bw)(t),n=Math.sqrt(r*r+i*i-2*r*i*Math.cos(Math.PI-e)),o=(0,s.YN)(r/(n/Math.sin(e)));return(0,s.KJ)(e-o)},toArea:function(e,t){const{renderCoordsHelper:r}=e,i=e.state.camera.clone(),n=new we(r);i.near=2,n.update(i);const o=r.getAltitude(t),a=e.spatialReference,c=r.referenceEllipsoid.radius,l=i.eye,u=1+(0,T.Io)(l,t)/(c+o),h=Math.sqrt(u*u-1),{minCurvature:d,maxCurvature:f,minSamples:m,maxSamples:p}=ze,g=function(e){const{renderCoordsHelper:t,state:r}=e,i=Math.abs(t.getAltitude(r.camera.center));return We.radius=t.referenceEllipsoid.radius+i,r.camera.sphereFrustumCoverage(We,t)}(e),v=(0,s.qE)((h-d)/(f-d),0,1),_=Math.round((0,s.Cc)(m,p,v)),x=i.aboveGround,y=n.planes[5],w=[],b=(0,re.O_)(M.uY,Ue,(0,re.vt)()),S=(0,re.O_)(M.uY,Ge,(0,re.vt)());(0,P.hZ)(Ze,0,0,0,0);const C=e=>{};for(let e=0;e<4;e++){const t=1===e&&!x||3===e&&x?1-g:0,i=1===e&&x||3===e&&!x?g:1,a=n.lines[e],c=n.lines[3===e?0:e+1];for(let n=0;n<_;n++){const u=n/_,h=0===n?0:(0,s.Cc)(t,i,1===e?1-(1-u)**2:3===e?u**2:u),d=(0,T.Cc)(je,a.origin,c.origin,h),f=(0,Re.nu)(a.direction,c.direction,h,Ve);r.intersectManifoldClosestSilhouette((0,R.LV)(d,f),o,ke),ae(ke,l,ke,y),w.push((0,M.o8)(ke)),0!==w.length&&C((0,T.lo)(w.at(-1),ke));const m=((0,re.Tj)(b,ke)?1:0)|((0,re.Tj)(S,ke)?2:0);Ze[m]=1}}w.length>2&&(0,T.lo)(w[0],w.at(-1));const E=function(e,t,r){const i=2*(0,ve.FD)();return e.map(e=>{const n=[];let o=!1;for(const s of e)t.fromRenderCoords(s,ke,r),Math.abs(s[0])<i&&Math.abs(s[1])<i?(n.push([null,ke[1]]),n.push([null,ke[1]]),o=!0):n.push([ke[0],ke[1]]);if(o)for(let e=0;e<n.length;e++){const t=n[e];if(null!=t[0])continue;const r=n[e+1],i=n.at(0===e?-1:e-1);t[0]=i[0],e++;const o=n.at(e===n.length-1?0:e+1);r[0]=o[0]}return n.push(n[0]),(0,J.$3)(n)||n.reverse(),n})}((0,P.m3)(Ze)>1?function(e,t){const r=[];for(const i of e)r.push(...Le(i,t));return r}(Le(w,b),S):[w],r,a);return new X.A({rings:E,spatialReference:a})},toExtent:function(e,t,r,i,n){let o,a,c,l;const u=t.latitude,h=(0,A.tO)(e.spatialReference).radius,d=t.longitude,f=function(e,t,r){const i=t/r,n=(0,s.kU)(e),o=Math.sin(i/2),a=Math.cos(n),c=2*(0,s.YN)(Math.sqrt(o*o/(a*a)));return(0,s.KJ)(c)}(u,r,h)/2;o=d-f,a=d+f;const m=(0,s.kU)(u),g=(1+Math.sin(m))/(1-Math.sin(m)),v=(g+1)*Math.tan(i/h/2),_=v*v;function x(e){const t=Math.PI/2;return(e=p.uC.normalize(e,-t))>t&&(e=Math.PI-e),e}if(c=1.5*Math.PI-2*Math.atan(.5*(v+Math.sqrt(4*g+_))),l=c+i/h,c=x(c),l=x(l),l<c){const e=l;l=c,c=e}if(c=Math.max((0,s.KJ)(c),-90),l=Math.min((0,s.KJ)(l),90),a=_e.Y_.monotonic(o,a),a-o>180){const e=(a-o-180)/2;o+=e,a-=e}const y=e.spatialReference&&e.spatialReference.isGeographic?e.spatialReference:S.A.WGS84;return n?(n.xmin=o,n.ymin=c,n.xmax=a,n.ymax=l,n.spatialReference=y):n=new Y.A(o,c,a,l,y),e.spatialReference&&e.spatialReference.isWebMercator&&(0,ye.Gh)(n,!1,n),n}},Symbol.toStringTag,{value:"Module"}));const qe="composite-color",Ye=["final-color",qe,"opaque-color","transparent-color"],Xe={ANTIALIASING:"aa-color",CUTFILL_COLOR:"cutfill-color",CUTFILL_COMPUTATION:"cutfill-computation",FOCUSAREA_COLOR:"focusarea-color",FOCUSAREA:"focusarea",PRE_TRANSPARENT:"pre-transparent",HIGHLIGHT_COLOR:"highlight-color",LASERLINES:"laserlines",MAGNIFIER:"magnifier",OCCLUDED:"occluded",OPAQUE_ENVIRONMENT:"opaque-environment",AMBIENT_ILLUMINATION:"ambient-illumination",TRANSPARENT_ENVIRONMENT:"transparent-environment",VIEWSHED:"viewshed"};Array.from(Object.values(Xe)).concat(Ye),(0,M.vt)();var Je=r(49186),Ke=r(10107),Qe=r(64108),et=r(44208),tt=(r(17676),r(94656)),rt=r(63907);r(93637),r(4576),new Set(["GL_OES_standard_derivatives","GL_EXT_frag_depth","GL_EXT_draw_buffers","GL_EXT_shader_texture_lod"]),new Map,(0,et.A)("esri-tests-disable-gpu-memory-measurements"),(0,tt.en)();(0,tt.en)();var it=r(90644),nt=r(76284),ot=r(48852),st=r(42293);const at=!!(0,et.A)("esri-tests-disable-gpu-memory-measurements");class ct{constructor(e,t){this._context=e,this._descriptor=t,this.type=2,this._context.instanceCounter.increment(rt.vt.Renderbuffer,this);const r=this._context.gl;this.glName=r.createRenderbuffer(),this._context.bindRenderbuffer(this);const{width:i,height:n,internalFormat:o,multisampled:s}=t;s?r.renderbufferStorageMultisample(r.RENDERBUFFER,this.samples,o,i,n):r.renderbufferStorage(r.RENDERBUFFER,o,i,n),this._context.bindRenderbuffer(null)}get descriptor(){return this._descriptor}get samples(){const e=this._descriptor.samples,t=this._context.parameters.maxSamples;return e?Math.min(e,t):t}get usedMemory(){return at?0:(e=this._descriptor).width<=0||e.height<=0||null==e.internalFormat?0:e.width*e.height*(0,st.MW)(e.internalFormat);var e}resize(e,t){const r=this._descriptor;if(r.width===e&&r.height===t)return;r.width=e,r.height=t;const i=this._context.gl;this._context.bindRenderbuffer(this),r.multisampled?i.renderbufferStorageMultisample(i.RENDERBUFFER,this.samples,r.internalFormat,r.width,r.height):i.renderbufferStorage(i.RENDERBUFFER,r.internalFormat,r.width,r.height),this._context.bindRenderbuffer(null)}dispose(){this._context&&(this._context.gl.deleteRenderbuffer(this.glName),this._context.instanceCounter.decrement(rt.vt.Renderbuffer,this),this._context=null)}}class lt{constructor(e,t,r){if(this._context=e,this._glName=null,this._colorAttachments=new Map,this._depthStencilBuffer=null,this._depthStencilTexture=null,this._initialized=!1,e.instanceCounter.increment(rt.vt.FramebufferObject,this),null!=t){const r=function(e,t){return ut(t)||ht(t)?t:dt(t)?new nt.A(e,t):function(e){return 3===ft(e)||null!=e&&"samples"in e}(t)?new ct(e,t):null}(e,t);null!=r&&(this._colorAttachments.set(rt.r6,r),ut(r)?this._validateTextureDescriptor(r.descriptor):this._validateRenderbufferDescriptor(r.descriptor)),this._validateColorAttachmentPoint(rt.r6)}if(null!=r)if(function(e){return ut(e)||dt(e)}(r))this._depthStencilTexture=ut(r)?r:new nt.A(e,r),this._validateTextureDescriptor(this._depthStencilTexture.descriptor);else{const t=ht(r)?r:new ct(e,r);this._depthStencilBuffer=t,this._validateRenderbufferDescriptor(t.descriptor)}}dispose(){const{_colorAttachments:e,_glName:t}=this;if(0===e.size&&!this._depthStencilBuffer&&!this._depthStencilTexture&&!t)return;const{_context:r}=this,i=r.getBoundFramebufferObject(),n=Array.from(e.values());this.detachColorTextures(...e.keys()),n.forEach(e=>e.dispose()),this.detachDepthStencilBuffer()?.dispose(),this.detachDepthStencilTexture()?.dispose(),r.gl.deleteFramebuffer(t),this._glName=null,r.bindFramebuffer(i===this?null:i),r.instanceCounter.decrement(rt.vt.FramebufferObject,this)}get glName(){return this._glName}get colorTexture(){const e=this._colorAttachments.get(rt.r6);return ut(e)?e:null}get depthStencil(){return this._depthStencilTexture||this._depthStencilBuffer}get depthStencilTexture(){return this._depthStencilTexture}get width(){const e=this._colorAttachments.get(rt.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.width??0}get height(){const e=this._colorAttachments.get(rt.r6)??this._depthStencilTexture??this._depthStencilBuffer;return e?.descriptor?.height??0}get usedMemory(){return[...this._colorAttachments].reduce((e,[t,r])=>e+r.usedMemory,this.depthStencil?.usedMemory??0)}static{this._MAX_COLOR_ATTACHMENTS=-1}getColorTexture(e){const t=this._colorAttachments.get(e);return t&&ut(t)?t:null}get colorAttachments(){return Array.from(this._colorAttachments.keys())}attachColorTexture(e,t=rt.r6){if(!e)return;this._validateColorAttachmentPoint(t);const{descriptor:r}=e;this._validateTextureDescriptor(r),this.detachColorTexture(t)?.dispose(),this._colorAttachments.set(t,e),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,t))}detachColorTexture(e=rt.r6){const t=this._colorAttachments.get(e);if(!t)return;const r=ut(t);return this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{if(r)this._framebufferTexture2D(null,e);else{const t=this._context.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)}}),this._colorAttachments.delete(e),r?t:void 0}detachColorTextures(...e){if(0!==e.length){if(this._initialized){const t=this._context.gl;this._context.temporaryBindFramebufferObject(this,()=>{e.forEach(e=>{ut(this._colorAttachments.get(e))?this._framebufferTexture2D(null,e):t.framebufferRenderbuffer(t.FRAMEBUFFER,e,t.RENDERBUFFER,null)})})}e.forEach(e=>this._colorAttachments.delete(e))}}setColorTextureTarget(e,t=rt.r6,r=0){const i=this._colorAttachments.get(t);i&&(35866===e?this._framebufferTextureLayer(i.glName,t,36160,0,r):this._framebufferTexture2D(i.glName,t,e,36160,0))}attachDepthStencil(e){if(e)switch(e.type){case 1:return this._attachDepthStencilTexture(e);case 2:return this._attachDepthStencilBuffer(e)}}_attachDepthStencilTexture(e){if(null==e)return;const{descriptor:t}=e,{pixelFormat:r,dataType:i}=t;34041===r||6402===r?34041!==r||i===rt.ld.UNSIGNED_INT_24_8?6402!==r||i===rt.ld.UNSIGNED_INT||i===rt.ld.UNSIGNED_SHORT?(this._validateTextureDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(e.glName,gt(r))),this._depthStencilTexture?.dispose(),this._depthStencilTexture=e):console.error("Depth texture must have data type of UNSIGNED_INT or UNSIGNED_SHORT!"):console.error("Depth/Stencil texture must have data type of UNSIGNED_INT_24_8!"):console.error("Depth/Stencil texture must have a pixel type of DEPTH_STENCIL!")}detachDepthStencilTexture(){const e=this._depthStencilTexture;return e&&this._initialized&&this._context.temporaryBindFramebufferObject(this,()=>{this._framebufferTexture2D(null,gt(e.descriptor.pixelFormat))}),this._depthStencilTexture=null,e}_attachDepthStencilBuffer(e){if(null==e)return;const t=e.descriptor;if(this._validateRenderbufferDescriptor(t),this._disposeDepthStencilAttachments(),this._initialized){this._context.bindFramebuffer(this);const{gl:r}=this._context,i=this._getGLAttachmentPoint(t);r.framebufferRenderbuffer(36160,i,r.RENDERBUFFER,e.glName)}this._depthStencilBuffer=e}detachDepthStencilBuffer(){const e=this._depthStencilBuffer;if(e&&this._initialized){const{_context:t}=this,r=t.getBoundFramebufferObject();t.bindFramebuffer(this);const{gl:i}=t,n=this._getGLAttachmentPoint(e.descriptor);i.framebufferRenderbuffer(36160,n,i.RENDERBUFFER,null),t.bindFramebuffer(r)}return this._depthStencilBuffer=null,e}invalidateAttachments(e){const{_context:t}=this;t.temporaryBindFramebufferObject(this,()=>t.gl.invalidateFramebuffer(36160,e),!0)}copyToTexture(e,t,r,i,n,o,s){(e<0||t<0||n<0||o<0)&&console.error("Offsets cannot be negative!"),(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!");const a=s.descriptor;3553!==s.descriptor.target&&console.error("Texture target must be TEXTURE_2D!"),(null==a?.width||null==a?.height||e+r>this.width||t+i>this.height||n+r>a.width||o+i>a.height)&&console.error("Bad dimensions, the current input values will attempt to read or copy out of bounds!");const c=this._context,l=c.bindTexture(s,nt.A.TEXTURE_UNIT_FOR_UPDATES);c.setActiveTexture(nt.A.TEXTURE_UNIT_FOR_UPDATES),c.bindFramebuffer(this),c.gl.copyTexSubImage2D(3553,0,n,o,e,t,r,i),c.bindTexture(l,nt.A.TEXTURE_UNIT_FOR_UPDATES)}readPixels(e,t,r,i,n,o,s){(r<=0||i<=0)&&console.error("Copy width and height must be greater than zero!"),s||console.error("Target memory is not initialized!"),this._context.bindFramebuffer(this),this._context.gl.readPixels(e,t,r,i,n,o,s)}async readPixelsAsync(e,t,r,i,n,o,s){const{gl:a}=this._context,c=ot.g.createPixelPack(this._context,35041,s.byteLength);this._context.bindBuffer(c);const l=this._context.getBoundFramebufferObject();this._context.bindFramebuffer(this),a.readPixels(e,t,r,i,n,o,0),this._context.unbindBuffer(35051),this._context.bindFramebuffer(l),await c.getSubDataAsync(s),c.dispose()}resize(e,t){if(this.width===e&&this.height===t)return;const r={width:e,height:t};if(mt(r,this._context.parameters.maxTextureSize),this._colorAttachments.forEach(e=>e.resize(r.width,r.height)),this._depthStencilTexture?.resize(r.width,r.height),this._initialized&&(mt(r,this._context.parameters.maxRenderbufferSize),this._depthStencilBuffer?.resize(r.width,r.height),(0,tt.en)())){const{gl:e}=this._context;e.checkFramebufferStatus(36160)!==e.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!")}}initializeAndBind(e=36160){const{gl:t}=this._context;if(this._initialized)return void t.bindFramebuffer(e,this.glName);this._glName&&t.deleteFramebuffer(this._glName);const r=t.createFramebuffer();if(t.bindFramebuffer(e,r),this._colorAttachments.forEach((t,r)=>{if(ut(t)){const i=pt(t);35866===i?this._framebufferTextureLayer(t.glName,r,e,0,0):this._framebufferTexture2D(t.glName,r,i,e)}else if(ht(t)){const i=this._context.gl;i.framebufferRenderbuffer(e,r,i.RENDERBUFFER,t.glName)}}),this._depthStencilBuffer){const r=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);t.framebufferRenderbuffer(e,r,t.RENDERBUFFER,this._depthStencilBuffer.glName)}else if(this._depthStencilTexture){const t=gt(this._depthStencilTexture.descriptor.pixelFormat);this._framebufferTexture2D(this._depthStencilTexture.glName,t,pt(this._depthStencilTexture),e)}(0,tt.en)()&&t.checkFramebufferStatus(e)!==t.FRAMEBUFFER_COMPLETE&&console.error("Framebuffer is incomplete!"),this._glName=r,this._initialized=!0}_framebufferTexture2D(e,t=rt.r6,r=3553,i=36160,n=0){this._context.gl.framebufferTexture2D(i,t,r,e,n)}_framebufferTextureLayer(e,t=rt.r6,r=36160,i=0,n=0){this._context.gl.framebufferTextureLayer(r,t,e,i,n)}_disposeDepthStencilAttachments(){const e=this._context.gl;if(this._depthStencilBuffer){if(this._initialized){this._context.bindFramebuffer(this);const t=this._getGLAttachmentPoint(this._depthStencilBuffer.descriptor);e.framebufferRenderbuffer(36160,t,e.RENDERBUFFER,null)}this._depthStencilBuffer=(0,a.WD)(this._depthStencilBuffer)}this._depthStencilTexture&&(this._initialized&&(this._context.bindFramebuffer(this),this._framebufferTexture2D(null,gt(this._depthStencilTexture.descriptor.pixelFormat))),this._depthStencilTexture=(0,a.WD)(this._depthStencilTexture))}_validateTextureDescriptor(e){3553!==e.target&&34067!==e.target&&35866!==e.target&&console.error("Texture type must be TEXTURE_2D, TEXTURE_2D_ARRAY or TEXTURE_CUBE_MAP!"),mt(e,this._context.parameters.maxTextureSize),this._validateBufferDimensions(e)}_validateRenderbufferDescriptor(e){mt(e,this._context.parameters.maxRenderbufferSize),this._validateBufferDimensions(e)}_validateBufferDimensions(e){e.width<=0&&(e.width=this.width),e.height<=0&&(e.height=this.height),this.width>0&&this.height>0&&(this.width===e.width&&this.height===e.height||console.error("Attachment size must match framebuffer size!"))}_getGLAttachmentPoint(e){switch(e.internalFormat){case rt.SB.DEPTH_COMPONENT16:case rt.SB.DEPTH_COMPONENT24:case rt.SB.DEPTH_COMPONENT32F:return rt.xL;case rt.iE.DEPTH24_STENCIL8:case rt.iE.DEPTH32F_STENCIL8:return rt.nI;case 36168:return rt.uH;default:return rt.r6}}_validateColorAttachmentPoint(e){if(-1===lt._MAX_COLOR_ATTACHMENTS){const{gl:e}=this._context;lt._MAX_COLOR_ATTACHMENTS=e.getParameter(e.MAX_COLOR_ATTACHMENTS)}const t=e-rt.r6;t+1>lt._MAX_COLOR_ATTACHMENTS&&O.A.getLogger("esri.views.webgl.FrameBufferObject").error("esri.FrameBufferObject",`illegal attachment point for color attachment: ${t+1}. Implementation supports up to ${lt._MAX_COLOR_ATTACHMENTS} color attachments`)}}function ut(e){return 1===ft(e)}function ht(e){return 2===ft(e)}function dt(e){return 0===ft(e)}function ft(e){return null!=e&&"type"in e?e.type:null}function mt(e,t){const r=Math.max(e.width,e.height);if(r>t){O.A.getLogger("esri.views.webgl.FramebufferObject").warnOnce(`Resizing FBO attachment size ${e.width}x${e.height} to device limit ${t}`);const i=t/r;return e.width=Math.round(e.width*i),e.height=Math.round(e.height*i),!1}return!0}function pt(e){return 34067===e.descriptor.target?34069:35866===e.descriptor.target?35866:3553}function gt(e){return 6402===e?rt.xL:rt.nI}var vt=r(67171),_t=(r(21818),r(69397),r(85079)),xt=r(74038);const yt=[new xt._("position",2,rt.pe.UNSIGNED_SHORT,0,4)];new xt._("a_pos",2,rt.pe.BYTE,0,2),new xt._("a_pos",2,rt.pe.BYTE,0,4),new xt._("a_tex",2,rt.pe.BYTE,2,4),(0,_t.Xk)(yt),r(66289);const wt=new Image;wt.src="data:image/svg+xml,%3C%3Fxml version='1.0' encoding='UTF-8'%3F%3E%3Csvg width='5' height='5' version='1.1' viewBox='0 0 5 5' xmlns='http://www.w3.org/2000/svg'%3E%3Crect width='5' height='5' fill='%23f00' fill-opacity='.5'/%3E%3C/svg%3E%0A",wt.width=5,wt.height=5,wt.decode();let bt=class extends I.A{constructor(e){super(e),this.view=null,this.consumes={required:[]},this.produces=qe,this.requireGeometryDepth=!1,this._dirty=!0}initialize(){this.addHandles([(0,c.wB)(()=>this.view.ready,e=>{e&&this.view.stage?.renderer.addRenderNode(this)},c.Vh)])}destroy(){this.view.stage?.renderer?.removeRenderNode(this)}precompile(){}render(){throw new Je.A("RenderNode:render-function-not-implemented","render() is not implemented.")}get camera(){return this.view.state.camera.clone()}get sunLight(){return this.bindParameters.lighting.legacy}get gl(){return this.view.stage.renderView.renderingContext.gl}get techniques(){return this.view.stage.renderView.techniques}acquireOutputFramebuffer(){const e=this._frameBuffer?.getTexture()?.descriptor,t=this.view.stage.renderer.fboCache.acquire(e?.width??640,e?.height??480,this.produces);return this._bind(t),t}bindRenderTarget(){return this._bind(this._frameBuffer),this._frameBuffer}_bind({fbo:e}){var t;e.initializeAndBind(),this.gl.drawBuffers((t=e)?t.colorAttachments.length>0?t.colorAttachments:[rt.$0]:[rt.C5])}requestRender(e){switch(e){case 2:this.view.state.fading=!0;case 1:this.view.stage?.renderView.requestRender(e);case 0:case void 0:this._dirty=!0}}resetWebGLState(){this.renderingContext.resetState(),this.renderingContext.bindFramebuffer(this._frameBuffer?.fbo)}get fboCache(){return this.view.stage.renderer.fboCache}get bindParameters(){return this.renderContext.bind}get renderingContext(){return this.view.stage.renderView.renderingContext}get renderContext(){return this.view.stage?.renderer.renderContext}updateAnimation(e){return!!this._dirty&&(this._dirty=!1,!0)}doRender(e){this._frameBuffer=e.find(({name:e})=>e===this.produces);try{return this.render(e)}finally{this._frameBuffer=null}}};(0,o.Cg)([(0,Ke.MZ)({constructOnly:!0})],bt.prototype,"view",void 0),(0,o.Cg)([(0,Ke.MZ)({constructOnly:!0})],bt.prototype,"consumes",void 0),(0,o.Cg)([(0,Ke.MZ)()],bt.prototype,"produces",void 0),(0,o.Cg)([(0,Ke.MZ)({readOnly:!0})],bt.prototype,"techniques",null),bt=(0,o.Cg)([(0,Qe.$)("esri.views.3d.webgl.RenderNode")],bt);const Tt=bt;var Mt=r(15581),St=r(13840),Ct=r(42958),Et=r(95774);let At=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Et.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,it.Ey)({colorWrite:it.kn})}};At=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],At);var Rt=r(65786);class It extends Rt.Y{constructor(){super(...arguments),this.projScale=1}}class Ot extends It{constructor(){super(...arguments),this.intensity=1}}class Ft extends Rt.Y{}class Nt extends Ft{constructor(){super(...arguments),this.blurSize=(0,D.vt)()}}let Dt=class extends Ct.w{constructor(){super(...arguments),this.shader=new St.r(Mt.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,it.Ey)({colorWrite:it.kn})}};Dt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],Dt);let Pt=class extends Tt{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=Xe.AMBIENT_ILLUMINATION,this.isEnabled=()=>!1,this._enableTime=(0,l.l5)(0),this._passParameters=new Ot,this._drawParameters=new Nt}initialize(){const e=Uint8Array.from(atob("eXKEvZaUc66cjIKElE1jlJ6MjJ6Ufkl+jn2fcXp5jBx7c6KEflSGiXuXeW6OWs+tfqZ2Yot2Y7Zzfo2BhniEj3xoiXuXj4eGZpqEaHKDWjSMe7palFlzc3BziYOGlFVzg6Zzg7CUY5JrjFF7eYJ4jIKEcyyEonSXe7qUfqZ7j3xofqZ2c4R5lFZ5Y0WUbppoe1l2cIh2ezyUho+BcHN2cG6DbpqJhqp2e1GcezhrdldzjFGUcyxjc3aRjDyEc1h7Sl17c6aMjH92pb6Mjpd4dnqBjMOEhqZleIOBYzB7gYx+fnqGjJuEkWlwnCx7fGl+c4hjfGyRe5qMlNOMfnqGhIWHc6OMi4GDc6aMfqZuc6aMzqJzlKZ+lJ6Me3qRfoFue0WUhoR5UraEa6qMkXiPjMOMlJOGe7JrUqKMjK6MeYRzdod+Sl17boiPc6qEeYBlcIh2c1WEe7GDiWCDa0WMjEmMdod+Y0WcdntzhmN8WjyMjKJjiXtzgYxYaGd+a89zlEV7e2GJfnd+lF1rcK5zc4p5cHuBhL6EcXp5eYB7fnh8iX6HjIKEeaxuiYOGc66RfG2Ja5hzjlGMjEmMe9OEgXuPfHyGhPeEdl6JY02McGuMfnqGhFiMa3WJfnx2l4hwcG1uhmN8c0WMc39og1GBbrCEjE2EZY+JcIh2cIuGhIWHe0mEhIVrc09+gY5+eYBlnCyMhGCDl3drfmmMgX15aGd+gYx+fnuRfnhzY1SMsluJfnd+hm98WtNrcIuGh4SEj0qPdkqOjFF7jNNjdnqBgaqUjMt7boeBhnZ4jDR7c5pze4GGjEFrhLqMjHyMc0mUhKZze4WEa117kWlwbpqJjHZ2eX2Bc09zeId+e0V7WlF7jHJ2l72BfId8l3eBgXyBe897jGl7c66cgW+Xc76EjKNbgaSEjGx4fId8jFFjgZB8cG6DhlFziZhrcIh2fH6HgUqBgXiPY8dahGFzjEmMhEFre2dxhoBzc5SGfleGe6alc7aUeYBlhKqUdlp+cH5za4OEczxza0Gcc4J2jHZ5iXuXjH2Jh5yRjH2JcFx+hImBjH+MpddCl3dreZeJjIt8ZW18bm1zjoSEeIOBlF9oh3N7hlqBY4+UeYFwhLJjeYFwaGd+gUqBYxiEYot2fqZ2ondzhL6EYyiEY02Ea0VjgZB8doaGjHxoc66cjEGEiXuXiXWMiZhreHx8frGMe75rY02Ec5pzfnhzlEp4a3VzjM+EhFFza3mUY7Zza1V5e2iMfGyRcziEhDyEkXZ2Y4OBnCx7g5t2eyBjgV6EhEFrcIh2dod+c4Z+nJ5zjm15jEmUeYxijJp7nL6clIpjhoR5WrZraGd+fnuRa6pzlIiMg6ZzfHx5foh+eX1ufnB5eX1ufnB5aJt7UqKMjIh+e3aBfm5lbYSBhGFze6J4c39oc0mUc4Z+e0V7fKFVe0WEdoaGY02Ec4Z+Y02EZYWBfH6HgU1+gY5+hIWUgW+XjJ57ebWRhFVScHuBfJ6PhBx7WqJzlM+Ujpd4gHZziX6HjHmEgZN+lJt5boiPe2GJgX+GjIGJgHZzeaxufnB5hF2JtdN7jJ57hp57hK6ElFVzg6ZzbmiEbndzhIWHe3uJfoFue3qRhJd2j3xoc65zlE1jc3p8lE1jhniEgXJ7e657vZaUc3qBh52BhIF4aHKDa9drgY5+c52GWqZzbpqJe8tjnM+UhIeMfo2BfGl+hG1zSmmMjKJjZVaGgX15c1lze0mEp4OHa3mUhIWHhDyclJ6MeYOJkXiPc0VzhFiMlKaEboSJa5Jze41re3qRhn+HZYWBe0mEc4p5fnORbox5lEp4hGFjhGGEjJuEc1WEhLZjeHeGa7KlfHx2hLaMeX1ugY5+hIWHhKGPjMN7c1WEho1zhoBzZYx7fnhzlJt5exyUhFFziXtzfmmMa6qMYyiEiXxweV12kZSMeWqXSl17fnhzxmmMrVGEe1mcc4p5eHeGjK6MgY5+doaGa6pzlGV7g1qBh4KHkXiPeW6OaKqafqZ2eXZ5e1V7jGd7boSJc3BzhJd2e0mcYot2h1RoY8dahK6EQmWEWjx7e1l2lL6UgXyBdnR4eU9zc0VreX1umqaBhld7fo2Bc6KEc5Z+hDyEcIeBWtNrfHyGe5qMhMuMe5qMhEGEbVVupcNzg3aHhIF4boeBe0mEdlptc39ofFl5Y8uUlJOGiYt2UmGEcyxjjGx4jFF7a657ZYWBnElzhp57iXtrgZN+tfOEhIOBjE2HgU1+e8tjjKNbiWCDhE15gUqBgYN7fnqGc66ce9d7iYSBj0qPcG6DnGGcT3eGa6qMZY+JlIiMl4hwc3aRdnqBlGV7eHJ2hLZjfnuRhDyEeX6MSk17g6Z+c6aUjHmEhIF4gXyBc76EZW18fGl+fkl+jCxrhoVwhDyUhIqGlL2DlI6EhJd2tdN7eYORhEGMa2Faa6pzc3Bzc4R5lIRznM+UY9eMhDycc5Z+c4p5c4iGY117pb6MgXuPrbJafnx2eYOJeXZ5e657hDyEcziElKZjfoB5eHeGj4WRhGGEe6KGeX1utTStc76EhFGJnCyMa5hzfH6HnNeceYB7hmN8gYuMhIVrczSMgYF8h3N7c5pza5hzjJqEYIRdgYuMlL2DeYRzhGGEeX1uhLaEc4iGeZ1zdl6JhrVteX6Me2iMfm5lWqJzSpqEa6pzdnmchHx2c6OMhNdrhoR5g3aHczxzeW52gV6Ejm15frGMc0Vzc4Z+l3drfniJe+9rWq5rlF1rhGGEhoVwe9OEfoh+e7pac09+c3qBY0lrhDycdnp2lJ6MiYOGhGCDc3aRlL2DlJt5doaGdnp2gYF8gWeOjF2Uc4R5c5Z+jEmMe7KEc4mEeYJ4dmyBe0mcgXiPbqJ7eYB7fmGGiYSJjICGlF1reZ2PnElzbpqJfH6Hc39oe4WEc5eJhK6EhqyJc3qBgZB8c09+hEmEaHKDhFGJc5SGiXWMUpaEa89zc6OMnCyMiXtrho+Be5qMc7KEjJ57dmN+hKGPjICGbmiEe7prdod+hGCDdnmchBx7eX6MkXZ2hGGEa657hm98jFFjY5JreYOJgY2EjHZ2a295Y3FajJ6Mc1J+YzB7e4WBjF2Uc4R5eV12gYxzg1qBeId+c9OUc5pzjFFjgY5+hFiMlIaPhoR5lIpjjIKBlNdSe7KEeX2BfrGMhIqGc65zjE2UhK6EklZ+QmWEeziMWqZza3VzdnR4foh+gYF8n3iJiZhrnKp7gYF8eId+lJ6Me1lrcIuGjKJjhmN8c66MjFF7a6prjJ6UnJ5zezyUfruRWlF7nI5zfHyGe657h4SEe8tjhBx7jFFjc09+c39ojICMeZeJeXt+YzRzjHZ2c0WEcIeBeXZ5onSXkVR+gYJ+eYFwdldzgYF7eX2BjJ6UiXuXlE1jh4SEe1mchLJjc4Z+hqZ7eXZ5bm1zlL6Ue5p7iWeGhKqUY5pzjKJjcIeBe8t7gXyBYIRdlEp4a3mGnK6EfmmMZpqEfFl5gYxzjKZuhGFjhoKGhHx2fnx2eXuMe3aBiWeGvbKMe6KGa5hzYzB7gZOBlGV7hmN8hqZlYot2Y117a6pzc6KEfId8foB5rctrfneJfJ6PcHN2hFiMc5pzjH92c0VzgY2EcElzdmCBlFVzg1GBc65zY4OBboeBcHiBeYJ4ewxzfHx5lIRzlEmEnLKEbk1zfJ6PhmN8eYBljBiEnMOEiXxwezyUcIeBe76EdsKEeX2BdnR4jGWUrXWMjGd7fkl+j4WRlEGMa5Jzho+BhDyEfnqMeXt+g3aHlE1jczClhNN7ZW18eHx8hGFjZW18iXWMjKJjhH57gYuMcIuGWjyMe4ZtjJuExmmMj4WRdntzi4GDhFFzYIRdnGGcjJp7Y0F7e4WEkbCGiX57fnSHa657a6prhBCMe3Z+SmmMjH92eHJ2hK6EY1FzexhrvbKMnI5za4OEfnd+eXuMhImBe897hLaMjN+EfG+BeIOBhF1+eZeJi4GDkXZ2eXKEgZ6Ejpd4c2GHa1V5e5KUfqZuhCx7jKp7lLZrg11+hHx2hFWUoot2nI5zgbh5mo9zvZaUe3qRbqKMfqZ2kbCGhFiM"),e=>e.charCodeAt(0)),t=new vt.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new nt.A(this.renderingContext,t,e),this.addHandles((0,c.wB)(()=>this.isEnabled(),()=>this._enableTime=(0,l.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,a.WD)(this._passParameters.noiseTexture)}precompile(){this.techniques.precompile(Dt),this.techniques.precompile(At)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),i=t?.getTexture(rt.nI);if(!r||!i)return;const n=this.techniques.getCompiled(Dt),o=this.techniques.getCompiled(At);if(!n||!o)return this._enableTime=(0,l.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,l.l5)(performance.now()));const a=this.renderingContext,c=this.view.qualitySettings.fadeDuration,u=this.bindParameters,d=u.camera,f=d.relativeElevation,m=(0,s.qE)((5e5-f)/2e5,0,1),p=c>0?Math.min(c,performance.now()-this._enableTime)/c:1,g=p*m;this._passParameters.normalTexture=r,this._passParameters.depthTexture=i,this._passParameters.projScale=1/d.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*Bt/(0,Mt.g)(d)**6*g;const v=d.fullViewport[2],_=d.fullViewport[3],x=this.fboCache.acquire(v,_,"ssao input",2);a.bindFramebuffer(x.fbo),a.setViewport(0,0,v,_),a.bindTechnique(n,u,this._passParameters,this._drawParameters),a.screen.draw();const y=Math.round(v/2),w=Math.round(_/2),b=this.fboCache.acquire(y,w,"ssao blur",0);a.bindFramebuffer(b.fbo),this._drawParameters.colorTexture=x.getTexture(),(0,h.hZ)(this._drawParameters.blurSize,0,2/_),a.bindTechnique(o,u,this._passParameters,this._drawParameters),a.setViewport(0,0,y,w),a.screen.draw(),x.release();const T=this.fboCache.acquire(y,w,Xe.AMBIENT_ILLUMINATION,0);return a.bindFramebuffer(T.fbo),a.setViewport(0,0,v,_),a.setClearColor(1,1,1,0),a.clear(16384),this._drawParameters.colorTexture=b.getTexture(),(0,h.hZ)(this._drawParameters.blurSize,2/v,0),a.bindTechnique(o,u,this._passParameters,this._drawParameters),a.setViewport(0,0,y,w),a.screen.draw(),a.setViewport4fv(d.fullViewport),b.release(),p<1&&this.requestRender(2),T}};(0,o.Cg)([(0,u.MZ)()],Pt.prototype,"consumes",void 0),(0,o.Cg)([(0,u.MZ)()],Pt.prototype,"produces",void 0),(0,o.Cg)([(0,u.MZ)({constructOnly:!0})],Pt.prototype,"isEnabled",void 0),Pt=(0,o.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],Pt);const Bt=.5;function Ht(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(i.H`float evaluateAmbientOcclusionInverse() {
|
|
564
564
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
565
565
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
566
566
|
}
|
|
@@ -1024,7 +1024,7 @@ return (1.0 / 255.0) * (fract(52.9829189 * fract(dot(gl_FragCoord.xy + gl_FragCo
|
|
|
1024
1024
|
${(0,a.If)(m,"if (finalColor.a < alphaCutoff) { discard; }")}
|
|
1025
1025
|
${(0,a.If)(_||f,"float noise = ditherNoise();")}
|
|
1026
1026
|
|
|
1027
|
-
${(0,a.If)(_
|
|
1027
|
+
${(0,a.If)(_,`fragColor = ${(0,a.If)(p,"finalColor","premultiplyAlpha(finalColor)")};\n fragColor = vec4(fragColor.rgb * floatBlendOutputScale + noise, fragColor.a);\n fragAlpha = finalColor.a * floatBlendOutputScale + noise;`)}
|
|
1028
1028
|
${(0,a.If)(x&&p&&m,"finalColor.rgb /= finalColor.a;")}
|
|
1029
1029
|
${(0,a.If)(y,"fragColor = finalColor;")}
|
|
1030
1030
|
${(0,a.If)(f,`fragEmission = ${(0,a.If)(g,"mix(finalColor.a * getEmissions(emissiveSymbolColor), vec4(0.0), snow);","finalColor.a * getEmissions(emissiveSymbolColor);")}\n fragEmission = vec4(fragEmission.rgb * floatBlendOutputScale + noise, fragEmission.a);`)}
|