@arcgis/core 5.1.0-next.71 → 5.1.0-next.72
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/PopupTemplate.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/003fd7745966fe03510c.js +1 -0
- package/assets/esri/core/workers/chunks/00bae4b7e179336e0362.js +1 -0
- package/assets/esri/core/workers/chunks/{36031cb53c486630f3c9.js → 026d3fa331caec1ea3d2.js} +1 -1
- package/assets/esri/core/workers/chunks/027c3ea756db68e51f0a.js +1 -0
- package/assets/esri/core/workers/chunks/{c06d021180418f2014de.js → 02876e434dc91c42b2f4.js} +1 -1
- package/assets/esri/core/workers/chunks/041c372e98a6fba90b36.js +1 -0
- package/assets/esri/core/workers/chunks/{a5a46d0a0831497cf1b4.js → 0783890816bac45277b9.js} +1 -1
- package/assets/esri/core/workers/chunks/07aac6245a0d1adbb2d4.js +1 -0
- package/assets/esri/core/workers/chunks/0839da55707f7c4cf780.js +1 -0
- package/assets/esri/core/workers/chunks/0c00e5e4bd18467bcecd.js +1 -0
- package/assets/esri/core/workers/chunks/{d69110ec4078c583a05e.js → 0d96e39380fd84cea9ba.js} +1 -1
- package/assets/esri/core/workers/chunks/0dad0bca8d58b2c63d22.js +1 -0
- package/assets/esri/core/workers/chunks/0ef93722524620023f69.js +1 -0
- package/assets/esri/core/workers/chunks/127cd8fee3717a473fc5.js +1 -0
- package/assets/esri/core/workers/chunks/1286f41f245ef22b3a26.js +1 -0
- package/assets/esri/core/workers/chunks/161d60fdac2013c15543.js +1 -0
- package/assets/esri/core/workers/chunks/1661684357912726a72a.js +1 -0
- package/assets/esri/core/workers/chunks/168de44a789d1cecc1f8.js +1 -0
- package/assets/esri/core/workers/chunks/1961b59756933e0a82f2.js +1 -0
- package/assets/esri/core/workers/chunks/1d9d7915cf7449e5d468.js +1 -0
- package/assets/esri/core/workers/chunks/1f85646936200a399c15.js +1 -0
- package/assets/esri/core/workers/chunks/{deb8a0b306d7b9c86b97.js → 2171aaa147aa4d9fc5b5.js} +1 -1
- package/assets/esri/core/workers/chunks/235cb82952a18ff8d206.js +1 -0
- package/assets/esri/core/workers/chunks/260d4571722cb1ff1366.js +1 -0
- package/assets/esri/core/workers/chunks/{3e972ae291df1844017d.js → 266ba61b72a278d93a26.js} +1 -1
- package/assets/esri/core/workers/chunks/27b80c386cebadcaca3c.js +1 -0
- package/assets/esri/core/workers/chunks/29d3890a5a43d934067a.js +1 -0
- package/assets/esri/core/workers/chunks/{333a0038d782d8a34d58.js → 2abf124e2956e4f76688.js} +1 -1
- package/assets/esri/core/workers/chunks/2f17438d215bea3ce70f.js +1 -0
- package/assets/esri/core/workers/chunks/{f6d5dd2eef0d9918096e.js → 30e710ec4d22c43d4e7e.js} +1 -1
- package/assets/esri/core/workers/chunks/356cb86606b8c674f947.js +1 -0
- package/assets/esri/core/workers/chunks/398e0dd2bc7e1ab84831.js +1 -0
- package/assets/esri/core/workers/chunks/3b1052aa30af3f6186cc.js +1 -0
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +1 -0
- package/assets/esri/core/workers/chunks/3cd9bd20e75ba4d5b294.js +1 -0
- package/assets/esri/core/workers/chunks/3e87e3ad857d72f6ecbb.js +1 -0
- package/assets/esri/core/workers/chunks/{7cb6d8f7eaf762279632.js → 3ea5a18b264628dc37f0.js} +1 -1
- package/assets/esri/core/workers/chunks/41809c16544ec25120fa.js +1 -0
- package/assets/esri/core/workers/chunks/41913575dd45c65d645e.js +1 -0
- package/assets/esri/core/workers/chunks/42e483fde18f12da32a6.js +1 -0
- package/assets/esri/core/workers/chunks/43ab44d37bc0ea97ef98.js +1 -0
- package/assets/esri/core/workers/chunks/46e622857ba92a72a317.js +1 -0
- package/assets/esri/core/workers/chunks/47f2113357b2aa4f4f37.js +1 -0
- package/assets/esri/core/workers/chunks/488ed9584b527ec47be3.js +1 -0
- package/assets/esri/core/workers/chunks/4ad32580e0c0699fde1f.js +1 -0
- package/assets/esri/core/workers/chunks/4d0f793dee4ad919221b.js +1 -0
- package/assets/esri/core/workers/chunks/4eed175277eb0df3c821.js +1 -0
- package/assets/esri/core/workers/chunks/{916a8f3eed1fafdc7242.js → 54d07eadf113f0e4e506.js} +1 -1
- package/assets/esri/core/workers/chunks/54ed37ec9682ea739deb.js +1 -0
- package/assets/esri/core/workers/chunks/{9187d1caca1fd2d713e0.js → 55369c5bd65bcaf78da1.js} +1 -1
- package/assets/esri/core/workers/chunks/56fd3da911c2c4511e5d.js +1 -0
- package/assets/esri/core/workers/chunks/59592bb25f226865e88a.js +1 -0
- package/assets/esri/core/workers/chunks/{e77d958cb62536b8eebc.js → 5a4d7ba6dc1d4b41d80d.js} +1 -1
- package/assets/esri/core/workers/chunks/5d55b4449bcb24cd72b6.js +1 -0
- package/assets/esri/core/workers/chunks/5d8fe41a3c06ddb4094b.js +1 -0
- package/assets/esri/core/workers/chunks/{fe68c28d3c61f116ff23.js → 5ef37f37e405b3bb5450.js} +1 -1
- package/assets/esri/core/workers/chunks/608d707fd9d9f9088473.js +1 -0
- package/assets/esri/core/workers/chunks/{c92352b0e39576ca317a.js → 61ef14e42bc09b787d89.js} +1 -1
- package/assets/esri/core/workers/chunks/656d6963e8f837fbf28f.js +1 -0
- package/assets/esri/core/workers/chunks/68b47a5a50e0b5fffca2.js +1 -0
- package/assets/esri/core/workers/chunks/{a5afcd633b32e6ee31a7.js → 6a0352d20596ca3f4b64.js} +1 -1
- package/assets/esri/core/workers/chunks/6c7ff968bd4fc816442d.js +1 -0
- package/assets/esri/core/workers/chunks/6e526c06825ecc6c99c0.js +1 -0
- package/assets/esri/core/workers/chunks/6ea8b0d68881d16a2432.js +1 -0
- package/assets/esri/core/workers/chunks/6f9ea461c268c421f9c9.js +1 -0
- package/assets/esri/core/workers/chunks/7027d93dc5a4595d70c6.js +1 -0
- package/assets/esri/core/workers/chunks/70b35b2446558d5280e3.js +1 -0
- package/assets/esri/core/workers/chunks/7349cb45a93e6916f115.js +1 -0
- package/assets/esri/core/workers/chunks/751609831b283903ba48.js +1 -0
- package/assets/esri/core/workers/chunks/76edaeaf8fe344bb77a8.js +1 -0
- package/assets/esri/core/workers/chunks/76fe5b821d6b54db5721.js +1 -0
- package/assets/esri/core/workers/chunks/81d30c9062ad0120a863.js +1 -0
- package/assets/esri/core/workers/chunks/84772b023d04e415f17f.js +1 -0
- package/assets/esri/core/workers/chunks/{123e920e4460124ec3bb.js → 88b480a1d1fb01778798.js} +9 -30
- package/assets/esri/core/workers/chunks/88c5f7c712c6b89b5109.js +1 -0
- package/assets/esri/core/workers/chunks/88e469b82d2594f23649.js +1 -0
- package/assets/esri/core/workers/chunks/8a14e3db28c403b046cf.js +1 -0
- package/assets/esri/core/workers/chunks/8a664451845a47048859.js +1 -0
- package/assets/esri/core/workers/chunks/8a8242e7cc7e6a9e7876.js +1 -0
- package/assets/esri/core/workers/chunks/{4d51261d6131c07402cd.js → 8acee3fba488f202f82f.js} +1 -1
- package/assets/esri/core/workers/chunks/91a0227a64a944af3286.js +596 -0
- package/assets/esri/core/workers/chunks/9444ed8ea117861ae89b.js +1 -0
- package/assets/esri/core/workers/chunks/96bba4d93a32ad34a1c8.js +1 -0
- package/assets/esri/core/workers/chunks/9a38fd68b02b617c45d3.js +1 -0
- package/assets/esri/core/workers/chunks/9d434360dfce1e49b7b9.js +1 -0
- package/assets/esri/core/workers/chunks/9f4b97204def91567e3c.js +1 -0
- package/assets/esri/core/workers/chunks/a37c28e3c4a2be9fd1d5.js +1 -0
- package/assets/esri/core/workers/chunks/{58b3c888c8bfedbe6443.js → a37fc886227365f7ecd5.js} +1 -1
- package/assets/esri/core/workers/chunks/a8d7f59927bdad564141.js +1 -0
- package/assets/esri/core/workers/chunks/{f89976ec97938bf86996.js → abc06d10c7ac8ba5b0e4.js} +1 -1
- package/assets/esri/core/workers/chunks/abe22ae8ee0dcc9efbb7.js +1 -0
- package/assets/esri/core/workers/chunks/{fef5dc19736f12dfa99a.js → af5db0372d526e592fcc.js} +1 -1
- package/assets/esri/core/workers/chunks/{eb3cdc4ff45243fc3cc5.js → b475f5492c6e3fd4cca8.js} +1 -1
- package/assets/esri/core/workers/chunks/b495f14d90abe8d1a558.js +1 -0
- package/assets/esri/core/workers/chunks/{6ac5ec3ecbca8860338b.js → b54b7cc6b23a70fed700.js} +1 -1
- package/assets/esri/core/workers/chunks/b702279c48f3009f6dd8.js +1 -0
- package/assets/esri/core/workers/chunks/b79058f5bda6fcac22f8.js +1 -0
- package/assets/esri/core/workers/chunks/b801631b58e6fc6cec8a.js +1 -0
- package/assets/esri/core/workers/chunks/{31071a43e2c03984d619.js → b92794def31592a6a25f.js} +1 -1
- package/assets/esri/core/workers/chunks/be1d6a571f76933dfbb0.js +1 -0
- package/assets/esri/core/workers/chunks/bea70be8e38b8c83ccd2.js +1 -0
- package/assets/esri/core/workers/chunks/bfcdc5c315131aae34d8.js +1 -0
- package/assets/esri/core/workers/chunks/c0f624a2ca0d07ef8f8c.js +1 -0
- package/assets/esri/core/workers/chunks/c1838822b096d5f36a8b.js +1 -0
- package/assets/esri/core/workers/chunks/c3381b9a36299210ee47.js +1 -0
- package/assets/esri/core/workers/chunks/{c2882a9e67124b7c18be.js → c503c79ba5761f7abbeb.js} +1 -1
- package/assets/esri/core/workers/chunks/cb5e4b9b4a59c2622eb5.js +1 -0
- package/assets/esri/core/workers/chunks/d201a5dff18a5bb467ab.js +1 -0
- package/assets/esri/core/workers/chunks/{3b7cda16e656db450f11.js → d2aa75816e84b1e7fd25.js} +1 -1
- package/assets/esri/core/workers/chunks/{4d8670f6fa8952b7bab6.js → d950d5c2844206502ff0.js} +1 -1
- package/assets/esri/core/workers/chunks/db3c484bfa607dec6050.js +1 -0
- package/assets/esri/core/workers/chunks/db588bf3256e95c977b7.js +1 -0
- package/assets/esri/core/workers/chunks/{967758a05170545cd371.js → dcc719e15b2e0cce1f3b.js} +1 -1
- package/assets/esri/core/workers/chunks/{6bb090f3e5c18604cb39.js → dd5b362bded458afa2d6.js} +1 -1
- package/assets/esri/core/workers/chunks/{e957d52cb9643961a843.js → de583214195eff13cb00.js} +58 -45
- package/assets/esri/core/workers/chunks/dec6d41d614105e6fd93.js +1 -0
- package/assets/esri/core/workers/chunks/dfdd474fddcd1d6091ce.js +1 -0
- package/assets/esri/core/workers/chunks/e235ea4293d5d463acfb.js +1 -0
- package/assets/esri/core/workers/chunks/e43486113aaf72ac4dc1.js +1 -0
- package/assets/esri/core/workers/chunks/ea4c3393c5757e309a71.js +1 -0
- package/assets/esri/core/workers/chunks/ed216ddeb7f59f510bd0.js +1 -0
- package/assets/esri/core/workers/chunks/ef8886dff54063928bcb.js +1 -0
- package/assets/esri/core/workers/chunks/{231f502cd15f30d12be2.js → f1673e723b336204ad77.js} +1 -1
- package/assets/esri/core/workers/chunks/f5223ffb3be548c9b0a1.js +1 -0
- package/assets/esri/core/workers/chunks/fae147d03ed723ab234d.js +1 -0
- package/chunks/CheckerBoard.glsl.js +3 -5
- package/chunks/ColorMaterial.glsl.js +4 -6
- package/chunks/ComponentShader.glsl.js +42 -44
- package/chunks/DefaultMaterial.glsl.js +21 -23
- package/chunks/EdgeShader.glsl.js +9 -11
- package/chunks/GaussianSplat.glsl.js +8 -8
- package/chunks/ImageMaterial.glsl.js +5 -7
- package/chunks/LineCallout.glsl.js +9 -12
- package/chunks/LineMarker.glsl.js +24 -26
- package/chunks/Path.glsl.js +15 -17
- package/chunks/Pattern.glsl.js +25 -27
- package/chunks/RealisticTree.glsl.js +11 -13
- package/chunks/RibbonLine.glsl.js +42 -45
- package/chunks/ShadedColorMaterial.glsl.js +8 -9
- package/chunks/Water.glsl.js +18 -20
- package/config.js +1 -1
- package/kernel.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/graphics/FlatFeature.js +1 -1
- package/layers/graphics/FlatFeatureSet.js +1 -1
- package/layers/graphics/OptimizedFeature.js +1 -1
- package/layers/graphics/data/AttributesBuilder.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/data/flatFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/data/optimizedFeatureQueryEngineAdapter.js +1 -1
- package/layers/graphics/featureConversionUtils.js +1 -1
- package/layers/support/LabelClass.js +1 -1
- package/layers/support/featureLayerUtils.js +1 -1
- package/layers/support/labelUtils.js +1 -1
- package/layers/video/videoUtils.js +1 -1
- package/package.json +1 -1
- package/popupTemplateUtils.js +2 -0
- package/renderers/visualVariables/SizeVariable.js +1 -1
- package/renderers/visualVariables/support/sizeVariableUtils.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/rest/support/OutDistance.js +2 -0
- package/rest/support/Query.js +1 -1
- package/smartMapping/statistics/support/utils.js +1 -1
- package/smartMapping/support/adapters/InMemoryLayerAdapter.js +1 -1
- package/support/arcadeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
- package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReader.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMeshNormals.js +1 -1
- package/views/3d/layers/StreamLayerView3D.js +1 -1
- package/views/3d/layers/graphics/featureExpressionInfoUtils.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialGlobalParameters.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/hud/HUD.glsl.js +20 -32
- package/views/3d/webgl-engine/core/shaderLibrary/shading/VisualVariables.glsl.js +5 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
- package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/Compositor.js +1 -1
- package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.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/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShader.glsl.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/Water.glsl.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCallout.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/statistics/RendererPerformanceInfo.js +1 -1
- package/views/VideoView.js +1 -1
- package/views/layers/FeatureLikeLayerView.js +1 -1
- package/views/video/VideoOperationalDataView.js +1 -1
- package/views/webgl/ShaderBuilder.js +1 -1
- package/widgets/FeatureTable/FeatureTableViewModel.d.ts +19 -3
- package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
- package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
- package/widgets/FeatureTable/VisibleElements.d.ts +15 -1
- package/widgets/FeatureTable/VisibleElements.js +1 -1
- package/widgets/FeatureTable/support/FeatureStore.js +1 -1
- package/widgets/FeatureTable.d.ts +15 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/09ecb36e44096e577af8.js +0 -1
- package/assets/esri/core/workers/chunks/0ca06ea649bbdb93ff49.js +0 -1
- package/assets/esri/core/workers/chunks/10308c9f3f0d709d96bc.js +0 -1
- package/assets/esri/core/workers/chunks/141edf5ed890105a079b.js +0 -1
- package/assets/esri/core/workers/chunks/160b9a76b75875507c86.js +0 -1
- package/assets/esri/core/workers/chunks/16dfdee05704df249e95.js +0 -1
- package/assets/esri/core/workers/chunks/17ef955dc48e329aa184.js +0 -1
- package/assets/esri/core/workers/chunks/18001536ed345955121a.js +0 -1
- package/assets/esri/core/workers/chunks/20e715e3aeb1c3265901.js +0 -1
- package/assets/esri/core/workers/chunks/238f51d0b36f998017b8.js +0 -1
- package/assets/esri/core/workers/chunks/2cee6d751c5e73fe09d4.js +0 -1
- package/assets/esri/core/workers/chunks/314140e2e9b813191907.js +0 -1
- package/assets/esri/core/workers/chunks/3158a3487d3e8a61b680.js +0 -1
- package/assets/esri/core/workers/chunks/3b1446286a9b87f34761.js +0 -1
- package/assets/esri/core/workers/chunks/3f7fd58ee7d71989fc83.js +0 -1
- package/assets/esri/core/workers/chunks/41396724040180d2537f.js +0 -1
- package/assets/esri/core/workers/chunks/416e031bafc0189544fa.js +0 -1
- package/assets/esri/core/workers/chunks/55ee78923987ed17ea8c.js +0 -1
- package/assets/esri/core/workers/chunks/56c7d7c7217557375fb6.js +0 -1
- package/assets/esri/core/workers/chunks/5a1d975b3e9e6b7eff67.js +0 -1
- package/assets/esri/core/workers/chunks/5f6942ac94acd7842926.js +0 -1
- package/assets/esri/core/workers/chunks/6118706b9a038e9a06b8.js +0 -1
- package/assets/esri/core/workers/chunks/6d15229b3fa84a7acf4d.js +0 -599
- package/assets/esri/core/workers/chunks/7314c0131403cac84ad7.js +0 -1
- package/assets/esri/core/workers/chunks/73545bb13c70f6a347a4.js +0 -1
- package/assets/esri/core/workers/chunks/73a045061e69a22b6869.js +0 -1
- package/assets/esri/core/workers/chunks/75669912cddcb5db52c8.js +0 -1
- package/assets/esri/core/workers/chunks/7ca32806e47be15109a4.js +0 -1
- package/assets/esri/core/workers/chunks/7d6ed65bbcd279448191.js +0 -1
- package/assets/esri/core/workers/chunks/81f149e45c79b9b086fb.js +0 -1
- package/assets/esri/core/workers/chunks/84fa25f66a6949290221.js +0 -1
- package/assets/esri/core/workers/chunks/852aabbf671d2ca9cd33.js +0 -1
- package/assets/esri/core/workers/chunks/854fe80272b59fafc2e9.js +0 -1
- package/assets/esri/core/workers/chunks/861817be5e050e9522ab.js +0 -1
- package/assets/esri/core/workers/chunks/89345a682dea60ef1643.js +0 -1
- package/assets/esri/core/workers/chunks/8985402c328b90af5724.js +0 -1
- package/assets/esri/core/workers/chunks/89fdf9ad10ca8fbb08a5.js +0 -1
- package/assets/esri/core/workers/chunks/8b094330323d9b16fb5d.js +0 -1
- package/assets/esri/core/workers/chunks/90aed8c4b266832f84ca.js +0 -1
- package/assets/esri/core/workers/chunks/9776c2db337222ceceef.js +0 -1
- package/assets/esri/core/workers/chunks/990853e9df38fdfc58b5.js +0 -1
- package/assets/esri/core/workers/chunks/9a21ba0c45a96b94c05e.js +0 -1
- package/assets/esri/core/workers/chunks/9a235c92f21df2c17aa8.js +0 -1
- package/assets/esri/core/workers/chunks/9b56162ac67c992193ce.js +0 -1
- package/assets/esri/core/workers/chunks/9f1f5fb648302c43ad12.js +0 -1
- package/assets/esri/core/workers/chunks/a1e6187c239fdc7553ed.js +0 -1
- package/assets/esri/core/workers/chunks/a4b6fdbc995be03d2afb.js +0 -1
- package/assets/esri/core/workers/chunks/a760be8fa6c6ea6b745c.js +0 -1
- package/assets/esri/core/workers/chunks/a8782286ce3c0d6c20e6.js +0 -1
- package/assets/esri/core/workers/chunks/a96692514dcaa50340dd.js +0 -1
- package/assets/esri/core/workers/chunks/a994a3c912a33b2f4100.js +0 -1
- package/assets/esri/core/workers/chunks/aa7aaeae31ddb259e55e.js +0 -1
- package/assets/esri/core/workers/chunks/abcc5fb71be2bd94878c.js +0 -1
- package/assets/esri/core/workers/chunks/aecb05df4ad1454f5435.js +0 -1
- package/assets/esri/core/workers/chunks/aecb105db7cec2c9c4c5.js +0 -1
- package/assets/esri/core/workers/chunks/b19f33e026a2a43b17c4.js +0 -1
- package/assets/esri/core/workers/chunks/b3950d5f1f3352521504.js +0 -1
- package/assets/esri/core/workers/chunks/b3f0600729227b458a75.js +0 -1
- package/assets/esri/core/workers/chunks/b5922991d2f450e6a9d9.js +0 -1
- package/assets/esri/core/workers/chunks/b8643976a7f984552d94.js +0 -1
- package/assets/esri/core/workers/chunks/b8a11d32a4847513619b.js +0 -1
- package/assets/esri/core/workers/chunks/b8acb6c2538053c01cc6.js +0 -1
- package/assets/esri/core/workers/chunks/ba4259aa050169c1d523.js +0 -1
- package/assets/esri/core/workers/chunks/bbaf1d9835671c0165ca.js +0 -1
- package/assets/esri/core/workers/chunks/bcefdf9753d9d2f6f1be.js +0 -1
- package/assets/esri/core/workers/chunks/c178e2cfc34603661b1d.js +0 -1
- package/assets/esri/core/workers/chunks/c3e80c0e29ac6a7a6f80.js +0 -1
- package/assets/esri/core/workers/chunks/c79827f879d1d58d3f1b.js +0 -1
- package/assets/esri/core/workers/chunks/c92b40a532e708e506cc.js +0 -1
- package/assets/esri/core/workers/chunks/cb903ccbce87172a0757.js +0 -1
- package/assets/esri/core/workers/chunks/cda2e445eb2ac269abdf.js +0 -1
- package/assets/esri/core/workers/chunks/ce44e172e2847fd8df14.js +0 -1
- package/assets/esri/core/workers/chunks/cff7e921649aef715c78.js +0 -1
- package/assets/esri/core/workers/chunks/d315098b038a96084ff5.js +0 -1
- package/assets/esri/core/workers/chunks/d8c0d18f0132872decd3.js +0 -1
- package/assets/esri/core/workers/chunks/db0061a6d5bf454cc509.js +0 -1
- package/assets/esri/core/workers/chunks/dcfafcf4386f2940d000.js +0 -1
- package/assets/esri/core/workers/chunks/e2b034c391c603f7f825.js +0 -1
- package/assets/esri/core/workers/chunks/e3a73d9acebccd3ba49b.js +0 -1
- package/assets/esri/core/workers/chunks/e67bdd8bf38ebe89a344.js +0 -1
- package/assets/esri/core/workers/chunks/e797d45eba0884dc7e6f.js +0 -1
- package/assets/esri/core/workers/chunks/e81a3da05fcff97b4752.js +0 -1
- package/assets/esri/core/workers/chunks/e9dd60d0220036545ebb.js +0 -1
- package/assets/esri/core/workers/chunks/ea6d3b7c7d720aa7bc94.js +0 -1
- package/assets/esri/core/workers/chunks/eb9982bc866976fef960.js +0 -1
- package/assets/esri/core/workers/chunks/ec4669a0edeca94710e0.js +0 -1
- package/assets/esri/core/workers/chunks/ef9d74f8d5a502fda809.js +0 -1
- package/assets/esri/core/workers/chunks/f09446b9ff937a84d6d3.js +0 -1
- package/assets/esri/core/workers/chunks/f0bc5e8e44d53b73d431.js +0 -1
- package/assets/esri/core/workers/chunks/f653970d983f17fb764b.js +0 -1
- package/assets/esri/core/workers/chunks/f9edc685099f51363f41.js +0 -1
- package/assets/esri/core/workers/chunks/fa687ba2d66fcc2501da.js +0 -1
- package/assets/esri/core/workers/chunks/fb9a889ec9fd23739a14.js +0 -1
- package/assets/esri/core/workers/chunks/fe1b67ab7748a3aef231.js +0 -1
- package/chunks/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/core/shaderLibrary/shading/MultipassGeometryTest.glsl.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/shading/TerrainDepthTest.glsl.js +0 -8
- package/views/3d/webgl-engine/effects/fboFormatUtils.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositing.glsl.js +0 -2
- package/views/3d/webgl-engine/shaders/HUDCompositingTechnique.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1951,5647],{28491(e,t,r){r.d(t,{D:()=>
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1951,5647],{28491(e,t,r){r.d(t,{D:()=>L,b:()=>V});var o=r(32680),n=r(49255),a=r(68317),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),m=r(53466),h=r(92700),f=r(72824),p=r(35640),v=r(40261),g=r(77695),x=r(71651),b=r(9312),w=r(98619),y=r(62602),M=r(22393),T=r(59469),S=r(32482),C=r(51406),_=r(43259),z=r(58614),I=r(27950),P=r(77949),O=r(33079),F=r(71988),H=r(20304),E=r(31821),R=r(63761),j=r(27832),N=r(43616),D=r(73541),A=r(14113),B=r(49788);function V(e){const t=new A.N5,{attributes:r,vertex:V,fragment:L,varyings:G}=t,{output:W,normalType:k,offsetBackfaces:U,spherical:q,snowCover:Z,pbrMode:$,textureAlphaPremultiplied:Y,instancedDoublePrecision:J,hasVertexColors:K,hasVertexTangents:X,hasColorTexture:Q,hasNormalTexture:ee,hasNormalTextureTransform:te,hasColorTextureTransform:re}=e;if((0,P.NB)(V,e),r.add("position","vec3"),V.inputs.add("position",()=>"position"),G.add("vpos","vec3",{invariant:!0}),t.include(_.A,e),t.include(l.B,e),t.include(p.Ge,e),t.include(C.q2,e),!(0,n._o)(W))return t.include(v.E,e),t;t.include(C.Sx,e),t.include(C.MU,e),t.include(C.O1,e),t.include(C.QM,e),(0,P.yu)(V,e),t.include(u.Y,e),t.include(i.d);const oe=0===k||1===k;return oe&&U&&t.include(o.M),t.include(g.J,e),t.include(f.Mh,e),t.include(s.v,e),G.add("vPositionLocal","vec3"),t.include(m.U,e),t.include(d.K,e),t.include(h.c,e),V.uniforms.add(new F.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),G.add("vcolorExt","vec4"),V.include(c.WD),V.include(c.oF),t.include(J?S.QH:S.LA,e),V.main.add(E.H`
|
|
2
2
|
forwardVertexColor();
|
|
3
3
|
|
|
4
4
|
MaskedColor maskedColor =
|
|
@@ -10,13 +10,12 @@
|
|
|
10
10
|
vpos = getVertexInLocalOriginSpace();
|
|
11
11
|
vPositionLocal = vpos - view[3].xyz;
|
|
12
12
|
vpos = subtractOrigin(vpos);
|
|
13
|
-
${(0,E.If)(
|
|
13
|
+
${(0,E.If)(oe,"vNormalWorld = dpNormal(vvLocalNormal(normalModel()));")}
|
|
14
14
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
15
|
-
${(0,E.If)(
|
|
15
|
+
${(0,E.If)(X,"vTangent = dpTransformVertexTangent(tangent);")}
|
|
16
16
|
gl_Position = transformPosition(proj, view, vpos);
|
|
17
|
-
${(0,E.If)(
|
|
17
|
+
${(0,E.If)(oe&&U,"gl_Position = offsetBackfacingClipPosition(gl_Position, vpos, vNormalWorld, cameraPosition);")}
|
|
18
18
|
|
|
19
|
-
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
20
19
|
forwardTextureCoordinates();
|
|
21
20
|
forwardColorUV();
|
|
22
21
|
forwardNormalUV();
|
|
@@ -24,19 +23,18 @@
|
|
|
24
23
|
forwardOcclusionUV();
|
|
25
24
|
forwardMetallicRoughnessUV();
|
|
26
25
|
|
|
27
|
-
if (opacityMixMode != ${E.H.int(
|
|
26
|
+
if (opacityMixMode != ${E.H.int(N.Um.ignore)} && vcolorExt.a < ${E.H.float(B.Q)}) {
|
|
28
27
|
gl_Position = vec4(1e38, 1e38, 1e38, 1.0);
|
|
29
28
|
}
|
|
30
29
|
forwardLinearDepthToReadShadowMap();
|
|
31
|
-
`),
|
|
30
|
+
`),L.include(b.kA,e),L.include(x.n,e),t.include(z.S,e),L.include(a.HQ,e),t.include(D.D,e),(0,P.yu)(L,e),L.uniforms.add(V.uniforms.get("localOrigin"),new O.t("ambient",e=>e.ambient),new O.t("diffuse",e=>e.diffuse),new H.m("opacity",e=>e.opacity),new H.m("layerOpacity",e=>e.layerOpacity)),Q&&L.uniforms.add(new R.N("tex",e=>e.texture)),t.include(T._,e),L.include(M.c,e),L.include(I.N),t.include(y.r,e),L.include(j.b,e),(0,b.a8)(L),(0,b.eU)(L),(0,w.O4)(L),L.main.add(E.H`
|
|
32
31
|
discardBySlice(vpos);
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
${(0,E.If)(J,"texColor.rgb /= texColor.a;")}
|
|
32
|
+
${Q?E.H`
|
|
33
|
+
vec4 texColor = texture(tex, ${re?"colorUV":"vuv0"});
|
|
34
|
+
${(0,E.If)(Y,"texColor.rgb /= texColor.a;")}
|
|
37
35
|
discardOrAdjustAlpha(texColor);`:E.H`vec4 texColor = vec4(1.0);`}
|
|
38
36
|
shadingParams.viewDirection = normalize(vpos - cameraPosition);
|
|
39
|
-
${2===
|
|
37
|
+
${2===k?E.H`vec3 normal = screenDerivativeNormal(vPositionLocal);`:E.H`shadingParams.normalView = vNormalWorld;
|
|
40
38
|
vec3 normal = shadingNormal(shadingParams);`}
|
|
41
39
|
applyPBRFactors();
|
|
42
40
|
float ssao = evaluateAmbientOcclusionInverse() * getBakedOcclusion();
|
|
@@ -47,13 +45,13 @@
|
|
|
47
45
|
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
48
46
|
|
|
49
47
|
vec3 matColor = max(ambient, diffuse);
|
|
50
|
-
vec3 albedo = mixExternalColor(${(0,E.If)(
|
|
51
|
-
float opacity_ = layerOpacity * mixExternalOpacity(${(0,E.If)(
|
|
48
|
+
vec3 albedo = mixExternalColor(${(0,E.If)(K,"vColor.rgb *")} matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
49
|
+
float opacity_ = layerOpacity * mixExternalOpacity(${(0,E.If)(K,"vColor.a * ")} opacity, texColor.a, vcolorExt.a, opacityMixMode);
|
|
52
50
|
|
|
53
|
-
${
|
|
54
|
-
vec3 normalGround = ${
|
|
51
|
+
${ee?`mat3 tangentSpace = computeTangentSpace(${X?"normal":"normal, vpos, vuv0"});\n vec3 shadingNormal = computeTextureNormal(tangentSpace, ${te?"normalUV":"vuv0"});`:"vec3 shadingNormal = normal;"}
|
|
52
|
+
vec3 normalGround = ${q?"normalize(posWorld);":"vec3(0.0, 0.0, 1.0);"}
|
|
55
53
|
|
|
56
|
-
${(0,E.If)(
|
|
54
|
+
${(0,E.If)(Z,E.H`
|
|
57
55
|
float snow = getSnow(normal, normalGround);
|
|
58
56
|
albedo = mix(albedo, vec3(1), snow);
|
|
59
57
|
shadingNormal = mix(shadingNormal, normal, snow);
|
|
@@ -61,13 +59,13 @@
|
|
|
61
59
|
|
|
62
60
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
63
61
|
|
|
64
|
-
${1
|
|
62
|
+
${1===$||2===$?E.H`
|
|
65
63
|
float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
66
|
-
${(0,E.If)(
|
|
64
|
+
${(0,E.If)(Z,"mrr = applySnowToMRR(mrr, snow);")}
|
|
67
65
|
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, shadingParams.viewDirection, normalGround, mrr, additionalAmbientIrradiance);`:E.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
68
66
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
69
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,E.If)(
|
|
70
|
-
`),t}const
|
|
67
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,E.If)(Z,", snow")});
|
|
68
|
+
`),t}const L=Object.freeze(Object.defineProperty({__proto__:null,build:V},Symbol.toStringTag,{value:"Module"}))},587(e,t,r){r.d(t,{G:()=>v,a:()=>x,b:()=>g});var o=r(82048),n=r(92573),a=r(8578),i=r(98619),s=r(96608),l=r(34845),c=r(20304),u=r(31821),d=r(58029),m=r(12791),h=r(63761),f=r(65786),p=r(14113);class v extends f.Y{constructor(){super(...arguments),this.projScale=1,this.frameCount=0}}function g(e){const t=new p.N5,r=t.fragment;return t.include(o.c),t.include(l.Ir),(0,i.Gc)(r),r.include(n.V),t.include(s.t,{highStepCount:!1,screenSpaceReflections:!0}),r.include(a.k),r.uniforms.add(new h.N("normalMap",e=>e.normalTexture),new h.N("depthMap",e=>e.depthTexture),new h.N("lastFrameDepthTexture",(e,t)=>t.reprojection.lastFrameDepth?.attachment),new m.x("lastFrameGlobalIlluminationTexture",e=>e.globalIllumination?.getTexture()),new d.F("reprojectionViewMatrix",e=>e.reprojection.viewMatrix),new d.F("view",e=>e.camera.viewMatrix),new c.m("frameCount",e=>e.frameCount),new h.N("blueNoiseTex",e=>e.noiseTexture)),e.hasEmission&&r.uniforms.add(new h.N("lastFrameEmissionTexture",(e,t)=>t.reprojection.lastFrameEmission?.attachment)),r.constants.add("timeSamplesSize","float",64),r.constants.add("blueNoiseGridSize","float",8),r.code.add(u.H`vec4 randomDirection(float index) {
|
|
71
69
|
vec2 textureOffset = vec2(mod(index, blueNoiseGridSize), floor(index / blueNoiseGridSize)) * timeSamplesSize;
|
|
72
70
|
ivec2 iuv = ivec2(textureOffset + mod(gl_FragCoord.xy, vec2(timeSamplesSize)));
|
|
73
71
|
vec4 blueNoiseValue = texelFetch(blueNoiseTex, iuv, 0);
|
|
@@ -248,7 +246,7 @@ return mat3(tangent, bitangent, n);
|
|
|
248
246
|
vec2 encodedEmission = encodeRGBtoVec2(blurredEmission.rgb);
|
|
249
247
|
float occlusion = occlusionSum / occlusionWeightSum;
|
|
250
248
|
fragColor = vec4(vec3(encodedEmission.x, encodedEmission.y, centerOcclusionWeight), occlusion);
|
|
251
|
-
`),e}const g=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:p,build:v},Symbol.toStringTag,{value:"Module"}))},57323(e,t,r){r.d(t,{R:()=>D,b:()=>
|
|
249
|
+
`),e}const g=Object.freeze(Object.defineProperty({__proto__:null,GlobalIlluminationBlurDrawParameters:p,build:v},Symbol.toStringTag,{value:"Module"}))},57323(e,t,r){r.d(t,{R:()=>D,b:()=>N});var o=r(32680),n=r(49255),a=r(68317),i=r(76597),s=r(24321),l=r(2585),c=r(43519),u=r(96336),d=r(39014),m=r(53466),h=r(92700),f=r(35640),p=r(40261),v=r(71651),g=r(9312),x=r(98619),b=r(22393),w=r(59469),y=r(32482),M=r(43259),T=r(58614),S=r(27950),C=r(77949),_=r(33079),z=r(71988),I=r(20304),P=r(31821),O=r(63761),F=r(27832),H=r(43616),E=r(26934),R=r(73541),j=r(14113);function N(e){const t=new j.N5,{attributes:r,vertex:N,fragment:D,varyings:A}=t,{output:B,offsetBackfaces:V,pbrMode:L,snowCover:G,spherical:W}=e,k=1===L||2===L;if((0,C.NB)(N,e),r.add("position","vec3"),N.inputs.add("position",()=>"position"),A.add("vpos","vec3",{invariant:!0}),t.include(M.A,e),t.include(l.B,e),t.include(f.Ge,e),!(0,n._o)(B))return t.include(p.E,e),t;(0,C.yu)(t.vertex,e),t.include(u.Y,e),t.include(i.d),V&&t.include(o.M),A.add("vNormalWorld","vec3"),A.add("localvpos","vec3",{invariant:!0}),t.include(m.U,e),t.include(d.K,e),t.include(s.v,e),t.include(h.c,e),N.include(c.WD),N.include(c.oF),N.uniforms.add(new z.E("externalColor",e=>e.externalColor,{supportsNaN:!0})),A.add("vcolorExt","vec4"),t.include(e.instancedDoublePrecision?y.QH:y.LA,e),N.include(E.Q),N.main.add(P.H`
|
|
252
250
|
forwardVertexColor();
|
|
253
251
|
|
|
254
252
|
MaskedColor maskedColorExt =
|
|
@@ -257,7 +255,7 @@ return mat3(tangent, bitangent, n);
|
|
|
257
255
|
vcolorExt = maskedColorExt.color;
|
|
258
256
|
forwardColorMixMode(maskedColorExt.mask);
|
|
259
257
|
|
|
260
|
-
bool alphaCut = opacityMixMode != ${
|
|
258
|
+
bool alphaCut = opacityMixMode != ${P.H.int(H.Um.ignore)} && vcolorExt.a < alphaCutoff;
|
|
261
259
|
vpos = getVertexInLocalOriginSpace();
|
|
262
260
|
|
|
263
261
|
localvpos = vpos - view[3].xyz;
|
|
@@ -266,16 +264,14 @@ return mat3(tangent, bitangent, n);
|
|
|
266
264
|
vpos = addVerticalOffset(vpos, localOrigin);
|
|
267
265
|
vec4 basePosition = transformPosition(proj, view, vpos);
|
|
268
266
|
|
|
269
|
-
forwardViewPosDepth((view * vec4(vpos, 1.0)).xyz);
|
|
270
267
|
forwardTextureCoordinates();
|
|
271
268
|
forwardLinearDepthToReadShadowMap();
|
|
272
269
|
gl_Position = alphaCut ? vec4(1e38, 1e38, 1e38, 1.0) :
|
|
273
|
-
${(0,
|
|
274
|
-
`);const{hasColorTexture:
|
|
270
|
+
${(0,P.If)(V,"offsetBackfacingClipPosition(basePosition, vpos, vNormalWorld, cameraPosition);","basePosition;")}
|
|
271
|
+
`);const{hasColorTexture:U,hasColorTextureTransform:q}=e;return D.include(g.kA,e),D.include(v.n,e),t.include(T.S,e),D.include(a.HQ,e),t.include(R.D,e),(0,C.yu)(D,e),(0,x.Gc)(D),(0,g.a8)(D),(0,g.eU)(D),D.uniforms.add(N.uniforms.get("localOrigin"),N.uniforms.get("view"),new _.t("ambient",e=>e.ambient),new _.t("diffuse",e=>e.diffuse),new I.m("opacity",e=>e.opacity),new I.m("layerOpacity",e=>e.layerOpacity)),U&&D.uniforms.add(new O.N("tex",e=>e.texture)),t.include(w._,e),D.include(b.c,e),D.include(S.N),D.include(F.b,e),(0,x.O4)(D),D.main.add(P.H`
|
|
275
272
|
discardBySlice(vpos);
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
${(0,O.If)(q,`${(0,O.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
273
|
+
vec4 texColor = ${U?`texture(tex, ${q?"colorUV":"vuv0"})`:" vec4(1.0)"};
|
|
274
|
+
${(0,P.If)(U,`${(0,P.If)(e.textureAlphaPremultiplied,"texColor.rgb /= texColor.a;")}\n discardOrAdjustAlpha(texColor);`)}
|
|
279
275
|
vec3 viewDirection = normalize(vpos - cameraPosition);
|
|
280
276
|
applyPBRFactors();
|
|
281
277
|
float ssao = evaluateAmbientOcclusionInverse();
|
|
@@ -285,16 +281,16 @@ return mat3(tangent, bitangent, n);
|
|
|
285
281
|
vec3 additionalLight = ssao * mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;
|
|
286
282
|
float shadow = readShadow(additionalAmbientScale, vpos);
|
|
287
283
|
vec3 matColor = max(ambient, diffuse);
|
|
288
|
-
${e.hasVertexColors?
|
|
289
|
-
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:
|
|
284
|
+
${e.hasVertexColors?P.H`vec3 albedo = mixExternalColor(vColor.rgb * matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
285
|
+
float opacity_ = layerOpacity * mixExternalOpacity(vColor.a * opacity, texColor.a, vcolorExt.a, opacityMixMode);`:P.H`vec3 albedo = mixExternalColor(matColor, texColor.rgb, vcolorExt.rgb, colorMixMode);
|
|
290
286
|
float opacity_ = layerOpacity * mixExternalOpacity(opacity, texColor.a, vcolorExt.a, opacityMixMode);`}
|
|
291
287
|
|
|
292
288
|
vec3 shadingNormal = normalize(vNormalWorld);
|
|
293
|
-
vec3 groundNormal = ${
|
|
289
|
+
vec3 groundNormal = ${W?"normalize(vpos + localOrigin)":"vec3(0.0, 0.0, 1.0)"};
|
|
294
290
|
|
|
295
|
-
${(0,
|
|
291
|
+
${(0,P.If)(G,"vec3 faceNormal = screenDerivativeNormal(vpos);\n float snow = getRealisticTreeSnow(faceNormal, shadingNormal, groundNormal);\n albedo = mix(albedo, vec3(1), snow);")}
|
|
296
292
|
|
|
297
|
-
${
|
|
293
|
+
${P.H`albedo *= 1.2;
|
|
298
294
|
vec3 viewForward = vec3(view[0][2], view[1][2], view[2][2]);
|
|
299
295
|
float alignmentLightView = clamp(dot(viewForward, -mainLightDirection), 0.0, 1.0);
|
|
300
296
|
float transmittance = 1.0 - clamp(dot(viewForward, shadingNormal), 0.0, 1.0);
|
|
@@ -302,11 +298,11 @@ return mat3(tangent, bitangent, n);
|
|
|
302
298
|
float backLightFactor = 0.5 * treeRadialFalloff * alignmentLightView * transmittance * (1.0 - shadow);
|
|
303
299
|
additionalLight += backLightFactor * mainLightIntensity;`}
|
|
304
300
|
|
|
305
|
-
${
|
|
306
|
-
${(0,
|
|
307
|
-
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:
|
|
301
|
+
${k?P.H`float additionalAmbientIrradiance = additionalAmbientIrradianceFactor * mainLightIntensity[2];
|
|
302
|
+
${(0,P.If)(G,"mrr = applySnowToMRR(mrr, snow);")}
|
|
303
|
+
vec3 shadedColor = evaluateSceneLightingPBR(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight, viewDirection, groundNormal, mrr, additionalAmbientIrradiance);`:P.H`vec3 shadedColor = evaluateSceneLighting(shadingNormal, albedo, shadow, 1.0 - ssao, additionalLight);`}
|
|
308
304
|
vec4 finalColor = vec4(shadedColor, opacity_);
|
|
309
|
-
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,
|
|
305
|
+
outputColorHighlightOLID(applySlice(finalColor, vpos), albedo ${(0,P.If)(G,", 1.0")});`),t}const D=Object.freeze(Object.defineProperty({__proto__:null,build:N},Symbol.toStringTag,{value:"Module"}))},15581(e,t,r){r.d(t,{S:()=>b,b:()=>v,g:()=>g});var o=r(37585),n=r(48163),a=r(82048),i=r(52540),s=r(65261),l=r(34845),c=r(77108),u=r(47286),d=r(33094),m=r(20304),h=r(31821),f=r(63761),p=r(14113);function v(){const e=new p.N5,t=e.fragment;return e.include(a.c),e.include(l.Ir),t.include(i.E),t.include(s.C),t.uniforms.add(new d.U("radius",e=>g(e.camera))).code.add(h.H`vec3 sphere[16] = vec3[16](
|
|
310
306
|
vec3(0.186937, 0.0, 0.0),
|
|
311
307
|
vec3(0.700542, 0.0, 0.0),
|
|
312
308
|
vec3(-0.864858, -0.481795, -0.111713),
|
|
@@ -411,7 +407,7 @@ return fallOffFunction(vv, vn, 0.1);
|
|
|
411
407
|
vec2 uvOffset = uv + rf * blurSize;
|
|
412
408
|
blurFunction(uvOffset, rf, center_d, sharpness, w_total, b);
|
|
413
409
|
}
|
|
414
|
-
fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>a,f:()=>i,n:()=>n});var o=r(34275);function n(e,t){a(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r=2,n=r){const a=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<a;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=n;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<a;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=n;else for(let o=0;o<a;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=n}function i(e,t,r,o){const n=e.typedBuffer,a=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*a;for(let e=0;e<i;++e)n[s]=t,n[s+1]=r,s+=a}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:a,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>m,b:()=>l,c:()=>s,d:()=>a,e:()=>h,f:()=>d,l:()=>u,n:()=>f,t:()=>i});var o=r(40876),n=(r(44208),r(72727));function a(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],m=r[4],h=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],w=r[14];let y=0,M=0;for(let r=0;r<l;r++){const r=t[y],n=t[y+1],i=t[y+2];e[M]=c*r+m*n+p*i+x,e[M+1]=u*r+h*n+v*i+b,e[M+2]=d*r+f*n+g*i+w,y+=a,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],m=r[3],h=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],n=t[x+1],i=t[x+2];e[b]=c*r+m*n+p*i,e[b+1]=u*r+h*n+v*i,e[b+2]=d*r+f*n+g*i,x+=a,b+=o}}function c(e,t,r,o=3,n=o){const a=Math.min(e.length/o,t.length/n);let i=0,s=0;for(let l=0;l<a;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=n,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,n,a=3,i=a){const s=Math.min(e.length/a,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=n*(r*t[l])**u,e[c+1]=n*(r*t[l+1])**u,e[c+2]=n*(r*t[l+2])**u,l+=i,c+=a}function m(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s);let c=0,u=0;for(let n=0;n<l;n++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=a,u+=o;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const n=Math.min(e.length/r,t.length/o);let a=0,i=0;for(let s=0;s<n;s++){const n=t[a],s=t[a+1],l=t[a+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*n,e[i+1]=t*s,e[i+2]=t*l}a+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:h,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)n[c]=i[l]>>r,n[c+1]=i[l+1]>>r,n[c+2]=i[l+2]>>r,l+=s,c+=a},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:a,translate:m},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>l,uC:()=>s});var o=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return a(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return a(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,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function a(e,t,r,o,n=0,a=!1){return(o-=n)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),a&&o===r&&(o=t),o+n}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},46140(e,t,r){r.d(t,{A:()=>n});var o=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 o.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,a]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!a?.match||!i.test(a))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(a,10);return new n(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>o});const a=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,a,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>n,vt:()=>o,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return o()}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>c,vt:()=>o});const c=a(),u=i(),d=s(),m=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:m,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:n,ones:i,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function n(e){return[e[0],e[1]]}function a(e,t){return[e,t]}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>c,fA:()=>a,o8:()=>n,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:n,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function n(e,t,r,o){return[e,t,r,o]}function a(e,t,r,o){return[e,t,r,o]}function i(){return n(1,1,1,1)}function s(){return n(1,0,0,0)}function l(){return n(0,1,0,0)}function c(){return n(0,0,1,0)}function u(){return n(0,0,0,1)}r.d(t,{CN:()=>a,Un:()=>m,fA:()=>n,uY:()=>d,vt:()=>o});const d=[0,0,0,0],m=i(),h=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_W:v,UNIT_X:h,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:a,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>n,Cc:()=>w,LI:()=>m,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>y,aI:()=>T,hG:()=>p,hZ:()=>a,hs:()=>h,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,r,o,n){return e[0]=t,e[1]=r,e[2]=o,e[3]=n,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function m(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+o*o+n*n+a*a)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+o*o+n*n+a*a}function v(e){const t=e[0],r=e[1],o=e[2],n=e[3];return Math.sqrt(t*t+r*r+o*o+n*n)}function g(e){const t=e[0],r=e[1],o=e[2],n=e[3];return t*t+r*r+o*o+n*n}function x(e,t){const r=t[0],o=t[1],n=t[2],a=t[3];let i=r*r+o*o+n*n+a*a;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=n*i,e[3]=a*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,o){const n=t[0],a=t[1],i=t[2],s=t[3];return e[0]=n+o*(r[0]-n),e[1]=a+o*(r[1]-a),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function y(e,t,r){const o=t[0],n=t[1],a=t[2],i=t[3];return e[0]=r[0]*o+r[4]*n+r[8]*a+r[12]*i,e[1]=r[1]*o+r[5]*n+r[9]*a+r[13]*i,e[2]=r[2]*o+r[6]*n+r[10]*a+r[14]*i,e[3]=r[3]*o+r[7]*n+r[11]*a+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function T(e,t){const r=e[0],n=e[1],a=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-l)<=d*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(a-c)<=d*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const S=s,C=l,_=c,I=f,z=p,P=v,O=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:I,distance:f,div:_,divide:c,dot:b,equals:T,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:v,lerp:w,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let n,a,i,s,l,c;do{n=2*r()-1,a=2*r()-1,l=n*n+a*a}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*n,e[1]=t*a,e[2]=t*i*u,e[3]=t*s*u,e},round:m,scale:h,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:a,sqrDist:z,sqrLen:O,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:s,transformMat4:y,transformQuat:function(e,t,r){const o=t[0],n=t[1],a=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*a-l*n,d=c*n+l*o-i*a,m=c*a+i*n-s*o,h=-i*o-s*n-l*a;return e[0]=u*c+h*-i+d*-l-m*-s,e[1]=d*c+h*-s+m*-i-u*-l,e[2]=m*c+h*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>n,Ul:()=>h,i5:()=>m,lM:()=>a,qK:()=>u});var o=r(34275);const n=16;function a(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+m:Array.isArray(t)?c(t,n):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,m=145,h=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),n=r(91218),a=r(9762);function i(e,t,r,o){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,a.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,n.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),n=r(16930),a=r(9762),i=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,o.canProjectWithoutEngine)(t,n)?(0,a.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},17136(e,t,r){r.d(t,{Y_:()=>z,O7:()=>_,el:()=>C});var o=r(92602),n=r(69052),a=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),m=r(28735),h=r(11254),f=r(60408),p=r(65864),v=r(2272),g=r(84952),x=r(92300);const b=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function M(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(e),new a.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const n=e[o][0],a=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-n)*(i-n)+(s-a)*(s-a)),c=(s-a)/l,u=(i-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+n,s=c*o+a;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+n,i=c*e+a;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function S(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const n=t.cutIndexes[o],a=t.geometries[o],i=(0,u.r8)(a);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=a.getPoint(e,r);a.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(n===r){if(w(e))for(const t of(0,u.r8)(a))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,u.r8)(a))e[n]=e[n].addPath(t)}else r=n,e[n]=a}return e}async function C(e,t,r){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let a,i,c,w,y,_,I,z,P=0;const O=[],F=[];for(const t of e)if(null!=t)if(a||(a=t.spatialReference,i=(0,d.Vp)(a),c=a.isWebMercator,_=c?102100:4326,w=u.j7[_].maxX,y=u.j7[_].minX,I=u.j7[_].plus180Line,z=u.j7[_].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(T(t.clone(),w,y));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,w,y)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,y)*(2*w);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:a}=e;n=Number(n.toFixed(9)),a=Number(a.toFixed(9)),e.intersects(I)&&a!==w?(P=a>P?a:P,o=M(o,c),O.push(o),F.push("cut")):e.intersects(z)&&n!==y?(P=a*(2*w)>P?a*(2*w):P,o=M(o,c,360),O.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let H=(0,u.kd)(P,w),R=-90;const E=H,j=new l.A;for(;H>0;){const e=360*H-180;j.addPath([[e,R],[e,-1*R]]),R*=-1,H--}if(O.length>0&&E>0){const t=S(O,await async function(e,t,r,o){const n=(0,v.Dl)(e),a=t[0].spatialReference,i={...o,responseType:"json",query:{...n.query,f:"json",sr:(0,d.YX)(a),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,h.A)(n.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=a,t})}}(n,O,j,r)),o=[],a=[];for(let r=0;r<F.length;r++){const n=F[r];if("cut"!==n)a.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(o.push(n),a.push("simplify")):a.push(c?(0,m.Gh)(n):n)}}if(!o.length)return a;const i=await async function(e,t,r){const o="string"==typeof e?(0,g.An)(e):e,n=t[0].spatialReference,a=(0,f.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(n),geometries:JSON.stringify((0,x.X)(t))}},{data:s}=await(0,h.A)(o.path+"/simplify",i);return(0,x.V)(s.geometries,a,n)}(n,o,r),s=[];for(let e=0;e<a.length;e++){const t=a[e];"simplify"!==t?s.push(t):s.push(c?(0,m.Gh)(i.shift()):i.shift())}return s}const N=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)N.push(t);else{const e=O.shift();N.push(!0===c?(0,m.Gh)(e):e)}}return N}function _(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[n,a]=o.valid,i=2*a;let s=0,l=0;t>a?s=Math.ceil(Math.abs(t-a)/i):t<n&&(s=-Math.ceil(Math.abs(t-n)/i)),e>a?l=Math.ceil(Math.abs(e-a)/i):e<n&&(l=-Math.ceil(Math.abs(e-n)/i));let c=e+(s-l)*i;const u=c-t;return u>a?c-=i:u<n&&(c+=i),c}function I(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new n.hr(r,o)}const z=I(c.A.WGS84);I(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>i,kS:()=>l,kd:()=>s,r8:()=>c});var o=r(82799),n=r(16930),a=r(60408);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function s(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=c(e);for(const e of r)for(const r of e)r[0]+=t;return e}function c(e){return(0,a.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>w,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>y,vE:()=>M,vt:()=>i});var o=r(34727),n=r(35522),a=r(51850);function i(e=T){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,n=i()){return n[0]=e,n[1]=t,n[2]=r,n[3]=o,n}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const n=r[0]-t[0],a=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=a*u-s*c,m=s*l-n*u,h=n*c-a*l,f=d*d+m*m+h*h,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=m*p,o[2]=h*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,a=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(h,o);let s=a,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,n.t2)(h,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,n.Re)(v,h,f),(0,n.S8)(v,v),(0,n.Re)(g,f,p),(0,n.S8)(g,g),l=!(0,n.t2)(h,p)&&!(0,n.t2)(f,p)&&Math.abs((0,n.Om)(v,g))<m;return l?(u(h,f,p,e),!0):(0!==o||1!==a||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const m=.99619469809,h=(0,a.vt)(),f=(0,a.vt)(),p=(0,a.vt)(),v=(0,a.vt)(),g=(0,a.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(M(e,t.origin,t.vector,0,r))}function b(e,t){return y(e,t)>=0}function w(e,t){const r=(0,n.Om)(e,t.ray.direction),o=-y(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const a=o/r;return r>0?a<t.c1&&(t.c1=a):a>t.c0&&(t.c0=a),t.c0<=t.c1}function y(e,t){return(0,n.Om)(e,t)+e[3]}function M(e,t,r,a,i){const s=(0,n.Om)(e,r),l=y(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&a&&(c=(0,o.qE)(c,0,1)),!(4&a)&&c<0||!(8&a)&&c>1?l>=0?2:3:((0,n.WQ)(i,t,(0,n.hs)(i,r,c)),l>=0?0:1)}const T=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),n=r(35522),a=r(51850);function i(e,t){return(0,n.Om)(e,t)/(0,n.Bw)(e)}function s(e,t){const r=(0,n.Om)(e,t)/((0,n.Bw)(e)*(0,n.Bw)(t));return-(0,o.XM)(r)}(0,a.vt)(),(0,a.vt)()},32114(e,t,r){r.d(t,{Rc:()=>h,J8:()=>f,rq:()=>d,Km:()=>m}),r(44208);var o=r(26390),n=r(29242),a=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(n.vt)}static createMat4f64(){return new u(a.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),m=u.createVec4f64(),h=(u.createMat3f64(),u.createMat4f64()),f=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>n});var o=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>a});var o=r(60408),n=r(65864);function a(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,n.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),n=r(60999),a=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.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 s=await(0,n.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new a.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),n=r(97146),a=r(63907);function i(e,t){switch(t){case a.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case a.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(o[t++]=e[n],o[t++]=e[n+1],o[t++]=e[n+2]):(o[t++]=e[n+1],o[t++]=e[n],o[t++]=e[n+2])}return o}(e);case a.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,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const n=e[0];let a=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=n,o[i++]=a,o[i++]=r,a=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>n,pn:()=>s,x3:()=>a});var o=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function a(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let a=URL.createObjectURL(r);switch(t){case"image/jpeg":a+="#.jpg";break;case"image/png":a+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(i)},o=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(a),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=a});try{i.src=a,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),i}},5644(e,t,r){r.d(t,{fetch:()=>wt});var o=r(40876),n=r(61473),a=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),m=r(51850),h=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),w=r(21015),y=r(84498),M=r(51530),T=r(88340);function S(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:T.Un,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),a=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,a,l),(0,i.lw)(c,n,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class _{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var I=r(11254),z=r(60999),P=r(49186),O=r(53966),F=r(69397);class H{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 o=this._outer.get(e);o?o.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,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new H;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var R=r(17676),E=r(46140),j=r(97146),N=r(31217),A=r(46610),D=r(63500),B=r(18845),V=r(49255),L=r(97768),G=r(92130),W=r(65786);class k extends G.A{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,L.Gz)(this._texture),this._textureNormal=(0,L.Gz)(this._textureNormal),this._textureEmissive=(0,L.Gz)(this._textureEmissive),this._textureOcclusion=(0,L.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,L.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new q(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,L.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,R.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,L.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends W.Y{constructor(e=null){super(),this.textureEmissive=e}}class q extends U{constructor(e,t,r,o,n,a,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=n,this.scale=a,this.normalTextureTransformMatrix=i}}var Z=r(11725),$=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,h.vt)();function K(e,t,r,o,n,a){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,$.vA)(0===e.type),Q(e.boundingInfo,r,i,s,n,l,a);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,n,a,i,s,l,c){const u=t,m=de,h=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=h>=f?h>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,w=(v+(3-x))%3,y=u[b]/u[g],M=u[w]/u[g],T=1/u[g],S=te,C=re,_=oe,{normalRequired:I}=l;for(let t=r;t<o;++t){const r=3*t,o=i*n[r];(0,d.hZ)(m[0],a[o+0],a[o+1],a[o+2]);const l=i*n[r+1];(0,d.hZ)(m[1],a[l+0],a[l+1],a[l+2]);const u=i*n[r+2];(0,d.hZ)(m[2],a[u+0],a[u+1],a[u+2]),s&&((0,d.C)(m[0],s.applyToVertex(m[0][0],m[0][1],m[0][2],t)),(0,d.C)(m[1],s.applyToVertex(m[1][0],m[1][1],m[1][2],t)),(0,d.C)(m[2],s.applyToVertex(m[2][0],m[2][1],m[2][2],t))),(0,d.jb)(S,m[0],e),(0,d.jb)(C,m[1],e),(0,d.jb)(_,m[2],e);const h=S[b]-y*S[g],f=S[w]-M*S[g],p=C[b]-y*C[g],v=C[w]-M*C[g],x=_[b]-y*_[g],z=_[w]-M*_[g],P=x*v-z*p,O=h*z-f*x,F=p*f-v*h;if((P<0||O<0||F<0)&&(P>0||O>0||F>0))continue;const H=P+O+F;if(0===H)continue;const R=P*(T*S[g])+O*(T*C[g])+F*(T*_[g]);if(R*Math.sign(H)<0)continue;const E=R/H;E>=0&&c(E,I?ae(m):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,n,l,a)}}const X=(0,m.vt)();function Q(e,t,r,o,n,a,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,X);if((0,h.Ne)(J,e.bbMin),(0,h.vI)(J,e.bbMax),null!=n&&n.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const n=(e[0]-o-t[0])*r[0],a=(e[3]+o-t[0])*r[0];let i=Math.min(n,a),s=Math.max(n,a);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,n,a,i);return}}!function(e,t,r,o,n,a,i,s,l,c,u){const d=e[0],m=e[1],h=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*n[r];let c=a[o],x=a[o+1],b=a[o+2];const w=i*n[r+1];let y=a[w],M=a[w+1],T=a[w+2];const S=i*n[r+2];let C=a[S],_=a[S+1],I=a[S+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[y,M,T]=l.applyToVertex(y,M,T,e),[C,_,I]=l.applyToVertex(C,_,I,e));const z=y-c,P=M-x,O=T-b,F=C-c,H=_-x,R=I-b,E=p*R-H*v,j=v*F-R*f,N=f*H-F*p,A=z*E+P*j+O*N;if(Math.abs(A)<=ce)continue;const D=d-c,B=m-x,V=h-b,L=D*E+B*j+V*N;if(A>0){if(L<0||L>A)continue}else if(L>0||L<A)continue;const G=B*O-P*V,W=V*z-O*D,k=D*P-z*B,U=f*G+p*W+v*k;if(A>0){if(U<0||L+U>A)continue}else if(U>0||L+U<A)continue;const q=(F*G+H*W+R*k)/A;q>=0&&u(q,g?ne(z,P,O,F,H,R,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,n,a,i)}}const ee=(0,m.vt)();const te=(0,m.vt)(),re=(0,m.vt)(),oe=(0,m.vt)();function ne(e,t,r,o,n,a,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,n,a),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ae(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,m.vt)(),se=(0,m.vt)(),le=1e3,ce=1e-7,ue=(0,m.vt)(),de=[(0,m.vt)(),(0,m.vt)(),(0,m.vt)()];var me=r(16396),he=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,n,a){return(0,he.vJ)(r,o,this.layout,e,t,n,a)}}var pe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),we=r(4431),ye=r(1843),Me=r(72824),Te=r(13840),Se=r(98958),Ce=r(16943),_e=r(33524),Ie=r(56133),ze=r(4576);r(66289);var Pe=r(69622),Oe=r(65529),Fe=r(32728);class He{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",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let Re=class extends Pe.A{constructor(e,t){super(e),this.events=new Oe.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return je(Ee.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ve,this._buffer=this._layout.createBuffer(this._capacity),this._view=new He(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,$.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,$.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=Ne,o=Ae;t.localTransform.getMat(e,De),t.globalTransform.getMat(e,Be);const n=(0,l.lw)(Be,Be,De);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,n),t.model.setMat(e,o);const a=(0,Fe.wp)(Ne,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,Ae),r.modelOrigin.getVec(e,Ne),t[0]=Ae[0],t[1]=Ae[1],t[2]=Ae[2],t[3]=0,t[4]=Ae[3],t[5]=Ae[4],t[6]=Ae[5],t[7]=0,t[8]=Ae[6],t[9]=Ae[7],t[10]=Ae[8],t[11]=0,t[12]=Ne[0],t[13]=Ne[1],t[14]=Ne[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(Ne,this,e),t*=Math.max(Ne[0],Ne[1],Ne[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ne,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ne[0],Ne[1],Ne[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,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(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(Ve,Math.floor(this._capacity*ze.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new He(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,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],Re.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],Re.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],Re.prototype,"size",null),Re=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Re);const Ee=(0,ye.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function je(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const Ne=(0,m.vt)(),Ae=(0,s.vt)(),De=(0,c.vt)(),Be=(0,c.vt)(),Ve=64,Le=(0,ye.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Ge=r(74810),We=r(28491),ke=r(90644),Ue=r(49788);class qe extends Me.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Ge.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=m.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,m.CN)(.2,.2,.2),this.diffuse=(0,m.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,m.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=Ue.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}}Me.gy;let Ze=class extends Se.w{constructor(e,t){let o=(0,we.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,we.U)(function(e){return je(Le.clone(),e)}(t)))),super(e,t,o),this.shader=new Te.r(We.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:n,customDepthTest:a,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,_e.Yf)(r):null,culling:Ye(e)?(0,ke.Xt)(n):null,depthTest:(0,_e.mt)(r,$e(a)),depthWrite:(0,_e.z5)(e),colorWrite:ke.kn,stencilWrite:i?Ie.v0:null,stencilTest:i?t?Ie.a9:Ie.qh:null,polygonOffset:(0,pe.sG)(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 $e(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,ye.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,Ce.E)()&&t.vec4u8("olidColor"),t}Ze=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Ze);var Ke=r(51976),Xe=r(47724);class Qe extends Xe.L{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.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!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,ge.Cg)([(0,Ke.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Ke.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"terrainDepthTest",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"cullAboveTerrain",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends Ze{constructor(){super(...arguments),this.shader=new Te.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Ke.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Ke.W)()],rt.prototype,"receiveShadows",void 0);class ot extends Z.i{constructor(e,t){super(e,at),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,V.uw)(e)&&!this.transparent],[4,e=>(0,V.uw)(e)&&this.transparent&&this.parameters.writeDepth],[9,e=>(0,V.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,m.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}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:o,doubleSided:n,doubleSidedType:a}=t;r.hasVertexTangents=!o&&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=o?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=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:n&&"normal"===a?1:n&&"winding-order"===a?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,V._o)(e.output)?(r.terrainDepthTest=e.terrainDepthTest,r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&null!=e.globalIllumination):(r.terrainDepthTest=!1,r.receiveShadows=r.hasShadowHighlights=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,o,n,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,d.S8)(ct,dt);break;case 2:a=(0,d.C)(ct,lt)}const i=(0,d.Re)(mt,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(a,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(a,a,u),(0,d.ei)(ut,a,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),n=(0,d.Re)(st,n,ut)}a=(0,pe.b6)(a,this._configuration,o,n),K(e,r,o,n,(0,me.ou)(r.verticalOffset),a)}createGLMaterial(e){return new nt(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:n,texture:a,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||n<1||(null!=a||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class nt extends k{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,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:Ze,e)}}class at extends qe{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 it=(0,m.vt)(),st=(0,m.vt)(),lt=(0,m.fA)(0,0,1),ct=(0,m.vt)(),ut=(0,m.vt)(),dt=(0,m.vt)(),mt=(0,m.vt)(),ht=()=>O.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ft{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function pt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(ht().warn("Geometry must specify vertex attributes"),o=!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&&(ht().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(ht().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(ht().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else ht().warn("Indexed geometries must specify faces"),o=!1;break}default:ht().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(ht().warn("Geometry requires material"),o=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(ht().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,h.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new E.A(1,2,"wosr");async function wt(e,t){const s=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"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,z.Ke)((0,I.A)(e,t));if(r.ok)return r.value.data;(0,R.QP)(r.error),function(e){throw new P.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const n=e[o],a=n.images[0].data;if(!a){ht().warn("Externally referenced texture data is not yet supported");continue}const i=n.encoding+";base64,"+a,s="/textureDefinitions/"+o,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,N.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),n={};for(const e of o)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];n+=t?.image?t.image.width*t.image.height*4:0}return new ft(r,o,n+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,n=new Array,a=new H,i=e.resource,s=E.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let h=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!pt(i))continue;const s=xt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,j.tM)(x);p.push([e,new A.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,w=d&&d[b];if(w&&!f.has(b)){const{image:e,parameters:t}=w,r=new B.h(e,t);o.push(r),f.set(b,r)}const y=f.get(b),M=y?y.id:void 0,T=s.material;let S=a.get(T,b);if(null==S){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=w?gt(w.alphaChannelUsage):void 0,o={ambient:(0,m.ci)(e.diffuse),diffuse:(0,m.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:w?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),S=new ot(o,t),a.set(T,b,S)}n.push(S);const C=new D.V(S,p);h+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:n,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:h,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));f=await e(new w.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:C}=function(e,t,r){const n=e.model,s=e.meta,f=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!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 a of n.parts){const n=a.attributes.normal;if(null==n)return;const i=a.attributes.position,s=i.count,u=(0,m.vt)(),h=(0,m.vt)(),f=(0,m.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),a.transform);let b=0,w=0;for(let l=0;l<s;l++){i.getVec(l,h),n.getVec(l,u),(0,d.Z0)(h,h,a.transform),(0,d.Re)(f,h,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),m=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[w]=m,p[w+1]=m,p[w+2]=m,p[w+3]=1,w+=4}a.attributes.normal=new v.xs(g.buffer),a.attributes.color=new v.Eq(p.buffer)}}}(e,f));const T=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:w,mrrFactors:Ge.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:Ge.mb},I={...t.materialParameters,treeRendering:w},z=new Array,P=new Map,O=new Map,F=n.lods.length,H=(0,h.Ie)();return n.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new _(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,n,a,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:m,color:h,texCoord0:f,tangent:p}=t.attributes,v=t.material+(m?"_normal":"")+(h?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const n=e.textures.get(t);if(n){const e=n.data,a=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new B.h((0,M.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:a}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),m=(0,o.xV)(d.color[1]),h=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Ge.Jr)(d),w=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,m,h],ambient:[r,m,h],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=a.emissiveStrengthFromSymbol?a.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Ge.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:S(d.colorTextureTransform),normalTextureTransformMatrix:S(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:S(d.occlusionTextureTransform),emissiveTextureTransformMatrix:S(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:S(d.metallicRoughnessTextureTransform),...a},l))}const w=i.get(v);if(r.stageResources.materials.push(w),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(n,e,c,C,I,P,O,t,w),{geometry:d,vertexCount:m}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(n,s,e.transform,3,l);const c=[["position",new A.n(n,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(yt,e.transform),(0,g.b)(t,n,yt,3,s),(0,a.or)(yt)&&(0,g.n)(t,t),c.push(["normal",new A.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(yt,e.transform),(0,x.t)(t,n,yt,4,s),(0,a.or)(yt)&&(0,g.n)(t,t,4),c.push(["tangent",new A.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.texCoord0;(0,b.a)(t,n,2,a),c.push(["uv0",new A.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new A.n(t,o,4,!0)])}return{geometry:new D.V(t,c),vertexCount:r}}(e,r??new ot({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,h.iT)(H,f.bbMin),(0,h.iT)(H,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=m)}),l||z.push(c)}),{engineResources:z,referenceBoundingBox:H}}(f,t,s.specifiedLodIndex);return{lods:T,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const yt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>a,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),n=r(51850);function a(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),n=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),a=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,n,a),e}function s(e,t,r){r=r||e;const n=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-n*t[0],e[1]-n*t[1],e[2]-n*t[2]),(0,o.S8)(r,r)}function l(e,t,r,a=(0,n.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const n=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(n),m=d/i*Math.sin((1-r)*n),h=d/s*Math.sin(r*n);return(0,o.hs)(c,e,m),(0,o.hs)(u,t,h),(0,o.WQ)(a,c,u)}return(0,o.Cc)(a,e,t,r)}(0,n.vt)(),(0,n.vt)(),(0,n.vt)();const c=(0,n.vt)(),u=(0,n.vt)()},46686(e,t,r){r.d(t,{o:()=>n});var o=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
|
|
410
|
+
fragBlur = b / w_total;`),e}const m=Object.freeze(Object.defineProperty({__proto__:null,build:d},Symbol.toStringTag,{value:"Module"}))},43609(e,t,r){r.d(t,{a:()=>a,f:()=>i,n:()=>n});var o=r(34275);function n(e,t){a(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function a(e,t,r=2,n=r){const a=t.length/2;let i=0,s=0;if(!(0,o.iu)(t)||(0,o.dk)(t)){for(let o=0;o<a;++o)e[i]=t[s],e[i+1]=t[s+1],i+=r,s+=n;return}const l=(0,o.a3)(t);if((0,o.JI)(t))for(let o=0;o<a;++o)e[i]=Math.max(t[s]/l,-1),e[i+1]=Math.max(t[s+1]/l,-1),i+=r,s+=n;else for(let o=0;o<a;++o)e[i]=t[s]/l,e[i+1]=t[s+1]/l,i+=r,s+=n}function i(e,t,r,o){const n=e.typedBuffer,a=e.typedBufferStride,i=o?.count??e.count;let s=(o?.dstIndex??0)*a;for(let e=0;e<i;++e)n[s]=t,n[s+1]=r,s+=a}Object.freeze(Object.defineProperty({__proto__:null,fill:i,normalizeIntegerBuffer:a,normalizeIntegerBufferView:n},Symbol.toStringTag,{value:"Module"}))},73354(e,t,r){r.d(t,{a:()=>m,b:()=>l,c:()=>s,d:()=>a,e:()=>h,f:()=>d,l:()=>u,n:()=>f,t:()=>i});var o=r(40876),n=(r(44208),r(72727));function a(e,t,r){i(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function i(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],m=r[4],h=r[5],f=r[6],p=r[8],v=r[9],g=r[10],x=r[12],b=r[13],w=r[14];let y=0,M=0;for(let r=0;r<l;r++){const r=t[y],n=t[y+1],i=t[y+2];e[M]=c*r+m*n+p*i+x,e[M+1]=u*r+h*n+v*i+b,e[M+2]=d*r+f*n+g*i+w,y+=a,M+=o}return e}function s(e,t,r){l(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)}function l(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s),c=r[0],u=r[1],d=r[2],m=r[3],h=r[4],f=r[5],p=r[6],v=r[7],g=r[8];let x=0,b=0;for(let r=0;r<l;r++){const r=t[x],n=t[x+1],i=t[x+2];e[b]=c*r+m*n+p*i,e[b+1]=u*r+h*n+v*i,e[b+2]=d*r+f*n+g*i,x+=a,b+=o}}function c(e,t,r,o=3,n=o){const a=Math.min(e.length/o,t.length/n);let i=0,s=0;for(let l=0;l<a;l++)e[s]=r*t[i],e[s+1]=r*t[i+1],e[s+2]=r*t[i+2],i+=n,s+=o;return e}function u(e,t,r,o){d(e.typedBuffer,t.typedBuffer,r,o,e.typedBufferStride,t.typedBufferStride)}function d(e,t,r,n,a=3,i=a){const s=Math.min(e.length/a,t.length/i);let l=0,c=0;const u=1/o.Tf;for(let o=0;o<s;o++)e[c]=n*(r*t[l])**u,e[c+1]=n*(r*t[l+1])**u,e[c+2]=n*(r*t[l+2])**u,l+=i,c+=a}function m(e,t,r,o=3,a=o){const i=(0,n.k)(e.length,o,3),s=(0,n.k)(t.length,a,3),l=Math.min(i,s);let c=0,u=0;for(let n=0;n<l;n++)e[u]=t[c]+r[0],e[u+1]=t[c+1]+r[1],e[u+2]=t[c+2]+r[2],c+=a,u+=o;return e}function h(e,t){f(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function f(e,t,r=3,o=r){const n=Math.min(e.length/r,t.length/o);let a=0,i=0;for(let s=0;s<n;s++){const n=t[a],s=t[a+1],l=t[a+2],c=n*n+s*s+l*l;if(c>0){const t=1/Math.sqrt(c);e[i]=t*n,e[i+1]=t*s,e[i+2]=t*l}a+=o,i+=r}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:d,linearToSRGBView:u,normalize:f,normalizeView:h,scale:c,scaleView:function(e,t,r){c(e.typedBuffer,t.typedBuffer,r,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,r){const o=Math.min(e.count,t.count),n=e.typedBuffer,a=e.typedBufferStride,i=t.typedBuffer,s=t.typedBufferStride;let l=0,c=0;for(let e=0;e<o;e++)n[c]=i[l]>>r,n[c+1]=i[l+1]>>r,n[c+2]=i[l+2]>>r,l+=s,c+=a},transformMat3:l,transformMat3View:s,transformMat4:i,transformMat4View:a,translate:m},Symbol.toStringTag,{value:"Module"}))},69052(e,t,r){r.d(t,{hr:()=>n,ie:()=>l,uC:()=>s});var o=r(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,r=!1){return a(this.range,this.min,this.max,e,t,r)}clamp(e,t=0){return(0,o.qE)(e-t,this.min,this.max)+t}monotonic(e,t,r){return e<t?t:t+i(this.range,e-t,r)}minimalMonotonic(e,t,r){return a(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,o=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(r)<Math.abs(o)?r:o}contains(e,t,r){return t=this.minimalMonotonic(e,t),(r=this.minimalMonotonic(e,r))>e&&r<t}}function a(e,t,r,o,n=0,a=!1){return(o-=n)<t?o+=i(e,t-o):o>r&&(o-=i(e,o-r)),a&&o===r&&(o=t),o+n}function i(e,t,r=0){return Math.ceil((t-r)/e)*e+r}const s=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},46140(e,t,r){r.d(t,{A:()=>n});var o=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 o.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,a]=e.split("."),i=/^\s*\d+\s*$/;if(!r?.match||!i.test(r))throw new o.A((t&&t+":")+"invalid-version","Expected major version to be a number, but got '${version}'",{version:e});if(!a?.match||!i.test(a))throw new o.A((t&&t+":")+"invalid-version","Expected minor version to be a number, but got '${version}'",{version:e});const s=parseInt(r,10),l=parseInt(a,10);return new n(s,l,t)}}},61473(e,t,r){function o(e){return e=e||globalThis.location.hostname,c.some(t=>null!=e?.match(t))}function n(e,t){return e?(t=t||globalThis.location.hostname)?null!=t.match(a)||null!=t.match(s)?e.replace("static.arcgis.com","staticdev.arcgis.com"):null!=t.match(i)||null!=t.match(l)?e.replace("static.arcgis.com","staticqa.arcgis.com"):e:e:null}r.d(t,{EM:()=>n,b5:()=>o});const a=/^devext\.arcgis\.com$/,i=/^qaext\.arcgis\.com$/,s=/^[\w-]*\.mapsdevext\.arcgis\.com$/,l=/^[\w-]*\.mapsqa\.arcgis\.com$/,c=[/^([\w-]*\.)?[\w-]*\.zrh-dev-local\.esri\.com$/,a,i,/^jsapps\.esri\.com$/,s,l]},82534(e,t,r){function o(){return[0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3]]}r.d(t,{o8:()=>n,vt:()=>o,zK:()=>a});const a=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:a,clone:n,create:o,fromValues:function(e,t,r,o){return[e,t,r,o]}},Symbol.toStringTag,{value:"Module"}))},88340(e,t,r){function o(){return new Float32Array(2)}function n(e,t){const r=new Float32Array(2);return r[0]=e,r[1]=t,r}function a(){return o()}function i(){return n(1,1)}function s(){return n(1,0)}function l(){return n(0,1)}r.d(t,{Un:()=>u,fA:()=>n,uY:()=>c,vt:()=>o});const c=a(),u=i(),d=s(),m=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:u,UNIT_X:d,UNIT_Y:m,ZEROS:c,clone:function(e){const t=new Float32Array(2);return t[0]=e[0],t[1]=e[1],t},create:o,fromValues:n,ones:i,unitX:s,unitY:l,zeros:a},Symbol.toStringTag,{value:"Module"}))},48163(e,t,r){function o(){return[0,0]}function n(e){return[e[0],e[1]]}function a(e,t){return[e,t]}function i(){return a(1,1)}function s(){return a(1,0)}function l(){return a(0,1)}r.d(t,{Un:()=>c,fA:()=>a,o8:()=>n,vt:()=>o});const c=i(),u=s(),d=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:u,UNIT_Y:d,ZEROS:[0,0],clone:n,create:o,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const r=Math.min(2,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:a,ones:i,unitX:s,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},91829(e,t,r){function o(){return[0,0,0,0]}function n(e,t,r,o){return[e,t,r,o]}function a(e,t,r,o){return[e,t,r,o]}function i(){return n(1,1,1,1)}function s(){return n(1,0,0,0)}function l(){return n(0,1,0,0)}function c(){return n(0,0,1,0)}function u(){return n(0,0,0,1)}r.d(t,{CN:()=>a,Un:()=>m,fA:()=>n,uY:()=>d,vt:()=>o});const d=[0,0,0,0],m=i(),h=s(),f=l(),p=c(),v=u();Object.freeze(Object.defineProperty({__proto__:null,ONES:m,UNIT_W:v,UNIT_X:h,UNIT_Y:f,UNIT_Z:p,ZEROS:d,clone:function(e){return[e[0],e[1],e[2],e[3]]},create:o,freeze:a,fromArray:function(e,t=[0,0,0,0]){const r=Math.min(4,e.length);for(let o=0;o<r;++o)t[o]=e[o];return t},fromValues:n,ones:i,unitW:u,unitX:s,unitY:l,unitZ:c,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},78955(e,t,r){r.d(t,{Bw:()=>v,C:()=>n,Cc:()=>w,LI:()=>m,Om:()=>b,S8:()=>x,T9:()=>d,WQ:()=>i,Z0:()=>y,aI:()=>T,hG:()=>p,hZ:()=>a,hs:()=>h,jk:()=>u,m3:()=>g,t2:()=>M});var o=r(34304);function n(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function a(e,t,r,o,n){return e[0]=t,e[1]=r,e[2]=o,e[3]=n,e}function i(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}function s(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}function l(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}function c(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}function u(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}function d(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}function m(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e[3]=Math.round(t[3]),e}function h(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}function f(e,t){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+o*o+n*n+a*a)}function p(e,t){const r=t[0]-e[0],o=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+o*o+n*n+a*a}function v(e){const t=e[0],r=e[1],o=e[2],n=e[3];return Math.sqrt(t*t+r*r+o*o+n*n)}function g(e){const t=e[0],r=e[1],o=e[2],n=e[3];return t*t+r*r+o*o+n*n}function x(e,t){const r=t[0],o=t[1],n=t[2],a=t[3];let i=r*r+o*o+n*n+a*a;return i>0&&(i=1/Math.sqrt(i),e[0]=r*i,e[1]=o*i,e[2]=n*i,e[3]=a*i),e}function b(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function w(e,t,r,o){const n=t[0],a=t[1],i=t[2],s=t[3];return e[0]=n+o*(r[0]-n),e[1]=a+o*(r[1]-a),e[2]=i+o*(r[2]-i),e[3]=s+o*(r[3]-s),e}function y(e,t,r){const o=t[0],n=t[1],a=t[2],i=t[3];return e[0]=r[0]*o+r[4]*n+r[8]*a+r[12]*i,e[1]=r[1]*o+r[5]*n+r[9]*a+r[13]*i,e[2]=r[2]*o+r[6]*n+r[10]*a+r[14]*i,e[3]=r[3]*o+r[7]*n+r[11]*a+r[15]*i,e}function M(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]&&e[3]===t[3]}function T(e,t){const r=e[0],n=e[1],a=e[2],i=e[3],s=t[0],l=t[1],c=t[2],u=t[3],d=(0,o.FD)();return Math.abs(r-s)<=d*Math.max(1,Math.abs(r),Math.abs(s))&&Math.abs(n-l)<=d*Math.max(1,Math.abs(n),Math.abs(l))&&Math.abs(a-c)<=d*Math.max(1,Math.abs(a),Math.abs(c))&&Math.abs(i-u)<=d*Math.max(1,Math.abs(i),Math.abs(u))}const S=s,C=l,_=c,z=f,I=p,P=v,O=g;Object.freeze(Object.defineProperty({__proto__:null,add:i,ceil:function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e[3]=Math.ceil(t[3]),e},copy:n,copyVec3:function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e},dist:z,distance:f,div:_,divide:c,dot:b,equals:T,exactEquals:M,floor:function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e[3]=Math.floor(t[3]),e},inverse:function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e},len:P,length:v,lerp:w,max:d,min:u,mul:C,multiply:l,negate:function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e},normalize:x,random:function(e,t=1){const r=o.Ov;let n,a,i,s,l,c;do{n=2*r()-1,a=2*r()-1,l=n*n+a*a}while(l>=1);do{i=2*r()-1,s=2*r()-1,c=i*i+s*s}while(c>=1);const u=Math.sqrt((1-l)/c);return e[0]=t*n,e[1]=t*a,e[2]=t*i*u,e[3]=t*s*u,e},round:m,scale:h,scaleAndAdd:function(e,t,r,o){return e[0]=t[0]+r[0]*o,e[1]=t[1]+r[1]*o,e[2]=t[2]+r[2]*o,e[3]=t[3]+r[3]*o,e},set:a,sqrDist:I,sqrLen:O,squaredDistance:p,squaredLength:g,str:function(e){return"vec4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+")"},sub:S,subtract:s,transformMat4:y,transformQuat:function(e,t,r){const o=t[0],n=t[1],a=t[2],i=r[0],s=r[1],l=r[2],c=r[3],u=c*o+s*a-l*n,d=c*n+l*o-i*a,m=c*a+i*n-s*o,h=-i*o-s*n-l*a;return e[0]=u*c+h*-i+d*-l-m*-s,e[1]=d*c+h*-s+m*-i-u*-l,e[2]=m*c+h*-l+u*-s-d*-i,e[3]=t[3],e}},Symbol.toStringTag,{value:"Module"}))},69397(e,t,r){r.d(t,{Qf:()=>l,Qh:()=>i,RS:()=>n,Ul:()=>h,i5:()=>m,lM:()=>a,qK:()=>u});var o=r(34275);const n=16;function a(e){if(!e)return 0;let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r],!1));return t}function i(e){if(!e)return 0;if("number"==typeof e[0])return l(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return c(e,8);let r=d;for(let o=0;o<t;o++)r+=s(e[o]);return r}(e);let t=u;for(const r in e)e.hasOwnProperty(r)&&(t+=s(e[r]));return t}function s(e,t=!0){switch(typeof e){case"object":return t?i(e):u;case"string":return function(e){return 32+e.length}(e);case"number":return n;case"boolean":return 4;default:return 8}}function l(...e){return e.reduce((e,t)=>e+(t?(0,o.iu)(t)?t.byteLength+m:Array.isArray(t)?c(t,n):0:0),0)}function c(e,t){return d+e.length*t}const u=32,d=16,m=145,h=64},65806(e,t,r){r.d(t,{g:()=>i});var o=r(51850),n=r(91218),a=r(9762);function i(e,t,r,o){if((0,n.canProjectWithoutEngine)(e.spatialReference,r))return s[0]=e.x,s[1]=e.y,s[2]=e.z??0,(0,a.projectBuffer)(s,e.spatialReference,0,t,r,0);const i=(0,n.tryProject)(e,r,o);return!!i&&(t[0]=i.x,t[1]=i.y,t[2]=i.z??0,!0)}const s=(0,o.vt)()},27993(e,t,r){r.d(t,{F:()=>s});var o=r(91218),n=r(16930),a=r(9762),i=r(65806);function s(e,t,r,n){return!(null==t||null==n||e.length<2)&&((0,o.canProjectWithoutEngine)(t,n)?(0,a.projectBuffer)(e,t,0,r,n,0,1):(l.x=e[0],l.y=e[1],l.z=e[2],l.spatialReference=t,(0,i.g)(l,r,n)))}const l={x:0,y:0,z:0,hasZ:!0,hasM:!1,spatialReference:n.A.WGS84,type:"point"}},72727(e,t,r){function o(e,t,r){if(t<=0)return 0;const o=e-r;return o<0?0:Math.floor(o/t)+1}r.d(t,{k:()=>o}),r(53966)},17136(e,t,r){r.d(t,{Y_:()=>I,O7:()=>_,el:()=>C});var o=r(92602),n=r(69052),a=r(49186),i=r(53966),s=r(39829),l=r(82799),c=r(16930),u=r(80754),d=r(21325),m=r(28735),h=r(11254),f=r(60408),p=r(65864),v=r(2272),g=r(84952),x=r(92300);const b=()=>i.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function y(e){return"polyline"===e[0].type}function M(e,t,r){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof s.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw b().error(e),new a.A("internal:geometry",e)}const r=(0,u.r8)(e),o=[];for(const e of r){const r=[];o.push(r),r.push([e[0][0],e[0][1]]);for(let o=0;o<e.length-1;o++){const n=e[o][0],a=e[o][1],i=e[o+1][0],s=e[o+1][1],l=Math.sqrt((i-n)*(i-n)+(s-a)*(s-a)),c=(s-a)/l,u=(i-n)/l,d=l/t;if(d>1){for(let e=1;e<=d-1;e++){const o=e*t,i=u*o+n,s=c*o+a;r.push([i,s])}const e=(l+Math.floor(d-1)*t)/2,o=u*e+n,i=c*e+a;r.push([o,i])}r.push([i,s])}}return function(e){return"polygon"===e.type}(e)?new s.A({rings:o,spatialReference:e.spatialReference}):new l.A({paths:o,spatialReference:e.spatialReference})}(e,1e6);e=(0,m.ci)(t,!0)}return r&&(e=(0,u.kS)(e,r)),e}function T(e,t,r){if(Array.isArray(e)){const o=e[0];if(o>t){const r=(0,u.kd)(o,t);e[0]=o+r*(-2*t)}else if(o<r){const t=(0,u.kd)(o,r);e[0]=o+t*(-2*r)}}else{const o=e.x;if(o>t){const r=(0,u.kd)(o,t);e=e.clone().offset(r*(-2*t),0)}else if(o<r){const t=(0,u.kd)(o,r);e=e.clone().offset(t*(-2*r),0)}}return e}function S(e,t){let r=-1;for(let o=0;o<t.cutIndexes.length;o++){const n=t.cutIndexes[o],a=t.geometries[o],i=(0,u.r8)(a);for(let e=0;e<i.length;e++){const t=i[e];t.some(r=>{if(r[0]<180)return!0;{let r=0;for(let e=0;e<t.length;e++){const o=t[e][0];r=o>r?o:r}r=Number(r.toFixed(9));const o=-360*(0,u.kd)(r,180);for(let r=0;r<t.length;r++){const t=a.getPoint(e,r);a.setPoint(e,r,t.clone().offset(o,0))}return!0}})}if(n===r){if(w(e))for(const t of(0,u.r8)(a))e[n]=e[n].addRing(t);else if(y(e))for(const t of(0,u.r8)(a))e[n]=e[n].addPath(t)}else r=n,e[n]=a}return e}async function C(e,t,r){if(!Array.isArray(e))return C([e],t);t&&"string"!=typeof t&&b().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??o.A.geometryServiceUrl;let a,i,c,w,y,_,z,I,P=0;const O=[],F=[];for(const t of e)if(null!=t)if(a||(a=t.spatialReference,i=(0,d.Vp)(a),c=a.isWebMercator,_=c?102100:4326,w=u.j7[_].maxX,y=u.j7[_].minX,z=u.j7[_].plus180Line,I=u.j7[_].minus180Line),i)if("mesh"===t.type)F.push(t);else if("point"===t.type)F.push(T(t.clone(),w,y));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>T(e,w,y)),F.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,i);F.push(e.rings?new s.A(e):e)}else if(t.extent){const e=t.extent,r=(0,u.kd)(e.xmin,y)*(2*w);let o=0===r?t.clone():(0,u.kS)(t.clone(),r);e.offset(r,0);let{xmin:n,xmax:a}=e;n=Number(n.toFixed(9)),a=Number(a.toFixed(9)),e.intersects(z)&&a!==w?(P=a>P?a:P,o=M(o,c),O.push(o),F.push("cut")):e.intersects(I)&&n!==y?(P=a*(2*w)>P?a*(2*w):P,o=M(o,c,360),O.push(o),F.push("cut")):F.push(o)}else F.push(t.clone());else F.push(t);else F.push(t);let H=(0,u.kd)(P,w),E=-90;const R=H,j=new l.A;for(;H>0;){const e=360*H-180;j.addPath([[e,E],[e,-1*E]]),E*=-1,H--}if(O.length>0&&R>0){const t=S(O,await async function(e,t,r,o){const n=(0,v.Dl)(e),a=t[0].spatialReference,i={...o,responseType:"json",query:{...n.query,f:"json",sr:(0,d.YX)(a),target:JSON.stringify({geometryType:(0,f.$B)(t[0]),geometries:t}),cutter:JSON.stringify(r)}},s=await(0,h.A)(n.path+"/cut",i),{cutIndexes:l,geometries:c=[]}=s.data;return{cutIndexes:l,geometries:c.map(e=>{const t=(0,p.rS)(e);return t.spatialReference=a,t})}}(n,O,j,r)),o=[],a=[];for(let r=0;r<F.length;r++){const n=F[r];if("cut"!==n)a.push(n);else{const n=t.shift(),i=e[r];null!=i&&"polygon"===i.type&&i.rings&&i.rings.length>1&&n.rings.length>=i.rings.length?(o.push(n),a.push("simplify")):a.push(c?(0,m.Gh)(n):n)}}if(!o.length)return a;const i=await async function(e,t,r){const o="string"==typeof e?(0,g.An)(e):e,n=t[0].spatialReference,a=(0,f.$B)(t[0]),i={...r,query:{...o.query,f:"json",sr:(0,d.YX)(n),geometries:JSON.stringify((0,x.X)(t))}},{data:s}=await(0,h.A)(o.path+"/simplify",i);return(0,x.V)(s.geometries,a,n)}(n,o,r),s=[];for(let e=0;e<a.length;e++){const t=a[e];"simplify"!==t?s.push(t):s.push(c?(0,m.Gh)(i.shift()):i.shift())}return s}const N=[];for(let e=0;e<F.length;e++){const t=F[e];if("cut"!==t)N.push(t);else{const e=O.shift();N.push(!0===c?(0,m.Gh)(e):e)}}return N}function _(e,t,r){const o=(0,d.Vp)(r);if(null==o)return e;const[n,a]=o.valid,i=2*a;let s=0,l=0;t>a?s=Math.ceil(Math.abs(t-a)/i):t<n&&(s=-Math.ceil(Math.abs(t-n)/i)),e>a?l=Math.ceil(Math.abs(e-a)/i):e<n&&(l=-Math.ceil(Math.abs(e-n)/i));let c=e+(s-l)*i;const u=c-t;return u>a?c-=i:u<n&&(c+=i),c}function z(e){const t=(0,d.Vp)(e);if(null==t)return null;const[r,o]=t.valid;return new n.hr(r,o)}const I=z(c.A.WGS84);z(c.A.WebMercator)},80754(e,t,r){r.d(t,{j7:()=>i,kS:()=>l,kd:()=>s,r8:()=>c});var o=r(82799),n=r(16930),a=r(60408);const i={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new o.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new o.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new o.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new o.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function s(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const r=c(e);for(const e of r)for(const r of e)r[0]+=t;return e}function c(e){return(0,a.Bi)(e)?e.rings:e.paths}},27921(e,t,r){r.d(t,{$Q:()=>w,C:()=>s,Cr:()=>u,O_:()=>c,Qj:()=>l,T7:()=>x,Tj:()=>b,lU:()=>d,mN:()=>y,vE:()=>M,vt:()=>i});var o=r(34727),n=r(35522),a=r(51850);function i(e=T){return[e[0],e[1],e[2],e[3]]}function s(e,t){return function(e,t,r,o,n=i()){return n[0]=e,n[1]=t,n[2]=r,n[3]=o,n}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,r){const o=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=Math.abs(o-1)>1e-5&&o>1e-12?1/Math.sqrt(o):1;return r[0]=t[0]*n,r[1]=t[1]*n,r[2]=t[2]*n,r[3]=-(r[0]*e[0]+r[1]*e[1]+r[2]*e[2]),r}function u(e,t,r,o=i()){const n=r[0]-t[0],a=r[1]-t[1],s=r[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],u=e[2]-t[2],d=a*u-s*c,m=s*l-n*u,h=n*c-a*l,f=d*d+m*m+h*h,p=Math.abs(f-1)>1e-5&&f>1e-12?1/Math.sqrt(f):1;return o[0]=d*p,o[1]=m*p,o[2]=h*p,o[3]=-(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]),o}function d(e,t,r,o=0,a=Math.floor(r*(1/3)),i=Math.floor(r*(2/3))){if(r<3)return!1;t(h,o);let s=a,l=!1;for(;s<r-1&&!l;)t(f,s),s++,l=!(0,n.t2)(h,f);if(!l)return!1;for(s=Math.max(s,i),l=!1;s<r&&!l;)t(p,s),s++,(0,n.Re)(v,h,f),(0,n.S8)(v,v),(0,n.Re)(g,f,p),(0,n.S8)(g,g),l=!(0,n.t2)(h,p)&&!(0,n.t2)(f,p)&&Math.abs((0,n.Om)(v,g))<m;return l?(u(h,f,p,e),!0):(0!==o||1!==a||2!==i)&&d(e,t,r,0,1,2)}r(78955),r(44280),r(32114),r(32728);const m=.99619469809,h=(0,a.vt)(),f=(0,a.vt)(),p=(0,a.vt)(),v=(0,a.vt)(),g=(0,a.vt)();function x(e,t,r){return function(e){return 0===e||1===e}(M(e,t.origin,t.vector,0,r))}function b(e,t){return y(e,t)>=0}function w(e,t){const r=(0,n.Om)(e,t.ray.direction),o=-y(e,t.ray.origin);if(o<0&&r>=0)return!1;if(r>-1e-6&&r<1e-6)return o>0;if((o<0||r<0)&&!(o<0&&r<0))return!0;const a=o/r;return r>0?a<t.c1&&(t.c1=a):a>t.c0&&(t.c0=a),t.c0<=t.c1}function y(e,t){return(0,n.Om)(e,t)+e[3]}function M(e,t,r,a,i){const s=(0,n.Om)(e,r),l=y(e,t);if(0===s)return l>=0?2:3;let c=-l/s;return 1&a&&(c=(0,o.qE)(c,0,1)),!(4&a)&&c<0||!(8&a)&&c>1?l>=0?2:3:((0,n.WQ)(i,t,(0,n.hs)(i,r,c)),l>=0?0:1)}const T=[0,0,1,0]},44280(e,t,r){r.d(t,{g7:()=>s,gr:()=>i});var o=r(34727),n=r(35522),a=r(51850);function i(e,t){return(0,n.Om)(e,t)/(0,n.Bw)(e)}function s(e,t){const r=(0,n.Om)(e,t)/((0,n.Bw)(e)*(0,n.Bw)(t));return-(0,o.XM)(r)}(0,a.vt)(),(0,a.vt)()},32114(e,t,r){r.d(t,{Rc:()=>h,J8:()=>f,rq:()=>d,Km:()=>m}),r(44208);var o=r(26390),n=r(29242),a=r(9093),i=r(82534),s=r(48163),l=r(51850),c=r(91829);class u{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,o.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new u(s.vt)}static createVec3f64(){return new u(l.vt)}static createVec4f64(){return new u(c.vt)}static createMat3f64(){return new u(n.vt)}static createMat4f64(){return new u(a.vt)}static createQuatf64(){return new u(i.vt)}get test(){}}u.createVec2f64();const d=u.createVec3f64(),m=u.createVec4f64(),h=(u.createMat3f64(),u.createMat4f64()),f=u.createQuatf64()},38969(e,t,r){r.d(t,{i:()=>n});var o=r(37955);function n(e,t){return new Promise((r,n)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?r():(t((0,o.Oo)(e,"canplay",r)),t((0,o.Oo)(e,"error",n)))})}},92300(e,t,r){r.d(t,{V:()=>i,X:()=>a});var o=r(60408),n=r(65864);function a(e){return{geometryType:(0,o.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function i(e,t,r){const o=(0,n.xD)(t);return e.map(e=>{const t=o.fromJSON(e);return t.spatialReference=r,t})}},21015(e,t,r){r.d(t,{R:()=>l});var o=r(11254),n=r(60999),a=r(49186),i=r(17676),s=r(84952);class l{constructor(e=e=>e){this._resolveURI=e}async loadJSON(e,t){return this._load("json",e,t)}async loadBinary(e,t){return(0,s.DB)(e)?((0,i.Te)(t),(0,s.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 s=await(0,n.Ke)((0,o.A)(t,{responseType:e,...r}));if(s.ok)return s.value.data;throw(0,i.QP)(s.error),new a.A("gltf-loader-request-error",`Request for resource failed: ${s.error}`)}}},84498(e,t,r){r.d(t,{x:()=>i});var o=r(34275),n=r(97146),a=r(63907);function i(e,t){switch(t){case a.WR.TRIANGLES:return function(e){return"number"==typeof e?(0,n.tM)(e):(0,o.mg)(e)?new Uint16Array(e):e}(e);case a.WR.TRIANGLE_STRIP:return function(e){const t="number"==typeof e?e:e.length;if(t<3)return[];const r=t-2,o=(0,n.my)(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;t+=1)t%2==0?(o[e++]=t,o[e++]=t+1,o[e++]=t+2):(o[e++]=t+1,o[e++]=t,o[e++]=t+2)}else{let t=0;for(let n=0;n<r;n+=1)n%2==0?(o[t++]=e[n],o[t++]=e[n+1],o[t++]=e[n+2]):(o[t++]=e[n+1],o[t++]=e[n],o[t++]=e[n+2])}return o}(e);case a.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,o=r<=65536?new Uint16Array(3*r):new Uint32Array(3*r);if("number"==typeof e){let e=0;for(let t=0;t<r;++t)o[e++]=0,o[e++]=t+1,o[e++]=t+2;return o}const n=e[0];let a=e[1],i=0;for(let t=0;t<r;++t){const r=e[t+2];o[i++]=n,o[i++]=a,o[i++]=r,a=r}return o}(e)}}},51530(e,t,r){r.d(t,{KB:()=>i,Xi:()=>n,pn:()=>s,x3:()=>a});var o=r(44208);class n{constructor(e){this.data=e,this.type="encoded-mesh-texture",this.encoding="image/ktx2"}}function a(e){return"encoded-mesh-texture"===e?.type}async function i(e){const t=new Blob([e]),r=await t.text();return JSON.parse(r)}async function s(e,t){if("image/ktx2"===t)return new n(e);const r=new Blob([e],{type:t});let a=URL.createObjectURL(r);switch(t){case"image/jpeg":a+="#.jpg";break;case"image/png":a+="#.png"}const i=new Image;if((0,o.A)("esri-iPhone"))return new Promise((e,t)=>{const r=()=>{n(),e(i)},o=e=>{n(),t(e)},n=()=>{URL.revokeObjectURL(a),i.removeEventListener("load",r),i.removeEventListener("error",o)};i.addEventListener("load",r),i.addEventListener("error",o),i.src=a});try{i.src=a,await i.decode()}catch(e){console.warn("Failed decoding HTMLImageElement")}return URL.revokeObjectURL(a),i}},5644(e,t,r){r.d(t,{fetch:()=>wt});var o=r(40876),n=r(61473),a=r(34727),i=r(77690),s=r(29242),l=r(58083),c=r(9093),u=r(48163),d=r(35522),m=r(51850),h=r(70328),f=r(34275);function p(e,t=!1){return e<=f.y9?t?new Array(e).fill(0):new Array(e):new Float32Array(e)}var v=r(13030),g=r(73354),x=r(50867),b=r(43609),w=r(21015),y=r(84498),M=r(51530),T=r(88340);function S(e){if(null==e)return null;const t=null!=e.offset?e.offset:T.uY,r=null!=e.rotation?e.rotation:0,o=null!=e.scale?e.scale:T.Un,n=(0,s.fA)(1,0,0,0,1,0,t[0],t[1],1),a=(0,s.fA)(Math.cos(r),-Math.sin(r),0,Math.sin(r),Math.cos(r),0,0,0,1),l=(0,s.fA)(o[0],0,0,0,o[1],0,0,0,1),c=(0,s.vt)();return(0,i.lw)(c,a,l),(0,i.lw)(c,n,c),c}class C{constructor(){this.geometries=new Array,this.materials=new Array,this.textures=new Array}}class _{constructor(e,t,r){this.name=e,this.lodThreshold=t,this.pivotOffset=r,this.stageResources=new C,this.numberOfVertices=0}}var z=r(11254),I=r(60999),P=r(49186),O=r(53966),F=r(69397);class H{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 o=this._outer.get(e);o?o.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,o]of t)yield[e,r,o]}forEach(e){this._outer.forEach((t,r)=>e(t,r))}forAll(e){this._outer.forEach((t,r)=>t.forEach((t,o)=>e(t,r,o)))}copy(){const e=new H;return this.forAll((t,r,o)=>e.set(r,o,t)),e}}var E=r(17676),R=r(46140),j=r(97146),N=r(31217),D=r(46610),A=r(63500),B=r(18845),V=r(49255),L=r(97768),G=r(92130),W=r(65786);class k extends G.A{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,L.Gz)(this._texture),this._textureNormal=(0,L.Gz)(this._textureNormal),this._textureEmissive=(0,L.Gz)(this._textureEmissive),this._textureOcclusion=(0,L.Gz)(this._textureOcclusion),this._textureMetallicRoughness=(0,L.Gz)(this._textureMetallicRoughness),this._disposed=!0}ensureResources(e){return 0===this._numLoading?2:1}get textureBindParameters(){return new q(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,L.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,E.$X)(r))return++this._numLoading,void r.then(e=>{if(this._disposed)return(0,L.Gz)(e),void t(null);t(e)}).finally(()=>--this._numLoading);t(r)}}class U extends W.Y{constructor(e=null){super(),this.textureEmissive=e}}class q extends U{constructor(e,t,r,o,n,a,i){super(r),this.texture=e,this.textureNormal=t,this.textureOcclusion=o,this.textureMetallicRoughness=n,this.scale=a,this.normalTextureTransformMatrix=i}}var Z=r(11725),$=r(620);class Y{constructor(e=0,t=!1,r=!0){this.tolerance=e,this.isVerticalRay=t,this.normalRequired=r}}const J=(0,h.vt)();function K(e,t,r,o,n,a){if(!e.visible)return;const i=(0,d.jb)(ue,o,r),{tolerance:s}=t,l=new Y(s,!1,t.options.normalRequired);if(e.boundingInfo)(0,$.vA)(0===e.type),Q(e.boundingInfo,r,i,s,n,l,a);else{const t=e.positionAttribute,o=e.primitivePositionIndices;!function(e,t,r,o,n,a,i,s,l,c){const u=t,m=de,h=Math.abs(u[0]),f=Math.abs(u[1]),p=Math.abs(u[2]),v=h>=f?h>=p?0:2:f>=p?1:2,g=v,x=u[g]<0?2:1,b=(v+x)%3,w=(v+(3-x))%3,y=u[b]/u[g],M=u[w]/u[g],T=1/u[g],S=te,C=re,_=oe,{normalRequired:z}=l;for(let t=r;t<o;++t){const r=3*t,o=i*n[r];(0,d.hZ)(m[0],a[o+0],a[o+1],a[o+2]);const l=i*n[r+1];(0,d.hZ)(m[1],a[l+0],a[l+1],a[l+2]);const u=i*n[r+2];(0,d.hZ)(m[2],a[u+0],a[u+1],a[u+2]),s&&((0,d.C)(m[0],s.applyToVertex(m[0][0],m[0][1],m[0][2],t)),(0,d.C)(m[1],s.applyToVertex(m[1][0],m[1][1],m[1][2],t)),(0,d.C)(m[2],s.applyToVertex(m[2][0],m[2][1],m[2][2],t))),(0,d.jb)(S,m[0],e),(0,d.jb)(C,m[1],e),(0,d.jb)(_,m[2],e);const h=S[b]-y*S[g],f=S[w]-M*S[g],p=C[b]-y*C[g],v=C[w]-M*C[g],x=_[b]-y*_[g],I=_[w]-M*_[g],P=x*v-I*p,O=h*I-f*x,F=p*f-v*h;if((P<0||O<0||F<0)&&(P>0||O>0||F>0))continue;const H=P+O+F;if(0===H)continue;const E=P*(T*S[g])+O*(T*C[g])+F*(T*_[g]);if(E*Math.sign(H)<0)continue;const R=E/H;R>=0&&c(R,z?ae(m):null,t)}}(r,i,0,o.length/3,o,t.data,t.stride,n,l,a)}}const X=(0,m.vt)();function Q(e,t,r,o,n,a,i){if(null==e)return;const s=function(e,t){return(0,d.hZ)(t,1/e[0],1/e[1],1/e[2])}(r,X);if((0,h.Ne)(J,e.bbMin),(0,h.vI)(J,e.bbMax),null!=n&&n.applyToAabb(J),function(e,t,r,o){return function(e,t,r,o){const n=(e[0]-o-t[0])*r[0],a=(e[3]+o-t[0])*r[0];let i=Math.min(n,a),s=Math.max(n,a);const l=(e[1]-o-t[1])*r[1],c=(e[4]+o-t[1])*r[1];if(s=Math.min(s,Math.max(l,c)),s<0)return!1;if(i=Math.max(i,Math.min(l,c)),i>s)return!1;const u=(e[2]-o-t[2])*r[2],d=(e[5]+o-t[2])*r[2];return s=Math.min(s,Math.max(u,d)),!(s<0)&&(i=Math.max(i,Math.min(u,d)),!(i>s)&&i<1/0)}(e,t,r,o)}(J,t,s,o)){const{primitiveIndices:s,position:l}=e,c=s?s.length:l.indices.length/3;if(c>le){const s=e.getChildren();if(void 0!==s){for(const e of s)Q(e,t,r,o,n,a,i);return}}!function(e,t,r,o,n,a,i,s,l,c,u){const d=e[0],m=e[1],h=e[2],f=t[0],p=t[1],v=t[2],{normalRequired:g}=c;for(let e=0;e<o;++e){const t=s[e],r=3*t,o=i*n[r];let c=a[o],x=a[o+1],b=a[o+2];const w=i*n[r+1];let y=a[w],M=a[w+1],T=a[w+2];const S=i*n[r+2];let C=a[S],_=a[S+1],z=a[S+2];null!=l&&([c,x,b]=l.applyToVertex(c,x,b,e),[y,M,T]=l.applyToVertex(y,M,T,e),[C,_,z]=l.applyToVertex(C,_,z,e));const I=y-c,P=M-x,O=T-b,F=C-c,H=_-x,E=z-b,R=p*E-H*v,j=v*F-E*f,N=f*H-F*p,D=I*R+P*j+O*N;if(Math.abs(D)<=ce)continue;const A=d-c,B=m-x,V=h-b,L=A*R+B*j+V*N;if(D>0){if(L<0||L>D)continue}else if(L>0||L<D)continue;const G=B*O-P*V,W=V*I-O*A,k=A*P-I*B,U=f*G+p*W+v*k;if(D>0){if(U<0||L+U>D)continue}else if(U>0||L+U<D)continue;const q=(F*G+H*W+E*k)/D;q>=0&&u(q,g?ne(I,P,O,F,H,E,ee):null,t)}}(t,r,0,c,l.indices,l.data,l.stride,s,n,a,i)}}const ee=(0,m.vt)();const te=(0,m.vt)(),re=(0,m.vt)(),oe=(0,m.vt)();function ne(e,t,r,o,n,a,i){return(0,d.hZ)(ie,e,t,r),(0,d.hZ)(se,o,n,a),(0,d.$A)(i,ie,se),(0,d.S8)(i,i),i}function ae(e){return(0,d.jb)(ie,e[1],e[0]),(0,d.jb)(se,e[2],e[0]),(0,d.$A)(ee,ie,se),(0,d.S8)(ee,ee),ee}const ie=(0,m.vt)(),se=(0,m.vt)(),le=1e3,ce=1e-7,ue=(0,m.vt)(),de=[(0,m.vt)(),(0,m.vt)(),(0,m.vt)()];var me=r(16396),he=r(59907);class fe{constructor(e){this.layout=e}elementCount(e){return e.get("position").indices.length}write(e,t,r,o,n,a){return(0,he.vJ)(r,o,this.layout,e,t,n,a)}}var pe=r(33442),ve=r(43616),ge=r(5482),xe=r(91429),be=r(91829),we=r(4431),ye=r(1843),Me=r(72824),Te=r(13840),Se=r(98958),Ce=r(16943),_e=r(33524),ze=r(56133),Ie=r(4576);r(66289);var Pe=r(69622),Oe=r(65529),Fe=r(32728);class He{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",v.Eq),this.color=e.getField("instanceColor",v.XP),this.olidColor=e.getField("instanceOlidColor",v.XP),this.state=e.getField("state",v.SL),this.lodLevel=e.getField("lodLevel",v.SL)}}let Ee=class extends Pe.A{constructor(e,t){super(e),this.events=new Oe.bk,this._capacity=0,this._size=0,this._next=0,this._highlightOptionsMap=new Map,this._highlightOptionsMapPrev=new Map,this._layout=function(e){return je(Re.clone(),e).u8("state").u8("lodLevel")}(t),this._capacity=Ve,this._buffer=this._layout.createBuffer(this._capacity),this._view=new He(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,$.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,$.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=Ne,o=De;t.localTransform.getMat(e,Ae),t.globalTransform.getMat(e,Be);const n=(0,l.lw)(Be,Be,Ae);(0,d.hZ)(r,n[12],n[13],n[14]),t.modelOrigin.setVec(e,r),(0,i.z0)(o,n),t.model.setMat(e,o);const a=(0,Fe.wp)(Ne,n);a.sort(),t.modelScaleFactors.set(e,0,a[1]),t.modelScaleFactors.set(e,1,a[2]),(0,i.B8)(o,o),(0,i.mg)(o,o),t.modelNormal.setMat(e,o),this._setStateFlags(e,64),this.events.emit("instance-transform-changed",{index:e})}getModelTransform(e,t){const r=this._view;r.model.getMat(e,De),r.modelOrigin.getVec(e,Ne),t[0]=De[0],t[1]=De[1],t[2]=De[2],t[3]=0,t[4]=De[3],t[5]=De[4],t[6]=De[5],t[7]=0,t[8]=De[6],t[9]=De[7],t[10]=De[8],t[11]=0,t[12]=Ne[0],t[13]=Ne[1],t[14]=Ne[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(Ne,this,e),t*=Math.max(Ne[0],Ne[1],Ne[2])),t}getCombinedMedianScaleFactor(e){let t=this._view.modelScaleFactors.get(e,0);return null!=this.shaderTransformation&&(this.shaderTransformation.scaleFactor(Ne,this,e),t*=function(e,t,r){return Math.max(Math.min(e,t),Math.min(Math.max(e,t),r))}(Ne[0],Ne[1],Ne[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,o=r.get(e);t?t!==o&&(r.set(e,t),this._setStateFlag(e,8,!0),this.events.emit("instance-highlight-changed")):o&&(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(Ve,Math.floor(this._capacity*Ie.Ji)),this._buffer=this._layout.createBuffer(this._capacity).copyFrom(this._buffer),this._view=new He(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,ge.Cg)([(0,xe.MZ)({constructOnly:!0})],Ee.prototype,"shaderTransformation",void 0),(0,ge.Cg)([(0,xe.MZ)()],Ee.prototype,"_size",void 0),(0,ge.Cg)([(0,xe.MZ)({readOnly:!0})],Ee.prototype,"size",null),Ee=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.lib.lodRendering.InstanceData")],Ee);const Re=(0,ye.BP)().mat4f64("localTransform").mat4f64("globalTransform").vec4f64("boundingSphere").vec3f64("modelOrigin").mat3f("instanceModel").mat3f("instanceModelNormal").vec2f("modelScaleFactors");function je(e,t){return t.instancedFeatureAttribute&&e.vec4f("instanceFeatureAttribute"),t.instancedColor&&e.vec4u8("instanceColor"),(0,Ce.E)()&&e.vec4u8("instanceOlidColor"),e}const Ne=(0,m.vt)(),De=(0,s.vt)(),Ae=(0,c.vt)(),Be=(0,c.vt)(),Ve=64,Le=(0,ye.BP)().vec3f("instanceModelOriginHi").vec3f("instanceModelOriginLo").mat3f("instanceModel").mat3f("instanceModelNormal");var Ge=r(74810),We=r(28491),ke=r(90644),Ue=r(49788);class qe extends Me.Zo{constructor(){super(...arguments),this.isSchematic=!1,this.usePBR=!1,this.mrrFactors=Ge.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=m.uY,this.instancedDoublePrecision=!1,this.normalType=0,this.receiveShadows=!0,this.receiveAmbientOcclusion=!0,this.castShadows=!0,this.ambient=(0,m.CN)(.2,.2,.2),this.diffuse=(0,m.CN)(.8,.8,.8),this.externalColor=(0,be.fA)(1,1,1,1),this.colorMixMode="multiply",this.opacity=1,this.layerOpacity=1,this.origin=(0,m.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=Ue.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}}Me.gy;let Ze=class extends Se.w{constructor(e,t){let o=(0,we.U)(Je(t));t.instanced&&t.instancedDoublePrecision&&(o=o.concat((0,we.U)(function(e){return je(Le.clone(),e)}(t)))),super(e,t,o),this.shader=new Te.r(We.D,()=>r.e(5141).then(r.bind(r,5141))),this.ignoreUnused=!0}_makePipeline(e,t){const{output:r,transparent:o,cullFace:n,customDepthTest:a,hasOccludees:i}=e;return(0,ke.Ey)({blending:o?(0,_e.Yf)(r):null,culling:Ye(e)?(0,ke.Xt)(n):null,depthTest:(0,_e.mt)(r,$e(a)),depthWrite:(0,_e.z5)(e),colorWrite:ke.kn,stencilWrite:i?ze.v0:null,stencilTest:i?t?ze.a9:ze.qh:null,polygonOffset:(0,pe.sG)(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 $e(e){switch(e){case 1:return 515;case 0:case 3:return 513;case 2:return 516}}function Ye(e){return 0!==e.cullFace||!e.hasSlicePlane&&!e.transparent&&!e.doubleSidedMode}function Je(e){const t=(0,ye.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,Ce.E)()&&t.vec4u8("olidColor"),t}Ze=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.DefaultMaterialTechnique")],Ze);var Ke=r(51976),Xe=r(47724);class Qe extends Xe.L{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.hasShadowHighlights=!1,this.receiveAmbientOcclusion=!1,this.receiveGlobalIllumination=!1,this.textureAlphaPremultiplied=!1,this.instancedFeatureAttribute=!1,this.instancedColor=!1,this.writeDepth=!0,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,ge.Cg)([(0,Ke.W)({count:4})],Qe.prototype,"alphaDiscardMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"doubleSidedMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:7})],Qe.prototype,"pbrMode",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"cullFace",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"normalType",void 0),(0,ge.Cg)([(0,Ke.W)({count:3})],Qe.prototype,"customDepthTest",void 0),(0,ge.Cg)([(0,Ke.W)({count:8})],Qe.prototype,"emissionSource",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVertexColors",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasSymbolColors",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVerticalOffset",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasColorTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasMetallicRoughnessTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOcclusionTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasNormalTexture",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasScreenSizePerspective",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVertexTangents",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOccludees",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instanced",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedDoublePrecision",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasModelTransformation",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"offsetBackfaces",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVVSize",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasVVColor",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveShadows",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasShadowHighlights",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveAmbientOcclusion",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"receiveGlobalIllumination",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"textureAlphaPremultiplied",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedFeatureAttribute",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"instancedColor",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"writeDepth",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"snowCover",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasColorTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasEmissionTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasNormalTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasOcclusionTextureTransform",void 0),(0,ge.Cg)([(0,Ke.W)()],Qe.prototype,"hasMetallicRoughnessTextureTransform",void 0);var et=r(57323);let tt=class extends Ze{constructor(){super(...arguments),this.shader=new Te.r(et.R,()=>r.e(2314).then(r.bind(r,39933)))}};tt=(0,ge.Cg)([(0,xe.$K)("esri.views.3d.webgl-engine.shaders.RealisticTreeTechnique")],tt);class rt extends Ke.K{constructor(){super(...arguments),this.receiveShadows=!0}}(0,ge.Cg)([(0,Ke.W)()],rt.prototype,"receiveShadows",void 0);class ot extends Z.i{constructor(e,t){super(e,at),this.materialType="default",this.supportsEdges=!0,this.intersectDraped=void 0,this.produces=new Map([[2,e=>(0,V.uw)(e)&&!this.transparent],[4,e=>(0,V.uw)(e)&&this.transparent&&this.parameters.writeDepth],[8,e=>(0,V.uw)(e)&&this.transparent&&!this.parameters.writeDepth]]),this._layout=Je(this.parameters),this._configuration=new Qe(t.spherical)}isVisibleForOutput(e){return 5!==e&&7!==e&&6!==e||this.parameters.castShadows}get visible(){const{layerOpacity:e,colorMixMode:t,opacity:r,externalColor:o}=this.parameters;return e*("replace"===t?1:r)*("ignore"===t||isNaN(o[3])?1:o[3])>=Ue.Q}get _hasEmissiveBase(){return!!this.parameters.emissiveTextureId||!(0,d.t2)(this.parameters.emissiveBaseColor,m.uY)}get hasEmissions(){return this.parameters.emissiveStrength>0&&(0===this.parameters.emissiveSource&&this._hasEmissiveBase||1===this.parameters.emissiveSource)?this.transparent?2:1:0}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:o,doubleSided:n,doubleSidedType:a}=t;r.hasVertexTangents=!o&&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=o?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.hasModelTransformation=!o&&null!=t.modelTransformation,r.hasVertexColors=t.hasVertexColors,r.hasSymbolColors=t.hasSymbolColors,r.doubleSidedMode=o?2:n&&"normal"===a?1:n&&"winding-order"===a?2:0,r.instancedFeatureAttribute=t.instancedFeatureAttribute,r.instancedColor=t.instancedColor,(0,V._o)(e.output)?(r.receiveShadows=t.receiveShadows,r.hasShadowHighlights=function(e,t){return e.receiveShadows&&null!=t.shadowHighlight?.getTexture()}(r,e),r.receiveAmbientOcclusion=t.receiveAmbientOcclusion&&null!=e.ssao,r.receiveGlobalIllumination=t.receiveAmbientOcclusion&&null!=e.globalIllumination):r.receiveShadows=r.hasShadowHighlights=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,o,n,a){if(null!=this.parameters.verticalOffset){const e=r.camera;(0,d.hZ)(dt,t[12],t[13],t[14]);let a=null;switch(r.viewingMode){case 1:a=(0,d.S8)(ct,dt);break;case 2:a=(0,d.C)(ct,lt)}const i=(0,d.Re)(mt,dt,e.eye),s=(0,d.Bw)(i),l=(0,d.hs)(i,i,1/s);let c=null;this.parameters.screenSizePerspective&&(c=(0,d.Om)(a,l));const u=(0,ve.kE)(e,s,this.parameters.verticalOffset,c??0,this.parameters.screenSizePerspective,null);(0,d.hs)(a,a,u),(0,d.ei)(ut,a,r.transform.inverseRotation),o=(0,d.Re)(it,o,ut),n=(0,d.Re)(st,n,ut)}a=(0,pe.b6)(a,this._configuration,o,n),K(e,r,o,n,(0,me.ou)(r.verticalOffset),a)}createGLMaterial(e){return new nt(e)}createBufferWriter(){return new fe(this._layout)}get transparent(){return function(e){const{drivenOpacity:t,opacity:r,externalColor:o,layerOpacity:n,texture:a,textureId:i,textureAlphaMode:s,colorMixMode:l}=e,c=o[3];return t||r<1&&"replace"!==l||c<1&&"ignore"!==l||n<1||(null!=a||null!=i)&&1!==s&&2!==s&&"replace"!==l}(this.parameters)}}class nt extends k{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,d.hZ)(t.origin,r[3],r[7],r[11]),this._material.setParameters(this.textureBindParameters),this.getTechnique(t.treeRendering?tt:Ze,e)}}class at extends qe{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 it=(0,m.vt)(),st=(0,m.vt)(),lt=(0,m.fA)(0,0,1),ct=(0,m.vt)(),ut=(0,m.vt)(),dt=(0,m.vt)(),mt=(0,m.vt)(),ht=()=>O.A.getLogger("esri.views.3d.layers.graphics.objectResourceUtils");class ft{constructor(e,t,r){this.resource=e,this.textures=t,this.usedMemory=r}}function pt(e){const t=e.params,r=t.topology;let o=!0;switch(t.vertexAttributes||(ht().warn("Geometry must specify vertex attributes"),o=!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&&(ht().warn(`Unsupported indexed geometry indices type '${t.valueType}', only UInt32 is currently supported`),o=!1),null!=t.valuesPerElement&&1!==t.valuesPerElement&&(ht().warn(`Unsupported indexed geometry values per element '${t.valuesPerElement}', only 1 is currently supported`),o=!1)):(ht().warn(`Indexed geometry does not specify face indices for '${r}' attribute`),o=!1)}}else ht().warn("Indexed geometries must specify faces"),o=!1;break}default:ht().warn(`Unsupported topology '${r}'`),o=!1}e.params.material||(ht().warn("Geometry requires material"),o=!1);const n=e.params.vertexAttributes;for(const e in n)n[e].values||(ht().warn("Geometries with externally defined attributes are not yet supported"),o=!1);return o}function vt(e){const t=(0,h.Ie)();return e.forEach(e=>{const r=e.boundingInfo;null!=r&&((0,h.iT)(t,r.bbMin),(0,h.iT)(t,r.bbMax))}),t}function gt(e){switch(e){case"mask":return 2;case"maskAndTransparency":return 3;case"none":return 1;default:return 0}}function xt(e){const t=e.params;return{id:1,material:t.material,texture:t.texture,region:t.texture}}const bt=new R.A(1,2,"wosr");async function wt(e,t){const s=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"===s.fileType){const e=await(t.cache?t.cache.loadWOSR(s.url,t):async function(e,t){const r=await async function(e,t){const r=await(0,I.Ke)((0,z.A)(e,t));if(r.ok)return r.value.data;(0,E.QP)(r.error),function(e){throw new P.A("",`Request for object resource failed: ${e}`)}(r.error)}(e,t),o=await async function(e,t){const r=new Array;for(const o in e){const n=e[o],a=n.images[0].data;if(!a){ht().warn("Externally referenced texture data is not yet supported");continue}const i=n.encoding+";base64,"+a,s="/textureDefinitions/"+o,l="rgba"===n.channels?n.alphaChannelUsage||"transparency":"none",c={noUnpackFlip:!0,wrap:{s:10497,t:10497},preMultiplyAlpha:1!==gt(l)},u=t?.disableTextures?Promise.resolve(null):(0,N.D)(i,t);r.push(u.then(e=>({refId:s,image:e,parameters:c,alphaChannelUsage:l})))}const o=await Promise.all(r),n={};for(const e of o)n[e.refId]=e;return n}(r.textureDefinitions??{},t);let n=0;for(const e in o)if(o.hasOwnProperty(e)){const t=o[e];n+=t?.image?t.image.width*t.image.height*4:0}return new ft(r,o,n+(0,F.Qh)(r))}(s.url,t)),{engineResources:r,referenceBoundingBox:o}=function(e,t){const r=new Array,o=new Array,n=new Array,a=new H,i=e.resource,s=R.A.parse(i.version||"1.0","wosr");bt.validate(s);const l=i.model.name,c=i.model.geometries,u=i.materialDefinitions??{},d=e.textures;let h=0;const f=new Map;for(let e=0;e<c.length;e++){const i=c[e];if(!pt(i))continue;const s=xt(i),l=i.params.vertexAttributes,p=[],v=e=>{if("PerAttributeArray"===i.params.topology)return null;const t=i.params.faces;for(const r in t)if(r===e)return t[r].values;return null},g=l.position,x=g.values.length/g.valuesPerElement;for(const e in l){const t=l[e],r=t.values,o=v(e)??(0,j.tM)(x);p.push([e,new D.n(r,o,t.valuesPerElement,!0)])}const b=s.texture,w=d&&d[b];if(w&&!f.has(b)){const{image:e,parameters:t}=w,r=new B.h(e,t);o.push(r),f.set(b,r)}const y=f.get(b),M=y?y.id:void 0,T=s.material;let S=a.get(T,b);if(null==S){const e=u[T.slice(T.lastIndexOf("/")+1)].params;1===e.transparency&&(e.transparency=0);const r=w?gt(w.alphaChannelUsage):void 0,o={ambient:(0,m.ci)(e.diffuse),diffuse:(0,m.ci)(e.diffuse),opacity:1-(e.transparency||0),textureAlphaMode:r,textureAlphaCutoff:.33,textureId:M,doubleSided:!0,cullFace:0,colorMixMode:e.externalColorMixMode||"tint",textureAlphaPremultiplied:w?.parameters.preMultiplyAlpha??!1};t?.materialParameters&&Object.assign(o,t.materialParameters),S=new ot(o,t),a.set(T,b,S)}n.push(S);const C=new A.V(S,p);h+=p.find(e=>"position"===e[0])?.[1]?.indices.length??0,r.push(C)}return{engineResources:[{name:l,stageResources:{textures:o,materials:n,geometries:r},pivotOffset:i.model.pivotOffset,numberOfVertices:h,lodThreshold:null}],referenceBoundingBox:vt(r)}}(e,t);return{lods:r,referenceBoundingBox:o,isEsriSymbolResource:!1,isWosr:!0}}let f;if(t.cache)f=await t.cache.loadGLTF(s.url,t,!!t.usePBR,!!t.useEmissive);else{const{loadGLTF:e}=await r.e(1698).then(r.bind(r,51698));f=await e(new w.R,s.url,t,t.usePBR,t.useEmissive)}const{engineResources:T,referenceBoundingBox:C}=function(e,t,r){const n=e.model,s=e.meta,f=n.meta?.ESRI_proxyEllipsoid,w=s.isEsriSymbolResource&&null!=f&&"EsriRealisticTreesStyle"===s.ESRI_webstyle;w&&!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 a of n.parts){const n=a.attributes.normal;if(null==n)return;const i=a.attributes.position,s=i.count,u=(0,m.vt)(),h=(0,m.vt)(),f=(0,m.vt)(),p=new Float32Array(4*s),g=new Float32Array(3*s),x=(0,l.B8)((0,c.vt)(),a.transform);let b=0,w=0;for(let l=0;l<s;l++){i.getVec(l,h),n.getVec(l,u),(0,d.Z0)(h,h,a.transform),(0,d.Re)(f,h,t.center),(0,d.Qr)(f,f,t.radius);const s=f[2],c=(0,d.Bw)(f),m=Math.min(.45+.55*c*c,1)**o.Tf;(0,d.Qr)(f,f,t.radius),null!==x&&(0,d.Z0)(f,f,x),(0,d.S8)(f,f),r+1!==e.model.lods.length&&e.model.lods.length>1&&(0,d.Cc)(f,f,u,s>-1?.2:Math.min(-4*s-3.8,1)),g[b]=f[0],g[b+1]=f[1],g[b+2]=f[2],b+=3,p[w]=m,p[w+1]=m,p[w+2]=m,p[w+3]=1,w+=4}a.attributes.normal=new v.xs(g.buffer),a.attributes.color=new v.Eq(p.buffer)}}}(e,f));const T=!!t.usePBR,C=s.isEsriSymbolResource?{usePBR:T,isSchematic:!1,treeRendering:w,mrrFactors:Ge.SY}:{usePBR:T,isSchematic:!1,treeRendering:!1,mrrFactors:Ge.mb},z={...t.materialParameters,treeRendering:w},I=new Array,P=new Map,O=new Map,F=n.lods.length,H=(0,h.Ie)();return n.lods.forEach((e,s)=>{const l=!0===t.skipHighLods&&(F>1&&0===s||F>3&&1===s)||!1===t.skipHighLods&&null!=r&&s!==r;if(l&&0!==s)return;const c=new _(e.name,e.lodThreshold,[0,0,0]);e.parts.forEach(e=>{const r=l?new ot({},t):function(e,t,r,n,a,i,s,l,c){const d=e.materials.get(t.material);if(null==d)return null;const{normal:m,color:h,texCoord0:f,tangent:p}=t.attributes,v=t.material+(m?"_normal":"")+(h?"_color":"")+(f?"_texCoord0":"")+(p?"_tangent":""),g=null!=t.attributes.texCoord0,x=null!=t.attributes.normal,b=function(e){switch(e){case"BLEND":return 0;case"MASK":return 2;case"OPAQUE":case null:case void 0:return 1}}(d.alphaMode);if(!i.has(v)){if(g){const t=(t,r=!1,o=!1)=>{if(null!=t&&!s.has(t)){const n=e.textures.get(t);if(n){const e=n.data,a=r&&!(0,M.x3)(e)?l.compressionOptions:void 0;s.set(t,new B.h((0,M.x3)(e)?e.data:e,{...n.parameters,preMultiplyAlpha:!(0,M.x3)(e)&&o,encoding:(0,M.x3)(e)?e.encoding:void 0,compressionOptions:a}))}}},r=1!==b&&!c;t(d.colorTexture,r,1!==b),t(d.normalTexture),t(d.occlusionTexture,!0),t(d.emissiveTexture),t(d.metallicRoughnessTexture,!0)}const r=(0,o.xV)(d.color[0]),m=(0,o.xV)(d.color[1]),h=(0,o.xV)(d.color[2]),f=null!=d.colorTexture&&g?s.get(d.colorTexture):null,p=(0,Ge.Jr)(d),w=null!=d.normalTextureTransform?.scale?d.normalTextureTransform?.scale:u.Un;i.set(v,new ot({...n,customDepthTest:1,textureAlphaMode:b,textureAlphaCutoff:d.alphaCutoff,diffuse:[r,m,h],ambient:[r,m,h],opacity:"OPAQUE"===d.alphaMode?1:d.opacity,doubleSided:d.doubleSided,doubleSidedType:"winding-order",cullFace:d.doubleSided?0:2,hasVertexColors:!!t.attributes.color,hasVertexTangents:!!t.attributes.tangent,normalType:x?0:2,castShadows:!0,receiveShadows:d.receiveShadows,receiveAmbientOcclusion:d.receiveAmbientOcclusion,textureId:null!=f?f.id:void 0,colorMixMode:d.colorMixMode,normalTextureId:null!=d.normalTexture&&g?s.get(d.normalTexture).id:void 0,textureAlphaPremultiplied:null!=f&&!!f.parameters.preMultiplyAlpha,occlusionTextureId:null!=d.occlusionTexture&&g?s.get(d.occlusionTexture).id:void 0,emissiveTextureId:null!=d.emissiveTexture&&g?s.get(d.emissiveTexture).id:void 0,metallicRoughnessTextureId:null!=d.metallicRoughnessTexture&&g?s.get(d.metallicRoughnessTexture).id:void 0,emissiveBaseColor:[d.emissiveFactor[0],d.emissiveFactor[1],d.emissiveFactor[2]],emissiveStrengthKHR:null!=d.emissiveStrengthKHR?d.emissiveStrengthKHR:1,emissiveStrengthFromSymbol:null!=a.emissiveStrengthFromSymbol?a.emissiveStrengthFromSymbol:void 0,mrrFactors:p?Ge.Bt:[d.metallicFactor,d.roughnessFactor,n.mrrFactors[2]],isSchematic:p,colorTextureTransformMatrix:S(d.colorTextureTransform),normalTextureTransformMatrix:S(d.normalTextureTransform),scale:[w[0],w[1]],occlusionTextureTransformMatrix:S(d.occlusionTextureTransform),emissiveTextureTransformMatrix:S(d.emissiveTextureTransform),metallicRoughnessTextureTransformMatrix:S(d.metallicRoughnessTextureTransform),...a},l))}const w=i.get(v);if(r.stageResources.materials.push(w),g){const e=e=>{null!=e&&r.stageResources.textures.push(s.get(e))};e(d.colorTexture),e(d.normalTexture),e(d.occlusionTexture),e(d.emissiveTexture),e(d.metallicRoughnessTexture)}return w}(n,e,c,C,z,P,O,t,w),{geometry:d,vertexCount:m}=function(e,t){const r=e.attributes.position.count,o=(0,y.x)(e.indices||r,e.primitiveType),n=p(3*r),{typedBuffer:s,typedBufferStride:l}=e.attributes.position;(0,g.t)(n,s,e.transform,3,l);const c=[["position",new D.n(n,o,3,!0)]];if(null!=e.attributes.normal){const t=p(3*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.normal;(0,i.Ge)(yt,e.transform),(0,g.b)(t,n,yt,3,s),(0,a.or)(yt)&&(0,g.n)(t,t),c.push(["normal",new D.n(t,o,3,!0)])}if(null!=e.attributes.tangent){const t=p(4*r),{typedBuffer:n,typedBufferStride:s}=e.attributes.tangent;(0,i.z0)(yt,e.transform),(0,x.t)(t,n,yt,4,s),(0,a.or)(yt)&&(0,g.n)(t,t,4),c.push(["tangent",new D.n(t,o,4,!0)])}if(null!=e.attributes.texCoord0){const t=p(2*r),{typedBuffer:n,typedBufferStride:a}=e.attributes.texCoord0;(0,b.a)(t,n,2,a),c.push(["uv0",new D.n(t,o,2,!0)])}const u=e.attributes.color;if(null!=u){const t=new Uint8Array(4*r);4===u.elementCount?u instanceof v.Eq?(0,x.b)(t,u,1,255):(u instanceof v.XP||u instanceof v.Uz)&&(0,x.b)(t,u,1/255,255):(t.fill(255),u instanceof v.xs?(0,g.f)(t,u.typedBuffer,1,255,4,u.typedBufferStride):(e.attributes.color instanceof v.eI||e.attributes.color instanceof v.nS)&&(0,g.f)(t,u.typedBuffer,1/255,255,4,e.attributes.color.typedBufferStride)),c.push(["color",new D.n(t,o,4,!0)])}return{geometry:new A.V(t,c),vertexCount:r}}(e,r??new ot({},t)),f=d.boundingInfo;null!=f&&0===s&&((0,h.iT)(H,f.bbMin),(0,h.iT)(H,f.bbMax)),null!=r&&(c.stageResources.geometries.push(d),c.numberOfVertices+=m)}),l||I.push(c)}),{engineResources:I,referenceBoundingBox:H}}(f,t,s.specifiedLodIndex);return{lods:T,referenceBoundingBox:C,isEsriSymbolResource:f.meta.isEsriSymbolResource,isWosr:!1}}const yt=(0,s.vt)()},32728(e,t,r){r.d(t,{YH:()=>s,hG:()=>a,nu:()=>l,wp:()=>i}),r(34727);var o=r(35522),n=r(51850);function a(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],r=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],o=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,r,o))}function i(e,t){const r=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),n=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),a=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,o.hZ)(e,r,n,a),e}function s(e,t,r){r=r||e;const n=(0,o.Om)(e,t);(0,o.hZ)(r,e[0]-n*t[0],e[1]-n*t[1],e[2]-n*t[2]),(0,o.S8)(r,r)}function l(e,t,r,a=(0,n.vt)()){const i=(0,o.Bw)(e),s=(0,o.Bw)(t),l=(0,o.Om)(e,t)/(i*s);if(l<.9999999999999999){const n=Math.acos(l),d=((1-r)*i+r*s)/Math.sin(n),m=d/i*Math.sin((1-r)*n),h=d/s*Math.sin(r*n);return(0,o.hs)(c,e,m),(0,o.hs)(u,t,h),(0,o.WQ)(a,c,u)}return(0,o.Cc)(a,e,t,r)}(0,n.vt)(),(0,n.vt)(),(0,n.vt)();const c=(0,n.vt)(),u=(0,n.vt)()},46686(e,t,r){r.d(t,{o:()=>n});var o=r(31821);function n(e,t){t&&e.varyings.add("linearDepth","float",{invariant:!0}),e.vertex.code.add(o.H`
|
|
415
411
|
void forwardLinearDepth(float _linearDepth) { ${(0,o.If)(t,"linearDepth = _linearDepth;")} }
|
|
416
412
|
`)}},33120(e,t,r){r.d(t,{i$:()=>i,xJ:()=>a}),r(46686),r(62308);var o=r(77108),n=r(31821);function a(e){e.vertex.uniforms.add(new o.E("nearFar",e=>e.camera.nearFar))}function i(e){e.vertex.code.add(n.H`float calculateLinearDepth(vec2 nearFar,float z) {
|
|
417
413
|
return (-z - nearFar[0]) / (nearFar[1] - nearFar[0]);
|
|
@@ -575,7 +571,24 @@ forwardTextureCoordinates();`),g.include(n.HQ,t),e.include(f.S,t),e.include(m.Q,
|
|
|
575
571
|
${(0,d.If)(w,`emissions.rgb *= emissiveStrength * ${d.H.float(1)};`)}
|
|
576
572
|
return emissions;
|
|
577
573
|
}
|
|
578
|
-
`)}},
|
|
574
|
+
`)}},52540(e,t,r){r.d(t,{E:()=>s,l:()=>l});var o=r(37585),n=r(48163),a=r(77108),i=r(31821);function s(e){e.uniforms.add(new a.E("zProjectionMap",e=>l(e.camera))),e.code.add(i.H`float linearizeDepth(float depth, vec2 zProjectionConstants) {
|
|
575
|
+
float depthNdc = depth * 2.0 - 1.0;
|
|
576
|
+
return -(zProjectionConstants[0] / (depthNdc + zProjectionConstants[1] + 1e-7));
|
|
577
|
+
}
|
|
578
|
+
float linearizeDepth(float depth) {
|
|
579
|
+
return linearizeDepth(depth, zProjectionMap);
|
|
580
|
+
}`),e.code.add(i.H`float delinearizeDepth(float linearDepth) {
|
|
581
|
+
float c1 = zProjectionMap[0];
|
|
582
|
+
float c2 = zProjectionMap[1];
|
|
583
|
+
float depthNdc = (-c1/linearDepth) - c2 - 1e-7;
|
|
584
|
+
float depthNonlinear01 = (depthNdc + 1.0 ) / 2.0;
|
|
585
|
+
return depthNonlinear01;
|
|
586
|
+
}`),e.code.add(i.H`float depthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
587
|
+
ivec2 iuv = ivec2(uv * vec2(textureSize(depthTexture, 0)));
|
|
588
|
+
return texelFetch(depthTexture, iuv, 0).r;
|
|
589
|
+
}`),e.code.add(i.H`float linearDepthFromTexture(sampler2D depthTexture, vec2 uv) {
|
|
590
|
+
return linearizeDepth(depthFromTexture(depthTexture, uv));
|
|
591
|
+
}`)}function l(e){const t=e.projectionMatrix;return(0,o.hZ)(c,t[14],t[10])}const c=(0,n.vt)()},92573(e,t,r){r.d(t,{V:()=>i});var o=r(52540),n=r(77108),a=r(31821);function i(e){e.include(o.E),e.uniforms.add(new n.E("zProjectionMapLastFrame",e=>(0,o.l)(e.reprojection.lastFrameCamera))),e.code.add(a.H`float linearDepthFromTextureLastFrame(sampler2D depthTexture, vec2 uv) {
|
|
579
592
|
return linearizeDepth(depthFromTexture(depthTexture, uv), zProjectionMapLastFrame);
|
|
580
593
|
}`)}},77695(e,t,r){r.d(t,{J:()=>m});var o=r(29242),n=r(48163),a=r(99208),i=r(68259),s=r(47286),l=r(31821),c=r(35644),u=r(15976),d=r(63761);function m(e,t){return function(e,t){const r=e.fragment,{hasVertexTangents:m,doubleSidedMode:h,hasNormalTexture:f,textureCoordinateType:p,bindType:v,hasNormalTextureTransform:g}=t;m?(e.attributes.add("tangent","vec4"),e.varyings.add("vTangent","vec4"),2===h?r.code.add(l.H`mat3 computeTangentSpace(vec3 normal) {
|
|
581
594
|
float tangentHeadedness = gl_FrontFacing ? vTangent.w : -vTangent.w;
|
|
@@ -608,7 +621,7 @@ return vec2(color.r, color.b);
|
|
|
608
621
|
}
|
|
609
622
|
vec3 decodeVec2ToRGB(vec2 encoded) {
|
|
610
623
|
return vec3(encoded.x, (encoded.x + encoded.y)/2.0, encoded.y);
|
|
611
|
-
}`)}},71651(e,t,r){r.d(t,{n:()=>H});var o=r(31821),n=r(12791),a=r(5482),i=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),m=r(2016),h=r(48375);var f=r(15581),p=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var w=r(48163),y=r(65786);class M extends y.Y{constructor(){super(...arguments),this.projScale=1}}class T extends M{constructor(){super(...arguments),this.intensity=1}}class S extends y.Y{}class C extends S{constructor(){super(...arguments),this.blurSize=(0,w.vt)()}}let _=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};_=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],_);var
|
|
624
|
+
}`)}},71651(e,t,r){r.d(t,{n:()=>H});var o=r(31821),n=r(12791),a=r(5482),i=r(34727),s=r(97768),l=r(36708),c=r(78659),u=r(91429),d=r(37585),m=r(2016),h=r(48375);var f=r(15581),p=r(13840),v=r(98958),g=r(95774),x=r(90644);let b=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(g.S,()=>r.e(1285).then(r.bind(r,91285)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};b=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOBlurTechnique")],b);var w=r(48163),y=r(65786);class M extends y.Y{constructor(){super(...arguments),this.projScale=1}}class T extends M{constructor(){super(...arguments),this.intensity=1}}class S extends y.Y{}class C extends S{constructor(){super(...arguments),this.blurSize=(0,w.vt)()}}let _=class extends v.w{constructor(){super(...arguments),this.shader=new p.r(f.S,()=>r.e(6122).then(r.bind(r,86122)))}initializePipeline(){return(0,x.Ey)({colorWrite:x.kn})}};_=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAOTechnique")],_);var z=r(63907),I=r(76284),P=r(67171);let O=class extends h.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=m.OG.AMBIENT_ILLUMINATION,this._enableTime=(0,c.l5)(0),this._passParameters=new T,this._drawParameters=new C}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 P.R(32);t.wrapMode=33071,t.pixelFormat=6407,t.wrapMode=10497,t.hasMipmap=!0,this._passParameters.noiseTexture=new I.A(this.renderingContext,t,e),this.addHandles((0,l.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,()=>this._enableTime=(0,c.l5)(0)))}destroy(){this._passParameters.noiseTexture=(0,s.WD)(this._passParameters.noiseTexture)}precompile(){this.techniques.precompile(_),this.techniques.precompile(b)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(z.nI);if(!r||!o)return;const n=this.techniques.getCompiled(_),a=this.techniques.getCompiled(b);if(!n||!a)return this._enableTime=(0,c.l5)(performance.now()),void this.requestRender(1);0===this._enableTime&&(this._enableTime=(0,c.l5)(performance.now()));const s=this.renderingContext,l=this.view.qualitySettings.fadeDuration,u=this.bindParameters,h=u.camera,p=h.relativeElevation,v=(0,i.qE)((5e5-p)/2e5,0,1),g=l>0?Math.min(l,performance.now()-this._enableTime)/l:1,x=g*v;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/h.computeScreenPixelSizeAtDist(1),this._passParameters.intensity=4*F/(0,f.g)(h)**6*x;const w=h.fullViewport[2],y=h.fullViewport[3],M=this.fboCache.acquire(w,y,"ssao input",2);s.bindFramebuffer(M.fbo),s.setViewport(0,0,w,y),s.bindTechnique(n,u,this._passParameters,this._drawParameters),s.screen.draw();const T=Math.round(w/2),S=Math.round(y/2),C=this.fboCache.acquire(T,S,"ssao blur",0);s.bindFramebuffer(C.fbo),this._drawParameters.colorTexture=M.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,0,2/y),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.setViewport(0,0,T,S),s.screen.draw(),M.release();const I=this.fboCache.acquire(T,S,m.OG.AMBIENT_ILLUMINATION,0);return s.bindFramebuffer(I.fbo),s.setViewport(0,0,w,y),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=C.getTexture(),(0,d.hZ)(this._drawParameters.blurSize,2/w,0),s.bindTechnique(a,u,this._passParameters,this._drawParameters),s.setViewport(0,0,T,S),s.screen.draw(),s.setViewport4fv(h.fullViewport),C.release(),g<1&&this.requestRender(2),I}};(0,a.Cg)([(0,u.MZ)()],O.prototype,"consumes",void 0),(0,a.Cg)([(0,u.MZ)()],O.prototype,"produces",void 0),O=(0,a.Cg)([(0,u.$K)("esri.views.3d.webgl-engine.effects.ssao.SSAO")],O);const F=.5;function H(e,t){t.receiveAmbientOcclusion?(e.uniforms.add(new n.x("ssaoTex",e=>e.ssao?.getTexture())),e.constants.add("blurSizePixelsInverse","float",.5),e.code.add(o.H`float evaluateAmbientOcclusionInverse() {
|
|
612
625
|
vec2 ssaoTextureSizeInverse = 1.0 / vec2(textureSize(ssaoTex, 0));
|
|
613
626
|
return texture(ssaoTex, gl_FragCoord.xy * blurSizePixelsInverse * ssaoTextureSizeInverse).r;
|
|
614
627
|
}
|
|
@@ -651,7 +664,7 @@ vec3 calculateAmbientRadiance()
|
|
|
651
664
|
{
|
|
652
665
|
vec3 ambientLight = 1.2 * (0.282095 * vec3(shR[0], shG[0], shB[0])) - 0.2;
|
|
653
666
|
return ambientLight *= skyTransmittance;
|
|
654
|
-
}`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),m=r(8578),h=r(12791),f=r(5482),p=(r(44208),r(53966)),v=r(97768),g=r(17676),x=r(36708),b=r(91429),w=r(37585),y=r(31217),M=r(2016),T=r(48375),S=r(13840),C=r(98958),_=r(52516),
|
|
667
|
+
}`)}var s=r(71651),l=r(65261),c=r(98619),u=r(22393),d=r(89786),m=r(8578),h=r(12791),f=r(5482),p=(r(44208),r(53966)),v=r(97768),g=r(17676),x=r(36708),b=r(91429),w=r(37585),y=r(31217),M=r(2016),T=r(48375),S=r(13840),C=r(98958),_=r(52516),z=r(90644);let I=class extends C.w{constructor(){super(...arguments),this.shader=new S.r(_.a,()=>r.e(4434).then(r.bind(r,84434)))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}};I=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationBlurTechnique")],I);var P=r(587);let O=class extends C.w{constructor(){super(...arguments),this.shader=new S.r(P.a,()=>r.e(8225).then(r.bind(r,18225)))}initializePipeline(){return(0,z.Ey)({colorWrite:z.kn})}};O=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIlluminationTechnique")],O);var F=r(51976);class H extends F.K{constructor(){super(...arguments),this.hasEmission=!1}}(0,f.Cg)([(0,F.W)()],H.prototype,"hasEmission",void 0);var E=r(63907),R=r(76284),j=r(67171);let N=class extends T.A{constructor(e){super(e),this.consumes={required:["normals"]},this.produces=M.OG.AMBIENT_ILLUMINATION,this._passParameters=new P.G,this._drawParameters=new _.G,this._accumulatedFrames=0,this._maxFrames=255,this._configuration=new H,this._resetBuffer=!1}async initialize(){this._abortController=new AbortController;const e=this._abortController.signal;try{const t=(await r.e(5354).then(r.bind(r,45354))).data;(0,g.Te)(e),await this._loadBlueNoiseTexture(t,e),(0,g.Te)(e)}catch(e){(0,g.zf)(e)||p.A.getLogger(this).errorOnce("Failed to load blue noise texture:",e)}this.addHandles((0,x.wB)(()=>this.view.stage.renderer.hasAmbientIllumination,e=>{e&&this.resetAccumulation(),this.requestRender(1)},x.pc))}precompile(){this._canRender&&(this._configuration.hasEmission=this.bindParameters.hasEmission,this.techniques.precompile(O,this._configuration),this.techniques.precompile(I))}destroy(){this._abortController=(0,v.DC)(this._abortController),this._passParameters.noiseTexture=(0,v.WD)(this._passParameters.noiseTexture)}render(e){const t=e.find(({name:e})=>"normals"===e),r=t?.getTexture(),o=t?.getTexture(E.nI);if(!r||!o)return this._emptyOutput;if(!this._canRender)return this._resetBuffer=!1,this.requestRender(1),this._emptyOutput;const n=this.bindParameters;this._configuration.hasEmission=n.hasEmission;const a=this.techniques.getCompiled(O,this._configuration),i=this.techniques.getCompiled(I);if(!a||!i)return this.requestRender(1),this._emptyOutput;this.view.stage.renderView.updating&&this.resetAccumulation();const s=this.renderingContext,{camera:l}=n;this._passParameters.normalTexture=r,this._passParameters.depthTexture=o,this._passParameters.projScale=1/l.computeScreenPixelSizeAtDist(1);const{fullWidth:c,fullHeight:u}=l,d=this.fboCache.acquire(c,u,"global illumination input");s.bindFramebuffer(d.fbo),s.setViewport(0,0,c,u),s.bindTechnique(a,n,this._passParameters,this._drawParameters),s.screen.draw();const m=Math.round(c/1),h=Math.round(u/1),f=this.fboCache.acquire(m,h,"global illumination blur");s.bindFramebuffer(f.fbo),this._drawParameters.colorTexture=d.getTexture(),(0,w.hZ)(this._drawParameters.blurSize,0,1/u),s.bindTechnique(i,n,this._passParameters,this._drawParameters),s.setViewport(0,0,m,h),s.screen.draw(),d.release();const p=this.fboCache.acquire(c,u,M.OG.AMBIENT_ILLUMINATION);return s.bindFramebuffer(p.fbo),s.setViewport(0,0,c,u),s.setClearColor(1,1,1,0),s.clear(16384),this._drawParameters.colorTexture=f.getTexture(),(0,w.hZ)(this._drawParameters.blurSize,1/c,0),s.bindTechnique(i,n,this._passParameters,this._drawParameters),s.setViewport(0,0,m,h),s.screen.draw(),s.setViewport4fv(l.fullViewport),f.release(),this._passParameters.frameCount=(this._passParameters.frameCount+1)%64,++this._accumulatedFrames,this._accumulatedFrames<this._maxFrames&&this.requestRender(1),p}get _emptyOutput(){const e=this.renderingContext,{fullWidth:t,fullHeight:r}=this.bindParameters.camera,o=this.fboCache.acquire(t,r,M.OG.AMBIENT_ILLUMINATION);return e.bindFramebuffer(o.fbo),e.setViewport(0,0,t,r),e.setClearColor(0,0,0,1),e.clear(16384),o}async _loadBlueNoiseTexture(e,t){(0,g.Te)(t);const r=await(0,y.D)(e,{signal:t});if((0,g.Te)(t),!r)return;const o=new j.R;o.internalFormat=E.H0.RGBA8,o.wrapMode=10497,o.isImmutable=!0,this._passParameters.noiseTexture=new R.A(this.renderingContext,o,r)}get _canRender(){const e=this.bindParameters;return!(!this._passParameters.noiseTexture||e.hasEmission&&!e.reprojection.lastFrameEmission||!e.reprojection.lastFrameDepth||!e.globalIllumination||this._resetBuffer)}resetAccumulation(){this._accumulatedFrames=0}get test(){}};function D(e,t){t.receiveGlobalIllumination?(e.include(m.k),e.uniforms.add(new h.x("globalIlluminationTexture",e=>e.globalIllumination?.getTexture())),e.constants.add("blurSizePixelsInverse","float",1),e.code.add(a.H`vec3 readGlobalIlluminationOcclusionInverse() {
|
|
655
668
|
ivec2 texel = ivec2(gl_FragCoord.xy * blurSizePixelsInverse);
|
|
656
669
|
return vec3(texelFetch(globalIlluminationTexture, texel, 0).a);
|
|
657
670
|
}
|
|
@@ -669,7 +682,7 @@ return max((1.0 - readGlobalIlluminationEmissionInverse() - 0.01) / 0.99, 0.);
|
|
|
669
682
|
}`)):e.code.add(a.H`vec3 readGlobalIlluminationOcclusionInverse() { return vec3(1.0); }
|
|
670
683
|
vec3 readGlobalIlluminationOcclusion() { return vec3(0.0); }
|
|
671
684
|
vec4 readGlobalIlluminationEmissionInverse() { return vec4(1.0); }
|
|
672
|
-
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,f.Cg)([(0,b.MZ)()],N.prototype,"consumes",void 0),(0,f.Cg)([(0,b.MZ)()],N.prototype,"produces",void 0),(0,f.Cg)([(0,b.MZ)()],N.prototype,"_abortController",void 0),N=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],N);var
|
|
685
|
+
vec4 readGlobalIlluminationEmission() { return vec4(0.0); }`)}(0,f.Cg)([(0,b.MZ)()],N.prototype,"consumes",void 0),(0,f.Cg)([(0,b.MZ)()],N.prototype,"produces",void 0),(0,f.Cg)([(0,b.MZ)()],N.prototype,"_abortController",void 0),N=(0,f.Cg)([(0,b.$K)("esri.views.3d.webgl-engine.effects.globalIllumination.GlobalIllumination")],N);var A=r(32976),B=r(33094),V=r(57226);function L(e){e.code.add(a.H`float mapChannel(float x, vec2 p) {
|
|
673
686
|
return (x < p.x) ? mix(0.0, p.y, x/p.x) : mix(p.y, 1.0, (x - p.x) / (1.0 - p.x) );
|
|
674
687
|
}`),e.code.add(a.H`vec3 blackLevelSoftCompression(vec3 color, float averageAmbientRadiance) {
|
|
675
688
|
vec2 p = vec2(0.02, 0.0075) * averageAmbientRadiance;
|
|
@@ -692,7 +705,7 @@ float newPeak = 1.0 - d * d / ( peak + d - startCompression );
|
|
|
692
705
|
color *= newPeak / peak;
|
|
693
706
|
float g = 1.0 - 1.0 / ( desaturation * ( peak - newPeak ) + 1.0 );
|
|
694
707
|
return mix( color, vec3( newPeak ), g );
|
|
695
|
-
}`)}function W(e){e.constants.add("ambientBoostFactor","float",V.uH)}function k(e){e.uniforms.add(new B.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function U(e,t){const{pbrMode:r,spherical:o,hasColorTexture:n,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(
|
|
708
|
+
}`)}function W(e){e.constants.add("ambientBoostFactor","float",V.uH)}function k(e){e.uniforms.add(new B.U("lightingGlobalFactor",e=>e.lighting.globalFactor))}function U(e,t){const{pbrMode:r,spherical:o,hasColorTexture:n,receiveGlobalIllumination:m}=t;e.include(l.C),e.include(D,t),e.include(s.n,t),0!==r&&e.include(u.c,t),e.include(i,t),e.include(d.p),e.include(G,t);const h=!(2===r&&!n);h&&e.include(L),W(e),k(e),(0,c.Gc)(e),e.code.add(a.H`
|
|
696
709
|
float additionalDirectedAmbientLight(float lightAlignment) {
|
|
697
710
|
return smoothstep(0.0, 1.0, clamp(lightAlignment * 2.5, 0.0, 1.0));
|
|
698
711
|
}
|
|
@@ -724,7 +737,7 @@ return delinearizeGamma(outColor);
|
|
|
724
737
|
calculatePBRInputs(inputs, normal, viewDirection, upDirection, albedo, mrr);
|
|
725
738
|
|
|
726
739
|
${(0,a.If)(m,a.H`vec3 globalIlluminationOcclusion = min(1.2 * readGlobalIlluminationOcclusion(), 1.0);`)}
|
|
727
|
-
`),t.useFillLights?e.uniforms.add(new
|
|
740
|
+
`),t.useFillLights?e.uniforms.add(new A.o("hasFillLights",e=>e.enableFillLights)):e.constants.add("hasFillLights","bool",!1),e.code.add(a.H`
|
|
728
741
|
vec3 ambientDir = vec3(5.0 * upDirection[1] - upDirection[0] * upDirection[2], - 5.0 * upDirection[0] - upDirection[2] * upDirection[1], upDirection[1] * upDirection[1] + upDirection[0] * upDirection[0]);
|
|
729
742
|
ambientDir = ambientDir != vec3(0.0) ? normalize(ambientDir) : normalize(vec3(5.0, -1.0, 0.0));
|
|
730
743
|
|