@arcgis/core 6.0.0-next.53 → 6.0.0-next.55
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/WebScene.js +2 -2
- package/applications/Components/OrientedImageryViewer/shared/constants.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/arcadeAsyncRuntime.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/arcade/arcadeRuntime.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/validation/arcadeValidator.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0329fa3aa3403f1c243b.js +1 -0
- package/assets/esri/core/workers/chunks/{6602310c3fcd91fb6a2f.js → 07c8ac092e4b9e8d5b3c.js} +1 -1
- package/assets/esri/core/workers/chunks/0a97b1974367382cfdf5.js +1 -0
- package/assets/esri/core/workers/chunks/{db0a7671ab5cbe8afd72.js → 123661019bb69c53f2d3.js} +1 -1
- package/assets/esri/core/workers/chunks/{d14732a57c8e63948c60.js → 14259910f44c08fd5bbd.js} +1 -1
- package/assets/esri/core/workers/chunks/{1b41ba050cde068d2860.js → 193a73a2c7f4f8482c21.js} +1 -1
- package/assets/esri/core/workers/chunks/20acb6f3ed5140b6c6c6.js +1 -0
- package/assets/esri/core/workers/chunks/{e507dfc4788295d9c244.js → 249a687ce1b6d0815242.js} +1 -1
- package/assets/esri/core/workers/chunks/{afb4dfb89fbc8a342cc5.js → 3354f1fa90f8ce4c8fde.js} +1 -1
- package/assets/esri/core/workers/chunks/{9b458b0d1627f22fdd93.js → 3b11e4d2e69b7aea1d65.js} +1 -1
- package/assets/esri/core/workers/chunks/41694ee8990e799da225.js +1 -0
- package/assets/esri/core/workers/chunks/{e592f2483db71230e8e5.js → 4401b3f8ebb658abe789.js} +1 -1
- package/assets/esri/core/workers/chunks/{12add2003631fa314f25.js → 5060be52a380fc4920f8.js} +1 -1
- package/assets/esri/core/workers/chunks/{2aa6be0b047a1b25a520.js → 53bbb9aa6e4e4a0a8121.js} +1 -1
- package/assets/esri/core/workers/chunks/{4707aedcc1b3bdf5e987.js → 5c34d49a6c9cc34b7626.js} +1 -1
- package/assets/esri/core/workers/chunks/69a09c6acb5ae03c67f6.js +1 -0
- package/assets/esri/core/workers/chunks/7b156905d168bf973518.js +1 -0
- package/assets/esri/core/workers/chunks/{e83806797979138fd22a.js → 844c593754b2692257f4.js} +1 -1
- package/assets/esri/core/workers/chunks/{2d3e977f3b75474d7ebc.js → 846248697c398468d8e6.js} +1 -1
- package/assets/esri/core/workers/chunks/{f7e33d37dd11fb08f3f8.js → 97107e64407fa6825620.js} +1 -1
- package/assets/esri/core/workers/chunks/{032733b863426c5bde00.js → 9e508f930086d2ef5f22.js} +3 -3
- package/assets/esri/core/workers/chunks/{5118c7269b706089c88e.js → a05a2c2aaf0c288f9681.js} +1 -1
- package/assets/esri/core/workers/chunks/{817bf487df056da1e6ec.js → a116dd204921e7464944.js} +1 -1
- package/assets/esri/core/workers/chunks/{944f17e9c9f681b971fb.js → a12e2a345005189c64be.js} +1 -1
- package/assets/esri/core/workers/chunks/{15b3386ad92a0b4149b8.js → a24dc5350af001db417a.js} +1 -1
- package/assets/esri/core/workers/chunks/{10967a36c77c5188690d.js → a66d6298236d59a615db.js} +1 -1
- package/assets/esri/core/workers/chunks/{255f5b45c4d32f97f86c.js → ac0861014b3d2f1a1de2.js} +1 -1
- package/assets/esri/core/workers/chunks/ace210d313ce53f3ae10.js +1 -0
- package/assets/esri/core/workers/chunks/ae48ee283cfa5b3c14b0.js +1 -0
- package/assets/esri/core/workers/chunks/bbd8fcb0bbba7bde3d9b.js +1 -0
- package/assets/esri/core/workers/chunks/{ac8d38016e4bee37a77c.js → be0b8bb4f09aae6ff5de.js} +1 -1
- package/assets/esri/core/workers/chunks/d0659f1b0495734be4b3.js +1 -0
- package/assets/esri/core/workers/chunks/{b9a2b05ede02c305e865.js → d8ffb1502def5c85740b.js} +1 -1
- package/assets/esri/core/workers/chunks/{7dfe1e78d2e66de6be22.js → d9ef244019954d5a8a27.js} +1 -1
- package/assets/esri/core/workers/chunks/{95403bb27a4ea0a4b7b1.js → ddbfa664e69612295785.js} +1 -1
- package/assets/esri/core/workers/chunks/{c6d82397044e403a1f61.js → e61082f56c08abe54b3a.js} +1 -1
- package/assets/esri/core/workers/chunks/{55d28d3f5b8ced061e39.js → eaf73ce60f39a48ddd2a.js} +1 -1
- package/assets/esri/core/workers/chunks/ed2f2a5da830d058e339.js +1 -0
- package/assets/esri/core/workers/chunks/{944cb751c85d3a127f49.js → f52d081bbde5c95265cf.js} +1 -1
- package/assets/esri/core/workers/chunks/{1de9be7b65109c207bd5.js → fbd5f3b81cd9f061824d.js} +1 -1
- package/assets/esri/layers/raster/formats/blosc-wasm.wasm +0 -0
- package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
- package/basemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/chunks/CypherParser.js +1 -1
- package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
- package/chunks/MultiPathImpl.js +1 -1
- package/chunks/OperatorGeodesicBuffer.js +1 -1
- package/chunks/UnitFactory.js +1 -1
- package/chunks/blosc-wasm.js +2 -0
- package/chunks/cameraUtilsSpherical.js +1 -1
- package/chunks/parquet.js +1 -1
- package/chunks/text.js +1 -1
- package/config.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/geometryEngine.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/support/Ellipsoid.js +1 -1
- package/geometry/support/curves/ellipticArc7Utils.js +1 -1
- package/geometry/support/geodesicConstants.js +1 -1
- package/geometry/support/meshUtils/primitives.js +1 -1
- package/kernel.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/effects/parser.js +1 -1
- package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +1 -1
- package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
- package/layers/graphics/data/QueryEngineResult.js +1 -1
- package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
- package/layers/parquet.js +1 -1
- package/layers/raster/datasets/ZarrRaster.js +1 -1
- package/layers/raster/datasets/wcsCoverageParser.js +1 -1
- package/layers/raster/formats/RasterCodec.js +1 -1
- package/layers/raster/formats/blosc.js +2 -0
- package/layers/support/BuildingFilter.js +1 -1
- package/layers/support/IntegratedMeshSemantics.js +1 -1
- package/layers/support/fieldUtils.d.ts +23 -87
- package/layers/support/fieldUtils.js +1 -1
- package/layers/support/layersMapping.js +1 -1
- package/layers/video/VideoController.js +1 -1
- package/legend/ActiveLayerInfo.js +1 -1
- package/libs/ajv/ajv.bundle-wrapper.js +1 -1
- package/package.json +4 -4
- package/renderers/types.d.ts +1 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/rest/query/operations/pbfFeatureServiceParser.js +1 -1
- package/smartMapping/statistics/support/attributeDensity.js +1 -1
- package/smartMapping/support/adapters/support/utils.js +1 -1
- package/support/tests/serviceMockDependencies.js +1 -1
- package/symbols/cim/CIMEffects.js +1 -1
- package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
- package/symbols/cim/effects/EffectControlMeasureLine.js +1 -1
- package/symbols/cim/placements/PlacementInsidePolygon.js +1 -1
- package/symbols/cim/rasterizingUtils.js +1 -1
- package/views/2d/PaddedViewState.js +1 -1
- package/views/2d/engine/vectorTiles/buckets/FillBucket.js +1 -1
- package/views/2d/engine/vectorTiles/constants.js +1 -1
- package/views/2d/engine/vectorTiles/style/geoJSONVectorTileUtils.js +1 -1
- package/views/2d/engine/webgl/effects/HighlightEffect.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/segmentUtils.js +1 -1
- package/views/2d/engine/webgl/mesh/templates/shapingUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/constants.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
- package/views/2d/interactive/editingTools/TransformTool.js +1 -1
- package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
- package/views/2d/layers/ParquetLayerView2D.js +1 -1
- package/views/2d/layers/features/Processor.js +1 -1
- package/views/2d/layers/features/aggregation/GridSpatialIndex.js +1 -1
- package/views/2d/layers/features/support/AttributeStore.js +1 -1
- package/views/2d/layers/features/support/FeatureSetReaderPBF.js +1 -1
- package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
- package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
- package/views/3d/analysis/Dimension/DimensionTool.js +1 -1
- package/views/3d/analysis/Dimension/LengthDimensionSubTool.js +1 -1
- package/views/3d/analysis/ElevationProfile/ElevationProfileLineSceneComputation.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightRayIntersector.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
- package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementCutFillComputation.js +1 -1
- package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementVisualization.js +1 -1
- package/views/3d/animation/pointToPoint/Camera.js +1 -1
- package/views/3d/camera/constraintUtils.js +1 -1
- package/views/3d/camera/intersectionUtils.js +1 -1
- package/views/3d/environment/EnvironmentView.js +1 -1
- package/views/3d/focusAreaUtils.js +1 -1
- package/views/3d/interactive/editingTools/ManipulatedObject3DGraphic.js +1 -1
- package/views/3d/interactive/editingTools/dragEventPipeline3D.js +1 -1
- package/views/3d/interactive/editingTools/manipulations/config.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerControlPoints.js +1 -1
- package/views/3d/interactive/editingTools/media/MediaElementControllerShape.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateMeshAdapter.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
- package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DView.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/I3SMeshView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/TiledLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DExtrudeSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DPolygonFillSymbolLayer.js +1 -1
- package/views/3d/layers/graphics/Graphics3DSymbolFactory.js +1 -1
- package/views/3d/layers/graphics/LabelInfo.js +1 -1
- package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
- package/views/3d/layers/i3s/I3SIndex.js +1 -1
- package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
- package/views/3d/layers/i3s/I3SMeshViewFilter.js +1 -1
- package/views/3d/layers/i3s/I3SNode.js +1 -1
- package/views/3d/layers/i3s/I3SOverrides.js +1 -1
- package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
- package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
- package/views/3d/layers/support/FeatureTileFetcher3DContext.js +1 -1
- package/views/3d/layers/support/FeatureTileMeasurements3D.js +1 -1
- package/views/3d/layers/support/FeatureTileVisibility3D.js +1 -1
- package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
- package/views/3d/layers/support/Tiles3DLayerViewRegistration.js +1 -1
- package/views/3d/layers/support/selectTiles3DSpatialReference.js +1 -1
- package/views/3d/layers/support/uvUtils.js +1 -1
- package/views/3d/state/Constraints.js +1 -1
- package/views/3d/state/ConstraintsManager.js +1 -1
- package/views/3d/state/NearFarHeuristic.js +1 -1
- package/views/3d/state/ViewState.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
- package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
- package/views/3d/state/controllers/PointToPointAnimationController.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
- package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
- package/views/3d/state/utils/groundNavigationUtils.js +1 -1
- package/views/3d/state/utils/navigationUtils.js +1 -1
- package/views/3d/support/FrustumExtentIntersection.js +1 -1
- package/views/3d/support/RenderCoordsHelper.js +1 -1
- package/views/3d/support/SweptSphereVolume.js +1 -1
- package/views/3d/support/cameraUtils.js +1 -1
- package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
- package/views/3d/support/engineContent/line.js +1 -1
- package/views/3d/support/engineContent/marker.js +1 -1
- package/views/3d/support/hitTest.js +1 -1
- package/views/3d/support/orientedBoundingBox.js +1 -1
- package/views/3d/support/pointsOfInterest/CameraOnSurface.js +1 -1
- package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
- package/views/3d/support/pointsOfInterest/SurfaceGeometryUpdates.js +1 -1
- package/views/3d/support/sunUtils.js +1 -1
- package/views/3d/terrain/ExtentHelper.js +1 -1
- package/views/3d/terrain/OverlayManager.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/TerrainRenderer.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TilingSchemeLogic.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl/RenderCamera.js +1 -1
- package/views/3d/webgl-engine/Stage.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObject.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticComponentGeometryBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
- package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.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/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +1 -1
- package/views/3d/webgl-engine/effects/atmosphere/MarsAtmosphere.js +1 -1
- package/views/3d/webgl-engine/effects/debug/RenderNodeVisualizerNode.js +1 -1
- package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
- package/views/3d/webgl-engine/effects/laserlines/LaserlinePathData.js +1 -1
- package/views/3d/webgl-engine/effects/shadowAccumulation/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/Intersector.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderParameters.js +1 -1
- package/views/3d/webgl-engine/lib/TextRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TriangleIntersectionData.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeView.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/strokes.js +1 -1
- package/views/3d/webgl-engine/lib/verticalOffsetUtils.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PolygonOffset.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/parts/RenderView.js +1 -1
- package/views/MapView.d.ts +1 -0
- package/views/SceneView.js +1 -1
- package/views/View2D.js +1 -1
- package/views/ViewingMode.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileChartBoundsUtils.js +1 -1
- package/views/analysis/ElevationProfile/elevationProfileGeometryUtils.js +1 -1
- package/views/draw/DrawAction.js +1 -1
- package/views/draw/DrawOperation.js +1 -1
- package/views/draw/DrawTool.js +1 -1
- package/views/draw/SegmentDrawAction.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/draw/support/helpMessageUtils.js +1 -1
- package/views/draw/support/managers/EditSessionManager.js +1 -1
- package/views/interactive/dragEventPipeline.js +1 -1
- package/views/interactive/editGeometry/EditGeometry.js +1 -1
- package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
- package/views/interactive/editGeometry/operations/AddOrUpdatePart.js +1 -1
- package/views/layers/support/editableLayerViews.js +1 -1
- package/views/overlay/TextOverlayItem.js +1 -1
- package/views/support/DefaultsFromMap.js +1 -1
- package/views/support/Scheduler.js +1 -1
- package/views/support/spatialReferenceSupport.js +1 -1
- package/views/webgl/ShaderTranspiler.js +2 -2
- package/widgets/AreaMeasurement2D/AreaMeasurement2DTool.js +1 -1
- package/widgets/BasemapGallery/support/basemapCompatibilityUtils.js +1 -1
- package/widgets/BatchAttributeForm.js +1 -1
- package/widgets/DistanceMeasurement2D/DistanceMeasurement2DTool.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileLineView.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/FeatureForm.js +1 -1
- package/widgets/Legend/styles/card/ColorRamp.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Measurement.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageLocationWidget.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageMeasurementWidget.js +1 -1
- package/widgets/Search/support/layerSearchUtils.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
- package/widgets/UtilityNetworkAssociations.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/assets/esri/core/workers/chunks/021bd07b9a3e70598840.js +0 -1
- package/assets/esri/core/workers/chunks/170e68624b71ac96de4a.js +0 -1
- package/assets/esri/core/workers/chunks/8a820e303941b351de81.js +0 -1
- package/assets/esri/core/workers/chunks/90d567e920b6982b402d.js +0 -1
- package/assets/esri/core/workers/chunks/97cdcedfe853280f6258.js +0 -1
- package/assets/esri/core/workers/chunks/9ebc6026934400fc1e1f.js +0 -1
- package/assets/esri/core/workers/chunks/b4a325dcf50e276751d7.js +0 -1
- package/assets/esri/core/workers/chunks/be5857b0d1b00faf430b.js +0 -1
- package/assets/esri/core/workers/chunks/cd9100a7c8309dfa7569.js +0 -1
- package/assets/esri/core/workers/chunks/e58f51618251f74aaafd.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[8595],{82806(e,t,i){var r=i(32198),n=i(91429),l=i(56507),s=i(49186),a=i(53966),o=i(86738),u=i(16930),c=i(21325),h=i(12711),d=i(85676),f=i(94359),p=i(78888),m=i(22048),g=i(49410),y=i(34606),x=i(51508),w=i(7548),R=i(23636),b=i(4366),I=i(34930),v=i(99235),_=i(37373),S=i(51927),C=i(60694),k=i(10873),M=i(45617),T=i(33446),A=i(43577),P=i(13868),F=i(22796),z=i(69409),B=i(87045),D=i(93223),J=i(36005);i.d(t,["b",0,e=>{let t=e,H=class extends t{constructor(...e){super(...e),this._draRasterConfig=null,this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=(0,w.qg)(e[0]?.raster)}destroy(){this._draRasterConfig?.rasterJobHandler?.destroy(),this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,C.Jf)(e,a.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;let{activePresetRendererName:e,presetRenderers:t}=this;return e?(t?.find(({name:t})=>t===e))?.renderer.clone():this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){let r=t?.layerDefinition?.drawingInfo?.renderer;return(0,f.LF)(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,l.PZ)(m.A,e).clone();let{serviceRasterInfo:i}=this;if(null==i)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");let{geometry:r}=e;if(null==r)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=r,{spatialReference:a}=i;if(!r.spatialReference.equals(a)){await(0,_.Hh)();let e="extent"===r.type?(0,_._l)(r,a):(0,_.uk)(r,a);if(null==e)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}let u=e.pixelSize??new o.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:a}),{extent:c,width:h,height:d}=(0,I.b7)(i,n,u),f=await this.fetchPixels(c,h,d,{...t,interpolation:"nearest"});if(null==f.pixelBlock)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");let p=await(0,I.$Q)(f.pixelBlock,c,n),g=this._rasterJobHandler;return g?g.computeStatisticsHistograms({pixelBlock:p},t):(0,S.eH)(p)}normalizeRasterFetchOptions(e){let{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;let i=(0,b.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return!this.loaded||"imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson)||(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction()),this._rasterFunctionUpdatePromise}async updateRenderer(){let{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;let{rasterInfo:r}=this.raster,n=(0,b.ct)(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,l=(0,h.m7)(r,n);return this._updateSymbolizer(t,i,n,l)}async applyRenderer(e,t,i){let r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();let n=this.bandIds??[],{pixelBlock:l}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return l}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,w.qg)(t)){let i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;let r=(0,c.Vp)(e);return B.A.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,r={}){if(N(this),r.requestAsImageElement){let n=this.getTileUrl(e,t,i),{data:l}=await(0,p.A)(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r.signal});return l}let{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition){let l=r.tileInfo||n.storageInfo.tileInfo,s=this.raster.getTileExtentFromTileInfo(e,t,i,l);if(s)return{extent:s,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(r={...r,buffer:{cols:1,rows:1}}),r={...r,refreshParameters:this.refreshParameters},this.raster.fetchTile(e,t,i,r)}async fetchImageBitmapTile(e,t,i,r={}){N(this);let n=this.getTileUrl(e,t,i),{data:l}=await(0,p.A)(n,{responseType:"blob",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r?.signal});return(0,T.Cp)(l,e,t,i,r)}async fetchPixels(e,t,i,r={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);let n=await this.raster.fetchPixels(e,t,i,r);return r.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(n.pixelBlock=n.pixelBlock?.extractBands(r.bandIds)),n}async getSamples(e,t){await this.load();let i=(0,l.PZ)(y.A,e).clone();if(i.interpolation&&"nearest"!==i.interpolation)throw new s.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");let r=i.mosaicRule?.multidimensionalDefinition,n={...t,multidimensionalDefinition:r},a=(await this._getSampleLocations(i)).map(e=>this.identify(e,n).then(t=>(t.location=e,t))),o=(await Promise.all(a)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new x.A({samples:o})}async identify(e,t={}){await this.load();let i=(0,l.PZ)(o.A,e).clone().normalize(),{raster:r,serviceRasterInfo:n}=this;if(null!=n?.multidimensionalInfo&&(!n.hasMultidimensionalTranspose||!(0,b.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:i,value:null};let a,u=this.multidimensionalSubset?.areaOfInterest;if(u&&!u.contains(i))throw new s.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");if(this.serviceRasterInfo?.storageInfo.isBsqTile){let e=(0,w.qg)(r)?this.getRawDisplayBandIds():this.bandIds;a=e?.length?e:void 0}return r.identify(i,{...t,bandIds:a})}hasStandardTime(){let e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;let t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date((0,b.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){let t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,b.z2)(this.multidimensionalSubset,t)}async getDynamicRangeInputRaster(){if(!this.rasterFunction||!(0,w.qg)(this.raster)||!this._cachedRasterFunctionJson)return null;let e=JSON.stringify(this._cachedRasterFunctionJson);if(this._draRasterConfig?.functionJson===e)return this._draRasterConfig;let t=this.raster.rasterFunction.queryRasterFunction(e=>"Stretch"===e.functionName&&e.functionArguments.dynamicRangeAdjustment);if(!t)return null;let i=t.toJSON(),r=this.raster.primaryRasters.rasters,n=t.functionArguments.raster,l=i.rasterFunctionArguments;if(!n||"object"!=typeof n||!("functionName"in n))return this._draRasterConfig={functionJson:e,raster:r[0],functionArguments:l,rasterJobHandler:this._draRasterConfig?.rasterJobHandler},this._draRasterConfig;let s={raster:r[0]};r.length>1&&r.forEach(e=>s[e.url]=e);let a=(0,v.vt)(n.toJSON(),s),o=new R.A({rasterFunction:a});await o.open();let u=this._draRasterConfig?.rasterJobHandler;try{u||(u=new z.A,await u.initialize()),o.rasterJobHandler=u,await o.syncJobHandler()}catch{}return this._draRasterConfig={functionJson:e,raster:o,functionArguments:l,rasterJobHandler:u},this._draRasterConfig}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||=(0,b.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}),this.rasterFunction&&(0,w.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;N(this);let{raster:e}=this;e.rasterJobHandler!==this._rasterJobHandler&&(e.rasterJobHandler=this._rasterJobHandler,(0,w.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer())}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){let{geometry:t}=e;if("point"===t.type)return[t];let{spatialReference:r,type:n}=t;if("multipoint"===n)return t.points.map(e=>new o.A({x:e[0],y:e[1],spatialReference:r}));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){let{densifyExecute:r}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(4642)]).then(()=>i(88411)),{lengthExecute:l}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(2174)]).then(()=>i(965)),s=l(t,{unit:"meters"}),a=Math.min(e.sampleCount||100,1e3),o=e.sampleDistance;o||=s/(a+ +(2===n.paths[0].length)),n=r(t,o,{unit:"meters"})}return n.paths.flatMap(e=>e.map(e=>new o.A({x:e[0],y:e[1],spatialReference:r})))}let l=Math.min(e.sampleCount||100,1e3),s="extent"===t.type,a=s?t:t.extent,u=Math.sqrt(a.width*a.height/l),c=a.height/u,h=a.width/u,{xmin:d,ymax:f}=a,p=[];for(let e=0;e<c;e++)for(let i=0;i<h;i++){let n=new o.A({x:d+(i+.5)*u,y:f-(e+.5)*u,spatialReference:r});(s||t.contains(n))&&p.push(n)}return p}_configDefaultInterpolation(){if(null==this.interpolation){N(this);let{raster:e}=this,t=(0,h.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){N(this);let{rasterInfo:t}=this.raster,i=(0,b.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,r=(0,h.I8)({variableName:i,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=r?.bandIds??(0,h.ci)(t)),!this.renderer||"override"===e){let e=(0,h.Mm)(this.raster),n=r?.renderer??(0,h.PD)(t,{bandIds:this.bandIds,variableName:i,rasterFunctionColorRamp:e}),l=t.statistics,s=l&&l.length>0?l[0]:null,a=s?.max??0,o=s?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===n.type&&(a>1e24||o<-1e24)&&(n.dynamicRangeAdjustment=!0,n.customStatistics=null,"none"===n.stretchType&&(n.stretchType="min-max")),this.renderer=n}let n=(0,h.$P)({...this.renderer.toJSON(),variableName:i}),l=(0,h.m7)(t,i);this.symbolizer?(this.symbolizer.rendererJSON=n,this.symbolizer.rasterInfo=l):this.symbolizer=new d.A({rendererJSON:n,rasterInfo:l});let s=this.symbolizer.bind();if(s.success){if("auto"===e){let{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){let e=(0,h.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){let e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else a.A.getLogger(this).warn("imagery-tile-mixin",s.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,w.qg)(this.raster)){let e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",F.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,w.qg)(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];let{rasterFunction:r}=this;if(r){let i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);let n=(0,v.vt)(r.functionDefinition?.toJSON()??r.toJSON(),i),l=new R.A({rasterFunction:n});l.rasterJobHandler=this._rasterJobHandler,await l.open(),this.raster=l}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;let{bandIds:n}=this,{bandCount:l}=this.raster.rasterInfo,s=n?.length?n.some(e=>e>=l):l>=3;n&&(s||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){let{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new g.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];let l=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},s)=>{let a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(let{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];let i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}let o=new g.A({location:e.location,pixelValue:i,rasterId:s,locationId:t,resolution:n,attributes:a});l.push(o)}),l}};function N(e){if(!e.raster||!e.serviceRasterInfo)throw new s.A("imagery-tile","no raster")}return(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_cachedRasterFunctionJson",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_compatibleFullExtent",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_draRasterConfig",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_isConstructedFromFunctionRaster",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_rasterFunctionUpdatePromise",void 0),(0,r.Cg)([(0,n.MZ)({type:[l.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],H.prototype,"bandIds",void 0),(0,r.Cg)([(0,n.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],H.prototype,"copyright",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!1}})],H.prototype,"fullExtent",null),(0,r.Cg)([(0,n.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,D.e)(P.SZ)],H.prototype,"interpolation",void 0),(0,r.Cg)([(0,n.MZ)()],H.prototype,"ioConfig",void 0),(0,r.Cg)([(0,n.MZ)({type:[M.A],json:{write:!0}})],H.prototype,"multidimensionalDefinition",null),(0,r.Cg)([(0,n.MZ)({type:A.A,json:{write:!0}})],H.prototype,"multidimensionalSubset",void 0),(0,r.Cg)([(0,n.MZ)()],H.prototype,"raster",void 0),(0,r.Cg)([(0,n.MZ)({type:F.A})],H.prototype,"rasterFunction",null),(0,r.Cg)([(0,n.MZ)({constructOnly:!0})],H.prototype,"serviceRasterInfo",void 0),(0,r.Cg)([(0,n.MZ)()],H.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,n.MZ)({readOnly:!0,type:u.A,json:{read:!1}})],H.prototype,"spatialReference",void 0),(0,r.Cg)([(0,n.MZ)({type:B.A})],H.prototype,"tileInfo",void 0),(0,r.Cg)([(0,n.MZ)(k.OZ)],H.prototype,"url",null),(0,r.Cg)([(0,n.MZ)({types:f.uy})],H.prototype,"renderer",null),(0,r.Cg)([(0,n.MZ)({types:f.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){let e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:f.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],H.prototype,"internalRenderer",null),(0,r.Cg)([(0,J.w)("internalRenderer")],H.prototype,"readRenderer",null),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"symbolizer",void 0),H=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.TiledImagery")],H),H}])},49859(e,t,i){i.d(t,{A:()=>J});var r=i(32198),n=i(91429),l=i(56507),s=i(49186),a=i(25482),o=i(53966),u=i(17676),c=i(563),h=i(5443),d=i(86738),f=i(16930),p=i(78888),m=i(60694),g=i(10873),y=i(45617),x=i(91806),w=i(20223),R=i(87045),b=i(94778),I=i(40951),v=i(34930),_=i(47520),S=i(37373),C=i(34251),k=i(7548),M=i(4366);const T=new Map,A=new class{constructor(e=15e3,t=5e3,i=-1){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t),this._size=i}decreaseRefCount(e,t){let i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){let e=r.get(i);return e.refCount--,e.refCount<=0&&(r.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){let i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){let e=r.get(i);return e.ts=Date.now(),e.refCount++,r.delete(i),r.set(i,e),e.block}return null}putBlock(e,t,i,r){let n=this._cachedBlocks,l=e+"/"+t;if(n.has(l)){let e=n.get(l);e.ts=Date.now(),e.refCount++}else n.set(l,{block:i,ts:Date.now(),refCount:1,controller:r});this._trim(),this._updateTimer()}deleteBlock(e,t){let i=this._cachedBlocks,r=e+"/"+t;i.has(r)&&i.delete(r)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;let e=this._cachedBlocks;this._timer=setInterval(()=>{let t=Array.from(e),i=Date.now();for(let r=0;r<t.length&&t[r][1].ts<=i-this._duration;r++)e.delete(t[r][0]);0===e.size&&this._clearTimer()},this._interval)}_trim(){let e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;let t=Array.from(e).sort((e,t)=>e[1].refCount-t[1].refCount||e[1].ts-t[1].ts);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}}(15e3,5e3,100);function P(e,t,i){let r=T.get(e);if(!r)return null==t?A.decreaseRefCount(e,i):0;if(null==t||null==r[t])return A.decreaseRefCount(e,i);let n=r[t]?.cache,l=n?.get(i);if(n&&l){if(l.refCount--,0===l.refCount){n.delete(i);for(let e=0;e<r.length;e++)r[e]?.cache.delete(i);l.controller&&l.controller.abort()}return l.refCount}return 0}function F(e,t,i){let r=T.get(e);if(!r)return null==t?A.getBlock(e,i):null;if(null==t||null==r[t]){for(let e=0;e<r.length;e++){let t=r[e]?.cache.get(i);if(t)return t.refCount++,t.block}return A.getBlock(e,i)}let n=r[t]?.cache.get(i);if(n)return n.refCount++,n.block;for(let e=0;e<r.length;e++){if(e===t||!r[e])continue;let n=r[e]?.cache,l=n?.get(i);if(n&&l)return l.refCount++,n.set(i,l),l.block}return null}function z(e,t,i,r,n=null){let l=T.get(e);if(!l)return void(t??A.putBlock(e,i,r,n));if(null==t||null==l[t])return void A.putBlock(e,i,r,n);let s={refCount:1,block:r,isResolved:!1,isRejected:!1,controller:n};r.then(()=>s.isResolved=!0).catch(()=>s.isRejected=!0),l[t]?.cache.set(i,s)}function B(e,t,i){let r=T.get(e);r?null==t||null==r[t]?A.deleteBlock(e,i):r[t]?.cache.delete(i):t??A.deleteBlock(e,i)}let D=0,J=class extends a.o{constructor(e){super(function(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:R.A.create(),...e.ioConfig}}),e}(e)),this._tileFetchQueue=new c.QueueProcessor({concurrency:32,process:(e,t)=>this.fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"},this.rawBlockRegistryIds=[],this.refresh=(0,u.sg)(async e=>{await this._openPromise;let t=await this._refresh(e);return t.dataChanged&&function(e,t){let i=T.get(e);if(i){let e=t.map(e=>i[e]).filter(e=>null!=e);for(let t of e)t&&(Array.from(t.cache.values()).forEach(e=>{!e.isResolved&&!e.isRejected&&e.controller&&e.controller.abort()}),t.cache.clear())}}(this.rasterId,this.rawBlockRegistryIds),t})}get _isGlobalWrappableSource(){let{rasterInfo:e}=this,t=(0,S.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){let{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),(0,k.qg)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+D++}set url(e){this._set("url",(0,m.Jf)(e,o.A.getLogger(this)))}async open(e){return this._openPromise??=(0,S.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,r={}){let n=r.tileInfo||this.rasterInfo.storageInfo.tileInfo,l=this.getTileExtentFromTileInfo(e,t,i,n);if(!l)throw new s.A("imagery-tile:out-of-bounds","Level for fetch tile out of range");return r={noClip:!0,...r},this.fetchPixels(l,n.size[0],n.size[1],r)}async identify(e,t={}){e=(0,l.PZ)(d.A,e).clone().normalize();let{multidimensionalDefinition:i,timeExtent:r}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:s,multidimensionalInfo:a}=n,{transposedVariableName:o}=t,u=null!=a&&s&&(null!=r||(0,M.DY)(i));u&&!o&&(o=null!=i&&i.length>0?i[0].variableName??void 0:a.variables[0].name,t={...t,transposedVariableName:o}),t=this._getRequestOptionsWithSliceId(t);let{spatialReference:c,extent:f}=n,{datumTransformation:p}=t,m=(0,S._I)(e,c,p);if(!f.intersects(m))return{location:m,value:null};if(null!=n.transform){let e=n.transform.inverseTransform(m);if(!n.nativeExtent.intersects(e))return{location:e,value:null};m=e}let g=null!=o&&null!=a&&n.hasMultidimensionalTranspose;if((0,k.qg)(this)){let e=this.primaryRasters.rasters[0];if(g)return e.identify(m,t);let{pixelSize:r}=n,l=3*r.x/2,s=3*r.y/2,a=new h.A({xmin:m.x-l,xmax:m.x+l,ymin:m.y-s,ymax:m.y+s,spatialReference:c}),o={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:u}=await e.fetchPixels(a,3,3,o),{pixelBlock:d}=await this.fetchPixels(a,3,3,o);if(null==u)return{location:m,value:null};let f,p=!u.mask||u.mask[4]?u.pixels.map(e=>e[4]):null;return null!=d&&(f=!d.mask||d.mask[4]?d.pixels.map(e=>e[4]):void 0),{location:m,value:p,processedValue:f,pyramidLevel:0}}let y=0;if(!g){let{srcResolution:i}=t;if(i)i.spatialReference&&(i=(0,v.T5)(new d.A(i),c)),y=(0,S.t$)(i,n,this.ioConfig.sampling).pyramidLevel;else if(y=await this.computeBestPyramidLevelForLocation(e,t),null==y)return{location:m,value:null}}let x=this.identifyPixelLocation(m,y,null,g);if(null===x)return{location:m,value:null};let{row:w,col:R,rowOffset:b,colOffset:I,blockWidth:_}=x,C=await this._fetchRawTile(y,w,R,t);if(!C?.pixels?.length)return{location:m,value:null};let T=b*_+I;return this._processIdentifyResult(C,{srcLocation:m,position:T,pyramidLevel:y,useTransposedTile:!!g,requestSomeSlices:u,identifyOptions:t})}async fetchPixels(e,t,i,r={}){e=(0,S.Ps)(e),r=this._getRequestOptionsWithSliceId(r);let{_hasNoneOrGCSShiftTransform:n}=this;if(r.requestRawData&&n)return this._fetchPixels(e,t,i,r);let l=(0,S.FT)(e.spatialReference),s=(0,S.OM)(e);if(null==l||0===s||1===s&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,r);if(s>=3)return{extent:e,pixelBlock:null};let a=[],{xmin:o,xmax:u}=e,c=Math.round(l/(u-o)*t),d=c-Math.round((l/2-o)/(u-o)*t),f=0,p=[];for(let n=0;n<=s;n++){let m=0===n?o:-l/2,g=n===s?u-l*n:l/2,y=new h.A({xmin:m,xmax:g,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),x=0===n?c-d:n===s?t-f:c;f+=x,p.push(x);let w=r.disableWrapAround&&n>0?null:this._fetchPixels(y,x,i,r);a.push(w)}let m=(await Promise.all(a)).map(e=>e?.pixelBlock),g=null,y={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},r)).pixelBlock:(0,_.z7)(m,y,{blockWidths:p}),{extent:e,srcExtent:(0,S._l)(e,this.rasterInfo.spatialReference,r.datumTransformation),pixelBlock:g}}async fetchRawPixels(e,t,i,r={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};let n=await this._fetchRawTiles(e,t,i,r),{nativeExtent:l,nativePixelSize:s,storageInfo:a}=this.rasterInfo,o=2**e,u=s.x*o,c=s.y*o,d=new h.A({xmin:l.xmin+u*t.x,xmax:l.xmin+u*(t.x+i.width-1),ymin:l.ymax-c*(t.y+i.height-1),ymax:l.ymax-c*t.y,spatialReference:l.spatialReference});if(!n)return{extent:d,srcExtent:d,pixelBlock:null};let{pixelBlocks:f,mosaicSize:p}=n;if(1===f.length&&null!=f[0]&&f[0].width===i.width&&f[0].height===i.height)return{extent:d,srcExtent:d,pixelBlock:n.pixelBlocks[0]};let m,g=e>0?a.pyramidBlockWidth:a.blockWidth,y=e>0?a.pyramidBlockHeight:a.blockHeight,x={x:t.x%g,y:t.y%y};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:f,srcMosaicSize:p,destDimension:i,clipOffset:x,clipSize:i,coefs:null,sampleSpacing:null,interpolation:r.interpolation,alignmentInfo:null,blockWidths:null},r)).pixelBlock:(0,_.z7)(f,p,{clipOffset:x,clipSize:i}),{extent:d,srcExtent:d,pixelBlock:m}}fetchRawTile(e,t,i,r){throw new s.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,S._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t,i){return this.rasterJobHandler?this.rasterJobHandler.decode({data:e,options:t},i):(0,I.D)(e,t,i)}async request(e,t,i=0){let{customFetchParameters:r}=this.ioConfig,{range:n,query:l,headers:s}=t;i=i??t.retryCount??this.ioConfig.retryCount;let a=n?{Range:`bytes=${n.from}-${n.to}`}:null;try{return await(0,p.A)(e,{...t,query:{...l,...r},headers:{...s,...a}})}catch(r){if(i>0)return i--,this.request(e,t,i);throw r}}getSliceIndex(e){let{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,M.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,r){let n=r.lodAt(e);return n?this.getTileExtent({x:n.resolution,y:n.resolution},t,i,r.origin,r.spatialReference,r.size):null}updateTileInfo(){let{storageInfo:e,spatialReference:t,extent:i,pixelSize:r}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){let l=[],s=e.maximumPyramidLevel||0,a=(r.x+r.y)/2,o=1/.0254*96*a;for(let e=0;e<=s&&(l.unshift(new x.A({level:s-e,resolution:a,scale:o})),e!==s);e++)if(n){let t=(n[e].x+n[e].y)/2;o*=t/a,a=t}else a*=2,o*=2;let u=new d.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new R.A({origin:u,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:l}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,r){let{width:n,height:l,nativeExtent:s,pixelSize:a,spatialReference:o}=e,u=new d.A({x:s.xmin,y:s.ymax,spatialReference:o});r??=Math.max(0,Math.round(Math.log(Math.max(n,l))/Math.LN2-8));let c=this.computeBlockBoundary(s,t,i,{x:s.xmin,y:s.ymax},[a],r);e.storageInfo=new w.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:u,firstPyramidLevel:1,maximumPyramidLevel:r,blockBoundary:c})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,r,n,l=0,s=2){if(1===n.length&&l>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<l;i++)e*=s,t*=s,n.push({x:e,y:t})}let a=[],{x:o,y:u}=r;for(let r=0;r<n.length;r++){let{x:l,y:s}=n[r];a.push({minCol:Math.floor((e.xmin-o+.1*l)/t/l),maxCol:Math.floor((e.xmax-o-.1*l)/t/l),minRow:Math.floor((u-e.ymax+.1*s)/i/s),maxRow:Math.floor((u-e.ymin-.1*s)/i/s)})}return a}getPyramidPixelSize(e){let{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:r}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];let n=r**e;return{x:t.x*n,y:t.y*n}}identifyPixelLocation(e,t,i,r){let{spatialReference:n,nativeExtent:l,storageInfo:s}=this.rasterInfo,{maximumPyramidLevel:a,origin:o,transposeInfo:u}=s,c=r&&null!=u?u.tileSize[0]:s.blockWidth,h=r&&null!=u?u.tileSize[1]:s.blockHeight,d=(0,S._I)(e,n,i);if(!l.intersects(d)||t<0||t>a)return null;let{x:f,y:p}=this.getPyramidPixelSize(t),m=(o.y-d.y)/p/h,g=(d.x-o.x)/f/c,y=Math.min(h-1,Math.floor((m-Math.floor(m))*h)),x=Math.min(c-1,Math.floor((g-Math.floor(g))*c));return{pyramidLevel:t,row:Math.floor(m),col:Math.floor(g),rowOffset:y,colOffset:x,blockWidth:c,srcLocation:d}}getTileExtent(e,t,i,r,n,l){let[s,a]=l,o=r.x+i*s*e.x,u=o+s*e.x,c=r.y-t*a*e.y,d=c-a*e.y;return new h.A({xmin:o,xmax:u,ymin:d,ymax:c,spatialReference:n})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){let r=this.rasterInfo.storageInfo.blockBoundary[e];return!r||r.maxRow<t||r.maxCol<i||r.minRow>t||r.minCol>i}updateImageSpaceRasterInfo(e){let{pixelSize:t}=e,{width:i,height:r}=e,n=f.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new h.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-r,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new d.A({x:1,y:1,spatialReference:n});let{extent:l,storageInfo:s}=e;if(s){s.origin=new d.A({x:l.xmin,y:l.ymax,spatialReference:n});let{pyramidResolutions:i,tileInfo:r}=s;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),r){r.origin=s.origin;let t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;r.lods.forEach((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254})}}}async _refresh(e){return{dataChanged:!0}}async _fetchPixels(e,t,i,r={}){let n=(0,S.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};let l=this._getSourceDataInfo(e,t,i,r),{pyramidLevel:s,srcResolution:a,srcWidth:o,srcHeight:u,ul:c}=l,{srcExtent:h}=l;if(0===o||0===u)return{extent:e,srcExtent:h,pixelBlock:null};let{rasterInfo:f}=this,p=f.transform,m="gcs-shift"===p?.type,g=null!=(0,S.FT)(e.spatialReference);(m||!g)&&(n=(0,S.OM)(h,m));let y=await this._fetchRawTiles(s,c,{width:o,height:u,wrapCount:n},r);if(!y)return{extent:e,srcExtent:h,pixelBlock:null};h=y.extent;let x=f.storageInfo,w=s>0?x.pyramidBlockWidth:x.blockWidth,R=s>0?x.pyramidBlockHeight:x.blockHeight,{x:b,y:I}=f.pixelSize;if(s>0){let{pyramidResolutions:e,pyramidScalingFactor:t}=x;if(null!=e&&e[s-1])({x:b,y:I}=e[s-1]);else{let e=t**s;b*=e,I*=e}}let v=f.spatialReference,k=new d.A({x:b,y:I,spatialReference:v}),M=w===o&&R===u&&c.x%w===0&&c.y%R===0,T=new d.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),A=!e.spatialReference.equals(v),P=v.isGeographic?1e-9:1e-4,{datumTransformation:F}=r;if(!A&&M&&1===y.pixelBlocks.length&&w===t&&R===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(a,T,P))return{extent:e,srcExtent:h,srcTilePixelSize:k,pixelBlock:y.pixelBlocks[0]};let z=g&&null!=(0,S.FT)(h.spatialReference)&&this._hasNoneOrGCSShiftTransform,B=r.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");B&&!this.rasterJobHandler&&await(0,S.Hh)();let D,J=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:h,pixelSize:T.toJSON(),datumTransformation:F,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:B},r):(0,S.l0)({projectedExtent:e,srcBufferExtent:h,pixelSize:T,datumTransformation:F,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1,includeGCSGrid:B}),H=!r.requestRawData,N={rows:J.spacing[0],cols:J.spacing[1]},O=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(s,h.xmin):void 0,{pixelBlocks:E,mosaicSize:Z,isPartiallyFilled:L}=y,W=null;if(this.rasterJobHandler){let e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:Z,destDimension:H?{width:t,height:i}:null,coefs:H?J.coefficients:null,sampleSpacing:H?N:null,projectDirections:B,gcsGrid:B?J.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:r.interpolation,alignmentInfo:O,blockWidths:null},r);({pixelBlock:D,localNorthDirections:W}=e)}else{let e=(0,_.z7)(E,Z,{alignmentInfo:O});D=H?(0,_.$i)(e,{width:t,height:i},J.coefficients,N,r.interpolation):e,B&&J.gcsGrid&&(W=(0,_.QF)({width:t,height:i},J.gcsGrid),D=(0,C.Y2)(D,this.rasterInfo.dataType,W))}return r.requestRawData||B?{extent:e,srcExtent:h,srcTilePixelSize:k,pixelBlock:D,transformGrid:J,localNorthDirections:W,isPartiallyFilled:L}:{extent:e,srcExtent:e,srcTilePixelSize:k,pixelBlock:D}}async _fetchRawTiles(e,t,i,r){let{origin:n,blockBoundary:l}=this.rasterInfo.storageInfo,{blockWidth:s,blockHeight:a}=this.getBlockWidthHeight(e),{x:o,y:u}=t,{width:c,height:d,wrapCount:f}=i,p=this._getRasterTileAlignmentInfo(e,0);r.buffer&&(o-=r.buffer.cols,u-=r.buffer.rows,c+=2*r.buffer.cols,d+=2*r.buffer.rows);let m=0,g=0,y=0;f&&null!=p&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:m}=p),g*p.blockWidth-m>=o+c&&(m=0));let x=Math.floor(o/s),w=Math.floor(u/a),R=Math.floor((o+c+m-1)/s),b=Math.floor((u+d+m-1)/a),I=l[e];if(!I)return null;let{minRow:v,minCol:_,maxCol:S,maxRow:C}=I;if(0===f&&(b<v||R<_||w>C||x>S))return null;let k=[],M=!1,T=null==this.ioConfig.allowPartialFill?r.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=b;t++)for(let i=x;i<=R;i++){let n=i;if(!r.disableWrapAround&&f&&null!=p&&g<=i&&(n=i-g-y),t>=v&&n>=_&&C>=t&&S>=n){let i=this._fetchRawTile(e,t,n,r);T?k.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{M=!0,e(null)})})):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;let A=await Promise.all(k),P={height:(b-w+1)*a,width:(R-x+1)*s},{spatialReference:F}=this.rasterInfo,{x:z,y:B}=this.getPyramidPixelSize(e);return{extent:new h.A({xmin:n.x+x*s*z,xmax:n.x+(R+1)*s*z,ymin:n.y-(b+1)*a*B,ymax:n.y-w*a*B,spatialReference:F}),pixelBlocks:A,mosaicSize:P,isPartiallyFilled:M}}_fetchRawTile(e,t,i,r){let{storageInfo:n}=this.rasterInfo,l=null!=n.transposeInfo&&!!r.transposedVariableName;if(!l){let r=n.blockBoundary[e];if(!r)return Promise.resolve(null);let{minRow:l,minCol:s,maxCol:a,maxRow:o}=r;if(t<l||i<s||t>o||i>a)return Promise.resolve(null)}let s=l?r.transposeVariableName:r.sliceId,a=n.isBsqTile?r.bandIds:null,o=function(e,t,i){let r=[];return null!=t&&r.push(`sliceId=${t}`),null!=i&&r.push(`bandIds=${i.join(",")}`),r.length?`${e}?${r.join("&")}`:e}(this.rasterId,s,a),c=`${e}/${t}/${i}`,h=this.ioConfig.rawBlockCacheMode??"default",d="no-cache"===h,f="minimum"===h?void 0:r.registryId,p=d?null:F(o,f,c);if(null==p){let l=d?null:new AbortController,s=l?.signal??r.signal,a=r.bandIds?.slice();if(a?.length&&n.isBsqTile){let n=new Set(a),l=[],o=Array.from(n);for(let n of o)l.push(this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:{...r,bandIds:[n]}},{signal:s}));p=Promise.all(l).then(e=>{if(e.some(e=>null==e))return null;if(o.length!==a.length){let t=[];for(let i of a){let r=e[o.indexOf(i)];t.includes(r)&&(r=r.clone()),t.push(r)}e=t}return this.rasterJobHandler?this.rasterJobHandler.compositeBands({pixelBlocks:e},{signal:s,transferPixelsToWorker:!0}):(0,_.Wy)(e)})}else p=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:r},{signal:s});d||(z(o,f,c,p,l),p.catch(()=>B(o,f,c)))}return!d&&r.signal&&(0,u.u7)(r,()=>{P(o,f,c)}),p}_computeMagDirValues(e){let{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;let r=e[0].length;if("vector-magdir"===i){let t=e[1].map(e=>(e+360)%360);return[e[0],t]}let[n,l]=e,s=[],a=[];for(let e=0;e<r;e++){let[t,i]=(0,C.Lu)([n[e],l[e]]);s.push(t),a.push(i)}return[s,a]}_getRasterTileAlignmentInfo(e,t){return this._rasterTileAlignmentInfo??=(0,S.DO)(this.rasterInfo),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,r={}){let n={datumTransformation:r.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};r.srcResolution&&(n.srcResolution=r.srcResolution,this._updateSourceDataInfo(e,n));let l=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:s,srcHeight:a,pyramidLevel:o}=n,u=s/t,c=a/i,h=o<l&&u*c>=16,f=o===l&&this._requireTooManySrcTiles(s,a,t,i);if(h||f||0===s||0===a){let s=new d.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),a=(0,S.Wo)(s,this.rasterInfo.spatialReference,e,n.datumTransformation),f=!a||r.srcResolution&&a.x+a.y<r.srcResolution.x+r.srcResolution.y;if(h&&r.srcResolution&&f){let e=Math.round(Math.log(Math.max(u,c))/Math.LN2)-1;if(l-o+3>=e){let t=2**e;a={x:r.srcResolution.x*t,y:r.srcResolution.y*t}}}a&&(n.srcResolution=a,this._updateSourceDataInfo(e,n))}return this._requireTooManySrcTiles(n.srcWidth,n.srcHeight,t,i)&&(n.srcWidth=0,n.srcHeight=0),n}_requireTooManySrcTiles(e,t,i,r){let{tileInfo:n}=this.rasterInfo.storageInfo,l=e/i,s=t/r;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+r)/1024)||l>8||s>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;let{rasterInfo:i}=this,r=i.spatialReference,{srcResolution:n,datumTransformation:l}=t,{pyramidLevel:s,pyramidResolution:a,excessiveReading:o}=(0,S.t$)(n,i,this.ioConfig.sampling);if(o)return;let u=t.srcExtent||(0,S._l)(e,r,l);if(null==u)return;let c=i.transform;c&&(u=c.inverseTransform(u)),t.srcExtent=u;let{origin:h}=i.storageInfo,{width:d,height:f,ul:p}=(0,k.$g)(u,h,a,s);t.pyramidLevel=s,t.pyramidResolution=a,t.srcWidth=d,t.srcHeight=f,t.ul=p}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){let{srcLocation:i,position:r,pyramidLevel:n,useTransposedTile:l}=t,s=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[r])return{location:i,value:null};let{multidimensionalInfo:a}=this.rasterInfo;if(null==a||!l){let t=e.pixels.map(e=>e[r]),l={location:i,value:t,pyramidLevel:n},s=this._computeMagDirValues(t.map(e=>[e]));return s?.length&&(l.magdirValue=s.map(e=>e[0])),l}let o=e.pixels.map(e=>e.slice(r*s,r*s+s)),u=this._computeMagDirValues(o),{requestSomeSlices:c,identifyOptions:h}=t,d=(0,M.QW)(a,h.transposedVariableName);if(c){let e=(0,M.xx)(d,h.multidimensionalDefinition,h.timeExtent);o=o.map(t=>e.map(e=>t[e])),u=u?.map(t=>e.map(e=>t[e])),d=e.map(e=>d[e])}let f,p=e.noDataValues||this.rasterInfo.noDataValue,m={pixels:o,pixelType:e.pixelType};return null!=p&&((0,b.Sp)(m,p),f=m.mask),{location:i,value:null,dataSeries:d.map((e,t)=>{let i={value:0===f?.[t]?null:o.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new y.A({...e,isSlice:!0}))};return u?.length&&(i.magdirValue=[u[0][t],u[1][t]]),i}),pyramidLevel:n}}};(0,r.Cg)([(0,n.MZ)()],J.prototype,"_rasterTileAlignmentInfo",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"_tileFetchQueue",void 0),(0,r.Cg)([(0,n.MZ)({readOnly:!0})],J.prototype,"_isGlobalWrappableSource",null),(0,r.Cg)([(0,n.MZ)({readOnly:!0})],J.prototype,"_hasNoneOrGCSShiftTransform",null),(0,r.Cg)([(0,n.MZ)()],J.prototype,"_openPromise",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"rasterJobHandler",null),(0,r.Cg)([(0,n.MZ)({readOnly:!0})],J.prototype,"rasterId",null),(0,r.Cg)([(0,n.MZ)(g.OZ)],J.prototype,"url",null),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],J.prototype,"datasetName",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],J.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"hasUniqueSourceStorageInfo",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"rasterInfo",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"ioConfig",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"rawBlockRegistryIds",void 0),J=(0,r.Cg)([(0,n.$K)("esri.layers.raster.datasets.BaseRaster")],J)},23636(e,t,i){i.d(t,{A:()=>p});var r=i(32198),n=i(91429),l=i(49186),s=i(5443),a=i(86738),o=i(39829),u=i(22671),c=i(34930),h=i(47520),d=i(37373),f=i(49859);let p=class extends f.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,r={}){let{rasters:n}=this.primaryRasters,l=!1,{interpolation:s}=r,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!r.requestRawData&&a&&(l=1===n.length&&!r.skipRasterFunction,r={...r,interpolation:"bilinear",requestRawData:l}),r.requestRawData&&n.length>1&&!this.hasUniqueSourceStorageInfo&&(l=!1,r={...r,requestRawData:!1});let o=n.map(n=>n.fetchPixels(e,t,i,r)),u=await Promise.all(o),d=u.map(e=>e.pixelBlock),f=l||r.requestRawData?u.map(e=>e.srcTilePixelSize):void 0;if(r.skipRasterFunction||d.every(e=>null==e))return u[0];let p=u.find(e=>null!=e.pixelBlock)?.extent??e,m=await this._processPixelBlock(d,p,f),{transformGrid:g}=u[0];if(!l||null==m||null==g){let e=r.noClip?null:this.getClippingGeometry(p.spatialReference);return!r.noClip&&null!=m&&e&&(m=await(0,c.$Q)(m,p,e)),{...u[0],pixelBlock:m}}let y,x={rows:g.spacing[0],cols:g.spacing[1]};y=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[m],srcMosaicSize:{width:m.width,height:m.height},destDimension:{width:t,height:i},coefs:g.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:s,alignmentInfo:void 0,blockWidths:null},r)).pixelBlock:(0,h.$i)(m,{width:t,height:i},g.coefficients,x,s);let w=r.noClip?null:this.getClippingGeometry(e.spatialReference);return!r.noClip&&null!=y&&null!=w&&(y=await(0,c.$Q)(y,e,w)),{extent:e,srcExtent:u[0].srcExtent,pixelBlock:y,srcTilePixelSize:u[0].srcTilePixelSize}}async processOnePixel(e,t){let{extent:i,pixelBlock:r}=t;if(!r)return null;let{row:n,col:l}=e,{width:a,height:o}=r;if(n<0||n>=o||l<0||l>=a)return null;let{neighborhoodSize:u}=this.rasterFunction,c=Math.max(2,u.rows),d=Math.max(2,u.cols),f=d>>>1,p=c>>>1,m={x:Math.max(0,l-f),y:Math.max(0,n-p)},g=i.width/a,y=i.height/o,x=i.xmin+g*m.x,w=x+g*d,R=i.ymax-y*m.y,b=R-y*c,I=new s.A({xmin:x,ymin:b,xmax:w,ymax:R,spatialReference:i.spatialReference}),v=(0,h.$Q)(r,m,{width:d,height:c});if(null==v)return null;let _=await this.processPixelData({extent:I,pixelBlock:v}),S=(n-m.y)*d+(l-m.x);return _&&0!==_.mask?.[S]?_.pixels.map(e=>e[S]):null}async processPixelData(e){let{extent:t,pixelBlock:i}=e;if(!i)return null;let r=new a.A({x:t.width/i.width,y:t.height/i.height,spatialReference:t.spatialReference});return await this._processPixelBlock([i],t,[r])}getClippingGeometry(e){let t=this._clippingGeometry.get("0");if(!e||!t)return t;let i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e),r=this._clippingGeometry.get(i);return r??(r=e.equals(t.spatialReference)?t:(0,d.uk)(t,e),this._clippingGeometry.set(i,r)),r}async _open(e){let{rasterFunction:t}=this;t.isRoot=!0,this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach(e=>e.rasterJobHandler=this.rasterJobHandler));let{rasters:i,rasterIds:r}=this.primaryRasters,n=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(n);let s=i.map(({rasterInfo:e})=>e),a=t.bind({rasterInfos:s,rasterIds:r});if(t.rawSourceRasterInfos=s,!a.success||0===s.length)throw new l.A("raster-function:open",`cannot bind the function: ${a.error??""}`);let o="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===o?.functionName&&(t.rasterInfo.attributeTable=u.A.fromJSON(o.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();let c=s[0];this.hasUniqueSourceStorageInfo=1===s.length||s.slice(1).every(e=>function(e,t){let{storageInfo:i,pixelSize:r,spatialReference:n,extent:l}=e,{storageInfo:s,pixelSize:a,spatialReference:o,extent:u}=t;return r.x===a.x&&r.y===a.y&&n.equals(o)&&l.equals(u)&&i.blockHeight===s.blockHeight&&i.blockWidth===s.blockWidth&&i.maximumPyramidLevel===s.maximumPyramidLevel&&i.firstPyramidLevel===s.firstPyramidLevel&&i.pyramidBlockWidth===s.pyramidBlockWidth&&i.pyramidBlockHeight===s.pyramidBlockHeight&&i.pyramidScalingFactor===s.pyramidScalingFactor}(e,c)),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _processPixelBlock(e,t,i){let{processParameters:r,primaryRasters:{rasterIds:n}}=this;return this.rasterJobHandler?await this.rasterJobHandler.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:n,parameters:r}):this.rasterFunction.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:n},r)}async _updateClipGeometry(){let e=this.rasterFunction.getClippingGeometries()[0],t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){let{extent:e}=this.rasterInfo,{densifyExecute:r}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(4642)]).then(()=>i(88411)),{differenceExecute:n}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(7217)]).then(()=>i(93054)),l=r(o.A.fromExtent(e),2*(e.width+e.height)/40);l=(0,d.uk)(l,t.spatialReference),t=n(l,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"tileType",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"processParameters",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"primaryRasters",void 0),p=(0,r.Cg)([(0,n.$K)("esri.layers.raster.datasets.FunctionRaster")],p)},330(e,t,i){function r(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let n=[];if(t){let l=r(e,i);for(let e=0;e<l.length;e++)r(l[e],t).forEach(e=>n.push(e));return n}let l=e.getElementsByTagNameNS("*",i);if(!l||0===l.length)return[];for(let e=0;e<l.length;e++)n.push(l[e]||l.item(e));return n}function n(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let l=r(e,i);return l.length>0?t?n(l[0],t):l[0]:null}function l(e,t=null){let i,r=t?n(e,t):e;return r?(i=r.textContent||r.nodeValue,i?i.trim():null):null}function s(e,t){let i,n=r(e,t),l=[];for(let e=0;e<n.length;e++)i=n[e].textContent||n[e].nodeValue,i&&(i=i.trim(),""!==i&&l.push(i));return l}function a(e,t=null){return l(e,t)?.split(" ").map(e=>Number(e))??[]}function o(e,t){return s(e,t).map(e=>Number(e))}function u(e,t){let i=l(e,t);return Number(i)}function c(e,t){let i=e?.nodeName?.toLowerCase(),r=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===r}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>s,IC:()=>r,Ui:()=>o,V6:()=>n,g7:()=>c,mX:()=>l,pN:()=>a,v7:()=>u,vv:()=>h})},91806(e,t,i){i.d(t,{A:()=>o});var r,n=i(32198),l=i(91429),s=i(56507),a=i(25482);let o=class extends a.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"cols",void 0),(0,n.Cg)([(0,l.MZ)({type:s.jz,json:{write:!0}})],o.prototype,"level",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],o.prototype,"levelValue",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"origin",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],o.prototype,"resolution",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"rows",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],o.prototype,"scale",void 0),o=r=(0,n.Cg)([(0,l.$K)("esri.layers.support.LOD")],o)},87045(e,t,i){i.d(t,{A:()=>w});var r,n=i(32198),l=i(91429),s=i(56507),a=i(66552),o=i(25482),u=i(86211),c=i(86738),h=i(16930),d=i(21325),f=i(28735),p=i(91806),m=i(72802),g=i(36005),y=i(43937);const x=new a.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let w=class extends o.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:l=h.A.WebMercator,numLODs:s=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new p.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=s-1;i>=0;i--)e.unshift(new p.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new c.A({x:0,y:0,spatialReference:l}),size:[n,n],spatialReference:l})}let a=(0,d.Vp)(l),o=e.origin?new c.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):a?new c.A({x:a.origin[0],y:a.origin[1],spatialReference:l}):new c.A({x:0,y:0,spatialReference:l}),f=1/(39.37*(0,u.GA)(l)*96),m=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*f;m.push(new p.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/n*591657527.5917094:256/n*591657527.591555,i=Math.ceil(s/t);m.push(new p.A({level:0,scale:e,resolution:e*f}));for(let r=1;r<i;r++){let i=e/2**t,n=i*f;m.push(new p.A({level:r,scale:i,resolution:n})),e=i}}return new r({dpi:96,lods:m,origin:o,size:[n,n],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return c.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],n=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,n[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],n=t[r+1];if(i<=e)return r;if(n===e)return r+1;if(i>e&&n<e)return r+Math.log(i/e)/Math.log(i/n)}return r}tileAt(e,t,i,r){let n,l,s=this.lodAt(e);if(!s)return null;if("number"==typeof t)n=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))n=t.x,l=t.y,r=i;else{let e=(0,f.y)(t,this.spatialReference);if(null==e)return null;n=e.x,l=e.y,r=i}let a=s.resolution*this.size[0],o=s.resolution*this.size[1];return r??=new m.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/o+.001),r.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,n=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,n=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+n,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],n=this.lods.length-t;for(let e=0;e<n;e++){let r=e+t,{scale:n,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new p.A({level:e,scale:n,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{read:x.read,write:x.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,n.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,n.Cg)([(0,l.MZ)({type:[p.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,n.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n.Cg)([(0,y.K)("size",{cols:{type:s.jz},rows:{type:s.jz}})],w.prototype,"writeSize",null),(0,n.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,n.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},72802(e,t,i){i.d(t,{U:()=>n});var r=i(19419);class n{constructor(e,t,i,n=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=n}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new n(e.level,e.row,e.col,e.extent)}}}}]);
|
|
1
|
+
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[8595],{82806(e,t,i){var r=i(32198),n=i(91429),l=i(56507),s=i(49186),a=i(53966),o=i(86738),u=i(16930),c=i(21325),h=i(12711),d=i(85676),f=i(94359),p=i(78888),m=i(22048),g=i(49410),y=i(34606),x=i(51508),w=i(7548),R=i(23636),b=i(4366),I=i(34930),v=i(99235),_=i(37373),S=i(51927),C=i(60694),k=i(10873),M=i(45617),T=i(33446),A=i(43577),P=i(13868),F=i(22796),z=i(69409),B=i(87045),D=i(93223),J=i(36005);i.d(t,["b",0,e=>{let t=e,H=class extends t{constructor(...e){super(...e),this._draRasterConfig=null,this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=(0,w.qg)(e[0]?.raster)}destroy(){this._draRasterConfig?.rasterJobHandler?.destroy(),this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,C.Jf)(e,a.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;let{activePresetRendererName:e,presetRenderers:t}=this;return e?(t?.find(({name:t})=>t===e))?.renderer.clone():this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){let r=t?.layerDefinition?.drawingInfo?.renderer;return(0,f.LF)(r,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,l.PZ)(m.A,e).clone();let{serviceRasterInfo:i}=this;if(null==i)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");let{geometry:r}=e;if(null==r)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let n=r,{spatialReference:a}=i;if(!r.spatialReference.equals(a)){await(0,_.Hh)();let e="extent"===r.type?(0,_._l)(r,a):(0,_.uk)(r,a);if(null==e)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");n=e}let u=e.pixelSize??new o.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:a}),{extent:c,width:h,height:d}=(0,I.b7)(i,n,u),f=await this.fetchPixels(c,h,d,{...t,interpolation:"nearest"});if(null==f.pixelBlock)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");let p=await(0,I.$Q)(f.pixelBlock,c,n),g=this._rasterJobHandler;return g?g.computeStatisticsHistograms({pixelBlock:p},t):(0,S.eH)(p)}normalizeRasterFetchOptions(e){let{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;let i=(0,b.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return!this.loaded||"imagery-tile"!==this.type||!this.rasterFunction&&!this._cachedRasterFunctionJson||JSON.stringify(this.rasterFunction)===JSON.stringify(this._cachedRasterFunctionJson)||(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction()),this._rasterFunctionUpdatePromise}async updateRenderer(){let{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;let{rasterInfo:r}=this.raster,n=(0,b.ct)(r,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,l=(0,h.m7)(r,n);return this._updateSymbolizer(t,i,n,l)}async applyRenderer(e,t,i){let r=e?.pixelBlock;if(!(null!=r&&r.pixels&&r.pixels.length>0))return null;await this.updateRenderer();let n=this.bandIds??[],{pixelBlock:l}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:n,symbolizer:this.symbolizer},i);return l}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,w.qg)(t)){let i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;let r=(0,c.Vp)(e);return B.A.create({size:256,spatialReference:e,origin:r?{x:r.origin[0],y:r.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,r={}){if(N(this),r.requestAsImageElement){let n=this.getTileUrl(e,t,i),{data:l}=await(0,p.A)(n,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r.signal});return l}let{serviceRasterInfo:n}=this;if(null!=n.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition){let l=r.tileInfo||n.storageInfo.tileInfo,s=this.raster.getTileExtentFromTileInfo(e,t,i,l);if(s)return{extent:s,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(r={...r,buffer:{cols:1,rows:1}}),r={...r,refreshParameters:this.refreshParameters},this.raster.fetchTile(e,t,i,r)}async fetchImageBitmapTile(e,t,i,r={}){N(this);let n=this.getTileUrl(e,t,i),{data:l}=await(0,p.A)(n,{responseType:"blob",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:r?.signal});return(0,T.Cp)(l,e,t,i,r)}async fetchPixels(e,t,i,r={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(r=this.normalizeRasterFetchOptions(r)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);let n=await this.raster.fetchPixels(e,t,i,r);return r.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(n.pixelBlock=n.pixelBlock?.extractBands(r.bandIds)),n}async getSamples(e,t){await this.load();let i=(0,l.PZ)(y.A,e).clone();if(i.interpolation&&"nearest"!==i.interpolation)throw new s.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");let r=i.mosaicRule?.multidimensionalDefinition,n={...t,multidimensionalDefinition:r},a=(await this._getSampleLocations(i)).map(e=>this.identify(e,n).then(t=>(t.location=e,t))),o=(await Promise.all(a)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new x.A({samples:o})}async identify(e,t={}){await this.load();let i=(0,l.PZ)(o.A,e).clone().normalize(),{raster:r,serviceRasterInfo:n}=this;if(null!=n?.multidimensionalInfo&&(!n.hasMultidimensionalTranspose||!(0,b.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:i,value:null};let a,u=this.multidimensionalSubset?.areaOfInterest;if(u&&!u.contains(i))throw new s.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");if(this.serviceRasterInfo?.storageInfo.isBsqTile){let e=(0,w.qg)(r)?this.getRawDisplayBandIds():this.bandIds;a=e?.length?e:void 0}return r.identify(i,{...t,bandIds:a})}hasStandardTime(){let e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;let t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date((0,b.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){let t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,b.z2)(this.multidimensionalSubset,t)}async getDynamicRangeInputRaster(){if(!this.rasterFunction||!(0,w.qg)(this.raster)||!this._cachedRasterFunctionJson)return null;let e=JSON.stringify(this._cachedRasterFunctionJson);if(this._draRasterConfig?.functionJson===e)return this._draRasterConfig;let t=this.raster.rasterFunction.queryRasterFunction(e=>"Stretch"===e.functionName&&e.functionArguments.dynamicRangeAdjustment);if(!t)return null;let i=t.toJSON(),r=this.raster.primaryRasters.rasters,n=t.functionArguments.raster,l=i.rasterFunctionArguments;if(!n||"object"!=typeof n||!("functionName"in n))return this._draRasterConfig={functionJson:e,raster:r[0],functionArguments:l,rasterJobHandler:this._draRasterConfig?.rasterJobHandler},this._draRasterConfig;let s={raster:r[0]};r.length>1&&r.forEach(e=>s[e.url]=e);let a=(0,v.vt)(n.toJSON(),s),o=new R.A({rasterFunction:a});await o.open();let u=this._draRasterConfig?.rasterJobHandler;try{u||(u=new z.A,await u.initialize()),o.rasterJobHandler=u,await o.syncJobHandler()}catch{}return this._draRasterConfig={functionJson:e,raster:o,functionArguments:l,rasterJobHandler:u},this._draRasterConfig}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||=(0,b.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset}),this.rasterFunction&&(0,w.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;N(this);let{raster:e}=this;e.rasterJobHandler!==this._rasterJobHandler&&(e.rasterJobHandler=this._rasterJobHandler,(0,w.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer())}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){let{geometry:t}=e;if("point"===t.type)return[t];let{spatialReference:r,type:n}=t;if("multipoint"===n)return t.points.map(e=>new o.A({x:e[0],y:e[1],spatialReference:r}));if("polyline"===n){let n=t;if(e.sampleCount||e.sampleDistance){let{densifyExecute:r}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(4642)]).then(()=>i(88411)),{lengthExecute:l}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(2174)]).then(()=>i(965)),s=l(t,{unit:"meters"}),a=Math.min(e.sampleCount||100,1e3),o=e.sampleDistance;o||=s/(a+ +(2===n.paths[0].length)),n=r(t,o,{unit:"meters"})}return n.paths.flatMap(e=>e.map(e=>new o.A({x:e[0],y:e[1],spatialReference:r})))}let l=Math.min(e.sampleCount||100,1e3),s="extent"===t.type,a=s?t:t.extent,u=Math.sqrt(a.width*a.height/l),c=a.height/u,h=a.width/u,{xmin:d,ymax:f}=a,p=[];for(let e=0;e<c;e++)for(let i=0;i<h;i++){let n=new o.A({x:d+(i+.5)*u,y:f-(e+.5)*u,spatialReference:r});(s||t.contains(n))&&p.push(n)}return p}_configDefaultInterpolation(){if(null==this.interpolation){N(this);let{raster:e}=this,t=(0,h.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){N(this);let{rasterInfo:t}=this.raster,i=(0,b.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset})?.name,r=(0,h.I8)({variableName:i,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=r?.bandIds??(0,h.ci)(t)),!this.renderer||"override"===e){let e=(0,h.Mm)(this.raster),n=r?.renderer??(0,h.PD)(t,{bandIds:this.bandIds,variableName:i,rasterFunctionColorRamp:e}),l=t.statistics,s=l&&l.length>0?l[0]:null,a=s?.max??0,o=s?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===n.type&&(a>1e24||o<-1e24)&&(n.dynamicRangeAdjustment=!0,n.customStatistics=null,"none"===n.stretchType&&(n.stretchType="min-max")),this.renderer=n}let n=(0,h.$P)({...this.renderer.toJSON(),variableName:i}),l=(0,h.m7)(t,i);this.symbolizer?(this.symbolizer.rendererJSON=n,this.symbolizer.rasterInfo=l):this.symbolizer=new d.A({rendererJSON:n,rasterInfo:l});let s=this.symbolizer.bind();if(s.success){if("auto"===e){let{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){let e=(0,h.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){let e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else a.A.getLogger(this).warn("imagery-tile-mixin",s.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,w.qg)(this.raster)){let e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",F.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,w.qg)(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];let{rasterFunction:r}=this;if(r){let i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);let n=(0,v.vt)(r.functionDefinition?.toJSON()??r.toJSON(),i),l=new R.A({rasterFunction:n});l.rasterJobHandler=this._rasterJobHandler,await l.open(),this.raster=l}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!r)return;let{bandIds:n}=this,{bandCount:l}=this.raster.rasterInfo,s=n?.length?n.some(e=>e>=l):l>=3;n&&(s||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){let{rasterInfo:i}=this.raster,r=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),n=(i.pixelSize.x+i.pixelSize.y)/2*r;if(!e.dataSeries?.length)return[new g.A({location:e.location,pixelValue:e.value,locationId:t,resolution:n})];let l=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:r},s)=>{let a={Variables:r[0].variableName,Dimensions:r.flatMap(({dimensionName:e})=>e).join(",")};for(let{dimensionName:e,values:t}of r){a[e]=Array.isArray(t[0])?t[0][0]:t[0];let i=t[t.length-1];a[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}let o=new g.A({location:e.location,pixelValue:i,rasterId:s,locationId:t,resolution:n,attributes:a});l.push(o)}),l}};function N(e){if(!e.raster||!e.serviceRasterInfo)throw new s.A("imagery-tile","no raster")}return(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_cachedRasterFunctionJson",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_compatibleFullExtent",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_draRasterConfig",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_isConstructedFromFunctionRaster",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"_rasterFunctionUpdatePromise",void 0),(0,r.Cg)([(0,n.MZ)({type:[l.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],H.prototype,"bandIds",void 0),(0,r.Cg)([(0,n.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],H.prototype,"copyright",void 0),(0,r.Cg)([(0,n.MZ)({json:{read:!1}})],H.prototype,"fullExtent",null),(0,r.Cg)([(0,n.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,D.e)(P.SZ)],H.prototype,"interpolation",void 0),(0,r.Cg)([(0,n.MZ)()],H.prototype,"ioConfig",void 0),(0,r.Cg)([(0,n.MZ)({type:[M.A],json:{write:!0}})],H.prototype,"multidimensionalDefinition",null),(0,r.Cg)([(0,n.MZ)({type:A.A,json:{write:!0}})],H.prototype,"multidimensionalSubset",void 0),(0,r.Cg)([(0,n.MZ)()],H.prototype,"raster",void 0),(0,r.Cg)([(0,n.MZ)({type:F.A})],H.prototype,"rasterFunction",null),(0,r.Cg)([(0,n.MZ)({constructOnly:!0})],H.prototype,"serviceRasterInfo",void 0),(0,r.Cg)([(0,n.MZ)()],H.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,n.MZ)({readOnly:!0,type:u.A,json:{read:!1}})],H.prototype,"spatialReference",void 0),(0,r.Cg)([(0,n.MZ)({type:B.A})],H.prototype,"tileInfo",void 0),(0,r.Cg)([(0,n.MZ)(k.OZ)],H.prototype,"url",null),(0,r.Cg)([(0,n.MZ)({types:f.uy})],H.prototype,"renderer",null),(0,r.Cg)([(0,n.MZ)({types:f.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){let e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:f.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],H.prototype,"internalRenderer",null),(0,r.Cg)([(0,J.w)("internalRenderer")],H.prototype,"readRenderer",null),(0,r.Cg)([(0,n.MZ)({clonable:!1})],H.prototype,"symbolizer",void 0),H=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.TiledImagery")],H),H}])},49859(e,t,i){i.d(t,{A:()=>J});var r=i(32198),n=i(91429),l=i(56507),s=i(49186),a=i(25482),o=i(53966),u=i(17676),c=i(563),h=i(5443),d=i(86738),f=i(16930),p=i(78888),m=i(60694),g=i(10873),y=i(45617),x=i(91806),w=i(20223),R=i(87045),b=i(94778),I=i(33196),v=i(34930),_=i(47520),S=i(37373),C=i(34251),k=i(7548),M=i(4366);const T=new Map,A=new class{constructor(e=15e3,t=5e3,i=-1){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t),this._size=i}decreaseRefCount(e,t){let i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){let e=r.get(i);return e.refCount--,e.refCount<=0&&(r.delete(i),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){let i=e+"/"+t,r=this._cachedBlocks;if(r.has(i)){let e=r.get(i);return e.ts=Date.now(),e.refCount++,r.delete(i),r.set(i,e),e.block}return null}putBlock(e,t,i,r){let n=this._cachedBlocks,l=e+"/"+t;if(n.has(l)){let e=n.get(l);e.ts=Date.now(),e.refCount++}else n.set(l,{block:i,ts:Date.now(),refCount:1,controller:r});this._trim(),this._updateTimer()}deleteBlock(e,t){let i=this._cachedBlocks,r=e+"/"+t;i.has(r)&&i.delete(r)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;let e=this._cachedBlocks;this._timer=setInterval(()=>{let t=Array.from(e),i=Date.now();for(let r=0;r<t.length&&t[r][1].ts<=i-this._duration;r++)e.delete(t[r][0]);0===e.size&&this._clearTimer()},this._interval)}_trim(){let e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;let t=Array.from(e).sort((e,t)=>e[1].refCount-t[1].refCount||e[1].ts-t[1].ts);for(let i=0;i<t.length-this._size;i++)e.delete(t[i][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}}(15e3,5e3,100);function P(e,t,i){let r=T.get(e);if(!r)return null==t?A.decreaseRefCount(e,i):0;if(null==t||null==r[t])return A.decreaseRefCount(e,i);let n=r[t]?.cache,l=n?.get(i);if(n&&l){if(l.refCount--,0===l.refCount){n.delete(i);for(let e=0;e<r.length;e++)r[e]?.cache.delete(i);l.controller&&l.controller.abort()}return l.refCount}return 0}function F(e,t,i){let r=T.get(e);if(!r)return null==t?A.getBlock(e,i):null;if(null==t||null==r[t]){for(let e=0;e<r.length;e++){let t=r[e]?.cache.get(i);if(t)return t.refCount++,t.block}return A.getBlock(e,i)}let n=r[t]?.cache.get(i);if(n)return n.refCount++,n.block;for(let e=0;e<r.length;e++){if(e===t||!r[e])continue;let n=r[e]?.cache,l=n?.get(i);if(n&&l)return l.refCount++,n.set(i,l),l.block}return null}function z(e,t,i,r,n=null){let l=T.get(e);if(!l)return void(t??A.putBlock(e,i,r,n));if(null==t||null==l[t])return void A.putBlock(e,i,r,n);let s={refCount:1,block:r,isResolved:!1,isRejected:!1,controller:n};r.then(()=>s.isResolved=!0).catch(()=>s.isRejected=!0),l[t]?.cache.set(i,s)}function B(e,t,i){let r=T.get(e);r?null==t||null==r[t]?A.deleteBlock(e,i):r[t]?.cache.delete(i):t??A.deleteBlock(e,i)}let D=0,J=class extends a.o{constructor(e){super(function(e){return e?.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:R.A.create(),...e.ioConfig}}),e}(e)),this._tileFetchQueue=new c.QueueProcessor({concurrency:32,process:(e,t)=>this.fetchRawTile(e.pyramidLevel,e.row,e.col,{...e.options,signal:t})}),this.datasetName=null,this.datasetFormat=null,this.hasUniqueSourceStorageInfo=!0,this.rasterInfo=null,this.ioConfig={sampling:"closest"},this.rawBlockRegistryIds=[],this.refresh=(0,u.sg)(async e=>{await this._openPromise;let t=await this._refresh(e);return t.dataChanged&&function(e,t){let i=T.get(e);if(i){let e=t.map(e=>i[e]).filter(e=>null!=e);for(let t of e)t&&(Array.from(t.cache.values()).forEach(e=>{!e.isResolved&&!e.isRejected&&e.controller&&e.controller.abort()}),t.cache.clear())}}(this.rasterId,this.rawBlockRegistryIds),t})}get _isGlobalWrappableSource(){let{rasterInfo:e}=this,t=(0,S.FT)(e.spatialReference);return null!=t&&e.extent.width>=t/2}get _hasNoneOrGCSShiftTransform(){let{transform:e}=this.rasterInfo;return null==e||"gcs-shift"===e.type}set rasterJobHandler(e){this._set("rasterJobHandler",e),(0,k.qg)(this)&&this.primaryRasters?.rasters?.forEach(t=>t.rasterJobHandler=e)}get rasterId(){return this.url||"rasterId-"+D++}set url(e){this._set("url",(0,m.Jf)(e,o.A.getLogger(this)))}async open(e){return this._openPromise??=(0,S.Hh)().then(()=>this._open(e)),this._openPromise}async fetchTile(e,t,i,r={}){let n=r.tileInfo||this.rasterInfo.storageInfo.tileInfo,l=this.getTileExtentFromTileInfo(e,t,i,n);if(!l)throw new s.A("imagery-tile:out-of-bounds","Level for fetch tile out of range");return r={noClip:!0,...r},this.fetchPixels(l,n.size[0],n.size[1],r)}async identify(e,t={}){e=(0,l.PZ)(d.A,e).clone().normalize();let{multidimensionalDefinition:i,timeExtent:r}=t,{rasterInfo:n}=this,{hasMultidimensionalTranspose:s,multidimensionalInfo:a}=n,{transposedVariableName:o}=t,u=null!=a&&s&&(null!=r||(0,M.DY)(i));u&&!o&&(o=null!=i&&i.length>0?i[0].variableName??void 0:a.variables[0].name,t={...t,transposedVariableName:o}),t=this._getRequestOptionsWithSliceId(t);let{spatialReference:c,extent:f}=n,{datumTransformation:p}=t,m=(0,S._I)(e,c,p);if(!f.intersects(m))return{location:m,value:null};if(null!=n.transform){let e=n.transform.inverseTransform(m);if(!n.nativeExtent.intersects(e))return{location:e,value:null};m=e}let g=null!=o&&null!=a&&n.hasMultidimensionalTranspose;if((0,k.qg)(this)){let e=this.primaryRasters.rasters[0];if(g)return e.identify(m,t);let{pixelSize:r}=n,l=3*r.x/2,s=3*r.y/2,a=new h.A({xmin:m.x-l,xmax:m.x+l,ymin:m.y-s,ymax:m.y+s,spatialReference:c}),o={interpolation:"nearest",multidimensionalDefinition:i,sliceId:t.sliceId,bandIds:t.bandIds},{pixelBlock:u}=await e.fetchPixels(a,3,3,o),{pixelBlock:d}=await this.fetchPixels(a,3,3,o);if(null==u)return{location:m,value:null};let f,p=!u.mask||u.mask[4]?u.pixels.map(e=>e[4]):null;return null!=d&&(f=!d.mask||d.mask[4]?d.pixels.map(e=>e[4]):void 0),{location:m,value:p,processedValue:f,pyramidLevel:0}}let y=0;if(!g){let{srcResolution:i}=t;if(i)i.spatialReference&&(i=(0,v.T5)(new d.A(i),c)),y=(0,S.t$)(i,n,this.ioConfig.sampling).pyramidLevel;else if(y=await this.computeBestPyramidLevelForLocation(e,t),null==y)return{location:m,value:null}}let x=this.identifyPixelLocation(m,y,null,g);if(null===x)return{location:m,value:null};let{row:w,col:R,rowOffset:b,colOffset:I,blockWidth:_}=x,C=await this._fetchRawTile(y,w,R,t);if(!C?.pixels?.length)return{location:m,value:null};let T=b*_+I;return this._processIdentifyResult(C,{srcLocation:m,position:T,pyramidLevel:y,useTransposedTile:!!g,requestSomeSlices:u,identifyOptions:t})}async fetchPixels(e,t,i,r={}){e=(0,S.Ps)(e),r=this._getRequestOptionsWithSliceId(r);let{_hasNoneOrGCSShiftTransform:n}=this;if(r.requestRawData&&n)return this._fetchPixels(e,t,i,r);let l=(0,S.FT)(e.spatialReference),s=(0,S.OM)(e);if(null==l||0===s||1===s&&this._isGlobalWrappableSource&&n)return this._fetchPixels(e,t,i,r);if(s>=3)return{extent:e,pixelBlock:null};let a=[],{xmin:o,xmax:u}=e,c=Math.round(l/(u-o)*t),d=c-Math.round((l/2-o)/(u-o)*t),f=0,p=[];for(let n=0;n<=s;n++){let m=0===n?o:-l/2,g=n===s?u-l*n:l/2,y=new h.A({xmin:m,xmax:g,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),x=0===n?c-d:n===s?t-f:c;f+=x,p.push(x);let w=r.disableWrapAround&&n>0?null:this._fetchPixels(y,x,i,r);a.push(w)}let m=(await Promise.all(a)).map(e=>e?.pixelBlock),g=null,y={width:t,height:i};return g=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:m,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:p},r)).pixelBlock:(0,_.z7)(m,y,{blockWidths:p}),{extent:e,srcExtent:(0,S._l)(e,this.rasterInfo.spatialReference,r.datumTransformation),pixelBlock:g}}async fetchRawPixels(e,t,i,r={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};let n=await this._fetchRawTiles(e,t,i,r),{nativeExtent:l,nativePixelSize:s,storageInfo:a}=this.rasterInfo,o=2**e,u=s.x*o,c=s.y*o,d=new h.A({xmin:l.xmin+u*t.x,xmax:l.xmin+u*(t.x+i.width-1),ymin:l.ymax-c*(t.y+i.height-1),ymax:l.ymax-c*t.y,spatialReference:l.spatialReference});if(!n)return{extent:d,srcExtent:d,pixelBlock:null};let{pixelBlocks:f,mosaicSize:p}=n;if(1===f.length&&null!=f[0]&&f[0].width===i.width&&f[0].height===i.height)return{extent:d,srcExtent:d,pixelBlock:n.pixelBlocks[0]};let m,g=e>0?a.pyramidBlockWidth:a.blockWidth,y=e>0?a.pyramidBlockHeight:a.blockHeight,x={x:t.x%g,y:t.y%y};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:f,srcMosaicSize:p,destDimension:i,clipOffset:x,clipSize:i,coefs:null,sampleSpacing:null,interpolation:r.interpolation,alignmentInfo:null,blockWidths:null},r)).pixelBlock:(0,_.z7)(f,p,{clipOffset:x,clipSize:i}),{extent:d,srcExtent:d,pixelBlock:m}}fetchRawTile(e,t,i,r){throw new s.A("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,S._l)(this.rasterInfo.extent,e)}decodePixelBlock(e,t,i){return this.rasterJobHandler?this.rasterJobHandler.decode({data:e,options:t},i):(0,I.D)(e,t,i)}async request(e,t,i=0){let{customFetchParameters:r}=this.ioConfig,{range:n,query:l,headers:s}=t;i=i??t.retryCount??this.ioConfig.retryCount;let a=n?{Range:`bytes=${n.from}-${n.to}`}:null;try{return await(0,p.A)(e,{...t,query:{...l,...r},headers:{...s,...a}})}catch(r){if(i>0)return i--,this.request(e,t,i);throw r}}getSliceIndex(e){let{multidimensionalInfo:t}=this.rasterInfo;return null==t||null==e||0===e.length?null:(0,M.NG)(e,t)}getTileExtentFromTileInfo(e,t,i,r){let n=r.lodAt(e);return n?this.getTileExtent({x:n.resolution,y:n.resolution},t,i,r.origin,r.spatialReference,r.size):null}updateTileInfo(){let{storageInfo:e,spatialReference:t,extent:i,pixelSize:r}=this.rasterInfo,{pyramidResolutions:n}=e;if(!e.tileInfo){let l=[],s=e.maximumPyramidLevel||0,a=(r.x+r.y)/2,o=1/.0254*96*a;for(let e=0;e<=s&&(l.unshift(new x.A({level:s-e,resolution:a,scale:o})),e!==s);e++)if(n){let t=(n[e].x+n[e].y)/2;o*=t/a,a=t}else a*=2,o*=2;let u=new d.A({x:i.xmin,y:i.ymax,spatialReference:t});e.tileInfo=new R.A({origin:u,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:l}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,i=512,r){let{width:n,height:l,nativeExtent:s,pixelSize:a,spatialReference:o}=e,u=new d.A({x:s.xmin,y:s.ymax,spatialReference:o});r??=Math.max(0,Math.round(Math.log(Math.max(n,l))/Math.LN2-8));let c=this.computeBlockBoundary(s,t,i,{x:s.xmin,y:s.ymax},[a],r);e.storageInfo=new w.A({blockWidth:t,blockHeight:i,pyramidBlockWidth:t,pyramidBlockHeight:i,origin:u,firstPyramidLevel:1,maximumPyramidLevel:r,blockBoundary:c})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,i,r,n,l=0,s=2){if(1===n.length&&l>0){n=[...n];let{x:e,y:t}=n[0];for(let i=0;i<l;i++)e*=s,t*=s,n.push({x:e,y:t})}let a=[],{x:o,y:u}=r;for(let r=0;r<n.length;r++){let{x:l,y:s}=n[r];a.push({minCol:Math.floor((e.xmin-o+.1*l)/t/l),maxCol:Math.floor((e.xmax-o-.1*l)/t/l),minRow:Math.floor((u-e.ymax+.1*s)/i/s),maxRow:Math.floor((u-e.ymin-.1*s)/i/s)})}return a}getPyramidPixelSize(e){let{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:i,pyramidScalingFactor:r}=this.rasterInfo.storageInfo;if(0===e)return t;if(null!=i&&i.length)return i[e-1];let n=r**e;return{x:t.x*n,y:t.y*n}}identifyPixelLocation(e,t,i,r){let{spatialReference:n,nativeExtent:l,storageInfo:s}=this.rasterInfo,{maximumPyramidLevel:a,origin:o,transposeInfo:u}=s,c=r&&null!=u?u.tileSize[0]:s.blockWidth,h=r&&null!=u?u.tileSize[1]:s.blockHeight,d=(0,S._I)(e,n,i);if(!l.intersects(d)||t<0||t>a)return null;let{x:f,y:p}=this.getPyramidPixelSize(t),m=(o.y-d.y)/p/h,g=(d.x-o.x)/f/c,y=Math.min(h-1,Math.floor((m-Math.floor(m))*h)),x=Math.min(c-1,Math.floor((g-Math.floor(g))*c));return{pyramidLevel:t,row:Math.floor(m),col:Math.floor(g),rowOffset:y,colOffset:x,blockWidth:c,srcLocation:d}}getTileExtent(e,t,i,r,n,l){let[s,a]=l,o=r.x+i*s*e.x,u=o+s*e.x,c=r.y-t*a*e.y,d=c-a*e.y;return new h.A({xmin:o,xmax:u,ymin:d,ymax:c,spatialReference:n})}getBlockWidthHeight(e){return{blockWidth:e>0?this.rasterInfo.storageInfo.pyramidBlockWidth:this.rasterInfo.storageInfo.blockWidth,blockHeight:e>0?this.rasterInfo.storageInfo.pyramidBlockHeight:this.rasterInfo.storageInfo.blockHeight}}isBlockOutside(e,t,i){let r=this.rasterInfo.storageInfo.blockBoundary[e];return!r||r.maxRow<t||r.maxCol<i||r.minRow>t||r.minCol>i}updateImageSpaceRasterInfo(e){let{pixelSize:t}=e,{width:i,height:r}=e,n=f.A.WebMercator;e.spatialReference=n,e.extent=e.nativeExtent=new h.A({xmin:-.5,ymax:.5,xmax:i-.5,ymin:.5-r,spatialReference:n}),e.isPseudoSpatialReference=!0,e.transform=null,e.pixelSize=new d.A({x:1,y:1,spatialReference:n});let{extent:l,storageInfo:s}=e;if(s){s.origin=new d.A({x:l.xmin,y:l.ymax,spatialReference:n});let{pyramidResolutions:i,tileInfo:r}=s;if(i&&i.forEach(e=>{e.x/=t.x,e.y/=t.y}),r){r.origin=s.origin;let t=(e.nativePixelSize.x+e.nativePixelSize.y)/2;r.lods.forEach((e,i)=>{e.resolution=t*2**i,e.scale=96*e.resolution/.0254})}}}async _refresh(e){return{dataChanged:!0}}async _fetchPixels(e,t,i,r={}){let n=(0,S.OM)(e);if(n>=2)return{extent:e,pixelBlock:null};let l=this._getSourceDataInfo(e,t,i,r),{pyramidLevel:s,srcResolution:a,srcWidth:o,srcHeight:u,ul:c}=l,{srcExtent:h}=l;if(0===o||0===u)return{extent:e,srcExtent:h,pixelBlock:null};let{rasterInfo:f}=this,p=f.transform,m="gcs-shift"===p?.type,g=null!=(0,S.FT)(e.spatialReference);(m||!g)&&(n=(0,S.OM)(h,m));let y=await this._fetchRawTiles(s,c,{width:o,height:u,wrapCount:n},r);if(!y)return{extent:e,srcExtent:h,pixelBlock:null};h=y.extent;let x=f.storageInfo,w=s>0?x.pyramidBlockWidth:x.blockWidth,R=s>0?x.pyramidBlockHeight:x.blockHeight,{x:b,y:I}=f.pixelSize;if(s>0){let{pyramidResolutions:e,pyramidScalingFactor:t}=x;if(null!=e&&e[s-1])({x:b,y:I}=e[s-1]);else{let e=t**s;b*=e,I*=e}}let v=f.spatialReference,k=new d.A({x:b,y:I,spatialReference:v}),M=w===o&&R===u&&c.x%w===0&&c.y%R===0,T=new d.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),A=!e.spatialReference.equals(v),P=v.isGeographic?1e-9:1e-4,{datumTransformation:F}=r;if(!A&&M&&1===y.pixelBlocks.length&&w===t&&R===i&&function(e,t,i){return Math.abs(e.x-t.x)<i&&Math.abs(e.y-t.y)<i}(a,T,P))return{extent:e,srcExtent:h,srcTilePixelSize:k,pixelBlock:y.pixelBlocks[0]};let z=g&&null!=(0,S.FT)(h.spatialReference)&&this._hasNoneOrGCSShiftTransform,B=r.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");B&&!this.rasterJobHandler&&await(0,S.Hh)();let D,J=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:h,pixelSize:T.toJSON(),datumTransformation:F,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:B},r):(0,S.l0)({projectedExtent:e,srcBufferExtent:h,pixelSize:T,datumTransformation:F,rasterTransform:p,hasWrapAround:n>0||z,isAdaptive:!1,includeGCSGrid:B}),H=!r.requestRawData,N={rows:J.spacing[0],cols:J.spacing[1]},O=this._hasNoneOrGCSShiftTransform?this._getRasterTileAlignmentInfo(s,h.xmin):void 0,{pixelBlocks:E,mosaicSize:Z,isPartiallyFilled:L}=y,W=null;if(this.rasterJobHandler){let e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:E,srcMosaicSize:Z,destDimension:H?{width:t,height:i}:null,coefs:H?J.coefficients:null,sampleSpacing:H?N:null,projectDirections:B,gcsGrid:B?J.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:r.interpolation,alignmentInfo:O,blockWidths:null},r);({pixelBlock:D,localNorthDirections:W}=e)}else{let e=(0,_.z7)(E,Z,{alignmentInfo:O});D=H?(0,_.$i)(e,{width:t,height:i},J.coefficients,N,r.interpolation):e,B&&J.gcsGrid&&(W=(0,_.QF)({width:t,height:i},J.gcsGrid),D=(0,C.Y2)(D,this.rasterInfo.dataType,W))}return r.requestRawData||B?{extent:e,srcExtent:h,srcTilePixelSize:k,pixelBlock:D,transformGrid:J,localNorthDirections:W,isPartiallyFilled:L}:{extent:e,srcExtent:e,srcTilePixelSize:k,pixelBlock:D}}async _fetchRawTiles(e,t,i,r){let{origin:n,blockBoundary:l}=this.rasterInfo.storageInfo,{blockWidth:s,blockHeight:a}=this.getBlockWidthHeight(e),{x:o,y:u}=t,{width:c,height:d,wrapCount:f}=i,p=this._getRasterTileAlignmentInfo(e,0);r.buffer&&(o-=r.buffer.cols,u-=r.buffer.rows,c+=2*r.buffer.cols,d+=2*r.buffer.rows);let m=0,g=0,y=0;f&&null!=p&&(({worldColumnCountFromOrigin:g,originColumnOffset:y,rightPadding:m}=p),g*p.blockWidth-m>=o+c&&(m=0));let x=Math.floor(o/s),w=Math.floor(u/a),R=Math.floor((o+c+m-1)/s),b=Math.floor((u+d+m-1)/a),I=l[e];if(!I)return null;let{minRow:v,minCol:_,maxCol:S,maxRow:C}=I;if(0===f&&(b<v||R<_||w>C||x>S))return null;let k=[],M=!1,T=null==this.ioConfig.allowPartialFill?r.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=b;t++)for(let i=x;i<=R;i++){let n=i;if(!r.disableWrapAround&&f&&null!=p&&g<=i&&(n=i-g-y),t>=v&&n>=_&&C>=t&&S>=n){let i=this._fetchRawTile(e,t,n,r);T?k.push(new Promise(e=>{i.then(t=>e(t)).catch(()=>{M=!0,e(null)})})):k.push(i)}else k.push(Promise.resolve(null))}if(0===k.length)return null;let A=await Promise.all(k),P={height:(b-w+1)*a,width:(R-x+1)*s},{spatialReference:F}=this.rasterInfo,{x:z,y:B}=this.getPyramidPixelSize(e);return{extent:new h.A({xmin:n.x+x*s*z,xmax:n.x+(R+1)*s*z,ymin:n.y-(b+1)*a*B,ymax:n.y-w*a*B,spatialReference:F}),pixelBlocks:A,mosaicSize:P,isPartiallyFilled:M}}_fetchRawTile(e,t,i,r){let{storageInfo:n}=this.rasterInfo,l=null!=n.transposeInfo&&!!r.transposedVariableName;if(!l){let r=n.blockBoundary[e];if(!r)return Promise.resolve(null);let{minRow:l,minCol:s,maxCol:a,maxRow:o}=r;if(t<l||i<s||t>o||i>a)return Promise.resolve(null)}let s=l?r.transposeVariableName:r.sliceId,a=n.isBsqTile?r.bandIds:null,o=function(e,t,i){let r=[];return null!=t&&r.push(`sliceId=${t}`),null!=i&&r.push(`bandIds=${i.join(",")}`),r.length?`${e}?${r.join("&")}`:e}(this.rasterId,s,a),c=`${e}/${t}/${i}`,h=this.ioConfig.rawBlockCacheMode??"default",d="no-cache"===h,f="minimum"===h?void 0:r.registryId,p=d?null:F(o,f,c);if(null==p){let l=d?null:new AbortController,s=l?.signal??r.signal,a=r.bandIds?.slice();if(a?.length&&n.isBsqTile){let n=new Set(a),l=[],o=Array.from(n);for(let n of o)l.push(this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:{...r,bandIds:[n]}},{signal:s}));p=Promise.all(l).then(e=>{if(e.some(e=>null==e))return null;if(o.length!==a.length){let t=[];for(let i of a){let r=e[o.indexOf(i)];t.includes(r)&&(r=r.clone()),t.push(r)}e=t}return this.rasterJobHandler?this.rasterJobHandler.compositeBands({pixelBlocks:e},{signal:s,transferPixelsToWorker:!0}):(0,_.Wy)(e)})}else p=this._tileFetchQueue.push({pyramidLevel:e,row:t,col:i,options:r},{signal:s});d||(z(o,f,c,p,l),p.catch(()=>B(o,f,c)))}return!d&&r.signal&&(0,u.u7)(r,()=>{P(o,f,c)}),p}_computeMagDirValues(e){let{bandCount:t,dataType:i}=this.rasterInfo;if((2!==t||"vector-magdir"!==i)&&"vector-uv"!==i||2!==e?.length||!e[0]?.length)return null;let r=e[0].length;if("vector-magdir"===i){let t=e[1].map(e=>(e+360)%360);return[e[0],t]}let[n,l]=e,s=[],a=[];for(let e=0;e<r;e++){let[t,i]=(0,C.Lu)([n[e],l[e]]);s.push(t),a.push(i)}return[s,a]}_getRasterTileAlignmentInfo(e,t){return this._rasterTileAlignmentInfo??=(0,S.DO)(this.rasterInfo),null==this._rasterTileAlignmentInfo.pyramidsInfo?null:{startX:t,halfWorldWidth:this._rasterTileAlignmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlignmentInfo.hasGCSSShiftTransform,...this._rasterTileAlignmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,i,r={}){let n={datumTransformation:r.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0,ul:{x:0,y:0}};r.srcResolution&&(n.srcResolution=r.srcResolution,this._updateSourceDataInfo(e,n));let l=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:s,srcHeight:a,pyramidLevel:o}=n,u=s/t,c=a/i,h=o<l&&u*c>=16,f=o===l&&this._requireTooManySrcTiles(s,a,t,i);if(h||f||0===s||0===a){let s=new d.A({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/i,spatialReference:e.spatialReference}),a=(0,S.Wo)(s,this.rasterInfo.spatialReference,e,n.datumTransformation),f=!a||r.srcResolution&&a.x+a.y<r.srcResolution.x+r.srcResolution.y;if(h&&r.srcResolution&&f){let e=Math.round(Math.log(Math.max(u,c))/Math.LN2)-1;if(l-o+3>=e){let t=2**e;a={x:r.srcResolution.x*t,y:r.srcResolution.y*t}}}a&&(n.srcResolution=a,this._updateSourceDataInfo(e,n))}return this._requireTooManySrcTiles(n.srcWidth,n.srcHeight,t,i)&&(n.srcWidth=0,n.srcHeight=0),n}_requireTooManySrcTiles(e,t,i,r){let{tileInfo:n}=this.rasterInfo.storageInfo,l=e/i,s=t/r;return Math.ceil(e/n.size[0])*Math.ceil(t/n.size[1])>=256*Math.max(1,(i+r)/1024)||l>8||s>8}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;let{rasterInfo:i}=this,r=i.spatialReference,{srcResolution:n,datumTransformation:l}=t,{pyramidLevel:s,pyramidResolution:a,excessiveReading:o}=(0,S.t$)(n,i,this.ioConfig.sampling);if(o)return;let u=t.srcExtent||(0,S._l)(e,r,l);if(null==u)return;let c=i.transform;c&&(u=c.inverseTransform(u)),t.srcExtent=u;let{origin:h}=i.storageInfo,{width:d,height:f,ul:p}=(0,k.$g)(u,h,a,s);t.pyramidLevel=s,t.pyramidResolution=a,t.srcWidth=d,t.srcHeight=f,t.ul=p}_getRequestOptionsWithSliceId(e){return null!=this.rasterInfo.multidimensionalInfo&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){let{srcLocation:i,position:r,pyramidLevel:n,useTransposedTile:l}=t,s=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[r])return{location:i,value:null};let{multidimensionalInfo:a}=this.rasterInfo;if(null==a||!l){let t=e.pixels.map(e=>e[r]),l={location:i,value:t,pyramidLevel:n},s=this._computeMagDirValues(t.map(e=>[e]));return s?.length&&(l.magdirValue=s.map(e=>e[0])),l}let o=e.pixels.map(e=>e.slice(r*s,r*s+s)),u=this._computeMagDirValues(o),{requestSomeSlices:c,identifyOptions:h}=t,d=(0,M.QW)(a,h.transposedVariableName);if(c){let e=(0,M.xx)(d,h.multidimensionalDefinition,h.timeExtent);o=o.map(t=>e.map(e=>t[e])),u=u?.map(t=>e.map(e=>t[e])),d=e.map(e=>d[e])}let f,p=e.noDataValues||this.rasterInfo.noDataValue,m={pixels:o,pixelType:e.pixelType};return null!=p&&((0,b.Sp)(m,p),f=m.mask),{location:i,value:null,dataSeries:d.map((e,t)=>{let i={value:0===f?.[t]?null:o.map(e=>e[t]),multidimensionalDefinition:e.multidimensionalDefinition.map(e=>new y.A({...e,isSlice:!0}))};return u?.length&&(i.magdirValue=[u[0][t],u[1][t]]),i}),pyramidLevel:n}}};(0,r.Cg)([(0,n.MZ)()],J.prototype,"_rasterTileAlignmentInfo",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"_tileFetchQueue",void 0),(0,r.Cg)([(0,n.MZ)({readOnly:!0})],J.prototype,"_isGlobalWrappableSource",null),(0,r.Cg)([(0,n.MZ)({readOnly:!0})],J.prototype,"_hasNoneOrGCSShiftTransform",null),(0,r.Cg)([(0,n.MZ)()],J.prototype,"_openPromise",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"rasterJobHandler",null),(0,r.Cg)([(0,n.MZ)({readOnly:!0})],J.prototype,"rasterId",null),(0,r.Cg)([(0,n.MZ)(g.OZ)],J.prototype,"url",null),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],J.prototype,"datasetName",void 0),(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],J.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"hasUniqueSourceStorageInfo",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"rasterInfo",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"ioConfig",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,n.MZ)()],J.prototype,"rawBlockRegistryIds",void 0),J=(0,r.Cg)([(0,n.$K)("esri.layers.raster.datasets.BaseRaster")],J)},23636(e,t,i){i.d(t,{A:()=>p});var r=i(32198),n=i(91429),l=i(49186),s=i(5443),a=i(86738),o=i(39829),u=i(22671),c=i(34930),h=i(47520),d=i(37373),f=i(49859);let p=class extends f.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,r={}){let{rasters:n}=this.primaryRasters,l=!1,{interpolation:s}=r,a=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!r.requestRawData&&a&&(l=1===n.length&&!r.skipRasterFunction,r={...r,interpolation:"bilinear",requestRawData:l}),r.requestRawData&&n.length>1&&!this.hasUniqueSourceStorageInfo&&(l=!1,r={...r,requestRawData:!1});let o=n.map(n=>n.fetchPixels(e,t,i,r)),u=await Promise.all(o),d=u.map(e=>e.pixelBlock),f=l||r.requestRawData?u.map(e=>e.srcTilePixelSize):void 0;if(r.skipRasterFunction||d.every(e=>null==e))return u[0];let p=u.find(e=>null!=e.pixelBlock)?.extent??e,m=await this._processPixelBlock(d,p,f),{transformGrid:g}=u[0];if(!l||null==m||null==g){let e=r.noClip?null:this.getClippingGeometry(p.spatialReference);return!r.noClip&&null!=m&&e&&(m=await(0,c.$Q)(m,p,e)),{...u[0],pixelBlock:m}}let y,x={rows:g.spacing[0],cols:g.spacing[1]};y=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[m],srcMosaicSize:{width:m.width,height:m.height},destDimension:{width:t,height:i},coefs:g.coefficients,sampleSpacing:x,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:s,alignmentInfo:void 0,blockWidths:null},r)).pixelBlock:(0,h.$i)(m,{width:t,height:i},g.coefficients,x,s);let w=r.noClip?null:this.getClippingGeometry(e.spatialReference);return!r.noClip&&null!=y&&null!=w&&(y=await(0,c.$Q)(y,e,w)),{extent:e,srcExtent:u[0].srcExtent,pixelBlock:y,srcTilePixelSize:u[0].srcTilePixelSize}}async processOnePixel(e,t){let{extent:i,pixelBlock:r}=t;if(!r)return null;let{row:n,col:l}=e,{width:a,height:o}=r;if(n<0||n>=o||l<0||l>=a)return null;let{neighborhoodSize:u}=this.rasterFunction,c=Math.max(2,u.rows),d=Math.max(2,u.cols),f=d>>>1,p=c>>>1,m={x:Math.max(0,l-f),y:Math.max(0,n-p)},g=i.width/a,y=i.height/o,x=i.xmin+g*m.x,w=x+g*d,R=i.ymax-y*m.y,b=R-y*c,I=new s.A({xmin:x,ymin:b,xmax:w,ymax:R,spatialReference:i.spatialReference}),v=(0,h.$Q)(r,m,{width:d,height:c});if(null==v)return null;let _=await this.processPixelData({extent:I,pixelBlock:v}),S=(n-m.y)*d+(l-m.x);return _&&0!==_.mask?.[S]?_.pixels.map(e=>e[S]):null}async processPixelData(e){let{extent:t,pixelBlock:i}=e;if(!i)return null;let r=new a.A({x:t.width/i.width,y:t.height/i.height,spatialReference:t.spatialReference});return await this._processPixelBlock([i],t,[r])}getClippingGeometry(e){let t=this._clippingGeometry.get("0");if(!e||!t)return t;let i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e),r=this._clippingGeometry.get(i);return r??(r=e.equals(t.spatialReference)?t:(0,d.uk)(t,e),this._clippingGeometry.set(i,r)),r}async _open(e){let{rasterFunction:t}=this;t.isRoot=!0,this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach(e=>e.rasterJobHandler=this.rasterJobHandler));let{rasters:i,rasterIds:r}=this.primaryRasters,n=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(n);let s=i.map(({rasterInfo:e})=>e),a=t.bind({rasterInfos:s,rasterIds:r});if(t.rawSourceRasterInfos=s,!a.success||0===s.length)throw new l.A("raster-function:open",`cannot bind the function: ${a.error??""}`);let o="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===o?.functionName&&(t.rasterInfo.attributeTable=u.A.fromJSON(o.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();let c=s[0];this.hasUniqueSourceStorageInfo=1===s.length||s.slice(1).every(e=>function(e,t){let{storageInfo:i,pixelSize:r,spatialReference:n,extent:l}=e,{storageInfo:s,pixelSize:a,spatialReference:o,extent:u}=t;return r.x===a.x&&r.y===a.y&&n.equals(o)&&l.equals(u)&&i.blockHeight===s.blockHeight&&i.blockWidth===s.blockWidth&&i.maximumPyramidLevel===s.maximumPyramidLevel&&i.firstPyramidLevel===s.firstPyramidLevel&&i.pyramidBlockWidth===s.pyramidBlockWidth&&i.pyramidBlockHeight===s.pyramidBlockHeight&&i.pyramidScalingFactor===s.pyramidScalingFactor}(e,c)),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _processPixelBlock(e,t,i){let{processParameters:r,primaryRasters:{rasterIds:n}}=this;return this.rasterJobHandler?await this.rasterJobHandler.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:n,parameters:r}):this.rasterFunction.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:n},r)}async _updateClipGeometry(){let e=this.rasterFunction.getClippingGeometries()[0],t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){let{extent:e}=this.rasterInfo,{densifyExecute:r}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(4642)]).then(()=>i(88411)),{differenceExecute:n}=await Promise.all([i.e(9187),i.e(8885),i.e(9117),i.e(3299),i.e(7217)]).then(()=>i(93054)),l=r(o.A.fromExtent(e),2*(e.width+e.height)/40);l=(0,d.uk)(l,t.spatialReference),t=n(l,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,r.Cg)([(0,n.MZ)({type:String,json:{write:!0}})],p.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"tileType",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"processParameters",void 0),(0,r.Cg)([(0,n.MZ)()],p.prototype,"primaryRasters",void 0),p=(0,r.Cg)([(0,n.$K)("esri.layers.raster.datasets.FunctionRaster")],p)},330(e,t,i){function r(e,t){if(!e||!t)return[];let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let n=[];if(t){let l=r(e,i);for(let e=0;e<l.length;e++)r(l[e],t).forEach(e=>n.push(e));return n}let l=e.getElementsByTagNameNS("*",i);if(!l||0===l.length)return[];for(let e=0;e<l.length;e++)n.push(l[e]||l.item(e));return n}function n(e,t){if(!e||!t)return null;let i=t;t.includes("/")?(i=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";let l=r(e,i);return l.length>0?t?n(l[0],t):l[0]:null}function l(e,t=null){let i,r=t?n(e,t):e;return r?(i=r.textContent||r.nodeValue,i?i.trim():null):null}function s(e,t){let i,n=r(e,t),l=[];for(let e=0;e<n.length;e++)i=n[e].textContent||n[e].nodeValue,i&&(i=i.trim(),""!==i&&l.push(i));return l}function a(e,t=null){return l(e,t)?.split(" ").map(e=>Number(e))??[]}function o(e,t){return s(e,t).map(e=>Number(e))}function u(e,t){let i=l(e,t);return Number(i)}function c(e,t){let i=e?.nodeName?.toLowerCase(),r=t.toLowerCase();return i.slice(i.lastIndexOf(":")+1)===r}function h(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}i.d(t,{Dy:()=>s,IC:()=>r,Ui:()=>o,V6:()=>n,g7:()=>c,mX:()=>l,pN:()=>a,v7:()=>u,vv:()=>h})},91806(e,t,i){i.d(t,{A:()=>o});var r,n=i(32198),l=i(91429),s=i(56507),a=i(25482);let o=class extends a.o{static{r=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new r({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,n.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"cols",void 0),(0,n.Cg)([(0,l.MZ)({type:s.jz,json:{write:!0}})],o.prototype,"level",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],o.prototype,"levelValue",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"origin",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],o.prototype,"resolution",void 0),(0,n.Cg)([(0,l.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],o.prototype,"rows",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],o.prototype,"scale",void 0),o=r=(0,n.Cg)([(0,l.$K)("esri.layers.support.LOD")],o)},87045(e,t,i){i.d(t,{A:()=>w});var r,n=i(32198),l=i(91429),s=i(56507),a=i(66552),o=i(25482),u=i(86211),c=i(86738),h=i(16930),d=i(21325),f=i(28735),p=i(91806),m=i(72802),g=i(36005),y=i(43937);const x=new a.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",JPEGPlus:"jpgplus",pbf:"pbf"});let w=class extends o.o{static{r=this}static create(e={}){let{resolutionFactor:t=1,scales:i,size:n=256,spatialReference:l=h.A.WebMercator,numLODs:s=24}=e;if(!(0,d.fn)(l)){let e=[];if(i)for(let t=0;t<i.length;t++){let r=i[t];e.push(new p.A({level:t,scale:r,resolution:r}))}else{let t=5e-4;for(let i=s-1;i>=0;i--)e.unshift(new p.A({level:i,scale:t,resolution:t})),t*=2}return new r({dpi:96,lods:e,origin:new c.A({x:0,y:0,spatialReference:l}),size:[n,n],spatialReference:l})}let a=(0,d.Vp)(l),o=e.origin?new c.A({x:e.origin.x,y:e.origin.y,spatialReference:l}):a?new c.A({x:a.origin[0],y:a.origin[1],spatialReference:l}):new c.A({x:0,y:0,spatialReference:l}),f=1/(39.37*(0,u.GA)(l)*96),m=[];if(i)for(let e=0;e<i.length;e++){let t=i[e],r=t*f;m.push(new p.A({level:e,scale:t,resolution:r}))}else{let e=(0,d.EA)(l)?512/n*591657527.5917094:256/n*591657527.591555,i=Math.ceil(s/t);m.push(new p.A({level:0,scale:e,resolution:e*f}));for(let r=1;r<i;r++){let i=e/2**t,n=i*f;m.push(new p.A({level:r,scale:i,resolution:n})),e=i}}return new r({dpi:96,lods:m,origin:o,size:[n,n],spatialReference:l})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){let{spatialReference:e,origin:t}=this;if(e&&t){let i=(0,d.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return c.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0,r=[],n=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{r.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,n[e.level]=e})),this._set("scales",r),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){let t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];let i=Math.floor(e),r=i+1;return t[i]/(t[i]/t[r])**(e-i)}scaleToZoom(e){let t=this.scales,i=t.length-1,r=0;for(;r<i;r++){let i=t[r],n=t[r+1];if(i<=e)return r;if(n===e)return r+1;if(i>e&&n<e)return r+Math.log(i/e)/Math.log(i/n)}return r}tileAt(e,t,i,r){let n,l,s=this.lodAt(e);if(!s)return null;if("number"==typeof t)n=t,l=i;else if((0,d.aI)(t.spatialReference,this.spatialReference))n=t.x,l=t.y,r=i;else{let e=(0,f.y)(t,this.spatialReference);if(null==e)return null;n=e.x,l=e.y,r=i}let a=s.resolution*this.size[0],o=s.resolution*this.size[1];return r??=new m.U(0,0,0),r.level=e,r.row=Math.floor((this.origin.y-l)/o+.001),r.col=Math.floor((n-this.origin.x)/a+.001),this.updateTileInfo(r),r}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){let t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;let r=e.level-i.level,n=i.resolution*this.size[0]/2**r,l=i.resolution*this.size[1]/2**r;return e.extent[0]=this.origin.x+e.col*n,e.extent[1]=this.origin.y-(e.row+1)*l,e.extent[2]=e.extent[0]+n,e.extent[3]=e.extent[1]+l,!0}upsampleTile(e){let t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){let i=this.lodAt(t.level);if(null==i)return null;let{resolution:r}=i,n=r*this.size[0],l=r*this.size[1];return e[0]=this.origin.x+t.col*n,e[1]=this.origin.y-(t.row+1)*l,e[2]=e[0]+n,e[3]=e[1]+l,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return r.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;let t=(512===this.size[0]&&256===e?-1:0)+ +!!this.spatialReference.isGeographic;if(this.size[0]===e&&0===t)return this;let i=[],n=this.lods.length-t;for(let e=0;e<n;e++){let r=e+t,{scale:n,resolution:l}=r>=0?this.lods[r]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new p.A({level:e,scale:n,resolution:l}))}return new r({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){let e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){let r=e[i];this._upsampleLevels[r.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/r.resolution:0},t=r}}};(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,n.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{read:x.read,write:x.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,n.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,n.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,n.Cg)([(0,l.MZ)({type:[p.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,n.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,n.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,n.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,n.Cg)([(0,y.K)("size",{cols:{type:s.jz},rows:{type:s.jz}})],w.prototype,"writeSize",null),(0,n.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=r=(0,n.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},72802(e,t,i){i.d(t,{U:()=>n});var r=i(19419);class n{constructor(e,t,i,n=(0,r.vt)()){this._level=e,this._row=t,this._col=i,this.extent=n}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new n(e.level,e.row,e.col,e.extent)}}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[7915],{68197(e,t,r){r.d(t,{A:()=>h});var i=r(40876),n=r(56507),s=r(4576),o=r(34727);function a(e){return(0,o.qE)((0,n.Vr)(e),0,255)}function l(e,t){let r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}function u(e){return.2126*(0,i.Q6)(e.r)+.7152*(0,i.Q6)(e.g)+.0722*(0,i.Q6)(e.b)}class h{static blendColors(e,t,r,i=new h){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){let r=(0,i.lT)(e);return r?h.fromArray(r,t):null}static fromHex(e,t=new h){let r=(0,i.oW)(e);return r?h.fromArray(r,t):null}static fromArray(e,t=new h){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){let r=(0,i.Eq)(e);return r?h.fromArray(r,t):null}static fromJSON(e){return null==e?void 0:new h([e[0],e[1],e[2],(e[3]??255)/255])}toUnitRGB(){return[this.r/255,this.g/255,this.b/255]}toUnitRGBA(e){return e??=[0,0,0,0],e[0]=this.r/255,e[1]=this.g/255,e[2]=this.b/255,e[3]=null==this.a?1:this.a,e}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return this.toYiq()>=127}isLowContrastBlend(e,t=3){let r=e instanceof h?e:new h(e),i=u(this),n=u(r);return(Math.max(i,n)+.05)/(Math.min(i,n)+.05)<t}setColor(e){if("string"==typeof e)h.fromString(e,this);else if((0,s.yc)(e))h.fromArray(e,this);else{let t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof h||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){let t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,s=`#${l(this.r,i)}${l(this.g,i)}${l(this.b,i)}${n?l(Math.round(255*this.a),i):""}`;return t?s.toUpperCase():s}toYiq(){return.299*this.r+.587*this.g+.114*this.b}toCss(e=!1){let t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){let t=a(this.r),r=a(this.g),i=a(this.b);return 0===e||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,i.c1)(this.r),this.g=(0,i.c1)(this.g),this.b=(0,i.c1)(this.b),this.a=(0,i.G1)(this.a),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}h.prototype.declaredClass="esri.Color"},40876(e,t,r){r.d(t,{Eq:()=>f,G1:()=>m,Q6:()=>E,TS:()=>s,V6:()=>n,Vm:()=>g,ay:()=>l,c1:()=>p,c4:()=>o,iw:()=>y,j5:()=>u,lT:()=>c,oW:()=>h,xV:()=>b});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function s(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...s(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;let i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,i=1){let n=(e%360+360)%360/360,s=r<=.5?r*(t+1):r+t-r*t,o=2*r-s;return[Math.round(255*a(o,s,n+1/3)),Math.round(255*a(o,s,n)),Math.round(255*a(o,s,n-1/3)),i]}function u(e){let t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,s=t?9===e.length:5===e.length,o=Number("0x"+e.slice(1));if(isNaN(o))return null;let a,l=[0,0,0,1];return s&&(a=o&i,o>>=r,l[3]=n*a/255),a=o&i,o>>=r,l[2]=n*a,a=o&i,o>>=r,l[1]=n*a,a=o&i,o>>=r,l[0]=n*a,l}function h(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,r+16*r,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function c(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),r=t[1];if("rgb"===r&&3===e.length||"rgba"===r&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===r&&3===e.length||"hsla"===r&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=p(e[0]),e[1]=p(e[1]),e[2]=p(e[2]),e[3]=4===e.length?m(e[3]):1,e}function f(e){let t=n(e)?s(e):null;return t??=c(e),t??=h(e),t}function g(e){let t=f(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function m(e){return _(e,0,1)}function p(e){return Math.round(_(e,0,255))}function _(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}const y=1/2.2;function E(e){return e**2.2}function b(e){return e**y}},85334(e,t,r){r.d(t,{$:()=>y,IB:()=>a,Iy:()=>T,KV:()=>R,N2:()=>E,RH:()=>v,ZD:()=>b,sn:()=>I});var i=r(68197),n=r(4576),s=r(4718),o=(r(78955),r(91829),r(34727));function a(e){return"r"in e&&"g"in e&&"b"in e}function l(e){return"h"in e&&"s"in e&&"v"in e}function u(e){return"l"in e&&"a"in e&&"b"in e}function h(e){return"l"in e&&"c"in e&&"h"in e}const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],d=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function f(e,t){let r,i,n=[];if(e[0].length!==t.length)throw Error("dimensions do not match");let s=e.length,o=e[0].length,a=0;for(r=0;r<s;r++){for(a=0,i=0;i<o;i++)a+=e[r][i]*t[i];n.push(a)}return n}function g(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=f(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function m(e){let t=f(d,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function p(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function _(e){let t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(e){return a(e)?e:h(e)?function(e){return m(_(function(e){let t=e.l,r=e.c,i=e.h;return{l:t,a:r*Math.cos(i),b:r*Math.sin(i)}}(e)))}(e):u(e)?function(e){return m(_(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?m(e):l(e)?function(e){let t,r=(e.h+360)%360/60,i=e.s/100,n=e.v/100*255,s=n*i,o=s*(1-Math.abs(r%2-1));switch(Math.floor(r)){case 0:t={r:s,g:o,b:0};break;case 1:t={r:o,g:s,b:0};break;case 2:t={r:0,g:s,b:o};break;case 3:t={r:0,g:o,b:s};break;case 4:t={r:o,g:0,b:s};break;case 5:case 6:t={r:s,g:0,b:o};break;default:t={r:0,g:0,b:0}}return t.r=Math.round(t.r+n-s),t.g=Math.round(t.g+n-s),t.b=Math.round(t.b+n-s),t}(e):e}function E(e){return l(e)?e:function(e){let{r:t,g:r,b:i}=e,n=Math.max(t,r,i),s=n-Math.min(t,r,i),o=n,a=0===s?0:n===t?(r-i)/s%6:n===r?(i-t)/s+2:(t-r)/s+4,l=0===s?0:s/o;return a<0&&(a+=6),a*=60,l*=100,o*=100/255,{h:a,s:l,v:o}}(y(e))}function b(e){return u(e)?e:function(e){return p(g(e))}(y(e))}function v(e){return h(e)?e:function(e){return function(e){let t=e.l,r=e.a,i=e.b,n=Math.sqrt(r*r+i*i),s=Math.atan2(i,r);return s=s>0?s:s+2*Math.PI,{l:t,c:n,h:s}}(p(g(e)))}(y(e))}function R(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function I(e){return e.length=4,R(e),e[3]??=1,(0,o.qE)(e[3],0,1),e}function T(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new i.A(e):e)).length||1===t){let r=[],i=e[0];for(let e=0;e<t;e++)r.push(i.clone());return r}if(r.shuffle&&(e=(0,n.k4)((0,s.o8)(e),r.seed)),e.length>=t){let r=[],i=(e.length-1)/(t-1);for(let n=0;n<t;n++){let t=Math.round(n*i);r.push(e[t].clone())}return r}return function(e,t,r={}){let i=[],s=e.length-1,o=Math.ceil((t-e.length)/s);e:for(let n=0;n<s;n++){let s=e[n],a=e[n+1];for(let n=1;n<=o;n++){let l=n/(o+1);if(i.push(A(s,a,l,r)),i.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,n.k4)(i,r.seed??1)]}(e,t,r)}const S=(e,t)=>{let r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function A(e,t,r,s={}){let o=e.r,a=e.g,l=e.b,u=t.r,h=t.g,c=t.b,d=Math.round(o+(u-o)*r),f=Math.round(a+(h-a)*r),g=Math.round(l+(c-l)*r);if(!s.offset)return new i.A([d,f,g]);let m=(0,n.Mo)(s.seed);return new i.A([S(d,m),S(f,m),S(g,m)])}},90629(e,t,r){r.d(t,{L7:()=>s,Lz:()=>o,PN:()=>a,cr:()=>l,gs:()=>h,ps:()=>n,r_:()=>c,tc:()=>u}),r(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,n=a(1),s=o(1);function o(e){return e?e/72*96:0}function a(e){return e?72*e/96:0}function l(e){if("string"==typeof e){let t=e.match(i);if(t){let r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n=e.startsWith("-"),s="px"===i?a(r):r;return n?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function u(e=0,t=0){return{x:e,y:t}}function h(e=0,t=0){return[e,t]}function c(e=0,t=0,r=0){return[e,t,r]}},4197(e,t,r){r.d(t,{Vj:()=>o,cj:()=>s,jh:()=>n});var i=r(9093);function n(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function s(e){return[...e]}function o(e){let t=(0,i.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>M,C:()=>o,DC:()=>d,Dg:()=>g,Ej:()=>b,Ie:()=>A,Jt:()=>x,Lu:()=>R,Ne:()=>I,RF:()=>c,TF:()=>y,VL:()=>m,aI:()=>N,fA:()=>a,gE:()=>u,gX:()=>E,hZ:()=>S,iT:()=>f,is:()=>w,pg:()=>v,qv:()=>C,uJ:()=>_,vI:()=>T,vY:()=>l,v_:()=>O,vt:()=>s,w1:()=>h,yr:()=>p}),r(35522);var i=r(5443),n=(r(19419),r(4197));function s(e=O){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let r=0;r<6;r++)e[r]=t[r];return e}function a(e,t,r,i,n,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function l(e,t=s()){return function(e,t,r,i=s()){return S(i,C),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function u(e,t=(0,n.jh)(24)){let[r,i,s,o,a,l]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=s,t[9]=r,t[10]=a,t[11]=l,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new i.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new i.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t,r=e){r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.min(e[2],t[2]),r[3]=Math.max(e[3],t[3]),r[4]=Math.max(e[4],t[4]),r[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,[t,r,i]){g(e,t,r,i)}function g(e,t,r,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],r),e[2]=Math.min(e[2],i),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],r),e[5]=Math.max(e[5],i)}function m(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function _(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){let t=m(e),r=_(e),i=p(e);return t*t+r*r+i*i}function E(e,t=[0,0,0]){return t[0]=e[0]+m(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+_(e)/2,t}function b(e,t=[0,0,0]){return t[0]=m(e),t[1]=p(e),t[2]=_(e),t}function v(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function R(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function I(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function T(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function S(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function A(e){return e?S(e,C):s(C)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function M(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=-1/0,e[3]=i,e[4]=n,e[5]=1/0,e}function w(e){return 6===e.length}function N(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],O=[0,0,0,0,0,0];s()},50498(e,t,r){var i=r(66552),n=r(5443),s=r(91075),o=r(48526),a=r(86738),l=r(39829),u=r(82799);const h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},f=new i.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});r.d(t,["Ye",0,c,"gy",0,h,"iI",0,f,"yR",0,d])},42521(e,t,r){r.r(t),r.d(t,{default:()=>He});var i=r(32198),n=r(91429),s=r(87024),o=r(4576),a=r(60999),l=r(69540),u=r(49186),h=r(36563),c=r(53966),d=r(25728),f=r(17676),g=r(36708),m=r(24212),p=r(97159),_=r(97768),y=r(78888),E=r(50075);class b{constructor(e,t){this._customParameters=e,this._apiKey=t,this._activeRequests=new Set}isFull(e){return(0,E._i)(e)}request(e,t,r){let i=new AbortController,n=(0,f.NY)(r,()=>i.abort()),s={...E.Fz,signal:i.signal,responseType:t,query:{...this._customParameters,token:this._apiKey}},o=(0,y.A)(e,s),a={abortController:i,abortHandle:n};return this._activeRequests.add(a),o.then(({data:e})=>e).finally(()=>{a.abortController=null,a.abortHandle=(0,_.xt)(a.abortHandle),this._activeRequests.delete(a)})}cancelAll(){this._activeRequests.forEach(e=>{e.abortController=(0,_.DC)(e.abortController),e.abortHandle=(0,_.xt)(e.abortHandle)}),this._activeRequests.clear()}}var v=r(44208),R=r(4718),I=r(84952),T=r(59418),S=r(85334),A=(r(91829),r(34727)),x=r(49788);r(73941),r(76200);var M=r(74810);function w(e){return e.sort((e,t)=>e.encoding-t.encoding)}const N={ktx2:1,basis:2,dds:4,png:8,jpg:16,"ktx-etc2":32},C={"image/ktx2":2,"image/x.basis":2,"image/vnd-ms.dds":4,"image/png":8,"image/jpg":16,"image/jpeg":16,"image/ktx":32};function O(e){let t=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,r=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,i=t?e.materialDefinitions?.[t]:null,n=r?e.textureDefinitions?.[r]:null,s=L();if(null!=i){let e=i.params;e.diffuse&&((0,S.KV)(e.diffuse),s.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(s.doubleSided=e.doubleSided,s.cullFace=e.doubleSided?0:2),("none"===e.cullFace||"front"===e.cullFace||"back"===e.cullFace)&&(s.cullFace="none"===e.cullFace?0:"back"===e.cullFace?2:1),e.transparency&&(s.metallicRoughness.baseColorFactor[3]=(0,A.qE)(1-e.transparency,0,1)),(e.useVertexColorAlpha||s.metallicRoughness.baseColorFactor[3]<1)&&(s.alphaMode="blend")}let o=[];if(null!=n){n.wrap&&("repeat"===n.wrap[0]||"repeat"===n.wrap[1])&&(s.wrapTextures=!0);let e=1;"rgba"===n.channels&&(s.alphaMode="blend",e|=32);let t=n.images.length-1,r=n.images[t],i=e=>e?.split("/").pop(),a=Array.isArray(n.encoding)?w(n.encoding.map((e,t)=>({name:i(r.href[t]),encoding:C[e]||0}))):[{name:i(r.href),encoding:C[n.encoding]||0}];o.push({id:0,usage:e,encodings:a}),s.metallicRoughness.baseColorTextureId=0}return{material:s,textures:o}}const L=()=>({alphaMode:"opaque",alphaCutoff:x.Q,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});class D{constructor(e,t,r,i,n,s){if(this._requester=t,this._logger=r,this._defaultGeometrySchema=i,this._requiredAttributes=n,this._options=s,this._logLayer=e,this._layerUrl=e.parsedUrl.path,this._geometryDefinitions=e.geometryDefinitions,e.materialDefinitions){let t=e.textureSetDefinitions;this._materialAndTextures=e.materialDefinitions.map(r=>function(e,t,r){let i=new Map,n=(e,t)=>{if(null==e)return-1;let r=i.get(e.id);if(r)return r.usage|=t,r.id;let n=i.size;return i.set(e.id,{id:n,usage:t}),n},s=t.pbrMetallicRoughness,o=s?.baseColorFactor?(0,S.sn)(s.baseColorFactor):null,a=t.emissiveFactor,l=r&&0===s?.metallicFactor||(0,M.Jr)({normalTexture:t.normalTexture,emissiveTexture:t.emissiveTexture,emissiveFactor:t.emissiveFactor,occlusionTexture:t.occlusionTexture,metallicRoughnessTexture:s?.metallicRoughnessTexture,metallicFactor:s?.metallicFactor,roughnessFactor:s?.roughnessFactor}),u=l?M.Bt[0]:s?.metallicFactor??M.mb[0],h=l?M.Bt[1]:s?.roughnessFactor??M.mb[1],c="mask"===t.alphaMode?33:1,d={baseColorFactor:o?[o[0],o[1],o[2],o[3]]:[1,1,1,1],baseColorTextureId:n(s?.baseColorTexture,c),metallicRoughnessTextureId:n(s?.metallicRoughnessTexture,2),metallicFactor:u,roughnessFactor:h},f={alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,cullFace:"none"===t.cullFace?0:"back"===t.cullFace?2:+("front"===t.cullFace),normalTextureId:n(t.normalTexture,4),emissiveTextureId:n(t.emissiveTexture,16),occlusionTextureId:n(t.occlusionTexture,8),emissiveFactor:a?[a[0],a[1],a[2]]:[0,0,0],metallicRoughness:d,wrapTextures:!1,hasParametersFromSource:l},g=[];return i.forEach(({usage:t},r)=>{let i=null!=e&&e[r]&&e[r].formats,n=i?w(i.map(({name:e,format:t})=>({name:e,encoding:N[t]}))):[];g.push({id:r,usage:t,encodings:n})}),{material:f,textures:g}}(t,r,"integrated-mesh"===e.type))}}_loadAttribute(e,t,r){let i=`${this._layerUrl}/nodes/${e.resources.attributes}/attributes/${t.key}/0`;return this._requester.request(i,"array-buffer",r).then(e=>(0,T.m0)(t,e))}async loadAttributes(e,t,r){let i=await Promise.allSettled(t.map(t=>this._loadAttribute(e,t.attributeStorageInfo,r))),n={};for(let r=0;r<t.length;++r){let s=i[r],o=t[r];if("fulfilled"===s.status){let e=s.value;n[o.name]=e}else{let t=s.reason;(0,f.QP)(t),this._logger.error("#loadAttributes",this._logLayer,`Failed to load attributeData for '${o.name}' on node '${e.id}'`,t)}}return n}async loadNodeData(e,t){let r=null!=this._requiredAttributes&&e.resources.attributes?(0,a.Ke)(this.loadAttributes(e,this._requiredAttributes,t)):null,{bufferDefinition:i,bufferIndex:n}=function(e,t){let r={bufferDefinition:null,bufferIndex:0},i=t.resources.geometryDefinition;if(null==e||null==i||i<0)return r;let n=i>=0?e[i].geometryBuffers:null;if(null==n)return r;for(let e=0;e<n.length;e++){let t=n[e];if(null!=t.compressedAttributes){if("draco"===t.compressedAttributes.encoding&&!(0,v.A)("disable-feature:i3s-draco"))return r.bufferIndex=e,r.bufferDefinition=t,r}else r.bufferIndex=e,r.bufferDefinition=n[e]}return r}(this._geometryDefinitions,e),s=!!e.resources.geometry,o=s?(0,a.Ke)(this._loadGeometry(e.resources.geometry,n,t)):null,l=e.resources.hasSharedResource?await this._loadShared(e,t):null,u=e.resources.materialDefinition,h=this._materialAndTextures&&null!=u&&u>=0?this._materialAndTextures[u]:null==l?null:O(l),c=h?.material,d=h?.textures??[],f=`${e.id}`,g=!s&&this._options.loadFeatureData,m=g?await this._loadFeatureData(f,t):null,p=g?function(e){if(!e)return null;for(let t of e.featureData){let e=t.geometries;if(null!=e)for(let r of e)return{featureIds:[t.id],featureDataPosition:t.position,geometries:[r]}}return null}(m):{featureIds:[],geometries:[{type:"ArrayBufferView",params:{material:c}}],featureDataPosition:[0,0,0]},_=null==p?function(e){if(!e)return null;let t=[];for(let r of e.featureData)null!=r.position&&t.push({featureIds:[r.id],featureDataPosition:r.position,geometries:[]});return t}(m):null,y=d.length>0?(0,a.Ke)(this.loadTextures(e,d,t)):null,E=null,b=null;if(o){E=(0,a.QA)(await o);let e=function(e,t){if(!e||!t?.materialDefinitions)return e;let r=Object.keys(t.materialDefinitions)[0];return!t.materialDefinitions[r].params.vertexRegions&&e.vertexAttributes.region&&delete(e=(0,R.o8)(e)).vertexAttributes.region,e}(this._defaultGeometrySchema,l);b=(0,T.qs)(i,e)}let I=y?(0,a.QA)(await y):null,S=r?(0,a.QA)(await r):{},A=S?{attributeData:S,loadedAttributes:this._requiredAttributes}:null;if(null!=p)return{geometryData:p,attributeDataInfo:A,geometryBuffer:E,geometryDescriptor:b,requiredTextures:d,textureData:I};if(null!=_)return{pointData:_,attributeDataInfo:A,geometryBuffer:E,geometryDescriptor:b,requiredTextures:d,textureData:I};throw Error()}static _addAbsoluteHrefTexture(e,t){let r=e.textureDefinitions;if(null!=r)for(let e of Object.keys(r))for(let i of r[e].images)i.hrefConcat=Array.isArray(i.href)?i.href.map(e=>(0,I.s2)(e,t)):(0,I.s2)(i.href,t)}static _fixTextureEncodings(e){let t=e.textureDefinitions;if(null!=t)for(let e in t){let r=t[e];if(Array.isArray(r.encoding))for(let e=0;e<r.encoding.length;e++){let t=r.encoding[e];t.startsWith("data:")&&(r.encoding[e]=t.slice(5))}else{let e=r.encoding;e.startsWith("data:")&&(r.encoding=e.slice(5))}}}async _loadShared(e,t){if(null==e.resources.geometry)return{};let r=`${this._layerUrl}/nodes/${e.resources.geometry}/shared`,i=await this._requester.request(r,"json",t);return D._fixTextureEncodings(i),D._addAbsoluteHrefTexture(i,r),i}_loadTexture(e,t,r,i,n){return 4===i||1===i||2===i?this._requester.request(e,"array-buffer",n).then(e=>({id:t,usage:r,data:e,encoding:i})):this._requester.request(e,"image",n).then(e=>({id:t,usage:r,data:e,encoding:i}))}loadTextures(e,t,r){let i=this._options.textureUsageMask;return Promise.all(t.map(t=>{if(0===(t.usage&i))return null;let n=function(e,t){if(null!=t)return e.find(e=>0!==(e.encoding&t))}(t.encodings,this._options.textureEncodings);if(null==n)return this._logger.error("#loadTextures",this._logLayer,`No known encoding for texture found on node ${e.id}`),Promise.reject();let s=e.resources.texture||e.id,o=`${this._layerUrl}/nodes/${s}/textures/${n.name}`;return this._loadTexture(o,t.id,t.usage,n.encoding,r)}))}_loadFeatureData(e,t){let r=`${this._layerUrl}/nodes/${e}/features/0`;return this._requester.request(r,"json",t)}_loadGeometry(e,t,r){let i=`${this._layerUrl}/nodes/${e}/geometries/${t}`;return this._requester.request(i,"array-buffer",r)}}var U=r(98697),F=r(92359),P=r(4146),k=r(52136),G=r(18768),q=r(69208),V=r(34287),Q=r(8303),j=r(25036),H=r(58947),W=r(10873),$=r(10292),B=r(58083),z=r(9093),Z=r(35522),Y=r(51850),K=r(79258),X=r(37539);function J(e,t,r,i){let n=i+t;if(n<i/2||r>n)return Number.MAX_VALUE;let s=Math.abs(te*e)+Math.asin(r/n);return s>=Math.PI/2?Number.MAX_VALUE:r/Math.cos(s)}const ee=(0,Y.vt)(),te=(0,A.kU)(1);var re=r(27993),ie=r(16930),ne=r(98764);(0,Y.vt)();var se=r(71351),oe=r(28540),ae=r(19419),le=r(89707);class ue extends le.H{constructor(e,t){super(NaN,NaN),this.id=e,this.serviceMbsInIndexSR=t,this._serviceMbsInRenderSRElevationAdjusted=new oe.i(0,0,0,-1),this._serviceMbsInRenderSR=new oe.i(0,0,0,-1),this._serviceMbsElevationUpdateExtent=null,this._mbsConeInRenderSR=null}get serviceMbsInRenderSRElevationAdjusted(){return this._serviceMbsInRenderSRElevationAdjusted}updateServiceMbsInRenderSRElevationAdjusted(e){return this._serviceMbsInRenderSRElevationAdjusted.copyFrom(e),this._serviceMbsInRenderSRElevationAdjusted}get serviceMbsInRenderSR(){return this._serviceMbsInRenderSR}updateServiceMbsInRenderSR(e){return this._serviceMbsInRenderSR.copyFrom(e),null!=this._serviceMbsElevationUpdateExtent&&(0,ae.Ie)(this._serviceMbsElevationUpdateExtent),this._serviceMbsInRenderSR}get serviceMbsElevationUpdateExtent(){return this._serviceMbsElevationUpdateExtent??=(0,ae.Ie)()}get mbsConeInRenderSR(){return this._mbsConeInRenderSR}updateMbsConeInRenderSR(e){return this._mbsConeInRenderSR=e.clone(),this._mbsConeInRenderSR}invalidateServiceBVsInRenderSR(){this._serviceMbsInRenderSRElevationAdjusted.invalidate(),this._serviceMbsInRenderSR.invalidate(),null!=this._serviceMbsElevationUpdateExtent&&(0,ae.Ie)(this._serviceMbsElevationUpdateExtent),this._mbsConeInRenderSR=null,this.serviceObbInRenderSR?.invalidate()}shareServiceBVsInRenderSRWith(e){this.serviceObbInRenderSR=e.serviceObbInRenderSR,this._serviceMbsInRenderSRElevationAdjusted=e._serviceMbsInRenderSRElevationAdjusted,this._serviceMbsInRenderSR=e._serviceMbsInRenderSR,this._serviceMbsElevationUpdateExtent=e._serviceMbsElevationUpdateExtent??=(0,ae.Ie)(),this._mbsConeInRenderSR=e._mbsConeInRenderSR}}class he extends ue{constructor(e,t,r,i,n,s,o,a,l,u,h){super(e,r),this.index=t,this.childCount=i,this.level=n,this.resources=s,this.version=o,this.lodMetric=a,this.maxError=l,this.numFeatures=u,this.failed=!1,this.cacheState=0,this.vertexCount=0,this.memory=0,this.childrenLoaded=0,this.hasModifications=!1,this.imModificationImpact=4,this.elevationAgnosticBoundingVolume=new ce,this.serviceObbInIndexSR=h}invalidateServiceBVsInRenderSR(){super.invalidateServiceBVsInRenderSR(),this.elevationAgnosticBoundingVolume.invalidate()}}class ce{constructor(){this._data=[0,0,0,ce.invalidRadius]}static{this.invalidRadius=-2}invalidate(){this._data[3]=ce.invalidRadius}get valid(){return this._data[3]!==ce.invalidRadius}get radius(){return this._data[3]}getAxis(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set(e,t){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2],this._data[3]=t}intersectsFrustumConservative(e,t,r){if(!this.valid)return!0;let i=this.getAxis(de),{center:n,radius:s}=e.boundingSphere,o=s+r;return 1===t?this.radius>fe||function(e,t,r,i){let n=(0,Z.Bw)(r);if(n<=i)return!0;let s=(0,Z.Om)(e,r);if(s<=0)return-s<=i;let o=(0,A.qE)(s/n,-1,1),a=Math.sqrt(1-o*o),l=(0,A.qE)(i/n,0,1);return a*Math.sqrt(1-l*l)-l*o<=t}(i,this.radius,n,o):function(e,t,r,i){let n=r[0]-e[0],s=r[1]-e[1],o=t+i;return n*n+s*s<=o*o}(i,this.radius,n,o)&&function(e,t,r,i,n){for(let s of n){let n=s[0],o=s[1],a=s[2],l=a>0?r:i;if(n*e[0]+o*e[1]+a*l+s[3]-Math.hypot(n,o)*t>0)return!1}return!0}(i,this.radius,n[2]-o,n[2]+o,e.planes)}}const de=(0,Y.vt)(),fe=.9;var ge=r(25992),me=r(66480),pe=r(4431),_e=r(57005),ye=r(62747),Ee=r(58682);class be{constructor(e){this.children=e.children,this.obb=_e.ab.fromJSON(e.obb),this.geometryResource=e.mesh?.geometry.resource,this.geometryDefinition=e.mesh?.geometry.definition}}class ve{constructor(e){this.nodes=e.nodes.map(e=>new be(e))}}class Re{constructor(e,t,r){this.id=e,this.obb=null==r?null:_e.ab.fromJSON(r),this.mbs=null==this.obb?new oe.i(t):null}}class Ie extends Re{constructor(e){super(e.id,e.mbs,e.obb),this.mbs=new oe.i(e.mbs),this.children=e.children?.map(e=>new Re(e.id,e.mbs,e.obb)),this.hasSharedResource=null!=e.sharedResource,this.hasGeometryData=(e.geometryData?.length??0)>0,this.version=e.version}}class Te{constructor(e,t,r){this._layer=e,this._descriptor=t,this._options=r,this._queryRays=[],this._subtaskAbortController=new AbortController,this._highest=new Float64Array,this._signal=AbortSignal.any([r.signal,this._subtaskAbortController.signal]),this._indexSpatialReference=(0,me.Rm)(e),this._vertexSpatialReference=(0,me.Dd)(e),this._intersectionSpaceSpatialReference=function(e,t){return e?(0,ne.lO)(t):t.isGeographic?ie.A.PlateCarree:t}(this._indexSpatialReference.isGeographic,this._indexSpatialReference),this._indexToVertexProjector=(0,X.wy)(this._indexSpatialReference,this._vertexSpatialReference),this._vertexToIntersectionSpaceProjector=(0,X.wy)(this._vertexSpatialReference,this._intersectionSpaceSpatialReference),this.frameTask=r.scheduler.registerTask(F.W6.ELEVATION_QUERY),this.promise=this._run()}async _run(){let e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,this.frameTask,!1);try{let e=this._descriptor;if("point"!==e.geometry.type&&"multipoint"!==e.geometry.type&&"polyline"!==e.geometry.type)throw new u.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");if(null==this._indexToVertexProjector||null==this._vertexToIntersectionSpaceProjector)throw new u.A("integrated-mesh-elevation-query:projection","Failed to create projection for elevation query.");let t=await e.project(this._indexSpatialReference,this._signal);(0,f.Te)(this._signal),t??this._throwSpatialReferenceMismatchError();for(let e of t.coordinates){let t=xe(e.x,e.y,this.getRootRayOriginZ(),this._indexSpatialReference,this._intersectionSpaceSpatialReference);t??this._throwSpatialReferenceMismatchError(),this._queryRays.push(t)}this._highest=new Float64Array(this._queryRays.length).fill(-1/0),await this.visitRoot(this._queryRays.map((e,t)=>t)),(0,f.Te)(this._signal);for(let e=0;e<t.coordinates.length;++e){let r=this._highest[e];t.coordinates[e].z=r===-1/0?Me:r}return t}catch(e){throw this._subtaskAbortController.abort(),e}}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}_throwSpatialReferenceMismatchError(){throw new u.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${this._descriptor.spatialReference.wkid}' on an elevation service in '${this._indexSpatialReference.wkid}'`)}_intersectsQueryObb(e,t){let r=new _e.ab;return e.transform(r,this._indexSpatialReference,this._intersectionSpaceSpatialReference),t.filter(e=>{let t=this._queryRays[e];return r.intersectRay(t.origin,t.direction)})}intersectsQueryBounds(e,t){if(null==e)return t;if(null!=e.obb)return this._intersectsQueryObb(e.obb,t);let r=e.mbs;if(null==r)return t;let i=new oe.i;return function(e,t,r,i){if(null==e||null==t||null==i)return!1;let n=(0,X.Tp)(t,i);if(null==n?.projector)return!1;if(n.projector===X.pO)return r.copyFrom(e),!0;let{source:s,dest:o,projector:a}=n;if(3===o.spatialReferenceId){let t=X.w5[s.spatialReferenceId][2];return null!=t&&(t(e.center,0,ee,0),(0,X.s7)(ee,0,r.center,0),r.radius=J(ee[1],e.center[2],e.radius,K.$O.radius),!0)}if(2!==s.spatialReferenceId&&5!==s.spatialReferenceId||11!==o.spatialReferenceId){a(e.center,0,r.center,0);let t=s.metersPerUnit??1,i=o.metersPerUnit??1;r.radius=e.radius*t/i}else{let t=X.w5[s.spatialReferenceId][1],i=X.w5[1][11],n=e.radius;null!=t&&null!=i&&(n=J(e.center[1],e.center[2],e.radius,K.$O.radius)),a(e.center,0,r.center,0),r.radius=n}return!0}(r,this._indexSpatialReference,i,this._intersectionSpaceSpatialReference)?t.filter(e=>i.intersectRay(this._queryRays[e])):t}async _processLeafNode(e,t){let r=await this._loadGeometry(e);(0,f.Te)(this._signal),null!=r&&await this.frameTask.schedule(()=>{for(let e of t)this._highest[e]=this.intersectTransformedGeometry(r,this._queryRays[e],this._highest[e],this._options.elevationOffset)},this._signal)}async _loadGeometry(e){let t=await this._layer.elevationQueryNodeLoader.loadNodeData(e,this._signal);return(0,f.Te)(this._signal),null==t.geometryBuffer||null==t.geometryDescriptor?null:this.transformNode(e,t)}async transformNode(e,t){let r=e.serviceMbsInIndexSR;if(null==r)return null;let i=(0,ge.C)(r,0,we,this._indexSpatialReference,this._intersectionSpaceSpatialReference),n={context:`i3s-elevation-query-${this._layer.uid}`,geometryBuffer:t.geometryBuffer,geometryData:null,geometryDescriptor:t.geometryDescriptor,layouts:[Ne],globalTrafo:i,geometryElevationOffset:0,mbs:r.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:0,planetRadiusInGlobalMode:0,needNormals:!1,computeNormals:!1,normalReferenceFrame:we,indexToVertexProjector:this._indexToVertexProjector,vertexToRenderProjector:this._vertexToIntersectionSpaceProjector},s=await this._layer.processElevationQueryGeometry(n,this._signal);return(0,f.Te)(this._signal),s}intersectTransformedGeometry(e,t,r,i){let n=e.globalTrafo;if(null==(0,B.B8)(Ce,n))return r;let s=(0,Z.Z0)(Oe,t.origin,Ce),o=(0,Z.WQ)(Le,t.origin,t.direction),a=(0,Z.Z0)(De,o,Ce),l=(0,Z.jb)(Ue,a,s),{data:u,indices:h}=e.transformedGeometry.positionData,c=h.length/3,d=r;return(0,Ee.h7)(s,l,0,c,h,u,3,!1,e=>{let t=(0,Z.hs)(Fe,l,e);(0,Z.WQ)(t,t,s);let r=(0,Z.Z0)(Pe,t,n),o=ke;if((0,re.F)(r,this._intersectionSpaceSpatialReference,o,this._layer.spatialReference)){let e=o[2]+i;d=Math.max(d,e)}}),d}async requestJSON(e){let t=await this._layer.elevationQueryDataRequester.request(e,"json",this._signal);return(0,f.Te)(this._signal),t}}class Se extends Te{constructor(e,t,r,i){super(e,t,r),this._pages=new Map,this._pageSize=i.pageSize,this._rootIndex=i.rootIndex,this._urlPrefix=i.urlPrefix;let n=this._pageId(this._rootIndex),s=this._rootIndex-n*this._pageSize;this._rootPage=new ve(i.rootPage);let o=this._rootPage.nodes[s].obb;this._rootRayOriginZ=o.centerZ+o.radius+1}visitRoot(e){return this._visitNode(this._rootIndex,e)}getRootRayOriginZ(){return this._rootRayOriginZ}_pageId(e){return Math.floor(e/this._pageSize)}getPage(e){if(e===this._pageId(this._rootIndex))return Promise.resolve(this._rootPage);let t=this._pages.get(e);if(null==t){let r=`${this._urlPrefix}${e}`;t=this.requestJSON(r).then(e=>new ve(e)),this._pages.set(e,t)}return t}async _visitNode(e,t){if(0===t.length)return;let r=this._pageId(e),i=await this.getPage(r);(0,f.Te)(this._signal);let n=i.nodes[e-r*this._pageSize],s=this._intersectsQueryObb(n.obb,t);if(0===s.length)return;let{children:o}=n;if(null!=o&&o.length>0)return await Promise.all(o.map(e=>this._visitNode(e,s))),void(0,f.Te)(this._signal);let a=this._createNode(e,n);null!=a&&(await this._processLeafNode(a,s),(0,f.Te)(this._signal))}_createNode(e,t){return null==t.geometryResource||null==t.geometryDefinition?null:new he(`${e}`,e,new oe.i(t.obb.getCenter((0,Y.vt)()),t.obb.radius),t.children?.length??0,0,{hasSharedResource:!1,isEmpty:!1,geometry:`${t.geometryResource}`,geometryDefinition:t.geometryDefinition,materialDefinition:-1},"",0,0,null,t.obb.clone())}}class Ae extends Te{constructor(e,t,r,i){super(e,t,r),this._rootNode=new Ie(i.rootNode),this._urlPrefix=i.urlPrefix}visitRoot(e){let t=this.intersectsQueryBounds(this._rootNode,e);return 0===t.length?Promise.resolve():this._visitNodeData(this._rootNode,null!=this._rootNode.obb,t)}getRootRayOriginZ(){return this._rootNode.mbs.center[2]+this._rootNode.mbs.radius+1}_visitNode(e,t){let r=this.intersectsQueryBounds(e,t);return 0===r.length?Promise.resolve():this._visitNodeAsync(e,r)}async _visitNodeAsync(e,t){let r=`${this._urlPrefix}${e.id}`,i=new Ie(await this.requestJSON(r));(0,f.Te)(this._signal),await this._visitNodeData(i,null!=e.obb,t),(0,f.Te)(this._signal)}async _visitNodeData(e,t,r){let i=t||null==e.obb?r:this._intersectsQueryObb(e.obb,r);if(0===i.length)return;let{children:n}=e;if(null!=n&&n.length>0)return await Promise.all(n.map(e=>this._visitNode(e,i))),void(0,f.Te)(this._signal);let s=this._createNode(e);null!=s&&(await this._processLeafNode(s,i),(0,f.Te)(this._signal))}_createNode(e){if(!e.hasGeometryData)return null;let{id:t}=e;return new he(t,0,e.mbs.clone(),e.children?.length??0,0,{hasSharedResource:e.hasSharedResource,isEmpty:!1,geometry:t,geometryDefinition:0},e.version??"",0,0,null,e.obb?.clone()??null)}}function xe(e,t,r,i,n){let s=(0,Y.fA)(e,t,r),o=(0,Y.fA)(e,t,r-1e3),a=(0,Y.vt)(),l=(0,Y.vt)();return(0,re.F)(s,i,a,n)&&(0,re.F)(o,i,l,n)?(0,se.Cr)(a,l):null}const Me=Number.MAX_VALUE,we="none",Ne=(0,pe.U)((0,ye.hH)(new ye.W7(!1,!1,0))),Ce=(0,z.vt)(),Oe=(0,Y.vt)(),Le=(0,Y.vt)(),De=(0,Y.vt)(),Ue=(0,Y.vt)(),Fe=(0,Y.vt)(),Pe=(0,Y.vt)(),ke=(0,Y.vt)();var Ge=r(50805),qe=r(23704),Ve=r(58325),Qe=r(36005);let je=class extends((0,H.w6)((0,G.b)((0,V.q)((0,Q.A)((0,j.j)((0,d.M)((0,q.d)((0,k.p)((0,l.OU)(P.A)))))))))){constructor(e){super(e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();let e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,e?.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([(0,g.on)(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},g.OH),(0,g.wB)(()=>this.modifications,()=>this._modificationsGeneration++,g.OH),(0,g.wB)(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),g.OH),(0,g.wB)(()=>this.elevationQueryDataRequester,()=>this._abortElevationQueriesAfterDependencyChange(),g.OH)])}readModifications(e,t,r){this._modificationsSource={url:(0,p.f)(e,r),context:r}}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new U.Cm((e,t)=>F.nu.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(e,t,r){let n={stack:[],error:void 0,hasError:!1};try{let s=r?.noDataValue??Number.MAX_VALUE,l=this._elevationQueryWorker,c=new AbortController;e.addHandles((0,h.rE)(c),c),(0,i.mS)(n,(0,h.Bf)((0,h.hA)(()=>e.removeHandles(c))),!1);let d=AbortSignal.any([r?.signal,this._elevationQueryAbortController.signal,c.signal].filter(o.Ru));await this.load({signal:d}),(0,f.Te)(d);let g=$.q.fromGeometry(t),m={signal:d,elevationOffset:this.elevationInfo?.offset??0,scheduler:e.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){let e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=(0,a.Ke)(l.setLegacySchema(this._elevationQueryWorkerContext,e)))}let p=await async function(e,t,r){let i=await e.indexInfo;if((0,f.Te)(r.signal),null==i)throw new u.A("integrated-mesh-elevation-query:index-missing","I3S index information is missing.");return"page"===i.type?new Se(e,t,r,i).promise:new Ae(e,t,r,i).promise}(this,g,m);(0,f.Te)(d);let _=p.coordinates,y=Array(_.length);for(let e=0;e<_.length;++e){let t=_[e],r=t.z===Me;y[e]=r,r&&(t.z=s)}let E=await p.project(t.spatialReference,d);(0,f.Te)(d);let b=E??g.clone(),v={geometry:b.export(),noDataValue:s};return r?.returnSampleInfo&&(v.sampleInfo=b.coordinates.map((e,t)=>({demResolution:y[t]?-1:1}))),v}catch(e){n.error=e,n.hasError=!0}finally{(0,i.hk)(n)}}async queryElevationForGround(e,t){let r=$.q.fromGeometry(e),i=We(e),{view:n,...s}=t;if(null!=i&&"3d"===n?.type){let e=await this.queryElevation(n,i,s),t=$.q.fromGeometry(e.geometry),o=t.coordinates.map((t,r)=>({demResolution:e.sampleInfo?.[r]?.demResolution??(t.z===e.noDataValue?-1:1),source:this}));return{geometry:r.clone(t.coordinates).export(),noDataValue:e.noDataValue,sampleInfo:o}}return{geometry:r.export(),noDataValue:Number.MAX_VALUE,sampleInfo:r.coordinates.map(()=>({demResolution:-1,source:this}))}}_abortElevationQueriesAfterDependencyChange(){let e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){let r=await this._elevationQueryWorkerSetup;return null!=r&&(0,a.QA)(r),(0,f.Te)(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){let t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,f.QP)(e)}if((0,f.Te)(t),await this._fetchService(t),(0,f.Te)(t),null!=this._modificationsSource){let r=await Ve.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);(0,f.Te)(t),this.setAtOrigin("modifications",r,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),(0,f.Te)(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"})}get isUsedAsGroundLayer(){return qe.y.isUsedAsGroundLayer(this)}get replacesTerrain(){return!1}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new u.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new u.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new u.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new b(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new D(this,this.elevationQueryDataRequester,c.A.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){let t="Integrated mesh layers";(0,m.XF)(c.A.getLogger(this),(0,m.B)(t,"absolute-height",e)),(0,m.XF)(c.A.getLogger(this),(0,m.tW)(t,e))}};(0,i.Cg)([(0,n.MZ)({type:String,readOnly:!0})],je.prototype,"geometryType",void 0),(0,i.Cg)([(0,n.MZ)({type:["show","hide"]})],je.prototype,"listMode",void 0),(0,i.Cg)([(0,n.MZ)({type:["IntegratedMeshLayer"]})],je.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1},readOnly:!0})],je.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:Ge.W4,readOnly:!0,clonable:!1})],je.prototype,"nodePages",void 0),(0,i.Cg)([(0,n.MZ)({type:[Ge.uV],readOnly:!0,clonable:!1})],je.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,n.MZ)({type:[Ge.Ot],readOnly:!0,clonable:!1})],je.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,n.MZ)({type:[Ge.L0],readOnly:!0,clonable:!1})],je.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],je.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,n.MZ)({type:Ve.A,clonable:e=>e?.clone()??e}),(0,s.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],je.prototype,"modifications",void 0),(0,i.Cg)([(0,n.MZ)({clonable:e=>e?{...e}:null})],je.prototype,"_modificationsSource",void 0),(0,i.Cg)([(0,Qe.w)(["web-scene","portal-item"],"modifications")],je.prototype,"readModifications",null),(0,i.Cg)([(0,n.MZ)(W.Yj)],je.prototype,"elevationInfo",null),(0,i.Cg)([(0,n.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],je.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({clonable:!1})],je.prototype,"_elevationQueryWorker",null),(0,i.Cg)([(0,n.MZ)()],je.prototype,"_modificationsGeneration",void 0),(0,i.Cg)([(0,n.MZ)()],je.prototype,"memoizedElevationQueryDependencies",null),(0,i.Cg)([(0,n.MZ)()],je.prototype,"isUsedAsGroundLayer",null),(0,i.Cg)([(0,n.MZ)()],je.prototype,"replacesTerrain",null),(0,i.Cg)([(0,n.MZ)({clonable:!1})],je.prototype,"elevationQueryDataRequester",null),(0,i.Cg)([(0,n.MZ)({clonable:!1})],je.prototype,"elevationQueryNodeLoader",null),je=(0,i.Cg)([(0,n.$K)("esri.layers.IntegratedMeshLayer")],je);const He=je;function We(e){return e instanceof $.q?We(e.export()):"point"===e.type||"multipoint"===e.type||"polyline"===e.type?e:null}},85707(e,t,r){var i=r(32198),n=r(91429),s=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,i.Cg)([(0,n.MZ)({readOnly:!0,type:s.A})],r.prototype,"heightModelInfo",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),n=r(53966),s=r(84952),o=r(60694),a=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},s=(0,i.o8)(a.OZ),l=s.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,n){(0,o.LS)(this,e,r,t,n)}),{...s,set:function(e){if(null==e)return void this._set("url",e);let r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:n.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},i=(0,s.An)(e.url);return null!=i&&(null==e.dynamicDataSource?null!=e.layerId&&(i.path=(0,s.fj)(i.path,r??"",e.layerId.toString())):i.path=(0,s.fj)(i.path,"dynamicLayer")),i}},89707(e,t,r){r.d(t,{H:()=>i});class i{constructor(e=1/0,t=-1/0){this.minElevation=e,this.maxElevation=t}get elevationRangeValid(){return!Number.isNaN(this.minElevation)}get isEmpty(){return!(this.minElevation<=this.maxElevation)}contains(e){return this.minElevation<=e.minElevation&&this.maxElevation>=e.maxElevation}invalidateElevationRange(){this.minElevation=NaN}initializeEmpty(){this.minElevation=1/0,this.maxElevation=-1/0}expandElevationRange(e){let t=Math.min(this.minElevation,e.minElevation),r=Math.max(this.maxElevation,e.maxElevation),i=t!==this.minElevation||r!==this.maxElevation;return this.minElevation=t,this.maxElevation=r,i}expandElevationRangeValues(e,t){let r=Math.min(this.minElevation,e),i=Math.max(this.maxElevation,t),n=r!==this.minElevation||i!==this.maxElevation;return this.minElevation=r,this.maxElevation=i,n}setElevationRange(e){this.minElevation=e.minElevation,this.maxElevation=e.maxElevation}setElevationRangeValues(e,t){this.minElevation=e,this.maxElevation=t}equals(e){return this.minElevation===e.minElevation&&this.maxElevation===e.maxElevation}}},62747(e,t,r){r.d(t,{W7:()=>s,hH:()=>o});var i=r(65786),n=r(1843);i.Y;class s extends i.Y{constructor(e,t,r){super(),this.hasVertexColors=e,this.hasNormals=t,this.textureCoordinateType=r}}function o(e){let t=(0,n.BP)().vec3f("position");return e.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===e.textureCoordinateType?t.vec2f("uv0"):2===e.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}},92359(e,t,r){r.d(t,{nu:()=>d,W6:()=>u}),r(4576),r(71511),r(44208),r(53966);var i=r(17676),n=(r(36708),r(44794),r(78659)),s=r(32198),o=r(56372),a=r(91429);let l=class extends o.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,s.Cg)([(0,a.MZ)()],l.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,s.Cg)([(0,a.MZ)()],l.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),l=(0,s.Cg)([(0,a.$K)("esri.views.support.debugFlags")],l),new l,r(49186),Symbol("Yield");const u={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",SCREEN_POLYGON_INTERSECTION:"screen polygon intersection",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_FILTER_HIGHLIGHT:"feature filter highlight",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1};new Map([[u.RESOURCE_CONTROLLER_IMMEDIATE,0],[u.RESOURCE_CONTROLLER,4],[u.SLIDE,0],[u.STREAM_DATA_LOADER,0],[u.ELEVATION_QUERY,0],[u.TERRAIN_SURFACE,1],[u.SURFACE_GEOMETRY_UPDATES,1],[u.LOD_RENDERER,2],[u.GRAPHICS_CORE,2],[u.I3S,2],[u.LYR3D,2],[u.TILES3D,3],[u.POINT_CLOUD_LAYER,2],[u.FEATURE_TILE_FETCHER,2],[u.STREAM_CONTROLLER,2],[u.SCREEN_POLYGON_INTERSECTION,0],[u.CLOUDS_GENERATOR,2],[u.OCCLUSION_QUERY,2],[u.OVERLAY,4],[u.OVERLAY_RENDERER,4],[u.STAGE,4],[u.GRAPHICS_DECONFLICTOR,4],[u.FILTER_VISIBILITY,4],[u.SCALE_VISIBILITY,4],[u.FRUSTUM_VISIBILITY,4],[u.POINT_OF_INTEREST_FREQUENT,6],[u.POINT_OF_INTEREST_INFREQUENT,30],[u.LABELER,8],[u.FEATURE_FILTER_HIGHLIGHT,2],[u.FEATURE_QUERY_ENGINE,8],[u.FEATURE_TILE_TREE,16],[u.FEATURE_TILE_TREE_ACTIVE,0],[u.ELEVATION_ALIGNMENT,12],[u.ELEVATION_ALIGNMENT_SCENE,14],[u.TEXT_TEXTURE_ATLAS,12],[u.TEXTURE_UNLOAD,12],[u.LINE_OF_SIGHT_TOOL,16],[u.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[u.VOLUME_MEASUREMENT,4],[u.SNAPPING,0],[u.SHADOW_ACCUMULATOR,30],[u.FLOW_GENERATOR,12],[u.GAUSSIAN_SPLAT_SORTING,2],[u.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[u.MAPVIEW_FETCH_QUEUE,0],[u.MAPVIEW_LAYERVIEW_UPDATE,2],[u.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]),(0,n.l5)(6.5),(0,n.l5)(1),(0,n.l5)(30),(0,n.l5)(1e3/30),(0,n.l5)(100),Symbol.dispose;const h=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this._enabled&&this._budget!==1/0&&this.elapsed>=this._budget,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};h.enabled=!1;class c{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,r){try{if((0,i.G4)(t)){let e=(0,i.NK)();return r?Promise.resolve(r(e)):Promise.reject(e)}return(0,i.z7)(e(h))}catch(e){return Promise.reject(e)}}reschedule(e,t,r){return this.schedule(e,t,r)}async scheduleGenerator(e,t,r){if((0,i.G4)(t)){let e=(0,i.NK)();if(r)return r(e);throw e}let n=e(h);for(;;){let e=n.next(h),s=(0,i.$X)(e)?await e:e;if((0,i.G4)(t)){let e=(0,i.NK)();if(r){let t=r(e),s=n.return(null);return(0,i.$X)(s)&&await(0,i.QZ)(s),t}let t=n.throw(e);throw(0,i.$X)(t)&&await(0,i.QZ)(t),e}if(s.done)return s.value}}}const d=new c}}]);
|
|
1
|
+
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[7915],{68197(e,t,r){r.d(t,{A:()=>h});var i=r(40876),n=r(56507),s=r(4576),o=r(34727);function a(e){return(0,o.qE)((0,n.Vr)(e),0,255)}function l(e,t){let r=e.toString(16).padStart(2,"0");return t?r.slice(0,1):r}function u(e){return.2126*(0,i.Q6)(e.r)+.7152*(0,i.Q6)(e.g)+.0722*(0,i.Q6)(e.b)}class h{static blendColors(e,t,r,i=new h){return i.r=Math.round(e.r+(t.r-e.r)*r),i.g=Math.round(e.g+(t.g-e.g)*r),i.b=Math.round(e.b+(t.b-e.b)*r),i.a=e.a+(t.a-e.a)*r,i._sanitize()}static fromRgb(e,t){let r=(0,i.lT)(e);return r?h.fromArray(r,t):null}static fromHex(e,t=new h){let r=(0,i.oW)(e);return r?h.fromArray(r,t):null}static fromArray(e,t=new h){return t._set(Number(e[0]),Number(e[1]),Number(e[2]),Number(e[3])),isNaN(t.a)&&(t.a=1),t._sanitize()}static fromString(e,t){let r=(0,i.Eq)(e);return r?h.fromArray(r,t):null}static fromJSON(e){return null==e?void 0:new h([e[0],e[1],e[2],(e[3]??255)/255])}toUnitRGB(){return[this.r/255,this.g/255,this.b/255]}toUnitRGBA(e){return e??=[0,0,0,0],e[0]=this.r/255,e[1]=this.g/255,e[2]=this.b/255,e[3]=null==this.a?1:this.a,e}constructor(e){this.r=255,this.g=255,this.b=255,this.a=1,e&&this.setColor(e)}get isBright(){return this.toYiq()>=127}isLowContrastBlend(e,t=3){let r=e instanceof h?e:new h(e),i=u(this),n=u(r);return(Math.max(i,n)+.05)/(Math.min(i,n)+.05)<t}setColor(e){if("string"==typeof e)h.fromString(e,this);else if((0,s.yc)(e))h.fromArray(e,this);else{let t=e;this._set(t.r??0,t.g??0,t.b??0,t.a??1),e instanceof h||this._sanitize()}return this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(e){let t=e?.capitalize??!1,r=e?.digits??6,i=3===r||4===r,n=4===r||8===r,s=`#${l(this.r,i)}${l(this.g,i)}${l(this.b,i)}${n?l(Math.round(255*this.a),i):""}`;return t?s.toUpperCase():s}toYiq(){return.299*this.r+.587*this.g+.114*this.b}toCss(e=!1){let t=this.r+", "+this.g+", "+this.b;return e?`rgba(${t}, ${this.a})`:`rgb(${t})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(e=0){let t=a(this.r),r=a(this.g),i=a(this.b);return 0===e||1!==this.a?[t,r,i,a(255*this.a)]:[t,r,i]}clone(){return new h(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(e){return null!=e&&e.r===this.r&&e.g===this.g&&e.b===this.b&&e.a===this.a}_sanitize(){return this.r=(0,i.c1)(this.r),this.g=(0,i.c1)(this.g),this.b=(0,i.c1)(this.b),this.a=(0,i.G1)(this.a),this}_set(e,t,r,i){this.r=e,this.g=t,this.b=r,this.a=i}}h.prototype.declaredClass="esri.Color"},40876(e,t,r){r.d(t,{Eq:()=>f,G1:()=>m,Q6:()=>E,TS:()=>s,V6:()=>n,Vm:()=>g,ay:()=>l,c1:()=>p,c4:()=>o,iw:()=>y,j5:()=>u,lT:()=>c,oW:()=>h,xV:()=>b});const i={transparent:[0,0,0,0],black:[0,0,0,1],silver:[192,192,192,1],gray:[128,128,128,1],white:[255,255,255,1],maroon:[128,0,0,1],red:[255,0,0,1],purple:[128,0,128,1],fuchsia:[255,0,255,1],green:[0,128,0,1],lime:[0,255,0,1],olive:[128,128,0,1],yellow:[255,255,0,1],navy:[0,0,128,1],blue:[0,0,255,1],teal:[0,128,128,1],aqua:[0,255,255,1],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],blanchedalmond:[255,235,205,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],oldlace:[253,245,230,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],rebeccapurple:[102,51,153,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],whitesmoke:[245,245,245,1],yellowgreen:[154,205,50,1]};function n(e){return!!i[e]||!!i[e.toLowerCase()]}function s(e){return i[e]??i[e.toLowerCase()]}function o(e){return[...s(e)]}function a(e,t,r){r<0&&++r,r>1&&--r;let i=6*r;return i<1?e+(t-e)*i:2*r<1?t:3*r<2?e+(t-e)*(2/3-r)*6:e}function l(e,t,r,i=1){let n=(e%360+360)%360/360,s=r<=.5?r*(t+1):r+t-r*t,o=2*r-s;return[Math.round(255*a(o,s,n+1/3)),Math.round(255*a(o,s,n)),Math.round(255*a(o,s,n-1/3)),i]}function u(e){let t=e.length>5,r=t?8:4,i=(1<<r)-1,n=t?1:17,s=t?9===e.length:5===e.length,o=Number("0x"+e.slice(1));if(isNaN(o))return null;let a,l=[0,0,0,1];return s&&(a=o&i,o>>=r,l[3]=n*a/255),a=o&i,o>>=r,l[2]=n*a,a=o&i,o>>=r,l[1]=n*a,a=o&i,o>>=r,l[0]=n*a,l}function h(e){if(!e.startsWith("#")||isNaN(Number(`0x${e.slice(1)}`)))return null;switch(e.length){case 4:case 5:{let t=parseInt(e.slice(1,2),16),r=parseInt(e.slice(2,3),16),i=parseInt(e.slice(3,4),16),n=4===e.length?15:parseInt(e.slice(4),16);return[t+16*t,r+16*r,i+16*i,(n+16*n)/255]}case 7:case 9:return[parseInt(e.slice(1,3),16),parseInt(e.slice(3,5),16),parseInt(e.slice(5,7),16),(7===e.length?255:parseInt(e.slice(7),16))/255];default:return null}}function c(e){let t=e.toLowerCase().match(/^(rgba?|hsla?)\(([\s.\-,%0-9]+)\)/);if(t){let e=t[2].split(/\s*,\s*/),r=t[1];if("rgb"===r&&3===e.length||"rgba"===r&&4===e.length){if(e[0].endsWith("%")){let t=e.map(e=>2.56*parseFloat(e));return 4===e.length&&(t[3]=parseFloat(e[3])),d(t)}return d(e.map(e=>parseFloat(e)))}if("hsl"===r&&3===e.length||"hsla"===r&&4===e.length)return l(parseFloat(e[0]),parseFloat(e[1])/100,parseFloat(e[2])/100,parseFloat(e[3]??"1"))}return null}function d(e){return e[0]=p(e[0]),e[1]=p(e[1]),e[2]=p(e[2]),e[3]=4===e.length?m(e[3]):1,e}function f(e){let t=n(e)?s(e):null;return t??=c(e),t??=h(e),t}function g(e){let t=f(e);return null==t?null:[t[0]/255,t[1]/255,t[2]/255,t[3]]}function m(e){return _(e,0,1)}function p(e){return Math.round(_(e,0,255))}function _(e,t,r){return e=Number(e),isNaN(e)?r:e<t?t:e>r?r:e}const y=1/2.2;function E(e){return e**2.2}function b(e){return e**y}},85334(e,t,r){r.d(t,{$:()=>y,IB:()=>a,Iy:()=>T,KV:()=>R,N2:()=>E,RH:()=>v,ZD:()=>b,sn:()=>I});var i=r(68197),n=r(4576),s=r(4718),o=(r(78955),r(91829),r(34727));function a(e){return"r"in e&&"g"in e&&"b"in e}function l(e){return"h"in e&&"s"in e&&"v"in e}function u(e){return"l"in e&&"a"in e&&"b"in e}function h(e){return"l"in e&&"c"in e&&"h"in e}const c=[[.4124,.3576,.1805],[.2126,.7152,.0722],[.0193,.1192,.9505]],d=[[3.2406,-1.5372,-.4986],[-.9689,1.8758,.0415],[.0557,-.204,1.057]];function f(e,t){let r,i,n=[];if(e[0].length!==t.length)throw Error("dimensions do not match");let s=e.length,o=e[0].length,a=0;for(r=0;r<s;r++){for(a=0,i=0;i<o;i++)a+=e[r][i]*t[i];n.push(a)}return n}function g(e){let t=[e.r/255,e.g/255,e.b/255].map(e=>e<=.04045?e/12.92:((e+.055)/1.055)**2.4),r=f(c,t);return{x:100*r[0],y:100*r[1],z:100*r[2]}}function m(e){let t=f(d,[e.x/100,e.y/100,e.z/100]).map(e=>{let t=e<=.0031308?12.92*e:1.055*e**(1/2.4)-.055;return Math.min(1,Math.max(t,0))});return{r:Math.round(255*t[0]),g:Math.round(255*t[1]),b:Math.round(255*t[2])}}function p(e){let t=[e.x/95.047,e.y/100,e.z/108.883].map(e=>e>(6/29)**3?e**(1/3):1/3*(29/6)**2*e+4/29);return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2])}}function _(e){let t=e.l,r=[(t+16)/116+e.a/500,(t+16)/116,(t+16)/116-e.b/200].map(e=>e>6/29?e**3:3*(6/29)**2*(e-4/29));return{x:95.047*r[0],y:100*r[1],z:108.883*r[2]}}function y(e){return a(e)?e:h(e)?function(e){return m(_(function(e){let t=e.l,r=e.c,i=e.h;return{l:t,a:r*Math.cos(i),b:r*Math.sin(i)}}(e)))}(e):u(e)?function(e){return m(_(e))}(e):function(e){return"x"in e&&"y"in e&&"z"in e}(e)?m(e):l(e)?function(e){let t,r=(e.h+360)%360/60,i=e.s/100,n=e.v/100*255,s=n*i,o=s*(1-Math.abs(r%2-1));switch(Math.floor(r)){case 0:t={r:s,g:o,b:0};break;case 1:t={r:o,g:s,b:0};break;case 2:t={r:0,g:s,b:o};break;case 3:t={r:0,g:o,b:s};break;case 4:t={r:o,g:0,b:s};break;case 5:case 6:t={r:s,g:0,b:o};break;default:t={r:0,g:0,b:0}}return t.r=Math.round(t.r+n-s),t.g=Math.round(t.g+n-s),t.b=Math.round(t.b+n-s),t}(e):e}function E(e){return l(e)?e:function(e){let{r:t,g:r,b:i}=e,n=Math.max(t,r,i),s=n-Math.min(t,r,i),o=n,a=0===s?0:n===t?(r-i)/s%6:n===r?(i-t)/s+2:(t-r)/s+4,l=0===s?0:s/o;return a<0&&(a+=6),a*=60,l*=100,o*=100/255,{h:a,s:l,v:o}}(y(e))}function b(e){return u(e)?e:function(e){return p(g(e))}(y(e))}function v(e){return h(e)?e:function(e){return function(e){let t=e.l,r=e.a,i=e.b,n=Math.sqrt(r*r+i*i),s=Math.atan2(i,r);return s=s>0?s:s+2*Math.PI,{l:t,c:n,h:s}}(p(g(e)))}(y(e))}function R(e){return e[0]??=0,e[1]??=0,e[2]??=0,e}function I(e){return e.length=4,R(e),e[3]??=1,(0,o.qE)(e[3],0,1),e}function T(e,t,r={}){if(0===e.length||t<=0)return[];if(1===(e=e.map(e=>"string"==typeof e?new i.A(e):e)).length||1===t){let r=[],i=e[0];for(let e=0;e<t;e++)r.push(i.clone());return r}if(r.shuffle&&(e=(0,n.k4)((0,s.o8)(e),r.seed)),e.length>=t){let r=[],i=(e.length-1)/(t-1);for(let n=0;n<t;n++){let t=Math.round(n*i);r.push(e[t].clone())}return r}return function(e,t,r={}){let i=[],s=e.length-1,o=Math.ceil((t-e.length)/s);e:for(let n=0;n<s;n++){let s=e[n],a=e[n+1];for(let n=1;n<=o;n++){let l=n/(o+1);if(i.push(A(s,a,l,r)),i.length+e.length===t)break e}}return[...e.map(e=>e.clone()),...(0,n.k4)(i,r.seed??1)]}(e,t,r)}const S=(e,t)=>{let r=Math.floor(10*t())-5;return Math.min(255,Math.max(0,e+r))};function A(e,t,r,s={}){let o=e.r,a=e.g,l=e.b,u=t.r,h=t.g,c=t.b,d=Math.round(o+(u-o)*r),f=Math.round(a+(h-a)*r),g=Math.round(l+(c-l)*r);if(!s.offset)return new i.A([d,f,g]);let m=(0,n.Mo)(s.seed);return new i.A([S(d,m),S(f,m),S(g,m)])}},90629(e,t,r){r.d(t,{L7:()=>s,Lz:()=>o,PN:()=>a,cr:()=>l,gs:()=>h,ps:()=>n,r_:()=>c,tc:()=>u}),r(39829);const i=/^-?(\d+(\.\d+)?)\s*((px)|(pt))?$/i,n=a(1),s=o(1);function o(e){return e?e/72*96:0}function a(e){return e?72*e/96:0}function l(e){if("string"==typeof e){let t=e.match(i);if(t){let r=Number(t[1]),i=t[3]&&t[3].toLowerCase(),n=e.startsWith("-"),s="px"===i?a(r):r;return n?-s:s}return console.warn("screenUtils.toPt: input not recognized!"),null}return e}function u(e=0,t=0){return{x:e,y:t}}function h(e=0,t=0){return[e,t]}function c(e=0,t=0,r=0){return[e,t,r]}},4197(e,t,r){r.d(t,{Vj:()=>o,cj:()=>s,jh:()=>n});var i=r(9093);function n(e){return e<=1024?Array(e).fill(0):new Float64Array(e)}function s(e){return[...e]}function o(e){let t=(0,i.vt)();for(let r=0;r<16;++r)t[r]=e[r];return t}},70328(e,t,r){r.d(t,{BI:()=>M,C:()=>o,DC:()=>d,Dg:()=>g,Ej:()=>b,Ie:()=>A,Jt:()=>x,Lu:()=>R,Ne:()=>I,RF:()=>c,TF:()=>y,VL:()=>m,aI:()=>N,fA:()=>a,gE:()=>u,gX:()=>E,hZ:()=>S,iT:()=>f,is:()=>w,pg:()=>v,qv:()=>C,uJ:()=>_,vI:()=>T,vY:()=>l,v_:()=>O,vt:()=>s,w1:()=>h,yr:()=>p}),r(35522);var i=r(5443),n=(r(19419),r(4197));function s(e=O){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function o(e,t){for(let r=0;r<6;r++)e[r]=t[r];return e}function a(e,t,r,i,n,o,a=s()){return a[0]=e,a[1]=t,a[2]=r,a[3]=i,a[4]=n,a[5]=o,a}function l(e,t=s()){return function(e,t,r,i=s()){return S(i,C),function(e,t,r=0,i=t.length/3){let n=e[0],s=e[1],o=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<i;e++)n=Math.min(n,t[r+3*e]),s=Math.min(s,t[r+3*e+1]),o=Math.min(o,t[r+3*e+2]),a=Math.max(a,t[r+3*e]),l=Math.max(l,t[r+3*e+1]),u=Math.max(u,t[r+3*e+2]);e[0]=n,e[1]=s,e[2]=o,e[3]=a,e[4]=l,e[5]=u}(i,e,t,r),i}(e,0,e.length/3,t)}function u(e,t=(0,n.jh)(24)){let[r,i,s,o,a,l]=e;return t[0]=r,t[1]=i,t[2]=s,t[3]=r,t[4]=i,t[5]=l,t[6]=r,t[7]=a,t[8]=s,t[9]=r,t[10]=a,t[11]=l,t[12]=o,t[13]=i,t[14]=s,t[15]=o,t[16]=i,t[17]=l,t[18]=o,t[19]=a,t[20]=s,t[21]=o,t[22]=a,t[23]=l,t}function h(e,t){return isFinite(e[2])||isFinite(e[5])?new i.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}):new i.A({xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t,r=e){r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r[2]=Math.min(e[2],t[2]),r[3]=Math.max(e[3],t[3]),r[4]=Math.max(e[4],t[4]),r[5]=Math.max(e[5],t[5])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function f(e,[t,r,i]){g(e,t,r,i)}function g(e,t,r,i){e[0]=Math.min(e[0],t),e[1]=Math.min(e[1],r),e[2]=Math.min(e[2],i),e[3]=Math.max(e[3],t),e[4]=Math.max(e[4],r),e[5]=Math.max(e[5],i)}function m(e){return e[0]>=e[3]?0:e[3]-e[0]}function p(e){return e[1]>=e[4]?0:e[4]-e[1]}function _(e){return e[2]>=e[5]?0:e[5]-e[2]}function y(e){let t=m(e),r=_(e),i=p(e);return t*t+r*r+i*i}function E(e,t=[0,0,0]){return t[0]=e[0]+m(e)/2,t[1]=e[1]+p(e)/2,t[2]=e[2]+_(e)/2,t}function b(e,t=[0,0,0]){return t[0]=m(e),t[1]=p(e),t[2]=_(e),t}function v(e,t){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}function R(e,t){return t[0]=e[3],t[1]=e[4],t[2]=e[5],t}function I(e,t,r=e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r!==e&&(r[3]=e[3],r[4]=e[4],r[5]=e[5]),r}function T(e,t,r=e){return r[3]=t[0],r[4]=t[1],r[5]=t[2],r!==e&&(r[0]=e[0],r[1]=e[1],r[2]=e[2]),e}function S(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function A(e){return e?S(e,C):s(C)}function x(e,t){return e[0]=t[0],e[1]=t[1],e[2]=-1/0,e[3]=t[2],e[4]=t[3],e[5]=1/0,e}function M(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=-1/0,e[3]=i,e[4]=n,e[5]=1/0,e}function w(e){return 6===e.length}function N(e,t,r){if(null==e||null==t)return e===t;if(!w(e)||!w(t))return!1;if(r){for(let i=0;i<e.length;i++)if(!r(e[i],t[i]))return!1}else for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}const C=[1/0,1/0,1/0,-1/0,-1/0,-1/0],O=[0,0,0,0,0,0];s()},50498(e,t,r){var i=r(66552),n=r(5443),s=r(91075),o=r(48526),a=r(86738),l=r(39829),u=r(82799);const h=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon"}),c=(0,i.O)()({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh"}),d={base:s.A,key:"type",typeMap:{extent:n.A,multipoint:o.A,point:a.A,polyline:u.A,polygon:l.A}},f=new i.J({esriGeometryBezier3Curve:"cubic-bezier",esriGeometryCircularArc:"circular-arc",esriGeometryEllipticArc:"elliptic-arc"},{ignoreUnknown:!0});r.d(t,["Ye",0,c,"gy",0,h,"iI",0,f,"yR",0,d])},42521(e,t,r){r.r(t),r.d(t,{default:()=>He});var i=r(32198),n=r(91429),s=r(87024),o=r(4576),a=r(60999),l=r(69540),u=r(49186),h=r(36563),c=r(53966),d=r(25728),f=r(17676),g=r(36708),m=r(24212),p=r(97159),_=r(97768),y=r(78888),E=r(50075);class b{constructor(e,t){this._customParameters=e,this._apiKey=t,this._activeRequests=new Set}isFull(e){return(0,E._i)(e)}request(e,t,r){let i=new AbortController,n=(0,f.NY)(r,()=>i.abort()),s={...E.Fz,signal:i.signal,responseType:t,query:{...this._customParameters,token:this._apiKey}},o=(0,y.A)(e,s),a={abortController:i,abortHandle:n};return this._activeRequests.add(a),o.then(({data:e})=>e).finally(()=>{a.abortController=null,a.abortHandle=(0,_.xt)(a.abortHandle),this._activeRequests.delete(a)})}cancelAll(){this._activeRequests.forEach(e=>{e.abortController=(0,_.DC)(e.abortController),e.abortHandle=(0,_.xt)(e.abortHandle)}),this._activeRequests.clear()}}var v=r(44208),R=r(4718),I=r(84952),T=r(59418),S=r(85334),A=(r(91829),r(34727)),x=r(49788);r(73941),r(76200);var M=r(74810);function w(e){return e.sort((e,t)=>e.encoding-t.encoding)}const N={ktx2:1,basis:2,dds:4,png:8,jpg:16,"ktx-etc2":32},C={"image/ktx2":2,"image/x.basis":2,"image/vnd-ms.dds":4,"image/png":8,"image/jpg":16,"image/jpeg":16,"image/ktx":32};function O(e){let t=e?.materialDefinitions?Object.keys(e.materialDefinitions)[0]:null,r=e?.textureDefinitions?Object.keys(e.textureDefinitions)[0]:null,i=t?e.materialDefinitions?.[t]:null,n=r?e.textureDefinitions?.[r]:null,s=L();if(null!=i){let e=i.params;e.diffuse&&((0,S.KV)(e.diffuse),s.metallicRoughness.baseColorFactor=[e.diffuse[0],e.diffuse[1],e.diffuse[2],1]),null!=e.doubleSided&&(s.doubleSided=e.doubleSided,s.cullFace=e.doubleSided?0:2),("none"===e.cullFace||"front"===e.cullFace||"back"===e.cullFace)&&(s.cullFace="none"===e.cullFace?0:"back"===e.cullFace?2:1),e.transparency&&(s.metallicRoughness.baseColorFactor[3]=(0,A.qE)(1-e.transparency,0,1)),(e.useVertexColorAlpha||s.metallicRoughness.baseColorFactor[3]<1)&&(s.alphaMode="blend")}let o=[];if(null!=n){n.wrap&&("repeat"===n.wrap[0]||"repeat"===n.wrap[1])&&(s.wrapTextures=!0);let e=1;"rgba"===n.channels&&(s.alphaMode="blend",e|=32);let t=n.images.length-1,r=n.images[t],i=e=>e?.split("/").pop(),a=Array.isArray(n.encoding)?w(n.encoding.map((e,t)=>({name:i(r.href[t]),encoding:C[e]||0}))):[{name:i(r.href),encoding:C[n.encoding]||0}];o.push({id:0,usage:e,encodings:a}),s.metallicRoughness.baseColorTextureId=0}return{material:s,textures:o}}const L=()=>({alphaMode:"opaque",alphaCutoff:x.Q,doubleSided:!0,cullFace:0,normalTextureId:-1,emissiveTextureId:-1,occlusionTextureId:-1,emissiveFactor:[0,0,0],metallicRoughness:{baseColorFactor:[.8,.8,.8,1],baseColorTextureId:-1,metallicRoughnessTextureId:-1,metallicFactor:0,roughnessFactor:.6},wrapTextures:!1,hasParametersFromSource:!0});class D{constructor(e,t,r,i,n,s){if(this._requester=t,this._logger=r,this._defaultGeometrySchema=i,this._requiredAttributes=n,this._options=s,this._logLayer=e,this._layerUrl=e.parsedUrl.path,this._geometryDefinitions=e.geometryDefinitions,e.materialDefinitions){let t=e.textureSetDefinitions;this._materialAndTextures=e.materialDefinitions.map(r=>function(e,t,r){let i=new Map,n=(e,t)=>{if(null==e)return-1;let r=i.get(e.id);if(r)return r.usage|=t,r.id;let n=i.size;return i.set(e.id,{id:n,usage:t}),n},s=t.pbrMetallicRoughness,o=s?.baseColorFactor?(0,S.sn)(s.baseColorFactor):null,a=t.emissiveFactor,l=r&&0===s?.metallicFactor||(0,M.Jr)({normalTexture:t.normalTexture,emissiveTexture:t.emissiveTexture,emissiveFactor:t.emissiveFactor,occlusionTexture:t.occlusionTexture,metallicRoughnessTexture:s?.metallicRoughnessTexture,metallicFactor:s?.metallicFactor,roughnessFactor:s?.roughnessFactor}),u=l?M.Bt[0]:s?.metallicFactor??M.mb[0],h=l?M.Bt[1]:s?.roughnessFactor??M.mb[1],c="mask"===t.alphaMode?33:1,d={baseColorFactor:o?[o[0],o[1],o[2],o[3]]:[1,1,1,1],baseColorTextureId:n(s?.baseColorTexture,c),metallicRoughnessTextureId:n(s?.metallicRoughnessTexture,2),metallicFactor:u,roughnessFactor:h},f={alphaMode:t.alphaMode,alphaCutoff:t.alphaCutoff,doubleSided:t.doubleSided,cullFace:"none"===t.cullFace?0:"back"===t.cullFace?2:+("front"===t.cullFace),normalTextureId:n(t.normalTexture,4),emissiveTextureId:n(t.emissiveTexture,16),occlusionTextureId:n(t.occlusionTexture,8),emissiveFactor:a?[a[0],a[1],a[2]]:[0,0,0],metallicRoughness:d,wrapTextures:!1,hasParametersFromSource:l},g=[];return i.forEach(({usage:t},r)=>{let i=null!=e&&e[r]&&e[r].formats,n=i?w(i.map(({name:e,format:t})=>({name:e,encoding:N[t]}))):[];g.push({id:r,usage:t,encodings:n})}),{material:f,textures:g}}(t,r,"integrated-mesh"===e.type))}}_loadAttribute(e,t,r){let i=`${this._layerUrl}/nodes/${e.resources.attributes}/attributes/${t.key}/0`;return this._requester.request(i,"array-buffer",r).then(e=>(0,T.m0)(t,e))}async loadAttributes(e,t,r){let i=await Promise.allSettled(t.map(t=>this._loadAttribute(e,t.attributeStorageInfo,r))),n={};for(let r=0;r<t.length;++r){let s=i[r],o=t[r];if("fulfilled"===s.status){let e=s.value;n[o.name]=e}else{let t=s.reason;(0,f.QP)(t),this._logger.error("#loadAttributes",this._logLayer,`Failed to load attributeData for '${o.name}' on node '${e.id}'`,t)}}return n}async loadNodeData(e,t){let r=null!=this._requiredAttributes&&e.resources.attributes?(0,a.Ke)(this.loadAttributes(e,this._requiredAttributes,t)):null,{bufferDefinition:i,bufferIndex:n}=function(e,t){let r={bufferDefinition:null,bufferIndex:0},i=t.resources.geometryDefinition;if(null==e||null==i||i<0)return r;let n=i>=0?e[i].geometryBuffers:null;if(null==n)return r;for(let e=0;e<n.length;e++){let t=n[e];if(null!=t.compressedAttributes){if("draco"===t.compressedAttributes.encoding&&!(0,v.A)("disable-feature:i3s-draco"))return r.bufferIndex=e,r.bufferDefinition=t,r}else r.bufferIndex=e,r.bufferDefinition=n[e]}return r}(this._geometryDefinitions,e),s=!!e.resources.geometry,o=s?(0,a.Ke)(this._loadGeometry(e.resources.geometry,n,t)):null,l=e.resources.hasSharedResource?await this._loadShared(e,t):null,u=e.resources.materialDefinition,h=this._materialAndTextures&&null!=u&&u>=0?this._materialAndTextures[u]:null==l?null:O(l),c=h?.material,d=h?.textures??[],f=`${e.id}`,g=!s&&this._options.loadFeatureData,m=g?await this._loadFeatureData(f,t):null,p=g?function(e){if(!e)return null;for(let t of e.featureData){let e=t.geometries;if(null!=e)for(let r of e)return{featureIds:[t.id],featureDataPosition:t.position,geometries:[r]}}return null}(m):{featureIds:[],geometries:[{type:"ArrayBufferView",params:{material:c}}],featureDataPosition:[0,0,0]},_=null==p?function(e){if(!e)return null;let t=[];for(let r of e.featureData)null!=r.position&&t.push({featureIds:[r.id],featureDataPosition:r.position,geometries:[]});return t}(m):null,y=d.length>0?(0,a.Ke)(this.loadTextures(e,d,t)):null,E=null,b=null;if(o){E=(0,a.QA)(await o);let e=function(e,t){if(!e||!t?.materialDefinitions)return e;let r=Object.keys(t.materialDefinitions)[0];return!t.materialDefinitions[r].params.vertexRegions&&e.vertexAttributes.region&&delete(e=(0,R.o8)(e)).vertexAttributes.region,e}(this._defaultGeometrySchema,l);b=(0,T.qs)(i,e)}let I=y?(0,a.QA)(await y):null,S=r?(0,a.QA)(await r):{},A=S?{attributeData:S,loadedAttributes:this._requiredAttributes}:null;if(null!=p)return{geometryData:p,attributeDataInfo:A,geometryBuffer:E,geometryDescriptor:b,requiredTextures:d,textureData:I};if(null!=_)return{pointData:_,attributeDataInfo:A,geometryBuffer:E,geometryDescriptor:b,requiredTextures:d,textureData:I};throw Error()}static _addAbsoluteHrefTexture(e,t){let r=e.textureDefinitions;if(null!=r)for(let e of Object.keys(r))for(let i of r[e].images)i.hrefConcat=Array.isArray(i.href)?i.href.map(e=>(0,I.s2)(e,t)):(0,I.s2)(i.href,t)}static _fixTextureEncodings(e){let t=e.textureDefinitions;if(null!=t)for(let e in t){let r=t[e];if(Array.isArray(r.encoding))for(let e=0;e<r.encoding.length;e++){let t=r.encoding[e];t.startsWith("data:")&&(r.encoding[e]=t.slice(5))}else{let e=r.encoding;e.startsWith("data:")&&(r.encoding=e.slice(5))}}}async _loadShared(e,t){if(null==e.resources.geometry)return{};let r=`${this._layerUrl}/nodes/${e.resources.geometry}/shared`,i=await this._requester.request(r,"json",t);return D._fixTextureEncodings(i),D._addAbsoluteHrefTexture(i,r),i}_loadTexture(e,t,r,i,n){return 4===i||1===i||2===i?this._requester.request(e,"array-buffer",n).then(e=>({id:t,usage:r,data:e,encoding:i})):this._requester.request(e,"image",n).then(e=>({id:t,usage:r,data:e,encoding:i}))}loadTextures(e,t,r){let i=this._options.textureUsageMask;return Promise.all(t.map(t=>{if(0===(t.usage&i))return null;let n=function(e,t){if(null!=t)return e.find(e=>0!==(e.encoding&t))}(t.encodings,this._options.textureEncodings);if(null==n)return this._logger.error("#loadTextures",this._logLayer,`No known encoding for texture found on node ${e.id}`),Promise.reject();let s=e.resources.texture||e.id,o=`${this._layerUrl}/nodes/${s}/textures/${n.name}`;return this._loadTexture(o,t.id,t.usage,n.encoding,r)}))}_loadFeatureData(e,t){let r=`${this._layerUrl}/nodes/${e}/features/0`;return this._requester.request(r,"json",t)}_loadGeometry(e,t,r){let i=`${this._layerUrl}/nodes/${e}/geometries/${t}`;return this._requester.request(i,"array-buffer",r)}}var U=r(98697),F=r(92359),P=r(4146),k=r(52136),G=r(18768),q=r(69208),V=r(34287),Q=r(8303),j=r(25036),H=r(58947),W=r(10873),$=r(10292),B=r(58083),z=r(9093),Z=r(35522),Y=r(51850),K=r(79258),X=r(37539);function J(e,t,r,i){let n=i+t;if(n<i/2||r>n)return Number.MAX_VALUE;let s=Math.abs(te*e)+Math.asin(r/n);return s>=Math.PI/2?Number.MAX_VALUE:r/Math.cos(s)}const ee=(0,Y.vt)(),te=(0,A.kU)(1);var re=r(27993),ie=r(16930),ne=r(98764);(0,Y.vt)();var se=r(71351),oe=r(28540),ae=r(19419),le=r(89707);class ue extends le.H{constructor(e,t){super(NaN,NaN),this.id=e,this.serviceMbsInIndexSR=t,this._serviceMbsInRenderSRElevationAdjusted=new oe.i(0,0,0,-1),this._serviceMbsInRenderSR=new oe.i(0,0,0,-1),this._serviceMbsElevationUpdateExtent=null,this._mbsConeInRenderSR=null}get serviceMbsInRenderSRElevationAdjusted(){return this._serviceMbsInRenderSRElevationAdjusted}updateServiceMbsInRenderSRElevationAdjusted(e){return this._serviceMbsInRenderSRElevationAdjusted.copyFrom(e),this._serviceMbsInRenderSRElevationAdjusted}get serviceMbsInRenderSR(){return this._serviceMbsInRenderSR}updateServiceMbsInRenderSR(e){return this._serviceMbsInRenderSR.copyFrom(e),null!=this._serviceMbsElevationUpdateExtent&&(0,ae.Ie)(this._serviceMbsElevationUpdateExtent),this._serviceMbsInRenderSR}get serviceMbsElevationUpdateExtent(){return this._serviceMbsElevationUpdateExtent??=(0,ae.Ie)()}get mbsConeInRenderSR(){return this._mbsConeInRenderSR}updateMbsConeInRenderSR(e){return this._mbsConeInRenderSR=e.clone(),this._mbsConeInRenderSR}invalidateServiceBVsInRenderSR(){this._serviceMbsInRenderSRElevationAdjusted.invalidate(),this._serviceMbsInRenderSR.invalidate(),null!=this._serviceMbsElevationUpdateExtent&&(0,ae.Ie)(this._serviceMbsElevationUpdateExtent),this._mbsConeInRenderSR=null,this.serviceObbInRenderSR?.invalidate()}shareServiceBVsInRenderSRWith(e){this.serviceObbInRenderSR=e.serviceObbInRenderSR,this._serviceMbsInRenderSRElevationAdjusted=e._serviceMbsInRenderSRElevationAdjusted,this._serviceMbsInRenderSR=e._serviceMbsInRenderSR,this._serviceMbsElevationUpdateExtent=e._serviceMbsElevationUpdateExtent??=(0,ae.Ie)(),this._mbsConeInRenderSR=e._mbsConeInRenderSR}}class he extends ue{constructor(e,t,r,i,n,s,o,a,l,u,h){super(e,r),this.index=t,this.childCount=i,this.level=n,this.resources=s,this.version=o,this.lodMetric=a,this.maxError=l,this.numFeatures=u,this.failed=!1,this.cacheState=0,this.vertexCount=0,this.memory=0,this.childrenLoaded=0,this.hasModifications=!1,this.imModificationImpact=4,this.elevationAgnosticBoundingVolume=new ce,this.serviceObbInIndexSR=h}invalidateServiceBVsInRenderSR(){super.invalidateServiceBVsInRenderSR(),this.elevationAgnosticBoundingVolume.invalidate()}}class ce{constructor(){this._data=[0,0,0,ce.invalidRadius]}static{this.invalidRadius=-2}invalidate(){this._data[3]=ce.invalidRadius}get valid(){return this._data[3]!==ce.invalidRadius}get radius(){return this._data[3]}getAxis(e){return e[0]=this._data[0],e[1]=this._data[1],e[2]=this._data[2],e}set(e,t){this._data[0]=e[0],this._data[1]=e[1],this._data[2]=e[2],this._data[3]=t}intersectsFrustumConservative(e,t,r){if(!this.valid)return!0;let i=this.getAxis(de),{center:n,radius:s}=e.boundingSphere,o=s+r;return t?this.radius>fe||function(e,t,r,i){let n=(0,Z.Bw)(r);if(n<=i)return!0;let s=(0,Z.Om)(e,r);if(s<=0)return-s<=i;let o=(0,A.qE)(s/n,-1,1),a=Math.sqrt(1-o*o),l=(0,A.qE)(i/n,0,1);return a*Math.sqrt(1-l*l)-l*o<=t}(i,this.radius,n,o):function(e,t,r,i){let n=r[0]-e[0],s=r[1]-e[1],o=t+i;return n*n+s*s<=o*o}(i,this.radius,n,o)&&function(e,t,r,i,n){for(let s of n){let n=s[0],o=s[1],a=s[2],l=a>0?r:i;if(n*e[0]+o*e[1]+a*l+s[3]-Math.hypot(n,o)*t>0)return!1}return!0}(i,this.radius,n[2]-o,n[2]+o,e.planes)}}const de=(0,Y.vt)(),fe=.9;var ge=r(25992),me=r(66480),pe=r(4431),_e=r(57005),ye=r(62747),Ee=r(58682);class be{constructor(e){this.children=e.children,this.obb=_e.ab.fromJSON(e.obb),this.geometryResource=e.mesh?.geometry.resource,this.geometryDefinition=e.mesh?.geometry.definition}}class ve{constructor(e){this.nodes=e.nodes.map(e=>new be(e))}}class Re{constructor(e,t,r){this.id=e,this.obb=null==r?null:_e.ab.fromJSON(r),this.mbs=null==this.obb?new oe.i(t):null}}class Ie extends Re{constructor(e){super(e.id,e.mbs,e.obb),this.mbs=new oe.i(e.mbs),this.children=e.children?.map(e=>new Re(e.id,e.mbs,e.obb)),this.hasSharedResource=null!=e.sharedResource,this.hasGeometryData=(e.geometryData?.length??0)>0,this.version=e.version}}class Te{constructor(e,t,r){this._layer=e,this._descriptor=t,this._options=r,this._queryRays=[],this._subtaskAbortController=new AbortController,this._highest=new Float64Array,this._signal=AbortSignal.any([r.signal,this._subtaskAbortController.signal]),this._indexSpatialReference=(0,me.Rm)(e),this._vertexSpatialReference=(0,me.Dd)(e),this._intersectionSpaceSpatialReference=function(e,t){return e?(0,ne.lO)(t):t.isGeographic?ie.A.PlateCarree:t}(this._indexSpatialReference.isGeographic,this._indexSpatialReference),this._indexToVertexProjector=(0,X.wy)(this._indexSpatialReference,this._vertexSpatialReference),this._vertexToIntersectionSpaceProjector=(0,X.wy)(this._vertexSpatialReference,this._intersectionSpaceSpatialReference),this.frameTask=r.scheduler.registerTask(F.W6.ELEVATION_QUERY),this.promise=this._run()}async _run(){let e={stack:[],error:void 0,hasError:!1};try{(0,i.mS)(e,this.frameTask,!1);try{let e=this._descriptor;if("point"!==e.geometry.type&&"multipoint"!==e.geometry.type&&"polyline"!==e.geometry.type)throw new u.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");if(null==this._indexToVertexProjector||null==this._vertexToIntersectionSpaceProjector)throw new u.A("integrated-mesh-elevation-query:projection","Failed to create projection for elevation query.");let t=await e.project(this._indexSpatialReference,this._signal);(0,f.Te)(this._signal),t??this._throwSpatialReferenceMismatchError();for(let e of t.coordinates){let t=xe(e.x,e.y,this.getRootRayOriginZ(),this._indexSpatialReference,this._intersectionSpaceSpatialReference);t??this._throwSpatialReferenceMismatchError(),this._queryRays.push(t)}this._highest=new Float64Array(this._queryRays.length).fill(-1/0),await this.visitRoot(this._queryRays.map((e,t)=>t)),(0,f.Te)(this._signal);for(let e=0;e<t.coordinates.length;++e){let r=this._highest[e];t.coordinates[e].z=r===-1/0?Me:r}return t}catch(e){throw this._subtaskAbortController.abort(),e}}catch(t){e.error=t,e.hasError=!0}finally{(0,i.hk)(e)}}_throwSpatialReferenceMismatchError(){throw new u.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${this._descriptor.spatialReference.wkid}' on an elevation service in '${this._indexSpatialReference.wkid}'`)}_intersectsQueryObb(e,t){let r=new _e.ab;return e.transform(r,this._indexSpatialReference,this._intersectionSpaceSpatialReference),t.filter(e=>{let t=this._queryRays[e];return r.intersectRay(t.origin,t.direction)})}intersectsQueryBounds(e,t){if(null==e)return t;if(null!=e.obb)return this._intersectsQueryObb(e.obb,t);let r=e.mbs;if(null==r)return t;let i=new oe.i;return function(e,t,r,i){if(null==e||null==t||null==i)return!1;let n=(0,X.Tp)(t,i);if(null==n?.projector)return!1;if(n.projector===X.pO)return r.copyFrom(e),!0;let{source:s,dest:o,projector:a}=n;if(3===o.spatialReferenceId){let t=X.w5[s.spatialReferenceId][2];return null!=t&&(t(e.center,0,ee,0),(0,X.s7)(ee,0,r.center,0),r.radius=J(ee[1],e.center[2],e.radius,K.$O.radius),!0)}if(2!==s.spatialReferenceId&&5!==s.spatialReferenceId||11!==o.spatialReferenceId){a(e.center,0,r.center,0);let t=s.metersPerUnit??1,i=o.metersPerUnit??1;r.radius=e.radius*t/i}else{let t=X.w5[s.spatialReferenceId][1],i=X.w5[1][11],n=e.radius;null!=t&&null!=i&&(n=J(e.center[1],e.center[2],e.radius,K.$O.radius)),a(e.center,0,r.center,0),r.radius=n}return!0}(r,this._indexSpatialReference,i,this._intersectionSpaceSpatialReference)?t.filter(e=>i.intersectRay(this._queryRays[e])):t}async _processLeafNode(e,t){let r=await this._loadGeometry(e);(0,f.Te)(this._signal),null!=r&&await this.frameTask.schedule(()=>{for(let e of t)this._highest[e]=this.intersectTransformedGeometry(r,this._queryRays[e],this._highest[e],this._options.elevationOffset)},this._signal)}async _loadGeometry(e){let t=await this._layer.elevationQueryNodeLoader.loadNodeData(e,this._signal);return(0,f.Te)(this._signal),null==t.geometryBuffer||null==t.geometryDescriptor?null:this.transformNode(e,t)}async transformNode(e,t){let r=e.serviceMbsInIndexSR;if(null==r)return null;let i=(0,ge.C)(r,0,we,this._indexSpatialReference,this._intersectionSpaceSpatialReference),n={context:`i3s-elevation-query-${this._layer.uid}`,geometryBuffer:t.geometryBuffer,geometryData:null,geometryDescriptor:t.geometryDescriptor,layouts:[Ne],globalTrafo:i,geometryElevationOffset:0,mbs:r.toJSON(),obbData:e.serviceObbInIndexSR?.data,elevationOffset:0,planetRadiusInGlobalMode:0,needNormals:!1,computeNormals:!1,normalReferenceFrame:we,indexToVertexProjector:this._indexToVertexProjector,vertexToRenderProjector:this._vertexToIntersectionSpaceProjector},s=await this._layer.processElevationQueryGeometry(n,this._signal);return(0,f.Te)(this._signal),s}intersectTransformedGeometry(e,t,r,i){let n=e.globalTrafo;if(null==(0,B.B8)(Ce,n))return r;let s=(0,Z.Z0)(Oe,t.origin,Ce),o=(0,Z.WQ)(Le,t.origin,t.direction),a=(0,Z.Z0)(De,o,Ce),l=(0,Z.jb)(Ue,a,s),{data:u,indices:h}=e.transformedGeometry.positionData,c=h.length/3,d=r;return(0,Ee.h7)(s,l,0,c,h,u,3,!1,e=>{let t=(0,Z.hs)(Fe,l,e);(0,Z.WQ)(t,t,s);let r=(0,Z.Z0)(Pe,t,n),o=ke;if((0,re.F)(r,this._intersectionSpaceSpatialReference,o,this._layer.spatialReference)){let e=o[2]+i;d=Math.max(d,e)}}),d}async requestJSON(e){let t=await this._layer.elevationQueryDataRequester.request(e,"json",this._signal);return(0,f.Te)(this._signal),t}}class Se extends Te{constructor(e,t,r,i){super(e,t,r),this._pages=new Map,this._pageSize=i.pageSize,this._rootIndex=i.rootIndex,this._urlPrefix=i.urlPrefix;let n=this._pageId(this._rootIndex),s=this._rootIndex-n*this._pageSize;this._rootPage=new ve(i.rootPage);let o=this._rootPage.nodes[s].obb;this._rootRayOriginZ=o.centerZ+o.radius+1}visitRoot(e){return this._visitNode(this._rootIndex,e)}getRootRayOriginZ(){return this._rootRayOriginZ}_pageId(e){return Math.floor(e/this._pageSize)}getPage(e){if(e===this._pageId(this._rootIndex))return Promise.resolve(this._rootPage);let t=this._pages.get(e);if(null==t){let r=`${this._urlPrefix}${e}`;t=this.requestJSON(r).then(e=>new ve(e)),this._pages.set(e,t)}return t}async _visitNode(e,t){if(0===t.length)return;let r=this._pageId(e),i=await this.getPage(r);(0,f.Te)(this._signal);let n=i.nodes[e-r*this._pageSize],s=this._intersectsQueryObb(n.obb,t);if(0===s.length)return;let{children:o}=n;if(null!=o&&o.length>0)return await Promise.all(o.map(e=>this._visitNode(e,s))),void(0,f.Te)(this._signal);let a=this._createNode(e,n);null!=a&&(await this._processLeafNode(a,s),(0,f.Te)(this._signal))}_createNode(e,t){return null==t.geometryResource||null==t.geometryDefinition?null:new he(`${e}`,e,new oe.i(t.obb.getCenter((0,Y.vt)()),t.obb.radius),t.children?.length??0,0,{hasSharedResource:!1,isEmpty:!1,geometry:`${t.geometryResource}`,geometryDefinition:t.geometryDefinition,materialDefinition:-1},"",0,0,null,t.obb.clone())}}class Ae extends Te{constructor(e,t,r,i){super(e,t,r),this._rootNode=new Ie(i.rootNode),this._urlPrefix=i.urlPrefix}visitRoot(e){let t=this.intersectsQueryBounds(this._rootNode,e);return 0===t.length?Promise.resolve():this._visitNodeData(this._rootNode,null!=this._rootNode.obb,t)}getRootRayOriginZ(){return this._rootNode.mbs.center[2]+this._rootNode.mbs.radius+1}_visitNode(e,t){let r=this.intersectsQueryBounds(e,t);return 0===r.length?Promise.resolve():this._visitNodeAsync(e,r)}async _visitNodeAsync(e,t){let r=`${this._urlPrefix}${e.id}`,i=new Ie(await this.requestJSON(r));(0,f.Te)(this._signal),await this._visitNodeData(i,null!=e.obb,t),(0,f.Te)(this._signal)}async _visitNodeData(e,t,r){let i=t||null==e.obb?r:this._intersectsQueryObb(e.obb,r);if(0===i.length)return;let{children:n}=e;if(null!=n&&n.length>0)return await Promise.all(n.map(e=>this._visitNode(e,i))),void(0,f.Te)(this._signal);let s=this._createNode(e);null!=s&&(await this._processLeafNode(s,i),(0,f.Te)(this._signal))}_createNode(e){if(!e.hasGeometryData)return null;let{id:t}=e;return new he(t,0,e.mbs.clone(),e.children?.length??0,0,{hasSharedResource:e.hasSharedResource,isEmpty:!1,geometry:t,geometryDefinition:0},e.version??"",0,0,null,e.obb?.clone()??null)}}function xe(e,t,r,i,n){let s=(0,Y.fA)(e,t,r),o=(0,Y.fA)(e,t,r-1e3),a=(0,Y.vt)(),l=(0,Y.vt)();return(0,re.F)(s,i,a,n)&&(0,re.F)(o,i,l,n)?(0,se.Cr)(a,l):null}const Me=Number.MAX_VALUE,we="none",Ne=(0,pe.U)((0,ye.hH)(new ye.W7(!1,!1,0))),Ce=(0,z.vt)(),Oe=(0,Y.vt)(),Le=(0,Y.vt)(),De=(0,Y.vt)(),Ue=(0,Y.vt)(),Fe=(0,Y.vt)(),Pe=(0,Y.vt)(),ke=(0,Y.vt)();var Ge=r(50805),qe=r(23704),Ve=r(58325),Qe=r(36005);let je=class extends((0,H.w6)((0,G.b)((0,V.q)((0,Q.A)((0,j.j)((0,d.M)((0,q.d)((0,k.p)((0,l.OU)(P.A)))))))))){constructor(e){super(e),this.geometryType="mesh",this.operationalLayerType="IntegratedMeshLayer",this.type="integrated-mesh",this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.profile="mesh-pyramids",this.modifications=null,this._modificationsSource=null,this.path=null,this.definitionExpression=null,this._elevationQueryAbortController=new AbortController,this._elevationQueryWorkerContext=`i3s-elevation-query-${this.uid}`,this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,this._modificationsGeneration=0}destroy(){this._elevationQueryAbortController.abort();let e=this._elevationQueryWorkerHandle;this._elevationQueryWorkerHandle=null,this._elevationQueryWorkerSetup=null,e?.destroyContextAndSelf(this._elevationQueryWorkerContext),super.destroy()}initialize(){this.addHandles([(0,g.on)(()=>this.modifications,"after-changes",()=>{this.modifications=this.modifications,this._modificationsGeneration++},g.OH),(0,g.wB)(()=>this.modifications,()=>this._modificationsGeneration++,g.OH),(0,g.wB)(()=>this.memoizedElevationQueryDependencies,()=>this._abortElevationQueriesAfterDependencyChange(),g.OH),(0,g.wB)(()=>this.elevationQueryDataRequester,()=>this._abortElevationQueriesAfterDependencyChange(),g.OH)])}readModifications(e,t,r){this._modificationsSource={url:(0,p.f)(e,r),context:r}}set elevationInfo(e){(null==e||"absolute-height"===e.mode)&&this._set("elevationInfo",e),this._validateElevationInfo(e)}async load(e){return this.addResolvingPromise(this._doLoad(e)),this}get _elevationQueryWorker(){return this._elevationQueryWorkerHandle??=new U.Cm((e,t)=>F.nu.schedule(e,t))}get memoizedElevationQueryDependencies(){return[this.elevationInfo?.offset,this._modificationsGeneration]}async queryElevation(e,t,r){let n={stack:[],error:void 0,hasError:!1};try{let s=r?.noDataValue??Number.MAX_VALUE,l=this._elevationQueryWorker,c=new AbortController;e.addHandles((0,h.rE)(c),c),(0,i.mS)(n,(0,h.Bf)((0,h.hA)(()=>e.removeHandles(c))),!1);let d=AbortSignal.any([r?.signal,this._elevationQueryAbortController.signal,c.signal].filter(o.Ru));await this.load({signal:d}),(0,f.Te)(d);let g=$.q.fromGeometry(t),m={signal:d,elevationOffset:this.elevationInfo?.offset??0,scheduler:e.resourceController.scheduler};if(null==this._elevationQueryWorkerSetup){let e=this.store?.defaultGeometrySchema;null!=e&&(this._elevationQueryWorkerSetup=(0,a.Ke)(l.setLegacySchema(this._elevationQueryWorkerContext,e)))}let p=await async function(e,t,r){let i=await e.indexInfo;if((0,f.Te)(r.signal),null==i)throw new u.A("integrated-mesh-elevation-query:index-missing","I3S index information is missing.");return"page"===i.type?new Se(e,t,r,i).promise:new Ae(e,t,r,i).promise}(this,g,m);(0,f.Te)(d);let _=p.coordinates,y=Array(_.length);for(let e=0;e<_.length;++e){let t=_[e],r=t.z===Me;y[e]=r,r&&(t.z=s)}let E=await p.project(t.spatialReference,d);(0,f.Te)(d);let b=E??g.clone(),v={geometry:b.export(),noDataValue:s};return r?.returnSampleInfo&&(v.sampleInfo=b.coordinates.map((e,t)=>({demResolution:y[t]?-1:1}))),v}catch(e){n.error=e,n.hasError=!0}finally{(0,i.hk)(n)}}async queryElevationForGround(e,t){let r=$.q.fromGeometry(e),i=We(e),{view:n,...s}=t;if(null!=i&&"3d"===n?.type){let e=await this.queryElevation(n,i,s),t=$.q.fromGeometry(e.geometry),o=t.coordinates.map((t,r)=>({demResolution:e.sampleInfo?.[r]?.demResolution??(t.z===e.noDataValue?-1:1),source:this}));return{geometry:r.clone(t.coordinates).export(),noDataValue:e.noDataValue,sampleInfo:o}}return{geometry:r.export(),noDataValue:Number.MAX_VALUE,sampleInfo:r.coordinates.map(()=>({demResolution:-1,source:this}))}}_abortElevationQueriesAfterDependencyChange(){let e=this._elevationQueryAbortController;this._elevationQueryAbortController=new AbortController,e.abort()}async processElevationQueryGeometry(e,t){let r=await this._elevationQueryWorkerSetup;return null!=r&&(0,a.QA)(r),(0,f.Te)(t),this._elevationQueryWorker.invoke(e,t)}async _doLoad(e){let t=e?.signal;try{await this.loadFromPortal({supportedTypes:["Scene Service"]},e)}catch(e){(0,f.QP)(e)}if((0,f.Te)(t),await this._fetchService(t),(0,f.Te)(t),null!=this._modificationsSource){let r=await Ve.A.fromUrl(this._modificationsSource.url,this.spatialReference,e);(0,f.Te)(t),this.setAtOrigin("modifications",r,this._modificationsSource.context.origin),this._modificationsSource=null}await this._fetchIndexAndUpdateExtent(this.nodePages,t),(0,f.Te)(t)}beforeSave(){if(null!=this._modificationsSource)return this.load().then(()=>{},()=>{})}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:"integrated-mesh"})}get isUsedAsGroundLayer(){return qe.y.isUsedAsGroundLayer(this)}get replacesTerrain(){return!1}validateLayer(e){if(e.layerType&&"IntegratedMesh"!==e.layerType)throw new u.A("integrated-mesh-layer:layer-type-not-supported","IntegratedMeshLayer does not support this layer type",{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new u.A("layer:service-version-not-supported","Service version is not supported.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"});if(this.version.major>1)throw new u.A("layer:service-version-too-new","Service version is too new.",{serviceVersion:this.version.versionString,supportedVersions:"1.x"})}_getTypeKeywords(){return["IntegratedMeshLayer"]}get elevationQueryDataRequester(){return new b(this.customParameters,this.apiKey)}get elevationQueryNodeLoader(){return new D(this,this.elevationQueryDataRequester,c.A.getLogger("esri.layers.IntegratedMeshLayer"),this.store?.defaultGeometrySchema,[],{loadFeatureData:!1,textureUsageMask:0})}_validateElevationInfo(e){let t="Integrated mesh layers";(0,m.XF)(c.A.getLogger(this),(0,m.B)(t,"absolute-height",e)),(0,m.XF)(c.A.getLogger(this),(0,m.tW)(t,e))}};(0,i.Cg)([(0,n.MZ)({type:String,readOnly:!0})],je.prototype,"geometryType",void 0),(0,i.Cg)([(0,n.MZ)({type:["show","hide"]})],je.prototype,"listMode",void 0),(0,i.Cg)([(0,n.MZ)({type:["IntegratedMeshLayer"]})],je.prototype,"operationalLayerType",void 0),(0,i.Cg)([(0,n.MZ)({json:{read:!1},readOnly:!0})],je.prototype,"type",void 0),(0,i.Cg)([(0,n.MZ)({type:Ge.W4,readOnly:!0,clonable:!1})],je.prototype,"nodePages",void 0),(0,i.Cg)([(0,n.MZ)({type:[Ge.uV],readOnly:!0,clonable:!1})],je.prototype,"materialDefinitions",void 0),(0,i.Cg)([(0,n.MZ)({type:[Ge.Ot],readOnly:!0,clonable:!1})],je.prototype,"textureSetDefinitions",void 0),(0,i.Cg)([(0,n.MZ)({type:[Ge.L0],readOnly:!0,clonable:!1})],je.prototype,"geometryDefinitions",void 0),(0,i.Cg)([(0,n.MZ)({readOnly:!0})],je.prototype,"serviceUpdateTimeStamp",void 0),(0,i.Cg)([(0,n.MZ)({type:Ve.A,clonable:e=>e?.clone()??e}),(0,s.P)({origins:["web-scene","portal-item"],type:"resource",prefix:"modifications"})],je.prototype,"modifications",void 0),(0,i.Cg)([(0,n.MZ)({clonable:e=>e?{...e}:null})],je.prototype,"_modificationsSource",void 0),(0,i.Cg)([(0,Qe.w)(["web-scene","portal-item"],"modifications")],je.prototype,"readModifications",null),(0,i.Cg)([(0,n.MZ)(W.Yj)],je.prototype,"elevationInfo",null),(0,i.Cg)([(0,n.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0},"portal-item":{read:!0,write:!0}},read:!1}})],je.prototype,"path",void 0),(0,i.Cg)([(0,n.MZ)({clonable:!1})],je.prototype,"_elevationQueryWorker",null),(0,i.Cg)([(0,n.MZ)()],je.prototype,"_modificationsGeneration",void 0),(0,i.Cg)([(0,n.MZ)()],je.prototype,"memoizedElevationQueryDependencies",null),(0,i.Cg)([(0,n.MZ)()],je.prototype,"isUsedAsGroundLayer",null),(0,i.Cg)([(0,n.MZ)()],je.prototype,"replacesTerrain",null),(0,i.Cg)([(0,n.MZ)({clonable:!1})],je.prototype,"elevationQueryDataRequester",null),(0,i.Cg)([(0,n.MZ)({clonable:!1})],je.prototype,"elevationQueryNodeLoader",null),je=(0,i.Cg)([(0,n.$K)("esri.layers.IntegratedMeshLayer")],je);const He=je;function We(e){return e instanceof $.q?We(e.export()):"point"===e.type||"multipoint"===e.type||"polyline"===e.type?e:null}},85707(e,t,r){var i=r(32198),n=r(91429),s=r(54239);r.d(t,["a",0,e=>{let t=e,r=class extends t{constructor(){super(...arguments),this.heightModelInfo=null}read(e,t){super.read(e,t),"service"===t?.origin&&2===this.heightModelInfo?.origin&&(this.heightModelInfo.associatedSpatialReference=this.getAtOrigin("spatialReference","service"))}};return(0,i.Cg)([(0,n.MZ)({readOnly:!0,type:s.A})],r.prototype,"heightModelInfo",void 0),r=(0,i.Cg)([(0,n.$K)("esri.layers.mixins.HeightModelInfoMixin")],r),r}])},73179(e,t,r){r.d(t,{b:()=>l,h:()=>u});var i=r(4718),n=r(53966),s=r(84952),o=r(60694),a=r(10873);function l(e){let{nonStandardUrlAllowed:t=!1,separator:r}=e??{},s=(0,i.o8)(a.OZ),l=s.json?.write;return"object"==typeof l&&l&&(l.writer=function(e,t,i,n){(0,o.LS)(this,e,r,t,n)}),{...s,set:function(e){if(null==e)return void this._set("url",e);let r=(0,o.HZ)({layer:this,url:e,nonStandardUrlAllowed:t,logger:n.A.getLogger(this)});this._set("url",r.url),null!=r.layerId&&this._set("layerId",r.layerId)}}}function u(e,t){let{separator:r}=t??{},i=(0,s.An)(e.url);return null!=i&&(null==e.dynamicDataSource?null!=e.layerId&&(i.path=(0,s.fj)(i.path,r??"",e.layerId.toString())):i.path=(0,s.fj)(i.path,"dynamicLayer")),i}},89707(e,t,r){r.d(t,{H:()=>i});class i{constructor(e=1/0,t=-1/0){this.minElevation=e,this.maxElevation=t}get elevationRangeValid(){return!Number.isNaN(this.minElevation)}get isEmpty(){return!(this.minElevation<=this.maxElevation)}contains(e){return this.minElevation<=e.minElevation&&this.maxElevation>=e.maxElevation}invalidateElevationRange(){this.minElevation=NaN}initializeEmpty(){this.minElevation=1/0,this.maxElevation=-1/0}expandElevationRange(e){let t=Math.min(this.minElevation,e.minElevation),r=Math.max(this.maxElevation,e.maxElevation),i=t!==this.minElevation||r!==this.maxElevation;return this.minElevation=t,this.maxElevation=r,i}expandElevationRangeValues(e,t){let r=Math.min(this.minElevation,e),i=Math.max(this.maxElevation,t),n=r!==this.minElevation||i!==this.maxElevation;return this.minElevation=r,this.maxElevation=i,n}setElevationRange(e){this.minElevation=e.minElevation,this.maxElevation=e.maxElevation}setElevationRangeValues(e,t){this.minElevation=e,this.maxElevation=t}equals(e){return this.minElevation===e.minElevation&&this.maxElevation===e.maxElevation}}},62747(e,t,r){r.d(t,{W7:()=>s,hH:()=>o});var i=r(65786),n=r(1843);i.Y;class s extends i.Y{constructor(e,t,r){super(),this.hasVertexColors=e,this.hasNormals=t,this.textureCoordinateType=r}}function o(e){let t=(0,n.BP)().vec3f("position");return e.hasNormals&&t.vec2i16("normalCompressed",{glNormalized:!0}),1===e.textureCoordinateType?t.vec2f("uv0"):2===e.textureCoordinateType&&(t.vec2f("uv0"),t.vec4u16("uvRegion",{glNormalized:!0})),e.hasVertexColors&&t.vec4u8("color",{glNormalized:!0}),t.freeze()}},92359(e,t,r){r.d(t,{nu:()=>d,W6:()=>u}),r(4576),r(71511),r(44208),r(53966);var i=r(17676),n=(r(36708),r(44794),r(78659)),s=r(32198),o=r(56372),a=r(91429);let l=class extends o.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,s.Cg)([(0,a.MZ)()],l.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,s.Cg)([(0,a.MZ)()],l.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),l=(0,s.Cg)([(0,a.$K)("esri.views.support.debugFlags")],l),new l,r(49186),Symbol("Yield");const u={RESOURCE_CONTROLLER_IMMEDIATE:"immediate",RESOURCE_CONTROLLER:"schedule",SLIDE:"slide",STREAM_DATA_LOADER:"stream loader",ELEVATION_QUERY:"elevation query",TERRAIN_SURFACE:"terrain",SURFACE_GEOMETRY_UPDATES:"surface geometry updates",LOD_RENDERER:"LoD renderer",GRAPHICS_CORE:"Graphics3D",I3S:"I3S",LYR3D:"Lyr3D",TILES3D:"3DTiles",POINT_CLOUD_LAYER:"point cloud",FEATURE_TILE_FETCHER:"feature fetcher",STREAM_CONTROLLER:"stream controller",SCREEN_POLYGON_INTERSECTION:"screen polygon intersection",OCCLUSION_QUERY:"occlusion query",OVERLAY:"overlay",OVERLAY_RENDERER:"overlay renderer",STAGE:"stage",GRAPHICS_DECONFLICTOR:"graphics deconflictor",FILTER_VISIBILITY:"graphics filter visibility",SCALE_VISIBILITY:"graphics scale visibility",FRUSTUM_VISIBILITY:"graphics frustum visibility",POINT_OF_INTEREST_FREQUENT:"POI frequent",POINT_OF_INTEREST_INFREQUENT:"POI infrequent",LABELER:"labeler",FEATURE_FILTER_HIGHLIGHT:"feature filter highlight",FEATURE_QUERY_ENGINE:"feature query",FEATURE_TILE_TREE:"feature tile tree",FEATURE_TILE_TREE_ACTIVE:"fast feature tile tree",ELEVATION_ALIGNMENT:"elevation alignment",ELEVATION_ALIGNMENT_SCENE:"elevation alignment scene",TEXT_TEXTURE_ATLAS:"text texture atlas",TEXTURE_UNLOAD:"texture unload",LINE_OF_SIGHT_TOOL:"line of sight tool",LINE_OF_SIGHT_TOOL_INTERACTIVE:"interactive line of sight tool",VOLUME_MEASUREMENT:"volume measurement",ELEVATION_PROFILE:"elevation profile",SNAPPING:"snapping",SHADOW_ACCUMULATOR:"shadow accumulator",CLOUDS_GENERATOR:"clouds generator",FLOW_GENERATOR:"flow generator",GAUSSIAN_SPLAT_SORTING:"gaussian splat sorting",GAUSSIAN_SPLAT_TEXTURE_ATLAS:"gaussian splat texture atlas",MAPVIEW_FETCH_QUEUE:"mapview fetch queue",MAPVIEW_LAYERVIEW_UPDATE:"mapview layerview update",MAPVIEW_VECTOR_TILE_PARSING_QUEUE:"mapview vector tile parsing queue",NONE:0,TEST_PRIO:1};new Map([[u.RESOURCE_CONTROLLER_IMMEDIATE,0],[u.RESOURCE_CONTROLLER,4],[u.SLIDE,0],[u.STREAM_DATA_LOADER,0],[u.ELEVATION_QUERY,0],[u.TERRAIN_SURFACE,1],[u.SURFACE_GEOMETRY_UPDATES,1],[u.LOD_RENDERER,2],[u.GRAPHICS_CORE,2],[u.I3S,2],[u.LYR3D,2],[u.TILES3D,3],[u.POINT_CLOUD_LAYER,2],[u.FEATURE_TILE_FETCHER,2],[u.STREAM_CONTROLLER,2],[u.SCREEN_POLYGON_INTERSECTION,0],[u.CLOUDS_GENERATOR,2],[u.OCCLUSION_QUERY,2],[u.OVERLAY,4],[u.OVERLAY_RENDERER,4],[u.STAGE,4],[u.GRAPHICS_DECONFLICTOR,4],[u.FILTER_VISIBILITY,4],[u.SCALE_VISIBILITY,4],[u.FRUSTUM_VISIBILITY,4],[u.POINT_OF_INTEREST_FREQUENT,6],[u.POINT_OF_INTEREST_INFREQUENT,30],[u.LABELER,8],[u.FEATURE_FILTER_HIGHLIGHT,2],[u.FEATURE_QUERY_ENGINE,8],[u.FEATURE_TILE_TREE,16],[u.FEATURE_TILE_TREE_ACTIVE,0],[u.ELEVATION_ALIGNMENT,12],[u.ELEVATION_ALIGNMENT_SCENE,14],[u.TEXT_TEXTURE_ATLAS,12],[u.TEXTURE_UNLOAD,12],[u.LINE_OF_SIGHT_TOOL,16],[u.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[u.VOLUME_MEASUREMENT,4],[u.SNAPPING,0],[u.SHADOW_ACCUMULATOR,30],[u.FLOW_GENERATOR,12],[u.GAUSSIAN_SPLAT_SORTING,2],[u.GAUSSIAN_SPLAT_TEXTURE_ATLAS,12],[u.MAPVIEW_FETCH_QUEUE,0],[u.MAPVIEW_LAYERVIEW_UPDATE,2],[u.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]),(0,n.l5)(6.5),(0,n.l5)(1),(0,n.l5)(30),(0,n.l5)(1e3/30),(0,n.l5)(100),Symbol.dispose;const h=new class{constructor(){this._begin=performance?.now()??0,this._budget=0,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this._enabled&&this._budget!==1/0&&this.elapsed>=this._budget,this._done}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e){this._begin=this.now(),this._budget=e,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}};h.enabled=!1;class c{remove(){}[Symbol.dispose](){this.remove()}processQueue(){}schedule(e,t,r){try{if((0,i.G4)(t)){let e=(0,i.NK)();return r?Promise.resolve(r(e)):Promise.reject(e)}return(0,i.z7)(e(h))}catch(e){return Promise.reject(e)}}reschedule(e,t,r){return this.schedule(e,t,r)}async scheduleGenerator(e,t,r){if((0,i.G4)(t)){let e=(0,i.NK)();if(r)return r(e);throw e}let n=e(h);for(;;){let e=n.next(h),s=(0,i.$X)(e)?await e:e;if((0,i.G4)(t)){let e=(0,i.NK)();if(r){let t=r(e),s=n.return(null);return(0,i.$X)(s)&&await(0,i.QZ)(s),t}let t=n.throw(e);throw(0,i.$X)(t)&&await(0,i.QZ)(t),e}if(s.done)return s.value}}}const d=new c}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9588],{9588(e,r,t){t.d(r,{BlobReader:()=>a.nZ,BlobWriter:()=>a.D7,ZipReader:()=>a.zg});var a=t(
|
|
1
|
+
"use strict";(Array.isArray(self.webpackChunkRemoteClient)?self.webpackChunkRemoteClient:self.webpackChunkRemoteClient=[]).push([[9588],{9588(e,r,t){t.d(r,{BlobReader:()=>a.nZ,BlobWriter:()=>a.D7,ZipReader:()=>a.zg});var a=t(67620)}}]);
|