@arcgis/core 4.28.0-next.20230819 → 4.28.0-next.20230821

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.
Files changed (169) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/003744a45b07865f1be9.js +1 -0
  3. package/assets/esri/core/workers/chunks/034accc7cab6c88a3b31.js +1 -0
  4. package/assets/esri/core/workers/chunks/{a67e5b22adc91e850b4e.js → 05ab09713d599687afa3.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{3724f23b6f5ac8ec2568.js → 12b8fe0374fa9ab4ca09.js} +1 -1
  6. package/assets/esri/core/workers/chunks/16d1a72014074e87ecb9.js +1 -0
  7. package/assets/esri/core/workers/chunks/{e4b6565c16430b28ad93.js → 19857e5420cdf23c5f2e.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{1a804dea42c0fb5e5c07.js → 1bab408eaffd2c18976d.js} +1 -1
  9. package/assets/esri/core/workers/chunks/201365f53509e3f78e17.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2031451b82ff70fb201a.js → 2f48f4a9a0a056ac5e1c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/318b51fdee09c1fd750f.js +1 -0
  12. package/assets/esri/core/workers/chunks/{5b799dc155adeb728c74.js → 3361e3e8385f8de8820c.js} +1 -1
  13. package/assets/esri/core/workers/chunks/3ce1870c28ab6ac3648e.js +1 -0
  14. package/assets/esri/core/workers/chunks/41929e4531787389804b.js +1 -0
  15. package/assets/esri/core/workers/chunks/{55ac725127c5ea9fb942.js → 4e39252f40bc57be9d12.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{8ed83426ef88a3eccecd.js → 4e496b03ce24b1206f86.js} +1 -1
  17. package/assets/esri/core/workers/chunks/54513578f735d274a20e.js +1 -0
  18. package/assets/esri/core/workers/chunks/{d46f8ef92e79d12384c9.js → 587437526ea77f764986.js} +1 -1
  19. package/assets/esri/core/workers/chunks/{ab720e2f0a35138564b2.js → 5ffabd1a90c5b08109aa.js} +1 -1
  20. package/assets/esri/core/workers/chunks/6108d72faf48a592c8ba.js +1 -0
  21. package/assets/esri/core/workers/chunks/6479439afae01f9bb5e6.js +1 -0
  22. package/assets/esri/core/workers/chunks/69306dfc89e877539223.js +1 -0
  23. package/assets/esri/core/workers/chunks/{ed499c328ae3a704791c.js → 6db4a6f9d25691830829.js} +1 -1
  24. package/assets/esri/core/workers/chunks/{61393fd3376ea599a447.js → 76e27cece1559ae815df.js} +1 -1
  25. package/assets/esri/core/workers/chunks/81526909c0fa11639038.js +1 -0
  26. package/assets/esri/core/workers/chunks/873111ddf4813cdd4903.js +1 -0
  27. package/assets/esri/core/workers/chunks/8d4f1170394a8be15da9.js +1 -0
  28. package/assets/esri/core/workers/chunks/8d8bdfda09c24e363f78.js +1 -0
  29. package/assets/esri/core/workers/chunks/9b54b5bdb6367c36f6e9.js +1 -0
  30. package/assets/esri/core/workers/chunks/{88f0b5c0fe751bf35af2.js → b2752e038c5fa3c21e49.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{dd3b7cfc6f78552249a4.js → b78dc6cbe14e5817b4d9.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{e31d0c7363cbceeb5ac9.js → c35b850fbfcb28133235.js} +1 -1
  33. package/assets/esri/core/workers/chunks/c83e1be4ee64320cf2fe.js +1 -0
  34. package/assets/esri/core/workers/chunks/c88869d2a647c22dc3e6.js +1 -0
  35. package/assets/esri/core/workers/chunks/cb0a5bc6deaa98026bb5.js +1 -0
  36. package/assets/esri/core/workers/chunks/{767467738aeabec14abd.js → d0c4367a197b193e95d4.js} +1 -1
  37. package/assets/esri/core/workers/chunks/{f113141e254505116b82.js → d1cc2c050423595e54e0.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{7f34945036495ad7c3f8.js → d2a8bf2d090b94cb294b.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{08af7f7f1950a59a8e47.js → d6c96a20e9640b433719.js} +4 -4
  40. package/assets/esri/core/workers/chunks/da5453e67d00ff546640.js +1 -0
  41. package/assets/esri/core/workers/chunks/daa79c14150c12d8bc3d.js +1 -0
  42. package/assets/esri/core/workers/chunks/ef03b78659c72de93076.js +1 -0
  43. package/assets/esri/core/workers/chunks/{c3cace5b25b5170228ba.js → f2fe89b6ac6bf6817e71.js} +1 -1
  44. package/assets/esri/core/workers/chunks/f3554627664a419e00fa.js +1 -0
  45. package/assets/esri/themes/base/widgets/_Editor.scss +65 -4
  46. package/assets/esri/themes/base/widgets/_UtilityNetworkAssociations.scss +97 -39
  47. package/assets/esri/themes/dark/main.css +1 -1
  48. package/assets/esri/themes/light/main.css +1 -1
  49. package/assets/esri/themes/light/view.css +1 -1
  50. package/assets/esri/widgets/Editor/t9n/Editor.json +1 -1
  51. package/assets/esri/widgets/Editor/t9n/Editor_en.json +1 -1
  52. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/butt.png +0 -0
  53. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/round.png +0 -0
  54. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-caps/square.png +0 -0
  55. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dash-dot.png +0 -0
  56. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dash.png +0 -0
  57. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/dot.png +0 -0
  58. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot-dot.png +0 -0
  59. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash-dot.png +0 -0
  60. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/long-dash.png +0 -0
  61. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot-dot.png +0 -0
  62. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash-dot.png +0 -0
  63. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dash.png +0 -0
  64. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/short-dot.png +0 -0
  65. package/assets/esri/widgets/UtilityNetworkAssociations/assets/img/line-patterns/solid.png +0 -0
  66. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations.json +1 -1
  67. package/assets/esri/widgets/UtilityNetworkAssociations/t9n/UtilityNetworkAssociations_en.json +1 -1
  68. package/chunks/HighlightBlur.glsl.js +3 -3
  69. package/chunks/HighlightDownsample.glsl.js +24 -6
  70. package/chunks/SSAO.glsl.js +2 -2
  71. package/core/timeUtils.js +1 -1
  72. package/intl/date.js +1 -1
  73. package/layers/FeatureLayer.js +1 -1
  74. package/layers/ImageryLayer.js +1 -1
  75. package/layers/ImageryTileLayer.js +1 -1
  76. package/layers/StreamLayer.js +1 -1
  77. package/layers/SubtypeGroupLayer.js +1 -1
  78. package/layers/VoxelWasmPerSceneView.js +1 -1
  79. package/layers/graphics/sources/support/uploads.js +1 -1
  80. package/layers/save/featureLayerUtils.js +1 -1
  81. package/layers/save/imageryUtils.js +1 -1
  82. package/layers/save/streamLayerUtils.js +1 -1
  83. package/package.json +1 -1
  84. package/popup/support/FieldInfoFormat.js +1 -1
  85. package/support/revision.js +1 -1
  86. package/views/3d/environment/EnvironmentRenderer.js +1 -1
  87. package/views/3d/externalRenderers/ExternalRendererStore.js +1 -1
  88. package/views/3d/layers/i3s/PointRenderer.js +1 -1
  89. package/views/3d/support/LaserLineRenderer.js +1 -1
  90. package/views/3d/terrain/OverlayRenderer.js +1 -1
  91. package/views/3d/terrain/TerrainRenderer.js +1 -1
  92. package/views/3d/terrain/TerrainSurface.js +1 -1
  93. package/views/3d/webgl-engine/core/renderPasses/RenderPassManager.js +1 -1
  94. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  95. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  96. package/views/3d/webgl-engine/effects/highlight/Highlight.js +1 -1
  97. package/views/3d/webgl-engine/effects/highlight/ShadowHighlight.js +1 -1
  98. package/views/3d/webgl-engine/effects/smaa/SMAA.js +1 -1
  99. package/views/3d/webgl-engine/effects/ssao/SSAO.js +1 -1
  100. package/views/3d/webgl-engine/lib/GLMaterialRepository.js +1 -1
  101. package/views/3d/webgl-engine/lib/GLMaterials.js +1 -1
  102. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  103. package/views/3d/webgl-engine/lib/lodRendering/LodRenderer.js +1 -1
  104. package/views/3d/webgl-engine/materials/CheckerBoardMaterial.js +1 -1
  105. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  106. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  107. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  108. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  109. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  110. package/views/3d/webgl-engine/materials/LineCalloutMaterial.js +1 -1
  111. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  112. package/views/3d/webgl-engine/materials/MeasurementArrowMaterial.js +1 -1
  113. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  114. package/views/3d/webgl-engine/materials/PathMaterial.js +1 -1
  115. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  116. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  117. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  118. package/views/3d/webgl-engine/materials/SlicePlaneMaterial.js +1 -1
  119. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  120. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  121. package/views/3d/webgl-engine/shaders/HighlightDownsample.glsl.js +1 -1
  122. package/views/draw/DrawGraphicTool.js +1 -1
  123. package/views/draw/DrawOperation.js +1 -1
  124. package/views/interactive/sketch/constraints.js +1 -1
  125. package/views/interactive/sketch/normalizedPoint.js +1 -1
  126. package/views/interactive/snapping/SnappingManager.js +1 -1
  127. package/views/interactive/snapping/candidates/IntersectionSnappingCandidate.js +1 -1
  128. package/views/interactive/tooltip/TooltipEditableField.js +1 -1
  129. package/views/interactive/tooltip/TooltipEditableFieldAngle.js +1 -1
  130. package/views/interactive/tooltip/constraintUtils.js +5 -0
  131. package/views/support/angularMeasurementUtils.js +1 -1
  132. package/widgets/Editor/EditorViewModel.js +1 -1
  133. package/widgets/Editor/Upload.js +1 -1
  134. package/widgets/Editor/components/CreateFeaturesPanelContent.js +1 -1
  135. package/widgets/Editor/components/UploadDetails.js +1 -1
  136. package/widgets/Editor/modelUploadUtils.js +1 -1
  137. package/widgets/Editor.js +1 -1
  138. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  139. package/widgets/ElevationProfile.js +1 -1
  140. package/widgets/Feature/FeatureViewModel.js +1 -1
  141. package/widgets/Feature/support/featureUtils.js +1 -1
  142. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsLineSymbolPicker.js +5 -0
  143. package/widgets/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  144. package/widgets/UtilityNetworkAssociations/VisibleElements.js +5 -0
  145. package/widgets/UtilityNetworkAssociations/VisibleElementsSettingsPane.js +5 -0
  146. package/widgets/UtilityNetworkAssociations.js +1 -1
  147. package/assets/esri/core/workers/chunks/11abbbf97093b55e2417.js +0 -1
  148. package/assets/esri/core/workers/chunks/1b2a081f2c3b97ba7e00.js +0 -1
  149. package/assets/esri/core/workers/chunks/235f333177ed7ea21e01.js +0 -1
  150. package/assets/esri/core/workers/chunks/3725dd14c2da0f47198f.js +0 -1
  151. package/assets/esri/core/workers/chunks/42595c4870c673ed451c.js +0 -1
  152. package/assets/esri/core/workers/chunks/481cdd2a4bc40c6fef66.js +0 -1
  153. package/assets/esri/core/workers/chunks/54893132e70c515ea7e3.js +0 -1
  154. package/assets/esri/core/workers/chunks/6509a4198972b323d9b6.js +0 -1
  155. package/assets/esri/core/workers/chunks/68598d2806d4aa3d8acc.js +0 -1
  156. package/assets/esri/core/workers/chunks/718d2e8ea61f3b7b70c5.js +0 -1
  157. package/assets/esri/core/workers/chunks/7bce4b5eec630ef57f1e.js +0 -1
  158. package/assets/esri/core/workers/chunks/8706dc9f852df9b2095d.js +0 -1
  159. package/assets/esri/core/workers/chunks/8ef26aac0fe7feb8c324.js +0 -1
  160. package/assets/esri/core/workers/chunks/91e61da22f258d9e86c5.js +0 -1
  161. package/assets/esri/core/workers/chunks/9f039bf79b34d8fd75ae.js +0 -1
  162. package/assets/esri/core/workers/chunks/a20fd9e7db37b3c3b041.js +0 -1
  163. package/assets/esri/core/workers/chunks/aa83dce42d64034a0a13.js +0 -1
  164. package/assets/esri/core/workers/chunks/cdcf0a5e05283d37b3ac.js +0 -1
  165. package/assets/esri/core/workers/chunks/d4f9106bf2ea5d66d96a.js +0 -1
  166. package/assets/esri/core/workers/chunks/e6bfbc4347fa13db4df2.js +0 -1
  167. package/assets/esri/core/workers/chunks/f1d5487f2d828fb142ba.js +0 -1
  168. package/assets/esri/core/workers/chunks/f97f165d05439e668e05.js +0 -1
  169. package/assets/esri/core/workers/chunks/fe973d8155c22d73a4f9.js +0 -1
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,r)=>{r.r(t),r.d(t,{default:()=>zt});var i=r(43697),s=r(51773),n=r(2368),o=r(16453),a=r(95330),l=r(5600),u=r(75215),p=(r(67676),r(80442),r(52011)),c=r(30556),d=r(87085),m=r(66577),h=r(38171),y=r(30030),f=r(3172),g=r(60235),b=r(20102),v=r(22974),w=r(92604),R=r(17445),_=r(17452),S=r(71715),C=r(21506),x=r(35956),I=r(96674),F=r(45663),T=r(81578);const D={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 j=r(93010),P=r(75509),N=r(23847);const O=new Set(["u1","u2","u4","u8","s8","u16","s16"]),A={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)"},M=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function V(e){return M.has(e.type)}function Z(e,t){if(!e||!t)return(0,v.d9)(e||t);const r=(0,v.d9)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(q(r.functionArguments).Raster=t);return r}function J(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&J(e[r].arguments,t))}function E(e){const t=(0,v.d9)(D[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=E(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=L(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function q(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?q(t.functionArguments):e}const H={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const r=O.has(t)?(0,T.r)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function G(e){if(null==e)return;const{fields:t}=e,r=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return r&&r.name}function U(e){const t=[];return e?.forEach((e=>{const r=e;if(Array.isArray(r))t.push(r);else{if(null==r.min||null==r.max)return;const e=[r.min,r.max,r.avg||0,r.stddev||0];t.push(e)}})),t}function L(e){const t=[],r=[];return e.forEach((e=>{t.push(e[0]),r.push((0,j.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:r}}var B=r(98974),Q=r(69608);let k=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=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("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new B.Z({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),i&&!r&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&V(i)?Z(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new F.Z;i.functionName="Stretch";const s=H[P.v.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:U(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===H.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===H.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,i.outputPixelType=n):s===H.minMax?i.outputPixelType=n:s===H.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=o,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new F.Z;if(r)n.functionArguments={ColorRamp:(0,j.pM)(s)};else{const r=(0,j.Uh)(s,!0);if(r)n.functionArguments={colorRamp:r};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,j.Jw)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new F.Z({rasterFunctionDefinition:E(n)}):n}return r?new F.Z({rasterFunctionDefinition:E(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-6,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=G(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))}))}));const r=a?z(n,a):n,i=new F.Z;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:E(i)}):i}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?z(n,a):n,d=new F.Z;d.functionName="Remap",d.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},d.variableName="Raster";const m=new F.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new F.Z({rasterFunctionDefinition:E(m)}):m}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=G(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const r=e.value,i=e.symbol?.color;null!=r&&i&&i.a&&t.set(String(r),i.toRgb())}));const i=e.field;n.forEach((({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],i=t.symbol?.color,s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i&&r.length>0?z(r,i):r,p=new F.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:E(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?z(r,i):r,n=new F.Z;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new F.Z({rasterFunctionDefinition:E(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new F.Z;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=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 N.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:A[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const d=E(r);return t.convertToRFT?F.Z.fromJSON({rasterFunctionDefinition:d}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new F.Z;const i=new F.Z;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,j.pM)(e.colorRamp):o.Colormap=(0,j.Jw)(e.colorRamp)),r?new F.Z({rasterFunctionDefinition:E(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let i=new F.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new F.Z({rasterFunctionDefinition:E(i)}):i,Z(i,e)}_addClipFunction(e,t){return Z(new F.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,i._)([(0,l.Cb)()],k.prototype,"layer",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"adjustAspectRatio",null),(0,i._)([(0,c.c)("adjustAspectRatio")],k.prototype,"writeAdjustAspectRatio",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"bandIds",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"compression",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"compressionQuality",null),(0,i._)([(0,c.c)("compressionQuality")],k.prototype,"writeCompressionQuality",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"compressionTolerance",null),(0,i._)([(0,c.c)("compressionTolerance")],k.prototype,"writeCompressionTolerance",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"format",null),(0,i._)([(0,l.Cb)({type:String,json:{read:{reader:Q.cl.read},write:{writer:Q.cl.write}}})],k.prototype,"interpolation",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"noData",null),(0,i._)([(0,l.Cb)({type:String,json:{read:{reader:Q.kQ.read},write:{writer:Q.kQ.write}}})],k.prototype,"noDataInterpretation",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"pixelType",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"lercVersion",void 0),(0,i._)([(0,c.c)("lercVersion")],k.prototype,"writeLercVersion",null),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"version",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"mosaicRule",null),(0,i._)([(0,l.Cb)({json:{write:!0,name:"renderingRule"}})],k.prototype,"rasterFunction",null),k=(0,i._)([(0,p.j)("esri.layers.mixins.ExportImageServiceParameters")],k);var W=r(1231),$=r(99514),X=r(90082),K=r(29876),Y=r(5847),ee=r(25972),te=r(88281),re=r(99815),ie=r(75993),se=r(80676),ne=r(67058),oe=r(72758),ae=r(16306),le=r(11282),ue=r(82971);let pe=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],pe.prototype,"north",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],pe.prototype,"up",void 0),(0,i._)([(0,l.Cb)({type:ue.Z,json:{write:!0}})],pe.prototype,"spatialReference",void 0),pe=(0,i._)([(0,p.j)("esri.rest.support.ImageAngleResult")],pe);const ce=pe;var de=r(67900);let me=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,i._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],me.prototype,"value",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],me.prototype,"displayValue",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],me.prototype,"uncertainty",void 0),me=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultValue")],me);let he=class extends me{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],he.prototype,"unit",void 0),he=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultLengthValue")],he);let ye=class extends me{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:de.gV.read,write:de.gV.write}})],ye.prototype,"unit",void 0),ye=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultAreaValue")],ye);let fe=class extends me{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:de.CN.read,write:de.CN.write}})],fe.prototype,"unit",void 0),fe=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultAngleValue")],fe);let ge=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ge.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ge.prototype,"sensorName",void 0),ge=(0,i._)([(0,p.j)("esri.rest.support.BaseImageMeasureResult")],ge);let be=class extends ge{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,i._)([(0,l.Cb)({type:ye,json:{read:!0,write:!0}})],be.prototype,"area",void 0),(0,i._)([(0,l.Cb)({type:he,json:{read:!0,write:!0}})],be.prototype,"perimeter",void 0),be=(0,i._)([(0,p.j)("esri.rest.support.ImageAreaResult")],be);const ve=be;let we=class extends ge{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,i._)([(0,l.Cb)({type:he,json:{read:!0,write:!0}})],we.prototype,"distance",void 0),(0,i._)([(0,l.Cb)({type:fe,json:{read:!0,write:!0}})],we.prototype,"azimuthAngle",void 0),(0,i._)([(0,l.Cb)({type:fe,json:{read:!0,write:!0}})],we.prototype,"elevationAngle",void 0),we=(0,i._)([(0,p.j)("esri.rest.support.ImageDistanceResult")],we);const Re=we;let _e=class extends ge{constructor(){super(...arguments),this.height=null}};(0,i._)([(0,l.Cb)({type:he,json:{read:!0,write:!0}})],_e.prototype,"height",void 0),_e=(0,i._)([(0,p.j)("esri.rest.support.ImageHeightResult")],_e);const Se=_e;var Ce=r(94139),xe=r(74889);let Ie=class extends I.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,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"catalogItemVisibilities",void 0),(0,i._)([(0,l.Cb)({type:xe.Z,json:{write:!0}})],Ie.prototype,"catalogItems",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],Ie.prototype,"location",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"objectId",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"processedValues",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"properties",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"value",void 0),Ie=(0,i._)([(0,p.j)("esri.rest.support.ImageIdentifyResult")],Ie);const Fe=Ie;let Te=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],Te.prototype,"geometries",void 0),Te=(0,i._)([(0,p.j)("esri.rest.support.ImagePixelLocationResult")],Te);const De=Te;let je=class extends ge{constructor(){super(...arguments),this.point=null}};(0,i._)([(0,l.Cb)({type:Ce.Z,json:{name:"point.value",read:!0,write:!0}})],je.prototype,"point",void 0),je=(0,i._)([(0,p.j)("esri.rest.support.ImagePointResult")],je);const Pe=je;let Ne=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"attributes",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],Ne.prototype,"location",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"locationId",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"rasterId",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"resolution",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"pixelValue",void 0),Ne=(0,i._)([(0,p.j)("esri.rest.support.ImageSample")],Ne);const Oe=Ne;let Ae=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,i._)([(0,l.Cb)({type:[Oe],json:{write:!0}})],Ae.prototype,"samples",void 0),Ae=(0,i._)([(0,p.j)("esri.rest.support.ImageSampleResult")],Ae);const Me=Ae;function Ve(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function Ze(e,t,r){const i=(0,le.en)(e),s=t.geometry?[t.geometry]:[],n=await(0,ae.aX)(s),o=t.toJSON();Ve(o);const a=n&&n[0];null!=a&&(o.geometry=a.toJSON());const l=(0,le.cv)({...i.query,f:"json",...o});return(0,le.lA)(l,r)}async function Je(e,t,r){const i=(0,le.en)(e),s=t.geometry?[t.geometry]:[];return(0,ae.aX)(s).then((e=>{const s=t.toJSON(),n=e&&e[0];null!=n&&(s.geometry=JSON.stringify(n.toJSON()));const o=(0,le.cv)({...i.query,f:"json",...s}),a=(0,le.lA)(o,r);return(0,f.Z)(i.path+"/identify",a)})).then((e=>Fe.fromJSON(e.data)))}async function Ee(e,t,r,i){const s=(0,le.en)(e),n=await(0,ae.aX)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(qe(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(qe(n[1])));const a=(0,le.cv)({...s.query,f:"json",...o}),l=(0,le.lA)(a,i),{data:u}=await(0,f.Z)(s.path+"/measure",l);return u}function qe(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=He(e.spatialReference)),t}function He(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function ze(e,t){const r=He(e),{icsid:i,icsns:s,wkid:n}=r;return null!=i?null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?`0:${i}`:JSON.stringify(r):n?n.toString():JSON.stringify(r)}r(10158);var Ge,Ue=r(4967),Le=(r(68773),r(40330),r(2109),r(8744),r(98732),r(6570)),Be=(r(9361),r(65091)),Qe=r(38913),ke=(r(58901),r(45091),r(14165)),We=(r(98326),r(56545),r(41818)),$e=r(5396),Xe=(r(75935),r(28141),r(26059)),Ke=r(36679);let Ye=Ge=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Ge((0,v.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,i._)([(0,l.Cb)({type:[String],json:{name:"angleName",write:!0}})],Ye.prototype,"angleNames",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],Ye.prototype,"point",void 0),(0,i._)([(0,l.Cb)({type:ue.Z,json:{write:!0}})],Ye.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],Ye.prototype,"rasterId",void 0),Ye=Ge=(0,i._)([(0,p.j)("esri.rest.support.ImageAngleParameters")],Ye);const et=Ye;var tt=r(33955);const rt=new(r(35454).X)({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let it=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var st;(0,i._)([(0,l.Cb)()],it.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],it.prototype,"measureOperation",void 0),(0,i._)([(0,l.Cb)({type:B.Z,json:{write:!0}})],it.prototype,"mosaicRule",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],it.prototype,"pixelSize",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],it.prototype,"raster",void 0),it=(0,i._)([(0,p.j)("esri.rest.support.BaseImageMeasureParameters")],it);let nt=st=class extends it{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new st((0,v.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:!0,write:!0}})],nt.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],nt.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{write:rt.write}})],nt.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],nt.prototype,"is3D",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],nt.prototype,"linearUnit",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.gV.read,write:de.gV.write}})],nt.prototype,"areaUnit",void 0),nt=st=(0,i._)([(0,p.j)("esri.rest.support.ImageAreaParameters")],nt);const ot=nt;var at;let lt=at=class extends it{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new at((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],lt.prototype,"fromGeometry",void 0),(0,i._)([(0,c.c)("fromGeometry")],lt.prototype,"writeFromGeometry",null),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],lt.prototype,"toGeometry",void 0),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{write:rt.write}})],lt.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],lt.prototype,"is3D",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],lt.prototype,"linearUnit",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.CN.read,write:de.CN.write}})],lt.prototype,"angularUnit",void 0),lt=at=(0,i._)([(0,p.j)("esri.rest.support.ImageDistanceParameters")],lt);const ut=lt;var pt;let ct=pt=class extends it{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new pt((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0}})],ct.prototype,"fromGeometry",void 0),(0,i._)([(0,c.c)("fromGeometry")],ct.prototype,"writeFromGeometry",null),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],ct.prototype,"toGeometry",void 0),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{write:rt.write}})],ct.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],ct.prototype,"operationType",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],ct.prototype,"linearUnit",void 0),ct=pt=(0,i._)([(0,p.j)("esri.rest.support.ImageHeightParameters")],ct);const dt=ct;var mt,ht=r(79681),yt=r(92835);let ft=mt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=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,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=B.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,g.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,g.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new mt((0,v.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,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,i._)([(0,l.Cb)({json:{write:!0}})],ft.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],ft.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:B.Z,json:{write:!0}})],ft.prototype,"mosaicRule",null),(0,i._)([(0,c.c)("mosaicRule")],ft.prototype,"writeMosaicRule",null),(0,i._)([(0,l.Cb)({type:F.Z})],ft.prototype,"renderingRule",null),(0,i._)([(0,l.Cb)({type:[F.Z]})],ft.prototype,"renderingRules",null),(0,i._)([(0,l.Cb)({type:F.Z,json:{write:!0,name:"renderingRule"}})],ft.prototype,"rasterFunction",null),(0,i._)([(0,c.c)("rasterFunction")],ft.prototype,"writeRasterFunction",null),(0,i._)([(0,l.Cb)({type:[F.Z],json:{write:!0,name:"renderingRules"}})],ft.prototype,"rasterFunctions",void 0),(0,i._)([(0,c.c)("rasterFunctions")],ft.prototype,"writeRasterFunctions",null),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],ft.prototype,"pixelSize",void 0),(0,i._)([(0,c.c)("pixelSize")],ft.prototype,"writePixelSize",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnGeometry",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnCatalogItems",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPixelValues",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],ft.prototype,"maxItemCount",void 0),(0,i._)([(0,l.Cb)({type:yt.Z,json:{write:{target:"time"}}})],ft.prototype,"timeExtent",void 0),(0,i._)([(0,c.c)("timeExtent")],ft.prototype,"writeTimeExtent",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],ft.prototype,"raster",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],ft.prototype,"viewId",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"processAsMultidimensional",void 0),ft=mt=(0,i._)([(0,p.j)("esri.rest.support.ImageIdentifyParameters")],ft);const gt=ft;var bt;let vt=bt=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new bt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,i._)([(0,l.Cb)({type:[Ce.Z],json:{write:!0}})],vt.prototype,"geometries",void 0),(0,i._)([(0,c.c)("geometries")],vt.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],vt.prototype,"rasterId",void 0),vt=bt=(0,i._)([(0,p.j)("esri.rest.support.ImagePixelLocationParameters")],vt);const wt=vt;var Rt;let _t=Rt=class extends it{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new Rt((0,v.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:tt.im}})],_t.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],_t.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],_t.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],_t.prototype,"is3D",void 0),_t=Rt=(0,i._)([(0,p.j)("esri.rest.support.ImagePointParameters")],_t);const St=_t;var Ct;let xt=Ct=class extends I.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,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}set locations(e){if(e?.length){const t=new Be.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Ct((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,i._)([(0,l.Cb)({types:m.qM,json:{read:tt.im}})],xt.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],xt.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)()],xt.prototype,"locations",null),(0,i._)([(0,l.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],xt.prototype,"interpolation",void 0),(0,i._)([(0,l.Cb)({type:B.Z,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,i._)([(0,l.Cb)({type:[String],json:{write:!0}})],xt.prototype,"outFields",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],xt.prototype,"raster",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"returnFirstValueOnly",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleDistance",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleCount",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sliceId",void 0),(0,i._)([(0,l.Cb)({type:yt.Z,json:{read:{source:"time"},write:{target:"time"}}})],xt.prototype,"timeExtent",void 0),xt=Ct=(0,i._)([(0,p.j)("esri.rest.support.ImageSampleParameters")],xt);const It=xt;var Ft=r(23808);const Tt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Dt=(0,l.Eg)(u.q9,{min:0,max:255}),jt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=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.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=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 k({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /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,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?B.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new $.Z(this.fields):null}set format(e){e&&Tt.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=B.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?B.Z.fromJSON(r):this._isMosaicRuleSupported(t)?B.Z.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new B.Z({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=Dt(e))}readObjectIdField(e,t){if(!e){const r=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r&&r[0]&&r[0].name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,y.ij)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),V(s)||w.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){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,t=new W.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new W.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new W.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(r),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(i),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new W.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new W.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new W.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(null!=n){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=(0,v.d9)(t);return r.name=e+t.name,r}));s=s.concat(t)}return s}get renderingRule(){return(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?F.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):F.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?ue.Z.fromJSON(r):null}readPixelType(e){return Q.sM.fromJSON(e)||e}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=Q.sM.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&i&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return r}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)).operations.supportsComputeAngles)throw new b.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,u.TJ)(et,e).clone(),async function(e,t,r){const i=t.toJSON();null!=i.angleName&&(i.angleName=i.angleName.join(",")),null!=t.point&&t.point.spatialReference?.imageCoordinateSystem&&(i.point.spatialReference=He(t.point.spatialReference)),null!=t.spatialReference&&t.spatialReference.imageCoordinateSystem&&(i.spatialReference=ze(t.spatialReference));const s=(0,le.en)(e),n=(0,le.cv)({...s.query,f:"json",...i}),o=(0,le.lA)(n,r),{data:a}=await(0,f.Z)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ue.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):ue.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new ce(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).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,u.TJ)(wt,e).clone(),async function(e,t,r){const i=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=He(s[e].spatialReference));const n=(0,le.en)(e),o=(0,le.cv)({...n.query,f:"json",...i}),a=(0,le.lA)(o,r),{data:l}=await(0,f.Z)(`${n.path}/computePixelLocation`,a);return De.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new b.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ze(e,t,r),s=(0,le.en)(e),{data:n}=await(0,f.Z)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new b.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ze(e,t,r),s=(0,le.en)(e),{data:n}=await(0,f.Z)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new b.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,u.TJ)(dt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.fromGeometry,t.toGeometry],r);return Se.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new b.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,u.TJ)(ot,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.geometry],r);return ve.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new b.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,u.TJ)(ut,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.fromGeometry,t.toGeometry],r);return Re.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new b.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,u.TJ)(St,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.geometry],r);return Pe.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,i,s={}){if(null==e||null==t||null==i)throw new b.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,X.g)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(Y.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new Y.Z({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const o=!!s.requestAsImageElement&&!this.pixelFilter,a=o&&!!s.returnImageBitmap,l={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:o,returnImageBitmap:a,signal:s.signal};return this._requestArrayBuffer(l)}fetchKeyProperties(e){return(0,f.Z)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new b.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.Z)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>xe.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,le.en)(e),s=(0,le.cv)({...i?.query,f:"json"}),n=(0,le.lA)(s,r),o=`${i?.path}/${t}/info`,a=(0,f.Z)(`${o}`,n),l=(0,f.Z)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Le.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new Ce.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,w=new Ke.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ee.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:v,keyProperties:c,storageInfo:w})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,f.Z)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i&&i.ics;if(!s)return;let n=null;try{n=(await(0,f.Z)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.Z)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,f.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,d=n.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},y=(0,f.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let b=g[0].ipxf;if(null==b){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=Le.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);v&&(v.spatialReference=new ue.Z({wkid:0,imageCoordinateSystem:s}));const w=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=w.length;if(R<3)return{ics:s,icsToPixelTransform:b,icsExtent:v,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<R;e++)_+=w[e].x,S+=w[e].y,C+=w[e].x*w[e].x,x+=w[e].x*w[e].y;const I=(R*x-_*S)/(R*C-_*_);let F=0;const T=w[4].x>w[0].x,D=w[4].y>w[0].y;return I===1/0?F=D?90:270:0===I?F=T?0:180:I>0?F=T?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=D?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:b,icsExtent:v,northDirection:F}}async generateRasterInfo(e,t){if(e=(0,u.TJ)(F.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}(e);if(!i)throw new b.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const s={...t,query:this._getQueryParams()},n=(0,Xe.N)(r(this.parsedUrl),e,s);this._functionRasterInfos[i]=n;try{return await n}catch(e){throw this._functionRasterInfos[i]=null,e}}getExportImageServiceParameters(e,t,i,s){const n=ze((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};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;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(F.Z.fromJSON(u));const m={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...o,...m}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new b.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,u.TJ)(It,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=t.toJSON();Ve(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const s=await(0,ae.aX)(t.geometry),n=s?.[0];null!=n&&(i.geometry=n.toJSON());const o=(0,le.en)(e),a=(0,le.cv)({...o.query,f:"json",...i}),l=(0,le.lA)(a,r),{data:u}=await(0,f.Z)(`${o.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 Me.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new b.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,u.TJ)(gt,e).clone();const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new b.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),Je(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new ke.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,Ue.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,$e.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,We.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new b.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,a=null,l=null;const u="raster.servicepixelvalue",p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some((e=>!e.toLowerCase().includes(u))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(u)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,p),t]}));a=t.map((e=>new F.Z({functionName:e[0]}))),l=t.map((e=>e[1]));const{rasterFunction:r}=this;0===a.length?r?.functionName?(a.push(r),l.push(r.functionName)):a=null:r?.functionName&&!a.some((e=>e.functionName===r.functionName))&&(a.push(r),l.push(r.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let m=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:r}=(0,re.W2)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new b.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");r&&null!=r.timeExtent&&(m=r.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,m),y=this._getQueryParams({geometry:e.geometry,timeExtent:m,mosaicRule:h,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:a,pixelSize:r,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete y.f;const f=new gt(y);try{await this._generateRasterInfo(this.rasterFunction);const r=await Je(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!o||c||!r?.catalogItems?.features.length||!n&&a)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s});const u=this.objectIdField||"ObjectId",p=r.catalogItems?.features??[],d=p.map((e=>e.attributes?.[u])),m=new ke.Z({objectIds:d,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[u]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((r=>{r.attributes[u]===t.attributes[u]&&(r.geometry=new Qe.Z(t.geometry),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,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,f.Z)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.Z)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([i,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,Ft.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Xe.g)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).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).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,R.YP)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==n)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(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=n,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new x.Z({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new b.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,u.TJ)(ke.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 te.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),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,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,ne.U0)(t).includes(e.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:s}=await(0,f.Z)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,s&&(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),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&r.bandCount>=3){const e=(0,ne.YD)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ne.Ob)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ne.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=r):this.symbolizer=new oe.Z({rendererJSON:t,rasterInfo:r}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){e&&null!=e.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ie.J)(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,f.Z)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.Z)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,X.g)(o,i,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,f.Z)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,ie.y)(l)),!p)throw new b.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},d="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,ie.J)(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new B.Z;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems&&e.catalogItems.features,u=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),d=[];if(r&&!l&&!c){const e={};e[p]=0,u=[r],l=[new h.Z(this.fullExtent,null,e)]}if(!l)return[];let m,y,f;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=r){if(y=u[e],f=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r,"nodata"===y.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";m.attributes[t]=y,m.attributes[n]=f,this._updateFeatureWithMagDirValues(m,y);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?y:r:f;this.rasterFunction||(l=o?y:r),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,n&&this._updateFeatureWithDomainValues(m),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const t="Raster.ServicePixelValue."+i[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,re.W2)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};s&&null!=s.timeExtent&&(t=s.timeExtent)}if(null!=(r=this._combineMosaicRuleWithTimeExtent(r,t))&&r.multidimensionalDefinition){const{isOutside:e}=(0,re.W2)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=n&&n[0];if(!o)return;const a=i.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));a&&a[0]&&s.forEach((t=>{const r=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new Y.Z({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new Le.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,se.Tg)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach((e=>{if(e&&e.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e&&null!=e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:r,rasterFunction:i}=this;i&&e instanceof ht.Z&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:r>=10.7&&o,supportsComputePixelLocation:r>=10.7&&t.includes("catalog"),supportsComputeAngles:r>=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,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function r(e){return e?.path??""}return(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,i._)([(0,S.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,i._)([(0,l.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,i._)([(0,l.Cb)({type:[u.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,i._)([(0,S.r)("bandIds")],t.prototype,"readBandIds",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,i._)([(0,S.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,i._)([(0,l.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,i._)([(0,c.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,i._)([(0,l.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,i._)([(0,c.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,i._)([(0,l.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,i._)([(0,S.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,i._)([(0,l.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"rasterInfo",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:[W.Z]})],t.prototype,"fields",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,i._)([(0,l.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,i._)([(0,S.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,i._)([(0,l.Cb)({type:Le.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,i._)([(0,l.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,i._)([(0,l.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,i._)([(0,l.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],t.prototype,"interpolation",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,S.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,l.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,S.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,l.Cb)({type:B.Z})],t.prototype,"mosaicRule",null),(0,i._)([(0,S.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,i._)([(0,c.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,i._)([(0,l.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,i._)([(0,l.Cb)({type:K.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,i._)([(0,l.Cb)({json:{type:u.z8}})],t.prototype,"noData",void 0),(0,i._)([(0,c.c)("noData")],t.prototype,"writeNoData",null),(0,i._)([(0,l.Cb)({type:String,json:{type:Q.kQ.jsonValues,read:Q.kQ.read,write:Q.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,i._)([(0,l.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,i._)([(0,S.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,i._)([(0,l.Cb)({})],t.prototype,"typeIdField",void 0),(0,i._)([(0,l.Cb)({})],t.prototype,"types",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,i._)([(0,l.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,i._)([(0,S.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,i._)([(0,l.Cb)()],t.prototype,"viewId",void 0),(0,i._)([(0,l.Cb)({types:y.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:y.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,i._)([(0,S.r)("renderer")],t.prototype,"readRenderer",null),(0,i._)([(0,c.c)("renderer")],t.prototype,"writeRenderer",null),(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,i._)([(0,l.Cb)(C.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,i._)([(0,l.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,i._)([(0,l.Cb)({type:F.Z})],t.prototype,"renderingRule",null),(0,i._)([(0,l.Cb)({type:F.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,i._)([(0,S.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:ue.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,S.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,l.Cb)({json:{type:Q.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,i._)([(0,S.r)("pixelType")],t.prototype,"readPixelType",null),(0,i._)([(0,c.c)("pixelType")],t.prototype,"writePixelType",null),(0,i._)([(0,l.Cb)({constructOnly:!0,type:ee.Z})],t.prototype,"serviceRasterInfo",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,l.Cb)(C.HQ)],t.prototype,"url",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,S.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=r(17287),Nt=r(71612),Ot=r(17017),At=r(38009),Mt=r(16859),Vt=r(34760),Zt=r(72965),Jt=r(28294),Et=r(60199),qt=r(32163);let Ht=class extends((0,Nt.h)((0,Jt.n)((0,Zt.M)((0,At.q)((0,Mt.I)(jt((0,Vt.Q)((0,Ot.N)((0,Pt.Y)((0,o.R)((0,n.J)(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=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(a.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,r=this.title,i=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 o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||i.add(e.name)}return n&&i.add("raster.magnitude").add("raster.direction"),(0,qt.eZ)({fields:t,title:r},{...e,visibleFieldNames:i})}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")}async save(e){const{save:t}=await r.e(4697).then(r.bind(r,64697));return t(this,e)}async saveAs(e,t){const{saveAs:i}=await r.e(4697).then(r.bind(r,64697));return i(this,e,t)}serviceSupportsSpatialReference(e){return(0,Et.D)(this,e)}};(0,i._)([(0,l.Cb)(C.rn)],Ht.prototype,"legendEnabled",void 0),(0,i._)([(0,l.Cb)({type:["show","hide"]})],Ht.prototype,"listMode",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ht.prototype,"isReference",void 0),(0,i._)([(0,l.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Ht.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.c)("web-map","operationalLayerType")],Ht.prototype,"writeOperationalLayerType",null),(0,i._)([(0,l.Cb)(C.C_)],Ht.prototype,"popupEnabled",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Ht.prototype,"popupTemplate",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],Ht.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],Ht.prototype,"type",void 0),Ht=(0,i._)([(0,p.j)("esri.layers.ImageryLayer")],Ht);const zt=Ht},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=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,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),s=r(68773),n=r(40330),o=r(3172),a=r(66643),l=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(17452),m=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),R=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).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 setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,R.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!s||!(0,d.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,R.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,d.Fv)(s.restUrl)===(0,d.Fv)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.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,i._)([(0,m.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},66677:(e,t,r)=>{r.d(t,{B5:()=>p,DR:()=>d,G:()=>v,M8:()=>y,Nm:()=>f,Qc:()=>c,XG:()=>g,a7:()=>h,ld:()=>m,wH:()=>b});var i=r(17452),s=r(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(n),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function p(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),r=t.path.match(a)||t.path.match(l);if(!r)return null;const[,s,o,u,p]=r,c=o.indexOf("/");return{title:m(-1!==c?o.slice(c+1):o),serverType:n[u.toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:s}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function m(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=c(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=m(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const r=(0,i.mN)(t),s=c(r.path);let n;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(n=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=d(r.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:n}}function b(e,t,r,n,o){(0,s.w)(t,n,"url",o),n.url&&null!=e.layerId&&(n.url=(0,i.v_)(n.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return r&&(i||s||n)}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>n});var i=r(20102),s=r(95330);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.k_)(o),a}},60199:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(66677);const s=[];function n(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102901;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),s.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),s.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},41818:(e,t,r)=>{r.d(t,{P:()=>o});var i=r(11282),s=r(34599),n=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,s.hH)(o,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(11282),s=r(34599),n=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,s.Ev)(o,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),n=r(74889),o=r(14165);async function a(e,t,r){const i=await l(e,t,r);return n.Z.fromJSON(i)}async function l(e,t,r){const n=(0,i.en)(e),a={...r},l=o.Z.from(t),{data:u}=await(0,s.JT)(n,l,l.sourceSpatialReference,a);return u}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var i,s=r(43697),n=r(96674),o=r(5600),a=r(75215),l=(r(67676),r(80442),r(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=i=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:r,tagName:i}=e;if(!t||!r||!i)return null;const s=t.find((e=>e.name===r));return s?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find((e=>e.name===t));return i&&i.value||null}({tagName:i,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new i({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,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=i=(0,s._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let c=i=class extends n.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=i=(0,s._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(43697),n=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556),c=r(10158),d=r(82971);let m=i=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,s._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=i=(0,s._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(66577),o=r(92835),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=r(75215),d=r(52011),m=r(30556),h=r(33955);r(67676),r(80442);let y=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=i=(0,s._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=r(82971);const v=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,s._)([(0,p.Cb)({types:n.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,s._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,s._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,s._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,s._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:v.read},write:{target:"spatialRel",writer:v.write}}})],R.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,s._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:w.read,write:{writer:w.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,s._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4608,5935],{60590:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Gt});var i=r(43697),s=r(51773),n=r(2368),o=r(16453),a=r(95330),l=r(5600),u=r(75215),p=(r(67676),r(80442),r(52011)),c=r(30556),d=r(87085),m=r(66577),h=r(38171),y=r(30030),f=r(3172),g=r(60235),b=r(20102),v=r(22974),w=r(92604),R=r(17445),_=r(17452),S=r(71715),C=r(21506),x=r(35956),I=r(96674),F=r(45663),D=r(81578);const T={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 j=r(93010),P=r(75509),N=r(23847);const O=new Set(["u1","u2","u4","u8","s8","u16","s16"]),A={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)"},V=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function M(e){return V.has(e.type)}function Z(e,t){if(!e||!t)return(0,v.d9)(e||t);const r=(0,v.d9)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(q(r.functionArguments).Raster=t);return r}function J(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&J(e[r].arguments,t))}function E(e){const t=(0,v.d9)(T[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=E(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=L(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function q(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?q(t.functionArguments):e}const H={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const r=O.has(t)?(0,D.r)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function G(e){if(null==e)return;const{fields:t}=e,r=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return r&&r.name}function U(e){const t=[];return e?.forEach((e=>{const r=e;if(Array.isArray(r))t.push(r);else{if(null==r.min||null==r.max)return;const e=[r.min,r.max,r.avg||0,r.stddev||0];t.push(e)}})),t}function L(e){const t=[],r=[];return e.forEach((e=>{t.push(e[0]),r.push((0,j.oI)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:r}}var B=r(98974),Q=r(69608);let k=class extends I.wq{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=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("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new B.Z({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=this._addClipFunction(t,s)),i&&!r&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&M(i)?Z(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new F.Z;i.functionName="Stretch";const s=H[P.v.toJSON(e.stretchType)],n="u8",o={StretchType:s,Statistics:U(e.statistics??[]),DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(o.Min=e.outputMin),null!=e.outputMax&&(o.Max=e.outputMax),s===H.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===H.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,i.outputPixelType=n):s===H.minMax?i.outputPixelType=n:s===H.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=o,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new F.Z;if(r)n.functionArguments={ColorRamp:(0,j.pM)(s)};else{const r=(0,j.Uh)(s,!0);if(r)n.functionArguments={colorRamp:r};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,j.Jw)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new F.Z({rasterFunctionDefinition:E(n)}):n}return r?new F.Z({rasterFunctionDefinition:E(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-6,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=G(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))}))}));const r=a?z(n,a):n,i=new F.Z;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:E(i)}):i}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?z(n,a):n,d=new F.Z;d.functionName="Remap",d.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},d.variableName="Raster";const m=new F.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new F.Z({rasterFunctionDefinition:E(m)}):m}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=G(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const r=e.value,i=e.symbol?.color;null!=r&&i&&i.a&&t.set(String(r),i.toRgb())}));const i=e.field;n.forEach((({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],i=t.symbol?.color,s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i&&r.length>0?z(r,i):r,p=new F.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new F.Z({rasterFunctionDefinition:E(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?z(r,i):r,n=new F.Z;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new F.Z({rasterFunctionDefinition:E(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new F.Z;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=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 N.Z,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:A[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const d=E(r);return t.convertToRFT?F.Z.fromJSON({rasterFunctionDefinition:d}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new F.Z;const i=new F.Z;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,j.pM)(e.colorRamp):o.Colormap=(0,j.Jw)(e.colorRamp)),r?new F.Z({rasterFunctionDefinition:E(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let i=new F.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new F.Z({rasterFunctionDefinition:E(i)}):i,Z(i,e)}_addClipFunction(e,t){return Z(new F.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,i._)([(0,l.Cb)()],k.prototype,"layer",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"adjustAspectRatio",null),(0,i._)([(0,c.c)("adjustAspectRatio")],k.prototype,"writeAdjustAspectRatio",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"bandIds",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"compression",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"compressionQuality",null),(0,i._)([(0,c.c)("compressionQuality")],k.prototype,"writeCompressionQuality",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"compressionTolerance",null),(0,i._)([(0,c.c)("compressionTolerance")],k.prototype,"writeCompressionTolerance",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"format",null),(0,i._)([(0,l.Cb)({type:String,json:{read:{reader:Q.cl.read},write:{writer:Q.cl.write}}})],k.prototype,"interpolation",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"noData",null),(0,i._)([(0,l.Cb)({type:String,json:{read:{reader:Q.kQ.read},write:{writer:Q.kQ.write}}})],k.prototype,"noDataInterpretation",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"pixelType",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"lercVersion",void 0),(0,i._)([(0,c.c)("lercVersion")],k.prototype,"writeLercVersion",null),(0,i._)([(0,l.Cb)({type:Number})],k.prototype,"version",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],k.prototype,"mosaicRule",null),(0,i._)([(0,l.Cb)({json:{write:!0,name:"renderingRule"}})],k.prototype,"rasterFunction",null),k=(0,i._)([(0,p.j)("esri.layers.mixins.ExportImageServiceParameters")],k);var W=r(1231),$=r(99514),X=r(90082),K=r(29876),Y=r(5847),ee=r(25972),te=r(88281),re=r(99815),ie=r(75993),se=r(80676),ne=r(67058),oe=r(72758),ae=r(16306),le=r(11282),ue=r(82971);let pe=class extends I.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],pe.prototype,"north",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],pe.prototype,"up",void 0),(0,i._)([(0,l.Cb)({type:ue.Z,json:{write:!0}})],pe.prototype,"spatialReference",void 0),pe=(0,i._)([(0,p.j)("esri.rest.support.ImageAngleResult")],pe);const ce=pe;var de=r(67900);let me=class extends I.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,i._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],me.prototype,"value",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],me.prototype,"displayValue",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{read:!0,write:!0}})],me.prototype,"uncertainty",void 0),me=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultValue")],me);let he=class extends me{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],he.prototype,"unit",void 0),he=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultLengthValue")],he);let ye=class extends me{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:de.gV.read,write:de.gV.write}})],ye.prototype,"unit",void 0),ye=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultAreaValue")],ye);let fe=class extends me{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:de.CN.read,write:de.CN.write}})],fe.prototype,"unit",void 0),fe=(0,i._)([(0,p.j)("esri.rest.support.ImageMeasureResultAngleValue")],fe);let ge=class extends I.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,i._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ge.prototype,"name",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:!0,write:!0}})],ge.prototype,"sensorName",void 0),ge=(0,i._)([(0,p.j)("esri.rest.support.BaseImageMeasureResult")],ge);let be=class extends ge{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,i._)([(0,l.Cb)({type:ye,json:{read:!0,write:!0}})],be.prototype,"area",void 0),(0,i._)([(0,l.Cb)({type:he,json:{read:!0,write:!0}})],be.prototype,"perimeter",void 0),be=(0,i._)([(0,p.j)("esri.rest.support.ImageAreaResult")],be);const ve=be;let we=class extends ge{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,i._)([(0,l.Cb)({type:he,json:{read:!0,write:!0}})],we.prototype,"distance",void 0),(0,i._)([(0,l.Cb)({type:fe,json:{read:!0,write:!0}})],we.prototype,"azimuthAngle",void 0),(0,i._)([(0,l.Cb)({type:fe,json:{read:!0,write:!0}})],we.prototype,"elevationAngle",void 0),we=(0,i._)([(0,p.j)("esri.rest.support.ImageDistanceResult")],we);const Re=we;let _e=class extends ge{constructor(){super(...arguments),this.height=null}};(0,i._)([(0,l.Cb)({type:he,json:{read:!0,write:!0}})],_e.prototype,"height",void 0),_e=(0,i._)([(0,p.j)("esri.rest.support.ImageHeightResult")],_e);const Se=_e;var Ce=r(94139),xe=r(74889);let Ie=class extends I.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,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"catalogItemVisibilities",void 0),(0,i._)([(0,l.Cb)({type:xe.Z,json:{write:!0}})],Ie.prototype,"catalogItems",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],Ie.prototype,"location",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"name",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"objectId",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"processedValues",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"properties",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ie.prototype,"value",void 0),Ie=(0,i._)([(0,p.j)("esri.rest.support.ImageIdentifyResult")],Ie);const Fe=Ie;let De=class extends I.wq{constructor(){super(...arguments),this.geometries=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],De.prototype,"geometries",void 0),De=(0,i._)([(0,p.j)("esri.rest.support.ImagePixelLocationResult")],De);const Te=De;let je=class extends ge{constructor(){super(...arguments),this.point=null}};(0,i._)([(0,l.Cb)({type:Ce.Z,json:{name:"point.value",read:!0,write:!0}})],je.prototype,"point",void 0),je=(0,i._)([(0,p.j)("esri.rest.support.ImagePointResult")],je);const Pe=je;let Ne=class extends I.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"attributes",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],Ne.prototype,"location",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"locationId",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"rasterId",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"resolution",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],Ne.prototype,"pixelValue",void 0),Ne=(0,i._)([(0,p.j)("esri.rest.support.ImageSample")],Ne);const Oe=Ne;let Ae=class extends I.wq{constructor(){super(...arguments),this.samples=null}};(0,i._)([(0,l.Cb)({type:[Oe],json:{write:!0}})],Ae.prototype,"samples",void 0),Ae=(0,i._)([(0,p.j)("esri.rest.support.ImageSampleResult")],Ae);const Ve=Ae;function Me(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function Ze(e,t,r){const i=(0,le.en)(e),s=t.geometry?[t.geometry]:[],n=await(0,ae.aX)(s),o=t.toJSON();Me(o);const a=n&&n[0];null!=a&&(o.geometry=a.toJSON());const l=(0,le.cv)({...i.query,f:"json",...o});return(0,le.lA)(l,r)}async function Je(e,t,r){const i=(0,le.en)(e),s=t.geometry?[t.geometry]:[];return(0,ae.aX)(s).then((e=>{const s=t.toJSON(),n=e&&e[0];null!=n&&(s.geometry=JSON.stringify(n.toJSON()));const o=(0,le.cv)({...i.query,f:"json",...s}),a=(0,le.lA)(o,r);return(0,f.Z)(i.path+"/identify",a)})).then((e=>Fe.fromJSON(e.data)))}async function Ee(e,t,r,i){const s=(0,le.en)(e),n=await(0,ae.aX)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(qe(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(qe(n[1])));const a=(0,le.cv)({...s.query,f:"json",...o}),l=(0,le.lA)(a,i),{data:u}=await(0,f.Z)(s.path+"/measure",l);return u}function qe(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=He(e.spatialReference)),t}function He(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function ze(e,t){const r=He(e),{icsid:i,icsns:s,wkid:n}=r;return null!=i?null==s||t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?`0:${i}`:JSON.stringify(r):n?n.toString():JSON.stringify(r)}r(10158);var Ge,Ue=r(4967),Le=(r(68773),r(40330),r(2109),r(8744),r(98732),r(6570)),Be=(r(9361),r(65091)),Qe=r(38913),ke=(r(58901),r(45091),r(14165)),We=(r(98326),r(56545),r(41818)),$e=r(5396),Xe=(r(75935),r(28141),r(26059)),Ke=r(36679);let Ye=Ge=class extends I.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new Ge((0,v.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,i._)([(0,l.Cb)({type:[String],json:{name:"angleName",write:!0}})],Ye.prototype,"angleNames",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],Ye.prototype,"point",void 0),(0,i._)([(0,l.Cb)({type:ue.Z,json:{write:!0}})],Ye.prototype,"spatialReference",void 0),(0,i._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],Ye.prototype,"rasterId",void 0),Ye=Ge=(0,i._)([(0,p.j)("esri.rest.support.ImageAngleParameters")],Ye);const et=Ye;var tt=r(33955);const rt=new(r(35454).X)({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let it=class extends I.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};var st;(0,i._)([(0,l.Cb)()],it.prototype,"type",void 0),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],it.prototype,"measureOperation",void 0),(0,i._)([(0,l.Cb)({type:B.Z,json:{write:!0}})],it.prototype,"mosaicRule",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],it.prototype,"pixelSize",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],it.prototype,"raster",void 0),it=(0,i._)([(0,p.j)("esri.rest.support.BaseImageMeasureParameters")],it);let nt=st=class extends it{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new st((0,v.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:!0,write:!0}})],nt.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],nt.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{write:rt.write}})],nt.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],nt.prototype,"is3D",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],nt.prototype,"linearUnit",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.gV.read,write:de.gV.write}})],nt.prototype,"areaUnit",void 0),nt=st=(0,i._)([(0,p.j)("esri.rest.support.ImageAreaParameters")],nt);const ot=nt;var at;let lt=at=class extends it{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new at((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],lt.prototype,"fromGeometry",void 0),(0,i._)([(0,c.c)("fromGeometry")],lt.prototype,"writeFromGeometry",null),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],lt.prototype,"toGeometry",void 0),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{write:rt.write}})],lt.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],lt.prototype,"is3D",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],lt.prototype,"linearUnit",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.CN.read,write:de.CN.write}})],lt.prototype,"angularUnit",void 0),lt=at=(0,i._)([(0,p.j)("esri.rest.support.ImageDistanceParameters")],lt);const ut=lt;var pt;let ct=pt=class extends it{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new pt((0,v.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0}})],ct.prototype,"fromGeometry",void 0),(0,i._)([(0,c.c)("fromGeometry")],ct.prototype,"writeFromGeometry",null),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{read:!0,write:!0}})],ct.prototype,"toGeometry",void 0),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{write:rt.write}})],ct.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],ct.prototype,"operationType",void 0),(0,i._)([(0,l.Cb)({type:String,json:{read:de.Jo.read,write:de.Jo.write}})],ct.prototype,"linearUnit",void 0),ct=pt=(0,i._)([(0,p.j)("esri.rest.support.ImageHeightParameters")],ct);const dt=ct;var mt,ht=r(79681),yt=r(92835);let ft=mt=class extends I.wq{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=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,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t&&t.mosaicMethod&&(t=B.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}get renderingRule(){return(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}get renderingRules(){return(0,g.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._get("rasterFunctions")}set renderingRules(e){(0,g.Mr)(w.Z.getLogger(this),"renderingRules",{replacement:"rasterFunctions",version:"4.27",warnOnce:!0}),this._set("rasterFunctions",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new mt((0,v.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,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,i._)([(0,l.Cb)({json:{write:!0}})],ft.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],ft.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:B.Z,json:{write:!0}})],ft.prototype,"mosaicRule",null),(0,i._)([(0,c.c)("mosaicRule")],ft.prototype,"writeMosaicRule",null),(0,i._)([(0,l.Cb)({type:F.Z})],ft.prototype,"renderingRule",null),(0,i._)([(0,l.Cb)({type:[F.Z]})],ft.prototype,"renderingRules",null),(0,i._)([(0,l.Cb)({type:F.Z,json:{write:!0,name:"renderingRule"}})],ft.prototype,"rasterFunction",null),(0,i._)([(0,c.c)("rasterFunction")],ft.prototype,"writeRasterFunction",null),(0,i._)([(0,l.Cb)({type:[F.Z],json:{write:!0,name:"renderingRules"}})],ft.prototype,"rasterFunctions",void 0),(0,i._)([(0,c.c)("rasterFunctions")],ft.prototype,"writeRasterFunctions",null),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],ft.prototype,"pixelSize",void 0),(0,i._)([(0,c.c)("pixelSize")],ft.prototype,"writePixelSize",null),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnGeometry",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnCatalogItems",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPixelValues",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],ft.prototype,"maxItemCount",void 0),(0,i._)([(0,l.Cb)({type:yt.Z,json:{write:{target:"time"}}})],ft.prototype,"timeExtent",void 0),(0,i._)([(0,c.c)("timeExtent")],ft.prototype,"writeTimeExtent",null),(0,i._)([(0,l.Cb)({json:{write:!0}})],ft.prototype,"raster",void 0),(0,i._)([(0,l.Cb)({json:{write:!0}})],ft.prototype,"viewId",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"processAsMultidimensional",void 0),ft=mt=(0,i._)([(0,p.j)("esri.rest.support.ImageIdentifyParameters")],ft);const gt=ft;var bt;let vt=bt=class extends I.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new bt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,i._)([(0,l.Cb)({type:[Ce.Z],json:{write:!0}})],vt.prototype,"geometries",void 0),(0,i._)([(0,c.c)("geometries")],vt.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:u.z8,json:{write:!0}})],vt.prototype,"rasterId",void 0),vt=bt=(0,i._)([(0,p.j)("esri.rest.support.ImagePixelLocationParameters")],vt);const wt=vt;var Rt;let _t=Rt=class extends it{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new Rt((0,v.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,l.Cb)({types:m.qM,json:{name:"fromGeometry",read:tt.im}})],_t.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],_t.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)({type:rt.apiValues,json:{read:rt.read,write:rt.write}})],_t.prototype,"measureOperation",null),(0,i._)([(0,l.Cb)({json:{read:!0}})],_t.prototype,"is3D",void 0),_t=Rt=(0,i._)([(0,p.j)("esri.rest.support.ImagePointParameters")],_t);const St=_t;var Ct;let xt=Ct=class extends I.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,r){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[r]=e.toJSON())}set locations(e){if(e?.length){const t=new Be.Z({spatialReference:e[0].spatialReference});t.points=e.map((e=>[e.x,e.y])),this._set("locations",e),this.geometry=t}}clone(){return new Ct((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,i._)([(0,l.Cb)({types:m.qM,json:{read:tt.im}})],xt.prototype,"geometry",void 0),(0,i._)([(0,c.c)("geometry")],xt.prototype,"writeGeometry",null),(0,i._)([(0,l.Cb)()],xt.prototype,"locations",null),(0,i._)([(0,l.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],xt.prototype,"interpolation",void 0),(0,i._)([(0,l.Cb)({type:B.Z,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,i._)([(0,l.Cb)({type:[String],json:{write:!0}})],xt.prototype,"outFields",void 0),(0,i._)([(0,l.Cb)({type:Ce.Z,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],xt.prototype,"raster",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"returnFirstValueOnly",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleDistance",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleCount",void 0),(0,i._)([(0,l.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sliceId",void 0),(0,i._)([(0,l.Cb)({type:yt.Z,json:{read:{source:"time"},write:{target:"time"}}})],xt.prototype,"timeExtent",void 0),xt=Ct=(0,i._)([(0,p.j)("esri.rest.support.ImageSampleParameters")],xt);const It=xt;var Ft=r(23808);const Dt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),Tt=(0,l.Eg)(u.q9,{min:0,max:255}),jt=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this._rasterAttributeTableFieldPrefix="Raster.",this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=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.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=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 k({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /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,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?B.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new $.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=B.Z.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?B.Z.fromJSON(r):this._isMosaicRuleSupported(t)?B.Z.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new B.Z({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=Tt(e))}readObjectIdField(e,t){if(!e){const r=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r&&r[0]&&r[0].name}return e}get parsedUrl(){return(0,_.mN)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}set renderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("renderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,y.ij)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),M(s)||w.Z.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){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,t=new W.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new W.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new W.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(r),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&s.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&s.push(i),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{s.push(new W.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(s.push(new W.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),s.push(new W.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:n}=this.rasterInfo??{};if(null!=n){const t=n.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const r=(0,v.d9)(t);return r.name=e+t.name,r}));s=s.concat(t)}return s}get renderingRule(){return(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._get("rasterFunction")}set renderingRule(e){(0,g.Mr)(w.Z.getLogger(this),"renderingRule",{replacement:"rasterFunction",version:"4.27",warnOnce:!0}),this._set("rasterFunction",e)}set rasterFunction(e){let t=e;t&&t.rasterFunction&&(t=F.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r&&r.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?F.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):F.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?ue.Z.fromJSON(r):null}readPixelType(e){return Q.sM.fromJSON(e)||e}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=Q.sM.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&i&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return r}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)).operations.supportsComputeAngles)throw new b.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,u.TJ)(et,e).clone(),async function(e,t,r){const i=t.toJSON();null!=i.angleName&&(i.angleName=i.angleName.join(",")),null!=t.point&&t.point.spatialReference?.imageCoordinateSystem&&(i.point.spatialReference=He(t.point.spatialReference)),null!=t.spatialReference&&t.spatialReference.imageCoordinateSystem&&(i.spatialReference=ze(t.spatialReference));const s=(0,le.en)(e),n=(0,le.cv)({...s.query,f:"json",...i}),o=(0,le.lA)(n,r),{data:a}=await(0,f.Z)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ue.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):ue.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new ce(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).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,u.TJ)(wt,e).clone(),async function(e,t,r){const i=t.toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=He(s[e].spatialReference));const n=(0,le.en)(e),o=(0,le.cv)({...n.query,f:"json",...i}),a=(0,le.lA)(o,r),{data:l}=await(0,f.Z)(`${n.path}/computePixelLocation`,a);return Te.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new b.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ze(e,t,r),s=(0,le.en)(e),{data:n}=await(0,f.Z)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new b.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,u.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ze(e,t,r),s=(0,le.en)(e),{data:n}=await(0,f.Z)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new b.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,u.TJ)(dt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.fromGeometry,t.toGeometry],r);return Se.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new b.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,u.TJ)(ot,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.geometry],r);return ve.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new b.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,u.TJ)(ut,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.fromGeometry,t.toGeometry],r);return Re.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new b.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,u.TJ)(St,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await Ee(e,t,[t.geometry],r);return Pe.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,i,s={}){if(null==e||null==t||null==i)throw new b.Z("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,X.g)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(Y.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new Y.Z({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const o=!!s.requestAsImageElement&&!this.pixelFilter,a=o&&!!s.returnImageBitmap,l={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:o,returnImageBitmap:a,signal:s.signal};return this._requestArrayBuffer(l)}fetchKeyProperties(e){return(0,f.Z)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new b.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.Z)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>xe.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,le.en)(e),s=(0,le.cv)({...i?.query,f:"json"}),n=(0,le.lA)(s,r),o=`${i?.path}/${t}/info`,a=(0,f.Z)(`${o}`,n),l=(0,f.Z)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let d=null;p.statistics?.length&&(d=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const m=Le.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),y=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new Ce.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,w=new Ke.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new ee.Z({width:h,height:y,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:v,keyProperties:c,storageInfo:w})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,f.Z)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i&&i.ics;if(!s)return;let n=null;try{n=(await(0,f.Z)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n||!n.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.Z)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,f.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,d=n.ymin+c,m=[];for(let e=0;e<5;e++)m.push({x:p,y:d+c*e});const h={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:m}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},y=(0,f.Z)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,y]);let b=g[0].ipxf;if(null==b){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(b={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=Le.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);v&&(v.spatialReference=new ue.Z({wkid:0,imageCoordinateSystem:s}));const w=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],R=w.length;if(R<3)return{ics:s,icsToPixelTransform:b,icsExtent:v,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<R;e++)_+=w[e].x,S+=w[e].y,C+=w[e].x*w[e].x,x+=w[e].x*w[e].y;const I=(R*x-_*S)/(R*C-_*_);let F=0;const D=w[4].x>w[0].x,T=w[4].y>w[0].y;return I===1/0?F=T?90:270:0===I?F=D?0:180:I>0?F=D?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=T?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:b,icsExtent:v,northDirection:F}}async generateRasterInfo(e,t){if(e=(0,u.TJ)(F.Z,e),this.serviceRasterInfo&&(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e)))return this.serviceRasterInfo;const i=function(e){if(!e)return null;const t=JSON.stringify(e).match(/"rasterFunction":"(.*?")/gi),r=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return r?r.join("/"):null}(e);if(!i)throw new b.Z("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const s={...t,query:this._getQueryParams()},n=(0,Xe.N)(r(this.parsedUrl),e,s);this._functionRasterInfos[i]=n;try{return await n}catch(e){throw this._functionRasterInfos[i]=null,e}}getExportImageServiceParameters(e,t,i,s){const n=ze((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&c){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};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;o.bandIds=void 0}else o.bandIds=a?.join(",");l instanceof Array&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(F.Z.fromJSON(u));const m={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?m.time=""+e:null==e&&null==t||(m.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...o,...m}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new b.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,u.TJ)(It,e).clone();const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=t.toJSON();Me(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const s=await(0,ae.aX)(t.geometry),n=s?.[0];null!=n&&(i.geometry=n.toJSON());const o=(0,le.en)(e),a=(0,le.cv)({...o.query,f:"json",...i}),l=(0,le.lA)(a,r),{data:u}=await(0,f.Z)(`${o.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 Ve.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new b.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,u.TJ)(gt,e).clone();const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new b.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),Je(this.url,e,this._getRequestOptions(t))}createQuery(){const e=new ke.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,Ue.e)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,$e.G)(this.url,e,t)}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,We.P)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new b.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let o=!1,a=null,l=null;const u="raster.servicepixelvalue",p=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(o=e.outFields.some((e=>!e.toLowerCase().includes(u))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().includes(u)&&e.length>24)).map((e=>{const t=e.slice(25);return[this._updateRenderingRulesFunctionName(t,p),t]}));a=t.map((e=>new F.Z({functionName:e[0]}))),l=t.map((e=>e[1]));const{rasterFunction:r}=this;0===a.length?r?.functionName?(a.push(r),l.push(r.functionName)):a=null:r?.functionName&&!a.some((e=>e.functionName===r.functionName))&&(a.push(r),l.push(r.functionName))}const c=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let m=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:r}=(0,re.W2)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new b.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");r&&null!=r.timeExtent&&(m=r.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,m),y=this._getQueryParams({geometry:e.geometry,timeExtent:m,mosaicRule:h,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:a,pixelSize:r,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:s?1:null});delete y.f;const f=new gt(y);try{await this._generateRasterInfo(this.rasterFunction);const r=await Je(this.url,f,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,a=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!o||c||!r?.catalogItems?.features.length||!n&&a)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,showNoDataRecords:n,templateFields:s});const u=this.objectIdField||"ObjectId",p=r.catalogItems?.features??[],d=p.map((e=>e.attributes?.[u])),m=new ke.Z({objectIds:d,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[u]}),h=await this.queryRasters(m);return h?.features?.length&&h.features.forEach((t=>{p.forEach((r=>{r.attributes[u]===t.attributes[u]&&(r.geometry=new Qe.Z(t.geometry),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:l,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,f.Z)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.Z)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([i,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,Ft.GE)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Xe.g)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).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).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,R.YP)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==n)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(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=n,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new x.Z({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new b.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,u.TJ)(ke.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 te.Z;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),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,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,ne.U0)(t).includes(e.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:s}=await(0,f.Z)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,s&&(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),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&r.bandCount>=3){const e=(0,ne.YD)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ne.Ob)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ne.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=r):this.symbolizer=new oe.Z({rendererJSON:t,rasterInfo:r}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){e&&null!=e.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ie.J)(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,f.Z)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.Z)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,X.g)(o,i,n),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,f.Z)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),l=(await Promise.all([a,o]))[0].data,u=t.format||"jpgpng";let p=u;if("bsq"!==p&&"bip"!==p&&(p=(0,ie.y)(l)),!p)throw new b.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:n},d="gif"===u||"bmp"===u||u.includes("png")&&("png"===p||"jpg"===p)?(0,ie.J)(l,{useCanvas:!0,...t},c):this._decodePixelBlock(l,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:u},c);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.Tj)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new B.Z;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems&&e.catalogItems.features,u=e.properties&&e.properties.Values&&e.properties.Values.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),d=[];if(r&&!l&&!c){const e={};e[p]=0,u=[r],l=[new h.Z(this.fullExtent,null,e)]}if(!l)return[];let m,y,f;this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);for(let e=0;e<l.length;e++){if(m=l[e],null!=r){if(y=u[e],f=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r,"nodata"===y.toLowerCase()&&!s)continue;const t="Raster.ItemPixelValue",n="Raster.ServicePixelValue";m.attributes[t]=y,m.attributes[n]=f,this._updateFeatureWithMagDirValues(m,y);const o=this.fields&&this.fields.length>0;let l=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?o?y:r:f;this.rasterFunction||(l=o?y:r),this._updateFeatureWithRasterAttributeTableValues(m,l)}if(m.sourceLayer=m.layer=this,n&&this._updateFeatureWithDomainValues(m),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const t="Raster.ServicePixelValue."+i[e];m.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,re.W2)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};s&&null!=s.timeExtent&&(t=s.timeExtent)}if(null!=(r=this._combineMosaicRuleWithTimeExtent(r,t))&&r.multidimensionalDefinition){const{isOutside:e}=(0,re.W2)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=n&&n[0];if(!o)return;const a=i.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));a&&a[0]&&s.forEach((t=>{const r=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[r]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new Y.Z({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new Le.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,se.Tg)([n.pixels[0][0],n.pixels[1][0]]);e.attributes["Raster.Magnitude"]=o[0],e.attributes["Raster.Direction"]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach((e=>{if(e&&e.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e&&null!=e.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:r,rasterFunction:i}=this;i&&e instanceof ht.Z&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!!(e.spatialReference||e.extent&&e.extent.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic");return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:r>=10.7&&o,supportsComputePixelLocation:r>=10.7&&t.includes("catalog"),supportsComputeAngles:r>=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,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function r(e){return e?.path??""}return(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,i._)([(0,S.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,i._)([(0,l.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,i._)([(0,l.Cb)({type:[u.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,i._)([(0,S.r)("bandIds")],t.prototype,"readBandIds",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,i._)([(0,S.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,i._)([(0,l.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,i._)([(0,c.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,i._)([(0,l.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,i._)([(0,c.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,i._)([(0,l.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,i._)([(0,S.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,i._)([(0,l.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"rasterInfo",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:[W.Z]})],t.prototype,"fields",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,i._)([(0,l.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,i._)([(0,S.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,i._)([(0,l.Cb)({type:Le.Z})],t.prototype,"fullExtent",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,i._)([(0,l.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,i._)([(0,l.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,i._)([(0,l.Cb)({type:String,json:{type:Q.cl.jsonValues,read:Q.cl.read,write:Q.cl.write}})],t.prototype,"interpolation",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"minScale",void 0),(0,i._)([(0,S.r)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,l.Cb)()],t.prototype,"maxScale",void 0),(0,i._)([(0,S.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,l.Cb)({type:B.Z})],t.prototype,"mosaicRule",null),(0,i._)([(0,S.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,i._)([(0,c.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,i._)([(0,l.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,i._)([(0,l.Cb)({type:K.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,i._)([(0,l.Cb)({json:{type:u.z8}})],t.prototype,"noData",void 0),(0,i._)([(0,c.c)("noData")],t.prototype,"writeNoData",null),(0,i._)([(0,l.Cb)({type:String,json:{type:Q.kQ.jsonValues,read:Q.kQ.read,write:Q.kQ.write}})],t.prototype,"noDataInterpretation",void 0),(0,i._)([(0,l.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,i._)([(0,S.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,i._)([(0,l.Cb)({})],t.prototype,"typeIdField",void 0),(0,i._)([(0,l.Cb)({})],t.prototype,"types",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,i._)([(0,l.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"raster",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,i._)([(0,S.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,i._)([(0,l.Cb)()],t.prototype,"viewId",void 0),(0,i._)([(0,l.Cb)({types:y.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:y.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,i._)([(0,S.r)("renderer")],t.prototype,"readRenderer",null),(0,i._)([(0,c.c)("renderer")],t.prototype,"writeRenderer",null),(0,i._)([(0,l.Cb)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,i._)([(0,l.Cb)(C.Oh)],t.prototype,"opacity",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,i._)([(0,l.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,i._)([(0,l.Cb)({type:F.Z})],t.prototype,"renderingRule",null),(0,i._)([(0,l.Cb)({type:F.Z,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,i._)([(0,S.r)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,i._)([(0,l.Cb)({readOnly:!0,type:ue.Z})],t.prototype,"spatialReference",void 0),(0,i._)([(0,S.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,l.Cb)({json:{type:Q.sM.jsonValues}})],t.prototype,"pixelType",void 0),(0,i._)([(0,S.r)("pixelType")],t.prototype,"readPixelType",null),(0,i._)([(0,c.c)("pixelType")],t.prototype,"writePixelType",null),(0,i._)([(0,l.Cb)({constructOnly:!0,type:ee.Z})],t.prototype,"serviceRasterInfo",void 0),(0,i._)([(0,l.Cb)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,l.Cb)(C.HQ)],t.prototype,"url",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,S.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,i._)([(0,p.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=r(17287),Nt=r(71612),Ot=r(17017),At=r(38009),Vt=r(16859),Mt=r(34760),Zt=r(72965),Jt=r(28294),Et=r(60199),qt=r(32163),Ht=r(12259);let zt=class extends((0,Nt.h)((0,Jt.n)((0,Zt.M)((0,At.q)((0,Vt.I)(jt((0,Mt.Q)((0,Ot.N)((0,Pt.Y)((0,o.R)((0,n.J)(d.Z)))))))))))){constructor(...e){super(...e),this.legendEnabled=!0,this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,a.Ds)((async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(4697).then(r.bind(r,64697));switch(e){case Ht.x.SAVE:return s(this,t);case Ht.x.SAVE_AS:return n(this,i,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(a.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,r=this.title,i=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 o=new Set;s&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||i.add(e.name)}return n&&i.add("raster.magnitude").add("raster.direction"),(0,qt.eZ)({fields:t,title:r},{...e,visibleFieldNames:i})}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")}async save(e){return this._debouncedSaveOperations(Ht.x.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ht.x.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Et.D)(this,e)}};(0,i._)([(0,l.Cb)(C.rn)],zt.prototype,"legendEnabled",void 0),(0,i._)([(0,l.Cb)({type:["show","hide"]})],zt.prototype,"listMode",void 0),(0,i._)([(0,l.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],zt.prototype,"isReference",void 0),(0,i._)([(0,l.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],zt.prototype,"operationalLayerType",void 0),(0,i._)([(0,c.c)("web-map","operationalLayerType")],zt.prototype,"writeOperationalLayerType",null),(0,i._)([(0,l.Cb)(C.C_)],zt.prototype,"popupEnabled",void 0),(0,i._)([(0,l.Cb)({type:s.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],zt.prototype,"popupTemplate",void 0),(0,i._)([(0,l.Cb)({readOnly:!0})],zt.prototype,"defaultPopupTemplate",null),(0,i._)([(0,l.Cb)({readOnly:!0,json:{read:!1}})],zt.prototype,"type",void 0),zt=(0,i._)([(0,p.j)("esri.layers.ImageryLayer")],zt);const Gt=zt},17287:(e,t,r)=>{r.d(t,{Y:()=>l});var i=r(43697),s=r(92604),n=r(5600),o=(r(75215),r(67676),r(80442),r(52011)),a=r(66677);const l=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,a.Qc)(this.url);if(null!=e&&e.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,a.Nm)(e,s.Z.getLogger(this)))}};return(0,i._)([(0,n.Cb)()],t.prototype,"title",null),(0,i._)([(0,n.Cb)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},16859:(e,t,r)=>{r.d(t,{I:()=>_});var i=r(43697),s=r(68773),n=r(40330),o=r(3172),a=r(66643),l=r(20102),u=r(92604),p=r(70586),c=r(95330),d=r(17452),m=r(5600),h=(r(75215),r(67676),r(80442),r(71715)),y=r(52011),f=r(30556),g=r(84230),b=r(48522),v=r(15235),w=r(86082),R=r(14661);const _=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,p.SC)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,r){if(t.itemId)return new v.default({id:t.itemId,portal:r&&r.portal})}writePortalItem(e,t){e&&e.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem&&this.portalItem.id)try{const{load:i}=await r.e(8062).then(r.bind(r,18062));return(0,c.k_)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap},t)}catch(e){throw(0,c.D_)(e)||u.Z.getLogger(this).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 setUserPrivileges(e,t){if(!s.default.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:r,fullEdit:i},content:{updateItem:s}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",r),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",s)}catch(e){(0,c.r9)(e)}}async _fetchUserPrivileges(e,t){let r=this.portalItem;if(!e||!r||!r.loaded||r.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=e===r.id;if(i&&r.portal.user)return(0,R.Ss)(r);let s,o;if(i)s=r.portal.url;else try{s=await(0,g.oP)(this.url,t)}catch(e){(0,c.r9)(e)}if(!s||!(0,d.Zo)(s,r.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(n.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,c.r9)(e)}if(!o)return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}};try{if(i?await r.reload():(r=new v.default({id:e,portal:{url:s}}),await r.load(t)),r.portal.user)return(0,R.Ss)(r)}catch(e){(0,c.r9)(e)}return{features:{edit:!0,fullEdit:!1},content:{updateItem:!1}}}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,c.r9)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?n.id?.findCredential(this.url):null;if(!t)return!0;const r=S.credential===t?S.user:await this._fetchEditingUser(e);return S.credential=t,S.user=r,null==r||null==r.privileges||r.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const r=n.id.findServerInfo(this.url??"");if(!r?.owningSystemUrl)return null;const i=`${r.owningSystemUrl}/sharing/rest`,s=b.Z.getDefault();if(s&&s.loaded&&(0,d.Fv)(s.restUrl)===(0,d.Fv)(i))return s.user;const l=`${i}/community/self`,u=null!=e?e.signal:null,p=await(0,a.q6)((0,o.Z)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return p.ok?w.Z.fromJSON(p.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const r=t&&t.portal,i=this.portalItem&&this.portalItem.id&&(this.portalItem.portal||b.Z.getDefault());return r&&i&&!(0,d.tm)(i.restUrl,r.restUrl)?(t.messages&&t.messages.push(new l.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,i._)([(0,m.Cb)({type:v.default})],t.prototype,"portalItem",null),(0,i._)([(0,h.r)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,i._)([(0,f.c)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,i._)([(0,m.Cb)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,i._)([(0,m.Cb)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,i._)([(0,y.j)("esri.layers.mixins.PortalLayer")],t),t},S={credential:null,user:null}},66677:(e,t,r)=>{r.d(t,{B5:()=>p,DR:()=>d,G:()=>v,M8:()=>y,Nm:()=>f,Qc:()=>c,XG:()=>g,a7:()=>h,ld:()=>m,wH:()=>b});var i=r(17452),s=r(25929);const n={mapserver:"MapServer",imageserver:"ImageServer",featureserver:"FeatureServer",sceneserver:"SceneServer",streamserver:"StreamServer",vectortileserver:"VectorTileServer"},o=Object.values(n),a=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/rest\\/services\\/(.+?)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),l=new RegExp(`^((?:https?:)?\\/\\/\\S+?\\/([^\\/\\n]+)\\/(${o.join("|")}))(?:\\/(?:layers\\/)?(\\d+))?`,"i"),u=/(.*?)\/(?:layers\/)?(\d+)\/?$/i;function p(e){return!!a.test(e)}function c(e){if(null==e)return null;const t=(0,i.mN)(e),r=t.path.match(a)||t.path.match(l);if(!r)return null;const[,s,o,u,p]=r,c=o.indexOf("/");return{title:m(-1!==c?o.slice(c+1):o),serverType:n[u.toLowerCase()],sublayer:null!=p&&""!==p?parseInt(p,10):null,url:{path:s}}}function d(e){const t=(0,i.mN)(e).path.match(u);return t?{serviceUrl:t[1],sublayerId:Number(t[2])}:null}function m(e){return(e=e.replaceAll(/\s*[/_]+\s*/g," "))[0].toUpperCase()+e.slice(1)}function h(e,t){const r=[];if(e){const t=c(e);null!=t&&t.title&&r.push(t.title)}if(t){const e=m(t);r.push(e)}if(2===r.length){if(r[0].toLowerCase().includes(r[1].toLowerCase()))return r[0];if(r[1].toLowerCase().includes(r[0].toLowerCase()))return r[1]}return r.join(" - ")}function y(e){if(!e)return!1;const t=(e=e.toLowerCase()).includes(".arcgis.com/"),r=e.includes("//services")||e.includes("//tiles")||e.includes("//features");return t&&r}function f(e,t){return e?(0,i.Qj)((0,i.Hu)(e,t)):e}function g(e){let{url:t}=e;if(!t)return{url:t};t=(0,i.Hu)(t,e.logger);const r=(0,i.mN)(t),s=c(r.path);let n;if(null!=s)null!=s.sublayer&&null==e.layer.layerId&&(n=s.sublayer),t=s.url.path;else if(e.nonStandardUrlAllowed){const e=d(r.path);null!=e&&(t=e.serviceUrl,n=e.sublayerId)}return{url:(0,i.Qj)(t),layerId:n}}function b(e,t,r,n,o){(0,s.w)(t,n,"url",o),n.url&&null!=e.layerId&&(n.url=(0,i.v_)(n.url,r,e.layerId.toString()))}function v(e){if(!e)return!1;const t=e.toLowerCase(),r=t.includes("/services/"),i=t.includes("/mapserver/wmsserver"),s=t.includes("/imageserver/wmsserver"),n=t.includes("/wmsserver");return r&&(i||s||n)}},90082:(e,t,r)=>{r.d(t,{V:()=>o,g:()=>n});var i=r(20102),s=r(95330);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.k_)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.Z("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.k_)(o),a}},60199:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(66677);const s=[];function n(e,t){if((0,i.M8)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102901;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}]),s.push([10.7,()=>{const e=new Set([8387,8391,8427,8545,8682,8685,8818,31370,104022,104024,104975]);for(let t=8065;t<=8068;t++)e.add(t);for(let t=8082;t<=8083;t++)e.add(t);for(let t=8379;t<=8385;t++)e.add(t);for(let t=8836;t<=8840;t++)e.add(t);for(let t=8857;t<=8860;t++)e.add(t);for(let t=53035;t<=53037;t++)e.add(t);for(let t=54090;t<=54091;t++)e.add(t);for(let t=102498;t<=102499;t++)e.add(t);return e}]),s.push([10.61,()=>new Set([102497])]),s.push([10.6,()=>{const e=new Set([7803,7805,7887,8086,8232,8237,8240,8246,8249,8252,8255,9019,9391]);for(let t=7755;t<=7787;t++)e.add(t);for(let t=7791;t<=7795;t++)e.add(t);for(let t=7799;t<=7801;t++)e.add(t);for(let t=7825;t<=7831;t++)e.add(t);for(let t=7877;t<=7878;t++)e.add(t);for(let t=7882;t<=7883;t++)e.add(t);for(let t=7991;t<=7992;t++)e.add(t);for(let t=8042;t<=8043;t++)e.add(t);for(let t=8058;t<=8059;t++)e.add(t);for(let t=8311;t<=8348;t++)e.add(t);for(let t=9060;t<=9067;t++)e.add(t);for(let t=102562;t<=102568;t++)e.add(t);for(let t=102799;t<=102900;t++)e.add(t);return e}]),s.push([10.51,()=>{const e=new Set([7683,7881,7886,7899,8888,9e3]);for(let t=8013;t<=8032;t++)e.add(t);for(let t=9053;t<=9057;t++)e.add(t);for(let t=104017;t<=104018;t++)e.add(t);for(let t=104971;t<=104974;t++)e.add(t);return e}]),s.push([10.5,()=>{const e=new Set([6962,7035,7037,7039,7041,7084,7086,7133,7798,102399]);for(let t=4087;t<=4088;t++)e.add(t);for(let t=5896;t<=5899;t++)e.add(t);for(let t=7005;t<=7007;t++)e.add(t);for(let t=7057;t<=7070;t++)e.add(t);for(let t=7073;t<=7082;t++)e.add(t);for(let t=7109;t<=7128;t++)e.add(t);for(let t=7844;t<=7859;t++)e.add(t);return e}])},41818:(e,t,r)=>{r.d(t,{P:()=>o});var i=r(11282),s=r(34599),n=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,s.hH)(o,n.Z.from(t),{...r}).then((e=>e.data.count))}},5396:(e,t,r)=>{r.d(t,{G:()=>o});var i=r(11282),s=r(34599),n=r(14165);async function o(e,t,r){const o=(0,i.en)(e);return(0,s.Ev)(o,n.Z.from(t),{...r}).then((e=>e.data.objectIds))}},4967:(e,t,r)=>{r.d(t,{F:()=>l,e:()=>a});var i=r(11282),s=r(34599),n=r(74889),o=r(14165);async function a(e,t,r){const i=await l(e,t,r);return n.Z.fromJSON(i)}async function l(e,t,r){const n=(0,i.en)(e),a={...r},l=o.Z.from(t),{data:u}=await(0,s.JT)(n,l,l.sourceSpatialReference,a);return u}},28694:(e,t,r)=>{r.d(t,{p:()=>s});var i=r(69285);function s(e,t,r){if(!r||!r.features||!r.hasZ)return;const s=(0,i.k)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}},98326:(e,t,r)=>{r.d(t,{Z:()=>c});var i,s=r(43697),n=r(96674),o=r(5600),a=r(75215),l=(r(67676),r(80442),r(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=i=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:r,tagName:i}=e;if(!t||!r||!i)return null;const s=t.find((e=>e.name===r));return s?function(e){const{tagName:t,tags:r}=e;if(!r||!t)return null;const i=r.find((e=>e.name===t));return i&&i.value||null}({tagName:i,tags:s.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new i({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,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,s._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,s._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,s._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,s._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,s._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=i=(0,s._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,r)=>{r.d(t,{Z:()=>d});var i,s=r(43697),n=r(96674),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556);let c=i=class extends n.wq{constructor(e){super(e),this.attachmentTypes=null,this.attachmentsWhere=null,this.cacheHint=void 0,this.keywords=null,this.globalIds=null,this.name=null,this.num=null,this.objectIds=null,this.returnMetadata=!1,this.size=null,this.start=null,this.where=null}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new i((0,o.d9)({attachmentTypes:this.attachmentTypes,attachmentsWhere:this.attachmentsWhere,cacheHint:this.cacheHint,keywords:this.keywords,where:this.where,globalIds:this.globalIds,name:this.name,num:this.num,objectIds:this.objectIds,returnMetadata:this.returnMetadata,size:this.size,start:this.start}))}};(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=i=(0,s._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,r)=>{r.r(t),r.d(t,{default:()=>h});var i,s=r(43697),n=(r(66577),r(96674)),o=r(22974),a=r(5600),l=r(75215),u=r(52011),p=r(30556),c=r(10158),d=r(82971);let m=i=class extends n.wq{constructor(e){super(e),this.cacheHint=void 0,this.dynamicDataSource=void 0,this.gdbVersion=null,this.geometryPrecision=void 0,this.historicMoment=null,this.maxAllowableOffset=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.relationshipId=void 0,this.start=void 0,this.num=void 0,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.where=null}_writeHistoricMoment(e,t){t.historicMoment=e&&e.getTime()}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10,this.start>0&&null==this.where&&(t.definitionExpression="1=1")}clone(){return new i((0,o.d9)({cacheHint:this.cacheHint,dynamicDataSource:this.dynamicDataSource,gdbVersion:this.gdbVersion,geometryPrecision:this.geometryPrecision,historicMoment:this.historicMoment&&new Date(this.historicMoment.getTime()),maxAllowableOffset:this.maxAllowableOffset,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,relationshipId:this.relationshipId,start:this.start,num:this.num,returnGeometry:this.returnGeometry,where:this.where,returnZ:this.returnZ,returnM:this.returnM}))}};(0,s._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,s._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,s._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,s._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,s._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,s._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,s._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,s._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,s._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,s._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,s._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,s._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,s._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=i=(0,s._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,r)=>{r.d(t,{Z:()=>_});var i,s=r(43697),n=r(66577),o=r(92835),a=r(35454),l=r(96674),u=r(22974),p=r(5600),c=r(75215),d=r(52011),m=r(30556),h=r(33955);r(67676),r(80442);let y=i=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new i({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=i=(0,s._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=r(82971);const v=new a.X({esriSpatialRelIntersects:"intersects",esriSpatialRelContains:"contains",esriSpatialRelCrosses:"crosses",esriSpatialRelDisjoint:"disjoint",esriSpatialRelEnvelopeIntersects:"envelope-intersects",esriSpatialRelIndexIntersects:"index-intersects",esriSpatialRelOverlaps:"overlaps",esriSpatialRelTouches:"touches",esriSpatialRelWithin:"within",esriSpatialRelRelation:"relation"}),w=new a.X({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"});let R=g=class extends l.wq{constructor(e){super(e),this.cacheHint=void 0,this.distance=void 0,this.geometry=null,this.geometryPrecision=void 0,this.maxAllowableOffset=void 0,this.num=void 0,this.objectIds=null,this.orderByFields=null,this.outFields=null,this.outSpatialReference=null,this.resultType=null,this.returnGeometry=!1,this.returnM=void 0,this.returnZ=void 0,this.start=void 0,this.spatialRelationship="intersects",this.timeExtent=null,this.topFilter=void 0,this.units=null,this.where="1=1"}writeStart(e,t){t.resultOffset=this.start,t.resultRecordCount=this.num||10}clone(){return new g((0,u.d9)({cacheHint:this.cacheHint,distance:this.distance,geometry:this.geometry,geometryPrecision:this.geometryPrecision,maxAllowableOffset:this.maxAllowableOffset,num:this.num,objectIds:this.objectIds,orderByFields:this.orderByFields,outFields:this.outFields,outSpatialReference:this.outSpatialReference,resultType:this.resultType,returnGeometry:this.returnGeometry,returnZ:this.returnZ,returnM:this.returnM,start:this.start,spatialRelationship:this.spatialRelationship,timeExtent:this.timeExtent,topFilter:this.topFilter,units:this.units,where:this.where}))}};(0,s._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],R.prototype,"cacheHint",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],R.prototype,"distance",void 0),(0,s._)([(0,p.Cb)({types:n.qM,json:{read:h.im,write:!0}})],R.prototype,"geometry",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"geometryPrecision",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{write:!0}})],R.prototype,"maxAllowableOffset",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],R.prototype,"num",void 0),(0,s._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"objectIds",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"orderByFields",void 0),(0,s._)([(0,p.Cb)({type:[String],json:{write:!0}})],R.prototype,"outFields",void 0),(0,s._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],R.prototype,"outSpatialReference",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"resultType",void 0),(0,s._)([(0,p.Cb)({json:{write:!0}})],R.prototype,"returnGeometry",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnM",void 0),(0,s._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],R.prototype,"returnZ",void 0),(0,s._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],R.prototype,"start",void 0),(0,s._)([(0,m.c)("start"),(0,m.c)("num")],R.prototype,"writeStart",null),(0,s._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:v.read},write:{target:"spatialRel",writer:v.write}}})],R.prototype,"spatialRelationship",void 0),(0,s._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],R.prototype,"timeExtent",void 0),(0,s._)([(0,p.Cb)({type:f,json:{write:!0}})],R.prototype,"topFilter",void 0),(0,s._)([(0,p.Cb)({type:String,json:{read:w.read,write:{writer:w.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],R.prototype,"units",void 0),(0,s._)([(0,p.Cb)({type:String,json:{write:!0}})],R.prototype,"where",void 0),R=g=(0,s._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],R),R.from=(0,c.se)(R);const _=R}}]);