@arcgis/core 4.33.0-next.20250408 → 4.33.0-next.20250410

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 (347) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/066844a51cd22cbef0e6.js +1 -0
  3. package/assets/esri/core/workers/chunks/067dda58592fbf4fb812.js +1 -0
  4. package/assets/esri/core/workers/chunks/{1595f3def0ba0c4f0fe7.js → 0eed612e82a279ac8d1e.js} +1 -1
  5. package/assets/esri/core/workers/chunks/1014513c0ec85f9414a4.js +1 -0
  6. package/assets/esri/core/workers/chunks/1072b4f37eacbbfda2c8.js +1 -0
  7. package/assets/esri/core/workers/chunks/{19eb465f91d07862926a.js → 1263391920fbb8926ced.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{49d6b56e21b1bc0d1948.js → 1b87fa15470cce26feea.js} +1 -1
  9. package/assets/esri/core/workers/chunks/23de8aeed5b82c682cbe.js +1 -0
  10. package/assets/esri/core/workers/chunks/{6f9a17f62786af04b74e.js → 25a686f00479ac12a1ca.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{f92d521ed3df3c9f737b.js → 26fcbe053194bd78fcc3.js} +1 -1
  12. package/assets/esri/core/workers/chunks/277b61af8982092a4c81.js +1 -0
  13. package/assets/esri/core/workers/chunks/{7b47b08f4a58898273b9.js → 2ab7d36409e9af3ac3da.js} +1 -1
  14. package/assets/esri/core/workers/chunks/{c3c70dad8c8a93953237.js → 2cbab0c078d0b844934c.js} +1 -1
  15. package/assets/esri/core/workers/chunks/{2679da0c93f05ae956c6.js → 358a3a9326615d5e6d3b.js} +1 -1
  16. package/assets/esri/core/workers/chunks/37e4f588a6896f98bce3.js +1 -0
  17. package/assets/esri/core/workers/chunks/3b7284516a0e34a9e85e.js +1 -0
  18. package/assets/esri/core/workers/chunks/3f6dc811b5d515c2725c.js +1 -0
  19. package/assets/esri/core/workers/chunks/{8ef755e6a7b2b71f46e6.js → 400f95295bbfced31076.js} +1 -1
  20. package/assets/esri/core/workers/chunks/4046ec636723c20d3e28.js +1 -0
  21. package/assets/esri/core/workers/chunks/4275dcec730a11173661.js +1 -0
  22. package/assets/esri/core/workers/chunks/{0747c9542172241b52ab.js → 436623d9bcf62b8dba47.js} +1 -1
  23. package/assets/esri/core/workers/chunks/4403b3f08907e88d0d91.js +1 -0
  24. package/assets/esri/core/workers/chunks/4523ba4a3c8987abca56.js +1 -0
  25. package/assets/esri/core/workers/chunks/47bbfc10c2a3b9e4bdd6.js +1 -0
  26. package/assets/esri/core/workers/chunks/4a15308b54734247f38e.js +1 -0
  27. package/assets/esri/core/workers/chunks/{d65c30cd787b287833fb.js → 4ba34124054752b363c0.js} +1 -1
  28. package/assets/esri/core/workers/chunks/4baef5262ce401bf81bb.js +1 -0
  29. package/assets/esri/core/workers/chunks/{3b2bda2e8c08f486de27.js → 4bbe6160eda3fb5d58ec.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{52b28aab40bb19e585bb.js → 566c2ce50af225e556ac.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{948a3c1419ae323cca10.js → 5c757e20c0543e6a49b3.js} +1 -1
  32. package/assets/esri/core/workers/chunks/5df4e73905c0ae75e37c.js +1 -0
  33. package/assets/esri/core/workers/chunks/626e33ece2c49d40f6cd.js +1 -0
  34. package/assets/esri/core/workers/chunks/66e90f7d473d1f688254.js +1 -0
  35. package/assets/esri/core/workers/chunks/72097a8247101018dcdf.js +1 -0
  36. package/assets/esri/core/workers/chunks/72b5e43741ce3a0da8f7.js +1 -0
  37. package/assets/esri/core/workers/chunks/72d7e45e7eb28f2cc0b0.js +1 -0
  38. package/assets/esri/core/workers/chunks/759c12b0715279e3c0f6.js +1 -0
  39. package/assets/esri/core/workers/chunks/796cf1c2ca9955595836.js +1 -0
  40. package/assets/esri/core/workers/chunks/{23cc33576da66b3c4366.js → 7ea5bbb52e84be9a608e.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{79036c5d7569c4e94abe.js → 7ef9bcd58af499a14a08.js} +1 -1
  42. package/assets/esri/core/workers/chunks/80427cd9f0c2e07f21c3.js +1 -0
  43. package/assets/esri/core/workers/chunks/80a5fd4fb79e90086538.js +1 -0
  44. package/assets/esri/core/workers/chunks/82353e59ac6d909dcf41.js +1 -0
  45. package/assets/esri/core/workers/chunks/86931186095c23e47c0c.js +1 -0
  46. package/assets/esri/core/workers/chunks/{89e7cc489156ff0ebdb6.js → 8aae03e347ab18ae6ee2.js} +1 -1
  47. package/assets/esri/core/workers/chunks/8ddf1b85cff90c34f3e3.js +1 -0
  48. package/assets/esri/core/workers/chunks/{7f961954e59a232bfa88.js → 90442f47c9f31f26b453.js} +1 -1
  49. package/assets/esri/core/workers/chunks/9050dad7e4f093568026.js +1 -0
  50. package/assets/esri/core/workers/chunks/{aaf67ec3d580e1fee6c7.js → 90c893959145827961ac.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{238df0aee97315623638.js → 91439b59260b0fb04be9.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{4de3d692557120a4bbf7.js → 95379fdd6917c8a84c71.js} +1 -1
  53. package/assets/esri/core/workers/chunks/999a4f7ca581f28cc1c4.js +1 -0
  54. package/assets/esri/core/workers/chunks/a3421383e48379012c9c.js +1 -0
  55. package/assets/esri/core/workers/chunks/a91f2d1deb950f46ad09.js +1 -0
  56. package/assets/esri/core/workers/chunks/{a32e697547f8ac345dd7.js → af9fda47d02c51a2c7da.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{9a84ff99756c7247dd39.js → b308bef7ff08e0e635b5.js} +82 -82
  58. package/assets/esri/core/workers/chunks/{5c80452df87024fdaa75.js → b7a1185ac49480fc1410.js} +1 -1
  59. package/assets/esri/core/workers/chunks/bd0dbad694ce5531deab.js +1 -0
  60. package/assets/esri/core/workers/chunks/{6c65b966f4c952508fc1.js → c589d32f8efcca6bf712.js} +1 -1
  61. package/assets/esri/core/workers/chunks/c6580fdcdc33153008b0.js +1 -0
  62. package/assets/esri/core/workers/chunks/{86b4920f5a99576399fb.js → ccb289911e7445b17763.js} +2 -2
  63. package/assets/esri/core/workers/chunks/{6d15d953baabccbbee01.js → cda6ae4c5cb67e22b454.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{ac91bd1fee9ddadc270b.js → d2c7067bb6654c0e2793.js} +1 -1
  65. package/assets/esri/core/workers/chunks/d3b0117ad9232e36f785.js +1 -0
  66. package/assets/esri/core/workers/chunks/d46c82a55219b27c301b.js +1 -0
  67. package/assets/esri/core/workers/chunks/d89f105b8a0b13dd8e5f.js +1 -0
  68. package/assets/esri/core/workers/chunks/{14d1a970e927ebfed9c8.js → d9b2263e0a9f9068ab62.js} +1 -1
  69. package/assets/esri/core/workers/chunks/daa54c8a317c27881763.js +1 -0
  70. package/assets/esri/core/workers/chunks/df1225a3e751a662c182.js +1 -0
  71. package/assets/esri/core/workers/chunks/e08bff9f8247909776a4.js +1 -0
  72. package/assets/esri/core/workers/chunks/e13caf9691f556071e31.js +1 -0
  73. package/assets/esri/core/workers/chunks/e15c612caadf7bac4ab9.js +1 -0
  74. package/assets/esri/core/workers/chunks/e5aff9b10877fb04d6de.js +1 -0
  75. package/assets/esri/core/workers/chunks/e64bc4533405af8554ae.js +1 -0
  76. package/assets/esri/core/workers/chunks/{2d5cb817e6e905103068.js → e6544e966f14fb410157.js} +1 -1
  77. package/assets/esri/core/workers/chunks/e792603b7cc3ddd133f3.js +1 -0
  78. package/assets/esri/core/workers/chunks/{69e606267dc5842ebf9d.js → ec83af4fb3bf59df7759.js} +1 -1
  79. package/assets/esri/core/workers/chunks/f5fcba6ca6f43bf1d65d.js +1 -0
  80. package/assets/esri/core/workers/chunks/f7d33d18bf1bd4db9df8.js +1 -0
  81. package/assets/esri/core/workers/chunks/f9396af9cbfd165e72e2.js +1 -0
  82. package/assets/esri/core/workers/chunks/{393fbd296817e813936c.js → fa9ef9e8eae505371965.js} +1 -1
  83. package/assets/esri/libs/dxtEncoder/dxt_encoder.wasm +0 -0
  84. package/assets/esri/libs/parquet/pkg/bundle_bg.wasm +0 -0
  85. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  86. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  87. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  88. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  89. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  90. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  91. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  92. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  93. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  94. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  95. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  96. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  97. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  98. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  99. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  100. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  101. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  102. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  103. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  104. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  105. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  106. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  107. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +1 -1
  108. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  109. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  110. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  111. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  112. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  113. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  114. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  115. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  116. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  117. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  118. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  119. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  120. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  121. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  122. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  123. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  128. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
  129. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
  130. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
  131. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
  132. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
  133. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
  134. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
  135. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
  136. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
  137. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
  138. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
  139. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
  140. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
  141. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
  142. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
  143. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
  144. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
  145. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
  146. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
  147. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
  148. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
  149. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
  150. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_no.json +1 -1
  151. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
  152. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
  153. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
  154. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
  155. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
  156. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
  157. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
  158. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
  159. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
  160. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
  161. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
  162. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
  163. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
  164. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
  165. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
  166. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
  167. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  168. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  169. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  170. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  171. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  172. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  173. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  174. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  175. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  176. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  177. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  178. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  179. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  180. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  181. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  182. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  183. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  184. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  185. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  186. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  187. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  188. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  189. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  190. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  191. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  192. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  193. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  194. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  195. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  196. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  197. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  198. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  199. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  200. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  201. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  202. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  203. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  204. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  205. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  206. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  207. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  208. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  209. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  210. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  211. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  212. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  213. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  214. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  215. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  216. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  217. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  218. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  219. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  220. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  221. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  222. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  223. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  224. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  225. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  226. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  227. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  228. package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +1 -1
  229. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  230. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  231. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  232. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  233. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  234. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  235. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  236. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  237. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  238. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  239. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  240. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  241. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  242. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  243. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  244. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  245. package/chunks/BlendLayers.glsl.js +1 -5
  246. package/chunks/Theme.js +1 -1
  247. package/chunks/bundle.js +5 -0
  248. package/chunks/dxt_encoder.js +1 -1
  249. package/interfaces.d.ts +15 -0
  250. package/layers/ParquetLayer.js +1 -1
  251. package/layers/graphics/data/QueryEngineResult.js +1 -1
  252. package/layers/graphics/data/executeQueryForSnapping.js +1 -1
  253. package/layers/mixins/ImageryTileMixin.js +1 -1
  254. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  255. package/layers/support/arcgisLayerUrl.js +1 -1
  256. package/layers/support/rasterDatasets/RawBlockCache.js +1 -1
  257. package/layers/support/rasterFunctions/RemapFunction.js +1 -1
  258. package/layers/support/rasterFunctions/rasterProjectionHelper.js +1 -1
  259. package/libs/parquet/loadParquetModule.js +5 -0
  260. package/libs/parquet/parquet.js +1 -1
  261. package/package.json +1 -1
  262. package/support/revision.js +1 -1
  263. package/views/3d/layers/DynamicLayerView3D.js +1 -1
  264. package/views/3d/layers/ElevationLayerView3D.js +1 -1
  265. package/views/3d/layers/ElevationLayerView3DModifications.js +5 -0
  266. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  267. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  268. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  269. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  270. package/views/3d/layers/graphics/Graphics3DSymbolCreationContext.js +1 -1
  271. package/views/3d/layers/graphics/objectResourceUtils.js +1 -1
  272. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  273. package/views/3d/support/pointsOfInterest/PointsOfInterest.js +1 -1
  274. package/views/3d/terrain/PriorityQueue.js +5 -0
  275. package/views/3d/terrain/TerrainRenderer.js +1 -1
  276. package/views/3d/terrain/TerrainSurface.js +1 -1
  277. package/views/3d/terrain/Tile.js +1 -1
  278. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +7 -12
  279. package/views/3d/webgl-engine/core/shaderLibrary/util/BlendLayers.glsl.js +1 -1
  280. package/views/3d/webgl-engine/parts/ScreenshotManager.js +1 -1
  281. package/views/3d/webgl-engine/shaders/RibbonLineTechnique.js +1 -1
  282. package/views/SceneView.js +1 -1
  283. package/views/interactive/snapping/featureSources/FeatureCollectionSnappingSource.js +1 -1
  284. package/views/interactive/snapping/featureSources/GraphicsSnappingSource.js +1 -1
  285. package/views/interactive/snapping/featureSources/featureServiceSource/FeatureServiceSnappingSourceWorker.js +1 -1
  286. package/views/interactive/snapping/snappingUtils.js +1 -1
  287. package/views/support/TextureCompressionWorker.js +1 -1
  288. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  289. package/views/webgl/Texture.js +1 -1
  290. package/views/webgl/textureUtils.js +1 -1
  291. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  292. package/widgets/ElevationProfile.js +1 -1
  293. package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
  294. package/widgets/Feature/FeatureViewModel.js +1 -1
  295. package/widgets/Feature.js +1 -1
  296. package/widgets/FeatureTable/Grid/Grid.js +1 -1
  297. package/widgets/Popup.js +1 -1
  298. package/assets/esri/core/workers/chunks/07236fe57d76b1134cd4.js +0 -1
  299. package/assets/esri/core/workers/chunks/0d37c6aa261c8d5e5b23.js +0 -1
  300. package/assets/esri/core/workers/chunks/0d7c1de47ae006277b76.js +0 -1
  301. package/assets/esri/core/workers/chunks/11b725421a823f6183a2.js +0 -1
  302. package/assets/esri/core/workers/chunks/11badb73d43059374ad8.js +0 -1
  303. package/assets/esri/core/workers/chunks/1c8cdae7736b6c907d95.js +0 -1
  304. package/assets/esri/core/workers/chunks/1cc4fc3353d217632a1b.js +0 -1
  305. package/assets/esri/core/workers/chunks/3a649aa78e25e3c8aa8c.js +0 -1
  306. package/assets/esri/core/workers/chunks/3e1bb914aceb3a9af898.js +0 -1
  307. package/assets/esri/core/workers/chunks/3ee77b601fb0f3567e87.js +0 -1
  308. package/assets/esri/core/workers/chunks/43a3b1b78d214aadaaad.js +0 -1
  309. package/assets/esri/core/workers/chunks/49d03bdaa9c4476b69d6.js +0 -1
  310. package/assets/esri/core/workers/chunks/4c765464288b6d096d08.js +0 -1
  311. package/assets/esri/core/workers/chunks/4cbd5303f5a5a5fff391.js +0 -1
  312. package/assets/esri/core/workers/chunks/55cc40d1b1853f779d82.js +0 -1
  313. package/assets/esri/core/workers/chunks/56e9dfd62102c32b9770.js +0 -1
  314. package/assets/esri/core/workers/chunks/576bed289aa7be03f319.js +0 -1
  315. package/assets/esri/core/workers/chunks/5ef6acd36629eae225da.js +0 -1
  316. package/assets/esri/core/workers/chunks/63ce66da1a52d6d07ccb.js +0 -1
  317. package/assets/esri/core/workers/chunks/6447d373a43ef6cd46cd.js +0 -1
  318. package/assets/esri/core/workers/chunks/64824ee75c643cee2aa9.js +0 -1
  319. package/assets/esri/core/workers/chunks/6a067a6ce0968d893142.js +0 -1
  320. package/assets/esri/core/workers/chunks/6a70b858e24d98845041.js +0 -1
  321. package/assets/esri/core/workers/chunks/6ecf2924f9f6aac61101.js +0 -1
  322. package/assets/esri/core/workers/chunks/77334c3fed1e3a06d307.js +0 -1
  323. package/assets/esri/core/workers/chunks/877f665c7edb26c147ea.js +0 -1
  324. package/assets/esri/core/workers/chunks/8c5619fdf125a459281d.js +0 -1
  325. package/assets/esri/core/workers/chunks/8e64687ee76e70deeb29.js +0 -1
  326. package/assets/esri/core/workers/chunks/8fe36b06a7eceeb874e9.js +0 -1
  327. package/assets/esri/core/workers/chunks/9fddd759c308d3d5801a.js +0 -1
  328. package/assets/esri/core/workers/chunks/a29e99328d75b6ceb74d.js +0 -1
  329. package/assets/esri/core/workers/chunks/a426152e7eb550b8f15f.js +0 -1
  330. package/assets/esri/core/workers/chunks/ae7c1e34ed1288773ec2.js +0 -1
  331. package/assets/esri/core/workers/chunks/ae9ebc0c0553e57e85ba.js +0 -1
  332. package/assets/esri/core/workers/chunks/b199508eef1eeee72854.js +0 -1
  333. package/assets/esri/core/workers/chunks/b715fa857391931c04b9.js +0 -1
  334. package/assets/esri/core/workers/chunks/c144e00dfe6d63eaa2b1.js +0 -1
  335. package/assets/esri/core/workers/chunks/c150cd2a82260495e9de.js +0 -1
  336. package/assets/esri/core/workers/chunks/c4425d5227f7e2379b0f.js +0 -1
  337. package/assets/esri/core/workers/chunks/c837379b36cf716d6215.js +0 -1
  338. package/assets/esri/core/workers/chunks/c849e3e151d78a061bf0.js +0 -1
  339. package/assets/esri/core/workers/chunks/cb83fcfff8731c88c108.js +0 -1
  340. package/assets/esri/core/workers/chunks/cc366e4df91cf516d1b9.js +0 -1
  341. package/assets/esri/core/workers/chunks/ccd3f9b52006cd7dd11e.js +0 -1
  342. package/assets/esri/core/workers/chunks/d72d44df7e117e26e717.js +0 -1
  343. package/assets/esri/core/workers/chunks/e22cdfce2a0583f3cc50.js +0 -1
  344. package/assets/esri/core/workers/chunks/f086993f8744209d761f.js +0 -1
  345. package/assets/esri/core/workers/chunks/fde544c090cc04581536.js +0 -1
  346. package/assets/esri/core/workers/chunks/fe2c48de24b25c45b3e7.js +0 -1
  347. package/assets/esri/libs/parquet/pkg/arcgis_parquet_bg.wasm +0 -0
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,a.MZ)()],t.prototype,"title",null),(0,s._)([(0,a.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},21312:(e,t,i)=>{i.d(t,{A:()=>y});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),h=i(86738),f=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,h=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+h*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+h*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),h=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,h),ymax:Math.max.apply(null,h),spatialReference:o})}let m=s=class extends f.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new h.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m);const y=m},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),a=i(78888),n=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),h=i(3694),f=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),x=i(4718),v=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,x.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,o[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:o},valid:!0,data:new Array(n*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends n.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,f.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,f.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a,n){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;n.then((()=>l.abort()),(()=>l.abort()));let u=!1;const h=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(h,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,f.G4)(l))return;const p=new w.U(e,t,i,r),m={...a,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:s._maxPrefetch})}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,f.u7)(n,(()=>t((0,f.NK)())));const i=_(r);let a=this._pendingTilemapRequests[i];if(!a){a=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ze});var r=i(90237),a=i(13874),n=i(69540),o=i(49186),l=i(53966),c=i(92071),u=i(74887),h=i(36708),f=i(10107),p=i(56507),d=i(44208),m=(i(87811),i(40608)),y=i(4146),g=i(18768),w=i(63074),x=i(69208),v=i(89015),b=i(16131),I=i(8303),_=i(63660),S=i(56551),A=i(54310),T=i(25036),R=i(82935),M=i(10873),C=i(20437),O=i(74797),F=i(22796),P=i(76353),k=i(84169),D=i(4916),N=i(68197),E=i(5443),L=i(16930),B=i(73444),z=i(14140),J=i(16019);function V(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function $(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function U(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];V(l)?a=e:$(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter(((e,t)=>!(t===a||t===n)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[a]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),h=null==u||"CRS84"===u?4326:Number(u),f=new L.A({wkid:h}),[p,d]=s[a],[m,y]=s[n],g=new E.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:f});return{width:Math.round(g.width/r[a]),height:Math.round(g.height/r[n]),extent:g,dimensions:o}}function j(e){const t=(0,B.ZS)()?.language;return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function G(){return Math.round(255*Math.random())}function Z(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=j(r)),a&&(t[e].unit=a.label?j(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const a=e.label?j(e.label):null;if(r.Label=a,e.preferredColor){const t=N.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=G(),e.Green=G(),e.Blue=G())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function H(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,J.X1)(t,i)}function q(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var W=i(45617),X=i(87186),Y=i(77301),K=i(28435),Q=i(6952);let ee=class extends D.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,K.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:h,pixelType:f}=c,p=t.extent??new E.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:h-.5,spatialReference:new L.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/h},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new X.A({width:u,height:h,pixelType:f,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,n=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,K.lD)(e,t,r,a)),l=null!=s.statistics,c=null!=s.histograms,h=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,Q.f4)(e)),f=await(0,u.Lx)([n,h]);if(!f[0].value&&f[1].value)throw new o.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=f[0].value,l||(s.statistics=f[1].value?.statistics),c||(s.histograms=f[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map((e=>new W.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),n=(0,Y.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,Q.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,r._)([(0,f.MZ)({type:String,json:{write:!0}})],ee.prototype,"datasetFormat",void 0),(0,r._)([(0,f.MZ)()],ee.prototype,"source",void 0),(0,r._)([(0,f.MZ)()],ee.prototype,"url",null),ee=(0,r._)([(0,m.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],ee);const te=ee;var ie=i(22671);let se=class extends D.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,Q.eH)(i[0]),l=a?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new te({source:{extent:t,pixelBlocks:i,attributeTable:r?ie.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const h=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",h.slice(0,h.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new o.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new o.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new o.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:n}=s[e];if(!("ndarray"===a.toLowerCase()&&n?.length&&t?.length&&r?.length))throw new o.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!V(t[t.length-1])||!$(t[t.length-2]))throw new o.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=U(e),{ranges:a}=e,n=Object.keys(a).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=Z(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:h}=a[s],f=h.length>2?e*h.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=h.slice(0,-2),m="float"===l?"f32":H(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const a=z.A.createEmptyBand(m,y),n=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new z.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[q(p,d,s)+f]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=z.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const h=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:h,bandNames:c?void 0:n}}(t)}};(0,r._)([(0,f.MZ)({type:String,json:{write:!0}})],se.prototype,"datasetFormat",void 0),(0,r._)([(0,f.MZ)({constructOnly:!0})],se.prototype,"source",void 0),se=(0,r._)([(0,m.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],se);const re=se;var ae=i(4576),ne=i(21325),oe=i(50103),le=i(21312);function ce(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ue(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new L.A({wkid:t});if(e=String(e).trim(),(0,ne.jp)(e))return new L.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=he(n);const l=new L.A(t?{wkid:t}:{wkt:n}),c=he(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=he(e),new L.A(0!==t?{wkid:t}:{wkt:e})):null}function he(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,oe.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,oe.mX)(e);t.spatialReference=ue(i)}}else if((0,oe.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,oe.V6)(e,"GeodataXform"),i=ue((0,oe.v7)(t,"SpatialReference/WKID")||(0,oe.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,oe.v7)(t,"PolynomialOrder")??1,r=(0,oe.Ui)(t,"CoeffX/Double"),a=(0,oe.Ui)(t,"CoeffY/Double"),n=(0,oe.Ui)(t,"InverseCoeffX/Double"),o=(0,oe.Ui)(t,"InverseCoeffY/Double"),l=ce(r,a),c=ce(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new le.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,oe.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,oe.mX)(e)));else if((0,oe.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,oe.v7)(e,"NoDataValue"),i=(0,oe.V6)(e,"Histograms/HistItem"),s=(0,oe.v7)(i,"HistMin"),r=(0,oe.v7)(i,"HistMax"),a=(0,oe.v7)(i,"BucketCount"),n=(0,oe.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,oe.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const h=(0,oe.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:h,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(ae.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(ae.Ru):null}return t}var pe=i(51244);let de=class extends D.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new L.A({wkid:3857})),r?.length&&null==s&&(s=(0,Q.Pg)(r));const{width:o,height:l}=t;let c=new E.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let h=!0;if(a){const e=a.forwardCoefficients;h=e&&0===e[1]&&0===e[2],h&&(a=null,c=u)}const f=new te({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(f.ioConfig.skipMapInfo=!0),await f.open(),f.source=null,this._set("rasterInfo",f.rasterInfo),this._inMemoryRaster=f}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,pe.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new o.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,d.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new o.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,u.Lx)([r,o]);if(t?.aborted)throw(0,u.NK)();const c=fe(l[0].value?.data);if(!c.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;c.transform=6===e?.length?new le.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return c}};(0,r._)([(0,f.MZ)({type:String,json:{write:!0}})],de.prototype,"datasetFormat",void 0),de=(0,r._)([(0,m.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],de);const me=de;var ye=i(97768),ge=i(84952),we=i(86738),xe=i(20223),ve=i(87045),be=i(25943),Ie=i(73037),_e=i(82371);let Se=class extends D.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null,{data:h}=await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal});if(!h)return null;const f=o?n.tileSize:r.tileInfo.size,p=await this.decodePixelBlock(h,{width:f[0],height:f[1],planes:null,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==p)return null;const d=r.blockBoundary[e];if("jpg"!==r.compression||i>d.minCol&&i<d.maxCol&&t>d.minRow&&t<d.maxRow)return p;const{origin:m,blockWidth:y,blockHeight:g}=r,{x:w,y:x}=this.getPyramidPixelSize(e),v=Math.round((a.xmin-m.x)/w)%y,b=Math.round((a.xmax-m.x)/w)%y||y,I=Math.round((m.y-a.ymax)/x)%g,_=Math.round((m.y-a.ymin)/x)%g||g,S=i===d.minCol?v:0,A=t===d.minRow?I:0,T=i===d.maxCol?b:y,R=t===d.maxRow?_:g;return(0,K.z$)(p,{x:S,y:A},{width:T-S,height:R-A}),p}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new o.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new o.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new o.A("image-server-raster:open","cannot initialize image service");(0,_e.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return ve.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=a))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return ve.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=a}))})}return ve.A.fromJSON(e)}(s.tileInfo,s):ve.A.fromJSON(s.tileInfo);(0,ye.Lw)(a);const[n,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,h=.5/r.width*u.x,f=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>h||!p.some((e=>Math.abs(e.resolution-f)<h)))&&(u.x=u.y=n.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=n.level-l.level,[m,y]=a.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=n.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const x=this.computeBlockBoundary(c,m,y,a.origin,g,d),v=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/n.resolution)**(-1/d))/10;if(r.storageInfo=new xe.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:v,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,transposeInfo:b,blockBoundary:x}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new Ie.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ge.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new be.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=L.A.fromJSON(t.spatialReference||e.spatialReference),a=new we.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new X.A({width:i,height:s,bandCount:3,extent:E.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,_e.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),n=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??a));let h=n;return l>0&&(h=r.find((e=>Math.abs(e.scale-l)<s))??n,this._levelOffset=h.level-n.level),[u,h]}};(0,r._)([(0,f.MZ)({type:String,json:{write:!0}})],Se.prototype,"datasetFormat",void 0),(0,r._)([(0,f.MZ)()],Se.prototype,"tileType",void 0),Se=(0,r._)([(0,m.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],Se);const Ae=Se;var Te=i(47124);const Re=new Map;Re.set("Int8","s8"),Re.set("UInt8","u8"),Re.set("Int16","s16"),Re.set("UInt16","u16"),Re.set("Int32","s32"),Re.set("UInt32","u32"),Re.set("Float32","f32"),Re.set("Float64","f32"),Re.set("Double64","f32");const Me=new Map;Me.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Me.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Me.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Me.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ce=class extends D.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:h,actualTileHeight:f}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new z.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),x=new Uint8Array(w),v=[];let b=0;for(y=0;y<d;y++)v.push(b),x.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Me.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(x.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:v,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(h!==r||f!==a){let e=_.mask;if(e)for(y=0;y<a;y++)if(T=y*r,y<f)for(A=h;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),_.mask=e,y=0;y<f;y++)for(T=y*r,A=0;A<h;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,Q.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(Te.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:h,height:f}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(h/l/u**y)-1,t=Math.ceil(f/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Me.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,h,f=0,p=0;for(h=0;h<e;h++)p=a**h,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),f+=t*c+i,f*=4*l;const d=this._storageIndex.subarray(f,f+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,oe.V6)(e,"MRF_META/Raster");if(!t)throw new o.A("mrf:open","not a valid MRF format");const i=(0,oe.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),n=((0,oe.mX)(t,"Compression")||"none").toLowerCase();if(!Me.has(n))throw new o.A("mrf:open","currently does not support compression "+n);const l=(0,oe.mX)(t,"DataType")||"UInt8",c=Re.get(l);if(null==c)throw new o.A("mrf:open","currently does not support pixel type "+l);const u=(0,oe.V6)(t,"PageSize"),h=parseInt(u.getAttribute("x"),10),f=parseInt(u.getAttribute("y"),10),p=(0,oe.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,oe.V6)(e,"MRF_META/CachedSource"))throw new o.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,oe.V6)(e,"MRF_META/GeoTags"),g=(0,oe.V6)(y,"BoundingBox");let w,x=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,oe.mX)(y,"Projection")||"";let a=L.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new L.A({wkid:e}))}else a=ue(r)??L.A.WGS84;else x=!0,a=new L.A({wkid:3857});w=new E.A(e,t,i,s),w.spatialReference=a}else x=!0,w=new E.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new L.A({wkid:3857})});const v=(0,oe.V6)(e,"MRF_META/Rsets"),b=parseInt(v?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new xe.A({origin:new we.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:h,blockHeight:f,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:n,pyramidScalingFactor:b}),S=new we.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new X.A({width:s,height:r,extent:w,isPseudoSpatialReference:x,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,oe.mX)(e,"datafile"),R=(0,oe.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Me.get(n).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,r._)([(0,f.MZ)()],Ce.prototype,"_files",void 0),(0,r._)([(0,f.MZ)()],Ce.prototype,"_storageIndex",void 0),(0,r._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),Ce=(0,r._)([(0,m.$)("esri.layers.support.rasterDatasets.MRFRaster")],Ce);const Oe=Ce;var Fe=i(15265);function Pe(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),a=r.map((e=>e.name)),n=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})})),{displayFieldName:"",fields:r,features:n}}class ke{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Fe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Fe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Pe({fields:l,records:c})}}}var De=i(45664),Ne=i(47915);const Ee=(e,t)=>e.get(t)?.values,Le=(e,t)=>e.get(t)?.values?.[0];let Be=class extends D.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new o.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,De.uT)(i),n=[];await this._readIFDs(n,i,s,r,0,a?8:4,t);const{imageInfo:c,rasterInfo:u}=function(e){const t=(0,De.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:h,pyramidBlockHeight:f,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=ue(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new L.A({wkid:3857}));const x=new E.A({...t.extent,spatialReference:g}),v=new we.A(x?{x:x.xmin,y:x.ymax,spatialReference:g}:{x:0,y:0}),b=new xe.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:h,pyramidBlockHeight:f,compression:l,origin:v,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new we.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=Le(e[0],"PHOTOMETRICINTERPRETATION"),T=Ee(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new X.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:x,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new E.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new le.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new we.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(n),h=(0,De.zS)(n),f=(0,De.r9)(n);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:n,pyramidIFDs:h,maskIFDs:f,...c},this._set("rasterInfo",u),!c.isSupported)throw new o.A("tiffraster:open","this tiff is not supported: "+c.message);if(!c.tileWidth)throw new o.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");u.isPseudoSpatialReference&&l.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const p=n[0].get("PREDICTOR")?.values?.[0],d=n[0].get("SAMPLEFORMAT")?.values?.[0];if(3===d&&2===p)throw new o.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:m,skipExtensions:y=[]}=this.ioConfig;if(!y.includes("aux.xml")&&!m){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,Q.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new we.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,u)}y.includes("vat.dbf")||1!==u.bandCount||"u8"!==u.pixelType||m||(u.attributeTable=await this._fetchAuxiliaryTable(e),null!=u.attributeTable&&(u.keyProperties.DataType="thematic")),m&&this.updateImageSpaceRasterInfo(u),this.updateTileInfo()}async _readIFDs(e,t,i,s,r,a=4,n){if(!s)return null;(s>=t.byteLength||s<0)&&(t=(await this.request(this.url,{range:{from:s+r,to:s+r+this._bufferSize},responseType:"array-buffer",signal:n})).data,r=s+r,s=0);const o=await this._readIFD(t,i,s,r,Ne.A.tiffTags,a,n);if(e.push(o.ifd),!o.nextIFD)return null;await this._readIFDs(e,t,i,o.nextIFD-r,r,a,n)}async _readIFD(e,t,i,s,r=Ne.A.tiffTags,a=4,n){if(!e)return null;const o=(0,De.JM)(e,t,i,s,r,a);if(o.success){const i=[];if(o.ifd?.forEach((e=>{e.values||i.push(e)})),i.length>0){const r=i.map((e=>e.offlineOffsetSize)).filter(ae.Ru),a=Math.min.apply(null,r.map((e=>e[0])));if(Math.min.apply(null,r.map((e=>e[0]+e[1])))-a<=this._bufferSize){const{data:r}=await this.request(this.url,{range:{from:a,to:a+this._bufferSize},responseType:"array-buffer",signal:n});e=r,s=a,i.forEach((i=>(0,De.Cr)(e,t,i,s)))}}if(o.ifd?.has("GEOKEYDIRECTORY")){const i=o.ifd.get("GEOKEYDIRECTORY"),r=i?.values;if(r&&r.length>4){const a=r[0]+"."+r[1]+"."+r[2],o=await this._readIFD(e,t,i.valueOffset+6-s,s,Ne.A.geoKeys,2,n);i.data=o.ifd,i.data&&i.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[a]})}}return o}if(o.requiredBufferSize&&o.requiredBufferSize!==e.byteLength){const i=await this.request(this.url,{range:{from:s,to:s+o.requiredBufferSize+4},responseType:"array-buffer",signal:n});return(e=i.data).byteLength<o.requiredBufferSize?null:this._readIFD(e,t,0,s,Ne.A.tiffTags,4,n)}}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),h=await Promise.all(u),f=h.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===h.length?h[0].data:new ArrayBuffer(f),d=[0],m=[0];if(h.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<h.length;t++){const s=h[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let x,v,b;if(o!==y||l!==g){let e=w.mask;if(e)for(x=0;x<g;x++)if(b=x*y,x<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),w.mask=e,x=0;x<l;x++)for(b=x*y,v=0;v<o;v++)e[b+v]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,De.XO)(l,o),u=Ee(l,"TILEOFFSETS");if(void 0===u)return null;const h=Ee(l,"TILEBYTECOUNTS"),{minRow:f,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<f||i<p)return null;const y=Le(l,"IMAGEWIDTH"),g=Le(l,"IMAGELENGTH"),w=Le(l,"TILEWIDTH"),x=Le(l,"TILELENGTH"),v=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;v[s]={from:u[e],to:u[e]+h[e]-1}}}else{const e=t*(m+1)+i;v.push({from:u[e],to:u[e]+h[e]-1})}for(let e=0;e<v.length;e++)if(null==v[e].from||!v[e].to||v[e].to<0)return null;return{ranges:v,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%x||x}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=ke.parse(t);return i?.recordSet?ie.A.fromJSON(i.recordSet):null}catch{return null}}};(0,r._)([(0,f.MZ)()],Be.prototype,"_files",void 0),(0,r._)([(0,f.MZ)()],Be.prototype,"_headerInfo",void 0),(0,r._)([(0,f.MZ)()],Be.prototype,"_bufferSize",void 0),(0,r._)([(0,f.MZ)({type:String,json:{write:!0}})],Be.prototype,"datasetFormat",void 0),Be=(0,r._)([(0,m.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Be);const ze=Be,Je=new Map;Je.set("MRF",{desc:"Meta Raster Format",constructor:Oe}),Je.set("TIFF",{desc:"GeoTIFF",constructor:ze}),Je.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Ae}),Je.set("JPG",{desc:"JPG Raster Format",constructor:me}),Je.set("PNG",{desc:"PNG Raster Format",constructor:me}),Je.set("GIF",{desc:"GIF Raster Format",constructor:me}),Je.set("BMP",{desc:"BMP Raster Format",constructor:me}),Je.set("CovJSON",{desc:"COVJSON Raster Format",constructor:re}),Je.set("MEMORY",{desc:"In Memory Raster Format",constructor:te});class Ve{static get supportedFormats(){const e=new Set;return Je.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const n={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(n).forEach((e=>{null==n[e]&&delete n[e]})),a){if(!this.supportedFormats.has(a))throw new o.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new o.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,Je.get(a).constructor)(n);return await i.open({signal:e.signal}),i}const l=Array.from(Je.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,Je.get(a).constructor)(n);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){Je.has(e.toUpperCase())||Je.set(e.toUpperCase(),{desc:t,constructor:i})}}var $e=i(6049),Ue=i(30291),je=i(92935);let Ge=class extends((0,w.dM)((0,T.j)((0,b.q)((0,I.A)((0,S.H)((0,x.d)((0,v.o)((0,_.G)((0,R.e)((0,g.b)((0,A.J)((0,c.P)(n.A.ClonableMixin(y.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,u.sg)((async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case je.X.SAVE:return r(this,t);case je.X.SAVE_AS:return a(this,s,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(u.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,O.rZ)("Pixel Value"),(0,O.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,O.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,O.DV)(t),s=(0,O.y6)();e.push(i,s)}if(r){const t=(0,O.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==O.F_.rawServicePixelValue))),s=(0,Ue.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,O.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,p.PZ)(F.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof s)throw e;throw new s("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(je.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(je.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new o.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,P.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new o.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new o.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,h.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,P.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,$e.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Ve.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),a=r.findIndex((e=>null==e));if(a>-1)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Ve.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new o.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new o.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Ve.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new o.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,$e.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new k.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof o.A&&l.A.getLogger(this).error("imagery-tile-layer:open",e.message),l.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};(0,r._)([(0,f.MZ)({clonable:!1})],Ge.prototype,"_primaryRasters",void 0),(0,r._)([(0,f.MZ)(M.fV)],Ge.prototype,"legendEnabled",void 0),(0,r._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Ge.prototype,"isReference",void 0),(0,r._)([(0,f.MZ)({type:["show","hide"]})],Ge.prototype,"listMode",void 0),(0,r._)([(0,f.MZ)({json:{read:!0,write:!0}})],Ge.prototype,"blendMode",void 0),(0,r._)([(0,f.MZ)({type:F.A,json:{name:"renderingRule",write:!0}})],Ge.prototype,"rasterFunction",void 0),(0,r._)([(0,f.MZ)()],Ge.prototype,"sourceJSON",void 0),(0,r._)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],Ge.prototype,"version",void 0),(0,r._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],Ge.prototype,"type",void 0),(0,r._)([(0,f.MZ)({type:["ArcGISTiledImageServiceLayer"]})],Ge.prototype,"operationalLayerType",void 0),(0,r._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],Ge.prototype,"popupEnabled",void 0),(0,r._)([(0,f.MZ)({type:a.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],Ge.prototype,"popupTemplate",void 0),(0,r._)([(0,f.MZ)({readOnly:!0})],Ge.prototype,"defaultPopupTemplate",null),(0,r._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],Ge.prototype,"fields",void 0),(0,r._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],Ge.prototype,"rasterFields",null),(0,r._)([(0,f.MZ)({constructOnly:!0})],Ge.prototype,"source",void 0),Ge=(0,r._)([(0,m.$)("esri.layers.ImageryTileLayer")],Ge);const Ze=Ge},56551:(e,t,i)=>{i.d(t,{H:()=>p});var s=i(90237),r=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let h=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],h.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],h.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],h.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],h.prototype,"renderer",void 0),h=(0,s._)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],h);const f=h,p=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},73037:(e,t,i)=>{i.d(t,{A:()=>u});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c);const u=c},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>f,X6:()=>p});var s=i(78888),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function h(e,t,i){const h=(0,c.Dl)(e),{rasterFunction:f,sourceJSON:p}=t||{},d=f?JSON.stringify(f.rasterFunctionDefinition||f):null,m=(0,c.lF)({...h.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=h.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,x=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,v=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,x,v,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),M=n.A.fromJSON(g.spatialReference||g.extent.spatialReference),C="fulfilled"===_[0].status?_[0].value?.data:null,O=C?.features?.length?u.A.fromJSON(C):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),e.dimensions?.forEach((e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const V=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:M}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:M,pixelSize:new a.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:M}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:V})}function f(e,t,i){return h(e,{sourceJSON:t},i)}function p(e,t,i){return h(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(90237),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3169,6061,8125,9202],{16346:(e,t,n)=>{n.d(t,{d:()=>c,e:()=>m,s:()=>u});var r=n(55537),i=n(90135),s=n(83047),o=n(78125);const a=new class{getOperatorType(){return 10100}supportsCurves(){return!0}accelerateGeometry(e,t,n){return!1}canAccelerateGeometry(e){return!1}execute(e,t,n){return this.executeEx(e,t,n,null,null,Number.NaN)}executeEx(e,t,n,s,o,a){if(e.isEmpty()||t.isEmpty())return Number.NaN;(0,r.d)(e),(0,r.d)(t);const m=e,u=t;Number.isNaN(a)&&(a=Number.POSITIVE_INFINITY);const c=new i.D(a,n).calculate(m,u,s,o);return Number.isFinite(c)?c:Number.NaN}};function m(e,t,n={}){const{unit:r}=n;let i=a.execute((0,o.fromGeometry)(e),(0,o.fromGeometry)(t),null);if(i&&r){const t=(0,o.getSpatialReference)(e);i=(0,s.PQ)(i,t,r)}return i}const u=a.supportsCurves(),c=Object.freeze(Object.defineProperty({__proto__:null,execute:m,supportsCurves:u},Symbol.toStringTag,{value:"Module"}))},76061:(e,t,n)=>{n.d(t,{G:()=>r,S:()=>i});class r{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}class i extends r{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},77038:(e,t,n)=>{n.r(t),n.d(t,{execute:()=>r.e,supportsCurves:()=>r.s});var r=n(16346);n(83047),n(78125)},78125:(e,t,n)=>{n.r(t),n.d(t,{fromExtent:()=>D,fromGeometry:()=>v,fromMultipoint:()=>N,fromPoint:()=>P,fromPolygon:()=>x,fromPolyline:()=>I,fromSpatialReference:()=>d,getSpatialReference:()=>_,toExtent:()=>M,toGeometry:()=>G,toMultipoint:()=>E,toPoint:()=>b,toPolygon:()=>q,toPolyline:()=>C});var r=n(83661),i=(n(79187),n(55537)),s=n(95213),o=n(35368),a=n(12189),m=n(5443),u=n(48526),c=n(86738),l=n(39829),h=n(82799),g=(n(90293),n(83299));const y="_gxVersion",p=2,f=1;function _(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function v(e){switch(e.type){case"point":return P(e);case"multipoint":return N(e);case"polyline":return I(e);case"polygon":return x(e);case"extent":return D(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function D(e){if(!e.getCacheValue(y)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(p,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(f,0,e.zmin,e.zmax),e.setCacheValue(y,t)}return e.getCacheValue(y)}function N(e){if(!e.getCacheValue(y)){const t=new o.M,n=new s.P,r=e.points,i=e.hasM,a=e.hasZ,m=a?3:2;for(let e=0,s=r.length;e<s;e++){const s=r[e];n.setXYCoords(s[0],s[1]),a&&n.setZ(s[2]??0),i&&n.setM(s[m]??NaN),t.add(n)}e.setCacheValue(y,t)}return e.getCacheValue(y)}function P(e){if(!e.getCacheValue(y)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(y,t)}return e.getCacheValue(y)}function x(e){if(!e.getCacheValue(y)){const{curveRings:t,hasM:n,hasZ:r,rings:i}=e,s=(0,g.fromGeometryToGXGeometry)({curveRings:t,hasM:n,hasZ:r,rings:i});e.setCacheValue(y,s)}return e.getCacheValue(y)}function I(e){if(!e.getCacheValue(y)){const{curvePaths:t,hasM:n,hasZ:r,paths:i}=e,s=(0,g.fromGeometryToGXGeometry)({curvePaths:t,hasM:n,hasZ:r,paths:i});e.setCacheValue(y,s)}return e.getCacheValue(y)}function d(e){if(e.wkid)return(0,a.c)(e.wkid);const t=e.wkt2||e.wkt;return t?(0,a.b)(t):null}function G(e,t){if(e)switch(e.getGeometryType()){case i.G.enumPoint:return b(e,t);case i.G.enumEnvelope:return M(e,t);case i.G.enumMultiPoint:return E(e,t);case i.G.enumPolyline:return C(e,t);case i.G.enumPolygon:return q(e,t)}return null}function M(e,t){if(e.isEmpty())return null;const n=new m.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),r=e.getDescription();if(r.hasM()){const t=e.queryInterval(p,0);n.mmin=t.vmin,n.mmax=t.vmax}if(r.hasZ()){const t=e.queryInterval(f,0);n.zmin=t.vmin,n.zmax=t.vmax}return n.setCacheValue(y,e),n}function E(e,t){if(e.isEmpty())return null;const n=e.getDescription(),r=n.hasM(),i=n.hasZ(),o=[],a=new s.P;for(let t=0,n=e.getPointCount();t<n;t++){e.getPointByVal(t,a);const n=[a.getX(),a.getY()];i&&n.push(a.getZ()),r&&n.push(a.getM()),o.push(n)}const m=new u.A({hasM:r,hasZ:i,points:o,spatialReference:t});return m.setCacheValue(y,e),m}function b(e,t){if(e instanceof r.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const n=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),i=e.getDescription();return i.hasM()&&(n.m=e.getM()),i.hasZ()&&(n.z=e.getZ()),n.setCacheValue(y,e),n}function q(e,t){if(e.isEmpty())return null;const n=l.A.fromJSON({spatialReference:t,...(0,g.toGeometry)(e,null)});return n.setCacheValue(y,e),n}function C(e,t){if(e.isEmpty())return null;const n=h.A.fromJSON({spatialReference:t,...(0,g.toGeometry)(e,null)});return n.setCacheValue(y,e),n}},90135:(e,n,r)=>{r.d(n,{D:()=>P,m:()=>l,s:()=>v,w:()=>_});var i=r(90237),s=r(55537),o=r(35368),a=r(12189),m=r(83661),u=r(79187),c=r(95213);function l(){return{outPoint:new m.P,index:-1,t:Number.NaN}}function h(e,t,n){return{outPoint:e.clone(),index:t,t:n}}function g(e,t,n,r){e.outPoint.assign(t),e.index=n,e.t=r}function y(e,t){e.outPoint.assign(t.outPoint),e.index=t.index,e.t=t.t}function p(e,t,n,r){e.index=n,e.t=r,t.queryCoord2D(e.t,e.outPoint)}function f(e,t){const n=l();y(n,e),y(e,t),y(t,n)}function _(e,t,n,r,i,o){if(e.getGeometryType()===s.G.enumPolygon){for(;r.nextPath();)if(r.hasNextSegment()){const t=r.nextSegment();if(0!==(0,a.i)(e,t.getEndXY(),0))return g(i,t.getEndXY(),-1,Number.NaN),g(o,t.getEndXY(),-1,Number.NaN),!0}r.resetToFirstPath()}if(t.getGeometryType()===s.G.enumPolygon){for(;n.nextPath();)if(n.hasNextSegment()){const e=n.nextSegment();if(0!==(0,a.i)(t,e.getEndXY(),0))return g(i,e.getEndXY(),-1,Number.NaN),g(o,e.getEndXY(),-1,Number.NaN),!0}n.resetToFirstPath()}return!1}function v(e){const t=e.getPathCount(),n=(0,m.d)(e.getSegmentCount(),0);let r=0;for(let i=0;i<t;++i){const t=r+e.getSegmentCountPath(i);for(let s=r,o=e.getPathStart(i);s<t;++s,++o)n[s]=o;r=t}return(0,o.s)(e.getPointCount(),n),n}function D(e,t){return!!Number.isNaN(t)||e<=t}function N(e){const t=new o.a;return t.addEnvelope(e,!1),t}class P{constructor(e,t){if(this.m_env2DgeometryA=null,this.m_env2DgeometryB=null,this.m_progressCounter=0,this.m_progressTracker=t,this.m_maxSqrDistance=e*e,this.m_maxDistance=e,this.m_bIsNearCalc=!1,Number.isNaN(this.m_maxDistance)?this.m_maxDistance=Number.POSITIVE_INFINITY:this.m_maxDistance=e,this.m_maxSqrDistance=this.m_maxDistance*this.m_maxDistance,Number.isFinite(this.m_maxSqrDistance)){let e=Math.sqrt(this.m_maxSqrDistance);for(;e<this.m_maxDistance;)this.m_maxSqrDistance*=1+Number.EPSILON,e=Math.sqrt(this.m_maxSqrDistance)}}calculate(e,t,n,r){if((e.getGeometryType()!==c.P.type||t.getGeometryType()!==c.P.type)&&(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!D(this.m_env2DgeometryA.distanceFromEnvelope(this.m_env2DgeometryB),this.m_maxDistance)))return Number.POSITIVE_INFINITY;const i=h(new m.P,(0,m.j)(),Number.NaN),s=h(new m.P,(0,m.j)(),Number.NaN),o=this._ExecuteBruteForce(e,t,i,s);return D(o,this.m_maxDistance)?(null!==n&&y(n,i),null!==r&&y(r,s),o):Number.POSITIVE_INFINITY}isNear(e,t){if(this.m_bIsNearCalc=!0,e.isEmpty()||t.isEmpty())return!1;if(e===t)return!0;let n=!0;if(e.getGeometryType()!==c.P.type&&e.getGeometryType()!==c.E.type||t.getGeometryType()!==c.P.type&&t.getGeometryType()!==c.E.type||(n=!1),n){if(this.m_env2DgeometryA=new u.Envelope2D,this.m_env2DgeometryB=new u.Envelope2D,e.queryEnvelope(this.m_env2DgeometryA),t.queryEnvelope(this.m_env2DgeometryB),!(this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)>this.m_maxSqrDistance))return!0;if(this.m_env2DgeometryA.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>this.m_maxSqrDistance)return!1}const r=h(new m.P,(0,m.j)(),Number.NaN),i=h(new m.P,(0,m.j)(),Number.NaN);return this._ExecuteBruteForce(e,t,r,i)<=this.m_maxDistance}progress_(e=!1){}_ExecuteBruteForce(e,t,n,r){switch(e.getGeometryType()){case s.G.enumPoint:return this.distancePointGeometry(e,t,n,r);case s.G.enumMultiPoint:return this.distanceMultipointGeometry(e,t,n,r);case s.G.enumEnvelope:return this.distanceEnvelopeGeometry(e,t,n,r);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathGeometry(e,t,n,r);default:return Number.NaN}}distancePointGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointPoint(e,t,n,r);case s.G.enumMultiPoint:return this.distancePointMultipoint(e,t,n,r);case s.G.enumPolyline:case s.G.enumPolygon:return this.distancePointMultipath(e,t,n,r);case s.G.enumEnvelope:return this.distancePointEnvelope(e,t,n,r);default:return Number.NaN}}distancePointPoint(e,t,n,r){const i=e.getXY(),s=t.getXY();return g(n,i,0,0),g(r,s,0,0),Math.sqrt(m.P.sqrDistance(i,s))}distancePointMultipoint(e,t,n,r){const i=e.getXY();let s=this.m_maxSqrDistance,o=s,a=!1;const u=t.getPointCount(),c=new m.P;for(let e=0;e<u;++e)if(t.queryXY(e,c),o=m.P.sqrDistance(i,c),this.m_bIsNearCalc){if(o<=s)return 0}else if(!(o>s)&&(!a&&o===s||o<s)&&(s=o,g(n,i,0,0),g(r,c,e,0),a=!0,0===s))return 0;return a?Math.sqrt(s):Number.POSITIVE_INFINITY}distancePointMultipath(e,t,n,r){const i=!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB),o=e.getXY();if(!i&&t.getGeometryType()===s.G.enumPolygon&&0!==(0,a.i)(t,o,0))return g(n,o,0,0),g(r,o,-1,Number.NaN),0;t.getImpl().getAccelerators();let c=this.m_maxSqrDistance,l=c,h=-1;const y=new u.Envelope2D,p=t.querySegmentIterator();let f=!1;for(;p.nextPath();)for(;p.hasNextSegment();){const e=p.nextSegment();e.queryEnvelope(y);const t=y.sqrDistance(o);if(t>c)continue;if(!this.m_bIsNearCalc&&f&&t===c)continue;h=e.getClosestCoordinate(o,!1);const i=e.getCoord2D(h);if(l=m.P.sqrDistance(o,i),this.m_bIsNearCalc){if(l<=c)return 0}else if(!(l>c)&&(!f||l<c)&&(c=l,g(n,o,0,0),g(r,i,p.getStartPointIndex(),h),f=!0,0===c))return 0}return f?Math.sqrt(c):Number.POSITIVE_INFINITY}distancePointEnvelope(e,t,n,r){const i=e.getXY();g(n,i,0,0),g(r,i,-1,Number.NaN);const s=t.asEnvelope2D();return s.contains(i)?0:Math.sqrt(s.sqrDistance(i,r.outPoint))}distanceMultipointGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distancePointMultipoint(t,e,r,n);return this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case s.G.enumMultiPoint:return this.distanceMultipointMultipoint(e,t,n,r,1,1);case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipointMultipath(e,t,n,r);case s.G.enumEnvelope:return this.distanceMultipointMultipath(e,N(t),n,r);default:return Number.NaN}}distanceMultipointMultipoint(e,n,r,s,o,a){const u={stack:[],error:void 0,hasError:!1};try{if(this.m_bIsNearCalc&&1===o&&1===a){const t=Math.trunc((0,m.c)(Math.sqrt(e.getPointCount())+1,1,(0,m.i)())),i=Math.trunc((0,m.c)(Math.sqrt(n.getPointCount())+1,1,(0,m.i)()));if((t>=4||i>=4)&&this.distanceMultipointMultipoint(e,n,r,s,t,i)<=this.m_maxSqrDistance)return 0}let t=this.m_maxSqrDistance;const c=[e],l=[n],h=this.swapGeometriesIfBGtA(c,l);h&&(this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),a=(0,m.b)(o,o=a),f(r,s)),(0,i.b)(u,(0,m.h)((()=>{f(r,s),this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!h),!1);const y=c[0].getImpl(),p=l[0].getImpl(),_=y.getPointCount(),v=p.getPointCount(),D=v>1;let N=!1;const P=new m.P,x=new m.P;for(let e=0;e<_;e+=o){if(y.queryXY(e,P),D){const e=this.m_env2DgeometryB.sqrDistance(P);if(this.m_bIsNearCalc){if(e>t)continue;if(this.m_env2DgeometryB.sqrMaxMinDistance(P)<=t)return 0}else if(e>=t)continue}for(let n=0;n<v;n+=a){p.queryXY(n,x);const i=m.P.sqrDistance(P,x);if(this.m_bIsNearCalc){if(i<=t)return 0}else if(!(i>t||N&&i===t)&&(!N||i<t)&&(g(r,P,e,0),g(s,x,n,0),N=!0,t=i,0===t))return N?Math.sqrt(t):Number.POSITIVE_INFINITY}}return N?Math.sqrt(t):Number.POSITIVE_INFINITY}catch(e){u.error=e,u.hasError=!0}finally{t(u)}}distanceMultipointMultipath(e,t,n,r){let i=!!this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)&&t.getGeometryType()===s.G.enumPolygon;const o=t.querySegmentIterator();o.stripAttributes();const c=new u.Envelope2D,l=new m.P;let h=this.m_maxSqrDistance;const y=e.getImpl(),p=y.getPointCount(),f=p>1;let _=!1;for(;o.nextPath();)for(;o.hasNextSegment();){const e=o.nextSegment();if(e.queryLooseEnvelope(c),f){const e=c.sqrDistanceEnvelope(this.m_env2DgeometryA,null,null);if(this.m_bIsNearCalc){if(e>h)continue}else if(e>h||_&&e===h)continue}for(let s=0;s<p;s++){if(y.queryXY(s,l),i&&0!==(0,a.i)(t,l,0))return g(n,l,-1,Number.NaN),g(r,l,s,0),0;{const e=c.sqrDistance(l);if(this.m_bIsNearCalc){if(e>h)continue}else if(e>h)continue}const m=e.getClosestCoordinate(l,!1),u=e.getCoord2D(m);l.subThis(u);const p=l.sqrLength();if(this.m_bIsNearCalc){if(p<=h)return 0}else if(!(p>h)&&(!_||p<h)&&(h=p,g(n,y.getXY(s),s,0),g(r,u,o.getStartPointIndex(),m),_=!0,0===h))return 0}i=!1}return _?Math.sqrt(h):Number.POSITIVE_INFINITY}distanceEnvelopeGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:return this.distancePointEnvelope(t,e,r,n);case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distanceMultipointMultipath(t,N(e),r,n);return this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(N(e),t,n,r);case s.G.enumEnvelope:return this.distanceEnvelopeEnvelope(e,t,n,r);default:return Number.NaN}}distanceEnvelopeEnvelope(e,t,n,r){n.t=Number.NaN,n.index=-1,r.t=Number.NaN,r.index=-1;const i=e.asEnvelope2D(),s=t.asEnvelope2D();return Math.sqrt(i.sqrDistanceEnvelope(s,n.outPoint,r.outPoint))}distanceMultipathGeometry(e,t,n,r){switch(t.getGeometryType()){case s.G.enumPoint:{this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distancePointMultipath(t,e,r,n);return this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case s.G.enumMultiPoint:{this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB);const i=this.distanceMultipointMultipath(t,e,r,n);return this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),i}case s.G.enumPolyline:case s.G.enumPolygon:return this.distanceMultipathMultipath(e,t,n,r);case s.G.enumEnvelope:return this.distanceMultipathMultipath(e,N(t),n,r);default:return Number.NaN}}distanceMultipathMultipath(e,n,r,s){const a={stack:[],error:void 0,hasError:!1};try{const t=[e],c=[n],h=this.swapGeometriesIfAGtB(t,c);h&&(this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB),f(r,s)),(0,i.b)(a,(0,m.h)((()=>{f(r,s),this.m_env2DgeometryB=(0,m.b)(this.m_env2DgeometryA,this.m_env2DgeometryA=this.m_env2DgeometryB)}),!h),!1);const g=t[0],D=c[0],N=g.querySegmentIterator();N.stripAttributes();const P=D.querySegmentIterator();if(P.stripAttributes(),this.m_bIsNearCalc&&this.m_env2DgeometryA.sqrMaxMinDistanceEnvelope(this.m_env2DgeometryB)<=this.m_maxSqrDistance)return 0;if(this.m_bIsNearCalc){const e=Math.trunc((0,m.c)(Math.sqrt(g.getPointCount())+1,1,(0,m.i)())),t=Math.trunc((0,m.c)(Math.sqrt(g.getPointCount())+1,1,(0,m.i)()));if(this.distanceMultipointMultipoint(g,D,r,s,e,t)<=this.m_maxSqrDistance)return 0}if(this.m_env2DgeometryA.isIntersecting(this.m_env2DgeometryB)){const e=l(),t=l();if(_(g,D,N,P,e,t))return y(r,e),y(s,t),0}const x=v(g),I=[],d=new o.S,G=new u.Envelope2D,M=new u.Envelope2D,E=new u.Envelope2D;let b=this.m_maxSqrDistance,q=!0,C=!1;for(let e=0,t=x.length;e<t;++e){g.querySegment(x[e],d,!0);const t=d.get();if(t.queryEnvelope(G),!(G.sqrDistanceEnvelope(this.m_env2DgeometryB,null,null)>b)){if(this.m_bIsNearCalc&&G.sqrMaxDistanceEnvelope(this.m_env2DgeometryB)<=b)return 0;for(;P.nextPath();){if(this.progress_(),q)D.queryPathEnvelope(P.getPathIndex(),E),I[P.getPathIndex()]=E.clone();else if(G.sqrDistanceEnvelope(I[P.getPathIndex()],null,null)>b)continue;for(;P.hasNextSegment();){const n=P.nextSegment();if(n.queryEnvelope(M),G.sqrDistanceEnvelope(M,null,null)<=b){const i=!G.isIntersecting(M),o=[0],a=[0];let m=t.distance(n,i,o,a);if(m*=m,this.m_bIsNearCalc&&m<=this.m_maxSqrDistance)return 0;if(m<b||m===b&&x[e]<r.index){if(C=!0,p(r,t,x[e],o[0]),p(s,n,P.getStartPointIndex(),a[0]),0===m)return 0;b=m}}}}P.resetToFirstPath(),q=!1}}return C?Math.sqrt(b):Number.POSITIVE_INFINITY}catch(e){a.error=e,a.hasError=!0}finally{t(a)}}swapGeometriesIfAGtB(e,t){return(0,s.v)(e[0])>(0,s.v)(t[0])&&(t[0]=(0,m.b)(e[0],e[0]=t[0]),!0)}swapGeometriesIfBGtA(e,t){return this.swapGeometriesIfAGtB(t,e)}}}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[4123,4755,6760,7136],{5834:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.numBins=null,this.end=null,this.start=null,this.type="auto-interval"}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.numberOfBins",write:!0}})],d.prototype,"numBins",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({autoIntervalBin:"auto-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.AutoIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},7320:(e,t,s)=>{s.d(t,{g:()=>i});const i={convertToGEGeometry:function(e,t){return null==t?null:e.convertJSONToGeometry(t)},exportPoint:function(e,t,s){const i=new r(e.getPointX(t),e.getPointY(t),s),n=e.hasZ(t),a=e.hasM(t);return n&&(i.z=e.getPointZ(t)),a&&(i.m=e.getPointM(t)),i},exportPolygon:function(e,t,s){return new n(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportPolyline:function(e,t,s){return new a(e.exportPaths(t),s,e.hasZ(t),e.hasM(t))},exportMultipoint:function(e,t,s){return new o(e.exportPoints(t),s,e.hasZ(t),e.hasM(t))},exportExtent:function(e,t,s){const i=e.hasZ(t),r=e.hasM(t),n=new l(e.getXMin(t),e.getYMin(t),e.getXMax(t),e.getYMax(t),s);if(i){const s=e.getZExtent(t);n.zmin=s.vmin,n.zmax=s.vmax}if(r){const s=e.getMExtent(t);n.mmin=s.vmin,n.mmax=s.vmax}return n}};class r{constructor(e,t,s){this.x=e,this.y=t,this.spatialReference=s,this.z=void 0,this.m=void 0}}class n{constructor(e,t,s,i){this.rings=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class a{constructor(e,t,s,i){this.paths=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class o{constructor(e,t,s,i){this.points=e,this.spatialReference=t,this.hasZ=void 0,this.hasM=void 0,s&&(this.hasZ=s),i&&(this.hasM=i)}}class l{constructor(e,t,s,i,r){this.xmin=e,this.ymin=t,this.xmax=s,this.ymax=i,this.spatialReference=r,this.zmin=void 0,this.zmax=void 0,this.mmin=void 0,this.mmax=void 0}}},8384:(e,t,s)=>{s.d(t,{G:()=>F});var i=s(4718),r=s(88930),n=s(12359),a=s(90634),o=s(62577),l=s(21325),u=s(29441),c=s(51441),h=s(30524),d=s(87445),p=s(1873),m=s(43668);class f{constructor(e,t,s){this._fieldDataCache=new Map,this._returnDistinctMap=new Map,this.returnDistinctValues=e.returnDistinctValues??!1,this.fieldsIndex=s,this.featureAdapter=t;const i=e.outFields;if(i&&!i.includes("*")){this.outFields=i;let e=0;for(const t of i){const i=(0,u.Wq)(t),r=this.fieldsIndex.get(i),n=r?null:(0,u.j4)(i,s),a=r?r.name:(0,u.SY)(t)||"FIELD_EXP_"+e++;this._fieldDataCache.set(t,{alias:a,clause:n})}}}countDistinctValues(e){return this.returnDistinctValues?(e.forEach((e=>this.getAttributes(e))),this._returnDistinctMap.size):e.length}getAttributes(e){const t=this._processAttributesForOutFields(e);return this._processAttributesForDistinctValues(t)}getFieldValue(e,t,s){const i=s?s.name:t;let r=null;return this._fieldDataCache.has(i)?r=this._fieldDataCache.get(i)?.clause:s||(r=(0,u.j4)(t,this.fieldsIndex),this._fieldDataCache.set(i,{alias:i,clause:r})),s?this.featureAdapter.getAttribute(e,i):r?.calculateValue(e,this.featureAdapter)}getDataValues(e,t,s=!0){const i=t.normalizationType,r=t.normalizationTotal,n=this.fieldsIndex.get(t.field),a=(0,h.zD)(n)||(0,h.Ah)(n),o=(0,h.OH)(n);return e.map((e=>{let n=t.field&&this.getFieldValue(e,t.field,this.fieldsIndex.get(t.field));if(t.field2?(n=`${(0,p.gJ)(n)}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field2,this.fieldsIndex.get(t.field2)))}`,t.field3&&(n=`${n}${t.fieldDelimiter}${(0,p.gJ)(this.getFieldValue(e,t.field3,this.fieldsIndex.get(t.field3)))}`)):"string"==typeof n&&s&&(a?n=n?new Date(n).getTime():null:o&&(n=n?(0,d.rb)(n):null)),i&&Number.isFinite(n)){const s="field"===i&&t.normalizationField?this.getFieldValue(e,t.normalizationField,this.fieldsIndex.get(t.normalizationField)):null;n=(0,p.zS)(n,i,s,r)}return n}))}async getExpressionValues(e,t,s,i,r){const{arcadeUtils:n}=await(0,m.l)(),a=n.hasGeometryOperations(t);a&&await n.enableGeometryOperations();const o=n.createFunction(t),l=n.getViewInfo(s),u={fields:this.fieldsIndex.fields};return e.map((e=>{const t={attributes:this.featureAdapter.getAttributes(e),layer:u,geometry:a?{...(0,c.pL)(i.geometryType,i.hasZ,i.hasM,this.featureAdapter.getGeometry(e)),spatialReference:s?.spatialReference}:null},h=n.createExecContext(t,l,r);return n.executeFunction(o,h)}))}validateItem(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testFeature(e,this.featureAdapter)??!1}validateItems(e,t){return this._fieldDataCache.has(t)||this._fieldDataCache.set(t,{alias:t,clause:(0,u.j4)(t,this.fieldsIndex)}),this._fieldDataCache.get(t)?.clause?.testSet(e,this.featureAdapter)??!1}_processAttributesForOutFields(e){const t=this.outFields;if(!t?.length)return this.featureAdapter.getAttributes(e);const s={};for(const i of t){const{alias:t,clause:r}=this._fieldDataCache.get(i);s[t]=r?r.calculateValue(e,this.featureAdapter):this.featureAdapter.getAttribute(e,t)}return s}_processAttributesForDistinctValues(e){if(null==e||!this.returnDistinctValues)return e;const t=this.outFields,s=[];if(t)for(const i of t){const{alias:t}=this._fieldDataCache.get(i);s.push(e[t])}else for(const t in e)s.push(e[t]);const i=`${(t||["*"]).join(",")}=${s.join(",")}`;let r=this._returnDistinctMap.get(i)||0;return this._returnDistinctMap.set(i,++r),r>1?null:e}}var y=s(31464),g=s(58727);function _(e,t,s){return{objectId:e,target:t,distance:s,type:"vertex"}}function x(e,t,s,i,r,n=!1){return{objectId:e,target:t,distance:s,type:"edge",start:i,end:r,draped:n}}var T=s(5834),I=s(59977),v=s(11440),S=s(60909);const R="bin";class F{constructor(e,t,s){this.items=e,this.query=t,this.geometryType=s.geometryType,this.hasM=s.hasM,this.hasZ=s.hasZ,this.fieldsIndex=s.fieldsIndex,this.objectIdField=s.objectIdField,this.spatialReference=s.spatialReference,this.featureAdapter=s.featureAdapter}get size(){return this.items.length}createQueryResponseForCount(){const e=new f(this.query,this.featureAdapter,this.fieldsIndex);if(!this.query.outStatistics)return e.countDistinctValues(this.items);const{groupByFieldsForStatistics:t,having:s,outStatistics:i}=this.query,r=t?.length;if(!r)return 1;const n=new Map,a=new Map,o=new Set;for(const r of i){const{statisticType:i}=r,l="exceedslimit"!==i?r.onStatisticField:void 0;if(!a.has(l)){const s=[];for(const i of t){const t=this._getAttributeValues(e,i,this.items,n);s.push(t)}a.set(l,this._calculateUniqueValues(s,this.items,e.returnDistinctValues))}const u=a.get(l);for(const t in u){const{data:i,items:r}=u[t],n=i.join(",");s&&!e.validateItems(r,s)||o.add(n)}}return o.size}async createQueryResponse(){let e;if(e=this.query.outStatistics?this.query.outStatistics.some((e=>"exceedslimit"===e.statisticType))?this._createExceedsLimitQueryResponse():await this._createStatisticsQueryResponse(this.query,this.items):this._createFeatureQueryResponse(this.query),this.query.returnQueryGeometry){const t=this.query.geometry;(0,l.fn)(this.query.outSR)&&!(0,l.aI)(t.spatialReference,this.query.outSR)?e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...(0,y.Cv)(t,t.spatialReference,this.query.outSR)}):e.queryGeometry=(0,c.ag)({spatialReference:this.query.outSR,...t})}return e}createSnappingResponse(e,t){const s=this.featureAdapter,i=w(this.hasZ,this.hasM),{point:r,mode:n}=e,a="number"==typeof e.distance?e.distance:e.distance.x,o="number"==typeof e.distance?e.distance:e.distance.y,l={candidates:[]},u="esriGeometryPolygon"===this.geometryType,c="esriGeometryPolyline"===this.geometryType||"esriGeometryPoint"===this.geometryType,h=this._getPointCreator(n,this.spatialReference,t),d=new A(null,0),p=new A(null,0),m={x:0,y:0,z:0};for(const t of this.items){const n=s.getGeometry(t);if(null==n)continue;const{coords:f}=n,y=n.isPoint?b:n.lengths;if(d.coords=f,p.coords=f,e.returnEdge){let e=0;for(let n=0;n<y.length;n++){const c=y[n],f=e;for(let n=0;n<c;n++,e+=i){if(!u&&n===c-1)continue;const y=d;y.coordsIndex=e;const g=p;g.coordsIndex=n===c-1?f:e+i;const _=m;if(!E(m,r,y,g))continue;const T=(r.x-_.x)/a,I=(r.y-_.y)/o,v=T*T+I*I;v<=1&&l.candidates.push(x(s.getObjectId(t),h(_),Math.sqrt(v),h(y),h(g)))}}}if("all"===e.vertexMode){let e=0;for(let n=0;n<y.length;n++){const c=y[n],m=e,f=p;f.coordsIndex=m;for(let n=0;n<c;n++,e+=i){const i=d;if(i.coordsIndex=e,u&&n===c-1&&i.x===f.x&&i.y===f.y)continue;const p=(r.x-i.x)/a,m=(r.y-i.y)/o,y=p*p+m*m;y<=1&&l.candidates.push(_(s.getObjectId(t),h(i),Math.sqrt(y)))}}}else if(c&&"ends"===e.vertexMode){let e=0;const n=[];for(let t=0;t<y.length;t++){n.push(e);const s=y[t];e+=s*i,!u&&s>1&&n.push(e-i)}for(const e of n){const i=d;i.coordsIndex=e;const n=(r.x-i.x)/a,u=(r.y-i.y)/o,c=n*n+u*u;c<=1&&l.candidates.push(_(s.getObjectId(t),h(i),Math.sqrt(c)))}}}return l.candidates.sort(((e,t)=>e.distance-t.distance)),l}_getPointCreator(e,t,s){const i=null==s||(0,l.aI)(t,s)?e=>e:e=>(0,y.Cv)(e,t,s),{hasZ:r}=this;return"3d"===e?r?({x:e,y:t,z:s})=>i({x:e,y:t,z:s}):({x:e,y:t})=>i({x:e,y:t,z:0}):({x:e,y:t})=>i({x:e,y:t})}async createSummaryStatisticsResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,minValue:a,maxValue:o,scale:l,timeZone:u,outStatisticTypes:c}=e,d=this.fieldsIndex.get(t),m=(0,h.vE)(d)||(0,h.zD)(d)||(0,h.Ah)(d),f=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:l,timeZone:u},this.items),y=(0,p.Vb)({normalizationType:r,normalizationField:i,minValue:a,maxValue:o}),g={value:.5,fieldType:d?.type},_=(0,h.yM)(d)?(0,p.z9)({values:f,supportsNullCount:y,percentileParams:g,outStatisticTypes:c}):(0,p.G_)({values:f,minValue:a,maxValue:o,useSampleStdDev:!r,supportsNullCount:y,percentileParams:g,outStatisticTypes:c});return(0,p.oZ)(_,c,m)}async createUniqueValuesResponse(e){const{field:t,valueExpression:s,domains:i,returnAllCodedValues:r,scale:n,timeZone:a}=e,o=await this._getDataValues({field:t,field2:e.field2,field3:e.field3,fieldDelimiter:e.fieldDelimiter,valueExpression:s,scale:n,timeZone:a},this.items,!1),l=(0,p.b3)(o);return(0,p.lv)(l,i,r,e.fieldDelimiter)}async createClassBreaksResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items),f=(0,p.Rw)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numClasses:c});return(0,p.jM)(f,a)}async createHistogramResponse(e){const{field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c,scale:h,timeZone:d}=e,m=await this._getDataValues({field:t,valueExpression:s,normalizationField:i,normalizationType:r,normalizationTotal:n,scale:h,timeZone:d},this.items);return(0,p.$y)(m,{field:t,normalizationField:i,normalizationType:r,normalizationTotal:n,classificationMethod:a,standardDeviationInterval:o,minValue:l,maxValue:u,numBins:c})}_sortFeatures(e,t,s){if(e.length>1&&t?.length)for(const i of t.slice().reverse()){const t=i.split(" "),r=t[0],n=this.fieldsIndex.get(r),a=!!t[1]&&"desc"===t[1].toLowerCase(),o=(0,p.FM)(n?.type,a);e.sort(((e,t)=>{const i=s(e,r,n),a=s(t,r,n);return o(i,a)}))}}_createFeatureQueryResponse(e){const{items:t,geometryType:s,hasM:i,hasZ:r,objectIdField:n,spatialReference:a}=this,{outFields:l,outSR:u,quantizationParameters:h,resultRecordCount:d,resultOffset:p,returnZ:m,returnM:f}=e,y=null!=d&&t.length>(p||0)+d,g=l&&(l.includes("*")?[...this.fieldsIndex.fields]:l.map((e=>this.fieldsIndex.get(e))));return{exceededTransferLimit:y,features:this._createFeatures(e,t),fields:g,geometryType:s,hasM:i&&f,hasZ:r&&m,objectIdFieldName:n,spatialReference:(0,c.ag)(u||a),transform:h&&(0,o.VV)(h)||null}}_createFeatures(e,t){const s=new f(e,this.featureAdapter,this.fieldsIndex),{hasM:i,hasZ:r}=this,{orderByFields:n,quantizationParameters:a,returnGeometry:l,returnCentroid:u,maxAllowableOffset:h,resultOffset:d,resultRecordCount:p,returnZ:m=!1,returnM:y=!1}=e,g=r&&m,_=i&&y;let x=[],T=0;const I=[...t];if(this._sortFeatures(I,n,((e,t,i)=>s.getFieldValue(e,t,i))),this.geometryType&&(l||u)){const e=(0,o.VV)(a)??void 0,t="esriGeometryPolygon"===this.geometryType||"esriGeometryPolyline"===this.geometryType;if(l&&!u)for(const i of I){const r=this.featureAdapter.getGeometry(i),n={attributes:s.getAttributes(i),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,r,h,e,g,_),metadata:this.featureAdapter.getMetadata?.(i)};t&&r&&!n.geometry&&(n.centroid=(0,c.LQ)(this,this.featureAdapter.getCentroid(i,this),e)),x[T++]=n}else if(!l&&u)for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e)};else for(const t of I)x[T++]={attributes:s.getAttributes(t),centroid:(0,c.LQ)(this,this.featureAdapter.getCentroid(t,this),e),geometry:(0,c.pL)(this.geometryType,this.hasZ,this.hasM,this.featureAdapter.getGeometry(t),h,e,g,_),metadata:this.featureAdapter.getMetadata?.(t)}}else for(const e of I){const t=s.getAttributes(e);t&&(x[T++]={attributes:t})}const v=d||0;if(null!=p){const e=v+p;x=x.slice(v,Math.min(x.length,e))}return x}_createExceedsLimitQueryResponse(){let e=!1,t=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,i=Number.POSITIVE_INFINITY;for(const e of this.query.outStatistics??[])if("exceedslimit"===e.statisticType){t=null!=e.maxPointCount?e.maxPointCount:Number.POSITIVE_INFINITY,s=null!=e.maxRecordCount?e.maxRecordCount:Number.POSITIVE_INFINITY,i=null!=e.maxVertexCount?e.maxVertexCount:Number.POSITIVE_INFINITY;break}if("esriGeometryPoint"===this.geometryType)e=this.items.length>t;else if(this.items.length>s)e=!0;else{const t=w(this.hasZ,this.hasM),s=this.featureAdapter;e=this.items.reduce(((e,t)=>{const i=s.getGeometry(t);return e+(null!=i&&i.coords.length||0)}),0)/t>i}return{fields:[{name:"exceedslimit",type:"esriFieldTypeInteger",alias:"exceedslimit",sqlType:"sqlTypeInteger",domain:null,defaultValue:null}],features:[{attributes:{exceedslimit:Number(e)}}]}}async _createStatisticsQueryResponse(e,t,s={attributes:{}}){const i=[],r=new Map,n=new Map,a=new Map,o=new Map,l=new f(e,this.featureAdapter,this.fieldsIndex),u=e.outStatistics,{groupByFieldsForStatistics:c,having:d,orderByFields:p,resultRecordCount:m}=e,y=c?.length,g=!!y,_=g?c[0]:null,x=g&&!this.fieldsIndex.get(_);for(const e of u??[]){const{outStatisticFieldName:u,statisticType:p}=e,m=e,f="exceedslimit"!==p?e.onStatisticField:void 0,T="percentile_disc"===p||"percentile_cont"===p,I="EnvelopeAggregate"===p||"CentroidAggregate"===p||"ConvexHullAggregate"===p,v=g&&1===y&&(f===_||x)&&"count"===p;if(g){if(!a.has(f)){const e=[];for(const s of c){const i=this._getAttributeValues(l,s,t,r);e.push(i)}a.set(f,this._calculateUniqueValues(e,t,!I&&l.returnDistinctValues))}const e=a.get(f);if(!e)continue;const s=Object.keys(e);for(const i of s){const{count:s,data:n,items:a,itemPositions:h}=e[i],p=n.join(",");if(!d||l.validateItems(a,d)){const e=o.get(p)||{attributes:{}};if(I){e.aggregateGeometries||(e.aggregateGeometries={});const{aggregateGeometries:t,outStatisticFieldName:s}=await this._getAggregateGeometry(m,a);e.aggregateGeometries[s]=t}else{let i=null;if(v)i=s;else{const e=this._getAttributeValues(l,f,t,r),s=h.map((t=>e[t]));i=T&&"statisticParameters"in m?this._getPercentileValue(m,s):this._getStatisticValue(m,s,null,l.returnDistinctValues)}e.attributes[u]=i}let i=0;c.forEach(((t,s)=>e.attributes[this.fieldsIndex.get(t)?t:"EXPR_"+ ++i]=n[s])),o.set(p,e)}}}else if(I){s.aggregateGeometries||(s.aggregateGeometries={});const{aggregateGeometries:e,outStatisticFieldName:i}=await this._getAggregateGeometry(m,t);s.aggregateGeometries[i]=e}else{const e=this._getAttributeValues(l,f,t,r);s.attributes[u]=T&&"statisticParameters"in m?this._getPercentileValue(m,e):this._getStatisticValue(m,e,n,l.returnDistinctValues)}const S="min"!==p&&"max"!==p||!(0,h.yM)(this.fieldsIndex.get(f))&&!this._isAnyDateField(f)?null:this.fieldsIndex.get(f)?.type;i.push({name:u,alias:u,type:S||"esriFieldTypeDouble"})}const T=g?Array.from(o.values()):[s];return this._sortFeatures(T,p,((e,t)=>e.attributes[t])),m&&(T.length=Math.min(m,T.length)),{fields:i,features:T}}_isAnyDateField(e){const t=this.fieldsIndex.get(e);return(0,h.vE)(t)||(0,h.zD)(t)||(0,h.Ah)(t)||(0,h.OH)(t)}async _getAggregateGeometry(e,t){const{convexHull:i,union:r}=await Promise.all([s.e(9930),s.e(9940)]).then(s.bind(s,47559)),{statisticType:o,outStatisticFieldName:l}=e,{featureAdapter:u,spatialReference:h,geometryType:d,hasZ:p,hasM:m}=this,f=t.map((e=>(0,c.pL)(d,p,m,u.getGeometry(e)))),y=i(h,f,!0)[0],g={aggregateGeometries:null,outStatisticFieldName:null};if("EnvelopeAggregate"===o){const e=y?(0,a.v)(y):(0,a.HA)(r(h,f));g.aggregateGeometries={...e,spatialReference:h},g.outStatisticFieldName=l||"extent"}else if("CentroidAggregate"===o){const e=y?(0,n.l8)(y):(0,n.Z4)((0,a.HA)(r(h,f)));g.aggregateGeometries={x:e[0],y:e[1],spatialReference:h},g.outStatisticFieldName=l||"centroid"}else"ConvexHullAggregate"===o&&(g.aggregateGeometries=y,g.outStatisticFieldName=l||"convexHull");return g}_getStatisticValue(e,t,s,i){const{onStatisticField:r,statisticType:n}=e;let a=null;return a=s?.has(r)?s.get(r):(0,h.yM)(this.fieldsIndex.get(r))||this._isAnyDateField(r)?(0,p.z9)({values:t,returnDistinct:i}):(0,p.G_)({values:i?[...new Set(t)]:t,minValue:null,maxValue:null,useSampleStdDev:!0}),s&&s.set(r,a),a["var"===n?"variance":n]}_getPercentileValue(e,t){const{onStatisticField:s,statisticParameters:i,statisticType:r}=e,{value:n,orderBy:a}=i,o=this.fieldsIndex.get(s);return(0,p.qg)(t,{value:n,orderBy:a,fieldType:o?.type,isDiscrete:"percentile_disc"===r})}_getAttributeValues(e,t,s,i){if(i.has(t))return i.get(t);const r=this.fieldsIndex.get(t),n=s.map((s=>e.getFieldValue(s,t,r)));return i.set(t,n),n}_calculateUniqueValues(e,t,s){const i={},r=t.length;for(let n=0;n<r;n++){const r=t[n],a=[];for(const t of e)a.push(t[n]);const o=a.join(",");null==i[o]?i[o]={count:1,data:a,items:[r],itemPositions:[n]}:(s||i[o].count++,i[o].items.push(r),i[o].itemPositions.push(n))}return i}async _getDataValues(e,t,s=!0){const r=new f(this.query,this.featureAdapter,this.fieldsIndex),{valueExpression:n,scale:a,timeZone:o}=e;return n?r.getExpressionValues(t,n,{viewingMode:"map",scale:a,spatialReference:this.query.outSR||this.spatialReference},{geometryType:this.geometryType,hasZ:this.hasZ,hasM:this.hasM},o):r.getDataValues(t,(0,i.o8)(e),s)}async _calculateHistogramBins(e,t,s){if(null==t.min&&null==t.max)return[];const i=t.intervals,r=t.min??0,n=t.max??0,a=i.map((([e,t])=>({minValue:e,maxValue:t,count:0,items:[]})));for(let t=0;t<e.length;t++){const o=e[t],l=s[t];if(null!=o&&o>=r&&o<=n){const e=(0,p.Ak)(i,o);e>-1&&(a[e].count++,a[e].items.push(l))}}return a}async createQueryBinsResponse(e){const t=e.bin?.splitBy;if(!t)return this._createBinsResponse(e);const{value:s,outAlias:i,valueType:r}=t,n=[],a=[{name:i??s,alias:i??s,type:r??"esriFieldTypeString"},{name:R,alias:R,type:"esriFieldTypeInteger"}],o=new f(e,this.featureAdapter,this.fieldsIndex),l=new Map,u=[...this.items];this._sortFeatures(u,[s],((e,t,s)=>o.getFieldValue(e,t,s)));const c=this._getAttributeValues(o,s,u,l),h=this._calculateUniqueValues([c],u,o.returnDistinctValues);for(const t in h){const{items:r}=h[t],o=await this._createBinsResponse(e,r);if(n.push(...o.features.map((e=>({...e,attributes:{...e.attributes,[i??s]:t}})))),o.fields)for(const e of o.fields)a.some((t=>t.name===e.name))||a.push(e)}return{fields:a,features:n}}async _createBinsResponse(e,t){const s=e.bin;switch(t=t??this.items,s.type){case"autoIntervalBin":return this._createAutoIntervalBinsResponse(T.A.fromJSON(s),e,t);case"dateBin":return this._createDateBinsResponse(I.A.fromJSON(s),e,t);case"fixedBoundariesBin":return this._createFixedBoundariesBinsResponse(v.A.fromJSON(s),e,t);case"fixedIntervalBin":return this._createFixedIntervalBinsResponse(S.A.fromJSON(s),e,t)}}async _createAutoIntervalBinsResponse(e,t,s){const{field:i,normalizationField:r,numBins:n,normalizationType:a,normalizationTotal:o,start:l,end:u}=e,c=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),h=(0,p.sU)(c,{field:i,normalizationField:r,normalizationType:a,normalizationTotal:o,numBins:n,minValue:(0,g.dO)(l,!1),maxValue:(0,g.dO)(u,!1)}),d=await this._calculateHistogramBins(c,h,s);return this._createFeaturesFromHistogramBins(d,t)}async _createDateBinsResponse(e,t,s){const{field:i,interval:n,start:a,end:o}=e,l=n.unit,u="quarters"===l?3*r.vf.months:r.vf[l],c=n.value*u/r.vf.milliseconds,d=await this._getDataValues({field:e.field,timeZone:t.outTimeReference?.ianaTimeZone},s),m=(0,h.OH)(this.fieldsIndex.get(i)),f=(0,p.sU)(d,{field:i,classificationMethod:"defined-interval",definedInterval:c,minValue:(0,g.dO)(a,m),maxValue:(0,g.dO)(o,m)},!0),y=await this._calculateHistogramBins(d,f,s);return this._createFeaturesFromHistogramBins(y,t)}async _createFixedBoundariesBinsResponse(e,t,s){const{field:i}=e,r=await this._getDataValues({field:i,timeZone:t.outTimeReference?.ianaTimeZone},s),n=(0,h.OH)(this.fieldsIndex.get(i)),a=e.boundaries.map((e=>(0,g.dO)(e,n))).sort(((e,t)=>e-t)),o=[];for(let e=0;e<a.length-1;e++)o.push([a[e],a[e+1]]);const l={intervals:o,min:a.at(0),max:a.at(-1)},u=await this._calculateHistogramBins(r,l,s);return this._createFeaturesFromHistogramBins(u,t)}async _createFixedIntervalBinsResponse(e,t,s){const{field:i,interval:r,start:n,end:a}=e,o=await this._getDataValues({field:e.field,normalizationField:e.normalizationField,normalizationType:e.normalizationType,normalizationTotal:e.normalizationTotal,timeZone:t.outTimeReference?.ianaTimeZone},s),l=(0,h.OH)(this.fieldsIndex.get(i)),u=(0,p.sU)(o,{field:i,classificationMethod:"defined-interval",definedInterval:r,minValue:(0,g.dO)(n,l),maxValue:(0,g.dO)(a,l)},!0),c=await this._calculateHistogramBins(o,u,s);return this._createFeaturesFromHistogramBins(c,t)}async _createFeaturesFromHistogramBins(e,t){const{upperBoundaryAlias:s,lowerBoundaryAlias:i}=t,r=i||"lowerBoundary",n=s||"upperBoundary",a=[],o=[{name:r,alias:r,type:"esriFieldTypeDouble"},{name:n,alias:n,type:"esriFieldTypeDouble"}],l=t.bin?.stackBy?.value,u=t.bin?.stackBy?.outAlias;l&&o.push({name:R,alias:R,type:"esriFieldTypeInteger"},{name:u??l,alias:u??l,type:"esriFieldTypeString"});let c=0;for(const s of e){const{minValue:e,maxValue:i,items:h}=s,d={attributes:{}};let p;if(d.attributes[r]=e,d.attributes[n]=i,l?(p=await this._createStatisticsQueryResponse({...t,groupByFieldsForStatistics:[l],orderByFields:[l]},h),d.attributes[R]=++c,"flat"===t.bin.jsonStyle?a.push(...p.features.map((({attributes:{EXPR_1:e,...t},...s})=>({...s,attributes:u??e?{...t,[u??e]:e,...d.attributes}:{...t,...d.attributes}})))):(d.stackedAttributes=p.features.map((({attributes:{EXPR_1:e,...t}})=>u??e?{...t,[u??e]:e}:t)),a.push(d))):(t.bin?.splitBy&&(d.attributes[R]=++c),p=await this._createStatisticsQueryResponse(t,h,d),a.push(d)),p.fields)for(const e of p.fields)o.some((t=>t.name===e.name))||o.push(e)}return"desc"===t.binOrder&&a.reverse(),{fields:o,features:a}}}function E(e,t,s,i){const r=i.x-s.x,n=i.y-s.y,a=t.x-s.x,o=t.y-s.y,l=r*r+n*n;if(0===l)return!1;const u=a*r+o*n,c=Math.min(1,Math.max(0,u/l));return e.x=s.x+r*c,e.y=s.y+n*c,!0}function w(e,t){return e?t?4:3:t?3:2}class A{constructor(e,t){this.coords=e,this.coordsIndex=t}get x(){return this.coords[this.coordsIndex]}get y(){return this.coords[this.coordsIndex+1]}get z(){return this.coords[this.coordsIndex+2]}}const b=[1]},11006:(e,t,s)=>{function i(e,t,s,i,n){r(e,t,s||0,i||e.length-1,n||a)}function r(e,t,s,i,a){for(;i>s;){if(i-s>600){var o=i-s+1,l=t-s+1,u=Math.log(o),c=.5*Math.exp(2*u/3),h=.5*Math.sqrt(u*c*(o-c)/o)*(l-o/2<0?-1:1);r(e,t,Math.max(s,Math.floor(t-l*c/o+h)),Math.min(i,Math.floor(t+(o-l)*c/o+h)),a)}var d=e[t],p=s,m=i;for(n(e,s,t),a(e[i],d)>0&&n(e,s,i);p<m;){for(n(e,p,m),p++,m--;a(e[p],d)<0;)p++;for(;a(e[m],d)>0;)m--}0===a(e[s],d)?n(e,s,m):n(e,++m,i),m<=t&&(s=m+1),t<=m&&(i=m-1)}}function n(e,t,s){var i=e[t];e[t]=e[s],e[s]=i}function a(e,t){return e<t?-1:e>t?1:0}s.d(t,{q:()=>i})},11440:(e,t,s)=>{s.d(t,{A:()=>h});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266);let c=class extends u.A{constructor(e){super(e),this.boundaries=[],this.type="fixed-boundaries"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.boundaries",write:{writer:function(e,t,s){(0,r.sM)(s,e&&function(e){return e[0]instanceof Date}(e)?e.map((e=>e.getTime())):e,t)}}}})],c.prototype,"boundaries",void 0),(0,i._)([(0,o.e)({fixedBoundariesBin:"fixed-boundaries"},{readOnly:!0})],c.prototype,"type",void 0),c=(0,i._)([(0,l.$)("esri.rest.support.FixedBoundariesBinParameters")],c);const h=c;c.from=(0,a.dp)(c)},17136:(e,t,s)=>{s.d(t,{O7:()=>S,el:()=>v});var i=s(92602),r=s(49186),n=s(53966),a=s(39829),o=s(82799),l=s(80754),u=s(21325),c=s(28735),h=s(78888),d=s(65864),p=s(2272),m=s(84952),f=s(92300);const y=()=>n.A.getLogger("esri.geometry.support.normalizeUtils");function g(e){return"polygon"===e[0].type}function _(e){return"polyline"===e[0].type}function x(e,t,s){if(t){const t=function(e,t){if(!(e instanceof o.A||e instanceof a.A)){const e="straightLineDensify: the input geometry is neither polyline nor polygon";throw y().error(e),new r.A("internal:geometry",e)}const s=(0,l.r8)(e),i=[];for(const e of s){const s=[];i.push(s),s.push([e[0][0],e[0][1]]);for(let i=0;i<e.length-1;i++){const r=e[i][0],n=e[i][1],a=e[i+1][0],o=e[i+1][1],l=Math.sqrt((a-r)*(a-r)+(o-n)*(o-n)),u=(o-n)/l,c=(a-r)/l,h=l/t;if(h>1){for(let e=1;e<=h-1;e++){const i=e*t,a=c*i+r,o=u*i+n;s.push([a,o])}const e=(l+Math.floor(h-1)*t)/2,i=c*e+r,a=u*e+n;s.push([i,a])}s.push([a,o])}}return function(e){return"polygon"===e.type}(e)?new a.A({rings:i,spatialReference:e.spatialReference}):new o.A({paths:i,spatialReference:e.spatialReference})}(e,1e6);e=(0,c.ci)(t,!0)}return s&&(e=(0,l.kS)(e,s)),e}function T(e,t,s){if(Array.isArray(e)){const i=e[0];if(i>t){const s=(0,l.kd)(i,t);e[0]=i+s*(-2*t)}else if(i<s){const t=(0,l.kd)(i,s);e[0]=i+t*(-2*s)}}else{const i=e.x;if(i>t){const s=(0,l.kd)(i,t);e=e.clone().offset(s*(-2*t),0)}else if(i<s){const t=(0,l.kd)(i,s);e=e.clone().offset(t*(-2*s),0)}}return e}function I(e,t){let s=-1;for(let i=0;i<t.cutIndexes.length;i++){const r=t.cutIndexes[i],n=t.geometries[i],a=(0,l.r8)(n);for(let e=0;e<a.length;e++){const t=a[e];t.some((s=>{if(s[0]<180)return!0;{let s=0;for(let e=0;e<t.length;e++){const i=t[e][0];s=i>s?i:s}s=Number(s.toFixed(9));const i=-360*(0,l.kd)(s,180);for(let s=0;s<t.length;s++){const t=n.getPoint(e,s);n.setPoint(e,s,t.clone().offset(i,0))}return!0}}))}if(r===s){if(g(e))for(const t of(0,l.r8)(n))e[r]=e[r].addRing(t);else if(_(e))for(const t of(0,l.r8)(n))e[r]=e[r].addPath(t)}else s=r,e[r]=n}return e}async function v(e,t,s){if(!Array.isArray(e))return v([e],t);t&&"string"!=typeof t&&y().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead");const r="string"==typeof t?t:t?.url??i.A.geometryServiceUrl;let n,g,_,S,R,F,E,w,A=0;const b=[],M=[];for(const t of e)if(null!=t)if(n||(n=t.spatialReference,g=(0,u.Vp)(n),_=n.isWebMercator,F=_?102100:4326,S=l.j7[F].maxX,R=l.j7[F].minX,E=l.j7[F].plus180Line,w=l.j7[F].minus180Line),g)if("mesh"===t.type)M.push(t);else if("point"===t.type)M.push(T(t.clone(),S,R));else if("multipoint"===t.type){const e=t.clone();e.points=e.points.map((e=>T(e,S,R))),M.push(e)}else if("extent"===t.type){const e=t.clone()._normalize(!1,!1,g);M.push(e.rings?new a.A(e):e)}else if(t.extent){const e=t.extent,s=(0,l.kd)(e.xmin,R)*(2*S);let i=0===s?t.clone():(0,l.kS)(t.clone(),s);e.offset(s,0);let{xmin:r,xmax:n}=e;r=Number(r.toFixed(9)),n=Number(n.toFixed(9)),e.intersects(E)&&n!==S?(A=n>A?n:A,i=x(i,_),b.push(i),M.push("cut")):e.intersects(w)&&r!==R?(A=n*(2*S)>A?n*(2*S):A,i=x(i,_,360),b.push(i),M.push("cut")):M.push(i)}else M.push(t.clone());else M.push(t);else M.push(t);let N=(0,l.kd)(A,S),C=-90;const O=N,P=new o.A;for(;N>0;){const e=360*N-180;P.addPath([[e,C],[e,-1*C]]),C*=-1,N--}if(b.length>0&&O>0){const t=I(b,await async function(e,t,s,i){const r=(0,p.Dl)(e),n=t[0].spatialReference,a={...i,responseType:"json",query:{...r.query,f:"json",sr:(0,u.YX)(n),target:JSON.stringify({geometryType:(0,d.$B)(t[0]),geometries:t}),cutter:JSON.stringify(s)}},o=await(0,h.A)(r.path+"/cut",a),{cutIndexes:l,geometries:c=[]}=o.data;return{cutIndexes:l,geometries:c.map((e=>{const t=(0,d.rS)(e);return t.spatialReference=n,t}))}}(r,b,P,s)),i=[],n=[];for(let s=0;s<M.length;s++){const r=M[s];if("cut"!==r)n.push(r);else{const r=t.shift(),a=e[s];null!=a&&"polygon"===a.type&&a.rings&&a.rings.length>1&&r.rings.length>=a.rings.length?(i.push(r),n.push("simplify")):n.push(_?(0,c.Gh)(r):r)}}if(!i.length)return n;const a=await async function(e,t,s){const i="string"==typeof e?(0,m.An)(e):e,r=t[0].spatialReference,n=(0,d.$B)(t[0]),a={...s,query:{...i.query,f:"json",sr:(0,u.YX)(r),geometries:JSON.stringify((0,f.X)(t))}},{data:o}=await(0,h.A)(i.path+"/simplify",a);return(0,f.V)(o.geometries,n,r)}(r,i,s),o=[];for(let e=0;e<n.length;e++){const t=n[e];"simplify"!==t?o.push(t):o.push(_?(0,c.Gh)(a.shift()):a.shift())}return o}const D=[];for(let e=0;e<M.length;e++){const t=M[e];if("cut"!==t)D.push(t);else{const e=b.shift();D.push(!0===_?(0,c.Gh)(e):e)}}return D}function S(e,t,s){const i=(0,u.Vp)(s);if(null==i)return e;const[r,n]=i.valid,a=2*n;let o=0,l=0;t>n?o=Math.ceil(Math.abs(t-n)/a):t<r&&(o=-Math.ceil(Math.abs(t-r)/a)),e>n?l=Math.ceil(Math.abs(e-n)/a):e<r&&(l=-Math.ceil(Math.abs(e-r)/a));let c=e+(o-l)*a;const h=c-t;return h>n?c-=a:h<r&&(c+=a),c}},29441:(e,t,s)=>{s.d(t,{MG:()=>_,SN:()=>p,SY:()=>g,VW:()=>c,Wq:()=>y,eD:()=>m,j4:()=>f,vl:()=>u});var i=s(49186),r=s(44123),n=s(98453);const a=new r.WhereClauseCache(50,500),o="unsupported-query",l=" as ",u=new Set(["esriFieldTypeOID","esriFieldTypeSmallInteger","esriFieldTypeBigInteger","esriFieldTypeInteger","esriFieldTypeSingle","esriFieldTypeDouble","esriFieldTypeLong"]),c=new Set(["esriFieldTypeDate","esriFieldTypeDateOnly","esriFieldTypeTimeOnly","esriFieldTypeTimestampOffset"]),h=new Set(["esriFieldTypeString","esriFieldTypeGUID","esriFieldTypeGlobalID",...u,...c]);function d(e,t,s={}){const r=f(t,e);if(!r){const s=a.getError(t,e);throw new i.A(o,"invalid SQL expression",{expression:t,error:s})}const n=s.expressionName||"expression";if(s.validateStandardized&&!r.isStandardized)throw new i.A(o,`${n} is not standard`,{expression:t});if(s.validateAggregate&&!r.isAggregate)throw new i.A(o,`${n} does not contain a valid aggregate function`,{expression:t});return r.fieldNames}function p(e,t,s,i){if(!s)return!0;const r="where clause";return _(e,t,d(e,s,{validateStandardized:!0,expressionName:r}),{expressionName:r,query:i}),!0}function m(e,t,s,r,n){if(!s)return!0;const a="having clause",l=d(e,s,{validateAggregate:!0,expressionName:a});_(e,t,l,{expressionName:a,query:n});const u=f(s,e),c=u?.getExpressions().every((t=>{const{aggregateType:s,field:i}=t,n=e.get(i)?.name;return r.some((t=>{const{onStatisticField:i,statisticType:r}=t,a=e.get(i)?.name;return a===n&&r.toLowerCase().trim()===s}))}));if(!c)throw new i.A(o,"expressions in having clause should also exist in outStatistics",{having:s});return!0}function f(e,t){return e?a.get(e,t):null}function y(e){return/\((.*?)\)/.test(e)?e:e.split(l)[0]}function g(e){return e.split(l)[1]}function _(e,t,s,r={}){const n=new Map;if(function(e,t,s,i,r){const n=r.includes("*")?[...s,...r.filter((e=>"*"!==e))]:r;for(const r of n)if(t.get(r))x(e,t,s,i,r);else try{const n=d(t,y(r),{validateStandardized:!0});for(const r of n)x(e,t,s,i,r)}catch(t){e.set(r,{type:"expression-error",expression:r,error:t})}}(n,e,t,r.allowedFieldTypes??h,s),n.size){const e=r.expressionName??"expression";throw new i.A(o,`${e} contains invalid or missing fields`,{errors:Array.from(n.values()),query:r.query})}}function x(e,t,s,i,r){const a=t.get(r);a?s.has(a.name)?"all"!==i&&!1===i?.has(a.type)&&e.set(r,{type:"invalid-type",fieldName:a.name,fieldType:n.m.fromJSON(a.type),allowedFieldTypes:Array.from(i,(e=>n.m.fromJSON(e)))}):e.set(r,{type:"missing-field",fieldName:a.name}):e.set(r,{type:"invalid-field",fieldName:r})}},31464:(e,t,s)=>{s.d(t,{Cv:()=>y,Nk:()=>p,lK:()=>_});var i=s(4576),r=s(74887),n=s(80586),a=s(7320),o=s(21325),l=s(28735);const u=[0,0];function c(e,t){if(!t)return null;if("x"in t){const s={x:0,y:0};return[s.x,s.y]=e(t.x,t.y,u),null!=t.z&&(s.z=t.z),null!=t.m&&(s.m=t.m),s}if("xmin"in t){const s={xmin:0,ymin:0,xmax:0,ymax:0};return[s.xmin,s.ymin]=e(t.xmin,t.ymin,u),[s.xmax,s.ymax]=e(t.xmax,t.ymax,u),t.hasZ&&(s.zmin=t.zmin,s.zmax=t.zmax,s.hasZ=!0),t.hasM&&(s.mmin=t.mmin,s.mmax=t.mmax,s.hasM=!0),s}return"rings"in t?{rings:h(t.rings,e),hasM:t.hasM,hasZ:t.hasZ}:"paths"in t?{paths:h(t.paths,e),hasM:t.hasM,hasZ:t.hasZ}:"points"in t?{points:d(t.points,e),hasM:t.hasM,hasZ:t.hasZ}:null}function h(e,t){const s=[];for(const i of e)s.push(d(i,t));return s}function d(e,t){const s=[];for(const i of e){const e=t(i[0],i[1],[0,0]);s.push(e),i.length>2&&e.push(i[2]),i.length>3&&e.push(i[3])}return s}async function p(e,t){if(!e||!t)return;const s=Array.isArray(e)?e.map((e=>null!=e.geometry?e.geometry.spatialReference:null)).filter(i.Ru):[e];await(0,n.initializeProjection)(s.map((e=>({source:e,dest:t}))))}const m=c.bind(null,l.je),f=c.bind(null,l.tD);function y(e,t,s,i){if(!e)return null;if(s||(s=t,t=e.spatialReference),!(0,o.fn)(t)||!(0,o.fn)(s)||(0,o.aI)(t,s))return e;if((0,l.y7)(t,s)){const t=(0,o.K8)(s)?m(e):f(e);return t.spatialReference=s,t}return(0,n.projectMany)(a.g,[e],t,s,null,i)[0]}const g=new class{constructor(){this._jobs=[],this._timer=null,this._process=this._process.bind(this)}async push(e,t,s,i){if(!e?.length||!t||!s||(0,o.aI)(t,s))return e;const n={geometries:e,inSpatialReference:t,outSpatialReference:s,geographicTransformation:i,resolve:(0,r.Tw)()};return this._jobs.push(n),this._timer??=setTimeout(this._process,10),n.resolve.promise}_process(){this._timer=null;const e=this._jobs.shift();if(!e)return;const{geometries:t,inSpatialReference:s,outSpatialReference:i,resolve:r,geographicTransformation:u}=e;(0,l.y7)(s,i)?(0,o.K8)(i)?r(t.map(m)):r(t.map(f)):r((0,n.projectMany)(a.g,t,s,i,u,null)),this._jobs.length>0&&(this._timer=setTimeout(this._process,10))}};function _(e,t,s,i){return g.push(e,t,s,i)}},41266:(e,t,s)=>{s.d(t,{A:()=>g});var i=s(90237),r=s(69540),n=s(66552),a=s(25482),o=s(10107),l=(s(44208),s(53966),s(87811),s(93223)),u=s(40608),c=s(56507);const h=new n.J({esriFieldTypeInteger:"integer",esriFieldTypeString:"string"});let d=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.alias=null,this.responseType=null,this.type=null,this.value=null,this.valueType=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"outAlias",write:!0}})],d.prototype,"alias",void 0),(0,i._)([(0,o.MZ)({type:String})],d.prototype,"responseType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"type",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],d.prototype,"value",void 0),(0,i._)([(0,l.e)(h)],d.prototype,"valueType",void 0),d=(0,i._)([(0,u.$)("esri.rest.support.AttributeBinsGrouping")],d);const p=d;d.from=(0,c.dp)(d);const m=new n.J({esriFieldTypeSmallInteger:"small-integer",esriFieldTypeInteger:"integer",esriFieldTypeSingle:"single",esriFieldTypeDouble:"double",esriFieldTypeLong:"long",esriFieldTypeDate:"date",esriFieldTypeDateOnly:"date-only",esriFieldTypeTimeOnly:"time-only",esriFieldTypeTimestampOffset:"timestamp-offset"}),f=new n.J({naturalLog:"natural-log",squareRoot:"square-root"});let y=class extends(r.A.ClonableMixin(a.A)){constructor(e){super(e),this.expression=null,this.expressionValueType=null,this.field=null,this.firstDayOfWeek=null,this.hideUpperBound=null,this.splitBy=null,this.stackBy=null,this.transformation=null}};(0,i._)([(0,o.MZ)({type:String,json:{name:"onExpression.value",write:!0}})],y.prototype,"expression",void 0),(0,i._)([(0,l.e)(m,{name:"onExpression.valueType"})],y.prototype,"expressionValueType",void 0),(0,i._)([(0,o.MZ)({type:String,json:{name:"onField",write:!0}})],y.prototype,"field",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"firstDayOfWeek",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],y.prototype,"hideUpperBound",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{overridePolicy(){return{enabled:null!=this.splitBy?.value||null!=this.splitBy?.type}}}}})],y.prototype,"splitBy",void 0),(0,i._)([(0,o.MZ)({type:p,json:{write:{target:{stackBy:{type:p},jsonStyle:{type:String}},writer:(e,t)=>{e&&(t.stackBy=e.toJSON(),null!=e.responseType&&(t.jsonStyle=e.responseType))},overridePolicy(){return{enabled:null!=this.stackBy?.value||null!=this.stackBy?.type}}},read:{source:["stackBy","jsonStyle"],reader:(e,t)=>p.fromJSON({...t.stackBy,responseType:t.jsonStyle})}}})],y.prototype,"stackBy",void 0),(0,i._)([(0,l.e)(f)],y.prototype,"transformation",void 0),y=(0,i._)([(0,u.$)("esri.rest.support.BinParametersBase")],y);const g=y},41366:(e,t,s)=>{s.d(t,{K:()=>d,Q:()=>u});var i=s(90237),r=s(66552),n=s(53966),a=s(10107),o=(s(44208),s(87811),s(93223)),l=s(40608);const u=(0,r.O)()({naturalLog:"natural-log",squareRoot:"square-root",percentOfTotal:"percent-of-total",log:"log",field:"field"}),c="percent-of-total",h="field",d=e=>{let t=class extends e{constructor(){super(...arguments),this.normalizationField=null,this.normalizationMaxValue=null,this.normalizationMinValue=null,this.normalizationTotal=null}get normalizationType(){let e=this._get("normalizationType");const t=!!this.normalizationField,s=null!=this.normalizationTotal;return t||s?(e=t&&h||s&&c||null,t&&s&&n.A.getLogger(this).warn("warning: both normalizationField and normalizationTotal are set!")):e!==h&&e!==c||(e=null),e}set normalizationType(e){this._set("normalizationType",e)}};return(0,i._)([(0,a.MZ)({type:String,json:{name:"parameters.normalizationField",write:!0}})],t.prototype,"normalizationField",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMaxValue",write:!0}})],t.prototype,"normalizationMaxValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationMinValue",write:!0}})],t.prototype,"normalizationMinValue",void 0),(0,i._)([(0,a.MZ)({type:Number,json:{name:"parameters.normalizationTotal",write:!0}})],t.prototype,"normalizationTotal",void 0),(0,i._)([(0,o.e)(u,{name:"parameters.normalizationType"})],t.prototype,"normalizationType",null),t=(0,i._)([(0,l.$)("esri.rest.support.NormalizationBinParametersMixin")],t),t}},44123:(e,t,s)=>{s.r(t),s.d(t,{WhereClauseCache:()=>n});var i=s(66344),r=s(88368);class n{constructor(e,t){this._cache=new i.q(e),this._invalidCache=new i.q(t)}get(e,t){const s=`${t?.uid}:${e}`,i=this._cache.get(s);if(i)return i;if(null!=this._invalidCache.get(s))return null;try{const i=r.A.create(e,{fieldsIndex:t});return this._cache.put(s,i),i}catch(e){return this._invalidCache.put(s,e),null}}getError(e,t){const s=`${t?.uid}:${e}`;return this._invalidCache.get(s)??null}}},44794:(e,t,s)=>{s.d(t,{v:()=>o});var i=s(4718),r=s(62788),n=s(95488);class a{constructor(e,t){this._observable=new n.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=i.gh){return new a(e,t)}},51441:(e,t,s)=>{s.d(t,{LQ:()=>u,ag:()=>h,pL:()=>c});var i=s(90708),r=s(92722);const n=new r.A,a=new r.A,o=new r.A,l={esriGeometryPoint:i.DF,esriGeometryPolyline:i.BW,esriGeometryPolygon:i.z5,esriGeometryMultipoint:i.qK};function u(e,t,s,r=e.hasZ,n=e.hasM){if(null==t)return null;const a=e.hasZ&&r,l=e.hasM&&n;if(s){const u=(0,i.Nl)(o,t,e.hasZ,e.hasM,"esriGeometryPoint",s,r,n);return(0,i.DF)(u,a,l)}return(0,i.DF)(t,a,l)}function c(e,t,s,r,u,c,h=t,d=s){const p=t&&h,m=s&&d,f=null!=r?"coords"in r?r:r.geometry:null;if(null==f)return null;if(u){let r=(0,i.kz)(a,f,t,s,e,u,h,d);return c&&(r=(0,i.Nl)(o,r,p,m,e,c)),l[e]?.(r,p,m)??null}if(c){const r=(0,i.Nl)(o,f,t,s,e,c,h,d);return l[e]?.(r,p,m)??null}return(0,i.Q4)(n,f,t,s,h,d),l[e]?.(n,p,m)??null}function h(e){return e&&d in e?JSON.parse(JSON.stringify(e,p)):e}const d="_geVersion",p=(e,t)=>e===d?void 0:t},58727:(e,t,s)=>{s.d(t,{GC:()=>y,T2:()=>g,VY:()=>d,dO:()=>x,iJ:()=>f,v8:()=>p});var i=s(49186),r=s(66552),n=s(83047),a=s(80586),o=s(90634),l=s(65864),u=s(17136),c=s(21325),h=s(31464);const d=new r.J({esriSRUnit_Meter:"meters",esriSRUnit_Kilometer:"kilometers",esriSRUnit_Foot:"feet",esriSRUnit_StatuteMile:"miles",esriSRUnit_NauticalMile:"nautical-miles",esriSRUnit_USNauticalMile:"us-nautical-miles"}),p=Object.freeze({}),m="frequency";async function f(e,t,s){const i=e.bin;return i.onField&&(i.onField=i.onField.trim()),i.onExpression?.value&&(i.onExpression.value=i.onExpression.value.trim()),i.splitBy&&(i.splitBy.value&&(i.splitBy.value=i.splitBy.value.trim()),i.splitBy.outAlias&&(i.splitBy.outAlias=i.splitBy.outAlias.trim())),i.stackBy&&(i.stackBy.value&&(i.stackBy.value=i.stackBy.value.trim()),i.stackBy.outAlias&&(i.stackBy.outAlias=i.stackBy.outAlias.trim())),"normalizationField"in i.parameters&&i.parameters.normalizationField&&(i.parameters.normalizationField=i.parameters.normalizationField.trim()),e.outStatistics?.length||(e.outStatistics=[{statisticType:"count",onStatisticField:"1",outStatisticFieldName:m}]),y(e,t,s)}async function y(e,t,s){const{outFields:i,orderByFields:r,groupByFieldsForStatistics:n,outStatistics:a}=e;if(i)for(let e=0;e<i.length;e++)i[e]=i[e].trim();if(r)for(let e=0;e<r.length;e++)r[e]=r[e].trim();if(n)for(let e=0;e<n.length;e++)n[e]=n[e].trim();if(a)for(let e=0;e<a.length;e++)a[e].onStatisticField&&(a[e].onStatisticField=a[e].onStatisticField.trim());return e.geometry&&!e.outSR&&(e.outSR=e.geometry.spatialReference),g(e,t,s)}async function g(e,t,r){if(!e)return null;let{where:a}=e;if(e.where=a=a?.trim(),(!a||/^1 *= *1$/.test(a)||t&&t===a)&&(e.where=null),!e.geometry)return e;let m=await async function(e){const{distance:t,units:r}=e,a=e.geometry;if(null==t||"vertexAttributes"in a)return a;const o=a.spatialReference,u=r?d.fromJSON(r):(0,n.Ij)(o),p=o&&((0,c.EA)(o)||(0,c.K8)(o))?a:await(0,h.Nk)(o,c.KK).then((()=>(0,h.Cv)(a,c.KK))),m=await s.e(9159).then(s.bind(s,49159));await m.load();const f=m.execute(p,t||1,{unit:u})??void 0;if(!f||!(0,l.Bi)(f)||0===f.rings.length)throw new i.A("unsupported-query:invalid-parameters","Invalid parameters for query by distance");return f}(e);if(e.distance=0,e.units=null,"esriSpatialRelEnvelopeIntersects"===e.spatialRel){const{spatialReference:t}=e.geometry;m=(0,o.HA)(m),m.spatialReference=t}if(m){await(0,h.Nk)(m.spatialReference,r),m=function(e,t){const s=e.spatialReference;return _(e,t)&&(0,l.ZC)(e)?{spatialReference:s,rings:[[[e.xmin,e.ymin],[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin]]]}:e}(m,r);const t=(await(0,u.el)((0,l.rS)(m)))[0];if(null==t)throw p;const s="quantizationParameters"in e&&e.quantizationParameters?.tolerance||"maxAllowableOffset"in e&&e.maxAllowableOffset||0,i=s&&_(m,r)?{densificationStep:8*s}:void 0,n=t.toJSON(),a=(0,h.Cv)(n,n.spatialReference,r,i);if(!a)throw p;a.spatialReference=r,e.geometry=a}return e}function _(e,t){if(!e)return!1;const s=e.spatialReference;return((0,l.ZC)(e)||(0,l.Bi)(e)||(0,l.Rg)(e))&&!(0,c.aI)(s,t)&&!(0,a.canProjectWithoutEngine)(s,t)}function x(e,t){return null==e?null:"string"==typeof e?t?new Date(`1970-01-01T${e}Z`).getTime():new Date(e).getTime():e instanceof Date?e.getTime():e}},59977:(e,t,s)=>{s.d(t,{A:()=>x});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(69540),h=s(66552),d=s(25482);const p=(0,h.O)()({year:"years",quarter:"quarters",month:"months",week:"weeks",day:"days",hour:"hours",minute:"minutes",second:"seconds"});let m=class extends(c.A.ClonableMixin(d.A)){constructor(e){super(e),this.value=null,this.unit=null}};(0,i._)([(0,n.MZ)({type:Number,json:{name:"number",write:!0}})],m.prototype,"value",void 0),(0,i._)([(0,o.e)(p)],m.prototype,"unit",void 0),m=(0,i._)([(0,l.$)("esri.rest.support.DateBinTimeInterval")],m);const f=m;function y(e,t,s){(0,r.sM)(s,"string"==typeof e?e:e?.getTime(),t)}function g(e,t){const s=e.parameters[t];return s?"string"==typeof s?s:new Date(s):null}m.from=(0,a.dp)(m);let _=class extends u.A{constructor(e){super(e),this.end=null,this.interval=null,this.offset=null,this.returnFullIntervalBin=null,this.start=null,this.snapToData=null,this.type="date"}};(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.end",read:{reader:(e,t)=>g(t,"end")},write:{writer:y}}})],_.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters",write:!0}})],_.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({type:f,json:{name:"parameters.offset",write:!0}})],_.prototype,"offset",void 0),(0,i._)([(0,n.MZ)({type:Boolean,json:{name:"parameters.returnFullIntervalBin",write:!0}})],_.prototype,"returnFullIntervalBin",void 0),(0,i._)([(0,n.MZ)({cast:e=>null!=e?"string"==typeof e?e:new Date(e):null,json:{name:"parameters.start",read:{reader:(e,t)=>g(t,"start")},write:{writer:y}}})],_.prototype,"start",void 0),(0,i._)([(0,n.MZ)({type:String,json:{name:"parameters.snapToData",write:!0}})],_.prototype,"snapToData",void 0),(0,i._)([(0,o.e)({dateBin:"date"},{readOnly:!0})],_.prototype,"type",void 0),_=(0,i._)([(0,l.$)("esri.rest.support.DateBinParameters")],_);const x=_;_.from=(0,a.dp)(_)},60909:(e,t,s)=>{s.d(t,{A:()=>p});var i=s(90237),r=s(93637),n=s(10107),a=s(56507),o=(s(44208),s(87811),s(93223)),l=s(40608),u=s(41266),c=s(41366);function h(e,t,s){(0,r.sM)(s,e instanceof Date?e.getTime():e,t)}let d=class extends((0,c.K)(u.A)){constructor(e){super(e),this.end=null,this.interval=null,this.start=null,this.type="fixed-interval"}};(0,i._)([(0,n.MZ)({json:{name:"parameters.end",write:{writer:h}}})],d.prototype,"end",void 0),(0,i._)([(0,n.MZ)({type:Number,json:{name:"parameters.interval",write:!0}})],d.prototype,"interval",void 0),(0,i._)([(0,n.MZ)({json:{name:"parameters.start",write:{writer:h}}})],d.prototype,"start",void 0),(0,i._)([(0,o.e)({fixedIntervalBin:"fixed-interval"},{readOnly:!0})],d.prototype,"type",void 0),d=(0,i._)([(0,l.$)("esri.rest.support.FixedIntervalBinParameters")],d);const p=d;d.from=(0,a.dp)(d)},62660:(e,t,s)=>{s.d(t,{tC:()=>I,c0:()=>T,xt:()=>x});var i=s(49186),r=s(94078),n=s(12176),a=s(65864),o=s(21325);function l(e,t){return e?t?4:3:t?3:2}function u(e,t,s,i,r,n){const a=l(r,n),{coords:o,lengths:u}=i;if(!u)return!1;for(let i=0,r=0;i<u.length;i++,r+=a)if(!c(e,t,s,o[r],o[r+1]))return!1;return!0}function c(e,t,s,i,r){if(!e)return!1;const n=l(t,s),{coords:a,lengths:o}=e;let u=!1,c=0;for(const e of o)u=h(u,a,n,c,e,i,r),c+=e*n;return u}function h(e,t,s,i,r,n,a){let o=e,l=i;for(let e=i,u=i+r*s;e<u;e+=s){l=e+s,l===u&&(l=i);const r=t[e],c=t[e+1],h=t[l],d=t[l+1];(c<a&&d>=a||d<a&&c>=a)&&r+(a-c)/(d-c)*(h-r)<n&&(o=!o)}return o}var d=s(90708),p=s(92722),m=s(51441),f=s(31464);const y="unsupported-query",g={spatialRelationship:{esriSpatialRelIntersects:!0,esriSpatialRelContains:!0,esriSpatialRelWithin:!0,esriSpatialRelCrosses:!0,esriSpatialRelDisjoint:!0,esriSpatialRelTouches:!0,esriSpatialRelOverlaps:!0,esriSpatialRelEnvelopeIntersects:!0,esriSpatialRelIndexIntersects:!1,esriSpatialRelRelation:!1},queryGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!1,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!0},layerGeometry:{esriGeometryPoint:!0,esriGeometryMultiPatch:!0,esriGeometryMultipoint:!0,esriGeometryPolyline:!0,esriGeometryPolygon:!0,esriGeometryEnvelope:!1}},_={esriSpatialRelIntersects:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(7360)]).then(s.bind(s,55284)),esriSpatialRelContains:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1867)]).then(s.bind(s,29127)),esriSpatialRelCrosses:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9700)]).then(s.bind(s,85672)),esriSpatialRelDisjoint:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1598)]).then(s.bind(s,7978)),esriSpatialRelEnvelopeIntersects:null,esriSpatialRelIndexIntersects:null,esriSpatialRelOverlaps:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(1414)]).then(s.bind(s,46178)),esriSpatialRelTouches:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(2503)]).then(s.bind(s,83547)),esriSpatialRelWithin:()=>Promise.all([s.e(3661),s.e(1878),s.e(2189),s.e(3299),s.e(9265)]).then(s.bind(s,85445)),esriSpatialRelRelation:null};async function x(e,t,s,i,o){if((0,a.Bi)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e)){const e=(0,d.Ye)(new p.A,t,!1,!1);return t=>function(e,t,s,i){return c(e,!1,!1,i.coords[0],i.coords[1])}(e,0,0,t)}if("esriGeometryMultipoint"===s){const s=(0,d.Ye)(new p.A,t,!1,!1);if("esriSpatialRelContains"===e)return e=>u(s,!1,!1,e,i,o)}}if((0,a.ZC)(t)){if("esriGeometryPoint"===s&&("esriSpatialRelIntersects"===e||"esriSpatialRelContains"===e))return e=>(0,r.qz)(t,(0,m.pL)(s,i,o,e));if("esriGeometryMultipoint"===s&&"esriSpatialRelContains"===e)return e=>(0,r.rL)(t,(0,m.pL)(s,i,o,e));if("esriSpatialRelIntersects"===e){const e="mesh"===(l=s)?n.xB:(0,n.xK)(l);return r=>e(t,(0,m.pL)(s,i,o,r))}}var l;"esriSpatialRelEnvelopeIntersects"===e&&(e="esriSpatialRelIntersects");const h=await function(e){const t=_[e];if(null==t)throw new Error(`Cannot load unsupported spatial operator: ${e}`);return t()}(e);return e=>h.execute(t,(0,m.pL)(s,i,o,e))}async function T(e,t,s){const{spatialRel:r,geometry:n}=e;if(n){if(!function(e){return null!=e&&!0===g.spatialRelationship[e]}(r))throw new i.A(y,"Unsupported query spatial relationship",{query:e});if((0,o.fn)(n.spatialReference)&&(0,o.fn)(s)){if(!function(e){return null!=e&&!0===g.queryGeometry[(0,a.$B)(e)]}(n))throw new i.A(y,"Unsupported query geometry type",{query:e});if(!function(e){return null!=e&&!0===g.layerGeometry[e]}(t))throw new i.A(y,"Unsupported layer geometry type",{query:e});if(e.outSR)return(0,f.Nk)(e.geometry?.spatialReference,e.outSR)}}}function I(e){if((0,a.ZC)(e))return!0;if((0,a.Bi)(e)){for(const t of e.rings){if(5!==t.length)return!1;if(t[0][0]!==t[1][0]||t[0][0]!==t[4][0]||t[2][0]!==t[3][0]||t[0][1]!==t[3][1]||t[0][1]!==t[4][1]||t[1][1]!==t[2][1])return!1}return!0}return!1}},62798:(e,t,s)=>{s.d(t,{B4:()=>c,FQ:()=>u,mO:()=>p});var i=s(49186),r=s(29441),n=s(31464),a=s(62660),o=s(43668);const l="unsupported-query";async function u(e,t){const s=e.bin;if(!s.onField&&!s.onExpression?.value||"autoIntervalBin"===s.type&&null==s.parameters.numberOfBins||"dateBin"===s.type&&(null==s.parameters.number||null==s.parameters.unit)||"fixedBoundariesBin"===s.type&&null==s.parameters.boundaries||"fixedIntervalBin"===s.type&&null==s.parameters.interval)throw new i.A(l,"Unsupported query options",{query:e});return c(e,t)}async function c(e,{fieldsIndex:t,geometryType:s,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption&&"xyFootprint"!==e.multipatchOption||e.pixelSize||e.relationParam||e.text)throw new i.A(l,"Unsupported query options",{query:e});return h(t,u,e),function(e,t,s){const{outStatistics:n,groupByFieldsForStatistics:a,having:o}=s,u=a?.length,c=n?.length;if(o){if(!u||!c)throw new i.A(l,"outStatistics and groupByFieldsForStatistics should be specified with having",{query:s});(0,r.eD)(e,t,o,n,s)}if(c){if(null==(h=n)||!h.every((e=>"exceedslimit"!==e.statisticType)))return;const o=n.map((e=>e.onStatisticField)).filter(Boolean);(0,r.MG)(e,t,o,{expressionName:"onStatisticFields",query:s}),u&&(0,r.MG)(e,t,a,{expressionName:"groupByFieldsForStatistics",query:s});for(const a of n){const{onStatisticField:n,statisticType:o}=a;if("percentile_disc"!==o&&"percentile_cont"!==o||!("statisticParameters"in a))e.get(n)&&"count"!==o&&"min"!==o&&"max"!==o&&(0,r.MG)(e,t,[n],{expressionName:`outStatistics with '${o}' statistic type`,allowedFieldTypes:d,query:s});else{const{statisticParameters:e}=a;if(!e)throw new i.A(l,"statisticParameters should be set for percentile type",{definition:a,query:s})}}}var h}(t,u,e),Promise.all([(0,a.c0)(e,s,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}function h(e,t,s){const{outFields:n,orderByFields:a,returnDistinctValues:o,outStatistics:u}=s,c=u?u.map((e=>e.outStatisticFieldName&&e.outStatisticFieldName.toLowerCase())).filter(Boolean):[];if(a&&a.length>0){const i=" asc",n=" desc",o=a.map((e=>{const t=e.toLowerCase();return t.includes(i)?t.split(i)[0]:t.includes(n)?t.split(n)[0]:e})).filter((e=>!c.includes(e)));(0,r.MG)(e,t,o,{expressionName:"orderByFields",query:s})}if(n&&n.length>0)(0,r.MG)(e,t,n,{expressionName:"outFields",query:s,allowedFieldTypes:"all"});else if(o)throw new i.A(l,"outFields should be specified for returnDistinctValues",{query:s});(0,r.SN)(e,t,s.where,s)}const d=new Set([...r.vl,...r.VW]);async function p(e,t,{fieldsIndex:s,geometryType:r,spatialReference:o,availableFields:u}){if(null!=e.geometryPrecision||e.multipatchOption||e.pixelSize||e.relationParam||e.text||e.outStatistics||e.groupByFieldsForStatistics||e.having||e.orderByFields)throw new i.A(l,"Unsupported query options",{query:e});return h(s,u,e),Promise.all([m(s,u,t,e),(0,a.c0)(e,r,o),(0,n.Nk)(o,e.outSR)]).then((()=>e))}async function m(e,t,s,n){let a=[];if(s.valueExpression){const{arcadeUtils:e}=await(0,o.l)();a=e.extractFieldNames(s.valueExpression)}if(s.field&&a.push(s.field),s.field2&&a.push(s.field2),s.field3&&a.push(s.field3),s.normalizationField&&a.push(s.normalizationField),!a.length&&!s.valueExpression)throw new i.A(l,"field or valueExpression is required",{params:s});(0,r.MG)(e,t,a,{expressionName:"statistics",query:n})}},68298:(e,t,s)=>{s.d(t,{do:()=>ue,ux:()=>ce});var i=s(4576),r=s(21818),n=s(49186),a=(s(44208),s(25482)),o=s(4718),l=s(97768),u=s(74887),c=s(83047),h=s(80586),d=s(70328),p=s(19419),m=s(537),f=s(65864),y=s(21325),g=s(90708),_=s(29441),x=s(51441),T=s(31464);class I{constructor(){this._storage=new Map,this._purgeInterval=5,this._sweep=()=>{if(this._timer=void 0,!this._storage)return;const e=1e3*this._purgeInterval,t=performance.now()-e;for(const[s,i]of this._storage){if(!(i.time<t))return void(this._storage.size>0&&(this._timer=setTimeout(this._sweep,e)));this._storage.delete(s)}}}destroy(){this._storage?.clear(),this._storage=null,clearTimeout(this._timer)}put(e,t){this._storage?.set(e,new R(t)),this._scheduleSweep()}get(e){const t=this._storage?.get(e);if(t)return this._storage?.delete(e),t.time=performance.now(),this._storage?.set(e,t),t.items}clear(){this._storage?.clear()}_scheduleSweep(){this._storage&&(this._timer??=setTimeout(this._sweep,1e3*this._purgeInterval))}get test(){}}let S=0;class R{constructor(e){this.items=e,this.time=performance.now(),this.id=S++}}var F=s(99352),E=s(8384),w=s(58727),A=s(62798),b=s(62660),M=s(86420),N=s(95466),O=s(71511),P=s(53966),D=s(61604),B=s(3694),G=s(36708),k=s(44794),z=s(78659);const L=Symbol("Yield");class V{constructor(){this._tasks=new Array,this._runningTasks=(0,k.v)(0)}get length(){return this._tasks.length}get running(){return this._runningTasks.value>0}destroy(){this.cancelAll()}runTask(e){if(0===this.length)return L;for(;!e.done&&this._process(e);)e.madeProgress()}push(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.push(new q(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}unshift(e,t,s){return++this._runningTasks.value,new Promise(((i,r)=>this._tasks.unshift(new q(i,r,e,t,s)))).finally((()=>--this._runningTasks.value))}_process(e){if(0===this._tasks.length)return!1;const t=this._tasks.shift();try{const s=(0,u.G4)(t.signal);if(s&&!t.abortCallback)t.reject((0,u.NK)());else{const i=s?t.abortCallback?.((0,u.NK)()):t.callback(e);(0,u.$X)(i)?i.then(t.resolve,t.reject):t.resolve(i)}}catch(e){t.reject(e)}return!0}cancelAll(){const e=(0,u.NK)();for(const t of this._tasks)if(t.abortCallback){const s=t.abortCallback(e);t.resolve(s)}else t.reject(e);this._tasks.length=0}}class q{constructor(e,t,s,i=void 0,r=void 0){this.resolve=e,this.reject=t,this.callback=s,this.signal=i,this.abortCallback=r}}var Q=s(90237),U=s(69622),j=s(10107),Z=(s(87811),s(40608));let H=class extends U.A{constructor(){super(...arguments),this.SCHEDULER_LOG_SLOW_TASKS=!1,this.FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES=!1}};(0,Q._)([(0,j.MZ)()],H.prototype,"SCHEDULER_LOG_SLOW_TASKS",void 0),(0,Q._)([(0,j.MZ)()],H.prototype,"FEATURE_SERVICE_SNAPPING_SOURCE_TILE_TREE_SHOW_TILES",void 0),H=(0,Q._)([(0,Z.$)("esri.views.support.debugFlags")],H);const W=new H;var Y,$,J;(J=Y||(Y={}))[J.ANIMATING=0]="ANIMATING",J[J.INTERACTING=1]="INTERACTING",J[J.IDLE=2]="IDLE",function(e){e.RESOURCE_CONTROLLER_IMMEDIATE="immediate",e.RESOURCE_CONTROLLER="schedule",e.SLIDE="slide",e.STREAM_DATA_LOADER="stream loader",e.ELEVATION_QUERY="elevation query",e.TERRAIN_SURFACE="terrain",e.SURFACE_GEOMETRY_UPDATES="surface geometry updates",e.LOD_RENDERER="LoD renderer",e.GRAPHICS_CORE="Graphics3D",e.I3S_CONTROLLER="I3S",e.POINT_CLOUD_LAYER="point cloud",e.FEATURE_TILE_FETCHER="feature fetcher",e.OVERLAY="overlay",e.STAGE="stage",e.GRAPHICS_DECONFLICTOR="graphics deconflictor",e.FILTER_VISIBILITY="Graphics3D filter visibility",e.SCALE_VISIBILITY="Graphics3D scale visibility",e.FRUSTUM_VISIBILITY="Graphics3D frustum visibility",e.POINT_OF_INTEREST_FREQUENT="POI frequent",e.POINT_OF_INTEREST_INFREQUENT="POI infrequent",e.LABELER="labeler",e.FEATURE_QUERY_ENGINE="feature query",e.FEATURE_TILE_TREE="feature tile tree",e.FEATURE_TILE_TREE_ACTIVE="fast feature tile tree",e.ELEVATION_ALIGNMENT="elevation alignment",e.ELEVATION_ALIGNMENT_SCENE="elevation alignment scene",e.TEXT_TEXTURE_ATLAS="text texture atlas",e.TEXTURE_UNLOAD="texture unload",e.LINE_OF_SIGHT_TOOL="line of sight tool",e.LINE_OF_SIGHT_TOOL_INTERACTIVE="interactive line of sight tool",e.ELEVATION_PROFILE="elevation profile",e.SNAPPING="snapping",e.SHADOW_ACCUMULATOR="shadow accumulator",e.CLOUDS_GENERATOR="clouds generator",e.MAPVIEW_FETCH_QUEUE="mapview fetch queue",e.MAPVIEW_LAYERVIEW_UPDATE="mapview layerview update",e.MAPVIEW_VECTOR_TILE_PARSING_QUEUE="mapview vector tile parsing queue",e[e.NONE=0]="NONE",e[e.TEST_PRIO=1]="TEST_PRIO"}($||($={}));const K=new Map([[$.RESOURCE_CONTROLLER_IMMEDIATE,0],[$.RESOURCE_CONTROLLER,4],[$.SLIDE,0],[$.STREAM_DATA_LOADER,0],[$.ELEVATION_QUERY,0],[$.TERRAIN_SURFACE,1],[$.SURFACE_GEOMETRY_UPDATES,1],[$.LOD_RENDERER,2],[$.GRAPHICS_CORE,2],[$.I3S_CONTROLLER,2],[$.POINT_CLOUD_LAYER,2],[$.FEATURE_TILE_FETCHER,2],[$.CLOUDS_GENERATOR,2],[$.OVERLAY,4],[$.STAGE,4],[$.GRAPHICS_DECONFLICTOR,4],[$.FILTER_VISIBILITY,4],[$.SCALE_VISIBILITY,4],[$.FRUSTUM_VISIBILITY,4],[$.POINT_OF_INTEREST_FREQUENT,6],[$.POINT_OF_INTEREST_INFREQUENT,30],[$.LABELER,8],[$.FEATURE_QUERY_ENGINE,8],[$.FEATURE_TILE_TREE,16],[$.FEATURE_TILE_TREE_ACTIVE,0],[$.ELEVATION_ALIGNMENT,12],[$.ELEVATION_ALIGNMENT_SCENE,14],[$.TEXT_TEXTURE_ATLAS,12],[$.TEXTURE_UNLOAD,12],[$.LINE_OF_SIGHT_TOOL,16],[$.LINE_OF_SIGHT_TOOL_INTERACTIVE,0],[$.SNAPPING,0],[$.SHADOW_ACCUMULATOR,30],[$.MAPVIEW_FETCH_QUEUE,0],[$.MAPVIEW_LAYERVIEW_UPDATE,2],[$.MAPVIEW_VECTOR_TILE_PARSING_QUEUE,0]]);function X(e){return K.has(e)?K.get(e):"number"==typeof e?e:1}const ee=(0,z.l5)(6.5),te=(0,z.l5)(1),se=(0,z.l5)(30),ie=(0,z.l5)(1e3/30),re=(0,z.l5)(100);var ne,ae;!function(e){e.Scheduler=class{get updating(){return this._updating.value}_updatingChanged(){this._updating.value=this._tasks.some((e=>e.needsUpdate))}constructor(){this._updating=(0,k.v)(!0),this._microTaskQueued=!1,this._frameNumber=0,this.performanceInfo={total:new D.A("total"),tasks:new Map},this._frameTaskTimes=new Map,this._budget=new s,this._state=Y.INTERACTING,this._tasks=new B.A,this._runQueue=new B.A,this._load=0,this._idleStateCallbacks=new B.A,this._idleUpdatesStartFired=!1,this._forceTask=!1,this._debug=!1,this._debugHandle=(0,G.wB)((()=>W.SCHEDULER_LOG_SLOW_TASKS),(e=>this._debug=e),G.Vh);for(const e of Object.keys($))this.performanceInfo.tasks.set($[e],new D.A($[e]))}destroy(){this._tasks.toArray().forEach((e=>e.remove())),this._tasks.clear(),(0,l.xt)(this._debugHandle),this._microTaskQueued=!1,this._updatingChanged()}taskRunningChanged(e){this._updatingChanged(),e&&this._budget.remaining>0&&!this._microTaskQueued&&(this._microTaskQueued=!0,queueMicrotask((()=>{this._microTaskQueued&&(this._microTaskQueued=!1,this._budget.remaining>0&&this._schedule()&&this._runFrame())})))}registerTask(e,s){const i=new t(this,e,s);return this._tasks.push(i),this._updatingChanged(),this.performanceInfo.tasks.has(e)||this.performanceInfo.tasks.set(e,new D.A(e)),i}registerIdleStateCallbacks(e,t){const s={idleBegin:e,idleEnd:t};this._idleStateCallbacks.push(s),this.state===Y.IDLE&&this._idleUpdatesStartFired&&s.idleBegin();const i=this;return{remove:()=>this._removeIdleStateCallbacks(s),set idleBegin(e){i._idleUpdatesStartFired&&(s.idleEnd(),i._state===Y.IDLE&&e()),s.idleBegin=e},set idleEnd(e){s.idleEnd=e}}}get load(){return this._load}set state(e){this._state!==e&&(this._state=e,this.state!==Y.IDLE&&this._idleUpdatesStartFired&&(this._idleUpdatesStartFired=!1,this._idleStateCallbacks.forAll((e=>e.idleEnd()))))}get state(){return this._state}frame(e){this._startFrameTaskTimes();const t=this._updateBudget(e);if(t){const e=this._budget.now();this._runFrame(),this._recordFrameTaskTimes(this._budget.now()-e)}else this._recordFrameTaskTimes(0);return t}_updateBudget(e){this._test&&(this._test.usedBudget=0),++this._frameNumber;let t=ee,s=e.frameDuration,i=te;switch(this.state){case Y.IDLE:t=(0,z.l5)(0),s=(0,z.l5)(Math.max(re,e.frameDuration)),i=se;break;case Y.INTERACTING:s=(0,z.l5)(Math.max(ie,e.frameDuration));case Y.ANIMATING:}return s=(0,z.l5)(s-e.elapsedFrameTime-t),this.state!==Y.IDLE&&s<te&&!this._forceTask?(this._forceTask=!0,!1):(s=(0,z.l5)(Math.max(s,i)),this._budget.reset(s,this.state),this._updateLoad(),this._schedule())}_runFrame(){switch(this._forceTask=!1,this._microTaskQueued=!1,this.state){case Y.IDLE:this._idleUpdatesStartFired||(this._idleUpdatesStartFired=!0,this._idleStateCallbacks.forAll((e=>e.idleBegin()))),this._runIdle();break;case Y.INTERACTING:this._runInteracting();break;default:this._runAnimating()}this._test&&(this._test.usedBudget=this._budget.elapsed)}stopFrame(){this._budget.reset((0,z.l5)(0),this._state),this._budget.madeProgress()}_removeIdleStateCallbacks(e){this._idleUpdatesStartFired&&e.idleEnd(),this._idleStateCallbacks.removeUnordered(e)}removeTask(e){this._tasks.removeUnordered(e),this._runQueue.removeUnordered(e),this._updatingChanged()}_updateTask(e){this._tasks.forAll((t=>{t.name===e&&t.setPriority(e)}))}_getState(e){if(this._runQueue.some((t=>t.name===e)))return ae.SCHEDULED;let t=ae.IDLE;return this._tasks.forAll((s=>{s.name===e&&s.needsUpdate&&(s.schedulePriority<=1?t=ae.READY:t!==ae.READY&&(t=ae.WAITING))})),t}_getRuntime(e){let t=0;return this._tasks.forAll((s=>{s.name===e&&(t+=s.runtime)})),t}_resetRuntimes(){this._tasks.forAll((e=>e.runtime=0))}_getRunning(){const e=new Map;if(this._tasks.forAll((t=>{t.needsUpdate&&e.set(t.name,(e.get(t.name)||0)+1)})),0===e.size)return null;let t="";return e.forEach(((e,s)=>{t+=e>1?` ${e}x ${s}`:` ${s}`})),t}_runIdle(){this._run()}_runInteracting(){this._run()}_runAnimating(){this._run()}_updateLoad(){const e=this._tasks.reduce(((e,t)=>t.needsUpdate?++e:e),0);this._load=.9*this._load+e*(1-.9)}_schedule(){for(this._runQueue.filterInPlace((e=>!!e.needsUpdate||(e.schedulePriority=e.basePriority,!1))),this._tasks.forAll((e=>{0===e.basePriority&&e.needsUpdate&&!this._runQueue.includes(e)&&e.blockFrame!==this._frameNumber&&this._runQueue.unshift(e)}));0===this._runQueue.length;){let e=!1,t=0;if(this._tasks.forAll((s=>{s.needsUpdate&&0!==s.schedulePriority&&0!==s.basePriority&&s.blockFrame!==this._frameNumber&&(e=!0,t=Math.max(t,s.basePriority),1===s.schedulePriority?(s.schedulePriority=0,this._runQueue.push(s)):--s.schedulePriority)})),!e)return this._updatingChanged(),!1}return this._updatingChanged(),!0}_run(){do{for(;this._runQueue.length>0;){const e=this._budget.now(),t=this._runQueue.pop();this._budget.resetProgress();try{t.task.runTask(this._budget)===L&&(t.blockFrame=this._frameNumber)}catch(e){P.A.getLogger("esri.views.support.Scheduler").error(`Exception in task "${t.name}"`,e),t.blockFrame=this._frameNumber}!this._budget.hasProgressed&&t.blockFrame!==this._frameNumber&&t.needsUpdate&&(t.name,$.I3S_CONTROLLER,t.blockFrame=this._frameNumber),t.schedulePriority=t.basePriority;const s=this._budget.now()-e;if(t.runtime+=s,this._frameTaskTimes.set(t.priority,this._frameTaskTimes.get(t.priority)+s),this._budget.remaining<=0)return void this._updatingChanged()}}while(this._schedule());this._updatingChanged()}_startFrameTaskTimes(){for(const e of Object.keys($))this._frameTaskTimes.set($[e],0)}_recordFrameTaskTimes(e){this._frameTaskTimes.forEach(((e,t)=>this.performanceInfo.tasks.get(t).push(e))),this.performanceInfo.total.push(e)}get test(){return this._test}};class t{get task(){return this._task.value}get updating(){return this._queue.running}constructor(e,t,s){this._scheduler=e,this.name=t,this.blockFrame=0,this.runtime=0,this._queue=new V,this._handles=new O.A,this._basePriority=X(t),this.schedulePriority=this._basePriority,this._task=(0,k.v)(null!=s?s:this._queue),this._handles.add((0,G.z7)((()=>this.task.running),(t=>e.taskRunningChanged(t))))}remove(){this.processQueue(oe),this._scheduler.removeTask(this),this.schedule=le.schedule,this.reschedule=le.reschedule,this._handles.destroy()}get basePriority(){return this._basePriority}setPriority(e){if(this.name===e)return;this.name=e;const t=X(e);0!==this._basePriority&&0===this.schedulePriority||(this.schedulePriority=t),this._basePriority=t}get priority(){return this.name}set priority(e){this.setPriority(e)}get needsUpdate(){return this.updating||this.task.running}schedule(e,t,s){return this._queue.push(e,t,s)}reschedule(e,t,s){return this._queue.unshift(e,t,s)}processQueue(e){return this._queue.runTask(e)}}class s{constructor(){this._begin="undefined"!=typeof performance?performance.now():0,this._budget=0,this._state=Y.IDLE,this._done=!1,this._progressed=!1,this._enabled=!0}run(e){return!this.done&&(!0===e()&&this.madeProgress(),!0)}get done(){return this._done}get budget(){return this._budget}madeProgress(){return this._progressed=!0,this._done=this.elapsed>=this._budget&&this._enabled,this._done}get state(){return this._state}get enabled(){return this._enabled}set enabled(e){this._enabled=e}reset(e,t){this._begin=this.now(),this._budget=e,this._state=t,this.resetProgress()}get remaining(){return Math.max(this._budget-this.elapsed,0)}now(){return performance.now()}get elapsed(){return this.now()-this._begin}resetProgress(){this._progressed=!1,this._done=!1}get hasProgressed(){return this._progressed}}e.Budget=s}(ne||(ne={})),function(e){e.SCHEDULED="s",e.READY="r",e.WAITING="w",e.IDLE="i"}(ae||(ae={}));const oe=new ne.Budget;oe.enabled=!1;const le=new class{remove(){}processQueue(){}schedule(e,t,s){try{if((0,u.G4)(t)){const e=(0,u.NK)();return s?Promise.resolve(s(e)):Promise.reject(e)}return(0,u.z7)(e(oe))}catch(e){return Promise.reject(e)}}reschedule(e,t,s){return this.schedule(e,t,s)}};class ue{constructor(e){this._changeHandle=null,this.capabilities={query:F.F},this.geometryType=e.geometryType,this.hasM=!!e.hasM,this.hasZ=!!e.hasZ,this.objectIdField=e.objectIdField,this.spatialReference=e.spatialReference,this.definitionExpression=e.definitionExpression,this.featureStore=e.featureStore,this.aggregateAdapter=e.aggregateAdapter,this._cache=e.cache??new I,this.timeInfo=e.timeInfo,this._changeHandle=this.featureStore.events.on("changed",(()=>this._clearCache())),this.fieldsIndex=a.A.isSerializable(e.fieldsIndex)?e.fieldsIndex:N.A.fromJSON(e.fieldsIndex),!e.availableFields||1===e.availableFields.length&&"*"===e.availableFields[0]?this.availableFields=new Set(this.fieldsIndex.fields.map((e=>e.name))):this.availableFields=new Set(e.availableFields.map((e=>this.fieldsIndex.get(e)?.name)).filter((e=>null!=e))),e.scheduler&&e.priority&&(this._frameTask=e.scheduler.registerTask(e.priority))}destroy(){this._changeHandle=(0,l.xt)(this._changeHandle),this._frameTask=(0,l.xt)(this._frameTask),this._clearCache(),(0,l.pR)(this._cache)}get featureAdapter(){return this.featureStore.featureAdapter}_clearCache(){this._cache.clear(),this._allFeaturesPromise=null,this._timeExtentPromise=null,this._fullExtentPromise=null}async executeQuery(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{},s);return await t.createQueryResponse()}catch(t){if(t!==C)throw t;return new v([],e,this).createQueryResponse()}}async executeQueryForCount(e={},t){const s=(0,u.Mq)(t);try{return(await this._executeQuery(e,{returnGeometry:!1,returnCentroid:!1,outSR:null},s)).createQueryResponseForCount()}catch(e){if(e!==C)throw e;return 0}}async executeQueryForExtent(e,t){const s=(0,u.Mq)(t),i=e.outSR;try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),r=t.size;return r?{count:r,extent:await this._getBounds(t.items,t.spatialReference,i||this.spatialReference)}:{count:0,extent:null}}catch(e){if(e===C)return{count:0,extent:null};throw e}}async executeQueryForIds(e,t){return this.executeQueryForIdSet(e,t).then((e=>Array.from(e)))}async executeQueryForIdSet(e,t){const s=(0,u.Mq)(t);try{const t=await this._executeQuery(e,{returnGeometry:!0,returnCentroid:!1,outSR:null},s),i=t.items,r=new Set;return await this.reschedule((()=>{for(const e of i)r.add(t.featureAdapter.getObjectId(e))}),s),r}catch(e){if(e===C)return new Set;throw e}}async executeQueryForLatestObservations(e,t){const s=(0,u.Mq)(t);if(!this.timeInfo?.trackIdField)throw new n.A("unsupported-query","Missing timeInfo or timeInfo.trackIdField",{query:e,timeInfo:this.timeInfo});try{const t=await this._executeQuery(e,{},s);return await this.reschedule((()=>this._filterLatest(t)),s),await t.createQueryResponse()}catch(t){if(t!==C)throw t;return new v([],e,this).createQueryResponse()}}async executeAttributeBinsQuery(e,t){const s=(0,u.Mq)(t);let i;e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,w.iJ)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,A.FQ)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const t=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s);i=await this.reschedule((()=>this._executeGeometryQuery(e,t,s)),s),await this.reschedule((()=>this._executeAggregateIdsQuery(i)),s),await this.reschedule((()=>this.executeObjectIdsQuery(i)),s),await this.reschedule((()=>this.executeTimeQuery(i)),s),await this.reschedule((()=>this.executeAttributesQuery(i)),s)}catch(t){if(t!==w.v8)throw t;i=new E.G([],e,this)}return i.createQueryBinsResponse(e)}async executeQueryForSummaryStatistics(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createSummaryStatisticsResponse(t)}async executeQueryForUniqueValues(e={},t,s){const i=(0,u.Mq)(s),{field:r,field2:n,field3:a,valueExpression:o}=t;return(await this._executeQueryForStatistics(e,{field:r,field2:n,field3:a,valueExpression:o},i)).createUniqueValuesResponse(t)}async executeQueryForClassBreaks(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createClassBreaksResponse(t)}async executeQueryForHistogram(e={},t,s){const i=(0,u.Mq)(s),{field:r,normalizationField:n,valueExpression:a}=t;return(await this._executeQueryForStatistics(e,{field:r,normalizationField:n,valueExpression:a},i)).createHistogramResponse(t)}async fetchRecomputedExtents(e){const t=(0,u.Mq)(e);this._timeExtentPromise||=(0,M.W)(this.timeInfo,this.featureStore);const[s,i]=await Promise.all([this._getFullExtent(),this._timeExtentPromise]);return(0,u.Te)(t),{fullExtent:s,timeExtent:i}}async _getBounds(e,t,s){const i=(0,d.hZ)((0,d.vt)(),d.qv);await this.featureStore.forEachBounds(e,(e=>(0,d.RF)(i,e)));const r={xmin:i[0],ymin:i[1],xmax:i[3],ymax:i[4],spatialReference:(0,x.ag)(this.spatialReference)};this.hasZ&&isFinite(i[2])&&isFinite(i[5])&&(r.zmin=i[2],r.zmax=i[5],r.hasZ=!0);const n=(0,T.Cv)(r,t,s);if(n.spatialReference=(0,x.ag)(s),n.xmax-n.xmin==0){const e=(0,c.GA)(n.spatialReference);n.xmin-=e,n.xmax+=e}if(n.ymax-n.ymin==0){const e=(0,c.GA)(n.spatialReference);n.ymin-=e,n.ymax+=e}if(this.hasZ&&null!=n.zmin&&null!=n.zmax&&n.zmax-n.zmin==0){const e=(0,c.GA)(n.spatialReference);n.zmin-=e,n.zmax+=e}return n}_getFullExtent(){return this._fullExtentPromise||="getFullExtent"in this.featureStore&&this.featureStore.getFullExtent?Promise.resolve(this.featureStore.getFullExtent(this.spatialReference)):this._getAllFeatures().then((e=>this._getBounds(e,this.spatialReference,this.spatialReference))),this._fullExtentPromise}async schedule(e,t){return this._frameTask?.schedule(e,t)??e(oe)}async reschedule(e,t){return this._frameTask?.reschedule(e,t)??e(oe)}async _getAllFeaturesQueryEngineResult(e){return new E.G(await this._getAllFeatures(),e,this)}async _getAllFeatures(){if(null==this._allFeaturesPromise){const e=[];this._allFeaturesPromise=(async()=>await this.featureStore.forEach((t=>e.push(t))))().then((()=>(0,r.zI)(e)))}const e=this._allFeaturesPromise,t=await e;return e===this._allFeaturesPromise?t.slice():this._getAllFeatures()}async _executeQuery(e,t,s){e=(0,o.o8)(e),e=await this.schedule((()=>(0,w.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,A.B4)(e,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s),e={...e,...t};const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}async _executeSceneFilterQuery(e,t){if(null==e.sceneFilter)return null;const{outSR:s,returnGeometry:i,returnCentroid:r}=e,n=this.featureStore.featureSpatialReference,a=e.sceneFilter.geometry,o=null==n||(0,y.aI)(n,a.spatialReference)?a:(0,T.Cv)(a,n);if(!o)return null;const l=i||r,u=(0,y.fn)(s)&&!(0,y.aI)(this.spatialReference,s)&&l?async e=>this._project(e,s):e=>e,c=this.featureAdapter,h=await this.reschedule((()=>this.searchFeatures(ce(o))),t);if("disjoint"===e.sceneFilter.spatialRelationship){if(!h.length)return null;const s=new Set;for(const e of h)s.add(c.getObjectId(e));const i=await this.reschedule((()=>this._getAllFeatures()),t),r=await this.reschedule((async()=>{const r=await(0,b.xt)("esriSpatialRelDisjoint",o,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(i,(e=>!s.has(c.getObjectId(e))||r(c.getGeometry(e))),t);return new E.G(n,e,this)}),t);return u(r)}if(!h.length)return new E.G([],e,this);if(this._canExecuteSinglePass(o,e))return u(new E.G(h,e,this));const d=await(0,b.xt)("esriSpatialRelContains",o,this.geometryType,this.hasZ,this.hasM),p=await this.runSpatialFilter(h,(e=>d(c.getGeometry(e))),t);return u(new E.G(p,e,this))}async _executeGeometryQuery(e,t,s){if(null!=t&&0===t.items.length)return t;const{geometry:r,outSR:n,returnGeometry:a,returnCentroid:o}=e,l=t?null:this._getCacheKey(e),u=l?this._cache.get(l):null;if(u)return new E.G(u,e,this);const c=(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n),h=a||o,d=async e=>(c&&h&&await this._project(e,n),l&&this._cache.put(l,e.items),e),p=this.featureStore.featureSpatialReference,m=!r||null==p||(0,y.aI)(p,r.spatialReference)?r:(0,T.Cv)(r,p);if(!m)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const f=this.featureAdapter;let g=await this.reschedule((()=>this.searchFeatures(ce(r))),s);const _=e.spatialRel??"esriSpatialRelIntersects";if("esriSpatialRelDisjoint"===_){if(!g.length)return d(null!=t?t:await this._getAllFeaturesQueryEngineResult(e));const i=new Set;for(const e of g)i.add(f.getObjectId(e));const r=null!=t?t.items:await this.reschedule((()=>this._getAllFeatures()),s),n=await this.reschedule((async()=>{const t=await(0,b.xt)(_,m,this.geometryType,this.hasZ,this.hasM),n=await this.runSpatialFilter(r,(e=>!i.has(f.getObjectId(e))||t(f.getGeometry(e))),s);return new E.G(n,e,this)}),s);return d(n)}if(null!=t){const e=new i.vW;g=g.filter((s=>(0,i.qh)(t.items,s,t.items.length,e)>=0))}if(!g.length){const t=new E.G([],e,this);return l&&this._cache.put(l,t.items),t}if(this._canExecuteSinglePass(m,e))return d(new E.G(g,e,this));const x=await(0,b.xt)(_,m,this.geometryType,this.hasZ,this.hasM),I=await this.runSpatialFilter(g,(e=>x(f.getGeometry(e))),s);return d(new E.G(I,e,this))}_executeAggregateIdsQuery(e){if(0===e.items.length||!e.query.aggregateIds?.length||null==this.aggregateAdapter)return;const t=new Set;for(const s of e.query.aggregateIds)this.aggregateAdapter.getFeatureObjectIds(s).forEach((e=>t.add(e)));const s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeObjectIdsQuery(e){if(0===e.items.length||!e.query.objectIds?.length)return;const t=new Set(e.query.objectIds),s=this.featureAdapter.getObjectId;e.items=e.items.filter((e=>t.has(s(e))))}executeTimeQuery(e){if(0===e.items.length)return;const t=(0,M.I)(this.timeInfo,e.query.timeExtent,this.featureAdapter);null!=t&&(e.items=e.items.filter(t))}executeAttributesQuery(e){if(0===e.items.length)return;const t=(0,_.j4)(e.query.where,this.fieldsIndex);if(t){if(!t.isStandardized)throw new TypeError("Where clause is not standardized");e.items=e.items.filter((e=>t.testFeature(e,this.featureAdapter)))}}async runSpatialFilter(e,t,s){if(!t)return e;if(null==this._frameTask)return e.filter((e=>t(e)));let i=0;const r=new Array,n=async a=>{for(;i<e.length;){const o=e[i++];t(o)&&(r.push(o),a.madeProgress()),a.done&&await this.reschedule((e=>n(e)),s)}};return this.reschedule((e=>n(e)),s).then((()=>r))}_filterLatest(e){const{trackIdField:t,startTimeField:s,endTimeField:i}=this.timeInfo,r=i||s,n=new Map,a=this.featureAdapter.getAttribute;for(const s of e.items){const e=a(s,t),i=a(s,r),o=n.get(e);(!o||i>a(o,r))&&n.set(e,s)}e.items=Array.from(n.values())}_getCacheKey(e){const{geometry:t,spatialRel:s,returnGeometry:i,returnCentroid:r,outSR:n,resultType:a,cacheHint:o}=e;if("tile"!==a&&!o)return null;const l=i||r;return(0,y.fn)(n)&&!(0,y.aI)(this.spatialReference,n)&&l?JSON.stringify([t,s,n]):JSON.stringify([t,s])}_canExecuteSinglePass(e,t){const{spatialRel:s}=t;return(0,b.tC)(e)&&("esriSpatialRelEnvelopeIntersects"===s||"esriGeometryPoint"===this.geometryType&&("esriSpatialRelIntersects"===s||"esriSpatialRelContains"===s))}async _project(e,t){if(!t||(0,y.aI)(this.spatialReference,t))return e;const s=this.featureAdapter;let i;try{const e=await this._getFullExtent();i=(0,h.getTransformation)(this.spatialReference,t,e)}catch{}const n=await(0,T.lK)(e.items.map((e=>(0,x.pL)(this.geometryType,this.hasZ,this.hasM,s.getGeometry(e)))),this.spatialReference,t,i);return e.items=(0,r.zI)(n.map(((t,i)=>s.cloneWithGeometry(e.items[i],(0,g.Ux)(t,this.hasZ,this.hasM))))),e}async searchFeatures(e){const t=new Set;await Promise.all(e.map((e=>this.featureStore.forEachInBounds(e,(e=>t.add(e))))));const s=Array.from(t.values());return t.clear(),s}async _executeQueryForStatistics(e,t,s){e=(0,o.o8)(e);try{e=await this.schedule((()=>(0,w.GC)(e,this.definitionExpression,this.spatialReference)),s),e=await this.reschedule((()=>(0,A.mO)(e,t,{availableFields:this.availableFields,fieldsIndex:this.fieldsIndex,geometryType:this.geometryType,spatialReference:this.spatialReference})),s);const i=await this.reschedule((()=>this._executeSceneFilterQuery(e,s)),s),r=await this.reschedule((()=>this._executeGeometryQuery(e,i,s)),s);return await this.reschedule((()=>this._executeAggregateIdsQuery(r)),s),await this.reschedule((()=>this.executeObjectIdsQuery(r)),s),await this.reschedule((()=>this.executeTimeQuery(r)),s),await this.reschedule((()=>this.executeAttributesQuery(r)),s),r}catch(t){if(t!==C)throw t;return new v([],e,this)}}get test(){}}function ce(e){if((0,b.tC)(e)){if((0,f.ZC)(e))return[(0,p.fA)(Math.min(e.xmin,e.xmax),Math.min(e.ymin,e.ymax),Math.max(e.xmin,e.xmax),Math.max(e.ymin,e.ymax))];if((0,f.Bi)(e))return e.rings.map((e=>(0,p.fA)(Math.min(e[0][0],e[2][0]),Math.min(e[0][1],e[2][1]),Math.max(e[0][0],e[2][0]),Math.max(e[0][1],e[2][1]))))}return[(0,m.Rg)((0,p.vt)(),e)]}},80754:(e,t,s)=>{s.d(t,{j7:()=>a,kS:()=>l,kd:()=>o,r8:()=>u});var i=s(82799),r=s(16930),n=s(65864);const a={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new i.A({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator}),minus180Line:new i.A({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:r.A.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new i.A({paths:[[[180,-180],[180,180]]],spatialReference:r.A.WGS84}),minus180Line:new i.A({paths:[[[-180,-180],[-180,180]]],spatialReference:r.A.WGS84})}};function o(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const s=u(e);for(const e of s)for(const s of e)s[0]+=t;return e}function u(e){return(0,n.Bi)(e)?e.rings:e.paths}},86420:(e,t,s)=>{s.d(t,{I:()=>n,W:()=>r});var i=s(21818);async function r(e,t){if(!e)return null;const s=t.featureAdapter,{startTimeField:r,endTimeField:n}=e;let a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;if(r&&n)await t.forEach((e=>{const t=s.getAttribute((0,i.zI)(e),r),l=s.getAttribute((0,i.zI)(e),n);null==t||isNaN(t)||(a=Math.min(a,t)),null==l||isNaN(l)||(o=Math.max(o,l))}));else{const e=r||n;await t.forEach((t=>{const r=s.getAttribute((0,i.zI)(t),e);null==r||isNaN(r)||(a=Math.min(a,r),o=Math.max(o,r))}))}return{start:a,end:o}}function n(e,t,s){if(!t||!e)return null;const{startTimeField:i,endTimeField:r}=e;if(!i&&!r)return null;const{start:n,end:a}=t;if(null===n&&null===a)return null;if(void 0===n&&void 0===a)return()=>!1;const o=s.getAttributeAsTimestamp?.bind(s)??s.getAttribute.bind(s);return i&&r?function(e,t,s,i,r){return null!=i&&null!=r?n=>{const a=e(n,t),o=e(n,s);return(null==a||a<=r)&&(null==o||o>=i)}:null!=i?t=>{const r=e(t,s);return null==r||r>=i}:null!=r?s=>{const i=e(s,t);return null==i||i<=r}:void 0}(o,i,r,n,a):function(e,t,s,i){return null!=s&&null!=i&&s===i?i=>e(i,t)===s:null!=s&&null!=i?r=>{const n=e(r,t);return null!=n&&n>=s&&n<=i}:null!=s?i=>{const r=e(i,t);return null!=r&&r>=s}:null!=i?s=>{const r=e(s,t);return null!=r&&r<=i}:void 0}(o,i||r,n,a)}},92300:(e,t,s)=>{s.d(t,{V:()=>n,X:()=>r});var i=s(65864);function r(e){return{geometryType:(0,i.$B)(e[0]),geometries:e.map((e=>e.toJSON()))}}function n(e,t,s){const r=(0,i.xD)(t);return e.map((e=>{const t=r.fromJSON(e);return t.spatialReference=s,t}))}},99352:(e,t,s)=>{s.d(t,{F:()=>i,P:()=>r});const i={supportsStatistics:!0,supportsPercentileStatistics:!0,supportsSpatialAggregationStatistics:!1,supportedSpatialAggregationStatistics:{envelope:!1,centroid:!1,convexHull:!1},supportsCentroid:!0,supportsCacheHint:!0,supportsCurrentUser:!1,supportsDistance:!0,supportsDistinct:!0,supportsExtent:!0,supportsGeometryProperties:!1,supportsHavingClause:!0,supportsOrderBy:!0,supportsPagination:!0,supportsQuantization:!0,supportsQuantizationEditMode:!1,supportsQueryGeometry:!0,supportsResultType:!0,supportsReturnMesh:!1,supportsSqlExpression:!0,supportsMaxRecordCountFactor:!1,supportsStandardizedQueriesOnly:!0,supportsTopFeaturesQuery:!1,supportsQueryByAnonymous:!0,supportsQueryByOthers:!0,supportsHistoricMoment:!1,supportsFormatPBF:!1,supportsDisjointSpatialRelationship:!0,supportsDefaultSpatialReference:!1,supportsFullTextSearch:!1,supportsCompactGeometry:!1,maxRecordCountFactor:void 0,maxRecordCount:void 0,standardMaxRecordCount:void 0,tileMaxRecordCount:void 0,supportsTrueCurve:!1},r={supportsDate:!0,supportsFixedInterval:!0,supportsAutoInterval:!0,supportsFixedBoundaries:!0,supportsStackBy:!0,supportsSplitBy:!0,supportsSnapToData:!1,supportsReturnFullIntervalBin:!1,supportsFirstDayOfWeek:!1,supportsNormalization:!0,supportedStatistics:{count:!0,sum:!0,avg:!0,var:!0,stddev:!0,min:!0,max:!0,percentileContinuous:!0,percentileDiscrete:!0,envelope:!0,centroid:!0,convexHull:!0},supportedNormalizationTypes:{field:!0,log:!0,naturalLog:!0,percentOfTotal:!0,squareRoot:!0}}}}]);