@arcgis/core 5.1.0-next.52 → 5.1.0-next.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/applications/Components/SketchTooltipControls.d.ts +3 -2
- package/applications/Components/SketchTooltipControls.js +1 -1
- package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/009db7b459b18f6a668b.js +1 -0
- package/assets/esri/core/workers/chunks/097c037705ab485372ee.js +1 -0
- package/assets/esri/core/workers/chunks/0ab19ad980fda1cf402a.js +1 -0
- package/assets/esri/core/workers/chunks/0b79630ad435a7734104.js +1 -0
- package/assets/esri/core/workers/chunks/0f4759efc0982fb0ea03.js +1 -0
- package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js → 0fc60b4c44c4e865b699.js} +2 -2
- package/assets/esri/core/workers/chunks/{f4d31d96681b649ddc95.js → 0ff12fe9e358100668d9.js} +1 -1
- package/assets/esri/core/workers/chunks/11fed97adc9bca0f95e9.js +1 -0
- package/assets/esri/core/workers/chunks/123e15c9e068a053d54e.js +1 -0
- package/assets/esri/core/workers/chunks/1613123918e9b0f7cfdb.js +1 -0
- package/assets/esri/core/workers/chunks/16a46688df5fad5cf8d5.js +1 -0
- package/assets/esri/core/workers/chunks/16ed8c0af8bb8b400163.js +1 -0
- package/assets/esri/core/workers/chunks/16f5cd740321a3539bf1.js +1 -0
- package/assets/esri/core/workers/chunks/173d94e162b210dee0a2.js +1 -0
- package/assets/esri/core/workers/chunks/199f70c0373f6008a545.js +1 -0
- package/assets/esri/core/workers/chunks/1a198c9e17f7a058669e.js +1 -0
- package/assets/esri/core/workers/chunks/1fdd736c4932655ff1d9.js +1 -0
- package/assets/esri/core/workers/chunks/{d2af5342fbe80e2d8c60.js → 20f9f3470cad47d01803.js} +1 -1
- package/assets/esri/core/workers/chunks/2304f7b8173cf86dd805.js +1 -0
- package/assets/esri/core/workers/chunks/2327b368673a974dee8b.js +1 -0
- package/assets/esri/core/workers/chunks/23eb204d3cb818adea32.js +1 -0
- package/assets/esri/core/workers/chunks/{eedeff8b344ff699b0b9.js → 2714ec856c2b3223425b.js} +1 -1
- package/assets/esri/core/workers/chunks/2757cf54656b5d318b11.js +1 -0
- package/assets/esri/core/workers/chunks/2aaeaf022af8493281dc.js +1 -0
- package/assets/esri/core/workers/chunks/34acecd7a314fed12335.js +1 -0
- package/assets/esri/core/workers/chunks/34fe4570eef9e73839b8.js +1 -0
- package/assets/esri/core/workers/chunks/{cdeb6aec578a1c07d663.js → 3cb0f020f9bfc6653c5d.js} +1 -1
- package/assets/esri/core/workers/chunks/40bcfc4f8efe7de7ec9d.js +1 -0
- package/assets/esri/core/workers/chunks/42e084704dea6e4135b6.js +1 -0
- package/assets/esri/core/workers/chunks/{5b3bb636e3bec625e515.js → 4301cb9670fa7c907460.js} +1 -1
- package/assets/esri/core/workers/chunks/48eca6f51112ba80bd3b.js +1 -0
- package/assets/esri/core/workers/chunks/4c38af9ae023fde2b5cd.js +1 -0
- package/assets/esri/core/workers/chunks/4c8c69d081ed37bf5bc5.js +1 -0
- package/assets/esri/core/workers/chunks/{cc1f3a2f281a2f6e0f94.js → 4d54beab8ae5ff31e7b0.js} +1 -1
- package/assets/esri/core/workers/chunks/4e7bb224bde9e5039263.js +1 -0
- package/assets/esri/core/workers/chunks/4f847a426973bd350c11.js +1 -0
- package/assets/esri/core/workers/chunks/52c90975cf22add7ee2b.js +1 -0
- package/assets/esri/core/workers/chunks/55214e1d9f3d98fa7ed9.js +1 -0
- package/assets/esri/core/workers/chunks/55bb5b7817c2963c8bfa.js +1 -0
- package/assets/esri/core/workers/chunks/57dc80942e51dedd8335.js +1 -0
- package/assets/esri/core/workers/chunks/59289867cce97da74e39.js +1 -0
- package/assets/esri/core/workers/chunks/5a9620cb66c8e64e4668.js +1 -0
- package/assets/esri/core/workers/chunks/5d202f60891fcae7174d.js +1 -0
- package/assets/esri/core/workers/chunks/{f7fb121169b7e5a5adbc.js → 6666ef3fd6ce877a4509.js} +1 -1
- package/assets/esri/core/workers/chunks/69644b8a6ce340ca1159.js +1 -0
- package/assets/esri/core/workers/chunks/6ab8ed12d162d79a8c55.js +1 -0
- package/assets/esri/core/workers/chunks/796d27d1bbb2eed53cbd.js +1 -0
- package/assets/esri/core/workers/chunks/7d56b2ac5030dd8b748e.js +1 -0
- package/assets/esri/core/workers/chunks/7ef1c1f765b6d423e474.js +1 -0
- package/assets/esri/core/workers/chunks/{720a33a7f118d2769133.js → 851dd71d28681d4eccfd.js} +1 -1
- package/assets/esri/core/workers/chunks/8569ae372fc64641b6b1.js +1 -0
- package/assets/esri/core/workers/chunks/{88c6cc90606409b5c884.js → 87d2021e91d025a2a142.js} +1 -1
- package/assets/esri/core/workers/chunks/929b26999321519824b9.js +1 -0
- package/assets/esri/core/workers/chunks/932a0b39d85a76377d52.js +1 -0
- package/assets/esri/core/workers/chunks/94f80c46ccf5e19038b8.js +1 -0
- package/assets/esri/core/workers/chunks/{fe7dec83e40014c55a6b.js → 96e799ca97989a6ed448.js} +1 -1
- package/assets/esri/core/workers/chunks/979c2f52b6d6e1e8241b.js +1 -0
- package/assets/esri/core/workers/chunks/{617328964d480d4a3a45.js → 9806cc96414065ae0afe.js} +1 -1
- package/assets/esri/core/workers/chunks/9db2ff1d4cbb5d1b623e.js +1 -0
- package/assets/esri/core/workers/chunks/a462aa1c7b68efad6906.js +1 -0
- package/assets/esri/core/workers/chunks/{987dc23fdc0a8c7150b9.js → a5bf2718c02a0e645013.js} +1 -1
- package/assets/esri/core/workers/chunks/{f5fd59291cb161fdc05b.js → a787fe09d3df9d4254ba.js} +1 -1
- package/assets/esri/core/workers/chunks/a7b315a660f0f4e1d197.js +1 -0
- package/assets/esri/core/workers/chunks/a8e111a5cfd6151d5dbb.js +1 -0
- package/assets/esri/core/workers/chunks/a971e61336f455b953d5.js +1 -0
- package/assets/esri/core/workers/chunks/aed45f7e7eee154a21b8.js +1 -0
- package/assets/esri/core/workers/chunks/b2b77598048818c957b7.js +1 -0
- package/assets/esri/core/workers/chunks/b39b4db86a1049f0b901.js +1 -0
- package/assets/esri/core/workers/chunks/{3fa5f102b6f77c523a76.js → b3e5dcb530cef678c8f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6a0e770c1a89d3b5913.js → b43889ed9737c27e89f1.js} +1 -1
- package/assets/esri/core/workers/chunks/b59f03c64e4965d87291.js +1 -0
- package/assets/esri/core/workers/chunks/bad82ce3f84f7efb7ab7.js +1 -0
- package/assets/esri/core/workers/chunks/bae1d6dd2376dff271e8.js +1 -0
- package/assets/esri/core/workers/chunks/bb047157f09471ecea53.js +1 -0
- package/assets/esri/core/workers/chunks/bbb9659f79511c2c4690.js +1 -0
- package/assets/esri/core/workers/chunks/bc3b22dc08c147b8d425.js +1 -0
- package/assets/esri/core/workers/chunks/be60a6e210186ff09ae2.js +1 -0
- package/assets/esri/core/workers/chunks/c03190faca955bffc8c1.js +1 -0
- package/assets/esri/core/workers/chunks/c1ad062ccc1817cbee4c.js +1 -0
- package/assets/esri/core/workers/chunks/{daf65bccc45dc5c400ae.js → c460ca93ed8e20d8b53a.js} +1 -1
- package/assets/esri/core/workers/chunks/c86b15f6a18880f921cd.js +1 -0
- package/assets/esri/core/workers/chunks/c93454e37ae0f124bcb0.js +1 -0
- package/assets/esri/core/workers/chunks/{3fcc8c455af56ae89030.js → ccf845ac0ac354507a25.js} +1 -1
- package/assets/esri/core/workers/chunks/cd14b6157862f33ab116.js +1 -0
- package/assets/esri/core/workers/chunks/ce59ec4f0cfbdf780bcb.js +1 -0
- package/assets/esri/core/workers/chunks/{7480bd6f892abf444cac.js → d1aa1d51662f4a01e793.js} +3 -3
- package/assets/esri/core/workers/chunks/d31e68e73527c88b8276.js +1 -0
- package/assets/esri/core/workers/chunks/{15a45e26964c2eb381a6.js → d4961d307651431328a8.js} +1 -1
- package/assets/esri/core/workers/chunks/{81b830f0d620587966ca.js → d53c6fc10425adc2c0cf.js} +1 -1
- package/assets/esri/core/workers/chunks/d69cdee402ba4fc3735f.js +1 -0
- package/assets/esri/core/workers/chunks/d6f1ed8d8f76a32bc81d.js +1 -0
- package/assets/esri/core/workers/chunks/d7456829e404874a9e2f.js +1 -0
- package/assets/esri/core/workers/chunks/d9444dd0d40aa8332b28.js +1 -0
- package/assets/esri/core/workers/chunks/da0a61f73d45ea9e71fc.js +1 -0
- package/assets/esri/core/workers/chunks/{9ae90a4b281d4103e8bb.js → dc07dc1cd30edc0c4193.js} +1 -1
- package/assets/esri/core/workers/chunks/{fdf8fe0f50a9ae548c16.js → ddc7956d80498518551e.js} +1 -1
- package/assets/esri/core/workers/chunks/{29c91b5c9ddcea85f39a.js → e23fc5853e2f4016936b.js} +1 -1
- package/assets/esri/core/workers/chunks/e2d1d9929ed7744785a1.js +1 -0
- package/assets/esri/core/workers/chunks/e543bb228f3f9d937d43.js +1 -0
- package/assets/esri/core/workers/chunks/ec21311584e4fb13e510.js +1 -0
- package/assets/esri/core/workers/chunks/ec91d5081f423755cb07.js +1 -0
- package/assets/esri/core/workers/chunks/{eb36417edc11fa80e312.js → ee8cd91c27e9cdfc3b2e.js} +1 -1
- package/assets/esri/core/workers/chunks/f3f26f6116ab9126c2e7.js +1 -0
- package/assets/esri/core/workers/chunks/f4472e3486fdc33abb9a.js +1 -0
- package/assets/esri/core/workers/chunks/f80f04657762666b9165.js +1 -0
- package/assets/esri/core/workers/chunks/f8eb14170f927aecfbc8.js +1 -0
- package/assets/esri/core/workers/chunks/f8ee1a99580a7da42cde.js +1 -0
- package/assets/esri/core/workers/chunks/fcda652fb5262696d59c.js +1 -0
- package/assets/esri/core/workers/chunks/{792219a079c28bcdc003.js → fcfaaced184f8da3e28d.js} +1 -1
- package/assets/esri/core/workers/chunks/fe92f54e45fd21ccd75f.js +1 -0
- package/assets/esri/core/workers/chunks/ff0cb1eec14d34214f12.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/chunks/OITBlend.glsl.js +2 -2
- package/chunks/ShadowHighlight.glsl.js +1 -1
- package/chunks/Viewshed.glsl.js +2 -2
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/config.js +1 -1
- package/core/arrayUtils.js +1 -1
- package/core/libs/gl-matrix-2/math/vec3.js +1 -1
- package/core/maybe.js +1 -1
- package/geometry/SpatialReference.js +1 -1
- package/geometry/operators/support/apiConverter.js +1 -1
- package/geometry/support/aaBoundingBox.js +1 -1
- package/geometry/support/geometryUtils.js +1 -1
- package/kernel.js +1 -1
- package/layers/FeatureLayer.js +1 -1
- package/layers/OrientedImageryLayer.js +1 -1
- package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
- package/layers/graphics/sources/OGCFeatureSource.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/knowledgeGraph/nodeMovementUtils.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/FeatureLayerBase.js +1 -1
- package/layers/raster/datasets/FunctionRaster.js +1 -1
- package/layers/raster/functions/AspectFunction.js +1 -1
- package/layers/raster/functions/BaseRasterFunction.js +1 -1
- package/layers/raster/functions/ConvolutionFunction.js +1 -1
- package/layers/raster/functions/CurvatureFunction.js +1 -1
- package/layers/raster/functions/HillshadeFunction.js +1 -1
- package/layers/raster/functions/ShadedReliefFunction.js +1 -1
- package/layers/raster/functions/SlopeFunction.js +1 -1
- package/layers/raster/functions/StatisticsFunction.js +1 -1
- package/layers/raster/functions/pixelUtils.js +1 -1
- package/layers/support/capabilities.js +1 -1
- package/layers/support/serviceCapabilitiesUtils.js +1 -1
- package/package.json +3 -3
- package/rest/knowledgeGraph/wasmInterface/knowledgeWasmAccess.js +1 -1
- package/support/revision.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/views/2d/engine/flow/FlowContainer.js +1 -1
- package/views/2d/engine/flow/FlowStrategy.js +1 -1
- package/views/2d/engine/flow/FlowView2D.js +1 -1
- package/views/2d/engine/flow/dataUtils.js +1 -1
- package/views/2d/engine/flow/particleConstants.js +2 -0
- package/views/2d/engine/flow/styles/Imagery.js +1 -1
- package/views/2d/engine/flow/styles/Particles.js +1 -1
- package/views/2d/engine/flow/styles/Stack.js +1 -1
- package/views/2d/engine/flow/styles/Streamlines.js +1 -1
- package/views/2d/engine/flow/utils.js +1 -1
- package/views/2d/engine/imagery/RasterVFContainer.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/2d/engine/webgl/Profiler.js +1 -1
- package/views/2d/engine/webgl/WGLContainer.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TechniqueRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TestTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/TextureStatisticsTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/FillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/GradientFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/OutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/fill/PatternOutlineFillTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/flow/FlowTechnique.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/grid/GridTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/GradientStrokeTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/LineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/line/TexturedLineTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/magnifier/MagnifierTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/mesh/MeshWriterRegistry.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/opacity/OpacityTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/overlay/OverlayTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/pieChart/PieChartTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/flow/FlowUtils.js +2 -0
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileDebugInfoTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/tile/TileStencilTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueBackground.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueCircle.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueFill.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueLine.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/vectorTiles/VTLTechniqueSymbol.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/videoScreenRenderer/VideoScreenTechnique.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/typed/TypedShaderProgram.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/interactive/editingTools/draw/DrawGraphicTool2D.js +1 -1
- package/views/2d/layers/features/FeatureContainer.js +1 -1
- package/views/2d/layers/features/RenderState.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillController.js +1 -1
- package/views/3d/interactive/visualElements/MeasurementAreaVisualElement.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/PointCloudLayerView3D.js +1 -1
- package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
- package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
- package/views/3d/layers/support/Tiles3DBVH.js +1 -1
- package/views/3d/layers/support/Tiles3DMeshIntersectionHandler.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/support/gaussianSplatting/GaussianSplatIntersectionHandler.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/webgl/ManagedFBO.d.ts +1 -0
- package/views/3d/webgl/ManagedFBOResource.d.ts +1 -0
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/FBOCacheUsage.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/ScreenSpaceReflections.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/shading/WaterColor.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/RenderNodes.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterial.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialLoader.js +2 -0
- package/views/3d/webgl-engine/lib/GLMaterialParameters.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/MainFramebuffer.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/PathGeometryData.js +1 -1
- package/views/3d/webgl-engine/lib/RayIntersections.js +1 -1
- package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
- package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ReprojectionUniforms.js +2 -0
- package/views/3d/webgl-engine/lib/ScreenSpaceReflectionsUniforms.js +2 -0
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/Viewshed.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodComponentData.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/TriangleTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/OutputColorHighlightOLID.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/Viewshed.glsl.js +1 -1
- package/views/3d/webgl.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/plugins/ShapePlugin.js +1 -1
- package/views/draw/support/managers/GlobalStateManager.js +1 -1
- package/views/draw/support/types.d.ts +9 -0
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/webgl/AllocationTracer.js +1 -1
- package/views/webgl/Program.js +1 -1
- package/views/webgl/RenderingContext.js +1 -1
- package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
- package/widgets/Editor/components/Settings.js +1 -1
- package/widgets/Features/FeaturesViewModel.js +1 -1
- package/widgets/Features.js +1 -1
- package/widgets/Search/SearchViewModel.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/Search/support/locatorUtils.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/widgets/support/SketchTooltipControls.js +1 -1
- package/assets/esri/core/workers/chunks/001492854799c35b53bb.js +0 -1
- package/assets/esri/core/workers/chunks/004f991251f09b36fb09.js +0 -1
- package/assets/esri/core/workers/chunks/01dd849a2d335e9f3e16.js +0 -1
- package/assets/esri/core/workers/chunks/027d733a99f50cadcf22.js +0 -1
- package/assets/esri/core/workers/chunks/03d85a706669aaf24d49.js +0 -1
- package/assets/esri/core/workers/chunks/0450133e81bce4b48b84.js +0 -1
- package/assets/esri/core/workers/chunks/085778ecd39f46324a6b.js +0 -1
- package/assets/esri/core/workers/chunks/08dce0019b52042b01fa.js +0 -1
- package/assets/esri/core/workers/chunks/0b661b90f7ee3ae23425.js +0 -1
- package/assets/esri/core/workers/chunks/0d8294982853308225da.js +0 -1
- package/assets/esri/core/workers/chunks/156aecac067213642aae.js +0 -1
- package/assets/esri/core/workers/chunks/167e4ff7cbc88b42db71.js +0 -1
- package/assets/esri/core/workers/chunks/184e9147f7a2f0ae5915.js +0 -1
- package/assets/esri/core/workers/chunks/19f59a2a97c33ff92650.js +0 -1
- package/assets/esri/core/workers/chunks/1a481f3ae3146682eb00.js +0 -1
- package/assets/esri/core/workers/chunks/2b7d020367cb4ebb3c3d.js +0 -1
- package/assets/esri/core/workers/chunks/30654845ca1334f1c206.js +0 -1
- package/assets/esri/core/workers/chunks/3104b10770903c265626.js +0 -1
- package/assets/esri/core/workers/chunks/33f00633131581e06328.js +0 -1
- package/assets/esri/core/workers/chunks/34207774bc371e95ba3c.js +0 -1
- package/assets/esri/core/workers/chunks/35dbe1eeb6932b03aea2.js +0 -1
- package/assets/esri/core/workers/chunks/365ad1ffd496ed86637b.js +0 -1
- package/assets/esri/core/workers/chunks/380bb57bccc266d6442a.js +0 -1
- package/assets/esri/core/workers/chunks/3874362bf7d43adc41bb.js +0 -1
- package/assets/esri/core/workers/chunks/38dc1c4b8721efd4a165.js +0 -1
- package/assets/esri/core/workers/chunks/39f3bea123f20c816ab2.js +0 -1
- package/assets/esri/core/workers/chunks/3e9700445518b8f9ae1b.js +0 -1
- package/assets/esri/core/workers/chunks/42f3fdad1728433b3510.js +0 -1
- package/assets/esri/core/workers/chunks/436941ec88439667022e.js +0 -1
- package/assets/esri/core/workers/chunks/4812482f28f7205b0938.js +0 -1
- package/assets/esri/core/workers/chunks/5317cbef0aac29761575.js +0 -1
- package/assets/esri/core/workers/chunks/5351e71ce7839636d06d.js +0 -1
- package/assets/esri/core/workers/chunks/54a9e17d6c0fef6a9146.js +0 -1
- package/assets/esri/core/workers/chunks/55985c9c48b8e1d1c634.js +0 -1
- package/assets/esri/core/workers/chunks/55edd712c6d2d044e550.js +0 -1
- package/assets/esri/core/workers/chunks/5e5b358e603b13b4d7d7.js +0 -1
- package/assets/esri/core/workers/chunks/63b9e4a7dad358605c38.js +0 -1
- package/assets/esri/core/workers/chunks/64da1ad9df9094ef5c12.js +0 -1
- package/assets/esri/core/workers/chunks/666f201d222c50ab8428.js +0 -1
- package/assets/esri/core/workers/chunks/66d4cbb35d0c290150bf.js +0 -1
- package/assets/esri/core/workers/chunks/677d3674cb2c0c05fb7e.js +0 -1
- package/assets/esri/core/workers/chunks/6f58ec80abebb7bfbbb0.js +0 -1
- package/assets/esri/core/workers/chunks/7100c9038739121c2c4b.js +0 -1
- package/assets/esri/core/workers/chunks/7380177f16d914fdbc63.js +0 -1
- package/assets/esri/core/workers/chunks/794f604d4267e374f7dd.js +0 -1
- package/assets/esri/core/workers/chunks/7ae8f73c8e2afae98ecb.js +0 -1
- package/assets/esri/core/workers/chunks/7d4af7e2cb2f234e12eb.js +0 -1
- package/assets/esri/core/workers/chunks/7dba4121cdd20dbc4b20.js +0 -1
- package/assets/esri/core/workers/chunks/807b12ace0099300b9b9.js +0 -1
- package/assets/esri/core/workers/chunks/816a4b03f2ea49238a6c.js +0 -1
- package/assets/esri/core/workers/chunks/842b442cc012d0797333.js +0 -1
- package/assets/esri/core/workers/chunks/8903ff28896bd6f34b0d.js +0 -1
- package/assets/esri/core/workers/chunks/89e9bc8789b100316136.js +0 -1
- package/assets/esri/core/workers/chunks/8afe32d3db9669f972bc.js +0 -1
- package/assets/esri/core/workers/chunks/91fd28f50477d16e294e.js +0 -1
- package/assets/esri/core/workers/chunks/953f671bdeb2ca9b9f37.js +0 -1
- package/assets/esri/core/workers/chunks/98011b93acf3d5f0b5a2.js +0 -1
- package/assets/esri/core/workers/chunks/9c7fd5db0813bdc38582.js +0 -1
- package/assets/esri/core/workers/chunks/a2fee1611319665e6aed.js +0 -1
- package/assets/esri/core/workers/chunks/a644e30f65347ce846ed.js +0 -1
- package/assets/esri/core/workers/chunks/a64daa4945923a178fe5.js +0 -1
- package/assets/esri/core/workers/chunks/a84d67c1a1008bca2075.js +0 -1
- package/assets/esri/core/workers/chunks/a85575a8d1da09280cd7.js +0 -1
- package/assets/esri/core/workers/chunks/ac4f7309a249132c22da.js +0 -1
- package/assets/esri/core/workers/chunks/aeb1900cfdd0e51cc5f8.js +0 -1
- package/assets/esri/core/workers/chunks/ba62f3aa811430787863.js +0 -1
- package/assets/esri/core/workers/chunks/bb659dcd297b895830df.js +0 -1
- package/assets/esri/core/workers/chunks/c03d0091a6f385b9ce8d.js +0 -1
- package/assets/esri/core/workers/chunks/c20aaca8085ce897bd12.js +0 -1
- package/assets/esri/core/workers/chunks/c3e711dc608eedda2d14.js +0 -1
- package/assets/esri/core/workers/chunks/c48d1ee37c207bfb0aac.js +0 -1
- package/assets/esri/core/workers/chunks/c4a9006cc6d2938570e0.js +0 -1
- package/assets/esri/core/workers/chunks/c692ea68509bddbf7b42.js +0 -1
- package/assets/esri/core/workers/chunks/cb8c17daec7055bf99cc.js +0 -1
- package/assets/esri/core/workers/chunks/d7439d357f68160844cb.js +0 -1
- package/assets/esri/core/workers/chunks/df3e79b56c37156e7895.js +0 -1
- package/assets/esri/core/workers/chunks/df8b80b17e371c9be4e6.js +0 -1
- package/assets/esri/core/workers/chunks/e77198f8ab47441423c5.js +0 -1
- package/assets/esri/core/workers/chunks/e786da40a1c87bed64ca.js +0 -1
- package/assets/esri/core/workers/chunks/e8aafef6342c50340a27.js +0 -1
- package/assets/esri/core/workers/chunks/ec00348d74e29f48613a.js +0 -1
- package/assets/esri/core/workers/chunks/f4201e7dcae224d0caf0.js +0 -1
- package/assets/esri/core/workers/chunks/f7cc05fbfc97b4d36eba.js +0 -1
- package/assets/esri/core/workers/chunks/f9d369a4683f88ee9d76.js +0 -1
- package/assets/esri/core/workers/chunks/fc534c94d55331578195.js +0 -1
- package/assets/esri/themes/base/colors/css/brand_colors.css +0 -76
- package/assets/esri/themes/base/colors/css/calcite_core_colors.css +0 -169
- package/assets/esri/themes/base/colors/css/calcite_core_colors_dark.css +0 -169
- package/assets/esri/themes/base/colors/css/calcite_gray_colors.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_gray_colors_dark.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_highlight_colors.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_highlight_colors_dark.css +0 -43
- package/assets/esri/themes/base/colors/css/calcite_vibrant_colors.css +0 -67
- package/assets/esri/themes/base/colors/css/calcite_vibrant_colors_dark.css +0 -67
- package/assets/esri/themes/base/colors/css/complete.css +0 -610
- package/assets/esri/themes/base/colors/css/scss/brand_colors.scss +0 -128
- package/assets/esri/themes/base/colors/css/scss/calcite_core_colors.scss +0 -289
- package/assets/esri/themes/base/colors/css/scss/calcite_core_colors_dark.scss +0 -285
- package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors.scss +0 -96
- package/assets/esri/themes/base/colors/css/scss/calcite_gray_colors_dark.scss +0 -91
- package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors.scss +0 -69
- package/assets/esri/themes/base/colors/css/scss/calcite_highlight_colors_dark.scss +0 -65
- package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors.scss +0 -128
- package/assets/esri/themes/base/colors/css/scss/calcite_vibrant_colors_dark.scss +0 -124
- package/assets/esri/themes/base/colors/css/scss/complete.scss +0 -11
- package/assets/esri/themes/base/colors/patterns_json/brand_colors.css +0 -366
- package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors.css +0 -687
- package/assets/esri/themes/base/colors/patterns_json/calcite_core_colors_dark.css +0 -673
- package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors.css +0 -177
- package/assets/esri/themes/base/colors/patterns_json/calcite_gray_colors_dark.css +0 -169
- package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors.css +0 -178
- package/assets/esri/themes/base/colors/patterns_json/calcite_highlight_colors_dark.css +0 -169
- package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors.css +0 -273
- package/assets/esri/themes/base/colors/patterns_json/calcite_vibrant_colors_dark.css +0 -265
- package/assets/esri/themes/base/colors/patterns_json/complete.css +0 -2847
- package/assets/esri/themes/base/colors/patterns_json/scss/brand_colors.scss +0 -464
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors.scss +0 -967
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_core_colors_dark.scss +0 -964
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors.scss +0 -265
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_gray_colors_dark.scss +0 -263
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors.scss +0 -237
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_highlight_colors_dark.scss +0 -235
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors.scss +0 -376
- package/assets/esri/themes/base/colors/patterns_json/scss/calcite_vibrant_colors_dark.scss +0 -347
- package/assets/esri/themes/base/colors/patterns_json/scss/complete.scss +0 -12
- package/assets/esri/themes/base/icons/readme/download.png +0 -0
- package/assets/esri/themes/base/icons/readme/import-icons.png +0 -0
- package/assets/esri/themes/base/icons/readme/import.png +0 -0
- package/assets/esri/themes/base/icons/readme/load.png +0 -0
- package/assets/esri/themes/base/icons/selection.json +0 -1
- package/assets/esri/themes/base/icons/style.css +0 -774
- package/views/2d/engine/brushes.js +0 -2
- package/views/2d/engine/flow/BrushFlow.js +0 -2
- package/views/2d/engine/rasterBrushes.js +0 -2
- package/views/2d/engine/webgl/brushes/BrushClip.js +0 -2
- package/views/2d/engine/webgl/brushes/WGLBrush.js +0 -2
- package/views/2d/engine/webgl/painter/RenderPass.js +0 -2
- package/views/2d/engine/webgl/shaders/BackgroundPrograms.js +0 -2
- package/views/2d/engine/webgl/shaders/TileInfoPrograms.js +0 -2
- package/views/3d/webgl-engine/lib/GLMaterials.js +0 -2
- /package/assets/esri/core/workers/chunks/{386435341e949f5573b4.js.LICENSE.txt → 0fc60b4c44c4e865b699.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{numberMaxFloat32 as t}from"../../../core/mathUtils.js";import{getPixelValueRange as e}from"../formats/pixelRangeUtils.js";import n from"../../support/PixelBlock.js";const l=9,i="PixelID";function o(t){return null!=t&&t.pixels?.length>0}function r(t,e){return e?.length&&o(t)?t.extractBands(e):t}function s(t){if(!t?.length||t.some(t=>!o(t)))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:l,height:i,pixelType:r}=e[0];if(e.some(t=>t.width!==l||t.height!==i))return null;const s=e.map(({mask:t})=>t).filter(t=>null!=t);let a=null;s.length&&(a=new Uint8Array(l*i),a.set(s[0]),s.length>1&&k(s.slice(1),a));const f=[];e.forEach(({pixels:t})=>f.push(...t));const h=null!=a&&f.length===e.length?e.map(({width:t,height:e,mask:n})=>n??new Uint8Array(t*e).fill(255)):null,c=e.map(({statistics:t})=>t).filter(t=>t?.length),u=[];return c.forEach(t=>u.push(...t)),new n({pixelType:r,width:l,height:i,mask:a,bandMasks:h,pixels:f,statistics:u.length?u:null})}function a(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const n=e.sort((t,e)=>t[0]-e[0]),l=n[0][0]<0?n[0][0]:0,i=Math.max(256,n[n.length-1][0]-l+1),o=new Uint8Array(4*i),r=[],s=5===n[0].length;if(i>65536)return n.forEach(t=>{r[t[0]-l]=s?t.slice(1):t.slice(1).concat([255])}),{indexed2DColormap:r,offset:l,alphaSpecified:s};if(t.fillUnspecified){let t=n[0];for(let e=t[0]-l,r=0;e<i;e++)o[4*e]=t[1],o[4*e+1]=t[2],o[4*e+2]=t[3],o[4*e+3]=s?t[4]:255,e===t[0]-l&&(t=r===n.length-1?t:n[++r])}else for(let a=0;a<n.length;a++){const t=n[a],e=4*(t[0]-l);o[e]=t[1],o[e+1]=t[2],o[e+2]=t[3],o[e+3]=s?t[4]:255}return{indexedColormap:o,offset:l,alphaSpecified:s}}function f(t,e){if(!o(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const n=t.clone(),l=n.pixels;let i=n.mask;const r=n.width*n.height;if(1!==l.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:f,alphaSpecified:h}=e,c=l[0],u=new Uint8Array(c.length),p=new Uint8Array(c.length),d=new Uint8Array(c.length);let x,g=0;if(s){const t=s.length-1;if(null!=i)for(let e=0;e<r;e++)i[e]&&(g=4*(c[e]-f),g<f||g>t?i[e]=0:(u[e]=s[g],p[e]=s[g+1],d[e]=s[g+2],i[e]=s[g+3]));else{i=new Uint8Array(r);for(let e=0;e<r;e++)g=4*(c[e]-f),g<f||g>t?i[e]=0:(u[e]=s[g],p[e]=s[g+1],d[e]=s[g+2],i[e]=s[g+3]);n.mask=i}}else if(a)if(null!=i)for(let o=0;o<r;o++)i[o]&&(x=a[c[o]],u[o]=x[0],p[o]=x[1],d[o]=x[2],i[o]=x[3]);else{i=new Uint8Array(r);for(let t=0;t<r;t++)x=a[c[t]],u[t]=x[0],p[t]=x[1],d[t]=x[2],i[t]=x[3];n.mask=i}return n.pixels=[u,p,d],n.statistics=null,n.pixelType="u8",n.maskIsAlpha=h,n}function h(t,e){if(!o(t))return null;const{pixels:l,mask:i}=t,r=l.length;let s=e.lut;const{offset:a}=e;s&&1===s[0].length&&(s=l.map(()=>s));const f=[],h=e.outputPixelType||"u8";for(let n=0;n<r;n++){const t=c(l[n],i,s[n],a||0,h);f.push(t)}const u=new n({width:t.width,height:t.height,pixels:f,mask:i,pixelType:h});return u.updateStatistics(),u}function c(t,e,l,i,o){const r=t.length,s=n.createEmptyBand(o,r);if(e)for(let n=0;n<r;n++)e[n]&&(s[n]=l[t[n]-i]);else for(let n=0;n<r;n++)s[n]=l[t[n]-i];return s}function u(t,e,n,l){const{width:i,height:o,pixels:r,mask:s}=t,a=i*o,{bandId:f,ranges:h}=n,c=r[f];if(!c)return;const u=1===h.length,[p,d]=h[0];for(let x=0;x<a;x++)if(!s||s[x]){const t=c[x];if(u)t>=p&&t<=d&&(e[x]=l);else for(let n=0;n<h.length;n++){const[i,o]=h[n];if(t>=i&&t<=o){e[x]=l;break}}}}function p(t,e,n,l){const{width:i,height:o,xyMask:r,xBandId:s,yBandId:a,xBandRange:f,yBandRange:h}=n,{pixels:c,mask:u}=t,p=c[s],d=c[a],[x,g]=f,[m,y]=h,w=(g-x)/i,k=(y-m)/o;for(let M=0;M<p.length;M++)if(!u||u[M]){let t=p[M],n=d[M];if(t<x||t>g||n<m||n>y)continue;r?(t=(t-x)*w,t=t>i-1?i-1:t<0?0:255&t,n=(y-n)*k,n=n>o-1?o-1:n<0?0:255&n,r[n*i+t]&&(e[M]=l)):e[M]=l}}function d(t){const{pixelBlock:e,renderedPixelBlock:n,highlightOptions:l}=t;if(!o(e))return;const{width:i,height:r}=e,s=i*r,a=new Uint8Array(s);for(let o=1;o<=l.length;o++){const t=l[o-1];"bandId"in t?u(e,a,t,o):p(e,a,t,o)}const{pixels:f}=n;1===f.length&&(f[1]=f[0].slice(),f[2]=f[0].slice());const h=l.map(t=>t.color),[c,d,x]=f;if(n.mask){const t=n.mask;for(let e=0;e<s;e++)if(t[e]){t[e]=255;const n=a[e];if(n){const l=h[n-1];c[e]=l[0],d[e]=l[1],x[e]=l[2],t[e]=l[3]}}}else{const t=new Uint8Array(s).fill(255);for(let e=0;e<s;e++){const n=a[e];if(n){const l=h[n-1];c[e]=l[0],d[e]=l[1],x[e]=l[2],t[e]=l[3]}}n.mask=t}n.maskIsAlpha=!0}function x(t,e){if(!o(t))return null;const n=t.clone(),{pixels:l}=n,i=n.width*n.height,r=e.length,s=Math.floor(r/2),a=e[Math.floor(s)],f=l[0],h=new Uint8Array(i),c=new Uint8Array(i),u=new Uint8Array(i);let p=n.mask;const d=4===e[0].mappedColor.length;p||(p=new Uint8Array(i),p.fill(d?255:1),n.mask=p);for(let o=0;o<i;o++)if(p[o]){const t=f[o];let n=!1,l=s,i=a,d=0,x=r-1;for(;x-d>1;){if(t===i.value){n=!0;break}t>i.value?d=l:x=l,l=Math.floor((d+x)/2),i=e[Math.floor(l)]}n||(t===e[d].value?(i=e[d],n=!0):t===e[x].value?(i=e[x],n=!0):t<e[d].value?n=!1:t>e[d].value&&(t<e[x].value?(i=e[d],n=!0):x===r-1?n=!1:(i=e[x],n=!0))),n?(h[o]=i.mappedColor[0],c[o]=i.mappedColor[1],u[o]=i.mappedColor[2],p[o]=i.mappedColor[3]):h[o]=c[o]=u[o]=p[o]=0}return n.pixels=[h,c,u],n.mask=p,n.pixelType="u8",n.maskIsAlpha=d,n}function g(e,n,i=!1){const o=1e-5,r=new Float32Array(3*l),s=n.length;for(let a=0;a<l;a++)r[3*a]=e[2*a]??t-1,r[3*a+1]=e[2*a+1]??t,r[3*a+2]=n[a]??0,a<s&&(a>0&&(r[3*a]-=o),e[2*a+1]!==e[2*a]&&(a<s-1||!i)&&(r[3*a+1]-=o));return r}function m(t,l){if(!o(t))return null;const{width:i,height:r}=t,{inputRanges:s,outputValues:a,outputPixelType:f,noDataRanges:h,allowUnmatched:c,replacementValue:u,isLastInputRangeInclusive:p}=l,d=t.pixels[0],x=n.createEmptyBand(f,d.length),g=t.mask,m=new Uint8Array(i*r);g?m.set(g):m.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=s.map(t=>t-y);w[0]=s[0],w[w.length-1]=s[s.length-1]+(p?1e-6:0);const k=s.length/2,[M,A]=e(f);for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=e*i+t;if(m[n]){const t=d[n];let e=!1;for(let l=k-1;l>=0;l--)if(t===s[2*l]||t>w[2*l]&&t<w[2*l+1]){x[n]=a[l],e=!0;break}e||(c?x[n]=t>A?A:t<M?M:u??t:m[n]=0)}}const U=h?.length;if(U)for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=e*i+t;if(!g||g[n]){const t=d[n];for(let e=0;e<U;e+=2)if(t>=h[e]&&t<=h[e+1]){x[n]=0,m[n]=0;break}}}return new n({width:i,height:r,pixelType:f,pixels:[x],mask:m})}function y(t,e,n,l){const i=null!=n&&n.length>=2?new Set(n):null,o=1===n?.length?n[0]:null,r=!!e?.length;for(let s=0;s<t.length;s++)if(l[s]){const n=t[s];if(r){let t=!1;for(let l=0;l<e.length;l+=2)if(n>=e[l]&&n<=e[l+1]){t=!0;break}t||(l[s]=0)}l[s]&&(n===o||i?.has(n))&&(l[s]=0)}}function w(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(t[e][l]){n=!0;break}n||(e[l]=0)}return e}function k(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(0===t[e][l]){n=!0;break}n&&(e[l]=0)}return e}function M(t,e){if(!o(t))return null;const{width:l,height:i,pixels:r}=t,s=l*i,a=new Uint8Array(s);t.mask?a.set(t.mask):a.fill(255);const f=r.length,{includedRanges:h,noDataValues:u,outputPixelType:p,matchAll:d,lookups:x}=e;if(x){const t=[];for(let e=0;e<f;e++){const n=x[e],l=c(r[e],a,n.lut,n.offset||0,"u8");t.push(l)}1===t.length?a.set(t[0]):d?w(t,a):k(t,a)}else if(d){const t=[];for(let e=0;e<f;e++){const n=new Uint8Array(s);n.set(a),y(r[e],h?.slice(2*e,2*e+2),u?.[e],n),t.push(n)}1===t.length?a.set(t[0]):w(t,a)}else for(let n=0;n<f;n++)y(r[n],h?.slice(2*n,2*n+2),u?.[n],a);return new n({width:l,height:i,pixelType:p,pixels:r,mask:a})}function A(t){const{srcPixelType:l,inputRanges:i,outputValues:o,allowUnmatched:r,noDataRanges:s,isLastInputRangeInclusive:a,outputPixelType:f}=t;if("u8"!==l&&"s8"!==l&&"u16"!==l&&"s16"!==l)return null;const h=l.includes("16")?65536:256,c=l.includes("s")?-h/2:0,u=n.createEmptyBand(f,h),p=new Uint8Array(h);r&&p.fill(255);const[d,x]=e(f);if(i?.length&&o?.length){const t=1e-6,e=i.map(e=>e-t);e[0]=i[0],a&&(e[e.length-1]=i[i.length-1]);for(let n=0;n<e.length;n++){const t=o[n]>x?x:o[n]<d?d:o[n],l=Math.ceil(e[2*n]-c),r=i[2*n+1]===i[2*n]?l:Math.floor(e[2*n+1]-c);for(let e=l;e<=r;e++)u[e]=t,p[e]=255}}if(s?.length)for(let e=0;e<s.length;e++){const t=Math.ceil(s[2*e]-c),n=Math.floor(s[2*e+1]-c);for(let e=t;e<=n;e++)p[e]=0}return{lut:u,offset:c,mask:p}}function U(t,e,n){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const l=t.includes("16")?65536:256,i=t.includes("s")?-l/2:0,o=new Uint8Array(l);if(e)for(let r=0;r<e.length;r++){const t=Math.ceil(e[2*r]-i),n=Math.floor(e[2*r+1]-i);for(let e=t;e<=n;e++)o[e]=255}else o.fill(255);if(n)for(let r=0;r<n.length;r++)o[n[r]-i]=0;return{lut:o,offset:i}}function b(t,e,n,l,i,o,r,s){return{xmin:i<=n*t?0:i<n*t+t?i-n*t:t,ymin:o<=l*e?0:o<l*e+e?o-l*e:e,xmax:i+r<=n*t?0:i+r<n*t+t?i+r-n*t:t,ymax:o+s<=l*e?0:o+s<l*e+e?o+s-l*e:e}}function T(t,e){if(!t||0===t.length)return null;const n=t.find(t=>t.pixelBlock);if(null==n?.pixelBlock)return null;const l=(n.extent.xmax-n.extent.xmin)/n.pixelBlock.width,i=(n.extent.ymax-n.extent.ymin)/n.pixelBlock.height,o=.01*Math.min(l,i),r=t.sort((t,e)=>Math.abs(t.extent.ymax-e.extent.ymax)>o?e.extent.ymax-t.extent.ymax:Math.abs(t.extent.xmin-e.extent.xmin)>o?t.extent.xmin-e.extent.xmin:0),s=Math.min.apply(null,r.map(t=>t.extent.xmin)),a=Math.min.apply(null,r.map(t=>t.extent.ymin)),f=Math.max.apply(null,r.map(t=>t.extent.xmax)),h=Math.max.apply(null,r.map(t=>t.extent.ymax)),c={x:Math.round((e.xmin-s)/l),y:Math.round((h-e.ymax)/i)},u={width:Math.round((f-s)/l),height:Math.round((h-a)/i)},p={width:Math.round((e.xmax-e.xmin)/l),height:Math.round((e.ymax-e.ymin)/i)};if(Math.round(u.width/n.pixelBlock.width)*Math.round(u.height/n.pixelBlock.height)!==r.length||c.x<0||c.y<0||u.width<p.width||u.height<p.height)return null;return{extent:e,pixelBlock:S(r.map(t=>t.pixelBlock),u,{clipOffset:c,clipSize:p})}}function B(t,e,n,l,i,o){const{width:r,height:s}=n.block,{x:a,y:f}=n.offset,{width:h,height:c}=n.mosaic,u=b(r,s,l,i,a,f,h,c);let p=0,d=0;if(o){const t=o.hasGCSSShiftTransform?360:o.halfWorldWidth??0,e=r*o.resolutionX,n=o.startX+l*e;n<t&&n+e>t?d=o.rightPadding:n>=t&&(p=o.leftMargin-o.rightPadding,d=0)}if(u.xmax-=d,"number"!=typeof e)for(let x=u.ymin;x<u.ymax;x++){const n=(i*s+x-f)*h+(l*r-a)+p,o=x*r;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e[o+l]}else for(let x=u.ymin;x<u.ymax;x++){const n=(i*s+x-f)*h+(l*r-a)+p;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e}}function S(t,e,l={}){const{clipOffset:i,clipSize:r,alignmentInfo:s,blockWidths:a}=l;if(a)return v(t,e,{blockWidths:a});const f=t.find(t=>o(t));if(null==f)return null;const h=r?r.width:e.width,c=r?r.height:e.height,u=f.width,p=f.height,d=e.width/u,x=e.height/p,g={offset:i||{x:0,y:0},mosaic:r||e,block:{width:u,height:p}},m=f.pixelType,y=n.getPixelArrayConstructor(m),w=f.pixels.length,k=[];let M,A;for(let n=0;n<w;n++){A=new y(h*c);for(let e=0;e<x;e++)for(let l=0;l<d;l++){const i=t[e*d+l];o(i)&&(M=i.pixels[n],B(A,M,g,l,e,s))}k.push(A)}const U=t.some(t=>null==t||null!=t.mask&&t.mask.length>0),b=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),T=U?new Uint8Array(h*c):void 0,S=b?[]:void 0;if(T){for(let e=0;e<x;e++)for(let n=0;n<d;n++){const l=t[e*d+n],i=null!=l?l.mask:null;B(T,null!=i?i:l?255:0,g,n,e,s)}if(S)for(let e=0;e<w;e++){const n=new Uint8Array(h*c);for(let l=0;l<x;l++)for(let i=0;i<d;i++){const o=t[l*d+i],r=o?.bandMasks?.[e]??o?.mask;B(n,null!=r?r:o?255:0,g,i,l,s)}S.push(n)}}const C=new n({width:h,height:c,pixels:k,pixelType:m,bandMasks:S,mask:T});return C.updateStatistics(),C}function v(t,e,l){const i=t.find(t=>null!=t);if(null==i)return null;const r=t.some(t=>null==t||!!t.mask),{width:s,height:a}=e,f=r?new Uint8Array(s*a):null,{blockWidths:h}=l,c=[],u=i.getPlaneCount(),p=n.getPixelArrayConstructor(i.pixelType);if(r)for(let n=0,y=0;n<t.length;y+=h[n],n++){const e=t[n];if(!o(e))continue;const l=e.mask;for(let t=0;t<a;t++)for(let i=0;i<h[n];i++)f[t*s+i+y]=null==l?255:l[t*e.width+i]}const d=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),x=d?[]:void 0,g=s*a;for(let n=0;n<u;n++){const e=new p(g),l=d?new Uint8Array(g):void 0;for(let i=0,r=0;i<t.length;r+=h[i],i++){const f=t[i];if(!o(f))continue;const c=f.pixels[n];if(null!=c){for(let t=0;t<a;t++)for(let n=0;n<h[i];n++)e[t*s+n+r]=c[t*f.width+n];if(l){const t=f.bandMasks?.[n]??f.mask;for(let e=0;e<a;e++)for(let n=0;n<h[i];n++)l[e*s+n+r]=t?t[e*f.width+n]:255}}}c.push(e),x&&l&&x.push(l)}const m=new n({width:s,height:a,mask:f,bandMasks:x,pixels:c,pixelType:i.pixelType});return m.updateStatistics(),m}function C(t,e,n){if(!o(t))return null;const{width:l,height:i}=t,r=e.x,s=e.y,a=n.width+r,f=n.height+s;if(r<0||s<0||a>l||f>i)return t;if(0===r&&0===s&&a===l&&f===i)return t;t.mask||(t.mask=new Uint8Array(l*i));const h=t.mask;for(let o=0;o<i;o++){const t=o*l;for(let e=0;e<l;e++)h[t+e]=o<s||o>=f||e<r||e>=a?0:1}return t.updateStatistics(),t}function I(t){if(!o(t))return null;const e=t.clone(),{width:n,height:l,pixels:i}=t,r=i[0],s=e.pixels[0],a=t.mask;for(let o=2;o<l-1;o++){const t=new Map;for(let l=o-2;l<o+2;l++)for(let e=0;e<4;e++){const i=l*n+e;_(t,r[i],a?a[i]:1)}s[o*n]=R(t),s[o*n+1]=s[o*n+2]=s[o*n];let e=3;for(;e<n-1;e++){let l=(o-2)*n+e+1;_(t,r[l],a?a[l]:1),l=(o-1)*n+e+1,_(t,r[l],a?a[l]:1),l=o*n+e+1,_(t,r[l],a?a[l]:1),l=(o+1)*n+e+1,_(t,r[l],a?a[l]:1),l=(o-2)*n+e-3,P(t,r[l],a?a[l]:1),l=(o-1)*n+e-3,P(t,r[l],a?a[l]:1),l=o*n+e-3,P(t,r[l],a?a[l]:1),l=(o+1)*n+e-3,P(t,r[l],a?a[l]:1),s[o*n+e]=R(t)}s[o*n+e+1]=s[o*n+e]}for(let o=0;o<n;o++)s[o]=s[n+o]=s[2*n+o],s[(l-1)*n+o]=s[(l-2)*n+o];return e.updateStatistics(),e}function R(t){if(0===t.size)return 0;let e=0,n=-1,l=0;const i=t.keys();let o=i.next();for(;!o.done;)l=t.get(o.value),l>e&&(n=o.value,e=l),o=i.next();return n}function P(t,e,n){if(0===n)return;const l=t.get(e);1===l?t.delete(e):t.set(e,l-1)}function _(t,e,n){0!==n&&t.set(e,t.has(e)?t.get(e)+1:1)}function F(t,e,l){let{x:i,y:r}=e;const{width:s,height:a}=l;if(0===i&&0===r&&a===t.height&&s===t.width)return t;const{width:f,height:h}=t,c=Math.max(0,r),u=Math.max(0,i),p=Math.min(i+s,f),d=Math.min(r+a,h);if(p<0||d<0||!o(t))return null;i=Math.max(0,-i),r=Math.max(0,-r);const{pixels:x}=t,g=s*a,m=x.length,y=[];for(let o=0;o<m;o++){const e=x[o],l=n.createEmptyBand(t.pixelType,g);for(let t=c;t<d;t++){const n=t*f;let o=(t+r-c)*s+i;for(let t=u;t<p;t++)l[o++]=e[n+t]}y.push(l)}const w=new Uint8Array(g),k=t.mask;for(let n=c;n<d;n++){const t=n*f;let e=(n+r-c)*s+i;for(let n=u;n<p;n++)w[e++]=k?k[t+n]:1}const M=new n({width:l.width,height:l.height,pixelType:t.pixelType,pixels:y,mask:w});return M.updateStatistics(),M}function W(t,e=!0){if(!o(t))return null;const{pixels:l,width:i,height:r,mask:s,pixelType:a}=t,f=[],h=Math.round(i/2),c=Math.round(r/2),u=r-1,p=i-1;for(let o=0;o<l.length;o++){const t=l[o],s=n.createEmptyBand(a,h*c);let d=0;for(let n=0;n<r;n+=2)for(let l=0;l<i;l+=2){const o=t[n*i+l];if(e){const e=l===p?o:t[n*i+l+1],r=n===u?o:t[n*i+l+i],a=l===p?r:n===u?e:t[n*i+l+i+1];s[d++]=(o+e+r+a)/4}else s[d++]=o}f.push(s)}let d=null;if(null!=s){d=new Uint8Array(h*c);let t=0;for(let n=0;n<r;n+=2)for(let l=0;l<i;l+=2){const o=s[n*i+l];if(e){const e=l===p?o:s[n*i+l+1],r=n===u?o:s[n*i+l+i],a=l===p?r:n===u?e:s[n*i+l+i+1];d[t++]=o*e*r*a?1:0}else d[t++]=o}}return new n({width:h,height:c,pixelType:a,pixels:f,mask:d})}function E(t,e,n=0,l=!0){if(!o(t))return null;const{width:i,height:r}=e;let{width:s,height:a}=t;const f=new Map,h={x:0,y:0},c=1+n;let u=t;for(let o=0;o<c;o++){const t=Math.ceil(s/i),n=Math.ceil(a/r);for(let l=0;l<n;l++){h.y=l*r;for(let n=0;n<t;n++){h.x=n*i;const t=F(u,h,e);f.set(`${o}/${l}/${n}`,t)}}o<c-1&&(u=W(u,l)),s=Math.round(s/2),a=Math.round(a/2)}return f}function D(t){const{pixelBlock:e,tileSize:n,level:l,row:i,col:r,useBilinear:s}=t;if(!o(e))return null;const{width:a,height:f}=n,h=2**l,c=h*a,u=h*f;let p=F(e,{y:i*u,x:r*c},{width:c,height:u});if(!p)return null;for(let o=l;o>0;o--)p=W(p,s);return p}function N(t,e,n,l,i=0){const{width:o,height:r}=t,{width:s,height:a}=e,f=l.cols,h=l.rows,c=Math.ceil(s/f-.1/f),u=Math.ceil(a/h-.1/h);let p,d,x,g,m,y,w;const k=c*f,M=k*u*h,A=new Float32Array(M),U=new Float32Array(M),b=new Uint32Array(M),T=new Uint32Array(M);let B,S,v=0;for(let C=0;C<u;C++)for(let t=0;t<c;t++){p=12*(C*c+t),d=n[p],x=n[p+1],g=n[p+2],m=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<h;e++){v=(C*h+e)*k+t*f,S=(e+.5)/h;for(let t=0;t<e;t++)B=(t+.5)/f,A[v+t]=(d*B+x*S+g)*o+i,U[v+t]=(m*B+y*S+w)*r+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}p+=6,d=n[p],x=n[p+1],g=n[p+2],m=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<h;e++){v=(C*h+e)*k+t*f,S=(e+.5)/h;for(let t=e;t<f;t++)B=(t+.5)/f,A[v+t]=(d*B+x*S+g)*o+i,U[v+t]=(m*B+y*S+w)*r+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}}return{offsets_x:A,offsets_y:U,offsets_xi:b,offsets_yi:T,gridWidth:k}}function j(t,e){const{coefficients:n,spacing:l}=e,{offsets_x:i,offsets_y:o,gridWidth:r}=N(t,t,n,{rows:l[0],cols:l[1]}),{width:s,height:a}=t,f=new Float32Array(s*a),h=180/Math.PI;for(let c=0;c<a;c++)for(let t=0;t<s;t++){const e=c*r+t,n=0===c?e:e-r,l=c===a-1?e:e+r,u=i[n]-i[l],p=o[l]-o[n];if(isNaN(u)||isNaN(p))f[c*s+t]=90;else{let e=Math.atan2(p,u)*h;e=(360+e)%360,f[c*s+t]=e}}return f}function O(t,e,l,i,r="nearest"){if(!o(t))return null;"majority"===r&&(t=I(t));const{pixels:s,mask:a,bandMasks:f,pixelType:h}=t,c=t.width,u=t.height,p=n.getPixelArrayConstructor(h),d=s.length,{width:x,height:g}=e;let m=!1;for(let n=0;n<l.length;n+=3)-1===l[n]&&-1===l[n+1]&&-1===l[n+2]&&(m=!0);const{offsets_x:y,offsets_y:w,offsets_xi:k,offsets_yi:M,gridWidth:A}=N({width:c,height:u},e,l,i,"majority"===r?.5:0);let U;const b=(t,e,n,l)=>{const i=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let o=0;o<g;o++){U=o*A;for(let r=0;r<x;r++){if(y[U]<0||w[U]<0)t[o*x+r]=0;else if(l)t[o*x+r]=e[k[U]+M[U]*c];else{const l=Math.floor(y[U]),s=Math.floor(w[U]),a=Math.ceil(y[U]),f=Math.ceil(w[U]),h=y[U]-l,u=w[U]-s;if(!n||n[l+s*c]&&n[a+s*c]&&n[l+f*c]&&n[a+f*c]){const n=(1-h)*e[l+s*c]+h*e[a+s*c],p=(1-h)*e[l+f*c]+h*e[a+f*c];t[o*x+r]=(1-u)*n+u*p+i}else t[o*x+r]=e[k[U]+M[U]*c]}U++}}},T=[];let B;const S=f?.length===d,v=[];for(let n=0;n<d;n++){if(S){const t=new Uint8Array(x*g);b(t,f[n],f[n],!0),v.push(t)}B=new p(x*g),b(B,s[n],S?f[n]:a,"nearest"===r||"majority"===r),T.push(B)}const C=new n({width:x,height:g,pixelType:h,pixels:T,bandMasks:S?v:void 0});if(null!=a)C.mask=new Uint8Array(x*g),b(C.mask,a,a,!0);else if(m){C.mask=new Uint8Array(x*g);for(let t=0;t<x*g;t++)C.mask[t]=y[t]<0||w[t]<0?0:1}return C.updateStatistics(),C}function z(t){const{pixelBlock:e,extent:n,fieldNames:l,skipFactor:o,skipSpatialReference:r=!1,pixelIdOffset:s=0}=t,a=[],{width:f,height:h,pixels:c,mask:u}=e,p=t.imageRowSize??f,d=n.width/f,x=n.height/h,g=c.length,m=Math.floor(o/2),{xmin:y,ymax:w}=n,k=r?void 0:n.spatialReference.toJSON();for(let M=m;M<h;M+=o)for(let t=m;t<f;t+=o){const e=M*f+t;if(!u||u[e]){const n={x:y+(t+.5)*d,y:w-(M+.5)*x,spatialReference:k},o={[i]:s+M*p+t};for(let t=0;t<g;t++)o[l[t+1]]=c[t][e];a.push({geometry:n,attributes:o})}}return a}function L(t,e){const{width:n,height:l,pixels:i,mask:o}=t,r=i[0];let s=0;for(let a=0;a<l;a++){let t=a*n;for(let l=0;l<n;l++,t++)o&&!o[t]||(e[r[t]]++,s++)}return s}function V(t,e){const{width:n,height:l,pixels:i,mask:o}=t,r=e.width/n,s=e.height/l,{xmin:a,ymax:f}=e,h=e.spatialReference.toJSON(),c=[];for(let u=0;u<l;u++)for(let t=0;t<n;t++){const e=u*n+t;if(!o||o[e]){const n={x:a+(t+.5)*r,y:f-(u+.5)*s,spatialReference:h},l=i.map(t=>t[e]);c.push({location:n,value:l})}}return c}function $(t,e,l){const{attributeTable:i}=e;if(!i)return t;const o=i.fields.find(t=>t.name.toLowerCase()===l.toLowerCase()),r=i.fields.find(t=>"value"===t.name.toLowerCase());if(!o||!r)return t;const[s]=t.pixels,a="single"===o.type?"f32":"double"===o.type||"big-integer"===o.type?"f64":"small-integer"===o.type?"s16":"s32",f=s.length,h=new("f32"===a?Float32Array:"f64"===a?Float64Array:"s16"===a?Int16Array:Int32Array)(f),c=new Map;for(const n of i.features){const t=n.attributes[r.name],e=n.attributes[o.name];c.set(t,e)}const u=t.mask??new Uint8Array(f).fill(255);for(let n=0;n<f;n++)if(u[n]){const t=c.get(s[n]);null==t?u[n]=0:h[n]=t}return new n({width:t.width,height:t.height,pixels:[h],mask:u,pixelType:a})}export{O as approximateTransform,F as clip,D as clipTile,f as colorize,s as compositeBands,z as convertPixelBlockToFeatures,L as countCategoricalPixels,a as createColormapLUT,U as createMaskLUT,g as createRangeMaps,A as createRemapLUT,r as extractBands,b as getClipBounds,j as getLocalArithmeticNorthRotations,V as getValidPixels,d as highlightPixels,N as interpolateOffsets,o as isValidPixelBlock,c as lookupBandValues,h as lookupPixels,$ as mapPixelValueToAttribute,M as mask,k as matchAnyMask,l as maxMapSizeGpu,S as mosaic,T as mosaicPixelData,i as pixelIdFieldName,m as remap,x as remapColor,I as resampleByMajority,u as selectBySingleBandRange,p as selectByXYMask,C as setValidBoundary,E as split};
|
|
2
|
+
import{numberMaxFloat32 as t}from"../../../core/mathUtils.js";import{getPixelValueRange as e}from"../formats/pixelRangeUtils.js";import n from"../../support/PixelBlock.js";const l=9,i="PixelID";function o(t){return null!=t&&t.pixels?.length>0}function r(t,e){return e?.length&&o(t)?t.extractBands(e):t}function s(t){if(!t?.length||t.some(t=>!o(t)))return null;if(1===t.length)return t[0]?.clone()??null;const e=t,{width:l,height:i,pixelType:r}=e[0];if(e.some(t=>t.width!==l||t.height!==i))return null;const s=e.map(({mask:t})=>t).filter(t=>null!=t);let a=null;s.length&&(a=new Uint8Array(l*i),a.set(s[0]),s.length>1&&k(s.slice(1),a));const h=[];e.forEach(({pixels:t})=>h.push(...t));const f=null!=a&&h.length===e.length?e.map(({width:t,height:e,mask:n})=>n??new Uint8Array(t*e).fill(255)):null,c=e.map(({statistics:t})=>t).filter(t=>t?.length),u=[];return c.forEach(t=>u.push(...t)),new n({pixelType:r,width:l,height:i,mask:a,bandMasks:f,pixels:h,statistics:u.length?u:null})}function a(t){if(!t)return;const e=t.colormap;if(!e||0===e.length)return;const n=e.sort((t,e)=>t[0]-e[0]),l=n[0][0]<0?n[0][0]:0,i=Math.max(256,n[n.length-1][0]-l+1),o=new Uint8Array(4*i),r=[],s=5===n[0].length;if(i>65536)return n.forEach(t=>{r[t[0]-l]=s?t.slice(1):t.slice(1).concat([255])}),{indexed2DColormap:r,offset:l,alphaSpecified:s};if(t.fillUnspecified){let t=n[0];for(let e=t[0]-l,r=0;e<i;e++)o[4*e]=t[1],o[4*e+1]=t[2],o[4*e+2]=t[3],o[4*e+3]=s?t[4]:255,e===t[0]-l&&(t=r===n.length-1?t:n[++r])}else for(let a=0;a<n.length;a++){const t=n[a],e=4*(t[0]-l);o[e]=t[1],o[e+1]=t[2],o[e+2]=t[3],o[e+3]=s?t[4]:255}return{indexedColormap:o,offset:l,alphaSpecified:s}}function h(t,e){if(!o(t))return t;if(!e||!e.indexedColormap&&!e.indexed2DColormap)return t;const n=t.clone(),l=n.pixels;let i=n.mask;const r=n.width*n.height;if(1!==l.length)return t;const{indexedColormap:s,indexed2DColormap:a,offset:h,alphaSpecified:f}=e,c=l[0],u=new Uint8Array(c.length),p=new Uint8Array(c.length),x=new Uint8Array(c.length);let d,m=0;if(s){const t=s.length-1;if(null!=i)for(let e=0;e<r;e++)i[e]&&(m=4*(c[e]-h),m<h||m>t?i[e]=0:(u[e]=s[m],p[e]=s[m+1],x[e]=s[m+2],i[e]=s[m+3]));else{i=new Uint8Array(r);for(let e=0;e<r;e++)m=4*(c[e]-h),m<h||m>t?i[e]=0:(u[e]=s[m],p[e]=s[m+1],x[e]=s[m+2],i[e]=s[m+3]);n.mask=i}}else if(a)if(null!=i)for(let o=0;o<r;o++)i[o]&&(d=a[c[o]],u[o]=d[0],p[o]=d[1],x[o]=d[2],i[o]=d[3]);else{i=new Uint8Array(r);for(let t=0;t<r;t++)d=a[c[t]],u[t]=d[0],p[t]=d[1],x[t]=d[2],i[t]=d[3];n.mask=i}return n.pixels=[u,p,x],n.statistics=null,n.pixelType="u8",n.maskIsAlpha=f,n}function f(t,e){if(!o(t))return null;const{pixels:l,mask:i}=t,r=l.length;let s=e.lut;const{offset:a}=e;s&&1===s[0].length&&(s=l.map(()=>s));const h=[],f=e.outputPixelType||"u8";for(let n=0;n<r;n++){const t=c(l[n],i,s[n],a||0,f);h.push(t)}const u=new n({width:t.width,height:t.height,pixels:h,mask:i,pixelType:f});return u.updateStatistics(),u}function c(t,e,l,i,o){const r=t.length,s=n.createEmptyBand(o,r);if(e)for(let n=0;n<r;n++)e[n]&&(s[n]=l[t[n]-i]);else for(let n=0;n<r;n++)s[n]=l[t[n]-i];return s}function u(t,e,n,l){const{width:i,height:o,pixels:r,mask:s}=t,a=i*o,{bandId:h,ranges:f}=n,c=r[h];if(!c)return;const u=1===f.length,[p,x]=f[0];for(let d=0;d<a;d++)if(!s||s[d]){const t=c[d];if(u)t>=p&&t<=x&&(e[d]=l);else for(let n=0;n<f.length;n++){const[i,o]=f[n];if(t>=i&&t<=o){e[d]=l;break}}}}function p(t,e,n,l){const{width:i,height:o,xyMask:r,xBandId:s,yBandId:a,xBandRange:h,yBandRange:f}=n,{pixels:c,mask:u}=t,p=c[s],x=c[a],[d,m]=h,[g,y]=f,w=(m-d)/i,k=(y-g)/o;for(let M=0;M<p.length;M++)if(!u||u[M]){let t=p[M],n=x[M];if(t<d||t>m||n<g||n>y)continue;r?(t=(t-d)*w,t=t>i-1?i-1:t<0?0:255&t,n=(y-n)*k,n=n>o-1?o-1:n<0?0:255&n,r[n*i+t]&&(e[M]=l)):e[M]=l}}function x(t){const{pixelBlock:e,renderedPixelBlock:n,highlightOptions:l}=t;if(!o(e))return;const{width:i,height:r}=e,s=i*r,a=new Uint8Array(s);for(let o=1;o<=l.length;o++){const t=l[o-1];"bandId"in t?u(e,a,t,o):p(e,a,t,o)}const{pixels:h}=n;1===h.length&&(h[1]=h[0].slice(),h[2]=h[0].slice());const f=l.map(t=>t.color),[c,x,d]=h;if(n.mask){const t=n.mask;for(let e=0;e<s;e++)if(t[e]){t[e]=255;const n=a[e];if(n){const l=f[n-1];c[e]=l[0],x[e]=l[1],d[e]=l[2],t[e]=l[3]}}}else{const t=new Uint8Array(s).fill(255);for(let e=0;e<s;e++){const n=a[e];if(n){const l=f[n-1];c[e]=l[0],x[e]=l[1],d[e]=l[2],t[e]=l[3]}}n.mask=t}n.maskIsAlpha=!0}function d(t,e){if(!o(t))return null;const n=t.clone(),{pixels:l}=n,i=n.width*n.height,r=e.length,s=Math.floor(r/2),a=e[Math.floor(s)],h=l[0],f=new Uint8Array(i),c=new Uint8Array(i),u=new Uint8Array(i);let p=n.mask;const x=4===e[0].mappedColor.length;p||(p=new Uint8Array(i),p.fill(x?255:1),n.mask=p);for(let o=0;o<i;o++)if(p[o]){const t=h[o];let n=!1,l=s,i=a,x=0,d=r-1;for(;d-x>1;){if(t===i.value){n=!0;break}t>i.value?x=l:d=l,l=Math.floor((x+d)/2),i=e[Math.floor(l)]}n||(t===e[x].value?(i=e[x],n=!0):t===e[d].value?(i=e[d],n=!0):t<e[x].value?n=!1:t>e[x].value&&(t<e[d].value?(i=e[x],n=!0):d===r-1?n=!1:(i=e[d],n=!0))),n?(f[o]=i.mappedColor[0],c[o]=i.mappedColor[1],u[o]=i.mappedColor[2],p[o]=i.mappedColor[3]):f[o]=c[o]=u[o]=p[o]=0}return n.pixels=[f,c,u],n.mask=p,n.pixelType="u8",n.maskIsAlpha=x,n}function m(e,n,i=!1){const o=1e-5,r=new Float32Array(3*l),s=n.length;for(let a=0;a<l;a++)r[3*a]=e[2*a]??t-1,r[3*a+1]=e[2*a+1]??t,r[3*a+2]=n[a]??0,a<s&&(a>0&&(r[3*a]-=o),e[2*a+1]!==e[2*a]&&(a<s-1||!i)&&(r[3*a+1]-=o));return r}function g(t,l){if(!o(t))return null;const{width:i,height:r}=t,{inputRanges:s,outputValues:a,outputPixelType:h,noDataRanges:f,allowUnmatched:c,replacementValue:u,isLastInputRangeInclusive:p}=l,x=t.pixels[0],d=n.createEmptyBand(h,x.length),m=t.mask,g=new Uint8Array(i*r);m?g.set(m):g.fill(255);const y=t.pixelType.startsWith("f")?1e-6:0,w=s.map(t=>t-y);w[0]=s[0],w[w.length-1]=s[s.length-1]+(p?1e-6:0);const k=s.length/2,[M,A]=e(h);for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=e*i+t;if(g[n]){const t=x[n];let e=!1;for(let l=k-1;l>=0;l--)if(t===s[2*l]||t>w[2*l]&&t<w[2*l+1]){d[n]=a[l],e=!0;break}e||(c?d[n]=t>A?A:t<M?M:u??t:g[n]=0)}}const U=f?.length;if(U)for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=e*i+t;if(!m||m[n]){const t=x[n];for(let e=0;e<U;e+=2)if(t>=f[e]&&t<=f[e+1]){d[n]=0,g[n]=0;break}}}return new n({width:i,height:r,pixelType:h,pixels:[d],mask:g})}function y(t,e,n,l){const i=null!=n&&n.length>=2?new Set(n):null,o=1===n?.length?n[0]:null,r=!!e?.length;for(let s=0;s<t.length;s++)if(l[s]){const n=t[s];if(r){let t=!1;for(let l=0;l<e.length;l+=2)if(n>=e[l]&&n<=e[l+1]){t=!0;break}t||(l[s]=0)}l[s]&&(n===o||i?.has(n))&&(l[s]=0)}}function w(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(t[e][l]){n=!0;break}n||(e[l]=0)}return e}function k(t,e){const n=t[0].length;e??=new Uint8Array(n).fill(255);for(let l=0;l<n;l++)if(e[l]){let n=!1;for(let e=0;e<t.length;e++)if(0===t[e][l]){n=!0;break}n&&(e[l]=0)}return e}function M(t,e){if(!o(t))return null;const{width:l,height:i,pixels:r}=t,s=l*i,a=new Uint8Array(s);t.mask?a.set(t.mask):a.fill(255);const h=r.length,{includedRanges:f,noDataValues:u,outputPixelType:p,matchAll:x,lookups:d}=e;if(d){const t=[];for(let e=0;e<h;e++){const n=d[e],l=c(r[e],a,n.lut,n.offset||0,"u8");t.push(l)}1===t.length?a.set(t[0]):x?w(t,a):k(t,a)}else if(x){const t=[];for(let e=0;e<h;e++){const n=new Uint8Array(s);n.set(a),y(r[e],f?.slice(2*e,2*e+2),u?.[e],n),t.push(n)}1===t.length?a.set(t[0]):w(t,a)}else for(let n=0;n<h;n++)y(r[n],f?.slice(2*n,2*n+2),u?.[n],a);return new n({width:l,height:i,pixelType:p,pixels:r,mask:a})}function A(t){const{srcPixelType:l,inputRanges:i,outputValues:o,allowUnmatched:r,noDataRanges:s,isLastInputRangeInclusive:a,outputPixelType:h}=t;if("u8"!==l&&"s8"!==l&&"u16"!==l&&"s16"!==l)return null;const f=l.includes("16")?65536:256,c=l.includes("s")?-f/2:0,u=n.createEmptyBand(h,f),p=new Uint8Array(f);r&&p.fill(255);const[x,d]=e(h);if(i?.length&&o?.length){const t=1e-6,e=i.map(e=>e-t);e[0]=i[0],a&&(e[e.length-1]=i[i.length-1]);for(let n=0;n<e.length;n++){const t=o[n]>d?d:o[n]<x?x:o[n],l=Math.ceil(e[2*n]-c),r=i[2*n+1]===i[2*n]?l:Math.floor(e[2*n+1]-c);for(let e=l;e<=r;e++)u[e]=t,p[e]=255}}if(s?.length)for(let e=0;e<s.length;e++){const t=Math.ceil(s[2*e]-c),n=Math.floor(s[2*e+1]-c);for(let e=t;e<=n;e++)p[e]=0}return{lut:u,offset:c,mask:p}}function U(t,e,n){if("u8"!==t&&"s8"!==t&&"u16"!==t&&"s16"!==t)return null;const l=t.includes("16")?65536:256,i=t.includes("s")?-l/2:0,o=new Uint8Array(l);if(e)for(let r=0;r<e.length;r++){const t=Math.ceil(e[2*r]-i),n=Math.floor(e[2*r+1]-i);for(let e=t;e<=n;e++)o[e]=255}else o.fill(255);if(n)for(let r=0;r<n.length;r++)o[n[r]-i]=0;return{lut:o,offset:i}}function b(t,e,n,l,i,o,r,s){return{xmin:i<=n*t?0:i<n*t+t?i-n*t:t,ymin:o<=l*e?0:o<l*e+e?o-l*e:e,xmax:i+r<=n*t?0:i+r<n*t+t?i+r-n*t:t,ymax:o+s<=l*e?0:o+s<l*e+e?o+s-l*e:e}}function T(t,e){if(!t||0===t.length)return null;const n=t.find(t=>t.pixelBlock);if(null==n?.pixelBlock)return null;const l=(n.extent.xmax-n.extent.xmin)/n.pixelBlock.width,i=(n.extent.ymax-n.extent.ymin)/n.pixelBlock.height,o=.01*Math.min(l,i),r=t.sort((t,e)=>Math.abs(t.extent.ymax-e.extent.ymax)>o?e.extent.ymax-t.extent.ymax:Math.abs(t.extent.xmin-e.extent.xmin)>o?t.extent.xmin-e.extent.xmin:0),s=Math.min.apply(null,r.map(t=>t.extent.xmin)),a=Math.min.apply(null,r.map(t=>t.extent.ymin)),h=Math.max.apply(null,r.map(t=>t.extent.xmax)),f=Math.max.apply(null,r.map(t=>t.extent.ymax)),c={x:Math.round((e.xmin-s)/l),y:Math.round((f-e.ymax)/i)},u={width:Math.round((h-s)/l),height:Math.round((f-a)/i)},p={width:Math.round((e.xmax-e.xmin)/l),height:Math.round((e.ymax-e.ymin)/i)};if(Math.round(u.width/n.pixelBlock.width)*Math.round(u.height/n.pixelBlock.height)!==r.length||c.x<0||c.y<0||u.width<p.width||u.height<p.height)return null;return{extent:e,pixelBlock:S(r.map(t=>t.pixelBlock),u,{clipOffset:c,clipSize:p})}}function B(t,e,n,l,i,o){const{width:r,height:s}=n.block,{x:a,y:h}=n.offset,{width:f,height:c}=n.mosaic,u=b(r,s,l,i,a,h,f,c);let p=0,x=0;if(o){const t=o.hasGCSSShiftTransform?360:o.halfWorldWidth??0,e=r*o.resolutionX,n=o.startX+l*e;n<t&&n+e>t?x=o.rightPadding:n>=t&&(p=o.leftMargin-o.rightPadding,x=0)}if(u.xmax-=x,"number"!=typeof e)for(let d=u.ymin;d<u.ymax;d++){const n=(i*s+d-h)*f+(l*r-a)+p,o=d*r;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e[o+l]}else for(let d=u.ymin;d<u.ymax;d++){const n=(i*s+d-h)*f+(l*r-a)+p;for(let l=u.xmin;l<u.xmax;l++)t[n+l]=e}}function S(t,e,l={}){const{clipOffset:i,clipSize:r,alignmentInfo:s,blockWidths:a}=l;if(a)return v(t,e,{blockWidths:a});const h=t.find(t=>o(t));if(null==h)return null;const f=r?r.width:e.width,c=r?r.height:e.height,u=h.width,p=h.height,x=e.width/u,d=e.height/p,m={offset:i||{x:0,y:0},mosaic:r||e,block:{width:u,height:p}},g=h.pixelType,y=n.getPixelArrayConstructor(g),w=h.pixels.length,k=[];let M,A;for(let n=0;n<w;n++){A=new y(f*c);for(let e=0;e<d;e++)for(let l=0;l<x;l++){const i=t[e*x+l];o(i)&&(M=i.pixels[n],B(A,M,m,l,e,s))}k.push(A)}const U=t.some(t=>null==t||null!=t.mask&&t.mask.length>0),b=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),T=U?new Uint8Array(f*c):void 0,S=b?[]:void 0;if(T){for(let e=0;e<d;e++)for(let n=0;n<x;n++){const l=t[e*x+n],i=null!=l?l.mask:null;B(T,null!=i?i:l?255:0,m,n,e,s)}if(S)for(let e=0;e<w;e++){const n=new Uint8Array(f*c);for(let l=0;l<d;l++)for(let i=0;i<x;i++){const o=t[l*x+i],r=o?.bandMasks?.[e]??o?.mask;B(n,null!=r?r:o?255:0,m,i,l,s)}S.push(n)}}const C=new n({width:f,height:c,pixels:k,pixelType:g,bandMasks:S,mask:T});return C.updateStatistics(),C}function v(t,e,l){const i=t.find(t=>null!=t);if(null==i)return null;const r=t.some(t=>null==t||!!t.mask),{width:s,height:a}=e,h=r?new Uint8Array(s*a):null,{blockWidths:f}=l,c=[],u=i.getPlaneCount(),p=n.getPixelArrayConstructor(i.pixelType);if(r)for(let n=0,y=0;n<t.length;y+=f[n],n++){const e=t[n];if(!o(e))continue;const l=e.mask;for(let t=0;t<a;t++)for(let i=0;i<f[n];i++)h[t*s+i+y]=null==l?255:l[t*e.width+i]}const x=t.some(t=>t?.bandMasks&&t.bandMasks.length>1),d=x?[]:void 0,m=s*a;for(let n=0;n<u;n++){const e=new p(m),l=x?new Uint8Array(m):void 0;for(let i=0,r=0;i<t.length;r+=f[i],i++){const h=t[i];if(!o(h))continue;const c=h.pixels[n];if(null!=c){for(let t=0;t<a;t++)for(let n=0;n<f[i];n++)e[t*s+n+r]=c[t*h.width+n];if(l){const t=h.bandMasks?.[n]??h.mask;for(let e=0;e<a;e++)for(let n=0;n<f[i];n++)l[e*s+n+r]=t?t[e*h.width+n]:255}}}c.push(e),d&&l&&d.push(l)}const g=new n({width:s,height:a,mask:h,bandMasks:d,pixels:c,pixelType:i.pixelType});return g.updateStatistics(),g}function C(t,e,n){if(!o(t))return null;const{width:l,height:i}=t,r=e.x,s=e.y,a=n.width+r,h=n.height+s;if(r<0||s<0||a>l||h>i)return t;if(0===r&&0===s&&a===l&&h===i)return t;t.mask||(t.mask=new Uint8Array(l*i));const f=t.mask;for(let o=0;o<i;o++){const t=o*l;for(let e=0;e<l;e++)f[t+e]=o<s||o>=h||e<r||e>=a?0:1}return t.updateStatistics(),t}function I(t){if(!o(t))return null;const e=t.clone(),{width:n,height:l,pixels:i}=t,r=i[0],s=e.pixels[0],a=t.mask;for(let o=2;o<l-1;o++){const t=new Map;for(let l=o-2;l<o+2;l++)for(let e=0;e<4;e++){const i=l*n+e;D(t,r[i],a?a[i]:1)}s[o*n]=R(t),s[o*n+1]=s[o*n+2]=s[o*n];let e=3;for(;e<n-1;e++){let l=(o-2)*n+e+1;D(t,r[l],a?a[l]:1),l=(o-1)*n+e+1,D(t,r[l],a?a[l]:1),l=o*n+e+1,D(t,r[l],a?a[l]:1),l=(o+1)*n+e+1,D(t,r[l],a?a[l]:1),l=(o-2)*n+e-3,P(t,r[l],a?a[l]:1),l=(o-1)*n+e-3,P(t,r[l],a?a[l]:1),l=o*n+e-3,P(t,r[l],a?a[l]:1),l=(o+1)*n+e-3,P(t,r[l],a?a[l]:1),s[o*n+e]=R(t)}s[o*n+e+1]=s[o*n+e]}for(let o=0;o<n;o++)s[o]=s[n+o]=s[2*n+o],s[(l-1)*n+o]=s[(l-2)*n+o];return e.updateStatistics(),e}function R(t){if(0===t.size)return 0;let e=0,n=-1,l=0;const i=t.keys();let o=i.next();for(;!o.done;)l=t.get(o.value),l>e&&(n=o.value,e=l),o=i.next();return n}function P(t,e,n){if(0===n)return;const l=t.get(e);1===l?t.delete(e):t.set(e,l-1)}function D(t,e,n){0!==n&&t.set(e,t.has(e)?t.get(e)+1:1)}function _(t,e,l){let{x:i,y:r}=e;const{width:s,height:a}=l;if(0===i&&0===r&&a===t.height&&s===t.width)return t;const{width:h,height:f}=t,c=Math.max(0,r),u=Math.max(0,i),p=Math.min(i+s,h),x=Math.min(r+a,f);if(p<0||x<0||!o(t))return null;i=Math.max(0,-i),r=Math.max(0,-r);const{pixels:d}=t,m=s*a,g=d.length,y=[];for(let o=0;o<g;o++){const e=d[o],l=n.createEmptyBand(t.pixelType,m);for(let t=c;t<x;t++){const n=t*h;let o=(t+r-c)*s+i;for(let t=u;t<p;t++)l[o++]=e[n+t]}y.push(l)}const w=new Uint8Array(m),k=t.mask;for(let n=c;n<x;n++){const t=n*h;let e=(n+r-c)*s+i;for(let n=u;n<p;n++)w[e++]=k?k[t+n]:1}const M=new n({width:l.width,height:l.height,pixelType:t.pixelType,pixels:y,mask:w});return M.updateStatistics(),M}function F(t,e=!0){if(!o(t))return null;const{pixels:l,width:i,height:r,mask:s,pixelType:a}=t,h=[],f=Math.round(i/2),c=Math.round(r/2),u=r-1,p=i-1;for(let o=0;o<l.length;o++){const t=l[o],s=n.createEmptyBand(a,f*c);let x=0;for(let n=0;n<r;n+=2)for(let l=0;l<i;l+=2){const o=t[n*i+l];if(e){const e=l===p?o:t[n*i+l+1],r=n===u?o:t[n*i+l+i],a=l===p?r:n===u?e:t[n*i+l+i+1];s[x++]=(o+e+r+a)/4}else s[x++]=o}h.push(s)}let x=null;if(null!=s){x=new Uint8Array(f*c);let t=0;for(let n=0;n<r;n+=2)for(let l=0;l<i;l+=2){const o=s[n*i+l];if(e){const e=l===p?o:s[n*i+l+1],r=n===u?o:s[n*i+l+i],a=l===p?r:n===u?e:s[n*i+l+i+1];x[t++]=o*e*r*a?1:0}else x[t++]=o}}return new n({width:f,height:c,pixelType:a,pixels:h,mask:x})}function W(t,e,n=0,l=!0){if(!o(t))return null;const{width:i,height:r}=e;let{width:s,height:a}=t;const h=new Map,f={x:0,y:0},c=1+n;let u=t;for(let o=0;o<c;o++){const t=Math.ceil(s/i),n=Math.ceil(a/r);for(let l=0;l<n;l++){f.y=l*r;for(let n=0;n<t;n++){f.x=n*i;const t=_(u,f,e);h.set(`${o}/${l}/${n}`,t)}}o<c-1&&(u=F(u,l)),s=Math.round(s/2),a=Math.round(a/2)}return h}function E(t){const{pixelBlock:e,tileSize:n,level:l,row:i,col:r,useBilinear:s}=t;if(!o(e))return null;const{width:a,height:h}=n,f=2**l,c=f*a,u=f*h;let p=_(e,{y:i*u,x:r*c},{width:c,height:u});if(!p)return null;for(let o=l;o>0;o--)p=F(p,s);return p}function N(t,e,n,l,i=0){const{width:o,height:r}=t,{width:s,height:a}=e,h=l.cols,f=l.rows,c=Math.ceil(s/h-.1/h),u=Math.ceil(a/f-.1/f);let p,x,d,m,g,y,w;const k=c*h,M=k*u*f,A=new Float32Array(M),U=new Float32Array(M),b=new Uint32Array(M),T=new Uint32Array(M);let B,S,v=0;for(let C=0;C<u;C++)for(let t=0;t<c;t++){p=12*(C*c+t),x=n[p],d=n[p+1],m=n[p+2],g=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<f;e++){v=(C*f+e)*k+t*h,S=(e+.5)/f;for(let t=0;t<e;t++)B=(t+.5)/h,A[v+t]=(x*B+d*S+m)*o+i,U[v+t]=(g*B+y*S+w)*r+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}p+=6,x=n[p],d=n[p+1],m=n[p+2],g=n[p+3],y=n[p+4],w=n[p+5];for(let e=0;e<f;e++){v=(C*f+e)*k+t*h,S=(e+.5)/f;for(let t=e;t<h;t++)B=(t+.5)/h,A[v+t]=(x*B+d*S+m)*o+i,U[v+t]=(g*B+y*S+w)*r+i,b[v+t]=Math.floor(A[v+t]),T[v+t]=Math.floor(U[v+t])}}return{offsets_x:A,offsets_y:U,offsets_xi:b,offsets_yi:T,gridWidth:k}}function j(t,e){const{coefficients:n,spacing:l}=e,{offsets_x:i,offsets_y:o,gridWidth:r}=N(t,t,n,{rows:l[0],cols:l[1]}),{width:s,height:a}=t,h=new Float32Array(s*a),f=180/Math.PI;for(let c=0;c<a;c++)for(let t=0;t<s;t++){const e=c*r+t,n=0===c?e:e-r,l=c===a-1?e:e+r,u=i[n]-i[l],p=o[l]-o[n];if(isNaN(u)||isNaN(p))h[c*s+t]=90;else{let e=Math.atan2(p,u)*f;e=(360+e)%360,h[c*s+t]=e}}return h}function z(t,e,l,i,r="nearest"){if(!o(t))return null;"majority"===r&&(t=I(t));const{pixels:s,mask:a,bandMasks:h,pixelType:f}=t,c=t.width,u=t.height,p=n.getPixelArrayConstructor(f),x=s.length,{width:d,height:m}=e;let g=!1;for(let n=0;n<l.length;n+=3)-1===l[n]&&-1===l[n+1]&&-1===l[n+2]&&(g=!0);const{offsets_x:y,offsets_y:w,offsets_xi:k,offsets_yi:M,gridWidth:A}=N({width:c,height:u},e,l,i,"majority"===r?.5:0);let U;const b=(t,e,n,l)=>{const i=t instanceof Float32Array||t instanceof Float64Array?0:.5;for(let o=0;o<m;o++){U=o*A;for(let r=0;r<d;r++){if(y[U]<0||w[U]<0)t[o*d+r]=0;else if(l)t[o*d+r]=e[k[U]+M[U]*c];else{const l=Math.floor(y[U]),s=Math.floor(w[U]),a=Math.ceil(y[U]),h=Math.ceil(w[U]),f=y[U]-l,u=w[U]-s;if(!n||n[l+s*c]&&n[a+s*c]&&n[l+h*c]&&n[a+h*c]){const n=(1-f)*e[l+s*c]+f*e[a+s*c],p=(1-f)*e[l+h*c]+f*e[a+h*c];t[o*d+r]=(1-u)*n+u*p+i}else t[o*d+r]=e[k[U]+M[U]*c]}U++}}},T=[];let B;const S=h?.length===x,v=[];for(let n=0;n<x;n++){if(S){const t=new Uint8Array(d*m);b(t,h[n],h[n],!0),v.push(t)}B=new p(d*m),b(B,s[n],S?h[n]:a,"nearest"===r||"majority"===r),T.push(B)}const C=new n({width:d,height:m,pixelType:f,pixels:T,bandMasks:S?v:void 0});if(null!=a)C.mask=new Uint8Array(d*m),b(C.mask,a,a,!0);else if(g){C.mask=new Uint8Array(d*m);for(let t=0;t<d*m;t++)C.mask[t]=y[t]<0||w[t]<0?0:1}return C.updateStatistics(),C}function O(t){const{pixelBlock:e,extent:n,fieldNames:l,skipFactor:o,skipSpatialReference:r=!1,pixelIdOffset:s=0}=t,a=[],{width:h,height:f,pixels:c,mask:u}=e,p=t.imageRowSize??h,x=n.width/h,d=n.height/f,m=c.length,g=Math.floor(o/2),{xmin:y,ymax:w}=n,k=r?void 0:n.spatialReference.toJSON();for(let M=g;M<f;M+=o)for(let t=g;t<h;t+=o){const e=M*h+t;if(!u||u[e]){const n={x:y+(t+.5)*x,y:w-(M+.5)*d,spatialReference:k},o={[i]:s+M*p+t};for(let t=0;t<m;t++)o[l[t+1]]=c[t][e];a.push({geometry:n,attributes:o})}}return a}function L(t,e){const{width:n,height:l,pixels:i,mask:o}=t,r=i[0];let s=0;for(let a=0;a<l;a++){let t=a*n;for(let l=0;l<n;l++,t++)o&&!o[t]||(e[r[t]]++,s++)}return s}function G(t,e){const{width:n,height:l,pixels:i,mask:o}=t,r=e.width/n,s=e.height/l,{xmin:a,ymax:h}=e,f=e.spatialReference.toJSON(),c=[];for(let u=0;u<l;u++)for(let t=0;t<n;t++){const e=u*n+t;if(!o||o[e]){const n={x:a+(t+.5)*r,y:h-(u+.5)*s,spatialReference:f},l=i.map(t=>t[e]);c.push({location:n,value:l})}}return c}function V(t,e,l){const{attributeTable:i}=e;if(!i)return t;const o=i.fields.find(t=>t.name.toLowerCase()===l.toLowerCase()),r=i.fields.find(t=>"value"===t.name.toLowerCase());if(!o||!r)return t;const[s]=t.pixels,a="single"===o.type?"f32":"double"===o.type||"big-integer"===o.type?"f64":"small-integer"===o.type?"s16":"s32",h=s.length,f=new("f32"===a?Float32Array:"f64"===a?Float64Array:"s16"===a?Int16Array:Int32Array)(h),c=new Map;for(const n of i.features){const t=n.attributes[r.name],e=n.attributes[o.name];c.set(t,e)}const u=t.mask??new Uint8Array(h).fill(255);for(let n=0;n<h;n++)if(u[n]){const t=c.get(s[n]);null==t?u[n]=0:f[n]=t}return new n({width:t.width,height:t.height,pixels:[f],mask:u,pixelType:a})}function $(t){const{srcDimensions:e,destDimension:n,transformGrid:{coefficients:l,spacing:i},bias:o=0,pos:{x:r,y:s}}=t;if(!l?.length)return null;const{width:a,height:h}=e,{width:f}=n,[c,u]=i,p=Math.ceil(f/c-.1/c),x=Math.floor(r/c),d=Math.floor(s/u),m=Math.floor(r-x*c),g=Math.floor(s-d*u),y=12*(d*p+x)+(m>=g?6:0),w=(g+.5)/u,k=(m+.5)/c;return{x:(l[y]*k+l[y+1]*w+l[y+2])*a+o,y:(l[y+3]*k+l[y+4]*w+l[y+5])*h+o}}function J(t){const{pos:e,pixelData:n,pixelSize:l,transformGrid:i}=t;if(!n.pixelBlock)return null;const{xmin:o,xmax:r,ymin:s,ymax:a}=n.extent;let h=Math.floor((e.x-o)/l.x),f=Math.floor((a-e.y)/l.y);const c={width:Math.round((r-o)/l.x),height:Math.round((a-s)/l.y)},{width:u,height:p,mask:x}=n.pixelBlock;if(i){const t=$({pos:{x:h,y:f},transformGrid:i,srcDimensions:{width:u,height:p},destDimension:c});if(!t||t.x<0||t.x>=u||t.y<0||t.y>=p)return null;h=t.x,f=t.y}const d=Math.floor(f),m=Math.floor(h),g=d*u+m,y=x&&!x[g]?null:n.pixelBlock.pixels.map(t=>t[g]);return{x:h,y:f,row:d,col:m,position:g,value:y}}export{z as approximateTransform,_ as clip,E as clipTile,h as colorize,s as compositeBands,O as convertPixelBlockToFeatures,L as countCategoricalPixels,a as createColormapLUT,U as createMaskLUT,m as createRangeMaps,A as createRemapLUT,r as extractBands,b as getClipBounds,j as getLocalArithmeticNorthRotations,J as getPixelLocationAndValue,$ as getPixelOffset,G as getValidPixels,x as highlightPixels,N as interpolateOffsets,o as isValidPixelBlock,c as lookupBandValues,f as lookupPixels,V as mapPixelValueToAttribute,M as mask,k as matchAnyMask,l as maxMapSizeGpu,S as mosaic,T as mosaicPixelData,i as pixelIdFieldName,g as remap,d as remapColor,I as resampleByMajority,u as selectBySingleBandRange,p as selectByXYMask,C as setValidBoundary,W as split};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities,s as zeroQueryBins};
|
|
2
|
+
const s={supportsDate:!1,supportsFixedInterval:!1,supportsAutoInterval:!1,supportsFixedBoundaries:!1,supportsStackBy:!1,supportsSplitBy:!1,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!1,supportedStatistics:void 0,supportedNormalizationTypes:void 0},t={analytics:{supportsCacheHint:!1},attachment:{supportsContentType:!1,supportsExifInfo:!1,supportsKeywords:!1,supportsName:!1,supportsSize:!1,supportsCacheHint:!1,supportsOrderByFields:!1,supportsResize:!1,supportsTypeWildcard:!1},data:{isVersioned:!1,isBranchVersioned:!1,supportedCurveTypes:[],supportsAttachment:!1,supportsM:!1,supportsTrueCurve:!1,supportsZ:!1},editing:{supportsDeleteByAnonymous:!1,supportsDeleteByOthers:!1,supportsGeometryUpdate:!1,supportsGlobalId:!1,supportsReturnServiceEditsInSourceSpatialReference:!1,supportsRollbackOnFailure:!1,supportsTrueCurveUpdate:!1,supportsTrueCurveUpdateByTrueCurveClientsOnly:!0,supportsUpdateByAnonymous:!1,supportsUpdateByOthers:!1,supportsUpdateWithoutM:!1,supportsUploadWithItemId:!1,supportsAsyncApplyEdits:!1,zDefault:void 0},metadata:{supportsAdvancedFieldProperties:!1},operations:{supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsAdd:!1,supportsDelete:!1,supportsEditing:!1,supportsChangeTracking:!1,supportsQuery:!1,supportsQueryAnalytics:!1,supportsQueryAttachments:!1,supportsQueryBins:!1,supportsQueryPivot:!1,supportsQueryTopFeatures:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsUpdate:!1,supportsExceedsLimitStatistics:!1,supportsAsyncConvert3D:!1},queryRelated:{supportsCount:!1,supportsOrderBy:!1,supportsPagination:!1,supportsCacheHint:!1},queryTopFeatures:{supportsCacheHint:!1},queryAttributeBins:s,query:{maxRecordCount:0,maxRecordCountFactor:0,maxUniqueIDCount:0,relativeTimeBinWindow:0,standardMaxRecordCount:0,standardMaxRecordCountNoGeometry:0,supportsCacheHint:!1,supportsCentroid:!1,supportsCentroidOnDegeneratedQuantizedGeometry:!1,supportsCompactGeometry:!1,supportsCurrentUser:!1,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsDegeneratedQuantizedGeometry:!1,supportsDisjointSpatialRelationship:!1,supportsDistance:!1,supportsDistinct:!1,supportsExtent:!1,supportsFormatPBF:!1,supportsFormatPBFWithCurves:!1,supportsGeometryProperties:!1,supportsHavingClause:!1,supportsHistoricMoment:!1,supportsMaxRecordCountFactor:!1,supportsOrderBy:!1,supportsPagination:!1,supportsPaginationOnAggregatedQueries:!1,supportsPercentileStatistics:!1,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsSqlExpression:!1,supportsStandardizedQueriesOnly:!1,supportsTopFeaturesQuery:!1,supportsTrueCurve:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsStatistics:!1,tileMaxRecordCount:0}};export{t as zeroCapabilities,s as zeroQueryBins};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{isSome as t}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{curveTypeDict as
|
|
2
|
+
import{isSome as t}from"../../core/arrayUtils.js";import has from"../../core/has.js";import{curveTypeDict as e}from"../../geometry/support/typeUtils.js";import{isHostedAgolService as s,parse as r}from"./arcgisLayerUrl.js";import{getGltfQueryFormat as p}from"./infoFor3D.js";import{getRelativeTimeQueryBinWindowSize as o}from"./relativeTimeQueryUtils.js";import{readNumber as u,readBoolean as i}from"../../rest/support/jsonUtils.js";const a={name:"supportsName",size:"supportsSize",contentType:"supportsContentType",keywords:"supportsKeywords",exifInfo:"supportsExifInfo"},n=["cubic-bezier","circular-arc","elliptic-arc"];function c(t){const e=t?.supportedSpatialAggregationStatistics?.map(t=>t.toLowerCase());return{envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function d(t,e){const s=t?.supportedOperationsWithCacheHint?.map(t=>t.toLowerCase());return!!s?.includes(e.toLowerCase())}function l(t){const e=t?.supportedStatisticTypes?.map(t=>t.toLowerCase());return{count:!!e?.includes("count"),sum:!!e?.includes("sum"),min:!!e?.includes("min"),max:!!e?.includes("max"),avg:!!e?.includes("avg"),var:!!e?.includes("var"),stddev:!!e?.includes("stddev"),percentileContinuous:!!e?.includes("percentile_cont"),percentileDiscrete:!!e?.includes("percentile_disc"),envelope:!!e?.includes("envelopeaggregate"),centroid:!!e?.includes("centroidaggregate"),convexHull:!!e?.includes("convexhullaggregate")}}function y(t){const e=t?.supportedNormalizationTypes?.map(t=>t.toLowerCase());return{field:!!e?.includes("field"),log:!!e?.includes("log"),naturalLog:!!e?.includes("naturallog"),percentOfTotal:!!e?.includes("percentoftotal"),squareRoot:!!e?.includes("squareroot")}}function m(t){if(!has("featurelayer-pbf-true-curves"))return!1;return(t.supportedTrueCurvePbfFeatureEncodings??[]).includes("esriDefault")}function C(t,e){return{analytics:v(t),attachment:g(t),data:f(t),metadata:h(t),operations:Q(t.capabilities,t,e),query:A(t,e),queryAttributeBins:x(t),queryRelated:S(t),queryTopFeatures:T(t),editing:F(t)}}function v(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryAnalytics")}}function g(t){const e=t.attachmentProperties,s={supportsName:!1,supportsSize:!1,supportsContentType:!1,supportsKeywords:!1,supportsExifInfo:!1,supportsCacheHint:d(t.advancedQueryCapabilities,"queryAttachments"),supportsOrderByFields:i(t.advancedQueryCapabilities,"supportsQueryAttachmentOrderByFields",!1),supportsResize:i(t,"supportsAttachmentsResizing",!1),supportsTypeWildcard:i(t.advancedQueryCapabilities,"supportsQueryAttachmentWithTypeWildcard",!1)};return e&&Array.isArray(e)&&e.forEach(t=>{const e=a[t.name];e&&(s[e]=!!t.isEnabled)}),s}function f(t){const e=i(t.advancedQueryCapabilities,"supportsTrueCurve",!1);return{isVersioned:i(t,"isDataVersioned",!1),isBranchVersioned:i(t,"isDataBranchVersioned",!1),supportsAttachment:i(t,"hasAttachments",!1),supportsM:i(t,"hasM",!1),supportsTrueCurve:e,supportedCurveTypes:R(t,e),supportsZ:i(t,"hasZ",!1)}}function h(t){return{supportsAdvancedFieldProperties:i(t,"supportsFieldDescriptionProperty",!1)}}function Q(t,e,p){const o=s(p),u=t?.toLowerCase().split(",").map(t=>t.trim())??[],a=p?r(p):null,n=u.includes("MapServer"===a?.serverType?"data":"query"),c=u.includes("editing")&&!e.datesInUnknownTimezone&&!(!0===e.uniqueIdInfo?.OIDFieldContainsHashValue);let d=c&&u.includes("create"),l=c&&u.includes("delete"),y=c&&u.includes("update");const m=u.includes("changetracking"),C=e.advancedQueryCapabilities;let v=i(e,"supportsExceedsLimitStatistics",!1);if(!o){i(C,"supportsUseEstimateForExceedsLimit",!1)||(v=!1)}return c&&!(d||l||y)&&(d=l=y=!0),{supportsCalculate:i(e,"supportsCalculate",!1),supportsTruncate:i(e,"supportsTruncate",!1),supportsValidateSql:i(e,"supportsValidateSql",!1),supportsAdd:d,supportsDelete:l,supportsEditing:c,supportsChangeTracking:m,supportsQuery:n,supportsQueryAnalytics:i(C,"supportsQueryAnalytic",!1),supportsQueryAttachments:i(C,"supportsQueryAttachments",!1),supportsQueryBins:i(C,"supportsQueryBins",!1)||!!e.queryBinsCapabilities,supportsQueryPivot:i(C,"supportsQueryPivot",!1),supportsQueryTopFeatures:i(C,"supportsTopFeaturesQuery",!1),supportsResizeAttachments:i(e,"supportsAttachmentsResizing",!1),supportsSync:u.includes("sync"),supportsUpdate:y,supportsExceedsLimitStatistics:v,supportsAsyncConvert3D:i(e,"supportsAsyncConvert3D",!1)}}function A(t,e){const r=t.advancedQueryCapabilities,a=t.ownershipBasedAccessControlForFeatures,n=t.archivingInfo,l=t.currentVersion,y=o(e,t.cacheMaxAge),C=e?.includes("MapServer"),v=!C||l>=has("mapserver-pbf-version-support"),g=s(e),f=new Set((t.supportedQueryFormats??"").split(",").map(t=>t.toLowerCase().trim())),h=v&&m(t);return{maxRecordCount:u(t,"maxRecordCount",void 0),maxRecordCountFactor:u(t,"maxRecordCountFactor",void 0),maxUniqueIDCount:u(t,"maxUniqueIDCount",void 0),relativeTimeBinWindow:y,standardMaxRecordCount:u(t,"standardMaxRecordCount",void 0),standardMaxRecordCountNoGeometry:u(t,"standardMaxRecordCountNoGeometry",void 0),supportedSpatialAggregationStatistics:c(r),supportsCacheHint:i(r,"supportsQueryWithCacheHint",!1)||d(r,"query"),supportsCentroid:i(r,"supportsReturningGeometryCentroid",!1),supportsCentroidOnDegeneratedQuantizedGeometry:g||null==e,supportsCompactGeometry:g,supportsCurrentUser:i(r,"supportsCurrentUserQueries",!1),supportsDefaultSpatialReference:i(r,"supportsDefaultSR",!1),supportsDegeneratedQuantizedGeometry:i(r,"supportsDegeneratedQuantizedGeometry",!1),supportsDisjointSpatialRelationship:i(r,"supportsDisjointSpatialRel",!1),supportsDistance:i(r,"supportsQueryWithDistance",!1),supportsDistinct:i(r,"supportsDistinct",t.supportsAdvancedQueries),supportsExtent:i(r,"supportsReturningQueryExtent",!1),supportsFormatPBF:v&&f.has("pbf"),supportsFormatPBFWithCurves:h,supportsFullTextSearch:i(r,"supportsFullTextSearch",!1),supportsGeometryProperties:i(r,"supportsReturningGeometryProperties",!1),supportsHavingClause:i(r,"supportsHavingClause",!1),supportsHistoricMoment:i(n,"supportsQueryWithHistoricMoment",!1),supportsMaxRecordCountFactor:i(r,"supportsMaxRecordCountFactor",!1),supportsOrderBy:i(r,"supportsOrderBy",t.supportsAdvancedQueries),supportsPagination:i(r,"supportsPagination",!1),supportsPaginationOnAggregatedQueries:i(r,"supportsPaginationOnAggregatedQueries",!1),supportsPercentileStatistics:i(r,"supportsPercentileStatistics",!1),supportsQuantization:i(t,"supportsCoordinatesQuantization",!1),supportsQuantizationEditMode:i(t,"supportsQuantizationEditMode",!1),supportsQueryByAnonymous:i(a,"allowAnonymousToQuery",!0),supportsQueryByOthers:i(a,"allowOthersToQuery",!0),supportsQueryGeometry:i(t,"supportsReturningQueryGeometry",!1),supportsResultType:i(r,"supportsQueryWithResultType",!1),supportsReturnMesh:!!p(t.infoFor3D),supportsSpatialAggregationStatistics:i(r,"supportsSpatialAggregationStatistics",!1),supportsSqlExpression:i(r,"supportsSqlExpression",!1),supportsStandardizedQueriesOnly:i(t,"useStandardizedQueries",!1),supportsStatistics:i(r,"supportsStatistics",t.supportsStatistics),supportsTopFeaturesQuery:i(r,"supportsTopFeaturesQuery",!1),supportsTrueCurve:i(r,"supportsTrueCurve",!1),tileMaxRecordCount:u(t,"tileMaxRecordCount",void 0)}}function S(t){const e=t.advancedQueryCapabilities,s=i(e,"supportsAdvancedQueryRelated",!1);return{supportsPagination:i(e,"supportsQueryRelatedPagination",!1),supportsCount:s,supportsOrderBy:s,supportsCacheHint:d(e,"queryRelated")}}function T(t){return{supportsCacheHint:d(t.advancedQueryCapabilities,"queryTopFilter")}}function x(t){const e=t?t.queryBinsCapabilities:void 0;return{supportsDate:i(e,"supportsDateBin",!1),supportsFixedInterval:i(e,"supportsFixedIntervalBin",!1),supportsAutoInterval:i(e,"supportsAutoIntervalBin",!1),supportsFixedBoundaries:i(e,"supportsFixedBoundariesBin",!1),supportsStackBy:i(e,"supportsStackBy",!1),supportsSplitBy:i(e,"supportsSplitBy",!1),supportsSnapToData:i(e,"supportsSnapToData",!1),supportsReturnFullIntervalBin:i(e,"supportsReturnFullIntervalBin",!1),supportsFirstDayOfWeek:i(e,"supportsFirstDayOfWeek",!1),supportsNormalization:i(e,"supportsNormalization",!1),supportedStatistics:l(e),supportedNormalizationTypes:y(e)}}function F(t){const e=t.ownershipBasedAccessControlForFeatures,s=t?t.advancedEditingCapabilities:void 0;return{supportsGeometryUpdate:i(t,"allowGeometryUpdates",!0),supportsGlobalId:i(t,"supportsApplyEditsWithGlobalIds",!1),supportsReturnServiceEditsInSourceSpatialReference:i(t,"supportsReturnServiceEditsInSourceSR",!1),supportsRollbackOnFailure:i(t,"supportsRollbackOnFailureParameter",!1),supportsTrueCurveUpdate:i(t,"allowTrueCurvesUpdates",!0),supportsTrueCurveUpdateByTrueCurveClientsOnly:i(t,"onlyAllowTrueCurveUpdatesByTrueCurveClients",!0),supportsUpdateWithoutM:i(t,"allowUpdateWithoutMValues",!1),supportsUploadWithItemId:i(t,"supportsAttachmentsByUploadId",!1),supportsDeleteByAnonymous:i(e,"allowAnonymousToDelete",!0),supportsDeleteByOthers:i(e,"allowOthersToDelete",!0),supportsUpdateByAnonymous:i(e,"allowAnonymousToUpdate",!0),supportsUpdateByOthers:i(e,"allowOthersToUpdate",!0),supportsAsyncApplyEdits:i(s,"supportsAsyncApplyEdits",!1),zDefault:u(t,"zDefault",void 0)}}function R(s,r){const p=s.supportedCurveTypes??s.advancedQueryCapabilities?.supportedCurveTypes;return Array.isArray(p)?p.map(t=>e.fromJSON(t)).filter(t):r?n:[]}function B(t){return{operations:{supportsAppend:i(t,"supportsAppend",!1),supportsCoverageQuery:t?.playbackInfo?.klv["0601"]??!1,supportsExportClip:i(t,"supportsExportClip",!1),supportsExportFrameset:i(t,"supportsExportFrameset",!1),supportsMensuration:i(t,"supportsMensuration",!1),supportsPreviews:i(t,"supportsPreviews",!1),supportsUpdate:i(t,"supportsUpdate",!1)}}}export{n as allCurveTypes,C as getFeatureLayerCapabilities,B as getVideoLayerCapabilities};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcgis/core",
|
|
3
|
-
"version": "5.1.0-next.
|
|
3
|
+
"version": "5.1.0-next.54",
|
|
4
4
|
"homepage": "https://js.arcgis.com",
|
|
5
5
|
"description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
|
|
6
6
|
"keywords": [
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@amcharts/amcharts5": "~5.16.2",
|
|
22
|
-
"@arcgis/toolkit": "^5.1.0-next.
|
|
22
|
+
"@arcgis/toolkit": "^5.1.0-next.54",
|
|
23
23
|
"@esri/arcgis-html-sanitizer": "~4.1.0",
|
|
24
24
|
"@esri/calcite-components": "^5.0.2",
|
|
25
|
-
"@vaadin/grid": "~25.0
|
|
25
|
+
"@vaadin/grid": "~25.1.0",
|
|
26
26
|
"@zip.js/zip.js": "~2.8.23",
|
|
27
27
|
"luxon": "~3.7.2",
|
|
28
28
|
"marked": "~17.0.5",
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{getAssetUrl as e}from"../../../assets.js";import has from"../../../core/has.js";const t="esri/rest/knowledgeGraph/wasmInterface/";let s,r;async function
|
|
2
|
+
import{getAssetUrl as e}from"../../../assets.js";import has from"../../../core/has.js";const t="esri/rest/knowledgeGraph/wasmInterface/";let s,r;async function o(){const e=s??r;if(e)return e;const t=!!has("wasm-simd");return r=n(t),r}async function n(s){if(s){const{default:s}=await import("../../../chunks/arcgis-knowledge-client-core-simd.js");return s({locateFile:s=>e(t+s)})}const{default:r}=await import("../../../chunks/arcgis-knowledge-client-core.js");return r({locateFile:s=>e(t+s)})}const c={setWasmInterfacePromise:e=>s=e,restoreWasmInterfacePromise:()=>s=void 0};export{n as getNewInterface,o as getWasmInterface,c as test};
|
package/support/revision.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
const e="
|
|
2
|
+
const e="20260327",b="c8e2e993045e10cfa2ebe09b2b749173940688db";export{e as buildDate,b as commitHash};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{parseWhereClause as e}from"../../core/sql.js";import{load as r,project as t}from"../../geometry/projectionUtils.js";import o from"../../geometry/SpatialReference.js";import{e as s}from"../../chunks/containsOperator.js";import{e as n}from"../../chunks/crossesOperator.js";import{e as
|
|
2
|
+
import{parseWhereClause as e}from"../../core/sql.js";import{load as r,project as t}from"../../geometry/projectionUtils.js";import o from"../../geometry/SpatialReference.js";import{e as s}from"../../chunks/containsOperator.js";import{e as n}from"../../chunks/crossesOperator.js";import{e as a}from"../../chunks/generalizeOperator.js";import{e as m,a as i}from"../../chunks/intersectsOperator.js";import{e as c}from"../../chunks/overlapsOperator.js";import{e as p}from"../../chunks/touchesOperator.js";import{e as u}from"../../chunks/withinOperator.js";import{getGeometryExtent as f}from"../../geometry/support/extentUtils.js";import{fromJSON as y}from"../../geometry/support/jsonUtils.js";import{quantizeGeometry as j}from"../../geometry/support/quantizationUtils.js";import{isGeographic as G,equals as l}from"../../geometry/support/spatialReferenceUtils.js";import{densifyCurvedGeometry as g}from"../../geometry/support/curves/densifyCurvedGeometry.js";import h from"../../layers/support/FieldsIndex.js";function k(){const k=new WeakMap,O=new WeakMap;function d(e,r){const t=k.get(e);if(t)return t;const s=y(e);return s.spatialReference=r instanceof o?r:o.fromJSON(r),k.set(e,s),i(s),s}function v(e,r,t){return!e||l(r,t)?e:b(e,r,t)?.toJSON()}function b(e,r,s){if(!e)return;const n=O.get(e);if(n&&l(n.spatialReference,s))return n.geometry;const a=!l(r,s),m=a?t(d(e,r),o.fromJSON(s),{zConversionDisabled:!0}):d(e,r);return a&&i(m),O.set(e,{spatialReference:s,geometry:m}),m}function w(e,r,t,o){return{aGeometry:d(e,r),bGeometry:b(t,o,r)}}return{sql:{async createTestFeature(r,t){const o=await e(r,new h(t));return e=>o.testFeature(e)}},projection:{load:r,project:v},geometry:{isGeographic:G,quantize:(e,r)=>j(e,r),operations:{intersects(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return m(s,n)},contains(e,r,t,o){const{aGeometry:n,bGeometry:a}=w(e,r,t,o);return s(n,a)},overlaps(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return c(s,n)},crosses(e,r,t,o){const{aGeometry:s,bGeometry:a}=w(e,r,t,o);return n(s,a)},touches(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return p(s,n)},within(e,r,t,o){const{aGeometry:s,bGeometry:n}=w(e,r,t,o);return u(s,n)},generalize(e,r,t,o){const s=a(d(e,r),t,{removeDegenerateParts:o});return s?.toJSON()},densifyCurves:e=>g(e)},extentFromGeometry:e=>f(e),extentFromGLB:async(e,r,t,o)=>{const{extentFromGLB:s}=await import("./setupServiceMocksMesh.js");return s(e,r,t,o)},nodeDataFromGLB:async(e,r,t,o)=>{const{nodeDataFromGLB:s}=await import("./setupServiceMocksMesh.js");return s(e,r,t,o)}}}}export{k as getServiceMockDependencies};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"./
|
|
2
|
+
import{isForeverZero as e,getEndValue as t}from"./animatedValues.js";import s from"../webgl/WGLContainer.js";import{Techniques as r}from"../webgl/shaderGraph/techniques/TechniqueRegistry.js";class a extends s{constructor(){super(...arguments),this.flowStyle=null}renderChildren(e){if(super.renderChildren(e),this.visible&&1===e.drawPhase)for(const t of this.children)this._renderDisplayObject(e,t)}_renderDisplayObject(s,a){const{requestRender:i}=s,n=[];for(const o of a.items){o.attached||(o.resources.attach({context:s.context}),o.attached=!0);const d=s.time/1e3;(s.animationsEnabled?e(o.displayOpacity,d)||d>o.endTime+o.style.slideoutDuration:0===t(o.displayOpacity))?o.attached&&(o.resources.detach(),o.attached=!1):(n.push(o),a.updateMatrix(s.state,o.resources.query),r.flow.render(s,{item:o,dvsMat3:a.transforms.displayViewScreenMat3}),o.style.animated&&null!=i&&s.animationsEnabled&&i())}a.items.splice(0,a.items.length,...n)}}export{a as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{isAbortError as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../core/Accessor.js";import i from"../../../../core/Logger.js";import{deg2rad as o}from"../../../../core/mathUtils.js";import{isAbortError as s}from"../../../../core/promiseUtils.js";import{property as r,subclass as n}from"../../../../core/accessorSupport/decorators.js";import a from"../../../../geometry/Extent.js";import l from"../../../../geometry/Point.js";import{fadeToZero as m,animate as p}from"./animatedValues.js";import{FlowDisplayObject as u}from"./FlowDisplayObject.js";import{ProcessingTimeEstimate as c}from"./ProcessingTimeEstimate.js";import{longSafetyTime as d,shortMarginTime as h}from"./utils.js";const f=1.15,y=1;let g=class extends e{constructor(t){super(t),this._flowDisplayObject=new u,this._loading=null,this._processingTimeEstimate=new c,this._animationsEnabled=!0}initialize(){this.flowContainer.addChild(this._flowDisplayObject)}destroy(){this._clear(),this.flowContainer.removeAllChildren()}get updating(){return null!=this._loading}update(t,e=!0){this._animationsEnabled!==e&&(this._animationsEnabled=e,this._clear());const{flowStyle:o}=this.flowContainer;if(null==o)return void this._clear();const{extent:r,rotation:n,resolution:a,pixelRatio:l}=t.state,u=x(r,n);u.expand(f);const c=[Math.round((u.xmax-u.xmin)/a),Math.round((u.ymax-u.ymin)/a)],g=performance.now()/1e3,_={extent:u,size:c,pixelRatio:l,time:e?g+this._processingTimeEstimate.getSafeTime():0},w=new AbortController,{items:b}=this._flowDisplayObject,C=b.at(-1);if(C&&this._fastUpdate(C.style,C.resources.query,o,_))return C.style=o,void(this._loading&&(this._loading.abortController.abort(),this._loading=null));if(this._loading&&this._fastUpdate(this._loading.flowStyle,this._loading.query,o,_))return void(this._loading.flowStyle=o);const{canContinue:j,previousItem:v}=e?this._previousItemPrevious(C,o,_):{canContinue:!1,previousItem:C},O=o.load(_,j?v.resources:null,w.signal).then(t=>{const i=performance.now()/1e3,s=i-g;if(this._processingTimeEstimate.addSample(s),j){for(const e of b)e.endTime=t.query.time;b.push({attached:!1,startTime:t.query.time,endTime:t.query.time+d,displayOpacity:1,resources:t,style:o})}else if(e){for(const t of b)t.displayOpacity=m(t.displayOpacity,y,i);b.push({attached:!1,startTime:i-h,endTime:i+d,displayOpacity:p(i,0,i+y,1),resources:t,style:o})}else this._flowDisplayObject.clear(),b.push({attached:!1,startTime:0,endTime:d,displayOpacity:1,resources:t,style:o});this._flowDisplayObject.requestRender(),this._loading=null},t=>{s(t)||i.getLogger(this).error("A resource failed to load.",t)});this._loading?.abortController.abort(),this._loading={abortController:w,promise:O,query:_,flowStyle:o}}_fastUpdate(t,e,i,o){if(!t.isCompatible(i))return!1;return!(!e.extent.equals(o.extent)||e.size[0]!==o.size[0]||e.size[1]!==o.size[1]||e.pixelRatio!==o.pixelRatio)}_previousItemPrevious(t,e,i){if(!t)return{canContinue:!1,previousItem:t};if(!t.style.supportsContinuation)return{canContinue:!1,previousItem:t};if(!e.supportsContinuation)return{canContinue:!1,previousItem:t};const o=Math.abs(t.resources.query.extent.width-i.extent.width)/i.extent.width,s=Math.abs(t.resources.query.extent.height-i.extent.height)/i.extent.height;return o>.1||s>.1?{canContinue:!1,previousItem:t}:{canContinue:!0,previousItem:t}}_clear(){this._flowDisplayObject.clear(),null!=this._loading&&(this._loading.abortController.abort(),this._loading=null)}};function x(t,e){const i=new l({x:(t.xmax+t.xmin)/2,y:(t.ymax+t.ymin)/2,spatialReference:t.spatialReference}),s=t.xmax-t.xmin,r=t.ymax-t.ymin,n=Math.abs(Math.cos(o(e))),m=Math.abs(Math.sin(o(e))),p=n*s+m*r,u=m*s+n*r,c=new a({xmin:i.x-p/2,ymin:i.y-u/2,xmax:i.x+p/2,ymax:i.y+u/2,spatialReference:t.spatialReference});return c.centerAt(i),c}t([r()],g.prototype,"_loading",void 0),t([r()],g.prototype,"flowContainer",void 0),t([r()],g.prototype,"updating",null),g=t([n("esri.views.2d.engine.flow.FlowStrategy")],g);export{g as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{__decorate as t}from"tslib";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{property as r,subclass as
|
|
2
|
+
import{__decorate as t}from"tslib";import e from"../../../../Graphic.js";import i from"../../../../core/Accessor.js";import{watch as o}from"../../../../core/reactiveUtils.js";import{property as r,subclass as a}from"../../../../core/accessorSupport/decorators.js";import s from"./createFlowStyle.js";import n from"./FlowContainer.js";import l from"./FlowStrategy.js";import{loadImagery as d}from"../../../support/flow/dataUtils.js";let h=class extends i{constructor(){super(...arguments),this._loadImagery=(t,e,i,o,r)=>d(this.layer,t,e,i,o,r),this._createFlowMesh=(t,e,i,o,r)=>this.layer.createFlowMesh({meshType:t,flowData:i,simulationSettings:e,startInfo:o},{signal:r}),this.attached=!1,this.type="flow",this.timeExtent=null,this.redrawOrRefetch=async()=>{this._updateVisualization()}}get updating(){return!this.attached||this._strategy.updating}attach(){const{layer:t}=this,e=()=>{this._loadImagery=(e,i,o,r,a)=>d(t,e,i,o,r,a),this._updateVisualization()};"multidimensionalDefinition"in t?this.addHandles(o(()=>t.multidimensionalDefinition,e)):this.addHandles([o(()=>t.mosaicRule,e),o(()=>t.rasterFunction,e),o(()=>t.definitionExpression,e)]),this.addHandles(o(()=>this.layerView.view.animationsEnabled,()=>this.layerView.requestUpdate())),this.container=new n,this._strategy=new l({flowContainer:this.container}),this._updateVisualization()}detach(){this._strategy.destroy(),this.container?.removeAllChildren(),this.container=null,this.removeHandles()}update(t){t.stationary?this._strategy.update(t,this.layerView.view.animationsEnabled):this.layerView.requestUpdate()}hitTest(t){return new e({attributes:{},geometry:t.clone(),layer:this.layer})}moveEnd(){}async doRefresh(){}_updateVisualization(){const t=this.layer.renderer;if(null==t||"flow"!==t.type)return;const e=s(t,{loadImagery:this._loadImagery,createFlowMesh:this._createFlowMesh,timeExtent:this.timeExtent});this.container.flowStyle=e,this.layerView.requestUpdate()}};t([r()],h.prototype,"_strategy",void 0),t([r()],h.prototype,"attached",void 0),t([r()],h.prototype,"container",void 0),t([r()],h.prototype,"layer",void 0),t([r()],h.prototype,"layerView",void 0),t([r()],h.prototype,"scheduler",void 0),t([r()],h.prototype,"type",void 0),t([r()],h.prototype,"updating",null),t([r()],h.prototype,"timeExtent",void 0),h=t([a("esri.views.2d.engine.flow.FlowView2D")],h);export{h as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import{serializeFlowPaths as e}from"./flowPathsIO.js";import{
|
|
2
|
+
import has from"../../../../core/has.js";import t from"../../../../core/Logger.js";import{throwIfAborted as n}from"../../../../core/promiseUtils.js";import{serializeFlowPaths as e}from"./flowPathsIO.js";import{flowParticleTypes as r,flowParticleVertexIds as o}from"./particleConstants.js";import{applyMask as l,createFlowFieldFromData as s,traceFlowPaths as i}from"../../../support/flow/dataUtils.js";const c=()=>t.getLogger("esri.views.2d.engine.flow.dataUtils"),a=10;async function u(t,e,r,o,u){const m=performance.now();l(r);const h=f(s(e,r),e),d=performance.now(),x=i(e,h,r.width,r.height,o),M=performance.now(),g=p(x),D=performance.now(),b="Streamlines"===t?w(g,a,x):V(g,x),y=performance.now();return has("esri-2d-profiler")&&(c().info("I.1","_createFlowFieldFromData (ms)",Math.round(d-m)),c().info("I.2","_getStreamlines (ms)",Math.round(M-d)),c().info("I.3","createAnimatedLinesData (ms)",Math.round(D-M)),c().info("I.4","create{Streamlines|Particles}Mesh (ms)",Math.round(y-D)),c().info("I.5","createFlowMesh (ms)",Math.round(y-m)),c().info("I.6","Mesh size (bytes)",b.vertexData.buffer.byteLength+b.indexData.buffer.byteLength)),await Promise.resolve(),n(u),b}function f(t,n){const{perturb:e}=n;if(e){const{rotation:n}=e;null!=n&&(t=m(t,n));const{scale:r}=e;null!=r&&(t=h(t,r))}return t}function m(t,n){const e=Math.cos(n),r=Math.sin(n);return(n,o)=>{const[l,s]=t(n,o);return[e*l+r*s,-r*l+e*s]}}function h(t,n){return(e,r)=>{const[o,l]=t(e,r);return[o*n,l*n]}}function p(t){const n=t.reduce((t,n)=>t+n.vertices.length,0),e=new Float32Array(4*n),r=new Array(t.length);let o=0,l=0;for(const{vertices:s}of t){const t=o;for(const n of s)e[4*o]=n.x,e[4*o+1]=n.y,e[4*o+2]=n.time,e[4*o+3]=n.speed,o++;r[l++]={startVertex:t,numberOfVertices:s.length,firstTime:s[0].time,lastTime:s[s.length-1].time}}return{lineVertices:e,lineDescriptors:r}}function w(t,n,r){const o=9,{lineVertices:l,lineDescriptors:s}=t;let i=0,c=0;for(const e of s){i+=2*e.numberOfVertices;c+=6*(e.numberOfVertices-1)}const a=new Float32Array(i*o),u=new Uint32Array(c);let f=0,m=0;function h(){u[m++]=f-2,u[m++]=f,u[m++]=f-1,u[m++]=f,u[m++]=f+1,u[m++]=f-1}function p(t,n,e,r,l,s,i,c){const u=f*o;let m=0;a[u+m++]=t,a[u+m++]=n,a[u+m++]=1,a[u+m++]=e,a[u+m++]=s,a[u+m++]=i,a[u+m++]=r/2,a[u+m++]=l/2,a[u+m++]=c,f++,a[u+m++]=t,a[u+m++]=n,a[u+m++]=-1,a[u+m++]=e,a[u+m++]=s,a[u+m++]=i,a[u+m++]=-r/2,a[u+m++]=-l/2,a[u+m++]=c,f++}for(const e of s){const{firstTime:t,lastTime:r}=e;let o=null,s=null,i=null,c=null,a=null,u=null;for(let f=0;f<e.numberOfVertices;f++){const m=l[4*(e.startVertex+f)],w=l[4*(e.startVertex+f)+1],V=l[4*(e.startVertex+f)+2],d=l[4*(e.startVertex+f)+3];let x=null,M=null,g=null,D=null;if(f>0){x=m-o,M=w-s;const e=Math.sqrt(x*x+M*M);if(x/=e,M/=e,f>1){let t=x+a,e=M+u;const r=Math.sqrt(t*t+e*e);t/=r,e/=r;const o=Math.min(1/(t*x+e*M),n);t*=o,e*=o,g=-e,D=t}else g=-M,D=x;null!==g&&null!==D&&(p(o,s,i,g,D,t,r,d),h())}o=m,s=w,i=V,a=x,u=M,c=d}p(o,s,i,-u,a,t,r,c)}const w=e(r);return{vertexData:a,indexData:u,pathData:w}}function V(t,n){const l=16,{lineVertices:s,lineDescriptors:i}=t;let c=0,a=0;for(const e of i){const t=e.numberOfVertices-1;c+=4*t*2,a+=6*t*2}const u=new Float32Array(c*l),f=new Uint32Array(a);let m,h,p,w,V,d,x,M,g,D,b,y,v,A,F=0,I=0;function O(){f[I++]=F-8,f[I++]=F-7,f[I++]=F-6,f[I++]=F-7,f[I++]=F-5,f[I++]=F-6,f[I++]=F-4,f[I++]=F-3,f[I++]=F-2,f[I++]=F-3,f[I++]=F-1,f[I++]=F-2}function j(t,n,e,s,i,c,a,f,m,h,p,w,V,d){const x=F*l;let M=0;for(const l of r)for(const r of o)u[x+M++]=t,u[x+M++]=n,u[x+M++]=e,u[x+M++]=s,u[x+M++]=a,u[x+M++]=f,u[x+M++]=m,u[x+M++]=h,u[x+M++]=l,u[x+M++]=r,u[x+M++]=V,u[x+M++]=d,u[x+M++]=i/2,u[x+M++]=c/2,u[x+M++]=p/2,u[x+M++]=w/2,F++}function T(t,n){let e=g+b,r=D+y;const o=Math.sqrt(e*e+r*r);e/=o,r/=o;const l=g*e+D*r;e/=l,r/=l;let s=b+v,i=y+A;const c=Math.sqrt(s*s+i*i);s/=c,i/=c;const a=b*s+y*i;s/=a,i/=a,j(m,h,p,w,-r,e,V,d,x,M,-i,s,t,n),O()}function q(t,n,e,r,o,l){if(g=b,D=y,b=v,y=A,null==g&&null==D&&(g=b,D=y),null!=V&&null!=d){v=t-V,A=n-d;const e=Math.sqrt(v*v+A*A);v/=e,A/=e}null!=g&&null!=D&&T(o,l),m=V,h=d,p=x,w=M,V=t,d=n,x=e,M=r}function L(t,n){g=b,D=y,b=v,y=A,null==g&&null==D&&(g=b,D=y),null!=g&&null!=D&&T(t,n)}for(const e of i){m=null,h=null,p=null,w=null,V=null,d=null,x=null,M=null,g=null,D=null,b=null,y=null,v=null,A=null;const{firstTime:t,lastTime:n}=e;for(let r=0;r<e.numberOfVertices;r++){q(s[4*(e.startVertex+r)],s[4*(e.startVertex+r)+1],s[4*(e.startVertex+r)+2],s[4*(e.startVertex+r)+3],t,n)}L(t,n)}const U=e(n);return{vertexData:u,indexData:f,pathData:U}}export{p as createAnimatedLinesData,u as createFlowMesh,V as createParticlesMesh,w as createStreamlinesMesh};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as
|
|
2
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{timeExtentsEqual as a,getFlowFloatUniforms as s,getFlowColorUniforms as e}from"../utils.js";import{AFlowResources as i}from"./AFlowResources.js";import{Mesh as r}from"../../webgl/meshing/Mesh.js";import{FlowImageryShader as o}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowImageryShader.js";import{PrimitiveType as m,DataType as n}from"../../../../webgl/enums.js";import l from"../../../../webgl/Texture.js";import{TextureDescriptor as h}from"../../../../webgl/TextureDescriptor.js";import{VertexElementDescriptor as p}from"../../../../webgl/VertexElementDescriptor.js";class c{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0,this.animated=!1}isCompatible(t){if(!(t instanceof c))return!1;if(!a(this._params.timeExtent,t._params.timeExtent))return!1;let s=!0;return s=s&&this._params.loadImagery===t._params.loadImagery,s=s&&this._params.color.kind===t._params.color.kind,s=s&&this._params.opacity.kind===t._params.opacity.kind,s}async load(a,s,e){const{extent:i,size:r}=a;t(e);const o=await this._params.loadImagery(i,r[0],r[1],this._params.timeExtent,e);return new u(o,a,[],{color:this._params.color,opacity:this._params.opacity})}}const d=[new p("position",2,n.UNSIGNED_SHORT,0,8),new p("texcoord",2,n.UNSIGNED_SHORT,4,8)];class u extends i{static{this._shader=new o}constructor(t,a,s,e){super(a,s),this._flowData=t,this._values=e,this.kind="imagery"}attach(t){const{context:a}=t,{width:s,height:e}=this._flowData;this.mesh=new r(a,{vertex:{geometry:{data:new Uint16Array([0,0,0,1,s,0,1,1,0,e,0,0,s,e,1,0]),layout:d}},groups:[{primitive:m.TRIANGLE_STRIP}],parts:[{group:0,start:0,count:4}]});let i=1e6,o=-1e6;for(let r=0;r<e;r++)for(let t=0;t<s;t++)if(0!==this._flowData.mask[r*s+t]){const a=this._flowData.data[2*(r*s+t)],e=this._flowData.data[2*(r*s+t)+1],m=Math.sqrt(a*a+e*e);i=Math.min(i,m),o=Math.max(o,m)}const n=new Uint8Array(4*s*e);for(let r=0;r<e;r++)for(let t=0;t<s;t++)if(0!==this._flowData.mask[r*s+t]){const a=this._flowData.data[2*(r*s+t)],e=this._flowData.data[2*(r*s+t)+1],m=(Math.sqrt(a*a+e*e)-i)/(o-i);n[4*(r*s+t)]=255*m,n[4*(r*s+t)+1]=0,n[4*(r*s+t)+2]=0,n[4*(r*s+t)+3]=255}else n[4*(r*s+t)]=0,n[4*(r*s+t)+1]=0,n[4*(r*s+t)+2]=0,n[4*(r*s+t)+3]=0;const p=new h(s,e);p.internalFormat=6408,p.wrapMode=33071,p.flipped=!0;const c=new l(a,p,n);this.texture=c,this.min=i,this.max=o,this._flowData=null}detach(){this.mesh.destroy(),this.texture.dispose()}get ready(){return!0}getProgramSpec(t){return{shader:u._shader,uniforms:{state:{time:t.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{texture:{texture:this.texture,unit:0},min:this.min,max:this.max},color:e(this._values.color),opacity:s(this._values.opacity)},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind},optionalAttributes:null}}}export{c as Imagery,u as ImageryResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as
|
|
2
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as s}from"../flowPathsIO.js";import{areStreamlinesCompatible as e,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowParticlesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowParticlesShader.js";import{getPositions as p}from"../../../../support/flow/utils.js";import{PrimitiveType as m,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&e(this._params,t._params)}async load(e,a,i){const{extent:r,size:o}=e;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),m=a&&this._params.simulationSettings.continuous?p(a.flowPaths,a.query,e,this._params.flowSpeed):[],{vertexData:h,indexData:l,pathData:d}=await this._params.createFlowMesh("Particles",this._params.simulationSettings,n,{positions:m},i),c=s(d);return new u(h,l,e,c,{color:this._params.color,opacity:this._params.opacity,size:this._params.size},this._params)}}const c=[new l("xyts0",4,h.FLOAT,0,64),new l("xyts1",4,h.FLOAT,16,64),new l("typeIdFirstTimeLastTime",4,h.FLOAT,32,64),new l("extrudeInfo",4,h.FLOAT,48,64)];class u extends r{static{this._shader=new n}constructor(t,s,e,a,i,r){super(e,a),this._vertexData=t,this._indexData=s,this._values=i,this._params=r,this.kind="particles"}attach(t){const{context:s}=t;this.mesh=new o(s,{vertex:{geometry:{data:this._vertexData,layout:c}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:m.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}getProgramSpec(t){return{shader:u._shader,uniforms:{state:{time:t.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime,endTime:t.endTime},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:a(this._values.opacity),size:a(this._values.size)},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as Particles,u as ParticlesResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{AFlowResources as
|
|
2
|
+
import{AFlowResources as t}from"./AFlowResources.js";class s{constructor(t){this._styles=t,this.supportsContinuation=!1,this.slideoutDuration=0}get animated(){return this._styles.reduce((t,s)=>t||s.animated,!1)}isCompatible(t){if(!(t instanceof s))return!1;if(this._styles.length!==t._styles.length)return!1;const e=this._styles.length;for(let s=0;s<e;s++)if(!this._styles[s].isCompatible(t._styles[s]))return!1;return!0}async load(t,s,r){const o=await Promise.all(this._styles.map(s=>s.load(t,null,r)));return new e(o,t,[])}}class e extends t{constructor(t,s,e){super(s,e),this.resources=t,this.kind="stack"}attach(t){for(const s of this.resources)s.attach(t)}detach(){for(const t of this.resources)t.detach()}get ready(){return this.resources.reduce((t,s)=>t&&s.ready,!0)}}export{s as Stack,e as StackResources};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,
|
|
2
|
+
import{throwIfAborted as t}from"../../../../../core/promiseUtils.js";import{deserializeFlowPaths as e}from"../flowPathsIO.js";import{areStreamlinesCompatible as s,getFlowFloatUniforms as a,getFlowColorUniforms as i}from"../utils.js";import{AFlowResources as r}from"./AFlowResources.js";import{Mesh as o}from"../../webgl/meshing/Mesh.js";import{FlowStreamlinesShader as n}from"../../webgl/shaderGraph/techniques/shaders/flow/FlowStreamlinesShader.js";import{getPositions as m}from"../../../../support/flow/utils.js";import{PrimitiveType as p,DataType as h}from"../../../../webgl/enums.js";import{VertexElementDescriptor as l}from"../../../../webgl/VertexElementDescriptor.js";class d{constructor(t){this._params=t,this.supportsContinuation=!1,this.slideoutDuration=20}get animated(){return this._params.flowSpeed>0}isCompatible(t){return t instanceof d&&s(this._params,t._params)}async load(s,a,i){const{extent:r,size:o}=s;t(i);const n=await this._params.loadImagery(r,o[0],o[1],this._params.timeExtent,i),p=a&&this._params.simulationSettings.continuous?m(a.flowPaths,a.query,s,this._params.flowSpeed):[],{vertexData:h,indexData:l,pathData:d}=await this._params.createFlowMesh("Streamlines",this._params.simulationSettings,n,{positions:p},i),u=e(d);return new c(h,l,s,u,{color:this._params.color,opacity:this._params.opacity,size:this._params.size},this._params)}}const u=[new l("positionAndSide",3,h.FLOAT,0,36),new l("timeInfo",3,h.FLOAT,12,36),new l("extrude",2,h.FLOAT,24,36),new l("speed",1,h.FLOAT,32,36)];class c extends r{static{this._shader=new n}constructor(t,e,s,a,i,r){super(s,a),this._vertexData=t,this._indexData=e,this._values=i,this._params=r,this.kind="streamlines"}attach(t){const{context:e}=t;this.mesh=new o(e,{vertex:{geometry:{data:this._vertexData,layout:u}},index:{indices:{data:this._indexData}},groups:[{index:"indices",primitive:p.TRIANGLES}],parts:[{group:0,start:0,count:this._indexData.length}]}),this._vertexData=null,this._indexData=null}detach(){this.mesh.destroy()}get ready(){return!0}getProgramSpec(t){return{shader:c._shader,uniforms:{state:{time:t.time-this.query.time,dvsMat3:t.dvsMat3,displayViewMat3:t.displayViewMat3,displayOpacity:t.displayOpacity,startTime:t.startTime-this.query.time,endTime:t.endTime-this.query.time},config:{trailLength:this._params.trailLength,flowSpeed:this._params.flowSpeed,featheringSize:this._params.featheringSize,featheringOffset:this._params.featheringOffset,introFade:this._params.introFade?1:0,fadeToZero:this._params.fadeToZero?1:0,decayRate:this._params.decayRate},color:i(this._values.color),opacity:a(this._values.opacity),size:a(this._values.size)},defines:{vvColor:"ramp"===this._values.color.kind,vvOpacity:"ramp"===this._values.opacity.kind,vvSize:"ramp"===this._values.size.kind},optionalAttributes:null}}}export{d as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{simulationSettingsEqual as t}from"../../../support/flow/utils.js";function
|
|
2
|
+
import{simulationSettingsEqual as t}from"../../../support/flow/utils.js";function n(t){const n=t.toRgba();return[n[0]/255,n[1]/255,n[2]/255,n[3]]}function o(t){return{kind:"constant",value:[.1,.1,.1,1]}}function s(t){if(!t.hasVisualVariables("color"))return{kind:"constant",value:n(t.color)};const o=t.getVisualVariablesForType("color")[0],s=[],e=[];for(const a of o.stops)s.push(a.value),Array.prototype.push.apply(e,n(a.color));return{kind:"ramp",stops:s,values:e,count:o.stops.length}}function e(t){if(!t.hasVisualVariables("opacity"))return{kind:"constant",value:[1]};const n=t.getVisualVariablesForType("opacity")[0],o=[],s=[];for(const e of n.stops)o.push(e.value),s.push(e.opacity);return{kind:"ramp",stops:o,values:s,count:n.stops.length}}const a=8;function r(t){if("constant"===t.kind)return{constant:t.value,count:1,stops:new Array(a).fill(0),values:new Array(a).fill(t.value)};const n=Math.min(t.count,a),o=new Array(a).fill(t.stops[n-1]),s=new Array(a).fill(null).map((o,s)=>{const e=4*Math.min(s,n-1);return t.values.slice(e,e+4)});for(let e=0;e<n;e++)o[e]=t.stops[e];return{constant:[0,0,0,0],count:n,stops:o,values:s}}function i(t){if("constant"===t.kind)return{constant:t.value[0],count:1,stops:new Array(a).fill(0),values:new Array(a).fill(t.value[0])};const n=Math.min(t.count,a),o=new Array(a).fill(t.stops[n-1]),s=new Array(a).fill(t.values[n-1]);for(let e=0;e<n;e++)o[e]=t.stops[e],s[e]=t.values[e];return{constant:0,count:n,stops:o,values:s}}function u(t,n,o,s){switch(n){case"int":t.setUniform1iv(o,s);break;case"float":t.setUniform1fv(o,s);break;case"vec2":t.setUniform2fv(o,s);break;case"vec3":t.setUniform3fv(o,s);break;case"vec4":t.setUniform4fv(o,s)}}function l(t,n,o,s){"constant"===s.kind?u(t,o,`u_${n}`,s.value):(u(t,"float",`u_${n}_stops`,s.stops),u(t,o,`u_${n}_values`,s.values),t.setUniform1i(`u_${n}_count`,s.count))}function c(t,n){return t===n||null!=t&&null!=n&&t.equals(n)}function f(n,o){if(!t(n.simulationSettings,o.simulationSettings))return!1;if(!c(n.timeExtent,o.timeExtent))return!1;let s=!0;return s=s&&n.loadImagery===o.loadImagery,s=s&&n.createFlowMesh===o.createFlowMesh,s=s&&n.color.kind===o.color.kind,s=s&&n.opacity.kind===o.opacity.kind,s=s&&n.size.kind===o.size.kind,s}const p=36e5,v=3600;export{f as areStreamlinesCompatible,s as getColor,r as getFlowColorUniforms,i as getFlowFloatUniforms,o as getForegroundColor,e as getOpacity,p as longSafetyTime,u as setUniform,l as setUniforms,v as shortMarginTime,c as timeExtentsEqual,n as toRgba};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../webgl/WGLContainer.js";import{VectorFieldTechnique as
|
|
2
|
+
import e from"../webgl/WGLContainer.js";import{VectorFieldTechnique as s}from"../webgl/shaderGraph/techniques/raster/VectorFieldTechnique.js";class t extends e{constructor(){super(...arguments),this.symbolTypes=["triangle"]}onAttach(){super.onAttach(),this._vectorFieldTechnique=new s}onDetach(){super.onDetach(),this._vectorFieldTechnique?.shutdown(),this._vectorFieldTechnique=void 0}doRender(e){this.visible&&1===e.drawPhase&&this.symbolTypes.forEach(s=>{e.renderPass=s,super.doRender(e);const t=this.children.map(e=>e);this._vectorFieldTechnique.render(e,{tiles:t})})}}export{t as RasterVFContainer};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as t}from"../../../../core/maybe.js";import{
|
|
2
|
+
import"../../../../core/has.js";import{disposeMaybe as e,destroyMaybe as t}from"../../../../core/maybe.js";import{BitBlitRenderer as s}from"./BitBlitRenderer.js";import{backbufferStencilVisible as r}from"./definitions.js";import i from"./MaterialManager.js";import{RenderingDevice as n}from"./RenderingDevice.js";import o from"./TextureManager.js";import{TextureUploadManager as a}from"./TextureUploadManager.js";import{WorldExtentRenderer as f}from"./WorldExtentClipRenderer.js";import{BlendEffect as h}from"./effects/BlendEffect.js";import{FeatureEffect as l}from"./effects/FeatureEffect.js";import c from"./effects/HighlightEffect.js";import{HittestEffect as d}from"./effects/HittestEffect.js";import{EffectManager as u}from"./effects/post-processing/EffectManager.js";import{SimpleMesh as p}from"./meshing/SimpleMesh.js";import{SizedDepthStencilFormat as b}from"../../../webgl/enums.js";import{FramebufferObject as g}from"../../../webgl/FramebufferObject.js";import{Renderbuffer as _}from"../../../webgl/Renderbuffer.js";import{RenderbufferDescriptor as m}from"../../../webgl/RenderbufferDescriptor.js";import{TextureDescriptor as w}from"../../../webgl/TextureDescriptor.js";class M{constructor(e,t){this.context=e,this._blitRenderer=new s,this._worldExtentRenderer=new f,this._lastWidth=null,this._lastHeight=null,this._blendEffect=new h,this._stencilBuf=null,this._prevBeforeLayerFBOStack=[],this._fboPool=[],this.effects={highlight:new c,hittest:new d,insideEffect:new l("inside"),outsideEffect:new l("outside")},this.materialManager=new i(e),this.textureManager=new o(t),this.textureUploadManager=new a(t),this._effectsManager=new u,this._quadMesh=p.fromVertexStream(e,[0,0,1,0,0,1,1,1]),this._renderingDevice=new n}dispose(){if(this.materialManager.dispose(),this.textureManager.dispose(),this.textureUploadManager.destroy(),this._blitRenderer=e(this._blitRenderer),this._worldExtentRenderer=e(this._worldExtentRenderer),this._quadMesh=t(this._quadMesh),this._fbos){let e;for(e in this._fbos)this._fbos[e]&&this._fbos[e].dispose()}for(const e of this._fboPool)e.dispose();if(this._fboPool.length=0,this.effects){let e;for(e in this.effects)this.effects[e]&&this.effects[e].dispose()}this._effectsManager.dispose(),this._blendEffect.dispose(this.context),this._renderingDevice.dispose()}get blitRenderer(){return this._blitRenderer}get quadMesh(){return this._quadMesh}getFbos(){if(!this._fbos)throw new Error("InternalError: Painter FBOs not initialized");return this._fbos}acquireFbo(e,t){let s;if(this._fboPool.length>0)s=this._fboPool.pop();else{const r=new w(e,t);r.samplingMode=9728,r.wrapMode=33071,s=new g(this.context,r,this._stencilBuf)}return s.width===e&&s.height===t||s.resize(e,t),s}releaseFbo(e){this._fboPool.push(e)}getSharedStencilBuffer(){return this._stencilBuf}beforeRenderPhases(e,t,s){const{context:r}=e;this._worldExtentRenderer.render(e,t,s);const{width:i,height:n}=r.getViewport();if(this.updateFBOs(i,n),this._prevFBO=r.getBoundFramebufferObject(),r.bindFramebuffer(this.getFbos().output),r.setColorMask(!0,!0,!0,!0),null!=t){const{r:e,g:s,b:i,a:n}=t;r.setClearColor(n*e/255,n*s/255,n*i/255,n)}else r.setClearColor(0,0,0,0);r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}afterRenderPhases(e){const{context:t}=e;t.bindFramebuffer(this._prevFBO),t.setStencilFunction(514,r,255),t.setStencilTestEnabled(!0),t.setDepthTestEnabled(!1),this.blitTexture(t,this.getFbos().output.colorTexture,9728)}beforeRenderLayer(e,t,s){const{context:r,blendMode:i,effects:n,drawPhase:o,requireFBO:a}=e;if(r.setClearColor(0,0,0,0),a||E(o,i,n,s)){const e=r.getBoundFramebufferObject();this._prevBeforeLayerFBOStack.push(e);const{width:t,height:s}=r.getViewport(),i=this.acquireFbo(t,s);r.bindFramebuffer(i),r.setColorMask(!0,!0,!0,!0),r.setClearColor(0,0,0,0),r.setDepthWriteEnabled(!0),r.setClearDepth(1),r.clear(16640),r.setDepthWriteEnabled(!1)}r.setDepthWriteEnabled(!1),r.setDepthTestEnabled(!1),r.setStencilTestEnabled(!0),r.setClearStencil(t),r.setStencilWriteMask(255),r.clear(1024)}afterRenderLayer(e,t){const{context:s,blendMode:r,effects:i,requireFBO:n,drawPhase:o}=e;if(n||E(o,r,i,t)){const n=s.getBoundFramebufferObject();null!=i&&i.length>0&&1===o&&(s.setColorMask(!0,!0,!0,!0),this._applyEffects(e,i,n)),s.bindFramebuffer(this._prevBeforeLayerFBOStack.pop()),s.setStencilTestEnabled(!1),s.setStencilWriteMask(0),s.setBlendingEnabled(!0),s.setBlendFunctionSeparate(1,771,1,771),s.setColorMask(!0,!0,!0,!0);const a=null==r||16===o||2===o||128===o?"normal":r;this._blendEffect.draw(e,n.colorTexture,9728,a,t),this.releaseFbo(n)}}blitTexture(e,t,s,r=1){e.setBlendingEnabled(!0),e.setBlendFunctionSeparate(1,771,1,771),e.setColorMask(!0,!0,!0,!0),this._blitRenderer.render(e,t,s,r),this._renderingDevice.setPipelineStateNeedsUpdate(!0)}getPostProcessingEffects(e){return this._effectsManager.getPostProcessingEffects(e)}updateFBOs(e,t){if(e!==this._lastWidth||t!==this._lastHeight){if(this._lastWidth=e,this._lastHeight=t,this._fbos){let s;for(s in this._fbos)this._fbos[s].resize(e,t);return}const s=new w(e,t);s.samplingMode=9728,s.wrapMode=33071;const r=new m(b.DEPTH24_STENCIL8,e,t);this._stencilBuf=new _(this.context,r),this._fbos={output:new g(this.context,s,this._stencilBuf),effect0:new g(this.context,s,this._stencilBuf)}}}_applyEffects(e,t,s){const{context:r}=e,i=this._effectsManager.getPostProcessingEffects(t);for(const{postProcessingTechnique:n,effect:o}of i)r.bindFramebuffer(s),n.render(e,{layerFBO:s,effect:o});this._renderingDevice.setPipelineStateNeedsUpdate(!0)}setShader(e){return this._renderingDevice.setShader(e)}clearShaderCache(){this._renderingDevice.clearShaderCache()}getProgramCache(){return this._renderingDevice.getProgramCache()}setPipelineState(e){return this._renderingDevice.setPipelineState(e)}getPipelineState(){return this._renderingDevice.getPipelineState()}submitDraw(e,t,s){return this._renderingDevice.submitDraw(e,t,s)}submitDrawMesh(e,t,s,r){this._renderingDevice.submitDrawMesh(e,t,s,r)}submitDrawMeshUntyped(e,t,s,r){this._renderingDevice.submitDrawMeshUntyped(e,t,s,r)}updatePipelineState(e){return this._renderingDevice.updatePipelineState(e)}setStencilRef(e,t){return this._renderingDevice.setStencilRef(e,t)}}function E(e,t,s,r){return 4!==e&&2!==e&&16!==e&&128!==e&&(1!==r||null!=t&&"normal"!==t||null!=s&&s.length>0)}export{M as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import e from"../../../../core/CircularArray.js";import{EventEmitter as t}from"../../../../core/Evented.js";import has from"../../../../core/has.js";import{createDisjointTimerQuery as
|
|
2
|
+
import e from"../../../../core/CircularArray.js";import{EventEmitter as t}from"../../../../core/Evented.js";import has from"../../../../core/has.js";import{createDisjointTimerQuery as n}from"../../../webgl/capabilities/DisjointTimerQuery.js";const s=!!has("esri-2d-profiler");class i{constructor(i,o){if(this._events=new t,this._entries=new Map,this._timings=new e(10),this._currentContainer=null,!s)return;this._ext=n(i.gl,{}),this._debugOutput=o;const r=i.gl;if(!this.enableCommandLogging)return;let a;for(a in r)if("function"==typeof r[a]){const e=r[a],t=a.includes("draw");r[a]=(...n)=>(this._events.emit("command",{container:this._currentContainer,method:a,args:n,isDrawCommand:t}),e.apply(r,n))}}get enableCommandLogging(){return"object"==typeof s&&s.commandLogging}get enableTimeLogging(){return"object"==typeof s&&s.timeLogging}get lastTime(){return this._timings.peekLast()}recordContainerStart(e){s&&(this._currentContainer=e)}recordContainerEnd(){s&&(this._currentContainer=null)}recordStart(e){if(s&&null!=this._ext){if(this._entries.has(e)){const t=this._entries.get(e),n=this._ext.resultAvailable(t.query),s=this._ext.disjoint();if(n&&!s){const n=this._ext.getResult(t.query)/1e6;let s=0;if(null!=this._timings.enqueue(n)&&this.enableTimeLogging){const e=this._timings.entries,t=e.length;let n=0;for(const s of e)n+=s;s=n/t}const i=n.toFixed(2),o=s?s.toFixed(2):"--";this.enableCommandLogging?(this.enableTimeLogging?console.groupCollapsed(`Frame report for ${e}, ${i} ms (${o} last 10 avg)\n ${t.commandsLen} Commands (${t.drawCommands} draw)`):console.groupCollapsed(`Frame report for ${e}\n ${t.commandsLen} Commands (${t.drawCommands} draw)`),console.log("Commands: ",t.commands),console.groupEnd()):this.enableTimeLogging&&console.log(`Frame report for ${e}, ${i} ms (${o} last 10 avg)`),this.enableTimeLogging&&(this._debugOutput.innerHTML=`${i} (${o})`)}for(const e of t.handles)e.remove();this._ext.deleteQuery(t.query),this._entries.delete(e)}const t={name:e,query:this._ext.createQuery(),commands:[],commandsLen:0,drawCommands:0,handles:[]};this.enableCommandLogging&&t.handles.push(this._events.on("command",e=>{t.commandsLen++,t.commands.push(e),e.isDrawCommand&&t.drawCommands++})),this._ext.beginTimeElapsed(t.query),this._entries.set(e,t)}}recordEnd(e){s&&null!=this._ext&&this._entries.has(e)&&this._ext.endTimeElapsed()}}export{i as Profiler};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import
|
|
2
|
+
import{Container as e}from"../Container.js";import{clipTechnique as r}from"./shaderGraph/techniques/clip/ClipTechnique.js";class i extends e{renderChildren(e){e.painter.setPipelineState(null);for(const i of this._clips)r.render(e,i)}}export{i as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
|
|
2
|
-
import{fromRotation as t,multiply as s,translate as
|
|
2
|
+
import{fromRotation as t,multiply as s,translate as e,rotate as i}from"../../../../../../core/libs/gl-matrix-2/math/mat2d.js";import{create as o,transformMany as h}from"../../../../../../core/libs/gl-matrix-2/factories/mat2df32.js";import{transformMat2d as n,set as r}from"../../../../../../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../../../../../../core/libs/gl-matrix-2/factories/vec2f32.js";import{getXAnchorDirection as f,getYAnchorDirection as c}from"../../alignmentUtils.js";import d from"../../Rect.js";import m from"../../collisions/BoundingBox.js";const g=22,l=4,_=g+l,u=g-6,x=Math.PI/180,p=8,b=1.5;class y{constructor(t,s,e,i){this._rotationT=o(),this._bounds=null;const h=e.rect,n=new Float32Array(8);t*=i,s*=i;const r=0===e.code?e.metrics.width:h.width*i,a=0===e.code?e.metrics.height:h.height*i;this.width=r,this.height=a,n[0]=t,n[1]=s,n[2]=t+r,n[3]=s,n[4]=t,n[5]=s+a,n[6]=t+r,n[7]=s+a,this._data=n,this._setTextureCoords(h),this._scale=i,this._mosaic=e,this.x=t,this.y=s,this.maxOffset=Math.max(t+r,s+a)}get mosaic(){return this._mosaic}set angle(s){this._angle=s,t(this._rotationT,-s),this._setOffsets()}get angle(){return this._angle}get xTopLeft(){return this._data[0]}get yTopLeft(){return this._data[1]}get xBottomRight(){return this._data[6]}get yBottomRight(){return this._data[7]}get texcoords(){return this._texcoords}get textureBinding(){return this._mosaic.textureBinding}get offsets(){return this._offsets||this._setOffsets(),this._offsets}get bounds(){if(!this._bounds){const{height:t,width:e}=this._mosaic.metrics,i=e*this._scale,n=Math.abs(t)*this._scale,r=new Float32Array(8);r[0]=this.x,r[1]=this.y,r[2]=this.x+i,r[3]=this.y,r[4]=this.x,r[5]=this.y+n,r[6]=this.x+i,r[7]=this.y+n;const a=s(o(),this._rotationT,this._transform);h(r,r,a);let f=1/0,c=1/0,d=-1/0,g=-1/0;for(let s=0;s<4;s++){const t=r[2*s],e=r[2*s+1];f=Math.min(f,t),c=Math.min(c,e),d=Math.max(d,t),g=Math.max(g,e)}const l=d-f,_=g-c,u=f+l/2,x=c+_/2;this._bounds=new m(u,x,l,_)}return this._bounds}setTransform(t){this._transform=t,this._offsets=null}_setOffsets(){this._offsets||(this._offsets={topLeft:[0,0],topRight:[0,0],bottomLeft:[0,0],bottomRight:[0,0]});const t=s(o(),this._rotationT,this._transform);this._offsets.topLeft[0]=this._data[0],this._offsets.topLeft[1]=this._data[1],this._offsets.topRight[0]=this._data[2],this._offsets.topRight[1]=this._data[3],this._offsets.bottomLeft[0]=this._data[4],this._offsets.bottomLeft[1]=this._data[5],this._offsets.bottomRight[0]=this._data[6],this._offsets.bottomRight[1]=this._data[7],n(this._offsets.topLeft,this._offsets.topLeft,t),n(this._offsets.topRight,this._offsets.topRight,t),n(this._offsets.bottomLeft,this._offsets.bottomLeft,t),n(this._offsets.bottomRight,this._offsets.bottomRight,t)}_setTextureCoords({x:t,y:s,width:e,height:i}){this._texcoords={topLeft:[t,s],topRight:[t+e,s],bottomLeft:[t,s+i],bottomRight:[t+e,s+i]}}}const w=(t,s)=>({code:0,page:0,sdf:!0,rect:new d(0,0,11,8),textureBinding:s,metrics:{advance:0,height:4,width:t,left:0,top:0}});function L(t,s){return t.forEach(t=>n(t,t,s)),{topLeft:t[0],topRight:t[1],bottomLeft:t[2],bottomRight:t[3]}}class M{constructor(t,s,e,i){this._rotation=0,this._decorate(t,s,e,i),this.glyphs=t,this.bounds=this._createBounds(t),this.isMultiline=s.length>1,this._hasRotation=0!==e.angle,this._transform=this._createGlyphTransform(this.bounds,e),this._borderLineSizePx=e.borderLineSizePx,(e.borderLineSizePx||e.hasBackground)&&([this.bounds,this.textBox]=this.shapeBackground(this._transform));for(const o of t)o.setTransform(this._transform)}setRotation(e){if(0===e&&0===this._rotation)return;this._rotation=e;const i=this._transform,h=t(o(),e);s(i,h,i);for(const t of this.glyphs)t.setTransform(this._transform)}_decorate(t,s,e,i){if(!e.decoration||"none"===e.decoration||!t.length)return;const o=e.scale,h="underline"===e.decoration?i?.baseline??_:i?.midline??u,n=t[0].textureBinding;for(const r of s){const s=r.startX*o,e=r.startY*o,i=(r.width+r.glyphWidthEnd)*o;t.push(new y(s,e+h*o,w(i,n),1))}}shapeBackground(t){const s=this._borderLineSizePx||0,e=(b+s)/2,i=this._borderLineSizePx?e:0,{xmin:o,ymin:h,xmax:n,ymax:r,x:a,y:f,width:c,height:d}=this.bounds,g=[o-p,h-p],l=[n+p,h-p],_=[o-p,r+p],u=[n+p,r+p],x=L([[g[0]-e,g[1]-e],[l[0]+e,l[1]-e],[g[0]+i,g[1]+i],[l[0]-i,l[1]+i]],t),y=L([[_[0]+i,_[1]-i],[u[0]-i,u[1]-i],[_[0]-e,_[1]+e],[u[0]+e,u[1]+e]],t),w=L([[g[0]-e,g[1]-e],[g[0]+i,g[1]+i],[_[0]-e,_[1]+e],[_[0]+i,_[1]-i]],t),M=L([[l[0]-i,l[1]+i],[l[0]+e,l[1]-e],[u[0]-i,u[1]-i],[u[0]+e,u[1]+e]],t),R={main:L([g,l,_,u],t),top:x,bot:y,left:w,right:M};return[new m(a,f,c+2*e,d+2*e),R]}get boundsT(){const t=this.bounds,s=r(a(),t.x,t.y);if(n(s,s,this._transform),this._hasRotation){const e=Math.max(t.width,t.height);return new m(s[0],s[1],e,e)}return new m(s[0],s[1],t.width,t.height)}_createBounds(t){let s=1/0,e=1/0,i=0,o=0;for(const r of t)s=Math.min(s,r.xTopLeft),e=Math.min(e,r.yTopLeft),i=Math.max(i,r.xBottomRight),o=Math.max(o,r.yBottomRight);const h=i-s,n=o-e;return new m(s+h/2,e+n/2,h,n)}_createGlyphTransform(t,s){const h=x*s.angle,n=o(),f=a();return e(n,n,r(f,s.xOffset,-s.yOffset)),s.useCIMAngleBehavior?i(n,n,h):(e(n,n,r(f,t.x,t.y)),i(n,n,h),e(n,n,r(f,-t.x,-t.y))),n}}class R{constructor(t,s,e,i,o,h){this.glyphWidthEnd=0,this.startX=0,this.startY=0,this.start=Math.max(0,Math.min(s,e)),this.end=Math.max(0,Math.max(s,e)),this.end<t.length&&(this.glyphWidthEnd=t[this.end].metrics.width),this.width=i,this.yMin=o,this.yMax=h}}const T=t=>10===t,B=t=>32===t;function v(t,s,e){const i=new Array,o=1/e.scale,h=e.maxLineWidth*o,n=s?t.length-1:0,r=s?-1:t.length,a=s?-1:1;let f=n,c=0,d=0,m=f,g=m,l=0,_=1/0,u=0;for(;f!==r;){const{code:s,metrics:e}=t[f],o=Math.abs(e.top);if(T(s)||B(s)||(_=Math.min(_,o),u=Math.max(u,o+e.height)),T(s))f!==n&&(i.push(new R(t,m,f-a,c,_===1/0?0:_,u)),_=1/0,u=0),c=0,m=f+a,g=f+a,d=0;else if(B(s))g=f+a,d=0,l=e.advance,c+=e.advance;else if(c>h){if(g!==m){const s=g-2*a;c-=l,i.push(new R(t,m,s,c-d,_,u)),_=1/0,u=0,m=g,c=d}else i.push(new R(t,m,f-a,c,_,u)),_=1/0,u=0,m=f,g=f,c=0;c+=e.advance,d+=e.advance}else c+=e.advance,d+=e.advance;f+=a}const x=new R(t,m,f-a,c,_,u);return x.start>=0&&x.end<t.length&&i.push(x),i}function j(t,s){let e=0;for(let h=0;h<t.length;h++){const{width:s}=t[h];e=Math.max(s,e)}const i="underline"===s.decoration?l:0,o=t[0].yMin;return{x:0,y:o,height:t[t.length-1].yMax+s.lineHeight*(t.length-1)+i-o,width:e}}function A(t,s){const e=s.scale,i=new Array,o=t.sdfPadding,{faceInfo:h,glyphs:n,isRightToLeft:r}=t,a=v(n,r,s),d=a.length?j(a,s):{y:0,height:0},m=f(s.horizontalAlignment),l=c(s.verticalAlignment),_=2===l?1:0,u=_?0:l-1,x=(1-_)*-d.y+u*(d.height/2)+_*-g;for(let f=0;f<a.length;f++){const{start:h,end:r,width:c}=a[f];let d=-1*(m+1)*(c/2)-o;const g=(t.isRightToLeft?a.length-1-f:f)*s.lineHeight+x-o;a[f].startX=d,a[f].startY=g;for(let t=h;t<=r;t++){const s=n[t];if(T(s.code))continue;const o=new y(d+s.metrics.left,g-s.metrics.top,s,e);d+=s.metrics.advance,i.push(o)}}return new M(i,a,s,h)}export{y as ShapedGlyph,M as ShapingInfo,A as shapeGlyphs};
|