@arcgis/core 5.0.0-next.43 → 5.0.0-next.45

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 (329) hide show
  1. package/applications/Components/imageryUtils.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/{f97a7cb367634353177d.js → 001a7a4cf6fe74432ed6.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{324d66962aeec17d3e28.js → 1e0e7cef7ef947894bbe.js} +1 -1
  5. package/assets/esri/core/workers/chunks/20ad34f9d45c64392022.js +1 -0
  6. package/assets/esri/core/workers/chunks/23396a6318edf9264c1f.js +1 -0
  7. package/assets/esri/core/workers/chunks/{ad891ac388fa6c1c9b94.js → 2b34a010f76e5f289868.js} +1 -1
  8. package/assets/esri/core/workers/chunks/2ef4c0092c59a98a5532.js +1 -0
  9. package/assets/esri/core/workers/chunks/35272810c2ed04eb403d.js +1 -0
  10. package/assets/esri/core/workers/chunks/{d1f4152b2b8d47cbf586.js → 72fbee59d5d909615408.js} +1 -1
  11. package/assets/esri/core/workers/chunks/75c66e38bdc1c786c599.js +1 -0
  12. package/assets/esri/core/workers/chunks/7d3c2a063598bdd015e2.js +1 -0
  13. package/assets/esri/core/workers/chunks/897ce6fc9cefb1e14a64.js +1 -0
  14. package/assets/esri/core/workers/chunks/992e9bbdf9d3787ddb0e.js +1 -0
  15. package/assets/esri/core/workers/chunks/a2442549c5daf3653eb4.js +1 -0
  16. package/assets/esri/core/workers/chunks/a7cd795042ebb8585906.js +1 -0
  17. package/assets/esri/core/workers/chunks/bf5f9da0837ed09729c6.js +316 -0
  18. package/assets/esri/core/workers/chunks/{385cfd3087f00dbd1146.js → ca1c65eb7f5900c60170.js} +1 -1
  19. package/assets/esri/core/workers/chunks/cddce67919e13e2f365e.js +1 -0
  20. package/assets/esri/core/workers/chunks/{7c08c0824ad354177787.js → d7878fba02814adaf19f.js} +1 -1
  21. package/assets/esri/core/workers/chunks/e6784251bbb8b71ead93.js +1 -0
  22. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  23. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  24. package/chunks/GaussianSplat.glsl.js +2 -2
  25. package/config.js +1 -1
  26. package/core/urlUtils.d.ts +1 -0
  27. package/core/workers/workerFactory.js +1 -1
  28. package/interfaces.d.ts +104 -9
  29. package/kernel.js +1 -1
  30. package/layers/ImageryTileLayer.js +1 -1
  31. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  32. package/layers/WCSLayer.js +1 -1
  33. package/layers/mixins/ArcGISImageService.js +1 -1
  34. package/layers/mixins/ImageryTileMixin.js +1 -1
  35. package/layers/mixins/RasterJobHandlerMixin.js +1 -1
  36. package/layers/ogc/wcsUtils.js +1 -1
  37. package/layers/raster/datasets/BaseRaster.js +5 -0
  38. package/layers/raster/datasets/CovJSONRaster.js +5 -0
  39. package/layers/raster/datasets/FunctionRaster.js +5 -0
  40. package/layers/raster/datasets/ImageAuxRaster.js +5 -0
  41. package/layers/raster/datasets/ImageServerRaster.js +5 -0
  42. package/layers/raster/datasets/InMemoryRaster.js +5 -0
  43. package/layers/raster/datasets/MRFRaster.js +5 -0
  44. package/layers/raster/datasets/RawBlockCache.js +5 -0
  45. package/layers/raster/datasets/TIFFRaster.js +5 -0
  46. package/layers/raster/datasets/WCSRaster.js +5 -0
  47. package/layers/raster/datasets/covJSONParser.js +5 -0
  48. package/layers/raster/datasets/multidimensionalUtils.js +5 -0
  49. package/layers/raster/datasets/pamParser.js +5 -0
  50. package/layers/raster/datasets/pixelReader.js +5 -0
  51. package/layers/raster/datasets/wcsCoverageParser.js +5 -0
  52. package/layers/raster/formats/Lerc.js +5 -0
  53. package/layers/raster/formats/Qb3.js +5 -0
  54. package/layers/raster/formats/RasterCodec.js +5 -0
  55. package/layers/raster/formats/TiffDecoder.js +5 -0
  56. package/layers/raster/functions/ArithmeticFunction.js +5 -0
  57. package/layers/{support/rasterFunctions → raster/functions}/ArithmeticFunctionArguments.js +1 -1
  58. package/layers/{support/rasterFunctions → raster/functions}/AspectFunction.js +1 -1
  59. package/layers/{support/rasterFunctions → raster/functions}/AspectFunctionArguments.js +1 -1
  60. package/layers/raster/functions/BandArithmeticFunction.js +5 -0
  61. package/layers/{support/rasterFunctions → raster/functions}/BandArithmeticFunctionArguments.js +1 -1
  62. package/layers/{support/rasterFunctions → raster/functions}/BaseFunctionArguments.js +1 -1
  63. package/layers/raster/functions/BaseRasterFunction.js +5 -0
  64. package/layers/{support/rasterFunctions → raster/functions}/ClipFunction.js +1 -1
  65. package/layers/{support/rasterFunctions → raster/functions}/ClipFunctionArguments.js +1 -1
  66. package/layers/raster/functions/ColormapFunction.js +5 -0
  67. package/layers/{support/rasterFunctions → raster/functions}/ColormapFunctionArguments.js +1 -1
  68. package/layers/raster/functions/ColormapToRGBFunction.js +5 -0
  69. package/layers/{support/rasterFunctions → raster/functions}/ColormapToRGBFunctionArguments.js +1 -1
  70. package/layers/raster/functions/CompositeBandFunction.js +5 -0
  71. package/layers/raster/functions/CompositeBandFunctionArguments.js +5 -0
  72. package/layers/raster/functions/ComputeChangeFunction.js +5 -0
  73. package/layers/{support/rasterFunctions → raster/functions}/ComputeChangeFunctionArguments.js +1 -1
  74. package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunction.js +1 -1
  75. package/layers/{support/rasterFunctions → raster/functions}/ContrastBrightnessFunctionArguments.js +1 -1
  76. package/layers/raster/functions/ConvolutionFunction.js +5 -0
  77. package/layers/raster/functions/ConvolutionFunctionArguments.js +5 -0
  78. package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunction.js +1 -1
  79. package/layers/{support/rasterFunctions → raster/functions}/CurvatureFunctionArguments.js +1 -1
  80. package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunction.js +1 -1
  81. package/layers/{support/rasterFunctions → raster/functions}/ExtractBandFunctionArguments.js +1 -1
  82. package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunction.js +1 -1
  83. package/layers/{support/rasterFunctions → raster/functions}/GrayscaleFunctionArguments.js +1 -1
  84. package/layers/raster/functions/HillshadeFunction.js +5 -0
  85. package/layers/{support/rasterFunctions → raster/functions}/HillshadeFunctionArguments.js +1 -1
  86. package/layers/raster/functions/LocalFunction.js +5 -0
  87. package/layers/{support/rasterFunctions → raster/functions}/LocalFunctionArguments.js +1 -1
  88. package/layers/{support/rasterFunctions → raster/functions}/MaskFunction.js +1 -1
  89. package/layers/{support/rasterFunctions → raster/functions}/MaskFunctionArguments.js +1 -1
  90. package/layers/{support/rasterFunctions → raster/functions}/NDVIFunction.js +1 -1
  91. package/layers/{support/rasterFunctions → raster/functions}/NDVIFunctionArguments.js +1 -1
  92. package/layers/raster/functions/RemapFunction.js +5 -0
  93. package/layers/{support/rasterFunctions → raster/functions}/RemapFunctionArguments.js +1 -1
  94. package/layers/raster/functions/ShadedReliefFunction.js +5 -0
  95. package/layers/{support/rasterFunctions → raster/functions}/ShadedReliefFunctionArguments.js +1 -1
  96. package/layers/raster/functions/SlopeFunction.js +5 -0
  97. package/layers/{support/rasterFunctions → raster/functions}/SlopeFunctionArguments.js +1 -1
  98. package/layers/raster/functions/StatisticsFunction.js +5 -0
  99. package/layers/{support/rasterFunctions → raster/functions}/StatisticsFunctionArguments.js +1 -1
  100. package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunction.js +1 -1
  101. package/layers/{support/rasterFunctions → raster/functions}/StatisticsHistogramFunctionArguments.js +1 -1
  102. package/layers/raster/functions/StretchFunction.js +5 -0
  103. package/layers/{support/rasterFunctions → raster/functions}/StretchFunctionArguments.js +1 -1
  104. package/layers/{support/rasterFunctions → raster/functions}/TableFunction.js +1 -1
  105. package/layers/{support/rasterFunctions → raster/functions}/TableFunctionArguments.js +1 -1
  106. package/layers/raster/functions/bandIndexUtils.js +5 -0
  107. package/layers/raster/functions/changeDetectionUtils.js +5 -0
  108. package/layers/raster/functions/clipUtils.js +5 -0
  109. package/layers/raster/functions/conversionUtils.js +5 -0
  110. package/layers/raster/functions/convolutionUtils.js +5 -0
  111. package/layers/raster/functions/creators/createDataManagementFunctions.js +5 -0
  112. package/layers/raster/functions/creators/utils.js +5 -0
  113. package/layers/raster/functions/focalStatUtils.js +5 -0
  114. package/layers/raster/functions/localUtils.js +5 -0
  115. package/layers/raster/functions/pixelTransformUtils.js +5 -0
  116. package/layers/raster/functions/pixelUtils.js +5 -0
  117. package/layers/raster/functions/stretchUtils.js +5 -0
  118. package/layers/raster/functions/surfaceUtils.js +5 -0
  119. package/layers/raster/functions/vectorFieldUtils.js +5 -0
  120. package/layers/raster/transforms/BaseRasterTransform.js +5 -0
  121. package/layers/{support/rasterTransforms → raster/transforms}/GCSShiftTransform.js +1 -1
  122. package/layers/{support/rasterTransforms → raster/transforms}/IdentityTransform.js +1 -1
  123. package/layers/{support/rasterTransforms → raster/transforms}/PolynomialTransform.js +1 -1
  124. package/layers/save/imageryUtils.js +1 -1
  125. package/layers/support/PixelBlock.js +1 -1
  126. package/layers/support/RasterWorker.js +1 -1
  127. package/layers/support/imageryRendererUtils.js +1 -1
  128. package/layers/support/rasterFunctionUtils.js +1 -1
  129. package/package.json +2 -2
  130. package/renderers/VectorFieldRenderer.js +1 -1
  131. package/renderers/support/RasterSymbolizer.js +1 -1
  132. package/renderers/support/rasterRendererHelper.js +1 -1
  133. package/rest/locator/addressToLocations.js +1 -1
  134. package/rest/locator/addressesToLocations.js +1 -1
  135. package/rest/locator/suggestLocations.js +1 -1
  136. package/rest/networks/support/Association.js +1 -1
  137. package/rest/print.js +1 -1
  138. package/rest/support/LegendLayer.js +1 -1
  139. package/smartMapping/raster/support/adapters/ImageryLayerAdapter.js +1 -1
  140. package/smartMapping/raster/support/adapters/ImageryTileLayerAdapter.js +1 -1
  141. package/support/revision.js +1 -1
  142. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  143. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/RasterRangeHighlightShader.js +1 -1
  144. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/MaskShader.js +1 -1
  145. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/RemapShader.js +1 -1
  146. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/raster/processor/math.js +1 -1
  147. package/views/2d/layers/ImageryLayerView2D.js +1 -1
  148. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  149. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  150. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  151. package/views/2d/layers/imagery/ImageryView2D.js +1 -1
  152. package/views/2d/layers/imagery/VectorFieldTileView2D.js +1 -1
  153. package/views/2d/layers/imagery/VectorFieldView2D.js +1 -1
  154. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  155. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  156. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  157. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  158. package/views/3d/layers/graphics/pipeline/rendering/DirectRenderer.js +1 -1
  159. package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
  160. package/views/3d/layers/graphics/pipeline/symbolization/IconSymbolLayerRenderer.js +1 -1
  161. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  162. package/views/3d/webgl-engine/core/shaderLibrary/ShaderOutput.js +1 -1
  163. package/views/3d/webgl-engine/lib/GaussianSplatRenderNode.js +1 -1
  164. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBackedBufferLayout.js +1 -1
  165. package/views/3d/webgl-engine/lib/TextureBackedBuffer/TextureBufferView.js +1 -1
  166. package/views/3d/webgl-engine/materials/ColorMaterial.js +1 -1
  167. package/views/3d/webgl-engine/materials/DrawParameters.js +1 -1
  168. package/views/3d/webgl-engine/materials/HUDMaterial.js +1 -1
  169. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  170. package/views/3d/webgl-engine/materials/ImageMaterial.js +1 -1
  171. package/views/3d/webgl-engine/materials/LineMarkerMaterial.js +1 -1
  172. package/views/3d/webgl-engine/materials/NativeLineMaterial.js +1 -1
  173. package/views/3d/webgl-engine/materials/PatternMaterial.js +1 -1
  174. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  175. package/views/3d/webgl-engine/materials/ShadedColorMaterial.js +1 -1
  176. package/views/3d/webgl-engine/materials/WaterMaterial.js +1 -1
  177. package/views/3d/webgl-engine/materials/renderers/Instance.js +1 -1
  178. package/views/3d/webgl-engine/materials/renderers/MergedBuffer.js +1 -1
  179. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  180. package/views/3d/webgl-engine/materials/renderers/PerOriginData.js +1 -1
  181. package/views/3d/webgl-engine/materials/renderers/VaoRenderer.js +1 -1
  182. package/views/3d/webgl-engine/materials/renderers/VaoWriter.js +1 -1
  183. package/views/3d/webgl-engine/shaders/GaussianSplatColorTechnique.js +5 -0
  184. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +5 -0
  185. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  186. package/views/DOMContainer.js +1 -1
  187. package/views/GroundView.js +1 -1
  188. package/views/layers/ImageryLayerViewMixin.js +1 -1
  189. package/views/layers/ImageryTileLayerViewMixin.js +1 -1
  190. package/views/support/imageReprojection.js +1 -1
  191. package/widgets/BatchAttributeForm.js +1 -1
  192. package/widgets/BuildingExplorer/BuildingExplorerViewModel.js +1 -1
  193. package/widgets/CoordinateConversion/CoordinateConversionViewModel.js +1 -1
  194. package/widgets/CoordinateConversion.js +1 -1
  195. package/widgets/DirectLineMeasurement3D.js +1 -1
  196. package/widgets/DistanceMeasurement2D.js +1 -1
  197. package/widgets/Editor/EditorViewModel.js +1 -1
  198. package/widgets/Editor.js +1 -1
  199. package/widgets/ElevationProfile.js +1 -1
  200. package/widgets/Feature.js +1 -1
  201. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  202. package/widgets/FeatureForm.js +1 -1
  203. package/widgets/FeatureTable/AttachmentsColumn.js +1 -1
  204. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  205. package/widgets/FeatureTable/Grid/Column.js +1 -1
  206. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  207. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  208. package/widgets/FeatureTable/Grid/GridViewModel.js +1 -1
  209. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  210. package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
  211. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  212. package/widgets/FeatureTable.js +1 -1
  213. package/widgets/FeatureTemplates.js +1 -1
  214. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  215. package/widgets/Legend.js +1 -1
  216. package/widgets/LineOfSight.js +1 -1
  217. package/widgets/Locate.js +1 -1
  218. package/widgets/OrientedImageryViewer/galleryUtils.js +1 -1
  219. package/widgets/OrientedImageryViewer/services/DepthImageService.js +1 -1
  220. package/widgets/PanoramicViewer/support/importUtils.js +1 -1
  221. package/widgets/Print/CustomTemplate.js +1 -1
  222. package/widgets/Print/PrintViewModel.js +1 -1
  223. package/widgets/Print/TemplateOptions.js +1 -1
  224. package/widgets/Print.js +1 -1
  225. package/widgets/ScaleBar.js +1 -1
  226. package/widgets/ScaleRangeSlider.js +1 -1
  227. package/widgets/Search/SearchResultRenderer.js +1 -1
  228. package/widgets/Search/SearchViewModel.js +1 -1
  229. package/widgets/Search/types.js +1 -1
  230. package/widgets/Search.js +1 -1
  231. package/widgets/ShadowCast.js +1 -1
  232. package/widgets/Sketch/SketchViewModel.js +1 -1
  233. package/widgets/Sketch.js +1 -1
  234. package/assets/esri/core/workers/chunks/1f6ead46b723630db897.js +0 -1
  235. package/assets/esri/core/workers/chunks/3a16347e17312556e02c.js +0 -1
  236. package/assets/esri/core/workers/chunks/478def691ae6763686f3.js +0 -1
  237. package/assets/esri/core/workers/chunks/4c4a55be41ba105c091c.js +0 -1
  238. package/assets/esri/core/workers/chunks/4cbf5a97b2b3c6553f6f.js +0 -1
  239. package/assets/esri/core/workers/chunks/646f58b69d2354f1ef27.js +0 -1
  240. package/assets/esri/core/workers/chunks/93d11075f65a5b6625ea.js +0 -1
  241. package/assets/esri/core/workers/chunks/96f798ee286b59396131.js +0 -316
  242. package/assets/esri/core/workers/chunks/9f2a8445a5848502c7e7.js +0 -1
  243. package/assets/esri/core/workers/chunks/a1b08aab73747f4e7e25.js +0 -1
  244. package/assets/esri/core/workers/chunks/ba59568e748f0ba53b78.js +0 -1
  245. package/assets/esri/core/workers/chunks/f21cb5b34d4d1e3af1a9.js +0 -1
  246. package/assets/esri/core/workers/chunks/f93f0586ce10cb5d98b3.js +0 -1
  247. package/layers/support/rasterDatasets/BaseRaster.js +0 -5
  248. package/layers/support/rasterDatasets/CovJSONRaster.js +0 -5
  249. package/layers/support/rasterDatasets/FunctionRaster.js +0 -5
  250. package/layers/support/rasterDatasets/ImageAuxRaster.js +0 -5
  251. package/layers/support/rasterDatasets/ImageServerRaster.js +0 -5
  252. package/layers/support/rasterDatasets/InMemoryRaster.js +0 -5
  253. package/layers/support/rasterDatasets/MRFRaster.js +0 -5
  254. package/layers/support/rasterDatasets/RawBlockCache.js +0 -5
  255. package/layers/support/rasterDatasets/TIFFRaster.js +0 -5
  256. package/layers/support/rasterDatasets/WCSRaster.js +0 -5
  257. package/layers/support/rasterDatasets/covJSONParser.js +0 -5
  258. package/layers/support/rasterDatasets/multidimensionalUtils.js +0 -5
  259. package/layers/support/rasterDatasets/pamParser.js +0 -5
  260. package/layers/support/rasterDatasets/pixelReader.js +0 -5
  261. package/layers/support/rasterDatasets/wcsCoverageParser.js +0 -5
  262. package/layers/support/rasterFormats/Lerc.js +0 -5
  263. package/layers/support/rasterFormats/Qb3.js +0 -5
  264. package/layers/support/rasterFormats/RasterCodec.js +0 -5
  265. package/layers/support/rasterFormats/TiffDecoder.js +0 -5
  266. package/layers/support/rasterFunctions/ArithmeticFunction.js +0 -5
  267. package/layers/support/rasterFunctions/BandArithmeticFunction.js +0 -5
  268. package/layers/support/rasterFunctions/BaseRasterFunction.js +0 -5
  269. package/layers/support/rasterFunctions/ColormapFunction.js +0 -5
  270. package/layers/support/rasterFunctions/ColormapToRGBFunction.js +0 -5
  271. package/layers/support/rasterFunctions/CompositeBandFunction.js +0 -5
  272. package/layers/support/rasterFunctions/CompositeBandFunctionArguments.js +0 -5
  273. package/layers/support/rasterFunctions/ComputeChangeFunction.js +0 -5
  274. package/layers/support/rasterFunctions/ConvolutionFunction.js +0 -5
  275. package/layers/support/rasterFunctions/ConvolutionFunctionArguments.js +0 -5
  276. package/layers/support/rasterFunctions/HillshadeFunction.js +0 -5
  277. package/layers/support/rasterFunctions/LocalFunction.js +0 -5
  278. package/layers/support/rasterFunctions/RemapFunction.js +0 -5
  279. package/layers/support/rasterFunctions/ShadedReliefFunction.js +0 -5
  280. package/layers/support/rasterFunctions/SlopeFunction.js +0 -5
  281. package/layers/support/rasterFunctions/StatisticsFunction.js +0 -5
  282. package/layers/support/rasterFunctions/StretchFunction.js +0 -5
  283. package/layers/support/rasterFunctions/bandIndexUtils.js +0 -5
  284. package/layers/support/rasterFunctions/changeDetectionUtils.js +0 -5
  285. package/layers/support/rasterFunctions/clipUtils.js +0 -5
  286. package/layers/support/rasterFunctions/conversionUtils.js +0 -5
  287. package/layers/support/rasterFunctions/convolutionUtils.js +0 -5
  288. package/layers/support/rasterFunctions/creators/createDataManagementFunctions.js +0 -5
  289. package/layers/support/rasterFunctions/creators/utils.js +0 -5
  290. package/layers/support/rasterFunctions/focalStatUtils.js +0 -5
  291. package/layers/support/rasterFunctions/localUtils.js +0 -5
  292. package/layers/support/rasterFunctions/pixelTransformUtils.js +0 -5
  293. package/layers/support/rasterFunctions/pixelUtils.js +0 -5
  294. package/layers/support/rasterFunctions/stretchUtils.js +0 -5
  295. package/layers/support/rasterFunctions/surfaceUtils.js +0 -5
  296. package/layers/support/rasterFunctions/vectorFieldUtils.js +0 -5
  297. package/layers/support/rasterTransforms/BaseRasterTransform.js +0 -5
  298. /package/assets/esri/layers/{support/rasterFormats → raster/formats}/lerc-wasm.wasm +0 -0
  299. /package/assets/esri/layers/{support/rasterFormats → raster/formats}/qb3-wasm.wasm +0 -0
  300. /package/layers/{support/rasterDatasets → raster/datasets}/DBFParser.js +0 -0
  301. /package/layers/{support/rasterDatasets → raster/datasets}/EphemeralBlockCache.js +0 -0
  302. /package/layers/{support/rasterDatasets → raster/datasets}/RasterFactory.js +0 -0
  303. /package/layers/{support/rasterDatasets → raster/datasets}/byteStreamUtils.js +0 -0
  304. /package/layers/{support/rasterDatasets → raster/datasets}/datasetUtils.js +0 -0
  305. /package/layers/{support/rasterDatasets → raster/datasets}/multipartParser.js +0 -0
  306. /package/layers/{support/rasterDatasets → raster/datasets}/wcsCapabilitiesParser.js +0 -0
  307. /package/layers/{support/rasterDatasets → raster/datasets}/xmlUtilities.js +0 -0
  308. /package/layers/{support/rasterFormats → raster/formats}/ImageCanvasDecoder.js +0 -0
  309. /package/layers/{support/rasterFormats → raster/formats}/JpgPlus.js +0 -0
  310. /package/layers/{support/rasterFormats → raster/formats}/Lzw.js +0 -0
  311. /package/layers/{support/rasterFormats → raster/formats}/Raw.js +0 -0
  312. /package/layers/{support/rasterFormats → raster/formats}/pixelRangeUtils.js +0 -0
  313. /package/layers/{support/rasterFormats → raster/formats}/tiffTag.js +0 -0
  314. /package/layers/{support/rasterFormats → raster/formats}/utils.js +0 -0
  315. /package/layers/{support/rasterFunctions → raster/functions}/colormaps.js +0 -0
  316. /package/layers/{support/rasterFunctions → raster/functions}/creators/createAppearenceFunctions.js +0 -0
  317. /package/layers/{support/rasterFunctions → raster/functions}/creators/createBandIndexFunctions.js +0 -0
  318. /package/layers/{support/rasterFunctions → raster/functions}/creators/createChangeFunctions.js +0 -0
  319. /package/layers/{support/rasterFunctions → raster/functions}/creators/createConversionFunctions.js +0 -0
  320. /package/layers/{support/rasterFunctions → raster/functions}/creators/createLocalFunctions.js +0 -0
  321. /package/layers/{support/rasterFunctions → raster/functions}/creators/createMultiRasterAnalysisFunctions.js +0 -0
  322. /package/layers/{support/rasterFunctions → raster/functions}/creators/createStatisticsFunctions.js +0 -0
  323. /package/layers/{support/rasterFunctions → raster/functions}/creators/createSurfaceFunctions.js +0 -0
  324. /package/layers/{support/rasterFunctions → raster/functions}/customBandIndexUtils.js +0 -0
  325. /package/layers/{support/rasterFunctions → raster/functions}/mirror.js +0 -0
  326. /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionHelper.js +0 -0
  327. /package/layers/{support/rasterFunctions → raster/functions}/rasterFunctionSchema.js +0 -0
  328. /package/layers/{support/rasterFunctions → raster/functions}/rasterProjectionHelper.js +0 -0
  329. /package/layers/{support/rasterTransforms → raster/transforms}/utils.js +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5142],{4197:(e,t,i)=>{i.d(t,{Vj:()=>u,cj:()=>l,jh:()=>o,l5:()=>a,xm:()=>s});var r=i(34275),n=i(9093);function o(e){return e<=r.y9?new Array(e).fill(0):new Float64Array(e)}function s(e){return((0,r.iu)(e)?e.byteLength/8:e.length)<=r.y9?Array.from(e):new Float64Array(e)}function a(e,t,i){return Array.isArray(e)?e.slice(t,t+i):e.subarray(t,t+i)}function l(e){return[...e]}function u(e){const t=(0,n.vt)();for(let i=0;i<16;++i)t[i]=e[i];return t}},4366:(e,t,i)=>{i.d(t,{$E:()=>S,DY:()=>w,NG:()=>v,QW:()=>l,Rp:()=>y,XU:()=>h,Xg:()=>C,ct:()=>f,fy:()=>M,xx:()=>u,z2:()=>I});var r=i(4576),n=i(86738),o=i(12359),s=i(45617);function a(e,t,i){const r=t.shift();if(0===i.length){const e=[];i.push({sliceId:-1,multidimensionalDefinition:e})}const n=i.length;for(let t=0;t<n;t++){const t=i.shift().multidimensionalDefinition;r.values?.forEach(n=>{i.push({sliceId:-1,multidimensionalDefinition:[...t,{variableName:e,dimensionName:r.name,values:[n]}]})})}t.length&&a(e,t,i)}function l(e,t){const i=[];let r=0;return(t?e.variables.filter(e=>e.name.toLowerCase()===t.toLowerCase()):[...e.variables].sort((e,t)=>e.name>t.name?1:-1)).forEach(e=>{const t=[],n=[...e.dimensions].sort((e,t)=>e.name>t.name?-1:1);a(e.name,n,t),t.forEach(e=>{i.push({...e,sliceId:r++})})}),i}function u(e,t,i){let r=e;if(t&&(t=[...t].sort((e,t)=>e.dimensionName<t.dimensionName?-1:1)).forEach(({dimensionName:e,values:t,isSlice:i})=>{t.length&&(r=r.filter(r=>{const n=r.multidimensionalDefinition.find(t=>t.dimensionName===e);if(null==n)return!1;const o=n.values[0];return"number"==typeof o?"number"==typeof t[0]?t.includes(o):t.some(e=>e[0]<=o&&e[1]>=o):"number"==typeof t[0]?t.some(e=>o[0]<=e&&o[1]>=e):i?t.some(e=>e[0]===o[0]&&e[0]===o[1]):t.some(e=>e[0]>=o[0]&&e[0]<=o[1]||e[1]>=o[0]&&e[1]<=o[1]||e[0]<o[0]&&e[1]>o[1])}))}),r.length&&null!=i?.start&&null!=i.end){const e=i.start.getTime(),t=i.end.getTime(),n=r[0].multidimensionalDefinition.findIndex(e=>"StdTime"===e.dimensionName);n>-1&&(r=r.filter(i=>{const r=i.multidimensionalDefinition[n].values[0];return e<=r&&t>=r}))}return r.map(e=>e.sliceId)}function c(e,t){return Array.isArray(e)?t[0]===t[1]?e[0]===t[0]||e[1]===t[0]:e[0]>=t[0]&&e[0]<=t[1]&&e[1]>=t[0]&&e[1]<=t[1]:e>=t[0]&&e<=t[1]}function p(e,t){return e[0]<=t[0]&&e[1]>=t[0]||e[0]<=t[1]&&e[1]>=t[1]||e[0]>=t[0]&&e[1]<=t[1]}function d(e){return 1===e.length?[e[0],e[0]]:[e[0],e[e.length-1]]}function m(e,t,i){if(!t?.subsetDefinitions?.length)return e;let r;if(i){const{variables:n}=t;if(n.length&&!n.includes(i))return null;const o=t.subsetDefinitions.find(t=>t.dimensionName===e.name&&t.variableName===i);if(!o?.values?.length)return e;r=d(o.values)}else{const i=t.dimensions.find(({name:t})=>t===e.name);r=i?.extent}const n=r;if(!n?.length)return e;const o=e.values.filter(e=>c(e,n));return{...e,extent:[...n],values:o}}function g(e,t,i){if(!t?.subsetDefinitions?.length)return!1;const{variables:r}=t;if(r.length&&e.some(({variableName:e})=>e&&!r.includes(e)))return!0;for(let r=0;r<e.length;r++){const n=e[r],o=t.subsetDefinitions.find(e=>(""===n.variableName||e.variableName===n.variableName)&&e.dimensionName===n.dimensionName);if(o?.values.length){const e=d(o.values);if(n.isSlice||2!==n.values.length||Array.isArray(n.values[0])||n.values[0]===n.values[1]||!i){if(n.values.some(t=>!c(t,e)))return!0}else if(!p(n.values,e))return!0}}return!1}function y(e,t){if(null==e)return{isOutside:!1};const{geometry:i,timeExtent:r,multidimensionalDefinition:a}=t;let l=null;if(null!=r&&(l=function(e,t){const i=e.dimensions.find(({name:e})=>"StdTime"===e);if(null==i||null==t.start&&null==t.end)return t;t=t.clone();const{start:r,end:n}=t.toJSON(),o=r===n?[r]:null!=r&&null!=n?[r,n]:[r??n];return 2===o.length&&i?.extent.length&&(o[0]=Math.max(o[0],i.extent[0]),o[1]=Math.min(o[1],i.extent[1]??i.extent[0]),o[1]<o[0])||g([new s.A({variableName:"",dimensionName:"StdTime",isSlice:1===o.length,values:o})],e,!0)?null:(t.start=new Date(o[0]),t.end=new Date(o[1]??o[0]),t)}(e,r),null==l))return{isOutside:!0};const{areaOfInterest:u}=e;if(u&&i){const e=function(e){switch(e.type){case"point":return e;case"extent":return e.center;case"polygon":{const t=(0,o.Ve)(e);return t?n.A.fromJSON(t):null}}return null}(i);if(e&&!u.contains(e))return{isOutside:!0}}return null!=a&&a.length&&g(a,e,!0)?{isOutside:!0}:{isOutside:!1,intersection:{geometry:i,timeExtent:l,multidimensionalDefinition:a}}}function h(e){const{rasterInfo:t,multidimensionalSubset:i}=e,{multidimensionalInfo:r}=t;if(null==r)return null;let n=e.multidimensionalDefinition?.length?e.multidimensionalDefinition:M(t,{multidimensionalSubset:i});if(!n?.length)return null;if(n.some(e=>!e.dimensionName)){const{variableName:e}=n[0],r=M(t,{multidimensionalSubset:i,variableName:e});r?.forEach(e=>{const t=n?.find(({dimensionName:t})=>t===e.dimensionName);t?.values?.length&&(e.values=t.values,e.isSlice=t.isSlice)}),n=r}const{timeExtent:o}=e;if(null!=n&&null!=o&&(null!=o.start||null!=o.end)){n=n.map(e=>e.clone());const e=r.variables.find(({name:e})=>e===n[0].variableName)?.dimensions?.find(({name:e})=>"StdTime"===e),t=n.find(({dimensionName:e})=>"StdTime"===e);if(!e||!t)return null;const{start:i,end:s}=o,a=null==i?null:i.getTime(),l=null==s?null:s.getTime(),u=a??l,c=l??a;if(null!=e.values){const i=e.values.filter(e=>{if(Array.isArray(e)){if(u===c)return e[0]<=u&&e[1]>=u;const t=e[0]<=u&&e[1]>u||e[0]<c&&e[1]>=c,i=e[0]>=u&&e[1]<=c||e[0]<u&&e[1]>c;return t||i}return u===c?e===u:e>=u&&e<=c});if(i.length){const e=i.sort((e,t)=>{const i=Array.isArray(e)?e[0]:e,r=Array.isArray(e)?e[1]:e,n=Array.isArray(t)?t[0]:t,o=Array.isArray(t)?t[1]:t;return u===c?i-n:Math.abs(r-c)-Math.abs(o-c)})[0];t.values=[e]}else n=null}else if(e.hasRegularIntervals&&e.extent){const[i,r]=e.extent;u>r||c<i?n=null:t.values=u===c?[u]:[Math.max(i,u),Math.min(r,c)]}}return null!=n&&g(n,i)?null:n}function f(e,t={}){const{multidimensionalInfo:i,keyProperties:r}=e;if(null==i)return null;const{variableName:n,multidimensionalSubset:o,multidimensionalDefinition:s}=t,a=null!=s?s[0]?.variableName:null,l=n||a||r?.DefaultVariable;let{variables:u}=i;return o?.variables?.length&&(u=u.filter(({name:e})=>o.variables.includes(e))),l?u.find(({name:e})=>e===l)??u[0]:u[0]}function M(e,t={}){const i=f(e,t);if(!i)return null;const r=[],{dimensions:n,name:o}=i;if(0===n.length)return[new s.A({variableName:o,dimensionName:"",values:[],isSlice:!0})];for(let e=0;e<n.length;e++){const i=m(n[e],t.multidimensionalSubset,o);if(!i)return null;const{values:a,extent:l}=i;let u=a?.[0]??l?.[0];"stdz"===i.name.toLowerCase()&&!i.hasRanges&&l&&Math.abs(l[1])<=Math.abs(l[0])&&(u=a?.length?a[a.length-1]:l[1]),r.push(new s.A({variableName:o,dimensionName:i.name,values:[u],isSlice:!t.useRangeForRangedDimensionInfo||!!i.hasRanges}))}return r}function w(e){return!!e?.length&&e.some(e=>{if(null==e.values)return!0;const t=e.values.length;return 0===t||t>1||!e.isSlice&&Array.isArray(e.values[0])})}function I(e,t){if(null==t||null==e)return null;let i=t.variables.map(e=>({...e}));return e?.variables?.length&&(i=i.filter(({name:t})=>e.variables.includes(t)),i.forEach(t=>{t.dimensions=t.dimensions.map(i=>m(i,e,t.name)).filter(r.Ru)})),i}function A(e,t){const{values:i}=t;if(i?.length){const t=Array.isArray(i[0]),r=Array.isArray(e);return t!==r?-1:t&&r?i.findIndex(t=>t[0]===e[0]&&t[1]===e[1]):i.indexOf(e)}const{extent:r}=t;if(Array.isArray(e)||!r||e<r[0]||e>r[1])return-1;const n=t.interval||1;if("ISO8601"!==t.unit)return Math.round((e-r[0])/n);const o=r[0];let s=-1;switch(t.intervalUnit?.toLowerCase()||"days"){case"seconds":s=Math.round((e-o)/1e3/n);break;case"minutes":s=Math.round((e-o)/6e4/n);break;case"hours":s=Math.round((e-o)/36e5/n);break;case"days":s=Math.round((e-o)/864e5/n);break;case"months":{const t=new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear(),i=new Date(o).getUTCMonth(),r=new Date(e).getUTCMonth();s=0===t?r-i:r+11-i+12*(t-1)}break;case"years":s=Math.round((new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear())/n);break;case"decades":s=Math.round((new Date(e).getUTCFullYear()-new Date(o).getUTCFullYear())/10/n)}return s}function b(e){let t=e.values?.length;if(t)return t;const{extent:i,unit:r}=e,n=e.interval||1,o=i?i[1]-i[0]:0;if("ISO8601"!==r)return Math.round(o/n);switch(e.intervalUnit?.toLowerCase()??"seconds"){case"seconds":t=Math.round(o/1e3/n);break;case"minutes":t=Math.round(o/6e4/n);break;case"hours":t=Math.round(o/36e5/n);break;case"days":t=Math.round(o/864e5/n);break;case"months":if(i){const e=new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear(),r=new Date(i[0]).getUTCMonth(),n=new Date(i[1]).getUTCMonth();t=0===e?n-r+1:n+11-r+12*(e-1)+1}else t=0;break;case"years":t=i?Math.round((new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear())/n):0;break;case"decades":t=i?Math.round((new Date(i[1]).getUTCFullYear()-new Date(i[0]).getUTCFullYear())/10/n):0;break;default:t=0}return t}function C(e){if(2!==e.extent?.length||!e.interval)return[];const{extent:[t,i],interval:r}=e;if("ISO8601"===e.unit){const n=e.intervalUnit?.toLowerCase()??"days";return["decades","years","months","days","hours","minutes","seconds"].includes(n)?function(e,t,i,r){const n=[];let o=e;const s=new Date(e);for(;o<=t;)switch(n.push(o),r){case"decades":s.setUTCFullYear(s.getUTCFullYear()+10*i),o=s.getTime();break;case"years":s.setUTCFullYear(s.getUTCFullYear()+i),o=s.getTime();break;case"months":s.setUTCMonth(s.getUTCMonth()+i),o=s.getTime();break;case"days":o+=864e5*i;break;case"hours":o+=36e5*i;break;case"minutes":o+=6e4*i;break;case"seconds":o+=1e3*i}return 1===n.length?n[1]=t:n[n.length-1]=t,n}(t,i,r,n):[]}const n=Math.round((i-t)/r);return Array.from({length:n},(e,o)=>o===n-1?i:t+o*r)}function v(e,t){let i=0;const r=e[0].variableName,n=[...t.variables].sort((e,t)=>e.name>t.name?1:-1);for(let t=0;t<n.length;t++){const o=n[t],s=[...o.dimensions].sort((e,t)=>e.name>t.name?-1:1);if(o.name!==r){i+=s.map(e=>b(e)).reduce((e,t)=>e*t);continue}const a=s.map(e=>b(e)),l=s.length;for(let t=0;t<l;t++){const r=e.find(e=>e.dimensionName===s[t].name);if(null==r)return null;const n=A(r.values[0],s[t]);if(-1===n)return null;a.shift(),i+=t===l-1?n:n*a.reduce((e,t)=>e*t)}break}return i}function S(e){return Math.round(24*(e-25569)*3600*1e3)}},6797:(e,t,i)=>{i.d(t,{Ui:()=>d});var r=i(69622),n=i(7762),o=i(88620);const s=new Set(["esri.Color","esri.portal.Portal","esri.symbols.support.Symbol3DAnchorPosition2D","esri.symbols.support.Symbol3DAnchorPosition3D"]);function a(e){return e instanceof r.A}function l(e){return e instanceof n.A?Object.keys(e.items):a(e)?(0,o.oY)(e).keys():e?Object.keys(e):[]}function u(e,t){return e instanceof n.A?e.items[t]:e[t]}function c(e){return e?e.declaredClass:null}function p(e,t){const i=e.diff;if(i&&"function"==typeof i)return i(e,t);const r=l(e),n=l(t);if(0===r.length&&0===n.length)return;if(!r.length||!n.length||function(e,t){return!(!Array.isArray(e)||!Array.isArray(t))&&e.length!==t.length}(e,t))return{type:"complete",oldValue:e,newValue:t};const o=n.filter(e=>!r.includes(e)),d=r.filter(e=>!n.includes(e)),m=r.filter(i=>n.includes(i)&&u(e,i)!==u(t,i)).concat(o,d).sort(),g=c(e);if(g&&s.has(g)&&m.length)return{type:"complete",oldValue:e,newValue:t};let y;const h=a(e)&&a(t);for(const r of m){const n=u(e,r),o=u(t,r);let s;if((h||"function"!=typeof n&&"function"!=typeof o)&&n!==o&&(null!=n||null!=o)){if(i&&i[r]&&"function"==typeof i[r])s=i[r]?.(n,o);else if(n instanceof Date&&o instanceof Date){if(n.getTime()===o.getTime())continue;s={type:"complete",oldValue:n,newValue:o}}else s="object"==typeof n&&"object"==typeof o&&c(n)===c(o)?p(n,o):{type:"complete",oldValue:n,newValue:o};null!=s&&(null!=y?y.diff[r]=s:y={type:"partial",diff:{[r]:s}})}}return y}function d(e,t){if("function"!=typeof e&&"function"!=typeof t&&(null!=e||null!=t))return null==e||null==t||"object"==typeof e&&"object"==typeof t&&c(e)!==c(t)?{type:"complete",oldValue:e,newValue:t}:p(e,t)}},7548:(e,t,i)=>{function r(e){return"Function"===e?.datasetFormat}function n(e){return r(e)?e.primaryRasters.rasters:[e]}function o(e,t,i,r){const{x:n,y:o}=t,{x:s,y:a}=i,{xmin:l,xmax:u,ymin:c,ymax:p}=e,{width:d,height:m}=e,g=d/s,y=m/a,h=Math.min(g,y),f=h<=1?0:Math.min(.1,h/100),M=Math.floor((l-n)/s+f),w=Math.floor((o-p)/a+f),I=Math.floor((u-n)/s-f),A=Math.floor((o-c)/a-f);return{ul:{x:M,y:w},width:r>0&&g<.1?0:I-M+1,height:r>0&&y<.1?0:A-w+1}}i.d(t,{$g:()=>o,pb:()=>n,qg:()=>r})},8303:(e,t,i)=>{i.d(t,{A:()=>A});var r=i(31635),n=i(92602),o=i(70333),s=i(11254),a=i(60999),l=i(49186),u=i(53966),c=i(97768),p=i(74887),d=i(84952),m=i(91429),g=i(77548),y=i(20655),h=i(80812),f=i(41318),M=i(10407),w=i(36005),I=i(43937);const A=e=>{const t=e;let A=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new h.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:r}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await r({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||u.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch(e=>((0,p.QP)(e),!0)))}async setUserPrivileges(e,t){if(!n.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:r},content:{updateItem:n}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",r),this._set("userHasUpdateItemPrivileges",n)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const r=!o.id?.findCredential(this.url),n=e===i.id;if(n&&i.portal.user)return this._getUserPrivileges(i,r);let s,a;if(n)s=i.portal.url;else try{s=await(0,g.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!s||!(0,d.b8)(s,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(o.id?.getCredential(`${s}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,u=!1,c=!1;if(!a)return{features:{edit:l,fullEdit:u},content:{updateItem:c}};try{if(n?await i.reload():(i=new h.default({id:e,portal:{url:s}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,r)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const i=(0,M.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?o.id?.findCredential(this.url):null;if(!t)return!0;const i=b.credential===t?b.user:await this._fetchEditingUser(e);return b.credential=t,b.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=o.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const r=`${i.owningSystemUrl}/sharing/rest`,n=y.A.getDefault();if(n&&n.loaded&&(0,d.S8)(n.restUrl)===(0,d.S8)(r))return n.user;const l=`${r}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,s.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?f.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,r=this.portalItem?.id&&(this.portalItem.portal||y.A.getDefault());return i&&r&&!(0,d.ut)(r.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,r.Cg)([(0,m.MZ)({type:h.default})],A.prototype,"portalItem",null),(0,r.Cg)([(0,w.w)("web-document","portalItem",["itemId"])],A.prototype,"readPortalItem",null),(0,r.Cg)([(0,I.K)("web-document","portalItem",{itemId:{type:String}})],A.prototype,"writePortalItem",null),(0,r.Cg)([(0,m.MZ)({clonable:!1})],A.prototype,"resourceReferences",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasEditingPrivileges",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasFullEditingPrivileges",void 0),(0,r.Cg)([(0,m.MZ)({type:Boolean,readOnly:!0})],A.prototype,"userHasUpdateItemPrivileges",void 0),A=(0,r.Cg)([(0,m.$K)("esri.layers.mixins.PortalLayer")],A),A},b={credential:null,user:null}},9093:(e,t,i)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function n(e){return[e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15]]}i.d(t,{o8:()=>n,vt:()=>r,zK:()=>o});const o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:o,clone:n,create:r,fromValues:function(e,t,i,r,n,o,s,a,l,u,c,p,d,m,g,y){return[e,t,i,r,n,o,s,a,l,u,c,p,d,m,g,y]}},Symbol.toStringTag,{value:"Module"}))},10184:(e,t,i)=>{i.d(t,{A:()=>c});var r=i(31635),n=i(69540),o=i(25482),s=i(88930),a=i(91429),l=i(73133),u=i(93223);let c=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,s.t)(this.value,this.unit,"milliseconds")}};(0,r.Cg)([(0,u.e)(l.j,{nonNullable:!0})],c.prototype,"unit",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],c.prototype,"value",void 0),c=(0,r.Cg)([(0,a.$K)("esri.time.TimeInterval")],c)},10407:(e,t,i)=>{i.d(t,{It:()=>m,LG:()=>s,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>l,mm:()=>d,sQ:()=>p});var r=i(91218),n=i(16930),o=i(28735);function s(e,t){if(!a(e,t)){const i=e.typeKeywords;i?i.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function l(e){return a(e,d.HOSTED_SERVICE)}function u(e,t){const i=e.typeKeywords;if(i){const e=i.indexOf(t);e>-1&&i.splice(e,1)}}function c(e,t,i){i?s(e,t):u(e,t)}async function p(e){const t=e.clone().normalize();let i;if(t.length>1)for(const e of t)i?e.width>i.width&&(i=e):i=e;else i=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,o.ci)(e);const i=n.A.WGS84;return await(0,r.initializeProjection)(t,i),(0,r.project)(e,i)}(i)}const d={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function m(e){const{portal:t,isOrgItem:i,itemControl:r}=e,n=t.user?.privileges;let o=!n||n.includes("features:user:edit"),s=!!i&&!!n?.includes("features:user:fullEdit");const a="update"===r||"admin"===r;return a?s=o=!0:s&&(o=!0),{features:{edit:o,fullEdit:s},content:{updateItem:a}}}},12711:(e,t,i)=>{i.d(t,{$P:()=>B,I8:()=>A,Mm:()=>v,PD:()=>b,ci:()=>x,fp:()=>C,m7:()=>D,w6:()=>S});var r=i(68197),n=(i(86211),i(7548)),o=i(20437),s=(i(86162),i(67730),i(80498)),a=(i(46981),i(36280)),l=i(93618),u=i(18031),c=i(30943),p=(i(88542),i(67369)),d=i(88178),m=i(94833),g=(i(2024),i(48940)),y=(i(72500),i(9760),i(84892),i(1626)),h=i(94985);const f=.25,M=y.A.fromJSON({type:"multipart",colorRamps:[{fromColor:[0,0,255],toColor:[0,255,255]},{fromColor:[0,255,255],toColor:[255,255,0]},{fromColor:[255,255,0],toColor:[255,0,0]}]}),w=y.A.fromJSON(p.vj[0]),I=new Set(["scientific","standard-time","vector-uv","vector-magdir","vector-u","vector-v","vector-magnitude","vector-direction"]);function A(e){return e.presetRenderers?.find(({method:t,value:i})=>"raster-function-template"===t?i===e.rasterFunctionName:"variable"===t&&i===e.variableName)}function b(e,t){const{attributeTable:i,colormap:n}=e;if((0,d.rd)(e)){const t=function(e){if(!(0,d.rd)(e))return null;let t;if(null!=e.statistics&&e.statistics.length&&("vector-magdir"===e.dataType||"vector-uv"===e.dataType)){const{minMagnitude:i,maxMagnitude:r}=function(e,t){let i,r;if("vector-magdir"===e)i=t[0].min,r=t[0].max;else{const e=t[0].min,n=t[0].max,o=t[1].min,s=t[1].max;i=0,r=Math.max(Math.abs(e),Math.abs(o),Math.abs(n),Math.abs(s))}return{minMagnitude:i,maxMagnitude:r}}(e.dataType,e.statistics);t=[new g.A({field:"Magnitude",minSize:10,maxSize:40,minDataValue:i,maxDataValue:r})]}const i=null!=e.multidimensionalInfo?k.get(e.multidimensionalInfo.variables[0].unit):void 0,r=new u.A({visualVariables:t,inputUnit:i,rotationType:"geographic"});return r.visualVariables=[...r.sizeVariables,...r.rotationVariables],r}(e);if(null!=t)return t}if(t?.rasterFunctionColorRamp){const i=T(e,t);return i.colorRamp=t.rasterFunctionColorRamp,i}if(null!=n){const t=function(e){if(!(0,d.FA)(e))return null;let t;const{attributeTable:i,colormap:r}=e;if(null!=i){const e=Z(i,"value"),r=L(i,null,!0);"string"===r.type&&(t={},i.features.forEach(i=>{const n=i.attributes;t[n[e.name]]=r?n[r.name]:n[e.name]}))}return s.A.createFromColormap(r,t)}(e);if(null!=t)return t}if(null!=i){const t=function(e,t){if(!(0,d.hu)(e,t))return null;const{attributeTable:i,statistics:n}=e,o=L(i,t),s=Z(i,"red"),a=Z(i,"green"),u=Z(i,"blue"),g=new c.A,y=[],f=new Set,M=!!(s&&a&&u);if(null!=i)i.features.forEach(e=>{const t=e.attributes[o.name];if(!f.has(e.attributes[o.name])&&null!=t){f.add(t);const n=M&&("single"===s.type||"double"===s.type)&&("single"===a.type||"double"===a.type)&&("single"===u.type||"double"===u.type)&&!i.features.some(e=>e.attributes[s.name]>1||e.attributes[a.name]>1||e.attributes[u.name]>1),l=n?255:1;y.push(new m.A({value:e.attributes[o.name],label:e.attributes[o.name]+"",symbol:new h.A({style:"solid",outline:null,color:new r.A(M?[e.attributes[s.name]*l,e.attributes[a.name]*l,e.attributes[u.name]*l,1]:[0,0,0,0])})}))}});else if(n?.[0])for(let e=n[0].min;e<=n[0].max;e++)y.push(new m.A({value:e,label:e.toString(),symbol:new h.A({style:"solid",outline:null,color:new r.A([0,0,0,0])})}));if(y.sort((e,t)=>e.value&&"string"==typeof e.value.valueOf()?0:e.value>t.value?1:-1),!M){const e=(0,p.R8)(w,{numColors:y.length});y.forEach((t,i)=>t.symbol.color=new r.A(e[i].slice(1,4))),g.colorRamp=w}return new l.A({field:o.name,uniqueValueInfos:y,authoringInfo:g})}(e);if(null!=t)return t}return T(e,t)}function C(e,t=!1){const i=["raster-stretch"];return(0,d.FA)(e,t)&&i.push("raster-colormap"),(0,d.hu)(e)&&i.push("unique-value"),(0,d.xX)(e,t)&&i.push("class-breaks"),(0,d.iL)(e)&&i.push("raster-shaded-relief"),(0,d.rd)(e)&&i.push("vector-field"),(0,d.QJ)(e)&&i.push("flow"),i}function v(e){return(0,n.qg)(e)&&"Colormap"===e.rasterFunction.functionName?e.rasterFunction.colorRamp:void 0}function S(e,t,i){const r=i?.toLowerCase().replace("bicubic","cubic"),n=["nearest","bilinear","cubic","majority"].find(e=>e===r);return"Map"===t?n??"bilinear":"standard-time"===e.dataType?n??"nearest":"thematic"===e.dataType||e.attributeTable||e.colormap?"nearest"===n||"majority"===n?n:"nearest":n??"bilinear"}function T(e,t){e=D(e,t?.variableName);const{bandCount:i}=e;let{bandIds:r,stretchType:n}=t||{};r?.some(e=>e>=i)&&(r=null);let o=e.statistics,s=e.histograms;i>1?(r=r?.length?r:x(e),o=null==o?null:r?.map(e=>o[e]),s=null==s?null:r?.map(e=>s[e])):r=[0],null==n&&(n=function(e){let t="percent-clip";const{pixelType:i,dataType:r,histograms:n,statistics:o,multidimensionalInfo:s}=e,a=I.has(r)||"generic"===r&&null!=s;return"u8"!==i||"processed"!==r&&null!=n&&null!=o?"u8"===i||"elevation"===r||a?t="min-max":null!=n?t="percent-clip":null!=o&&(t="min-max"):t="none",t}(e)),t?.includeStatisticsInStretch&&("percent-clip"===n||"histogram-equalization"===n)&&e.statistics?.length&&(n="min-max");let l=!1;switch(n){case"none":l=!1;break;case"percent-clip":l=!s?.length;break;default:l=!o?.length}const{dataType:u}=e,c=1===r?.length&&I.has(u)?M:null,p=new a.A({stretchType:n,dynamicRangeAdjustment:l,colorRamp:c,outputMin:0,outputMax:255,gamma:1===r?.length?[1]:[1,1,1],useGamma:!1});return"percent-clip"===n?p.maxPercent=p.minPercent=f:"standard-deviation"===n&&(p.numberOfStandardDeviations=2),l||null==e.multidimensionalInfo&&!t?.includeStatisticsInStretch||("percent-clip"===n?p.histograms=s:"min-max"!==n&&"standard-deviation"!==n||(p.customStatistics=o?.map(e=>({...e})))),p}function D(e,t){const{multidimensionalInfo:i}=e;if(!t||!i)return e;const r=i.variables.find(e=>e.name===t);if(!r)return e;if(e=e.clone(),r){const{statistics:t,histograms:i}=r;t?.length&&(e.statistics=t.map(e=>({min:e.min,max:e.max,avg:e.avg,stddev:e.stddev}))),i?.length&&(e.histograms=i)}return e}function x(e){const t=e.bandCount;if(1===t)return null;if(2===t)return[0];const{bandInfos:i}=e;let r;if(i.length===t){const{red:e,green:t,blue:n,nir:o}=function(e){const t={};for(let i=0;i<e.length;i++){const r=e[i].name.toLowerCase();"red"===r?t.red=i:"green"===r?t.green=i:"blue"===r?t.blue=i:"nearinfrared"!==r&&"nearinfrared_1"!==r&&"nir"!==r||(t.nir=i)}if(null==t.blue||null==t.green||null==t.red||null==t.nir){const i=N(e);if(t.blue??=j(i,480),t.green??=j(i,550),t.red??=j(i,660),null==t.nir){const r=N(e,800);t.nir=j(r,810)??j(i,810)}}return t}(i);null!=e&&null!=t&&null!=n?r=[e,t,n]:null!=o&&null!=e&&null!=t&&(r=[o,e,t])}return!r&&t>=3&&(r=[0,1,2]),r}function j(e,t,i=60){let r,n=i;for(const i of e){const e=Math.abs(i.wavelength-t);e<=n&&(n=e,r=i.index)}return r}function N(e,t){return e.map(({name:e,minWavelength:i,maxWavelength:r},n)=>/thermal/i.test(e)||/pan/i.test(e)||null!=t&&null!=r&&r<t?null:{wavelength:null!=i&&null!=r?(i+r)/2:i??r??0,index:n}).filter(e=>null!=e)}function L(e,t,i){let r;return null!=e?(r=t?e.fields.find(e=>t.toLowerCase()===e.name.toLowerCase()):function(e){let t;for(let i=0;i<e.length;i++){const r=e[i].name.toLowerCase();if("string"===e[i].type){if(r.startsWith("class")){t=e[i];break}null==t&&(r.endsWith("name")||r.endsWith("type"))&&(t=e[i])}}return t}(e.fields),r||(i||(r=e.fields.find(e=>"string"===e.type)),r||(r=Z(e,"value")))):r=new o.A({name:"value"}),r}function Z(e,t){return null==e?null:e.fields.find(e=>e.name.toLowerCase()===t)}const k=new Map([["m/s","meter-per-second"],["km/h","kilometer-per-hour"],["knots","knots"],["ft/s","feet-per-second"],["mph","mile-per-hour"]]);function R(e){return{color:e.symbolLayers[0].material?.color,type:"esriSFS",style:"esriSFSSolid"}}function B(e){if("uniqueValue"===e.type){const t=e.uniqueValueInfos,i=t?.[0].symbol;return i?.symbolLayers?.length&&(e.uniqueValueInfos=t?.map(e=>({value:e.value,label:e.label,symbol:e.symbol?R(e.symbol):null}))),e}if("classBreaks"===e.type){const t=e.classBreakInfos,i=t[0].symbol;return i?.symbolLayers?.length&&(e.classBreakInfos=t.map(e=>({classMinValue:e.classMinValue,classMaxValue:e.classMaxValue,label:e.label,symbol:e.symbol?R(e.symbol):null}))),e}return e}},17136:(e,t,i)=>{i.d(t,{Y_:()=>D,O7:()=>S,el:()=>v});var r=i(92602),n=i(69052),o=i(49186),s=i(53966),a=i(39829),l=i(82799),u=i(16930),c=i(80754),p=i(21325),d=i(28735),m=i(11254),g=i(65864),y=i(2272),h=i(84952),f=i(92300);const M=()=>s.A.getLogger("esri.geometry.support.normalizeUtils");function w(e){return"polygon"===e[0].type}function I(e){return"polyline"===e[0].type}function A(e,t,i){if(t){const t=function(e,t){if(!(e instanceof l.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw M().error(e),new o.A("internal:geometry",e)}const i=(0,c.r8)(e),r=[];for(const e of i){const i=[];r.push(i),i.push([e[0][0],e[0][1]]);for(let r=0;r<e.length-1;r++){const n=e[r][0],o=e[r][1],s=e[r+1][0],a=e[r+1][1],l=Math.sqrt((s-n)*(s-n)+(a-o)*(a-o)),u=(a-o)/l,c=(s-n)/l,p=l/t;if(p>1){for(let e=1;e<=p-1;e++){const r=e*t,s=c*r+n,a=u*r+o;i.push([s,a])}const e=(l+Math.floor(p-1)*t)/2,r=c*e+n,s=u*e+o;i.push([r,s])}i.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:r,spatialReference:e.spatialReference}):new l.A({paths:r,spatialReference:e.spatialReference})}(e,1e6);e=(0,d.ci)(t,!0)}return i&&(e=(0,c.kS)(e,i)),e}function b(e,t,i){if(Array.isArray(e)){const r=e[0];if(r>t){const i=(0,c.kd)(r,t);e[0]=r+i*(-2*t)}else if(r<i){const t=(0,c.kd)(r,i);e[0]=r+t*(-2*i)}}else{const r=e.x;if(r>t){const i=(0,c.kd)(r,t);e=e.clone().offset(i*(-2*t),0)}else if(r<i){const t=(0,c.kd)(r,i);e=e.clone().offset(t*(-2*i),0)}}return e}function C(e,t){let i=-1;for(let r=0;r<t.cutIndexes.length;r++){const n=t.cutIndexes[r],o=t.geometries[r],s=(0,c.r8)(o);for(let e=0;e<s.length;e++){const t=s[e];t.some(i=>{if(i[0]<180)return!0;{let i=0;for(let e=0;e<t.length;e++){const r=t[e][0];i=r>i?r:i}i=Number(i.toFixed(9));const r=-360*(0,c.kd)(i,180);for(let i=0;i<t.length;i++){const t=o.getPoint(e,i);o.setPoint(e,i,t.clone().offset(r,0))}return!0}})}if(n===i){if(w(e))for(const t of(0,c.r8)(o))e[n]=e[n].addRing(t);else if(I(e))for(const t of(0,c.r8)(o))e[n]=e[n].addPath(t)}else i=n,e[n]=o}return e}async function v(e,t,i){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&M().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const n="string"==typeof t?t:t?.url??r.A.geometryServiceUrl;let o,s,u,w,I,S,T,D,x=0;const j=[],N=[];for(const t of e)if(null!=t)if(o||(o=t.spatialReference,s=(0,p.Vp)(o),u=o.isWebMercator,S=u?102100:4326,w=c.j7[S].maxX,I=c.j7[S].minX,T=c.j7[S].plus180Line,D=c.j7[S].minus180Line),s)if("mesh"===t.type)N.push(t);else if("point"===t.type)N.push(b(t.clone(),w,I));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map(e=>b(e,w,I)),N.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,s);N.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,i=(0,c.kd)(e.xmin,I)*(2*w);let r=0===i?t.clone():(0,c.kS)(t.clone(),i);e.offset(i,0);let{xmin:n,xmax:o}=e;n=Number(n.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(T)&&o!==w?(x=o>x?o:x,r=A(r,u),j.push(r),N.push("cut")):e.intersects(D)&&n!==I?(x=o*(2*w)>x?o*(2*w):x,r=A(r,u,360),j.push(r),N.push("cut")):N.push(r)}else N.push(t.clone());else N.push(t);else N.push(t);let L=(0,c.kd)(x,w),Z=-90;const k=L,R=new l.A;for(;L>0;){const e=360*L-180;R.addPath([[e,Z],[e,-1*Z]]),Z*=-1,L--}if(j.length>0&&k>0){const t=C(j,await async function(e,t,i,r){const n=(0,y.Dl)(e),o=t[0].spatialReference,s={...r,responseType:"json",query:{...n.query,f:"json",sr:(0,p.YX)(o),target:JSON.stringify({geometryType:(0,g.$B)(t[0]),geometries:t}),cutter:JSON.stringify(i)}},a=await(0,m.A)(n.path+"/cut",s),{cutIndexes:l,geometries:u=[]}=a.data;return{cutIndexes:l,geometries:u.map(e=>{const t=(0,g.rS)(e);return t.spatialReference=o,t})}}(n,j,R,i)),r=[],o=[];for(let i=0;i<N.length;i++){const n=N[i];if("cut"!==n)o.push(n);else{const n=t.shift(),s=e[i];null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&n.rings.length>=s.rings.length?(r.push(n),o.push("simplify")):o.push(u?(0,d.Gh)(n):n)}}if(!r.length)return o;const s=await async function(e,t,i){const r="string"==typeof e?(0,h.An)(e):e,n=t[0].spatialReference,o=(0,g.$B)(t[0]),s={...i,query:{...r.query,f:"json",sr:(0,p.YX)(n),geometries:JSON.stringify((0,f.X)(t))}},{data:a}=await(0,m.A)(r.path+"/simplify",s);return(0,f.V)(a.geometries,o,n)}(n,r,i),a=[];for(let e=0;e<o.length;e++){const t=o[e];"simplify"!==t?a.push(t):a.push(u?(0,d.Gh)(s.shift()):s.shift())}return a}const B=[];for(let e=0;e<N.length;e++){const t=N[e];if("cut"!==t)B.push(t);else{const e=j.shift();B.push(!0===u?(0,d.Gh)(e):e)}}return B}function S(e,t,i){const r=(0,p.Vp)(i);if(null==r)return e;const[n,o]=r.valid,s=2*o;let a=0,l=0;t>o?a=Math.ceil(Math.abs(t-o)/s):t<n&&(a=-Math.ceil(Math.abs(t-n)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<n&&(l=-Math.ceil(Math.abs(e-n)/s));let u=e+(a-l)*s;const c=u-t;return c>o?u-=s:c<n&&(u+=s),u}function T(e){const t=(0,p.Vp)(e);if(null==t)return null;const[i,r]=t.valid;return new n.hr(i,r)}const D=T(u.A.WGS84);T(u.A.WebMercator)},18031:(e,t,i)=>{i.d(t,{A:()=>j});var r,n=i(31635),o=i(68197),s=i(52106),a=i(66552),l=i(25482),u=i(4718),c=i(91429),p=i(86738),d=i(17136),m=i(34251),g=i(86162),y=i(63988),h=i(88542),f=i(23461),M=i(48940),w=i(29266),I=i(58592),A=i(31593),b=i(53930),C=i(37531),v=i(36005),S=i(93223);const T=new Set(["esriMetersPerSecond","esriKilometersPerHour","esriKnots","esriFeetPerSecond","esriMilesPerHour"]),D=new a.J({beaufort_ft:"beaufort-ft",beaufort_km:"beaufort-km",beaufort_kn:"beaufort-kn",beaufort_m:"beaufort-m",beaufort_mi:"beaufort-mi",classified_arrow:"classified-arrow",ocean_current_kn:"ocean-current-kn",ocean_current_m:"ocean-current-m",simple_scalar:"simple-scalar",single_arrow:"single-arrow",wind_speed:"wind-barb"}),x=new a.J({flow_from:"flow-from",flow_to:"flow-to"});let j=r=class extends((0,y.h)(l.o)){constructor(e){super(e),this.attributeField="Magnitude",this.flowRepresentation="flow-from",this.rotationType="arithmetic",this.style="single-arrow",this.symbolTileSize=50,this.type="vector-field"}readInputUnit(e,t){return T.has(e)?m.MD.fromJSON(e):null}readOutputUnit(e,t){return T.has(e)?m.MD.fromJSON(e):null}get styleRenderer(){const e=this.style,t=this.attributeField,i=this._createStyleRenderer(e);return i.field=t,i}get visualVariables(){return super.visualVariables}set visualVariables(e){super.visualVariables=e}get sizeVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)"size"===t.type&&e.push(t);if(0===e.length){const t=new M.A({field:"Magnitude",minSize:.2*this.symbolTileSize,maxSize:.8*this.symbolTileSize});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}get rotationVariables(){const e=[];if(this.visualVariables)for(const t of this.visualVariables)"rotation"===t.type&&e.push(t);if(0===e.length){const t=new f.A({field:"Direction",rotationType:this.rotationType});this.visualVariables?this.visualVariables.push(t):this._set("visualVariables",[t]),e.push(t)}return e}clone(){return new r({attributeField:this.attributeField,flowRepresentation:this.flowRepresentation,rotationType:this.rotationType,symbolTileSize:this.symbolTileSize,style:this.style,visualVariables:(0,u.o8)(this.visualVariables),inputUnit:this.inputUnit,outputUnit:this.outputUnit})}async getGraphicsFromPixelData(e,t=!1,i=[]){const r=new Array,n=(0,m.KL)(this.inputUnit,this.outputUnit),o=this.rotationVariables[0]?.rotationType||this.rotationType,a=t?(0,m.FI)(e.pixelBlock,"vector-uv",o,n):(0,m.Rn)(e.pixelBlock,"vector-magdir",n);if(null==a)return r;const l=e.extent,u=null!=a.mask&&a.mask.length>0;let c=0;const g=(l.xmax-l.xmin)/a.width,y=(l.ymax-l.ymin)/a.height;for(let e=0;e<a.height;e++)for(let t=0;t<a.width;t++,c++){let n=new p.A({x:l.xmin+t*g+g/2,y:l.ymax-e*y-y/2,spatialReference:l.spatialReference});n=(await(0,d.el)(n))[0];const o=i.some(e=>e.intersects(n));if((!u||a.mask[c])&&!o){const e={Magnitude:a.pixels[0][c],Direction:a.pixels[1][c]},t=new s.A({geometry:new p.A({x:n.x,y:n.y,spatialReference:l.spatialReference}),attributes:e});t.symbol=this._getVisualVariablesAppliedSymbol(t),r.push(t)}}return r}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}getClassBreakInfos(){return this.styleRenderer?.classBreakInfos}getDefaultSymbol(){return this.styleRenderer?.defaultSymbol}_getDefaultSymbol(e){return new b.A({path:"M14,32 14,18 9,23 16,3 22,23 17,18 17,32 z",outline:new A.A({width:0}),size:20,color:e||new o.A([0,92,230])})}_getVisualVariablesAppliedSymbol(e){if(!e)return;const t=this.styleRenderer?.getSymbol(e)?.clone(),i=this.sizeVariables,r=this.rotationVariables;if(i&&i.length&&this.sizeVariables.forEach(i=>(0,C.UQ)(t,(0,w.Yz)([i],e))),r&&r.length){const i="flow-to"===this.flowRepresentation==("ocean-current-kn"===this.style||"ocean-current-m"===this.style)?0:180;e.attributes.Direction=e.attributes.Direction+i,this.rotationVariables.forEach(i=>(0,C.GG)(t,(0,w.UT)(i,e),i.axis))}return t}_createStyleRenderer(e){let t={defaultSymbol:this._getDefaultSymbol(),classBreakInfos:[]};switch(e){case"single-arrow":t=this._createSingleArrowRenderer();break;case"beaufort-kn":t=this._createBeaufortKnotsRenderer();break;case"beaufort-m":t=this._createBeaufortMeterRenderer();break;case"beaufort-ft":t=this._createBeaufortFeetRenderer();break;case"beaufort-mi":t=this._createBeaufortMilesRenderer();break;case"beaufort-km":t=this._createBeaufortKilometersRenderer();break;case"ocean-current-m":t=this._createCurrentMeterRenderer();break;case"ocean-current-kn":t=this._createCurrentKnotsRenderer();break;case"simple-scalar":t=this._createSimpleScalarRenderer();break;case"wind-barb":t=this._createWindBarbsRenderer();break;case"classified-arrow":t=this._createClassifiedArrowRenderer()}return new g.A(t)}_createSingleArrowRenderer(){return{defaultSymbol:this._getDefaultSymbol()}}_createBeaufortKnotsRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([214,47,39])),classBreakInfos:this._getClassBreaks([0,1,3,6,10,16,21,27,33,40,47,55,63],[[40,146,199],[89,162,186],[129,179,171],[160,194,155],[191,212,138],[218,230,119],[250,250,100],[252,213,83],[252,179,102],[250,141,52],[247,110,42],[240,71,29]])}}_createBeaufortMeterRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([214,47,39])),classBreakInfos:this._getClassBreaks([0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7],[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortFeetRenderer(){const e=this._getDefaultSymbol(new o.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map(e=>3.28084*e),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortMilesRenderer(){const e=this._getDefaultSymbol(new o.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map(e=>2.23694*e),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createBeaufortKilometersRenderer(){const e=this._getDefaultSymbol(new o.A([214,47,39]));let t=[0,.2,1.8,3.3,5.4,8.5,11,14.1,17.2,20.8,24.4,28.6,32.7];return t=t.map(e=>3.6*e),{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[69,117,181],[101,137,184],[132,158,186],[162,180,189],[192,204,190],[222,227,191],[255,255,191],[255,220,161],[250,185,132],[245,152,105],[237,117,81],[232,21,21]])}}_createCurrentMeterRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([177,177,177])),classBreakInfos:this._getClassBreaks([0,.5,1,1.5,2],[[78,26,153],[179,27,26],[202,128,26],[177,177,177]])}}_createCurrentKnotsRenderer(){return{defaultSymbol:this._getDefaultSymbol(new o.A([177,177,177])),classBreakInfos:this._getClassBreaks([0,.25,.5,1,1.5,2,2.5,3,3.5,4],[[0,0,0],[0,37,100],[78,26,153],[151,0,100],[179,27,26],[177,78,26],[202,128,26],[177,179,52],[177,177,177]])}}_createClassifiedArrowRenderer(){const e=this._getDefaultSymbol(new o.A([56,168,0]));let t=[0,1e-6,3.5,7,10.5,14];if(this.sizeVariables?.length){const e=this.sizeVariables[0].minDataValue,i=this.sizeVariables[0].maxDataValue;if(e&&i){const r=(i-e)/5;t=Array.from(Array(6).keys()).map(t=>e+r*t)}}return{defaultSymbol:e,classBreakInfos:this._getClassBreaks(t,[[56,168,0],[139,309,0],[255,255,0],[255,128,0],[255,0,0]])}}_createSimpleScalarRenderer(){return{defaultSymbol:I.A.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACsAAAArCAQAAABLVLlLAAAABGdBTUEAAYagMeiWXwAAAAJiS0dEAACqjSMyAAAACXBIWXMAAABIAAAASABGyWs+AAAC3ElEQVRIx9XXvW4cVRQH8N982btpsIREJECyiCXsxX4DKh6AliqGKCBBE2SlwlHgAbBD/AKmyEYUeQ1KahPZSZQvBCkQLTHZ7KGY8Xodz4w3a1NwbzVzz/znfJ//zbStVC5q3icKak9GAs2QIdDx3PtW/S011NW3p+M5Eomh11ipTIKe6+4LQzHaQ+G+63pIZNJJQXMpljwTwj1brpgx5w1zZlyx5Z4QnllEIm2xeeSUHBf0hV0bejo1Uh09G3aFvgXk7cCJFBc9EdaRVuHJJaOdKyTV2TVhYLMduNR0Q9gxL5GaaTDw8GzejrDRBpxWoGsySRW0dttKuattwNkIlFw2YXgzOdYq4Ox49PlM+JrKd5OusjTWhBuVxUfMX/KXXZ3WEmkuqa67wspR4BTbwtKr/5u4fFgStse/T7EifFPnnYl9zPq4vmUOPrRndgoHjDti1gOPqlyXoifcRNGQzUd31lDyfHmob1Gp35vSr+P6vilcQ5Egtyd8YF/ySg9NhPM+9M/IOaHwp5+PSZayXTvCogEUwlatC3J8LLwYtcWB8EuDXQVuCkV5/B4eNHb7wGBs87LBDS+xjdVSn09wq1G8dFM+9tSUhIGneLvUdniKxKpTYljCpu3j7rVWlHj/P23v4NPGUEyeCQnexe9lJjzEQqMjJs+EzNAX6B98dBZVRmroJx95x/A/6gln18EyfCUsl+qdXb/tjvfbw+mwforpUOBz4XLVoBwAn3aWnfeH246NyBXhrq7TTN5lNSP9RkU+puUJm3W2Tsdq0nZWM07srk7MwQrZSRysjjGWBLRJNsNbfj2JMR4AbxpU1XLAb9Mxfpsq5EjMuuiR8L0JiHOOBX3hiUvOmavN0nMueSzcceFk0BK4pMqLo7vDD1Z0qrtDx7Itt4Xwm9UqbMmk8S0Dtuzb2pvOU99Z1nLTOfleNmvfZfP2pYZmPfajwosKdDBNpacNpVGGsWX9CyDI8Xq/Sj6QAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDE0LTExLTEwVDAzOjE3OjU4LTA1OjAwF+tHyQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAxNC0xMS0xMFQwMzoxNzo1OC0wNTowMGa2/3UAAAAASUVORK5CYII=",height:20,width:20,type:"esriPMS",angle:0})}}_createWindBarbsRenderer(){const e=Array.from(Array(31).keys()).map(e=>5*e),t=[{range:"0-5",path:"M20 20 M5 20 A15 15 0 1 0 35 20 A15 15 0 1 0 5 20 M20 20 M10 20 A10 10 0 1 0 30 20 A10 10 0 1 0 10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTIwIDIwIE01IDIwIEExNSAxNSAwIDEgMCAzNSAyMCBBMTUgMTUgMCAxIDAgNSAyMCBNMjAgMjAgTTEwIDIwIEExMCAxMCAwIDEgMCAzMCAyMCBBMTAgMTAgMCAxIDAgMTAgMjAiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"5-10",path:"M25 0 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"10-15",path:"M25 0 L25 40 L10 45 L25 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNyA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"15-20",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L17.5 37.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjEyIDAgMTUgNDUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxNy41IDM3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"20-25",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"25-30",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjkgMCAyNiA0NiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8cGF0aCBkPSJNMjUgMCBMMjUgNDAgTDEwIDQ1IEwyNSA0MCBNMjUgMzUgTDEwIDQwIEwyNSAzNSBNMjUgMzAgTDE3LjUgMzIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"30-35",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"35-40",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"40-45",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"45-50",path:"M25 0 L25 40 L10 45 L25 40 M25 35 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0NiI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0NSBMMjUgNDAgTTI1IDM1IEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"50-55",path:"M25 0 L25 40 L10 40 L25 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"55-60",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L17.5 32.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMHB4IiBoZWlnaHQ9IjIwcHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxNy41IDMyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"60-65",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"65-70",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxNy41IDI3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"70-75",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"75-80",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxNy41IDIyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"80-85",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"85-90",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxNy41IDE3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"90-95",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"95-100",path:"M25 0 L25 40 L10 40 L25 35 M25 30 L10 35 L25 30 M25 25 L10 30 L25 25 M25 20 L10 25 L25 20 M25 15 L10 20 L25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTTI1IDMwIEwxMCAzNSBMMjUgMzAgTTI1IDI1IEwxMCAzMCBMMjUgMjUgTTI1IDIwIEwxMCAyNSBMMjUgMjAgTTI1IDE1IEwxMCAyMCBMMjUgMTUgTTI1IDEwIEwxNy41IDEyLjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="},{range:"100-105",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIzMnB4IiBoZWlnaHQ9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"105-110",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L17.5 27.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDE3LjUgMjcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"110-115",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"115-120",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L17.5 22.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDE3LjUgMjIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"120-125",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"125-130",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L17.5 17.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDE3LjUgMTcuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"130-135",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"135-140",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDE3LjUgMTIuNSIgc3R5bGU9InN0cm9rZTpyZ2IoMCwwLDApO3N0cm9rZS13aWR0aDoxLjUiLz4KIDwvc3ZnPg=="},{range:"140-145",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IiBzdHlsZT0ic3Ryb2tlOnJnYigwLDAsMCk7c3Ryb2tlLXdpZHRoOjEuNSIvPgogPC9zdmc+"},{range:"145-150",path:"M25 0 L25 40 L10 40 L25 35 L10 35 L25 30 M25 25 L10 30 M25 25 M25 20 L10 25 M25 20 M25 15 L10 20 M25 15 M25 10 L17.5 12.5",imageData:"PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzJweCIgd2lkdGg9IjMycHgiIHZpZXdCb3g9IjkgMCAyNiA0MSI+CiAgPHBhdGggZD0iTTI1IDAgTDI1IDQwIEwxMCA0MCBMMjUgMzUgTDEwIDM1IEwyNSAzMCBNMjUgMjUgTDEwIDMwIE0yNSAyNSBNMjUgMjAgTDEwIDI1IE0yNSAyMCBNMjUgMTUgTDEwIDIwIE0yNSAxNSBNMjUgMTAgTDEwIDE1IE0yNSAxMCBNMjUgNSBMMTcuNSA3LjUiIHN0eWxlPSJzdHJva2U6cmdiKDAsMCwwKTtzdHJva2Utd2lkdGg6MS41Ii8+CiA8L3N2Zz4="}],i=I.A.fromJSON({imageData:"iVBORw0KGgoAAAANSUhEUgAAACgAAAApCAQAAADtq6NDAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAA7DAAAOwwHHb6hkAAAEY0lEQVRIx5XXWWxWRRQH8N+d+31tUdGAVjGglYJABFEBY91jfDAg7piYaFTccA++uMQEFRcSXlATtxiXqMQt4G4iisYl0ai4sIQYtVFZ1KIFKdTS0l4f7vRCS5fPebozc+bM/2z/Mzcx0AgSiUxXnKfIdMn875FIhX53U2n/B/s+kKM4UINTjTBZImixxnrv+9a2iL6zEoUBXcoudrWj/OtHm3wt02lfU9Qao9OnHvIhgmww84MEl1qnxfNmGrqHxAizLdPpC6chGcAxKGGcL+30gOERf1BSpUqVslQSV8d5ReZFe8VQ9avufJn31cWwlJV7iafKStGOE/1qvfH9qUxxu8ydUdmuSKbGO8YUdT2inKLG69pM70tliktl5qIkCAJGmusDG7Vqsc0WjZa4UBlBiA5YZIcjYzB7qDtH5kaUJFLs7RGZTZ42W4PRRmtwvbdt1+wGiaS4drEtDttdZYIDNVuAclR3vA3+dI3qHqmVSy7U6Tv1MScCPvPR7nIpFlsdCy3FdTLPGhK92e2CUITjMJ9ocwKxnsZqc3O3JwMma3d6UVLnyVxB4aXemZqvPqLdpJhW3KVVbY4yYImPo6M5Urv50fj+0z/FG9YaEiENs8UtMfXUaTeTePNHlhXfA1UU+2lyD1Il3Gtt9+adfpNG7dNlpg2U/T3KYLZ2dUWFdTgp3/rQ4sK973qnInV5TIf40x3dhvrJPBiqyWUo4wAtLqhQYS71qK+QKOFRywmGK/kpikzV6WMKhh58vGWs4TIJNjiEYLIuP8Tt4/zmLyqk+AyrJSbF+Qq1DgqRUPMxyl+9q3IQhX/rMCJ6tEunriDs1oSyQZKlr9AkhT2ZIARbJfaJS1vtVbHB+Rgi0RK/y1q1BWsEEyLoz40xtGKcARPVWB1BTPO7f4LNtpkUl1aoMbViLyZo0GRjPD3BxnxjqXeLYlvhqYrzMMG3HoyJXa3JjfnGlbYYFlP7Jh3qKsKY4hQ7TY0nG+xwRL61n63mxHtqNHosigyMLmClNwvuecFnOZB88nNBDzNkzhxEZaKMBVoKapggMzvHHXBEpNSSFAvtcFRsVn0bW8LlMmcXs+c0Kne3gRR32+zg4uXwjC6zit6Wt4a8LXVfcp/MtQXHn2ynGbuCmb8GvvFeJLEE82ReU9/n6+dkq2x3buG9Wn94smcgAw631RPR7BTH+kbmHReZoEpOdEe7zWqZl40s0JWs9Hmv7hjBHqPDwsjGKVJnWWqjbdZp1KhJi0aPmxYZsIRhlttgeF+Jlke41QcOQKoqilSb6HJzSvNG3G/UoWnxwsmt+sVaYwd63dRbqdnMyCPVeyRPvpYgdavM22oGKoMUVRbJfOWMwidJ8Zzb1UvmWK/VVUXzHaTjjrVYh1897HT7xxYEVUaa5SWb/WO+YUWa9SrwvigzM8YlzlYv2GSdVCYxxlBtVnnFq5olwp5/BEk/OLsf5LUmG2+inRJdVvjZ97ZH9/zP34ug1O91pf4p+D+JYBpvrKxfbwAAACV0RVh0ZGF0ZTpjcmVhdGUAMjAxNC0xMS0xMFQwMzoxMjowOS0wNTowMB9ViV0AAAAldEVYdGRhdGU6bW9kaWZ5ADIwMTQtMTEtMTBUMDM6MTI6MDktMDU6MDBuCDHhAAAAAElFTkSuQmCC",height:20,width:20,type:"esriPMS",angle:0}),r=e.map((r,n)=>{let o;if(n!==e.length-1)if(0===n)o={minValue:r,maxValue:e[n+1],symbol:i};else{const i=I.A.fromJSON({type:"esriPMS",imageData:t[n].imageData,contentType:"image/svg+xml",height:32,width:32,angle:0});o={minValue:r,maxValue:e[n+1],symbol:i}}return new h.A(o)});return{defaultSymbol:i,classBreakInfos:r}}_getClassBreaks(e,t){return t.map((t,i)=>new h.A({minValue:e[i],maxValue:e[i+1],symbol:this._getDefaultSymbol(new o.A(t))}))}};(0,n.Cg)([(0,c.MZ)({type:["Magnitude"],json:{write:!0}})],j.prototype,"attributeField",void 0),(0,n.Cg)([(0,c.MZ)({type:x.apiValues,json:{type:x.jsonValues,read:{reader:x.read},write:{writer:x.write}}})],j.prototype,"flowRepresentation",void 0),(0,n.Cg)([(0,c.MZ)({type:["geographic","arithmetic"],json:{write:!0}})],j.prototype,"rotationType",void 0),(0,n.Cg)([(0,c.MZ)({type:D.apiValues,json:{type:D.jsonValues,read:{reader:D.read},write:{writer:D.write}}})],j.prototype,"style",void 0),(0,n.Cg)([(0,c.MZ)({json:{write:!0}})],j.prototype,"symbolTileSize",void 0),(0,n.Cg)([(0,c.MZ)({type:m.MD.apiValues,json:{type:m.MD.jsonValues,write:{writer:m.MD.write}}})],j.prototype,"inputUnit",void 0),(0,n.Cg)([(0,v.w)("inputUnit")],j.prototype,"readInputUnit",null),(0,n.Cg)([(0,c.MZ)({type:m.MD.apiValues,json:{type:m.MD.jsonValues,read:{reader:m.MD.read},write:{writer:m.MD.write}}})],j.prototype,"outputUnit",void 0),(0,n.Cg)([(0,v.w)("outputUnit")],j.prototype,"readOutputUnit",null),(0,n.Cg)([(0,S.e)({vectorField:"vector-field"})],j.prototype,"type",void 0),(0,n.Cg)([(0,c.MZ)({type:g.A})],j.prototype,"styleRenderer",null),(0,n.Cg)([(0,c.MZ)({type:M.A})],j.prototype,"sizeVariables",null),(0,n.Cg)([(0,c.MZ)({type:f.A})],j.prototype,"rotationVariables",null),j=r=(0,n.Cg)([(0,c.$K)("esri.renderers.VectorFieldRenderer")],j)},22048:(e,t,i)=>{i.d(t,{A:()=>y});var r,n=i(31635),o=i(25482),s=i(4718),a=i(91429),l=i(86738),u=i(65864),c=i(50498),p=i(85675),d=i(22796),m=i(79677),g=i(43937);let y=r=class extends o.o{constructor(e){super(e),this.geometry=null,this.mosaicRule=null,this.rasterFunction=null,this.pixelSize=null,this.raster=void 0,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,u.$B)(e),t[i]=e.toJSON())}clone(){return new r((0,s.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,pixelSize:this.pixelSize,raster:this.raster,timeExtent:this.timeExtent}))}};(0,n.Cg)([(0,a.MZ)({types:c.yR,json:{read:u.rS}})],y.prototype,"geometry",void 0),(0,n.Cg)([(0,g.K)("geometry")],y.prototype,"writeGeometry",null),(0,n.Cg)([(0,a.MZ)({type:p.A,json:{write:!0}})],y.prototype,"mosaicRule",void 0),(0,n.Cg)([(0,a.MZ)({type:d.A,json:{write:!0,name:"renderingRule"}})],y.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,a.MZ)({type:l.A,json:{write:!0}})],y.prototype,"pixelSize",void 0),(0,n.Cg)([(0,a.MZ)({json:{write:!0}})],y.prototype,"raster",void 0),(0,n.Cg)([(0,a.MZ)({type:m.A,json:{read:{source:"time"},write:{target:"time"}}})],y.prototype,"timeExtent",void 0),y=r=(0,n.Cg)([(0,a.$K)("esri.rest.support.ImageHistogramParameters")],y)},22671:(e,t,i)=>{i.d(t,{A:()=>f});var r,n=i(31635),o=i(52106),s=i(66552),a=i(25482),l=i(4718),u=i(91429),c=i(16930),p=i(65864),d=i(50498),m=i(20437),g=i(36005),y=i(43937);const h=new s.J({esriGeometryPoint:"point",esriGeometryMultipoint:"multipoint",esriGeometryPolyline:"polyline",esriGeometryPolygon:"polygon",esriGeometryEnvelope:"extent",mesh:"mesh","":null});let f=r=class extends a.o{constructor(e){super(e),this.displayFieldName=null,this.exceededTransferLimit=!1,this.features=[],this.fields=null,this.geometryType=null,this.hasM=!1,this.hasZ=!1,this.queryGeometry=null,this.spatialReference=null}readFeatures(e,t){return this.readFeaturesWithClass(e,t,o.A)}writeGeometryType(e,t,i,r){if(e)return void h.write(e,t,i,r);const{features:n}=this;if(n)for(const e of n)if(null!=e?.geometry)return void h.write(e.geometry.type,t,i,r)}readQueryGeometry(e,t){if(!e)return null;const i=!!e.spatialReference,r=(0,p.rS)(e);return r&&!i&&t.spatialReference&&(r.spatialReference=c.A.fromJSON(t.spatialReference)),r}writeSpatialReference(e,t){if(e)return void(t.spatialReference=e.toJSON());const{features:i}=this;if(i)for(const e of i)if(e&&null!=e.geometry&&e.geometry.spatialReference)return void(t.spatialReference=e.geometry.spatialReference.toJSON())}clone(){return new r(this.cloneProperties())}cloneProperties(){return(0,l.o8)({displayFieldName:this.displayFieldName,exceededTransferLimit:this.exceededTransferLimit,features:this.features,fields:this.fields,geometryType:this.geometryType,hasM:this.hasM,hasZ:this.hasZ,queryGeometry:this.queryGeometry,spatialReference:this.spatialReference,transform:this.transform})}toJSON(e){const t=this.write();if(t.features&&Array.isArray(e)&&e.length>0)for(let i=0;i<t.features.length;i++){const r=t.features[i];if(r.geometry){const t=e?.[i];r.geometry=t?.toJSON()||r.geometry}}return t}quantize(e){const{scale:[t,i],translate:[r,n]}=e,o=this.features,s=this._getQuantizationFunction(this.geometryType,e=>Math.round((e-r)/t),e=>Math.round((n-e)/i));for(let e=0,t=o.length;e<t;e++)s?.(o[e].geometry)||(o.splice(e,1),e--,t--);return this.transform=e,this}unquantize(){const{geometryType:e,features:t,transform:i}=this;if(!i)return this;const{translate:[r,n],scale:[o,s]}=i;let a=null,l=null;if(this.hasZ&&null!=i?.scale?.[2]){const{translate:[,,e],scale:[,,t]}=i;a=i=>i*t+e}if(this.hasM&&null!=i?.scale?.[3]){const{translate:[,,,e],scale:[,,,t]}=i;l=i=>null==i?i:i*t+e}const u=this._getHydrationFunction(e,e=>e*o+r,e=>n-e*s,a,l);for(const{geometry:e}of t)null!=e&&u&&u(e);return this.transform=null,this}readFeaturesWithClass(e,t,i){const r=c.A.fromJSON(t.spatialReference),n=[];for(let t=0;t<e.length;t++){const o=e[t],s=i.fromJSON(o),a=o.geometry?.spatialReference;null==s.geometry||a||(s.geometry.spatialReference=r);const l=o.aggregateGeometries,u=s.aggregateGeometries;if(l&&null!=u)for(const e in u){const t=u[e],i=l[e],n=i?.spatialReference;null==t||n||(t.spatialReference=r)}n.push(s)}return n}_quantizePoints(e,t,i){let r,n;const o=[];for(let s=0,a=e.length;s<a;s++){const a=e[s];if(s>0){const e=t(a[0]),s=i(a[1]);e===r&&s===n||(o.push([e-r,s-n]),r=e,n=s)}else r=t(a[0]),n=i(a[1]),o.push([r,n])}return o.length>0?o:null}_getQuantizationFunction(e,t,i){return"point"===e?e=>(e.x=t(e.x),e.y=i(e.y),e):"polyline"===e||"polygon"===e?e=>{const r=(0,p.Bi)(e)?e.rings:e.paths,n=[];for(let e=0,o=r.length;e<o;e++){const o=r[e],s=this._quantizePoints(o,t,i);s&&n.push(s)}return n.length>0?((0,p.Bi)(e)?e.rings=n:e.paths=n,e):null}:"multipoint"===e?e=>{const r=this._quantizePoints(e.points,t,i);return r&&r.length>0?(e.points=r,e):null}:"extent"===e?e=>e:null}_getHydrationFunction(e,t,i,r,n){return"point"===e?e=>{e.x=t(e.x),e.y=i(e.y),r&&(e.z=r(e.z))}:"polyline"===e||"polygon"===e?e=>{const o=(0,p.Bi)(e)?e.rings:e.paths;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];for(let e=0,n=r.length;e<n;e++){const n=r[e];e>0?(s+=n[0],a+=n[1]):(s=n[0],a=n[1]),n[0]=t(s),n[1]=i(a)}}if(r&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2]),i[3]=n(i[3])}}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=r(i[2])}}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];for(let e=0,i=t.length;e<i;e++){const i=t[e];i[2]=n(i[2])}}}:"extent"===e?e=>{e.xmin=t(e.xmin),e.ymin=i(e.ymin),e.xmax=t(e.xmax),e.ymax=i(e.ymax),r&&null!=e.zmax&&null!=e.zmin&&(e.zmax=r(e.zmax),e.zmin=r(e.zmin)),n&&null!=e.mmax&&null!=e.mmin&&(e.mmax=n(e.mmax),e.mmin=n(e.mmin))}:"multipoint"===e?e=>{const o=e.points;let s,a;for(let e=0,r=o.length;e<r;e++){const r=o[e];e>0?(s+=r[0],a+=r[1]):(s=r[0],a=r[1]),r[0]=t(s),r[1]=i(a)}if(r&&n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2]),t[3]=n(t[3])}else if(r)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=r(t[2])}else if(n)for(let e=0,t=o.length;e<t;e++){const t=o[e];t[2]=n(t[2])}}:null}};(0,n.Cg)([(0,u.MZ)({type:String,json:{write:!0}})],f.prototype,"displayFieldName",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"exceededTransferLimit",void 0),(0,n.Cg)([(0,u.MZ)({type:[o.A],json:{write:!0}})],f.prototype,"features",void 0),(0,n.Cg)([(0,g.w)("features")],f.prototype,"readFeatures",null),(0,n.Cg)([(0,u.MZ)({type:[m.A],json:{write:!0}})],f.prototype,"fields",void 0),(0,n.Cg)([(0,u.MZ)({type:["point","multipoint","polyline","polygon","extent","mesh"],json:{read:{reader:h.read}}})],f.prototype,"geometryType",void 0),(0,n.Cg)([(0,y.K)("geometryType")],f.prototype,"writeGeometryType",null),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"hasM",void 0),(0,n.Cg)([(0,u.MZ)({type:Boolean,json:{write:{overridePolicy:e=>({enabled:e})}}})],f.prototype,"hasZ",void 0),(0,n.Cg)([(0,u.MZ)({types:d.yR,json:{write:!0}})],f.prototype,"queryGeometry",void 0),(0,n.Cg)([(0,g.w)("queryGeometry")],f.prototype,"readQueryGeometry",null),(0,n.Cg)([(0,u.MZ)({type:c.A,json:{write:!0}})],f.prototype,"spatialReference",void 0),(0,n.Cg)([(0,y.K)("spatialReference")],f.prototype,"writeSpatialReference",null),(0,n.Cg)([(0,u.MZ)({json:{write:!0}})],f.prototype,"transform",void 0),f=r=(0,n.Cg)([(0,u.$K)("esri.rest.support.FeatureSet")],f),f.prototype.toJSON.isDefaultToJSON=!0},22796:(e,t,i)=>{i.d(t,{A:()=>N});var r=i(31635),n=i(25482),o=i(4718),s=i(91429),a=i(66552),l=i(56507),u=i(13868);let c=class extends n.o{constructor(){super(...arguments),this.pixelType="unknown"}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],c.prototype,"description",void 0),(0,r.Cg)([(0,s.MZ)({type:l.jz,json:{type:l.jz,write:!0,name:"_object_id"}})],c.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{type:u.e8.jsonValues,read:u.e8.read,write:{writer:u.e8.write,isRequired:!0}}})],c.prototype,"pixelType",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"type",void 0),c=(0,r.Cg)([(0,s.$K)("esri.layers.support.RasterFunctionInfo")],c);const p=c;let d=class extends n.o{constructor(){super(...arguments),this.isDataset=!1,this.isPublic=!1,this.type="RasterFunctionVariable"}};(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{type:l.jz,write:!0,name:"_object_id"}})],d.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],d.prototype,"isDataset",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],d.prototype,"isPublic",void 0),(0,r.Cg)([(0,s.MZ)({json:{write:!0}})],d.prototype,"value",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),d=(0,r.Cg)([(0,s.$K)("esri.layers.support.RasterFunctionVariable")],d);const m={key:"type",base:null,typeMap:{RasterFunctionVariable:d}};let g=class extends n.o{};(0,r.Cg)([(0,s.MZ)({types:m,json:{types:m,name:"MatchVariable"}})],g.prototype,"matchVariable",void 0),(0,r.Cg)([(0,s.MZ)({types:m,json:{types:m,name:"UnionDimension"}})],g.prototype,"unionDimension",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{type:l.jz,write:!0,name:"_object_id"}})],g.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],g.prototype,"type",void 0),g=(0,r.Cg)([(0,s.$K)("esri.layers.support.RasterFunctionProperties")],g);const y=g,h=new a.J({0:"mosaic",1:"item",2:"item-group"},{useNumericKeys:!0});let f=class extends n.o{constructor(){super(...arguments),this.description="",this.functionType="mosaic",this.type="RasterFunctionTemplate"}};(0,r.Cg)([(0,s.MZ)({type:[String],json:{write:!0}})],f.prototype,"aliases",void 0),(0,r.Cg)([(0,s.MZ)({type:Object,json:{write:{isRequired:!0}}})],f.prototype,"arguments",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"description",void 0),(0,r.Cg)([(0,s.MZ)({type:p,json:{write:{isRequired:!0},name:"function"}})],f.prototype,"functionInfo",void 0),(0,r.Cg)([(0,s.MZ)({type:h.apiValues,json:{type:[0,1,2],read:h.read,write:{writer:h.write,isRequired:!0}}})],f.prototype,"functionType",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"group",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"help",void 0),(0,r.Cg)([(0,s.MZ)({type:Number,json:{type:l.jz,write:!0,name:"_object_id"}})],f.prototype,"id",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0,name:"definition"}})],f.prototype,"queryDefinition",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"tag",void 0),(0,r.Cg)([(0,s.MZ)({type:y,json:{write:!0}})],f.prototype,"properties",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"thumbnail",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],f.prototype,"thumbnailEx",void 0),(0,r.Cg)([(0,s.MZ)({json:{type:["RasterFunctionTemplate"],write:!0}})],f.prototype,"type",void 0),f=(0,r.Cg)([(0,s.$K)("esri.layers.support.RasterFunctionTemplate")],f);var M,w=i(36005),I=i(43937),A=i(93223);const b=new Set(["raster","raster2","dem","fillraster"]),C=new Set(["rasters"]),v=e=>e?.rasterFunction?N.fromJSON(e):e,S=e=>e&&e instanceof N?e.toJSON():e,T=e=>e?.functionName&&!e.declaredClass,D=e=>T(e)?new N(e):e,x=e=>e?f.fromJSON({type:"RasterFunctionTemplate",...e}):void 0,j={types:{key:"type",base:null,typeMap:{RasterFunctionTemplate:f}},json:{write:!0,name:"rasterFunctionDefinition",read:x}};let N=M=class extends n.o{constructor(e){super(e),this.functionName=null,this.outputPixelType="unknown",this.variableName=null,this.functionDefinition=null}set functionArguments(e){if(e){const t=Object.keys(e);if(t.some(t=>b.has(t.toLowerCase())&&T(e[t]))||t.some(t=>C.has(t.toLowerCase())&&Array.isArray(e[t])&&e[t].some(e=>T(e)))){e=(0,o.o8)(e);for(const i of t)b.has(i.toLowerCase())?e[i]=D(e[i]):C.has(i.toLowerCase())&&Array.isArray(e[i])&&(e[i]=e[i].map(e=>D(e)))}}this._set("functionArguments",e)}readFunctionArguments(e){return(e=>{if(null==e)return null;e=(0,o.o8)(e);const t={};for(const i of Object.keys(e))b.has(i.toLowerCase())?t[i]=v(e[i]):C.has(i.toLowerCase())&&Array.isArray(e[i])?t[i]=e[i].map(v):t[i]=e[i];return t})(e)}writeFunctionArguments(e,t,i){const r={};for(const t of Object.keys(e))b.has(t.toLowerCase())?r[t]=S(e[t]):C.has(t.toLowerCase())&&Array.isArray(e[t])?r[t]=e[t].map(S):r[t]=S(e[t]);t[i]=r}readFunctionName(e,t){const i=t.rasterFunctionInfos;return t.name||(i?.length&&"None"!==i[0].name?i[0].name:t.rasterFunction||t.rasterFunctionDefinition?.name)}get rasterFunctionDefinition(){return this.functionDefinition?.toJSON()}set rasterFunctionDefinition(e){this.functionDefinition=x(e)}get hasClipFunction(){return this.rasterFunctionDefinition?JSON.stringify(this.rasterFunctionDefinition).includes('"type":"ClipFunction"'):JSON.stringify(this).includes('"rasterFunction":"Clip"')}clone(){return new M({functionName:this.functionName,functionArguments:(0,o.o8)(this.functionArguments),outputPixelType:this.outputPixelType,variableName:this.variableName,rasterFunctionDefinition:(0,o.o8)(this.rasterFunctionDefinition)})}};(0,r.Cg)([(0,s.MZ)({json:{type:Object,name:"rasterFunctionArguments"}})],N.prototype,"functionArguments",null),(0,r.Cg)([(0,w.w)("functionArguments")],N.prototype,"readFunctionArguments",null),(0,r.Cg)([(0,I.K)("functionArguments")],N.prototype,"writeFunctionArguments",null),(0,r.Cg)([(0,s.MZ)({json:{type:String,write:{target:"rasterFunction"}}})],N.prototype,"functionName",void 0),(0,r.Cg)([(0,w.w)("functionName",["rasterFunction","rasterFunctionInfos","rasterFunctionDefinition"])],N.prototype,"readFunctionName",null),(0,r.Cg)([(0,A.e)({C128:"c128",C64:"c64",F32:"f32",F64:"f64",S16:"s16",S32:"s32",S8:"s8",U1:"u1",U16:"u16",U2:"u2",U32:"u32",U4:"u4",U8:"u8",UNKNOWN:"unknown"},{ignoreUnknown:!1,default:"unknown"})],N.prototype,"outputPixelType",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{read:!0,write:!0}})],N.prototype,"variableName",void 0),(0,r.Cg)([(0,s.MZ)()],N.prototype,"rasterFunctionDefinition",null),(0,r.Cg)([(0,s.MZ)(j)],N.prototype,"functionDefinition",void 0),(0,r.Cg)([(0,s.MZ)()],N.prototype,"hasClipFunction",null),N=M=(0,r.Cg)([(0,s.$K)("esri.layers.support.RasterFunction")],N)},30291:(e,t,i)=>{i.d(t,{tn:()=>u});var r=i(37838),n=i(30524),o=i(41227),s=i(89893),a=i(66159),l=i(68780);function u({displayField:e,editFieldsInfo:t,fields:i,objectIdField:l,title:u},m){if(!i)return null;const y=function(e,t){const i=t?.visibleFieldNames;return function({fields:e,ignoreFieldTypes:t,sortDisabled:i}){const r=e;return t&&(e=e.filter(e=>!t.includes(e.type))),e===r&&(e=e.slice()),!0!==i&&e.sort(p),e}({fields:e.fields??[],ignoreFieldTypes:t?.ignoreFieldTypes||g,sortDisabled:t?.sortDisabled}).map(t=>new o.A({fieldName:t.name,isEditable:(0,n.R$)(t,e),label:t.alias,format:d(t),visible:c(t,{...e,visibleFieldNames:i})}))}({editFieldsInfo:t,fields:i,objectIdField:l},m);if(!y.length)return null;const h=function(e){const t=(0,n.mB)(e),{titleBase:i}=e;return t?`${i}: {${t.trim()}}`:i??""}({titleBase:u,fields:i,displayField:e}),f=[new a.A,new s.A];return new r.A({title:h,content:f,fieldInfos:y})}const c=(e,t)=>t.visibleFieldNames?t.visibleFieldNames.has(e.name):(0,n.Bz)(e,t);function p(e,t){return"oid"===e.type?-1:"oid"===t.type?1:m(e)?-1:m(t)?1:(e.alias||e.name).toLocaleLowerCase().localeCompare((t.alias||t.name).toLocaleLowerCase())}function d(e){switch(e.type){case"small-integer":case"integer":return new l.A({digitSeparator:!0,places:0});case"single":case"double":return new l.A({digitSeparator:!0,places:2});case"string":return(0,n.JL)(e.name)?new l.A({digitSeparator:!0,places:0}):void 0;default:return}}function m(e){if("name"===(e.name&&e.name.toLowerCase()))return!0;const t=e.alias?.toLowerCase();return"name"===t}const g=["geometry","blob","raster","guid","xml"]},34606:(e,t,i)=>{i.d(t,{A:()=>h});var r,n=i(31635),o=i(25482),s=i(4718),a=i(91429),l=i(48526),u=i(86738),c=i(65864),p=i(50498),d=i(85675),m=i(13868),g=i(79677),y=i(43937);let h=r=class extends o.o{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.raster=void 0,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,c.$B)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new l.A({spatialReference:e[0].spatialReference,points:e.map(({x:e,y:t})=>[e,t])});this._set("locations",e),this.geometry=t}}clone(){return new r((0,s.o8)({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,n.Cg)([(0,a.MZ)({types:p.yR,json:{read:c.rS}})],h.prototype,"geometry",void 0),(0,n.Cg)([(0,y.K)("geometry")],h.prototype,"writeGeometry",null),(0,n.Cg)([(0,a.MZ)({type:[u.A]})],h.prototype,"locations",null),(0,n.Cg)([(0,a.MZ)({type:String,json:{type:m.SZ.jsonValues,read:m.SZ.read,write:m.SZ.write}})],h.prototype,"interpolation",void 0),(0,n.Cg)([(0,a.MZ)({type:d.A,json:{write:!0}})],h.prototype,"mosaicRule",void 0),(0,n.Cg)([(0,a.MZ)({type:[String],json:{write:!0}})],h.prototype,"outFields",void 0),(0,n.Cg)([(0,a.MZ)({type:u.A,json:{write:!0}})],h.prototype,"pixelSize",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],h.prototype,"raster",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],h.prototype,"returnFirstValueOnly",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"sampleDistance",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"sampleCount",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],h.prototype,"sliceId",void 0),(0,n.Cg)([(0,a.MZ)({type:g.A,json:{read:{source:"time"},write:{target:"time"}}})],h.prototype,"timeExtent",void 0),h=r=(0,n.Cg)([(0,a.$K)("esri.rest.support.ImageSampleParameters")],h)},36280:(e,t,i)=>{i.d(t,{A:()=>m});var r,n=i(31635),o=i(25482),s=i(4718),a=i(91429),l=i(70274),u=i(95349),c=i(36005),p=i(43937),d=i(93223);let m=r=class extends o.o{constructor(e){super(e),this.colorRamp=null,this.computeGamma=!1,this.dynamicRangeAdjustment=!1,this.gamma=[],this.maxPercent=null,this.minPercent=null,this.numberOfStandardDeviations=null,this.outputMax=null,this.outputMin=null,this.sigmoidStrengthLevel=null,this.histograms=null,this.customStatistics=null,this.useGamma=!1,this.stretchType="none",this.type="raster-stretch"}readColorRamp(e){if(e)return(0,u.r)(e)}readCustomStatistics(e){return e?.map(e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))}writeCustomStatistics(e,t,i){e?.length&&(t[i]=e.map(e=>[e.min,e.max,e.avg??0,e.stddev??1]))}readStretchType(e,t){let i=t.stretchType;return"number"==typeof i&&(i=l.x[i]),l.u.read(i)}clone(){return new r({stretchType:this.stretchType,outputMin:this.outputMin,outputMax:this.outputMax,useGamma:this.useGamma,computeGamma:this.computeGamma,customStatistics:(0,s.o8)(this.customStatistics),gamma:(0,s.o8)(this.gamma),sigmoidStrengthLevel:this.sigmoidStrengthLevel,numberOfStandardDeviations:this.numberOfStandardDeviations,minPercent:this.minPercent,maxPercent:this.maxPercent,colorRamp:(0,s.o8)(this.colorRamp),histograms:(0,s.o8)(this.histograms),dynamicRangeAdjustment:this.dynamicRangeAdjustment})}};(0,n.Cg)([(0,a.MZ)({types:u.g,json:{write:!0}})],m.prototype,"colorRamp",void 0),(0,n.Cg)([(0,c.w)("colorRamp")],m.prototype,"readColorRamp",null),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"computeGamma",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:{target:"dra"},read:{source:"dra"}}})],m.prototype,"dynamicRangeAdjustment",void 0),(0,n.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],m.prototype,"gamma",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"maxPercent",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"minPercent",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"numberOfStandardDeviations",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{read:{source:"max"},write:{target:"max"}}})],m.prototype,"outputMax",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{read:{source:"min"},write:{target:"min"}}})],m.prototype,"outputMin",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],m.prototype,"sigmoidStrengthLevel",void 0),(0,n.Cg)([(0,a.MZ)()],m.prototype,"histograms",void 0),(0,n.Cg)([(0,a.MZ)({json:{type:[[Number]],name:"statistics",write:!0}})],m.prototype,"customStatistics",void 0),(0,n.Cg)([(0,c.w)("customStatistics")],m.prototype,"readCustomStatistics",null),(0,n.Cg)([(0,p.K)("customStatistics")],m.prototype,"writeCustomStatistics",null),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"useGamma",void 0),(0,n.Cg)([(0,a.MZ)({type:l.u.apiValues,json:{type:l.u.jsonValues,write:l.u.write}})],m.prototype,"stretchType",void 0),(0,n.Cg)([(0,c.w)("stretchType",["stretchType"])],m.prototype,"readStretchType",null),(0,n.Cg)([(0,d.e)({rasterStretch:"raster-stretch"})],m.prototype,"type",void 0),m=r=(0,n.Cg)([(0,a.$K)("esri.renderers.RasterStretchRenderer")],m)},37531:(e,t,i)=>{i.d(t,{dt:()=>d,GG:()=>f,UQ:()=>h,Sx:()=>c});var r=i(68197),n=i(60999),o=(i(44208),i(51850)),s=(i(76369),i(62046)),a=(i(2741),i(11254),i(66344));new Map([["dash",[4,3]],["dashdot",[4,3,1,3]],["dot",[1,3]],["longdash",[8,3]],["longdashdot",[8,3,1,3]],["longdashdotdot",[8,3,1,3,1,3]],["shortdash",[4,1]],["shortdashdot",[4,1,1,1]],["shortdashdotdot",[4,1,1,1,1,1]],["shortdot",[1,1]],["solid",[]]]),new a.q(1e3),new r.A([128,128,128]);var l=i(28975),u=i(33910);function c(e,t){if(!e)return null;let i=null;return(0,u.wk)(e)?i=function(e){const t=e.symbolLayers;if(!t)return null;let i=null;return t.forEach(e=>{"object"===e.type&&e.resource?.href||(i="water"===e.type?e.color:e.material?e.material.color:null)}),i?new r.A(i):null}(e):(0,u.$y)(e)&&(i="cim"===e.type?(0,s.Nk)(e):e.color?new r.A(e.color):null),i?p(i,t):null}function p(e,t){if(null==t||null==e)return e;const i=e.toRgba();return i[3]=i[3]*t,new r.A(i)}function d(e,t,i){e&&(t||null!=i)&&(t&&(t=new r.A(t)),(0,u.wk)(e)?function(e,t,i){const n=e.symbolLayers;if(!n)return;const o=(e,n=!1)=>{let o=t??e??null;return null!=i?.override&&(!o&&n&&(o=new r.A([255,255,255])),o&&(o.a=i.override)),p(o,i?.add)};n.forEach(e=>{if("water"===e.type)return void(e.color=p(e.color,i?.add));const t=null!=e.material?e.material.color:null,r=o(t,"icon"===e.type&&null!=e.resource?.href);null==e.material?e.material=new l.N({color:r}):e.material.color=r,"outline"in e&&e.outline?.color&&null!=i?.add&&(e.outline.color=p(e.outline.color,i.add)),"marker"in e&&null!=e.marker&&(e.marker.color=o(e.marker.color))})}(e,t,i):(0,u.$y)(e)&&function(e,t,i){t=t??e.color,null!=i?.override&&t&&(t.a=i.override),t&&(e.color=p(t,i?.add)),"outline"in e&&e.outline?.color&&(e.outline.color=p(e.outline.color,i?.add))}(e,t,i))}function m(e){for(const t of e)if("number"==typeof t)return t;return null}function g(e,t,i){for(let r=0;r<3;r++){const n=e[r];switch(n){case"symbol-value":{const e=i[r];return null!=e?e/t[r]:1}case"proportional":break;default:if(n&&t[r])return n/t[r]}}return null}function y(e,t,i,r){switch(e){case"proportional":return i*r;case"symbol-value":return null!=t?t:i;default:return e}}async function h(e,t){if(e&&t)return(0,u.wk)(e)?async function(e,t){const r=e.symbolLayers;r&&await(0,n.jJ)(r,async e=>async function(e,t){switch(e.type){case"extrude":!function(e,t){const i=t[2];"number"==typeof i&&(e.size=i)}(e,t);break;case"icon":case"line":case"text":!function(e,t){const i=m(t);null!=i&&(e.size=i)}(e,t);break;case"path":!function(e,t){const i=g(t,o.Un,[e.width,void 0,e.height]);null!=i&&(e.width=y(t[0],e.width,1,i),e.height=y(t[2],e.height,1,i))}(e,t);break;case"object":await async function(e,t){const{resourceSize:r,symbolSize:n}=await async function(e){const{computeObjectLayerResourceSize:t}=await i.e(5404).then(i.bind(i,95404)),r=await t(e,10),{width:n,height:o,depth:s}=e,a=[n,s,o];let l=1;for(let e=0;e<3;e++){const t=a[e];if(null!=t){l=t/r[e];break}}for(let e=0;e<3;e++)null==a[e]&&(a[e]=r[e]*l);return{resourceSize:r,symbolSize:a}}(e),o=g(t,r,n);null!=o&&(e.width=y(t[0],n[0],r[0],o),e.depth=y(t[1],n[1],r[1],o),e.height=y(t[2],n[2],r[2],o))}(e,t)}}(e,t))}(e,t):void((0,u.$y)(e)&&function(e,t){const i=m(t);if(null!=i)switch(e.type){case"simple-marker":e.size=i;break;case"picture-marker":{const t=e.width/e.height;t>1?(e.width=i,e.height=i*t):(e.width=i*t,e.height=i);break}case"simple-line":e.width=i;break;case"text":e.font.size=i}}(e,t))}function f(e,t,i){if(e&&null!=t)if((0,u.wk)(e)){const r=e.symbolLayers;r&&r.forEach(e=>{if("object"===e.type)switch(i){case"tilt":e.tilt=(e.tilt??0)+t;break;case"roll":e.roll=(e.roll??0)+t;break;default:e.heading=(e.heading??0)+t}"icon"===e.type&&(e.angle+=t)})}else if((0,u.$y)(e))switch(e.type){case"simple-marker":case"picture-marker":case"text":e.angle+=t;break;case"cim":(0,s.KU)(e,t,!0)}}},43577:(e,t,i)=>{i.d(t,{A:()=>m});var r,n=i(31635),o=i(25482),s=i(91429),a=i(5443),l=i(91075),u=i(39829),c=i(65864),p=i(45617);const d={base:l.A,key:"type",typeMap:{extent:a.A,polygon:u.A}};let m=r=class extends o.o{constructor(e){super(e),this.areaOfInterest=null,this.subsetDefinitions=null}get dimensions(){const{subsetDefinitions:e}=this;if(null==e||0===e.length)return[];const t=new Map;e.forEach(e=>{if(!e.dimensionName)return;let i,r;if(Array.isArray(e.values[0])){const t=e.values;i=t[0][0],r=t[e.values.length-1][1]}else{const t=e.values;i=t[0],r=t[e.values.length-1]}if(t.has(e.dimensionName)){const n=t.get(e.dimensionName);n[0]=Math.min(i,n[0]),n[1]=Math.max(r,n[1])}else t.set(e.dimensionName,[i,r])});const i=[];for(const e of t)i.push({name:e[0],extent:e[1]});return i}get variables(){const{subsetDefinitions:e}=this;if(null==e||0===e.length)return[];const t=new Set;return e.forEach(e=>{e.variableName&&t.add(e.variableName)}),[...t]}clone(){const e=this.subsetDefinitions?.map(e=>e.clone()),t=this.areaOfInterest?this.areaOfInterest.clone():this.areaOfInterest;return new r({areaOfInterest:t,subsetDefinitions:e})}};(0,n.Cg)([(0,s.MZ)({types:d,json:{read:c.rS,write:!0}})],m.prototype,"areaOfInterest",void 0),(0,n.Cg)([(0,s.MZ)({readOnly:!0})],m.prototype,"dimensions",null),(0,n.Cg)([(0,s.MZ)({readOnly:!0})],m.prototype,"variables",null),(0,n.Cg)([(0,s.MZ)({type:[p.A],json:{write:!0}})],m.prototype,"subsetDefinitions",void 0),m=r=(0,n.Cg)([(0,s.$K)("esri.layers.support.MultidimensionalSubset")],m)},45617:(e,t,i)=>{i.d(t,{A:()=>u});var r,n=i(31635),o=i(25482),s=i(4718),a=i(91429),l=i(56507);let u=r=class extends o.o{constructor(e){super(e),this.variableName=null,this.dimensionName=null,this.values=[],this.isSlice=!1}clone(){return new r({variableName:this.variableName,dimensionName:this.dimensionName,values:(0,s.o8)(this.values),isSlice:this.isSlice})}};(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"variableName",void 0),(0,n.Cg)([(0,a.MZ)({type:String,json:{write:!0}})],u.prototype,"dimensionName",void 0),(0,n.Cg)([(0,a.MZ)({type:l.gK.array(l.gK.oneOf([l.gK.native(Number),l.gK.array(l.gK.native(Number))])),json:{write:!0}})],u.prototype,"values",void 0),(0,n.Cg)([(0,a.MZ)({type:Boolean,json:{write:!0}})],u.prototype,"isSlice",void 0),u=r=(0,n.Cg)([(0,a.$K)("esri.layers.support.DimensionalDefinition")],u)},46981:(e,t,i)=>{i.d(t,{A:()=>p});var r,n=i(31635),o=i(25482),s=i(4718),a=i(91429),l=i(95349),u=i(36005),c=i(93223);let p=r=class extends o.o{constructor(e){super(e),this.altitude=45,this.azimuth=315,this.colorRamp=null,this.hillshadeType="traditional",this.pixelSizePower=.664,this.pixelSizeFactor=.024,this.scalingType="none",this.type="raster-shaded-relief",this.zFactor=1}readColorRamp(e){return(0,l.r)(e)}clone(){return new r({hillshadeType:this.hillshadeType,altitude:this.altitude,azimuth:this.azimuth,zFactor:this.zFactor,scalingType:this.scalingType,pixelSizeFactor:this.pixelSizeFactor,pixelSizePower:this.pixelSizePower,colorRamp:(0,s.o8)(this.colorRamp)})}};(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],p.prototype,"altitude",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],p.prototype,"azimuth",void 0),(0,n.Cg)([(0,a.MZ)({types:l.g,json:{write:!0}})],p.prototype,"colorRamp",void 0),(0,n.Cg)([(0,u.w)("colorRamp")],p.prototype,"readColorRamp",null),(0,n.Cg)([(0,a.MZ)({type:["traditional","multi-directional"],json:{write:{isRequired:!0}}})],p.prototype,"hillshadeType",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pixelSizePower",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pixelSizeFactor",void 0),(0,n.Cg)([(0,a.MZ)({type:["none","adjusted"],json:{write:{isRequired:!0}}})],p.prototype,"scalingType",void 0),(0,n.Cg)([(0,c.e)({rasterShadedRelief:"raster-shaded-relief"}),(0,a.MZ)({json:{write:{isRequired:!0}}})],p.prototype,"type",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:{isRequired:!0}}})],p.prototype,"zFactor",void 0),p=r=(0,n.Cg)([(0,a.$K)("esri.renderers.RasterShadedReliefRenderer")],p)},49410:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(31635),n=i(25482),o=i(91429),s=i(86738);let a=class extends n.o{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"attributes",void 0),(0,r.Cg)([(0,o.MZ)({type:s.A,json:{write:!0}})],a.prototype,"location",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"locationId",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"rasterId",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0}})],a.prototype,"pixelValue",void 0),a=(0,r.Cg)([(0,o.$K)("esri.rest.support.ImageSample")],a)},51508:(e,t,i)=>{i.d(t,{A:()=>a});var r=i(31635),n=i(25482),o=i(91429),s=i(49410);let a=class extends n.o{constructor(e){super(e),this.samples=[]}};(0,r.Cg)([(0,o.MZ)({type:[s.A],json:{write:!0}})],a.prototype,"samples",void 0),a=(0,r.Cg)([(0,o.$K)("esri.rest.support.ImageSampleResult")],a)},52106:(e,t,i)=>{i.d(t,{A:()=>A});var r,n=i(31635),o=i(37838),s=i(69540),a=i(51447),l=i(25482),u=i(53966),c=i(36708),p=i(24326),d=i(91429),m=i(12195),g=i(65864),y=i(50498),h=i(55156),f=i(60950),M=i(54339),w=i(33910);function I(e){if(null==e)return null;const t={};for(const i in e){const r=e[i];r&&(t[i]=r.toJSON())}return 0!==Object.keys(t).length?t:null}let A=class extends((0,s.OU)(l.o)){static{r=this}constructor(e){super(e),this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this._version=0,Object.defineProperty(this,"uid",{value:(0,p.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,a.eF)(u.A.getLogger(this),"Graphic",{version:"4.30"})}initialize(){this._watchMeshGeometryChanges()}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),"mesh"!==e?.type&&this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new r({aggregateGeometries:this.aggregateGeometries,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,f.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const i=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[i,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const i=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",i,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,h.I)(this.origin);if(e)return(0,M.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,M.r)(this,t):null}getGlobalId(){const e=(0,h.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){return{aggregateGeometries:I(this.aggregateGeometries),geometry:null!=this.geometry?this.geometry.toJSON():null,symbol:null!=this.symbol?this.symbol.toJSON():null,attributes:(0,m.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null}}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const i={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",i,i,e.action)}}_notifyLayer(e,t,i,r){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:i};"origin-transform"===e&&(n.action=r),"attributes"===e&&(n.attributeName=r),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.addHandles([(0,c.z7)(()=>"mesh"===this.geometry?.type&&this.geometry.vertexSpace.origin?{localMatrix:this.geometry.transform?.localMatrix,origin:this.geometry.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,c.z7)(()=>"mesh"===this.geometry?.type?{vertexAttributes:this.geometry.vertexAttributes}:void 0,()=>{const e=this.geometry;"mesh"===e?.type&&e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",this.geometry,this.geometry)},{equals:(e,t)=>e===t,sync:!0})])}};(0,n.Cg)([(0,d.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const i in e){const r=(0,g.rS)(e[i]);r&&(t[i]=r)}return 0!==Object.keys(t).length?t:null}}})],A.prototype,"aggregateGeometries",null),(0,n.Cg)([(0,d.MZ)({value:null})],A.prototype,"attributes",null),(0,n.Cg)([(0,d.MZ)({value:null,types:y.yR,json:{read:g.rS}})],A.prototype,"geometry",null),(0,n.Cg)([(0,d.MZ)({type:Boolean})],A.prototype,"isAggregate",void 0),(0,n.Cg)([(0,d.MZ)({clonable:!1})],A.prototype,"layer",void 0),(0,n.Cg)([(0,d.MZ)({clonable:"reference"})],A.prototype,"origin",void 0),(0,n.Cg)([(0,d.MZ)({type:o.A,value:null})],A.prototype,"popupTemplate",null),(0,n.Cg)([(0,d.MZ)({clonable:"reference"})],A.prototype,"sourceLayer",void 0),(0,n.Cg)([(0,d.MZ)({value:null,types:w.Es})],A.prototype,"symbol",null),(0,n.Cg)([(0,d.MZ)({clonable:!1,json:{read:!1,write:!1}})],A.prototype,"_version",void 0),(0,n.Cg)([(0,d.MZ)({type:Boolean,value:!0})],A.prototype,"visible",null),A=r=(0,n.Cg)([(0,d.$K)("esri.Graphic")],A)},54339:(e,t,i)=>{function r(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const i=[];for(const r of t.fieldNames)i.push(e.attributes[r]??null);return JSON.stringify(i)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const i=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(i)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}i.d(t,{W:()=>r,r:()=>n})},55156:(e,t,i)=>{i.d(t,{I:()=>n,e:()=>r});const r=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&r in t?e[r]:void 0;var t}},62046:(e,t,i)=>{i.d(t,{Fe:()=>c,KU:()=>g,Nk:()=>o});var r=i(68197),n=i(93397);function o(e){const t=[];return s((0,n.lW)(e),t),t.length?new r.A((0,n.e6)(t[0])):null}function s(e,t){if(!e)return;let i;i="CIMTextSymbol"===e.type?e.symbol:e;const r="CIMPolygonSymbol"===e.type;if(i?.symbolLayers)for(const e of i.symbolLayers)if(!(e.colorLocked||r&&((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))))switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor&&a(t,e.tintColor);break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{s(e.symbol,t)});break;case"CIMSolidStroke":case"CIMSolidFill":a(t,e.color);break;case"CIMGradientFill":l(t,e);break;case"CIMHatchFill":s(e.lineSymbol,t)}}function a(e,t){for(const i of e)if(i.join(".")===t.join("."))return;e.push(t)}function l(e,t){const i=t.colorRamp?.type;switch(i){case"CIMMultipartColorRamp":t.colorRamp.colorRamps?.forEach(t=>{"CIMLinearContinuousColorRamp"===t.type&&u(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":u(e,t.colorRamp)}}function u(e,t){t&&(t.fromColor&&a(e,t.fromColor),t.toColor&&a(e,t.toColor))}function c(e,t,i){t instanceof r.A||(t=new r.A(t));const o=(0,n.lW)(e);o&&p(o,t,i)}function p(e,t,i){if(!e)return;let r;r="CIMTextSymbol"===e.type?e.symbol:e;const o="CIMPolygonSymbol"===r?.type;if(r?.symbolLayers)for(const e of r.symbolLayers){if(e.colorLocked)continue;if(o)if(i){const{layersToColor:t}=i;if(((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))&&"fill"===t||(0,n.jn)(e)&&"outline"===t)continue}else if((0,n.mA)(e)||(0,n.MM)(e)&&e.markerPlacement&&(0,n.zr)(e.markerPlacement))continue;const r=t.toArray();switch(e.type){case"CIMPictureMarker":case"CIMPictureStroke":case"CIMPictureFill":e.tintColor=r;break;case"CIMVectorMarker":e.markerGraphics?.forEach(e=>{p(e.symbol,t,i)});break;case"CIMSolidStroke":case"CIMSolidFill":e.color=r;break;case"CIMGradientFill":d(e,t);break;case"CIMHatchFill":p(e.lineSymbol,t,i)}}}function d(e,t){const i=e.colorRamp?.type;switch(i){case"CIMMultipartColorRamp":e.colorRamp.colorRamps?.forEach(e=>{"CIMLinearContinuousColorRamp"===e.type&&m(e,t)});break;case"CIMLinearContinuousColorRamp":case"CIMPolarContinuousColorRamp":m(e.colorRamp,t)}}function m(e,t){if(e&&(e.fromColor&&(e.fromColor=t.toArray()),e.toColor)){const i=t.clone();i.a=0,e.toColor=i.toArray()}}function g(e,t,i=!1){const r=(0,n.lW)(e);if(i&&(t=360-t),"CIMTextSymbol"!==r?.type){if("CIMPointSymbol"===r?.type&&r.symbolLayers){const e=t-(r.angle||0);for(const t of r.symbolLayers)if((0,n.MM)(t)){let i=t.rotation||0;t.rotateClockwise?i-=e:i+=e,t.rotation=i}r.angle=t}}else r.angle=t}},63660:(e,t,i)=>{i.d(t,{G:()=>m});var r=i(31635),n=i(91429),o=i(34251),s=i(49186),a=i(83027),l=i(14140);class u{constructor(){this._workerThread=null,this._destroyed=!1}async initialize(){const e=await(0,a.h)("RasterWorker");this._destroyed?e.close():this._workerThread=e}destroy(){this._destroyed=!0,this._workerThread&&(this._workerThread.close(),this._workerThread=null)}async convertVectorFieldData(e,t){c(this._workerThread);const i=e.pixelBlock.getTransferableObject().pixelBlock,r=await this._workerThread.invoke("convertVectorFieldData",{pixelBlock:i,type:e.dataType},t);return r?new l.A(r):null}async convertPixelBlockToFeatures(e,t){c(this._workerThread);const i=await this._workerThread.invoke("convertPixelBlockToFeatures",{pixelBlock:e.pixelBlock.toJSON(),extent:e.extent.toJSON(),fieldNames:e.fieldNames,skipFactor:e.skipFactor,pixelIdOffset:e.pixelIdOffset,imageRowSize:e.imageRowSize},t),r=e.extent.spatialReference?.toJSON();return i.forEach(e=>e.geometry.spatialReference=r),i}computeStatisticsHistograms(e,t){c(this._workerThread);const{transferList:i,pixelBlock:r}=e.pixelBlock.getTransferableObject();return t?.transferPixelsToWorker&&(t={...t,transferList:i}),this._workerThread.invoke("computeStatisticsHistograms",{...e,pixelBlock:r},t)}async transformPixels(e,t){c(this._workerThread);const{transferList:i,pixelBlock:r}=e.pixelBlock.getTransferableObject();t?.transferPixelsToWorker&&(t={...t,transferList:i});const n=await this._workerThread.invoke("transformPixels",{...e,pixelBlock:r},t);return l.A.fromJSON(n)}async compositeBands(e,t){c(this._workerThread);const i=e.pixelBlocks.map(e=>e?.getTransferableObject()),r={pixelBlocks:i.map(e=>e?.pixelBlock)};if(t?.transferPixelsToWorker){const e=i.flatMap(e=>e?.transferList).filter(e=>null!=e);t={...t,transferList:e}}const n=await this._workerThread.invoke("compositeBands",r,t);return n?l.A.fromJSON(n):null}async decode(e,t){c(this._workerThread);const i=await this._workerThread.invoke("decode",e,{...t,transferList:[e.data]});return i?new l.A(i):null}async symbolize(e,t){c(this._workerThread);const i=e.pixelBlock?.getTransferableObject().pixelBlock,r={extent:e.extent?.toJSON(),pixelBlock:i,simpleStretchParams:e.simpleStretchParams,bandIds:e.bandIds},n=await this._workerThread.invoke("symbolize",r,t);return n?new l.A(n):null}async highlightPixels(e,t){c(this._workerThread);const i={pixelBlock:e.pixelBlock?.toJSON(),renderedPixelBlock:e.renderedPixelBlock?.toJSON(),highlightOptions:e.highlightOptions},r=await this._workerThread.invoke("highlightPixels",i,t);e.renderedPixelBlock.pixels=r.pixels,e.renderedPixelBlock.mask=r.mask,e.renderedPixelBlock.maskIsAlpha=r.maskIsAlpha}async updateSymbolizer(e,t){c(this._workerThread);const i=e?.rendererJSON?.histograms;await Promise.all(this._workerThread.broadcast("updateSymbolizer",{symbolizerJSON:e.toJSON(),histograms:i},t))}async updateRasterFunction(e,t){c(this._workerThread),await Promise.all(this._workerThread.broadcast("updateRasterFunction",{rasterFunctionJSON:e.toJSON()},t))}async process(e,t){c(this._workerThread);const i=await this._workerThread.invoke("process",{extent:e.extent?.toJSON(),primaryPixelSizes:e.primaryPixelSizes?.map(e=>null!=e?e.toJSON():null),primaryPixelBlocks:e.primaryPixelBlocks.map(e=>e?.getTransferableObject().pixelBlock),primaryRasterIds:e.primaryRasterIds},t);return i?new l.A(i):null}async stretch(e,t){if(c(this._workerThread),!e?.pixelBlock)return null;const i={srcPixelBlock:e.pixelBlock.getTransferableObject().pixelBlock,stretchParams:e.stretchParams},r=await this._workerThread.invoke("stretch",i,t);return r?new l.A(r):null}async split(e,t){if(c(this._workerThread),!e?.pixelBlock)return null;const i={srcPixelBlock:e.pixelBlock.getTransferableObject().pixelBlock,tileSize:e.tileSize,maximumPyramidLevel:e.maximumPyramidLevel,useBilinear:e.useBilinear},r=await this._workerThread.invoke("split",i,t);return r&&r.forEach((e,t)=>{r.set(t,e?l.A.fromJSON(e):null)}),r}async clipTile(e,t){if(c(this._workerThread),!e?.pixelBlock)return null;const i=e.pixelBlock.getTransferableObject().pixelBlock,r={...e,pixelBlock:i},n=await this._workerThread.invoke("clipTile",r,t);return n?l.A.fromJSON(n):null}async estimateStatisticsHistograms(e,t){if(c(this._workerThread),!e?.pixelBlock)return null;const i={srcPixelBlock:e.pixelBlock.getTransferableObject().pixelBlock};return await this._workerThread.invoke("estimateStatisticsHistograms",i,t)}async mosaicAndTransform(e,t){if(c(this._workerThread),!e?.srcPixelBlocks?.length)return{pixelBlock:null};const i=e.srcPixelBlocks.map(e=>e?.getTransferableObject()),r={...e,srcPixelBlocks:i.map(e=>e?.pixelBlock)};if(t?.transferPixelsToWorker){const e=i.flatMap(e=>e?.transferList).filter(e=>null!=e);t={...t,transferList:e}}const n=await this._workerThread.invoke("mosaicAndTransform",r,t);return{pixelBlock:n.pixelBlock?new l.A(n.pixelBlock):null,localNorthDirections:n.localNorthDirections}}async createFlowMesh(e,t){c(this._workerThread);const i={buffer:e.flowData.data.buffer,maskBuffer:e.flowData.mask.buffer,width:e.flowData.width,height:e.flowData.height},{meshType:r,simulationSettings:n}=e,o=await this._workerThread.invoke("createFlowMesh",{meshType:r,flowData:i,simulationSettings:n},{...t,transferList:[i.buffer,i.maskBuffer]});return{vertexData:new Float32Array(o.vertexBuffer),indexData:new Uint32Array(o.indexBuffer)}}getProjectionOffsetGrid(e,t){c(this._workerThread);const i=null!=e.datumTransformation?e.datumTransformation.steps.map(e=>({wkid:e.wkid,wkt:e.wkt,isInverse:e.isInverse})):null,r=null!=e.rasterTransform?e.rasterTransform.toJSON():null,n={projectedExtent:e.projectedExtent.toJSON(),srcBufferExtent:e.srcBufferExtent.toJSON(),pixelSize:e.pixelSize,hasWrapAround:e.hasWrapAround,spacing:e.spacing,datumTransformationSteps:i,rasterTransform:r,isAdaptive:e.isAdaptive,includeGCSGrid:e.includeGCSGrid};return this._workerThread.invoke("getProjectionOffsetGrid",n,t)}}function c(e){if(null==e)throw new s.A("raster-jobhandler:no-connection","no available worker connection")}var p=i(12711),d=i(4095);const m=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this._rasterJobHandlerConfig={instance:null,refCount:0,connectionPromise:null}}get _rasterJobHandler(){return this._rasterJobHandlerConfig.instance}increaseRasterJobHandlerUsage(){this._rasterJobHandlerConfig.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandlerConfig.refCount--,this._rasterJobHandlerConfig.refCount<=0&&this._shutdownJobHandler()}async convertVectorFieldData(e,t,i){if(null==e)return null;const r=this._rasterJobHandler;return r?r.convertVectorFieldData({pixelBlock:e,dataType:t},i):(0,o.FI)(e,t)}async createFlowMesh(e,t){const i=this._rasterJobHandler;return i?i.createFlowMesh(e,t):(0,d.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}_initJobHandler(){const{_rasterJobHandlerConfig:e}=this;if(e.connectionPromise)return e.connectionPromise;const t=new u;return e.connectionPromise=t.initialize().then(()=>{e.instance=t,this.notifyChange("_rasterJobHandler")},()=>{}),e.connectionPromise}_shutdownJobHandler(){const{_rasterJobHandlerConfig:e}=this;e.instance?.destroy(),e.instance=null,e.connectionPromise=null,e.refCount=0,this.notifyChange("_rasterJobHandler"),this._cachedRendererJson=void 0}async _updateSymbolizer(e,t,i,r){const n=this._rasterJobHandlerConfig.instance;if(!n)return;const o=(0,p.$P)({...t.toJSON(),variableName:i});JSON.stringify(this._cachedRendererJson)!==JSON.stringify(o)&&(r&&(e.rasterInfo=r),e.rendererJSON=o,e.bind(),await n.updateSymbolizer(e),this._cachedRendererJson=t.toJSON())}async _symbolize(e,t){const{pixelData:i,bandIds:r,simpleStretchParams:n}=e,o=this._rasterJobHandler;if(o){const e=await o.symbolize({...i,simpleStretchParams:n,bandIds:r},t);return{extent:i.extent,pixelBlock:e}}const s=e.symbolizer.symbolize({...i,simpleStretchParams:n,bandIds:r});return{extent:i.extent,pixelBlock:s}}};return(0,r.Cg)([(0,n.MZ)({clonable:!1})],i.prototype,"_rasterJobHandler",null),(0,r.Cg)([(0,n.MZ)({clonable:!1})],i.prototype,"_cachedRendererJson",void 0),(0,r.Cg)([(0,n.MZ)({clonable:!1})],i.prototype,"_rasterJobHandlerConfig",void 0),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.RasterJobHandlerMixin")],i),i}},67730:(e,t,i)=>{i.d(t,{A:()=>h});var r,n=i(31635),o=i(68197),s=i(66552),a=i(25482),l=i(90629),u=i(91429),c=i(56507),p=i(63988),d=i(30943),m=i(20061),g=i(93223);const y=new s.J({flow_from:"flow-from",flow_to:"flow-to"});let h=r=class extends((0,p.h)(a.o)){constructor(e){super(e),this.density=.8,this.color=new o.A([255,255,255,1]),this.flowSpeed=10,this.trailLength=100,this.smoothing=0,this.flowRepresentation="flow-from",this.type="flow",this.authoringInfo=null,this.legendOptions=null,this.trailCap="butt",this.background="none"}get maxPathLength(){return this._get("maxPathLength")??200}set maxPathLength(e){this._set("maxPathLength",e)}get trailWidth(){return this._get("trailWidth")??1.5}set trailWidth(e){this._set("trailWidth",e)}get visualVariables(){return super.visualVariables}set visualVariables(e){super.visualVariables=e}clone(){const{density:e,maxPathLength:t,trailWidth:i,flowSpeed:n,trailLength:o,smoothing:s,flowRepresentation:a,trailCap:l,background:u}=this,c=this.color.clone(),p=(this.visualVariables||[]).map(e=>e.clone()),d=this.authoringInfo?.clone(),m=this.legendOptions?.clone();return new r({density:e,color:c,maxPathLength:t,trailWidth:i,flowSpeed:n,trailLength:o,trailCap:l,background:u,smoothing:s,flowRepresentation:a,visualVariables:p,authoringInfo:d,legendOptions:m})}getSymbol(e,t){}async getSymbolAsync(e,t){}getSymbols(){return[]}};(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],h.prototype,"density",void 0),(0,n.Cg)([(0,u.MZ)({type:o.A,json:{type:[c.jz],write:{allowNull:!0}}})],h.prototype,"color",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0}})],h.prototype,"maxPathLength",null),(0,n.Cg)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!0}})],h.prototype,"trailWidth",null),(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],h.prototype,"flowSpeed",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,json:{write:!0}})],h.prototype,"trailLength",void 0),(0,n.Cg)([(0,u.MZ)({type:Number,cast:l.cr,json:{write:!1}})],h.prototype,"smoothing",void 0),(0,n.Cg)([(0,u.MZ)({type:y.apiValues,json:{type:y.jsonValues,read:{reader:y.read},write:{writer:y.write}}})],h.prototype,"flowRepresentation",void 0),(0,n.Cg)([(0,g.e)({flowRenderer:"flow"}),(0,u.MZ)({json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),(0,n.Cg)([(0,u.MZ)({type:d.A,json:{write:!0}})],h.prototype,"authoringInfo",void 0),(0,n.Cg)([(0,u.MZ)({type:m.A,json:{write:!0}})],h.prototype,"legendOptions",void 0),(0,n.Cg)([(0,u.MZ)({type:["butt","round"],json:{write:!0}})],h.prototype,"trailCap",void 0),(0,n.Cg)([(0,u.MZ)({type:String,json:{origins:{"web-scene":{write:!1}},write:!0}})],h.prototype,"background",void 0),h=r=(0,n.Cg)([(0,u.$K)("esri.renderers.FlowRenderer")],h)},69052:(e,t,i)=>{i.d(t,{hr:()=>n,ie:()=>l,uC:()=>a});var r=i(34727);class n{constructor(e,t){this.min=e,this.max=t,this.range=t-e}normalize(e,t=0,i=!1){return o(this.range,this.min,this.max,e,t,i)}clamp(e,t=0){return(0,r.qE)(e-t,this.min,this.max)+t}monotonic(e,t,i){return e<t?t:t+s(this.range,e-t,i)}minimalMonotonic(e,t,i){return o(this.range,e,e+this.range,t,i)}center(e,t,i){return t=this.monotonic(e,t,i),this.normalize((e+t)/2,i)}diff(e,t,i){return this.monotonic(e,t,i)-e}shortestSignedDiff(e,t){e=this.normalize(e);const i=(t=this.normalize(t))-e,r=t<e?this.minimalMonotonic(e,t)-e:t-this.minimalMonotonic(t,e);return Math.abs(i)<Math.abs(r)?i:r}contains(e,t,i){return t=this.minimalMonotonic(e,t),(i=this.minimalMonotonic(e,i))>e&&i<t}}function o(e,t,i,r,n=0,o=!1){return(r-=n)<t?r+=s(e,t-r):r>i&&(r-=s(e,r-i)),o&&r===i&&(r=t),r+n}function s(e,t,i=0){return Math.ceil((t-i)/e)*e+i}const a=new n(0,2*Math.PI),l=(new n(-Math.PI,Math.PI),new n(0,360))},69208:(e,t,i)=>{i.d(t,{d:()=>o});var r=i(31635),n=i(91429);const o=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.customParameters=null}};return(0,r.Cg)([(0,n.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],i.prototype,"customParameters",void 0),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.CustomParametersMixin")],i),i}},70328:(e,t,i)=>{i.d(t,{BI:()=>w,DC:()=>p,Ej:()=>m,Ie:()=>f,Jt:()=>M,Ne:()=>g,RF:()=>c,aI:()=>A,fA:()=>s,gE:()=>l,hZ:()=>h,iT:()=>d,is:()=>I,qv:()=>b,vI:()=>y,vY:()=>a,v_:()=>C,vt:()=>o,w1:()=>u});var r=i(5443),n=(i(19419),i(4197));function o(e=C){return[e[0],e[1],e[2],e[3],e[4],e[5]]}function s(e,t,i,r,n,s,a=o()){return a[0]=e,a[1]=t,a[2]=i,a[3]=r,a[4]=n,a[5]=s,a}function a(e,t=o()){return function(e,t,i,r=o()){return h(r,b),function(e,t,i=0,r=t.length/3){let n=e[0],o=e[1],s=e[2],a=e[3],l=e[4],u=e[5];for(let e=0;e<r;e++)n=Math.min(n,t[i+3*e]),o=Math.min(o,t[i+3*e+1]),s=Math.min(s,t[i+3*e+2]),a=Math.max(a,t[i+3*e]),l=Math.max(l,t[i+3*e+1]),u=Math.max(u,t[i+3*e+2]);e[0]=n,e[1]=o,e[2]=s,e[3]=a,e[4]=l,e[5]=u}(r,e,t,i),r}(e,0,e.length/3,t)}function l(e,t=(0,n.jh)(24)){const[i,r,o,s,a,l]=e;return t[0]=i,t[1]=r,t[2]=o,t[3]=i,t[4]=r,t[5]=l,t[6]=i,t[7]=a,t[8]=o,t[9]=i,t[10]=a,t[11]=l,t[12]=s,t[13]=r,t[14]=o,t[15]=s,t[16]=r,t[17]=l,t[18]=s,t[19]=a,t[20]=o,t[21]=s,t[22]=a,t[23]=l,t}function u(e,t){const i=isFinite(e[2])||isFinite(e[5]);return new r.A(i?{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],zmin:e[2],zmax:e[5],spatialReference:t}:{xmin:e[0],xmax:e[3],ymin:e[1],ymax:e[4],spatialReference:t})}function c(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[3]),e[4]=Math.max(e[4],t[4]),e[5]=Math.max(e[5],t[5])}function p(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[3]=Math.max(e[3],t[2]),e[4]=Math.max(e[4],t[3])}function d(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.min(e[2],t[2]),e[3]=Math.max(e[3],t[0]),e[4]=Math.max(e[4],t[1]),e[5]=Math.max(e[5],t[2])}function m(e,t=[0,0,0]){return t[0]=function(e){return e[0]>=e[3]?0:e[3]-e[0]}(e),t[1]=function(e){return e[1]>=e[4]?0:e[4]-e[1]}(e),t[2]=function(e){return e[2]>=e[5]?0:e[5]-e[2]}(e),t}function g(e,t,i=e){return i[0]=t[0],i[1]=t[1],i[2]=t[2],i!==e&&(i[3]=e[3],i[4]=e[4],i[5]=e[5]),i}function y(e,t,i=e){return i[3]=t[0],i[4]=t[1],i[5]=t[2],i!==e&&(i[0]=e[0],i[1]=e[1],i[2]=e[2]),e}function h(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function f(e){return e?h(e,b):o(b)}function M(e,t){return e[0]=t[0],e[1]=t[1],e[2]=Number.NEGATIVE_INFINITY,e[3]=t[2],e[4]=t[3],e[5]=Number.POSITIVE_INFINITY,e}function w(e,t,i,r,n){return e[0]=t,e[1]=i,e[2]=Number.NEGATIVE_INFINITY,e[3]=r,e[4]=n,e[5]=Number.POSITIVE_INFINITY,e}function I(e){return 6===e.length}function A(e,t,i){if(null==e||null==t)return e===t;if(!I(e)||!I(t))return!1;if(i){for(let r=0;r<e.length;r++)if(!i(e[r],t[r]))return!1}else for(let i=0;i<e.length;i++)if(e[i]!==t[i])return!1;return!0}const b=[1/0,1/0,1/0,-1/0,-1/0,-1/0],C=[0,0,0,0,0,0];o()},73133:(e,t,i)=>{i.d(t,{j:()=>r});const r=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:void 0})},74797:(e,t,i)=>{i.d(t,{AL:()=>M,DV:()=>y,ER:()=>n,F_:()=>a,Nd:()=>m,Oo:()=>o,dy:()=>d,eS:()=>b,h4:()=>C,jC:()=>f,nq:()=>g,rZ:()=>p,y6:()=>h});var r=i(20437);const n="Raster.",o="Raster.Dim.",s=".Max",a={servicePixelValue:"Raster.ServicePixelValue",rawServicePixelValue:"Raster.ServicePixelValue.Raw",itemPixelValue:"Raster.ItemPixelValue",magnitude:"Raster.Magnitude",direction:"Raster.Direction",variable:"Raster.Variable"},l=new Map([["quarters","Quarter"],["months","Month"],["weeks","Week of the year"],["days","Day of the year"]]);function u(e,t){return new r.A({name:e,alias:t,domain:null,editable:!1,length:50,type:"string"})}function c(e,t){return new r.A({name:e,alias:t,domain:null,editable:!1,type:"double"})}function p(e){return u(a.servicePixelValue,e??"Service Pixel Value")}function d(e){return u(a.rawServicePixelValue,e??"Raw Service Pixel Value")}function m(){return u(a.itemPixelValue,"Item Pixel Value")}function g(e){return u(`${a.servicePixelValue}.${e}`,e)}function y(e){return c(`${a.magnitude}`,"Magnitude"+(e?` (${e})`:""))}function h(){return c(`${a.direction}`,"Direction (°)")}function f(e){return e.fields.filter(e=>"oid"!==e.type&&"value"!==e.name.toLowerCase()).map(e=>{const t=e.clone();return t.name=`${n}${e.name}`,t})}function M(e){const t=new Set,i=new Set,n=new Map;return e.variables.forEach(({dimensions:e})=>{e.forEach(e=>{if(e.recurring)n.set(e.name,e.unit);else{const r="ISO8601"===e.unit?.trim()||"stdtime"===e.name?.trim()?.toLowerCase()?t:i;r.add(e.name),e.hasRanges&&r.add(`${e.name}${s}`)}})}),[u(a.variable,"Variable"),...[...t].map(e=>function(e,t){return new r.A({name:e,alias:t,domain:null,editable:!1,type:"date"})}(`${o}${e}`,I(e))),...[...i].map(e=>c(`${o}${e}`,I(e))),...[...n].map(([e,t])=>c(`${o}${e}`,w(e,t)))]}function w(e,t){return t=t?.toLowerCase(),t&&l.has(t)?l.get(t):I(e)}function I(e){const t=e.endsWith(s),i=t?e.slice(0,-4):e,r="StdTime"===i?"Standard Time":"StdZ"===i?"Standard Z":i;return t?`${r} Max`:r}function A(e,t){return t?new Date(e):e}function b(e,t,i){i?.length&&(t[a.variable]=i[0].variableName,i.forEach(({dimensionName:i,values:r})=>{if(i&&r?.length){const n=`${o}${i}`,a=e.find(({name:e})=>e===n);if(!a)return;const l="date"===a.type,u=r[0];if(Array.isArray(u)){if(t[`${o}${i}`]=A(u[0],l),null!=u[1]){const r=`${o}${i}${s}`;if(e.some(({name:e})=>e===r)){const e=A(u[1],l);t[r]=e}}}else t[`${o}${i}`]=A(u,l)}}))}function C(e,t){if(t.pixelType.startsWith("f")&&e.forEach(({format:e,fieldName:t})=>{e&&t&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)}),t.multidimensionalInfo){const i=t.multidimensionalInfo.variables.flatMap(({dimensions:e})=>e);e.forEach(({format:e,fieldName:t})=>{if(e&&t?.startsWith(o)){const r=t.slice(o.length),n=`${r}${s}`,a=i.find(({name:e})=>e===r||e===n);a?.values?.every(e=>Number.isInteger(e))&&(e.places=0)}})}}},80498:(e,t,i)=>{i.d(t,{A:()=>d});var r=i(31635),n=i(25482),o=i(91429),s=i(68197),a=i(56507);let l=class extends n.o{constructor(e){super(e),this.value=null,this.label=null,this.color=null}};(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:{isRequired:!0}}})],l.prototype,"value",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"label",void 0),(0,r.Cg)([(0,o.MZ)({type:s.A,json:{type:[a.jz],write:{isRequired:!0}}})],l.prototype,"color",void 0),l=(0,r.Cg)([(0,o.$K)("esri.renderers.support.ColormapInfo")],l);var u,c=i(67369),p=i(93223);let d=u=class extends n.o{constructor(e){super(e),this.colormapInfos=null,this.type="raster-colormap"}static createFromColormap(e,t){if(!e)return null;const i=5===e[0].length,r=[...e].sort((e,t)=>e[0]-t[0]).map(e=>l.fromJSON({value:e[0],color:i?e.slice(1,5):e.slice(1,4).concat([255]),label:t?t[e[0]]??"":e[0]}));return new u({colormapInfos:r})}static createFromColorramp(e){const t=(0,c.R8)(e);return u.createFromColormap(t)}clone(){return new u({colormapInfos:this.colormapInfos.map(e=>e.toJSON())})}extractColormap(){return this.colormapInfos.map(({value:e,color:t})=>[e,t.r,t.g,t.b,t.a>1?t.a:255*t.a&255]).sort((e,t)=>e[0]-t[0])}};(0,r.Cg)([(0,o.MZ)({type:[l],json:{write:{isRequired:!0}}})],d.prototype,"colormapInfos",void 0),(0,r.Cg)([(0,p.e)({rasterColormap:"raster-colormap"}),(0,o.MZ)({json:{write:{isRequired:!0}}})],d.prototype,"type",void 0),d=u=(0,r.Cg)([(0,o.$K)("esri.renderers.RasterColormapRenderer")],d)},80754:(e,t,i)=>{i.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>u});var r=i(82799),n=i(16930),o=i(65864);const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator}),minus180Line:new r.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:n.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.A({paths:[[[180,-180],[180,180]]],spatialReference:n.A.WGS84}),minus180Line:new r.A({paths:[[[-180,-180],[-180,180]]],spatialReference:n.A.WGS84})}};function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const i=u(e);for(const e of i)for(const i of e)i[0]+=t;return e}function u(e){return(0,o.Bi)(e)?e.rings:e.paths}},82935:(e,t,i)=>{i.d(t,{B:()=>d,e:()=>m});var r=i(31635),n=i(91429),o=i(89317),s=i(30524),a=i(96184),l=i(73133),u=i(79677),c=i(10184),p=i(36005);const d={type:Boolean,json:{read:{source:"timeAnimation"},write:{target:"timeAnimation",layerContainerTypes:o.K}}},m=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.timeExtent=null,this.timeOffset=null,this.useViewTime=!0}readOffset(e,t){const i=t.timeInfo.exportOptions;if(!i)return null;const r=i.timeOffset,n=l.j.fromJSON(i.timeOffsetUnits);return r&&n?new c.A({value:r,unit:n}):null}get timeInfo(){return this._get("timeInfo")}set timeInfo(e){(0,s.sv)(e,this.fieldsIndex),this._set("timeInfo",e)}};return(0,r.Cg)([(0,n.MZ)({type:u.A,json:{write:!1}})],i.prototype,"timeExtent",void 0),(0,r.Cg)([(0,n.MZ)({type:c.A})],i.prototype,"timeOffset",void 0),(0,r.Cg)([(0,p.w)("service","timeOffset",["timeInfo.exportOptions"])],i.prototype,"readOffset",null),(0,r.Cg)([(0,n.MZ)({value:null,type:a.A,json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],i.prototype,"timeInfo",null),(0,r.Cg)([(0,n.MZ)(d)],i.prototype,"useViewTime",void 0),i=(0,r.Cg)([(0,n.$K)("esri.layers.mixins.TemporalLayer")],i),i}},83027:(e,t,i)=>{i.d(t,{h:()=>r});const r=i(29953).ho},85675:(e,t,i)=>{i.d(t,{A:()=>f});var r,n=i(31635),o=i(66552),s=i(25482),a=i(4718),l=i(91429),u=i(56507),c=i(86738),p=i(45617),d=i(22796),m=i(36005),g=i(43937);const y=(0,o.O)()({MT_FIRST:"first",MT_LAST:"last",MT_MIN:"min",MT_MAX:"max",MT_MEAN:"mean",MT_BLEND:"blend",MT_SUM:"sum"}),h=(0,o.O)()({esriMosaicNone:"none",esriMosaicCenter:"center",esriMosaicNadir:"nadir",esriMosaicViewpoint:"viewpoint",esriMosaicAttribute:"attribute",esriMosaicLockRaster:"lock-raster",esriMosaicNorthwest:"northwest",esriMosaicSeamline:"seamline"});let f=r=class extends s.o{constructor(e){super(e),this.ascending=!0,this.itemRasterFunction=null,this.lockRasterIds=null,this.method="none",this.multidimensionalDefinition=null,this.objectIds=null,this.operation="first",this.sortField=null,this.sortValue=null,this.viewpoint=null,this.where=null}readAscending(e,t){return null!=t.ascending?t.ascending:null==t.sortAscending||t.sortAscending}readMethod(e,t){return function(e){let t;switch(e?e.toLowerCase().replace("esrimosaic",""):""){case"byattribute":case"attribute":t="esriMosaicAttribute";break;case"lockraster":t="esriMosaicLockRaster";break;case"center":t="esriMosaicCenter";break;case"northwest":t="esriMosaicNorthwest";break;case"nadir":t="esriMosaicNadir";break;case"viewpoint":t="esriMosaicViewpoint";break;case"seamline":t="esriMosaicSeamline";break;default:t="esriMosaicNone"}return h.fromJSON(t)}(t.mosaicMethod||t.defaultMosaicMethod)}writeMultidimensionalDefinition(e,t,i){null!=e&&(e=e.filter(({variableName:e,dimensionName:t})=>e&&"*"!==e||t)).length&&(t[i]=e.map(e=>e.toJSON()))}readOperation(e,t){const i=t.mosaicOperation,r=t.mosaicOperator?.toLowerCase(),n=i||(r?y.toJSON(r):null);return y.fromJSON(n)||"first"}castSortValue(e){return null==e||"string"==typeof e||"number"==typeof e?e:`${e}`}clone(){return new r({ascending:this.ascending,itemRasterFunction:(0,a.o8)(this.itemRasterFunction),lockRasterIds:(0,a.o8)(this.lockRasterIds),method:this.method,multidimensionalDefinition:(0,a.o8)(this.multidimensionalDefinition),objectIds:(0,a.o8)(this.objectIds),operation:this.operation,sortField:this.sortField,sortValue:this.sortValue,viewpoint:(0,a.o8)(this.viewpoint),where:this.where})}};(0,n.Cg)([(0,l.MZ)({type:Boolean,json:{write:!0}})],f.prototype,"ascending",void 0),(0,n.Cg)([(0,m.w)("ascending",["ascending","sortAscending"])],f.prototype,"readAscending",null),(0,n.Cg)([(0,l.MZ)({type:d.A,json:{name:"itemRenderingRule",write:!0}})],f.prototype,"itemRasterFunction",void 0),(0,n.Cg)([(0,l.MZ)({type:[u.jz],json:{write:{overridePolicy(){return{enabled:"lock-raster"===this.method}}}}})],f.prototype,"lockRasterIds",void 0),(0,n.Cg)([(0,l.MZ)({type:h.apiValues,json:{type:h.jsonValues,write:{target:"mosaicMethod",writer:h.write,isRequired:!0}}})],f.prototype,"method",void 0),(0,n.Cg)([(0,m.w)("method",["mosaicMethod","defaultMosaicMethod"])],f.prototype,"readMethod",null),(0,n.Cg)([(0,l.MZ)({type:[p.A],json:{write:!0}})],f.prototype,"multidimensionalDefinition",void 0),(0,n.Cg)([(0,g.K)("multidimensionalDefinition")],f.prototype,"writeMultidimensionalDefinition",null),(0,n.Cg)([(0,l.MZ)({type:[u.jz],json:{name:"fids",write:!0}})],f.prototype,"objectIds",void 0),(0,n.Cg)([(0,l.MZ)({type:y.apiValues,json:{type:y.jsonValues,read:{reader:y.read},write:{target:"mosaicOperation",writer:y.write}}})],f.prototype,"operation",void 0),(0,n.Cg)([(0,m.w)("operation",["mosaicOperation","mosaicOperator"])],f.prototype,"readOperation",null),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:{overridePolicy(){return{enabled:"attribute"===this.method}}}}})],f.prototype,"sortField",void 0),(0,n.Cg)([(0,l.MZ)({type:[String,Number],json:{write:{allowNull:!0,overridePolicy(){return{enabled:"attribute"===this.method,allowNull:!0}}}}})],f.prototype,"sortValue",void 0),(0,n.Cg)([(0,l.wg)("sortValue")],f.prototype,"castSortValue",null),(0,n.Cg)([(0,l.MZ)({type:c.A,json:{write:!0}})],f.prototype,"viewpoint",void 0),(0,n.Cg)([(0,l.MZ)({type:String,json:{write:!0}})],f.prototype,"where",void 0),f=r=(0,n.Cg)([(0,l.$K)("esri.layers.support.MosaicRule")],f)},89808:(e,t,i)=>{i.d(t,{Q:()=>r});const r=Symbol("getSliceableSymbol")},92300:(e,t,i)=>{i.d(t,{V:()=>o,X:()=>n});var r=i(65864);function n(e){return{geometryType:(0,r.$B)(e[0]),geometries:e.map(e=>e.toJSON())}}function o(e,t,i){const n=(0,r.xD)(t);return e.map(e=>{const t=n.fromJSON(e);return t.spatialReference=i,t})}},94359:(e,t,i)=>{i.d(t,{Gj:()=>d,LF:()=>g,uy:()=>p});var r=i(67076),n=i(86162),o=i(67730),s=i(80498),a=i(46981),l=i(36280),u=i(93618),c=i(18031);const p={key:"type",base:null,typeMap:{"class-breaks":n.A,flow:o.A,"raster-colormap":s.A,"raster-shaded-relief":a.A,"raster-stretch":l.A,"unique-value":u.A,"vector-field":c.A}},d={...p,typeMap:{...p.typeMap}};delete d.typeMap["vector-field"];const m={classBreaks:n.A,flowRenderer:o.A,rasterColormap:s.A,rasterShadedRelief:a.A,rasterStretch:l.A,uniqueValue:u.A,vectorField:c.A};function g(e,t){if(!e)return null;if("classBreaks"===e.type&&e.classificationMethod){const t=e.authoringInfo||{classificationMethod:""};t.classificationMethod=e.classificationMethod,e.authoringInfo=t}"vectorField"===e.type&&e.visualVariables&&!Array.isArray(e.visualVariables)&&(e.visualVariables=[e.visualVariables]);const i=(n=e)&&m[n.type]||null;var n;if(i){const r=new i;return r.read(e,t),r}return t?.messages&&e&&t.messages.push(new r.A("renderer:unsupported","Renderers of type '"+(e.type||"unknown")+"' are not supported",{definition:e,context:t})),null}},96184:(e,t,i)=>{i.d(t,{A:()=>m});var r=i(31635),n=i(69540),o=i(25482),s=i(91429),a=i(79677),l=i(10184),u=i(56400),c=i(36005),p=i(43937);function d(e,t){return l.A.fromJSON({value:e,unit:t})}let m=class extends((0,n.OU)(o.o)){constructor(e){super(e),this.cumulative=!1,this.endField=null,this.fullTimeExtent=null,this.hasLiveData=!1,this.interval=null,this.startField=null,this.timeZone=null,this.trackIdField=null,this.useTime=!0,this.stops=null}readFullTimeExtent(e,t){return t.timeExtent&&Array.isArray(t.timeExtent)&&2===t.timeExtent.length?a.A.fromArray(t.timeExtent):null}writeFullTimeExtent(e,t){null!=e?.start&&null!=e.end?t.timeExtent=e.toArray():t.timeExtent=null}readInterval(e,t){return t.timeInterval&&t.timeIntervalUnits?d(t.timeInterval,t.timeIntervalUnits):t.defaultTimeInterval&&t.defaultTimeIntervalUnits?d(t.defaultTimeInterval,t.defaultTimeIntervalUnits):null}writeInterval(e,t){t.timeInterval=e?.toJSON().value??null,t.timeIntervalUnits=e?.toJSON().unit??null}};(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.timeDataCumulative",write:!0}})],m.prototype,"cumulative",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"endTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"endField",void 0),(0,r.Cg)([(0,s.MZ)({type:a.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"fullTimeExtent",void 0),(0,r.Cg)([(0,c.w)("fullTimeExtent",["timeExtent"])],m.prototype,"readFullTimeExtent",null),(0,r.Cg)([(0,p.K)("fullTimeExtent")],m.prototype,"writeFullTimeExtent",null),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{write:!0}})],m.prototype,"hasLiveData",void 0),(0,r.Cg)([(0,s.MZ)({type:l.A,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"interval",void 0),(0,r.Cg)([(0,c.w)("interval",["timeInterval","timeIntervalUnits","defaultTimeInterval","defaultTimeIntervalUnits"])],m.prototype,"readInterval",null),(0,r.Cg)([(0,p.K)("interval")],m.prototype,"writeInterval",null),(0,r.Cg)([(0,s.MZ)({type:String,json:{name:"startTimeField",write:{enabled:!0,allowNull:!0}}})],m.prototype,"startField",void 0),(0,r.Cg)([(0,s.MZ)((0,u.P6)("timeReference",!0))],m.prototype,"timeZone",void 0),(0,r.Cg)([(0,s.MZ)({type:String,json:{write:{enabled:!0,allowNull:!0}}})],m.prototype,"trackIdField",void 0),(0,r.Cg)([(0,s.MZ)({type:Boolean,json:{name:"exportOptions.useTime",write:!0}})],m.prototype,"useTime",void 0),(0,r.Cg)([(0,s.MZ)({type:[Date],json:{read:!1}})],m.prototype,"stops",void 0),m=(0,r.Cg)([(0,s.$K)("esri.layers.support.TimeInfo")],m)},99959:(e,t,i)=>{i.d(t,{A:()=>o});var r=i(31635),n=i(91429);let o=class{};o=(0,r.Cg)([(0,n.$K)("esri.graphic.GraphicOrigin")],o)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9478],{5359:(e,t,i)=>{i.d(t,{H:()=>s,Z:()=>r});const s=Symbol("isImageryTileGraphicOrigin");function r(e){return!!e&&s in e}},9478:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Xe});var s,r=i(31635),a=i(37838),n=i(69540),o=i(49186),l=i(53966),c=i(25728),u=i(74887),f=i(36708),h=i(91429),p=i(56507),d=i(89808),m=i(99959),g=i(5359);class y extends m.A{get[(s=g.H,d.Q)](){return this.layer}constructor(e){super(),this[s]=!0,this.type="imagery-tile",this.layer=e}get id(){return this.layer.id}}var w=i(4146),v=i(18768),x=i(63074),b=i(69208),I=i(89015),C=i(16131),S=i(8303),A=i(63660),T=i(56551),R=i(54310),M=i(25036),O=i(82935),_=i(7548),F=i(23636),P=i(49859),k=i(68197),D=i(5443),N=i(16930),L=i(73444),E=i(94778),B=i(14140);function z(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function J(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function U(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];z(l)?a=e:J(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach(e=>u.push("string"==typeof e?new Date(e).getTime():e));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter((e,t)=>!(t===a||t===n));const{referencing:l}=e.domain,c=l.find(e=>e.coordinates.includes(i[a])).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new N.A({wkid:f}),[p,d]=s[a],[m,g]=s[n],y=new D.A({xmin:p,xmax:d,ymin:m,ymax:g,spatialReference:h});return{width:Math.round(y.width/r[a]),height:Math.round(y.height/r[n]),extent:y,dimensions:o}}function $(e){const t=(0,L.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function j(){return Math.round(255*Math.random())}function q(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=$(r)),a&&(t[e].unit=a.label?$(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let s=!1;o?.categories?.length&&(o.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find(e=>e.ClassName===t);if(!r)return;const a=e.label?$(e.label):null;if(r.Label=a,e.preferredColor){const t=k.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}}),s&&i.forEach(e=>{null==e.Red&&(e.Red=j(),e.Green=j(),e.Blue=j())}));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map(e=>({attributes:e}))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function Z(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,E.X1)(t,i)}function H(e,t,i){const s=e.map((e,i)=>({name:e,count:t[i]})).sort((e,t)=>e.name>t.name?-1:1),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex(({name:t})=>t===e[r])]*(i%t[r]),i=Math.floor(i/t[r]);return o}var V=i(4366),G=i(47520),W=i(51927),X=i(45617),K=i(87186);let Y=class extends P.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,G.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l,colormap:c}=t,u=i[0],{width:f,height:h,pixelType:p}=u,d=t.extent??new D.A({xmin:-.5,ymin:.5,xmax:f-.5,ymax:h-.5,spatialReference:new N.A({wkid:3857})}),m=t.isPseudoSpatialReference??!t.extent,g={x:d.width/f,y:d.height/h},y={...t.keyProperties};t.dataType&&(y.DataType=t.dataType),t.bandInfos&&(y.BandProperties=t.bandInfos.map(e=>e.toJSON())),s&&(y.DataType="Thematic");const w=new K.A({width:f,height:h,pixelType:p,extent:d,nativeExtent:o,attributeTable:s,colormap:c,transform:l,pixelSize:g,spatialReference:d.spatialReference,bandCount:u.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:m,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(w),this.createRemoteDatasetStorageInfo(w,512,512),this._set("rasterInfo",w),this.updateTileInfo(),w.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,w.multidimensionalInfo):await this._buildInMemoryRaster(u,{width:512,height:512},e),w.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,n=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,G.lD)(e,t,r,a)),l=null!=s.statistics,c=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,W.f4)(e)),h=await(0,u.Lx)([n,f]);if(!h[0].value&&h[1].value)throw new o.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),c||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map(e=>new X.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),n=(0,V.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,W.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Y.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],Y.prototype,"source",void 0),(0,r.Cg)([(0,h.MZ)()],Y.prototype,"url",null),Y=(0,r.Cg)([(0,h.$K)("esri.layers.raster.datasets.InMemoryRaster")],Y);const Q=Y;var ee=i(22671);let te=class extends P.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,W.eH)(i[0]),l=a?.map(e=>({BandName:e})),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new Q({source:{extent:t,pixelBlocks:i,attributeTable:r?ee.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new o.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new o.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new o.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:n}=s[e];if(!("ndarray"===a.toLowerCase()&&n?.length&&t?.length&&r?.length))throw new o.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!z(t[t.length-1])||!J(t[t.length-2]))throw new o.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=U(e),{ranges:a}=e,n=Object.keys(a).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=q(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:f}=a[s],h=f.length>2?e*f.slice(0,-2).reduce((e,t)=>e*t):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":Z(o),g=t*i,y=o.length/g;for(let s=0;s<y;s++){const a=B.A.createEmptyBand(m,g),n=new Uint8Array(g).fill(255);let l=!1;const c=s*g;for(let e=0;e<g;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[H(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const f=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:n}}(t)}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],te.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],te.prototype,"source",void 0),te=(0,r.Cg)([(0,h.$K)("esri.layers.raster.datasets.CovJSONRaster")],te);const ie=te;var se=i(44208),re=i(4576),ae=i(21325),ne=i(330),oe=i(43163);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new N.A({wkid:t});if(e=String(e).trim(),(0,ae.jp)(e))return new N.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(n);const l=new N.A(t?{wkid:t}:{wkt:n}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new N.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,ne.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ne.mX)(e);t.spatialReference=ce(i)}}else if((0,ne.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ne.V6)(e,"GeodataXform"),i=ce((0,ne.v7)(t,"SpatialReference/WKID")||(0,ne.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ne.v7)(t,"PolynomialOrder")??1,r=(0,ne.Ui)(t,"CoeffX/Double"),a=(0,ne.Ui)(t,"CoeffY/Double"),n=(0,ne.Ui)(t,"InverseCoeffX/Double"),o=(0,ne.Ui)(t,"InverseCoeffY/Double"),l=le(r,a),c=le(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ne.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,ne.mX)(e));else if((0,ne.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ne.v7)(e,"NoDataValue"),i=(0,ne.V6)(e,"Histograms/HistItem"),s=(0,ne.v7)(i,"HistMin"),r=(0,ne.v7)(i,"HistMax"),a=(0,ne.v7)(i,"BucketCount"),n=(0,ne.mX)(i,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,u;(0,ne.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}});const f=(0,ne.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}});const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map(e=>e.statistics).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map(e=>e.histogram).filter(re.Ru):null}return t}var he=i(20758);let pe=class extends P.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new N.A({wkid:3857})),r?.length&&null==s&&(s=(0,W.Pg)(r));const{width:o,height:l}=t;let c=new D.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let f=!0;if(a){const e=a.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(a=null,c=u)}const h=new Q({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new o.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,se.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new o.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,u.Lx)([r,o]);if(t?.aborted)throw(0,u.NK)();const c=fe(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;c.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,r.Cg)([(0,h.$K)("esri.layers.raster.datasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ge=i(84952),ye=i(86738),we=i(75414),ve=i(20223),xe=i(87045),be=i(25943),Ie=i(82371);let Ce=class extends P.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal})),t=await Promise.all(e),i=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),r=new Uint8Array(i);h=[];let a=0;for(const{data:e}of t)h.push(a),r.set(new Uint8Array(e),a),a+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?n.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:g,blockWidth:y,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((a.xmin-g.x)/v)%y,I=Math.round((a.xmax-g.x)/v)%y||y,C=Math.round((g.y-a.ymax)/x)%w,S=Math.round((g.y-a.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?C:0,R=i===m.maxCol?I:y,M=t===m.maxRow?S:w;return(0,G.z$)(d,{x:A,y:T},{width:R-A,height:M-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some(e=>{const i=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),r=await Promise.all([i,s]);return r[0]&&r[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new o.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new o.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new o.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return xe.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=r&&e<=a)});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return xe.A.fromJSON({...e,lods:e.lods.filter(e=>{const i=t(e.scale);return i<=r&&i>=a})})}return xe.A.fromJSON(e)}(s.tileInfo,s):xe.A.fromJSON(s.tileInfo);(0,me.Lw)(a);const[n,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some(e=>Math.abs(e.resolution-h)<f))&&(u.x=u.y=n.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=n.level-l.level,[m,g]=a.size,y=[],w=[];p.forEach((e,t)=>{e.level>=l.level&&e.level<=n.level&&y.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)}),y.sort((e,t)=>e.x-t.x);const v=this.computeBlockBoundary(c,m,g,a.origin,y,d),x=y.length>1?y.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every(e=>e===w[0])?w[0]??2:Math.round(10/(l.resolution/n.resolution)**(-1/d))/10;if(r.storageInfo=new ve.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new we.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ge.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new be.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=N.A.fromJSON(t.spatialReference||e.spatialReference),a=new ye.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new K.A({width:i,height:s,bandCount:3,extent:D.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then(e=>e.data?.slices).catch(()=>null):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map(e=>e.level))),n=t.lodAt(Math.min.apply(null,r.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find(e=>e.resolution===i.x)??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find(e=>Math.abs(e.scale-c)<s),u||(u=r.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??a));let f=n;return l>0&&(f=r.find(e=>Math.abs(e.scale-l)<s)??n,this._levelOffset=f.level-n.level),[u,f]}};(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),(0,r.Cg)([(0,h.MZ)()],Ce.prototype,"tileType",void 0),Ce=(0,r.Cg)([(0,h.$K)("esri.layers.raster.datasets.ImageServerRaster")],Ce);const Se=Ce;var Ae=i(10713);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),Re.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let Me=class extends P.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new B.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let g=0;for(g=0;g<d;g++)p&&!p.includes(g)||m.push(this.request(this._files.data,{range:{from:u[g].from,to:u[g].to},responseType:"array-buffer",signal:s.signal}));const y=await Promise.all(m),w=y.map(e=>e.data.byteLength).reduce((e,t)=>e+t),v=new Uint8Array(w),x=[];let b=0;for(g=0;g<d;g++)x.push(b),v.set(new Uint8Array(y[g].data),b),b+=y[g].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,C=await this.decodePixelBlock(v.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:x,pixelType:c}).catch(()=>null);if(null==C)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!C.mask&&(S=S[0],null!=S)){const e=C.width*C.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(g=0;g<e;g++)Math.abs((C.pixels[0][g]-S)/S)>1e-6&&(t[g]=1);else for(g=0;g<e;g++)C.pixels[0][g]!==S&&(t[g]=1);C.mask=t}let A=0,T=0;if(f!==r||h!==a){let e=C.mask;if(e)for(g=0;g<a;g++)if(T=g*r,g<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),C.mask=e,g=0;g<h;g++)for(T=g*r,A=0;A<f;A++)e[T+A]=1}return C}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,W.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(f/l/u**g)-1,t=Math.ceil(h/c/u**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=a**f,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ne.V6)(e,"MRF_META/Raster");if(!t)throw new o.A("mrf:open","not a valid MRF format");const i=(0,ne.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),n=((0,ne.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(n))throw new o.A("mrf:open","currently does not support compression "+n);const l=(0,ne.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new o.A("mrf:open","currently does not support pixel type "+l);const u=(0,ne.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,ne.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map(e=>parseFloat(e)))),(0,ne.V6)(e,"MRF_META/CachedSource"))throw new o.A("mrf:open","currently does not support MRF referencing other data files");const g=(0,ne.V6)(e,"MRF_META/GeoTags"),y=(0,ne.V6)(g,"BoundingBox");let w,v=!1;if(null!=y){const e=parseFloat(y.getAttribute("minx")),t=parseFloat(y.getAttribute("miny")),i=parseFloat(y.getAttribute("maxx")),s=parseFloat(y.getAttribute("maxy")),r=(0,ne.mX)(g,"Projection")||"";let a=N.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new N.A({wkid:e}))}else a=ce(r)??N.A.WGS84;else v=!0,a=new N.A({wkid:3857});w=new D.A(e,t,i,s),w.spatialReference=a}else v=!0,w=new D.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new N.A({wkid:3857})});const x=(0,ne.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,C=new ve.A({origin:new ye.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:n,pyramidScalingFactor:b}),S=new ye.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new K.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:C}),T=(0,ne.mX)(e,"datafile"),R=(0,ne.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(n).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],Me.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],Me.prototype,"_storageIndex",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Me.prototype,"datasetFormat",void 0),Me=(0,r.Cg)([(0,h.$K)("esri.layers.raster.datasets.MRFRaster")],Me);const Oe=Me;var _e=i(9334);function Fe(e){const t=e.fields,i=e.records,s=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),a=r.map(e=>e.name),n=[];let o=0,l=0;return i.forEach(e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})}),{displayFieldName:"",fields:r,features:n}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,_e.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)i.push((0,_e.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length}),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(87877),De=i(94213);const Ne=(e,t)=>e.get(t)?.values,Le=(e,t)=>e.get(t)?.values?.[0];let Ee=class extends P.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new o.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,ke.uT)(i),n=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(n,c,s,a?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:g}=t;let y=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==y&&(w=!0,y=new N.A({wkid:3857}));const v=new D.A({...t.extent,spatialReference:y}),x=new ye.A(v?{x:v.xmin,y:v.ymax,spatialReference:y}:{x:0,y:0}),b=new ve.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ye.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),C=g?{BandProperties:g.bandProperties,DataType:g.dataType}:{};let S=null;const A=Le(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new K.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:y,isPseudoSpatialReference:w,keyProperties:C,extent:v,colormap:S,statistics:g?g.statistics:null});if(m?.length&&(R.nativeExtent=new D.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:y}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ye.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:y}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach(i=>{i.x*=e,i.y*=t})}return{imageInfo:t,rasterInfo:R}}(n),h=(0,ke.zS)(n),p=(0,ke.r9)(n);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:n,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new o.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new o.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&l.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=n[0].get("PREDICTOR")?.values?.[0],m=n[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new o.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:g,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!g){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,W.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ye.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}y.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||g||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),g&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const a=await this._readIFD(t,i,De.NB,s,r);if(!a?.ifd)throw new o.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(a.ifd),!a.nextIFD)return null;t.posIFD=a.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=De.NB,s=4,r){let{fileChunk:a,posIFD:n,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ke.JM)(a,t,n,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];n=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:a,posIFD:n,fileOffset:o},r),c=await this._readIFD(l,t,De.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(a=(await this.request(this.url,{range:{from:o,to:o+n+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,a.byteLength<n+l.requiredBufferSize?null:(e.fileChunk=a,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter(e=>null!=e.offlineOffsetSize);if(0===r.length)return;const a=r.map(e=>e.offlineOffsetSize),n=Math.min.apply(null,a.map(e=>e[0])),o=Math.max.apply(null,a.map(e=>e[0]+e[1]));let l=1===a.length||o-n<=this._bufferSize;if(!l&&a.length>1&&(a.sort((e,t)=>e[0]-t[0]),l=a.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,a[0][0])===o),l){const e=await this._fetchOffsets(n,Math.max(o,n+this._bufferSize),s);return void r.forEach(i=>(0,ke.Cr)(e,t,i,n))}const c=r.map(async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,ke.Cr)(r,t,e,i[0])});await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,a=Math.ceil((t-e)/r);let n=e;for(let e=0;e<a;e++)s.push(this.request(this.url,{range:{from:n,to:e===a-1?t:n+r-1},responseType:"array-buffer",signal:i})),n+=r;const o=await Promise.all(s);if(1===a)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<a;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal})),f=await Promise.all(u),h=f.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==g||l!==y){let e=w.mask;if(e)for(v=0;v<y;v++)if(b=v*g,v<l)for(x=o;x<g;x++)e[b+x]=0;else for(x=0;x<g;x++)e[b+x]=0;else for(e=new Uint8Array(g*y),w.mask=e,v=0;v<l;v++)for(b=v*g,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const f=Ne(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<h||i<p)return null;const g=Le(l,"IMAGEWIDTH"),y=Le(l,"IMAGELENGTH"),w=Le(l,"TILEWIDTH"),v=Le(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&g%w||w,actualTileHeight:t===d&&y%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?ee.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r.Cg)([(0,h.MZ)()],Ee.prototype,"_files",void 0),(0,r.Cg)([(0,h.MZ)()],Ee.prototype,"_headerInfo",void 0),(0,r.Cg)([(0,h.MZ)()],Ee.prototype,"_bufferSize",void 0),(0,r.Cg)([(0,h.MZ)()],Ee.prototype,"_chunkSize",void 0),(0,r.Cg)([(0,h.MZ)({type:String,json:{write:!0}})],Ee.prototype,"datasetFormat",void 0),Ee=(0,r.Cg)([(0,h.$K)("esri.layers.raster.datasets.TIFFRaster")],Ee);const Be=Ee,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Oe}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:ie}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:Q});class Je{static get supportedFormats(){const e=new Set;return ze.forEach((t,i)=>e.add(i)),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const n={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(n).forEach(e=>{null==n[e]&&delete n[e]}),a){if(!this.supportedFormats.has(a))throw new o.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new o.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(a).constructor)(n);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,ze.get(a).constructor)(n);return t.open({signal:e.signal}).then(()=>t).catch(()=>u())};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var Ue=i(8144),$e=i(10873),je=i(20437),qe=i(74797),Ze=i(22796),He=i(56776),Ve=i(30291),Ge=i(88625);let We=class extends((0,x.dM)((0,M.j)((0,C.q)((0,S.A)((0,T.H)((0,b.d)((0,I.o)((0,A.G)((0,O.e)((0,v.b)((0,R.J)((0,c.P)((0,n.OU)(w.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.graphicOrigin=new y(this),this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,u.sg)(async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case 0:return r(this,t);case 1:return a(this,s,t)}})}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then(()=>this._openRaster(t))),Promise.resolve(this)}set elevationInfo(e){"relative-to-scene"!==e?.mode&&this._set("elevationInfo",e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,qe.rZ)("Pixel Value"),(0,qe.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,qe.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,qe.DV)(t),s=(0,qe.y6)();e.push(i,s)}if(r){const t=(0,qe.AL)(r);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==qe.F_.rawServicePixelValue)),s=(0,Ve.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,qe.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){const i=(0,p.PZ)(Ze.A,e);if(await this.load(),!i||"none"===i.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:e}=await this._openFunctionRaster(i,t);return e}catch(e){if(e instanceof o.A)throw e;throw new o.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsWrite(){const e=this._primaryRasters[0]??this.raster;return!!(this.loaded?"RasterTileServer"===e.datasetFormat&&("Raster"===e.tileType||"Map"===e.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){if(this.supportsWrite())return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,_.qg)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new o.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,f.wB)(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,_.pb)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,Ue.UD)(t.toJSON(),s);const r=await Promise.all(s.map(e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i}))),a=r.findIndex(e=>null==e);if(a>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new o.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new o.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>i[e.url]=e);const s=(0,Ue.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new F.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){(0,He.XF)(l.A.getLogger(this),(0,He.$7)("ImageryTile layers","relative-to-scene",e)),(0,He.XF)(l.A.getLogger(this),(0,He.tW)("ImageryTile layers",e))}};(0,r.Cg)([(0,h.MZ)({clonable:!1})],We.prototype,"_primaryRasters",void 0),(0,r.Cg)([(0,h.MZ)({type:Ge.A,value:null,json:{name:"layerDefinition.elevationInfo",write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],We.prototype,"elevationInfo",null),(0,r.Cg)([(0,h.MZ)({type:xe.A})],We.prototype,"tileInfo",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,clonable:!1})],We.prototype,"graphicOrigin",void 0),(0,r.Cg)([(0,h.MZ)($e.fV)],We.prototype,"legendEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],We.prototype,"isReference",void 0),(0,r.Cg)([(0,h.MZ)({type:["show","hide"]})],We.prototype,"listMode",void 0),(0,r.Cg)([(0,h.MZ)({json:{read:!0,write:!0}})],We.prototype,"blendMode",void 0),(0,r.Cg)([(0,h.MZ)({type:Ze.A,json:{name:"renderingRule",write:!0}})],We.prototype,"rasterFunction",void 0),(0,r.Cg)([(0,h.MZ)()],We.prototype,"sourceJSON",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],We.prototype,"version",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],We.prototype,"type",void 0),(0,r.Cg)([(0,h.MZ)({type:["ArcGISTiledImageServiceLayer"]})],We.prototype,"operationalLayerType",void 0),(0,r.Cg)([(0,h.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],We.prototype,"popupEnabled",void 0),(0,r.Cg)([(0,h.MZ)({type:a.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],We.prototype,"popupTemplate",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0})],We.prototype,"defaultPopupTemplate",null),(0,r.Cg)([(0,h.MZ)($e.PY)],We.prototype,"screenSizePerspectiveEnabled",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[je.A]})],We.prototype,"fields",void 0),(0,r.Cg)([(0,h.MZ)({readOnly:!0,type:[je.A]})],We.prototype,"rasterFields",null),(0,r.Cg)([(0,h.MZ)({constructOnly:!0})],We.prototype,"source",void 0),We=(0,r.Cg)([(0,h.$K)("esri.layers.ImageryTileLayer")],We);const Xe=We},10333:(e,t,i)=>{i.d(t,{A:()=>n});var s=i(31635),r=i(25482),a=i(91429);let n=class extends r.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s.Cg)([(0,a.MZ)()],n.prototype,"affectsPixelSize",null),(0,s.Cg)([(0,a.MZ)({json:{write:!0}})],n.prototype,"spatialReference",void 0),n=(0,s.Cg)([(0,a.$K)("esri.layers.raster.transforms.BaseRasterTransform")],n)},18768:(e,t,i)=>{i.d(t,{b:()=>o});var s=i(31635),r=i(53966),a=i(91429),n=i(60694);const o=e=>{const t=e;let i=class extends t{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,n.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,n.Jf)(e,r.A.getLogger(this)))}};return(0,s.Cg)([(0,a.MZ)()],i.prototype,"title",null),(0,s.Cg)([(0,a.MZ)({type:String})],i.prototype,"url",null),i=(0,s.Cg)([(0,a.$K)("esri.layers.mixins.ArcGISService")],i),i}},25943:(e,t,i)=>{i.d(t,{d:()=>C});var s,r=i(31635),a=i(11254),n=i(69622),o=i(49186),l=i(36563),c=(i(44208),i(66344)),u=i(15142),f=i(74887),h=i(36708),p=i(76030),d=i(84952),m=i(91429),g=i(72802),y=i(4718),w=i(69397),v=i(34275);class x{constructor(e){!function(e){if(!e?.location)throw new o.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new o.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new o.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new o.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new o.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,y.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const l=function(e,t=!1){return e<=v.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,l[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,w.Qf)(l))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:l}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then(e=>e.data).catch(e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:l},valid:!0,data:new Array(n*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==l))throw new o.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:l}});return x.fromJSON(e)})}static fromJSON(e){return Object.freeze(new x(e))}}function b(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function I(e,t,i){return new o.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let C=class extends n.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),this.addHandles((0,h.wB)(()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]},()=>this._initializeTilemapDefinition(),h.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(I(e,t,i)):this._fetchTilemap(e,t,i,s).catch(e=>e).then(s=>{if(s instanceof x){const r=s.getAvailability(t,i);if("unavailable"===r)throw I(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"})}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a){if(!this._prefetchingEnabled)return;const n=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(n))return;const o=new AbortController;a.then(()=>o.abort(),()=>o.abort());let c=!1;const u=(0,l.hA)(()=>{c||(c=!0,o.abort())});if(this.addHandles(u,n),await(0,p.md)(10,o.signal).catch(()=>{}),c||(c=!0,this.removeHandles(n)),(0,f.G4)(o))return;const h=new g.U(e,t,i),d={...r,signal:o.signal},m=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&m.upsampleTile(h);++e){const e=this.fetchAvailability(h.level,h.row,h.col,d);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new u.A({initialSize:s._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new o.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise((e,t)=>{(0,f.u7)(n,()=>t((0,f.NK)()));const i=b(r);let a=this._pendingTilemapRequests[i];if(!a){a=x.fromDefinition(r,s).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)})}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,d.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=b(s);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],C.prototype,"size",void 0),C=s=(0,r.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],C)},43163:(e,t,i)=>{i.d(t,{A:()=>d});var s,r=i(31635),a=i(91429),n=i(5443),o=i(86738),l=i(10333),c=i(36005),u=i(43937),f=i(93223);function h(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,f=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function p(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:o,spatialReference:l}=t;let c=[];if(i<2)c.push({x:s,y:o}),c.push({x:a,y:o}),c.push({x:s,y:r}),c.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)c.push({x:s,y:r+(o-r)*t/(e-1)}),c.push({x:a,y:r+(o-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)c.push({x:s+(a-s)*t/e,y:r}),c.push({x:s+(a-s)*t/e,y:o})}c=c.map(t=>h(e,t,i));const u=c.map(e=>e.x),f=c.map(e=>e.y);return new n.A({xmin:Math.min.apply(null,u),xmax:Math.max.apply(null,u),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:l})}let d=s=class extends l.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=h(this.forwardCoefficients,e,this.polynomialOrder);return new o.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=h(this.inverseCoefficients,e,this.polynomialOrder);return new o.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,r.Cg)([(0,a.MZ)()],d.prototype,"forwardCoefficients",void 0),(0,r.Cg)([(0,c.w)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,r.Cg)([(0,u.K)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,r.Cg)([(0,c.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,r.Cg)([(0,u.K)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,r.Cg)([(0,a.MZ)()],d.prototype,"affectsPixelSize",null),(0,r.Cg)([(0,f.e)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=s=(0,r.Cg)([(0,a.$K)("esri.layers.raster.transforms.PolynomialTransform")],d)},56551:(e,t,i)=>{i.d(t,{H:()=>f});var s=i(31635),r=i(91429),a=i(69540),n=i(25482),o=i(56507),l=i(94359),c=i(93223);let u=class extends((0,a.OU)(n.o)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"name",void 0),(0,s.Cg)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],u.prototype,"method",void 0),(0,s.Cg)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],u.prototype,"value",void 0),(0,s.Cg)([(0,r.MZ)({type:[o.jz],json:{write:{isRequired:!0}}})],u.prototype,"bandIds",void 0),(0,s.Cg)([(0,r.MZ)({types:l.uy,json:{write:!0,origins:{"web-scene":{types:l.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],u.prototype,"renderer",void 0),u=(0,s.Cg)([(0,r.$K)("esri.renderers.support.RasterPresetRenderer")],u);const f=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s.Cg)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],i.prototype,"activePresetRendererName",void 0),(0,s.Cg)([(0,r.MZ)({type:[u],json:{name:"layerDefinition.presetRenderers",write:!0}})],i.prototype,"presetRenderers",void 0),i=(0,s.Cg)([(0,r.$K)("esri.layers.mixins.RasterPresetRendererMixin")],i),i}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>a,ez:()=>h,lM:()=>n,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const a=16;function n(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return a;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,a):0:0),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},75414:(e,t,i)=>{i.d(t,{A:()=>l});var s,r=i(31635),a=i(91429),n=i(10333),o=i(93223);let l=s=class extends n.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r.Cg)([(0,o.e)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)()],l.prototype,"tolerance",void 0),l=s=(0,r.Cg)([(0,a.$K)("esri.layers.raster.transforms.GCSShiftTransform")],l)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(11254),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),g=(0,c.jV)(m,i);e=f.path;const y=p||await(0,s.A)(e,g).then(e=>e.data),w=y.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,g):null,v=y.hasColormap?(0,s.A)(`${e}/colormap`,g):null,x=y.hasHistograms?(0,s.A)(`${e}/histograms`,g):null,b=y.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,g):null,I=y.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,g):null,C=await Promise.allSettled([w,v,x,b,I]);let S=null;if(y.minValues&&y.minValues.length===y.bandCount){S=[];for(let e=0;e<y.minValues.length;e++)S.push({min:y.minValues[e],max:y.maxValues[e],avg:y.meanValues[e],stddev:y.stdvValues[e]})}const A=r.A.fromJSON(y.extent),T=Math.ceil(A.width/y.pixelSizeX-.1),R=Math.ceil(A.height/y.pixelSizeY-.1),M=n.A.fromJSON(y.spatialReference||y.extent.spatialReference),O="fulfilled"===C[0].status?C[0].value?.data:null,_=O?.features?.length?u.A.fromJSON(O):null,F="fulfilled"===C[1].status?C[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===C[2].status?C[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===C[3].status?C[3].value?.data??{}:{},L="fulfilled"===C[4].status?C[4].value?.data.multidimensionalInfo:null,E=L?.variables?.length?L:null;E&&E.variables.forEach(e=>{e.statistics?.length&&e.statistics.forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),e.dimensions?.forEach(e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")})});const{defaultVariable:B,serviceDataType:z}=y;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=y.noDataValue;y.noDataValues?.length&&y.noDataValues.some(e=>e!==J)&&(J=y.noDataValues);const U=y.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:y.extent.xmin,y:y.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:y.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:y.bandCount,extent:r.A.fromJSON(y.extent),spatialReference:M,pixelSize:new a.A({x:y.pixelSizeX,y:y.pixelSizeY,spatialReference:M}),pixelType:y.pixelType.toLowerCase(),statistics:S,attributeTable:_,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:E,storageInfo:U})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}}}]);