@arcgis/core 4.25.0-next.20220705 → 4.25.0-next.20220708
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/TimeExtent.js +1 -1
- package/arcade/arcadeCompiler.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/0703495557b0df6878c5.js +1 -0
- package/assets/esri/core/workers/chunks/1570676351a313f1841b.js +1 -0
- package/assets/esri/core/workers/chunks/{695f90305478f5024fa7.js → 1ecbf642debc2207b762.js} +1 -1
- package/assets/esri/core/workers/chunks/{30dbdf2aa1bc8e61cad4.js → 268e7b46202fc1decf9f.js} +1 -1
- package/assets/esri/core/workers/chunks/{47d78b4f7117554acecf.js → 357a27203f5d8fa152de.js} +1 -1
- package/assets/esri/core/workers/chunks/35dfba25a9077ab5dbaf.js +982 -0
- package/assets/esri/core/workers/chunks/377354a81e402edf3077.js +1 -0
- package/assets/esri/core/workers/chunks/3a42d96ea3b59d33bfe8.js +1 -0
- package/assets/esri/core/workers/chunks/3a61e4ab83183f5526a7.js +1 -0
- package/assets/esri/core/workers/chunks/{3790f0362b6f27ee798b.js → 3ee5e8d00cd3bc47a9fa.js} +1 -1
- package/assets/esri/core/workers/chunks/425d1fabc713a598139c.js +1 -0
- package/assets/esri/core/workers/chunks/425e16862feccb467191.js +1 -0
- package/assets/esri/core/workers/chunks/{bbe51b49fe7093e47306.js → 48c8ac9a22190c2b890c.js} +1 -1
- package/assets/esri/core/workers/chunks/4a364bc073fdc7c1b563.js +1 -0
- package/assets/esri/core/workers/chunks/4ca6ada7a4ccde5b5a24.js +1 -0
- package/assets/esri/core/workers/chunks/{905130ff0118962c8140.js → 61b71b8e028eda10ccab.js} +1 -1
- package/assets/esri/core/workers/chunks/{b34cffd5c45d3a8134bc.js → 69f57ad2227e59b323e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{290899b47a52f8b28a9c.js → 791220164501a791b2cd.js} +1 -1
- package/assets/esri/core/workers/chunks/792b4b0a43b4bbbc14ab.js +1 -0
- package/assets/esri/core/workers/chunks/7b32b8e8ebe48ae0dae2.js +1 -0
- package/assets/esri/core/workers/chunks/7f00125b02bb7211de43.js +1 -0
- package/assets/esri/core/workers/chunks/81074accfce5f109f909.js +1 -0
- package/assets/esri/core/workers/chunks/{594d7fdb80ad9cdedb85.js → 823e25dbc70e71257b6e.js} +1 -1
- package/assets/esri/core/workers/chunks/92e43e05265dfc8173a0.js +1 -0
- package/assets/esri/core/workers/chunks/{40fa9b28ca882a70813a.js → 92f7415c2e40e320addc.js} +1 -1
- package/assets/esri/core/workers/chunks/{9520b32d5d53ea9cd0d3.js → 9341e9e1fe0f6800aa44.js} +1 -1
- package/assets/esri/core/workers/chunks/95451d6405729a9f50c7.js +1 -0
- package/assets/esri/core/workers/chunks/{910a2ffb4328f8ee7a0d.js → 95cb9cd08941c28ebd85.js} +1 -1
- package/assets/esri/core/workers/chunks/{97f32af5893c86f6444c.js → 9b9a40b84640f00a1dcb.js} +1 -1
- package/assets/esri/core/workers/chunks/{77c6ba5ea85915d9078c.js → ac07c732aca6e67232f8.js} +1 -1
- package/assets/esri/core/workers/chunks/ae8e87da97411cff3783.js +1 -0
- package/assets/esri/core/workers/chunks/{65161a874595b0a34aa1.js → b312dd3027492007d75e.js} +1 -1
- package/assets/esri/core/workers/chunks/{83c9da68d6dbc77f60e5.js → beead2b06c994b4e61af.js} +1 -1
- package/assets/esri/core/workers/chunks/{5e20fd8b7c9497f2da1f.js → bfb08d3e2208c6178af9.js} +1 -1
- package/assets/esri/core/workers/chunks/{04e5486f0d8d4c6bd8a2.js → c3236a7058e64ea3b939.js} +1 -1
- package/assets/esri/core/workers/chunks/c4e9c71be6299c60c539.js +1 -0
- package/assets/esri/core/workers/chunks/c705f907ce60a646d9aa.js +1 -0
- package/assets/esri/core/workers/chunks/ce6abfafa0171b9c8d81.js +1 -0
- package/assets/esri/core/workers/chunks/{08a5c5a33a7c7c6852e5.js → d00b0f8236f1526099d4.js} +1 -1
- package/assets/esri/core/workers/chunks/d13951412a57e1af6208.js +1 -0
- package/assets/esri/core/workers/chunks/ecaf8f030026e41e1d1a.js +1 -0
- package/assets/esri/core/workers/chunks/f328a6cd4b7d8c653fc7.js +1 -0
- package/assets/esri/core/workers/chunks/f6a6178d4df029ff010d.js +1 -0
- package/assets/esri/core/workers/chunks/fde2301c6cd97a3cfb86.js +1 -0
- package/assets/esri/core/workers/chunks/fe84bcdfd9028b5e7ef6.js +1 -0
- package/assets/esri/themes/base/widgets/_BasemapLayerList.scss +4 -0
- package/assets/esri/themes/base/widgets/_LayerList.scss +4 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/CheckerBoard.glsl.js +2 -2
- package/chunks/ColorMaterial.glsl.js +9 -9
- package/chunks/ComponentShader.glsl.js +33 -33
- package/chunks/DefaultMaterial.glsl.js +35 -35
- package/chunks/HUDMaterial.glsl.js +11 -11
- package/chunks/ImageMaterial.glsl.js +5 -5
- package/chunks/LineMarker.glsl.js +17 -17
- package/chunks/NativeLine.glsl.js +3 -3
- package/chunks/Path.glsl.js +28 -28
- package/chunks/Pattern.glsl.js +9 -9
- package/chunks/PointRenderer.glsl.js +1 -1
- package/chunks/RealisticTree.glsl.js +4 -4
- package/chunks/RibbonLine.glsl.js +1 -1
- package/chunks/ShadedColorMaterial.glsl.js +1 -1
- package/chunks/SimpleAtmosphere.glsl.js +1 -1
- package/chunks/Terrain.glsl.js +92 -92
- package/chunks/WaterSurface.glsl.js +22 -22
- package/chunks/common.js +1 -1
- package/chunks/mat2.js +1 -1
- package/chunks/mat2d.js +1 -1
- package/chunks/mat3.js +1 -1
- package/chunks/mat4.js +1 -1
- package/chunks/quat.js +1 -1
- package/chunks/quat2.js +1 -1
- package/chunks/vec2.js +1 -1
- package/chunks/vec3.js +1 -1
- package/chunks/vec4.js +1 -1
- package/core/Message.js +1 -1
- package/core/accessorSupport/tracking.js +1 -1
- package/core/libs/gl-matrix-2/math/common.js +1 -1
- package/core/libs/gl-matrix-2/math/vec2.js +1 -1
- package/core/pbf.js +1 -1
- package/core/quantity.js +0 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/urlUtils.js +1 -1
- package/geometry/support/scaleUtils.js +1 -1
- package/identity/IdentityForm.js +1 -1
- package/identity/IdentityModal.js +1 -1
- package/identity/OAuthCredential.js +1 -1
- package/interfaces.d.ts +3347 -190
- package/intl/date.js +1 -1
- package/intl/duration.js +1 -1
- package/intl/messages.js +1 -1
- package/intl/substitute.js +1 -1
- package/kernel.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/layers/VoxelWasmPerSceneView.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/support/ControlPointsGeoreference.d.ts +4 -0
- package/layers/support/ControlPointsGeoreference.js +5 -0
- package/layers/support/CornersGeoreference.js +1 -1
- package/layers/support/ElevationSamplerData.js +5 -0
- package/layers/support/ElevationTile.js +1 -1
- package/layers/support/ExportImageServiceParameters.js +1 -1
- package/layers/support/MediaElementBase.js +1 -1
- package/layers/support/imageryRendererUtils.js +1 -1
- package/layers/support/rasterDatasets/TIFFRaster.js +1 -1
- package/package.json +1 -1
- package/renderers/support/RasterSymbolizer.js +1 -1
- package/request.js +1 -1
- package/rest/route/utils.js +1 -1
- package/rest/serviceArea.js +1 -1
- package/rest/support/ServiceAreaParameters.js +1 -1
- package/rest/support/ServiceAreaSolveResult.js +1 -1
- package/smartMapping/raster/renderers/classBreaks.js +1 -1
- package/smartMapping/raster/renderers/uniqueValue.js +1 -1
- package/support/apiKeyUtils.js +1 -1
- package/support/requestUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/MapNotesLayerView2D.js +1 -1
- package/views/2d/navigation/actions/Pinch.js +1 -1
- package/views/2d/tiling/TileCache.js +1 -1
- package/views/2d/viewpointUtils.js +1 -1
- package/views/3d/environment/ChapmanAtmosphereTechnique.js +1 -1
- package/views/3d/environment/CloudsCompositionTechnique.js +1 -1
- package/views/3d/environment/CloudsTechnique.js +1 -1
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/FogTechnique.js +1 -1
- package/views/3d/environment/NoiseTextureAtlasTechnique.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/PrecipitationTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechnique.js +1 -1
- package/views/3d/environment/SimpleAtmosphereTechniqueConfiguration.js +1 -1
- package/views/3d/environment/StarsTechnique.js +1 -1
- package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
- package/views/3d/interactive/Manipulator3D.js +1 -1
- package/views/3d/interactive/visualElements/LabelVisualElement.js +1 -1
- package/views/3d/interactive/visualElements/ParallelLineVisualElement.js +1 -1
- package/views/3d/layers/FeatureLayerViewBase3D.js +1 -1
- package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
- package/views/3d/layers/ImageryLayerView3D.js +1 -1
- package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
- package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
- package/views/3d/layers/graphics/Graphics3DFeatureProcessor.js +1 -1
- package/views/3d/layers/i3s/PointRenderer.js +1 -1
- package/views/3d/layers/support/FeatureVisibilityFilter.js +5 -0
- package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
- package/views/3d/state/ViewStateManager.js +1 -1
- package/views/3d/support/LaserlinePathData.js +1 -1
- package/views/3d/support/ResourceController.js +1 -1
- package/views/3d/terrain/BlendLayersTechnique.js +1 -1
- package/views/3d/terrain/ElevationData.js +1 -1
- package/views/3d/terrain/GeometryState.js +1 -1
- package/views/3d/terrain/OverlayRenderTarget.js +1 -1
- package/views/3d/terrain/OverlayRenderer.js +1 -1
- package/views/3d/terrain/PatchGeometryFactory.js +1 -1
- package/views/3d/terrain/PatchRenderData.js +1 -1
- package/views/3d/terrain/RasterColorizerTechnique.js +1 -1
- package/views/3d/terrain/TerrainConst.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/tileUtils.js +1 -1
- package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechnique.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/collections/Component/Material/shader/ComponentShader.glsl.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPass.js +1 -1
- package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/ForwardLinearDepth.glsl.js +2 -2
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputConfiguration.js +5 -0
- package/views/3d/webgl-engine/core/shaderLibrary/Transform.glsl.js +4 -4
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/InstancedDoublePrecision.glsl.js +11 -11
- package/views/3d/webgl-engine/core/shaderLibrary/attributes/TextureCoordinateAttribute.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/default/DefaultMaterialAuxiliaryPasses.glsl.js +55 -55
- package/views/3d/webgl-engine/core/shaderLibrary/output/OutputDepth.glsl.js +3 -3
- package/views/3d/webgl-engine/core/shaderLibrary/terrain/Terrain.glsl.js +1 -1
- package/views/3d/webgl-engine/core/shaderTechnique/ShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BlendWeightsTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/BlurTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/Camera.js +1 -1
- package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/EdgeDetectTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
- package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
- package/views/3d/webgl-engine/lib/Material.js +1 -1
- package/views/3d/webgl-engine/lib/OffscreenRendering.js +1 -1
- package/views/3d/webgl-engine/lib/OrderIndependentTransparency.js +1 -1
- package/views/3d/webgl-engine/lib/RenderContext.js +1 -1
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
- package/views/3d/webgl-engine/lib/SSAOTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
- package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/TextureTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/TransparencyPassType.js +5 -0
- package/views/3d/webgl-engine/lib/basicInterfaces.js +1 -1
- package/views/3d/webgl-engine/lib/edgeRendering/EdgeShaderTechnique.js +1 -1
- package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/pathGeometryUtils.js +1 -1
- package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/DefaultTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/PathTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterGLMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
- package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
- package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoard.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/CheckerBoardTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ColorMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/CompositingTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/DefaultMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HUDMaterialTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightApplyTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightBlurTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/HighlightDownsampleTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ImageMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlinePathTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LaserlineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineCalloutTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/LineMarkerTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/MeasurementArrowTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/NativeLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/Path.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/Pattern.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PatternTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRenderer.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/PointRendererTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/RealisticTree.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/RibbonLineTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterial.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadedColorMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowHighlightTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/SlicePlaneMaterialTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
- package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/GraphicManipulator.js +1 -1
- package/views/interactive/SegmentLabels.js +1 -1
- package/views/interactive/coordinateHelper.js +1 -1
- package/views/interactive/editGeometry/support/editPlaneUtils.js +1 -1
- package/views/interactive/snapping/ParallelLineSnapper.js +1 -1
- package/views/interactive/snapping/RightAngleTriangleSnapper.js +1 -1
- package/views/interactive/snapping/SnappingConstraint.js +1 -1
- package/views/interactive/snapping/SnappingManager.js +1 -1
- package/views/interactive/snapping/candidates/ParallelLineSnappingCandidate.js +1 -1
- package/views/interactive/snapping/candidates/RightAngleTriangleSnappingCandidate.js +1 -1
- package/views/interactive/snapping/snappingUtils.js +1 -1
- package/views/interactive/support/viewUtils.js +1 -1
- package/views/layers/ImageryTileLayerView.js +1 -1
- package/views/support/geometry2dUtils.js +1 -1
- package/webscene/Slide.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/LayerList/ListItemPanel.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Widget.js +1 -1
- package/widgets/Zoom/ZoomConditions3D.js +1 -1
- package/widgets/Zoom/ZoomViewModel.js +1 -1
- package/widgets/Zoom.js +1 -1
- package/widgets/support/widgetUtils.js +1 -1
- package/assets/esri/core/workers/chunks/06a7f58260225f52f8e6.js +0 -1
- package/assets/esri/core/workers/chunks/0e00741d35cdbf48e72d.js +0 -1
- package/assets/esri/core/workers/chunks/1ebb29ceabc81509646c.js +0 -1
- package/assets/esri/core/workers/chunks/24f7a3df08c3a2d3795c.js +0 -1
- package/assets/esri/core/workers/chunks/39a754713a48d46618bd.js +0 -1
- package/assets/esri/core/workers/chunks/462163f31fa134b7b216.js +0 -1
- package/assets/esri/core/workers/chunks/4bfcb7350ca492767a45.js +0 -1
- package/assets/esri/core/workers/chunks/5470cb0c3f670957c22c.js +0 -1
- package/assets/esri/core/workers/chunks/6889d698a2c796ed1ce6.js +0 -1
- package/assets/esri/core/workers/chunks/869310ef4c98542bf9df.js +0 -1
- package/assets/esri/core/workers/chunks/8ebaad46e2fe8925e3b0.js +0 -1
- package/assets/esri/core/workers/chunks/98c519ac806cc55bc19b.js +0 -1
- package/assets/esri/core/workers/chunks/9d07969fbea13aa5b03c.js +0 -1
- package/assets/esri/core/workers/chunks/9e6ce879ec0da884b9b8.js +0 -1
- package/assets/esri/core/workers/chunks/abd1bd74ba571e39ab5a.js +0 -1
- package/assets/esri/core/workers/chunks/b26ea76e3f41b45756e0.js +0 -1
- package/assets/esri/core/workers/chunks/c2286d97539066c8549a.js +0 -1
- package/assets/esri/core/workers/chunks/c495a66978d67c7e17f3.js +0 -1
- package/assets/esri/core/workers/chunks/c7fa92daca3f6e91734e.js +0 -987
- package/assets/esri/core/workers/chunks/c9e890b4be9d01c13efe.js +0 -1
- package/assets/esri/core/workers/chunks/dda5ea7f8d35e257815c.js +0 -1
- package/assets/esri/core/workers/chunks/e153e89c8a15c2f036ef.js +0 -1
- package/assets/esri/core/workers/chunks/e201ffcca7321771ee20.js +0 -1
- package/assets/esri/core/workers/chunks/e5b5b93e707173a4c883.js +0 -1
- package/assets/esri/core/workers/chunks/f7d1f75b6aa3ef566d74.js +0 -1
- package/assets/esri/core/workers/chunks/fde9e9683335fa6c8236.js +0 -1
- package/core/queryUtils.js +0 -5
- package/views/3d/layers/graphics/Graphics3DFilterVisibility.js +0 -5
- package/views/3d/layers/support/HeatmapFilterVisibility.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutputOptions.js +0 -5
- package/views/3d/webgl-engine/core/shaderLibrary/util/HeaderComment.glsl.js +0 -10
- package/views/3d/webgl-engine/lib/RenderPass.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7175],{47175:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ft});var r,s=i(43697),n=i(51773),a=i(70586),o=i(16453),l=i(95330),u=i(5600),p=(i(67676),i(80442),i(75215)),c=i(52011),m=i(30556),d=i(87085),h=i(66577),y=i(38171),f=i(30030),g=i(3172),b=i(20102),R=i(35454),v=i(22974),w=i(92604),_=i(17445),C=i(17452),S=i(44422),I=i(71715),x=i(21506),F=i(35956),T=i(96674),N=i(36030);const D=new Set(["raster","raster2","dem","fillraster"]),P=new Set(["rasters"]),O=e=>e&&e.rasterFunction?M.fromJSON(e):e,j=e=>e&&e instanceof M?e.toJSON():e,V=e=>e?.functionName&&!e.declaredClass,A=e=>V(e)?new M(e):e;let M=r=class extends T.wq{constructor(e){super(e),this.functionName=null,this.outputPixelType="unknown",this.variableName=null,this.rasterFunctionDefinition=null}set functionArguments(e){if(e){const t=Object.keys(e);if(t.some((t=>D.has(t.toLowerCase())&&V(e[t])))||t.some((t=>P.has(t.toLowerCase())&&Array.isArray(e[t])&&e[t].some((e=>V(e)))))){e=(0,v.d9)(e);for(const i of t)D.has(i.toLowerCase())?e[i]=A(e[i]):P.has(i.toLowerCase())&&Array.isArray(e[i])&&(e[i]=e[i].map((e=>A(e))))}}this._set("functionArguments",e)}readFunctionArguments(e){return(e=>{if(null==e)return null;e=(0,v.d9)(e);const t={};for(const i of Object.keys(e))D.has(i.toLowerCase())?t[i]=O(e[i]):P.has(i.toLowerCase())&&Array.isArray(e[i])?t[i]=e[i].map(O):t[i]=e[i];return t})(e)}writeFunctionArguments(e,t,i){const r={};for(const t of Object.keys(e))D.has(t.toLowerCase())?r[t]=j(e[t]):P.has(t.toLowerCase())&&Array.isArray(e[t])?r[t]=e[t].map(j):r[t]=j(e[t]);t[i]=r}readFunctionName(e,t){const i=t.rasterFunctionInfos;return t.name||(i&&i.length&&"None"!==i[0].name?i[0].name:t.rasterFunctionDefinition?t.rasterFunctionDefinition.name:t.rasterFunction)}clone(){return new r({functionName:this.functionName,functionArguments:(0,v.d9)(this.functionArguments),outputPixelType:this.outputPixelType,variableName:this.variableName,rasterFunctionDefinition:(0,v.d9)(this.rasterFunctionDefinition)})}};(0,s._)([(0,u.Cb)({json:{type:Object,name:"rasterFunctionArguments"}})],M.prototype,"functionArguments",null),(0,s._)([(0,I.r)("functionArguments")],M.prototype,"readFunctionArguments",null),(0,s._)([(0,m.c)("functionArguments")],M.prototype,"writeFunctionArguments",null),(0,s._)([(0,u.Cb)({json:{type:String,write:{target:"rasterFunction"}}})],M.prototype,"functionName",void 0),(0,s._)([(0,I.r)("functionName",["rasterFunction","rasterFunctionInfos","rasterFunctionDefinition"])],M.prototype,"readFunctionName",null),(0,s._)([(0,N.J)({C128:"c128",C64:"c64",F32:"f32",F64:"f64",S16:"s16",S32:"s32",S8:"s8",U1:"u1",U16:"u16",U2:"u2",U32:"u32",U4:"u4",U8:"u8",UNKNOWN:"unknown"},{ignoreUnknown:!1}),(0,u.Cb)({json:{default:"unknown"}})],M.prototype,"outputPixelType",void 0),(0,s._)([(0,u.Cb)({type:String,json:{read:!0,write:!0}})],M.prototype,"variableName",void 0),(0,s._)([(0,u.Cb)({type:Object,json:{name:"rasterFunctionDefinition"}})],M.prototype,"rasterFunctionDefinition",void 0),M=r=(0,s._)([(0,c.j)("esri.layers.support.RasterFunction")],M);const J=M,E={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var z=i(93010),q=i(75509),L=i(27922);const Z={u1:[0,1],u2:[0,3],u4:[0,15],u8:[0,255],s8:[-128,127],u16:[0,65535],s16:[-32768,32767]},k={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},U=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function H(e){return U.has(e.type)}function Q(e,t){if(!e||!t)return(0,v.d9)(e||t);const i=(0,v.d9)(e);if(t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=null),G(i.rasterFunctionDefinition.arguments,t)}else"none"!==t.functionName.toLowerCase()&&(W(i.functionArguments).Raster=t);return i}function G(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&G(e[i].arguments,t))}function B(e){const t=(0,v.d9)(E[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=B(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=ee(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function W(e){const t=e.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?W(t.functionArguments):e}const $={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function K(e,t){const i=Z[String(t).toLowerCase()];return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function X(e){if(!e)return;const{fields:t}=e,i=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return i&&i.name}function Y(e){const t=[];return e.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function ee(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,z.io)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var te,ie=i(90578),re=i(13473);const se=(0,R.w)()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),ne=(0,R.w)()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});let ae=te=class extends T.wq{constructor(e){super(e),this.ascending=!0,this.itemRenderingRule=null,this.lockRasterIds=null,this.method=null,this.multidimensionalDefinition=null,this.objectIds=null,this.operation=null,this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending}readMethod(e,t){return function(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return ne.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)}readOperation(e,t){const i=t.mosaicOperation,r=t.mosaicOperator&&t.mosaicOperator.toLowerCase(),s=i||(r?se.toJSON(r):null);return se.fromJSON(s)||"first"}castSortValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:`${e}`}clone(){return new te({ascending:this.ascending,itemRenderingRule:(0,v.d9)(this.itemRenderingRule),lockRasterIds:(0,v.d9)(this.lockRasterIds),method:this.method,multidimensionalDefinition:(0,v.d9)(this.multidimensionalDefinition),objectIds:(0,v.d9)(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:(0,v.d9)(this.viewpoint),where:this.where})}};(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],ae.prototype,"ascending",void 0),(0,s._)([(0,I.r)("ascending",["ascending","sortAscending"])],ae.prototype,"readAscending",null),(0,s._)([(0,u.Cb)({type:J,json:{write:!0}})],ae.prototype,"itemRenderingRule",void 0),(0,s._)([(0,u.Cb)({type:[p.z8],json:{write:{overridePolicy(){return{enabled:"lock-raster"===this.method}}}}})],ae.prototype,"lockRasterIds",void 0),(0,s._)([(0,u.Cb)({type:String,json:{type:ne.jsonValues,write:{target:"mosaicMethod",writer:ne.write}}})],ae.prototype,"method",void 0),(0,s._)([(0,I.r)("method",["mosaicMethod","defaultMosaicMethod"])],ae.prototype,"readMethod",null),(0,s._)([(0,u.Cb)({type:[F.Z],json:{write:!0}})],ae.prototype,"multidimensionalDefinition",void 0),(0,s._)([(0,u.Cb)({type:[p.z8],json:{name:"fids",write:!0}})],ae.prototype,"objectIds",void 0),(0,s._)([(0,u.Cb)({json:{type:se.jsonValues,read:{reader:se.read},write:{target:"mosaicOperation",writer:se.write}}})],ae.prototype,"operation",void 0),(0,s._)([(0,I.r)("operation",["mosaicOperation","mosaicOperator"])],ae.prototype,"readOperation",null),(0,s._)([(0,u.Cb)({type:String,json:{write:{overridePolicy(){return{enabled:"attribute"===this.method}}}}})],ae.prototype,"sortField",void 0),(0,s._)([(0,u.Cb)({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],ae.prototype,"sortValue",void 0),(0,s._)([(0,ie.p)("sortValue")],ae.prototype,"castSortValue",null),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],ae.prototype,"viewpoint",void 0),(0,s._)([(0,u.Cb)({type:String,json:{write:!0}})],ae.prototype,"where",void 0),ae=te=(0,s._)([(0,c.j)("esri.layers.support.MosaicRule")],ae);const oe=ae;var le=i(69608);let ue=class extends T.wq{constructor(){super(...arguments),this.layer=null,this.adjustAspectRatio=void 0,this.bandIds=void 0,this.compression=void 0,this.compressionQuality=void 0,this.compressionTolerance=.01,this.interpolation=null,this.noData=null,this.noDataInterpretation=void 0,this.pixelType=void 0,this.lercVersion=2}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("renderingRule"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("renderer"),e.commitProperty("definitionExpression"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new oe({where:i})),t}get renderingRule(){const e=this.layer;let t=e.renderingRule;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");return t=this._addResampleRasterFunction(t),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule()),t}combineRendererWithRenderingRule(){const e=this.layer,{rasterInfo:t,renderingRule:i,renderer:r}=e;return r&&H(r)?Q(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new J;r.functionName="Stretch";const s=$[q.v.toJSON(e.stretchType)],n="u8",a={StretchType:s,Statistics:Y(e.statistics),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===$.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===$.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,r.outputPixelType=n):s===$.minMax?r.outputPixelType=n:s===$.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=a,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new J;if(i)n.functionArguments={ColorRamp:(0,z.pM)(s)};else{const i=(0,z.Uh)(s);if(i)n.functionArguments={colorRamp:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,z.Jw)(s,256)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new J({rasterFunctionDefinition:B(n)}):n}return i?new J({rasterFunctionDefinition:B(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],a=1e-6,{pixelType:o,rasterAttributeTable:l}=t,u=l&&l.features,p=X(l);if(u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol.color;let s;r.a&&u.forEach((a=>{s=a.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([a.attributes[p],r.r,r.g,r.b])}))}));const i=o?K(n,o):n,r=new J;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new J({rasterFunctionDefinition:B(r)}):r}e.classBreakInfos.forEach(((e,t)=>{const o=e.symbol&&e.symbol.color;o.a?(0===t?i.push(e.minValue,e.maxValue+a):i.push(e.minValue+a,e.maxValue+a),r.push(t),n.push([t,o.r,o.g,o.b])):s.push(e.minValue,e.maxValue)}));const c=o?K(n,o):n,m=new J;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new J;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new J({rasterFunctionDefinition:B(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=s&&s.features,a=X(s),o=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol.color?.toRgb();null!=i&&r&&t.set(String(i),r)}));const r=e.field;n.forEach((({attributes:e})=>{const s=String(e[r]),n=e[a];if(t.has(s)){const e=t.get(s);i.push([n,...e])}else o&&i.push([n,...o])}))}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol.color,s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r&&i.length>0?K(i,r):i,p=new J;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new J({rasterFunctionDefinition:B(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return;const{pixelType:r}=t,s=r?K(i,r):i,n=new J;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new J({rasterFunctionDefinition:B(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new J;i.functionName="VectorFieldRenderer";const{dataType:r,bandProperties:s}=t,n="vector-uv"===r;let a,o;s&&2===s.length&&(a=s.map((e=>e.BandName.toLowerCase())).indexOf("magnitude"),o=s.map((e=>e.BandName.toLowerCase())).indexOf("direction")),-1!==a&&null!==a||(a=0,o=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new L.Z,c={magnitudeBandID:a,directionBandID:o,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:k[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};return i.functionArguments=c,t.convertToRFT?new J({rasterFunctionDefinition:B(i)}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType)return new J;const r=new J;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,a={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(a.Azimuth=e.azimuth,a.Altitude=e.altitude),3===n&&(a.PSPower=e.pixelSizePower,a.PSZFactor=e.pixelSizeFactor),r.functionArguments=a,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?a.ColorRamp=(0,z.pM)(e.colorRamp):a.Colormap=(0,z.Jw)(e.colorRamp,256)),i?new J({rasterFunctionDefinition:B(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:t.attributeTable,pixelType:t.pixelType,dataType:t.dataType,bandProperties:t.keyProperties?.BandProperties,convertColorRampToColormap:e.version<10.6,convertToRFT:!!i?.rasterFunctionDefinition}),i):i}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10;let i=new J({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:{x:this.layer.pixelSizeX,y:this.layer.pixelSizeY}}});return i=e?.rasterFunctionDefinition?new J({rasterFunctionDefinition:B(i)}):i,Q(i,e)}};(0,s._)([(0,u.Cb)()],ue.prototype,"layer",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"adjustAspectRatio",void 0),(0,s._)([(0,m.c)("adjustAspectRatio")],ue.prototype,"writeAdjustAspectRatio",null),(0,s._)([(0,u.Cb)({json:{write:!0}}),(0,S.B)("layer.bandIds")],ue.prototype,"bandIds",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"compression",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}}),(0,S.B)("layer.compressionQuality")],ue.prototype,"compressionQuality",void 0),(0,s._)([(0,m.c)("compressionQuality")],ue.prototype,"writeCompressionQuality",null),(0,s._)([(0,u.Cb)({json:{write:!0}}),(0,S.B)("layer.compressionTolerance")],ue.prototype,"compressionTolerance",void 0),(0,s._)([(0,m.c)("compressionTolerance")],ue.prototype,"writeCompressionTolerance",null),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"format",null),(0,s._)([(0,u.Cb)({type:String,json:{read:{reader:le.c.read},write:{writer:le.c.write}}}),(0,S.B)("layer.interpolation")],ue.prototype,"interpolation",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}}),(0,S.B)("layer.noData")],ue.prototype,"noData",void 0),(0,s._)([(0,u.Cb)({type:String,json:{read:{reader:le.k.read},write:{writer:le.k.write}}}),(0,S.B)("layer.noDataInterpretation")],ue.prototype,"noDataInterpretation",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"pixelType",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"lercVersion",void 0),(0,s._)([(0,m.c)("lercVersion")],ue.prototype,"writeLercVersion",null),(0,s._)([(0,u.Cb)({type:Number})],ue.prototype,"version",null),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"mosaicRule",null),(0,s._)([(0,u.Cb)({json:{write:!0}})],ue.prototype,"renderingRule",null),ue=(0,s._)([(0,c.j)("esri.layers.mixins.ExportImageServiceParameters")],ue);var pe=i(1231),ce=i(99514),me=i(54163),de=i(48526),he=i(88281),ye=i(99815),fe=i(75993),ge=i(80676),be=i(67058),Re=i(91219),ve=i(82526),we=i(11282),_e=i(82971);let Ce=class extends T.wq{constructor(){super(...arguments),this.north=null,this.up=null,this.spatialReference=null}};(0,s._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ce.prototype,"north",void 0),(0,s._)([(0,u.Cb)({type:Number,json:{write:!0}})],Ce.prototype,"up",void 0),(0,s._)([(0,u.Cb)({type:_e.Z,json:{write:!0}})],Ce.prototype,"spatialReference",void 0),Ce=(0,s._)([(0,c.j)("esri.rest.support.ImageAngleResult")],Ce);const Se=Ce;var Ie=i(74889);let xe=class extends T.wq{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,s._)([(0,u.Cb)({json:{write:!0}})],xe.prototype,"catalogItemVisibilities",void 0),(0,s._)([(0,u.Cb)({type:Ie.default,json:{write:!0}})],xe.prototype,"catalogItems",void 0),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],xe.prototype,"location",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],xe.prototype,"name",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],xe.prototype,"objectId",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],xe.prototype,"processedValues",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],xe.prototype,"properties",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],xe.prototype,"value",void 0),xe=(0,s._)([(0,c.j)("esri.rest.support.ImageIdentifyResult")],xe);const Fe=xe;let Te=class extends T.wq{constructor(){super(...arguments),this.geometries=null}};(0,s._)([(0,u.Cb)({json:{write:!0}})],Te.prototype,"geometries",void 0),Te=(0,s._)([(0,c.j)("esri.rest.support.ImagePixelLocationResult")],Te);const Ne=Te;let De=class extends T.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,s._)([(0,u.Cb)({json:{write:!0}})],De.prototype,"attributes",void 0),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],De.prototype,"location",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],De.prototype,"locationId",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],De.prototype,"rasterId",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],De.prototype,"resolution",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],De.prototype,"pixelValue",void 0),De=(0,s._)([(0,c.j)("esri.rest.support.ImageSample")],De);const Pe=De;let Oe=class extends T.wq{constructor(){super(...arguments),this.samples=null}};(0,s._)([(0,u.Cb)({type:[Pe],json:{write:!0}})],Oe.prototype,"samples",void 0),Oe=(0,s._)([(0,c.j)("esri.rest.support.ImageSampleResult")],Oe);const je=Oe;function Ve(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function Ae(e,t,i){const r=(0,we.en)(e),s=t.geometry?[t.geometry]:[],n=await(0,ve.aX)(s),o=t.toJSON();Ve(o);const l=n&&n[0];(0,a.pC)(l)&&(o.geometry=l.toJSON());const u=(0,we.cv)({...r.query,f:"json",...o});return(0,we.lA)(u,i)}async function Me(e,t,i){const r=(0,we.en)(e),s=t.geometry?[t.geometry]:[];return(0,ve.aX)(s).then((e=>{const s=t.toJSON(),n=e&&e[0];(0,a.pC)(n)&&(s.geometry=JSON.stringify(n.toJSON()));const o=(0,we.cv)({...r.query,f:"json",...s}),l=(0,we.lA)(o,i);return(0,g.default)(r.path+"/identify",l)})).then((e=>Fe.fromJSON(e.data)))}function Je(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function Ee(e,t){const i=Je(e),{icsid:r,icsns:s,wkid:n}=i;return null!=r?null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?`0:${r}`:JSON.stringify(i):n?n.toString():JSON.stringify(i)}i(10158);var ze,qe=i(4967),Le=(i(67900),i(8744),i(98732),i(6570)),Ze=(i(9361),i(65091)),ke=i(38913),Ue=(i(58901),i(45091),i(57444)),He=(i(40330),i(98326),i(56545),i(41818)),Qe=i(5396),Ge=(i(75935),i(28141),i(26059)),Be=i(36679);let We=ze=class extends T.wq{constructor(){super(...arguments),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new ze((0,v.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,s._)([(0,u.Cb)({type:[String],json:{name:"angleName",write:!0}})],We.prototype,"angleNames",void 0),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],We.prototype,"point",void 0),(0,s._)([(0,u.Cb)({type:_e.Z,json:{write:!0}})],We.prototype,"spatialReference",void 0),(0,s._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],We.prototype,"rasterId",void 0),We=ze=(0,s._)([(0,c.j)("esri.rest.support.ImageAngleParameters")],We);const $e=We;var Ke,Xe=i(92835),Ye=i(33955);let et=Ke=class extends T.wq{constructor(){super(...arguments),this.geometry=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Ye.Ji)(e),t[i]=e.toJSON())}clone(){return new Ke((0,v.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};(0,s._)([(0,u.Cb)({types:h.qM,json:{read:Ye.im}})],et.prototype,"geometry",void 0),(0,s._)([(0,m.c)("geometry")],et.prototype,"writeGeometry",null),(0,s._)([(0,u.Cb)({type:oe,json:{write:!0}})],et.prototype,"mosaicRule",void 0),(0,s._)([(0,u.Cb)({type:J,json:{write:!0}})],et.prototype,"renderingRule",void 0),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],et.prototype,"pixelSize",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],et.prototype,"raster",void 0),(0,s._)([(0,u.Cb)({type:Xe.Z,json:{read:{source:"time"},write:{target:"time"}}})],et.prototype,"timeExtent",void 0),et=Ke=(0,s._)([(0,c.j)("esri.rest.support.ImageHistogramParameters")],et);const tt=et;var it;let rt=it=class extends T.wq{constructor(){super(...arguments),this.geometry=null,this.renderingRules=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Ye.Ji)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=oe.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=J.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}writeRenderingRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRenderingRules(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=(0,a.pC)(e.start)?e.start.getTime():null,s=(0,a.pC)(e.end)?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new it((0,v.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,s._)([(0,u.Cb)({json:{write:!0}})],rt.prototype,"geometry",void 0),(0,s._)([(0,m.c)("geometry")],rt.prototype,"writeGeometry",null),(0,s._)([(0,u.Cb)({type:oe,json:{write:!0}})],rt.prototype,"mosaicRule",null),(0,s._)([(0,m.c)("mosaicRule")],rt.prototype,"writeMosaicRule",null),(0,s._)([(0,u.Cb)({type:J,json:{write:!0}})],rt.prototype,"renderingRule",null),(0,s._)([(0,m.c)("renderingRule")],rt.prototype,"writeRenderingRule",null),(0,s._)([(0,u.Cb)({type:[J],json:{write:!0}})],rt.prototype,"renderingRules",void 0),(0,s._)([(0,m.c)("renderingRules")],rt.prototype,"writeRenderingRules",null),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],rt.prototype,"pixelSize",void 0),(0,s._)([(0,m.c)("pixelSize")],rt.prototype,"writePixelSize",null),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],rt.prototype,"returnGeometry",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],rt.prototype,"returnCatalogItems",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],rt.prototype,"returnPixelValues",void 0),(0,s._)([(0,u.Cb)({type:Number,json:{write:!0}})],rt.prototype,"maxItemCount",void 0),(0,s._)([(0,u.Cb)({type:Xe.Z,json:{write:{target:"time"}}})],rt.prototype,"timeExtent",void 0),(0,s._)([(0,m.c)("timeExtent")],rt.prototype,"writeTimeExtent",null),(0,s._)([(0,u.Cb)({json:{write:!0}})],rt.prototype,"raster",void 0),(0,s._)([(0,u.Cb)({json:{write:!0}})],rt.prototype,"viewId",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],rt.prototype,"processAsMultidimensional",void 0),rt=it=(0,s._)([(0,c.j)("esri.rest.support.ImageIdentifyParameters")],rt);const st=rt;var nt;let at=nt=class extends T.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new nt({geometries:this.geometries.map((e=>e.clone())),rasterId:this.rasterId})}};(0,s._)([(0,u.Cb)({type:[re.Z],json:{write:!0}})],at.prototype,"geometries",void 0),(0,s._)([(0,m.c)("geometries")],at.prototype,"writeGeometry",null),(0,s._)([(0,u.Cb)({type:p.z8,json:{write:!0}})],at.prototype,"rasterId",void 0),at=nt=(0,s._)([(0,c.j)("esri.rest.support.ImagePixelLocationParameters")],at);const ot=at;var lt;let ut=lt=class extends T.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,Ye.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Ze.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new lt((0,v.d9)({geometry:this.geometry,locations:this.locations,interpolation:this.interpolation,mosaicRule:this.mosaicRule,outFields:this.outFields,raster:this.raster,returnFirstValueOnly:this.returnFirstValueOnly,sampleDistance:this.sampleDistance,sampleCount:this.sampleCount,sliceId:this.sliceId,pixelSize:this.pixelSize,timeExtent:this.timeExtent}))}};(0,s._)([(0,u.Cb)({types:h.qM,json:{read:Ye.im}})],ut.prototype,"geometry",void 0),(0,s._)([(0,m.c)("geometry")],ut.prototype,"writeGeometry",null),(0,s._)([(0,u.Cb)()],ut.prototype,"locations",null),(0,s._)([(0,u.Cb)({type:String,json:{type:le.c.jsonValues,read:le.c.read,write:le.c.write}})],ut.prototype,"interpolation",void 0),(0,s._)([(0,u.Cb)({type:oe,json:{write:!0}})],ut.prototype,"mosaicRule",void 0),(0,s._)([(0,u.Cb)({type:[String],json:{write:!0}})],ut.prototype,"outFields",void 0),(0,s._)([(0,u.Cb)({type:re.Z,json:{write:!0}})],ut.prototype,"pixelSize",void 0),(0,s._)([(0,u.Cb)({type:String,json:{write:!0}})],ut.prototype,"raster",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{write:!0}})],ut.prototype,"returnFirstValueOnly",void 0),(0,s._)([(0,u.Cb)({type:Number,json:{write:!0}})],ut.prototype,"sampleDistance",void 0),(0,s._)([(0,u.Cb)({type:Number,json:{write:!0}})],ut.prototype,"sampleCount",void 0),(0,s._)([(0,u.Cb)({type:Number,json:{write:!0}})],ut.prototype,"sliceId",void 0),(0,s._)([(0,u.Cb)({type:Xe.Z,json:{read:{source:"time"},write:{target:"time"}}})],ut.prototype,"timeExtent",void 0),ut=lt=(0,s._)([(0,c.j)("esri.rest.support.ImageSampleParameters")],ut);const pt=ut;var ct=i(23808);const mt=(0,R.w)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),dt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),ht=(0,u.Eg)(p.q9,{min:0,max:255}),yt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._defaultServiceMosaicRule=null,this._serviceSourceType=null,this._serviceSupportsMosaicRule=null,this.rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandCount=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelSizeX=null,this.pixelSizeY=null,this.pixelFilter=null,this.raster=void 0,this.viewId=void 0,this.symbolizer=null,this.rasterAttributeTable=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new ue({layer:this}))}readDefaultServiceMosaicRule(e,t){return this._serviceSupportsMosaicRule?oe.fromJSON(t):null}readServiceSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||(0,a.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.length<1||(0,a.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get fieldsIndex(){return this.fields?new ce.Z(this.fields):null}set format(e){e&&dt.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=oe.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?oe.fromJSON(i):this._isMosaicRuleSupported(t)?oe.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new oe({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=ht(e))}readObjectIdField(e,t){if(!e){const i=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i&&i[0]&&i[0].name}return e}get parsedUrl(){return this.url?(0,C.mN)(this.url):null}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,f.ij)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),H(s)||w.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.rasterAttributeTableFieldPrefix||"Raster.",t=new pe.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new pe.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new pe.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let s=this.fields?(0,v.d9)(this.fields):[];s.push(i),this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&(0,a.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(r),(0,a.pC)(this.rasterFunctionInfos)&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new pe.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new pe.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new pe.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const n=this.rasterInfo.attributeTable&&this.rasterInfo.attributeTable.fields||null;if(n&&n.length>0){const t=n.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,v.d9)(t);return i.name=e+t.name,i}));s=s.concat(t)}return s}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=J.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i&&i.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?J.fromJSON({rasterFunctionDefinition:t.renderingRule}):J.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,i){const r=e.toJSON();r.rasterFunctionDefinition?t[i]=r.rasterFunctionDefinition:t[i]=r}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?_e.Z.fromJSON(i):null}readPixelType(e){return mt.fromJSON(e)||e}writePixelType(e,t,i){((0,a.Wi)(this.serviceRasterInfo)||this.pixelType!==this.serviceRasterInfo.pixelType)&&(t[i]=mt.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;if(!this._isPicture()&&this.renderer&&this.symbolizer&&!this.pixelFilter){const r=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(this.renderer.toJSON()),s=this._rasterJobHandler.instance,{bandIds:n}=this;if(s){r&&(this.symbolizer.bind(),await s.updateSymbolizer(this.symbolizer,t),this._cachedRendererJson=this.renderer.toJSON());const a=await s.symbolize({bandIds:n,...e},t);i={extent:e.extent,pixelBlock:a}}else i={extent:e.extent,pixelBlock:this.symbolizer.symbolize({bandIds:n,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsComputeAngles)throw new b.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,p.TJ)($e,e).clone(),async function(e,t,i){const r=t.toJSON();(0,a.pC)(r.angleName)&&(r.angleName=r.angleName.join(",")),(0,a.pC)(t.point)&&t.point.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=Je(t.point.spatialReference)),(0,a.pC)(t.spatialReference)&&t.spatialReference.imageCoordinateSystem&&(r.spatialReference=Ee(t.spatialReference));const s=(0,we.en)(e),n=(0,we.cv)({...s.query,f:"json",...r}),o=(0,we.lA)(n,i),{data:l}=await(0,g.default)(`${s.path}/computeAngles`,o);return l.spatialReference=l.spatialReference?null!=l.spatialReference.geodataXform?new _e.Z({wkid:0,imageCoordinateSystem:l.spatialReference}):_e.Z.fromJSON(l.spatialReference):null,"NaN"===l.north&&(l.north=null),"NaN"===l.up&&(l.up=null),new Se(l)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsComputePixelLocation)throw new b.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,p.TJ)(ot,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:s}=t;for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=Je(s[e].spatialReference));const n=(0,we.en)(e),a=(0,we.cv)({...n.query,f:"json",...r}),o=(0,we.lA)(a,i),{data:l}=await(0,g.default)(`${n.path}/computePixelLocation`,o);return Ne.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsComputeHistograms)throw new b.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");e=(0,p.TJ)(tt,e).clone();const{raster:i,mosaicRule:r,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),r&&null==e.mosaicRule&&(e.mosaicRule=r),i&&null==e.raster&&(e.raster=i),async function(e,t,i){const r=await Ae(e,t,i),s=(0,we.en)(e),{data:n}=await(0,g.default)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsComputeStatisticsHistograms)throw new b.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");e=(0,p.TJ)(tt,e).clone();const{raster:i,mosaicRule:r,renderingRule:s}=this;return s&&null==e.renderingRule&&(e.renderingRule=s),r&&null==e.mosaicRule&&(e.mosaicRule=r),i&&null==e.raster&&(e.raster=i),async function(e,t,i){const r=await Ae(e,t,i),s=(0,we.en)(e),{data:n}=await(0,g.default)(`${s.path}/computeStatisticsHistograms`,r),{statistics:a}=n;return a?.length&&a.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:a,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return(0,a.pC)(t)?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}fetchImage(e,t,i,r={}){if(null==e||null==t||null==i)return Promise.reject(new b.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required."));const s=this.renderer||this.symbolizer?this.generateRasterInfo(this.renderingRule,{signal:r.signal}):null;return(0,l.gx)(s).then((s=>{s&&(this.rasterInfo=s);const n={imageServiceParameters:this.getExportImageServiceParameters(e,t,i,r.timeExtent),imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:r.requestAsImageElement&&!this.pixelFilter||!1,signal:r.signal};return this._requestArrayBuffer(n)}))}fetchKeyProperties(e){return(0,g.default)(this.parsedUrl.path+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new b.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,g.default)(this.parsedUrl.path+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>Ie.default.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,we.en)(e),s=(0,we.cv)({...r.query,f:"json"}),n=(0,we.lA)(s,i),a=`${r.path}/${t}/info`,o=(0,g.default)(`${a}`,n),l=(0,g.default)(`${a}/keyProperties`,n),u=await Promise.allSettled([o,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const d=Le.Z.fromJSON(p.extent),h=Math.ceil(d.width/p.pixelSizeX-.1),y=Math.ceil(d.height/p.pixelSizeY-.1),f=d.spatialReference,b=new re.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:f}),R=p.histograms?.length?p.histograms:null,v=new Be.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new de.Z({width:h,height:y,bandCount:p.bandCount,extent:d,spatialReference:f,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:R,keyProperties:c,storageInfo:v})}(this.parsedUrl.path,e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,g.default)(this.parsedUrl.path+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),r=i&&i.ics;if(!r)return;let s=null;try{s=(await(0,g.default)(this.parsedUrl.path+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:r,icsToPixelTransform:null,icsExtent:null,northDirection:null};const n=this.version>=10.7?(0,g.default)(this.parsedUrl.path+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,o={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},l=(0,g.default)(this.parsedUrl.path+"/project",{query:this._getQueryParams(o),...t}).then((e=>e.data)).catch((()=>({}))),u=(s.xmin+s.xmax)/2,p=(s.ymax-s.ymin)/6,c=s.ymin+p,m=[];for(let e=0;e<5;e++)m.push({x:u,y:c+p*e});const d={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},h=(0,g.default)(this.parsedUrl.path+"/project",{query:this._getQueryParams(d),...t}).then((e=>e.data)).catch((()=>({}))),y=await Promise.all([n,l,h]);let f=y[0].ipxf;if(null==f){const e=r.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(f={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const b=Le.Z.fromJSON(y[1]&&y[1].geometries&&y[1].geometries[0]);b&&(b.spatialReference=new _e.Z({wkid:0,imageCoordinateSystem:r}));const R=y[2].geometries?y[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],v=R.length;if(v<3)return{ics:r,icsToPixelTransform:f,icsExtent:b,northDirection:null};let w=0,_=0,C=0,S=0;for(let e=0;e<v;e++)w+=R[e].x,_+=R[e].y,C+=R[e].x*R[e].x,S+=R[e].x*R[e].y;const I=(v*S-w*_)/(v*C-w*w);let x=0;const F=R[4].x>R[0].x,T=R[4].y>R[0].y;return I===1/0?x=T?90:270:0===I?x=F?0:180:I>0?x=F?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(x=T?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:r,icsToPixelTransform:f,icsExtent:b,northDirection:x}}async generateRasterInfo(e,t){if((!e||"none"===e?.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))&&(0,a.pC)(this.serviceRasterInfo))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi)?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return t?t.join("/"):null}(e);if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const r=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=r;try{return await r}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,i,r){const s=Ee((e=e.clone().shiftCentralMeridian()).spatialReference,this.parsedUrl.path);(0,a.pC)(this.serviceRasterInfo)&&this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const n=this.exportImageServiceParameters.toJSON(),{bandIds:o,noData:l}=n;let{renderingRule:u}=n;const p=this.renderingRule?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(o?.length&&this._hasRenderingRule(this.renderingRule)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:o}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;n.bandIds=void 0}else n.bandIds=o?.join(",");l instanceof Array&&l.length>0&&(n.noData=l.join(","));const m=this._serviceSupportsMosaicRule?this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,r):null;n.mosaicRule=m&&JSON.stringify(m),n.renderingRule=this._getRenderingRuleString(J.fromJSON(u));const d={};if(r){const{start:e,end:t}=r.toJSON();e&&t&&e===t?d.time=""+e:null==e&&null==t||(d.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:s,imageSR:s,size:t+","+i,...n,...d}}async getSamples(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsGetSamples)throw new b.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,p.TJ)(pt,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,i){const r=t.toJSON();Ve(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=(await(0,ve.aX)(t.geometry))?.[0];(0,a.pC)(s)&&(r.geometry=s.toJSON());const n=(0,we.en)(e),o=(0,we.cv)({...n.query,f:"json",...r}),l=(0,we.lA)(o,i),{data:u}=await(0,g.default)(`${n.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return je.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsIdentify)throw new b.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");e=(0,p.TJ)(st,e).clone();const{raster:i,mosaicRule:r,renderingRule:s}=this;if(s&&null==e.renderingRule&&(e.renderingRule=s),r&&null==e.mosaicRule){const t=this._combineMosaicRuleWithTimeExtent(r,e.timeExtent);e.mosaicRule=(0,a.Wg)(t)}return i&&null==e.raster&&(e.raster=i),Me(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new Ue.Z;return e.outFields=["*"],e.returnGeometry=!0,e.where=this.definitionExpression||"1=1",e}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,qe.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Qe.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,He.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new b.Z("imagery-layer: query-visible-rasters","missing query parameter");const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,l=null,u=null;const p="raster.servicepixelvalue",c=this._rasterFunctionNamesIndex;if((0,a.pC)(e.outFields)&&(o=e.outFields.some((e=>!e.toLowerCase().includes(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(p)&&e.length>p.length)).map((e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new J({functionName:e[0]}))),u=t.map((e=>e[1])),0===l.length?this.renderingRule?(l.push(this.renderingRule),u.push(this.renderingRule.functionName)):l=null:this.renderingRule&&!l.some((e=>e.functionName===this.renderingRule.functionName))&&(l.push(this.renderingRule),u.push(this.renderingRule.functionName))}const m=(0,a.Wi)(e.outSpatialReference)||e.outSpatialReference.equals(this.spatialReference),d=e.timeExtent||this.timeExtent,h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,d),y=this._getQueryParams({geometry:e.geometry,timeExtent:d,mosaicRule:h,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:l,pixelSize:i,returnCatalogItems:o,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete y.f;const f=new st(y);try{await this.generateRasterInfo(this.renderingRule);const i=await Me(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,l=i.value.toLowerCase().includes("nodata");if(!o||m||!i?.catalogItems?.features.length||!n&&l)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const p=this.objectIdField||"ObjectId",c=i.catalogItems.features,d=c.map((e=>e.attributes?.[p])),h=new Ue.Z({objectIds:d,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[p]}),y=await this.queryRasters(h);return y?.features?.length&&y.features.forEach((t=>{c.forEach((i=>{i.attributes[p]===t.attributes[p]&&(i.geometry=new ke.Z(t.geometry),(0,a.pC)(e.outSpatialReference)&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new b.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,g.default)(this.parsedUrl.path+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),r=(0,g.default)(this.parsedUrl.path+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([i,r]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,ct.GE)(e.meshType,e.simulationSettings,e.flowData,(0,a.pC)(t.signal)?t.signal:(new AbortController).signal)}async _fetchService(e){await this._fetchServiceInfo(e),(0,a.pC)(this.serviceRasterInfo)&&!this.rasterInfo&&(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=(0,a.pC)(this.serviceRasterInfo)?Promise.resolve(this.serviceRasterInfo):(0,Ge.g)(this.parsedUrl.path,t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),e))),r=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([i,r,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),w.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles((0,_.YP)((()=>this.renderingRule),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))})));const{serviceRasterInfo:t}=this;(0,a.pC)(t)&&t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo;if((0,a.Wi)(e)||(0,a.Wi)(this.multidimensionalInfo)||(0,a.Wi)(t)||(0,a.Wi)(i?.startField))return e;const{startField:r}=i,s=this.multidimensionalInfo.variables.some((e=>e.dimensions.some((e=>e.name===r))))?r:"StdTime";if(e=e.clone(),"mosaic-dataset"===this._serviceSourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const n=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),o=(0,a.pC)(t.start)?t.start.getTime():null,l=(0,a.pC)(t.end)?t.end.getTime():null,u=null==o||null==l||o===l,p=u?[o||l]:[[o,l]],c=this.version>=10.8;if(n.length)n.forEach((e=>{e.dimensionName===s&&(c?(e.dimensionName=null,e.isSlice=null,e.values=null):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new F.Z({variableName:"",dimensionName:s,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return(0,a.Wi)(e)?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this._serviceSourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(await this._fetchCapabilities(t?.signal),!this.capabilities.operations.supportsQuery)throw new b.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=(0,a.pC)(e)?(0,p.TJ)(Ue.Z,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new he.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>null)),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,renderingRule:i}=this;return"unique-value"===e.type&&this._hasRenderingRule(i)&&1===t.bandCount&&["u8","s8"].includes(t.pixelType)||(0,be.U0)(this.rasterInfo).includes(this.renderer.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:r}=await(0,g.default)(this.parsedUrl.path,{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,r&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new b.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&e.timeInfo&&!(e.objectIdField&&e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if((0,a.Wi)(e))return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){if(!this._isPicture()&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&this.rasterInfo.bandCount>=3){const e=(0,be.YD)(this.rasterInfo);!e||3===this.rasterInfo.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,be.Ob)(this.rasterInfo,{bandIds:this.bandIds,variableName:this.renderingRule?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,be.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=this.rasterInfo):this.symbolizer=new Re.Z({rendererJSON:t,rasterInfo:this.rasterInfo}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:(0,a.pC)(e.pixelBlock)&&e.pixelBlock.clone()}}_getQueryParams(e){(0,a.pC)(e?.renderingRule)&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,fe.J)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;return this.serviceRasterInfo?t:t&&this.version>=10.3?1===t.length&&"none"===t[0].name.toLowerCase()?t:(await(0,g.default)(this.parsedUrl.path+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e})).data?.rasterFunctionInfos:null}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,signal:r}=e;if(i&&!this.pixelFilter&&t.format?.indexOf("png")>-1)return{imageElement:(await(0,g.default)(this.parsedUrl.path+"/exportImage",{responseType:"image",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:r})).data,params:t};const s=this._initJobHandler(),n=(0,g.default)(this.parsedUrl.path+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:r}),a=(await Promise.all([n,s]))[0].data,o=t.format||"jpgpng";let l=o;if("bsq"!==l&&"bip"!==l&&(l=(0,fe.y)(a)),!l)throw new b.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(a)));const u={signal:r},p="gif"===o||"bmp"===o||o.includes("png")&&("png"===l||"jpg"===l)?(0,fe.J)(a,{useCanvas:!0,...t},u):this._decodePixelBlock(a,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:o},u);return{pixelData:{pixelBlock:await p,extent:t.extent},params:t}}_generateRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return(0,Ge.N)(this.parsedUrl.path,e,i)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this._defaultServiceMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;const t=(0,ye.Tj)(e);if((0,a.pC)(t)&&t.length>0){this.mosaicRule=this.mosaicRule||new oe;const e=this.mosaicRule.multidimensionalDefinition;(!e||e&&e.length<=0)&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,l=e.processedValues;let u=e.catalogItems&&e.catalogItems.features,p=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replace(/ /gi,", ")))||[];const c=this.objectIdField||"ObjectId",m="string"==typeof i&&i.toLowerCase().includes("nodata"),d=[];if(i&&!u&&!m){const e={};e[c]=0,p=[i],u=[new y.Z(this.fullExtent,null,e)]}if(!u)return[];let h,f,g;this._updateResponseFieldNames(u,o),m&&!s&&(u=[]);for(let e=0;e<u.length;e++){if(h=u[e],null!=i){if(f=p[e],g=this.renderingRule&&l&&l.length>0&&r&&r.length>0&&r.includes(this.renderingRule.functionName)?l[r.indexOf(this.renderingRule.functionName)]:i,"nodata"===f.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";h.attributes[t]=f,h.attributes[n]=g,this._updateFeatureWithMagDirValues(h,f);const o=this.fields&&this.fields.length>0;let u=this.renderingRule&&(0,a.pC)(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable?o?f:i:g;this.renderingRule||(u=o?f:i),this._updateFeatureWithRasterAttributeTableValues(h,u)}if(h.sourceLayer=h.layer=this,n&&this._updateFeatureWithDomainValues(h),r&&l&&r.length===l.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];h.attributes[t]=l[e]}d.push(u[e])}return d}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo&&this.rasterInfo.attributeTable||(0,a.pC)(this.serviceRasterInfo)&&this.serviceRasterInfo.attributeTable,r=i&&i.features;if(!r)return;const s=i.fields,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=n&&n[0];if(!o)return;const l=r.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));l&&l[0]&&s.forEach((t=>{const i=this.rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=l[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new me.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new Le.Z(0,0,0,0,this.spatialReference)});const a="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ge.Tg)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=a[0],e.attributes["Raster.Direction"]=a[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;(0,a.Wi)(i)||e.forEach((e=>{if(e&&e.attributes)for(const r of t)if(i.has(r)){const t=i.get(r).name;t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(this._hasRenderingRule(e)){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRenderingRule(e){return e&&e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replace(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),a="esriImageServiceDataTypeElevation"===e.serviceDataType,o=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:t.includes("mensuration")&&o,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:i>=10.7&&a,supportsComputePixelLocation:i>=10.7&&t.includes("catalog"),supportsComputeAngles:i>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0}}}};return(0,s._)([(0,u.Cb)()],t.prototype,"_functionRasterInfos",void 0),(0,s._)([(0,u.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,s._)([(0,u.Cb)({dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"_defaultServiceMosaicRule",void 0),(0,s._)([(0,I.r)("_defaultServiceMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultServiceMosaicRule",null),(0,s._)([(0,u.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_serviceSourceType",void 0),(0,s._)([(0,I.r)("_serviceSourceType",["serviceSourceType","fields"])],t.prototype,"readServiceSourceType",null),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,s._)([(0,I.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,s._)([(0,u.Cb)()],t.prototype,"rasterAttributeTableFieldPrefix",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,s._)([(0,u.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,s._)([(0,u.Cb)({readOnly:!0}),(0,S.B)("serviceRasterInfo.bandCount")],t.prototype,"bandCount",void 0),(0,s._)([(0,u.Cb)({type:[p.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,s._)([(0,I.r)("bandIds")],t.prototype,"readBandIds",null),(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,s._)([(0,I.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,s._)([(0,u.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,s._)([(0,m.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,s._)([(0,u.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,s._)([(0,m.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,s._)([(0,u.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,s._)([(0,u.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,s._)([(0,u.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,s._)([(0,u.Cb)()],t.prototype,"rasterInfo",void 0),(0,s._)([(0,u.Cb)({readOnly:!0,type:[pe.Z]})],t.prototype,"fields",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,s._)([(0,u.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,s._)([(0,I.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,s._)([(0,u.Cb)({type:Le.Z})],t.prototype,"fullExtent",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,s._)([(0,u.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,s._)([(0,u.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,s._)([(0,u.Cb)({type:String,json:{type:le.c.jsonValues,read:le.c.read,write:le.c.write}})],t.prototype,"interpolation",void 0),(0,s._)([(0,u.Cb)()],t.prototype,"minScale",void 0),(0,s._)([(0,I.r)("service","minScale")],t.prototype,"readMinScale",null),(0,s._)([(0,u.Cb)()],t.prototype,"maxScale",void 0),(0,s._)([(0,I.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,s._)([(0,u.Cb)({type:oe})],t.prototype,"mosaicRule",null),(0,s._)([(0,I.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,s._)([(0,m.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,s._)([(0,u.Cb)({readOnly:!0}),(0,S.B)("serviceRasterInfo.multidimensionalInfo")],t.prototype,"multidimensionalInfo",void 0),(0,s._)([(0,u.Cb)({json:{type:p.z8}})],t.prototype,"noData",void 0),(0,s._)([(0,m.c)("noData")],t.prototype,"writeNoData",null),(0,s._)([(0,u.Cb)({type:String,json:{type:le.k.jsonValues,read:le.k.read,write:le.k.write}})],t.prototype,"noDataInterpretation",void 0),(0,s._)([(0,u.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,s._)([(0,I.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,s._)([(0,u.Cb)({})],t.prototype,"geometryType",void 0),(0,s._)([(0,u.Cb)({})],t.prototype,"typeIdField",void 0),(0,s._)([(0,u.Cb)({})],t.prototype,"types",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,s._)([(0,u.Cb)({readOnly:!0}),(0,S.B)("serviceRasterInfo.pixelSize.x")],t.prototype,"pixelSizeX",void 0),(0,s._)([(0,u.Cb)({readOnly:!0}),(0,S.B)("serviceRasterInfo.pixelSize.y")],t.prototype,"pixelSizeY",void 0),(0,s._)([(0,u.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,s._)([(0,u.Cb)()],t.prototype,"raster",void 0),(0,s._)([(0,u.Cb)()],t.prototype,"viewId",void 0),(0,s._)([(0,u.Cb)({types:f.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:f.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,s._)([(0,I.r)("renderer")],t.prototype,"readRenderer",null),(0,s._)([(0,m.c)("renderer")],t.prototype,"writeRenderer",null),(0,s._)([(0,u.Cb)()],t.prototype,"symbolizer",void 0),(0,s._)([(0,u.Cb)(x.Oh)],t.prototype,"opacity",void 0),(0,s._)([(0,u.Cb)({readOnly:!0}),(0,S.B)("serviceRasterInfo.attributeTable")],t.prototype,"rasterAttributeTable",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,s._)([(0,u.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,s._)([(0,u.Cb)({type:J})],t.prototype,"renderingRule",null),(0,s._)([(0,I.r)("renderingRule",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRenderingRule",null),(0,s._)([(0,m.c)("renderingRule")],t.prototype,"writeRenderingRule",null),(0,s._)([(0,u.Cb)()],t.prototype,"serviceDataType",void 0),(0,s._)([(0,u.Cb)({readOnly:!0,type:_e.Z})],t.prototype,"spatialReference",void 0),(0,s._)([(0,I.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,s._)([(0,u.Cb)({json:{type:mt.jsonValues}})],t.prototype,"pixelType",void 0),(0,s._)([(0,I.r)("pixelType")],t.prototype,"readPixelType",null),(0,s._)([(0,m.c)("pixelType")],t.prototype,"writePixelType",null),(0,s._)([(0,u.Cb)({constructOnly:!0,type:de.Z})],t.prototype,"serviceRasterInfo",void 0),(0,s._)([(0,u.Cb)()],t.prototype,"sourceJSON",void 0),(0,s._)([(0,u.Cb)(x.HQ)],t.prototype,"url",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,s._)([(0,I.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,s._)([(0,c.j)("esri.layers.mixins.ArcGISImageService")],t),t};var ft=i(17287),gt=i(71612),bt=i(17017),Rt=i(38009),vt=i(16859),wt=i(34760),_t=i(72965),Ct=i(28294),St=i(60199),It=i(32163);let xt=class extends((0,gt.h)((0,Ct.n)((0,wt.Q)((0,_t.M)((0,Rt.q)((0,vt.I)(yt((0,bt.N)((0,ft.Y)((0,o.R)(d.Z))))))))))){constructor(...e){super(...e),this.legendEnabled=!0,this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery"}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,a.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let s=!1,n=!1;this.capabilities&&(s=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,n="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const a=new Set;s&&a.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();a.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}return n&&r.add("raster.magnitude").add("raster.direction"),(0,It.eZ)({fields:t,title:i},{...e,visibleFieldNames:r})}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}serviceSupportsSpatialReference(e){return(0,St.D)(this,e)}};(0,s._)([(0,u.Cb)(x.rn)],xt.prototype,"legendEnabled",void 0),(0,s._)([(0,u.Cb)({type:["show","hide"]})],xt.prototype,"listMode",void 0),(0,s._)([(0,u.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],xt.prototype,"isReference",void 0),(0,s._)([(0,u.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],xt.prototype,"operationalLayerType",void 0),(0,s._)([(0,m.c)("web-map","operationalLayerType")],xt.prototype,"writeOperationalLayerType",null),(0,s._)([(0,u.Cb)(x.C_)],xt.prototype,"popupEnabled",void 0),(0,s._)([(0,u.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],xt.prototype,"popupTemplate",void 0),(0,s._)([(0,u.Cb)({readOnly:!0})],xt.prototype,"defaultPopupTemplate",null),(0,s._)([(0,u.Cb)({readOnly:!0,json:{read:!1}})],xt.prototype,"type",void 0),xt=(0,s._)([(0,c.j)("esri.layers.ImageryLayer")],xt);const Ft=xt},17287:(e,t,i)=>{i.d(t,{Y:()=>u});var r=i(43697),s=i(92604),n=i(70586),a=i(5600),o=(i(67676),i(80442),i(75215),i(52011)),l=i(66677);const u=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,n.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,s.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,a.Cb)()],t.prototype,"title",null),(0,r._)([(0,a.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>R});var r=i(43697),s=i(40330),n=i(3172),a=i(66643),o=i(20102),l=i(92604),u=i(70586),p=i(95330),c=i(17452),m=i(5600),d=(i(67676),i(80442),i(75215),i(71715)),h=i(52011),y=i(30556),f=i(65587),g=i(15235),b=i(86082);const R=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new g.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,p.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,p.D_)(e)||l.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const i=v.credential===t?v.user:await this._fetchEditingUser(e);return v.credential=t,v.user=i,(0,u.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=s.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,o=f.Z.getDefault();if(o&&o.loaded&&(0,c.Fv)(o.restUrl)===(0,c.Fv)(r))return o.user;const l=`${r}/community/self`,p=(0,u.pC)(e)?e.signal:null,m=await(0,a.q6)((0,n.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:p}));return m.ok?b.default.fromJSON(m.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||f.Z.getDefault());return i&&r&&!(0,c.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new o.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,m.Cb)({type:g.default})],t.prototype,"portalItem",null),(0,r._)([(0,d.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,y.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,m.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,h.j)("esri.layers.mixins.PortalLayer")],t),t},v={credential:null,user:null}},41818:(e,t,i)=>{i.d(t,{P:()=>a});var r=i(11282),s=i(34599),n=i(57444);async function a(e,t,i){const a=(0,r.en)(e);return(0,s.executeQueryForCount)(a,n.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>a});var r=i(11282),s=i(34599),n=i(57444);async function a(e,t,i){const a=(0,r.en)(e);return(0,s.executeQueryForIds)(a,n.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>o});var r=i(11282),s=i(34599),n=i(74889),a=i(57444);async function o(e,t,i){const r=await l(e,t,i);return n.default.fromJSON(r)}async function l(e,t,i){const n=(0,r.en)(e),o={...i},l=a.Z.from(t),{data:u}=await(0,s.executeQuery)(n,l,l.sourceSpatialReference,o);return u}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,s=i(43697),n=i(96674),a=i(5600),o=(i(67676),i(80442),i(75215)),l=i(52011);const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends n.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const s=t.find((e=>e.name===i));return s?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r&&r.value||null}({tagName:r,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,s._)([(0,a.Cb)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,a.Cb)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,a.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,a.Cb)({type:o.z8})],p.prototype,"id",void 0),(0,s._)([(0,a.Cb)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,a.Cb)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,a.Cb)({type:o.z8})],p.prototype,"size",void 0),(0,s._)([(0,a.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,s._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[461,5235,6130,4477],{66643:(e,t,i)=>{i.d(t,{Ed:()=>p,UI:()=>c,mt:()=>m,q6:()=>h,vr:()=>g});var r=i(43697),o=i(15923),s=i(70586),a=i(95330),n=i(5600),l=(i(67676),i(80442),i(75215),i(52011));function p(e,t,i){return(0,a.as)(e.map(((e,r)=>t.apply(i,[e,r]))))}async function c(e,t,i){return(await(0,a.as)(e.map(((e,r)=>t.apply(i,[e,r]))))).map((e=>e.value))}function u(e){return{ok:!0,value:e}}function d(e){return{ok:!1,error:e}}async function h(e){if((0,s.Wi)(e))return{ok:!1,error:new Error("no promise provided")};try{return u(await e)}catch(e){return d(e)}}async function m(e){try{return u(await e)}catch(e){return(0,a.r9)(e),d(e)}}function g(e,t){return new y(e,t)}let y=class extends o.Z{constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.IM)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:i}=this._abortController;this.promise=e(i),this.promise.then((e=>{this._result=u(e),this._cleanup()}),(e=>{this._result=d(e),this._cleanup()})),this._abortHandle=(0,a.fu)(t,this.abort)}get value(){return e=this._result,(0,s.pC)(e)&&!0===e.ok?e.value:null;var e}get error(){return e=this._result,(0,s.pC)(e)&&!1===e.ok?e.error:null;var e}get finished(){return(0,s.pC)(this._result)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.hw)(this._abortHandle),this._abortController=null}};(0,r._)([(0,n.Cb)()],y.prototype,"value",null),(0,r._)([(0,n.Cb)()],y.prototype,"error",null),(0,r._)([(0,n.Cb)()],y.prototype,"finished",null),(0,r._)([(0,n.Cb)()],y.prototype,"promise",void 0),(0,r._)([(0,n.Cb)()],y.prototype,"_result",void 0),y=(0,r._)([(0,l.j)("esri.core.asyncUtils.ReactiveTask")],y)},42033:(e,t,i)=>{i.d(t,{E:()=>o,_:()=>s});var r=i(70586);async function o(e,t){const{WhereClause:r}=await Promise.resolve().then(i.bind(i,41534));return r.create(e,t)}function s(e,t){return(0,r.pC)(e)?(0,r.pC)(t)?`(${e}) AND (${t})`:e:t}},70171:(e,t,i)=>{let r;i.d(t,{Kd:()=>a,Ze:()=>c,qe:()=>l});const o=globalThis.esriConfig?.locale??globalThis.dojoConfig?.locale;function s(){return o??globalThis.navigator?.language??"en"}function a(){return void 0===r&&(r=s()),r}const n=[];function l(e){return n.push(e),{remove(){n.splice(n.indexOf(e),1)}}}const p=[];function c(e){return p.push(e),{remove(){n.splice(p.indexOf(e),1)}}}globalThis.addEventListener?.("languagechange",(function(){const e=s();r!==e&&(r=e,[...p].forEach((t=>{t.call(null,e)})),[...n].forEach((t=>{t.call(null,e)})))}))},94443:(e,t,i)=>{i.d(t,{ME:()=>h,Su:()=>m,tz:()=>d});var r=i(20102),o=i(95330),s=i(70171);const a=/^([a-z]{2})(?:[-_]([A-Za-z]{2}))?$/,n={ar:!0,bg:!0,bs:!0,ca:!0,cs:!0,da:!0,de:!0,el:!0,en:!0,es:!0,et:!0,fi:!0,fr:!0,he:!0,hr:!0,hu:!0,id:!0,it:!0,ja:!0,ko:!0,lt:!0,lv:!0,nb:!0,nl:!0,pl:!0,"pt-BR":!0,"pt-PT":!0,ro:!0,ru:!0,sk:!0,sl:!0,sr:!0,sv:!0,th:!0,tr:!0,uk:!0,vi:!0,"zh-CN":!0,"zh-HK":!0,"zh-TW":!0};function l(e){return n[e]??!1}const p=[],c=new Map;function u(e){for(const t of c.keys())g(e.pattern,t)&&c.delete(t)}function d(e){return p.includes(e)||(u(e),p.unshift(e)),{remove(){const t=p.indexOf(e);t>-1&&(p.splice(t,1),u(e))}}}async function h(e){const t=(0,s.Kd)();c.has(e)||c.set(e,async function(e,t){const i=[];for(const r of p)if(g(r.pattern,e))try{return await r.fetchMessageBundle(e,t)}catch(e){i.push(e)}if(i.length)throw new r.Z("intl:message-bundle-error",`Errors occurred while loading "${e}"`,{errors:i});throw new r.Z("intl:no-message-bundle-loader",`No loader found for message bundle "${e}"`)}(e,t));const i=c.get(e);return await y.add(i),i}function m(e){if(!a.test(e))return null;const[,t,i]=a.exec(e),r=t+(i?"-"+i.toUpperCase():"");return l(r)?r:l(t)?t:null}function g(e,t){return"string"==typeof e?t.startsWith(e):e.test(t)}(0,s.Ze)((()=>{c.clear()}));const y=new class{constructor(){this._numLoading=0}async waitForAll(){this._dfd&&await this._dfd.promise}add(e){return this._increase(),e.then((()=>this._decrease()),(()=>this._decrease())),this.waitForAll()}_increase(){this._numLoading++,this._dfd||(this._dfd=(0,o.dD)())}_decrease(){this._numLoading=Math.max(this._numLoading-1,0),this._dfd&&0===this._numLoading&&(this._dfd.resolve(),this._dfd=null)}}},54295:(e,t,i)=>{i.d(t,{V:()=>a});var r=i(43697),o=i(5600),s=(i(67676),i(80442),i(75215),i(52011));const a=e=>{let t=class extends e{get apiKey(){return this._isOverridden("apiKey")?this._get("apiKey"):"portalItem"in this?this.portalItem?.apiKey:null}set apiKey(e){null!=e?this._override("apiKey",e):(this._clearOverride("apiKey"),this.clear("apiKey","user"))}};return(0,r._)([(0,o.Cb)({type:String})],t.prototype,"apiKey",null),t=(0,r._)([(0,s.j)("esri.layers.mixins.APIKeyMixin")],t),t}},17287:(e,t,i)=>{i.d(t,{Y:()=>p});var r=i(43697),o=i(92604),s=i(70586),a=i(5600),n=(i(67676),i(80442),i(75215),i(52011)),l=i(66677);const p=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,l.Qc)(this.url);if((0,s.pC)(e)&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,l.Nm)(e,o.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,a.Cb)()],t.prototype,"title",null),(0,r._)([(0,a.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,n.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,i)=>{i.d(t,{I:()=>f});var r=i(43697),o=i(40330),s=i(3172),a=i(66643),n=i(20102),l=i(92604),p=i(70586),c=i(95330),u=i(17452),d=i(5600),h=(i(67676),i(80442),i(75215),i(71715)),m=i(52011),g=i(30556),y=i(65587),b=i(15235),v=i(86082);const f=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0}destroy(){this.portalItem?.destroy(),this.portalItem=null}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new b.default({id:t.itemId,portal:i&&i.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const r=await i.e(8062).then(i.bind(i,18062));return(0,c.k_)(t),await r.load({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData},t)}catch(e){throw(0,c.D_)(e)||l.Z.getLogger(this.declaredClass).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,c.r9)(e),!0))))}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const i=w.credential===t?w.user:await this._fetchEditingUser(e);return w.credential=t,w.user=i,(0,p.Wi)(i)||null==i.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=o.id.findServerInfo(this.url);if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=y.Z.getDefault();if(n&&n.loaded&&(0,u.Fv)(n.restUrl)===(0,u.Fv)(r))return n.user;const l=`${r}/community/self`,c=(0,p.pC)(e)?e.signal:null,d=await(0,a.q6)((0,s.default)(l,{authMode:"no-prompt",query:{f:"json"},signal:c}));return d.ok?v.default.fromJSON(d.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t&&t.portal,r=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||y.Z.getDefault());return i&&r&&!(0,u.tm)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new n.Z("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r._)([(0,d.Cb)({type:b.default})],t.prototype,"portalItem",null),(0,r._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,r._)([(0,g.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,r._)([(0,d.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,r._)([(0,d.Cb)({readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),t=(0,r._)([(0,m.j)("esri.layers.mixins.PortalLayer")],t),t},w={credential:null,user:null}},56765:(e,t,i)=>{i.d(t,{Z:()=>c});var r,o=i(43697),s=i(46791),a=i(96674),n=i(5600),l=(i(67676),i(80442),i(75215),i(52011));let p=r=class extends a.wq{constructor(e){super(e),this.floorField=null,this.viewAllMode=!1,this.viewAllLevelIds=new s.Z}clone(){return new r({floorField:this.floorField,viewAllMode:this.viewAllMode,viewAllLevelIds:this.viewAllLevelIds})}};(0,o._)([(0,n.Cb)({type:String,json:{write:!0}})],p.prototype,"floorField",void 0),(0,o._)([(0,n.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllMode",void 0),(0,o._)([(0,n.Cb)({json:{read:!1,write:!1}})],p.prototype,"viewAllLevelIds",void 0),p=r=(0,o._)([(0,l.j)("esri.layers.support.LayerFloorInfo")],p);const c=p},15235:(e,t,i)=>{i.r(t),i.d(t,{default:()=>x});var r=i(43697),o=i(99880),s=i(20102),a=i(96674),n=i(22974),l=i(83379),p=i(70586),c=i(17452),u=i(5600),d=i(75215),h=i(71715),m=i(52011),g=i(6570),y=i(65587),b=i(15923),v=i(92604),f=(i(67676),i(80442),i(90578));let w=class extends b.Z{constructor(e){super(e),this.portalItem=null}normalizeCtorArgs(e){return e&&e.portalItem&&e.path?{...e,path:this._normalizePath(e.path,e.portalItem)}:e}set path(e){(0,p.pC)(e)&&(0,c.YP)(e)?v.Z.getLogger(this.declaredClass).error("portalitemresource:invalid-path","A portal item resource path must be relative"):this._set("path",e)}_castPath(e){return this._normalizePath(e,this.portalItem)}get url(){return this.portalItem&&this.path?`${this.portalItem.itemUrl}/resources/${this.path}`:null}get itemRelativeUrl(){return this.portalItem&&this.path?`./resources/${this.path}`:null}fetch(e="json",t){const i=this.url;if((0,p.Wi)(i))throw new s.Z("portal-item-resource:fetch","Portal item resource does not refer to a valid item or path");return this.portalItem.portal._request(i,{responseType:e,query:{token:this.portalItem.apiKey},signal:(0,p.U2)(t,"signal")})}async update(e,t){return(await i.e(7873).then(i.bind(i,97873))).addOrUpdateResource(this,"update",e,t)}hasPath(){return(0,p.pC)(this.path)}_normalizePath(e,t){return(0,p.Wi)(e)?e:(e=e.replace(/^\/+/,""),(0,p.pC)(t)&&(0,c.YP)(e)&&(e=(0,c.PF)(e,t.itemUrl)),e.replace(/^\/+/,"").replace(/^(\.\/)?resources\//,""))}};(0,r._)([(0,u.Cb)()],w.prototype,"portalItem",void 0),(0,r._)([(0,u.Cb)({type:String,value:null})],w.prototype,"path",null),(0,r._)([(0,f.p)("path")],w.prototype,"_castPath",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],w.prototype,"url",null),(0,r._)([(0,u.Cb)({type:String,readOnly:!0})],w.prototype,"itemRelativeUrl",null),w=(0,r._)([(0,m.j)("esri.portal.PortalItemResource")],w);const _=w;let C=class extends b.Z{constructor(e){super(e),this.created=null,this.rating=null}};(0,r._)([(0,u.Cb)()],C.prototype,"created",void 0),(0,r._)([(0,u.Cb)()],C.prototype,"rating",void 0),C=(0,r._)([(0,m.j)("esri.portal.PortalRating")],C);const k=C;var I;let S=I=class extends((0,a.eC)(l.Z)){constructor(e){super(e),this.access=null,this.accessInformation=null,this.apiKey=null,this.applicationProxies=null,this.avgRating=null,this.categories=null,this.created=null,this.culture=null,this.description=null,this.extent=null,this.groupCategories=null,this.id=null,this.itemControl=null,this.licenseInfo=null,this.modified=null,this.name=null,this.numComments=null,this.numRatings=null,this.numViews=null,this.owner=null,this.ownerFolder=null,this.portal=null,this.screenshots=null,this.size=null,this.snippet=null,this.sourceJSON=null,this.spatialReference=null,this.tags=null,this.title=null,this.type=null,this.typeKeywords=null,this.url=null}static from(e){return(0,d.TJ)(I,e)}destroy(){this.portal=null}get displayName(){const e=this.type,t=this.typeKeywords||[];let i=e;return"Feature Service"===e||"Feature Collection"===e?i=t.includes("Table")?"Table":t.includes("Route Layer")?"Route Layer":t.includes("Markup")?"Markup":"Feature Layer":"Image Service"===e?i=t.includes("Elevation 3D Layer")?"Elevation Layer":t.includes("Tiled Imagery")?"Tiled Imagery Layer":"Imagery Layer":"Scene Service"===e?i="Scene Layer":"Video Service"===e?i="Video Layer":"Scene Package"===e?i="Scene Layer Package":"Stream Service"===e?i="Feature Layer":"Geoprocessing Service"===e&&this.portal&&this.portal.isPortal?i=t.includes("Web Tool")?"Tool":"Geoprocessing Service":"Geocoding Service"===e?i="Locator":"Geoenrichment Service"===e?i="GeoEnrichment Service":"Microsoft Powerpoint"===e?i="Microsoft PowerPoint":"GeoJson"===e?i="GeoJSON":"Globe Service"===e?i="Globe Layer":"Vector Tile Service"===e?i="Tile Layer":"netCDF"===e?i="NetCDF":"Map Service"===e?i=t.includes("Spatiotemporal")||!t.includes("Hosted Service")&&!t.includes("Tiled")||t.includes("Relational")?"Map Image Layer":"Tile Layer":e&&e.toLowerCase().includes("add in")?i=e.replace(/(add in)/gi,"Add-In"):"datastore catalog service"===e?i="Big Data File Share":"Compact Tile Package"===e?i="Tile Package (tpkx)":"OGCFeatureServer"===e?i="OGC Feature Layer":"web mapping application"===e&&t.includes("configurableApp")&&(i="Instant App"),i}readExtent(e){return e&&e.length?new g.Z(e[0][0],e[0][1],e[1][0],e[1][1]):null}get iconUrl(){const e=this.type&&this.type.toLowerCase()||"",t=this.typeKeywords||[];let i,r=!1,s=!1,a=!1,n=!1,l=!1,p=!1;return e.indexOf("service")>0||"feature collection"===e||"kml"===e||"wms"===e||"wmts"===e||"wfs"===e?(r=t.includes("Hosted Service"),"feature service"===e||"feature collection"===e||"kml"===e||"wfs"===e?(s=t.includes("Table"),a=t.includes("Route Layer"),n=t.includes("Markup"),l=t.includes("Spatiotemporal"),p=t.includes("UtilityNetwork"),i=l&&s?"spatiotemporaltable":s?"table":a?"routelayer":n?"markup":l?"spatiotemporal":r?"featureshosted":p?"utilitynetwork":"features"):i="map service"===e||"wms"===e||"wmts"===e?r||t.includes("Tiled")||"wmts"===e?"maptiles":"mapimages":"scene service"===e?t.includes("Line")?"sceneweblayerline":t.includes("3DObject")?"sceneweblayermultipatch":t.includes("Point")?"sceneweblayerpoint":t.includes("IntegratedMesh")?"sceneweblayermesh":t.includes("PointCloud")?"sceneweblayerpointcloud":t.includes("Polygon")?"sceneweblayerpolygon":t.includes("Building")?"sceneweblayerbuilding":t.includes("Voxel")?"sceneweblayervoxel":"sceneweblayer":"image service"===e?t.includes("Elevation 3D Layer")?"elevationlayer":t.includes("Tiled Imagery")?"tiledimagerylayer":"imagery":"stream service"===e?"streamlayer":"video service"===e?"mediaservice":"vector tile service"===e?"vectortile":"datastore catalog service"===e?"datastorecollection":"geocoding service"===e?"geocodeservice":"geoprocessing service"===e?t.includes("Web Tool")&&this.portal&&this.portal.isPortal?"tool":"layers":"geodata service"===e?"geodataservice":"layers"):i="web map"===e||"cityengine web scene"===e?"maps":"web scene"===e?t.includes("ViewingMode-Local")?"webscenelocal":"websceneglobal":"web mapping application"===e&&t.includes("configurableApp")?"instantapps":"web mapping application"===e||"mobile application"===e||"application"===e||"operation view"===e||"desktop application"===e?"apps":"map document"===e||"map package"===e||"published map"===e||"scene document"===e||"globe document"===e||"basemap package"===e||"mobile basemap package"===e||"mobile map package"===e||"project package"===e||"project template"===e||"pro map"===e||"layout"===e||"layer"===e&&t.includes("ArcGIS Pro")||"explorer map"===e&&t.indexOf("Explorer Document")?"mapsgray":"service definition"===e||"csv"===e||"shapefile"===e||"cad drawing"===e||"geojson"===e||"360 vr experience"===e||"netcdf"===e||"administrative report"===e?"datafiles":"explorer add in"===e||"desktop add in"===e||"windows viewer add in"===e||"windows viewer configuration"===e?"appsgray":"arcgis pro add in"===e||"arcgis pro configuration"===e?"addindesktop":"rule package"===e||"file geodatabase"===e||"sqlite geodatabase"===e||"csv collection"===e||"kml collection"===e||"windows mobile package"===e||"map template"===e||"desktop application template"===e||"gml"===e||"arcpad package"===e||"code sample"===e||"form"===e||"document link"===e||"earth configuration"===e||"operations dashboard add in"===e||"rules package"===e||"image"===e||"workflow manager package"===e||"explorer map"===e&&t.includes("Explorer Mapping Application")||t.includes("Document")?"datafilesgray":"network analysis service"===e||"geoprocessing service"===e||"geodata service"===e||"geometry service"===e||"geoprocessing package"===e||"locator package"===e||"geoprocessing sample"===e||"workflow manager service"===e?"toolsgray":"layer"===e||"layer package"===e||"explorer layer"===e?"layersgray":"scene package"===e?"scenepackage":"mobile scene package"===e?"mobilescenepackage":"tile package"===e||"compact tile package"===e?"tilepackage":"task file"===e?"taskfile":"report template"===e?"report-template":"statistical data collection"===e?"statisticaldatacollection":"insights workbook"===e?"workbook":"insights model"===e?"insightsmodel":"insights page"===e?"insightspage":"insights theme"===e?"insightstheme":"hub initiative"===e?"hubinitiative":"hubpage"===e?"hubpage":"hub event"===e?"hubevent":"hub site application"===e?"hubsite":"hub project"===e?"hubproject":"relational database connection"===e?"relationaldatabaseconnection":"big data file share"===e?"datastorecollection":"image collection"===e?"imagecollection":"style"===e?"style":"desktop style"===e?"desktopstyle":"dashboard"===e?"dashboard":"raster function template"===e?"rasterprocessingtemplate":"vector tile package"===e?"vectortilepackage":"ortho mapping project"===e?"orthomappingproject":"ortho mapping template"===e?"orthomappingtemplate":"solution"===e?"solutions":"geopackage"===e?"geopackage":"deep learning package"===e?"deeplearningpackage":"real time analytic"===e?"realtimeanalytics":"big data analytic"===e?"bigdataanalytics":"feed"===e?"feed":"excalibur imagery project"===e?"excaliburimageryproject":"notebook"===e?"notebook":"storymap"===e?"storymap":"survey123 add in"===e?"survey123addin":"mission"===e?"mission":"mission report"===e?"missionreport":"quickcapture project"===e?"quickcaptureproject":"pro report"===e?"proreport":"urban model"===e?"urbanmodel":"web experience"===e?"experiencebuilder":"web experience template"===e?"webexperiencetemplate":"experience builder widget"===e?"experiencebuilderwidget":"experience builder widget package"===e?"experiencebuilderwidgetpackage":"workflow"===e?"workflow":"insights script"===e?"insightsscript":"kernel gateway connection"===e?"kernelgatewayconnection":"hub initiative template"===e?"hubinitiativetemplate":"storymap theme"===e?"storymaptheme":"knowledge graph"===e?"knowledgegraph":"native application"===e?"nativeapp":"native application installer"===e?"nativeappinstaller":"link chart"===e?"linkchart":"investigation"===e?"investigation":"ogcfeatureserver"===e?"features":"pro project"===e?"proproject":"insights workbook package"===e?"insightsworkbookpackage":"apache parquet"===e?"apacheparquet":"notebook code snippets"===e?"notebookcodesnippets":"suitability model"===e?"suitabilitymodel":"esri classifier definition"===e?"classifierdefinition":"esri classification schema"===e?"classificationschema":"insights data engineering workbook"===e?"dataengineeringworkbook":"insights data engineering model"===e?"dataengineeringmodel":"deep learning studio project"===e?"deeplearningproject":"maps",i?(0,o.V)("esri/images/portal/"+i+"16.png"):null}get isLayer(){return["Map Service","Feature Service","Feature Collection","Scene Service","Image Service","Stream Service","Vector Tile Service","WMTS","WMS"].includes(this.type)}get itemUrl(){const e=this.get("portal.restUrl");return e&&this.id?`${e}/content/items/${this.id}`:null}get thumbnailUrl(){const e=this.itemUrl,t=this.thumbnail;return e&&t?this.portal._normalizeUrl(`${e}/info/${t}?f=json`):null}get userItemUrl(){const e=this.get("portal.restUrl");if(!e)return null;const t=this.owner||this.get("portal.user.username");return t?`${e}/content/users/${this.ownerFolder?`${t}/${this.ownerFolder}`:t}/items/${this.id}`:null}load(e){this.portal||(this.portal=y.Z.getDefault());const t=this.portal.load(e).then((()=>this.sourceJSON?this.sourceJSON:this.id&&this.itemUrl?this.portal._request(this.itemUrl,{signal:(0,p.pC)(e)?e.signal:null,query:{token:this.apiKey}}):{})).then((e=>{this.sourceJSON=e,this.read(e)}));return this.addResolvingPromise(t),Promise.resolve(this)}addRating(e){const t={method:"post",query:{}};return e instanceof k&&(e=e.rating),isNaN(e)||"number"!=typeof e||(t.query.rating=e),this.portal._request(this.itemUrl+"/addRating",t).then((()=>new k({rating:e,created:new Date})))}clone(){const e={access:this.access,accessInformation:this.accessInformation,applicationProxies:(0,n.d9)(this.applicationProxies),avgRating:this.avgRating,categories:(0,n.d9)(this.categories),created:(0,n.d9)(this.created),culture:this.culture,description:this.description,extent:(0,n.d9)(this.extent),groupCategories:(0,n.d9)(this.groupCategories),id:this.id,itemControl:this.itemControl,licenseInfo:this.licenseInfo,modified:(0,n.d9)(this.modified),name:this.name,numComments:this.numComments,numRatings:this.numRatings,numViews:this.numViews,owner:this.owner,ownerFolder:this.ownerFolder,portal:this.portal,screenshots:(0,n.d9)(this.screenshots),size:this.size,snippet:this.snippet,spatialReference:this.spatialReference,tags:(0,n.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.d9)(this.typeKeywords),url:this.url};return this.loaded&&(e.loadStatus="loaded"),new I({sourceJSON:this.sourceJSON}).set(e)}createPostQuery(){const e=this.toJSON();for(const t of["tags","typeKeywords","categories"])e[t]&&(e[t]=e[t].join(", "));const{extent:t}=e;return t&&(e.extent=JSON.stringify(t)),e}deleteRating(){return this.portal._request(this.itemUrl+"/deleteRating",{method:"post"}).then((()=>{}))}fetchData(e="json",t){return this.portal._request(this.itemUrl+"/data",{responseType:e,...t,query:{token:this.apiKey}})}fetchRating(e){return this.portal._request(this.itemUrl+"/rating",{query:{token:this.apiKey},...e}).then((e=>null!=e.rating?(e.created=new Date(e.created),new k(e)):null))}fetchRelatedItems(e,t){return this.portal._requestToTypedArray(this.itemUrl+"/relatedItems",{query:{...e,token:this.apiKey},...t},I)}getThumbnailUrl(e){let t=this.thumbnailUrl;return t&&e&&(t+=`&w=${e}`),t}reload(){return this.portal._request(this.itemUrl,{cacheBust:!0,query:{token:this.apiKey}}).then((e=>(this.sourceJSON=e,this.read(e),this)))}update(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e&&e.data,i={method:"post"};i.query=this.createPostQuery();for(const e in i.query)null===i.query[e]&&(i.query[e]="");return i.query.clearEmptyFields=!0,null!=t&&("string"==typeof t?i.query.text=t:"object"==typeof t&&(i.query.text=JSON.stringify(t))),this.portal._request(`${this.userItemUrl}/update`,i).then((()=>this.reload()))})):Promise.reject(new s.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}updateThumbnail(e){return this.id?this.load().then((()=>this.portal._signIn())).then((()=>{const t=e.thumbnail,i=e.filename,r={method:"post"};if("string"==typeof t)(0,c.HK)(t)?r.query={data:t}:r.query={url:(0,c.hF)(t)},(0,p.pC)(i)&&(r.query.filename=i);else{const e=new FormData;(0,p.pC)(i)?e.append("file",t,i):e.append("file",t),r.body=e}return this.portal._request(`${this.userItemUrl}/updateThumbnail`,r).then((()=>this.reload()))})):Promise.reject(new s.Z("portal:item-does-not-exist","The item does not exist yet and cannot be updated"))}async fetchResources(e={},t){return(await i.e(7873).then(i.bind(i,97873))).fetchResources(this,e,t)}async addResource(e,t,r){const o=await i.e(7873).then(i.bind(i,97873));return e.portalItem=this,o.addOrUpdateResource(e,"add",t,r)}async removeResource(e,t){const r=await i.e(7873).then(i.bind(i,97873));if(e.portalItem&&e.portalItem.itemUrl!==this.itemUrl)throw new s.Z("removeresource:portal-item-mismatch","The portal item associated with the provided resource does not match the item");return r.removeResource(this,e,t)}async removeAllResources(e){return(await i.e(7873).then(i.bind(i,97873))).removeAllResources(this,e)}resourceFromPath(e){return new _({portalItem:this,path:e})}toJSON(){const e=this.extent,t={accessInformation:this.accessInformation,categories:(0,n.d9)(this.categories),created:this.created&&this.created.getTime(),description:this.description,extent:e&&[[e.xmin,e.ymin],[e.xmax,e.ymax]],id:this.id,licenseInfo:this.licenseInfo,modified:this.modified&&this.modified.getTime(),name:this.name,owner:this.owner,ownerFolder:this.ownerFolder,snippet:this.snippet,spatialReference:this.spatialReference,tags:(0,n.d9)(this.tags),thumbnail:this.thumbnail,title:this.title,type:this.type,typeKeywords:(0,n.d9)(this.typeKeywords),url:this.url};return(0,n.yd)(t)}static fromJSON(e){if(!e)return null;if(e.declaredClass)throw new Error("JSON object is already hydrated");return new I({sourceJSON:e})}_getPostQuery(){const e=this.toJSON();for(const t in e)"tags"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"typeKeywords"===t&&null!==e[t]&&(e[t]=e[t].join(", ")),"extent"===t&&e[t]&&(e[t]=JSON.stringify(e[t]));return e}};(0,r._)([(0,u.Cb)({type:["private","shared","org","public"]})],S.prototype,"access",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"accessInformation",void 0),(0,r._)([(0,u.Cb)({type:String})],S.prototype,"apiKey",void 0),(0,r._)([(0,u.Cb)({json:{read:{source:"appProxies"}}})],S.prototype,"applicationProxies",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"avgRating",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"categories",void 0),(0,r._)([(0,u.Cb)({type:Date})],S.prototype,"created",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"culture",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"description",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],S.prototype,"displayName",null),(0,r._)([(0,u.Cb)({type:g.Z})],S.prototype,"extent",void 0),(0,r._)([(0,h.r)("extent")],S.prototype,"readExtent",null),(0,r._)([(0,u.Cb)()],S.prototype,"groupCategories",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],S.prototype,"iconUrl",null),(0,r._)([(0,u.Cb)()],S.prototype,"id",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],S.prototype,"isLayer",null),(0,r._)([(0,u.Cb)()],S.prototype,"itemControl",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],S.prototype,"itemUrl",null),(0,r._)([(0,u.Cb)()],S.prototype,"licenseInfo",void 0),(0,r._)([(0,u.Cb)({type:Date})],S.prototype,"modified",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"name",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"numComments",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"numRatings",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"numViews",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"owner",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"ownerFolder",void 0),(0,r._)([(0,u.Cb)({type:y.Z})],S.prototype,"portal",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"screenshots",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"size",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"snippet",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"sourceJSON",void 0),(0,r._)([(0,u.Cb)({type:String})],S.prototype,"spatialReference",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"tags",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"thumbnail",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],S.prototype,"thumbnailUrl",null),(0,r._)([(0,u.Cb)()],S.prototype,"title",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"type",void 0),(0,r._)([(0,u.Cb)()],S.prototype,"typeKeywords",void 0),(0,r._)([(0,u.Cb)({type:String,json:{read(e,t){if("KML"!==t.type)return e;const i=this.portal?.restUrl;return e||(e=i&&this.id?`${i}/content/items/${this.id}/data`:null),e}}})],S.prototype,"url",void 0),(0,r._)([(0,u.Cb)({readOnly:!0})],S.prototype,"userItemUrl",null),S=I=(0,r._)([(0,m.j)("esri.portal.PortalItem")],S);const x=S},51706:(e,t,i)=>{var r,o;function s(e){return e&&"esri.renderers.visualVariables.SizeVariable"===e.declaredClass}function a(e){return null!=e&&!isNaN(e)&&isFinite(e)}function n(e){return e.valueExpression?r.Expression:e.field&&"string"==typeof e.field?r.Field:r.Unknown}function l(e,t){const i=t||n(e),s=e.valueUnit||"unknown";return i===r.Unknown?o.Constant:e.stops?o.Stops:null!=e.minSize&&null!=e.maxSize&&null!=e.minDataValue&&null!=e.maxDataValue?o.ClampedLinear:"unknown"===s?null!=e.minSize&&null!=e.minDataValue?e.minSize&&e.minDataValue?o.Proportional:o.Additive:o.Identity:o.RealWorldSize}i.d(t,{PS:()=>n,QW:()=>l,RY:()=>r,hL:()=>o,iY:()=>s,qh:()=>a}),function(e){e.Unknown="unknown",e.Expression="expression",e.Field="field"}(r||(r={})),function(e){e.Unknown="unknown",e.Stops="stops",e.ClampedLinear="clamped-linear",e.Proportional="proportional",e.Additive="additive",e.Constant="constant",e.Identity="identity",e.RealWorldSize="real-world-size"}(o||(o={}))}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9032,4889],{78346:(e,t,r)=>{r.d(t,{bA:()=>Z});var i=r(20102),s=r(80442),n=r(95330),a=r(80903),o=r(25045),l=r(40330),c=r(92604),u=r(70586),h=r(94362),f=r(99880),d=r(68773),p=(r(2587),r(17452));const m={};function y(e){const t={async:e.async,isDebug:e.isDebug,locale:e.locale,baseUrl:e.baseUrl,has:{...e.has},map:{...e.map},packages:e.packages&&e.packages.concat()||[],paths:{...e.paths}};return e.hasOwnProperty("async")||(t.async=!0),e.hasOwnProperty("isDebug")||(t.isDebug=!1),e.baseUrl||(t.baseUrl=m.baseUrl),m.packages?.forEach((e=>{!function(e,t){for(const r of e)if(r.name===t.name)return;e.push(t)}(t.packages,e)})),t}var g=r(41213);class x{constructor(){const e=document.createDocumentFragment();["addEventListener","dispatchEvent","removeEventListener"].forEach((t=>{this[t]=(...r)=>e[t](...r)}))}}class w{constructor(){this._dispatcher=new x,this._workerPostMessage({type:h.Cs.HANDSHAKE})}terminate(){}get onmessage(){return this._onmessageHandler}set onmessage(e){this._onmessageHandler&&this.removeEventListener("message",this._onmessageHandler),this._onmessageHandler=e,e&&this.addEventListener("message",e)}get onmessageerror(){return this._onmessageerrorHandler}set onmessageerror(e){this._onmessageerrorHandler&&this.removeEventListener("messageerror",this._onmessageerrorHandler),this._onmessageerrorHandler=e,e&&this.addEventListener("messageerror",e)}get onerror(){return this._onerrorHandler}set onerror(e){this._onerrorHandler&&this.removeEventListener("error",this._onerrorHandler),this._onerrorHandler=e,e&&this.addEventListener("error",e)}postMessage(e){(0,g.Y)((()=>{this._workerMessageHandler(new MessageEvent("message",{data:e}))}))}dispatchEvent(e){return this._dispatcher.dispatchEvent(e)}addEventListener(e,t,r){this._dispatcher.addEventListener(e,t,r)}removeEventListener(e,t,r){this._dispatcher.removeEventListener(e,t,r)}_workerPostMessage(e){(0,g.Y)((()=>{this.dispatchEvent(new MessageEvent("message",{data:e}))}))}async _workerMessageHandler(e){const t=(0,h.QM)(e);if(t&&t.type===h.Cs.OPEN){const{modulePath:e,jobId:r}=t;let i=await o.default.loadWorker(e);i||(i=await import(e));const s=o.default.connect(i);this._workerPostMessage({type:h.Cs.OPENED,jobId:r,data:s})}}}var b=r(70171),I=r(17202);const v=c.Z.getLogger("esri.core.workers.workerFactory"),{HANDSHAKE:_}=h.Cs;let C,S;const R="Failed to create Worker. Fallback to execute module in main thread";async function k(e){return new Promise((t=>{function r(s){const n=(0,h.QM)(s);n&&n.type===_&&(e.removeEventListener("message",r),e.removeEventListener("error",i),t(e))}function i(t){t.preventDefault(),e.removeEventListener("message",r),e.removeEventListener("error",i),v.warn("Failed to create Worker. Fallback to execute module in main thread",t),(e=new w).addEventListener("message",r),e.addEventListener("error",i)}e.addEventListener("message",r),e.addEventListener("error",i)}))}let T=0;const{ABORT:P,INVOKE:M,OPEN:E,OPENED:O,RESPONSE:F}=h.Cs;class B{constructor(e,t){this._outJobs=new Map,this._inJobs=new Map,this.worker=e,this.id=t,e.addEventListener("message",this._onMessage.bind(this)),e.addEventListener("error",(e=>{e.preventDefault(),c.Z.getLogger("esri.core.workers.WorkerOwner").error(e)}))}static async create(e){const t=await async function(){if(!(0,s.Z)("esri-workers")||((0,s.Z)("mozilla"),0))return k(new w);if(!C&&!S)try{const e='let globalId=0;const outgoing=new Map,configuration=JSON.parse("{CONFIGURATION}");self.esriConfig=configuration.esriConfig;const workerPath=self.esriConfig.workers.workerPath,HANDSHAKE=0,OPEN=1,OPENED=2,RESPONSE=3,INVOKE=4,ABORT=5;function createAbortError(){const e=new Error("Aborted");return e.name="AbortError",e}function receiveMessage(e){return e&&e.data?"string"==typeof e.data?JSON.parse(e.data):e.data:null}function invokeStaticMessage(e,o,r){const t=r&&r.signal,n=globalId++;return new Promise(((r,i)=>{if(t){if(t.aborted)return i(createAbortError());t.addEventListener("abort",(()=>{outgoing.get(n)&&(outgoing.delete(n),self.postMessage({type:5,jobId:n}),i(createAbortError()))}))}outgoing.set(n,{resolve:r,reject:i}),self.postMessage({type:4,jobId:n,methodName:e,abortable:null!=t,data:o})}))}let workerRevisionChecked=!1;function checkWorkerRevision(e){if(!workerRevisionChecked&&e.kernelInfo){workerRevisionChecked=!0;const{revision:o,buildDate:r,version:t}=configuration.kernelInfo,{revision:n,buildDate:i,version:s}=e.kernelInfo;o!==n&&console.warn(`[esri.core.workers] Version mismatch detected between ArcGIS API for JavaScript and assets:\\nAPI version: ${t} [Date: ${r}, Revision: ${o.slice(0,8)}]\nAssets version: ${s} [Date: ${i}, Revision: ${n.slice(0,8)}]`)}}function messageHandler(e){const o=receiveMessage(e);if(!o)return;const r=o.jobId;switch(o.type){case 1:let e;function t(o){const t=e.connect(o);self.postMessage({type:2,jobId:r,data:t},[t])}"function"==typeof define&&define.amd?require([workerPath],(r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||new Promise((e=>{require([o.modulePath],e)})))).then(t)})):"System"in self&&"function"==typeof System.import?System.import(workerPath).then((r=>(e=r.default,checkWorkerRevision(e),e.loadWorker(o.modulePath)))).then((e=>e||System.import(o.modulePath))).then(t):esriConfig.workers.useDynamicImport?import(workerPath).then((r=>{e=r.default||r,checkWorkerRevision(e),e.loadWorker(o.modulePath).then((e=>e||import(o.modulePath))).then(t)})):(self.RemoteClient||importScripts(workerPath),e=self.RemoteClient.default||self.RemoteClient,checkWorkerRevision(e),e.loadWorker(o.modulePath).then(t));break;case 3:if(outgoing.has(r)){const e=outgoing.get(r);outgoing.delete(r),o.error?e.reject(JSON.parse(o.error)):e.resolve(o.data)}}}self.dojoConfig=configuration.loaderConfig,esriConfig.workers.loaderUrl&&(self.importScripts(esriConfig.workers.loaderUrl),"function"==typeof require&&"function"==typeof require.config&&require.config(configuration.loaderConfig)),self.addEventListener("message",messageHandler),self.postMessage({type:0});'.replace('"{CONFIGURATION}"',`'${function(){let e;if(null!=d.Z.default){const t={...d.Z};delete t.default,e=JSON.parse(JSON.stringify(t))}else e=JSON.parse(JSON.stringify(d.Z));e.assetsPath=(0,p.hF)(e.assetsPath),e.request.interceptors=[],e.log.interceptors=[],e.locale=(0,b.Kd)(),e.has={"esri-csp-restrictions":(0,s.Z)("esri-csp-restrictions"),"esri-2d-debug":!1,"esri-2d-update-debug":(0,s.Z)("esri-2d-update-debug"),"esri-2d-query-centroid-enabled":(0,s.Z)("esri-2d-query-centroid-enabled"),"featurelayer-pbf":(0,s.Z)("featurelayer-pbf"),"featurelayer-simplify-thresholds":(0,s.Z)("featurelayer-simplify-thresholds"),"featurelayer-simplify-payload-size-factors":(0,s.Z)("featurelayer-simplify-payload-size-factors"),"featurelayer-simplify-mobile-factor":(0,s.Z)("featurelayer-simplify-mobile-factor"),"esri-atomics":(0,s.Z)("esri-atomics"),"esri-shared-array-buffer":(0,s.Z)("esri-shared-array-buffer"),"esri-tiles-debug":(0,s.Z)("esri-tiles-debug"),"esri-workers-arraybuffer-transfer":(0,s.Z)("esri-workers-arraybuffer-transfer"),"feature-polyline-generalization-factor":(0,s.Z)("feature-polyline-generalization-factor"),"host-webworker":1},e.workers.loaderUrl&&(e.workers.loaderUrl=(0,p.hF)(e.workers.loaderUrl)),e.workers.workerPath?e.workers.workerPath=(0,p.hF)(e.workers.workerPath):e.workers.workerPath=(0,p.hF)((0,f.V)("esri/core/workers/RemoteClient.js")),e.workers.useDynamicImport=!1;const t=d.Z.workers.loaderConfig,r=y({baseUrl:t?.baseUrl,locale:(0,b.Kd)(),has:{"csp-restrictions":1,"dojo-test-sniff":0,"host-webworker":1,...t?.has},map:{...t?.map},paths:{...t?.paths},packages:t?.packages||[]}),i={version:l.i8,buildDate:I.r,revision:I.$};return JSON.stringify({esriConfig:e,loaderConfig:r,kernelInfo:i})}()}'`);C=URL.createObjectURL(new Blob([e],{type:"text/javascript"}))}catch(e){S=e||{}}let e;if(C)try{e=new Worker(C,{name:"esri-worker-"+T++})}catch(t){v.warn(R,S),e=new w}else v.warn(R,S),e=new w;return k(e)}();return new B(t,e)}terminate(){this.worker.terminate()}async open(e,t={}){const{signal:r}=t,i=(0,h.jt)();return new Promise(((t,s)=>{const a={resolve:t,reject:s,abortHandle:(0,n.$F)(r,(()=>{this._outJobs.delete(i),this._post({type:P,jobId:i})}))};this._outJobs.set(i,a),this._post({type:E,jobId:i,modulePath:e})}))}_onMessage(e){const t=(0,h.QM)(e);if(t)switch(t.type){case O:this._onOpenedMessage(t);break;case F:this._onResponseMessage(t);break;case P:this._onAbortMessage(t);break;case M:this._onInvokeMessage(t)}}_onAbortMessage(e){const t=this._inJobs,r=e.jobId,i=t.get(r);i&&(i.controller&&i.controller.abort(),t.delete(r))}_onInvokeMessage(e){const{methodName:t,jobId:r,data:i,abortable:s}=e,a=s?new AbortController:null,o=this._inJobs,c=l.Nv[t];let u;try{if("function"!=typeof c)throw new TypeError(`${t} is not a function`);u=c.call(null,i,{signal:a?a.signal:null})}catch(e){return void this._post({type:F,jobId:r,error:(0,h.AB)(e)})}(0,n.y8)(u)?(o.set(r,{controller:a,promise:u}),u.then((e=>{o.has(r)&&(o.delete(r),this._post({type:F,jobId:r},e))}),(e=>{o.has(r)&&(o.delete(r),e||(e={message:"Error encountered at method"+t}),(0,n.D_)(e)||this._post({type:F,jobId:r,error:(0,h.AB)(e||{message:`Error encountered at method ${t}`})}))}))):this._post({type:F,jobId:r},u)}_onOpenedMessage(e){const{jobId:t,data:r}=e,i=this._outJobs.get(t);i&&(this._outJobs.delete(t),(0,u.hw)(i.abortHandle),i.resolve(r))}_onResponseMessage(e){const{jobId:t,error:r,data:s}=e,n=this._outJobs.get(t);n&&(this._outJobs.delete(t),(0,u.hw)(n.abortHandle),r?n.reject(i.Z.fromJSON(JSON.parse(r))):n.resolve(s))}_post(e,t,r){return(0,h.oi)(this.worker,e,t,r)}}let D=(0,s.Z)("esri-workers-debug")?1:(0,s.Z)("host-browser")?navigator.hardwareConcurrency-1:0;D||(D=(0,s.Z)("safari")&&(0,s.Z)("mac")||(0,s.Z)("trident")?7:2);let N=0;const z=[];async function L(e,t){const r=new a.Z;return await r.open(e,t),r}async function Z(e,t={}){if("string"!=typeof e)throw new i.Z("workers:undefined-module","modulePath is missing");let r=t.strategy||"distributed";if((0,s.Z)("host-webworker")&&!(0,s.Z)("esri-workers")&&(r="local"),"local"===r){let r=await o.default.loadWorker(e);r||(r=await import(e)),(0,n.k_)(t.signal);const i=t.client||r;return L([o.default.connect(r)],{...t,client:i})}if(await async function(){if(A)return A;H=new AbortController;const e=[];for(let t=0;t<D;t++){const r=B.create(t).then((e=>(z[t]=e,e)));e.push(r)}return A=Promise.all(e),A}(),(0,n.k_)(t.signal),"dedicated"===r){const r=N++%D;return L([await z[r].open(e,t)],t)}if(t.maxNumWorkers&&t.maxNumWorkers>0){const r=Math.min(t.maxNumWorkers,D);if(r<D){const i=new Array(r);for(let s=0;s<r;++s){const r=N++%D;i[s]=z[r].open(e,t)}return L(i,t)}}return L(z.map((r=>r.open(e,t))),t)}let H,A=null},2587:(e,t,r)=>{r(90344),r(18848),r(940),r(70171);var i=r(94443),s=r(3172),n=r(20102),a=r(70586);async function o(e){if((0,a.pC)(c.fetchBundleAsset))return c.fetchBundleAsset(e);const t=await(0,s.default)(e,{responseType:"text"});return JSON.parse(t.data)}class l{constructor({base:e="",pattern:t,location:r=new URL(window.location.href)}){let i;i="string"==typeof r?e=>new URL(e,new URL(r,window.location.href)).href:r instanceof URL?e=>new URL(e,r).href:r,this.pattern="string"==typeof t?new RegExp(`^${t}`):t,this.getAssetUrl=i,e=e?e.endsWith("/")?e:e+"/":"",this.matcher=new RegExp(`^${e}(?:(.*)/)?(.*)$`)}fetchMessageBundle(e,t){return async function(e,t,r,s){const a=t.exec(r);if(!a)throw new n.Z("esri-intl:invalid-bundle",`Bundle id "${r}" is not compatible with the pattern "${t}"`);const l=a[1]?`${a[1]}/`:"",c=a[2],u=(0,i.Su)(s),h=`${l}${c}.json`,f=u?`${l}${c}_${u}.json`:h;let d;try{d=await o(e(f))}catch(t){if(f===h)throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:t});try{d=await o(e(h))}catch(e){throw new n.Z("intl:unknown-bundle",`Bundle "${r}" cannot be loaded`,{error:e})}}return d}(this.getAssetUrl,this.matcher,e,t)}}const c={};var u,h=r(99880);(0,i.tz)((u={pattern:"esri/",location:h.V},new l(u)))},940:(e,t,r)=>{r.d(t,{n:()=>c});var i=r(92604),s=r(78286),n=r(19153),a=r(90344),o=r(18848);const l=i.Z.getLogger("esri.intl.substitute");function c(e,t,r={}){const{format:i={}}=r;return(0,n.gx)(e,(e=>function(e,t,r){let i,n;const a=e.indexOf(":");if(-1===a?i=e.trim():(i=e.slice(0,a).trim(),n=e.slice(a+1).trim()),!i)return"";const o=(0,s.hS)(i,t);if(null==o)return"";const l=r[n]||r[i];return l?u(o,l):n?h(o,n):f(o)}(e,t,i)))}function u(e,t){switch(t.type){case"date":return(0,a.p6)(e,t.intlOptions);case"number":return(0,o.uf)(e,t.intlOptions);default:return l.warn("missing format descriptor for key {key}"),f(e)}}function h(e,t){switch(t.toLowerCase()){case"dateformat":return(0,a.p6)(e);case"numberformat":return(0,o.uf)(e);default:return l.warn(`inline format is unsupported since 4.12: ${t}`),/^(dateformat|datestring)/i.test(t)?(0,a.p6)(e):/^numberformat/i.test(t)?(0,o.uf)(e):f(e)}}function f(e){switch(typeof e){case"string":return e;case"number":return(0,o.uf)(e);case"boolean":return""+e;default:return e instanceof Date?(0,a.p6)(e):""}}},52294:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Ke});var i=r(43697),s=r(51773),n=r(30030),a=r(20102),o=r(70586),l=r(16453),c=r(95330),u=r(17445),h=r(5600),f=(r(67676),r(80442)),d=r(75215),p=r(36030),m=r(71715),y=r(52011),g=r(87085),x=r(71612),w=r(17017),b=(r(66577),r(3172)),I=r(92604),v=r(44422),_=r(8744),C=r(66677),S=r(21506),R=r(35956),k=r(88281),T=r(11145),P=r(99815),M=r(80676),E=r(67058),O=r(91219),F=r(23808),B=r(6570),D=r(82971);const N=I.Z.getLogger("esri.layers.mixins.ImageryTileMixin"),z=e=>{let t=class extends e{constructor(){super(...arguments),this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this.bandIds=null,this.copyright=null,this.fullExtent=null,this.interpolation="nearest",this.multidimensionalDefinition=null,this.raster=null,this.rasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.tileInfo=null,this.symbolizer=null}set url(e){this._set("url",(0,C.Nm)(e,N))}set renderer(e){this._set("renderer",e),this.updateRenderer()}async convertVectorFieldData(e,t){if((0,o.Wi)(e))return null;const r=this._rasterJobHandler.instance,i=this.rasterInfo.dataType;return r?r.convertVectorFieldData({pixelBlock:e,dataType:i},t):(0,M.KC)(e,i)}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,F.GE)(e.meshType,e.simulationSettings,e.flowData,(0,o.pC)(t.signal)?t.signal:(new AbortController).signal)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.rasterInfo;if((0,o.Wi)(t))return e;let r=e.multidimensionalDefinition||this.multidimensionalDefinition;!(0,o.Wi)(r)&&r.length||(r=(0,P.Tj)(this.raster.rasterInfo));const i=e.timeExtent||this.timeExtent;if((0,o.pC)(r)&&(0,o.pC)(i)&&((0,o.pC)(i.start)||(0,o.pC)(i.end))){r=r.map((e=>e.clone()));const s=t.variables.find((({name:e})=>e===r[0].variableName))?.dimensions?.find((({name:e})=>"StdTime"===e)),n=r.find((({dimensionName:e})=>"StdTime"===e));if(!s||!n)return{...e,multidimensionalDefinition:null};const{start:a,end:l}=i,c=(0,o.Wi)(a)?null:a.getTime(),u=(0,o.Wi)(l)?null:l.getTime(),h=c??u,f=u??c;if((0,o.pC)(s.values)){const e=s.values.filter((e=>{if(Array.isArray(e)){if(h===f)return e[0]<=h&&e[1]>=h;const t=e[0]<=h&&e[1]>h||e[0]<f&&e[1]>=f,r=e[0]>=h&&e[1]<=f||e[0]<h&&e[1]>f;return t||r}return h===f?e===h:e>=h&&e<=f}));if(e.length){const t=e.sort(((e,t)=>h===f?(e[0]??e)-(t[0]??t):Math.abs((e[1]??e)-f)-Math.abs((t[1]??t)-f)))[0];n.values=[t]}else r=null}else if(s.hasRegularIntervals&&s.extent){const[e,t]=s.extent;h>t||f<e?r=null:n.values=h===f?[h]:[Math.max(e,h),Math.min(t,f)]}}return{...e,multidimensionalDefinition:r}}async updateRenderer(){if(!this.loaded)return;if(JSON.stringify(this._cachedRendererJson)===JSON.stringify(this.renderer))return;const e=this._rasterJobHandler.instance;e&&(this.symbolizer.rendererJSON=(0,E.ol)(this.renderer.toJSON()),this.symbolizer.bind(),await e.updateSymbolizer(this.symbolizer),this._cachedRendererJson=this.renderer.toJSON())}async applyRenderer(e,t){const r=e&&e.pixelBlock;if(!((0,o.pC)(r)&&r.pixels&&r.pixels.length>0))return null;let i;await this.updateRenderer();const s=this._rasterJobHandler.instance,{bandIds:n}=this;return i=s?await s.symbolize({...e,simpleStretchParams:t,bandIds:n}):this.symbolizer.symbolize({...e,simpleStretchParams:t,bandIds:n}),i}getTileUrl(e,t,r){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${r}`:""}getCompatibleTileInfo(e,t,r=!1){if(!this.loaded||(0,o.Wi)(t))return null;if(r&&e.equals(this.spatialReference))return this.tileInfo;const i=(0,_.C5)(e);return T.Z.create({size:256,spatialReference:e,origin:i?{x:i.origin[0],y:i.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent&&this._compatibleFullExtent.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,r,i={}){if(i.requestAsImageElement){const s=this.getTileUrl(e,t,r);return(0,b.default)(s,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:i.signal}).then((e=>e.data))}if((0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(i=this.normalizeRasterFetchOptions(i),(0,o.Wi)(i.multidimensionalDefinition))){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo;return{extent:this.raster.getTileExtentFromTileInfo(e,t,r,s),pixelBlock:null}}return await this._initJobHandler(),"raster-shaded-relief"===this.renderer.type&&(i={...i,buffer:{cols:1,rows:1}}),this.raster.fetchTile(e,t,r,i)}async fetchPixels(e,t,r,i={}){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&(i=this.normalizeRasterFetchOptions(i),(0,o.Wi)(i.multidimensionalDefinition))?{extent:e,pixelBlock:null}:(await this._initJobHandler(),this.raster.fetchPixels(e,t,r,i))}async identify(e,t={}){return!(0,o.pC)(this.rasterInfo.multidimensionalInfo)||this.rasterInfo.hasMultidimensionalTranspose&&((0,P.WU)(t.multidimensionalDefinition)||t.transposedVariableName||t.timeExtent)||(t=this.normalizeRasterFetchOptions(t),!(0,o.Wi)(t.multidimensionalDefinition))?this.raster.identify(e,t):{location:e,value:null}}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}hasStandardTime(){const e=this.rasterInfo.multidimensionalInfo;if((0,o.Wi)(e)||"standard-time"!==this.rasterInfo.dataType)return!1;const t=this.multidimensionalDefinition[0]?.variableName;return e.variables.some((e=>e.name===t&&e.dimensions.some((e=>"StdTime"===e.name))))}getStandardTimeValue(e){return new Date(24*(e-25569)*3600*1e3).toString()}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,P.Tj)(this.raster.rasterInfo)),this._configDefaultRenderer()}_initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new k.Z;return this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e,this.raster.rasterJobHandler=e,this.renderer&&this.updateRenderer()})).catch((()=>null)),this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this.raster.rasterJobHandler=null,this._cachedRendererJson=null}_configDefaultInterpolation(){if(null==this.interpolation){const e=(0,E.In)(this.rasterInfo,this.raster.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",e)}}_configDefaultRenderer(){const e=this.raster.rasterInfo;if(this.bandIds||(this.bandIds=(0,E.YD)(e)),!this.renderer){const t=(0,E.Ob)(e,{bandIds:this.bandIds,variableName:(0,o.pC)(this.multidimensionalDefinition)?this.multidimensionalDefinition[0]?.variableName:null});"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===t.type&&(e.statistics?.[0].max>1e24||e.statistics?.[0].min<-1e24)&&(t.dynamicRangeAdjustment=!0,t.statistics=null,"none"===t.stretchType&&(t.stretchType="min-max")),this.renderer=t}this.symbolizer?(this.symbolizer.rendererJSON=(0,E.ol)(this.renderer.toJSON()),this.symbolizer.rasterInfo=e):this.symbolizer=new O.Z({rendererJSON:this.renderer.toJSON(),rasterInfo:e});const t=this.symbolizer.bind();t.success||N.warn("imagery-tile-mixin",t.error||"The given renderer is not supported by the layer.")}};return(0,i._)([(0,h.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"_compatibleFullExtent",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"bandIds",void 0),(0,i._)([(0,h.Cb)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],t.prototype,"copyright",void 0),(0,i._)([(0,h.Cb)({type:B.Z,json:{read:!1}}),(0,v.B)("rasterInfo.extent")],t.prototype,"fullExtent",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"interpolation",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"ioConfig",void 0),(0,i._)([(0,h.Cb)({type:[R.Z]})],t.prototype,"multidimensionalDefinition",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,h.Cb)({readOnly:!0}),(0,v.B)("raster.rasterInfo")],t.prototype,"rasterInfo",void 0),(0,i._)([(0,h.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({type:D.Z,json:{read:!1}}),(0,v.B)("rasterInfo.spatialReference")],t.prototype,"spatialReference",void 0),(0,i._)([(0,h.Cb)({type:T.Z,json:{read:!1}}),(0,v.B)("rasterInfo.storageInfo.tileInfo")],t.prototype,"tileInfo",void 0),(0,i._)([(0,h.Cb)(S.HQ)],t.prototype,"url",null),(0,i._)([(0,h.Cb)({types:n.dr})],t.prototype,"renderer",null),(0,i._)([(0,h.Cb)()],t.prototype,"symbolizer",void 0),t=(0,i._)([(0,y.j)("esri.layers.ImageryTileMixin")],t),t};var L=r(38009),Z=r(16859),H=r(34760),A=r(72965),W=r(28294),J=r(1231),j=r(69608),q=r(48526),G=r(36679),U=r(96674),$=r(609),V=r(73506),Y=r(13473);const K=new Map,X=new class{constructor(e=15e3,t=5e3){this._timer=null,this._cachedBlocks=new Map,this._size=-1,this._duration=e,this._interval=Math.min(e,t)}decreaseRefCount(e,t){const r=e+"/"+t,i=this._cachedBlocks;if(i.has(r)){const e=i.get(r);return e.refCount--,e.refCount<=0&&(i.delete(r),e.controller&&e.controller.abort()),e.refCount}return 0}getBlock(e,t){const r=e+"/"+t,i=this._cachedBlocks;if(i.has(r)){const e=i.get(r);return e.ts=Date.now(),e.refCount++,i.delete(r),i.set(r,e),e.block}return null}putBlock(e,t,r,i=null){const s=this._cachedBlocks,n=e+"/"+t;if(s.has(n)){const e=s.get(n);e.ts=Date.now(),e.refCount++}else s.set(n,{block:r,ts:Date.now(),refCount:1,controller:i});this._trim(),this._updateTimer()}deleteBlock(e,t){const r=this._cachedBlocks,i=e+"/"+t;r.has(i)&&r.delete(i)}updateMaxSize(e){this._size=e,this._trim()}empty(){this._cachedBlocks.clear(),this._clearTimer()}getCurrentSize(){return this._cachedBlocks.size}_updateTimer(){if(null!=this._timer)return;const e=this._cachedBlocks;this._timer=setInterval((()=>{const t=Array.from(e),r=Date.now();for(let i=0;i<t.length&&t[i][1].ts<=r-this._duration;i++)e.delete(t[i][0]);0===e.size&&this._clearTimer()}),this._interval)}_trim(){const e=this._cachedBlocks;if(-1===this._size||this._size>=e.size)return;const t=Array.from(e);for(let r=0;r<t.length-this._size;r++)e.delete(t[r][0])}_clearTimer(){null!=this._timer&&(clearInterval(this._timer),this._timer=null)}};function Q(e,t){return null==t?e:`${e}?sliceId=${t}`}function ee(e,t,r){if(!K.has(e))return null==t?X.getBlock(e,r):null;const i=K.get(e);if(null==i[t]){for(let e=0;e<i.length;e++)if(i[e]&&i[e].cache.has(r)){const t=i[e].cache.get(r);return t.refCount++,t.block}return X.getBlock(e,r)}const s=i[t].cache;if(s.has(r)){const e=s.get(r);return e.refCount++,e.block}for(let e=0;e<i.length;e++)if(e!==t&&i[e]&&i[e]&&i[e].cache.has(r)){const t=i[e].cache.get(r);return t.refCount++,s.set(r,t),t.block}return null}function te(e,t,r,i,s=null){if(!K.has(e))return void(null==t&&X.putBlock(e,r,i,s));const n=K.get(e);if(null==n[t])return void X.putBlock(e,r,i,s);const a={refCount:1,block:i,isResolved:!1,isRejected:!1,controller:s};i.then((()=>a.isResolved=!0)).catch((()=>a.isRejected=!0)),n[t].cache.set(r,a)}var re=r(75993),ie=r(55914);let se=class extends((0,$.v)(U.wq)){constructor(){super(...arguments),this.rasterJobHandler=null,this.datasetName=null,this.datasetFormat=null,this.rasterInfo=null,this.ioConfig={sampling:"closest"}}async init(){const e=(0,V.zD)();this.addResolvingPromise(e),await this.when()}normalizeCtorArgs(e){return e&&e.ioConfig&&(e={...e,ioConfig:{resolution:null,bandIds:null,sampling:"closest",tileInfo:T.Z.create(),...e.ioConfig}}),e}get _isGlobalWrappableSource(){const{rasterInfo:e}=this,t=(0,V.ut)(e.spatialReference);return(0,o.pC)(t)&&e.extent.width>=t/2}set url(e){this._set("url",(0,C.Nm)(e,I.Z.getLogger(this.declaredClass)))}async open(e){throw new a.Z("BaseRaster:open-not-implemented","open() is not implemented")}async fetchTile(e,t,r,i={}){const s=i.tileInfo||this.rasterInfo.storageInfo.tileInfo,n=this.getTileExtentFromTileInfo(e,t,r,s);return this.fetchPixels(n,s.size[0],s.size[1],i)}async identify(e,t={}){const{multidimensionalDefinition:r,timeExtent:i}=t,{hasMultidimensionalTranspose:s,multidimensionalInfo:n}=this.rasterInfo;let{transposedVariableName:a}=t;const l=(0,o.pC)(n)&&s&&(null!=i||(0,P.WU)(r));l&&!a&&(a=(0,o.pC)(r)&&r.length>0?r[0].variableName:n.variables[0].name,t={...t,transposedVariableName:a}),t=this._getRequestOptionsWithSliceId(t);const{spatialReference:c,extent:u}=this.rasterInfo,{datumTransformation:h}=t;let f=(0,V.nF)(e,c,h);if(!u.intersects(f))return{location:f,value:null};if((0,o.pC)(this.rasterInfo.transform)){const e=this.rasterInfo.transform.inverseTransform(f);if(!this.rasterInfo.nativeExtent.intersects(e))return{location:e,value:null};f=e}let d=0;const p=a&&(0,o.pC)(n)&&this.rasterInfo.hasMultidimensionalTranspose;if(!p)if(t.srcResolution)d=(0,V.kr)(t.srcResolution,this.rasterInfo,this.ioConfig.sampling).pyramidLevel;else if(d=await this.computeBestPyramidLevelForLocation(e,t),null==d)return{location:f,value:null};const m=this.identifyPixelLocation(f,d,null,p);if(null===m)return{location:f,value:null};const{row:y,col:g,rowOffset:x,colOffset:w,blockWidth:b}=m,I=a??(0,o.Wg)(t.sliceId),v=Q(this.url,I),_=`${d}/${y}/${g}`;let C=ee(v,null,_);(0,o.Wi)(C)&&(C=this.fetchRawTile(d,y,g,t),te(v,null,_,C));const S=await C;if((0,o.Wi)(S)||!S.pixels?.length)return{location:f,value:null};const R=x*b+w;return this._processIdentifyResult(S,{srcLocation:f,position:R,pyramidLevel:d,useTransposedTile:p,requestSomeSlices:l,identifyOptions:t})}async fetchPixels(e,t,r,i={}){if(e=(0,V.kZ)(e),(i=this._getRequestOptionsWithSliceId(i)).requestRawData)return this._fetchPixels(e,t,r,i);const s=(0,V.ut)(e.spatialReference),n=(0,V.Hq)(e);if((0,o.Wi)(s)||0===n||1===n&&this._isGlobalWrappableSource)return this._fetchPixels(e,t,r,i);if(n>=3)return{extent:e,pixelBlock:null};const a=[],{xmin:l,xmax:c}=e,u=Math.round(s/(c-l)*t),h=u-Math.round((s/2-l)/(c-l)*t);let f=0;const d=[];for(let o=0;o<=n;o++){const p=new B.Z({xmin:0===o?l:-s/2,xmax:o===n?c-s*o:s/2,ymin:e.ymin,ymax:e.ymax,spatialReference:e.spatialReference}),m=0===o?u-h:o===n?t-f:u;f+=m,d.push(m);const y=i.disableWrapAround&&o>0?null:this._fetchPixels(p,m,r,i);a.push(y)}const p=(await Promise.all(a)).map((e=>e?.pixelBlock));let m=null;const y={width:t,height:r};return m=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:p,srcMosaicSize:y,destDimension:null,coefs:null,sampleSpacing:null,interpolation:"nearest",alignmentInfo:null,blockWidths:d},i)).pixelBlock:(0,ie.us)(p,y,{blockWidths:d}),{extent:e,srcExtent:(0,V.tB)(e,this.rasterInfo.spatialReference,i.datumTransformation),pixelBlock:m}}async fetchRawPixels(e,t,r,i={}){t={x:Math.floor(t.x),y:Math.floor(t.y)};const s=await this._fetchRawTiles(e,t,r,i),{nativeExtent:n,nativePixelSize:a,storageInfo:l}=this.rasterInfo,c=2**e,u=a.x*c,h=a.y*c,f=new B.Z({xmin:n.xmin+u*t.x,xmax:n.xmin+u*(t.x+r.width-1),ymin:n.ymax-h*(t.y+r.height-1),ymax:n.ymax-h*t.y,spatialReference:n.spatialReference});if(!s)return{extent:f,srcExtent:f,pixelBlock:null};const{pixelBlocks:d,mosaicSize:p}=s;if(1===d.length&&(0,o.pC)(d[0])&&d[0].width===r.width&&d[0].height===r.height)return{extent:f,srcExtent:f,pixelBlock:s.pixelBlocks[0]};const m=e>0?l.pyramidBlockWidth:l.blockWidth,y=e>0?l.pyramidBlockHeight:l.blockHeight,g={x:t.x%m,y:t.y%y};let x;return x=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:d,srcMosaicSize:p,destDimension:r,clipOffset:g,clipSize:r,coefs:null,sampleSpacing:null,interpolation:i.interpolation,alignmentInfo:null,blockWidths:null},i)).pixelBlock:(0,ie.us)(d,p,{clipOffset:g,clipSize:r}),{extent:f,srcExtent:f,pixelBlock:x}}fetchRawTile(e,t,r,i){throw new a.Z("BaseRaster:read-not-implemented","fetchRawTile() is not implemented")}computeExtent(e){return(0,V.tB)(this.rasterInfo.extent,e)}decodePixelBlock(e,t){return!this.rasterJobHandler||t.useCanvas?(0,re.J)(e,t):this.rasterJobHandler.decode({data:e,options:t})}async request(e,t,r){const{customFetchParameters:i}=this.ioConfig,{range:s,query:n,headers:a}=t;r=r??t.retryCount??this.ioConfig.retryCount;const o=s?{Range:`bytes=${s.from}-${s.to}`}:null;try{return await(0,b.default)(e,{...t,query:{...n,...i},headers:{...a,...o}})}catch(i){if(r>0)return r--,this.request(e,t,r);throw i}}getSliceIndex(e){const{multidimensionalInfo:t}=this.rasterInfo;return(0,o.Wi)(t)||(0,o.Wi)(e)||0===e.length?null:(0,P.gk)(e,t)}getTileExtentFromTileInfo(e,t,r,i){const s=i.lodAt(e);return this.getTileExtent({x:s.resolution,y:s.resolution},t,r,i.origin,i.spatialReference,i.size)}updateTileInfo(){const{storageInfo:e,spatialReference:t,extent:r,pixelSize:i}=this.rasterInfo;if(!e.tileInfo){const s=[],n=e.maximumPyramidLevel||0;let a=Math.max(i.x,i.y),o=1/.0254*96*a;for(let e=0;e<=n;e++)s.push({level:n-e,resolution:a,scale:o}),a*=2,o*=2;const l=new Y.Z({x:r.xmin,y:r.ymax,spatialReference:t});e.tileInfo=new T.Z({origin:l,size:[e.blockWidth,e.blockHeight],spatialReference:t,lods:s}),e.isVirtualTileInfo=!0}}createRemoteDatasetStorageInfo(e,t=512,r=512,i){const{width:s,height:n,nativeExtent:a,pixelSize:o,spatialReference:l}=e,c=new Y.Z({x:a.xmin,y:a.ymax,spatialReference:l});null==i&&(i=Math.max(0,Math.round(Math.log(Math.max(s,n))/Math.LN2-8)));const u=this.computeBlockBoundary(a,512,512,{x:a.xmin,y:a.ymax},[o],i);e.storageInfo=new G.Z({blockWidth:t,blockHeight:r,pyramidBlockWidth:t,pyramidBlockHeight:r,origin:c,firstPyramidLevel:1,maximumPyramidLevel:i,blockBoundary:u})}async computeBestPyramidLevelForLocation(e,t={}){return 0}computeBlockBoundary(e,t,r,i,s,n=0,a=2){if(1===s.length&&n>0){s=[...s];let{x:e,y:t}=s[0];for(let r=0;r<n;r++)e*=a,t*=a,s.push({x:e,y:t})}const o=[],{x:l,y:c}=i;for(let i=0;i<s.length;i++){const{x:n,y:a}=s[i];o.push({minCol:Math.floor((e.xmin-l+.1*n)/t/n),maxCol:Math.floor((e.xmax-l-.1*n)/t/n),minRow:Math.floor((c-e.ymax+.1*a)/r/a),maxRow:Math.floor((c-e.ymin-.1*a)/r/a)})}return o}getPyramidPixelSize(e){const{nativePixelSize:t}=this.rasterInfo,{pyramidResolutions:r,pyramidScalingFactor:i}=this.rasterInfo.storageInfo;if(0===e)return t;if((0,o.pC)(r)&&r.length)return r[e-1];const s=i**e;return{x:t.x*s,y:t.y*s}}identifyPixelLocation(e,t,r,i){const{spatialReference:s,nativeExtent:n,storageInfo:a}=this.rasterInfo,{maximumPyramidLevel:l,origin:c,transposeInfo:u}=a,h=i&&(0,o.pC)(u)?u.tileSize[0]:a.blockWidth,f=i&&(0,o.pC)(u)?u.tileSize[1]:a.blockHeight,d=(0,V.nF)(e,s,r);if(!n.intersects(d))return null;if(t<0||t>l)return null;const p=this.getPyramidPixelSize(t),{x:m,y}=p,g=(c.y-d.y)/y/f,x=(d.x-c.x)/m/h,w=Math.min(f-1,Math.floor((g-Math.floor(g))*f)),b=Math.min(h-1,Math.floor((x-Math.floor(x))*h));return{pyramidLevel:t,row:Math.floor(g),col:Math.floor(x),rowOffset:w,colOffset:b,blockWidth:h,srcLocation:d}}getTileExtent(e,t,r,i,s,n){const[a,o]=n,l=i.x+r*a*e.x,c=l+a*e.x,u=i.y-t*o*e.y,h=u-o*e.y;return new B.Z({xmin:l,xmax:c,ymin:h,ymax:u,spatialReference:s})}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,r){const i=this.rasterInfo.storageInfo.blockBoundary[e];return!i||i.maxRow<t||i.maxCol<r||i.minRow>t||i.minCol>r}async _fetchPixels(e,t,r,i={}){let s=(0,V.Hq)(e);if(s>=2)return{extent:e,pixelBlock:null};const n=this._getSourceDataInfo(e,t,r,i),{pyramidLevel:a,pyramidResolution:l,srcResolution:c,srcExtent:u,srcWidth:h,srcHeight:f}=n;if(0===h||0===f)return{extent:e,srcExtent:u,pixelBlock:null};const d=(0,o.Wg)(this.rasterInfo.transform),p="gcs-shift"===d?.type,m=(0,o.pC)((0,V.ut)(e.spatialReference));!p&&m||(s=(0,V.Hq)(n.srcExtent,p));const y=this.rasterInfo.storageInfo,g={x:Math.floor((u.xmin-y.origin.x)/l.x+.1),y:Math.floor((y.origin.y-u.ymax)/l.y+.1)},x=await this._fetchRawTiles(a,g,{width:h,height:f,wrapCount:s},i);if(!x)return{extent:e,srcExtent:u,pixelBlock:null};const w=a>0?y.pyramidBlockWidth:y.blockWidth,b=a>0?y.pyramidBlockHeight:y.blockHeight,I=w===h&&b===f&&g.x%w==0&&g.y%b==0,v=new Y.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference}),_=!e.spatialReference.equals(this.rasterInfo.spatialReference),{datumTransformation:C}=i;if(!_&&I&&1===x.pixelBlocks.length&&w===t&&b===r&&c.x===v.x&&c.y===v.y)return{extent:e,srcExtent:u,pixelBlock:x.pixelBlocks[0]};const S=m&&(0,o.pC)((0,V.ut)(u.spatialReference)),R=i.requestProjectedLocalDirections&&this.rasterInfo.dataType.startsWith("vector");R&&!this.rasterJobHandler&&await(0,V.zD)();const k=this.rasterJobHandler?await this.rasterJobHandler.getProjectionOffsetGrid({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:v.toJSON(),datumTransformation:C,rasterTransform:d,hasWrapAround:s>0||S,isAdaptive:!1!==this.ioConfig.optimizeProjectionAccuracy,includeGCSGrid:R},i):(0,V.Qp)({projectedExtent:e,srcBufferExtent:x.extent,pixelSize:v,datumTransformation:C,rasterTransform:d,hasWrapAround:s>0||S,isAdaptive:!1,includeGCSGrid:R});let T;const P=!i.requestRawData,E={rows:k.spacing[0],cols:k.spacing[1]},O=(0,o.Wg)(this._getRasterTileAlignmentInfo(a,x.extent.xmin)),{pixelBlocks:F,mosaicSize:B,isPartiallyFilled:D}=x;let N=null;if(this.rasterJobHandler){const e=await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:F,srcMosaicSize:B,destDimension:P?{width:t,height:r}:null,coefs:P?k.coefficients:null,sampleSpacing:P?E:null,projectDirections:R,gcsGrid:R?k.gcsGrid:null,isUV:"vector-uv"===this.rasterInfo.dataType,interpolation:i.interpolation,alignmentInfo:O,blockWidths:null},i);({pixelBlock:T,localNorthDirections:N}=e)}else{const e=(0,ie.us)(F,B,{alignmentInfo:O});T=P?(0,ie.Uk)(e,{width:t,height:r},k.coefficients,E,i.interpolation):e,R&&k.gcsGrid&&(N=(0,ie.Qh)({width:t,height:r},k.gcsGrid),T=(0,M.xQ)(T,this.rasterInfo.dataType,N))}return i.requestRawData||R?{srcExtent:u,pixelBlock:T,transformGrid:k,localNorthDirections:N,extent:e,isPartiallyFilled:D}:{srcExtent:u,extent:e,pixelBlock:T}}async _fetchRawTiles(e,t,r,i){const{origin:s,blockBoundary:n}=this.rasterInfo.storageInfo,{blockWidth:a,blockHeight:l}=this.getBlockWidthHeight(e);let{x:c,y:u}=t,{width:h,height:f,wrapCount:d}=r;const p=this._getRasterTileAlignmentInfo(e,0);i.buffer&&(c-=i.buffer.cols,u-=i.buffer.rows,h+=2*i.buffer.cols,f+=2*i.buffer.rows);let m=0,y=0,g=0;d&&(0,o.pC)(p)&&(({worldColumnCountFromOrigin:y,originColumnOffset:g,rightPadding:m}=p),y*p.blockWidth-m>=c+h&&(m=0));const x=Math.floor(c/a),w=Math.floor(u/l),b=Math.floor((c+h+m-1)/a),I=Math.floor((u+f+m-1)/l),v=n[e];if(!v)return null;const{minRow:_,minCol:C,maxCol:S,maxRow:R}=v;if(0===d&&(I<_||b<C||w>R||x>S))return null;const k=new Array;let T=!1;const P=null==this.ioConfig.allowPartialFill?i.allowPartialFill:this.ioConfig.allowPartialFill;for(let t=w;t<=I;t++)for(let r=x;r<=b;r++){let s=r;if(!i.disableWrapAround&&d&&(0,o.pC)(p)&&y<=r&&(s=r-y-g),t>=_&&s>=C&&R>=t&&S>=s){const r=this._fetchRawTile(e,t,s,i);P?k.push(new Promise((e=>{r.then((t=>e(t))).catch((()=>{T=!0,e(null)}))}))):k.push(r)}else k.push(null)}if(0===k.length)return null;const M=await Promise.all(k),E={height:(I-w+1)*l,width:(b-x+1)*a},{spatialReference:O}=this.rasterInfo,F=this.getPyramidPixelSize(e),{x:D,y:N}=F;return{extent:new B.Z({xmin:s.x+x*a*D,xmax:s.x+(b+1)*a*D,ymin:s.y-(I+1)*l*N,ymax:s.y-w*l*N,spatialReference:O}),pixelBlocks:M,mosaicSize:E,isPartiallyFilled:T}}_fetchRawTile(e,t,r,i){const s=this.rasterInfo.storageInfo.blockBoundary[e];if(!s)return Promise.resolve(null);const{minRow:n,minCol:a,maxCol:l,maxRow:u}=s;if(t<n||r<a||t>u||r>l)return Promise.resolve(null);const h=Q(this.url,i.sliceId),f=`${e}/${t}/${r}`;let d=ee(h,i.registryId,f);if((0,o.Wi)(d)){const s=new AbortController;d=this.fetchRawTile(e,t,r,{...i,signal:s.signal}),te(h,i.registryId,f,d,s),d.catch((()=>function(e,t,r){if(!K.has(e))return void(null==t&&X.deleteBlock(e,r));const i=K.get(e);null!=i[t]?i[t].cache.delete(r):X.deleteBlock(e,r)}(h,i.registryId,f)))}return i.signal&&(0,c.fu)(i,(()=>{!function(e,t,r){if(!K.has(e))return null==t?X.decreaseRefCount(e,r):0;const i=K.get(e);if(null==i[t])return X.decreaseRefCount(e,r);const s=i[t].cache;if(s.has(r)){const e=s.get(r);if(e.refCount--,0===e.refCount){s.delete(r);for(let e=0;e<i.length;e++)i[e]&&i[e].cache.has(r)&&i[e].cache.delete(r);e.controller&&e.controller.abort()}e.refCount}}(h,i.registryId,f)})),d}_computeMagDirValues(e){const{bandCount:t,dataType:r}=this.rasterInfo;if((2!==t||"vector-magdir"!==r)&&"vector-uv"!==r||2!==e?.length||!e[0]?.length)return null;const i=e[0].length;if("vector-magdir"===r){const t=e[1].map((e=>(e+360)%360));return[e[0],t]}const[s,n]=e,a=[],o=[];for(let e=0;e<i;e++){const[t,r]=(0,M.Tg)([s[e],n[e]]);a.push(t),o.push(r)}return[a,o]}_getRasterTileAlignmentInfo(e,t){return null==this._rasterTileAlighmentInfo&&(this._rasterTileAlighmentInfo=(0,V.P_)(this.rasterInfo)),(0,o.Wi)(this._rasterTileAlighmentInfo.pyramidsInfo)?null:{startX:t,halfWorldWidth:this._rasterTileAlighmentInfo.halfWorldWidth,hasGCSSShiftTransform:this._rasterTileAlighmentInfo.hasGCSSShiftTransform,...this._rasterTileAlighmentInfo.pyramidsInfo[e]}}_getSourceDataInfo(e,t,r,i={}){const s={datumTransformation:i.datumTransformation,pyramidLevel:0,pyramidResolution:null,srcExtent:null,srcHeight:0,srcResolution:null,srcWidth:0};i.srcResolution&&(s.srcResolution=i.srcResolution,this._updateSourceDataInfo(e,s));const n=this.rasterInfo.storageInfo.maximumPyramidLevel||0,{srcWidth:a,srcHeight:o,pyramidLevel:l}=s,c=a/t,u=o/r,h=l<n&&c*u>=16;if(h||l===n&&(c>8||u>8)||0===a||0===o){const a=new Y.Z({x:(e.xmax-e.xmin)/t,y:(e.ymax-e.ymin)/r,spatialReference:e.spatialReference});let o=(0,V.VO)(a,this.rasterInfo.spatialReference,e,s.datumTransformation);const f=!o||i.srcResolution&&o.x+o.y<i.srcResolution.x+i.srcResolution.y;if(h&&i.srcResolution&&f){const e=Math.round(Math.log(Math.max(c,u))/Math.LN2)-1;if(n-l+3>=e){const t=2**e;o={x:i.srcResolution.x*t,y:i.srcResolution.y*t}}}o&&(s.srcResolution=o,this._updateSourceDataInfo(e,s))}return(s.srcWidth/t>8||s.srcHeight/r>8)&&(s.srcWidth=0,s.srcHeight=0),s}_updateSourceDataInfo(e,t){t.srcWidth=0,t.srcHeight=0;const r=this.rasterInfo.spatialReference,{srcResolution:i,datumTransformation:s}=t,{pyramidLevel:n,pyramidResolution:a,excessiveReading:l}=(0,V.kr)(i,this.rasterInfo,this.ioConfig.sampling);if(l)return;let c=t.srcExtent||(0,V.tB)(e,r,s);if(null==c)return;const u=(0,o.Wg)(this.rasterInfo.transform);u&&(c=u.inverseTransform(c)),t.srcExtent=c;const h=Math.ceil((c.xmax-c.xmin)/a.x-.1),f=Math.ceil((c.ymax-c.ymin)/a.y-.1);t.pyramidLevel=n,t.pyramidResolution=a,t.srcWidth=h,t.srcHeight=f}_getRequestOptionsWithSliceId(e){return(0,o.pC)(this.rasterInfo.multidimensionalInfo)&&null==e.sliceId&&(e={...e,sliceId:this.getSliceIndex(e.multidimensionalDefinition)}),e}_processIdentifyResult(e,t){const{srcLocation:r,position:i,pyramidLevel:s,useTransposedTile:n}=t,a=e.pixels[0].length/e.width/e.height;if(e.mask&&!e.mask[i])return{location:r,value:null};const{multidimensionalInfo:l}=this.rasterInfo;if((0,o.Wi)(l)||!n){const t=e.pixels.map((e=>e[i])),n={location:r,value:t,pyramidLevel:s},a=this._computeMagDirValues(t.map((e=>[e])));return a?.length&&(n.magdirValue=a.map((e=>e[0]))),n}let c=e.pixels.map((e=>Array.prototype.slice.call(e,i*a,i*a+a))),u=this._computeMagDirValues(c);const{requestSomeSlices:h,identifyOptions:f}=t;let d=(0,P.MO)(l,f.transposedVariableName);if(h){const e=(0,P.Ur)(d,(0,o.Wg)(f.multidimensionalDefinition),(0,o.Wg)(f.timeExtent));c=c.map((t=>e.map((e=>t[e])))),u=u?.map((t=>e.map((e=>t[e])))),d=e.map((e=>d[e]))}return{location:r,value:null,dataSeries:d.map(((e,t)=>{const r={value:c.map((e=>e[t])),multidimensionalDefinition:e.multidimensionalDefinition,variableName:e.multidimensionalDefinition[0].variableName,dimensionValues:{}};return u?.length&&(r.magdirValue=[u[0][t],u[1][t]]),e.multidimensionalDefinition.forEach((e=>r.dimensionValues[e.dimensionName]=e.values[0])),r})),pyramidLevel:s}}};(0,i._)([(0,h.Cb)()],se.prototype,"_rasterTileAlighmentInfo",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],se.prototype,"_isGlobalWrappableSource",null),(0,i._)([(0,h.Cb)(S.HQ)],se.prototype,"url",null),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],se.prototype,"datasetName",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],se.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],se.prototype,"rasterInfo",void 0),(0,i._)([(0,h.Cb)()],se.prototype,"ioConfig",void 0),(0,i._)([(0,h.Cb)()],se.prototype,"sourceJSON",void 0),se=(0,i._)([(0,y.j)("esri.layers.support.rasterDatasets.BaseRaster")],se);const ne=se;var ae=r(20095);function oe(e){const t=e.fields,r=e.records,i=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",s=[{name:i,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=s.map((e=>e.name)),a=[];let o=0,l=0;return r.forEach((e=>{const t={};for(t[i]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:s,features:a}}var le=r(87521),ce=r(74889);const ue=new Map;ue.set("int16","esriFieldTypeSmallInteger"),ue.set("int32","esriFieldTypeInteger"),ue.set("int64","esriFieldTypeInteger"),ue.set("float32","esriFieldTypeSingle"),ue.set("float64","esriFieldTypeDouble"),ue.set("text","esriFieldTypeString");let he=class extends ne{constructor(){super(...arguments),this.storageInfo=null,this.datasetFormat="CRF"}async open(e){await this.init();const{data:t}=await this.request(this.url+"/conf.json",{signal:e?.signal});if(!this._validateHeader(t))throw new a.Z("cloudraster:open","Invalid or unsupported conf.json.");this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{storageInfo:r,rasterInfo:i}=this._parseHeader(t);if("thematic"===i.dataType){const e=await this._fetchAuxiliaryInformation();i.attributeTable=e}this._set("storageInfo",r),this._set("rasterInfo",i),this.ioConfig.retryCount=this.ioConfig.retryCount||0}async fetchRawTile(e,t,r,i={}){const{transposeInfo:s}=this.rasterInfo.storageInfo,{transposedVariableName:n}=i,a=!(!s||!n),o=a?0:this.rasterInfo.storageInfo.maximumPyramidLevel-e;if(o<0)return null;const l=this._buildCacheFilePath(o,t,r,i.multidimensionalDefinition,n),c=this._getIndexRecordFromBundle(t,r,a),u=await this.request(l,{range:{from:0,to:this.storageInfo.headerSize-1},responseType:"array-buffer",signal:i.signal});if(!u)return null;const h=new Uint8Array(u.data),f=this._getTileEndAndContentType(h,c);if(0===f.recordSize)return null;const d=await this.request(l,{range:{from:f.position,to:f.position+f.recordSize},responseType:"array-buffer",signal:i.signal});if(!d)return null;const[p,m]=this._getTileSize(a);return this.decodePixelBlock(d.data,{width:p,height:m,planes:null,pixelType:null,returnPixelInterleavedDims:a})}_validateHeader(e){return e&&"RasterInfo"===e.type&&!["origin","extent","geodataXform","LODInfos","blockWidth","blockHeight","bandCount","pixelType","pixelSizeX","pixelSizeY","format","packetSize"].some((t=>!e[t]))}_parseHeader(e){const t=["u1","u2","u4","u8","s8","u16","s16","u32","s32","f32","f64"][e.pixelType],{bandCount:r,histograms:i,colormap:s,blockWidth:n,blockHeight:a,firstPyramidLevel:o,maximumPyramidLevel:l}=e,c=e.statistics&&e.statistics.map((e=>({min:e.min,max:e.max,avg:e.mean,stddev:e.standardDeviation,median:e.median,mode:e.mode}))),u=e.extent.spatialReference,h=e.geodataXform?.spatialReference,f=new D.Z(u?.wkid||u?.wkt?u:h);let d=new B.Z({xmin:e.extent.xmin,ymin:e.extent.ymin,xmax:e.extent.xmax,ymax:e.extent.ymax,spatialReference:f});const p=new Y.Z({x:e.pixelSizeX,y:e.pixelSizeY,spatialReference:f}),m=Math.round((d.xmax-d.xmin)/p.x),y=Math.round((d.ymax-d.ymin)/p.y),g=this._parseTransform(e.geodataXform),x=g?d:null;g&&(d=g.forwardTransform(d),p.x=(d.xmax-d.xmin)/m,p.y=(d.ymax-d.ymin)/y);const w=e.properties??{},b=e.format.toLowerCase().replace("cache/",""),I=new Y.Z(e.origin.x,e.origin.y,f);let v,_,C,S;if(s&&s.colors)for(v=[],_=0;_<s.colors.length;_++)C=s.colors[_],S=s.values?s.values[_]:_,v.push([S,255&C,C<<16>>>24,C<<8>>>24,C>>>24]);const R=e.LODInfos,k=[];for(_=0;_<R.levels.length;_++)k.push({level:R.levels[_],resolution:R.resolutions[_],scale:96/.0254*R.resolutions[_]});const P=new T.Z({dpi:96,lods:k,format:b,origin:I,size:[n,a],spatialReference:f}),M={recordSize:8,packetSize:e.packetSize,headerSize:e.packetSize*e.packetSize*8+64},E=[{maxCol:Math.ceil(m/n)-1,maxRow:Math.ceil(y/a)-1,minCol:0,minRow:0}];let O=2;if(l>0)for(_=0;_<l;_++)E.push({maxCol:Math.ceil(m/O/n)-1,maxRow:Math.ceil(y/O/a)-1,minCol:0,minRow:0}),O*=2;const F=e.mdInfo;let N=null;if(F&&w._yxs){const e=w._yxs;N={packetSize:e.PacketSize,tileSize:[e.TileXSize,e.TileYSize]}}return{storageInfo:M,rasterInfo:new q.Z({width:m,height:y,pixelType:t,bandCount:r,extent:d,nativeExtent:x,transform:g,spatialReference:f,pixelSize:p,keyProperties:w,statistics:c,histograms:i,multidimensionalInfo:F,colormap:v,storageInfo:new G.Z({blockWidth:n,blockHeight:a,pyramidBlockWidth:n,pyramidBlockHeight:a,origin:I,tileInfo:P,transposeInfo:N,firstPyramidLevel:o,maximumPyramidLevel:l,blockBoundary:E})})}}_parseTransform(e){if(!(0,le.j)(e))throw new a.Z("cloudraster:open","the data contains unsupported geodata transform types");const t=(0,le.c)(e);if("identity"===t.type)return null;if("polynomial"!==t.type||!t.forwardCoefficients?.length||!t.inverseCoefficients?.length)throw new a.Z("cloudraster:open","the data contains unsupported geodata transforms - both forward and inverse coefficients are required currently");return t}async _fetchAuxiliaryInformation(e){const t=this.request(this.url+"/conf.vat.json",{signal:e}).then((e=>e.data)).catch((()=>null)),r=this.request(this.url+"/conf.vat.dbf",{responseType:"array-buffer",signal:e}).then((e=>e.data)).catch((()=>null)),i=await Promise.all([t,r]);let s;if(i[0]){let e=i[0].fields;const t=i[0].values;if(e&&t){e=e.map((e=>({type:"OID"===e.name?"esriFieldTypeOID":ue.get(e.type),name:e.name,alias:e.alias||e.name})));const r=t.map((e=>({attributes:e})));e&&t&&(s={fields:e,features:r})}}return!s&&i[1]&&(s=class{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),r=3&t.getUint8(0);if(3!==r)return{header:{version:r},recordSet:null};const i=t.getUint32(4,!0),s=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:r,recordCount:i,headerByteCount:s,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===r){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,ae.f)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<i&&e.byteLength-o>n;){const r=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)r.push((0,ae.f)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)r.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)r.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const i=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();r.push(new Date(parseInt(i.substring(0,4),10),parseInt(i.substring(4,6),10)-1,parseInt(i.substring(6,8),10)))}o+=t.length})),c.push(r)):o+=n}}return{header:a,fields:l,records:c,recordSet:oe({fields:l,records:c})}}}.parse(i[1]).recordSet),ce.default.fromJSON(s)}_buildCacheFilePath(e,t,r,i,s){const n=this._getPackageSize(!!s),a=Math.floor(t/n)*n,l=Math.floor(r/n)*n,c="R"+this._toHexString4(a)+"C"+this._toHexString4(l);let u="L";u+=e>=10?e.toString():"0"+e.toString();const{multidimensionalInfo:h}=this.rasterInfo,f=i?.[0];if((0,o.Wi)(h)||!f)return`${this.url}/_alllayers/${u}/${c}.bundle`;let d="_yxs";if(!s){d=h.variables.find((e=>e.name===f.variableName)).dimensions[0].values.indexOf(f.values[0]).toString(16);const e=4-d.length;for(let t=0;t<e;t++)d="0"+d;d="S"+d}const p=this._getVariableFolderName(s||f.variableName);return`${this.url}/_alllayers/${p}/${d}/${u}/${c}.bundle`}_getPackageSize(e=!1){const{transposeInfo:t}=this.rasterInfo.storageInfo;return e&&(0,o.pC)(t)?t.packetSize:this.storageInfo.packetSize}_getTileSize(e=!1){const{storageInfo:t}=this.rasterInfo,{transposeInfo:r}=t;return e&&(0,o.pC)(r)?r.tileSize:t.tileInfo.size}_getVariableFolderName(e){return""===(e=e.trim())?"_v":e.replace(/[\{|\}\-]/g,"_").replace("\\*","_v")}_getIndexRecordFromBundle(e,t,r=!1){const i=this._getPackageSize(r),s=i*(e%i)+t%i;if(s<0)throw"Invalid level / row / col";return 20+s*this.storageInfo.recordSize+44}_getTileEndAndContentType(e,t){const r=e.subarray(t,t+8);let i,s=0;for(i=0;i<5;i++)s|=(255&r[i])<<8*i;const n=0xffffffffff&s;for(s=0,i=5;i<8;i++)s|=(255&r[i])<<8*(i-5);return{position:n,recordSize:0xffffffffff&s}}_toHexString4(e){let t=e.toString(16);if(4!==t.length){let e=4-t.length;for(;e-- >0;)t="0"+t}return t}};(0,i._)([(0,h.Cb)({readOnly:!0})],he.prototype,"storageInfo",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],he.prototype,"datasetFormat",void 0),he=(0,i._)([(0,y.j)("esri.layers.support.rasterDatasets.CloudRaster")],he);const fe=he;var de=r(15612);let pe=class extends ne{constructor(){super(...arguments),this.datasetFormat="MEMORY"}async open(e){await this.init();const{pixelBlock:t,statistics:r,histograms:i,name:s,keyProperties:n,nativeExtent:a,transform:o}=this.data,{width:l,height:c,pixelType:u}=t,h=this.data.extent||new B.Z({xmin:-.5,ymin:.5,xmax:l-.5,ymax:c-.5,spatialReference:new D.Z({wkid:3857})}),f=this.data.isPseudoSpatialReference??!this.data.extent,d={x:h.width/l,y:h.height/c},p=new q.Z({width:l,height:c,pixelType:u,extent:h,nativeExtent:a,transform:o,pixelSize:d,spatialReference:h.spatialReference,bandCount:3,keyProperties:n||{},statistics:r,isPseudoSpatialReference:f,histograms:i});this.createRemoteDatasetStorageInfo(p,512,512),this._set("rasterInfo",p),this.updateTileInfo(),await this._buildInMemoryRaster(t,{width:512,height:512},e),this.datasetName=s,this.url="/InMemory/"+s}fetchRawTile(e,t,r,i={}){const s=this._pixelBlockTiles.get(`${e}/${t}/${r}`);return Promise.resolve(s)}async _buildInMemoryRaster(e,t,r){const i=this.rasterInfo.storageInfo.maximumPyramidLevel,s=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:i},r):Promise.resolve((0,ie.Vl)(e,t,i)),n=(0,o.pC)(this.rasterInfo.statistics),l=(0,o.pC)(this.rasterInfo.histograms),u=n?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},r):Promise.resolve((0,de.Hv)(e)),h=await(0,c.as)([s,u]);if(!h[0].value&&h[1].value)throw new a.Z("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,n||(this.rasterInfo.statistics=h[1].value?.statistics),l||(this.rasterInfo.histograms=h[1].value?.histograms)}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],pe.prototype,"data",void 0),pe=(0,i._)([(0,y.j)("esri.layers.support.rasterDatasets.InMemoryRaster")],pe);const me=pe;function ye(e,t){if(!e||!t)return[];let r=t;t.includes("/")?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const i=[];if(t){const s=ye(e,r);for(let e=0;e<s.length;e++)ye(s[e],t).forEach((e=>i.push(e)));return i}const s=e.getElementsByTagNameNS("*",r);if(!s||0===s.length)return[];for(let e=0;e<s.length;e++)i.push(s[e]||s.item[e]);return i}function ge(e,t){if(!e||!t)return null;let r=t;t.includes("/")?(r=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const i=ye(e,r);return i.length>0?t?ge(i[0],t):i[0]:null}function xe(e,t=null){const r=t?ge(e,t):e;let i;return r?(i=r.textContent||r.nodeValue,i?i.trim():null):null}function we(e,t){return function(e,t){const r=ye(e,t),i=[];let s;for(let e=0;e<r.length;e++)s=r[e].textContent||r[e].nodeValue,s&&(s=s.trim(),""!==s&&i.push(s));return i}(e,t).map((e=>Number(e)))}function be(e,t){const r=xe(e,t);return Number(r)}function Ie(e,t){const r=e?.nodeName?.toLowerCase(),i=t.toLowerCase();return r.slice(r.lastIndexOf(":")+1)===i}var ve=r(87390);function _e(e,t){if(!e||!t)return null;const r=[];for(let i=0;i<e.length;i++)r.push(e[i]),r.push(t[i]);return r}function Ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new D.Z({wkid:t});if((e=String(e)).startsWith("COMPD_CS")){if(!e.includes("VERTCS")||!e.includes("GEOGCS")&&!e.startsWith("PROJCS"))return null;const r=e.indexOf("VERTCS"),i=e.indexOf("PROJCS"),s=i>-1?i:e.indexOf("GEOGCS");if(-1===s)return null;const n=e.slice(s,e.lastIndexOf("]",r)+1).trim(),a=e.slice(r,e.lastIndexOf("]")).trim();t=Se(n);const o=new D.Z(t?{wkid:t}:{wkt:n}),l=Se(a);return l&&(o.vcsWkid=l),o}return e.startsWith("GEOGCS")||e.startsWith("PROJCS")?(t=Se(e),new D.Z(0!==t?{wkid:t}:{wkt:e})):null}function Se(e){const t=e.replace(/\]/g,"[").replace(/\"/g,"").split("[").map((e=>e.trim())).filter((e=>""!==e)),r=t[t.length-1].split(","),i=r[0]?.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(r[1]);if(!isNaN(e)&&0!==e)return e}return 0}function Re(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if(Ie(e,"SRS")){if(!t.spatialReference){const r=xe(e);t.spatialReference=Ce(r)}}else if(Ie(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:r,transform:i}=function(e){const t=ge(e,"GeodataXform"),r=Ce(be(t,"SpatialReference/WKID")||xe(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:r,transform:null};const i=be(t,"PolynomialOrder")??1,s=we(t,"CoeffX/Double"),n=we(t,"CoeffY/Double"),a=we(t,"InverseCoeffX/Double"),o=we(t,"InverseCoeffY/Double"),l=_e(s,n),c=_e(a,o);return{spatialReference:r,transform:new ve.Z({spatialReference:r,polynomialOrder:i,forwardCoefficients:l,inverseCoefficients:c})}}(e);t.transform=i,t.spatialReference||(t.spatialReference=r)}else ye(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=xe(e)));else if(Ie(e,"PAMRasterBand")){const r=function(e){const t=be(e,"NoDataValue"),r=ge(e,"Histograms/HistItem"),i=be(r,"HistMin"),s=be(r,"HistMax"),n=be(r,"BucketCount"),a=xe(r,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;ye(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=be(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=o&&null!=l?{min:i,max:s,size:n||a.length,counts:a}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=r.sourceBandIndex&&null==t.rasterBands[r.sourceBandIndex]?t.rasterBands[r.sourceBandIndex]=r:t.rasterBands.push(r)}}));const r=t.rasterBands;if(r){const e=!!r[0].statistics;t.statistics=e?r.map((e=>e.statistics)):null;const i=!!r[0].histogram;t.histograms=i?r.map((e=>e.histogram)):null}return t}let ke=class extends ne{async open(e){await this.init();const t=await this._fetchData(e);let{spatialReference:r,statistics:i,histograms:s,transform:n}=await this._fetchAuxiliaryData(e);const a=!r;a&&(r=new D.Z({wkid:3857})),s?.length&&null==i&&(i=(0,de.Oh)(s));const{width:o,height:l}=t;let c=new B.Z({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:r});const u=n?n.forwardTransform(c):c;let h=!0;if(n){const e=n.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(n=null,c=u)}const f=new me({data:{extent:u,nativeExtent:c,transform:n,pixelBlock:t,statistics:i,histograms:s,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a}});await f.open(),f.data=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}fetchRawTile(e,t,r,i={}){return this._inMemoryRaster.fetchRawTile(e,t,r,i)}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),r=(0,re.y)(t).toUpperCase();if("JPG"!==r&&"PNG"!==r&&"GIF"!==r&&"BMP"!==r)throw new a.Z("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",r);const i=r.toLowerCase(),s="gif"===i||"bmp"===i||!(0,f.Z)("ios");return await this.decodePixelBlock(t,{format:i,useCanvas:s,hasNoZlibMask:!0})}async _fetchAuxiliaryData(e){const t=(0,o.Wg)(e?.signal),r=this.ioConfig.skipExtensions??[],i=r.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),s=this.datasetFormat,n="JPG"===s?"jgw":"PNG"===s?"pgw":"BMP"===s?"bpw":null,a=r.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.as)([i,a]);if(t?.aborted)throw(0,c.zE)();const u=Re(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new ve.Z({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],ke.prototype,"datasetFormat",void 0),ke=(0,i._)([(0,y.j)("esri.layers.support.rasterDatasets.ImageAuxRaster")],ke);const Te=ke;var Pe=r(17452),Me=r(45322),Ee=r(56608),Oe=r(29680),Fe=r(26059);let Be=class extends ne{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer"}async open(e){await this.init();const t=e&&e.signal,r=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});r.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const i=r.data;if(this.sourceJSON=i,!i)throw new a.Z("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!i.tileInfo)throw new a.Z("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=i.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(i.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===i.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=i.name.slice(i.name.indexOf("/")+1);const s=await this._fetchRasterInfo({signal:t});if(!(0,o.pC)(s))throw new a.Z("image-server-raster:open","cannot initialize image service");{const e="Map"===this.tileType?(0,Me.d)(i.tileInfo,i):T.Z.fromJSON(i.tileInfo),{extent:t,pixelSize:r}=s,n=.5/s.width*r.x;let a,o;const l=e.lodAt(Math.max.apply(null,e.lods.map((e=>e.level))));"Map"!==this.tileType&&0!==i.maxScale&&("Raster"===this.tileType?(a=e.lods.find((e=>e.resolution===r.x)),a||(a=e.lods[e.lods.length-1])):(a=e.lods.find((e=>Math.abs(e.scale-i.maxScale)<n)),a||(a=e.lods.filter((e=>e.scale>i.maxScale)).sort(((e,t)=>e.scale>t.scale?1:-1))[0])),r.x=r.y=a.resolution,s.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),s.height=Math.ceil((t.ymax-t.ymin)/r.y-.1)),a||(a=l);const c=e.lodAt(Math.min.apply(null,e.lods.map((e=>e.level))));"Map"===this.tileType?this._levelOffset=e.lods[0].level:0!==i.minScale&&"Elevation"===this.tileType&&(o=e.lods.find((e=>Math.abs(e.scale-i.minScale)<n)),this._levelOffset=o.level-c.level),o||(o=c);const u=Math.max(r.x,r.y);(Math.abs(r.x-r.y)>n||!e.lods.some((e=>Math.abs(e.resolution-u)<n)))&&(r.x=r.y=a.resolution,s.width=Math.ceil((t.xmax-t.xmin)/r.x-.1),s.height=Math.ceil((t.ymax-t.ymin)/r.y-.1));const h=a.level-o.level,[f,d]=e.size,p=[];e.lods.forEach((e=>{e.level>=o.level&&e.level<=a.level&&p.push({x:e.resolution,y:e.resolution})})),p.sort(((e,t)=>e.x-t.x));const m=this.computeBlockBoundary(t,f,d,e.origin,p,h),y=p.length>1?p.slice(1):null;let g;i.transposeInfo&&(g={tileSize:[i.transposeInfo.rows,i.transposeInfo.cols],packetSize:s.keyProperties?._yxs.PacketSize??0}),s.storageInfo=new G.Z({blockWidth:e.size[0],blockHeight:e.size[1],pyramidBlockWidth:e.size[0],pyramidBlockHeight:e.size[1],pyramidResolutions:y,compression:e.format,origin:e.origin,firstPyramidLevel:1,maximumPyramidLevel:h,tileInfo:e,transposeInfo:g,blockBoundary:m}),this._fixGCSShift(s),this._set("rasterInfo",s)}if(i.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:s.storageInfo.tileInfo,parsedUrl:(0,Pe.mN)(this.url),url:this.url,tileServers:[],type:"tile"};this._tilemapCache=new Ee.y({layer:e})}}async fetchRawTile(e,t,r,i={}){const{storageInfo:s,extent:n}=this.rasterInfo,{transposeInfo:a}=s,l=(0,o.pC)(a)&&!!i.transposedVariableName;if(this._slices&&!l&&null==i.sliceId)return null;const c=l?0:s.maximumPyramidLevel-e+this._levelOffset,u=`${this.url}/tile/${c}/${t}/${r}`,h=this._slices?l?{variable:i.transposedVariableName}:{sliceId:i.sliceId||0}:null,{data:f}=await this.request(u,{query:h,responseType:"array-buffer",signal:i.signal});if(!f)return null;const d=l?a.tileSize:s.tileInfo.size,p=await this.decodePixelBlock(f,{width:d[0],height:d[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnPixelInterleavedDims:l}),m=s.blockBoundary[e];if("jpg"!==s.compression||r>m.minCol&&r<m.maxCol&&t>m.minRow&&t<m.maxRow)return p;const{origin:y,blockWidth:g,blockHeight:x}=s,{x:w,y:b}=this.getPyramidPixelSize(e),I=Math.round((n.xmin-y.x)/w)%g,v=Math.round((n.xmax-y.x)/w)%g||g,_=Math.round((y.y-n.ymax)/b)%x,C=Math.round((y.y-n.ymin)/b)%x||x,S=r===m.minCol?I:0,R=t===m.minRow?_:0,k=r===m.maxCol?v:g,T=t===m.maxRow?C:x;return(0,ie.pW)(p,{x:S,y:R},{width:k-S,height:T-R}),p}getSliceIndex(e){if(!this._slices||(0,o.Wi)(e)||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const r=this._slices[e].multidimensionalDefinition;if(r.length===t.length&&!r.some((e=>{const r=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!r||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(r.values[0])?`${r.values[0][0]}-${r.values[0][1]}`:r.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const r=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),i=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,i]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let r=this.identifyPixelLocation(e,0,(0,o.Wg)(t.datumTransformation));if(null===r)return null;let i=0;const{maximumPyramidLevel:s}=this.rasterInfo.storageInfo;let n=s-i+this._levelOffset;const a=r.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,r.row,r.col,t))break}catch{}if(n--,i++,r=this.identifyPixelLocation(a,i,(0,o.Wg)(t.datumTransformation)),null===r)return null}return-1===n||null==r?null:i}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=Math.ceil((t.extent.xmax-t.extent.xmin)/t.pixelSizeX-.1),r=Math.ceil((t.extent.ymax-t.extent.ymin)/t.pixelSizeY-.1),i=D.Z.fromJSON(t.spatialReference||t.extent.spatialReference),s=new Y.Z({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:i});return new q.Z({width:e,height:r,bandCount:3,extent:B.Z.fromJSON(t.extent),spatialReference:i,pixelSize:s,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:r}=e,i=(0,Fe.g)(this.url,this.sourceJSON,{signal:r,query:this.ioConfig.customFetchParameters}),s=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:r}).then((e=>e.data&&e.data.slices)).catch((()=>null)):null,n=await Promise.all([i,s]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_fixGCSShift(e){const{extent:t,spatialReference:r}=e;0===t.xmin&&360===t.xmax&&r.wkid&&r.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Oe.Z,e.extent=e.transform.forwardTransform(t))}};(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Be.prototype,"datasetFormat",void 0),(0,i._)([(0,h.Cb)()],Be.prototype,"tileType",void 0),Be=(0,i._)([(0,y.j)("esri.layers.support.rasterDatasets.ImageServerRaster")],Be);const De=Be;var Ne=r(54163),ze=r(48279);const Le=new Map;Le.set("Int8","s8"),Le.set("UInt8","u8"),Le.set("Int16","s16"),Le.set("UInt16","u16"),Le.set("Int32","s32"),Le.set("UInt32","u32"),Le.set("Float32","f32"),Le.set("Float64","f32"),Le.set("Double64","f32");const Ze=new Map;Ze.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Ze.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Ze.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Ze.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let He=class extends ne{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async open(e){await this.init(),this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?(0,o.Wg)(e.signal):null,r=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:i,files:s}=this._parseHeader(r.data);if(-1===this.ioConfig.skipExtensions?.indexOf("aux.xml")){const t=await this._fetchAuxiliaryData(e);null!=t&&(i.statistics=t.statistics??i.statistics,i.histograms=t.histograms,t.histograms&&(0,o.Wi)(i.statistics)&&(i.statistics=(0,de.Oh)(t.histograms)))}this._set("rasterInfo",i),this._files=s;const n=await this.request(s.index,{responseType:"array-buffer",signal:t});this._storageIndex=this._parseIndex(n.data);const{blockWidth:a,blockHeight:l}=this.rasterInfo.storageInfo,c=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:u,height:h}=this.rasterInfo,f=[],d=this._getBandSegmentCount();let p=0,m=-1;for(;p<this._storageIndex.length;){m++;const e=Math.ceil(u/a/c**m)-1,t=Math.ceil(h/l/c**m)-1;p+=(e+1)*(t+1)*d*4,f.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=f,m>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=m),this.updateTileInfo()}async fetchRawTile(e,t,r,i={}){const{blockWidth:s,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,l=a[e];if(!l||l.maxRow<t||l.maxCol<r||l.minRow>t||l.minCol>r)return null;const{bandCount:c,pixelType:u}=this.rasterInfo,{ranges:h,actualTileWidth:f,actualTileHeight:d}=this._getTileLocation(e,t,r);if(!h||0===h.length)return null;if(0===h[0].from&&0===h[0].to){const e=new Uint8Array(s*n);return new Ne.Z({width:s,height:n,pixels:null,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,m=this._getBandSegmentCount(),y=[];let g=0;for(g=0;g<m;g++)(!p||p.indexOf[g]>-1)&&y.push(this.request(this._files.data,{range:{from:h[g].from,to:h[g].to},responseType:"array-buffer",signal:i.signal}));const x=await Promise.all(y),w=x.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),b=new Uint8Array(w);let I=0;for(g=0;g<m;g++)b.set(new Uint8Array(x[g].data),I),I+=x[g].data.byteLength;const v=Ze.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(b.buffer,{width:s,height:n,format:v,planes:p?.length||c,pixelType:u});if((0,o.pC)(this.rasterInfo.noDataValue)&&"lerc"!==v&&!_.mask){const e=this.rasterInfo.noDataValue[0];if(null!=e){const t=_.width*_.height,r=new Uint8Array(t);if(Math.abs(e)>1e24)for(g=0;g<t;g++)Math.abs((_.pixels[0][g]-e)/e)>1e-6&&(r[g]=1);else for(g=0;g<t;g++)_.pixels[0][g]!==e&&(r[g]=1);_.mask=r}}let C=0,S=0;if(f!==s||d!==n){let e=_.mask;if(e)for(g=0;g<n;g++)if(S=g*s,g<d)for(C=f;C<s;C++)e[S+C]=0;else for(C=0;C<s;C++)e[S+C]=0;else for(e=new Uint8Array(s*n),_.mask=e,g=0;g<d;g++)for(S=g*s,C=0;C<f;C++)e[S+C]=1}return _}_parseIndex(e){if(e.byteLength%16>0)throw"invalid array buffer must be multiples of 16";let t,r,i,s,n,a;if(ze.f){for(r=new Uint8Array(e),s=new ArrayBuffer(e.byteLength),i=new Uint8Array(s),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)i[4*n+a]=r[4*n+3-a];t=new Uint32Array(s)}else t=new Uint32Array(e);return t}_getBandSegmentCount(){return Ze.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,r){const{blockWidth:i,blockHeight:s,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,d=0;for(h=0;h<e;h++)d=n**h,c=Math.ceil(a/i/d),u=Math.ceil(o/s/d),f+=c*u;d=n**e,c=Math.ceil(a/i/d),u=Math.ceil(o/s/d),f+=t*c+r,f*=4*l;const p=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=p[4*e+0]*2**32+p[4*e+1],y=m+p[4*e+2]*2**32+p[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:r<c-1?i:Math.ceil(a/d)-i*(c-1),actualTileHeight:t<u-1?s:Math.ceil(o/d)-s*(u-1)}}_parseHeader(e){const t=ge(e,"MRF_META/Raster");if(!t)throw new a.Z("mrf:open","not a valid MRF format");const r=ge(t,"Size"),i=parseInt(r.getAttribute("x"),10),s=parseInt(r.getAttribute("y"),10),n=parseInt(r.getAttribute("c"),10),o=(xe(t,"Compression")||"none").toLowerCase();if(!Ze.has(o))throw new a.Z("mrf:open","currently does not support compression "+o);const l=xe(t,"DataType")||"UInt8",c=Le.get(l);if(null==c)throw new a.Z("mrf:open","currently does not support pixel type "+l);const u=ge(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),d=ge(t,"DataValues");let p,m;if(d&&(m=d.getAttribute("NoData"),null!=m&&(p=m.trim().split(" ").map((e=>parseFloat(e))))),ge(e,"MRF_META/CachedSource"))throw new a.Z("mrf:open","currently does not support MRF referencing other data files");const y=ge(e,"MRF_META/GeoTags"),g=ge(y,"BoundingBox");let x,w=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),r=parseFloat(g.getAttribute("maxx")),i=parseFloat(g.getAttribute("maxy")),s=xe(y,"Projection")||"";let n;if("LOCAL_CS[]"!==s)if(s.toLowerCase().startsWith("epsg:")){const e=Number(s.slice(5));isNaN(e)||0===e||(n=new D.Z({wkid:e}))}else n=Ce(s);else w=!0,n=new D.Z({wkid:3857});x=new B.Z(e,t,r,i),x.spatialReference=n}else w=!0,x=new B.Z({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:new D.Z({wkid:3857})});const b=ge(e,"MRF_META/Rsets"),I=parseInt(b&&b.getAttribute("scale")||"2",10),v=x.spatialReference,_=new G.Z({origin:new Y.Z({x:x.xmin,y:x.ymax,spatialReference:v}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:o,pyramidScalingFactor:I}),C=new Y.Z({x:x.width/i,y:x.height/s,spatialReference:v}),S=new q.Z({width:i,height:s,extent:x,isPseudoSpatialReference:w,spatialReference:v,bandCount:n,pixelType:c,pixelSize:C,noDataValue:p,storageInfo:_}),R=xe(e,"datafile"),k=xe(e,"IndexFile");return{rasterInfo:S,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:R||this.url.replace(".mrf",Ze.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Re(t)}catch{return null}}};(0,i._)([(0,h.Cb)()],He.prototype,"_files",void 0),(0,i._)([(0,h.Cb)()],He.prototype,"_storageIndex",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],He.prototype,"datasetFormat",void 0),He=(0,i._)([(0,y.j)("esri.layers.support.rasterIO.MRFRaster")],He);const Ae=He;var We=r(94793),Je=r(9832);const je=(e,t)=>{const r=e.get(t);return r&&r.values},qe=(e,t)=>{const r=e.get(t);return r&&r.values[0]};let Ge=class extends ne{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async open(e){await this.init();const t=e?(0,o.Wg)(e.signal):null,{data:r}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!r)throw new a.Z("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const{littleEndian:i,firstIFD:s,isBigTiff:n}=(0,We.cK)(r),l=[];await this._readIFDs(l,r,i,s,0,n?8:4,t);const c=(0,We.FI)(l),{width:u,height:h,tileWidth:f,tileHeight:d,planes:p,pixelType:m,compression:y,firstPyramidLevel:g,maximumPyramidLevel:x,pyramidBlockWidth:w,pyramidBlockHeight:b,tileBoundary:I,affine:v,metadata:_}=c;let C=Ce(c.extent.spatialReference?.wkt||c.extent.spatialReference?.wkid),S=!1;null==C&&(S=!0,C=new D.Z({wkid:3857}));const R=new B.Z({...c.extent,spatialReference:C}),k=new Y.Z(R?{x:R.xmin,y:R.ymax,spatialReference:C}:{x:0,y:0}),T=new G.Z({blockWidth:f,blockHeight:d,pyramidBlockWidth:w,pyramidBlockHeight:b,compression:y,origin:k,firstPyramidLevel:g,maximumPyramidLevel:x,blockBoundary:I}),P=new Y.Z({x:(R.xmax-R.xmin)/u,y:(R.ymax-R.ymin)/h,spatialReference:C}),M=_?{BandProperties:_.bandProperties,DataType:_.dataType}:{},E=new q.Z({width:u,height:h,bandCount:p,pixelType:m,compression:y,pixelSize:P,storageInfo:T,spatialReference:C,isPseudoSpatialReference:S,keyProperties:M,extent:R,statistics:_?_.statistics:null});if(v?.length&&(E.nativeExtent=new B.Z({xmin:-.5,ymin:.5-h,xmax:u-.5,ymax:.5,spatialReference:C}),E.transform=new ve.Z({polynomialOrder:1,forwardCoefficients:[v[2]+v[0]/2,v[5]-v[3]/2,v[0],v[3],-v[1],-v[4]]}),E.extent=E.transform.forwardTransform(E.nativeExtent),E.pixelSize=new Y.Z({x:(R.xmax-R.xmin)/u,y:(R.ymax-R.ymin)/h,spatialReference:C}),T.origin.x=-.5,T.origin.y=.5),!this.ioConfig.skipExtensions?.includes("aux.xml")){const t=await this._fetchAuxiliaryData(e);if(null!=t){if(E.statistics=t.statistics??E.statistics,E.histograms=t.histograms,t.histograms&&(0,o.Wi)(E.statistics)&&(E.statistics=(0,de.Oh)(t.histograms)),t.transform&&!v){E.transform=t.transform,E.nativeExtent=E.extent;const e=E.transform.forwardTransform(E.nativeExtent);E.pixelSize=new Y.Z({x:(e.xmax-e.xmin)/u,y:(e.ymax-e.ymin)/h,spatialReference:C}),E.extent=e}E.spatialReference||(E.spatialReference=t.spatialReference)}}if(this._set("rasterInfo",E),this._headerInfo={littleEndian:i,isBigTiff:n,ifds:l,...c},!this._headerInfo.isSupported)throw new a.Z("tiffraster:open","this tiff is not supported: "+this._headerInfo.message);this.updateTileInfo()}async fetchRawTile(e,t,r,i={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,r))return null;const s=this._getTileLocation(e,t,r);if(!s)return null;const{ranges:n,actualTileWidth:a,actualTileHeight:o,ifd:l}=s,c=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:i.signal}))),u=await Promise.all(c),h=u.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),f=1===u.length?u[0].data:new ArrayBuffer(h),d=[0],p=[0];if(u.length>1){const e=new Uint8Array(f);for(let t=0,r=0;t<u.length;t++){const i=u[t].data;e.set(new Uint8Array(i),r),d[t]=r,r+=i.byteLength,p[t]=i.byteLength}}const{blockWidth:m,blockHeight:y}=this.getBlockWidthHeight(e),g=await this.decodePixelBlock(f,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:l,offsets:d,sizes:p},width:m,height:y,planes:null,pixelType:null});let x,w,b;if(a!==m||o!==y){let e=g.mask;if(e)for(x=0;x<y;x++)if(b=x*m,x<o)for(w=a;w<m;w++)e[b+w]=0;else for(w=0;w<m;w++)e[b+w]=0;else for(e=new Uint8Array(m*y),g.mask=e,x=0;x<o;x++)for(b=x*m,w=0;w<a;w++)e[b+w]=1}return g}async _readIFDs(e,t,r,i,s,n=4,a){if(!i)return null;(i>=t.byteLength||i<0)&&(t=(await this.request(this.url,{range:{from:i+s,to:i+s+this._bufferSize},responseType:"array-buffer",signal:a})).data,s=i+s,i=0);const o=await this._readIFD(t,r,i,s,Je.Z.TIFF_TAGS,n,a);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,r,o.nextIFD-s,s,n,a)}async _readIFD(e,t,r,i,s=Je.Z.TIFF_TAGS,n=4,a){if(!e)return null;const o=(0,We.vr)(e,t,r,i,s,n);if(o.success){const r=[];if(o.ifd.forEach((e=>{e.values||r.push(e)})),r.length>0){const s=r.map((e=>e.offlineOffsetSize)),n=Math.min.apply(null,s.map((e=>e[0])));if(Math.min.apply(null,s.map((e=>e[0]+e[1])))-n<=this._bufferSize){const{data:s}=await this.request(this.url,{range:{from:n,to:n+this._bufferSize},responseType:"array-buffer",signal:a});e=s,i=n,r.forEach((r=>(0,We.Dq)(e,t,r,i)))}}if(o.ifd.has("GEOKEYDIRECTORY")){const r=o.ifd.get("GEOKEYDIRECTORY"),s=r.values;if(s&&s.length>4){const n=s[0]+"."+s[1]+"."+s[2],o=await this._readIFD(e,t,r.valueOffset+6-i,i,Je.Z.GEO_KEYS,2,a);r.data=o.ifd,r.data&&r.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[n]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const r=await this.request(this.url,{range:{from:i,to:i+o.requiredBufferSize+4},responseType:"array-buffer",signal:a});return(e=r.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,i,Je.Z.TIFF_TAGS,4,a)}}_getTileLocation(e,t,r){const{firstPyramidLevel:i,blockBoundary:s}=this.rasterInfo.storageInfo,n=0===e?0:e-(i-1),a=this._headerInfo.ifds[n];if(!a)return null;const o=(0,We.If)(a,this._headerInfo),l=je(a,"TILEOFFSETS");if(void 0===l)return null;const c=je(a,"TILEBYTECOUNTS"),{minRow:u,minCol:h,maxRow:f,maxCol:d}=s[n];if(t>f||r>d||t<u||r<h)return null;const p=qe(a,"IMAGEWIDTH"),m=qe(a,"IMAGELENGTH"),y=qe(a,"TILEWIDTH"),g=qe(a,"TILELENGTH"),x=o?this.rasterInfo.bandCount:1,w=x*t*(d+1)+r,b=[{from:l[w],to:l[w+x-1]+c[w+x-1]-1}];if(o){let e=!0;for(let t=0;t<x;t++)if(l[w+t]+c[w+t]!==l[w+t+1]){e=!1;break}if(!e)for(let e=0;e<x;e++)b[e]={from:l[w+e],to:l[w+e]+c[w+e]-1}}const I=l[w],v=c[w];return null==I||null==v?null:{ranges:b,ifd:a,actualTileWidth:r===d?p%y:y,actualTileHeight:t===f?m%g:g}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return Re(t)}catch{return null}}};(0,i._)([(0,h.Cb)()],Ge.prototype,"_files",void 0),(0,i._)([(0,h.Cb)()],Ge.prototype,"_headerInfo",void 0),(0,i._)([(0,h.Cb)()],Ge.prototype,"_bufferSize",void 0),(0,i._)([(0,h.Cb)({type:String,json:{write:!0}})],Ge.prototype,"datasetFormat",void 0),Ge=(0,i._)([(0,y.j)("esri.layers.support.rasterDatasets.TIFFRaster")],Ge);const Ue=Ge,$e=new Map;$e.set("CRF",{desc:"Cloud Raster Format",constructor:fe}),$e.set("MRF",{desc:"Meta Raster Format",constructor:Ae}),$e.set("TIFF",{desc:"GeoTIFF",constructor:Ue}),$e.set("RasterTileServer",{desc:"Raster Tile Server",constructor:De}),$e.set("JPG",{desc:"JPG Raster Format",constructor:Te}),$e.set("PNG",{desc:"PNG Raster Format",constructor:Te}),$e.set("GIF",{desc:"GIF Raster Format",constructor:Te}),$e.set("BMP",{desc:"BMP Raster Format",constructor:Te});var Ve=r(32163);let Ye=class extends((0,x.h)((0,A.M)((0,L.q)((0,Z.I)((0,w.N)(z((0,W.n)((0,H.Q)((0,l.R)(g.Z)))))))))){constructor(...e){super(...e),this.bandIds=null,this.interpolation=null,this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.title=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=(0,o.pC)(e)?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.r9).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[new J.Z({name:"Raster.ServicePixelValue",alias:"Pixel Value",domain:null,editable:!1,length:50,type:"string"})];const t=this.rasterInfo?.attributeTable?.fields;if(t){const r=t.filter((e=>"oid"!==e.type&&"value"!==e.name.toLowerCase())).map((e=>{const t=e.clone();return t.name="Raster."+e.name,t}));e=e.concat(r)}const r=this.rasterInfo.dataType;if(("vector-magdir"===r||"vector-uv"===r)&&(0,o.pC)(this.rasterInfo.multidimensionalInfo)){const t=this.rasterInfo.multidimensionalInfo.variables[0].unit?.trim(),r="Magnitude"+(t?` (${t})`:"");e.push(new J.Z({name:"Raster.Magnitude",alias:r,domain:null,editable:!1,type:"double"})),e.push(new J.Z({name:"Raster.Direction",alias:"Direction (°)",domain:null,editable:!1,type:"double"}))}return e}set renderer(e){this._set("renderer",e),this.updateRenderer()}readRenderer(e,t,r){const i=t&&t.layerDefinition&&t.layerDefinition.drawingInfo&&t.layerDefinition.drawingInfo.renderer,s=(0,n.ij)(i,r)||void 0;if(null!=s)return s}createPopupTemplate(e){return(0,Ve.eZ)({fields:this.rasterFields,title:this.title},e)}write(e,t){const{raster:r}=this;if(this.loaded?"RasterTileServer"===r.datasetFormat&&("Raster"===r.tileType||"Map"===r.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t&&t.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.Z("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){this.raster?(this.raster.rasterInfo||await this.raster.open(),this.url=this.raster.url):this.raster=await class{static get supportedFormats(){const e=new Set;return $e.forEach(((t,r)=>e.add(r))),e}static async open(e){const{url:t,ioConfig:r,sourceJSON:i}=e;let s=e.datasetFormat;null==s&&t.lastIndexOf(".")&&(s=t.slice(t.lastIndexOf(".")+1).toUpperCase()),"OVR"===s||"TIF"===s?s="TIFF":"JPG"!==s&&"JPEG"!==s&&"JFIF"!==s||(s="JPG"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(s="RasterTileServer");const n={url:t,sourceJSON:i,datasetFormat:s,ioConfig:r||{bandIds:null,sampling:null}};let o,l;if(this.supportedFormats.has(s)){if("CRF"===s&&!r.enableCRF)throw new a.Z("rasterfactory:open",`cannot open raster: ${t}`);return o=$e.get(s).constructor,l=new o(n),await l.open({signal:e.signal}),l}if(s)throw new a.Z("rasterfactory:open","not a supported format "+s);const c=Array.from($e.keys());let u=0;const h=()=>(s=c[u++],s&&("CRF"!==s||r.enableCRF)?(o=$e.get(s).constructor,l=new o(n),l.open({signal:e.signal}).then((()=>l)).catch((()=>h()))):null);return h()}static register(e,t,r){$e.has(e.toUpperCase())||$e.set(e.toUpperCase(),{desc:t,constructor:r})}}.open({url:this.url,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:e});const{rasterInfo:t}=this.raster;if(!t)throw new a.Z("imagery-tile-layer:load","cannot load resources on "+this.url);if(this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}null==this.title&&(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.YP)((()=>this.customParameters),(e=>{this.raster.ioConfig.customFetchParameters=e})))}};(0,i._)([(0,h.Cb)({type:[d.z8],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],Ye.prototype,"bandIds",void 0),(0,i._)([(0,h.Cb)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,p.J)(j.c)],Ye.prototype,"interpolation",void 0),(0,i._)([(0,h.Cb)({json:{write:!0}})],Ye.prototype,"multidimensionalDefinition",void 0),(0,i._)([(0,h.Cb)(S.rn)],Ye.prototype,"legendEnabled",void 0),(0,i._)([(0,h.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ye.prototype,"isReference",void 0),(0,i._)([(0,h.Cb)({type:["show","hide"]})],Ye.prototype,"listMode",void 0),(0,i._)([(0,h.Cb)({json:{read:!0,write:!0}})],Ye.prototype,"blendMode",void 0),(0,i._)([(0,h.Cb)()],Ye.prototype,"sourceJSON",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Ye.prototype,"version",void 0),(0,i._)([(0,h.Cb)()],Ye.prototype,"title",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,json:{read:!1}})],Ye.prototype,"type",void 0),(0,i._)([(0,h.Cb)({type:["ArcGISTiledImageServiceLayer"]})],Ye.prototype,"operationalLayerType",void 0),(0,i._)([(0,h.Cb)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,r){t[r]=!e}}}})],Ye.prototype,"popupEnabled",void 0),(0,i._)([(0,h.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Ye.prototype,"popupTemplate",void 0),(0,i._)([(0,h.Cb)({readOnly:!0})],Ye.prototype,"defaultPopupTemplate",null),(0,i._)([(0,h.Cb)({readOnly:!0,type:[J.Z]})],Ye.prototype,"fields",void 0),(0,i._)([(0,h.Cb)({readOnly:!0,type:[J.Z]})],Ye.prototype,"rasterFields",null),(0,i._)([(0,h.Cb)({types:n.dr,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const 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:n.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],Ye.prototype,"renderer",null),(0,i._)([(0,m.r)("renderer")],Ye.prototype,"readRenderer",null),Ye=(0,i._)([(0,y.j)("esri.layers.ImageryTileLayer")],Ye);const Ke=Ye},74889:(e,t,r)=>{r.r(t),r.d(t,{default:()=>b});var i,s=r(43697),n=r(66577),a=r(38171),o=r(35454),l=r(96674),c=r(22974),u=r(70586),h=r(5600),f=(r(75215),r(71715)),d=r(52011),p=r(30556),m=r(82971),y=r(33955),g=r(1231);const x=new o.X({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let w=i=class extends l.wq{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){const r=m.Z.fromJSON(t.spatialReference),i=[];for(let t=0;t<e.length;t++){const s=e[t],n=a.Z.fromJSON(s),o=s.geometry&&s.geometry.spatialReference;(0,u.pC)(n.geometry)&&!o&&(n.geometry.spatialReference=r);const l=s.aggregateGeometries,c=n.aggregateGeometries;if(l&&(0,u.pC)(c))for(const e in c){const t=c[e],i=l[e]?.spatialReference;(0,u.pC)(t)&&!i&&(t.spatialReference=r)}i.push(n)}return i}writeGeometryType(e,t,r,i){if(e)return void x.write(e,t,r,i);const{features:s}=this;if(s)for(const e of s)if(e&&(0,u.pC)(e.geometry))return void x.write(e.geometry.type,t,r,i)}readQueryGeometry(e,t){if(!e)return null;const r=!!e.spatialReference,i=(0,y.im)(e);return!r&&t.spatialReference&&(i.spatialReference=m.Z.fromJSON(t.spatialReference)),i}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:r}=this;if(r)for(const e of r)if(e&&(0,u.pC)(e.geometry)&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new i(this.cloneProperties())}cloneProperties(){return(0,c.d9)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let r=0;r<t.features.length;r++){const i=t.features[r];if(i.geometry){const t=e&&e[r];i.geometry=t&&t.toJSON()||i.geometry}}return t}quantize(e){const{scale:[t,r],translate:[i,s]}=e,n=this.features,a=this._getQuantizationFunction(this.geometryType,(e=>Math.round((e-i)/t)),(e=>Math.round((s-e)/r)));for(let e=0,t=n.length;e<t;e++)a((0,u.Wg)(n[e].geometry))||(n.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:r}=this;if(!r)return this;const{translate:[i,s],scale:[n,a]}=r,o=this._getHydrationFunction(e,(e=>e*n+i),(e=>s-e*a));for(const{geometry:e}of t)(0,u.pC)(e)&&o(e);return this.transform=null,this}_quantizePoints(e,t,r){let i,s;const n=[];for(let a=0,o=e.length;a<o;a++){const o=e[a];if(a>0){const e=t(o[0]),a=r(o[1]);e===i&&a===s||(n.push([e-i,a-s]),i=e,s=a)}else i=t(o[0]),s=r(o[1]),n.push([i,s])}return n.length>0?n:null}_getQuantizationFunction(e,t,r){return"point"===e?e=>(e.x=t(e.x),e.y=r(e.y),e):"polyline"===e||"polygon"===e?e=>{const i=(0,y.oU)(e)?e.rings:e.paths,s=[];for(let e=0,n=i.length;e<n;e++){const n=i[e],a=this._quantizePoints(n,t,r);a&&s.push(a)}return s.length>0?((0,y.oU)(e)?e.rings=s:e.paths=s,e):null}:"multipoint"===e?e=>{const i=this._quantizePoints(e.points,t,r);return i.length>0?(e.points=i,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,r){return"point"===e?e=>{e.x=t(e.x),e.y=r(e.y)}:"polyline"===e||"polygon"===e?e=>{const i=(0,y.oU)(e)?e.rings:e.paths;let s,n;for(let e=0,a=i.length;e<a;e++){const a=i[e];for(let e=0,i=a.length;e<i;e++){const i=a[e];e>0?(s+=i[0],n+=i[1]):(s=i[0],n=i[1]),i[0]=t(s),i[1]=r(n)}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=r(e.ymin),e.xmax=t(e.xmax),e.ymax=r(e.ymax)}:"multipoint"===e?e=>{const i=e.points;let s,n;for(let e=0,a=i.length;e<a;e++){const a=i[e];e>0?(s+=a[0],n+=a[1]):(s=a[0],n=a[1]),a[0]=t(s),a[1]=r(n)}}:void 0}};(0,s._)([(0,h.Cb)({type:String,json:{write:!0}})],w.prototype,"displayFieldName",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"exceededTransferLimit",void 0),(0,s._)([(0,h.Cb)({type:[a.Z],json:{write:!0}})],w.prototype,"features",void 0),(0,s._)([(0,f.r)("features")],w.prototype,"readFeatures",null),(0,s._)([(0,h.Cb)({type:[g.Z],json:{write:!0}})],w.prototype,"fields",void 0),(0,s._)([(0,h.Cb)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:x.read}}})],w.prototype,"geometryType",void 0),(0,s._)([(0,p.c)("geometryType")],w.prototype,"writeGeometryType",null),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasM",void 0),(0,s._)([(0,h.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"hasZ",void 0),(0,s._)([(0,h.Cb)({types:n.qM,json:{write:!0}})],w.prototype,"queryGeometry",void 0),(0,s._)([(0,f.r)("queryGeometry")],w.prototype,"readQueryGeometry",null),(0,s._)([(0,h.Cb)({type:m.Z,json:{write:!0}})],w.prototype,"spatialReference",void 0),(0,s._)([(0,p.c)("spatialReference")],w.prototype,"writeSpatialReference",null),(0,s._)([(0,h.Cb)({json:{write:!0}})],w.prototype,"transform",void 0),w=i=(0,s._)([(0,d.j)("esri.rest.support.FeatureSet")],w),w.prototype.toJSON.isDefaultToJSON=!0;const b=w}}]);
|