@arcgis/core 4.27.0-next.20230419 → 4.27.0-next.20230421

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 (203) hide show
  1. package/WebMap.js +1 -1
  2. package/WebScene.js +1 -1
  3. package/arcade/arcadeAsyncRuntime.js +1 -1
  4. package/arcade/arcadeCompiler.js +1 -1
  5. package/arcade/arcadeRuntime.js +1 -1
  6. package/arcade/executionError.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/{f64f95623d9296a91f95.js → 059ec6fd9b971de4b4c1.js} +1 -1
  9. package/assets/esri/core/workers/chunks/0d805fd9cd9ff3a636ca.js +1 -0
  10. package/assets/esri/core/workers/chunks/{1fe31a412479815e5e2d.js → 10770939900946feb20d.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{5252f3cc244204edc299.js → 1216e939d363f96b6cc6.js} +1 -1
  12. package/assets/esri/core/workers/chunks/156dad2b7fed6749bae7.js +1 -0
  13. package/assets/esri/core/workers/chunks/15a97d3e42b00ac42984.js +1 -0
  14. package/assets/esri/core/workers/chunks/{d72c0c97cc4e30f1e4f2.js → 18704903814b9d73c708.js} +1 -1
  15. package/assets/esri/core/workers/chunks/1db5e4c8244dbc21590c.js +1 -0
  16. package/assets/esri/core/workers/chunks/2a1a5a1969e80a10dcca.js +1 -0
  17. package/assets/esri/core/workers/chunks/33b735faa582e6f39e9a.js +1 -0
  18. package/assets/esri/core/workers/chunks/34025ac04ca02531923a.js +1 -0
  19. package/assets/esri/core/workers/chunks/3e9f3479fd8558d9e3e3.js +1 -0
  20. package/assets/esri/core/workers/chunks/{d59274ac695dfcff1143.js → 46090b69e9161bc05141.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{f7aa972cb3903847b3bf.js → 47bf38d910e71ac39bb8.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{3978f4f68ada540ee3a3.js → 4f8a09b61267e5e26712.js} +1 -1
  23. package/assets/esri/core/workers/chunks/5183ecab7eddae7b70e8.js +1 -0
  24. package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js → 51a0d1dabe7415515c77.js} +2 -2
  25. package/assets/esri/core/workers/chunks/541e6efc3b491e507410.js +1 -0
  26. package/assets/esri/core/workers/chunks/588256e65685ff21d2e9.js +1 -0
  27. package/assets/esri/core/workers/chunks/5c64fd3bf057a1a5527f.js +1 -0
  28. package/assets/esri/core/workers/chunks/6047bdaf4855506f8fdb.js +1 -0
  29. package/assets/esri/core/workers/chunks/6adb58f1bffc5d1c03bd.js +1 -0
  30. package/assets/esri/core/workers/chunks/770940417e6ddbdbb9d6.js +1 -0
  31. package/assets/esri/core/workers/chunks/{1c1d8be85297c483a606.js → 77c98121223a144170e3.js} +1 -1
  32. package/assets/esri/core/workers/chunks/80117007d86be4eb3bc3.js +1 -0
  33. package/assets/esri/core/workers/chunks/812cba53143565a825f1.js +1 -0
  34. package/assets/esri/core/workers/chunks/838849b751805615833a.js +1 -0
  35. package/assets/esri/core/workers/chunks/{9ca395f7bc8d397b5240.js → 88197520501fcc20b6e8.js} +1 -1
  36. package/assets/esri/core/workers/chunks/88f9dededcf60fd011ef.js +1 -0
  37. package/assets/esri/core/workers/chunks/88fdd288ef799a7ac48a.js +1 -0
  38. package/assets/esri/core/workers/chunks/8ae7fea9f7fda38dd207.js +1 -0
  39. package/assets/esri/core/workers/chunks/{0d080dd1ca6a71597409.js → 9265d4e9cfab2c7bbce5.js} +1 -1
  40. package/assets/esri/core/workers/chunks/{8d41305509fedb3603ac.js → 94041a9ced04aa281d40.js} +1 -1
  41. package/assets/esri/core/workers/chunks/98540791fcef86069e44.js +1 -0
  42. package/assets/esri/core/workers/chunks/9c1b2f82877ff79969f5.js +1 -0
  43. package/assets/esri/core/workers/chunks/a7b3cd537c9127b5e65e.js +1 -0
  44. package/assets/esri/core/workers/chunks/{3d1c697182237807ab49.js → abea316f2eac0f3086ab.js} +1 -1
  45. package/assets/esri/core/workers/chunks/ad85ade6a2cfb56cf328.js +1 -0
  46. package/assets/esri/core/workers/chunks/b833b4ea2973bb16792e.js +1 -0
  47. package/assets/esri/core/workers/chunks/be4aa835a7abfc809126.js +1 -0
  48. package/assets/esri/core/workers/chunks/c2ec6e904f96173a7b83.js +1 -0
  49. package/assets/esri/core/workers/chunks/{c25aa08b869f2777dc26.js → c4488a8d857c765da30e.js} +1 -1
  50. package/assets/esri/core/workers/chunks/c5c56b6d99db96a6755a.js +2 -0
  51. package/assets/esri/core/workers/chunks/{7f3b0856f594df2b044e.js → c727d38f71e52bee17e1.js} +1 -1
  52. package/assets/esri/core/workers/chunks/cf315d255f0dc8d50f21.js +1 -0
  53. package/assets/esri/core/workers/chunks/cf7676fdc09ad4835680.js +1 -0
  54. package/assets/esri/core/workers/chunks/cfad34c949cbe8a31ef8.js +1 -0
  55. package/assets/esri/core/workers/chunks/{edb4568fe281b5609092.js → d244e50c981146f018d2.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a2c9cb23f3e35e88da1d.js → d399b1b9cbf0737d1735.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{df7dcd035997881cf2ef.js → d5c8119d6d34628d3126.js} +1 -1
  58. package/assets/esri/core/workers/chunks/d6b6bb8aecc85d2a3f6b.js +1 -0
  59. package/assets/esri/core/workers/chunks/{8dfa32cc8453f85faab0.js → dd1f8bade9c5c3b7929b.js} +1 -1
  60. package/assets/esri/core/workers/chunks/e11e60759821746259c6.js +1 -0
  61. package/assets/esri/core/workers/chunks/{e4b65c5a4575a5c1c49f.js → e356c576f9a7521a49b3.js} +1 -1
  62. package/assets/esri/core/workers/chunks/f02edf71645eb33bf92f.js +1 -0
  63. package/assets/esri/core/workers/chunks/f1a4165c2710ca90e5ea.js +1 -0
  64. package/assets/esri/core/workers/chunks/f57a3ee17869ced3dd33.js +1 -0
  65. package/assets/esri/core/workers/chunks/fc07f6e103d7f69a9909.js +1 -0
  66. package/chunks/WaterSurface.glsl.js +35 -20
  67. package/chunks/index.js +1 -1
  68. package/core/Loadable.js +1 -1
  69. package/core/Promise.js +1 -1
  70. package/core/accessorSupport/ensureType.js +1 -1
  71. package/core/accessorSupport/watch.js +1 -1
  72. package/core/accessorSupport/write.js +1 -1
  73. package/core/promiseUtils.js +1 -1
  74. package/core/watchUtils.js +1 -1
  75. package/core/workers/Connection.js +1 -1
  76. package/core/workers/RemoteClient.js +1 -1
  77. package/core/workers/workerFactory.js +1 -1
  78. package/geometry/support/geodesicUtils.js +1 -1
  79. package/geometry/support/meshUtils/External.js +1 -1
  80. package/geometry/support/meshUtils/Metadata.js +1 -1
  81. package/intl/messages.js +1 -1
  82. package/layers/graphics/controllers/FeatureTileController3D.js +1 -1
  83. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  84. package/layers/graphics/data/attributeSupport.js +1 -1
  85. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  86. package/layers/mixins/ArcGISMapService.js +1 -1
  87. package/layers/support/PromiseQueue.js +1 -1
  88. package/layers/support/Sublayer.js +1 -1
  89. package/layers/support/TileKey.js +1 -1
  90. package/layers/support/rasterFormats/TiffDecoder.js +1 -1
  91. package/networks/Network.js +1 -1
  92. package/package.json +1 -1
  93. package/portal/schemas/definitions.js +1 -1
  94. package/renderers/support/RasterSymbolizer.js +1 -1
  95. package/renderers/support/rasterRendererChecks.js +5 -0
  96. package/renderers/support/rasterRendererHelper.js +1 -1
  97. package/request.js +1 -1
  98. package/rest/query/operations/query.js +1 -1
  99. package/smartMapping/raster/renderers/uniqueValue.js +1 -1
  100. package/support/featureFlags.js +1 -1
  101. package/support/revision.js +1 -1
  102. package/symbols/support/previewSymbol3D.js +1 -1
  103. package/symbols/support/styleUtils.js +1 -1
  104. package/symbols/support/symbolLayerUtils.js +1 -1
  105. package/symbols/support/utils.js +1 -1
  106. package/symbols/support/webStyleSymbolUtils.js +1 -1
  107. package/views/2d/engine/webgl/TextureManager.js +1 -1
  108. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  109. package/views/2d/layers/features/controllers/FeatureController2D.js +1 -1
  110. package/views/2d/layers/features/sources/DataTileSource.js +1 -1
  111. package/views/2d/layers/features/sources/DataTileSubscription.js +1 -1
  112. package/views/2d/layers/features/sources/DrillDownFeatureSource.js +1 -1
  113. package/views/2d/layers/features/sources/PagedFeatureSource.js +1 -1
  114. package/views/2d/layers/features/support/FeatureSetReaderPBFHeader.js +1 -1
  115. package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
  116. package/views/2d/layers/features/tileRenderers/SymbolTileRenderer.js +1 -1
  117. package/views/2d/layers/features/tileRenderers.js +1 -1
  118. package/views/2d/layers/graphics/GraphicsView2D.js +1 -1
  119. package/views/2d/layers/support/webStyleUtils.js +1 -1
  120. package/views/3d/input/SceneInputManager.js +1 -1
  121. package/views/3d/interactive/manipulatorUtils.js +1 -1
  122. package/views/3d/interactive/visualElements/LineVisualElement.js +1 -1
  123. package/views/3d/layers/GraphicsView3D.js +1 -1
  124. package/views/3d/layers/I3SMeshView3D.js +1 -1
  125. package/views/3d/layers/graphics/ElevationQuery.js +1 -1
  126. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  127. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  128. package/views/3d/layers/graphics/Graphics3DWaterSymbolLayer.js +1 -1
  129. package/views/3d/layers/graphics/polygonUtils.js +1 -1
  130. package/views/3d/layers/graphics/symbolComplexity.js +1 -1
  131. package/views/3d/layers/graphics/webStyleUtils.js +5 -0
  132. package/views/3d/layers/i3s/I3SClientNodeLoader.js +1 -1
  133. package/views/3d/layers/i3s/I3SIndex.js +1 -1
  134. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  135. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  136. package/views/3d/webgl-engine/materials/WaterTechnique.js +1 -1
  137. package/views/3d/webgl-engine/shaders/WaterSurface.glsl.js +1 -1
  138. package/views/LayerViewManager.js +1 -1
  139. package/views/PopupView.js +1 -1
  140. package/views/SceneView.js +1 -1
  141. package/views/ViewAnimation.js +1 -1
  142. package/views/input/BrowserEventSource.js +1 -1
  143. package/views/input/InputManager.js +1 -1
  144. package/views/interactive/coordinateHelper.js +1 -1
  145. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  146. package/views/layers/support/MapServiceLayerViewHelper.js +1 -1
  147. package/views/support/QueueProcessor.js +1 -1
  148. package/views/ui/DefaultUI.js +1 -1
  149. package/views/ui/UI.js +1 -1
  150. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  151. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  152. package/widgets/Editor/Upload.js +1 -1
  153. package/widgets/Editor/deprecationUtils.js +1 -1
  154. package/widgets/Editor/modelUploadUtils.js +1 -1
  155. package/widgets/Editor.js +1 -1
  156. package/widgets/Feature/FeatureExpression/FeatureExpressionViewModel.js +1 -1
  157. package/widgets/Feature/FeatureRelationship/FeatureRelationshipViewModel.js +1 -1
  158. package/widgets/Feature/FeatureViewModel.js +1 -1
  159. package/widgets/Feature/support/featureUtils.js +1 -1
  160. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  161. package/widgets/Popup.js +1 -1
  162. package/widgets/support/decorators/accessibleHandler.js +1 -1
  163. package/assets/esri/core/workers/chunks/0948a40569b2408edefb.js +0 -1
  164. package/assets/esri/core/workers/chunks/192e3eeed50768c77c65.js +0 -1
  165. package/assets/esri/core/workers/chunks/1d1b9856f2f44d0c2144.js +0 -1
  166. package/assets/esri/core/workers/chunks/203115cc836e7b364eec.js +0 -1
  167. package/assets/esri/core/workers/chunks/20ad44b1a7adfed4c6c4.js +0 -1
  168. package/assets/esri/core/workers/chunks/27353056c3e4e8d8b8d3.js +0 -1
  169. package/assets/esri/core/workers/chunks/41ae9037c70461d5fdc7.js +0 -1
  170. package/assets/esri/core/workers/chunks/4b6a903d4aeeb4eeb615.js +0 -1
  171. package/assets/esri/core/workers/chunks/4bf9bc8b52d618f395c5.js +0 -1
  172. package/assets/esri/core/workers/chunks/5ec4fedbbcbb0053cf74.js +0 -2
  173. package/assets/esri/core/workers/chunks/60e29d172a2dcf45e8d0.js +0 -1
  174. package/assets/esri/core/workers/chunks/68a15cc7c51645d31572.js +0 -1
  175. package/assets/esri/core/workers/chunks/6b065e581bcf743079cf.js +0 -1
  176. package/assets/esri/core/workers/chunks/6c54579981a7bd483f1a.js +0 -1
  177. package/assets/esri/core/workers/chunks/778ecf61f07dafc51bbc.js +0 -1
  178. package/assets/esri/core/workers/chunks/7da1fd3629362b81b43c.js +0 -1
  179. package/assets/esri/core/workers/chunks/80d335bec34d60b7bbdc.js +0 -1
  180. package/assets/esri/core/workers/chunks/810da30f13151b72a293.js +0 -1
  181. package/assets/esri/core/workers/chunks/81485a5056aed94b3d8d.js +0 -1
  182. package/assets/esri/core/workers/chunks/8374d89e995f0d15c042.js +0 -1
  183. package/assets/esri/core/workers/chunks/8ebda132068f6b962dd9.js +0 -1
  184. package/assets/esri/core/workers/chunks/8f553ae2f1aba4e0371f.js +0 -1
  185. package/assets/esri/core/workers/chunks/8fec9979ae2b0e3a878f.js +0 -1
  186. package/assets/esri/core/workers/chunks/979ea2e3b1b164334634.js +0 -1
  187. package/assets/esri/core/workers/chunks/a0e92dd27c8f6b642dbf.js +0 -1
  188. package/assets/esri/core/workers/chunks/a6240bf258b3886a6661.js +0 -1
  189. package/assets/esri/core/workers/chunks/b059cd03f31ead61abb4.js +0 -1
  190. package/assets/esri/core/workers/chunks/b1a8024bf8cdd0cd3884.js +0 -1
  191. package/assets/esri/core/workers/chunks/b366e0db9b5f27dd53a3.js +0 -1
  192. package/assets/esri/core/workers/chunks/b976d5599672665561ec.js +0 -1
  193. package/assets/esri/core/workers/chunks/c260ac058e63a5c0cf60.js +0 -1
  194. package/assets/esri/core/workers/chunks/c646dc9da08b509e39d6.js +0 -1
  195. package/assets/esri/core/workers/chunks/db5598944b691e43f13e.js +0 -1
  196. package/assets/esri/core/workers/chunks/eb163a2ddeb27c690308.js +0 -1
  197. package/assets/esri/core/workers/chunks/eec12b5666819bf2119d.js +0 -1
  198. package/assets/esri/core/workers/chunks/ef05496c1faf08d247f1.js +0 -1
  199. package/assets/esri/core/workers/chunks/f05634909c9449533193.js +0 -1
  200. package/assets/esri/core/workers/chunks/fcebd70b089dea833c75.js +0 -1
  201. package/views/layers/GraphicsView.js +0 -5
  202. /package/assets/esri/core/workers/chunks/{a5c33b24b7ee042cb473.js.LICENSE.txt → 51a0d1dabe7415515c77.js.LICENSE.txt} +0 -0
  203. /package/assets/esri/core/workers/chunks/{5ec4fedbbcbb0053cf74.js.LICENSE.txt → c5c56b6d99db96a6755a.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1194,5935],{90444:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ht});var r=i(43697),n=i(51773),s=i(16453),o=i(95330),a=i(5600),l=i(75215),u=(i(67676),i(80442),i(52011)),p=i(30556),c=i(87085),d=i(66577),m=i(38171),h=i(30030),y=i(3172),f=i(20102),g=i(35454),b=i(22974),R=i(92604),v=i(17445),w=i(17452),_=i(71715),S=i(21506),C=i(35956),x=i(96674),I=i(40297);const F={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 D=i(81578),T=i(93010),j=i(75509),N=i(23847);const P=new Set(["u1","u2","u4","u8","s8","u16","s16"]),O={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 A(e){return V.has(e.type)}function M(e,t){if(!e||!t)return(0,b.d9)(e||t);const i=(0,b.d9)(e);if(i.rasterFunctionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(i.rasterFunctionDefinition.arguments,t)}else"none"!==t.functionName?.toLowerCase()&&(E(i.functionArguments).Raster=t);return i}function J(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&J(e[i].arguments,t))}function Z(e){const t=(0,b.d9)(F[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=Z(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function E(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?E(t.functionArguments):e}const q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const i=P.has(t)?(0,D.r)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function G(e){if(null==e)return;const{fields:t}=e,i=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return i&&i.name}function H(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function U(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,T.io)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var B=i(98974),L=i(69608);let Q=class extends x.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,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("renderingRule"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("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 i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new B.Z({where:i})),t}get renderingRule(){const e=this.layer;let t=e.renderingRule;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const n=e.multidimensionalSubset?.areaOfInterest;return n&&(t=this._addClipFunction(t,n)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.renderingRule,r&&A(r)?M(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new I.Z;r.functionName="Stretch";const n=q[j.v.toJSON(e.stretchType)],s="u8",o={StretchType:n,Statistics:H(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),n===q.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=s):n===q.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=s):n===q.minMax?r.outputPixelType=s:n===q.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const n=e.colorRamp,s=new I.Z;if(i)s.functionArguments={ColorRamp:(0,T.pM)(n)};else{const i=(0,T.Uh)(n);if(i)s.functionArguments={colorRamp:i};else if(!t.convertColorRampToColormap||"algorithmic"!==n.type&&"multipart"!==n.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")),s.functionArguments={colorRamp:t}}else s.functionArguments={Colormap:(0,T.Jw)(n)}}return s.variableName="Raster",s.functionName="Colormap",s.functionArguments.Raster=r,i?new I.Z({rasterFunctionDefinition:Z(s)}):s}return i?new I.Z({rasterFunctionDefinition:Z(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],n=[],s=[],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,i)=>{const r=t.symbol?.color;let n;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(n=o.attributes[e.field],(n>=t.minValue&&n<t.maxValue||i===e.classBreakInfos.length-1&&n>=t.minValue)&&s.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?z(s,a):s,r=new I.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),s.push([t,a.r,a.g,a.b])):n.push(e.minValue,e.maxValue)}));const c=a?z(s,a):s,d=new I.Z;d.functionName="Remap",d.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:n},d.variableName="Raster";const m=new I.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(m)}):m}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:n}=t,s=null==n?null:n.features,o=G(n),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(s){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r&&r.a&&t.set(String(i),r.toRgb())}));const r=e.field;s.forEach((({attributes:e})=>{const n=String(e[r]),s=e[o],l=t.get(n);l?i.push([s,...l]):a&&i.push([s,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,n=+t.value;if(r?.a){if(isNaN(n))return null;i.push([n,r.r,r.g,r.b])}}const u=r&&i.length>0?z(i,r):i,p=new I.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,n=r?z(i,r):i,s=new I.Z;return s.functionName="Colormap",s.functionArguments={},s.functionArguments.Colormap=n,t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(s)}):s}(e,t);case"vector-field":return function(e,t){const i=new I.Z;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:n}=t,s="vector-uv"===r;let o,a;if(n&&2===n.length){const e=n.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:s,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:O[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};return i.functionArguments=c,t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(i)}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=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 I.Z;const r=new I.Z;r.functionName="Hillshade";const n="traditional"===e.hillshadeType?0:1,s="none"===e.scalingType?1:3,o={HillshadeType:n,SlopeType:s,ZFactor:e.zFactor};return 0===n&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===s&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,T.pM)(e.colorRamp):o.Colormap=(0,T.Jw)(e.colorRamp)),i?new I.Z({rasterFunctionDefinition:Z(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.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,i=this.layer.serviceRasterInfo.pixelSize;let r=new I.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new I.Z({rasterFunctionDefinition:Z(r)}):r,M(r,e)}_addClipFunction(e,t){return M(new I.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,a.Cb)()],Q.prototype,"layer",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"adjustAspectRatio",null),(0,r._)([(0,p.c)("adjustAspectRatio")],Q.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"bandIds",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compression",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compressionQuality",null),(0,r._)([(0,p.c)("compressionQuality")],Q.prototype,"writeCompressionQuality",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compressionTolerance",null),(0,r._)([(0,p.c)("compressionTolerance")],Q.prototype,"writeCompressionTolerance",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"format",null),(0,r._)([(0,a.Cb)({type:String,json:{read:{reader:L.c.read},write:{writer:L.c.write}}})],Q.prototype,"interpolation",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"noData",null),(0,r._)([(0,a.Cb)({type:String,json:{read:{reader:L.k.read},write:{writer:L.k.write}}})],Q.prototype,"noDataInterpretation",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"pixelType",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"lercVersion",void 0),(0,r._)([(0,p.c)("lercVersion")],Q.prototype,"writeLercVersion",null),(0,r._)([(0,a.Cb)({type:Number})],Q.prototype,"version",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"mosaicRule",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"renderingRule",null),Q=(0,r._)([(0,u.j)("esri.layers.mixins.ExportImageServiceParameters")],Q);var k=i(1231),W=i(99514),$=i(90082),K=i(29876),X=i(5847),Y=i(25972),ee=i(88281),te=i(99815),ie=i(75993),re=i(80676),ne=i(67058),se=i(72758),oe=i(16306),ae=i(11282),le=i(82971);let ue=class extends x.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],ue.prototype,"north",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],ue.prototype,"up",void 0),(0,r._)([(0,a.Cb)({type:le.Z,json:{write:!0}})],ue.prototype,"spatialReference",void 0),ue=(0,r._)([(0,u.j)("esri.rest.support.ImageAngleResult")],ue);const pe=ue;var ce=i(67900);let de=class extends x.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,a.Cb)({type:Number,json:{read:!0,write:!0}})],de.prototype,"value",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],de.prototype,"displayValue",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{read:!0,write:!0}})],de.prototype,"uncertainty",void 0),de=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultValue")],de);let me=class extends de{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],me.prototype,"unit",void 0),me=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultLengthValue")],me);let he=class extends de{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:ce.gV.read,write:ce.gV.write}})],he.prototype,"unit",void 0),he=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultAreaValue")],he);let ye=class extends de{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:ce.CN.read,write:ce.CN.write}})],ye.prototype,"unit",void 0),ye=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultAngleValue")],ye);let fe=class extends x.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],fe.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],fe.prototype,"sensorName",void 0),fe=(0,r._)([(0,u.j)("esri.rest.support.BaseImageMeasureResult")],fe);let ge=class extends fe{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,a.Cb)({type:he,json:{read:!0,write:!0}})],ge.prototype,"area",void 0),(0,r._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],ge.prototype,"perimeter",void 0),ge=(0,r._)([(0,u.j)("esri.rest.support.ImageAreaResult")],ge);const be=ge;let Re=class extends fe{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],Re.prototype,"distance",void 0),(0,r._)([(0,a.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"azimuthAngle",void 0),(0,r._)([(0,a.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"elevationAngle",void 0),Re=(0,r._)([(0,u.j)("esri.rest.support.ImageDistanceResult")],Re);const ve=Re;let we=class extends fe{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],we.prototype,"height",void 0),we=(0,r._)([(0,u.j)("esri.rest.support.ImageHeightResult")],we);const _e=we;var Se=i(94139),Ce=i(74889);let xe=class extends x.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,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,a.Cb)({type:Ce.Z,json:{write:!0}})],xe.prototype,"catalogItems",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],xe.prototype,"location",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"objectId",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"processedValues",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"properties",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"value",void 0),xe=(0,r._)([(0,u.j)("esri.rest.support.ImageIdentifyResult")],xe);const Ie=xe;let Fe=class extends x.wq{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,a.Cb)({json:{write:!0}})],Fe.prototype,"geometries",void 0),Fe=(0,r._)([(0,u.j)("esri.rest.support.ImagePixelLocationResult")],Fe);const De=Fe;let Te=class extends fe{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,a.Cb)({type:Se.Z,json:{name:"point.value",read:!0,write:!0}})],Te.prototype,"point",void 0),Te=(0,r._)([(0,u.j)("esri.rest.support.ImagePointResult")],Te);const je=Te;let Ne=class extends x.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"attributes",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Ne.prototype,"location",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"locationId",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"rasterId",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"resolution",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"pixelValue",void 0),Ne=(0,r._)([(0,u.j)("esri.rest.support.ImageSample")],Ne);const Pe=Ne;let Oe=class extends x.wq{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,a.Cb)({type:[Pe],json:{write:!0}})],Oe.prototype,"samples",void 0),Oe=(0,r._)([(0,u.j)("esri.rest.support.ImageSampleResult")],Oe);const Ve=Oe;function Ae(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function Me(e,t,i){const r=(0,ae.en)(e),n=t.geometry?[t.geometry]:[],s=await(0,oe.aX)(n),o=t.toJSON();Ae(o);const a=s&&s[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ae.cv)({...r.query,f:"json",...o});return(0,ae.lA)(l,i)}async function Je(e,t,i){const r=(0,ae.en)(e),n=t.geometry?[t.geometry]:[];return(0,oe.aX)(n).then((e=>{const n=t.toJSON(),s=e&&e[0];null!=s&&(n.geometry=JSON.stringify(s.toJSON()));const o=(0,ae.cv)({...r.query,f:"json",...n}),a=(0,ae.lA)(o,i);return(0,y.default)(r.path+"/identify",a)})).then((e=>Ie.fromJSON(e.data)))}async function Ze(e,t,i){const r=await Ee(e,t,[t.fromGeometry,t.toGeometry],i);return ve.fromJSON(r)}async function Ee(e,t,i,r){const n=(0,ae.en)(e),s=await(0,oe.aX)(i),o=t.toJSON();null!=s[0]&&(o.fromGeometry=JSON.stringify(qe(s[0]))),null!=s[1]&&(o.toGeometry=JSON.stringify(qe(s[1])));const a=(0,ae.cv)({...n.query,f:"json",...o}),l=(0,ae.lA)(a,r),{data:u}=await(0,y.default)(n.path+"/measure",l);return u}function qe(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ze(e.spatialReference)),t}function ze(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function Ge(e,t){const i=ze(e),{icsid:r,icsns:n,wkid:s}=i;return null!=r?null==n||t?.toLowerCase().includes("/"+n.toLowerCase()+"/")?`0:${r}`:JSON.stringify(i):s?s.toString():JSON.stringify(i)}i(10158);var He,Ue=i(4967),Be=(i(68773),i(40330),i(8744),i(98732),i(6570)),Le=(i(9361),i(65091)),Qe=i(38913),ke=(i(58901),i(45091),i(14165)),We=(i(98326),i(56545),i(41818)),$e=i(5396),Ke=(i(75935),i(28141),i(26059)),Xe=i(36679);let Ye=He=class extends x.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new He((0,b.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,a.Cb)({type:[String],json:{name:"angleName",write:!0}})],Ye.prototype,"angleNames",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Ye.prototype,"point",void 0),(0,r._)([(0,a.Cb)({type:le.Z,json:{write:!0}})],Ye.prototype,"spatialReference",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],Ye.prototype,"rasterId",void 0),Ye=He=(0,r._)([(0,u.j)("esri.rest.support.ImageAngleParameters")],Ye);const et=Ye;var tt=i(33955);const it=new g.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 rt=class extends x.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0}};var nt;(0,r._)([(0,a.Cb)()],rt.prototype,"type",void 0),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],rt.prototype,"measureOperation",void 0),(0,r._)([(0,a.Cb)({type:B.Z,json:{write:!0}})],rt.prototype,"mosaicRule",void 0),(0,r._)([(0,a.Cb)({type:I.Z,json:{write:!0}})],rt.prototype,"renderingRule",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],rt.prototype,"pixelSize",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],rt.prototype,"raster",void 0),rt=(0,r._)([(0,u.j)("esri.rest.support.BaseImageMeasureParameters")],rt);let st=nt=class extends rt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new nt((0,b.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({types:d.qM,json:{name:"fromGeometry",read:!0,write:!0}})],st.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],st.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{write:it.write}})],st.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],st.prototype,"is3D",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],st.prototype,"linearUnit",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.gV.read,write:ce.gV.write}})],st.prototype,"areaUnit",void 0),st=nt=(0,r._)([(0,u.j)("esri.rest.support.ImageAreaParameters")],st);const ot=st;var at;let lt=at=class extends rt{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,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new at((0,b.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],lt.prototype,"fromGeometry",void 0),(0,r._)([(0,p.c)("fromGeometry")],lt.prototype,"writeFromGeometry",null),(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],lt.prototype,"toGeometry",void 0),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{write:it.write}})],lt.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],lt.prototype,"is3D",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],lt.prototype,"linearUnit",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.CN.read,write:ce.CN.write}})],lt.prototype,"angularUnit",void 0),lt=at=(0,r._)([(0,u.j)("esri.rest.support.ImageDistanceParameters")],lt);const ut=lt;var pt;let ct=pt=class extends rt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new pt((0,b.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0}})],ct.prototype,"fromGeometry",void 0),(0,r._)([(0,p.c)("fromGeometry")],ct.prototype,"writeFromGeometry",null),(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],ct.prototype,"toGeometry",void 0),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{write:it.write}})],ct.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],ct.prototype,"operationType",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],ct.prototype,"linearUnit",void 0),ct=pt=(0,r._)([(0,u.j)("esri.rest.support.ImageHeightParameters")],ct);const dt=ct;var mt,ht=i(79681),yt=i(92835);let ft=mt=class extends x.wq{constructor(){super(...arguments),this.geometry=null,this.renderingRules=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=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,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=I.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}writeRenderingRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRenderingRules(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,n=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=n?`${r},${n}`:`${r}`:null}}clone(){return new mt((0,b.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,a.Cb)({json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],ft.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:B.Z,json:{write:!0}})],ft.prototype,"mosaicRule",null),(0,r._)([(0,p.c)("mosaicRule")],ft.prototype,"writeMosaicRule",null),(0,r._)([(0,a.Cb)({type:I.Z,json:{write:!0}})],ft.prototype,"renderingRule",null),(0,r._)([(0,p.c)("renderingRule")],ft.prototype,"writeRenderingRule",null),(0,r._)([(0,a.Cb)({type:[I.Z],json:{write:!0}})],ft.prototype,"renderingRules",void 0),(0,r._)([(0,p.c)("renderingRules")],ft.prototype,"writeRenderingRules",null),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],ft.prototype,"pixelSize",void 0),(0,r._)([(0,p.c)("pixelSize")],ft.prototype,"writePixelSize",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnGeometry",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnCatalogItems",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPixelValues",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],ft.prototype,"maxItemCount",void 0),(0,r._)([(0,a.Cb)({type:yt.Z,json:{write:{target:"time"}}})],ft.prototype,"timeExtent",void 0),(0,r._)([(0,p.c)("timeExtent")],ft.prototype,"writeTimeExtent",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],ft.prototype,"raster",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],ft.prototype,"viewId",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"processAsMultidimensional",void 0),ft=mt=(0,r._)([(0,u.j)("esri.rest.support.ImageIdentifyParameters")],ft);const gt=ft;var bt;let Rt=bt=class extends x.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new bt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,a.Cb)({type:[Se.Z],json:{write:!0}})],Rt.prototype,"geometries",void 0),(0,r._)([(0,p.c)("geometries")],Rt.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],Rt.prototype,"rasterId",void 0),Rt=bt=(0,r._)([(0,u.j)("esri.rest.support.ImagePixelLocationParameters")],Rt);const vt=Rt;var wt;let _t=wt=class extends rt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=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 wt((0,b.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({types:d.qM,json:{name:"fromGeometry",read:tt.im}})],_t.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],_t.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],_t.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],_t.prototype,"is3D",void 0),_t=wt=(0,r._)([(0,u.j)("esri.rest.support.ImagePointParameters")],_t);const St=_t;var Ct;let xt=Ct=class extends x.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Le.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,b.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,r._)([(0,a.Cb)({types:d.qM,json:{read:tt.im}})],xt.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],xt.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)()],xt.prototype,"locations",null),(0,r._)([(0,a.Cb)({type:String,json:{type:L.c.jsonValues,read:L.c.read,write:L.c.write}})],xt.prototype,"interpolation",void 0),(0,r._)([(0,a.Cb)({type:B.Z,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,r._)([(0,a.Cb)({type:[String],json:{write:!0}})],xt.prototype,"outFields",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],xt.prototype,"raster",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleDistance",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleCount",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sliceId",void 0),(0,r._)([(0,a.Cb)({type:yt.Z,json:{read:{source:"time"},write:{target:"time"}}})],xt.prototype,"timeExtent",void 0),xt=Ct=(0,r._)([(0,u.j)("esri.rest.support.ImageSampleParameters")],xt);const It=xt;var Ft=i(23808);const Dt=(0,g.w)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),Tt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),jt=(0,a.Eg)(l.q9,{min:0,max:255}),Nt=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 Q({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().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?B.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new W.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 i=e||t.mosaicRule;return i?B.Z.fromJSON(i):this._isMosaicRuleSupported(t)?B.Z.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const n=this.definitionExpression;r?n&&n!==r.where&&(r=r.clone(),r.where=n):n&&(r=new B.Z({where:n})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=jt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i&&i[0]&&i[0].name}return e}get parsedUrl(){return(0,w.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,i){const r=t?.layerDefinition?.drawingInfo?.renderer,n=(0,h.ij)(r,i);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!r.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),A(n)||R.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix||"Raster.",t=new k.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new k.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new k.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let n=this.fields?(0,b.d9)(this.fields):[];n.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&n.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{n.push(new k.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(n.push(new k.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new k.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:s}=this.rasterInfo??{};if(null!=s){const t=s.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,b.d9)(t);return i.name=e+t.name,i}));n=n.concat(t)}return n}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=I.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i&&i.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?I.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):I.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,i){const r=e.toJSON();r.rasterFunctionDefinition?t[i]=r.rasterFunctionDefinition:t[i]=r}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?le.Z.fromJSON(i):null}readPixelType(e){return Dt.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=Dt.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:n,pixelFilter:s,bandIds:o}=this;if(!this._isPicture()&&r&&n&&!s){const s=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){s&&(n.bind(),await a.updateSymbolizer(n,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:n.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new f.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,l.TJ)(et,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),null!=t.point&&t.point.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=ze(t.point.spatialReference)),null!=t.spatialReference&&t.spatialReference.imageCoordinateSystem&&(r.spatialReference=Ge(t.spatialReference));const n=(0,ae.en)(e),s=(0,ae.cv)({...n.query,f:"json",...r}),o=(0,ae.lA)(s,i),{data:a}=await(0,y.default)(`${n.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new le.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):le.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new pe(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new f.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,l.TJ)(vt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:n}=t;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=ze(n[e].spatialReference));const s=(0,ae.en)(e),o=(0,ae.cv)({...s.query,f:"json",...r}),a=(0,ae.lA)(o,i),{data:l}=await(0,y.default)(`${s.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 f.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,l.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Me(e,t,i),n=(0,ae.en)(e),{data:s}=await(0,y.default)(`${n.path}/computeHistograms`,r);return{histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new f.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,l.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Me(e,t,i),n=(0,ae.en)(e),{data:s}=await(0,y.default)(`${n.path}/computeStatisticsHistograms`,r),{statistics:o}=s;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new f.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,l.TJ)(dt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ee(e,t,[t.fromGeometry,t.toGeometry],i);return _e.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new f.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,l.TJ)(ot,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ee(e,t,[t.geometry],i);return be.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new f.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,l.TJ)(ut,e).clone(),this._applyMosaicAndRenderingRules(e),Ze(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new f.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,l.TJ)(St,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ee(e,t,[t.geometry],i);return je.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,n={}){if(null==e||null==t||null==r)throw new f.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.renderingRule,{signal:n.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,r,n.timeExtent);if(null==s){if(n.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,n.returnImageBitmap?{imageBitmap:await(0,$.g)(e,`${i(this.parsedUrl)}/exportImage`,n.signal)}:{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:o}=this,a=(s?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(X.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new X.Z({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const o=!!n.requestAsImageElement&&!this.pixelFilter,a=o&&!!n.returnImageBitmap,l={imageServiceParameters:s,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:o,returnImageBitmap:a,signal:n.signal};return this._requestArrayBuffer(l)}fetchKeyProperties(e){return(0,y.default)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new f.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,y.default)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>Ce.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ae.en)(e),n=(0,ae.cv)({...r?.query,f:"json"}),s=(0,ae.lA)(n,i),o=`${r?.path}/${t}/info`,a=(0,y.default)(`${o}`,s),l=(0,y.default)(`${o}/keyProperties`,s),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=Be.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),f=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new Se.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),R=p.histograms?.length?p.histograms:null,v=new Xe.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new Y.Z({width:h,height:f,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:R,keyProperties:c,storageInfo:v})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,y.default)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),n=r&&r.ics;if(!n)return;let s=null;try{s=(await(0,y.default)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:n,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,y.default)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,y.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,d=s.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},f=(0,y.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,f]);let b=g[0].ipxf;if(null==b){const e=n.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 R=Be.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);R&&(R.spatialReference=new le.Z({wkid:0,imageCoordinateSystem:n}));const v=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],w=v.length;if(w<3)return{ics:n,icsToPixelTransform:b,icsExtent:R,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<w;e++)_+=v[e].x,S+=v[e].y,C+=v[e].x*v[e].x,x+=v[e].x*v[e].y;const I=(w*x-_*S)/(w*C-_*_);let F=0;const D=v[4].x>v[0].x,T=v[4].y>v[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:n,icsToPixelTransform:b,icsExtent:R,northDirection:F}}async generateRasterInfo(e,t){if(e=(0,l.TJ)(I.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),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!i)return null;if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const r=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=r;try{return await r}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,r,n){const s=Ge((e=e.clone().shiftCentralMeridian()).spatialReference,i(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.renderingRule?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRenderingRule(this.renderingRule)&&!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,n,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,n=d.timeExtent,o.renderingRule=this._getRenderingRuleString(I.Z.fromJSON(u));const m={};if(null!=n){const{start:e,end:t}=n.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:s,imageSR:s,size:t+","+r,...o,...m}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new f.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,l.TJ)(It,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();Ae(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const n=await(0,oe.aX)(t.geometry),s=n?.[0];null!=s&&(r.geometry=s.toJSON());const o=(0,ae.en)(e),a=(0,ae.cv)({...o.query,f:"json",...r}),l=(0,ae.lA)(a,i),{data:u}=await(0,y.default)(`${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 f.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,l.TJ)(gt,e).clone();const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new f.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,renderingRule:n}=this;return n&&null==e.renderingRule&&(e.renderingRule=n),r&&null==e.raster&&(e.raster=r),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 f.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:s}=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>u.length)).map((e=>{const t=e.slice(u.length+1);return[this._updateRenderingRulesFunctionName(t,p),t]}));a=t.map((e=>new I.Z({functionName:e[0]}))),l=t.map((e=>e[1]));const{renderingRule:i}=this;0===a.length?i?.functionName?(a.push(i),l.push(i.functionName)):a=null:i?.functionName&&!a.some((e=>e.functionName===i.functionName))&&(a.push(i),l.push(i.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:i}=(0,te.W2)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new f.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");i&&null!=i.timeExtent&&(m=i.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,m),y=this._getQueryParams({geometry:e.geometry,timeExtent:m,mosaicRule:h,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:a,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:n?1:null});delete y.f;const g=new gt(y);try{await this.generateRasterInfo(this.renderingRule);const i=await Je(this.url,g,{signal:t?.signal,query:{...this.customParameters}}),n=e.outFields,a=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!o||c||!i?.catalogItems?.features.length||!s&&a)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:s,templateFields:n});const u=this.objectIdField||"ObjectId",p=i.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((i=>{i.attributes[u]===t.attributes[u]&&(i.geometry=new Qe.Z(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:s,templateFields:n})}catch{throw new f.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,y.default)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),n=(0,y.default)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,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,te.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ke.g)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),n=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,n,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),R.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.YP)((()=>this.renderingRule),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:n}=i,s=r.variables.some((e=>e.dimensions.some((e=>e.name===n))))?n:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),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===s&&(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=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new C.Z({variableName:"",dimensionName:s,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 f.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,l.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 ee.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,renderingRule:i}=this;return"unique-value"===e.type&&this._hasRenderingRule(i)&&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:r,ssl:n}=await(0,y.default)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,n&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new f.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),n=i?.ResampleType||i?.resampleType;return r&&(7===n||10===n)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,ne.YD)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ne.Ob)(i,{bandIds:this.bandIds,variableName:this.renderingRule?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ne.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new se.Z({rendererJSON:t,rasterInfo:i}),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:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ie.J)(e,t,i)}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 r=await(0,y.default)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:s}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,y.default)(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});return o instanceof Blob?{imageBitmap:await(0,$.g)(o,r,s),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,y.default)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),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 f.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:s},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){const r={...t,query:this._getQueryParams()};return(0,Ke.N)(i(this.parsedUrl),e,r)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,te.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.renderingRule&&"none"!==this.renderingRule.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 i=e.value,{templateRRFunctionNames:r,showNoDataRecords:n,returnDomainValues:s,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.replace(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),d=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new m.Z(this.fullExtent,null,e)]}if(!l)return[];let h,y,f;this._updateResponseFieldNames(l,o),c&&!n&&(l=[]);for(let e=0;e<l.length;e++){if(h=l[e],null!=i){if(y=u[e],f=this.renderingRule&&a&&a.length>0&&r&&r.length>0&&r.includes(this.renderingRule.functionName)?a[r.indexOf(this.renderingRule.functionName)]:i,"nodata"===y.toLowerCase()&&!n)continue;const t="Raster.ItemPixelValue",s="Raster.ServicePixelValue";h.attributes[t]=y,h.attributes[s]=f,this._updateFeatureWithMagDirValues(h,y);const o=this.fields&&this.fields.length>0;let l=this.renderingRule&&null!=this.serviceRasterInfo.attributeTable?o?y:i:f;this.renderingRule||(l=o?y:i),this._updateFeatureWithRasterAttributeTableValues(h,l)}if(h.sourceLayer=h.layer=this,s&&this._updateFeatureWithDomainValues(h),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];h.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:n}=(0,te.W2)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};n&&null!=n.timeExtent&&(t=n.timeExtent)}if(null!=(i=this._combineMosaicRuleWithTimeExtent(i,t))&&i.multidimensionalDefinition){const{isOutside:e}=(0,te.W2)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:n}=i,s=n.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=s&&s[0];if(!o)return;const a=r.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));a&&a[0]&&n.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),n=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),s=new X.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:n});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:s,extent:new Be.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[s.pixels[0][0],s.pixels[1][0]]:(0,re.Tg)([s.pixels[0][0],s.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 i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e&&e.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=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}_hasRenderingRule(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 i=e.toLowerCase().replace(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,renderingRule:r}=this;r&&null==e.renderingRule&&(e.renderingRule=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:n}=e,s=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:s,supportsExportImage:s,supportsIdentify:s,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&t.includes("catalog"),supportsComputeAngles:i>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1},query:{maxRecordCount:n,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,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 i(e){return e?.path??""}return(0,r._)([(0,a.Cb)()],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,_.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,a.Cb)()],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,a.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,a.Cb)({type:[l.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,_.r)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,_.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,a.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,p.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,a.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,p.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,a.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,_.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,a.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,type:[k.Z]})],t.prototype,"fields",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,a.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,_.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,a.Cb)({type:Be.Z})],t.prototype,"fullExtent",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,a.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,a.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,a.Cb)({type:String,json:{type:L.c.jsonValues,read:L.c.read,write:L.c.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,_.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,a.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,_.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,a.Cb)({type:B.Z})],t.prototype,"mosaicRule",null),(0,r._)([(0,_.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,p.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,a.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,a.Cb)({type:K.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,a.Cb)({json:{type:l.z8}})],t.prototype,"noData",void 0),(0,r._)([(0,p.c)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,a.Cb)({type:String,json:{type:L.k.jsonValues,read:L.k.read,write:L.k.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,a.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,_.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,a.Cb)({})],t.prototype,"geometryType",void 0),(0,r._)([(0,a.Cb)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,a.Cb)({})],t.prototype,"types",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,a.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,_.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,a.Cb)()],t.prototype,"viewId",void 0),(0,r._)([(0,a.Cb)({types:h.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:h.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,_.r)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,p.c)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,a.Cb)()],t.prototype,"symbolizer",void 0),(0,r._)([(0,a.Cb)(S.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,a.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,a.Cb)({type:I.Z})],t.prototype,"renderingRule",null),(0,r._)([(0,_.r)("renderingRule",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRenderingRule",null),(0,r._)([(0,p.c)("renderingRule")],t.prototype,"writeRenderingRule",null),(0,r._)([(0,a.Cb)()],t.prototype,"serviceDataType",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,type:le.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,_.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,a.Cb)({json:{type:Dt.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,_.r)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,p.c)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,a.Cb)({constructOnly:!0,type:Y.Z})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,a.Cb)(S.HQ)],t.prototype,"url",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,_.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,u.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=i(17287),Ot=i(71612),Vt=i(17017),At=i(38009),Mt=i(16859),Jt=i(34760),Zt=i(72965),Et=i(28294),qt=i(60199),zt=i(32163);let Gt=class extends((0,Ot.h)((0,Et.n)((0,Zt.M)((0,At.q)((0,Mt.I)(Nt((0,Jt.Q)((0,Vt.N)((0,Pt.Y)((0,s.R)(c.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(o.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let n=!1,s=!1;this.capabilities&&(n=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,s="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;n&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}return s&&r.add("raster.magnitude").add("raster.direction"),(0,zt.eZ)({fields:t,title:i},{...e,visibleFieldNames:r})}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}serviceSupportsSpatialReference(e){return(0,qt.D)(this,e)}};(0,r._)([(0,a.Cb)(S.rn)],Gt.prototype,"legendEnabled",void 0),(0,r._)([(0,a.Cb)({type:["show","hide"]})],Gt.prototype,"listMode",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Gt.prototype,"isReference",void 0),(0,r._)([(0,a.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Gt.prototype,"operationalLayerType",void 0),(0,r._)([(0,p.c)("web-map","operationalLayerType")],Gt.prototype,"writeOperationalLayerType",null),(0,r._)([(0,a.Cb)(S.C_)],Gt.prototype,"popupEnabled",void 0),(0,r._)([(0,a.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Gt.prototype,"popupTemplate",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],Gt.prototype,"defaultPopupTemplate",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],Gt.prototype,"type",void 0),Gt=(0,r._)([(0,u.j)("esri.layers.ImageryLayer")],Gt);const Ht=Gt},17287:(e,t,i)=>{i.d(t,{Y:()=>l});var r=i(43697),n=i(92604),s=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(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,n.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},90082:(e,t,i)=>{i.d(t,{V:()=>o,g:()=>s});var r=i(20102),n=i(95330);async function s(e,t,i){let s;try{s=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.k_)(i),s}async function o(e,t,i,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load tile ${t}/${i}/${s}`,{error:e,level:t,row:i,col:s})}return(0,n.k_)(o),a}},60199:(e,t,i)=>{i.d(t,{D:()=>s});var r=i(66677);const n=[];function s(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of n){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}n.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}]),n.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}]),n.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}]),n.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}]),n.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}]),n.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}]),n.push([10.61,()=>new Set([102497])]),n.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}]),n.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}]),n.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,i)=>{i.d(t,{P:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.hH)(o,s.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.Ev)(o,s.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>a});var r=i(11282),n=i(34599),s=i(74889),o=i(14165);async function a(e,t,i){const r=await l(e,t,i);return s.Z.fromJSON(r)}async function l(e,t,i){const s=(0,r.en)(e),a={...i},l=o.Z.from(t),{data:u}=await(0,n.JT)(s,l,l.sourceSpatialReference,a);return u}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(69285);function n(e,t,i){if(!i||!i.features||!i.hasZ)return;const n=(0,r.k)(i.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of i.features)n(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,n=i(43697),s=i(96674),o=i(5600),a=i(75215),l=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends s.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const n=t.find((e=>e.name===i));return n?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r&&r.value||null}({tagName:r,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,n._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,n._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,i)=>{i.d(t,{Z:()=>d});var r,n=i(43697),s=i(96674),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556);let c=r=class extends s.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 r((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,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,n._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,n=i(43697),s=(i(66577),i(96674)),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556),c=i(10158),d=i(82971);let m=r=class extends s.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 r((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,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,n._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,n._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,n._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,i)=>{i.d(t,{Z:()=>_});var r,n=i(43697),s=i(66577),o=i(92835),a=i(35454),l=i(96674),u=i(22974),p=i(5600),c=i(75215),d=i(52011),m=i(30556),h=i(33955);i(67676),i(80442);let y=r=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,n._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=i(82971);const R=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"}),v=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 w=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,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],w.prototype,"cacheHint",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],w.prototype,"distance",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{read:h.im,write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],w.prototype,"geometryPrecision",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],w.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],w.prototype,"num",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],w.prototype,"orderByFields",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],w.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],w.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"resultType",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"returnGeometry",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"returnM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"returnZ",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],w.prototype,"start",void 0),(0,n._)([(0,m.c)("start"),(0,m.c)("num")],w.prototype,"writeStart",null),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:R.read},write:{target:"spatialRel",writer:R.write}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),(0,n._)([(0,p.Cb)({type:f,json:{write:!0}})],w.prototype,"topFilter",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],w.prototype,"units",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),w=g=(0,n._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],w),w.from=(0,c.se)(w);const _=w}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1194,5935],{90444:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ht});var r=i(43697),n=i(51773),s=i(16453),o=i(95330),a=i(5600),l=i(75215),u=(i(67676),i(80442),i(52011)),p=i(30556),c=i(87085),d=i(66577),m=i(38171),h=i(30030),y=i(3172),f=i(20102),g=i(35454),b=i(22974),R=i(92604),v=i(17445),w=i(17452),_=i(71715),S=i(21506),C=i(35956),x=i(96674),I=i(40297);const F={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 D=i(81578),T=i(93010),j=i(75509),N=i(23847);const P=new Set(["u1","u2","u4","u8","s8","u16","s16"]),O={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 A(e){return V.has(e.type)}function M(e,t){if(!e||!t)return(0,b.d9)(e||t);const i=(0,b.d9)(e);if(i.rasterFunctionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(i.rasterFunctionDefinition.arguments,t)}else"none"!==t.functionName?.toLowerCase()&&(E(i.functionArguments).Raster=t);return i}function J(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&J(e[i].arguments,t))}function Z(e){const t=(0,b.d9)(F[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=Z(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function E(e){const t=e?.Raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?E(t.functionArguments):e}const q={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function z(e,t){const i=P.has(t)?(0,D.r)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function G(e){if(null==e)return;const{fields:t}=e,i=t&&t.find((e=>e&&e.name&&"value"===e.name.toLowerCase()));return i&&i.name}function H(e){const t=[];return e?.forEach((e=>{const i=e;if(Array.isArray(i))t.push(i);else{if(null==i.min||null==i.max)return;const e=[i.min,i.max,i.avg||0,i.stddev||0];t.push(e)}})),t}function U(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,T.io)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var B=i(98974),L=i(69608);let Q=class extends x.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,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("renderingRule"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("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 i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new B.Z({where:i})),t}get renderingRule(){const e=this.layer;let t=e.renderingRule;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const n=e.multidimensionalSubset?.areaOfInterest;return n&&(t=this._addClipFunction(t,n)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.renderingRule,r&&A(r)?M(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new I.Z;r.functionName="Stretch";const n=q[j.v.toJSON(e.stretchType)],s="u8",o={StretchType:n,Statistics:H(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),n===q.standardDeviation?(o.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=s):n===q.percentClip?(o.MinPercent=e.minPercent,o.MaxPercent=e.maxPercent,r.outputPixelType=s):n===q.minMax?r.outputPixelType=s:n===q.sigmoid&&(o.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=o,r.variableName="Raster",e.colorRamp){const n=e.colorRamp,s=new I.Z;if(i)s.functionArguments={ColorRamp:(0,T.pM)(n)};else{const i=(0,T.Uh)(n);if(i)s.functionArguments={colorRamp:i};else if(!t.convertColorRampToColormap||"algorithmic"!==n.type&&"multipart"!==n.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")),s.functionArguments={colorRamp:t}}else s.functionArguments={Colormap:(0,T.Jw)(n)}}return s.variableName="Raster",s.functionName="Colormap",s.functionArguments.Raster=r,i?new I.Z({rasterFunctionDefinition:Z(s)}):s}return i?new I.Z({rasterFunctionDefinition:Z(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],n=[],s=[],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,i)=>{const r=t.symbol?.color;let n;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(n=o.attributes[e.field],(n>=t.minValue&&n<t.maxValue||i===e.classBreakInfos.length-1&&n>=t.minValue)&&s.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?z(s,a):s,r=new I.Z;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),s.push([t,a.r,a.g,a.b])):n.push(e.minValue,e.maxValue)}));const c=a?z(s,a):s,d=new I.Z;d.functionName="Remap",d.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:n},d.variableName="Raster";const m=new I.Z;return m.functionName="Colormap",m.functionArguments={Colormap:c,Raster:d},t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(m)}):m}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:n}=t,s=null==n?null:n.features,o=G(n),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(s){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=e.symbol?.color;null!=i&&r&&r.a&&t.set(String(i),r.toRgb())}));const r=e.field;s.forEach((({attributes:e})=>{const n=String(e[r]),s=e[o],l=t.get(n);l?i.push([s,...l]):a&&i.push([s,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=t.symbol?.color,n=+t.value;if(r?.a){if(isNaN(n))return null;i.push([n,r.r,r.g,r.b])}}const u=r&&i.length>0?z(i,r):i,p=new I.Z;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,n=r?z(i,r):i,s=new I.Z;return s.functionName="Colormap",s.functionArguments={},s.functionArguments.Colormap=n,t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(s)}):s}(e,t);case"vector-field":return function(e,t){const i=new I.Z;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:n}=t,s="vector-uv"===r;let o,a;if(n&&2===n.length){const e=n.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:s,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:O[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};return i.functionArguments=c,t.convertToRFT?new I.Z({rasterFunctionDefinition:Z(i)}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=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 I.Z;const r=new I.Z;r.functionName="Hillshade";const n="traditional"===e.hillshadeType?0:1,s="none"===e.scalingType?1:3,o={HillshadeType:n,SlopeType:s,ZFactor:e.zFactor};return 0===n&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===s&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,T.pM)(e.colorRamp):o.Colormap=(0,T.Jw)(e.colorRamp)),i?new I.Z({rasterFunctionDefinition:Z(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.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,i=this.layer.serviceRasterInfo.pixelSize;let r=new I.Z({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new I.Z({rasterFunctionDefinition:Z(r)}):r,M(r,e)}_addClipFunction(e,t){return M(new I.Z({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}};(0,r._)([(0,a.Cb)()],Q.prototype,"layer",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"adjustAspectRatio",null),(0,r._)([(0,p.c)("adjustAspectRatio")],Q.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"bandIds",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compression",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compressionQuality",null),(0,r._)([(0,p.c)("compressionQuality")],Q.prototype,"writeCompressionQuality",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"compressionTolerance",null),(0,r._)([(0,p.c)("compressionTolerance")],Q.prototype,"writeCompressionTolerance",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"format",null),(0,r._)([(0,a.Cb)({type:String,json:{read:{reader:L.c.read},write:{writer:L.c.write}}})],Q.prototype,"interpolation",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"noData",null),(0,r._)([(0,a.Cb)({type:String,json:{read:{reader:L.k.read},write:{writer:L.k.write}}})],Q.prototype,"noDataInterpretation",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"pixelType",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"lercVersion",void 0),(0,r._)([(0,p.c)("lercVersion")],Q.prototype,"writeLercVersion",null),(0,r._)([(0,a.Cb)({type:Number})],Q.prototype,"version",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"mosaicRule",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],Q.prototype,"renderingRule",null),Q=(0,r._)([(0,u.j)("esri.layers.mixins.ExportImageServiceParameters")],Q);var k=i(1231),W=i(99514),$=i(90082),K=i(29876),X=i(5847),Y=i(25972),ee=i(88281),te=i(99815),ie=i(75993),re=i(80676),ne=i(67058),se=i(72758),oe=i(16306),ae=i(11282),le=i(82971);let ue=class extends x.wq{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],ue.prototype,"north",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],ue.prototype,"up",void 0),(0,r._)([(0,a.Cb)({type:le.Z,json:{write:!0}})],ue.prototype,"spatialReference",void 0),ue=(0,r._)([(0,u.j)("esri.rest.support.ImageAngleResult")],ue);const pe=ue;var ce=i(67900);let de=class extends x.wq{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,a.Cb)({type:Number,json:{read:!0,write:!0}})],de.prototype,"value",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],de.prototype,"displayValue",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{read:!0,write:!0}})],de.prototype,"uncertainty",void 0),de=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultValue")],de);let me=class extends de{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],me.prototype,"unit",void 0),me=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultLengthValue")],me);let he=class extends de{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:ce.gV.read,write:ce.gV.write}})],he.prototype,"unit",void 0),he=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultAreaValue")],he);let ye=class extends de{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:ce.CN.read,write:ce.CN.write}})],ye.prototype,"unit",void 0),ye=(0,r._)([(0,u.j)("esri.rest.support.ImageMeasureResultAngleValue")],ye);let fe=class extends x.wq{constructor(){super(...arguments),this.name=null,this.sensorName=null}};(0,r._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],fe.prototype,"name",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:!0,write:!0}})],fe.prototype,"sensorName",void 0),fe=(0,r._)([(0,u.j)("esri.rest.support.BaseImageMeasureResult")],fe);let ge=class extends fe{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,a.Cb)({type:he,json:{read:!0,write:!0}})],ge.prototype,"area",void 0),(0,r._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],ge.prototype,"perimeter",void 0),ge=(0,r._)([(0,u.j)("esri.rest.support.ImageAreaResult")],ge);const be=ge;let Re=class extends fe{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],Re.prototype,"distance",void 0),(0,r._)([(0,a.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"azimuthAngle",void 0),(0,r._)([(0,a.Cb)({type:ye,json:{read:!0,write:!0}})],Re.prototype,"elevationAngle",void 0),Re=(0,r._)([(0,u.j)("esri.rest.support.ImageDistanceResult")],Re);const ve=Re;let we=class extends fe{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,a.Cb)({type:me,json:{read:!0,write:!0}})],we.prototype,"height",void 0),we=(0,r._)([(0,u.j)("esri.rest.support.ImageHeightResult")],we);const _e=we;var Se=i(94139),Ce=i(74889);let xe=class extends x.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,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,a.Cb)({type:Ce.Z,json:{write:!0}})],xe.prototype,"catalogItems",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],xe.prototype,"location",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"name",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"objectId",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"processedValues",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"properties",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],xe.prototype,"value",void 0),xe=(0,r._)([(0,u.j)("esri.rest.support.ImageIdentifyResult")],xe);const Ie=xe;let Fe=class extends x.wq{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,a.Cb)({json:{write:!0}})],Fe.prototype,"geometries",void 0),Fe=(0,r._)([(0,u.j)("esri.rest.support.ImagePixelLocationResult")],Fe);const De=Fe;let Te=class extends fe{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,a.Cb)({type:Se.Z,json:{name:"point.value",read:!0,write:!0}})],Te.prototype,"point",void 0),Te=(0,r._)([(0,u.j)("esri.rest.support.ImagePointResult")],Te);const je=Te;let Ne=class extends x.wq{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"attributes",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Ne.prototype,"location",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"locationId",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"rasterId",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"resolution",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],Ne.prototype,"pixelValue",void 0),Ne=(0,r._)([(0,u.j)("esri.rest.support.ImageSample")],Ne);const Pe=Ne;let Oe=class extends x.wq{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,a.Cb)({type:[Pe],json:{write:!0}})],Oe.prototype,"samples",void 0),Oe=(0,r._)([(0,u.j)("esri.rest.support.ImageSampleResult")],Oe);const Ve=Oe;function Ae(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function Me(e,t,i){const r=(0,ae.en)(e),n=t.geometry?[t.geometry]:[],s=await(0,oe.aX)(n),o=t.toJSON();Ae(o);const a=s&&s[0];null!=a&&(o.geometry=a.toJSON());const l=(0,ae.cv)({...r.query,f:"json",...o});return(0,ae.lA)(l,i)}async function Je(e,t,i){const r=(0,ae.en)(e),n=t.geometry?[t.geometry]:[];return(0,oe.aX)(n).then((e=>{const n=t.toJSON(),s=e&&e[0];null!=s&&(n.geometry=JSON.stringify(s.toJSON()));const o=(0,ae.cv)({...r.query,f:"json",...n}),a=(0,ae.lA)(o,i);return(0,y.default)(r.path+"/identify",a)})).then((e=>Ie.fromJSON(e.data)))}async function Ze(e,t,i){const r=await Ee(e,t,[t.fromGeometry,t.toGeometry],i);return ve.fromJSON(r)}async function Ee(e,t,i,r){const n=(0,ae.en)(e),s=await(0,oe.aX)(i),o=t.toJSON();null!=s[0]&&(o.fromGeometry=JSON.stringify(qe(s[0]))),null!=s[1]&&(o.toGeometry=JSON.stringify(qe(s[1])));const a=(0,ae.cv)({...n.query,f:"json",...o}),l=(0,ae.lA)(a,r),{data:u}=await(0,y.default)(n.path+"/measure",l);return u}function qe(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=ze(e.spatialReference)),t}function ze(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function Ge(e,t){const i=ze(e),{icsid:r,icsns:n,wkid:s}=i;return null!=r?null==n||t?.toLowerCase().includes("/"+n.toLowerCase()+"/")?`0:${r}`:JSON.stringify(i):s?s.toString():JSON.stringify(i)}i(10158);var He,Ue=i(4967),Be=(i(68773),i(40330),i(8744),i(98732),i(6570)),Le=(i(9361),i(65091)),Qe=i(38913),ke=(i(58901),i(45091),i(14165)),We=(i(98326),i(56545),i(41818)),$e=i(5396),Ke=(i(75935),i(28141),i(26059)),Xe=i(36679);let Ye=He=class extends x.wq{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new He((0,b.d9)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,a.Cb)({type:[String],json:{name:"angleName",write:!0}})],Ye.prototype,"angleNames",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],Ye.prototype,"point",void 0),(0,r._)([(0,a.Cb)({type:le.Z,json:{write:!0}})],Ye.prototype,"spatialReference",void 0),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],Ye.prototype,"rasterId",void 0),Ye=He=(0,r._)([(0,u.j)("esri.rest.support.ImageAngleParameters")],Ye);const et=Ye;var tt=i(33955);const it=new g.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 rt=class extends x.wq{constructor(){super(...arguments),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.renderingRule=null,this.pixelSize=null,this.raster=void 0}};var nt;(0,r._)([(0,a.Cb)()],rt.prototype,"type",void 0),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],rt.prototype,"measureOperation",void 0),(0,r._)([(0,a.Cb)({type:B.Z,json:{write:!0}})],rt.prototype,"mosaicRule",void 0),(0,r._)([(0,a.Cb)({type:I.Z,json:{write:!0}})],rt.prototype,"renderingRule",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],rt.prototype,"pixelSize",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],rt.prototype,"raster",void 0),rt=(0,r._)([(0,u.j)("esri.rest.support.BaseImageMeasureParameters")],rt);let st=nt=class extends rt{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new nt((0,b.d9)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({types:d.qM,json:{name:"fromGeometry",read:!0,write:!0}})],st.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],st.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{write:it.write}})],st.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],st.prototype,"is3D",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],st.prototype,"linearUnit",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.gV.read,write:ce.gV.write}})],st.prototype,"areaUnit",void 0),st=nt=(0,r._)([(0,u.j)("esri.rest.support.ImageAreaParameters")],st);const ot=st;var at;let lt=at=class extends rt{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,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new at((0,b.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],lt.prototype,"fromGeometry",void 0),(0,r._)([(0,p.c)("fromGeometry")],lt.prototype,"writeFromGeometry",null),(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],lt.prototype,"toGeometry",void 0),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{write:it.write}})],lt.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],lt.prototype,"is3D",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],lt.prototype,"linearUnit",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.CN.read,write:ce.CN.write}})],lt.prototype,"angularUnit",void 0),lt=at=(0,r._)([(0,u.j)("esri.rest.support.ImageDistanceParameters")],lt);const ut=lt;var pt;let ct=pt=class extends rt{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new pt((0,b.d9)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0}})],ct.prototype,"fromGeometry",void 0),(0,r._)([(0,p.c)("fromGeometry")],ct.prototype,"writeFromGeometry",null),(0,r._)([(0,a.Cb)({type:Se.Z,json:{read:!0,write:!0}})],ct.prototype,"toGeometry",void 0),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{write:it.write}})],ct.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],ct.prototype,"operationType",void 0),(0,r._)([(0,a.Cb)({type:String,json:{read:ce.Jo.read,write:ce.Jo.write}})],ct.prototype,"linearUnit",void 0),ct=pt=(0,r._)([(0,u.j)("esri.rest.support.ImageHeightParameters")],ct);const dt=ct;var mt,ht=i(79681),yt=i(92835);let ft=mt=class extends x.wq{constructor(){super(...arguments),this.geometry=null,this.renderingRules=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=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,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=I.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}writeRenderingRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRenderingRules(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,n=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=n?`${r},${n}`:`${r}`:null}}clone(){return new mt((0,b.d9)({geometry:this.geometry,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,a.Cb)({json:{write:!0}})],ft.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],ft.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:B.Z,json:{write:!0}})],ft.prototype,"mosaicRule",null),(0,r._)([(0,p.c)("mosaicRule")],ft.prototype,"writeMosaicRule",null),(0,r._)([(0,a.Cb)({type:I.Z,json:{write:!0}})],ft.prototype,"renderingRule",null),(0,r._)([(0,p.c)("renderingRule")],ft.prototype,"writeRenderingRule",null),(0,r._)([(0,a.Cb)({type:[I.Z],json:{write:!0}})],ft.prototype,"renderingRules",void 0),(0,r._)([(0,p.c)("renderingRules")],ft.prototype,"writeRenderingRules",null),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],ft.prototype,"pixelSize",void 0),(0,r._)([(0,p.c)("pixelSize")],ft.prototype,"writePixelSize",null),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnGeometry",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnCatalogItems",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPixelValues",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],ft.prototype,"maxItemCount",void 0),(0,r._)([(0,a.Cb)({type:yt.Z,json:{write:{target:"time"}}})],ft.prototype,"timeExtent",void 0),(0,r._)([(0,p.c)("timeExtent")],ft.prototype,"writeTimeExtent",null),(0,r._)([(0,a.Cb)({json:{write:!0}})],ft.prototype,"raster",void 0),(0,r._)([(0,a.Cb)({json:{write:!0}})],ft.prototype,"viewId",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],ft.prototype,"processAsMultidimensional",void 0),ft=mt=(0,r._)([(0,u.j)("esri.rest.support.ImageIdentifyParameters")],ft);const gt=ft;var bt;let Rt=bt=class extends x.wq{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new bt({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,a.Cb)({type:[Se.Z],json:{write:!0}})],Rt.prototype,"geometries",void 0),(0,r._)([(0,p.c)("geometries")],Rt.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:l.z8,json:{write:!0}})],Rt.prototype,"rasterId",void 0),Rt=bt=(0,r._)([(0,u.j)("esri.rest.support.ImagePixelLocationParameters")],Rt);const vt=Rt;var wt;let _t=wt=class extends rt{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=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 wt((0,b.d9)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,renderingRule:this.renderingRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,a.Cb)({types:d.qM,json:{name:"fromGeometry",read:tt.im}})],_t.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],_t.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)({type:it.apiValues,json:{read:it.read,write:it.write}})],_t.prototype,"measureOperation",null),(0,r._)([(0,a.Cb)({json:{read:!0}})],_t.prototype,"is3D",void 0),_t=wt=(0,r._)([(0,u.j)("esri.rest.support.ImagePointParameters")],_t);const St=_t;var Ct;let xt=Ct=class extends x.wq{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,tt.Ji)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Le.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,b.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,r._)([(0,a.Cb)({types:d.qM,json:{read:tt.im}})],xt.prototype,"geometry",void 0),(0,r._)([(0,p.c)("geometry")],xt.prototype,"writeGeometry",null),(0,r._)([(0,a.Cb)()],xt.prototype,"locations",null),(0,r._)([(0,a.Cb)({type:String,json:{type:L.c.jsonValues,read:L.c.read,write:L.c.write}})],xt.prototype,"interpolation",void 0),(0,r._)([(0,a.Cb)({type:B.Z,json:{write:!0}})],xt.prototype,"mosaicRule",void 0),(0,r._)([(0,a.Cb)({type:[String],json:{write:!0}})],xt.prototype,"outFields",void 0),(0,r._)([(0,a.Cb)({type:Se.Z,json:{write:!0}})],xt.prototype,"pixelSize",void 0),(0,r._)([(0,a.Cb)({type:String,json:{write:!0}})],xt.prototype,"raster",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],xt.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleDistance",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sampleCount",void 0),(0,r._)([(0,a.Cb)({type:Number,json:{write:!0}})],xt.prototype,"sliceId",void 0),(0,r._)([(0,a.Cb)({type:yt.Z,json:{read:{source:"time"},write:{target:"time"}}})],xt.prototype,"timeExtent",void 0),xt=Ct=(0,r._)([(0,u.j)("esri.rest.support.ImageSampleParameters")],xt);const It=xt;var Ft=i(23808);const Dt=(0,g.w)()({U1:"u1",U2:"u2",U4:"u4",U8:"u8",S8:"s8",U16:"u16",S16:"s16",U32:"u32",S32:"s32",F32:"f32",F64:"f64",C64:"c64",C128:"c128",UNKNOWN:"unknown"}),Tt=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),jt=(0,a.Eg)(l.q9,{min:0,max:255}),Nt=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 Q({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().replace(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?B.Z.fromJSON(t):null}get fieldsIndex(){return this.fields?new W.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 i=e||t.mosaicRule;return i?B.Z.fromJSON(i):this._isMosaicRuleSupported(t)?B.Z.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const n=this.definitionExpression;r?n&&n!==r.where&&(r=r.clone(),r.where=n):n&&(r=new B.Z({where:n})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=jt(e))}readObjectIdField(e,t){if(!e){const i=t.fields.filter((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i&&i[0]&&i[0].name}return e}get parsedUrl(){return(0,w.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,i){const r=t?.layerDefinition?.drawingInfo?.renderer,n=(0,h.ij)(r,i);return null==n?null:("vector-field"===n.type&&t.symbolTileSize&&!r.symbolTileSize&&(n.symbolTileSize=t.symbolTileSize),A(n)||R.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),n)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this._rasterAttributeTableFieldPrefix||"Raster.",t=new k.Z({name:"Raster.ItemPixelValue",alias:"Item Pixel Value",domain:null,editable:!1,length:50,type:"string"}),i=new k.Z({name:"Raster.ServicePixelValue",alias:"Service Pixel Value",domain:null,editable:!1,length:50,type:"string"}),r=new k.Z({name:"Raster.ServicePixelValue.Raw",alias:"Raw Service Pixel Value",domain:null,editable:!1,length:50,type:"string"});let n=this.fields?(0,b.d9)(this.fields):[];n.push(i),this.capabilities?.operations.supportsQuery&&this.fields&&this.fields.length>0&&n.push(t),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((e=>"none"===e.name.toLowerCase()))&&n.push(r),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((e=>"none"!==e.name.toLowerCase())).forEach((e=>{n.push(new k.Z({name:"Raster.ServicePixelValue."+e.name,alias:e.name,domain:null,editable:!1,length:50,type:"string"}))})),this._isVectorDataSet()&&(n.push(new k.Z({name:"Raster.Magnitude",alias:"Magnitude",domain:null,editable:!1,type:"double"})),n.push(new k.Z({name:"Raster.Direction",alias:"Direction",domain:null,editable:!1,type:"double"})));const{attributeTable:s}=this.rasterInfo??{};if(null!=s){const t=s.fields.filter((e=>"esriFieldTypeOID"!==e.type&&"value"!==e.name.toLowerCase())).map((t=>{const i=(0,b.d9)(t);return i.name=e+t.name,i}));n=n.concat(t)}return n}set renderingRule(e){let t=e;t&&t.rasterFunction&&(t=I.Z.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("renderingRule",t)}readRenderingRule(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i&&i.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?I.Z.fromJSON({rasterFunctionDefinition:t.renderingRule}):I.Z.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}writeRenderingRule(e,t,i){const r=e.toJSON();r.rasterFunctionDefinition?t[i]=r.rasterFunctionDefinition:t[i]=r}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?le.Z.fromJSON(i):null}readPixelType(e){return Dt.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=Dt.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:n,pixelFilter:s,bandIds:o}=this;if(!this._isPicture()&&r&&n&&!s){const s=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){s&&(n.bind(),await a.updateSymbolizer(n,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:n.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new f.Z("imagery-layer:compute-angles","this operation is not supported on the input image service");return e=(0,l.TJ)(et,e).clone(),async function(e,t,i){const r=t.toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),null!=t.point&&t.point.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=ze(t.point.spatialReference)),null!=t.spatialReference&&t.spatialReference.imageCoordinateSystem&&(r.spatialReference=Ge(t.spatialReference));const n=(0,ae.en)(e),s=(0,ae.cv)({...n.query,f:"json",...r}),o=(0,ae.lA)(s,i),{data:a}=await(0,y.default)(`${n.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new le.Z({wkid:0,imageCoordinateSystem:a.spatialReference}):le.Z.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new pe(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new f.Z("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,l.TJ)(vt,e).clone(),async function(e,t,i){const r=t.toJSON(),{geometries:n}=t;if(n)for(let e=0;e<n.length;e++)n[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=ze(n[e].spatialReference));const s=(0,ae.en)(e),o=(0,ae.cv)({...s.query,f:"json",...r}),a=(0,ae.lA)(o,i),{data:l}=await(0,y.default)(`${s.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 f.Z("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,l.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Me(e,t,i),n=(0,ae.en)(e),{data:s}=await(0,y.default)(`${n.path}/computeHistograms`,r);return{histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new f.Z("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,l.TJ)(ht.Z,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Me(e,t,i),n=(0,ae.en)(e),{data:s}=await(0,y.default)(`${n.path}/computeStatisticsHistograms`,r),{statistics:o}=s;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:s.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new f.Z("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,l.TJ)(dt,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ee(e,t,[t.fromGeometry,t.toGeometry],i);return _e.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new f.Z("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,l.TJ)(ot,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ee(e,t,[t.geometry],i);return be.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new f.Z("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,l.TJ)(ut,e).clone(),this._applyMosaicAndRenderingRules(e),Ze(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new f.Z("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,l.TJ)(St,e).clone(),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await Ee(e,t,[t.geometry],i);return je.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,n={}){if(null==e||null==t||null==r)throw new f.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.renderingRule,{signal:n.signal});e&&(this.rasterInfo=e)}const s=this.getExportImageServiceParameters(e,t,r,n.timeExtent);if(null==s){if(n.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,n.returnImageBitmap?{imageBitmap:await(0,$.g)(e,`${i(this.parsedUrl)}/exportImage`,n.signal)}:{imageOrCanvasElement:e}}const{bandIds:s,rasterInfo:o}=this,a=(s?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(X.Z.createEmptyBand(u,l));return{pixelData:{pixelBlock:new X.Z({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const o=!!n.requestAsImageElement&&!this.pixelFilter,a=o&&!!n.returnImageBitmap,l={imageServiceParameters:s,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:o,returnImageBitmap:a,signal:n.signal};return this._requestArrayBuffer(l)}fetchKeyProperties(e){return(0,y.default)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new f.Z("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,y.default)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.renderingRule:null})}).then((e=>Ce.Z.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ae.en)(e),n=(0,ae.cv)({...r?.query,f:"json"}),s=(0,ae.lA)(n,i),o=`${r?.path}/${t}/info`,a=(0,y.default)(`${o}`,s),l=(0,y.default)(`${o}/keyProperties`,s),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=Be.Z.fromJSON(p.extent),h=Math.ceil(m.width/p.pixelSizeX-.1),f=Math.ceil(m.height/p.pixelSizeY-.1),g=m.spatialReference,b=new Se.Z({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),R=p.histograms?.length?p.histograms:null,v=new Xe.Z({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new Y.Z({width:h,height:f,bandCount:p.bandCount,extent:m,spatialReference:g,pixelSize:b,pixelType:p.pixelType.toLowerCase(),statistics:d,histograms:R,keyProperties:c,storageInfo:v})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,y.default)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),n=r&&r.ics;if(!n)return;let s=null;try{s=(await(0,y.default)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!s||!s.spatialReference)return{ics:n,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,y.default)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=s.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[s]}),inSR:a.wkid||JSON.stringify(a),outSR:"0:"+e},u=(0,y.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(s.xmin+s.xmax)/2,c=(s.ymax-s.ymin)/6,d=s.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},f=(0,y.default)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(h),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,f]);let b=g[0].ipxf;if(null==b){const e=n.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 R=Be.Z.fromJSON(g[1]&&g[1].geometries&&g[1].geometries[0]);R&&(R.spatialReference=new le.Z({wkid:0,imageCoordinateSystem:n}));const v=g[2].geometries?g[2].geometries.filter((e=>null!=e&&null!=e.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],w=v.length;if(w<3)return{ics:n,icsToPixelTransform:b,icsExtent:R,northDirection:null};let _=0,S=0,C=0,x=0;for(let e=0;e<w;e++)_+=v[e].x,S+=v[e].y,C+=v[e].x*v[e].x,x+=v[e].x*v[e].y;const I=(w*x-_*S)/(w*C-_*_);let F=0;const D=v[4].x>v[0].x,T=v[4].y>v[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:n,icsToPixelTransform:b,icsExtent:R,northDirection:F}}async generateRasterInfo(e,t){if(e=(0,l.TJ)(I.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),i=t?.map((e=>e.replace('"rasterFunction":"',"").replace('"',"")));return i?i.join("/"):null}(e);if(!i)return null;if(this._functionRasterInfos[i])return this._functionRasterInfos[i];const r=this._generateRasterInfo(e,t);this._functionRasterInfos[i]=r;try{return await r}catch{return this._functionRasterInfos[i]=null,null}}getExportImageServiceParameters(e,t,r,n){const s=Ge((e=e.clone().shiftCentralMeridian()).spatialReference,i(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.renderingRule?.rasterFunctionDefinition,c=!this.renderer||"raster-stretch"===this.renderer.type;if(a?.length&&this._hasRenderingRule(this.renderingRule)&&!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,n,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,n=d.timeExtent,o.renderingRule=this._getRenderingRuleString(I.Z.fromJSON(u));const m={};if(null!=n){const{start:e,end:t}=n.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:s,imageSR:s,size:t+","+r,...o,...m}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new f.Z("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,l.TJ)(It,e).clone();const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=t.toJSON();Ae(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const n=await(0,oe.aX)(t.geometry),s=n?.[0];null!=s&&(r.geometry=s.toJSON());const o=(0,ae.en)(e),a=(0,ae.cv)({...o.query,f:"json",...r}),l=(0,ae.lA)(a,i),{data:u}=await(0,y.default)(`${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 f.Z("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,l.TJ)(gt,e).clone();const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new f.Z("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,renderingRule:n}=this;return n&&null==e.renderingRule&&(e.renderingRule=n),r&&null==e.raster&&(e.raster=r),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 f.Z("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:n,showNoDataRecords:s}=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 I.Z({functionName:e[0]}))),l=t.map((e=>e[1]));const{renderingRule:i}=this;0===a.length?i?.functionName?(a.push(i),l.push(i.functionName)):a=null:i?.functionName&&!a.some((e=>e.functionName===i.functionName))&&(a.push(i),l.push(i.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:i}=(0,te.W2)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new f.Z("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");i&&null!=i.timeExtent&&(m=i.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,m),y=this._getQueryParams({geometry:e.geometry,timeExtent:m,mosaicRule:h,renderingRule:this.version<10.4?this.renderingRule:null,renderingRules:a,pixelSize:i,returnCatalogItems:o,returnGeometry:c,raster:this.raster,maxItemCount:n?1:null});delete y.f;const g=new gt(y);try{await this.generateRasterInfo(this.renderingRule);const i=await Je(this.url,g,{signal:t?.signal,query:{...this.customParameters}}),n=e.outFields,a=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!o||c||!i?.catalogItems?.features.length||!s&&a)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:s,templateFields:n});const u=this.objectIdField||"ObjectId",p=i.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((i=>{i.attributes[u]===t.attributes[u]&&(i.geometry=new Qe.Z(t.geometry),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:l,showNoDataRecords:s,templateFields:n})}catch{throw new f.Z("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,y.default)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),n=(0,y.default)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),s=await Promise.all([r,n]);return s[0]&&s[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:s[0]||null,histograms:s[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,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,te.jj)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,Ke.g)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),e))),n=this._hasRenderingRule(this.renderingRule)?this.generateRasterInfo(this.renderingRule,{signal:e}):null,s=this._getRasterFunctionInfos();return Promise.all([r,n,s]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.renderer&&!this._isSupportedRenderer(this.renderer)&&(this._set("renderer",null),R.Z.getLogger(this.declaredClass).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("renderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.YP)((()=>this.renderingRule),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this.generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:n}=i,s=r.variables.some((e=>e.dimensions.some((e=>e.name===n))))?n:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==s)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===s)),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===s&&(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=s,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new C.Z({variableName:"",dimensionName:s,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 f.Z("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,l.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 ee.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,renderingRule:i}=this;return"unique-value"===e.type&&this._hasRenderingRule(i)&&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:r,ssl:n}=await(0,y.default)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,n&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new f.Z("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),n=i?.ResampleType||i?.resampleType;return r&&(7===n||10===n)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){if(!this.bandIds&&i.bandCount>=3){const e=(0,ne.YD)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=(0,ne.Ob)(i,{bandIds:this.bandIds,variableName:this.renderingRule?null:this.mosaicRule?.multidimensionalDefinition?.[0].variableName}));const t=(0,ne.ol)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=t,this.symbolizer.rasterInfo=i):this.symbolizer=new se.Z({rendererJSON:t,rasterInfo:i}),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:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,ie.J)(e,t,i)}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 r=await(0,y.default)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:n,signal:s}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,y.default)(r,{responseType:n?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:s});return o instanceof Blob?{imageBitmap:await(0,$.g)(o,r,s),params:t}:{imageOrCanvasElement:o,params:t}}const o=this._initJobHandler(),a=(0,y.default)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:s}),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 f.Z("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(l)));const c={signal:s},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){const r={...t,query:this._getQueryParams()};return(0,Ke.N)(i(this.parsedUrl),e,r)}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,te.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.renderingRule&&"none"!==this.renderingRule.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 i=e.value,{templateRRFunctionNames:r,showNoDataRecords:n,returnDomainValues:s,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.replace(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),d=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new m.Z(this.fullExtent,null,e)]}if(!l)return[];let h,y,f;this._updateResponseFieldNames(l,o),c&&!n&&(l=[]);for(let e=0;e<l.length;e++){if(h=l[e],null!=i){if(y=u[e],f=this.renderingRule&&a&&a.length>0&&r&&r.length>0&&r.includes(this.renderingRule.functionName)?a[r.indexOf(this.renderingRule.functionName)]:i,"nodata"===y.toLowerCase()&&!n)continue;const t="Raster.ItemPixelValue",s="Raster.ServicePixelValue";h.attributes[t]=y,h.attributes[s]=f,this._updateFeatureWithMagDirValues(h,y);const o=this.fields&&this.fields.length>0;let l=this.renderingRule&&null!=this.serviceRasterInfo.attributeTable?o?y:i:f;this.renderingRule||(l=o?y:i),this._updateFeatureWithRasterAttributeTableValues(h,l)}if(h.sourceLayer=h.layer=this,s&&this._updateFeatureWithDomainValues(h),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const t="Raster.ServicePixelValue."+r[e];h.attributes[t]=a[e]}d.push(l[e])}return d}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:n}=(0,te.W2)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};n&&null!=n.timeExtent&&(t=n.timeExtent)}if(null!=(i=this._combineMosaicRuleWithTimeExtent(i,t))&&i.multidimensionalDefinition){const{isOutside:e}=(0,te.W2)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:n}=i,s=n.map((e=>e.name)).filter((e=>"value"===e.toLowerCase())),o=s&&s[0];if(!o)return;const a=r.filter((e=>e.attributes[o]===(null!=t?parseInt(t,10):null)));a&&a[0]&&n.forEach((t=>{const i=this._rasterAttributeTableFieldPrefix+t.name;e.attributes[i]=a[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),n=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),s=new X.Z({height:1,width:1,pixelType:"f32",pixels:r,statistics:n});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:s,extent:new Be.Z(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[s.pixels[0][0],s.pixels[1][0]]:(0,re.Tg)([s.pixels[0][0],s.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 i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e&&e.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=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}_hasRenderingRule(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 i=e.toLowerCase().replace(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e&&e.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,renderingRule:r}=this;r&&null==e.renderingRule&&(e.renderingRule=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:n}=e,s=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:s,supportsExportImage:s,supportsIdentify:s,supportsMeasure:u,supportsDownload:t.includes("download"),supportsQuery:t.includes("catalog")&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&s,supportsProject:i>=10.3&&s,supportsComputeStatisticsHistograms:i>=10.4&&s,supportsQueryBoundary:i>=10.6&&s,supportsCalculateVolume:i>=10.7&&o,supportsComputePixelLocation:i>=10.7&&t.includes("catalog"),supportsComputeAngles:i>=10.91,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryTopFeatures:!1},query:{maxRecordCount:n,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,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 i(e){return e?.path??""}return(0,r._)([(0,a.Cb)()],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,_.r)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,a.Cb)()],t.prototype,"_rasterAttributeTableFieldPrefix",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,a.Cb)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,a.Cb)({type:[l.z8],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,_.r)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,_.r)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,a.Cb)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,p.c)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,a.Cb)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,p.c)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,a.Cb)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,_.r)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,a.Cb)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,type:[k.Z]})],t.prototype,"fields",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,a.Cb)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,_.r)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,a.Cb)({type:Be.Z})],t.prototype,"fullExtent",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,a.Cb)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,a.Cb)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,a.Cb)({type:String,json:{type:L.c.jsonValues,read:L.c.read,write:L.c.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"minScale",void 0),(0,r._)([(0,_.r)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,a.Cb)()],t.prototype,"maxScale",void 0),(0,r._)([(0,_.r)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,a.Cb)({type:B.Z})],t.prototype,"mosaicRule",null),(0,r._)([(0,_.r)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,p.c)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,a.Cb)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,a.Cb)({type:K.Z,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,a.Cb)({json:{type:l.z8}})],t.prototype,"noData",void 0),(0,r._)([(0,p.c)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,a.Cb)({type:String,json:{type:L.k.jsonValues,read:L.k.read,write:L.k.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,a.Cb)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,_.r)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,a.Cb)({})],t.prototype,"geometryType",void 0),(0,r._)([(0,a.Cb)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,a.Cb)({})],t.prototype,"types",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,a.Cb)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"raster",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,_.r)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,a.Cb)()],t.prototype,"viewId",void 0),(0,r._)([(0,a.Cb)({types:h.dr,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:h.FK,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"renderer",null),(0,r._)([(0,_.r)("renderer")],t.prototype,"readRenderer",null),(0,r._)([(0,p.c)("renderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,a.Cb)()],t.prototype,"symbolizer",void 0),(0,r._)([(0,a.Cb)(S.Oh)],t.prototype,"opacity",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,a.Cb)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,a.Cb)({type:I.Z})],t.prototype,"renderingRule",null),(0,r._)([(0,_.r)("renderingRule",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRenderingRule",null),(0,r._)([(0,p.c)("renderingRule")],t.prototype,"writeRenderingRule",null),(0,r._)([(0,a.Cb)()],t.prototype,"serviceDataType",void 0),(0,r._)([(0,a.Cb)({readOnly:!0,type:le.Z})],t.prototype,"spatialReference",void 0),(0,r._)([(0,_.r)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,a.Cb)({json:{type:Dt.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,_.r)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,p.c)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,a.Cb)({constructOnly:!0,type:Y.Z})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,a.Cb)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,a.Cb)(S.HQ)],t.prototype,"url",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,_.r)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,u.j)("esri.layers.mixins.ArcGISImageService")],t),t};var Pt=i(17287),Ot=i(71612),Vt=i(17017),At=i(38009),Mt=i(16859),Jt=i(34760),Zt=i(72965),Et=i(28294),qt=i(60199),zt=i(32163);let Gt=class extends((0,Ot.h)((0,Et.n)((0,Zt.M)((0,At.q)((0,Mt.I)(Nt((0,Jt.Q)((0,Vt.N)((0,Pt.Y)((0,s.R)(c.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(o.r9).then((()=>this._fetchService(t)))),Promise.resolve(this)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}createPopupTemplate(e){const t=this.rasterFields,i=this.title,r=new Set;let n=!1,s=!1;this.capabilities&&(n=this.capabilities.operations.supportsQuery&&this.fields&&this.fields.length>0,s="esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType);const o=new Set;n&&o.add("raster.itempixelvalue");for(const e of t){const t=e.name.toLowerCase();o.has(t)||t.includes("raster.servicepixelvalue.")||r.add(e.name)}return s&&r.add("raster.magnitude").add("raster.direction"),(0,zt.eZ)({fields:t,title:i},{...e,visibleFieldNames:r})}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}serviceSupportsSpatialReference(e){return(0,qt.D)(this,e)}};(0,r._)([(0,a.Cb)(S.rn)],Gt.prototype,"legendEnabled",void 0),(0,r._)([(0,a.Cb)({type:["show","hide"]})],Gt.prototype,"listMode",void 0),(0,r._)([(0,a.Cb)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Gt.prototype,"isReference",void 0),(0,r._)([(0,a.Cb)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],Gt.prototype,"operationalLayerType",void 0),(0,r._)([(0,p.c)("web-map","operationalLayerType")],Gt.prototype,"writeOperationalLayerType",null),(0,r._)([(0,a.Cb)(S.C_)],Gt.prototype,"popupEnabled",void 0),(0,r._)([(0,a.Cb)({type:n.Z,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],Gt.prototype,"popupTemplate",void 0),(0,r._)([(0,a.Cb)({readOnly:!0})],Gt.prototype,"defaultPopupTemplate",null),(0,r._)([(0,a.Cb)({readOnly:!0,json:{read:!1}})],Gt.prototype,"type",void 0),Gt=(0,r._)([(0,u.j)("esri.layers.ImageryLayer")],Gt);const Ht=Gt},17287:(e,t,i)=>{i.d(t,{Y:()=>l});var r=i(43697),n=i(92604),s=i(5600),o=(i(75215),i(67676),i(80442),i(52011)),a=i(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,n.Z.getLogger(this.declaredClass)))}};return(0,r._)([(0,s.Cb)()],t.prototype,"title",null),(0,r._)([(0,s.Cb)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.j)("esri.layers.mixins.ArcGISService")],t),t}},90082:(e,t,i)=>{i.d(t,{V:()=>o,g:()=>s});var r=i(20102),n=i(95330);async function s(e,t,i){let s;try{s=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,n.k_)(i),s}async function o(e,t,i,s,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.Z("request:server",`Unable to load tile ${t}/${i}/${s}`,{error:e,level:t,row:i,col:s})}return(0,n.k_)(o),a}},60199:(e,t,i)=>{i.d(t,{D:()=>s});var r=i(66677);const n=[];function s(e,t){if((0,r.M8)(e.url??""))return!0;const{wkid:i}=t;for(const t of n){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}n.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}]),n.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}]),n.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}]),n.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}]),n.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}]),n.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}]),n.push([10.61,()=>new Set([102497])]),n.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}]),n.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}]),n.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,i)=>{i.d(t,{P:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.hH)(o,s.Z.from(t),{...i}).then((e=>e.data.count))}},5396:(e,t,i)=>{i.d(t,{G:()=>o});var r=i(11282),n=i(34599),s=i(14165);async function o(e,t,i){const o=(0,r.en)(e);return(0,n.Ev)(o,s.Z.from(t),{...i}).then((e=>e.data.objectIds))}},4967:(e,t,i)=>{i.d(t,{F:()=>l,e:()=>a});var r=i(11282),n=i(34599),s=i(74889),o=i(14165);async function a(e,t,i){const r=await l(e,t,i);return s.Z.fromJSON(r)}async function l(e,t,i){const s=(0,r.en)(e),a={...i},l=o.Z.from(t),{data:u}=await(0,n.JT)(s,l,l.sourceSpatialReference,a);return u}},28694:(e,t,i)=>{i.d(t,{p:()=>n});var r=i(69285);function n(e,t,i){if(!i||!i.features||!i.hasZ)return;const n=(0,r.k)(i.geometryType,t,e.outSpatialReference);if(null!=n)for(const e of i.features)n(e.geometry)}},98326:(e,t,i)=>{i.d(t,{Z:()=>c});var r,n=i(43697),s=i(96674),o=i(5600),a=i(75215),l=(i(67676),i(80442),i(52011));const u={1:{id:1,rotation:0,mirrored:!1},2:{id:2,rotation:0,mirrored:!0},3:{id:3,rotation:180,mirrored:!1},4:{id:4,rotation:180,mirrored:!0},5:{id:5,rotation:-90,mirrored:!0},6:{id:6,rotation:90,mirrored:!1},7:{id:7,rotation:90,mirrored:!0},8:{id:8,rotation:-90,mirrored:!1}};let p=r=class extends s.wq{constructor(e){super(e),this.contentType=null,this.exifInfo=null,this.id=null,this.globalId=null,this.keywords=null,this.name=null,this.parentGlobalId=null,this.parentObjectId=null,this.size=null,this.url=null}get orientationInfo(){const{exifInfo:e}=this,t=function(e){const{exifInfo:t,exifName:i,tagName:r}=e;if(!t||!i||!r)return null;const n=t.find((e=>e.name===i));return n?function(e){const{tagName:t,tags:i}=e;if(!i||!t)return null;const r=i.find((e=>e.name===t));return r&&r.value||null}({tagName:r,tags:n.tags}):null}({exifName:"Exif IFD0",tagName:"Orientation",exifInfo:e});return u[t]||null}clone(){return new r({contentType:this.contentType,exifInfo:this.exifInfo,id:this.id,globalId:this.globalId,keywords:this.keywords,name:this.name,parentGlobalId:this.parentGlobalId,parentObjectId:this.parentObjectId,size:this.size,url:this.url})}};(0,n._)([(0,o.Cb)({type:String})],p.prototype,"contentType",void 0),(0,n._)([(0,o.Cb)()],p.prototype,"exifInfo",void 0),(0,n._)([(0,o.Cb)({readOnly:!0})],p.prototype,"orientationInfo",null),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"id",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"globalId",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"keywords",void 0),(0,n._)([(0,o.Cb)({type:String})],p.prototype,"name",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentGlobalId",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"parentObjectId",void 0),(0,n._)([(0,o.Cb)({type:a.z8})],p.prototype,"size",void 0),(0,n._)([(0,o.Cb)({json:{read:!1}})],p.prototype,"url",void 0),p=r=(0,n._)([(0,l.j)("esri.layers.support.AttachmentInfo")],p);const c=p},56545:(e,t,i)=>{i.d(t,{Z:()=>d});var r,n=i(43697),s=i(96674),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556);let c=r=class extends s.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 r((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,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"attachmentTypes",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"attachmentsDefinitionExpression"},write:{target:"attachmentsDefinitionExpression"}}})],c.prototype,"attachmentsWhere",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],c.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],c.prototype,"keywords",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"globalIds",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],c.prototype,"name",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],c.prototype,"num",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{default:!1,write:!0}})],c.prototype,"returnMetadata",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],c.prototype,"size",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],c.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],c.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],c.prototype,"where",void 0),c=r=(0,n._)([(0,u.j)("esri.rest.support.AttachmentQuery")],c),c.from=(0,l.se)(c);const d=c},75935:(e,t,i)=>{i.r(t),i.d(t,{default:()=>h});var r,n=i(43697),s=(i(66577),i(96674)),o=i(22974),a=i(5600),l=i(75215),u=i(52011),p=i(30556),c=i(10158),d=i(82971);let m=r=class extends s.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 r((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,n._)([(0,a.Cb)({type:Boolean,json:{write:!0}})],m.prototype,"cacheHint",void 0),(0,n._)([(0,a.Cb)({type:c.n,json:{write:!0}})],m.prototype,"dynamicDataSource",void 0),(0,n._)([(0,a.Cb)({type:String,json:{write:!0}})],m.prototype,"gdbVersion",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"geometryPrecision",void 0),(0,n._)([(0,a.Cb)({type:Date})],m.prototype,"historicMoment",void 0),(0,n._)([(0,p.c)("historicMoment")],m.prototype,"_writeHistoricMoment",null),(0,n._)([(0,a.Cb)({type:Number,json:{write:!0}})],m.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,a.Cb)({type:[Number],json:{write:!0}})],m.prototype,"objectIds",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"orderByFields",void 0),(0,n._)([(0,a.Cb)({type:[String],json:{write:!0}})],m.prototype,"outFields",void 0),(0,n._)([(0,a.Cb)({type:d.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],m.prototype,"outSpatialReference",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"relationshipId",void 0),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],m.prototype,"start",void 0),(0,n._)([(0,p.c)("start"),(0,p.c)("num")],m.prototype,"writeStart",null),(0,n._)([(0,a.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],m.prototype,"num",void 0),(0,n._)([(0,a.Cb)({json:{write:!0}})],m.prototype,"returnGeometry",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnM",void 0),(0,n._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],m.prototype,"returnZ",void 0),(0,n._)([(0,a.Cb)({type:String,json:{read:{source:"definitionExpression"},write:{target:"definitionExpression"}}})],m.prototype,"where",void 0),m=r=(0,n._)([(0,u.j)("esri.rest.support.RelationshipQuery")],m),m.from=(0,l.se)(m);const h=m},28141:(e,t,i)=>{i.d(t,{Z:()=>_});var r,n=i(43697),s=i(66577),o=i(92835),a=i(35454),l=i(96674),u=i(22974),p=i(5600),c=i(75215),d=i(52011),m=i(30556),h=i(33955);i(67676),i(80442);let y=r=class extends l.wq{constructor(e){super(e),this.groupByFields=void 0,this.topCount=void 0,this.orderByFields=void 0}clone(){return new r({groupByFields:this.groupByFields,topCount:this.topCount,orderByFields:this.orderByFields})}};(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"groupByFields",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],y.prototype,"topCount",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],y.prototype,"orderByFields",void 0),y=r=(0,n._)([(0,d.j)("esri.rest.support.TopFilter")],y);const f=y;var g,b=i(82971);const R=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"}),v=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 w=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,n._)([(0,p.Cb)({type:Boolean,json:{write:!0}})],w.prototype,"cacheHint",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:{overridePolicy:e=>({enabled:e>0})}}})],w.prototype,"distance",void 0),(0,n._)([(0,p.Cb)({types:s.qM,json:{read:h.im,write:!0}})],w.prototype,"geometry",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],w.prototype,"geometryPrecision",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{write:!0}})],w.prototype,"maxAllowableOffset",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultRecordCount"}}})],w.prototype,"num",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"objectIds",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],w.prototype,"orderByFields",void 0),(0,n._)([(0,p.Cb)({type:[String],json:{write:!0}})],w.prototype,"outFields",void 0),(0,n._)([(0,p.Cb)({type:b.Z,json:{read:{source:"outSR"},write:{target:"outSR"}}})],w.prototype,"outSpatialReference",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"resultType",void 0),(0,n._)([(0,p.Cb)({json:{write:!0}})],w.prototype,"returnGeometry",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"returnM",void 0),(0,n._)([(0,p.Cb)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],w.prototype,"returnZ",void 0),(0,n._)([(0,p.Cb)({type:Number,json:{read:{source:"resultOffset"}}})],w.prototype,"start",void 0),(0,n._)([(0,m.c)("start"),(0,m.c)("num")],w.prototype,"writeStart",null),(0,n._)([(0,p.Cb)({type:String,json:{read:{source:"spatialRel",reader:R.read},write:{target:"spatialRel",writer:R.write}}})],w.prototype,"spatialRelationship",void 0),(0,n._)([(0,p.Cb)({type:o.Z,json:{write:!0}})],w.prototype,"timeExtent",void 0),(0,n._)([(0,p.Cb)({type:f,json:{write:!0}})],w.prototype,"topFilter",void 0),(0,n._)([(0,p.Cb)({type:String,json:{read:v.read,write:{writer:v.write,overridePolicy(e){return{enabled:null!=e&&null!=this.distance&&this.distance>0}}}}})],w.prototype,"units",void 0),(0,n._)([(0,p.Cb)({type:String,json:{write:!0}})],w.prototype,"where",void 0),w=g=(0,n._)([(0,d.j)("esri.rest.support.TopFeaturesQuery")],w),w.from=(0,c.se)(w);const _=w}}]);