@arcgis/core 5.2.0-next.128 → 5.2.0-next.129

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 (300) hide show
  1. package/applications/Components/imageryUtils.js +1 -1
  2. package/arcade/batchExec.js +1 -1
  3. package/arcade/geometry/adapters/dehydrated.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/06da350b4ea25732f52b.js +1 -0
  6. package/assets/esri/core/workers/chunks/{67dcf9b873cb037b2647.js → 081c9ccaa5884c730a91.js} +1 -1
  7. package/assets/esri/core/workers/chunks/094102031cc77b20db74.js +1 -0
  8. package/assets/esri/core/workers/chunks/0b85c844af97b2fb0ba8.js +1 -0
  9. package/assets/esri/core/workers/chunks/{86d7a3ae672a51b75fcc.js → 0d44f793d3b0d33153ac.js} +1 -1
  10. package/assets/esri/core/workers/chunks/0de140199161fcd15a0c.js +1 -0
  11. package/assets/esri/core/workers/chunks/0deceece4b465f653f58.js +1 -0
  12. package/assets/esri/core/workers/chunks/111dc5653daa7f3e1001.js +1 -0
  13. package/assets/esri/core/workers/chunks/139e3da8ea081e21539e.js +1 -0
  14. package/assets/esri/core/workers/chunks/142bedebd37d747f84ba.js +1 -0
  15. package/assets/esri/core/workers/chunks/15dc28b4fa5b5110472b.js +1 -0
  16. package/assets/esri/core/workers/chunks/{dd02cc18ebebb90778c6.js → 17e2bfc7468c23e43bef.js} +1 -1
  17. package/assets/esri/core/workers/chunks/196d33f4d8e3a256ad94.js +1 -0
  18. package/assets/esri/core/workers/chunks/1a02c68de65a67ab6a67.js +1 -0
  19. package/assets/esri/core/workers/chunks/{4165eb86471ea3bbf364.js → 1aecf7106a21320e054e.js} +1 -1
  20. package/assets/esri/core/workers/chunks/1bc03b8065cbbbb06c87.js +1 -0
  21. package/assets/esri/core/workers/chunks/1beb32170d659bc43977.js +1 -0
  22. package/assets/esri/core/workers/chunks/20ee32fee219afbcfee3.js +1 -0
  23. package/assets/esri/core/workers/chunks/{9467744cb7d094a5067a.js → 21d2f5324db0b199060c.js} +1 -1
  24. package/assets/esri/core/workers/chunks/22abb9a74f6594f9db2a.js +1 -0
  25. package/assets/esri/core/workers/chunks/237795866c075880531b.js +1 -0
  26. package/assets/esri/core/workers/chunks/25e4da9c6837ab0fa585.js +1 -0
  27. package/assets/esri/core/workers/chunks/2a5fde737dc99627142e.js +1 -0
  28. package/assets/esri/core/workers/chunks/3412050ae63ff7dcaf36.js +1 -0
  29. package/assets/esri/core/workers/chunks/35316724c8d3cc39cf80.js +1 -0
  30. package/assets/esri/core/workers/chunks/354cc6cd2a56937f1747.js +1 -0
  31. package/assets/esri/core/workers/chunks/365ae479765ca9e47de4.js +1 -0
  32. package/assets/esri/core/workers/chunks/{8190fcb1dd10ad20feed.js → 36ef86701883a20dd6f6.js} +1 -1
  33. package/assets/esri/core/workers/chunks/3759e272a1d43534a190.js +1 -0
  34. package/assets/esri/core/workers/chunks/397ddcf0b8e858a17b70.js +1 -0
  35. package/assets/esri/core/workers/chunks/3a7a558e30b5cb81c801.js +1 -0
  36. package/assets/esri/core/workers/chunks/3c9405d310a1b08c901e.js +1 -0
  37. package/assets/esri/core/workers/chunks/{e10fe4c77b8dc4492092.js → 3ce53562926b05e71af5.js} +1 -1
  38. package/assets/esri/core/workers/chunks/3d174a84b785fc633a5a.js +1 -0
  39. package/assets/esri/core/workers/chunks/3d67fed3e53993c38b58.js +1 -0
  40. package/assets/esri/core/workers/chunks/42bdeeff55fb1a3f735f.js +1 -0
  41. package/assets/esri/core/workers/chunks/48f1532520b76fa7f0c2.js +1 -0
  42. package/assets/esri/core/workers/chunks/{00d9e41deecf5828975c.js → 4adc3822ed9f498f5653.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{d5f0fed415b5b155d57c.js → 51741ef8225d470716fe.js} +1 -1
  44. package/assets/esri/core/workers/chunks/5191e481d0e19a7f3888.js +1 -0
  45. package/assets/esri/core/workers/chunks/{7fcee3a1b900ddc9a5e3.js → 540acf6abdee9dbd453e.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{d9b63cf111035b05cd2e.js → 5484b89adc53430226d5.js} +1 -1
  47. package/assets/esri/core/workers/chunks/55361b50ecfc98db2ffb.js +1 -0
  48. package/assets/esri/core/workers/chunks/58da7c41c1bcef2f4141.js +1 -0
  49. package/assets/esri/core/workers/chunks/5979bbefb09d132c008f.js +1 -0
  50. package/assets/esri/core/workers/chunks/{84db05e872dbf35c80a2.js → 5982c6a8459c1237b298.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{0a20f84b5f004a77a9f9.js → 5abfc4f447b01d6bf287.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{4c0dba437de0969a5b63.js → 5b9f88194433410bad5b.js} +1 -1
  53. package/assets/esri/core/workers/chunks/5f794f4e0113d5dd50ba.js +1 -0
  54. package/assets/esri/core/workers/chunks/62a30692e2a7612bafc1.js +1 -0
  55. package/assets/esri/core/workers/chunks/62aa7daad4ca7332854e.js +1 -0
  56. package/assets/esri/core/workers/chunks/66926c3686d5ef2d4692.js +29 -0
  57. package/assets/esri/core/workers/chunks/6994ba168465b77a36af.js +1 -0
  58. package/assets/esri/core/workers/chunks/6d0c6fda9100fe89f3cb.js +1 -0
  59. package/assets/esri/core/workers/chunks/72a898894438f177cd62.js +1 -0
  60. package/assets/esri/core/workers/chunks/78d4455237120103f639.js +1 -0
  61. package/assets/esri/core/workers/chunks/7fccf53aa751cd9dae57.js +1 -0
  62. package/assets/esri/core/workers/chunks/{6267a1fe1603daa399b4.js → 81327e10200065a0ccef.js} +1 -1
  63. package/assets/esri/core/workers/chunks/84a3fbe5d85a357f4e82.js +1 -0
  64. package/assets/esri/core/workers/chunks/862479729f2d036f606b.js +1 -0
  65. package/assets/esri/core/workers/chunks/8a9aa6db11d0f643961c.js +1 -0
  66. package/assets/esri/core/workers/chunks/8dfea65341991e13ab71.js +1 -0
  67. package/assets/esri/core/workers/chunks/8e92925043dc49ed1018.js +1 -0
  68. package/assets/esri/core/workers/chunks/8f0b2b0ca239b01f44d0.js +1 -0
  69. package/assets/esri/core/workers/chunks/93a89168c18db88f60e7.js +1 -0
  70. package/assets/esri/core/workers/chunks/991c854a4459c82d4d93.js +1 -0
  71. package/assets/esri/core/workers/chunks/{f90cad9f007a11154c0d.js → 9b080d07699b56f06c5f.js} +1 -1
  72. package/assets/esri/core/workers/chunks/9cd69aa3880838a834f8.js +1 -0
  73. package/assets/esri/core/workers/chunks/{2ca49fb4590cc34a02bd.js → 9d87f38b16dda1ff7978.js} +1 -1
  74. package/assets/esri/core/workers/chunks/9fd1e5a2c0a261ed2a33.js +1 -0
  75. package/assets/esri/core/workers/chunks/a189e520da39919cdcca.js +1 -0
  76. package/assets/esri/core/workers/chunks/a3a5cb664bdb1db190dd.js +1 -0
  77. package/assets/esri/core/workers/chunks/a63c456ecf018ec06778.js +1 -0
  78. package/assets/esri/core/workers/chunks/{842f993fa60b410cb613.js → a8322a978e33c7349fdf.js} +1 -1
  79. package/assets/esri/core/workers/chunks/{f479b4a4cee4bb2e046c.js → aa96eea0899757ab38c7.js} +1 -1
  80. package/assets/esri/core/workers/chunks/ab0b2a76247dfd56b92d.js +1 -0
  81. package/assets/esri/core/workers/chunks/ab7337b076d152a8eb9e.js +1 -0
  82. package/assets/esri/core/workers/chunks/ac0de274853a42d518a1.js +1 -0
  83. package/assets/esri/core/workers/chunks/ad372e399e20d5a3262d.js +1 -0
  84. package/assets/esri/core/workers/chunks/ae75b3e5320d03dff64c.js +1 -0
  85. package/assets/esri/core/workers/chunks/ae98530d5816306216b3.js +1 -0
  86. package/assets/esri/core/workers/chunks/afc94c4b9bc007fe310f.js +1 -0
  87. package/assets/esri/core/workers/chunks/afe54923339e957b71b9.js +1 -0
  88. package/assets/esri/core/workers/chunks/bbcac00362fef5e3956d.js +1 -0
  89. package/assets/esri/core/workers/chunks/{1302bf9718747cd9fdd9.js → bcee161dd1c4781d1998.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{d1f54b0079fb71a15612.js → bd231bc0624eb889ac14.js} +1 -1
  91. package/assets/esri/core/workers/chunks/c0075715fbe7bec10fc3.js +1 -0
  92. package/assets/esri/core/workers/chunks/c4e1e864fb8c119b2520.js +1 -0
  93. package/assets/esri/core/workers/chunks/c93cedf9e53da5aaa35b.js +1 -0
  94. package/assets/esri/core/workers/chunks/{2d592c935571de80a2e2.js → c9690810b198a97bc16d.js} +1 -1
  95. package/assets/esri/core/workers/chunks/cada517cc25fa37f778c.js +1 -0
  96. package/assets/esri/core/workers/chunks/cd1821bf601949674e02.js +1 -0
  97. package/assets/esri/core/workers/chunks/{1b42d163ef22e3565bb7.js → cf7b7e54cd87422ca62a.js} +1 -1
  98. package/assets/esri/core/workers/chunks/d195c57fc6de3560653d.js +1 -0
  99. package/assets/esri/core/workers/chunks/d7f830a06ded11f2fc80.js +1 -0
  100. package/assets/esri/core/workers/chunks/d877783815afd21dbe98.js +1 -0
  101. package/assets/esri/core/workers/chunks/db5181fcea96cc2ede3e.js +1 -0
  102. package/assets/esri/core/workers/chunks/{6e8187a77846239ed112.js → de28a86775235bd5d3c4.js} +2 -2
  103. package/assets/esri/core/workers/chunks/df6992416cba9539f1ed.js +1 -0
  104. package/assets/esri/core/workers/chunks/e4005d95a396e1af9ac2.js +1 -0
  105. package/assets/esri/core/workers/chunks/{668ec0bdfb2095e90c9e.js → e495697860f7207da4c7.js} +1 -1
  106. package/assets/esri/core/workers/chunks/f163502c513205c892e7.js +1 -0
  107. package/assets/esri/core/workers/chunks/f287ec0fcb611f82ebb0.js +1 -0
  108. package/assets/esri/core/workers/chunks/{37ae52c71bf9c70fbb92.js → f2d45d15d0ba2537a4eb.js} +1 -1
  109. package/assets/esri/core/workers/chunks/{d507d7d7a7282fc38e8d.js → f652d1db26fbdea1a79b.js} +1 -1
  110. package/assets/esri/core/workers/chunks/f6b38ed75baae198c19b.js +1 -0
  111. package/assets/esri/core/workers/chunks/{168b45c5d8233f23793e.js → f6cfc901267a229de7a1.js} +2 -2
  112. package/assets/esri/core/workers/chunks/f6d04d14323b926f1025.js +1 -0
  113. package/assets/esri/core/workers/chunks/f7ab606be37373312ebe.js +1 -0
  114. package/assets/esri/core/workers/chunks/{3b7dff15a0058ea29886.js → f92178ac6dc9abff304f.js} +1 -1
  115. package/assets/esri/core/workers/chunks/fc39593febef74a036f1.js +1 -0
  116. package/assets/esri/libs/librust-parquet/pkg/parquet_bg.wasm +0 -0
  117. package/assets/esri/themes/base/widgets/_BatchAttributeForm.scss +7 -0
  118. package/assets/esri/themes/dark/main.css +1 -1
  119. package/assets/esri/themes/light/main.css +1 -1
  120. package/assets/esri/themes/light/view.css +1 -1
  121. package/assets/esri/views/interactive/tooltip/t9n/messages.ar.json +1 -1
  122. package/assets/esri/views/interactive/tooltip/t9n/messages.bg.json +1 -1
  123. package/assets/esri/views/interactive/tooltip/t9n/messages.bs.json +1 -1
  124. package/assets/esri/views/interactive/tooltip/t9n/messages.ca.json +1 -1
  125. package/assets/esri/views/interactive/tooltip/t9n/messages.cs.json +1 -1
  126. package/assets/esri/views/interactive/tooltip/t9n/messages.da.json +1 -1
  127. package/assets/esri/views/interactive/tooltip/t9n/messages.de.json +1 -1
  128. package/assets/esri/views/interactive/tooltip/t9n/messages.el.json +1 -1
  129. package/assets/esri/views/interactive/tooltip/t9n/messages.es.json +1 -1
  130. package/assets/esri/views/interactive/tooltip/t9n/messages.et.json +1 -1
  131. package/assets/esri/views/interactive/tooltip/t9n/messages.fi.json +1 -1
  132. package/assets/esri/views/interactive/tooltip/t9n/messages.fr.json +1 -1
  133. package/assets/esri/views/interactive/tooltip/t9n/messages.he.json +1 -1
  134. package/assets/esri/views/interactive/tooltip/t9n/messages.hr.json +1 -1
  135. package/assets/esri/views/interactive/tooltip/t9n/messages.hu.json +1 -1
  136. package/assets/esri/views/interactive/tooltip/t9n/messages.id.json +1 -1
  137. package/assets/esri/views/interactive/tooltip/t9n/messages.it.json +1 -1
  138. package/assets/esri/views/interactive/tooltip/t9n/messages.ja.json +1 -1
  139. package/assets/esri/views/interactive/tooltip/t9n/messages.ko.json +1 -1
  140. package/assets/esri/views/interactive/tooltip/t9n/messages.lt.json +1 -1
  141. package/assets/esri/views/interactive/tooltip/t9n/messages.lv.json +1 -1
  142. package/assets/esri/views/interactive/tooltip/t9n/messages.nl.json +1 -1
  143. package/assets/esri/views/interactive/tooltip/t9n/messages.no.json +1 -1
  144. package/assets/esri/views/interactive/tooltip/t9n/messages.pl.json +1 -1
  145. package/assets/esri/views/interactive/tooltip/t9n/messages.pt-BR.json +1 -1
  146. package/assets/esri/views/interactive/tooltip/t9n/messages.pt-PT.json +1 -1
  147. package/assets/esri/views/interactive/tooltip/t9n/messages.ro.json +1 -1
  148. package/assets/esri/views/interactive/tooltip/t9n/messages.ru.json +1 -1
  149. package/assets/esri/views/interactive/tooltip/t9n/messages.sk.json +1 -1
  150. package/assets/esri/views/interactive/tooltip/t9n/messages.sl.json +1 -1
  151. package/assets/esri/views/interactive/tooltip/t9n/messages.sr.json +1 -1
  152. package/assets/esri/views/interactive/tooltip/t9n/messages.sv.json +1 -1
  153. package/assets/esri/views/interactive/tooltip/t9n/messages.th.json +1 -1
  154. package/assets/esri/views/interactive/tooltip/t9n/messages.tr.json +1 -1
  155. package/assets/esri/views/interactive/tooltip/t9n/messages.uk.json +1 -1
  156. package/assets/esri/views/interactive/tooltip/t9n/messages.vi.json +1 -1
  157. package/assets/esri/views/interactive/tooltip/t9n/messages.zh-CN.json +1 -1
  158. package/assets/esri/views/interactive/tooltip/t9n/messages.zh-HK.json +1 -1
  159. package/assets/esri/views/interactive/tooltip/t9n/messages.zh-TW.json +1 -1
  160. package/chunks/batchExec.js +2 -0
  161. package/config.js +1 -1
  162. package/geometry/support/intersects.js +1 -1
  163. package/geometry/support/intersectsBase.js +1 -1
  164. package/kernel.js +1 -1
  165. package/layers/GeospatialPDFLayer.js +1 -1
  166. package/layers/ImageryTileLayer.js +1 -1
  167. package/layers/graphics/hydrateGeometryJSON.js +2 -0
  168. package/layers/graphics/hydratedFeatures.js +1 -1
  169. package/layers/graphics/hydratedSpatialReference.js +2 -0
  170. package/layers/raster/datasets/DBFParser.js +1 -1
  171. package/layers/raster/datasets/ImageAuxRaster.js +1 -1
  172. package/layers/raster/datasets/TIFFRaster.js +1 -1
  173. package/layers/raster/formats/JpgPlus.js +1 -1
  174. package/layers/raster/formats/RasterCodec.js +1 -1
  175. package/layers/raster/formats/Raw.js +1 -1
  176. package/layers/support/arcadeUtils.js +1 -1
  177. package/package.json +3 -3
  178. package/popup/FeatureContent.js +1 -1
  179. package/popup/FeatureContentCollection.d.ts +2 -0
  180. package/popup/FeatureContentCollection.js +1 -1
  181. package/popup/support/featureUtils.js +1 -1
  182. package/rest/imageService.js +1 -1
  183. package/support/arcadeUtils.js +1 -1
  184. package/support/loadArcade.js +1 -1
  185. package/support/revision.js +1 -1
  186. package/symbols/cim/cimAnalyzer.js +1 -1
  187. package/views/2d/engine/vectorTiles/GeometryUtils.js +1 -1
  188. package/views/2d/engine/vectorTiles/TileManager.js +1 -1
  189. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  190. package/views/2d/engine/vectorTiles/decluttering/SymbolRepository.js +1 -1
  191. package/views/2d/engine/vectorTiles/decluttering/util.js +1 -1
  192. package/views/2d/engine/vectorTiles/style/StyleLayer.js +1 -1
  193. package/views/2d/layerViewModuleImportUtils.js +1 -1
  194. package/views/2d/layers/GeospatialPDFLayerView2D.js +1 -1
  195. package/views/2d/layers/VectorTileLayerView2D.js +1 -1
  196. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  197. package/views/2d/layers/graphics/GraphicStore.js +1 -1
  198. package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
  199. package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
  200. package/views/2d/support/hitTestUtils.js +1 -1
  201. package/views/3d/interactive/Manipulator3D.js +1 -1
  202. package/views/3d/layers/GeospatialPDFLayerView3D.js +1 -1
  203. package/views/3d/terrain/TileCompositor.js +1 -1
  204. package/views/DOMContainer.d.ts +18 -8
  205. package/views/VideoView.d.ts +38 -0
  206. package/views/VideoView.js +1 -1
  207. package/views/View.d.ts +20 -2
  208. package/views/View.js +1 -1
  209. package/views/input/types.d.ts +19 -6
  210. package/views/interactive/dragEventPipeline.js +1 -1
  211. package/views/layers/ImageryTileLayerView.js +1 -1
  212. package/widgets/Search/SearchViewModel.js +1 -1
  213. package/widgets/Search/support/layerSearchUtils.js +1 -1
  214. package/assets/esri/core/workers/chunks/025da54eef112d7e8f66.js +0 -1
  215. package/assets/esri/core/workers/chunks/02f94f9d704f03ddb5c6.js +0 -1
  216. package/assets/esri/core/workers/chunks/038d2b80d96237c25b6f.js +0 -1
  217. package/assets/esri/core/workers/chunks/04d4cd66485b622403d0.js +0 -1
  218. package/assets/esri/core/workers/chunks/05afa8c2b5929ce0545a.js +0 -1
  219. package/assets/esri/core/workers/chunks/09676cfa99b90fe0cc63.js +0 -1
  220. package/assets/esri/core/workers/chunks/0aadee0437fa061e4ff5.js +0 -1
  221. package/assets/esri/core/workers/chunks/0ccd4200c5a2a5de6e16.js +0 -1
  222. package/assets/esri/core/workers/chunks/1262918b2161d79851c0.js +0 -1
  223. package/assets/esri/core/workers/chunks/1406a884241809b62bff.js +0 -1
  224. package/assets/esri/core/workers/chunks/1c33aa349beea9a3792f.js +0 -1
  225. package/assets/esri/core/workers/chunks/1f135269aea3931e11b2.js +0 -1
  226. package/assets/esri/core/workers/chunks/24014f3701c31ee74bc2.js +0 -1
  227. package/assets/esri/core/workers/chunks/25a2e02677a74834c8b5.js +0 -1
  228. package/assets/esri/core/workers/chunks/2afce71e8b6ae86e0792.js +0 -1
  229. package/assets/esri/core/workers/chunks/2c7bb5c9751524687002.js +0 -1
  230. package/assets/esri/core/workers/chunks/2ebad7e588b26e74cefe.js +0 -1
  231. package/assets/esri/core/workers/chunks/319434415d2c0561bc59.js +0 -1
  232. package/assets/esri/core/workers/chunks/39d71e83261bff46f6bf.js +0 -1
  233. package/assets/esri/core/workers/chunks/3aceedec9abfb2fdfa18.js +0 -1
  234. package/assets/esri/core/workers/chunks/3c6ee445e49da0076ac1.js +0 -1
  235. package/assets/esri/core/workers/chunks/3f045f09ac95e7f22a97.js +0 -1
  236. package/assets/esri/core/workers/chunks/4327d2c39a660bd89da7.js +0 -1
  237. package/assets/esri/core/workers/chunks/462fd57af8ed7921d6ba.js +0 -1
  238. package/assets/esri/core/workers/chunks/474d9541d387b31ad275.js +0 -1
  239. package/assets/esri/core/workers/chunks/48a2f68e06a2e90b77d0.js +0 -1
  240. package/assets/esri/core/workers/chunks/4a73f73f1698fad2df20.js +0 -1
  241. package/assets/esri/core/workers/chunks/4f464047c6f6c9486efd.js +0 -1
  242. package/assets/esri/core/workers/chunks/500f6d6f0ffa235cae85.js +0 -1
  243. package/assets/esri/core/workers/chunks/526cc64ae46dec3fbeda.js +0 -1
  244. package/assets/esri/core/workers/chunks/550d4df0732352fa48b5.js +0 -1
  245. package/assets/esri/core/workers/chunks/581285e4d7bbe1b7c27a.js +0 -1
  246. package/assets/esri/core/workers/chunks/58fb92775d668cfd295c.js +0 -1
  247. package/assets/esri/core/workers/chunks/5adf2792416b22cd602f.js +0 -1
  248. package/assets/esri/core/workers/chunks/5aee7739afb5160d4ace.js +0 -1
  249. package/assets/esri/core/workers/chunks/6006bd8a5ed945fa2776.js +0 -1
  250. package/assets/esri/core/workers/chunks/606cca69eaea84bfcdc6.js +0 -1
  251. package/assets/esri/core/workers/chunks/64ee22134fda2f09c094.js +0 -1
  252. package/assets/esri/core/workers/chunks/66ef6c034455abd61f39.js +0 -1
  253. package/assets/esri/core/workers/chunks/67678054342178b601cf.js +0 -1
  254. package/assets/esri/core/workers/chunks/67fd2cdb2e6834bfa710.js +0 -1
  255. package/assets/esri/core/workers/chunks/6c82cbcd504c711a7450.js +0 -1
  256. package/assets/esri/core/workers/chunks/75294f515c7f8393181c.js +0 -1
  257. package/assets/esri/core/workers/chunks/75879ae88fd87b089a87.js +0 -1
  258. package/assets/esri/core/workers/chunks/761ea719ec1b4d562db2.js +0 -1
  259. package/assets/esri/core/workers/chunks/78085f804969c9282700.js +0 -1
  260. package/assets/esri/core/workers/chunks/7d6da4e89aa951e6523f.js +0 -1
  261. package/assets/esri/core/workers/chunks/80f16f5f15518013f7d0.js +0 -1
  262. package/assets/esri/core/workers/chunks/8465e2c7221125fd3cc4.js +0 -1
  263. package/assets/esri/core/workers/chunks/87aaed3dfa903bdf853c.js +0 -1
  264. package/assets/esri/core/workers/chunks/892dc038d569cffd26dc.js +0 -1
  265. package/assets/esri/core/workers/chunks/8a842cde240aef12e417.js +0 -1
  266. package/assets/esri/core/workers/chunks/8f1c5f5e70d4b33d021d.js +0 -1
  267. package/assets/esri/core/workers/chunks/9020bd7a0e488d55ef14.js +0 -1
  268. package/assets/esri/core/workers/chunks/92509dd25996c6390a31.js +0 -1
  269. package/assets/esri/core/workers/chunks/9ccc2c8f7416943cc373.js +0 -29
  270. package/assets/esri/core/workers/chunks/9d6a96e4c7ccedcb0c13.js +0 -1
  271. package/assets/esri/core/workers/chunks/9ec04faad97be55309b8.js +0 -1
  272. package/assets/esri/core/workers/chunks/a08385ebf1715414c1a6.js +0 -1
  273. package/assets/esri/core/workers/chunks/a3a33ffa34f4d645ddfe.js +0 -1
  274. package/assets/esri/core/workers/chunks/b396c4b4bb144200acc7.js +0 -1
  275. package/assets/esri/core/workers/chunks/b9c834e3c0701e9b14a2.js +0 -1
  276. package/assets/esri/core/workers/chunks/bbfb80a6983574007ce5.js +0 -1
  277. package/assets/esri/core/workers/chunks/bcf2e5cf6b9c6d0442bb.js +0 -1
  278. package/assets/esri/core/workers/chunks/c35e9dee87937f483a3d.js +0 -1
  279. package/assets/esri/core/workers/chunks/c5b733c3a5b2680042a2.js +0 -1
  280. package/assets/esri/core/workers/chunks/cbeba973ef5593ffbba3.js +0 -1
  281. package/assets/esri/core/workers/chunks/ccaeabc3be07f3c96f50.js +0 -1
  282. package/assets/esri/core/workers/chunks/d25fb32a233d2128afbe.js +0 -1
  283. package/assets/esri/core/workers/chunks/d5ef269ab0ee3744b05d.js +0 -1
  284. package/assets/esri/core/workers/chunks/d94a2b3b2ef49af9c2e3.js +0 -1
  285. package/assets/esri/core/workers/chunks/dc92710a8fdfb9135e55.js +0 -1
  286. package/assets/esri/core/workers/chunks/dd4ecf81250cc001d040.js +0 -1
  287. package/assets/esri/core/workers/chunks/e0894a308c84d5c158b0.js +0 -1
  288. package/assets/esri/core/workers/chunks/e4016ae9cb8f16e3efc3.js +0 -1
  289. package/assets/esri/core/workers/chunks/e6a4cef0af9be30ffe3d.js +0 -1
  290. package/assets/esri/core/workers/chunks/eaa7cb3ffa8c11706a09.js +0 -1
  291. package/assets/esri/core/workers/chunks/ed31ec586b754241474d.js +0 -1
  292. package/assets/esri/core/workers/chunks/ef6e52f9b656751eebaf.js +0 -1
  293. package/assets/esri/core/workers/chunks/f2fca9a3a40170996ea2.js +0 -1
  294. package/assets/esri/core/workers/chunks/f5d06cd6d30a5f742f73.js +0 -1
  295. package/assets/esri/core/workers/chunks/f71ec8a260405ed07958.js +0 -1
  296. package/assets/esri/core/workers/chunks/f91cab9904020cf25d50.js +0 -1
  297. package/assets/esri/core/workers/chunks/fb11ff3f2eae5f072560.js +0 -1
  298. package/assets/esri/core/workers/chunks/ff0e9f8d323eb1729650.js +0 -1
  299. /package/assets/esri/core/workers/chunks/{6e8187a77846239ed112.js.LICENSE.txt → de28a86775235bd5d3c4.js.LICENSE.txt} +0 -0
  300. /package/assets/esri/core/workers/chunks/{168b45c5d8233f23793e.js.LICENSE.txt → f6cfc901267a229de7a1.js.LICENSE.txt} +0 -0
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[1003],{1003(e,t,s){s.r(t),s.d(t,{default:()=>de});var i=s(49186),n=s(32198),r=s(91429),a=s(49859),o=s(68197),l=s(5443),c=s(16930),f=s(73444),u=s(94778),h=s(14140);function p(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function d(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function m(e){const{axes:t}=e.domain,s=Object.keys(t),i=[],n=[];let r=-1,a=-1,o=[];for(let e=0;e<s.length;e++){const l=s[e];p(l)?r=e:d(l)&&(a=e);const c=t[l],f=[];if("values"in c){c.values.forEach(e=>f.push("string"==typeof e?new Date(e).getTime():e));const e=f[1]-f[0];i.push([f[0]-.5*e,f[f.length-1]+.5*e]),n.push(e)}else{const{start:e,stop:t,num:s}=c,r=(t-e)/(s-1);i.push([e-.5*r,t+.5*r]),n.push(r);for(let t=0;t<s;t++)f.push(e+r*t)}o.push({name:l,values:f,extent:[f[0],f[f.length-1]]})}r>-1&&-1===a?a=0===r?1:0:a>-1&&-1===r?r=0===a?1:0:-1===a&&-1===r&&(r=0,a=1),o=o.filter((e,t)=>!(t===r||t===a));const{referencing:f}=e.domain,u=f.find(e=>e.coordinates.includes(s[r])).system.id,h=u?.slice(u.lastIndexOf("/")+1),m=null==h||"CRS84"===h?4326:Number(h),g=new c.A({wkid:m}),[y,x]=i[r],[w,I]=i[a],b=new l.A({xmin:y,xmax:x,ymin:w,ymax:I,spatialReference:g});return{width:Math.round(b.width/n[r]),height:Math.round(b.height/n[a]),extent:b,dimensions:o}}function g(e){const t=(0,f.lR)();return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function y(){return Math.round(255*Math.random())}function x(e){const t={},{parameters:s}=e;if(!s)return t;for(const[e,i]of Object.entries(s)){const{type:s,description:n,unit:r,categoryEncoding:a,observedProperty:l}=i;if("Parameter"===s&&(t[e]={},n&&(t[e].description=g(n)),r&&(t[e].unit=r.label?g(r.label):null,t[e].symbol=r.symbol?.value),a)){const s=Object.entries(a).map((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1}));let i=!1;l?.categories?.length&&(l.categories.forEach(e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),n=s.find(e=>e.ClassName===t);if(!n)return;const r=e.label?g(e.label):null;if(n.Label=r,e.preferredColor){const t=o.A.fromHex(e.preferredColor);t&&(i=!0,n.Red=t.r,n.Green=t.g,n.Blue=t.b)}}),i&&s.forEach(e=>{null==e.Red&&(e.Red=y(),e.Green=y(),e.Blue=y())}));const n={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:s.map(e=>({attributes:e}))};i&&n.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=n}}return t}function w(e){let t=Number.MAX_VALUE,s=-Number.MAX_VALUE;for(let i=0;i<e.length;i++){const n=e[i];null!=n&&(n<t&&(t=n),n>s&&(s=n))}return(0,u.X1)(t,s)}function I(e,t,s){const i=e.map((e,s)=>({name:e,count:t[s]})).sort((e,t)=>e.name>t.name?-1:1),n=(r=1,e=>r*=e.count);var r;const a=[...i.slice(1),{name:"",count:1}].reverse().map(n).reverse();let o=0;for(let n=e.length-1;n>=0;n--)o+=a[i.findIndex(({name:t})=>t===e[n])]*(s%t[n]),s=Math.floor(s/t[n]);return o}var b=s(17676),v=s(4366),C=s(47520),S=s(51927),T=s(45617),A=s(87186);let R=class extends a.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.preGenerateTiles=!0,this.source=null}get url(){return""}fetchRawTile(e,t,s,i={}){if(!this._pixelBlockTiles){const{rasterInfo:n}=this,[r,a]=n.storageInfo.tileInfo.size,{sliceId:o}=i,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==n.dataType,tileSize:{width:r,height:a},level:e,row:t,col:s},f=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,i):(0,C.J$)(c);return Promise.resolve(f)}const n=this._pixelBlockTiles.get(`${e}/${t}/${s}`);return Promise.resolve(n)}async _open(e){const t=this.source,{pixelBlocks:s,attributeTable:i,statistics:n,histograms:r,name:a,nativeExtent:o,transform:f,colormap:u}=t,h=s[0],{width:p,height:d,pixelType:m}=h,g=t.extent??new l.A({xmin:-.5,ymin:.5,xmax:p-.5,ymax:d-.5,spatialReference:new c.A({wkid:3857})}),y=t.isPseudoSpatialReference??!t.extent,x={x:g.width/p,y:g.height/d},w={...t.keyProperties};t.dataType&&(w.DataType=t.dataType),t.bandInfos&&(w.BandProperties=t.bandInfos.map(e=>e.toJSON())),i&&(w.DataType="Thematic");const I=new A.A({width:p,height:d,pixelType:m,extent:g,nativeExtent:o,attributeTable:i,colormap:u,transform:f,pixelSize:x,spatialReference:g.spatialReference,bandCount:h.pixels.length,keyProperties:w,multidimensionalInfo:t.multidimensionalInfo,statistics:n,isPseudoSpatialReference:y,histograms:r});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(I),this.createRemoteDatasetStorageInfo(I,512,512),this._set("rasterInfo",I),this.updateTileInfo(),I.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,I.multidimensionalInfo):this.preGenerateTiles&&await this._buildInMemoryRaster(h,{width:512,height:512},e),I.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,s){const{rasterInfo:n}=this,r=n.storageInfo.maximumPyramidLevel??0,a="thematic"!==n.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},s):Promise.resolve((0,C.lD)(e,t,r,a)),l=null!=n.statistics,c=null!=n.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},s):Promise.resolve((0,S.f4)(e)),u=await(0,b.Lx)([o,f]);if(!u[0].value&&u[1].value)throw new i.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=u[0].value,l||(n.statistics=u[1].value?.statistics),c||(n.histograms=u[1].value?.histograms)}async _buildMDimStats(e,t,s){for(let i=0;i<t.variables.length;i++){const n=t.variables[i];if(n.statistics)continue;const r=n.dimensions.map(e=>new T.A({variableName:n.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0})),a=(0,v.NG)(r,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},s):(0,S.eH)(o);n.statistics=l.statistics,n.histograms||(n.histograms=l.histograms)}}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],R.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,r.MZ)({constructOnly:!0})],R.prototype,"preGenerateTiles",void 0),(0,n.Cg)([(0,r.MZ)()],R.prototype,"source",void 0),(0,n.Cg)([(0,r.MZ)()],R.prototype,"url",null),R=(0,n.Cg)([(0,r.$K)("esri.layers.raster.datasets.InMemoryRaster")],R);const M=R;var O=s(22671);let _=class extends a.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,s,i={}){return this._inMemoryRaster.fetchRawTile(e,t,s,i)}async _open(e){const{extent:t,pixelBlocks:s,multidimensionalInfo:i,attributeTable:n,bandNames:r}=await this._fetchData(e),{statistics:a,histograms:o}=(0,S.eH)(s[0]),l=r?.map(e=>({BandName:e})),c={DataType:n?"Thematic":i?"Scientific":"Generic",BandProperties:l},f=new M({source:{extent:t,pixelBlocks:s,attributeTable:n?O.A.fromJSON(n):null,multidimensionalInfo:i,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await f.open(),this._inMemoryRaster=f;const u=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",u.slice(0,u.indexOf("."))),this._set("rasterInfo",f.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,s="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new i.A(s,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new i.A(s,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new i.A(s,"Missing domain referencing in the grid coverage data");const n=Object.values(t.ranges);for(let e=0;e<n.length;e++){const{axisNames:t,shape:r,type:a,values:o}=n[e];if(!("ndarray"===a.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new i.A(s,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!p(t[t.length-1])||!d(t[t.length-2]))throw new i.A(s,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:s,extent:i,dimensions:n}=m(e),{ranges:r}=e,a=Object.keys(r).sort((e,t)=>e<t?-1:1),o=[];for(let e=0;e<a.length;e++){const t=a[e];n?.length&&o.push({name:t,dimensions:n})}const l=x(e);o.forEach(e=>l[e.name]&&Object.assign(e,l[e.name]));const c=o.length?{variables:o}:void 0,f=[];for(let e=0;e<a.length;e++){const i=a[e],{values:o,dataType:l,axisNames:c,shape:u}=r[i],p=u.length>2?e*u.slice(0,-2).reduce((e,t)=>e*t):0,d=c.slice(0,-2),m=u.slice(0,-2),g="float"===l?"f32":w(o),y=t*s,x=o.length/y;for(let i=0;i<x;i++){const r=h.A.createEmptyBand(g,y),a=new Uint8Array(y).fill(255);let l=!1;const c=i*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):r[e]=t}if(0===e||n?.length){const e=new h.A({width:t,height:s,mask:l?a:null,pixels:[r],pixelType:g});e.updateStatistics(),n?.length?f[I(d,m,i)+p]=e:f.push(e)}else{const e=f[i];e.pixels.push(r),l?e.mask&&(e.mask=h.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const u=Object.values(l).find(e=>e.attributeTable)?.attributeTable;return{extent:i,pixelBlocks:f,multidimensionalInfo:c,attributeTable:u,bandNames:c?void 0:a}}(t)}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],_.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,r.MZ)({constructOnly:!0})],_.prototype,"source",void 0),_=(0,n.Cg)([(0,r.$K)("esri.layers.raster.datasets.CovJSONRaster")],_);const k=_;var F=s(4576),B=s(21325),P=s(330),N=s(43163);function D(e,t){if(!e||!t)return null;const s=[];for(let i=0;i<e.length;i++)s.push(e[i]),s.push(t[i]);return s}function E(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new c.A({wkid:t});if(e=String(e).trim(),(0,B.jp)(e))return new c.A({wkt2:e});const s=e.toUpperCase();if(s.startsWith("COMPD_CS")){if(!s.includes("VERTCS")||!s.includes("GEOGCS")&&!s.startsWith("PROJCS"))return null;const i=s.indexOf("VERTCS"),n=s.indexOf("PROJCS"),r=n>-1?n:s.indexOf("GEOGCS");if(-1===r)return null;const a=e.slice(r,e.lastIndexOf("]",i)+1).trim(),o=e.slice(i,e.lastIndexOf("]")).trim();t=L(a);const l=new c.A(t?{wkid:t}:{wkt:a}),f=L(o);return f&&(l.vcsWkid=f),l}return s.startsWith("GEOGCS")||s.startsWith("PROJCS")?(t=L(e),new c.A(0!==t?{wkid:t}:{wkt:e})):null}function L(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map(e=>e.trim()).filter(e=>""!==e),s=t[t.length-1].split(","),i=s[0]?.toLowerCase();if(("epsg"===i||"esri"===i)&&e.endsWith('"]]')){const e=Number(s[1]);if(!isNaN(e)&&0!==e)return e}return 0}function z(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach(e=>{if(1===e.nodeType)if((0,P.g7)(e,"SRS")){if(!t.spatialReference){const s=(0,P.mX)(e);t.spatialReference=E(s)}}else if((0,P.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:s,transform:i}=function(e){const t=(0,P.V6)(e,"GeodataXform"),s=E((0,P.v7)(t,"SpatialReference/WKID")||(0,P.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:s,transform:null};const i=(0,P.v7)(t,"PolynomialOrder")??1,n=(0,P.Ui)(t,"CoeffX/Double"),r=(0,P.Ui)(t,"CoeffY/Double"),a=(0,P.Ui)(t,"InverseCoeffX/Double"),o=(0,P.Ui)(t,"InverseCoeffY/Double"),l=D(n,r),c=D(a,o);return{spatialReference:s,transform:l&&c&&l.length&&c.length?new N.A({spatialReference:s,polynomialOrder:i,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=i,t.spatialReference||(t.spatialReference=s)}else(0,P.IC)(e,"MDI").forEach(e=>t.metadata[e.getAttribute("key")]=(0,P.mX)(e));else if((0,P.g7)(e,"PAMRasterBand")){const s=function(e){const t=(0,P.v7)(e,"NoDataValue"),s=(0,P.V6)(e,"Histograms/HistItem"),i=(0,P.v7)(s,"HistMin"),n=(0,P.v7)(s,"HistMax"),r=(0,P.v7)(s,"BucketCount"),a=(0,P.mX)(s,"HistCounts")?.split("|").map(e=>Number(e));let o,l,c,f;(0,P.IC)(e,"Metadata/MDI").forEach(e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":f=t}});const u=(0,P.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=i&&null!=n?{min:i,max:n,size:r||a.length,counts:a}:null,sourceBandIndex:u,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:f}:null}}(e);null!=s.sourceBandIndex&&null==t.rasterBands[s.sourceBandIndex]?t.rasterBands[s.sourceBandIndex]=s:t.rasterBands.push(s)}});const s=t.rasterBands;if(s.length){const e=!!s[0].statistics;t.statistics=e?s.map(e=>e.statistics).filter(F.Ru):null;const i=!!s[0].histogram;t.histograms=i?s.map(e=>e.histogram).filter(F.Ru):null}return t}var J=s(85951),H=s(96381);let U=class extends a.A{set rasterJobHandler(e){this._set("rasterJobHandler",e),this._inMemoryRaster&&(this._inMemoryRaster.rasterJobHandler=e)}fetchRawTile(e,t,s,i={}){if(this._imageBlob){const{blockWidth:i,blockHeight:n}=this.rasterInfo.storageInfo;return this.decodePixelBlock(this._imageBlob,{tileSize:[i,n],tileIndex:[e,t,s],canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0})}return this._inMemoryRaster?this._inMemoryRaster.fetchRawTile(e,t,s,i):Promise.resolve(null)}async _open(e){const t=await this._fetchData(e);if(null==t)throw new i.A("image-aux-raster:open","the data cannot be decoded");let{spatialReference:s,statistics:n,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const o=!s;o&&(s=new c.A({wkid:3857})),r?.length&&null==n&&(n=(0,S.Pg)(r));const{width:f,height:u,pixelBlock:h}=t;let p=new l.A({xmin:-.5,ymin:.5-u,xmax:f-.5,ymax:.5,spatialReference:s});const d=a?a.forwardTransform(p):p;let m=!0;if(a){const e=a.forwardCoefficients;m=e&&0===e[1]&&0===e[2],m&&(a=null,p=d)}if(!h){const e=new A.A({width:f,height:u,bandCount:3,pixelType:"u8",extent:d,nativeExtent:p,transform:a,pixelSize:{x:d.width/f,y:d.height/u},spatialReference:d.spatialReference,keyProperties:{DataType:"Processed"}});return this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(e),this.createRemoteDatasetStorageInfo(e,512,512),this._set("rasterInfo",e),void this.updateTileInfo()}const{rasterJobHandler:g,ioConfig:y}=this,x=new M({preGenerateTiles:!1,rasterJobHandler:g,source:{extent:d,nativeExtent:p,transform:a,pixelBlocks:[h],statistics:n,histograms:r,keyProperties:{DataType:"Processed"},isPseudoSpatialReference:o},ioConfig:{...y,sampling:"closest",skipStatistics:!0}});await x.open(),x.source=null,this._set("rasterInfo",x.rasterInfo),this._inMemoryRaster=x}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),s=(0,H.g)(t);if("jpg"!==s&&"png"!==s&&"gif"!==s&&"bmp"!==s)throw new i.A("image-aux-raster:open","the data is not a supported format");if(this._set("datasetFormat",s.toUpperCase()),"jpg"===s){const e=(0,J.R)(t);if(null==e)throw new i.A("image-aux-raster:open","the data is not a supported format");return this._imageBlob=t,e}try{const e=await this.decodePixelBlock(t,{format:s,canvasUsage:"canvas-only",cloneSource:!0,skipStatistics:!0});return this._imageBlob=t,e?{width:e.width,height:e.height,pixelBlock:e}:null}catch{const e=await this.decodePixelBlock(t,{format:s,canvasUsage:"no-canvas",skipStatistics:!0});return e?{width:e.width,height:e.height,pixelBlock:e}:null}}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:s=[],skipMapInfo:i}=this.ioConfig,n=i||s.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),r=this.datasetFormat,a="JPG"===r?"jgw":"PNG"===r?"pgw":"BMP"===r?"bpw":null,o=a&&s.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,b.Lx)([n,o]);if(t?.aborted)throw(0,b.NK)();const c=z(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map(e=>Number(e)):null;c.transform=6===e?.length?new N.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],U.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,r.MZ)()],U.prototype,"rasterJobHandler",null),U=(0,n.Cg)([(0,r.$K)("esri.layers.raster.datasets.ImageAuxRaster")],U);const G=U;var q=s(97768),j=s(84952),V=s(86738),W=s(75414),Z=s(20223),X=s(87045),$=s(25943),Y=s(82371);let K=class extends a.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,s,i={}){const{storageInfo:n,extent:r}=this.rasterInfo,{transposeInfo:a}=n,o=null!=a&&!!i.transposedVariableName;if(this._slices&&!o&&null==i.sliceId)return null;const l=o?0:n.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${s}`,f={...this._slices?o?{variable:i.transposedVariableName}:{sliceId:i.sliceId||0}:null,...i.refreshParameters};let u,h;if(n.isBsqTile){const e=(i.bandIds?.length?i.bandIds:[0,1,2]).map(e=>this.request(c,{query:{...f,bandId:e},responseType:"array-buffer",signal:i.signal})),t=await Promise.all(e),s=t.map(e=>e.data.byteLength).reduce((e,t)=>e+t),n=new Uint8Array(s);h=[];let r=0;for(const{data:e}of t)h.push(r),n.set(new Uint8Array(e),r),r+=e.byteLength;u=n.buffer}else u=(await this.request(c,{query:f,responseType:"array-buffer",signal:i.signal})).data;if(!u)return null;const{tileInfo:p}=n,d=o?a.tileSize:p.size,m=/^(mixed|jp)/i.test(p.format),g=await this.decodePixelBlock(u,{width:d[0],height:d[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue,applyJpegMask:m});if(null==g)return null;const y=n.blockBoundary[e];if("jpg"!==n.compression||s>y.minCol&&s<y.maxCol&&t>y.minRow&&t<y.maxRow)return g;const{origin:x,blockWidth:w,blockHeight:I}=n,{x:b,y:v}=this.getPyramidPixelSize(e),S=Math.round((r.xmin-x.x)/b)%w,T=Math.round((r.xmax-x.x)/b)%w||w,A=Math.round((x.y-r.ymax)/v)%I,R=Math.round((x.y-r.ymin)/v)%I||I,M=s===y.minCol?S:0,O=t===y.minRow?A:0,_=s===y.maxCol?T:w,k=t===y.maxRow?R:I;return(0,C.z$)(g,{x:M,y:O},{width:_-M,height:k-O}),g}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const s=this._slices[e].multidimensionalDefinition;if(s.length===t.length&&!s.some(e=>{const s=t.find(t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName);return!s||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(s.values[0])?`${s.values[0][0]}-${s.values[0][1]}`:s.values[0])}))return e}return null}async fetchVariableStatisticsHistograms(e,t){const s=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.statistics),i=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then(e=>e.data?.histograms),n=await Promise.all([s,i]);return n[0]&&n[0].forEach(e=>{e.avg=e.mean,e.stddev=e.standardDeviation}),n[1]?.[0]?.counts?.length||(n[1]=null),{statistics:n[0]||null,histograms:n[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let s=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===s)return null;let i=0;const{maximumPyramidLevel:n}=this.rasterInfo.storageInfo;let r=n-i+this._levelOffset;const a=s.srcLocation;for(;r>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(r,s.row,s.col,t))break}catch{}if(r--,i++,s=this.identifyPixelLocation(a,i,t.datumTransformation),null===s)return null}return-1===r||null==s?null:i}async _open(e){const t=e?.signal,s=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});s.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const n=s.data;if(this.sourceJSON=n,!n)throw new i.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!n.tileInfo)throw new i.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=n.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(n.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===n.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=n.name?.slice(n.name.indexOf("/")+1)??"";const r=this.rasterInfo??await this._fetchRasterInfo({signal:t});if(null==r)throw new i.A("image-server-raster:open","cannot initialize image service");(0,Y.E9)(r,n);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:s,maxScale:i,minLOD:n,maxLOD:r}=t;if(null!=n&&null!=r)return X.A.fromJSON({...e,lods:e.lods.filter(({level:e})=>null!=e&&e>=n&&e<=r)});if(0!==s&&0!==i){const t=e=>Math.round(1e4*e)/1e4,n=s?t(s):1/0,r=i?t(i):-1/0;return X.A.fromJSON({...e,lods:e.lods.filter(e=>{const s=t(e.scale);return s<=n&&s>=r})})}return X.A.fromJSON(e)}(n.tileInfo,n):X.A.fromJSON(n.tileInfo);(0,q.Lw)(a);const[o,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:f}=r,u=.001*Math.min(f.x,f.y);(f.x!==f.y||Math.abs(o.resolution-f.x)>u)&&(f.x=f.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/f.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/f.y-.1));const h=o.level-l.level,[p,d]=a.size,m=[],g=[],{lods:y}=a;y.forEach((e,t)=>{e.level>=l.level&&e.level<=o.level&&m.push({x:e.resolution,y:e.resolution}),t<y.length-1&&g.push(Math.round(10*e.resolution/y[t+1].resolution)/10)}),m.sort((e,t)=>e.x-t.x);const x=this.computeBlockBoundary(c,p,d,a.origin,m,h),w=m.length>1?m.slice(1):null;let I;n.transposeInfo&&(I={tileSize:[n.transposeInfo.rows,n.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const b=g.length<=1||g.length>=3&&g.slice(0,-1).every(e=>e===g[0])?g[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/h))/10,v=!!n.bsq&&"Raster"===this.tileType;if(r.storageInfo=new Z.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:w,pyramidScalingFactor:b,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:h,tileInfo:a,isBsqTile:v,transposeInfo:I,blockBoundary:x}),function(e){const{extent:t,spatialReference:s}=e;t.xmin>-1&&t.xmax>181&&s?.wkid&&s.isGeographic&&(e.nativeExtent=e.extent,e.transform=new W.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),n.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,j.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new $.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,s=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),i=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),n=c.A.fromJSON(t.spatialReference||e.spatialReference),r=new V.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:n});return new A.A({width:s,height:i,bandCount:3,extent:l.A.fromJSON(e),spatialReference:n,pixelSize:r,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const s={...e,query:{...this.ioConfig.customFetchParameters,f:"json"}},i=(0,Y.Tw)(this.url,this.sourceJSON,s),n=t.hasMultidimensions?this.request(`${this.url}/slices`,s).then(e=>e.data?.slices).catch(()=>null):null,r=await Promise.all([i,n]);return this._slices=r[1],r[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:s}=e,i=.5/e.width*s.x,{lods:n}=t,r=t.lodAt(Math.max.apply(null,n.map(e=>e.level))),a=t.lodAt(Math.min.apply(null,n.map(e=>e.level))),{tileType:o}=this;if("Map"===o)return this._levelOffset=n[0].level,[r,a];if("Raster"===o)return[n.find(e=>e.resolution===s.x)??r,a];const{minScale:l,maxScale:c}=this.sourceJSON;let f=r;c>0&&(f=n.find(e=>Math.abs(e.scale-c)<i),f||(f=n.filter(e=>e.scale>c).sort((e,t)=>e.scale>t.scale?1:-1)[0]??r));let u=a;return l>0&&(u=n.find(e=>Math.abs(e.scale-l)<i)??a,this._levelOffset=u.level-a.level),[f,u]}};(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],K.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,r.MZ)()],K.prototype,"tileType",void 0),K=(0,n.Cg)([(0,r.$K)("esri.layers.raster.datasets.ImageServerRaster")],K);const Q=K;var ee=s(10713);const te=new Map([["byte","u8"],["signedbyte","s8"],["int8","s8"],["uint8","u8"],["int16","s16"],["uint16","u16"],["int32","s32"],["uint32","u32"],["float32","f32"],["float64","f64"],["double64","f64"]]),se=new Map;se.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),se.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),se.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),se.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"}),se.set("qb3",{blobExtension:".pq3",isOneSegment:!0,decoderFormat:"qb3"});let ie=class extends a.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this._isBsq=!1,this.datasetFormat="MRF"}async fetchRawTile(e,t,s,i={}){const{blockWidth:n,blockHeight:r,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<s||o.minRow>t||o.minCol>s)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:f,actualTileWidth:u,actualTileHeight:p}=this._getTileLocation(e,t,s);if(!f||0===f.length)return null;if(f.some(e=>e.from>e.to)){const e=new Uint8Array(n*r);return new h.A({width:n,height:r,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:d}=this.ioConfig,m=this._getBandSegmentCount(),g=[];let y=0;for(y=0;y<m;y++)d&&!d.includes(y)||g.push(this.request(this._files.data,{range:{from:f[y].from,to:f[y].to},responseType:"array-buffer",signal:i.signal}));const x=await Promise.all(g),w=x.map(e=>e.data.byteLength).reduce((e,t)=>e+t),I=new Uint8Array(w),b=[];let v=0;for(y=0;y<m;y++)b.push(v),I.set(new Uint8Array(x[y].data),v),v+=x[y].data.byteLength;const C=se.get(this.rasterInfo.storageInfo.compression).decoderFormat,S="jpg"===C&&4===l&&1===b.length,T=await this.decodePixelBlock(I.buffer,{width:n,height:r,format:C,planes:d?.length||l,offsets:b,pixelType:c,canvasUsage:S?"no-canvas":void 0,decodeJpegAsRgb:!1}).catch(()=>null);if(null==T)return null;let{noDataValue:A}=this.rasterInfo;if(null!=A&&"lerc"!==C&&!T.mask&&(A=A[0],null!=A)){const e=T.width*T.height,t=new Uint8Array(e);if(Math.abs(A)>1e24)for(y=0;y<e;y++)Math.abs((T.pixels[0][y]-A)/A)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)T.pixels[0][y]!==A&&(t[y]=1);T.mask=t}let R=0,M=0;if(u!==n||p!==r){let e=T.mask;if(e)for(y=0;y<r;y++)if(M=y*n,y<p)for(R=u;R<n;R++)e[M+R]=0;else for(R=0;R<n;R++)e[M+R]=0;else for(e=new Uint8Array(n*r),T.mask=e,y=0;y<p;y++)for(M=y*n,R=0;R<u;R++)e[M+R]=1}return T}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,s=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:i,files:n}=this._parseHeader(s.data),{skipMapInfo:r,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!r){const t=await this._fetchAuxiliaryData(e);null!=t&&(i.statistics=t.statistics??i.statistics,i.histograms=t.histograms,t.histograms&&null==i.statistics&&(i.statistics=(0,S.Pg)(t.histograms)))}r&&this.updateImageSpaceRasterInfo(i),this._set("rasterInfo",i),this._files=n;const o=await this.request(n.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t;if(ee.Z){const s=new Uint8Array(e),i=new ArrayBuffer(e.byteLength),n=new Uint8Array(i);for(let t=0;t<e.byteLength/4;t++)for(let e=0;e<4;e++)n[4*t+e]=s[4*t+3-e];t=new Uint32Array(i)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,f=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:u,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,g=-1;for(;m<this._storageIndex.length;){g++;const e=Math.ceil(u/l/f**g)-1,t=Math.ceil(h/c/f**g)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,g>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=g),this.updateTileInfo()}_getBandSegmentCount(){return this._isBsq?this.rasterInfo.bandCount:1}_getTileLocation(e,t,s){const{blockWidth:i,blockHeight:n,pyramidScalingFactor:r}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,f,u,h=0,p=0;for(u=0;u<e;u++)p=r**u,c=Math.ceil(a/i/p),f=Math.ceil(o/n/p),h+=c*f;p=r**e,c=Math.ceil(a/i/p),f=Math.ceil(o/n/p),h+=t*c+s,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,g=0;const y=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],g=m+d[4*e+2]*2**32+d[4*e+3]-1,y.push({from:m,to:g});return{ranges:y,actualTileWidth:s<c-1?i:Math.ceil(a/p)-i*(c-1),actualTileHeight:t<f-1?n:Math.ceil(o/p)-n*(f-1)}}_parseHeader(e){const t=(0,P.V6)(e,"MRF_META/Raster");if(!t)throw new i.A("mrf:open","not a valid MRF format");const s=(0,P.V6)(t,"Size"),n=parseInt(s.getAttribute("x"),10),r=parseInt(s.getAttribute("y"),10),a=parseInt(s.getAttribute("c"),10),o=((0,P.mX)(t,"Compression")||"none").toLowerCase();if(!se.has(o))throw new i.A("mrf:open","currently does not support compression "+o);const f=(0,P.mX)(t,"DataType")||"UInt8",u=te.get(f.toLowerCase());if(null==u)throw new i.A("mrf:open","currently does not support pixel type "+f);const h=(0,P.V6)(t,"PageSize"),p=parseInt(h.getAttribute("x"),10),d=parseInt(h.getAttribute("y"),10),m=h.getAttribute("c"),g=m?m===String(a):se.get(o).isOneSegment;this._isBsq=!g;const y=(0,P.V6)(t,"DataValues");let x;if(y){const e=y.getAttribute("NoData");null!=e&&(x=e.trim().split(" ").map(e=>parseFloat(e)))}if((0,P.V6)(e,"MRF_META/CachedSource"))throw new i.A("mrf:open","currently does not support MRF referencing other data files");const w=(0,P.V6)(e,"MRF_META/GeoTags"),I=(0,P.V6)(w,"BoundingBox");let b,v=!1;if(null!=I){const e=parseFloat(I.getAttribute("minx")),t=parseFloat(I.getAttribute("miny")),s=parseFloat(I.getAttribute("maxx")),i=parseFloat(I.getAttribute("maxy")),n=(0,P.mX)(w,"Projection")||"";let r=c.A.WGS84;if("LOCAL_CS[]"!==n)if(n.toLowerCase().startsWith("epsg:")){const e=Number(n.slice(5));isNaN(e)||0===e||(r=new c.A({wkid:e}))}else r=E(n)??c.A.WGS84;else v=!0,r=new c.A({wkid:3857});b=new l.A(e,t,s,i),b.spatialReference=r}else v=!0,b=new l.A({xmin:-.5,ymin:.5-r,xmax:n-.5,ymax:.5,spatialReference:new c.A({wkid:3857})});const C=(0,P.V6)(e,"MRF_META/Rsets"),S=parseInt(C?.getAttribute("scale")||"2",10),T=b.spatialReference,R=new Z.A({origin:new V.A({x:b.xmin,y:b.ymax,spatialReference:T}),blockWidth:p,blockHeight:d,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:o,pyramidScalingFactor:S}),M=new V.A({x:b.width/n,y:b.height/r,spatialReference:T}),O=new A.A({width:n,height:r,extent:b,isPseudoSpatialReference:v,spatialReference:T,bandCount:a,pixelType:u,pixelSize:M,noDataValue:x,storageInfo:R}),_=this._getAuxFullPath((0,P.mX)(t,"DataFile")),k=this._getAuxFullPath((0,P.mX)(t,"IndexFile"));return{rasterInfo:O,files:{mrf:this.url,index:k||this.url.replace(".mrf",".idx"),data:_||this.url.replace(".mrf",se.get(o).blobExtension)}}}_getAuxFullPath(e){return e?e.includes("\\")?null:e.includes("/")?e.startsWith(new URL(this.url).origin)?e:null:`${this.url.slice(0,this.url.lastIndexOf("/"))}/${e}`:null}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return z(t)}catch{return null}}};(0,n.Cg)([(0,r.MZ)()],ie.prototype,"_files",void 0),(0,n.Cg)([(0,r.MZ)()],ie.prototype,"_storageIndex",void 0),(0,n.Cg)([(0,r.MZ)()],ie.prototype,"_isBsq",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),ie=(0,n.Cg)([(0,r.$K)("esri.layers.raster.datasets.MRFRaster")],ie);const ne=ie;s(44208);var re=s(53966),ae=s(9334);function oe(e){const t=e.fields,s=e.records,i=t.some(e=>"oid"===e.name.toLowerCase())?"OBJECTID":"OID",n=[{name:i,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map(e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name}))),r=n.map(e=>e.name),a=[];let o=0,l=0;return s.forEach(e=>{const t={};for(t[i]=o++,l=1;l<r.length;l++)t[r[l]]=e[l-1];a.push({attributes:t})}),{displayFieldName:"",fields:n,features:a}}function le(e){const t=new DataView(e),s=3&t.getUint8(0);if(3!==s)return{header:{version:s},recordSet:null};const i=t.getUint32(4,!0),n=t.getUint16(8,!0),r=t.getUint16(10,!0),a={version:s,recordCount:i,headerByteCount:n,recordByteCount:r};let o=32;const l=[],c=[];for(;13!==t.getUint8(o);){const s=String.fromCharCode(t.getUint8(o+11)).trim();l.push({name:(0,ae.w)(new Uint8Array(e,o,11)),type:s,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(s)],length:t.getUint8(o+16)}),o+=32}if(o+=1,l.length>0)for(;c.length<i&&e.byteLength-o>r;){const s=[];32===t.getUint8(o)?(o+=1,l.forEach(t=>{if("C"===t.type)s.push((0,ae.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)s.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)s.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const i=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();s.push(new Date(parseInt(i.slice(0,4),10),parseInt(i.slice(4,6),10)-1,parseInt(i.slice(6,8),10)))}o+=t.length}),c.push(s)):o+=r}return{header:a,fields:l,records:c,recordSet:oe({fields:l,records:c})}}var ce=s(44094),fe=s(94213);let ue=class extends a.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,s,i={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,s))return null;const n=await this._fetchRawTiffTile(e,t,s,!1,i);if(null!=n&&this._headerInfo.hasMaskBand){const r=await this._fetchRawTiffTile(e,t,s,!0,i);null!=r&&r.pixels[0]instanceof Uint8Array&&(n.mask=r.pixels[0])}return n}async _open(e){const t=e?e.signal:null,{data:s}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!s)throw new i.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:n,firstIFDPos:r,isBigTiff:a}=(0,ce.uT)(s),o=[],f={fileChunk:s,posIFD:r,fileOffset:0};await this._readIFDs(o,f,n,a?8:4,t);const{imageInfo:u,rasterInfo:h}=function(e){const t=(0,ce.uc)(e),{width:s,height:i,tileWidth:n,tileHeight:r,planes:a,pixelType:o,compression:f,firstPyramidLevel:u,maximumPyramidLevel:h,pyramidBlockWidth:p,pyramidBlockHeight:d,pyramidResolutions:m,tileBoundary:g,affine:y,metadata:x,colormap:w}=t;let I=E(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),b=!!t.isPseudoGeographic;null==I&&(b=!0,I=new c.A({wkid:3857}));const v=new l.A({...t.extent,spatialReference:I}),C=new V.A(v?{x:v.xmin,y:v.ymax,spatialReference:I}:{x:0,y:0}),S=new Z.A({blockWidth:n,blockHeight:r,pyramidBlockWidth:p,pyramidBlockHeight:d,compression:f,origin:C,firstPyramidLevel:u,maximumPyramidLevel:h,pyramidResolutions:m,blockBoundary:g}),T=new V.A({x:(v.xmax-v.xmin)/s,y:(v.ymax-v.ymin)/i,spatialReference:I}),R=x?{BandProperties:x.bandProperties,DataType:x.dataType}:{},M=new A.A({width:s,height:i,bandCount:a,pixelType:o,pixelSize:T,storageInfo:S,spatialReference:I,isPseudoSpatialReference:b,keyProperties:R,extent:v,colormap:w,statistics:x?x.statistics:null});if(y?.length&&(M.nativeExtent=new l.A({xmin:-.5,ymin:.5-i,xmax:s-.5,ymax:.5,spatialReference:I}),M.transform=new N.A({polynomialOrder:1,forwardCoefficients:[y[2]+y[0]/2,y[5]-y[3]/2,y[0],y[3],-y[1],-y[4]]}),M.extent=M.transform.forwardTransform(M.nativeExtent),M.pixelSize=new V.A({x:(v.xmax-v.xmin)/s,y:(v.ymax-v.ymin)/i,spatialReference:I}),S.origin.x=-.5,S.origin.y=.5),m){const{x:e,y:t}=M.pixelSize;m.forEach(s=>{s.x*=e,s.y*=t})}return{imageInfo:t,rasterInfo:M}}(o),p=(0,ce.zS)(o),d=(0,ce.r9)(o);if(this._headerInfo={littleEndian:n,isBigTiff:a,ifds:o,pyramidIFDs:p,maskIFDs:d,...u},this._set("rasterInfo",h),!u.isSupported)throw new i.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new i.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");h.isPseudoSpatialReference&&re.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const m=o[0].get("PREDICTOR")?.values?.[0],g=o[0].get("SAMPLEFORMAT")?.values?.[0];if(3===g&&2===m)throw new i.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:y,skipExtensions:x=[]}=this.ioConfig;if(!x.includes("aux.xml")&&!y){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,S.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const s=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new V.A({x:(s.xmax-s.xmin)/t.width,y:(s.ymax-s.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=s}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,h)}x.includes("vat.dbf")||1!==h.bandCount||"u8"!==h.pixelType||y||(h.attributeTable=await this._fetchAuxiliaryTable(e),null!=h.attributeTable&&(h.keyProperties.DataType="thematic")),y&&this.updateImageSpaceRasterInfo(h),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:s,fileOffset:i,posIFD:n}=e;return(n+8>=s.byteLength||n<0)&&(i=n+i,s=(await this.request(this.url,{range:{from:i,to:i+this._bufferSize},responseType:"array-buffer",signal:t})).data,n=0),{fileChunk:s,fileOffset:i,posIFD:n}}async _readIFDs(e,t,s,n=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const a=await this._readIFD(t,s,fe.NB,n,r);if(!a?.ifd)throw new i.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(a.ifd),!a.nextIFD)return null;t.posIFD=a.nextIFD-t.fileOffset,await this._readIFDs(e,t,s,n,r)}async _readIFD(e,t,s=fe.NB,i=4,n){let{fileChunk:r,posIFD:a,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ce.JM)(r,t,a,o,s,i);if(l.success){const e=[];if(l.ifd?.forEach(t=>{t.values||e.push(t)}),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,n),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),s=e?.values;if(s&&s.length>4){const i=s[0]+"."+s[1]+"."+s[2];a=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:r,posIFD:a,fileOffset:o},n),c=await this._readIFD(l,t,fe.YC,2,n);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[i]})}}return l}return l.requiredBufferSize?(r=(await this.request(this.url,{range:{from:o,to:o+a+l.requiredBufferSize+8},responseType:"array-buffer",signal:n})).data,r.byteLength<a+l.requiredBufferSize?null:(e.fileChunk=r,e.fileOffset=o,this._readIFD(e,t,s,i,n))):null}async _fillOffsets(e,t,s,i){const n=e.filter(e=>null!=e.offlineOffsetSize);if(0===n.length)return;const r=n.map(e=>e.offlineOffsetSize),a=Math.min.apply(null,r.map(e=>e[0])),o=Math.max.apply(null,r.map(e=>e[0]+e[1]));let l=1===r.length||o-a<=this._bufferSize;if(!l&&r.length>1&&(r.sort((e,t)=>e[0]-t[0]),l=r.reduce((e,t)=>e===t[0]?t[0]+t[1]:0,r[0][0])===o),l){const e=await this._fetchOffsets(a,Math.max(o,a+this._bufferSize),i);return void n.forEach(s=>(0,ce.Cr)(e,t,s,a))}const c=n.map(async e=>{const s=e.offlineOffsetSize,n=await this._fetchOffsets(s[0],s[1]+s[0],i);(0,ce.Cr)(n,t,e,s[0])});await Promise.all(c)}async _fetchOffsets(e,t,s){const i=[],n=this._chunkSize,r=Math.ceil((t-e)/n);let a=e;for(let e=0;e<r;e++)i.push(this.request(this.url,{range:{from:a,to:e===r-1?t:a+n-1},responseType:"array-buffer",signal:s})),a+=n;const o=await Promise.all(i);if(1===r)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<r;e++)l.set(new Uint8Array(o[e].data),e*n);return l.buffer}async _fetchRawTiffTile(e,t,s,i,n={}){const r=this._getTileLocation(e,t,s,i);if(!r)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=r,f=a.map(e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:n.signal})),u=await Promise.all(f),h=u.map(e=>e.data.byteLength).reduce((e,t)=>e+t),p=1===u.length?u[0].data:new ArrayBuffer(h),d=[0],m=[0];if(u.length>1){const e=new Uint8Array(p);for(let t=0,s=0;t<u.length;t++){const i=u[t].data;e.set(new Uint8Array(i),s),d[t]=s,s+=i.byteLength,m[t]=i.byteLength}}const{blockWidth:g,blockHeight:y}=this.getBlockWidthHeight(e),x=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:g,height:y,planes:null,pixelType:null});if(null==x)return null;if(o!==g||l!==y){let e=x.mask;if(e)for(let t=0;t<y;t++){const s=t*g;if(t<l)for(let t=o;t<g;t++)e[s+t]=0;else for(let t=0;t<g;t++)e[s+t]=0}else{e=new Uint8Array(g*y),x.mask=e;for(let t=0;t<l;t++){const s=t*g;for(let t=0;t<o;t++)e[s+t]=1}}}return x}_getTileLocation(e,t,s,i=!1){const{firstPyramidLevel:n,blockBoundary:r}=this.rasterInfo.storageInfo,a=0===e?0:e-(n-1),{_headerInfo:o}=this;if(!o)return null;const l=i?o.maskIFDs[a]:0===a?o.ifds[0]:o.pyramidIFDs[a-1];if(!l)return null;const c=(0,ce.XO)(l,o),f=(0,ce.wc)(l,"TILEOFFSETS"),u=(0,ce.wc)(l,"TILEBYTECOUNTS");if(!f?.length||!u?.length)return null;const{minRow:h,minCol:p,maxRow:d,maxCol:m}=r[a];if(t>d||s>m||t<h||s<p)return null;const g=(0,ce.LZ)(l,"IMAGEWIDTH"),y=(0,ce.LZ)(l,"IMAGELENGTH"),x=(0,ce.LZ)(l,"TILEWIDTH"),w=(0,ce.LZ)(l,"TILELENGTH"),I=[];if(c){const{bandCount:e}=this.rasterInfo;for(let i=0;i<e;i++){const e=i*(d+1)*(m+1)+t*(m+1)+s;I[i]={from:f[e],to:f[e]+u[e]-1}}}else{const e=t*(m+1)+s;I.push({from:f[e],to:f[e]+u[e]-1})}for(let e=0;e<I.length;e++)if(null==I[e].from||!I[e].to||I[e].to<0)return null;return{ranges:I,ifd:l,actualTileWidth:s===m&&g%x||x,actualTileHeight:t===d&&y%w||w}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return z(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),s=le(t);return s?.recordSet?O.A.fromJSON(s.recordSet):null}catch{return null}}};(0,n.Cg)([(0,r.MZ)()],ue.prototype,"_files",void 0),(0,n.Cg)([(0,r.MZ)()],ue.prototype,"_headerInfo",void 0),(0,n.Cg)([(0,r.MZ)()],ue.prototype,"_bufferSize",void 0),(0,n.Cg)([(0,r.MZ)()],ue.prototype,"_chunkSize",void 0),(0,n.Cg)([(0,r.MZ)({type:String,json:{write:!0}})],ue.prototype,"datasetFormat",void 0),ue=(0,n.Cg)([(0,r.$K)("esri.layers.raster.datasets.TIFFRaster")],ue);const he=ue,pe=new Map;pe.set("MRF",{desc:"Meta Raster Format",constructor:ne}),pe.set("TIFF",{desc:"GeoTIFF",constructor:he}),pe.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Q}),pe.set("JPG",{desc:"JPG Raster Format",constructor:G}),pe.set("PNG",{desc:"PNG Raster Format",constructor:G}),pe.set("GIF",{desc:"GIF Raster Format",constructor:G}),pe.set("BMP",{desc:"BMP Raster Format",constructor:G}),pe.set("CovJSON",{desc:"COVJSON Raster Format",constructor:k}),pe.set("MEMORY",{desc:"In Memory Raster Format",constructor:M});class de{static get supportedFormats(){const e=new Set;return pe.forEach((t,s)=>e.add(s)),e}static async open(e){const{url:t,ioConfig:s,source:n,sourceJSON:r}=e;let a=e.datasetFormat??s?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===n?.type?.toLowerCase()?a="CovJSON":n?.extent&&n.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a||"DM"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const o={url:t,source:n,sourceJSON:r,datasetFormat:a,ioConfig:s??{bandIds:null,sampling:null}};if(Object.keys(o).forEach(e=>{null==o[e]&&delete o[e]}),a){if(!this.supportedFormats.has(a))throw new i.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new i.A("rasterfactory:open",`cannot open raster: ${t}`);const s=new(0,pe.get(a).constructor)(o);return s.rasterJobHandler=e.rasterJobHandler,s.rasterInfo=e.rasterInfo,await s.open({signal:e.signal}),s}const l=Array.from(pe.keys()).filter(e=>"CovJSON"!==e&&"Memory"!==e);let c=0;const f=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,pe.get(a).constructor)(o);return t.rasterJobHandler=e.rasterJobHandler,t.open({signal:e.signal}).then(()=>t).catch(()=>f())};return f()}static register(e,t,s){pe.has(e.toUpperCase())||pe.set(e.toUpperCase(),{desc:t,constructor:s})}}},330(e,t,s){function i(e,t){if(!e||!t)return[];let s=t;t.includes("/")?(s=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const n=[];if(t){const r=i(e,s);for(let e=0;e<r.length;e++)i(r[e],t).forEach(e=>n.push(e));return n}const r=e.getElementsByTagNameNS("*",s);if(!r||0===r.length)return[];for(let e=0;e<r.length;e++)n.push(r[e]||r.item(e));return n}function n(e,t){if(!e||!t)return null;let s=t;t.includes("/")?(s=t.slice(0,t.indexOf("/")),t=t.slice(t.indexOf("/")+1)):t="";const r=i(e,s);return r.length>0?t?n(r[0],t):r[0]:null}function r(e,t=null){const s=t?n(e,t):e;let i;return s?(i=s.textContent||s.nodeValue,i?i.trim():null):null}function a(e,t){const s=i(e,t),n=[];let r;for(let e=0;e<s.length;e++)r=s[e].textContent||s[e].nodeValue,r&&(r=r.trim(),""!==r&&n.push(r));return n}function o(e,t=null){const s=r(e,t);return s?.split(" ").map(e=>Number(e))??[]}function l(e,t){return a(e,t).map(e=>Number(e))}function c(e,t){const s=r(e,t);return Number(s)}function f(e,t){const s=e?.nodeName?.toLowerCase(),i=t.toLowerCase();return s.slice(s.lastIndexOf(":")+1)===i}function u(e){return e.nodeName.slice(e.nodeName.lastIndexOf(":")+1)}s.d(t,{Dy:()=>a,IC:()=>i,Ui:()=>l,V6:()=>n,g7:()=>f,mX:()=>r,pN:()=>o,v7:()=>c,vv:()=>u})},10333(e,t,s){s.d(t,{A:()=>a});var i=s(32198),n=s(25482),r=s(91429);let a=class extends n.o{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,i.Cg)([(0,r.MZ)()],a.prototype,"affectsPixelSize",null),(0,i.Cg)([(0,r.MZ)({json:{write:!0}})],a.prototype,"spatialReference",void 0),a=(0,i.Cg)([(0,r.$K)("esri.layers.raster.transforms.BaseRasterTransform")],a)},75414(e,t,s){s.d(t,{A:()=>l});var i,n=s(32198),r=s(91429),a=s(10333),o=s(93223);let l=i=class extends a.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new i({tolerance:this.tolerance})}};(0,n.Cg)([(0,o.e)({GCSShiftXform:"gcs-shift"})],l.prototype,"type",void 0),(0,n.Cg)([(0,r.MZ)()],l.prototype,"tolerance",void 0),l=i=(0,n.Cg)([(0,r.$K)("esri.layers.raster.transforms.GCSShiftTransform")],l)},43163(e,t,s){s.d(t,{A:()=>d});var i,n=s(32198),r=s(91429),a=s(5443),o=s(86738),l=s(10333),c=s(36005),f=s(43937),u=s(93223);function h(e,t,s){const{x:i,y:n}=t;if(s<2)return{x:e[0]+i*e[2]+n*e[4],y:e[1]+i*e[3]+n*e[5]};if(2===s){const t=i*i,s=n*n,r=i*n;return{x:e[0]+i*e[2]+n*e[4]+t*e[6]+r*e[8]+s*e[10],y:e[1]+i*e[3]+n*e[5]+t*e[7]+r*e[9]+s*e[11]}}const r=i*i,a=n*n,o=i*n,l=r*i,c=r*n,f=i*a,u=n*a;return{x:e[0]+i*e[2]+n*e[4]+r*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+f*e[16]+u*e[18],y:e[1]+i*e[3]+n*e[5]+r*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+f*e[17]+u*e[19]}}function p(e,t,s){const{xmin:i,ymin:n,xmax:r,ymax:o,spatialReference:l}=t;let c=[];if(s<2)c.push({x:i,y:o}),c.push({x:r,y:o}),c.push({x:i,y:n}),c.push({x:r,y:n});else{let e=10;for(let t=0;t<e;t++)c.push({x:i,y:n+(o-n)*t/(e-1)}),c.push({x:r,y:n+(o-n)*t/(e-1)});e=8;for(let t=1;t<=e;t++)c.push({x:i+(r-i)*t/e,y:n}),c.push({x:i+(r-i)*t/e,y:o})}c=c.map(t=>h(e,t,s));const f=c.map(e=>e.x),u=c.map(e=>e.y);return new a.A({xmin:Math.min.apply(null,f),xmax:Math.max.apply(null,f),ymin:Math.min.apply(null,u),ymax:Math.max.apply(null,u),spatialReference:l})}let d=i=class extends l.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:s,coeffY:i}=t;if(!s?.length||!i?.length||s.length!==i.length)return null;const n=[];for(let e=0;e<s.length;e++)n.push(s[e]),n.push(i[e]);return n}writeForwardCoefficients(e,t,s){const i=[],n=[];for(let t=0;t<e?.length;t++)t%2==0?i.push(e[t]):n.push(e[t]);t.coeffX=i,t.coeffY=n}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,s,i,n,r,a]=e,o=i*a-r*n,l=r*n-i*a;return[(r*s-t*a)/o,(i*s-t*n)/l,a/o,n/l,-r/o,-i/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:s,inverseCoeffY:i}=t;if(!s?.length||!i?.length||s.length!==i.length)return null;const n=[];for(let e=0;e<s.length;e++)n.push(s[e]),n.push(i[e]);return n}writeInverseCoefficients(e,t,s){const i=[],n=[];for(let t=0;t<e?.length;t++)t%2==0?i.push(e[t]):n.push(e[t]);t.inverseCoeffX=i,t.inverseCoeffY=n}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=h(this.forwardCoefficients,e,this.polynomialOrder);return new o.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=h(this.inverseCoefficients,e,this.polynomialOrder);return new o.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return p(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new i({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,n.Cg)([(0,r.MZ)({json:{write:!0}})],d.prototype,"polynomialOrder",void 0),(0,n.Cg)([(0,r.MZ)()],d.prototype,"forwardCoefficients",void 0),(0,n.Cg)([(0,c.w)("forwardCoefficients",["coeffX","coeffY"])],d.prototype,"readForwardCoefficients",null),(0,n.Cg)([(0,f.K)("forwardCoefficients")],d.prototype,"writeForwardCoefficients",null),(0,n.Cg)([(0,r.MZ)({json:{write:!0}})],d.prototype,"inverseCoefficients",null),(0,n.Cg)([(0,c.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],d.prototype,"readInverseCoefficients",null),(0,n.Cg)([(0,f.K)("inverseCoefficients")],d.prototype,"writeInverseCoefficients",null),(0,n.Cg)([(0,r.MZ)()],d.prototype,"affectsPixelSize",null),(0,n.Cg)([(0,u.e)({PolynomialXform:"polynomial"})],d.prototype,"type",void 0),d=i=(0,n.Cg)([(0,r.$K)("esri.layers.raster.transforms.PolynomialTransform")],d)}}]);
@@ -0,0 +1 @@
1
+ "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[152],{52106(e,t,r){r.d(t,{A:()=>S});var s,n,i=r(32198),a=r(37838),o=r(69540),l=r(51447),c=r(25482),h=r(53966),u=r(36708),d=r(24326),g=r(91429),m=r(12195),f=r(65864),p=r(50498),y=r(55156),_=r(60950),b=r(54339),T=r(94128),v=r(33910);const w=Symbol("meshGeometryHandles");function A(e){if(null==e)return null;const t={};for(const r in e){const s=e[r];s&&(t[r]=s.toJSON())}return 0!==Object.keys(t).length?t:null}let S=class extends((0,o.OU)(c.o)){static{s=T.Z}static{n=this}constructor(e){super(e),this[s]=!0,this.distance=null,this.isAggregate=!1,this.layer=null,this.origin=null,this.sourceLayer=null,this.statisticsAggregatedIds=void 0,this._version=0,Object.defineProperty(this,"uid",{value:(0,d.c)(),configurable:!0}),Object.defineProperty(this,"_lastMeshTransform",{value:{},configurable:!0,writable:!0,enumerable:!1}),arguments.length>1&&(0,l.eF)(h.A.getLogger(this),"Graphic",{version:"4.30"})}set aggregateGeometries(e){const t=this._get("aggregateGeometries");JSON.stringify(t)!==JSON.stringify(e)&&this._set("aggregateGeometries",e)}set attributes(e){const t=this._get("attributes");t!==e&&(this._set("attributes",e),this._notifyLayer("attributes",t,e))}set geometry(e){const t=this._get("geometry");t!==e&&(this._set("geometry",e),this._watchMeshGeometryChanges(),this._notifyLayer("geometry",t,e))}set popupTemplate(e){const t=this._get("popupTemplate");t!==e&&(this._set("popupTemplate",e),this._notifyLayer("popupTemplate",t,e))}set symbol(e){const t=this._get("symbol");t!==e&&(this._set("symbol",e),this._notifyLayer("symbol",t,e))}get version(){return this._version}set visible(e){const t=this._get("visible");t!==e&&(this._set("visible",e),this._notifyLayer("visible",t,e))}cloneShallow(){return new n({aggregateGeometries:this.aggregateGeometries,statisticsAggregatedIds:this.statisticsAggregatedIds,attributes:this.attributes,geometry:this.geometry,isAggregate:this.isAggregate,layer:this.layer,popupTemplate:this.popupTemplate,sourceLayer:this.sourceLayer,symbol:this.symbol,visible:this.visible,origin:this.origin})}getEffectivePopupTemplate(e=!1){if(this.popupTemplate)return this.popupTemplate;const t=(0,_.E_)(this.origin);if(t)return t.popupTemplate??(e?t.defaultPopupTemplate:null)??null;const r=this.origin&&"layer"in this.origin?this.origin.layer:null;for(const t of[r,this.sourceLayer,this.layer])if(t&&"object"==typeof t){if("popupTemplate"in t&&t.popupTemplate)return t.popupTemplate;if(e&&"defaultPopupTemplate"in t&&null!=t.defaultPopupTemplate)return t.defaultPopupTemplate}return null}getAttribute(e){return this.attributes?.[e]}setAttribute(e,t){if(this.attributes){const r=this.getAttribute(e);this.attributes[e]=t,this._notifyLayer("attributes",r,t,e)}else this.attributes={[e]:t}}getObjectId(){const e=(0,y.I)(this.origin);if(e)return(0,b.r)(this,e);const t=this.sourceLayer??this.layer;return t?(0,b.r)(this,t):null}getGlobalId(){const e=(0,y.I)(this.origin);if(e?.globalIdField)return this.getAttribute(e.globalIdField);const t=this.sourceLayer??this.layer;return t&&"globalIdField"in t&&t.globalIdField?this.getAttribute(t.globalIdField):null}toJSON(){const e={aggregateGeometries:A(this.aggregateGeometries),geometry:this.geometry?.toJSON()??null,symbol:this.symbol?.toJSON()??null,attributes:(0,m.W)(this.attributes)?this.attributes.toJSON():{...this.attributes},popupTemplate:this.popupTemplate?.toJSON()??null};return this.statisticsAggregatedIds?.length&&(e.aggregateIds=[...this.statisticsAggregatedIds]),null!=this.distance&&(e.distance=this.distance),e}notifyMeshTransformChanged(e={}){const{geometry:t}=this;if("mesh"===t?.type){const r={origin:t.origin,transform:t.transform};this._notifyLayer("origin-transform",r,r,e.action)}}_notifyLayer(e,t,r,s){if(this._version++,!this.layer||!("graphicChanged"in this.layer))return;const n={graphic:this,property:e,oldValue:t,newValue:r};"origin-transform"===e&&(n.action=s),"attributes"===e&&(n.attributeName=s),this.layer.graphicChanged(n)}_watchMeshGeometryChanges(){this.removeHandles(w);const e=this.geometry;"mesh"===e?.type&&this.addHandles([(0,u.z7)(()=>e.vertexSpace.origin?{localMatrix:e.transform?.localMatrix,origin:e.vertexSpace.origin}:void 0,({localMatrix:e,origin:t})=>{this._lastMeshTransform.localMatrix===e&&this._lastMeshTransform.origin===t||(this._lastMeshTransform.localMatrix=e,this._lastMeshTransform.origin=t,this.notifyMeshTransformChanged())}),(0,u.z7)(()=>({vertexAttributes:e.vertexAttributes}),()=>{e.vertexSpace.origin?(this._lastMeshTransform.localMatrix=e.transform?.localMatrix,this._lastMeshTransform.origin=e.vertexSpace.origin):(this._lastMeshTransform.localMatrix=void 0,this._lastMeshTransform.origin=void 0),this._notifyLayer("geometry",e,e)},{equals:(e,t)=>e===t,sync:!0})],w)}};(0,i.Cg)([(0,g.MZ)({value:null,json:{read:function(e){if(!e)return null;const t={};for(const r in e){const s=(0,f.rS)(e[r]);s&&(t[r]=s)}return 0!==Object.keys(t).length?t:null}}})],S.prototype,"aggregateGeometries",null),(0,i.Cg)([(0,g.MZ)({value:null})],S.prototype,"attributes",null),(0,i.Cg)([(0,g.MZ)({value:null,types:p.yR,json:{read:f.rS}})],S.prototype,"geometry",null),(0,i.Cg)([(0,g.MZ)()],S.prototype,"distance",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean})],S.prototype,"isAggregate",void 0),(0,i.Cg)([(0,g.MZ)({clonable:!1})],S.prototype,"layer",void 0),(0,i.Cg)([(0,g.MZ)({clonable:"reference"})],S.prototype,"origin",void 0),(0,i.Cg)([(0,g.MZ)({type:a.A,value:null})],S.prototype,"popupTemplate",null),(0,i.Cg)([(0,g.MZ)({clonable:"reference"})],S.prototype,"sourceLayer",void 0),(0,i.Cg)([(0,g.MZ)({json:{name:"aggregateIds",read:e=>e?.map(e=>Array.isArray(e)?JSON.stringify(e):e)}})],S.prototype,"statisticsAggregatedIds",void 0),(0,i.Cg)([(0,g.MZ)({value:null,types:v.Es})],S.prototype,"symbol",null),(0,i.Cg)([(0,g.MZ)({clonable:!1,json:{read:!1,write:!1}})],S.prototype,"_version",void 0),(0,i.Cg)([(0,g.MZ)({type:Boolean,value:!0})],S.prototype,"visible",null),S=n=(0,i.Cg)([(0,g.$K)("esri.Graphic")],S)},11221(e,t,r){r.d(t,{t1:()=>w,Jn:()=>A,Rn:()=>T,An:()=>v,rj:()=>b});var s=r(52106),n=r(48938),i=r(54639),a=r(23732),o=r(87449),l=r(32198),c=r(93833),h=r(60999);class u{constructor(e,t){this._parent=e,this._abortSignal=t,this._done=!1,this._features=null,this._batchMutex=new h.aD,this._currentPage=null,this._pageCursor=-1}get _numAvailable(){return null==this._currentPage||this._pageCursor<0?0:Math.max(this._currentPage.length-this._pageCursor,0)}_takeNFeatures(e){if(null==this._currentPage)return[];const t=this._currentPage.slice(this._pageCursor,this._pageCursor+e);return this._pageCursor+=t.length,t.map(e=>s.A.fromJSON(e))}_takeOneFeature(){const e=this._currentPage[this._pageCursor];return this._pageCursor+=1,s.A.fromJSON(e)}async _nextBatch(){if(this._done)return!1;const e=await(this._features??=this._parent.queryAll(this._abortSignal));let t;do{if(t=await e.next(),t.done)return this._done=!0,this._currentPage=null,this._pageCursor=-1,!1}while(t.value.length<=0);return this._currentPage=t.value,this._pageCursor=0,!0}async nextBatchAsArcadeFeatures(e,t){const r=await this.nextBatch(e);return null==r?r:r.map(e=>c.Xj.createFromGraphicLikeObject(e.geometry,e.attributes,this._parent,t))}async nextBatch(e){const t={stack:[],error:void 0,hasError:!1};try{if(this._done)return null;if(e<=0)return[];if((0,l.mS)(t,await this._batchMutex.acquire(),!1),this._numAvailable>=e)return this._takeNFeatures(e);const r=[];let s=e;do{const e=this._takeNFeatures(s);s-=e.length,r.push(e)}while(s>0&&await this._nextBatch());const n=r.flat();return n.length>0?n:null}catch(e){t.error=e,t.hasError=!0}finally{(0,l.hk)(t)}}async next(){const e={stack:[],error:void 0,hasError:!1};try{return this._done?null:((0,l.mS)(e,await this._batchMutex.acquire(),!1),this._numAvailable>=1||await this._nextBatch()?this._takeOneFeature():null)}catch(t){e.error=t,e.hasError=!0}finally{(0,l.hk)(e)}}}var d=r(33325),g=r(50145),m=r(71163),f=r(5479),p=r(89696),y=r(16930),_=r(95466);function b(e){switch(e){case"esriSpatialRelIntersects":return{spatialRelationship:"intersects",relationParameter:null};case"esriSpatialRelContains":return{spatialRelationship:"contains",relationParameter:null};case"esriSpatialRelOverlaps":return{spatialRelationship:"overlaps",relationParameter:null};case"esriSpatialRelWithin":return{spatialRelationship:"within",relationParameter:null};case"esriSpatialRelTouches":return{spatialRelationship:"touches",relationParameter:null};case"esriSpatialRelCrosses":return{spatialRelationship:"crosses",relationParameter:null};case"esriSpatialRelEnvelopeIntersects":return{spatialRelationship:"envelope-intersects",relationParameter:null};default:if(e.includes("esriSpatialRelRelation"))return{spatialRelationship:"relation",relationParameter:e.split(":")[1]};throw new o.dr("NeverReach")}}function T(e,t){for(const r of e)null!=r.geometry&&(r.geometry.spatialReference??=t)}const v=Object.freeze({ordered:!0,filterApplied:!0,spatialFilterApplied:!0,features:Object.freeze({next:()=>Promise.resolve({done:!0,value:void 0}),[Symbol.asyncIterator](){return this}})});class w{constructor(){this.declaredRootClass="esri.arcade.featureset.support.FeatureSet",this._parent=null,this._maxProcessing=200,this._maxQuery=500,this._totalCount=-1,this._databaseType=7,this._databaseTypeProbed=null,this._loadPromise=null,this._allFeatures=null,this._fieldsIndex=null,this.typeIdField=null,this.types=null,this.subtypeField=null,this.subtypes=null,this.fields=null,this.geometryType="",this.objectIdField="",this.globalIdField="",this.spatialReference=null,this.hasM=!1,this.hasZ=!1}_ensureLoaded(){return this.load()}load(){return null===this._loadPromise&&(this._loadPromise=this.loadImpl()),this._loadPromise}async loadImpl(){return await(this._parent?.load()),this._initialiseFeatureSet(),this}_initialiseFeatureSet(){null!==this._parent?(this.fields=this._parent.fields.slice(),this.geometryType=this._parent.geometryType,this.objectIdField=this._parent.objectIdField,this.globalIdField=this._parent.globalIdField,this.spatialReference=this._parent.spatialReference,this.hasM=this._parent.hasM,this.hasZ=this._parent.hasZ,this.typeIdField=this._parent.typeIdField,this.types=this._parent.types,this.subtypeField=this._parent.subtypeField,this.subtypes=this._parent.subtypes):(this.fields=[],this.typeIdField="",this.subtypeField="",this.objectIdField="",this.globalIdField="",this.spatialReference=new y.A({wkid:4326}),this.geometryType=d.ik.point)}getField(e,t){return e=e.toLowerCase(),(t||this.fields).find(t=>t.name.toLowerCase()===e)}getFieldsIndex(){return null===this._fieldsIndex&&(this._fieldsIndex=_.A.fromLayer({timeInfo:this.timeInfo,editFieldsInfo:this.editFieldsInfo,dateFieldsTimeZone:this.dateFieldsTimeZone,datesInUnknownTimezone:this.datesInUnknownTimezone,fields:this.fields})),this._fieldsIndex}_maxProcessingRate(){return null!==this._parent?Math.min(this._maxProcessing,this._parent._maxProcessingRate()):Math.min(this._maxProcessing,this._maxQueryRate())}_maxQueryRate(){return null!==this._parent?Math.max(this._maxQuery,this._parent._maxQueryRate()):this._maxQuery}nativeCapabilities(){return this._parent.nativeCapabilities()}get _hasCachedFeatures(){return null!=this._allFeatures}async queryAll(e){null==this._allFeatures&&(this._allFeatures=this._queryAll().then(e=>(0,f.N5)(e)));const t=(await this._allFeatures)();return null==e||e===n._?t:async function*(){for await(const r of t)(0,o.dZ)(e),yield r}()}async databaseType(){if(7===this._databaseType){if(null!==a.A.applicationCache){const e=a.A.applicationCache.getDatabaseType(this._cacheableFeatureSetSourceKey());if(null!==e)return e}if(null!==this._databaseTypeProbed)return this._databaseTypeProbed;try{this._databaseTypeProbed=this._getDatabaseTypeImpl(),null!==a.A.applicationCache&&a.A.applicationCache.setDatabaseType(this._cacheableFeatureSetSourceKey(),this._databaseTypeProbed)}catch(e){throw null!==a.A.applicationCache&&a.A.applicationCache.clearDatabaseType(this._cacheableFeatureSetSourceKey()),e}return this._databaseTypeProbed}return this._databaseType}async _getDatabaseTypeImpl(){const e=[{dbType:2,probeSql:"(CAST( '2015-01-01' as DATETIME) = CAST( '2015-01-01' as DATETIME)) AND OBJECTID<0"},{dbType:3,probeSql:"(TO_DATE('2003-11-18','YYYY-MM-DD') = TO_DATE('2003-11-18','YYYY-MM-DD')) AND OBJECTID<0"},{dbType:1,probeSql:"(date '2015-01-01 10:10:10' = date '2015-01-01 10:10:10') AND OBJECTID<0"}];for(const t of e)if(!0===await this._runDatabaseProbe(t.probeSql))return t.dbType;return 1}_cacheableFeatureSetSourceKey(){return"MUSTBESET"}async _runDatabaseProbe(e){if(null!==this._parent)return this._parent._runDatabaseProbe(e);throw new o.dr("NotImplemented")}isTable(){return this._parent?.isTable()??!1}async first(e){if(this._hasCachedFeatures)return this.iterator(e).next();const t=await this.query({limit:1,abortSignal:e});for await(const e of t.features)if(e.length>0)return s.A.fromJSON(e[0]);return null}async isEmpty(e){return this._totalCount>=0?0===this._totalCount:null==await this.first(e)}async calculateStatistic(e,t,r,s){await this._ensureLoaded();let n=await this.queryStat({stat:e,field:t,limit:r,abortSignal:s});return!1===n.calculated&&(n=await this._manualStat(e,t,r,s)),n.result}async _manualStat(e,t,r,s){let n=null;switch(e.toLowerCase()){case"count":{if(this._totalCount>=0)return{calculated:!0,result:this._totalCount};const e=await this.queryAll(s);let t=0;for await(const r of e)t+=r.length;return this._totalCount=t,{calculated:!0,result:t}}case"distinct":return n=await(0,g.dM)(this,t,r,s),{calculated:!0,result:n};case"avg":case"mean":return n=await(0,g.i2)(this,t,s),{calculated:!0,result:n};case"stdev":return n=await(0,g.b$)(this,t,s),{calculated:!0,result:n};case"variance":return n=await(0,g.GV)(this,t,s),{calculated:!0,result:n};case"sum":return n=await(0,g.cz)(this,t,s),{calculated:!0,result:n};case"min":return n=await(0,g.jk)(this,t,s),{calculated:!0,result:n};case"max":return n=await(0,g.T9)(this,t,s),{calculated:!0,result:n};default:return{calculated:!0,result:0}}}iterator(e){return new u(this,e)}async sumArea(e,t,r){let s=0;for await(const n of await this.queryAll(r))for(const r of n)null!=r.geometry&&(s+=null!=t?await(0,m.C)("geodeticArea",[r.geometry,(0,i.b)(this.spatialReference),e,t]):await(0,m.C)("area",[r.geometry,(0,i.b)(this.spatialReference),e]));return s}async sumLength(e,t,r){let s=0;for await(const n of await this.queryAll(r))for(const r of n)null!=r.geometry&&(s+=null!=t?await(0,m.C)("geodeticLength",[r.geometry,(0,i.b)(this.spatialReference),e,t]):await(0,m.C)("length",[r.geometry,(0,i.b)(this.spatialReference),e]));return s}async count(e){return await this.load(),this.calculateStatistic("count",p.A.create("1",{fieldsIndex:this.getFieldsIndex(),timeZone:this.dateFieldsTimeZoneDefaultUTC}),-1,e??n._)}castToText(e=!1){return"object, FeatureSet"}queryAttachments(e,t,r,s,n){return this._parent.queryAttachments(e,t,r,s,n)}serviceUrl(){return this._parent.serviceUrl()}subtypeMetadata(){return this.subtypeField&&this.subtypes?{subtypeField:this.subtypeField,subtypes:this.subtypes?this.subtypes.map(e=>({name:e.name,code:e.code})):[]}:this.typeIdField?{subtypeField:this.typeIdField,subtypes:this.types?this.types.map(e=>({name:e.name,code:e.id})):[]}:null}relationshipMetadata(){return this._parent.relationshipMetadata()}get gdbVersion(){return this._parent?this._parent.gdbVersion:""}schema(){const e=[];for(const t of this.fields)e.push((0,d.nE)(t));return{objectIdField:this.objectIdField,globalIdField:this.globalIdField,geometryType:void 0===d.yT[this.geometryType]?"esriGeometryNull":d.yT[this.geometryType],fields:e}}async convertToText(e,t){return"schema"===e?(await this._ensureLoaded(),JSON.stringify(this.schema())):"featureset"===e?JSON.stringify(await this.castAsJsonAsync(t)):this.castToText()}getFeatureByObjectId(e,t){return this._parent.getFeatureByObjectId(e,t)}getOwningSystemUrl(){return this._parent.getOwningSystemUrl()}getIdentityUser(){return this._parent.getIdentityUser()}getRootFeatureSet(){return this._parent.getRootFeatureSet()}getDataSourceFeatureSet(){return null!==this._parent?this._parent.getDataSourceFeatureSet():this}castAsJson(){return{type:"FeatureSet"}}async castAsJsonAsync(e=null){await this._ensureLoaded();const t=[];for await(const r of await this.queryAll(e))for(const e of r){const r=e.attributes;let s=null;if(null!=e.geometry)if(e.geometry.spatialReference){const{spatialReference:t,...r}=e.geometry;s=r}else s=e.geometry;t.push({geometry:s,attributes:r})}return{...this.schema(),features:t,spatialReference:this.spatialReference?.toJSON()??null}}fieldTimeZone(e){return this.getFieldsIndex().getTimeZone(e)}get preferredTimeZone(){return this._parent?.preferredTimeZone??null}get dateFieldsTimeZone(){return this._parent?.dateFieldsTimeZone??null}get dateFieldsTimeZoneDefaultUTC(){return this.datesInUnknownTimezone?"unknown":this.dateFieldsTimeZone||"UTC"}get datesInUnknownTimezone(){return this._parent.datesInUnknownTimezone}get editFieldsInfo(){return this._parent?.editFieldsInfo??null}get timeInfo(){return this._parent?.timeInfo??null}getFeatureSetInfo(){return this._parent?this._parent.getFeatureSetInfo():Promise.resolve(null)}}class A extends w{constructor(){super(...arguments),this._parent=null}getRootFeatureSet(){return this}}},23732(e,t,r){r.d(t,{A:()=>s});class s{static{this.applicationCache=null}constructor(){this._databaseTypeMetaData={},this._layerInfo={}}clearDatabaseType(e){void 0===this._databaseTypeMetaData[e]&&delete this._databaseTypeMetaData[e]}getDatabaseType(e){return"MUSTBESET"===e||void 0===this._databaseTypeMetaData[e]?null:this._databaseTypeMetaData[e]}setDatabaseType(e,t){this._databaseTypeMetaData[e]=t}getLayerInfo(e){return void 0===this._layerInfo[e]?null:this._layerInfo[e]}setLayerInfo(e,t){this._layerInfo[e]=t}clearLayerInfo(e){void 0!==this._layerInfo[e]&&delete this._layerInfo[e]}}},87449(e,t,r){r.d(t,{dZ:()=>a,dr:()=>i});var s=r(799);const n={Cancelled:"Cancelled",InvalidStatResponse:"Invalid statistics response from service",InvalidRequest:"Invalid request",RequestFailed:"Request failed - {reason}",MissingFeatures:"Missing features",AggregationFieldNotFound:"Aggregation field not found",DataElementsNotFound:"Data elements not found on service",NeverReach:"Encountered unreachable logic",NotImplemented:"Not implemented"};class i extends Error{constructor(e,t){super((0,s.HC)(n[e],t)),this.declaredRootClass="esri.arcade.featureset.support.featureseterror",Error.captureStackTrace&&Error.captureStackTrace(this,i)}}function a(e){if(null!=e&&e?.aborted)throw new i("Cancelled")}},80609(e,t,r){r.d(t,{C6:()=>T,DA:()=>C,F1:()=>_,F6:()=>f,IY:()=>v,Ju:()=>I,Kb:()=>g,Mi:()=>h,Nf:()=>y,R8:()=>p,YY:()=>c,bD:()=>u,bm:()=>b,kg:()=>d,oj:()=>M});var s=r(66131),n=r(33325),i=r(1262),a=r(15032),o=r(89696),l=r(34747);function c(e,t){return m(e?.parseTree,t,e?.parameters)}function h(e,t,r){return m(e,t,r)}function u(e,t,r,s){const n=m(e.parseTree,0,e.parameters,t,r);return o.A.create(n,{fieldsIndex:s,timeZone:e.timeZone,currentUser:e.currentUser})}function d(e,t,r="AND"){return o.A.create("(("+c(e,0)+")"+r+"("+c(t,0)+"))",{fieldsIndex:e.fieldsIndex,timeZone:e.timeZone,currentUser:e.currentUser})}function g(e){return!0===e.delimited?`"${e.column.split('"').join('""')}"`:e.column}function m(e,t,r,s=null,a=null){let o,l,c,h;switch(e.type){case"interval":return M(m(e.value,t,r,s,a),e.qualifier,e.op);case"case-expression":{let n=" CASE ";"simple"===e.format&&(n+=m(e.operand,t,r,s,a));for(let i=0;i<e.clauses.length;i++)n+=" WHEN "+m(e.clauses[i].operand,t,r,s,a)+" THEN "+m(e.clauses[i].value,t,r,s,a);return null!==e.else&&(n+=" ELSE "+m(e.else,t,r,s,a)),n+=" END ",n}case"parameter":{const s=r[e.value.toLowerCase()];if("string"==typeof s)return"'"+r[e.value.toLowerCase()].toString().replaceAll("'","''")+"'";if((0,n.$P)(s))return b(s,t);if((0,n.Lk)(s))return b(s,t);if((0,n.eg)(s))return _(s,t);if((0,n.rX)(s))return p(s,t);if((0,n.f0)(s))return y(s,t);if(Array.isArray(s)){const e=[];for(let r=0;r<s.length;r++)"string"==typeof s[r]?e.push("'"+s[r].toString().replaceAll("'","''")+"'"):(0,n.$P)(s[r])||(0,n.Lk)(s[r])?e.push(b(s[r],t)):(0,n.eg)(s[r])?e.push(_(s[r],t)):(0,n.rX)(s[r])?e.push(p(s[r],t)):(0,n.f0)(s[r])?e.push(y(s[r],t)):e.push(s[r].toString());return e}return s.toString()}case"expression-list":l=[];for(const n of e.value)l.push(m(n,t,r,s,a));return l;case"unary-expression":return" ( NOT "+m(e.expr,t,r,s,a)+" ) ";case"binary-expression":switch(e.operator){case"AND":return" ("+m(e.left,t,r,s,a)+" AND "+m(e.right,t,r,s,a)+") ";case"OR":return" ("+m(e.left,t,r,s,a)+" OR "+m(e.right,t,r,s,a)+") ";case"IS":if("null"!==e.right.type)throw new i.L("UnsupportedIsRhs");return" ("+m(e.left,t,r,s,a)+" IS NULL )";case"ISNOT":if("null"!==e.right.type)throw new i.L("UnsupportedIsRhs");return" ("+m(e.left,t,r,s,a)+" IS NOT NULL )";case"IN":return o=[],"expression-list"===e.right.type?(o=m(e.right,t,r,s,a)," ("+m(e.left,t,r,s,a)+" IN ("+o.join(",")+")) "):(h=m(e.right,t,r,s,a),Array.isArray(h)?" ("+m(e.left,t,r,s,a)+" IN ("+h.join(",")+")) ":" ("+m(e.left,t,r,s,a)+" IN ("+h+")) ");case"NOT IN":return o=[],"expression-list"===e.right.type?(o=m(e.right,t,r,s,a)," ("+m(e.left,t,r,s,a)+" NOT IN ("+o.join(",")+")) "):(h=m(e.right,t,r,s,a),Array.isArray(h)?" ("+m(e.left,t,r,s,a)+" NOT IN ("+h.join(",")+")) ":" ("+m(e.left,t,r,s,a)+" NOT IN ("+h+")) ");case"BETWEEN":return c=m(e.right,t,r,s,a)," ("+m(e.left,t,r,s,a)+" BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"NOTBETWEEN":return c=m(e.right,t,r,s,a)," ("+m(e.left,t,r,s,a)+" NOT BETWEEN "+c[0]+" AND "+c[1]+" ) ";case"LIKE":return""!==e.escape?" ("+m(e.left,t,r,s,a)+" LIKE "+m(e.right,t,r,s,a)+" ESCAPE '"+e.escape+"') ":" ("+m(e.left,t,r,s,a)+" LIKE "+m(e.right,t,r,s,a)+") ";case"NOT LIKE":return""!==e.escape?" ("+m(e.left,t,r,s,a)+" NOT LIKE "+m(e.right,t,r,s,a)+" ESCAPE '"+e.escape+"') ":" ("+m(e.left,t,r,s,a)+" NOT LIKE "+m(e.right,t,r,s,a)+") ";case"<>":case"<":case">":case">=":case"<=":case"=":case"*":case"-":case"+":case"/":return" ("+m(e.left,t,r,s,a)+" "+e.operator+" "+m(e.right,t,r,s,a)+") ";case"||":return" ("+m(e.left,t,r,s,a)+" "+(2===t?"+":e.operator)+" "+m(e.right,t,r,s,a)+") "}throw new i.L("UnsupportedOperator",{operator:e.operator});case"null":return"null";case"boolean":return!0===e.value?"1":"0";case"string":return"'"+e.value.toString().replaceAll("'","''")+"'";case"timestamp":return`timestamp '${e.value}'`;case"date":return`date '${e.value}'`;case"time":return`time '${e.value}'`;case"number":return e.value.toString();case"current-time":return T(e.mode,t);case"current-user":return"CURRENT_USER";case"column-reference":return s&&s.toLowerCase()===e.column.toLowerCase()?"("+a+")":g(e);case"data-type":return e.value;case"function":{const n=m(e.args,t,r,s,a);return f(e.name,n,t)}}throw new i.L("UnsupportedSyntax",{node:e.type})}function f(e,t,r){switch(e.toLowerCase().trim()){case"cos":case"sin":case"tan":case"cosh":case"tanh":case"sinh":case"acos":case"asin":case"atan":case"floor":case"log10":case"log":case"abs":if(1!==t.length)throw new i.L("InvalidFunctionParameters",{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]})`;case"ceiling":case"ceil":if(1!==t.length)throw new i.L("InvalidFunctionParameters",{function:"ceiling"});return"CEILING("+t[0]+")";case"mod":case"power":case"nullif":if(2!==t.length)throw new i.L("InvalidFunctionParameters",{function:e.toLowerCase().trim()});return`${e.toUpperCase().trim()}(${t[0]},${t[1]})`;case"round":if(2===t.length)return"ROUND("+t[0]+","+t[1]+")";if(1===t.length)return"ROUND("+t[0]+")";throw new i.L("InvalidFunctionParameters",{function:"round"});case"truncate":if(t.length<1||t.length>2)throw new i.L("InvalidFunctionParameters",{function:"truncate"});return 2===r?"ROUND("+t[0]+(1===t.length?"0":","+t[1])+",1)":"TRUNCATE("+t[0]+(1===t.length?")":","+t[1]+")");case"char_length":case"len":if(1!==t.length)throw new i.L("InvalidFunctionParameters",{function:"char_length"});switch(r){case 2:return"LEN("+t[0]+")";case 3:return"LENGTH("+t[0]+")";default:return"CHAR_LENGTH("+t[0]+")"}case"coalesce":case"concat":{if(t.length<1)throw new i.L("InvalidFunctionParameters",{function:e.toLowerCase()});let r=e.toUpperCase().trim()+"(";for(let e=0;e<t.length;e++)0!==e&&(r+=","),r+=t[e];return r+=")",r}case"lower":case"lcase":if(1!==t.length)throw new i.L("InvalidFunctionParameters",{function:"lower"});return"LOWER("+t[0]+")";case"upper":case"ucase":if(1!==t.length)throw new i.L("InvalidFunctionParameters",{function:"upper"});return"UPPER("+t[0]+")";case"substring":{let e="";switch(r){case 3:return e="SUBSTR("+t[0]+","+t[1],3===t.length&&(e+=","+t[2]),e+=")",e;case 2:return e=3===t.length?"SUBSTRING("+t[0]+","+t[1]+","+t[2]+")":"SUBSTRING("+t[0]+", "+t[1]+", LEN("+t[0]+") - "+t[1]+")",e;default:return e="SUBSTRING("+t[0]+" FROM "+t[1],3===t.length&&(e+=" FOR "+t[2]),e+=")",e}}case"extract":return"EXTRACT("+t[0].replaceAll("'","")+" FROM "+t[1]+")";case"cast":{let e="";switch(r){case 3:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case 4:switch(t[1].type){case"date":e="DATE";break;case"float":e="DOUBLE PRECISION";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;case 2:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INT";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="DATETIME";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`;default:switch(t[1].type){case"date":e="DATE";break;case"float":e="FLOAT";break;case"integer":e="INTEGER";break;case"real":e="REAL";break;case"smallint":e="SMALLINT";break;case"timestamp":e="TIMESTAMP";break;case"varchar":e="VARCHAR("+t[1].size.toString()+")"}return`CAST(${t[0]} AS ${e})`}}}throw new i.L("InvalidFunctionParameters",{function:e})}function p(e,t){const r=e.toDateTime(),s=0===r.hour&&0===r.minute&&0===r.second&&0===r.millisecond;switch(t){case 6:case 0:case 1:return s?`date '${r.toFormat("yyyy-LL-dd")}'`:`timestamp '${r.toFormat("yyyy-LL-dd HH:mm:ss")}'`;case 3:return s?`TO_DATE('${r.toFormat("yyyy-LL-dd")}','YYYY-MM-DD')`:`TO_DATE('${r.toFormat("yyyy-LL-dd HH:mm:ss")}','YYYY-MM-DD HH24:MI:SS')`;case 2:return`'${r.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;case 5:return`#${r.toFormat(s?"LL-dd-yyyy":"LL-dd-yyyy HH:mm:ss")}#`;case 4:return`TIMESTAMP '${r.toFormat(s?"yyyy-LL-dd":"yyyy-LL-dd HH:mm:ss")}'`;default:return`timestamp '${r.toFormat("yyyy-LL-dd HH:mm:ss")}'`}}function y(e,t){switch(t){case 6:case 0:case 1:default:return e.toSQLWithKeyword();case 3:return`TO_DATE('${e.toFormat("Y-MM-DD")}'`;case 2:return`'${e.toFormat("Y-MM-DD")}'`;case 5:return`#${e.toFormat("Y-MM-DD")}#`;case 4:return`TIMESTAMP '${e.toFormat("Y-MM-DD")}'`}}function _(e,t){switch(e instanceof a.k&&(e=e.toStorageString()),t){case 3:return`TO_DATE('${e}', 'HH24:MI:SS')`;case 2:return`'${e}'`;default:return`time '${e}'`}}function b(e,t){return p(s.lY.dateTimeToArcadeDate((0,n.Lk)(e)?e:l.c9.fromJSDate(e)),t)}function T(e,t){switch(t){case 6:case 0:case 1:case 3:case 5:default:return"date"===e?"CURRENT_DATE":"time"===e?"CURRENT_TIME":"CURRENT_TIMESTAMP";case 2:return"date"===e?"CAST(GETDATE() AS DATE)":"time"===e?"CAST(GETDATE() AS TIME)":"GETDATE()";case 4:return"date"===e?"CURRENT_DATE":"time"===e?"LOCALTIME":"CURRENT_TIMESTAMP"}}function v(e,t,r={}){const s={},n={},i={esriFieldTypeSmallInteger:"integer",esriFieldTypeInteger:"integer",esriFieldTypeBigInteger:"integer",esriFieldTypeSingle:"double",esriFieldTypeDouble:"double",esriFieldTypeString:"string",esriFieldTypeTimeOnly:"time-only",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimestampOffset:"timestamp-offset",esriFieldTypeDate:"date",esriFieldTypeOID:"integer",esriFieldTypeGUID:"guid",esriFieldTypeGlobalID:"guid",oid:"integer",long:"integer","small-integer":"integer",integer:"integer","big-integer":"integer",single:"double","time-only":"time-only","date-only":"date-only","timestamp-offset":"timestemp-offset",double:"double",date:"date",guid:"guid","global-id":"guid",string:"string"};for(const e of t){const t=e.type?i[e.type]:void 0;s[e.name.toLowerCase()]=void 0===t?"":t}for(const e in r){const t=i[r[e]];n[e.toLowerCase()]=void 0===t?"":t}switch(w(s,e.parseTree,e.parameters,n)){case"double":return"double";case"integer":return"integer";case"date":return"date";case"date-only":return"date-only";case"time-only":return"time-only";case"timestamp-offset":return"timestamp-offset";case"string":return"string";case"global-id":case"guid":return"guid"}return""}function w(e,t,r,s){let a;switch(t.type){case"interval":return"integer";case"case-expression":{const n=[];if("simple"===t.format){for(let i=0;i<t.clauses.length;i++)n.push(w(e,t.clauses[i].value,r,s));null!==t.else&&n.push(w(e,t.else,r,s))}else{for(let i=0;i<t.clauses.length;i++)n.push(w(e,t.clauses[i].value,r,s));null!==t.else&&n.push(w(e,t.else,r,s))}return S(n)}case"parameter":{const e=s[t.value.toLowerCase()];if(void 0===e&&r){const e=r[t.value.toLowerCase()];if(void 0===e)return"";if(null===e)return"";if("string"==typeof e||e instanceof String)return"string";if("boolean"==typeof e)return"boolean";if((0,n.$P)(e))return"date";if((0,n.rX)(e))return"date";if((0,n.f0)(e))return"date-only";if((0,n.eg)(e))return"time-only";if("number"==typeof e)return e%1==0?"integer":"double"}return void 0===e?"":e}case"expression-list":{const n=[];for(const i of t.value)n.push(w(e,i,r,s));return n}case"unary-expression":return"boolean";case"binary-expression":switch(t.operator){case"AND":case"OR":case"IN":case"NOT IN":case"BETWEEN":case"NOTBETWEEN":case"LIKE":case"NOT LIKE":case"<>":case"<":case">":case">=":case"<=":case"=":return"boolean";case"IS":case"ISNOT":if("null"!==t.right.type)throw new i.L("UnsupportedIsRhs");return"boolean";case"*":case"-":case"+":case"/":return S([w(e,t.left,r,s),w(e,t.right,r,s)]);case"||":return"string";default:throw new i.L("UnsupportedOperator",{operator:t.operator})}case"null":return"";case"boolean":return"boolean";case"string":return"string";case"number":return null===t.value?"":t.value%1==0?"integer":"double";case"date":return"date";case"timestamp":return t.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"current-time":return"time"===t.mode?"time-only":"date";case"current-user":return"string";case"column-reference":{const r=e[t.column.toLowerCase()];return void 0===r?"":r}case"function":switch(t.name.toLowerCase()){case"cast":switch(t.args?.value[1]?.value.type??""){case"integer":case"smallint":return"integer";case"real":case"float":return"double";case"date":case"timestamp":return!0===t.args?.value[1]?.value?.withtimezone?"timestamp-offset":"date";case"time":return"time-only";case"varchar":return"string";default:return""}case"position":case"extract":case"char_length":case"mod":return"integer";case"round":if(a=w(e,t.args,r,s),Array.isArray(a)){if(a.length<=0)return"double";a=a[0]}return a;case"sign":return"integer";case"ceiling":case"floor":case"abs":return a=w(e,t.args,r,s),Array.isArray(a)&&(a=S(a)),"integer"===a||"double"===a?a:"double";case"area":case"length":case"log":case"log10":case"sin":case"cos":case"tan":case"asin":case"acos":case"atan":case"cosh":case"sinh":case"tanh":case"power":return"double";case"substring":case"trim":case"concat":case"lower":case"upper":return"string";case"truncate":return"double";case"nullif":case"coalesce":return a=w(e,t.args,r,s),Array.isArray(a)?a.length>0?a[0]:"":a}return""}throw new i.L("UnsupportedSyntax",{node:t.type})}const A={boolean:1,string:2,integer:3,double:4,date:5};function S(e){if(e){let t="";for(const r of e)""!==r&&(t=""===t||A[t]<A[r]?r:t);return t}return""}function I(e,t){return L(e.parseTree,t)}function C(e){return"column-reference"===e?.parseTree.type}function L(e,t){if(null==e)return!1;switch(e.type){case"when-clause":return L(e.operand,t)||L(e.value,t);case"case-expression":for(const r of e.clauses)if(L(r,t))return!0;return!("simple"!==e.format||!L(e.operand,t))||!(null===e.else||!L(e.else,t));case"parameter":case"null":case"boolean":case"date":case"timestamp":case"time":case"string":case"number":return!1;case"expression-list":for(const r of e.value)if(L(r,t))return!0;return!1;case"unary-expression":return L(e.expr,t);case"binary-expression":return L(e.left,t)||L(e.right,t);case"column-reference":return t.toLowerCase()===e.column.toLowerCase();case"function":return L(e.args,t)}return!1}function E(e){let t="";return t+=e.period.toUpperCase(),t}function M(e,t,r){let s="";return s="interval-period"===t.type?E(t):E(t.start)+" TO "+E(t.end),"INTERVAL "+r+" "+e+" "+s}},50145(e,t,r){r.d(t,{Dp:()=>h,GV:()=>m,T9:()=>d,b$:()=>f,cz:()=>p,dM:()=>_,i2:()=>g,jk:()=>u});var s=r(87449),n=(r(33325),r(80609)),i=r(44729),a=r(55612),o=r(15032);function l(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t/e.length}function c(e){const t=l(e);let r=0;for(let s=0;s<e.length;s++)r+=(t-e[s])**2;return r/(e.length-1)}function h(e){switch(e.toLowerCase()){case"distinct":return"distinct";case"avg":case"mean":return"avg";case"min":return"min";case"sum":return"sum";case"max":return"max";case"stdev":case"stddev":return"stddev";case"var":case"variance":return"var";case"count":return"count"}return null}async function u(e,t,r){const s=await y(e,t,r);return 0===s.length?null:Math.min.apply(Math,s)}async function d(e,t,r){const s=await y(e,t,r);return 0===s.length?null:Math.max.apply(Math,s)}async function g(e,t,r){let s="";t&&!(0,n.DA)(t)&&(s=(0,n.IY)(t,e.fields));const i=await y(e,t,r);if(0===i.length)return null;const a=l(i);return null===a?a:"integer"===s?function(e){return e=+e,isFinite(e)?e-e%1||(e<0?-0:0===e?e:0):e}(a):a}async function m(e,t,r){const s=await y(e,t,r);return 0===s.length?null:c(s)}async function f(e,t,r){const s=await y(e,t,r);return 0===s.length?null:Math.sqrt(c(s))}async function p(e,t,r){const s=await y(e,t,r);return 0===s.length?null:function(e){let t=0;for(let r=0;r<e.length;r++)t+=e[r];return t}(s)}async function y(e,t,r){const n=await e.queryAll(r),l=[],c={ticker:0};for await(const e of n){if(c.ticker+=e.length,c.ticker>=100&&(c.ticker=0,await new Promise(e=>{setTimeout(e,0)})),r?.aborted)throw new s.dr("Cancelled");for(const r of e){const e=t?.calculateValue(r);null===e||(l[l.length]=e instanceof i.n||e instanceof o.k?e.toNumber():e instanceof a.g?e.toMilliseconds():e)}}return l}async function _(e,t,r=1e3,n=null){if(null==t)return[];const l=await e.queryAll(n),c=[],h=new Set,u={ticker:0};for await(const e of l){if(u.ticker+=e.length,u.ticker>=100&&(u.ticker=0,await new Promise(e=>{setTimeout(e,0)})),n?.aborted)throw new s.dr("Cancelled");for(const s of e){const e=t.calculateValue(s);let n=e;if(e instanceof i.n?n="!!DATEONLY!!-"+e.toString():e instanceof a.g?n="!!TSOFFSETONLY!!-"+e.toString():e instanceof o.k?n="!!TIMEONLY!!-"+e.toString():e instanceof Date&&(n="!!DATE!!-"+e.toString()),null!=e&&(h.has(n)||(c.push(e),h.add(n))),c.length>=r&&-1!==r)return c}}return c}},71163(e,t,r){r.d(t,{C:()=>l});var s=r(29953);let n,i,a=!1;function o(){return n??=(0,s.ho)("arcadeGeometryOperatorsWorker").then(e=>{i=e,a=!0,n=void 0})}async function l(e,t){return a?i.apply("invokeGeometryOp",[e,t]):(await o(),l(e,t))}},69540(e,t,r){var s=r(32198),n=r(69622),i=(r(44208),r(4718)),a=(r(53966),r(97768)),o=r(88620),l=r(64108);const c=Symbol("ClonableMixin"),h=e=>{var t;const r=e;let n=class extends r{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,o.oY)(this);(0,a.Lw)(t,"unable to clone instance of non-accessor class");const r=t.metadata,s=t.store,n={},l=new Map;for(const t in r){const a=r[t],o=s?.originOf(t),c=a.clonable;if(a.readOnly||!1===c||7!==o&&0!==o&&5!==o&&4!==o)continue;const h=this[t];let u=null;if("function"==typeof c)u=c(h,e);else if("reference"===c)u=h;else if(u=(0,i.TU)(h,e),null!=h&&null==u)continue;0===o?l.set(t,u):n[t]=u}const c=new(0,Object.getPrototypeOf(this).constructor)(n);if(l.size){const e=(0,o.oY)(c)?.store;if(e)for(const[t,r]of l)e.set(t,r,0)}return c}};return n=(0,s.Cg)([(0,l.$)("esri.core.Clonable")],n),n},u=h(n.A);r.d(t,["OU",0,h,"Pw",0,u])},7762(e,t,r){var s,n=r(32198),i=r(98291),a=r(4576),o=r(65529),l=r(36563),c=r(4718),h=r(53966),u=r(93687),d=r(76030),g=r(78888),m=r(62788),f=r(10107),p=r(7695),y=r(64108),_=r(95488),b=r(12195);class T{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class v{constructor(e,t,r,s,n){this.target=e,this.added=t,this.removed=r,this.start=s,this.deleteCount=n}}const w=new u.A(()=>new T,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function A(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function S(e){return e?e instanceof x?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function I(e){if(e?.length)return e[0]}function C(e,t,r,s){const n=Math.min(e.length-r,t.length-s);let i=0;for(;i<n&&e[r+i]===t[s+i];)i++;return i}function L(e,t,r,s){t&&t.forEach((t,n,i)=>{e.push(t),L(e,r.call(s,t,n,i),r,s)})}const E=new Set,M=new Set,F=new Set,N=new Map;let D=0,x=s=class extends o.nJ{static ofType(e){if(!e)return s;if(N.has(e))return N.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const r in e.typeMap){const s=e.typeMap[r].prototype.declaredClass;t?t+=` | ${s}`:t=s}let r=class extends s{};return(0,n.Cg)([(0,p.u)({Type:e,ensureType:"function"==typeof e?(0,g.dp)(e):(0,g.aq)(e)})],r.prototype,"itemType",void 0),r=(0,n.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],r),N.set(e,r),r}static isCollection(e){return null!=e&&e instanceof s}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new _.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:D++})}normalizeCtorArgs(e){return e?(0,a.yc)(e)||e instanceof s?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?h.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,m.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,S(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,r={removed:!1,callback:t};return e.push(r),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{r.removed=!0,e.splice(e.indexOf(r),1)})}return super.on(e,t)}once(e,t){const r="deref"in t?()=>t.deref():()=>t,s=this.on(e,e=>{r()?.call(null,e),s.remove()});return s}add(e,t){if((0,m.gc)(this._observable),this._emitBeforeChanges(1))return this;const r=this.getNextIndex(t??null);return this._splice(r,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,m.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const r=this.getNextIndex(t);return this._splice(r,0,S(e)),this._emitAfterChanges(1),this}at(e){if((0,m.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,m.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,m.gc)(this._observable),this._createNewInstance({items:this._items.map(c.o8)})}concat(...e){(0,m.gc)(this._observable);const t=e.map(S);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,m.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const r=this._splice(0,this.length),s=r.length;for(let n=0;n<s;n++)e.call(t,r[n],n,r);this._emitAfterChanges(2)}destroyAll(){this.drain(A)}destroyMany(e){const t=this.removeMany(e);return t.forEach(A),t}every(e,t){return(0,m.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,m.gc)(this._observable);const r=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:r})}find(e,t){return(0,m.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,m.gc)(this._observable),this._items.findIndex(e,t)}findLast(e,t){return(0,m.gc)(this._observable),this._items.findLast(e,t)}findLastIndex(e,t){return(0,m.gc)(this._observable),this._items.findLastIndex(e,t)}flatten(e,t){(0,m.gc)(this._observable);const r=[];return L(r,this,e,t),new s(r)}forEach(e,t){return(0,m.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,m.gc)(this._observable),this._items[e]}getNextIndex(e){(0,m.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,m.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,m.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,m.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,m.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,m.gc)(this._observable);const r=this._items.map(e,t);return new s({items:r})}reorder(e,t=this.length-1){(0,m.gc)(this._observable);const r=this.indexOf(e);if(-1!==r){if(t<0?t=0:t>=this.length&&(t=this.length-1),r!==t){if(this._emitBeforeChanges(4))return e;this._splice(r,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,m.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=I(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,m.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,m.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduce(e,t):r.reduce(e)}reduceRight(e,t){(0,m.gc)(this._observable);const r=this._items;return 2===arguments.length?r.reduceRight(e,t):r.reduceRight(e)}remove(e){return(0,m.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,m.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=I(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,m.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof s?e.toArray():e,r=this._items,n=[],i=t.length;for(let e=0;e<i;e++){const s=t[e],i=r.indexOf(s);if(i>-1){const s=1+C(t,r,e+1,i+1),a=this._splice(i,s);a&&a.length>0&&n.push.apply(n,a),e+=s-1}}return this._emitAfterChanges(2),n}reverse(){if((0,m.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,m.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=I(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,m.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,m.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,m.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let r=0;r<t;r++)if(e(this.items[r],this.items[r+1])>0)return!0;return!1}splice(e,t,...r){(0,m.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const s=(t?2:0)|(r.length?1:0);if(this._emitBeforeChanges(s))return[];const n=this._splice(e,t,r)||[];return this._emitAfterChanges(s),n}toArray(){return(0,m.gc)(this._observable),this._items.slice()}toJSON(e){return(0,m.gc)(this._observable),this.toArray().map(t=>(0,b.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,m.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,m.gc)(this._observable),this._items.toString()}unshift(...e){return(0,m.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,r){const s=this._items,n=this.itemType;let i,a;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,d._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(a=s.splice(e,t),this.hasEventListener("before-remove")){const t=w.acquire();t.target=this,t.cancellable=!0;for(let r=0,n=a.length;r<n;r++)i=a[r],t.reset(i),this.emit("before-remove",t),t.defaultPrevented&&(a.splice(r,1),s.splice(e,0,i),e+=1,r-=1,n-=1);w.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=w.acquire();e.target=this,e.cancellable=!1;const t=a.length;for(let r=0;r<t;r++)e.reset(a[r]),this.emit("after-remove",e);w.release(e)}}if(r?.length){if(n){const e=[];for(const t of r){const r=n.ensureType(t);null==r&&null!=t||e.push(r)}r=e}const t=this.hasEventListener("before-add"),i=this.hasEventListener("after-add"),a=e===this.length;if(t||i){const n=w.acquire();n.target=this,n.cancellable=!0;const o=w.acquire();o.target=this,o.cancellable=!1;for(const l of r)t?(n.reset(l),this.emit("before-add",n),n.defaultPrevented||(a?s.push(l):s.splice(e++,0,l),this._length=s.length,i&&(o.reset(l),this.emit("after-add",o)))):(a?s.push(l):s.splice(e++,0,l),this._length=s.length,o.reset(l),this.emit("after-add",o));w.release(o),w.release(n)}else{if(a)for(const e of r)s.push(e);else s.splice(e,0,...r);this._length=s.length}}if((r?.length||a?.length)&&this._notifyChangeEvent(r,a),this.hasEventListener("after-splice")){const s=new v(this,r,a,e,t);this.emit("after-splice",s)}return a}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const r=w.acquire();r.target=this,r.cancellable=!0,r.type=e,this.emit("before-changes",r),t=r.defaultPrevented,w.release(r)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=w.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),w.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;E.clear(),M.clear(),F.clear();for(const{added:t,removed:r}of e){if(t)if(0===F.size&&0===M.size)for(const e of t)E.add(e);else for(const e of t)M.has(e)?(F.add(e),M.delete(e)):F.has(e)||E.add(e);if(r)if(0===F.size&&0===E.size)for(const e of r)M.add(e);else for(const e of r)E.has(e)?E.delete(e):(F.delete(e),M.add(e))}const r=i.A.acquire();E.forEach(e=>{r.push(e)});const s=i.A.acquire();M.forEach(e=>{s.push(e)});const n=this._items,a=t.items,o=i.A.acquire();if(F.forEach(e=>{a.indexOf(e)!==n.indexOf(e)&&o.push(e)}),t.listeners&&(r.length||s.length||o.length)){const e={target:this,added:r,removed:s,moved:o},n=t.listeners.length;for(let r=0;r<n;r++){const s=t.listeners[r];s.removed||s.callback.call(this,e)}}i.A.release(r),i.A.release(s),i.A.release(o)}E.clear(),M.clear(),F.clear()}};(0,n.Cg)([(0,f.MZ)()],x.prototype,"_updating",void 0),(0,n.Cg)([(0,f.MZ)()],x.prototype,"_length",void 0),(0,n.Cg)([(0,f.MZ)()],x.prototype,"length",null),(0,n.Cg)([(0,f.MZ)()],x.prototype,"items",null),(0,n.Cg)([(0,f.MZ)({readOnly:!0})],x.prototype,"updating",null),x=s=(0,n.Cg)([(0,y.$)("esri.core.Collection")],x);const O=x;r.d(t,["A",0,O])},4902(e,t,r){var s=r(32198),n=r(64108);let i=0;const a=e=>{const t=e;let r=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+i++})}};return r=(0,s.Cg)([(0,n.$)("esri.core.Identifiable")],r),r};a(class{}),r.d(t,["s",0,a])},7695(e,t,r){function s(e){return(t,r)=>{t[r]=e}}r.d(t,{u:()=>s})},36708(e,t,r){r.d(t,{C_:()=>d,on:()=>u,wB:()=>l,z7:()=>c});var s=r(37955),n=r(36563),i=r(97768),a=r(17676),o=r(14012);function l(e,t,r={}){return h(e,t,r,g)}function c(e,t,r={}){return h(e,t,r,m)}function h(e,t,r={},s){let n=null;const a=r.once?(e,r)=>{s(e)&&((0,i.xt)(n),t(e,r))}:(e,r)=>{s(e)&&t(e,r)};if(n=(0,o.Cn)(e,a,r.sync,r.equals),r.initial){const t=e();a(t,t)}return n}function u(e,t,r,a={}){let o=null,c=null,h=null;function u(){o&&c&&(c.remove(),a.onListenerRemove?.(o),o=null,c=null)}function d(e){a.once&&a.once&&(0,i.xt)(h),r(e)}const g=l(e,(e,r)=>{u(),(0,s.wb)(e)&&(o=e,c=(0,s.on)(e,t,d),a.onListenerAdd?.(e))},{sync:a.sync,initial:!0});return h=(0,n.hA)(()=>{g.remove(),u()}),h}function d(e,t){return function(e,t,r){if((0,a.G4)(r))return Promise.reject((0,a.NK)());const s=e();if(t?.(s))return Promise.resolve(s);let o=null;function l(){o=(0,i.xt)(o)}return new Promise((s,i)=>{o=(0,n.vE)([(0,a.u7)(r,()=>{l(),i((0,a.NK)())}),h(e,e=>{l(),s(e)},{sync:!1,once:!0},t??g)])})}(e,m,t)}function g(e){return!0}function m(e){return!!e}r(80559),r.d(t,["OH",0,{sync:!0},"Vh",0,{initial:!0},"pc",0,{sync:!0,initial:!0}])},55156(e,t,r){r.d(t,{I:()=>n});const s=Symbol("idFieldsProviderSymbol");function n(e){return(t=e)&&s in t?e[s]:void 0;var t}r.d(t,["e",0,s])},97770(e,t,r){r.d(t,{Ey:()=>D,F8:()=>N,J2:()=>L,Yq:()=>M,_m:()=>E,iS:()=>F,wj:()=>x});var s=r(66552),n=r(73444),i=r(98623),a=r(34747);const o={dateStyle:void 0,year:void 0,month:void 0,day:void 0,weekday:void 0},l={timeStyle:void 0,hour12:void 0,hourCycle:void 0,hour:void 0,minute:void 0,second:void 0},c={timeZone:"UTC"},h={year:"numeric",month:"numeric",day:"numeric"},u={year:"numeric",month:"long",day:"numeric"},d={year:"numeric",month:"short",day:"numeric"},g={year:"numeric",month:"long",weekday:"long",day:"numeric"},m={hour:"numeric",minute:"numeric"},f={...m,second:"numeric"},p={hourCycle:"h23"},y={...m,...p},_={...f,...p},b={"short-date":h,"short-date-short-time":{...h,...m},"short-date-short-time-24":{...h,...y},"short-date-long-time":{...h,...f},"short-date-long-time-24":{...h,..._},"short-date-le":h,"short-date-le-short-time":{...h,...m},"short-date-le-short-time-24":{...h,...y},"short-date-le-long-time":{...h,...f},"short-date-le-long-time-24":{...h,..._},"long-month-day-year":u,"long-month-day-year-short-time":{...u,...m},"long-month-day-year-short-time-24":{...u,...y},"long-month-day-year-long-time":{...u,...f},"long-month-day-year-long-time-24":{...u,..._},"day-short-month-year":d,"day-short-month-year-short-time":{...d,...m},"day-short-month-year-short-time-24":{...d,...y},"day-short-month-year-long-time":{...d,...f},"day-short-month-year-long-time-24":{...d,..._},"long-date":g,"long-date-short-time":{...g,...m},"long-date-short-time-24":{...g,...y},"long-date-long-time":{...g,...f},"long-date-long-time-24":{...g,..._},"long-month-year":{month:"long",year:"numeric"},"short-month-year":{month:"short",year:"numeric"},year:{year:"numeric"},"short-time":m,"long-time":f},T=(0,s.O)()({shortDate:"short-date",shortDateShortTime:"short-date-short-time",shortDateShortTime24:"short-date-short-time-24",shortDateLongTime:"short-date-long-time",shortDateLongTime24:"short-date-long-time-24",shortDateLE:"short-date-le",shortDateLEShortTime:"short-date-le-short-time",shortDateLEShortTime24:"short-date-le-short-time-24",shortDateLELongTime:"short-date-le-long-time",shortDateLELongTime24:"short-date-le-long-time-24",longMonthDayYear:"long-month-day-year",longMonthDayYearShortTime:"long-month-day-year-short-time",longMonthDayYearShortTime24:"long-month-day-year-short-time-24",longMonthDayYearLongTime:"long-month-day-year-long-time",longMonthDayYearLongTime24:"long-month-day-year-long-time-24",dayShortMonthYear:"day-short-month-year",dayShortMonthYearShortTime:"day-short-month-year-short-time",dayShortMonthYearShortTime24:"day-short-month-year-short-time-24",dayShortMonthYearLongTime:"day-short-month-year-long-time",dayShortMonthYearLongTime24:"day-short-month-year-long-time-24",longDate:"long-date",longDateShortTime:"long-date-short-time",longDateShortTime24:"long-date-short-time-24",longDateLongTime:"long-date-long-time",longDateLongTime24:"long-date-long-time-24",longMonthYear:"long-month-year",shortMonthYear:"short-month-year",year:"year"}),v={ar:"ar-u-nu-latn-ca-gregory",nn:"no-NN"},w=new Intl.DateTimeFormat("bs",{month:"long"}).formatToParts(new Date(2025,2)),A=w.find(({type:e})=>"month"===e)?.value.toLowerCase();function S(){const e=(0,n.lR)();return(e&&v[e])??(0,n.QC)()}"mart"!==A&&(v.bs="sr-Latn-CS");let I=new WeakMap;const C=b["short-date-short-time"];function L(e){return b[e]}function E(e){const{dateStyle:t,timeStyle:r,hour12:s,year:n,month:i}=e,a={};return t?a.dateStyle=t:n&&(a.year=n,a.month=i||void 0),r&&!a.year&&(a.timeStyle=r,a.hour12="auto"===s?void 0:"always"===s),a}function M(e,t=C){return function(e){let t=I.get(e);if(!t){const r=S(),s=x(e.timeZone??"system"),n={...e,timeZone:s};t=new Intl.DateTimeFormat(r,n),I.set(e,t)}return t}(t).format(e)}function F(e,t=C){return M(new Date(e),{...t,...c,...l})}function N(e,t=C){return M(new Date(`1970-01-01T${e}Z`),{...t,...c,...o})}function D(e,t=C){const r=a.c9.fromISO(e,{setZone:!0});if(!r.isValid)return e;if(t.timeZone)return M(r.toJSDate(),t);const s=0===r.offset?"UTC":t.timeZone,n={...t,timeZone:s};return r.toLocaleString(n,{locale:S()})}function x(e){switch(e){case"system":return i.N;case i.L:return"UTC";default:return e}}(0,n.Ml)(()=>{I=new WeakMap}),r.d(t,["_v",0,T])},54339(e,t,r){function s(e,t){switch(t.type){case"object-id":case"unique-id-simple":return e.attributes[t.fieldName];case"unique-id-composite":{const r=[];for(const s of t.fieldNames)r.push(e.attributes[s]??null);return JSON.stringify(r)}}}function n(e,t){if("uniqueIdFields"in t&&t.uniqueIdFields?.length){if(1===t.uniqueIdFields.length)return e.attributes?.[t.uniqueIdFields[0]];const r=t.uniqueIdFields.map(t=>e.attributes?.[t]);return JSON.stringify(r)}return"objectIdField"in t&&t.objectIdField?e.attributes?.[t.objectIdField]:null}r.d(t,{W:()=>s,r:()=>n})}}]);