@arcgis/core 4.32.0-next.20250121 → 4.32.0-next.20250122

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 (279) hide show
  1. package/WebLinkChart.js +1 -1
  2. package/arcade/treeAnalysis.js +1 -1
  3. package/assets/esri/core/t9n/Units_ar.json +1 -1
  4. package/assets/esri/core/t9n/Units_bg.json +1 -1
  5. package/assets/esri/core/t9n/Units_bs.json +1 -1
  6. package/assets/esri/core/t9n/Units_ca.json +1 -1
  7. package/assets/esri/core/t9n/Units_cs.json +1 -1
  8. package/assets/esri/core/t9n/Units_da.json +1 -1
  9. package/assets/esri/core/t9n/Units_de.json +1 -1
  10. package/assets/esri/core/t9n/Units_el.json +1 -1
  11. package/assets/esri/core/t9n/Units_es.json +1 -1
  12. package/assets/esri/core/t9n/Units_et.json +1 -1
  13. package/assets/esri/core/t9n/Units_fi.json +1 -1
  14. package/assets/esri/core/t9n/Units_fr.json +1 -1
  15. package/assets/esri/core/t9n/Units_he.json +1 -1
  16. package/assets/esri/core/t9n/Units_hr.json +1 -1
  17. package/assets/esri/core/t9n/Units_hu.json +1 -1
  18. package/assets/esri/core/t9n/Units_id.json +1 -1
  19. package/assets/esri/core/t9n/Units_it.json +1 -1
  20. package/assets/esri/core/t9n/Units_ja.json +1 -1
  21. package/assets/esri/core/t9n/Units_ko.json +1 -1
  22. package/assets/esri/core/t9n/Units_lt.json +1 -1
  23. package/assets/esri/core/t9n/Units_lv.json +1 -1
  24. package/assets/esri/core/t9n/Units_nl.json +1 -1
  25. package/assets/esri/core/t9n/Units_no.json +1 -1
  26. package/assets/esri/core/t9n/Units_pl.json +1 -1
  27. package/assets/esri/core/t9n/Units_pt-BR.json +1 -1
  28. package/assets/esri/core/t9n/Units_pt-PT.json +1 -1
  29. package/assets/esri/core/t9n/Units_ro.json +1 -1
  30. package/assets/esri/core/t9n/Units_ru.json +1 -1
  31. package/assets/esri/core/t9n/Units_sk.json +1 -1
  32. package/assets/esri/core/t9n/Units_sl.json +1 -1
  33. package/assets/esri/core/t9n/Units_sr.json +1 -1
  34. package/assets/esri/core/t9n/Units_sv.json +1 -1
  35. package/assets/esri/core/t9n/Units_th.json +1 -1
  36. package/assets/esri/core/t9n/Units_tr.json +1 -1
  37. package/assets/esri/core/t9n/Units_uk.json +1 -1
  38. package/assets/esri/core/t9n/Units_vi.json +1 -1
  39. package/assets/esri/core/t9n/Units_zh-CN.json +1 -1
  40. package/assets/esri/core/t9n/Units_zh-HK.json +1 -1
  41. package/assets/esri/core/t9n/Units_zh-TW.json +1 -1
  42. package/assets/esri/core/workers/RemoteClient.js +1 -1
  43. package/assets/esri/core/workers/chunks/03b94362ed2a45ee5ea3.js +1 -0
  44. package/assets/esri/core/workers/chunks/0446f2ffad255cd40272.js +1 -0
  45. package/assets/esri/core/workers/chunks/059119f1731c2103c91c.js +1 -0
  46. package/assets/esri/core/workers/chunks/05e58286f8015dba6768.js +1 -0
  47. package/assets/esri/core/workers/chunks/060414956bf316529c48.js +1 -0
  48. package/assets/esri/core/workers/chunks/{f8e188af5608293d5b2b.js → 07bff9e742f3e5877f3f.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{6400f39a965900f66ce7.js → 083c73428945fb3d4558.js} +1 -1
  50. package/assets/esri/core/workers/chunks/0d3154b90bc3fd7e6b4c.js +1 -0
  51. package/assets/esri/core/workers/chunks/0ec2ae595fa22998ffea.js +1 -0
  52. package/assets/esri/core/workers/chunks/{105dcc7b7284b1e965b7.js → 15c5b1dd8f398f641f6e.js} +1 -1
  53. package/assets/esri/core/workers/chunks/163451124c66a7a0bcdc.js +1 -0
  54. package/assets/esri/core/workers/chunks/17cc6638a510da164f58.js +1 -0
  55. package/assets/esri/core/workers/chunks/1e3ab66d0e8a7f160f33.js +1 -0
  56. package/assets/esri/core/workers/chunks/1e9349411af082ec03d0.js +1 -0
  57. package/assets/esri/core/workers/chunks/1eb47cfca815ac432cf5.js +1 -0
  58. package/assets/esri/core/workers/chunks/{82266ca8002554198208.js → 20e7fae0c173807ba9a2.js} +1 -1
  59. package/assets/esri/core/workers/chunks/{af0b0a7eedebcf99d05d.js → 2118e9ffb24178ed7f59.js} +1 -1
  60. package/assets/esri/core/workers/chunks/21c12edc0632eb911e73.js +1 -0
  61. package/assets/esri/core/workers/chunks/21c3882a282a4755e032.js +1 -0
  62. package/assets/esri/core/workers/chunks/{435c037ccba71f1e22d3.js → 2488a0da3be64b0a26f4.js} +1 -1
  63. package/assets/esri/core/workers/chunks/254fbd8055ae7a0bb393.js +1 -0
  64. package/assets/esri/core/workers/chunks/2d55eb8059a532ffcc56.js +1 -0
  65. package/assets/esri/core/workers/chunks/3034df78da56fe1c0535.js +1 -0
  66. package/assets/esri/core/workers/chunks/32a96ef30f4608f377d6.js +1 -0
  67. package/assets/esri/core/workers/chunks/{97d66b0d0ff1132966de.js → 33b2f59c2ec10b2a1034.js} +1 -1
  68. package/assets/esri/core/workers/chunks/402de76b5de05615e111.js +1 -0
  69. package/assets/esri/core/workers/chunks/{17726b0ab1bf66185d66.js → 40efcdf03c5224e6c4f7.js} +1 -1
  70. package/assets/esri/core/workers/chunks/424c7788a708abbf9299.js +1 -0
  71. package/assets/esri/core/workers/chunks/484d99910d110830df76.js +1 -0
  72. package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js → 486969dba1dc99402172.js} +2 -2
  73. package/assets/esri/core/workers/chunks/{02b2175132c9720bc756.js → 48f4ba1a5bb692903d06.js} +1 -1
  74. package/assets/esri/core/workers/chunks/4d7bd2bbe9045a2fee7a.js +1 -0
  75. package/assets/esri/core/workers/chunks/{decd316936df1ad3fa65.js → 50b538c93696de5eda97.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{de00150030003de05146.js → 52aea8a4f292a66f5cfa.js} +1 -1
  77. package/assets/esri/core/workers/chunks/56f0eb9802f5cf9ad0d9.js +1 -0
  78. package/assets/esri/core/workers/chunks/57ddd64f0c22274d87e0.js +1 -0
  79. package/assets/esri/core/workers/chunks/5b5be7eb139b153934f5.js +1 -0
  80. package/assets/esri/core/workers/chunks/{4af0674fabfc965f1660.js → 5b876743865ef91b5648.js} +1 -1
  81. package/assets/esri/core/workers/chunks/62b88350892198de5055.js +1 -0
  82. package/assets/esri/core/workers/chunks/{206194cf069ad4bcc3ad.js → 6adf4f3d807f1af1c7c1.js} +1 -1
  83. package/assets/esri/core/workers/chunks/6b1285db2d6695a87553.js +1 -0
  84. package/assets/esri/core/workers/chunks/6c425e1041bdeef32832.js +1 -0
  85. package/assets/esri/core/workers/chunks/6eb829a7959df2269b0e.js +1 -0
  86. package/assets/esri/core/workers/chunks/765b4aefce7c11bbcb1f.js +1 -0
  87. package/assets/esri/core/workers/chunks/{6d17488396583d83d9be.js → 79a265dc21e29d3fd888.js} +1 -1
  88. package/assets/esri/core/workers/chunks/7a9e1696dc6120df15b0.js +1 -0
  89. package/assets/esri/core/workers/chunks/7ae1f26ded268099f429.js +1 -0
  90. package/assets/esri/core/workers/chunks/7bf08823f861628144a1.js +1 -0
  91. package/assets/esri/core/workers/chunks/7e4d72279cc599b7029c.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ee5f43fbe4c2cc199e64.js → 8434cd16effc5efbf1bd.js} +1 -1
  93. package/assets/esri/core/workers/chunks/86149b4a5a148744c7d1.js +1 -0
  94. package/assets/esri/core/workers/chunks/{2779cf112299b612a73a.js → 875cb81f143ff8fe03b5.js} +1 -1
  95. package/assets/esri/core/workers/chunks/885814ef0e34c01a589f.js +1 -0
  96. package/assets/esri/core/workers/chunks/{e610dd938d30f75778bc.js → 8be2d16663a238de9438.js} +1 -1
  97. package/assets/esri/core/workers/chunks/91d5cb094a7051abb6c5.js +1 -0
  98. package/assets/esri/core/workers/chunks/93ba76749746871357e7.js +314 -0
  99. package/assets/esri/core/workers/chunks/991c597f27daa67158c5.js +1 -0
  100. package/assets/esri/core/workers/chunks/9bd22cdf6eb158555906.js +1 -0
  101. package/assets/esri/core/workers/chunks/{33eebe5cb22a03ae90c8.js → 9c88ce9b0020b6f9a37a.js} +1 -1
  102. package/assets/esri/core/workers/chunks/9df7bffadbe0b4aad442.js +1 -0
  103. package/assets/esri/core/workers/chunks/a0a056698f8227210f49.js +1 -0
  104. package/assets/esri/core/workers/chunks/a1cdd09968e11d95c701.js +1 -0
  105. package/assets/esri/core/workers/chunks/a28cb975974b99540432.js +1 -0
  106. package/assets/esri/core/workers/chunks/a29958273958c3e3e932.js +1 -0
  107. package/assets/esri/core/workers/chunks/{98da074899c82f0ded0b.js → af224962edae72b002fa.js} +1 -1
  108. package/assets/esri/core/workers/chunks/af2ed4c8ac238b932d89.js +1 -0
  109. package/assets/esri/core/workers/chunks/af75107f207b2ba01bb4.js +1 -0
  110. package/assets/esri/core/workers/chunks/b1661e6c76ef0800ffd6.js +1 -0
  111. package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +1 -0
  112. package/assets/esri/core/workers/chunks/b44cf0e4c2f93408cabc.js +1 -0
  113. package/assets/esri/core/workers/chunks/b846052b6f80ad6ada89.js +1 -0
  114. package/assets/esri/core/workers/chunks/{399e67ccb69a5b206354.js → c1fd87af3129873369fd.js} +1 -1
  115. package/assets/esri/core/workers/chunks/c473756f8785ab868ba5.js +1 -0
  116. package/assets/esri/core/workers/chunks/c5368ca97b7f7261967a.js +1 -0
  117. package/assets/esri/core/workers/chunks/c685991c9a30f7435933.js +1 -0
  118. package/assets/esri/core/workers/chunks/ca5bd71bc2c1b1b3f9d9.js +1 -0
  119. package/assets/esri/core/workers/chunks/ce1c89b5a10fb5a7bb49.js +1 -0
  120. package/assets/esri/core/workers/chunks/d45ff061bf71b73e9f26.js +1 -0
  121. package/assets/esri/core/workers/chunks/d4760e583dfac95dc8a1.js +1 -0
  122. package/assets/esri/core/workers/chunks/de2ca2dc1b5d62c0d82e.js +1 -0
  123. package/assets/esri/core/workers/chunks/dfa4be2e07cc4c0938b0.js +1 -0
  124. package/assets/esri/core/workers/chunks/e067cef3b3ac3af49b88.js +1 -0
  125. package/assets/esri/core/workers/chunks/e2775bcceb62fd0df41b.js +1 -0
  126. package/assets/esri/core/workers/chunks/{c81204ae663e58c7b689.js → e63ff8d57fd771413488.js} +1 -1
  127. package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +1 -0
  128. package/assets/esri/core/workers/chunks/{54c149f90bf94b797b36.js → ed30f46236da29c15430.js} +1 -1
  129. package/assets/esri/core/workers/chunks/f016205a8f1fb665d6dd.js +1 -0
  130. package/assets/esri/core/workers/chunks/f02119812ec852edda57.js +1 -0
  131. package/assets/esri/core/workers/chunks/f272070f0878cd3e39a4.js +1 -0
  132. package/assets/esri/core/workers/chunks/f2cf05fbbb51d657d300.js +1 -0
  133. package/assets/esri/core/workers/chunks/{e4f4ad67d778dea5b956.js → f4f6f4933ca58438d7bc.js} +1 -1
  134. package/assets/esri/core/workers/chunks/fdc3d97510c6d43a8882.js +1 -0
  135. package/assets/esri/core/workers/chunks/fef135e55706d84d1947.js +1 -0
  136. package/assets/esri/core/workers/chunks/ff4107b4fd3d3ce24e84.js +1 -0
  137. package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
  138. package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
  139. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
  140. package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
  141. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +24 -0
  142. package/assets/esri/themes/base/widgets/_UtilityNetworkTrace.scss +49 -24
  143. package/assets/esri/themes/dark/main.css +1 -1
  144. package/assets/esri/themes/light/main.css +1 -1
  145. package/assets/esri/themes/light/view.css +1 -1
  146. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  147. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  148. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace.json +1 -1
  149. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_en.json +1 -1
  150. package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
  151. package/chunks/arcgis-knowledge-client-core.js +1 -1
  152. package/chunks/lyr3DMain.js +1 -1
  153. package/chunks/lyr3DWorker.js +1 -1
  154. package/editing/sharedTemplates/SharedTemplate.js +1 -1
  155. package/editing/sharedTemplates/SharedTemplateMetadata.d.ts +4 -0
  156. package/editing/sharedTemplates/SharedTemplateMetadata.js +1 -1
  157. package/editing/templateUtils.js +5 -0
  158. package/geometry/operators/projectOperator.d.ts +4 -0
  159. package/geometry/operators/shapePreservingProjectOperator.d.ts +4 -0
  160. package/geometry/operators/support/GeographicTransformation.d.ts +4 -0
  161. package/geometry/operators/support/GeographicTransformation.js +1 -1
  162. package/geometry/operators/support/GeographicTransformationStep.d.ts +4 -0
  163. package/geometry/operators/support/geographicTransformationUtils.d.ts +4 -0
  164. package/geometry/support/GeographicTransformation.d.ts +2 -2
  165. package/geometry/support/GeographicTransformationStep.d.ts +2 -2
  166. package/interfaces.d.ts +522 -53
  167. package/layers/ILyr3DWasmPerSceneView.js +1 -1
  168. package/layers/LinkChartLayer.js +1 -1
  169. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  170. package/networks/support/utils.js +1 -1
  171. package/package.json +1 -1
  172. package/rest/featureService/FeatureService.js +1 -1
  173. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.d.ts +4 -0
  174. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsConfiguration.js +5 -0
  175. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.d.ts +4 -0
  176. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsEntity.js +5 -0
  177. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.d.ts +4 -0
  178. package/rest/knowledgeGraph/toolService/findPaths/CIMFilteredFindPathsPathFilter.js +5 -0
  179. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.d.ts +4 -0
  180. package/rest/knowledgeGraph/toolService/findPaths/CIMKGTraversalDirection.js +5 -0
  181. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.d.ts +4 -0
  182. package/rest/knowledgeGraph/toolService/findPaths/FindPathsToolSettings.js +5 -0
  183. package/rest/knowledgeGraphService.js +1 -1
  184. package/support/revision.js +1 -1
  185. package/undoredo/support/Services.js +1 -1
  186. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  187. package/views/3d/layers/Lyr3DWasm.js +1 -1
  188. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  189. package/widgets/Editor/UpdateWorkflow.js +1 -1
  190. package/widgets/Editor/workflowUtils.js +1 -1
  191. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  192. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  193. package/widgets/FeatureTemplates/FeatureTemplatesViewModel.js +1 -1
  194. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  195. package/widgets/FeatureTemplates/featureTemplatesUtils.js +1 -1
  196. package/widgets/FeatureTemplates.js +1 -1
  197. package/widgets/LayerList/LayerListItem.js +1 -1
  198. package/widgets/Locate.js +1 -1
  199. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  200. package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
  201. package/widgets/OrientedImageryViewer/adapters/sketch/MeasurementAdapter.js +1 -1
  202. package/widgets/OrientedImageryViewer/components/ImageAreaMeasurement.js +5 -0
  203. package/widgets/OrientedImageryViewer/components/ImageDistanceMeasurement.js +5 -0
  204. package/widgets/OrientedImageryViewer/components/ImageMeasurement.js +5 -0
  205. package/widgets/OrientedImageryViewer/css.js +1 -1
  206. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  207. package/widgets/OrientedImageryViewer.js +1 -1
  208. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +5 -0
  209. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +5 -0
  210. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  211. package/widgets/UtilityNetworkTrace.js +1 -1
  212. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationList.js +1 -1
  213. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  214. package/assets/esri/core/workers/chunks/0651586dc7bd2e8b34db.js +0 -1
  215. package/assets/esri/core/workers/chunks/077070295499b9bfabb6.js +0 -1
  216. package/assets/esri/core/workers/chunks/090cfc7f088a729afd47.js +0 -1
  217. package/assets/esri/core/workers/chunks/0d387baa64a89f88b1de.js +0 -1
  218. package/assets/esri/core/workers/chunks/134de9fa142129a43b1e.js +0 -1
  219. package/assets/esri/core/workers/chunks/16fa0a5f73ab67a8d3e4.js +0 -1
  220. package/assets/esri/core/workers/chunks/1797f62e9bf8f1ac8d13.js +0 -1
  221. package/assets/esri/core/workers/chunks/182722e2fe0a35c4d8db.js +0 -1
  222. package/assets/esri/core/workers/chunks/1b3215f3290fb2f07ab8.js +0 -1
  223. package/assets/esri/core/workers/chunks/1f4dd96aacf8c40a1120.js +0 -1
  224. package/assets/esri/core/workers/chunks/22748779ca94eda44de5.js +0 -1
  225. package/assets/esri/core/workers/chunks/2427a01678f3d9fbf30b.js +0 -1
  226. package/assets/esri/core/workers/chunks/33a13544b9e5f4f20bce.js +0 -1
  227. package/assets/esri/core/workers/chunks/423329432fbf007c620b.js +0 -1
  228. package/assets/esri/core/workers/chunks/467bd3c0da9518a0058b.js +0 -1
  229. package/assets/esri/core/workers/chunks/4c1d11a91291b28a73be.js +0 -1
  230. package/assets/esri/core/workers/chunks/51fbbd082ca78e4417d9.js +0 -1
  231. package/assets/esri/core/workers/chunks/5c05c899f7e6f764fedd.js +0 -1
  232. package/assets/esri/core/workers/chunks/6c1470dc0bd4389d1a2d.js +0 -1
  233. package/assets/esri/core/workers/chunks/6e804ee2d96d4de85a5f.js +0 -1
  234. package/assets/esri/core/workers/chunks/712f0dd46932c544df68.js +0 -1
  235. package/assets/esri/core/workers/chunks/71e88c90e9f9a9bddcd8.js +0 -1
  236. package/assets/esri/core/workers/chunks/74ba752dfab8ea5b6d2a.js +0 -314
  237. package/assets/esri/core/workers/chunks/79903647d4ed16d9a402.js +0 -1
  238. package/assets/esri/core/workers/chunks/7b4880b2dc6b01d70ccc.js +0 -1
  239. package/assets/esri/core/workers/chunks/7c98e4fcba1dc24eb788.js +0 -1
  240. package/assets/esri/core/workers/chunks/7d0fc25ce1f74adcfeb6.js +0 -1
  241. package/assets/esri/core/workers/chunks/8249351daa45ca82ca0c.js +0 -1
  242. package/assets/esri/core/workers/chunks/87ddc3d5d751d565cd97.js +0 -1
  243. package/assets/esri/core/workers/chunks/88bb55bca76f978c0aa3.js +0 -1
  244. package/assets/esri/core/workers/chunks/89198ca24466d939e4e8.js +0 -1
  245. package/assets/esri/core/workers/chunks/8cda8dbd95f0a78063a8.js +0 -1
  246. package/assets/esri/core/workers/chunks/8e0e5183c88a45fbfd8e.js +0 -1
  247. package/assets/esri/core/workers/chunks/90eea0c2435bb5d10460.js +0 -1
  248. package/assets/esri/core/workers/chunks/93c1541241f92fc07eaa.js +0 -1
  249. package/assets/esri/core/workers/chunks/964f2897794d8d71dcb7.js +0 -1
  250. package/assets/esri/core/workers/chunks/976daa00d35ee7f27a26.js +0 -1
  251. package/assets/esri/core/workers/chunks/99b4f146d0f1661a217c.js +0 -1
  252. package/assets/esri/core/workers/chunks/aa96a05b94ae642c1c9f.js +0 -1
  253. package/assets/esri/core/workers/chunks/b0055e7b2e840d478de8.js +0 -1
  254. package/assets/esri/core/workers/chunks/b1bf8ad629a6b8f4489a.js +0 -1
  255. package/assets/esri/core/workers/chunks/b1e3448ba51557ff6c13.js +0 -1
  256. package/assets/esri/core/workers/chunks/b30046a40bcfbec8abe4.js +0 -1
  257. package/assets/esri/core/workers/chunks/b538d02706a25bbbe2d0.js +0 -1
  258. package/assets/esri/core/workers/chunks/c436a112a3119ceabebf.js +0 -1
  259. package/assets/esri/core/workers/chunks/c690268f48bc84778b23.js +0 -1
  260. package/assets/esri/core/workers/chunks/c8a09db652389f0d254d.js +0 -1
  261. package/assets/esri/core/workers/chunks/c8a645601d041f411060.js +0 -1
  262. package/assets/esri/core/workers/chunks/cb3b7f83b3efb315bd14.js +0 -1
  263. package/assets/esri/core/workers/chunks/cdc5e4cd1214362e752a.js +0 -1
  264. package/assets/esri/core/workers/chunks/da5fc368eb5b3592d05e.js +0 -1
  265. package/assets/esri/core/workers/chunks/dae7e8357936466482fe.js +0 -1
  266. package/assets/esri/core/workers/chunks/dd935b6335c674b6f596.js +0 -1
  267. package/assets/esri/core/workers/chunks/ddd20894b5107b76b815.js +0 -1
  268. package/assets/esri/core/workers/chunks/df4d7f100222ea671730.js +0 -1
  269. package/assets/esri/core/workers/chunks/eb256e8488e341c4a6f2.js +0 -1
  270. package/assets/esri/core/workers/chunks/ebc0094355504ec09fb8.js +0 -1
  271. package/assets/esri/core/workers/chunks/f1b63f092e239f84b849.js +0 -1
  272. package/assets/esri/core/workers/chunks/f2126b79f41dc62cc576.js +0 -1
  273. package/assets/esri/core/workers/chunks/f3e0b0f07a622fcdd6ae.js +0 -1
  274. package/assets/esri/core/workers/chunks/f581aec77accce7411e0.js +0 -1
  275. package/assets/esri/core/workers/chunks/f877bcbd277a28154d82.js +0 -1
  276. package/assets/esri/core/workers/chunks/fa1c68f2ffcdff7986b6.js +0 -1
  277. package/assets/esri/core/workers/chunks/feeb36ffdffb227c4353.js +0 -1
  278. package/widgets/support/templateUtils.js +0 -5
  279. /package/assets/esri/core/workers/chunks/{9970e0e74cf2877a7ffc.js.LICENSE.txt → 486969dba1dc99402172.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4541],{30633:(e,t,r)=>{r.r(t),r.d(t,{default:()=>Er});var i=r(90237),s=r(13874),n=r(69540),o=r(49186),a=r(92071),l=r(74887),u=r(10107),p=(r(44208),r(53966)),c=(r(87811),r(40608)),m=r(43937),d=r(4146),y=r(59456),h=r(52106),f=r(68729),g=r(78888),w=r(4718),v=r(36708),R=r(84952),_=r(56507),b=r(36005),S=r(21325),M=r(10873),x=r(45617),A=r(25482),I=r(22796),F=r(16019);const D={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var j=r(67369),T=r(70274),P=r(48940);const Z=new Set(["u1","u2","u4","u8","s8","u16","s16"]),N={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},C=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function O(e){return C.has(e.type)}function V(e,t){if(!e||!t)return(0,w.o8)(e||t);const r=(0,w.o8)(e);if(r.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(r.functionDefinition.arguments,t),r.rasterFunctionDefinition=r.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(E(r.functionArguments).Raster=t);return r}function J(e,t){for(const r in e)"raster"===r.toLowerCase()&&("RasterFunctionVariable"===e[r].type?(e[r]=t.rasterFunctionDefinition,e[r].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[r].type&&J(e[r].arguments,t))}function q(e){const t=(0,w.o8)(D[e.functionName+"Function"]),r=e.functionArguments;for(const e in r)"raster"===e.toLowerCase()?(t.arguments[e]=q(r[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(r[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=r[e];return t}function E(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?E(t.functionArguments):e}const G={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function $(e,t){const r=Z.has(t)?(0,F.hP)(t):null;return r&&e.push([Math.floor(r[0]-1),0,0,0],[Math.ceil(r[1]+1),0,0,0]),e}function z(e){if(null==e)return;const{fields:t}=e,r=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return r?.name}function L(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find((e=>"fill"===e.type))?.material?.color:e.symbol?.color}function U(e){const t=[],r=[];return e.forEach((e=>{t.push(e[0]),r.push((0,j.vL)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:r}}var B=r(85675),H=r(13868);let k=class extends A.A{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,r){this.layer.version<10.3||(t[r]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,r){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[r]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,r){"lerc"===this.format&&this.layer.version>=10.5&&(t[r]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const r=e.definitionExpression;return t?r&&r!==t.where&&(t=t.clone(),t.where=r):r&&(t=new B.A({where:r})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const r=e.pixelFilter,i=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return V(new I.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),i&&!r&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:r,renderer:i}=t;return e=e||t.rasterFunction,i&&O(i)?V(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const r=t.convertToRFT,i=new I.A;i.functionName="Stretch";const s=G[T.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map((e=>[e.min,e.max,e.avg??0,e.stddev??1])),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===G.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,i.outputPixelType=n):s===G.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,i.outputPixelType=n):s===G.minMax?i.outputPixelType=n:s===G.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),i.functionArguments=a,i.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new I.A;if(r)n.functionArguments={ColorRamp:(0,j.hf)(s)};else{const r=(0,j.hs)(s,!0);if(r)n.functionArguments={colorRampName:r};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,j.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=i,r?new I.A({rasterFunctionDefinition:q(n)}):n}return r?new I.A({rasterFunctionDefinition:q(i)}):i}(e,t);case"class-breaks":return function(e,t){const r=[],i=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=z(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,r)=>{const i=t.symbol?.color;let s;i?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||r===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],i.r,i.g,i.b]))}))}));const r=a?$(n,a):n,i=new I.A;return i.functionName="Colormap",i.functionArguments={},i.functionArguments.Colormap=r,i.variableName="Raster",t.convertToRFT?new I.A({rasterFunctionDefinition:q(i)}):i}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?r.push(e.minValue,e.maxValue+o):r.push(e.minValue+o,e.maxValue+o),i.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?$(n,a):n,m=new I.A;m.functionName="Remap",m.functionArguments={InputRanges:r,OutputValues:i,NoDataRanges:s},m.variableName="Raster";const d=new I.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new I.A({rasterFunctionDefinition:q(d)}):d}(e,t);case"unique-value":return function(e,t){const r=[],{pixelType:i,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=z(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const r=e.value,i=L(e);null!=r&&i?.a&&t.set(String(r),i.toRgb())}));const i=e.field;i&&n.forEach((({attributes:e})=>{const s=String(e[i]),n=e[o],l=t.get(s);l?r.push([n,...l]):a&&r.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],i=L(t),s=+t.value;if(i?.a){if(isNaN(s))return null;r.push([s,i.r,i.g,i.b])}}const u=i?$(r,i):r,p=new I.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new I.A({rasterFunctionDefinition:q(p)}):p}(e,t);case"raster-colormap":return function(e,t){const r=e.extractColormap();if(!r||0===r.length)return null;const{pixelType:i}=t,s=i?$(r,i):r,n=new I.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new I.A({rasterFunctionDefinition:q(n)}):n}(e,t);case"vector-field":return function(e,t){const r=new I.A;r.functionName="VectorFieldRenderer";const{dataType:i,bandNames:s}=t,n="vector-uv"===i;let o,a;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new P.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:N[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};r.functionArguments=c;const m=q(r);return t.convertToRFT?I.A.fromJSON({rasterFunctionDefinition:m}):r}(e,t);case"raster-shaded-relief":return function(e,t){const r=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new I.A;const i=new I.A;i.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),i.functionArguments=o,i.variableName="Raster",e.colorRamp&&(i.functionName="ShadedRelief",r?o.ColorRamp=(0,j.hf)(e.colorRamp):o.Colormap=(0,j.R8)(e.colorRamp)),r?new I.A({rasterFunctionDefinition:q(i)}):i}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(i,{rasterAttributeTable:r.attributeTable,pixelType:r.pixelType,dataType:r.dataType,bandNames:r.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:r.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,r=this.layer.serviceRasterInfo.pixelSize;let i=new I.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:r}});return i=e?.rasterFunctionDefinition?new I.A({rasterFunctionDefinition:q(i)}):i,V(i,e)}};(0,i._)([(0,u.MZ)()],k.prototype,"layer",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"adjustAspectRatio",null),(0,i._)([(0,m.K)("adjustAspectRatio")],k.prototype,"writeAdjustAspectRatio",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"bandIds",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"compression",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"compressionQuality",null),(0,i._)([(0,m.K)("compressionQuality")],k.prototype,"writeCompressionQuality",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"compressionTolerance",null),(0,i._)([(0,m.K)("compressionTolerance")],k.prototype,"writeCompressionTolerance",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"format",null),(0,i._)([(0,u.MZ)({type:String,json:{read:{reader:H.SZ.read},write:{writer:H.SZ.write}}})],k.prototype,"interpolation",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"noData",null),(0,i._)([(0,u.MZ)({type:String,json:{read:{reader:H.hm.read},write:{writer:H.hm.write}}})],k.prototype,"noDataInterpretation",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"pixelType",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"lercVersion",void 0),(0,i._)([(0,m.K)("lercVersion")],k.prototype,"writeLercVersion",null),(0,i._)([(0,u.MZ)({type:Number})],k.prototype,"version",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"mosaicRule",null),(0,i._)([(0,u.MZ)({json:{write:!0,name:"renderingRule"}})],k.prototype,"rasterFunction",null),k=(0,i._)([(0,c.$)("esri.layers.support.ExportImageServiceParameters")],k);var Q=r(20437),K=r(95466),W=r(33446),X=r(43577),Y=r(14140),ee=r(74797),te=r(87186),re=r(69409),ie=r(77301),se=r(51244),ne=r(14636),oe=r(12711),ae=r(85676),le=r(17136),ue=r(2272),pe=r(86738);let ce=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,i._)([(0,u.MZ)({type:pe.A,json:{read:!0}})],ce.prototype,"fromGeometry",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],ce.prototype,"toGeometry",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],ce.prototype,"objectIds",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],ce.prototype,"where",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],ce.prototype,"maxCount",void 0),ce=(0,i._)([(0,c.$)("esri.rest.support.FindImagesParameters")],ce);const me=ce,de=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,i._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"make",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"model",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"rows",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,i._)([(0,c.$)("esri.rest.support.CameraInfoMixin")],t),t};let ye=class extends(de(A.A)){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,i._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"id",void 0),(0,i._)([(0,u.MZ)({json:{name:"uri",write:!0}})],ye.prototype,"referenceUri",void 0),(0,i._)([(0,u.MZ)({type:Date,json:{write:!0}})],ye.prototype,"acquisitionDate",void 0),(0,i._)([(0,m.K)("acquisitionDate")],ye.prototype,"writeAcquisitionDate",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"cameraID",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],ye.prototype,"center",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],ye.prototype,"perspectiveCenter",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"orientation",void 0),ye=(0,i._)([(0,c.$)("esri.rest.support.ImageInspectionInfo")],ye);const he=ye;let fe=class extends A.A{constructor(){super(...arguments),this.images=null}};(0,i._)([(0,u.MZ)({type:[he],json:{write:!0}})],fe.prototype,"images",void 0),fe=(0,i._)([(0,c.$)("esri.rest.support.FindImagesResult")],fe);const ge=fe;var we,ve=r(16930);let Re=we=class extends A.A{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new we((0,w.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,i._)([(0,u.MZ)({type:[String],json:{name:"angleName",write:!0}})],Re.prototype,"angleNames",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Re.prototype,"point",void 0),(0,i._)([(0,u.MZ)({type:ve.A,json:{write:!0}})],Re.prototype,"spatialReference",void 0),(0,i._)([(0,u.MZ)({type:_.jz,json:{write:!0}})],Re.prototype,"rasterId",void 0),Re=we=(0,i._)([(0,c.$)("esri.rest.support.ImageAngleParameters")],Re);const _e=Re;let be=class extends A.A{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],be.prototype,"north",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],be.prototype,"up",void 0),(0,i._)([(0,u.MZ)({type:ve.A,json:{write:!0}})],be.prototype,"spatialReference",void 0),be=(0,i._)([(0,c.$)("esri.rest.support.ImageAngleResult")],be);const Se=be;var Me=r(83047),xe=r(65864),Ae=r(66552);const Ie=new Ae.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Fe=class extends A.A{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,i._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Fe.prototype,"value",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Fe.prototype,"displayValue",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Fe.prototype,"uncertainty",void 0),Fe=(0,i._)([(0,c.$)("esri.rest.support.imageMeasureUtils.BaseImageMeasureResultValue")],Fe);let De=class extends Fe{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],De.prototype,"unit",void 0),De=(0,i._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultLengthValue")],De);let je=class extends Fe{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.MZ)({type:String,json:{read:Me.dk.read,write:Me.dk.write}})],je.prototype,"unit",void 0),je=(0,i._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAreaValue")],je);let Te=class extends Fe{constructor(){super(...arguments),this.unit=null}};(0,i._)([(0,u.MZ)({type:String,json:{read:Me.b$.read,write:Me.b$.write}})],Te.prototype,"unit",void 0),Te=(0,i._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAngleValue")],Te);let Pe=class extends A.A{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};(0,i._)([(0,u.MZ)()],Pe.prototype,"type",void 0),(0,i._)([(0,u.MZ)({type:Ie.apiValues,json:{read:Ie.read,write:Ie.write}})],Pe.prototype,"measureOperation",void 0),(0,i._)([(0,u.MZ)({type:B.A,json:{write:!0}})],Pe.prototype,"mosaicRule",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Pe.prototype,"pixelSize",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Pe.prototype,"raster",void 0),Pe=(0,i._)([(0,c.$)("esri.rest.support.BaseImageMeasureParameters")],Pe);const Ze=Pe;var Ne;let Ce=Ne=class extends Ze{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Ne((0,w.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.MZ)({types:y.yR,json:{name:"fromGeometry",read:!0,write:!0}})],Ce.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],Ce.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({type:Ie.apiValues,json:{write:Ie.write}})],Ce.prototype,"measureOperation",null),(0,i._)([(0,u.MZ)({json:{read:!0}})],Ce.prototype,"is3D",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],Ce.prototype,"linearUnit",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:Me.dk.read,write:Me.dk.write}})],Ce.prototype,"areaUnit",void 0),Ce=Ne=(0,i._)([(0,c.$)("esri.rest.support.ImageAreaParameters")],Ce);const Oe=Ce;let Ve=class extends A.A{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,i._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Ve.prototype,"name",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Ve.prototype,"sensorName",void 0),Ve=(0,i._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult")],Ve);const Je=Ve;let qe=class extends Je{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,i._)([(0,u.MZ)({type:je,json:{read:!0,write:!0}})],qe.prototype,"area",void 0),(0,i._)([(0,u.MZ)({type:De,json:{read:!0,write:!0}})],qe.prototype,"perimeter",void 0),qe=(0,i._)([(0,c.$)("esri.rest.support.ImageAreaResult")],qe);const Ee=qe;let Ge=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,i._)([(0,u.MZ)({type:ve.A,json:{name:"outSR",write:!0}})],Ge.prototype,"outSpatialReference",void 0),Ge=(0,i._)([(0,c.$)("esri.rest.support.ImageBoundaryParameters")],Ge);const $e=Ge;var ze=r(5443),Le=r(39829);let Ue=class extends A.A{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?Le.A.fromJSON(e):ze.A.fromJSON(e)}};(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],Ue.prototype,"area",void 0),(0,i._)([(0,u.MZ)({types:y.yR,json:{name:"shape",write:!0}})],Ue.prototype,"geometry",void 0),(0,i._)([(0,b.w)("geometry")],Ue.prototype,"readGeometry",null),Ue=(0,i._)([(0,c.$)("esri.rest.support.ImageBoundaryResult")],Ue);const Be=Ue;var He;let ke=He=class extends Ze{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new He((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],ke.prototype,"fromGeometry",void 0),(0,i._)([(0,m.K)("fromGeometry")],ke.prototype,"writeFromGeometry",null),(0,i._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],ke.prototype,"toGeometry",void 0),(0,i._)([(0,u.MZ)({type:Ie.apiValues,json:{write:Ie.write}})],ke.prototype,"measureOperation",null),(0,i._)([(0,u.MZ)({json:{read:!0}})],ke.prototype,"is3D",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],ke.prototype,"linearUnit",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:Me.b$.read,write:Me.b$.write}})],ke.prototype,"angularUnit",void 0),ke=He=(0,i._)([(0,c.$)("esri.rest.support.ImageDistanceParameters")],ke);const Qe=ke;let Ke=class extends Je{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,i._)([(0,u.MZ)({type:De,json:{read:!0,write:!0}})],Ke.prototype,"distance",void 0),(0,i._)([(0,u.MZ)({type:Te,json:{read:!0,write:!0}})],Ke.prototype,"azimuthAngle",void 0),(0,i._)([(0,u.MZ)({type:Te,json:{read:!0,write:!0}})],Ke.prototype,"elevationAngle",void 0),Ke=(0,i._)([(0,c.$)("esri.rest.support.ImageDistanceResult")],Ke);const We=Ke;var Xe=r(93223),Ye=r(58174),et=r(79677);let tt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=JSON.stringify(e.toJSON()))}};(0,i._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS,write:!0}})],tt.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],tt.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],tt.prototype,"objectIds",void 0),(0,i._)([(0,Xe.e)(Ye.x,{ignoreUnknown:!1,name:"spatialRel"})],tt.prototype,"spatialRelationship",void 0),(0,i._)([(0,u.MZ)({type:et.A,json:{name:"time",write:!0}})],tt.prototype,"timeExtent",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],tt.prototype,"where",void 0),tt=(0,i._)([(0,c.$)("esri.rest.support.ImageGPSInfoParameters")],tt);const rt=tt;let it=class extends(de(A.A)){constructor(){super(...arguments),this.id=null}};(0,i._)([(0,u.MZ)({json:{write:!0}})],it.prototype,"id",void 0),it=(0,i._)([(0,c.$)("esri.rest.support.CameraInfo")],it);const st=it;let nt=class extends A.A{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,i._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"id",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"name",void 0),(0,i._)([(0,u.MZ)({type:Date,json:{write:!0}})],nt.prototype,"acquisitionDate",void 0),(0,i._)([(0,m.K)("acquisitionDate")],nt.prototype,"writeAcquisitionDate",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"cameraID",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],nt.prototype,"center",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"gps",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"orientation",void 0),nt=(0,i._)([(0,c.$)("esri.rest.support.ImageGPSInfo")],nt);const ot=nt;let at=class extends A.A{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,i._)([(0,u.MZ)({type:[ot],json:{write:!0}})],at.prototype,"images",void 0),(0,i._)([(0,u.MZ)({type:[st],json:{write:!0}})],at.prototype,"cameras",void 0),at=(0,i._)([(0,c.$)("esri.rest.support.ImageGPSInfoResult")],at);const lt=at;var ut;let pt=ut=class extends Ze{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ut((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.MZ)({type:pe.A,json:{read:!0}})],pt.prototype,"fromGeometry",void 0),(0,i._)([(0,m.K)("fromGeometry")],pt.prototype,"writeFromGeometry",null),(0,i._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],pt.prototype,"toGeometry",void 0),(0,i._)([(0,u.MZ)({type:Ie.apiValues,json:{write:Ie.write}})],pt.prototype,"measureOperation",null),(0,i._)([(0,u.MZ)({json:{read:!0}})],pt.prototype,"operationType",void 0),(0,i._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],pt.prototype,"linearUnit",void 0),pt=ut=(0,i._)([(0,c.$)("esri.rest.support.ImageHeightParameters")],pt);const ct=pt;let mt=class extends Je{constructor(){super(...arguments),this.height=null}};(0,i._)([(0,u.MZ)({type:De,json:{read:!0,write:!0}})],mt.prototype,"height",void 0),mt=(0,i._)([(0,c.$)("esri.rest.support.ImageHeightResult")],mt);const dt=mt;var yt,ht=r(22048);let ft=yt=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=B.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=I.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,r){null!=e&&(t[r]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[r]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,r){null!=e&&(t[r]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,r){null!=e&&(t[r]=JSON.stringify(e))}writeTimeExtent(e,t,r){if(null!=e){const i=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[r]=null!=i?null!=s?`${i},${s}`:`${i}`:null}}clone(){return new yt((0,w.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,i._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],ft.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],ft.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({type:B.A,json:{write:!0}})],ft.prototype,"mosaicRule",null),(0,i._)([(0,m.K)("mosaicRule")],ft.prototype,"writeMosaicRule",null),(0,i._)([(0,u.MZ)({type:I.A,json:{write:!0,name:"renderingRule"}})],ft.prototype,"rasterFunction",null),(0,i._)([(0,m.K)("rasterFunction")],ft.prototype,"writeRasterFunction",null),(0,i._)([(0,u.MZ)({type:[I.A],json:{write:!0,name:"renderingRules"}})],ft.prototype,"rasterFunctions",void 0),(0,i._)([(0,m.K)("rasterFunctions")],ft.prototype,"writeRasterFunctions",null),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],ft.prototype,"pixelSize",void 0),(0,i._)([(0,m.K)("pixelSize")],ft.prototype,"writePixelSize",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnGeometry",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnCatalogItems",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"returnPixelValues",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],ft.prototype,"maxItemCount",void 0),(0,i._)([(0,u.MZ)({type:et.A,json:{write:{target:"time"}}})],ft.prototype,"timeExtent",void 0),(0,i._)([(0,m.K)("timeExtent")],ft.prototype,"writeTimeExtent",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],ft.prototype,"raster",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],ft.prototype,"viewId",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],ft.prototype,"processAsMultidimensional",void 0),ft=yt=(0,i._)([(0,c.$)("esri.rest.support.ImageIdentifyParameters")],ft);const gt=ft;var wt=r(22671);let vt=class extends A.A{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,i._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"catalogItemVisibilities",void 0),(0,i._)([(0,u.MZ)({type:wt.A,json:{write:!0}})],vt.prototype,"catalogItems",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],vt.prototype,"location",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"name",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"objectId",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"processedValues",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"properties",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"value",void 0),vt=(0,i._)([(0,c.$)("esri.rest.support.ImageIdentifyResult")],vt);const Rt=vt;var _t;let bt=_t=class extends A.A{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,r){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new _t({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,i._)([(0,u.MZ)({type:[pe.A],json:{write:!0}})],bt.prototype,"geometries",void 0),(0,i._)([(0,m.K)("geometries")],bt.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({type:_.jz,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=_t=(0,i._)([(0,c.$)("esri.rest.support.ImagePixelLocationParameters")],bt);const St=bt;let Mt=class extends A.A{constructor(){super(...arguments),this.geometries=null}};(0,i._)([(0,u.MZ)({json:{write:!0}})],Mt.prototype,"geometries",void 0),Mt=(0,i._)([(0,c.$)("esri.rest.support.ImagePixelLocationResult")],Mt);const xt=Mt;var At;let It=At=class extends Ze{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new At((0,w.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,i._)([(0,u.MZ)({types:y.yR,json:{name:"fromGeometry",read:xe.rS}})],It.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],It.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({type:Ie.apiValues,json:{read:Ie.read,write:Ie.write}})],It.prototype,"measureOperation",null),(0,i._)([(0,u.MZ)({json:{read:!0}})],It.prototype,"is3D",void 0),It=At=(0,i._)([(0,c.$)("esri.rest.support.ImagePointParameters")],It);const Ft=It;let Dt=class extends Je{constructor(){super(...arguments),this.point=null}};(0,i._)([(0,u.MZ)({type:pe.A,json:{name:"point.value",read:!0,write:!0}})],Dt.prototype,"point",void 0),Dt=(0,i._)([(0,c.$)("esri.rest.support.ImagePointResult")],Dt);const jt=Dt;var Tt,Pt=r(48526);let Zt=Tt=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=e.toJSON())}set locations(e){if(e?.length){const t=new Pt.A({spatialReference:e[0].spatialReference,points:e.map((({x:e,y:t})=>[e,t]))});this._set("locations",e),this.geometry=t}}clone(){return new Tt((0,w.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,i._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS}})],Zt.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],Zt.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({type:[pe.A]})],Zt.prototype,"locations",null),(0,i._)([(0,u.MZ)({type:String,json:{type:H.SZ.jsonValues,read:H.SZ.read,write:H.SZ.write}})],Zt.prototype,"interpolation",void 0),(0,i._)([(0,u.MZ)({type:B.A,json:{write:!0}})],Zt.prototype,"mosaicRule",void 0),(0,i._)([(0,u.MZ)({type:[String],json:{write:!0}})],Zt.prototype,"outFields",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Zt.prototype,"pixelSize",void 0),(0,i._)([(0,u.MZ)({type:String,json:{write:!0}})],Zt.prototype,"raster",void 0),(0,i._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnFirstValueOnly",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],Zt.prototype,"sampleDistance",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],Zt.prototype,"sampleCount",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],Zt.prototype,"sliceId",void 0),(0,i._)([(0,u.MZ)({type:et.A,json:{read:{source:"time"},write:{target:"time"}}})],Zt.prototype,"timeExtent",void 0),Zt=Tt=(0,i._)([(0,c.$)("esri.rest.support.ImageSampleParameters")],Zt);const Nt=Zt;let Ct=class extends A.A{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,i._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"attributes",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Ct.prototype,"location",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"locationId",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"rasterId",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"resolution",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"pixelValue",void 0),Ct=(0,i._)([(0,c.$)("esri.rest.support.ImageSample")],Ct);const Ot=Ct;let Vt=class extends A.A{constructor(){super(...arguments),this.samples=null}};(0,i._)([(0,u.MZ)({type:[Ot],json:{write:!0}})],Vt.prototype,"samples",void 0),Vt=(0,i._)([(0,c.$)("esri.rest.support.ImageSampleResult")],Vt);const Jt=Vt;let qt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,r){t.geometries=e?.length?{geometryType:(0,xe.$B)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,i._)([(0,u.MZ)({types:[y.yR]})],qt.prototype,"geometries",void 0),(0,i._)([(0,m.K)("geometries")],qt.prototype,"writeGeometries",null),(0,i._)([(0,u.MZ)({type:[_.jz],json:{write:!0}})],qt.prototype,"rasterIds",void 0),(0,i._)([(0,u.MZ)({type:ve.A,json:{name:"outSR",write:!0}})],qt.prototype,"outSpatialReference",void 0),qt=(0,i._)([(0,c.$)("esri.rest.support.ImageToMapMultirayParameters")],qt);const Et=qt;let Gt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}};(0,i._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS,write:!0}})],Gt.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],Gt.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],Gt.prototype,"rasterId",void 0),(0,i._)([(0,u.MZ)({type:ve.A,json:{name:"outSR",write:!0}})],Gt.prototype,"outSpatialReference",void 0),(0,i._)([(0,u.MZ)({json:{name:"options.DOff",write:!0}})],Gt.prototype,"depthOffset",void 0),(0,i._)([(0,u.MZ)({json:{name:"options.Adjust",write:!0}})],Gt.prototype,"adjust",void 0),Gt=(0,i._)([(0,c.$)("esri.rest.support.ImageToMapParameters")],Gt);const $t=Gt;let zt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.referenceUri=null,this.rasterId=null}};(0,i._)([(0,u.MZ)({type:String,json:{name:"uri",write:!0}})],zt.prototype,"referenceUri",void 0),(0,i._)([(0,u.MZ)({type:Number,json:{write:!0}})],zt.prototype,"rasterId",void 0),zt=(0,i._)([(0,c.$)("esri.rest.support.ImageUrlParameters")],zt);const Lt=zt;let Ut=class extends A.A{constructor(){super(...arguments),this.url=null}};(0,i._)([(0,u.MZ)({json:{name:"imageURL",write:!0}})],Ut.prototype,"url",void 0),Ut=(0,i._)([(0,c.$)("esri.rest.support.ImageUrlResult")],Ut);const Bt=Ut,Ht=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let kt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,r){e?.length&&(t.geometryType=(0,xe.$B)(e[0]),t.geometries=e.map((e=>e.toJSON())))}};(0,i._)([(0,u.MZ)({types:[y.yR]})],kt.prototype,"geometries",void 0),(0,i._)([(0,m.K)("geometries")],kt.prototype,"writeGeometries",null),(0,i._)([(0,u.MZ)({type:B.A,json:{write:!0}})],kt.prototype,"mosaicRule",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],kt.prototype,"pixelSize",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],kt.prototype,"constantZ",void 0),(0,i._)([(0,u.MZ)({type:Ht.apiValues,json:{read:Ht.read,write:Ht.write}})],kt.prototype,"baseType",void 0),kt=(0,i._)([(0,c.$)("esri.rest.support.ImageVolumeParameters")],kt);const Qt=kt;let Kt=class extends A.A{constructor(){super(...arguments),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,i._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"area",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"cut",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"fill",void 0),(0,i._)([(0,u.MZ)({json:{name:"maxz",write:!0}})],Kt.prototype,"maxZ",void 0),(0,i._)([(0,u.MZ)({json:{name:"minz",write:!0}})],Kt.prototype,"minZ",void 0),(0,i._)([(0,u.MZ)({json:{name:"meanz",write:!0}})],Kt.prototype,"meanZ",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"cutCellCount",void 0),(0,i._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"fillCellCount",void 0),Kt=(0,i._)([(0,c.$)("esri.rest.support.ImageVolume")],Kt);const Wt=Kt;let Xt=class extends A.A{constructor(){super(...arguments),this.volumes=null}};(0,i._)([(0,u.MZ)({type:[Wt],json:{write:!0}})],Xt.prototype,"volumes",void 0),Xt=(0,i._)([(0,c.$)("esri.rest.support.ImageVolumeResult")],Xt);const Yt=Xt;let er=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]=JSON.stringify(e))}};(0,i._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS,write:!0}})],er.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],er.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],er.prototype,"rasterId",void 0),(0,i._)([(0,u.MZ)({json:{name:"options.VisibleOnly",write:!0}})],er.prototype,"visibleOnly",void 0),er=(0,i._)([(0,c.$)("esri.rest.support.MapToImageParameters")],er);const tr=er;let rr=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),pe.A.fromJSON(e)}};(0,i._)([(0,u.MZ)({types:y.yR,json:{name:"Shape",read:xe.rS,write:!0}})],rr.prototype,"geometry",void 0),(0,i._)([(0,u.MZ)({json:{name:"Length",write:!0}})],rr.prototype,"length",void 0),(0,i._)([(0,u.MZ)({json:{name:"Area",write:!0}})],rr.prototype,"area",void 0),(0,i._)([(0,u.MZ)({type:pe.A,json:{name:"Center",write:!0}})],rr.prototype,"center",void 0),(0,i._)([(0,b.w)("center")],rr.prototype,"readCenter",null),rr=(0,i._)([(0,c.$)("esri.rest.support.MeasureAreaFromImageResult")],rr);const ir=rr;var sr;let nr=sr=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,r){null!=e&&(t.geometryType=(0,xe.$B)(e),t[r]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,w.o8)({geometry:this.geometry,rasterId:this.rasterId});return new sr(e)}};(0,i._)([(0,u.MZ)({types:y.yR,json:{name:"fromGeometry",read:xe.rS,write:!0}})],nr.prototype,"geometry",void 0),(0,i._)([(0,m.K)("geometry")],nr.prototype,"writeGeometry",null),(0,i._)([(0,u.MZ)({json:{write:!0}})],nr.prototype,"rasterId",void 0),nr=sr=(0,i._)([(0,c.$)("esri.rest.support.MeasureFromImageParameters")],nr);const or=nr;let ar=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,i._)([(0,u.MZ)({types:y.yR,json:{name:"Shape",read:xe.rS,write:!0}})],ar.prototype,"geometry",void 0),(0,i._)([(0,u.MZ)({json:{name:"Length",write:!0}})],ar.prototype,"length",void 0),ar=(0,i._)([(0,c.$)("esri.rest.support.MeasureLengthFromImageResult")],ar);const lr=ar;function ur(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const r=[];null!=t.start&&r.push(t.start),null==t.end||r.includes(t.end)||r.push(t.end),e.time=r.join(",")}}async function pr(e,t,r){t=(0,_.PZ)(ht.A,t);const i=(0,ue.Dl)(e),s=t.geometry?[t.geometry]:[],n=await(0,le.el)(s),o=t.toJSON();ur(o);const a=n?.[0];null!=a&&(o.geometry=yr(a));const l=(0,ue.lF)({...i.query,f:"json",...o});return(0,ue.jV)(l,r)}async function cr(e,t,r){t=(0,_.PZ)(gt,t);const i=(0,ue.Dl)(e),s=t.geometry?[t.geometry]:[];return(0,le.el)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(yr(n)));const o=(0,ue.lF)({...i.query,f:"json",...s}),a=(0,ue.jV)(o,r);return(0,g.A)(i.path+"/identify",a)})).then((e=>Rt.fromJSON(e.data)))}async function mr(e,t,r,i){const s=(0,ue.Dl)(e),n=await(0,le.el)(r),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(yr(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(yr(n[1])));const a=(0,ue.lF)({...s.query,f:"json",...o}),l=(0,ue.jV)(a,i),{data:u}=await(0,g.A)(s.path+"/measure",l);return u}async function dr(e,t,r){t=(0,_.PZ)(or,t);const i=(0,ue.Dl)(e),s=t.toJSON(),n=(0,ue.lF)({...i.query,f:"json",...s}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(i.path+"/measureFromImage",o);return a}function yr(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=hr(e.spatialReference)),t}function hr(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:r}=t;return null!=e?r?{icsid:e,icsns:r}:{icsid:e}:{ics:t}}return e.toJSON()}function fr(e,t){if(!e.imageCoordinateSystem)return(0,S.YX)(e);const r=hr(e),{icsid:i,icsns:s}=r;return null==i||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(r):`0:${i}`}var gr=r(82371),wr=r(20223),vr=r(20615),Rr=r(78286),_r=r(99199),br=r(61956),Sr=r(4095);const Mr=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),xr=(0,_.Qp)(_.GB,{min:0,max:255}),Ar=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new k({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,r){null!=e&&"lerc"!==this.format&&(t[r]=e)}writeCompressionTolerance(e,t,r){"lerc"===this.format&&null!=e&&(t[r]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?B.A.fromJSON(t):null}get fieldsIndex(){return this.fields?new K.A(this.fields):null}set format(e){e&&Mr.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=B.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const r=e||t.mosaicRule;return r?B.A.fromJSON(r):this._isMosaicRuleSupported(t)?B.A.fromJSON(t):null}writeMosaicRule(e,t,r){let i=this.mosaicRule;const s=this.definitionExpression;i?s&&s!==i.where&&(i=i.clone(),i.where=s):s&&(i=new B.A({where:s})),this._isValidCustomizedMosaicRule(i)&&(t[r]=i.toJSON())}writeNoData(e,t,r){null!=e&&"number"==typeof e&&(t[r]=xr(e))}readObjectIdField(e,t){if(!e){const r=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=r?.name}return e}get parsedUrl(){return(0,R.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const r=t?.find((({name:t})=>t===e));return r?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,r){const i=t?.layerDefinition?.drawingInfo?.renderer,s=(0,f.LF)(i,r);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!i.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),O(s)||p.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,r){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map((e=>e.clone()))??[];e.push((0,ee.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,ee.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((({name:e})=>"none"===e.toLowerCase()))&&e.push((0,ee.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((({name:e})=>"none"!==e.toLowerCase())).forEach((({name:t})=>e.push((0,ee.nq)(t))));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const r=t?.multidimensionalInfo?.variables[0].unit?.trim(),i=(0,ee.DV)(r),s=(0,ee.y6)();e.push(i,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const r=(0,ee.AL)(t.multidimensionalInfo);e.push(...r)}const r=t?.attributeTable;if(null!=r){const t=(0,ee.jC)(r);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=I.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const r=t.rasterFunctionInfos;return t.renderingRule||r?.length&&"None"!==r[0].name?this._isRFTJson(t.renderingRule)?I.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):I.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const r=e||t.extent.spatialReference;return r?ve.A.fromJSON(r):null}readPixelType(e){return H.e8.fromJSON(e)||e}writePixelType(e,t,r){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[r]=H.e8.toJSON(e))}readVersion(e,t){let r=t.currentVersion;return r||(r=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),r}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let r=e;const{renderer:i,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&i&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(i.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=i.toJSON());const l=await a.symbolize({bandIds:o,...e},t);r={extent:e.extent,pixelBlock:l}}else r={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return r}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new o.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,w.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,r){const i=(t=(0,_.PZ)(Qt,t)).toJSON();i.geometries=JSON.stringify(i.geometries);const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...i}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(`${s.path}/calculateVolume`,o);return Yt.fromJSON({volumes:a?.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)(_e,t)).toJSON();null!=i.angleName&&(i.angleName=i.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(i.point.spatialReference=hr(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(i.spatialReference=fr(t.spatialReference));const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...i}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ve.A({wkid:0,imageCoordinateSystem:a.spatialReference}):ve.A.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new Se(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)(St,t)).toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(i.geometries.geometries[e].spatialReference=hr(s[e].spatialReference));const n=(0,ue.Dl)(e),o=(0,ue.lF)({...n.query,f:"json",...i}),a=(0,ue.jV)(o,r),{data:l}=await(0,g.A)(`${n.path}/computePixelLocation`,a);return xt.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await pr(e,t,r),s=(0,ue.Dl)(e),{data:n}=await(0,g.A)(`${s.path}/computeHistograms`,i);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,r){const i=await pr(e,t,r),s=(0,ue.Dl)(e),{data:n}=await(0,g.A)(`${s.path}/computeStatisticsHistograms`,i),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const r=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?r.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?r.mensuration.supportsHeightFromBaseAndTopShadow:r.mensuration.supportsHeightFromTopAndTopShadow))throw new o.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){t=(0,_.PZ)(ct,t);const i=await mr(e,t,[t.fromGeometry,t.toGeometry],r);return dt.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsAreaAndPerimeter||e.is3D&&!r.mensuration.supports3D)throw new o.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){t=(0,_.PZ)(Oe,t);const i=await mr(e,t,[t.geometry],r);return Ee.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsDistanceAndAngle||e.is3D&&!r.mensuration.supports3D)throw new o.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){t=(0,_.PZ)(Qe,t);const i=await mr(e,t,[t.fromGeometry,t.toGeometry],r);return We.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r.mensuration.supportsPointOrCentroid||e.is3D&&!r.mensuration.supports3D)throw new o.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,r){t=(0,_.PZ)(Ft,t);const i=await mr(e,t,[t.geometry],r);return jt.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new o.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,r){const i=await dr(e,t,r);return lr.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new o.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,r){const i=await dr(e,t,r);return ir.fromJSON(i)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const r=this.getField(e);return r?r.domain:null}async fetchImage(e,t,i,s={}){if(null==e||null==t||null==i)throw new o.A("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,i,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=i,s.returnImageBitmap?{imageBitmap:await(0,W.m)(e,`${r(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*i,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(Y.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new Y.A({width:t,height:i,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,l=a&&!!s.returnImageBitmap,u={imageServiceParameters:n,imageProps:{extent:e,width:t,height:i,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:s.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,g.A)(r(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,g.A)(r(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>wt.A.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const i={...t,query:this._getQueryParams()};return async function(e,t,r){const i=(0,ue.Dl)(e),s=(0,ue.lF)({...i?.query,f:"json"}),n=(0,ue.jV)(s,r),o=`${i?.path}/${t}/info`,a=(0,g.A)(`${o}`,n),l=(0,g.A)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const d=ze.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),h=Math.ceil(d.height/p.pixelSizeY-.1),f=d.spatialReference,w=new pe.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:f}),v=p.histograms?.length?p.histograms:null,R=new wr.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.A({width:y,height:h,bandCount:p.bandCount,extent:d,spatialReference:f,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:v,keyProperties:c,storageInfo:R})}(r(this.parsedUrl),e,i)}async getCatalogItemICSInfo(e,t){const{data:i}=await(0,g.A)(r(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=i?.ics;if(!s)return;let n=null;try{n=(await(0,g.A)(r(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,g.A)(r(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,S.YX)(a),outSR:"0:"+e},u=(0,g.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,S.YX)(a),outSR:"0:"+e},h=(0,g.A)(r(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then((e=>e.data)).catch((()=>({}))),f=await Promise.all([o,u,h]);let w=f[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=ze.A.fromJSON(f[1]?.geometries?.[0]);v&&(v.spatialReference=new ve.A({wkid:0,imageCoordinateSystem:s}));const R=f[2].geometries?f[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=R.length;if(_<3)return{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:null};let b=0,M=0,x=0,A=0;for(let e=0;e<_;e++)b+=R[e].x,M+=R[e].y,x+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const I=(_*A-b*M)/(_*x-b*b);let F=0;const D=R[4].x>R[0].x,j=R[4].y>R[0].y;return I===1/0?F=j?90:270:0===I?F=D?0:180:I>0?F=D?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=j?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:F}}async generateRasterInfo(e,t){e=(0,_.PZ)(I.A,e);const i={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??(0,gr.Tw)(r(this.parsedUrl),this.sourceJSON,i);const s=function(e){const t=JSON.stringify(e),r=t.includes('"rasterFunctionDefinition":{'),i=r?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=i?.map((e=>r?e.slice(8,-18):e.slice(18,-1)));return s?s.join("/"):null}(e);if(!s)throw new o.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];const n=(0,gr.X6)(r(this.parsedUrl),e,i);this._functionRasterInfos[s]=n;try{return await n}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,i,s){const n=fr((e=e.clone().shiftCentralMeridian()).spatialReference,r(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=this.renderer?.type,m=!c||"raster-stretch"===c||"raster-colormap"===c||"unique-value"===c||"class-breaks"===c||"raster-shaded-relief"===c;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&m){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");Array.isArray(l)&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(I.A.fromJSON(u));const y={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?y.time=""+e:null==e&&null==t||(y.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+i,...o,...y}}async getSamples(e,t){const r=await this._fetchCapabilities(t?.signal);if(!r?.operations.supportsGetSamples)throw new o.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,w.o8)(e);const{raster:i}=this;return i&&null==e.raster&&(e.raster=i),async function(e,t,r){const i=(t=(0,_.PZ)(Nt,t)).toJSON();ur(i),i.outFields?.length&&(i.outFields=i.outFields.join(","));const s=await(0,le.el)(t.geometry),n=s?.[0];null!=n&&(i.geometry=yr(n));const o=(0,ue.Dl)(e),a=(0,ue.lF)({...o.query,f:"json",...i}),l=(0,ue.jV)(a,r),{data:u}=await(0,g.A)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Jt.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,w.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=Le.A.fromExtent(e.geometry));const r=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(r.isOutSide)throw new o.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=r.timeExtent,e.mosaicRule=r.mosaicRule;const{raster:i,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),i&&null==e.raster&&(e.raster=i),cr(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new o.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)($t,t)).toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(i.geometry=yr(t.geometry)),t.depthOffset&&t.adjust||delete i.options;const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...i}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(`${s.path}/imageToMap`,o);return(0,xe.rS)(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new o.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)(Et,t)).toJSON();t.rasterIds?.length&&(i.rasterIds=t.rasterIds.join(","));const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...i}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(`${s.path}/imageToMapMultiray`,o);return(0,xe.rS)(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new o.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)(tr,t)).toJSON(),s=await(0,le.el)(t.geometry),n=s?.[0];null!=n&&(i.geometry=yr(n)),t.visibleOnly||delete i.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(i.inSR=fr(o));const a=(0,ue.Dl)(e),l=(0,ue.lF)({...a.query,f:"json",...i}),u=(0,ue.jV)(l,r),{data:p}=await(0,g.A)(`${a.path}/mapToImage`,u);return(0,xe.rS)(p)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new o.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)(me,t)).toJSON(),s=await(0,le.el)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(i.fromGeometry=yr(s[0]),s[0].spatialReference&&(i.inSR=fr(s[0].spatialReference))),null!=s[1]&&(i.toGeometry=yr(s[1])),t.objectIds?.length&&(i.objectIds=i.objectIds.join(","));const n=(0,ue.Dl)(e),o=(0,ue.lF)({...n.query,f:"json",...i}),a=(0,ue.jV)(o,r),{data:l}=await(0,g.A)(`${n.path}/find`,a);return ge.fromJSON(l)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new o.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,r){const i=(t=(0,_.PZ)(Lt,t)).toJSON(),s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...i}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(`${s.path}/getImageUrl`,o);return Bt.fromJSON(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new br.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new o.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,r){t=(0,_.PZ)($e,t);const i=(0,ue.Dl)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=fr(t.outSpatialReference));const n=(0,ue.lF)({...i.query,f:"json",...s}),o=(0,ue.jV)(n,r),{data:a}=await(0,g.A)(i.path+"/queryBoundary",o);return Be.fromJSON(a)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,_r.s)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Rr.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new o.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,r){const i=(t=(0,_.PZ)(rt,t)).toJSON();ur(i),i.objectIds?.length&&(i.objectIds=i.objectIds.join(",")),i.geometry||i.objectIds||i.time||i.where||(i.where="1=1");const s=await(0,le.el)(t.geometry),n=s?.[0];null!=n&&(i.geometry=yr(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(i.inSR=fr(o));const a=(0,ue.Dl)(e),l=(0,ue.lF)({...a.query,f:"json",...i}),u=(0,ue.jV)(l,r),{data:p}=await(0,g.A)(`${a.path}/queryGPSInfo`,u);return lt.fromJSON(p)}(r(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,vr.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:r,returnDomainValues:i,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p=ee.F_.servicePixelValue.toLowerCase(),c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().startsWith(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().startsWith(p)&&e.length>p.length)).map((e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new I.A({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:r}=this;0===l.length?r?.functionName?(l.push(r),u.push(r.functionName)):l=null:r?.functionName&&!l.some((e=>e.functionName===r.functionName))&&(l.push(r),u.push(r.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let y=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:r}=(0,ie.Rp)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=r?.timeExtent&&(y=r.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,y);let f=e.geometry;this.version<10.91&&"extent"===f?.type&&(f=Le.A.fromExtent(f));const g=this._getQueryParams({geometry:f,timeExtent:y,mosaicRule:h,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:r,returnCatalogItems:a,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete g.f;const w=new gt(g);try{await this._generateRasterInfo(this.rasterFunction);const r=await cr(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=r.value&&r.value.toLowerCase().includes("nodata");if(!a||m||!r?.catalogItems?.features.length||!n&&o)return this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",p=r.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),d=new br.A({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),y=await this.queryRasters(d);return y?.features?.length&&y.features.forEach((t=>{p.forEach((r=>{r.attributes[l]===t.attributes[l]&&t.geometry&&(r.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(r.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(r,{returnDomainValues:i,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const i=(0,g.A)(r(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,g.A)(r(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([i,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const r=this._rasterJobHandler.instance;return r?r.createFlowMesh(e,t):(0,Sr.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,ie.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,i=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,gr.Tw)(r(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,gr.E9)(e,t),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([i,s,n]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),p.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.wB)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const r=this.timeInfo,{multidimensionalInfo:i}=this.serviceRasterInfo;if(null==e||null==i||null==t||null==r?.startField)return e;const{startField:s}=r,n=i.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==n)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=n,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new x.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o.A("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,_.PZ)(br.A,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new re.A;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:r}=this;return"unique-value"===e.type&&this._hasRasterFunction(r)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:i,ssl:s}=await(0,g.A)(r(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=i,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),r=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||r}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:r}=e,i="resample"===t?.toLowerCase(),s=r?.ResampleType||r?.resampleType;return i&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:r}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,i=(0,oe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&r.bandCount>=3){const e=i?.bandIds??(0,oe.ci)(r);!e||3===r.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=i?.renderer??(0,oe.PD)(r,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,oe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=r):this.symbolizer=new ae.A({rendererJSON:s,rasterInfo:r}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:r}=this;return{raster:t,viewId:r,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,r){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,se.D)(e,t,r)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const i=await(0,g.A)(r(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return i.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:i,returnImageBitmap:s,signal:n}=e;if(i&&this._canRequestImageElement(t.format)){const i=`${r(this.parsedUrl)}/exportImage`,{data:o}=await(0,g.A)(i,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,W.m)(o,i,n),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,g.A)(r(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,se.g)(u)),!c)throw new o.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,se.D)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,ie.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new B.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const r=e.value,{templateRRFunctionNames:i,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof r&&r.toLowerCase().includes("nodata"),m=[];if(r&&!l&&!c){const e={};e[p]=0,u=[r],l=[new h.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,ee.eS)(this.rasterFields,e,this.mosaicRule?.multidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=ee.F_,f=this.rasterFields.some((e=>e.name===d));for(let e=0;e<l.length;e++){const t=l[e];if(null!=r){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&i&&i.length>0&&i.includes(this.rasterFunction.functionName)?a[i.indexOf(this.rasterFunction.functionName)]:r;if("nodata"===n.toLowerCase()&&!s)continue;f&&(t.attributes[d]=n),t.attributes[y]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:r:o;this.rasterFunction||(p=l?n:r),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,n&&this._updateFeatureWithDomainValues(t),i&&a&&i.length===a.length)for(let e=0;e<i.length;e++){const r=`${ee.F_.servicePixelValue}.${i[e]}`;t.attributes[r]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,r){const{multidimensionalSubset:i}=this;if(!i)return{isOutSide:!1,timeExtent:t,mosaicRule:r=this._combineMosaicRuleWithTimeExtent(r,t)};if(i){const{isOutside:r,intersection:s}=(0,ie.Rp)(i,{geometry:e,timeExtent:t});if(r)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(r=this._combineMosaicRuleWithTimeExtent(r,t),r?.multidimensionalDefinition){const{isOutside:e}=(0,ie.Rp)(i,{multidimensionalDefinition:r.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:r}}_updateFeatureWithRasterAttributeTableValues(e,t){const r=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==r)return;const{features:i,fields:s}=r,n=s.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!n)return;const o=i.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const r=ee.ER+t.name;e.attributes[r]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const r=t.split(/,\s*/).map((e=>parseFloat(e))),i=r.map((e=>[e])),s=r.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new Y.A({height:1,width:1,pixelType:"f32",pixels:i,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new ze.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ne.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[ee.F_.magnitude]=o[0],e.attributes[ee.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const r=e.attributes[t.name];if(null!=r){const i=t.domain.codedValues.find((e=>e.code===r));i&&(e.attributes[t.name]=i.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const r=this.fieldsIndex;null!=r&&e.forEach((e=>{if(e?.attributes)for(const i of t){const t=r.get(i)?.name;t&&t!==i&&(e.attributes[i]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const r=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(r)?t.get(r):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:r,rasterFunction:i}=this;i&&null==e.rasterFunction&&(e.rasterFunction=i),r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_applyMosaicRule(e){const{raster:t,mosaicRule:r}=this;r&&null==e.mosaicRule&&(e.mosaicRule=r),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:r,advancedQueryCapabilities:i,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),d=t.includes("download"),y=r>=10.7&&o||r>=11.4&&(o||u&&p.includes("3d"));return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:r>=11.2&&m,supportsImageToMapMultiray:r>=11.2&&m,supportsMapToImage:r>=11.2&&m,supportsFindImages:r>=11.2&&m,supportsGetImageUrl:r>=11.3&&d,supportsMeasure:u,supportsMeasureFromImage:r>=11.2,supportsDownload:d,supportsQuery:m&&e.fields&&e.fields.length>0,supportsGetSamples:r>=10.2&&n,supportsProject:r>=10.3&&n,supportsComputeStatisticsHistograms:r>=10.4&&n,supportsQueryBoundary:r>=10.6&&n,supportsCalculateVolume:y,supportsComputePixelLocation:r>=10.7&&m,supportsComputeAngles:r>=10.91,supportsQueryGPSInfo:r>=11.2&&m,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!i?.supportsStatistics,supportsOrderBy:!!i?.supportsOrderBy,supportsDistinct:!!i?.supportsDistinct,supportsPagination:!!i?.supportsPagination,supportsStandardizedQueriesOnly:!!i?.useStandardizedQueries,supportsPercentileStatistics:!!i?.supportsPercentileStatistics,supportsCentroid:!!i?.supportsReturningGeometryCentroid,supportsCurrentUser:!1,supportsDistance:!!i?.supportsQueryWithDistance,supportsExtent:!!i?.supportsReturningQueryExtent,supportsGeometryProperties:!!i?.supportsReturningGeometryProperties,supportsHavingClause:!!i?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!i?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function r(e){return e?.path??""}return(0,i._)([(0,u.MZ)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,i._)([(0,u.MZ)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,i._)([(0,u.MZ)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,i._)([(0,b.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,i._)([(0,u.MZ)()],t.prototype,"adjustAspectRatio",void 0),(0,i._)([(0,u.MZ)({type:[_.jz],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,i._)([(0,b.w)("bandIds")],t.prototype,"readBandIds",null),(0,i._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,i._)([(0,b.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,i._)([(0,u.MZ)({type:Number})],t.prototype,"compressionQuality",void 0),(0,i._)([(0,m.K)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,i._)([(0,u.MZ)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,i._)([(0,m.K)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,i._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,i._)([(0,b.w)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,i._)([(0,u.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,i._)([(0,u.MZ)()],t.prototype,"rasterInfo",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,type:[Q.A]})],t.prototype,"fields",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,i._)([(0,u.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],t.prototype,"format",null),(0,i._)([(0,b.w)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,i._)([(0,u.MZ)({type:ze.A})],t.prototype,"fullExtent",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,i._)([(0,u.MZ)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,i._)([(0,u.MZ)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,i._)([(0,u.MZ)({type:String,json:{type:H.SZ.jsonValues,read:H.SZ.read,write:H.SZ.write}})],t.prototype,"interpolation",void 0),(0,i._)([(0,u.MZ)()],t.prototype,"minScale",void 0),(0,i._)([(0,b.w)("service","minScale")],t.prototype,"readMinScale",null),(0,i._)([(0,u.MZ)()],t.prototype,"maxScale",void 0),(0,i._)([(0,b.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,i._)([(0,u.MZ)({type:B.A})],t.prototype,"mosaicRule",null),(0,i._)([(0,b.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,i._)([(0,m.K)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,i._)([(0,u.MZ)()],t.prototype,"multidimensionalInfo",void 0),(0,i._)([(0,u.MZ)({type:X.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,i._)([(0,u.MZ)({json:{type:_.jz}})],t.prototype,"noData",void 0),(0,i._)([(0,m.K)("noData")],t.prototype,"writeNoData",null),(0,i._)([(0,u.MZ)({type:String,json:{type:H.hm.jsonValues,read:H.hm.read,write:H.hm.write}})],t.prototype,"noDataInterpretation",void 0),(0,i._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,i._)([(0,b.w)("objectIdField")],t.prototype,"readObjectIdField",null),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,i._)([(0,u.MZ)({})],t.prototype,"typeIdField",void 0),(0,i._)([(0,u.MZ)({})],t.prototype,"types",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,i._)([(0,u.MZ)({type:Function})],t.prototype,"pixelFilter",void 0),(0,i._)([(0,u.MZ)()],t.prototype,"raster",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,i._)([(0,b.w)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,i._)([(0,u.MZ)()],t.prototype,"viewId",void 0),(0,i._)([(0,u.MZ)()],t.prototype,"renderer",null),(0,i._)([(0,u.MZ)({types:f.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:f.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,i._)([(0,b.w)("internalRenderer")],t.prototype,"readRenderer",null),(0,i._)([(0,m.K)("internalRenderer")],t.prototype,"writeRenderer",null),(0,i._)([(0,u.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,i._)([(0,u.MZ)(M.ke)],t.prototype,"opacity",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"rasterFields",null),(0,i._)([(0,u.MZ)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,i._)([(0,u.MZ)({type:I.A,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,i._)([(0,b.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,i._)([(0,u.MZ)({readOnly:!0,type:ve.A})],t.prototype,"spatialReference",void 0),(0,i._)([(0,b.w)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,i._)([(0,u.MZ)({json:{type:H.e8.jsonValues}})],t.prototype,"pixelType",void 0),(0,i._)([(0,b.w)("pixelType")],t.prototype,"readPixelType",null),(0,i._)([(0,m.K)("pixelType")],t.prototype,"writePixelType",null),(0,i._)([(0,u.MZ)({constructOnly:!0,type:te.A})],t.prototype,"serviceRasterInfo",void 0),(0,i._)([(0,u.MZ)()],t.prototype,"sourceJSON",void 0),(0,i._)([(0,u.MZ)(M.OZ)],t.prototype,"url",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,i._)([(0,b.w)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,i._)([(0,c.$)("esri.layers.mixins.ArcGISImageService")],t),t};var Ir=r(18768),Fr=r(63074),Dr=r(69208),jr=r(16131),Tr=r(8303),Pr=r(56551),Zr=r(54310),Nr=r(25036),Cr=r(82935),Or=r(91908),Vr=r(30291),Jr=r(92935);let qr=class extends((0,Fr.dM)((0,Cr.e)((0,Nr.j)((0,jr.q)((0,Tr.A)((0,Pr.H)(Ar((0,Zr.J)((0,Dr.d)((0,Ir.b)((0,a.P)(n.A.ClonableMixin(d.A))))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.sg)((async(e,t,i)=>{const{save:s,saveAs:n}=await r.e(9838).then(r.bind(r,59838));switch(e){case Jr.X.SAVE:return s(this,t);case Jr.X.SAVE_AS:return n(this,i,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(l.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,r){const i="vector-field"===this.renderer?.type;t[r]=i?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,r=new Set,i=ee.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=ee.Oo.toLowerCase(),o=`${ee.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===i||t.startsWith(o)||s&&t.startsWith(n)||r.add(e.name)}const a=(0,Vr.tn)({fields:t,title:this.title},{...e,visibleFieldNames:r});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&t&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(Jr.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Jr.X.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Or.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,i._)([(0,u.MZ)(M.fV)],qr.prototype,"legendEnabled",null),(0,i._)([(0,u.MZ)({type:["show","hide"]})],qr.prototype,"listMode",null),(0,i._)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qr.prototype,"isReference",void 0),(0,i._)([(0,u.MZ)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],qr.prototype,"operationalLayerType",void 0),(0,i._)([(0,m.K)("web-map","operationalLayerType")],qr.prototype,"writeOperationalLayerType",null),(0,i._)([(0,u.MZ)(M.M6)],qr.prototype,"popupEnabled",void 0),(0,i._)([(0,u.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],qr.prototype,"popupTemplate",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],qr.prototype,"defaultPopupTemplate",null),(0,i._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],qr.prototype,"type",void 0),(0,i._)([(0,u.MZ)({readOnly:!0})],qr.prototype,"_isPreviewLayer",null),qr=(0,i._)([(0,c.$)("esri.layers.ImageryLayer")],qr);const Er=qr},18768:(e,t,r)=>{r.d(t,{b:()=>l});var i=r(90237),s=r(53966),n=r(10107),o=(r(44208),r(87811),r(40608)),a=r(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.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,a.Jf)(e,s.A.getLogger(this)))}};return(0,i._)([(0,n.MZ)()],t.prototype,"title",null),(0,i._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,i._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},56551:(e,t,r)=>{r.d(t,{H:()=>d});var i=r(90237),s=r(10107),n=(r(44208),r(53966),r(87811),r(40608)),o=r(68729),a=r(69540),l=r(25482),u=r(56507),p=r(93223);let c=class extends(a.A.ClonableMixin(l.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,i._)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"name",void 0),(0,i._)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,p.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],c.prototype,"method",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"value",void 0),(0,i._)([(0,s.MZ)({type:[u.jz],json:{write:{isRequired:!0}}})],c.prototype,"bandIds",void 0),(0,i._)([(0,s.MZ)({types:o.uy,json:{write:!0,origins:{"web-scene":{types:o.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],c.prototype,"renderer",void 0),c=(0,i._)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],c);const m=c,d=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,i._)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,i._)([(0,s.MZ)({type:[m],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,i._)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},33446:(e,t,r)=>{r.d(t,{C:()=>o,m:()=>n});var i=r(49186),s=r(74887);async function n(e,t,r){let n;try{n=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(r),n}async function o(e,t,r,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new i.A("request:server",`Unable to load tile ${t}/${r}/${n}`,{error:e,level:t,row:r,col:n})}return(0,s.Te)(o),a}},91908:(e,t,r)=>{r.d(t,{D:()=>n});var i=r(60694);const s=[];function n(e,t){if((0,i.Wo)(e.url??""))return!0;const{wkid:r}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(r))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},82371:(e,t,r)=>{r.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var i=r(78888),s=r(5443),n=r(86738),o=r(16930),a=r(87186),l=r(20223),u=r(2272),p=r(22671);async function c(e,t,r){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,h=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),f=(0,u.jV)(h,r);e=c.path;const g=d||await(0,i.A)(e,f).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,i.A)(`${e}/rasterAttributeTable`,f):null,v=g.hasColormap?(0,i.A)(`${e}/colormap`,f):null,R=g.hasHistograms?(0,i.A)(`${e}/histograms`,f):null,_=g.currentVersion>=10.3?(0,i.A)(`${e}/keyProperties`,f):null,b=g.hasMultidimensions?(0,i.A)(`${e}/multidimensionalInfo`,f):null,S=await Promise.allSettled([w,v,R,_,b]);let M=null;if(g.minValues&&g.minValues.length===g.bandCount){M=[];for(let e=0;e<g.minValues.length;e++)M.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const x=s.A.fromJSON(g.extent),A=Math.ceil(x.width/g.pixelSizeX-.1),I=Math.ceil(x.height/g.pixelSizeY-.1),F=o.A.fromJSON(g.spatialReference||g.extent.spatialReference),D="fulfilled"===S[0].status?S[0].value?.data:null,j=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===S[1].status?S[1].value?.data.colormap:null,P=T?.length?T:null,Z="fulfilled"===S[2].status?S[2].value?.data.histograms:null,N=Z?.[0]?.counts?.length?Z:null,C="fulfilled"===S[3].status?S[3].value?.data??{}:{},O="fulfilled"===S[4].status?S[4].value?.data.multidimensionalInfo:null,V=O?.variables?.length?O:null;V&&V.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))}));const{defaultVariable:J,serviceDataType:q}=g;J&&J!==C.DefaultVariable&&(C.DefaultVariable=J),q?.includes("esriImageServiceDataTypeVector")&&!q.includes(C.DataType)&&(C.DataType=q.replace("esriImageServiceDataType",""));let E=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==E))&&(E=g.noDataValues);const G=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:F}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(A,I))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new a.A({width:A,height:I,bandCount:g.bandCount,extent:s.A.fromJSON(g.extent),spatialReference:F,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:F}),pixelType:g.pixelType.toLowerCase(),statistics:M,attributeTable:j,colormap:P,histograms:N,keyProperties:C,noDataValue:E,multidimensionalInfo:V,storageInfo:G})}function m(e,t,r){return c(e,{sourceJSON:t},r)}function d(e,t,r){return c(e,{rasterFunction:t},r)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},20615:(e,t,r)=>{r.d(t,{I:()=>o});var i=r(2272),s=r(80893),n=r(61956);async function o(e,t,r){const o=(0,i.Dl)(e),{data:a}=await(0,s.gW)(o,n.A.from(t),r);return a.count}},78286:(e,t,r)=>{r.d(t,{V:()=>o});var i=r(2272),s=r(80893),n=r(61956);async function o(e,t,r){const o=(0,i.Dl)(e),{data:a}=await(0,s.Pk)(o,n.A.from(t),r);return a.objectIds}},99199:(e,t,r)=>{r.d(t,{e:()=>l,s:()=>a});var i=r(2272),s=r(80893),n=r(22671),o=r(61956);async function a(e,t,r){const i=await l(e,t,r);return n.A.fromJSON(i)}async function l(e,t,r){const n=(0,i.Dl)(e),a={...r},l=o.A.from(t),{data:u}=await(0,s.eW)(n,l,l.sourceSpatialReference,a);return u}},58501:(e,t,r)=>{r.d(t,{q:()=>s});var i=r(62815);function s(e,t,r){if(!r?.features||!r.hasZ)return;const s=(0,i.N)(r.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of r.features)s(e.geometry)}}}]);
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4541],{30633:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ei});var r=i(90237),s=i(13874),n=i(69540),o=i(49186),a=i(92071),l=i(74887),u=i(10107),p=(i(44208),i(53966)),c=(i(87811),i(40608)),m=i(43937),d=i(4146),y=i(59456),h=i(52106),g=i(68729),f=i(78888),w=i(4718),v=i(36708),R=i(84952),_=i(56507),b=i(36005),S=i(21325),M=i(10873),x=i(45617),A=i(25482),I=i(22796),F=i(16019);const D={StretchFunction:{arguments:{ComputeGamma:{isDataset:!1,isPublic:!1,name:"ComputeGamma",type:"RasterFunctionVariable",value:!1},DRA:{isDataset:!1,isPublic:!1,name:"DRA",type:"RasterFunctionVariable",value:!1},EstimateStatsHistogram:{isDataset:!1,isPublic:!1,name:"EstimateStatsHistogram",type:"RasterFunctionVariable",value:!1},Gamma:{displayName:"Gamma",isDataset:!1,isPublic:!1,name:"Gamma",type:"RasterFunctionVariable"},Histograms:{isDataset:!1,isPublic:!1,name:"Histograms",type:"RasterFunctionVariable"},Max:{isDataset:!1,isPublic:!1,name:"Max",type:"RasterFunctionVariable",value:255},MaxPercent:{isDataset:!1,isPublic:!1,name:"MaxPercent",type:"RasterFunctionVariable",value:.5},Min:{isDataset:!1,isPublic:!1,name:"Min",type:"RasterFunctionVariable",value:0},MinPercent:{isDataset:!1,isPublic:!1,name:"MinPercent",type:"RasterFunctionVariable",value:.25},NumberOfStandardDeviations:{isDataset:!1,isPublic:!1,name:"NumberOfStandardDeviation",type:"RasterFunctionVariable",value:2},Raster:{isDataset:!0,isPublic:!1,name:"Raster",type:"RasterFunctionVariable"},SigmoidStrengthLevel:{isDataset:!1,isPublic:!1,name:"SigmoidStrengthLevel",type:"RasterFunctionVariable",value:2},Statistics:{isDataset:!1,isPublic:!1,name:"Statistics",type:"RasterFunctionVariable"},StretchType:{isDataset:!1,isPublic:!1,name:"StretchType",type:"RasterFunctionVariable",value:0},type:"StretchFunctionArguments",UseGamma:{isDataset:!1,isPublic:!1,name:"UseGamma",type:"RasterFunctionVariable",value:!1}},description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",function:{description:"Enhances an image by adjusting the range of values displayed. This does not alter the underlying pixel values. If a pixel has a value outside of the specified range, it will appear as either the minimum or maximum value.",name:"Stretch",pixelType:"UNKNOWN",type:"StretchFunction"},functionType:0,name:"Stretch",thumbnail:""},RemapFunction:{name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table.",function:{type:"RemapFunction",pixelType:"UNKNOWN",name:"Remap",description:"Changes pixel values by assigning new values to ranges of pixel values or using an external table."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},UseTable:{name:"UseTable",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},InputRanges:{name:"InputRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Input Ranges"},OutputValues:{name:"OutputValues",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"Output Values"},NoDataRanges:{name:"NoDataRanges",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable",displayName:"NoData Ranges"},Table:{name:"Table",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputField:{name:"InputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},OutputField:{name:"OutputField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},InputMaxField:{name:"InputMaxField",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},RemapTableType:{name:"RemapTableType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},AllowUnmatched:{name:"AllowUnmatched",isPublic:!1,isDataset:!1,value:!0,type:"RasterFunctionVariable"},type:"RemapFunctionArguments"},functionType:0,thumbnail:""},ColormapFunction:{name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp.",function:{type:"ColormapFunction",pixelType:"UNKNOWN",name:"Colormap",description:"Changes pixel values to display the raster data as either a grayscale or a red, green, blue (RGB) image, based on a colormap or a color ramp."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},ColormapName:{name:"ColormapName",isPublic:!1,isDataset:!1,value:"Gray",type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},type:"ColormapFunctionArguments"},functionType:0,thumbnail:""},ShadedReliefFunction:{name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image.",function:{type:"ShadedReliefFunction",pixelType:"UNKNOWN",name:"Shaded Relief",description:"Creates a multiband, color coded, 3D representation of the surface, with the sun's relative position taken into account for shading the image."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ColorSchemeType:{name:"ColorSchemeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ColorRamp:{name:"ColorRamp",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Colormap:{name:"Colormap",isPublic:!1,isDataset:!1,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"ShadedReliefFunctionArguments"},functionType:0,thumbnail:""},HillshadeFunction:{name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image",function:{type:"HillshadeFunction",pixelType:"UNKNOWN",name:"Hillshade",description:"Creates a 3D representation of the surface, with the sun's relative position taken into account for shading the image"},arguments:{DEM:{name:"DEM",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},HillshadeType:{name:"HillshadeType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},Azimuth:{name:"Azimuth",isPublic:!1,isDataset:!1,value:315,type:"RasterFunctionVariable"},Altitude:{name:"Altitude",isPublic:!1,isDataset:!1,value:45,type:"RasterFunctionVariable"},SlopeType:{name:"SlopeType",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},ZFactor:{name:"ZFactor",isPublic:!1,isDataset:!1,value:1,type:"RasterFunctionVariable"},PSPower:{name:"PSPower",isPublic:!1,isDataset:!1,value:.664,type:"RasterFunctionVariable"},PSZFactor:{name:"PSZFactor",isPublic:!1,isDataset:!1,value:.024,type:"RasterFunctionVariable"},RemoveEdgeEffect:{name:"RemoveEdgeEffect",isPublic:!1,isDataset:!1,value:!1,type:"RasterFunctionVariable"},type:"HillshadeFunctionArguments"},functionType:0,thumbnail:""},ResampleFunction:{name:"Resample",description:"Changes the cell size of a raster.",function:{type:"ResampleFunction",pixelType:"UNKNOWN",name:"Resample",description:"Changes the cell size of a raster."},arguments:{Raster:{name:"Raster",isPublic:!1,isDataset:!0,type:"RasterFunctionVariable"},ResamplingType:{name:"ResamplingType",isPublic:!1,isDataset:!1,value:0,type:"RasterFunctionVariable"},InputCellSize:{name:"InputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},OutputCellSize:{name:"OutputCellsize",isPublic:!1,isDataset:!1,value:{x:0,y:0},type:"RasterFunctionVariable"},type:"ResampleFunctionArguments"},functionType:0,thumbnail:""}};var j=i(67369),T=i(70274),P=i(48940);const Z=new Set(["u1","u2","u4","u8","s8","u16","s16"]),N={simple_scalar:"Simple Scalar",wind_barb:"Wind Barb",single_arrow:"Single Arrow",beaufort_kn:"Beaufort Wind (Knots)",beaufort_m:"Beaufort Wind (MetersPerSecond)",ocean_current_m:"Ocean Current (MetersPerSecond)",ocean_current_kn:"Ocean Current (Knots)"},C=new Set(["raster-stretch","unique-value","class-breaks","raster-shaded-relief","vector-field","raster-colormap"]);function O(e){return C.has(e.type)}function V(e,t){if(!e||!t)return(0,w.o8)(e||t);const i=(0,w.o8)(e);if(i.functionDefinition&&t.rasterFunctionDefinition){const e=t.rasterFunctionDefinition;(e.thumbnail||e.thumbnailEx)&&(e.thumbnail=e.thumbnailEx=void 0),J(i.functionDefinition.arguments,t),i.rasterFunctionDefinition=i.functionDefinition.toJSON()}else"none"!==t.functionName?.toLowerCase()&&(E(i.functionArguments).Raster=t);return i}function J(e,t){for(const i in e)"raster"===i.toLowerCase()&&("RasterFunctionVariable"===e[i].type?(e[i]=t.rasterFunctionDefinition,e[i].type="RasterFunctionTemplate"):"RasterFunctionTemplate"===e[i].type&&J(e[i].arguments,t))}function q(e){const t=(0,w.o8)(D[e.functionName+"Function"]),i=e.functionArguments;for(const e in i)"raster"===e.toLowerCase()?(t.arguments[e]=q(i[e]),t.arguments[e].type="RasterFunctionTemplate"):"colormap"===e.toLowerCase()?(t.arguments[e].value=U(i[e]),t.arguments.ColorSchemeType.value=0):t.arguments[e].value=i[e];return t}function E(e){const t=e?.Raster??e?.raster;return t&&"esri.layers.support.RasterFunction"===t.declaredClass?E(t.functionArguments):e}const G={none:0,standardDeviation:3,histogramEqualization:4,minMax:5,percentClip:6,sigmoid:9};function $(e,t){const i=Z.has(t)?(0,F.hP)(t):null;return i&&e.push([Math.floor(i[0]-1),0,0,0],[Math.ceil(i[1]+1),0,0,0]),e}function z(e){if(null==e)return;const{fields:t}=e,i=t?.find((e=>e?.name&&"value"===e.name.toLowerCase()));return i?.name}function L(e){return"polygon-3d"===e.symbol?.type?e.symbol.symbolLayers?.find((e=>"fill"===e.type))?.material?.color:e.symbol?.color}function U(e){const t=[],i=[];return e.forEach((e=>{t.push(e[0]),i.push((0,j.vL)([...e.slice(1),255]))})),{type:"RasterColormap",values:t,colors:i}}var B=i(85675),H=i(13868);let k=class extends A.A{constructor(){super(...arguments),this.layer=null,this.compression=void 0,this.pixelType=void 0,this.lercVersion=2}get adjustAspectRatio(){return this.layer.adjustAspectRatio}writeAdjustAspectRatio(e,t,i){this.layer.version<10.3||(t[i]=e)}get bandIds(){return this.layer.bandIds}get compressionQuality(){return this.layer.compressionQuality}writeCompressionQuality(e,t,i){this.format&&this.format.toLowerCase().includes("jpg")&&null!=e&&(t[i]=e)}get compressionTolerance(){return this.layer.compressionTolerance}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}get format(){return"vector-field"===this.layer.renderer?.type?"lerc":this.layer.format}get interpolation(){return this.layer.interpolation}get noData(){return this.layer.noData}get noDataInterpretation(){return this.layer.noDataInterpretation}writeLercVersion(e,t,i){"lerc"===this.format&&this.layer.version>=10.5&&(t[i]=e)}get version(){const e=this.layer;return e.commitProperty("bandIds"),e.commitProperty("format"),e.commitProperty("compressionQuality"),e.commitProperty("compressionTolerance"),e.commitProperty("interpolation"),e.commitProperty("noData"),e.commitProperty("noDataInterpretation"),e.commitProperty("mosaicRule"),e.commitProperty("rasterFunction"),e.commitProperty("adjustAspectRatio"),e.commitProperty("pixelFilter"),e.commitProperty("definitionExpression"),e.commitProperty("multidimensionalSubset"),(this._get("version")||0)+1}set version(e){this._set("version",e)}get mosaicRule(){const e=this.layer;let t=e.mosaicRule;const i=e.definitionExpression;return t?i&&i!==t.where&&(t=t.clone(),t.where=i):i&&(t=new B.A({where:i})),t}get rasterFunction(){const e=this.layer;let{rasterFunction:t}=e;const i=e.pixelFilter,r=!e.format||e.format.includes("jpg")||e.format.includes("png");t=this._addResampleRasterFunction(t);const s=e.multidimensionalSubset?.areaOfInterest;return s&&(t=function(e,t){return V(new I.A({functionName:"Clip",functionArguments:{ClippingGeometry:t.toJSON(),ClippingType:1}}),e)}(t,s)),r&&!i&&"vector-field"!==e.renderer?.type&&(t=this.combineRendererWithRenderingRule(t)),t}combineRendererWithRenderingRule(e){const t=this.layer,{rasterInfo:i,renderer:r}=t;return e=e||t.rasterFunction,r&&O(r)?V(function(e,t){switch(t=t||{},e.type){case"raster-stretch":return function(e,t){const i=t.convertToRFT,r=new I.A;r.functionName="Stretch";const s=G[T.u.toJSON(e.stretchType)],n="u8",o=e.customStatistics?.map((e=>[e.min,e.max,e.avg??0,e.stddev??1])),a={StretchType:s,Statistics:o,DRA:e.dynamicRangeAdjustment,UseGamma:e.useGamma,Gamma:e.gamma,ComputeGamma:e.computeGamma};if(null!=e.outputMin&&(a.Min=e.outputMin),null!=e.outputMax&&(a.Max=e.outputMax),s===G.standardDeviation?(a.NumberOfStandardDeviations=e.numberOfStandardDeviations,r.outputPixelType=n):s===G.percentClip?(a.MinPercent=e.minPercent,a.MaxPercent=e.maxPercent,r.outputPixelType=n):s===G.minMax?r.outputPixelType=n:s===G.sigmoid&&(a.SigmoidStrengthLevel=e.sigmoidStrengthLevel),r.functionArguments=a,r.variableName="Raster",e.colorRamp){const s=e.colorRamp,n=new I.A;if(i)n.functionArguments={ColorRamp:(0,j.hf)(s)};else{const i=(0,j.hs)(s,!0);if(i)n.functionArguments={colorRampName:i};else if(!t.convertColorRampToColormap||"algorithmic"!==s.type&&"multipart"!==s.type){const t=e.colorRamp.toJSON();"algorithmic"===t.type?t.algorithm=t.algorithm||"esriCIELabAlgorithm":"multipart"===t.type&&t.colorRamps?.length&&t.colorRamps.forEach((e=>e.algorithm=e.algorithm||"esriCIELabAlgorithm")),n.functionArguments={colorRamp:t}}else n.functionArguments={Colormap:(0,j.R8)(s)}}return n.variableName="Raster",n.functionName="Colormap",n.functionArguments.Raster=r,i?new I.A({rasterFunctionDefinition:q(n)}):n}return i?new I.A({rasterFunctionDefinition:q(r)}):r}(e,t);case"class-breaks":return function(e,t){const i=[],r=[],s=[],n=[],o=1e-4,{pixelType:a,rasterAttributeTable:l}=t,u=null==l?null:l.features,p=z(l);if(p&&u&&Array.isArray(u)&&e.classBreakInfos){e.classBreakInfos.forEach(((t,i)=>{const r=t.symbol?.color;let s;r?.a&&null!=t.minValue&&null!=t.maxValue&&u.forEach((o=>{null!=t.minValue&&null!=t.maxValue&&(s=o.attributes[e.field],(s>=t.minValue&&s<t.maxValue||i===e.classBreakInfos.length-1&&s>=t.minValue)&&n.push([o.attributes[p],r.r,r.g,r.b]))}))}));const i=a?$(n,a):n,r=new I.A;return r.functionName="Colormap",r.functionArguments={},r.functionArguments.Colormap=i,r.variableName="Raster",t.convertToRFT?new I.A({rasterFunctionDefinition:q(r)}):r}e.classBreakInfos.forEach(((e,t)=>{if(null==e.minValue||null==e.maxValue)return;const a=e.symbol&&e.symbol.color;a?.a?(0===t?i.push(e.minValue,e.maxValue+o):i.push(e.minValue+o,e.maxValue+o),r.push(t),n.push([t,a.r,a.g,a.b])):s.push(e.minValue,e.maxValue)}));const c=a?$(n,a):n,m=new I.A;m.functionName="Remap",m.functionArguments={InputRanges:i,OutputValues:r,NoDataRanges:s},m.variableName="Raster";const d=new I.A;return d.functionName="Colormap",d.functionArguments={Colormap:c,Raster:m},t.convertToRFT?new I.A({rasterFunctionDefinition:q(d)}):d}(e,t);case"unique-value":return function(e,t){const i=[],{pixelType:r,rasterAttributeTable:s}=t,n=null==s?null:s.features,o=z(s),a=e.defaultSymbol?.color?.toRgb(),l=e.uniqueValueInfos;if(l)if(n){if(o){const t=new Map;l.forEach((e=>{const i=e.value,r=L(e);null!=i&&r?.a&&t.set(String(i),r.toRgb())}));const r=e.field;r&&n.forEach((({attributes:e})=>{const s=String(e[r]),n=e[o],l=t.get(s);l?i.push([n,...l]):a&&i.push([n,...a])}))}}else for(let e=0;e<l.length;e++){const t=l[e],r=L(t),s=+t.value;if(r?.a){if(isNaN(s))return null;i.push([s,r.r,r.g,r.b])}}const u=r?$(i,r):i,p=new I.A;return p.functionName="Colormap",p.functionArguments={},p.functionArguments.Colormap=u,p.variableName="Raster",t.convertToRFT?new I.A({rasterFunctionDefinition:q(p)}):p}(e,t);case"raster-colormap":return function(e,t){const i=e.extractColormap();if(!i||0===i.length)return null;const{pixelType:r}=t,s=r?$(i,r):i,n=new I.A;return n.functionName="Colormap",n.functionArguments={},n.functionArguments.Colormap=s,t.convertToRFT?new I.A({rasterFunctionDefinition:q(n)}):n}(e,t);case"vector-field":return function(e,t){const i=new I.A;i.functionName="VectorFieldRenderer";const{dataType:r,bandNames:s}=t,n="vector-uv"===r;let o,a;if(s&&2===s.length){const e=s.map((e=>e.toLowerCase()));o=e.indexOf("magnitude"),a=e.indexOf("direction")}-1!==o&&null!==o||(o=0,a=1);const l="arithmetic"===e.rotationType?1:2,u="flow-from"===e.flowRepresentation?0:1,p=e.visualVariables?e.visualVariables.find((e=>"Magnitude"===e.field)):new P.A,c={magnitudeBandID:o,directionBandID:a,isUVComponents:n,referenceSystem:l,massFlowAngleRepresentation:u,symbolTileSize:50,symbolTileSizeUnits:100,calculationMethod:"Vector Average",symbologyName:N[e.style.toLowerCase().replace("-","_")],minimumMagnitude:p.minDataValue,maximumMagnitude:p.maxDataValue,minimumSymbolSize:p.minSize,maximumSymbolSize:p.maxSize};i.functionArguments=c;const m=q(i);return t.convertToRFT?I.A.fromJSON({rasterFunctionDefinition:m}):i}(e,t);case"raster-shaded-relief":return function(e,t){const i=t.convertToRFT;if("elevation"!==t.dataType&&("generic"!==t.dataType||1!==t.bandCount||"s16"!==t.pixelType&&"s32"!==t.pixelType&&"f32"!==t.pixelType&&"f64"!==t.pixelType))return new I.A;const r=new I.A;r.functionName="Hillshade";const s="traditional"===e.hillshadeType?0:1,n="none"===e.scalingType?1:3,o={HillshadeType:s,SlopeType:n,ZFactor:e.zFactor};return 0===s&&(o.Azimuth=e.azimuth,o.Altitude=e.altitude),3===n&&(o.PSPower=e.pixelSizePower,o.PSZFactor=e.pixelSizeFactor),r.functionArguments=o,r.variableName="Raster",e.colorRamp&&(r.functionName="ShadedRelief",i?o.ColorRamp=(0,j.hf)(e.colorRamp):o.Colormap=(0,j.R8)(e.colorRamp)),i?new I.A({rasterFunctionDefinition:q(r)}):r}(e,t);case"flow":throw new Error("Unsupported rendering rule.")}}(r,{rasterAttributeTable:i.attributeTable,pixelType:i.pixelType,dataType:i.dataType,bandNames:i.bandInfos.map((({name:e})=>e)),convertColorRampToColormap:t.version<10.6,convertToRFT:!!e?.rasterFunctionDefinition,bandCount:i.bandCount}),e):e}_addResampleRasterFunction(e){if("vector-field"!==this.layer.renderer?.type||"Resample"===e?.functionName)return e;const t="esriImageServiceDataTypeVector-UV"===this.layer.serviceDataType?7:10,i=this.layer.serviceRasterInfo.pixelSize;let r=new I.A({functionName:"Resample",functionArguments:{ResamplingType:t,InputCellSize:i}});return r=e?.rasterFunctionDefinition?new I.A({rasterFunctionDefinition:q(r)}):r,V(r,e)}};(0,r._)([(0,u.MZ)()],k.prototype,"layer",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"adjustAspectRatio",null),(0,r._)([(0,m.K)("adjustAspectRatio")],k.prototype,"writeAdjustAspectRatio",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"bandIds",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"compression",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"compressionQuality",null),(0,r._)([(0,m.K)("compressionQuality")],k.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"compressionTolerance",null),(0,r._)([(0,m.K)("compressionTolerance")],k.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"format",null),(0,r._)([(0,u.MZ)({type:String,json:{read:{reader:H.SZ.read},write:{writer:H.SZ.write}}})],k.prototype,"interpolation",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"noData",null),(0,r._)([(0,u.MZ)({type:String,json:{read:{reader:H.hm.read},write:{writer:H.hm.write}}})],k.prototype,"noDataInterpretation",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"pixelType",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"lercVersion",void 0),(0,r._)([(0,m.K)("lercVersion")],k.prototype,"writeLercVersion",null),(0,r._)([(0,u.MZ)({type:Number})],k.prototype,"version",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],k.prototype,"mosaicRule",null),(0,r._)([(0,u.MZ)({json:{write:!0,name:"renderingRule"}})],k.prototype,"rasterFunction",null),k=(0,r._)([(0,c.$)("esri.layers.support.ExportImageServiceParameters")],k);var Q=i(20437),K=i(95466),W=i(33446),X=i(43577),Y=i(14140),ee=i(74797),te=i(87186),ie=i(69409),re=i(77301),se=i(51244),ne=i(14636),oe=i(12711),ae=i(85676),le=i(17136),ue=i(2272),pe=i(86738);let ce=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.fromGeometry=null,this.toGeometry=null,this.objectIds=null,this.where=null,this.maxCount=null}};(0,r._)([(0,u.MZ)({type:pe.A,json:{read:!0}})],ce.prototype,"fromGeometry",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],ce.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ce.prototype,"objectIds",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],ce.prototype,"where",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],ce.prototype,"maxCount",void 0),ce=(0,r._)([(0,c.$)("esri.rest.support.FindImagesParameters")],ce);const me=ce,de=e=>{let t=class extends e{constructor(){super(...arguments),this.make=null,this.model=null,this.focalLength=null,this.pixelSize=null,this.rows=null,this.cols=null}};return(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"make",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"model",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"focalLength",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"rows",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],t.prototype,"cols",void 0),t=(0,r._)([(0,c.$)("esri.rest.support.CameraInfoMixin")],t),t};let ye=class extends(de(A.A)){constructor(){super(...arguments),this.id=null,this.referenceUri=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.perspectiveCenter=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,r._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"id",void 0),(0,r._)([(0,u.MZ)({json:{name:"uri",write:!0}})],ye.prototype,"referenceUri",void 0),(0,r._)([(0,u.MZ)({type:Date,json:{write:!0}})],ye.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.K)("acquisitionDate")],ye.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"cameraID",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],ye.prototype,"center",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],ye.prototype,"perspectiveCenter",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],ye.prototype,"orientation",void 0),ye=(0,r._)([(0,c.$)("esri.rest.support.ImageInspectionInfo")],ye);const he=ye;let ge=class extends A.A{constructor(){super(...arguments),this.images=null}};(0,r._)([(0,u.MZ)({type:[he],json:{write:!0}})],ge.prototype,"images",void 0),ge=(0,r._)([(0,c.$)("esri.rest.support.FindImagesResult")],ge);const fe=ge;var we,ve=i(16930);let Re=we=class extends A.A{constructor(e){super(e),this.angleNames=null,this.point=null,this.spatialReference=null,this.rasterId=null}clone(){return new we((0,w.o8)({angleNames:this.angleNames,point:this.point,spatialReference:this.spatialReference,rasterId:this.rasterId}))}};(0,r._)([(0,u.MZ)({type:[String],json:{name:"angleName",write:!0}})],Re.prototype,"angleNames",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Re.prototype,"point",void 0),(0,r._)([(0,u.MZ)({type:ve.A,json:{write:!0}})],Re.prototype,"spatialReference",void 0),(0,r._)([(0,u.MZ)({type:_.jz,json:{write:!0}})],Re.prototype,"rasterId",void 0),Re=we=(0,r._)([(0,c.$)("esri.rest.support.ImageAngleParameters")],Re);const _e=Re;let be=class extends A.A{constructor(e){super(e),this.north=null,this.up=null,this.spatialReference=null}};(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],be.prototype,"north",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],be.prototype,"up",void 0),(0,r._)([(0,u.MZ)({type:ve.A,json:{write:!0}})],be.prototype,"spatialReference",void 0),be=(0,r._)([(0,c.$)("esri.rest.support.ImageAngleResult")],be);const Se=be;var Me=i(83047),xe=i(65864),Ae=i(66552);const Ie=new Ae.J({esriMensurationPoint:"point",esriMensurationCentroid:"centroid",esriMensurationDistanceAndAngle:"distance-and-angle",esriMensurationAreaAndPerimeter:"area-and-perimeter",esriMensurationHeightFromBaseAndTop:"base-and-top",esriMensurationHeightFromBaseAndTopShadow:"base-and-top-shadow",esriMensurationHeightFromTopAndTopShadow:"top-and-top-shadow",esriMensurationPoint3D:"point-3D",esriMensurationCentroid3D:"centroid-3D",esriMensurationDistanceAndAngle3D:"distance-and-angle-3D",esriMensurationAreaAndPerimeter3D:"area-and-perimeter-3D"});let Fe=class extends A.A{constructor(){super(...arguments),this.value=null,this.displayValue=null,this.uncertainty=null}};(0,r._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Fe.prototype,"value",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Fe.prototype,"displayValue",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{read:!0,write:!0}})],Fe.prototype,"uncertainty",void 0),Fe=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.BaseImageMeasureResultValue")],Fe);let De=class extends Fe{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],De.prototype,"unit",void 0),De=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultLengthValue")],De);let je=class extends Fe{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:Me.dk.read,write:Me.dk.write}})],je.prototype,"unit",void 0),je=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAreaValue")],je);let Te=class extends Fe{constructor(){super(...arguments),this.unit=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:Me.b$.read,write:Me.b$.write}})],Te.prototype,"unit",void 0),Te=(0,r._)([(0,c.$)("esri.rest.support.imageMeasureUtils.ImageMeasureResultAngleValue")],Te);let Pe=class extends A.A{constructor(e){super(e),this.type=null,this.measureOperation=null,this.mosaicRule=null,this.pixelSize=null,this.raster=void 0}};(0,r._)([(0,u.MZ)()],Pe.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:Ie.apiValues,json:{read:Ie.read,write:Ie.write}})],Pe.prototype,"measureOperation",void 0),(0,r._)([(0,u.MZ)({type:B.A,json:{write:!0}})],Pe.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Pe.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Pe.prototype,"raster",void 0),Pe=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureParameters")],Pe);const Ze=Pe;var Ne;let Ce=Ne=class extends Ze{constructor(){super(...arguments),this.type="area-perimeter",this.geometry=null,this.is3D=!1,this.linearUnit="meters",this.areaUnit="square-meters"}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"area-and-perimeter-3D":"area-and-perimeter"}clone(){return new Ne((0,w.o8)({geometry:this.geometry,is3D:this.is3D,linearUnit:this.linearUnit,areaUnit:this.areaUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({types:y.yR,json:{name:"fromGeometry",read:!0,write:!0}})],Ce.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Ce.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:Ie.apiValues,json:{write:Ie.write}})],Ce.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],Ce.prototype,"is3D",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],Ce.prototype,"linearUnit",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:Me.dk.read,write:Me.dk.write}})],Ce.prototype,"areaUnit",void 0),Ce=Ne=(0,r._)([(0,c.$)("esri.rest.support.ImageAreaParameters")],Ce);const Oe=Ce;let Ve=class extends A.A{constructor(e){super(e),this.name=null,this.sensorName=null}};(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Ve.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:!0,write:!0}})],Ve.prototype,"sensorName",void 0),Ve=(0,r._)([(0,c.$)("esri.rest.support.BaseImageMeasureResult")],Ve);const Je=Ve;let qe=class extends Je{constructor(){super(...arguments),this.area=null,this.perimeter=null}};(0,r._)([(0,u.MZ)({type:je,json:{read:!0,write:!0}})],qe.prototype,"area",void 0),(0,r._)([(0,u.MZ)({type:De,json:{read:!0,write:!0}})],qe.prototype,"perimeter",void 0),qe=(0,r._)([(0,c.$)("esri.rest.support.ImageAreaResult")],qe);const Ee=qe;let Ge=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.outSpatialReference=null}};(0,r._)([(0,u.MZ)({type:ve.A,json:{name:"outSR",write:!0}})],Ge.prototype,"outSpatialReference",void 0),Ge=(0,r._)([(0,c.$)("esri.rest.support.ImageBoundaryParameters")],Ge);const $e=Ge;var ze=i(5443),Le=i(39829);let Ue=class extends A.A{constructor(){super(...arguments),this.area=null,this.geometry=null}readGeometry(e,t){return null==e?null:e.rings?Le.A.fromJSON(e):ze.A.fromJSON(e)}};(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Ue.prototype,"area",void 0),(0,r._)([(0,u.MZ)({types:y.yR,json:{name:"shape",write:!0}})],Ue.prototype,"geometry",void 0),(0,r._)([(0,b.w)("geometry")],Ue.prototype,"readGeometry",null),Ue=(0,r._)([(0,c.$)("esri.rest.support.ImageBoundaryResult")],Ue);const Be=Ue;var He;let ke=He=class extends Ze{constructor(){super(...arguments),this.type="distance-angle",this.fromGeometry=null,this.toGeometry=null,this.is3D=!1,this.linearUnit="meters",this.angularUnit="degrees"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.is3D?"distance-and-angle-3D":"distance-and-angle"}clone(){return new He((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,is3D:this.is3D,linearUnit:this.linearUnit,angularUnit:this.angularUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],ke.prototype,"fromGeometry",void 0),(0,r._)([(0,m.K)("fromGeometry")],ke.prototype,"writeFromGeometry",null),(0,r._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],ke.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({type:Ie.apiValues,json:{write:Ie.write}})],ke.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],ke.prototype,"is3D",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],ke.prototype,"linearUnit",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:Me.b$.read,write:Me.b$.write}})],ke.prototype,"angularUnit",void 0),ke=He=(0,r._)([(0,c.$)("esri.rest.support.ImageDistanceParameters")],ke);const Qe=ke;let Ke=class extends Je{constructor(){super(...arguments),this.distance=null,this.azimuthAngle=null,this.elevationAngle=null}};(0,r._)([(0,u.MZ)({type:De,json:{read:!0,write:!0}})],Ke.prototype,"distance",void 0),(0,r._)([(0,u.MZ)({type:Te,json:{read:!0,write:!0}})],Ke.prototype,"azimuthAngle",void 0),(0,r._)([(0,u.MZ)({type:Te,json:{read:!0,write:!0}})],Ke.prototype,"elevationAngle",void 0),Ke=(0,r._)([(0,c.$)("esri.rest.support.ImageDistanceResult")],Ke);const We=Ke;var Xe=i(93223),Ye=i(58174),et=i(79677);let tt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometry=null,this.objectIds=null,this.spatialRelationship="intersects",this.timeExtent=null,this.where=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=JSON.stringify(e.toJSON()))}};(0,r._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS,write:!0}})],tt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],tt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],tt.prototype,"objectIds",void 0),(0,r._)([(0,Xe.e)(Ye.x,{ignoreUnknown:!1,name:"spatialRel"})],tt.prototype,"spatialRelationship",void 0),(0,r._)([(0,u.MZ)({type:et.A,json:{name:"time",write:!0}})],tt.prototype,"timeExtent",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],tt.prototype,"where",void 0),tt=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfoParameters")],tt);const it=tt;let rt=class extends(de(A.A)){constructor(){super(...arguments),this.id=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],rt.prototype,"id",void 0),rt=(0,r._)([(0,c.$)("esri.rest.support.CameraInfo")],rt);const st=rt;let nt=class extends A.A{constructor(){super(...arguments),this.id=null,this.name=null,this.acquisitionDate=null,this.cameraID=null,this.center=null,this.gps=null,this.orientation=null}writeAcquisitionDate(e,t){t.acquisitionDate=e?.getTime()}};(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"id",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"name",void 0),(0,r._)([(0,u.MZ)({type:Date,json:{write:!0}})],nt.prototype,"acquisitionDate",void 0),(0,r._)([(0,m.K)("acquisitionDate")],nt.prototype,"writeAcquisitionDate",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"cameraID",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],nt.prototype,"center",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"gps",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],nt.prototype,"orientation",void 0),nt=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfo")],nt);const ot=nt;let at=class extends A.A{constructor(){super(...arguments),this.images=null,this.cameras=null}};(0,r._)([(0,u.MZ)({type:[ot],json:{write:!0}})],at.prototype,"images",void 0),(0,r._)([(0,u.MZ)({type:[st],json:{write:!0}})],at.prototype,"cameras",void 0),at=(0,r._)([(0,c.$)("esri.rest.support.ImageGPSInfoResult")],at);const lt=at;var ut;let pt=ut=class extends Ze{constructor(){super(...arguments),this.type="height",this.fromGeometry=null,this.toGeometry=null,this.operationType="base-and-top",this.linearUnit="meters"}writeFromGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=e.toJSON())}get measureOperation(){return this.operationType}clone(){return new ut((0,w.o8)({fromGeometry:this.fromGeometry,toGeometry:this.toGeometry,operationType:this.operationType,linearUnit:this.linearUnit,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({type:pe.A,json:{read:!0}})],pt.prototype,"fromGeometry",void 0),(0,r._)([(0,m.K)("fromGeometry")],pt.prototype,"writeFromGeometry",null),(0,r._)([(0,u.MZ)({type:pe.A,json:{read:!0,write:!0}})],pt.prototype,"toGeometry",void 0),(0,r._)([(0,u.MZ)({type:Ie.apiValues,json:{write:Ie.write}})],pt.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],pt.prototype,"operationType",void 0),(0,r._)([(0,u.MZ)({type:String,json:{read:Me.Sk.read,write:Me.Sk.write}})],pt.prototype,"linearUnit",void 0),pt=ut=(0,r._)([(0,c.$)("esri.rest.support.ImageHeightParameters")],pt);const ct=pt;let mt=class extends Je{constructor(){super(...arguments),this.height=null}};(0,r._)([(0,u.MZ)({type:De,json:{read:!0,write:!0}})],mt.prototype,"height",void 0),mt=(0,r._)([(0,c.$)("esri.rest.support.ImageHeightResult")],mt);const dt=mt;var yt,ht=i(22048);let gt=yt=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.rasterFunctions=null,this.pixelSize=null,this.returnGeometry=!0,this.returnCatalogItems=!0,this.returnPixelValues=!0,this.maxItemCount=null,this.timeExtent=null,this.raster=void 0,this.viewId=void 0,this.processAsMultidimensional=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=JSON.stringify(e.toJSON()))}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=B.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}writeMosaicRule(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON()))}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=I.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}writeRasterFunction(e,t,i){null!=e&&(t[i]=JSON.stringify(e.toJSON())),e.rasterFunctionDefinition&&(t[i]=JSON.stringify(e.rasterFunctionDefinition))}writeRasterFunctions(e,t,i){null!=e&&(t[i]=JSON.stringify(e.map((e=>e.rasterFunctionDefinition||e.toJSON()))))}writePixelSize(e,t,i){null!=e&&(t[i]=JSON.stringify(e))}writeTimeExtent(e,t,i){if(null!=e){const r=null!=e.start?e.start.getTime():null,s=null!=e.end?e.end.getTime():null;t[i]=null!=r?null!=s?`${r},${s}`:`${r}`:null}}clone(){return new yt((0,w.o8)({geometry:this.geometry,mosaicRule:this.mosaicRule,rasterFunction:this.rasterFunction,rasterFunctions:this.rasterFunctions,pixelSize:this.pixelSize,returnGeometry:this.returnGeometry,returnCatalogItems:this.returnCatalogItems,returnPixelValues:this.returnPixelValues,maxItemCount:this.maxItemCount,processAsMultidimensional:this.processAsMultidimensional,raster:this.raster,viewId:this.viewId,timeExtent:this.timeExtent}))}};(0,r._)([(0,u.MZ)({types:y.yR,json:{write:!0}})],gt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],gt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:B.A,json:{write:!0}})],gt.prototype,"mosaicRule",null),(0,r._)([(0,m.K)("mosaicRule")],gt.prototype,"writeMosaicRule",null),(0,r._)([(0,u.MZ)({type:I.A,json:{write:!0,name:"renderingRule"}})],gt.prototype,"rasterFunction",null),(0,r._)([(0,m.K)("rasterFunction")],gt.prototype,"writeRasterFunction",null),(0,r._)([(0,u.MZ)({type:[I.A],json:{write:!0,name:"renderingRules"}})],gt.prototype,"rasterFunctions",void 0),(0,r._)([(0,m.K)("rasterFunctions")],gt.prototype,"writeRasterFunctions",null),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],gt.prototype,"pixelSize",void 0),(0,r._)([(0,m.K)("pixelSize")],gt.prototype,"writePixelSize",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],gt.prototype,"returnGeometry",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],gt.prototype,"returnCatalogItems",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],gt.prototype,"returnPixelValues",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],gt.prototype,"maxItemCount",void 0),(0,r._)([(0,u.MZ)({type:et.A,json:{write:{target:"time"}}})],gt.prototype,"timeExtent",void 0),(0,r._)([(0,m.K)("timeExtent")],gt.prototype,"writeTimeExtent",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],gt.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],gt.prototype,"viewId",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],gt.prototype,"processAsMultidimensional",void 0),gt=yt=(0,r._)([(0,c.$)("esri.rest.support.ImageIdentifyParameters")],gt);const ft=gt;var wt=i(22671);let vt=class extends A.A{constructor(){super(...arguments),this.catalogItemVisibilities=null,this.catalogItems=null,this.location=null,this.name=null,this.objectId=null,this.processedValues=null,this.properties=null,this.value=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"catalogItemVisibilities",void 0),(0,r._)([(0,u.MZ)({type:wt.A,json:{write:!0}})],vt.prototype,"catalogItems",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],vt.prototype,"location",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"name",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"objectId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"processedValues",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"properties",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],vt.prototype,"value",void 0),vt=(0,r._)([(0,c.$)("esri.rest.support.ImageIdentifyResult")],vt);const Rt=vt;var _t;let bt=_t=class extends A.A{constructor(){super(...arguments),this.geometries=null,this.rasterId=null}writeGeometry(e,t,i){t.geometries={geometryType:"esriGeometryPoint",geometries:e.map((e=>e.toJSON()))}}clone(){return new _t({geometries:this.geometries?.map((e=>e.clone()))??[],rasterId:this.rasterId})}};(0,r._)([(0,u.MZ)({type:[pe.A],json:{write:!0}})],bt.prototype,"geometries",void 0),(0,r._)([(0,m.K)("geometries")],bt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:_.jz,json:{write:!0}})],bt.prototype,"rasterId",void 0),bt=_t=(0,r._)([(0,c.$)("esri.rest.support.ImagePixelLocationParameters")],bt);const St=bt;let Mt=class extends A.A{constructor(){super(...arguments),this.geometries=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],Mt.prototype,"geometries",void 0),Mt=(0,r._)([(0,c.$)("esri.rest.support.ImagePixelLocationResult")],Mt);const xt=Mt;var At;let It=At=class extends Ze{constructor(){super(...arguments),this.type="point",this.geometry=null,this.is3D=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=e.toJSON())}get measureOperation(){const{is3D:e,geometry:t}=this;return"point"===t.type?e?"point-3D":"point":e?"centroid-3D":"centroid"}clone(){return new At((0,w.o8)({geometry:this.geometry,is3D:this.is3D,mosaicRule:this.mosaicRule,pixelSize:this.pixelSize,raster:this.raster}))}};(0,r._)([(0,u.MZ)({types:y.yR,json:{name:"fromGeometry",read:xe.rS}})],It.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],It.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:Ie.apiValues,json:{read:Ie.read,write:Ie.write}})],It.prototype,"measureOperation",null),(0,r._)([(0,u.MZ)({json:{read:!0}})],It.prototype,"is3D",void 0),It=At=(0,r._)([(0,c.$)("esri.rest.support.ImagePointParameters")],It);const Ft=It;let Dt=class extends Je{constructor(){super(...arguments),this.point=null}};(0,r._)([(0,u.MZ)({type:pe.A,json:{name:"point.value",read:!0,write:!0}})],Dt.prototype,"point",void 0),Dt=(0,r._)([(0,c.$)("esri.rest.support.ImagePointResult")],Dt);const jt=Dt;var Tt,Pt=i(48526);let Zt=Tt=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.interpolation="nearest",this.mosaicRule=null,this.outFields=null,this.pixelSize=null,this.returnFirstValueOnly=!0,this.sampleDistance=null,this.sampleCount=null,this.sliceId=null,this.timeExtent=null}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=e.toJSON())}set locations(e){if(e?.length){const t=new Pt.A({spatialReference:e[0].spatialReference,points:e.map((({x:e,y:t})=>[e,t]))});this._set("locations",e),this.geometry=t}}clone(){return new Tt((0,w.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,r._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS}})],Zt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Zt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({type:[pe.A]})],Zt.prototype,"locations",null),(0,r._)([(0,u.MZ)({type:String,json:{type:H.SZ.jsonValues,read:H.SZ.read,write:H.SZ.write}})],Zt.prototype,"interpolation",void 0),(0,r._)([(0,u.MZ)({type:B.A,json:{write:!0}})],Zt.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:[String],json:{write:!0}})],Zt.prototype,"outFields",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Zt.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({type:String,json:{write:!0}})],Zt.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({type:Boolean,json:{write:!0}})],Zt.prototype,"returnFirstValueOnly",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Zt.prototype,"sampleDistance",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Zt.prototype,"sampleCount",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],Zt.prototype,"sliceId",void 0),(0,r._)([(0,u.MZ)({type:et.A,json:{read:{source:"time"},write:{target:"time"}}})],Zt.prototype,"timeExtent",void 0),Zt=Tt=(0,r._)([(0,c.$)("esri.rest.support.ImageSampleParameters")],Zt);const Nt=Zt;let Ct=class extends A.A{constructor(){super(...arguments),this.attributes=null,this.location=null,this.locationId=null,this.rasterId=null,this.resolution=null,this.pixelValue=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"attributes",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],Ct.prototype,"location",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"locationId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"resolution",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Ct.prototype,"pixelValue",void 0),Ct=(0,r._)([(0,c.$)("esri.rest.support.ImageSample")],Ct);const Ot=Ct;let Vt=class extends A.A{constructor(){super(...arguments),this.samples=null}};(0,r._)([(0,u.MZ)({type:[Ot],json:{write:!0}})],Vt.prototype,"samples",void 0),Vt=(0,r._)([(0,c.$)("esri.rest.support.ImageSampleResult")],Vt);const Jt=Vt;let qt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometries=[],this.rasterIds=null,this.outSpatialReference=null}writeGeometries(e,t,i){t.geometries=e?.length?{geometryType:(0,xe.$B)(e[0]),geometries:e.map((e=>({...e.toJSON(),spatialReference:void 0})))}:null}};(0,r._)([(0,u.MZ)({types:[y.yR]})],qt.prototype,"geometries",void 0),(0,r._)([(0,m.K)("geometries")],qt.prototype,"writeGeometries",null),(0,r._)([(0,u.MZ)({type:[_.jz],json:{write:!0}})],qt.prototype,"rasterIds",void 0),(0,r._)([(0,u.MZ)({type:ve.A,json:{name:"outSR",write:!0}})],qt.prototype,"outSpatialReference",void 0),qt=(0,r._)([(0,c.$)("esri.rest.support.ImageToMapMultirayParameters")],qt);const Et=qt;let Gt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.outSpatialReference=null,this.depthOffset=0,this.adjust=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}};(0,r._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS,write:!0}})],Gt.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],Gt.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],Gt.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({type:ve.A,json:{name:"outSR",write:!0}})],Gt.prototype,"outSpatialReference",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.DOff",write:!0}})],Gt.prototype,"depthOffset",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.Adjust",write:!0}})],Gt.prototype,"adjust",void 0),Gt=(0,r._)([(0,c.$)("esri.rest.support.ImageToMapParameters")],Gt);const $t=Gt;let zt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.referenceUri=null,this.rasterId=null}};(0,r._)([(0,u.MZ)({type:String,json:{name:"uri",write:!0}})],zt.prototype,"referenceUri",void 0),(0,r._)([(0,u.MZ)({type:Number,json:{write:!0}})],zt.prototype,"rasterId",void 0),zt=(0,r._)([(0,c.$)("esri.rest.support.ImageUrlParameters")],zt);const Lt=zt;let Ut=class extends A.A{constructor(){super(...arguments),this.url=null}};(0,r._)([(0,u.MZ)({json:{name:"imageURL",write:!0}})],Ut.prototype,"url",void 0),Ut=(0,r._)([(0,c.$)("esri.rest.support.ImageUrlResult")],Ut);const Bt=Ut,Ht=new Ae.J({0:"constant",1:"plane",2:"minimum",3:"maximum",4:"average"},{useNumericKeys:!0});let kt=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometries=[],this.mosaicRule=null,this.pixelSize=null,this.constantZ=null,this.baseType="plane"}writeGeometries(e,t,i){e?.length&&(t.geometryType=(0,xe.$B)(e[0]),t.geometries=e.map((e=>e.toJSON())))}};(0,r._)([(0,u.MZ)({types:[y.yR]})],kt.prototype,"geometries",void 0),(0,r._)([(0,m.K)("geometries")],kt.prototype,"writeGeometries",null),(0,r._)([(0,u.MZ)({type:B.A,json:{write:!0}})],kt.prototype,"mosaicRule",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{write:!0}})],kt.prototype,"pixelSize",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],kt.prototype,"constantZ",void 0),(0,r._)([(0,u.MZ)({type:Ht.apiValues,json:{read:Ht.read,write:Ht.write}})],kt.prototype,"baseType",void 0),kt=(0,r._)([(0,c.$)("esri.rest.support.ImageVolumeParameters")],kt);const Qt=kt;let Kt=class extends A.A{constructor(){super(...arguments),this.area=null,this.cut=null,this.fill=null,this.maxZ=null,this.minZ=null,this.meanZ=null,this.cutCellCount=null,this.fillCellCount=null}};(0,r._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"area",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"cut",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"fill",void 0),(0,r._)([(0,u.MZ)({json:{name:"maxz",write:!0}})],Kt.prototype,"maxZ",void 0),(0,r._)([(0,u.MZ)({json:{name:"minz",write:!0}})],Kt.prototype,"minZ",void 0),(0,r._)([(0,u.MZ)({json:{name:"meanz",write:!0}})],Kt.prototype,"meanZ",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"cutCellCount",void 0),(0,r._)([(0,u.MZ)({json:{write:!0}})],Kt.prototype,"fillCellCount",void 0),Kt=(0,r._)([(0,c.$)("esri.rest.support.ImageVolume")],Kt);const Wt=Kt;let Xt=class extends A.A{constructor(){super(...arguments),this.volumes=null}};(0,r._)([(0,u.MZ)({type:[Wt],json:{write:!0}})],Xt.prototype,"volumes",void 0),Xt=(0,r._)([(0,c.$)("esri.rest.support.ImageVolumeResult")],Xt);const Yt=Xt;let ei=class extends(n.A.ClonableMixin(A.A)){constructor(){super(...arguments),this.geometry=null,this.rasterId=null,this.visibleOnly=!1}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]=JSON.stringify(e))}};(0,r._)([(0,u.MZ)({types:y.yR,json:{read:xe.rS,write:!0}})],ei.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],ei.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ei.prototype,"rasterId",void 0),(0,r._)([(0,u.MZ)({json:{name:"options.VisibleOnly",write:!0}})],ei.prototype,"visibleOnly",void 0),ei=(0,r._)([(0,c.$)("esri.rest.support.MapToImageParameters")],ei);const ti=ei;let ii=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.length=null,this.area=null,this.center=null}readCenter(e,t){return e.spatialReference||(e={...e,spatialReference:t.Shape.spatialReference}),pe.A.fromJSON(e)}};(0,r._)([(0,u.MZ)({types:y.yR,json:{name:"Shape",read:xe.rS,write:!0}})],ii.prototype,"geometry",void 0),(0,r._)([(0,u.MZ)({json:{name:"Length",write:!0}})],ii.prototype,"length",void 0),(0,r._)([(0,u.MZ)({json:{name:"Area",write:!0}})],ii.prototype,"area",void 0),(0,r._)([(0,u.MZ)({type:pe.A,json:{name:"Center",write:!0}})],ii.prototype,"center",void 0),(0,r._)([(0,b.w)("center")],ii.prototype,"readCenter",null),ii=(0,r._)([(0,c.$)("esri.rest.support.MeasureAreaFromImageResult")],ii);const ri=ii;var si;let ni=si=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.rasterId=void 0}writeGeometry(e,t,i){null!=e&&(t.geometryType=(0,xe.$B)(e),t[i]={...e.toJSON(),spatialReference:void 0})}clone(){const e=(0,w.o8)({geometry:this.geometry,rasterId:this.rasterId});return new si(e)}};(0,r._)([(0,u.MZ)({types:y.yR,json:{name:"fromGeometry",read:xe.rS,write:!0}})],ni.prototype,"geometry",void 0),(0,r._)([(0,m.K)("geometry")],ni.prototype,"writeGeometry",null),(0,r._)([(0,u.MZ)({json:{write:!0}})],ni.prototype,"rasterId",void 0),ni=si=(0,r._)([(0,c.$)("esri.rest.support.MeasureFromImageParameters")],ni);const oi=ni;let ai=class extends A.A{constructor(){super(...arguments),this.geometry=null,this.length=null}};(0,r._)([(0,u.MZ)({types:y.yR,json:{name:"Shape",read:xe.rS,write:!0}})],ai.prototype,"geometry",void 0),(0,r._)([(0,u.MZ)({json:{name:"Length",write:!0}})],ai.prototype,"length",void 0),ai=(0,r._)([(0,c.$)("esri.rest.support.MeasureLengthFromImageResult")],ai);const li=ai;function ui(e){const t=e?.time;if(t&&(null!=t.start||null!=t.end)){const i=[];null!=t.start&&i.push(t.start),null==t.end||i.includes(t.end)||i.push(t.end),e.time=i.join(",")}}async function pi(e,t,i){t=(0,_.PZ)(ht.A,t);const r=(0,ue.Dl)(e),s=t.geometry?[t.geometry]:[],n=await(0,le.el)(s),o=t.toJSON();ui(o);const a=n?.[0];null!=a&&(o.geometry=yi(a));const l=(0,ue.lF)({...r.query,f:"json",...o});return(0,ue.jV)(l,i)}async function ci(e,t,i){t=(0,_.PZ)(ft,t);const r=(0,ue.Dl)(e),s=t.geometry?[t.geometry]:[];return(0,le.el)(s).then((e=>{const s=t.toJSON(),n=e?.[0];null!=n&&(s.geometry=JSON.stringify(yi(n)));const o=(0,ue.lF)({...r.query,f:"json",...s}),a=(0,ue.jV)(o,i);return(0,f.A)(r.path+"/identify",a)})).then((e=>Rt.fromJSON(e.data)))}async function mi(e,t,i,r){const s=(0,ue.Dl)(e),n=await(0,le.el)(i),o=t.toJSON();null!=n[0]&&(o.fromGeometry=JSON.stringify(yi(n[0]))),null!=n[1]&&(o.toGeometry=JSON.stringify(yi(n[1])));const a=(0,ue.lF)({...s.query,f:"json",...o}),l=(0,ue.jV)(a,r),{data:u}=await(0,f.A)(s.path+"/measure",l);return u}async function di(e,t,i){t=(0,_.PZ)(oi,t);const r=(0,ue.Dl)(e),s=t.toJSON(),n=(0,ue.lF)({...r.query,f:"json",...s}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(r.path+"/measureFromImage",o);return a}function yi(e){const t=e.toJSON();return e.spatialReference?.imageCoordinateSystem&&(t.spatialReference=hi(e.spatialReference)),t}function hi(e){const{imageCoordinateSystem:t}=e;if(t){const{id:e,referenceServiceName:i}=t;return null!=e?i?{icsid:e,icsns:i}:{icsid:e}:{ics:t}}return e.toJSON()}function gi(e,t){if(!e.imageCoordinateSystem)return(0,S.YX)(e);const i=hi(e),{icsid:r,icsns:s}=i;return null==r||null!=s&&!t?.toLowerCase().includes("/"+s.toLowerCase()+"/")?JSON.stringify(i):`0:${r}`}var fi=i(82371),wi=i(20223),vi=i(20615),Ri=i(78286),_i=i(99199),bi=i(61956),Si=i(4095);const Mi=new Set(["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff"]),xi=(0,_.Qp)(_.GB,{min:0,max:255}),Ai=e=>{let t=class extends e{constructor(){super(...arguments),this._functionRasterInfos={},this._rasterJobHandler={instance:null,refCount:0,connectionPromise:null},this._cachedRendererJson=null,this._serviceSupportsMosaicRule=null,this.adjustAspectRatio=null,this.bandIds=void 0,this.capabilities=null,this.compressionQuality=void 0,this.compressionTolerance=.01,this.copyright=null,this.defaultMosaicRule=null,this.definitionExpression=null,this.exportImageServiceParameters=null,this.rasterInfo=null,this.fields=null,this.fullExtent=null,this.hasMultidimensions=!1,this.imageMaxHeight=4100,this.imageMaxWidth=4100,this.interpolation=void 0,this.minScale=0,this.maxScale=0,this.multidimensionalInfo=null,this.multidimensionalSubset=null,this.noData=null,this.noDataInterpretation=void 0,this.objectIdField=null,this.geometryType="polygon",this.typeIdField=null,this.types=[],this.pixelFilter=null,this.raster=void 0,this.sourceType=null,this.viewId=void 0,this.symbolizer=null,this.rasterFunctionInfos=null,this.serviceDataType=null,this.spatialReference=null,this.pixelType=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.url=null,this.version=void 0}initialize(){this._set("exportImageServiceParameters",new k({layer:this}))}readServiceSupportsMosaicRule(e,t){return this._isMosaicRuleSupported(t)}get _rasterFunctionNamesIndex(){const e=new Map;return!this.rasterFunctionInfos||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.length<1||null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.forEach((t=>{e.set(t.name.toLowerCase().replaceAll(/ /gi,"_"),t.name)})),e}readBandIds(e,t){if(Array.isArray(e)&&e.length>0&&e.every((e=>"number"==typeof e)))return e}readCapabilities(e,t){return this._readCapabilities(t)}writeCompressionQuality(e,t,i){null!=e&&"lerc"!==this.format&&(t[i]=e)}writeCompressionTolerance(e,t,i){"lerc"===this.format&&null!=e&&(t[i]=e)}readDefaultMosaicRule(e,t){return this._serviceSupportsMosaicRule?B.A.fromJSON(t):null}get fieldsIndex(){return this.fields?new K.A(this.fields):null}set format(e){e&&Mi.has(e.toLowerCase())&&this._set("format",e.toLowerCase())}readFormat(e,t){return"esriImageServiceDataTypeVector-UV"===t.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===t.serviceDataType||null!=this.pixelFilter?"lerc":"jpgpng"}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}set mosaicRule(e){let t=e;t?.mosaicMethod&&(t=B.A.fromJSON({...t.toJSON(),mosaicMethod:t.mosaicMethod,mosaicOperation:t.mosaicOperation})),this._set("mosaicRule",t)}readMosaicRule(e,t){const i=e||t.mosaicRule;return i?B.A.fromJSON(i):this._isMosaicRuleSupported(t)?B.A.fromJSON(t):null}writeMosaicRule(e,t,i){let r=this.mosaicRule;const s=this.definitionExpression;r?s&&s!==r.where&&(r=r.clone(),r.where=s):s&&(r=new B.A({where:s})),this._isValidCustomizedMosaicRule(r)&&(t[i]=r.toJSON())}writeNoData(e,t,i){null!=e&&"number"==typeof e&&(t[i]=xi(e))}readObjectIdField(e,t){if(!e){const i=t.fields.find((e=>"esriFieldTypeOID"===e.type||"oid"===e.type));e=i?.name}return e}get parsedUrl(){return(0,R.An)(this.url)}readSourceType(e,t){return this._isMosaicDataset(t)?"mosaic-dataset":"raster-dataset"}get renderer(){const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find((({name:t})=>t===e));return i?.renderer.clone()}return this.internalRenderer}set renderer(e){this.activePresetRendererName=null,this.internalRenderer=e}set internalRenderer(e){this.loaded&&(e=this._configRenderer(e)),this._set("internalRenderer",e)}readRenderer(e,t,i){const r=t?.layerDefinition?.drawingInfo?.renderer,s=(0,g.LF)(r,i);return null==s?null:("vector-field"===s.type&&t.symbolTileSize&&!r.symbolTileSize&&(s.symbolTileSize=t.symbolTileSize),O(s)||p.A.getLogger(this).warn("ArcGISImageService","Imagery layer doesn't support given renderer type."),s)}writeRenderer(e,t,i){t.layerDefinition=t.layerDefinition||{},t.layerDefinition.drawingInfo=t.layerDefinition.drawingInfo||{},t.layerDefinition.drawingInfo.renderer=e.toJSON(),"vector-field"===e.type&&(t.symbolTileSize=e.symbolTileSize)}get rasterFields(){const e=this.fields?.map((e=>e.clone()))??[];e.push((0,ee.rZ)()),"mosaic-dataset"===this.sourceType&&this.fields?.length&&e.push((0,ee.Nd)()),this.version>=10.4&&null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.some((({name:e})=>"none"===e.toLowerCase()))&&e.push((0,ee.dy)()),null!=this.rasterFunctionInfos&&this.rasterFunctionInfos.filter((({name:e})=>"none"!==e.toLowerCase())).forEach((({name:t})=>e.push((0,ee.nq)(t))));const{rasterInfo:t}=this;if(this._isVectorDataSet()){const i=t?.multidimensionalInfo?.variables[0].unit?.trim(),r=(0,ee.DV)(i),s=(0,ee.y6)();e.push(r,s)}if(t?.multidimensionalInfo&&"raster-dataset"===this.sourceType){const i=(0,ee.AL)(t.multidimensionalInfo);e.push(...i)}const i=t?.attributeTable;if(null!=i){const t=(0,ee.jC)(i);e.push(...t)}return e}set rasterFunction(e){let t=e;t?.rasterFunction&&(t=I.A.fromJSON({...t.toJSON(),rasterFunction:t.rasterFunction,rasterFunctionArguments:t.rasterFunctionArguments})),this._set("rasterFunction",t)}readRasterFunction(e,t){const i=t.rasterFunctionInfos;return t.renderingRule||i?.length&&"None"!==i[0].name?this._isRFTJson(t.renderingRule)?I.A.fromJSON({rasterFunctionDefinition:t.renderingRule}):I.A.fromJSON(t.renderingRule||{rasterFunctionInfos:t.rasterFunctionInfos}):null}readSpatialReference(e,t){const i=e||t.extent.spatialReference;return i?ve.A.fromJSON(i):null}readPixelType(e){return H.e8.fromJSON(e)||e}writePixelType(e,t,i){null!=this.serviceRasterInfo&&this.pixelType===this.serviceRasterInfo.pixelType||(t[i]=H.e8.toJSON(e))}readVersion(e,t){let i=t.currentVersion;return i||(i=t.hasOwnProperty("fields")||t.hasOwnProperty("timeInfo")?10:9.3),i}applyFilter(e){let t=e;return this.pixelFilter&&(t=this._clonePixelData(e),this.pixelFilter(t)),t}async applyRenderer(e,t){let i=e;const{renderer:r,symbolizer:s,pixelFilter:n,bandIds:o}=this;if(!this._isPicture()&&r&&s&&!n){const n=JSON.stringify(this._cachedRendererJson)!==JSON.stringify(r.toJSON()),a=this._rasterJobHandler.instance;if(a){n&&(s.bind(),await a.updateSymbolizer(s,t),this._cachedRendererJson=r.toJSON());const l=await a.symbolize({bandIds:o,...e},t);i={extent:e.extent,pixelBlock:l}}else i={extent:e.extent,pixelBlock:s.symbolize({bandIds:o,...e})}}return i}destroy(){this._shutdownJobHandler()}increaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount++}decreaseRasterJobHandlerUsage(){this._rasterJobHandler.refCount--,this._rasterJobHandler.refCount<=0&&this._shutdownJobHandler()}async calculateVolume(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsCalculateVolume)throw new o.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return e=(0,w.o8)(e),this.mosaicRule&&null==e.mosaicRule&&(e.mosaicRule=this.mosaicRule),async function(e,t,i){const r=(t=(0,_.PZ)(Qt,t)).toJSON();r.geometries=JSON.stringify(r.geometries);const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...r}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/calculateVolume`,o);return Yt.fromJSON({volumes:a?.results})}(this.url,e,this._getRequestOptions(t))}async computeAngles(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeAngles)throw new o.A("imagery-layer:compute-angles","this operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)(_e,t)).toJSON();null!=r.angleName&&(r.angleName=r.angleName.join(",")),t?.point?.spatialReference?.imageCoordinateSystem&&(r.point.spatialReference=hi(t.point.spatialReference)),t?.spatialReference?.imageCoordinateSystem&&(r.spatialReference=gi(t.spatialReference));const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...r}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/computeAngles`,o);return a.spatialReference=a.spatialReference?null!=a.spatialReference.geodataXform?new ve.A({wkid:0,imageCoordinateSystem:a.spatialReference}):ve.A.fromJSON(a.spatialReference):null,"NaN"===a.north&&(a.north=null),"NaN"===a.up&&(a.up=null),new Se(a)}(this.url,e,this._getRequestOptions(t))}async computePixelSpaceLocations(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputePixelLocation)throw new o.A("imagery-layer:compute-pixel-space-locations","this operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)(St,t)).toJSON(),{geometries:s}=t;if(s)for(let e=0;e<s.length;e++)s[e].spatialReference?.imageCoordinateSystem&&(r.geometries.geometries[e].spatialReference=hi(s[e].spatialReference));const n=(0,ue.Dl)(e),o=(0,ue.lF)({...n.query,f:"json",...r}),a=(0,ue.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/computePixelLocation`,a);return xt.fromJSON(l)}(this.url,e,this._getRequestOptions(t))}async computeHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeHistograms)throw new o.A("imagery-layer:compute-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await pi(e,t,i),s=(0,ue.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeHistograms`,r);return{histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async computeStatisticsHistograms(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsComputeStatisticsHistograms)throw new o.A("imagery-layer:compute-statistics-histograms","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicAndRenderingRules(e),async function(e,t,i){const r=await pi(e,t,i),s=(0,ue.Dl)(e),{data:n}=await(0,f.A)(`${s.path}/computeStatisticsHistograms`,r),{statistics:o}=n;return o?.length&&o.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:o,histograms:n.histograms}}(this.url,e,this._getRequestOptions(t))}async measureHeight(e,t){const i=await this._fetchCapabilities(t?.signal);if(!("base-and-top"===e.operationType?i.mensuration.supportsHeightFromBaseAndTop:"base-and-top-shadow"===e.operationType?i.mensuration.supportsHeightFromBaseAndTopShadow:i.mensuration.supportsHeightFromTopAndTopShadow))throw new o.A("imagery-layer:measure-height","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,_.PZ)(ct,t);const r=await mi(e,t,[t.fromGeometry,t.toGeometry],i);return dt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaAndPerimeter(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsAreaAndPerimeter||e.is3D&&!i.mensuration.supports3D)throw new o.A("imagery-layer:measure-area-and-perimeter","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,_.PZ)(Oe,t);const r=await mi(e,t,[t.geometry],i);return Ee.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureDistanceAndAngle(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsDistanceAndAngle||e.is3D&&!i.mensuration.supports3D)throw new o.A("imagery-layer:measure-distance-and-angle","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,_.PZ)(Qe,t);const r=await mi(e,t,[t.fromGeometry,t.toGeometry],i);return We.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measurePointOrCentroid(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i.mensuration.supportsPointOrCentroid||e.is3D&&!i.mensuration.supports3D)throw new o.A("imagery-layer:measure-point-or-centroid","this operation is not supported on the input image service");return e=(0,w.o8)(e),this._applyMosaicRule(e),async function(e,t,i){t=(0,_.PZ)(Ft,t);const r=await mi(e,t,[t.geometry],i);return jt.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureLengthFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.A("imagery-layer:measure-length-from-image","this operation is not supported on the input image service");if("polyline"!==e.geometry.type)throw new o.A("imagery-layer:measure-length-from-image","this input geometry must be a polyline");return async function(e,t,i){const r=await di(e,t,i);return li.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}async measureAreaFromImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMeasureFromImage)throw new o.A("imagery-layer:measure-area-from-image","this operation is not supported on the input image service");if("polygon"!==e.geometry.type)throw new o.A("imagery-layer:measure-area-from-image","this input geometry must be a polygon");return async function(e,t,i){const r=await di(e,t,i);return ri.fromJSON(r)}(this.url,e,this._getRequestOptions(t))}getField(e){const{fieldsIndex:t}=this;return null!=t?t.get(e):void 0}getFieldDomain(e,t){const i=this.getField(e);return i?i.domain:null}async fetchImage(e,t,r,s={}){if(null==e||null==t||null==r)throw new o.A("imagery-layer:fetch-image","Insufficient parameters for requesting an image. A valid extent, width and height values are required.");if(this.renderer||this.symbolizer){const e=await this._generateRasterInfo(this.rasterFunction,{signal:s.signal});e&&(this.rasterInfo=e)}const n=this.getExportImageServiceParameters(e,t,r,s.timeExtent);if(null==n){if(s.requestAsImageElement&&this._canRequestImageElement(this.format)){const e=document.createElement("canvas");return e.width=t,e.height=r,s.returnImageBitmap?{imageBitmap:await(0,W.m)(e,`${i(this.parsedUrl)}/exportImage`,s.signal)}:{imageOrCanvasElement:e}}const{bandIds:n,rasterInfo:o}=this,a=(n?.length||o.bandCount)??0,l=t*r,u=o.pixelType,p=[];for(let e=0;e<a;e++)p.push(Y.A.createEmptyBand(u,l));return{pixelData:{pixelBlock:new Y.A({width:t,height:r,pixels:p,mask:new Uint8Array(l),pixelType:u}),extent:e}}}const a=!!s.requestAsImageElement&&!this.pixelFilter,l=a&&!!s.returnImageBitmap,u={imageServiceParameters:n,imageProps:{extent:e,width:t,height:r,format:this.format},requestAsImageElement:a,returnImageBitmap:l,signal:s.signal};return this._requestArrayBuffer(u)}fetchKeyProperties(e){return(0,f.A)(i(this.parsedUrl)+"/keyProperties",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>e.data))}fetchRasterAttributeTable(e){return this.version<10.1?Promise.reject(new o.A("#fetchRasterAttributeTable()","Failed to get rasterAttributeTable")):(0,f.A)(i(this.parsedUrl)+"/rasterAttributeTable",{query:this._getQueryParams({renderingRule:this.version>=10.3?e?.rasterFunction:null})}).then((e=>wt.A.fromJSON(e.data)))}getCatalogItemRasterInfo(e,t){const r={...t,query:this._getQueryParams()};return async function(e,t,i){const r=(0,ue.Dl)(e),s=(0,ue.lF)({...r?.query,f:"json"}),n=(0,ue.jV)(s,i),o=`${r?.path}/${t}/info`,a=(0,f.A)(`${o}`,n),l=(0,f.A)(`${o}/keyProperties`,n),u=await Promise.allSettled([a,l]),p="fulfilled"===u[0].status?u[0].value.data:null,c="fulfilled"===u[1].status?u[1].value.data:null;let m=null;p.statistics?.length&&(m=p.statistics.map((e=>({min:e[0],max:e[1],avg:e[2],stddev:e[3]}))));const d=ze.A.fromJSON(p.extent),y=Math.ceil(d.width/p.pixelSizeX-.1),h=Math.ceil(d.height/p.pixelSizeY-.1),g=d.spatialReference,w=new pe.A({x:p.pixelSizeX,y:p.pixelSizeY,spatialReference:g}),v=p.histograms?.length?p.histograms:null,R=new wi.A({origin:p.origin,blockWidth:p.blockWidth,blockHeight:p.blockHeight,firstPyramidLevel:p.firstPyramidLevel,maximumPyramidLevel:p.maxPyramidLevel});return new te.A({width:y,height:h,bandCount:p.bandCount,extent:d,spatialReference:g,pixelSize:w,pixelType:p.pixelType.toLowerCase(),statistics:m,histograms:v,keyProperties:c,storageInfo:R})}(i(this.parsedUrl),e,r)}async getCatalogItemICSInfo(e,t){const{data:r}=await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/ics",{query:this._getQueryParams(),...t}),s=r?.ics;if(!s)return;let n=null;try{n=(await(0,f.A)(i(this.parsedUrl)+"/"+e+"/info",{query:this._getQueryParams(),...t})).data.extent}catch{}if(!n?.spatialReference)return{ics:s,icsToPixelTransform:null,icsExtent:null,northDirection:null};const o=this.version>=10.7?(0,f.A)(i(this.parsedUrl)+"/"+e+"/info/icstopixel",{query:this._getQueryParams(),...t}).then((e=>e.data)).catch((()=>({}))):{},a=n.spatialReference,l={geometries:JSON.stringify({geometryType:"esriGeometryEnvelope",geometries:[n]}),inSR:(0,S.YX)(a),outSR:"0:"+e},u=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(l),...t}).then((e=>e.data)).catch((()=>({}))),p=(n.xmin+n.xmax)/2,c=(n.ymax-n.ymin)/6,m=n.ymin+c,d=[];for(let e=0;e<5;e++)d.push({x:p,y:m+c*e});const y={geometries:JSON.stringify({geometryType:"esriGeometryPoint",geometries:d}),inSR:(0,S.YX)(a),outSR:"0:"+e},h=(0,f.A)(i(this.parsedUrl)+"/project",{query:this._getQueryParams(y),...t}).then((e=>e.data)).catch((()=>({}))),g=await Promise.all([o,u,h]);let w=g[0].ipxf;if(null==w){const e=s.geodataXform?.xf_0;"topup"===e?.name?.toLowerCase()&&6===e?.coefficients?.length&&(w={affine:{name:"ics [sensor: Frame] to pixel (column, row) transformation",coefficients:e.coefficients,cellsizeRatio:0,type:"GeometricXform"}})}const v=ze.A.fromJSON(g[1]?.geometries?.[0]);v&&(v.spatialReference=new ve.A({wkid:0,imageCoordinateSystem:s}));const R=g[2].geometries?g[2].geometries.filter((e=>null!=e?.x&&null!=e.y&&"NaN"!==e.x&&"NaN"!==e.y)):[],_=R.length;if(_<3)return{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:null};let b=0,M=0,x=0,A=0;for(let e=0;e<_;e++)b+=R[e].x,M+=R[e].y,x+=R[e].x*R[e].x,A+=R[e].x*R[e].y;const I=(_*A-b*M)/(_*x-b*b);let F=0;const D=R[4].x>R[0].x,j=R[4].y>R[0].y;return I===1/0?F=j?90:270:0===I?F=D?0:180:I>0?F=D?180*Math.atan(I)/Math.PI:180*Math.atan(I)/Math.PI+180:I<0&&(F=j?180+180*Math.atan(I)/Math.PI:360+180*Math.atan(I)/Math.PI),{ics:s,icsToPixelTransform:w,icsExtent:v,northDirection:F}}async generateRasterInfo(e,t){e=(0,_.PZ)(I.A,e);const r={...t,query:this._getQueryParams()};if(!e||"none"===e.functionName?.toLowerCase()||this._isVectorFieldResampleFunction(e))return this.serviceRasterInfo??(0,fi.Tw)(i(this.parsedUrl),this.sourceJSON,r);const s=function(e){const t=JSON.stringify(e),i=t.includes('"rasterFunctionDefinition":{'),r=i?t.match(/"type":"(.*?FunctionArguments")/gi):t.match(/"rasterFunction":"(.*?")/gi),s=r?.map((e=>i?e.slice(8,-18):e.slice(18,-1)));return s?s.join("/"):null}(e);if(!s)throw new o.A("imagery-layer:generate-raster-info","the rendering rule is not supported");if(this._functionRasterInfos[s])return this._functionRasterInfos[s];const n=(0,fi.X6)(i(this.parsedUrl),e,r);this._functionRasterInfos[s]=n;try{return await n}catch(e){throw this._functionRasterInfos[s]=null,e}}getExportImageServiceParameters(e,t,r,s){const n=gi((e=e.clone().shiftCentralMeridian()).spatialReference,i(this.parsedUrl));this.pixelType!==this.serviceRasterInfo.pixelType&&(this.exportImageServiceParameters.pixelType=this.pixelType);const o=this.exportImageServiceParameters.toJSON(),{bandIds:a,noData:l}=o;let{renderingRule:u}=o;const p=this.rasterFunction?.rasterFunctionDefinition,c=this.renderer?.type,m=!c||"raster-stretch"===c||"raster-colormap"===c||"unique-value"===c||"class-breaks"===c||"raster-shaded-relief"===c;if(a?.length&&this._hasRasterFunction(this.rasterFunction)&&!p&&m){const e={rasterFunction:"ExtractBand",rasterFunctionArguments:{BandIds:a}};if("Stretch"===u.rasterFunction)e.rasterFunctionArguments.Raster=u.rasterFunctionArguments.Raster,u.rasterFunctionArguments.Raster=e;else if("Colormap"===u.rasterFunction){const t=u.rasterFunctionArguments.Raster;"Stretch"===t?.rasterFunction?(e.rasterFunctionArguments.Raster=t.rasterFunctionArguments.Raster,t.rasterFunctionArguments.Raster=e):(e.rasterFunctionArguments.Raster=t,u.rasterFunctionArguments.Raster=e)}else e.rasterFunctionArguments.Raster=u,u=e;o.bandIds=void 0}else o.bandIds=a?.join(",");Array.isArray(l)&&l.length>0&&(o.noData=l.join(","));const d=this._processMultidimensionalIntersection(null,s,this.exportImageServiceParameters.mosaicRule);if(d.isOutSide)return null;o.mosaicRule=null!=d.mosaicRule?JSON.stringify(d.mosaicRule):null,s=d.timeExtent,o.renderingRule=this._getRenderingRuleString(I.A.fromJSON(u));const y={};if(null!=s){const{start:e,end:t}=s.toJSON();e&&t&&e===t?y.time=""+e:null==e&&null==t||(y.time=`${e??"null"},${t??"null"}`)}return{bbox:e.xmin+","+e.ymin+","+e.xmax+","+e.ymax,bboxSR:n,imageSR:n,size:t+","+r,...o,...y}}async getSamples(e,t){const i=await this._fetchCapabilities(t?.signal);if(!i?.operations.supportsGetSamples)throw new o.A("imagery-layer:get-samples","getSamples operation is not supported on the input image service");e=(0,w.o8)(e);const{raster:r}=this;return r&&null==e.raster&&(e.raster=r),async function(e,t,i){const r=(t=(0,_.PZ)(Nt,t)).toJSON();ui(r),r.outFields?.length&&(r.outFields=r.outFields.join(","));const s=await(0,le.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=yi(n));const o=(0,ue.Dl)(e),a=(0,ue.lF)({...o.query,f:"json",...r}),l=(0,ue.jV)(a,i),{data:u}=await(0,f.A)(`${o.path}/getSamples`,l),p=u?.samples?.map((e=>{const t="NaN"===e.value||""===e.value?null:e.value.split(" ").map((e=>Number(e)));return{...e,pixelValue:t}}));return Jt.fromJSON({samples:p})}(this.url,e,this._getRequestOptions(t))}async identify(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsIdentify)throw new o.A("imagery-layer:identify","identify operation is not supported on the input image service");e=(0,w.o8)(e),this.version<10.91&&"extent"===e.geometry?.type&&(e.geometry=Le.A.fromExtent(e.geometry));const i=this._processMultidimensionalIntersection(e.geometry,e.timeExtent,e.mosaicRule||this.mosaicRule);if(i.isOutSide)throw new o.A("imagery-layer:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");e.timeExtent=i.timeExtent,e.mosaicRule=i.mosaicRule;const{raster:r,rasterFunction:s}=this;return s&&null==e.rasterFunction&&(e.rasterFunction=s),r&&null==e.raster&&(e.raster=r),ci(this.url,e,this._getRequestOptions(t))}async imageToMap(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMap)throw new o.A("imagery-layer:image-to-map","imageToMap operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)($t,t)).toJSON();t.geometry.spatialReference.imageCoordinateSystem&&(r.geometry=yi(t.geometry)),t.depthOffset&&t.adjust||delete r.options;const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...r}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/imageToMap`,o);return(0,xe.rS)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async imageToMapMultiray(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsImageToMapMultiray)throw new o.A("imagery-layer:image-to-map-multiray","imageToMapMultiray operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)(Et,t)).toJSON();t.rasterIds?.length&&(r.rasterIds=t.rasterIds.join(","));const s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...r}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/imageToMapMultiray`,o);return(0,xe.rS)(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async mapToImage(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsMapToImage)throw new o.A("imagery-layer:map-to-image","mapToImage operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)(ti,t)).toJSON(),s=await(0,le.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=yi(n)),t.visibleOnly||delete r.options;const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=gi(o));const a=(0,ue.Dl)(e),l=(0,ue.lF)({...a.query,f:"json",...r}),u=(0,ue.jV)(l,i),{data:p}=await(0,f.A)(`${a.path}/mapToImage`,u);return(0,xe.rS)(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async findImages(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsFindImages)throw new o.A("imagery-layer:find-images","findImages operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)(me,t)).toJSON(),s=await(0,le.el)([t.fromGeometry,t.toGeometry]);null!=s[0]&&(r.fromGeometry=yi(s[0]),s[0].spatialReference&&(r.inSR=gi(s[0].spatialReference))),null!=s[1]&&(r.toGeometry=yi(s[1])),t.objectIds?.length&&(r.objectIds=r.objectIds.join(","));const n=(0,ue.Dl)(e),o=(0,ue.lF)({...n.query,f:"json",...r}),a=(0,ue.jV)(o,i),{data:l}=await(0,f.A)(`${n.path}/find`,a);return fe.fromJSON(l)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async getImageUrl(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsGetImageUrl)throw new o.A("imagery-layer:get-image-url","getImageUrl operation is not supported on the input image service");return async function(e,t,i){const r=(t=(0,_.PZ)(Lt,t)).toJSON(),s=(0,ue.Dl)(e),n=(0,ue.lF)({...s.query,f:"json",...r}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(`${s.path}/getImageUrl`,o);return Bt.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}createQuery(){return new bi.A({outFields:["*"],returnGeometry:!0,where:this.definitionExpression||"1=1"})}async queryBoundary(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryBoundary)throw new o.A("imagery-layer:query-boundary","queryBoundary operation is not supported on the input image service");return e=e??{outSpatialReference:this.spatialReference},async function(e,t,i){t=(0,_.PZ)($e,t);const r=(0,ue.Dl)(e),s=t.toJSON();t.outSpatialReference&&(s.outSR=gi(t.outSpatialReference));const n=(0,ue.lF)({...r.query,f:"json",...s}),o=(0,ue.jV)(n,i),{data:a}=await(0,f.A)(r.path+"/queryBoundary",o);return Be.fromJSON(a)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasters(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,_i.s)(this.url,e,t)}async queryObjectIds(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,Ri.V)(this.url,e,t)}async queryGPSInfo(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQueryGPSInfo)throw new o.A("imagery-layer:query-gps-info","queryGPSInfo operation is not supported on the input image service");return e=e??{where:"1=1"},async function(e,t,i){const r=(t=(0,_.PZ)(it,t)).toJSON();ui(r),r.objectIds?.length&&(r.objectIds=r.objectIds.join(",")),r.geometry||r.objectIds||r.time||r.where||(r.where="1=1");const s=await(0,le.el)(t.geometry),n=s?.[0];null!=n&&(r.geometry=yi(n));const o=n?.spatialReference??t.geometry?.spatialReference;o&&(r.inSR=gi(o));const a=(0,ue.Dl)(e),l=(0,ue.lF)({...a.query,f:"json",...r}),u=(0,ue.jV)(l,i),{data:p}=await(0,f.A)(`${a.path}/queryGPSInfo`,u);return lt.fromJSON(p)}(i(this.parsedUrl),e,this._getRequestOptions(t))}async queryRasterCount(e,t){return({query:e,requestOptions:t}=await this._prepareForQuery(e,t)),(0,vi.I)(this.url,e,t)}async queryVisibleRasters(e,t){if(!e)throw new o.A("imagery-layer: query-visible-rasters","missing query parameter");await this.load();const{pixelSize:i,returnDomainValues:r,returnTopmostRaster:s,showNoDataRecords:n}=t||{pixelSize:null,returnDomainValues:!1,returnTopmostRaster:!1,showNoDataRecords:!1};let a=!1,l=null,u=null;const p=ee.F_.servicePixelValue.toLowerCase(),c=this._rasterFunctionNamesIndex;if(null!=e.outFields&&(a=e.outFields.some((e=>!e.toLowerCase().startsWith(p))),this.version>=10.4)){const t=e.outFields.filter((e=>e.toLowerCase().startsWith(p)&&e.length>p.length)).map((e=>{const t=e.slice(p.length+1);return[this._updateRenderingRulesFunctionName(t,c),t]}));l=t.map((e=>new I.A({functionName:e[0]}))),u=t.map((e=>e[1]));const{rasterFunction:i}=this;0===l.length?i?.functionName?(l.push(i),u.push(i.functionName)):l=null:i?.functionName&&!l.some((e=>e.functionName===i.functionName))&&(l.push(i),u.push(i.functionName))}const m=null==e.outSpatialReference||e.outSpatialReference.equals(this.spatialReference),{multidimensionalSubset:d}=this;let y=e.timeExtent||this.timeExtent;if(d){const{isOutside:t,intersection:i}=(0,re.Rp)(d,{geometry:e.geometry,timeExtent:e.timeExtent,multidimensionalDefinition:this.exportImageServiceParameters.mosaicRule?.multidimensionalDefinition});if(t)throw new o.A("imagery-layer:query-visible-rasters","the request cannot be fulfilled when falling outside of the multidimensional subset");null!=i?.timeExtent&&(y=i.timeExtent)}const h=this._combineMosaicRuleWithTimeExtent(this.exportImageServiceParameters.mosaicRule,y);let g=e.geometry;this.version<10.91&&"extent"===g?.type&&(g=Le.A.fromExtent(g));const f=this._getQueryParams({geometry:g,timeExtent:y,mosaicRule:h,rasterFunction:this.version<10.4?this.rasterFunction:null,rasterFunctions:l,pixelSize:i,returnCatalogItems:a,returnGeometry:m,raster:this.raster,maxItemCount:s?1:null});delete f.f;const w=new ft(f);try{await this._generateRasterInfo(this.rasterFunction);const i=await ci(this.url,w,{signal:t?.signal,query:{...this.customParameters}}),s=e.outFields,o=null!=i.value&&i.value.toLowerCase().includes("nodata");if(!a||m||!i?.catalogItems?.features.length||!n&&o)return this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s});const l=this.objectIdField||"ObjectId",p=i.catalogItems?.features??[],c=p.map((e=>e.attributes?.[l])),d=new bi.A({objectIds:c,returnGeometry:!0,outSpatialReference:e.outSpatialReference,outFields:[l]}),y=await this.queryRasters(d);return y?.features?.length&&y.features.forEach((t=>{p.forEach((i=>{i.attributes[l]===t.attributes[l]&&t.geometry&&(i.geometry=t.geometry.clone(),null!=e.outSpatialReference&&(i.geometry.spatialReference=e.outSpatialReference))}))})),this._processVisibleRastersResponse(i,{returnDomainValues:r,templateRRFunctionNames:u,showNoDataRecords:n,templateFields:s})}catch{throw new o.A("imagery-layer:query-visible-rasters","encountered error when querying visible rasters")}}async fetchVariableStatisticsHistograms(e,t){const r=(0,f.A)(i(this.parsedUrl)+"/statistics",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.statistics)),s=(0,f.A)(i(this.parsedUrl)+"/histograms",{query:this._getQueryParams({variable:e}),signal:t}).then((e=>e.data?.histograms)),n=await Promise.all([r,s]);return n[0]&&n[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),{statistics:n[0]||null,histograms:n[1]||null}}async createFlowMesh(e,t){const i=this._rasterJobHandler.instance;return i?i.createFlowMesh(e,t):(0,Si.CW)(e.meshType,e.simulationSettings,e.flowData,null!=t.signal?t.signal:(new AbortController).signal)}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo.multidimensionalInfo;return(0,re.z2)(this.multidimensionalSubset,t)}async _fetchService(e){await this._fetchServiceInfo(e),this.rasterInfo||(this.rasterInfo=this.serviceRasterInfo);const t=this.sourceJSON,r=null!=this.serviceRasterInfo?Promise.resolve(this.serviceRasterInfo):(0,fi.Tw)(i(this.parsedUrl),t,{signal:e,query:this._getQueryParams()}).then((e=>(this._set("serviceRasterInfo",e),this._set("multidimensionalInfo",e.multidimensionalInfo),(0,fi.E9)(e,t),e))),s=this._hasRasterFunction(this.rasterFunction)?this._generateRasterInfo(this.rasterFunction,{signal:e}):null,n=this._getRasterFunctionInfos();return Promise.all([r,s,n]).then((e=>{e[1]?this._set("rasterInfo",e[1]):this._set("rasterInfo",e[0]),e[2]&&this._set("rasterFunctionInfos",e[2]),this.internalRenderer&&!this._isSupportedRenderer(this.internalRenderer)&&(this._set("internalRenderer",null),p.A.getLogger(this).warn("ArcGISImageService","Switching to the default renderer. Renderer applied is not valid for this Imagery Layer")),this._set("internalRenderer",this._configRenderer(this.renderer)),this.addHandles([(0,v.wB)((()=>this.rasterFunction),(e=>{(this.renderer||this.symbolizer||this.popupEnabled&&this.popupTemplate)&&this._generateRasterInfo(e).then((e=>{e&&(this.rasterInfo=e)}))}))]);const{serviceRasterInfo:t}=this;null!=t.multidimensionalInfo&&this._updateMultidimensionalDefinition(t)}))}_combineMosaicRuleWithTimeExtent(e,t){const i=this.timeInfo,{multidimensionalInfo:r}=this.serviceRasterInfo;if(null==e||null==r||null==t||null==i?.startField)return e;const{startField:s}=i,n=r.variables.some((e=>e.dimensions.some((e=>e.name===s))))?s:"StdTime";if(e=e.clone(),"mosaic-dataset"===this.sourceType)return e.multidimensionalDefinition=e.multidimensionalDefinition?.filter((e=>e.dimensionName!==n)),this._cleanupMultidimensionalDefinition(e);e.multidimensionalDefinition=e.multidimensionalDefinition||[];const o=e.multidimensionalDefinition.filter((e=>e.dimensionName===n)),a=null!=t.start?t.start.getTime():null,l=null!=t.end?t.end.getTime():null,u=null==a||null==l||a===l,p=u?[a||l]:[[a,l]],c=this.version>=10.8;if(o.length)o.forEach((e=>{e.dimensionName===n&&(c?(e.dimensionName=null,e.isSlice=!1,e.values=[]):(e.isSlice=u,e.values=p))}));else if(!c){const t=e.multidimensionalDefinition.filter((e=>null!=e.variableName&&null==e.dimensionName));t.length?t.forEach((e=>{e.dimensionName=n,e.isSlice=u,e.values=p})):e.multidimensionalDefinition.push(new x.A({variableName:"",dimensionName:n,isSlice:u,values:p}))}return this._cleanupMultidimensionalDefinition(e)}_cleanupMultidimensionalDefinition(e){return null==e?null:(e.multidimensionalDefinition&&(e.multidimensionalDefinition=e.multidimensionalDefinition.filter((e=>!(!e.variableName&&!e.dimensionName))),0===e.multidimensionalDefinition.length&&(e.multidimensionalDefinition=null)),"mosaic-dataset"!==this.sourceType&&null==e.multidimensionalDefinition?null:e)}async _prepareForQuery(e,t){if(!(await this._fetchCapabilities(t?.signal)).operations.supportsQuery)throw new o.A("imagery-layer:query-rasters","query operation is not supported on the input image service");return e=null!=e?(0,_.PZ)(bi.A,e):this.createQuery(),t=this._getRequestOptions(t),this.raster&&(t.query={...t.query,raster:this.raster}),{query:e,requestOptions:t}}async _initJobHandler(){if(null!=this._rasterJobHandler.connectionPromise)return this._rasterJobHandler.connectionPromise;const e=new ie.A;this._rasterJobHandler.connectionPromise=e.initialize().then((()=>{this._rasterJobHandler.instance=e}),(()=>{})),await this._rasterJobHandler.connectionPromise}_shutdownJobHandler(){this._rasterJobHandler.instance&&this._rasterJobHandler.instance.destroy(),this._rasterJobHandler.instance=null,this._rasterJobHandler.connectionPromise=null,this._rasterJobHandler.refCount=0,this._cachedRendererJson=null}_isSupportedRenderer(e){const{rasterInfo:t,rasterFunction:i}=this;return"unique-value"===e.type&&this._hasRasterFunction(i)&&1===t?.bandCount&&["u8","s8"].includes(t.pixelType)||null!=t&&null!=e&&(0,oe.fp)(t).includes(e.type)}async _fetchCapabilities(e){return this.capabilities||await this._fetchServiceInfo(e),this.capabilities}async _fetchServiceInfo(e){let t=this.sourceJSON;if(!t){const{data:r,ssl:s}=await(0,f.A)(i(this.parsedUrl),{query:this._getQueryParams(),signal:e});t=r,this.sourceJSON=t,s&&(this.url=this.url.replace(/^http:/i,"https:"))}if(t.capabilities?.toLowerCase().split(",").map((e=>e.trim())).indexOf("tilesonly")>-1)throw new o.A("imagery-layer:fetch-service-info","use ImageryTileLayer to open tiles-only image services");this.read(t,{origin:"service",url:this.parsedUrl})}_isMosaicDataset(e){return e.serviceSourceType?"esriImageServiceSourceTypeMosaicDataset"===e.serviceSourceType:e.fields?.length>0}_isMosaicRuleSupported(e){if(!e)return!1;const t=this._isMosaicDataset(e),i=e.currentVersion>=10.71&&e.hasMultidimensions&&!(e.fields?.length>1);return t||i}_isVectorFieldResampleFunction(e){if(null==e)return!1;const{functionName:t,functionArguments:i}=e,r="resample"===t?.toLowerCase(),s=i?.ResampleType||i?.resampleType;return r&&(7===s||10===s)}_isPicture(){return!this.format||this.format.includes("jpg")||this.format.includes("png")}_configRenderer(e){const t=this._isPicture(),{rasterInfo:i}=this;if(!t&&!this.pixelFilter||this._isVectorDataSet()){const t=this.mosaicRule?.multidimensionalDefinition?.[0].variableName,r=(0,oe.I8)({variableName:t,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&i.bandCount>=3){const e=r?.bandIds??(0,oe.ci)(i);!e||3===i.bandCount&&0===e[0]&&1===e[1]&&2===e[2]||(this.bandIds=e)}e||(e=r?.renderer??(0,oe.PD)(i,{bandIds:this.bandIds,variableName:this.rasterFunction?null:t}));const s=(0,oe.$P)(e.toJSON());this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=i):this.symbolizer=new ae.A({rendererJSON:s,rasterInfo:i}),this.symbolizer.bind().success||(this.symbolizer=null)}return e}_clonePixelData(e){return null==e?e:{extent:e.extent&&e.extent.clone(),pixelBlock:null!=e.pixelBlock?e.pixelBlock.clone():null}}_getQueryParams(e){null!=e?.renderingRule&&"string"!=typeof e.renderingRule&&(e.renderingRule=this._getRenderingRuleString(e.renderingRule));const{raster:t,viewId:i}=this;return{raster:t,viewId:i,f:"json",...e,...this.customParameters}}_getRequestOptions(e){return{...e,query:{...e?.query,...this.customParameters}}}_decodePixelBlock(e,t,i){return this._rasterJobHandler.instance?this._rasterJobHandler.instance.decode({data:e,options:t}):(0,se.D)(e,t,i)}async _getRasterFunctionInfos(e){const t=this.sourceJSON.rasterFunctionInfos;if(this.loaded)return t;if(t&&this.version>=10.3){if(1===t.length&&"none"===t[0].name.toLowerCase())return t;const r=await(0,f.A)(i(this.parsedUrl)+"/rasterFunctionInfos",{query:this._getQueryParams(),signal:e});return r.data?.rasterFunctionInfos}return null}_canRequestImageElement(e){return!this.pixelFilter&&(!e||e.includes("png"))}async _requestArrayBuffer(e){const{imageProps:t,requestAsImageElement:r,returnImageBitmap:s,signal:n}=e;if(r&&this._canRequestImageElement(t.format)){const r=`${i(this.parsedUrl)}/exportImage`,{data:o}=await(0,f.A)(r,{responseType:s?"blob":"image",query:this._getQueryParams({f:"image",...this.refreshParameters,...e.imageServiceParameters}),signal:n});return o instanceof Blob?{imageBitmap:await(0,W.m)(o,r,n),params:t}:{imageOrCanvasElement:o,params:t}}const a=this._initJobHandler(),l=(0,f.A)(i(this.parsedUrl)+"/exportImage",{responseType:"array-buffer",query:this._getQueryParams({f:"image",...e.imageServiceParameters}),signal:n}),u=(await Promise.all([l,a]))[0].data,p=t.format||"jpgpng";let c=p;if("bsq"!==c&&"bip"!==c&&(c=(0,se.g)(u)),!c)throw new o.A("imagery-layer:fetch-image","unsupported format signature "+String.fromCharCode.apply(null,new Uint8Array(u)));const m={signal:n},d="gif"===p||"bmp"===p||p.includes("png")&&("png"===c||"jpg"===c)?(0,se.D)(u,{useCanvas:!0,...t},m):this._decodePixelBlock(u,{width:t.width,height:t.height,planes:null,pixelType:null,noDataValue:null,format:p},m);return{pixelData:{pixelBlock:await d,extent:t.extent},params:t}}_generateRasterInfo(e,t){return this.generateRasterInfo(e,t).catch((()=>null))}_isValidCustomizedMosaicRule(e){return e&&JSON.stringify(e.toJSON())!==JSON.stringify(this.defaultMosaicRule?.toJSON())}_updateMultidimensionalDefinition(e){if(this._isValidCustomizedMosaicRule(this.mosaicRule))return;let t=(0,re.fy)(e,{multidimensionalSubset:this.multidimensionalSubset});if(null!=t&&t.length>0){this.mosaicRule=this.mosaicRule||new B.A;const e=this.mosaicRule.multidimensionalDefinition;!this.sourceJSON.defaultVariableName&&this.rasterFunction&&"none"!==this.rasterFunction.functionName?.toLowerCase()&&t.forEach((e=>e.variableName="")),t=t.filter((({variableName:e,dimensionName:t})=>e&&"*"!==e||t)),!e?.length&&t.length&&(this.mosaicRule.multidimensionalDefinition=t)}}_processVisibleRastersResponse(e,t){t=t||{};const i=e.value,{templateRRFunctionNames:r,showNoDataRecords:s,returnDomainValues:n,templateFields:o}=t,a=e.processedValues;let l=e.catalogItems?.features,u=e.properties?.Values?.map((e=>e.replaceAll(/ /gi,", ")))||[];const p=this.objectIdField||"ObjectId",c="string"==typeof i&&i.toLowerCase().includes("nodata"),m=[];if(i&&!l&&!c){const e={};e[p]=0,u=[i],l=[new h.A({geometry:this.fullExtent,attributes:e})],this.multidimensionalInfo&&"raster-dataset"===this.sourceType&&(0,ee.eS)(this.rasterFields,e,this.mosaicRule?.multidimensionalDefinition)}if(!l)return[];this._updateResponseFieldNames(l,o),c&&!s&&(l=[]);const{itemPixelValue:d,servicePixelValue:y}=ee.F_,g=this.rasterFields.some((e=>e.name===d));for(let e=0;e<l.length;e++){const t=l[e];if(null!=i){const n=u[e],o=this.rasterFunction&&a&&a.length>0&&r&&r.length>0&&r.includes(this.rasterFunction.functionName)?a[r.indexOf(this.rasterFunction.functionName)]:i;if("nodata"===n.toLowerCase()&&!s)continue;g&&(t.attributes[d]=n),t.attributes[y]=o,this._updateFeatureWithMagDirValues(t,n);const l=this.fields&&this.fields.length>0;let p=this.rasterFunction&&null!=this.serviceRasterInfo.attributeTable?l?n:i:o;this.rasterFunction||(p=l?n:i),this._updateFeatureWithRasterAttributeTableValues(t,p)}if(t.sourceLayer=t.layer=this,n&&this._updateFeatureWithDomainValues(t),r&&a&&r.length===a.length)for(let e=0;e<r.length;e++){const i=`${ee.F_.servicePixelValue}.${r[e]}`;t.attributes[i]=a[e]}m.push(l[e])}return m}_processMultidimensionalIntersection(e,t,i){const{multidimensionalSubset:r}=this;if(!r)return{isOutSide:!1,timeExtent:t,mosaicRule:i=this._combineMosaicRuleWithTimeExtent(i,t)};if(r){const{isOutside:i,intersection:s}=(0,re.Rp)(r,{geometry:e,timeExtent:t});if(i)return{isOutSide:!0,timeExtent:null,mosaicRule:null};null!=s?.timeExtent&&(t=s.timeExtent)}if(i=this._combineMosaicRuleWithTimeExtent(i,t),i?.multidimensionalDefinition){const{isOutside:e}=(0,re.Rp)(r,{multidimensionalDefinition:i.multidimensionalDefinition});if(e)return{isOutSide:!0,timeExtent:null,mosaicRule:null}}return{isOutSide:!1,timeExtent:t,mosaicRule:i}}_updateFeatureWithRasterAttributeTableValues(e,t){const i=this.rasterInfo.attributeTable||this.serviceRasterInfo.attributeTable;if(null==i)return;const{features:r,fields:s}=i,n=s.map((e=>e.name)).find((e=>"value"===e.toLowerCase()));if(!n)return;const o=r.filter((e=>e.attributes[n]===(null!=t?parseInt(t,10):null)));o&&o[0]&&s.forEach((t=>{const i=ee.ER+t.name;e.attributes[i]=o[0].attributes[t.name]}))}_updateFeatureWithMagDirValues(e,t){if(!this._isVectorDataSet())return;const i=t.split(/,\s*/).map((e=>parseFloat(e))),r=i.map((e=>[e])),s=i.map((e=>({minValue:e,maxValue:e,noDataValue:null}))),n=new Y.A({height:1,width:1,pixelType:"f32",pixels:r,statistics:s});null!=this.pixelFilter&&this.pixelFilter({pixelBlock:n,extent:new ze.A(0,0,0,0,this.spatialReference)});const o="esriImageServiceDataTypeVector-MagDir"===this.serviceDataType?[n.pixels[0][0],n.pixels[1][0]]:(0,ne.Lu)([n.pixels[0][0],n.pixels[1][0]]);e.attributes[ee.F_.magnitude]=o[0],e.attributes[ee.F_.direction]=o[1]}_updateFeatureWithDomainValues(e){const t=this.fields&&this.fields.filter((e=>e.domain&&"coded-value"===e.domain.type));null!=t&&t.forEach((t=>{const i=e.attributes[t.name];if(null!=i){const r=t.domain.codedValues.find((e=>e.code===i));r&&(e.attributes[t.name]=r.name)}}))}_updateResponseFieldNames(e,t){if(!t||t.length<1)return;const i=this.fieldsIndex;null!=i&&e.forEach((e=>{if(e?.attributes)for(const r of t){const t=i.get(r)?.name;t&&t!==r&&(e.attributes[r]=e.attributes[t],delete e.attributes[t])}}))}_getRenderingRuleString(e){if(e){let t=e.toJSON();return t=t.rasterFunctionDefinition??t,(t.thumbnail||t.thumbnailEx)&&(t.thumbnail=t.thumbnailEx=null),JSON.stringify(t)}return null}_hasRasterFunction(e){return null!=e?.functionName&&"none"!==e.functionName.toLowerCase()}_updateRenderingRulesFunctionName(e,t){if(!e||e.length<1)return;if("Raw"===e)return e.replace("Raw","None");const i=e.toLowerCase().replaceAll(/ /gi,"_");return t.has(i)?t.get(i):e}_isRFTJson(e){return e?.name&&e.arguments&&e.function&&e.hasOwnProperty("functionType")}_isVectorDataSet(){return"esriImageServiceDataTypeVector-UV"===this.serviceDataType||"esriImageServiceDataTypeVector-MagDir"===this.serviceDataType}_applyMosaicAndRenderingRules(e){const{raster:t,mosaicRule:i,rasterFunction:r}=this;r&&null==e.rasterFunction&&(e.rasterFunction=r),i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_applyMosaicRule(e){const{raster:t,mosaicRule:i}=this;i&&null==e.mosaicRule&&(e.mosaicRule=i),t&&null==e.raster&&(e.raster=t)}_readCapabilities(e){const t=e.capabilities?e.capabilities.toLowerCase().split(",").map((e=>e.trim())):["image","catalog"],{currentVersion:i,advancedQueryCapabilities:r,maxRecordCount:s}=e,n=t.includes("image"),o="esriImageServiceDataTypeElevation"===e.serviceDataType,a=!(!e.spatialReference&&!e.extent?.spatialReference),l=t.includes("edit"),u=t.includes("mensuration")&&a,p=null==e.mensurationCapabilities?[]:e.mensurationCapabilities.toLowerCase().split(",").map((e=>e.trim())),c=u&&p.includes("basic"),m=this._isMosaicDataset(e)&&t.includes("catalog"),d=t.includes("download"),y=i>=10.7&&o||i>=11.4&&(o||u&&p.includes("3d"));return{data:{supportsAttachment:!1},operations:{supportsComputeHistograms:n,supportsExportImage:n,supportsIdentify:n,supportsImageToMap:i>=11.2&&m,supportsImageToMapMultiray:i>=11.2&&m,supportsMapToImage:i>=11.2&&m,supportsFindImages:i>=11.2&&m,supportsGetImageUrl:i>=11.3&&d,supportsMeasure:u,supportsMeasureFromImage:i>=11.2,supportsDownload:d,supportsQuery:m&&e.fields&&e.fields.length>0,supportsGetSamples:i>=10.2&&n,supportsProject:i>=10.3&&n,supportsComputeStatisticsHistograms:i>=10.4&&n,supportsQueryBoundary:i>=10.6&&n,supportsCalculateVolume:y,supportsComputePixelLocation:i>=10.7&&m,supportsComputeAngles:i>=10.91,supportsQueryGPSInfo:i>=11.2&&m,supportsAdd:l,supportsDelete:l,supportsEditing:l,supportsUpdate:l,supportsCalculate:!1,supportsTruncate:!1,supportsValidateSql:!1,supportsChangeTracking:!1,supportsQueryAttachments:!1,supportsResizeAttachments:!1,supportsSync:!1,supportsExceedsLimitStatistics:!1,supportsQueryAnalytics:!1,supportsQueryBins:!1,supportsQueryTopFeatures:!1,supportsAsyncConvert3D:!1},query:{maxRecordCount:s,maxRecordCountFactor:void 0,supportsStatistics:!!r?.supportsStatistics,supportsOrderBy:!!r?.supportsOrderBy,supportsDistinct:!!r?.supportsDistinct,supportsPagination:!!r?.supportsPagination,supportsStandardizedQueriesOnly:!!r?.useStandardizedQueries,supportsPercentileStatistics:!!r?.supportsPercentileStatistics,supportsCentroid:!!r?.supportsReturningGeometryCentroid,supportsCurrentUser:!1,supportsDistance:!!r?.supportsQueryWithDistance,supportsExtent:!!r?.supportsReturningQueryExtent,supportsGeometryProperties:!!r?.supportsReturningGeometryProperties,supportsHavingClause:!!r?.supportsHavingClause,supportsQuantization:!1,supportsQuantizationEditMode:!1,supportsQueryGeometry:!1,supportsResultType:!1,supportsReturnMesh:!1,supportsMaxRecordCountFactor:!1,supportsSqlExpression:!1,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!1,supportsQueryByOthers:!1,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!1,supportsCacheHint:!1,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsDefaultSpatialReference:!!r?.supportsDefaultSR,supportsFullTextSearch:!1,supportsCompactGeometry:!1,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},mensuration:{supportsDistanceAndAngle:c,supportsAreaAndPerimeter:c,supportsPointOrCentroid:c,supportsHeightFromBaseAndTop:u&&p.includes("base-top height"),supportsHeightFromBaseAndTopShadow:u&&p.includes("base-top shadow height"),supportsHeightFromTopAndTopShadow:u&&p.includes("top-top shadow height"),supports3D:u&&p.includes("3d")}}}};function i(e){return e?.path??""}return(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_functionRasterInfos",void 0),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_rasterJobHandler",void 0),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"_cachedRendererJson",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_serviceSupportsMosaicRule",void 0),(0,r._)([(0,b.w)("_serviceSupportsMosaicRule",["currentVersion","fields"])],t.prototype,"readServiceSupportsMosaicRule",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"_rasterFunctionNamesIndex",null),(0,r._)([(0,u.MZ)()],t.prototype,"adjustAspectRatio",void 0),(0,r._)([(0,u.MZ)({type:[_.jz],json:{write:!0}})],t.prototype,"bandIds",void 0),(0,r._)([(0,b.w)("bandIds")],t.prototype,"readBandIds",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],t.prototype,"capabilities",void 0),(0,r._)([(0,b.w)("service","capabilities",["capabilities","currentVersion","serviceDataType"])],t.prototype,"readCapabilities",null),(0,r._)([(0,u.MZ)({type:Number})],t.prototype,"compressionQuality",void 0),(0,r._)([(0,m.K)("compressionQuality")],t.prototype,"writeCompressionQuality",null),(0,r._)([(0,u.MZ)({type:Number})],t.prototype,"compressionTolerance",void 0),(0,r._)([(0,m.K)("compressionTolerance")],t.prototype,"writeCompressionTolerance",null),(0,r._)([(0,u.MZ)({json:{read:{source:"copyrightText"}}})],t.prototype,"copyright",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,dependsOn:["_serviceSupportsMosaicRule"]})],t.prototype,"defaultMosaicRule",void 0),(0,r._)([(0,b.w)("defaultMosaicRule",["defaultMosaicMethod"])],t.prototype,"readDefaultMosaicRule",null),(0,r._)([(0,u.MZ)({type:String,json:{name:"layerDefinition.definitionExpression",write:{enabled:!0,allowNull:!0}}})],t.prototype,"definitionExpression",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,constructOnly:!0})],t.prototype,"exportImageServiceParameters",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"rasterInfo",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:[Q.A]})],t.prototype,"fields",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"fieldsIndex",null),(0,r._)([(0,u.MZ)({type:["png","png8","png24","png32","jpg","bmp","gif","jpgpng","lerc","tiff","bip","bsq"],json:{write:!0}})],t.prototype,"format",null),(0,r._)([(0,b.w)("service","format",["serviceDataType"])],t.prototype,"readFormat",null),(0,r._)([(0,u.MZ)({type:ze.A})],t.prototype,"fullExtent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"hasMultidimensions",void 0),(0,r._)([(0,u.MZ)({json:{read:{source:"maxImageHeight"}}})],t.prototype,"imageMaxHeight",void 0),(0,r._)([(0,u.MZ)({json:{read:{source:"maxImageWidth"}}})],t.prototype,"imageMaxWidth",void 0),(0,r._)([(0,u.MZ)({type:String,json:{type:H.SZ.jsonValues,read:H.SZ.read,write:H.SZ.write}})],t.prototype,"interpolation",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"minScale",void 0),(0,r._)([(0,b.w)("service","minScale")],t.prototype,"readMinScale",null),(0,r._)([(0,u.MZ)()],t.prototype,"maxScale",void 0),(0,r._)([(0,b.w)("service","maxScale")],t.prototype,"readMaxScale",null),(0,r._)([(0,u.MZ)({type:B.A})],t.prototype,"mosaicRule",null),(0,r._)([(0,b.w)("mosaicRule",["mosaicRule","defaultMosaicMethod"])],t.prototype,"readMosaicRule",null),(0,r._)([(0,m.K)("mosaicRule")],t.prototype,"writeMosaicRule",null),(0,r._)([(0,u.MZ)()],t.prototype,"multidimensionalInfo",void 0),(0,r._)([(0,u.MZ)({type:X.A,json:{write:!0}})],t.prototype,"multidimensionalSubset",void 0),(0,r._)([(0,u.MZ)({json:{type:_.jz}})],t.prototype,"noData",void 0),(0,r._)([(0,m.K)("noData")],t.prototype,"writeNoData",null),(0,r._)([(0,u.MZ)({type:String,json:{type:H.hm.jsonValues,read:H.hm.read,write:H.hm.write}})],t.prototype,"noDataInterpretation",void 0),(0,r._)([(0,u.MZ)({type:String,readOnly:!0,json:{read:{source:["fields"]}}})],t.prototype,"objectIdField",void 0),(0,r._)([(0,b.w)("objectIdField")],t.prototype,"readObjectIdField",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"geometryType",void 0),(0,r._)([(0,u.MZ)({})],t.prototype,"typeIdField",void 0),(0,r._)([(0,u.MZ)({})],t.prototype,"types",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"parsedUrl",null),(0,r._)([(0,u.MZ)({type:Function})],t.prototype,"pixelFilter",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"raster",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"sourceType",void 0),(0,r._)([(0,b.w)("sourceType",["serviceSourceType","fields"])],t.prototype,"readSourceType",null),(0,r._)([(0,u.MZ)()],t.prototype,"viewId",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"renderer",null),(0,r._)([(0,u.MZ)({types:g.uy,json:{name:"layerDefinition.drawingInfo.renderer",origins:{"web-scene":{types:g.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],t.prototype,"internalRenderer",null),(0,r._)([(0,b.w)("internalRenderer")],t.prototype,"readRenderer",null),(0,r._)([(0,m.K)("internalRenderer")],t.prototype,"writeRenderer",null),(0,r._)([(0,u.MZ)({clonable:!1})],t.prototype,"symbolizer",void 0),(0,r._)([(0,u.MZ)(M.ke)],t.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"rasterFields",null),(0,r._)([(0,u.MZ)({constructOnly:!0})],t.prototype,"rasterFunctionInfos",void 0),(0,r._)([(0,u.MZ)({type:I.A,json:{name:"renderingRule"}})],t.prototype,"rasterFunction",null),(0,r._)([(0,b.w)("rasterFunction",["renderingRule","rasterFunctionInfos"])],t.prototype,"readRasterFunction",null),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"serviceDataType",void 0),(0,r._)([(0,u.MZ)({readOnly:!0,type:ve.A})],t.prototype,"spatialReference",void 0),(0,r._)([(0,b.w)("spatialReference",["spatialReference","extent"])],t.prototype,"readSpatialReference",null),(0,r._)([(0,u.MZ)({json:{type:H.e8.jsonValues}})],t.prototype,"pixelType",void 0),(0,r._)([(0,b.w)("pixelType")],t.prototype,"readPixelType",null),(0,r._)([(0,m.K)("pixelType")],t.prototype,"writePixelType",null),(0,r._)([(0,u.MZ)({constructOnly:!0,type:te.A})],t.prototype,"serviceRasterInfo",void 0),(0,r._)([(0,u.MZ)()],t.prototype,"sourceJSON",void 0),(0,r._)([(0,u.MZ)(M.OZ)],t.prototype,"url",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],t.prototype,"version",void 0),(0,r._)([(0,b.w)("version",["currentVersion","fields","timeInfo"])],t.prototype,"readVersion",null),t=(0,r._)([(0,c.$)("esri.layers.mixins.ArcGISImageService")],t),t};var Ii=i(18768),Fi=i(63074),Di=i(69208),ji=i(16131),Ti=i(8303),Pi=i(56551),Zi=i(54310),Ni=i(25036),Ci=i(82935),Oi=i(91908),Vi=i(30291),Ji=i(92935);let qi=class extends((0,Fi.dM)((0,Ci.e)((0,Ni.j)((0,ji.q)((0,Ti.A)((0,Pi.H)(Ai((0,Zi.J)((0,Di.d)((0,Ii.b)((0,a.P)(n.A.ClonableMixin(d.A))))))))))))){constructor(...e){super(...e),this.isReference=null,this.operationalLayerType="ArcGISImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.type="imagery",this._debouncedSaveOperations=(0,l.sg)((async(e,t,r)=>{const{save:s,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ji.X.SAVE:return s(this,t);case Ji.X.SAVE_AS:return n(this,r,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(l.QP).then((()=>this._fetchService(t)))),Promise.resolve(this)}get legendEnabled(){return!this._isPreviewLayer&&(this._get("legendEnabled")??!0)}set legendEnabled(e){this._set("legendEnabled",e)}get listMode(){return this._isPreviewLayer?"hide":this._get("listMode")}set listMode(e){this._set("listMode",e)}writeOperationalLayerType(e,t,i){const r="vector-field"===this.renderer?.type;t[i]=r?"ArcGISImageServiceVectorLayer":"ArcGISImageServiceLayer"}get defaultPopupTemplate(){return this.createPopupTemplate()}get _isPreviewLayer(){return!(!this.raster||!this.url?.toLowerCase().includes("/rasterrendering/imageserver"))}createPopupTemplate(e){const{rasterFields:t}=this,i=new Set,r=ee.F_.itemPixelValue.toLowerCase(),s="raster-dataset"===this.sourceType,n=ee.Oo.toLowerCase(),o=`${ee.F_.servicePixelValue.toLowerCase()}.`;for(const e of t){const t=e.name.toLowerCase();t===r||t.startsWith(o)||s&&t.startsWith(n)||i.add(e.name)}const a=(0,Vi.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i});return a?.fieldInfos&&this.rasterInfo?.pixelType.startsWith("f")&&a.fieldInfos.forEach((({format:e,fieldName:t})=>{e&&t&&/^raster\.(item|service)pixelvalue/i.test(t)&&(e.places=2)})),a}queryFeatures(e,t){return this.queryRasters(e,t).then((e=>{if(e?.features)for(const t of e.features)t.layer=t.sourceLayer=this;return e}))}queryFeatureCount(e,t){return this.queryRasterCount(e,t)}redraw(){this.emit("redraw")}async save(e){return this._debouncedSaveOperations(Ji.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ji.X.SAVE_AS,t,e)}serviceSupportsSpatialReference(e){return(0,Oi.D)(this,e)}write(e,t){if(!this._isPreviewLayer)return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Imagery preview layer (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}};(0,r._)([(0,u.MZ)(M.fV)],qi.prototype,"legendEnabled",null),(0,r._)([(0,u.MZ)({type:["show","hide"]})],qi.prototype,"listMode",null),(0,r._)([(0,u.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qi.prototype,"isReference",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISImageServiceLayer"],json:{origins:{"web-map":{type:["ArcGISImageServiceLayer","ArcGISImageServiceVectorLayer"],read:!1,write:{target:"layerType",ignoreOrigin:!0}}}}})],qi.prototype,"operationalLayerType",void 0),(0,r._)([(0,m.K)("web-map","operationalLayerType")],qi.prototype,"writeOperationalLayerType",null),(0,r._)([(0,u.MZ)(M.M6)],qi.prototype,"popupEnabled",void 0),(0,r._)([(0,u.MZ)({type:s.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo"}}})],qi.prototype,"popupTemplate",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],qi.prototype,"defaultPopupTemplate",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1}})],qi.prototype,"type",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],qi.prototype,"_isPreviewLayer",null),qi=(0,r._)([(0,c.$)("esri.layers.ImageryLayer")],qi);const Ei=qi},18768:(e,t,i)=>{i.d(t,{b:()=>l});var r=i(90237),s=i(53966),n=i(10107),o=(i(44208),i(87811),i(40608)),a=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,a.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,a.Jf)(e,s.A.getLogger(this)))}};return(0,r._)([(0,n.MZ)()],t.prototype,"title",null),(0,r._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,r._)([(0,o.$)("esri.layers.mixins.ArcGISService")],t),t}},56551:(e,t,i)=>{i.d(t,{H:()=>d});var r=i(90237),s=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),o=i(68729),a=i(69540),l=i(25482),u=i(56507),p=i(93223);let c=class extends(a.A.ClonableMixin(l.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,r._)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"name",void 0),(0,r._)([(0,s.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,p.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],c.prototype,"method",void 0),(0,r._)([(0,s.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"value",void 0),(0,r._)([(0,s.MZ)({type:[u.jz],json:{write:{isRequired:!0}}})],c.prototype,"bandIds",void 0),(0,r._)([(0,s.MZ)({types:o.uy,json:{write:!0,origins:{"web-scene":{types:o.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],c.prototype,"renderer",void 0),c=(0,r._)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],c);const m=c,d=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,r._)([(0,s.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,r._)([(0,s.MZ)({type:[m],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,r._)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},33446:(e,t,i)=>{i.d(t,{C:()=>o,m:()=>n});var r=i(49186),s=i(74887);async function n(e,t,i){let n;try{n=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load ${t}`,{url:t,error:e})}return(0,s.Te)(i),n}async function o(e,t,i,n,o){let a;try{a=await createImageBitmap(e)}catch(e){throw new r.A("request:server",`Unable to load tile ${t}/${i}/${n}`,{error:e,level:t,row:i,col:n})}return(0,s.Te)(o),a}},91908:(e,t,i)=>{i.d(t,{D:()=>n});var r=i(60694);const s=[];function n(e,t){if((0,r.Wo)(e.url??""))return!0;const{wkid:i}=t;for(const t of s){if((e.version??0)>=t[0])return!0;if("function"==typeof t[1]&&(t[1]=t[1]()),t[1].has(i))return!1}return!0}s.push([10.91,()=>{const e=new Set([9709,9716,9741,9761,9766]);for(let t=9712;t<=9713;t++)e.add(t);for(let t=9748;t<=9749;t++)e.add(t);for(let t=20904;t<=20932;t++)e.add(t);for(let t=21004;t<=21032;t++)e.add(t);for(let t=21207;t<=21264;t++)e.add(t);for(let t=21307;t<=21364;t++)e.add(t);for(let t=23301;t<=23333;t++)e.add(t);for(let t=102759;t<=102760;t++)e.add(t);for(let t=102934;t<=102955;t++)e.add(t);return e}]),s.push([10.9,()=>{const e=new Set([9300,9354,9364,9367,9373,9377,9387,9456,9473,9498,9678,9680,29874,103599,103872,104028]);for(let t=9356;t<=9360;t++)e.add(t);for(let t=9404;t<=9407;t++)e.add(t);for(let t=9476;t<=9482;t++)e.add(t);for(let t=9487;t<=9494;t++)e.add(t);for(let t=9697;t<=9699;t++)e.add(t);return e}]),s.push([10.81,()=>{const e=new Set([9265,9333,103598,103699]);for(let t=9248;t<=9254;t++)e.add(t);for(let t=9271;t<=9273;t++)e.add(t);for(let t=9284;t<=9285;t++)e.add(t);for(let t=21453;t<=21463;t++)e.add(t);return e}]),s.push([10.8,()=>{const e=new Set([8088,8395,8428,8433,8531,8687,8692,8694,8699,8900,9003,9006,9009,9012,9017,9191]);for(let t=8035;t<=8036;t++)e.add(t);for(let t=8455;t<=8456;t++)e.add(t);for(let t=8518;t<=8529;t++)e.add(t);for(let t=8533;t<=8536;t++)e.add(t);for(let t=8538;t<=8540;t++)e.add(t);for(let t=8677;t<=8679;t++)e.add(t);for(let t=8902;t<=8903;t++)e.add(t);for(let t=8907;t<=8910;t++)e.add(t);for(let t=8949;t<=8951;t++)e.add(t);for(let t=8972;t<=8987;t++)e.add(t);for(let t=9039;t<=9040;t++)e.add(t);for(let t=9068;t<=9069;t++)e.add(t);for(let t=9140;t<=9141;t++)e.add(t);for(let t=9148;t<=9150;t++)e.add(t);for(let t=9153;t<=9159;t++)e.add(t);for(let t=9205;t<=9218;t++)e.add(t);for(let t=9221;t<=9222;t++)e.add(t);for(let t=54098;t<=54101;t++)e.add(t);return e}]),s.push([10.71,()=>{const e=new Set([6316]);for(let t=8351;t<=8353;t++)e.add(t);for(let t=9294;t<=9297;t++)e.add(t);for(let t=22619;t<=22621;t++)e.add(t);for(let t=103586;t<=103594;t++)e.add(t);return e}])},82371:(e,t,i)=>{i.d(t,{E9:()=>y,Tw:()=>m,X6:()=>d});var r=i(78888),s=i(5443),n=i(86738),o=i(16930),a=i(87186),l=i(20223),u=i(2272),p=i(22671);async function c(e,t,i){const c=(0,u.Dl)(e),{rasterFunction:m,sourceJSON:d}=t||{},y=m?JSON.stringify(m.rasterFunctionDefinition||m):null,h=(0,u.lF)({...c.query,renderingRule:y,f:"json"}),g=(0,u.jV)(h,i);e=c.path;const f=d||await(0,r.A)(e,g).then((e=>e.data)),w=f.hasRasterAttributeTable?(0,r.A)(`${e}/rasterAttributeTable`,g):null,v=f.hasColormap?(0,r.A)(`${e}/colormap`,g):null,R=f.hasHistograms?(0,r.A)(`${e}/histograms`,g):null,_=f.currentVersion>=10.3?(0,r.A)(`${e}/keyProperties`,g):null,b=f.hasMultidimensions?(0,r.A)(`${e}/multidimensionalInfo`,g):null,S=await Promise.allSettled([w,v,R,_,b]);let M=null;if(f.minValues&&f.minValues.length===f.bandCount){M=[];for(let e=0;e<f.minValues.length;e++)M.push({min:f.minValues[e],max:f.maxValues[e],avg:f.meanValues[e],stddev:f.stdvValues[e]})}const x=s.A.fromJSON(f.extent),A=Math.ceil(x.width/f.pixelSizeX-.1),I=Math.ceil(x.height/f.pixelSizeY-.1),F=o.A.fromJSON(f.spatialReference||f.extent.spatialReference),D="fulfilled"===S[0].status?S[0].value?.data:null,j=D?.features?.length?p.A.fromJSON(D):null,T="fulfilled"===S[1].status?S[1].value?.data.colormap:null,P=T?.length?T:null,Z="fulfilled"===S[2].status?S[2].value?.data.histograms:null,N=Z?.[0]?.counts?.length?Z:null,C="fulfilled"===S[3].status?S[3].value?.data??{}:{},O="fulfilled"===S[4].status?S[4].value?.data.multidimensionalInfo:null,V=O?.variables?.length?O:null;V&&V.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation}))}));const{defaultVariable:J,serviceDataType:q}=f;J&&J!==C.DefaultVariable&&(C.DefaultVariable=J),q?.includes("esriImageServiceDataTypeVector")&&!q.includes(C.DataType)&&(C.DataType=q.replace("esriImageServiceDataType",""));let E=f.noDataValue;f.noDataValues?.length&&f.noDataValues.some((e=>e!==E))&&(E=f.noDataValues);const G=f.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:f.extent.xmin,y:f.extent.ymax,spatialReference:F}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(A,I))/Math.LN2-8)),transposeInfo:f.transposeInfo}):void 0;return new a.A({width:A,height:I,bandCount:f.bandCount,extent:s.A.fromJSON(f.extent),spatialReference:F,pixelSize:new n.A({x:f.pixelSizeX,y:f.pixelSizeY,spatialReference:F}),pixelType:f.pixelType.toLowerCase(),statistics:M,attributeTable:j,colormap:P,histograms:N,keyProperties:C,noDataValue:E,multidimensionalInfo:V,storageInfo:G})}function m(e,t,i){return c(e,{sourceJSON:t},i)}function d(e,t,i){return c(e,{rasterFunction:t},i)}function y(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},58501:(e,t,i)=>{i.d(t,{q:()=>s});var r=i(62815);function s(e,t,i){if(!i?.features||!i.hasZ)return;const s=(0,r.N)(i.geometryType,t,e.outSpatialReference);if(null!=s)for(const e of i.features)s(e.geometry)}}}]);