@arcgis/core 4.33.0-next.20250519 → 4.33.0-next.20250521

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 (541) hide show
  1. package/Graphic.js +1 -1
  2. package/applications/Components/QuantityFormatter.js +1 -1
  3. package/arcade/Feature.js +1 -1
  4. package/assets/esri/core/workers/RemoteClient.js +1 -1
  5. package/assets/esri/core/workers/chunks/{91cd29f53f07bc38fe75.js → 14b3c18581b31c93af82.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{9c8224ca29475556e5ea.js → 26d3c9c6215c4076f943.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{66a1b92358344dd28ee1.js → 571252c9822d73cf7b01.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{151d6354e7bc105b25c0.js → 585c7b485c42555ec554.js} +6 -6
  9. package/assets/esri/core/workers/chunks/62b2d3720693c93a60f2.js +1 -0
  10. package/assets/esri/core/workers/chunks/{2adf558cd8d8155d07d7.js → 80b596496800e8d60eb8.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{9d5eac3bd1526e2b33e3.js → 8fda0a5b247385e68dc0.js} +1 -1
  12. package/assets/esri/core/workers/chunks/9b610fbfcd47c3dde34d.js +1 -0
  13. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +1 -0
  14. package/assets/esri/core/workers/chunks/a22e5b2874647fe0d31a.js +1 -0
  15. package/assets/esri/core/workers/chunks/{0a4cece5e96fb7e8a57b.js → b893012bff5dc55e542d.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{6fa1a5b7276a037dbd6a.js → cc4a6f4000cb6680be48.js} +4 -4
  17. package/assets/esri/themes/base/_core.scss +2 -0
  18. package/assets/esri/themes/base/widgets/_FeatureFormUtilityNetworkAssociationLayers.scss +1 -1
  19. package/assets/esri/themes/base/widgets/_Legend.scss +0 -4
  20. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  21. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationSettingsUI.scss +16 -0
  22. package/assets/esri/themes/dark/main.css +1 -1
  23. package/assets/esri/themes/light/main.css +1 -1
  24. package/assets/esri/themes/light/view.css +1 -1
  25. package/assets/esri/views/magnifier/overlay.ts.svg +1 -1
  26. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  27. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  28. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  29. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  30. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  31. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  32. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  33. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  34. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  35. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  36. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  37. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  38. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  39. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  40. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  41. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  42. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  43. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  44. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  45. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  46. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  47. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  48. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +1 -1
  49. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  50. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  51. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  52. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  53. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  54. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  55. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  56. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  57. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  58. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  59. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  60. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  61. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  62. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  63. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  64. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  65. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  66. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  67. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
  68. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
  69. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
  70. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
  71. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
  72. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
  73. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
  74. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
  75. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
  76. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
  77. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
  78. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
  79. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
  80. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
  81. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
  82. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
  83. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
  84. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
  85. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
  86. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
  87. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
  88. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
  89. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_no.json +1 -1
  90. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
  91. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
  92. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
  93. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
  94. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
  95. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
  96. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
  97. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
  98. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
  99. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
  100. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
  101. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
  102. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
  103. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
  104. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
  105. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
  106. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  107. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  108. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  109. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  110. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  111. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  112. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  113. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  114. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  115. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  116. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  117. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  118. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  119. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  120. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  121. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  123. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  124. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  125. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  145. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  146. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  147. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  148. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  149. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  150. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  151. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  152. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  153. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  154. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  155. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  156. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  157. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  158. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  159. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  160. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  161. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  162. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  163. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  164. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  165. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  166. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  167. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  168. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  169. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  170. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  171. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  172. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  173. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  174. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  175. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  176. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  177. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  178. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  179. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  180. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  181. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  182. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  183. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  184. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  185. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  186. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  187. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  188. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  189. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  190. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  191. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  192. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  193. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  194. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  195. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  196. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  197. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  198. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  199. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  200. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  201. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  202. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  203. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  204. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  205. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  206. package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +1 -1
  207. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  208. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  209. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  210. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  211. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  212. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  213. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  214. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  215. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  216. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  217. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  218. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  219. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  220. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  221. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  222. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  223. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  224. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  225. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  226. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  227. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  228. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  229. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  230. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  231. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  232. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  233. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  234. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  235. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  236. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  237. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  238. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  239. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  240. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  241. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  242. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  243. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  244. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  245. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  246. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  247. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  248. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  249. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  250. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  251. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  252. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  253. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  254. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  255. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  256. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  257. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  258. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  259. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  260. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  261. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  262. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  263. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  264. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  265. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  266. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  267. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  268. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  269. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  270. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  271. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  272. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  273. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  274. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  275. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  276. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  277. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  278. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  279. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  280. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  281. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  282. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  283. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  284. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  285. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  286. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  287. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  288. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  289. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  290. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  291. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  292. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  293. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  294. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  295. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  296. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  297. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  298. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  299. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  300. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  301. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  302. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  303. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
  304. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
  305. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
  306. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
  307. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
  308. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
  309. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
  310. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
  311. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
  312. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
  313. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
  314. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
  315. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
  316. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
  317. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
  318. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
  319. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
  320. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
  321. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
  322. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
  323. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
  324. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
  325. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
  326. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
  327. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
  328. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
  329. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
  330. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
  331. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
  332. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
  333. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
  334. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
  335. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
  336. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
  337. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
  338. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
  339. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
  340. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
  341. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
  342. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -1
  343. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -1
  344. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -1
  345. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -1
  346. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -1
  347. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -1
  348. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -1
  349. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -1
  350. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -1
  351. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -1
  352. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -1
  353. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -1
  354. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -1
  355. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -1
  356. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -1
  357. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -1
  358. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -1
  359. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -1
  360. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -1
  361. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -1
  362. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -1
  363. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -1
  364. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -1
  365. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -1
  366. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -1
  367. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -1
  368. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -1
  369. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -1
  370. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -1
  371. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -1
  372. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -1
  373. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -1
  374. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -1
  375. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -1
  376. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -1
  377. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -1
  378. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -1
  379. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -1
  380. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -1
  381. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ar.json +1 -1
  382. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bg.json +1 -1
  383. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bs.json +1 -1
  384. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ca.json +1 -1
  385. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_cs.json +1 -1
  386. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_da.json +1 -1
  387. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_de.json +1 -1
  388. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_el.json +1 -1
  389. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_es.json +1 -1
  390. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_et.json +1 -1
  391. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fi.json +1 -1
  392. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fr.json +1 -1
  393. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_he.json +1 -1
  394. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hr.json +1 -1
  395. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hu.json +1 -1
  396. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_id.json +1 -1
  397. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_it.json +1 -1
  398. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ja.json +1 -1
  399. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ko.json +1 -1
  400. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lt.json +1 -1
  401. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lv.json +1 -1
  402. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_nl.json +1 -1
  403. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +1 -1
  404. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pl.json +1 -1
  405. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-BR.json +1 -1
  406. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-PT.json +1 -1
  407. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ro.json +1 -1
  408. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ru.json +1 -1
  409. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sk.json +1 -1
  410. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sl.json +1 -1
  411. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sr.json +1 -1
  412. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sv.json +1 -1
  413. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_th.json +1 -1
  414. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_tr.json +1 -1
  415. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_uk.json +1 -1
  416. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_vi.json +1 -1
  417. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-CN.json +1 -1
  418. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-HK.json +1 -1
  419. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-TW.json +1 -1
  420. package/chunks/HUDMaterial.glsl.js +6 -6
  421. package/geometry/operators/densifyOperator.d.ts +1 -0
  422. package/geometry/operators/json/geodesicBufferOperator.js +1 -1
  423. package/interfaces.d.ts +87 -3
  424. package/layers/OrientedImageryLayer.js +1 -1
  425. package/layers/VideoLayer.js +1 -1
  426. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  427. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  428. package/layers/video/VideoController.js +1 -1
  429. package/networks/CircuitManager.js +5 -0
  430. package/package.json +3 -3
  431. package/request.js +1 -1
  432. package/rest/knowledgeGraph/GraphUpdateSearchIndexResult.js +5 -0
  433. package/rest/knowledgeGraph/wasmInterface/updateToWasmEncodedFactories.js +1 -1
  434. package/rest/knowledgeGraph/wasmInterface/wasmToDataModelChangeResponseFactories.js +1 -1
  435. package/rest/knowledgeGraphService.js +1 -1
  436. package/rest/networks/circuits/exportCircuits.js +5 -0
  437. package/rest/networks/circuits/queryCircuits.js +1 -1
  438. package/rest/networks/circuits/support/ExportCircuitsParameters.js +5 -0
  439. package/rest/networks/circuits/support/ExportCircuitsResult.js +5 -0
  440. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  441. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  442. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  443. package/smartMapping/renderers/support/spikeUtils.js +1 -1
  444. package/support/revision.js +1 -1
  445. package/symbols/support/previewCIMSymbol.js +1 -1
  446. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  447. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  448. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  449. package/views/2d/layers/VideoLayerView2D.js +1 -1
  450. package/views/3d/FocusAreasView.js +1 -1
  451. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  452. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  453. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  454. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  455. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  456. package/views/3d/layers/I3SMeshView3D.js +1 -1
  457. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  458. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  459. package/views/3d/layers/SceneLayerView3D.js +1 -1
  460. package/views/3d/layers/graphics/Deconflictor.js +1 -1
  461. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  462. package/views/3d/layers/graphics/Graphics3DMeshFillSymbolLayer.js +1 -1
  463. package/views/3d/layers/graphics/Graphics3DObjectSymbolLayer.js +1 -1
  464. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  465. package/views/3d/terrain/TerrainRenderer.js +1 -1
  466. package/views/3d/terrain/TileRenderer.js +1 -1
  467. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  468. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  469. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  470. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  471. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  472. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  473. package/views/3d/webgl-engine/effects/magnifier/Magnifier.js +1 -1
  474. package/views/3d/webgl-engine/lib/Material.js +1 -1
  475. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  476. package/views/3d/webgl-engine/lib/RenderingContext.js +1 -1
  477. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  478. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  479. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  480. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  481. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  482. package/views/3d/webgl-engine/shaders/HUDMaterial.glsl.js +1 -1
  483. package/views/FocusArea.js +1 -1
  484. package/views/FocusAreaOutline.js +1 -1
  485. package/views/FocusAreaOutlineItem.js +1 -1
  486. package/views/VideoView.js +1 -1
  487. package/views/View2D.js +1 -1
  488. package/views/input/recognizers/DoubleTapDrag.js +1 -1
  489. package/views/input/recognizers/ImmediateDoubleClick.js +1 -1
  490. package/views/input/recognizers/PointerClickHoldAndDrag.js +1 -1
  491. package/views/input/recognizers/SingleAndDoubleClick.js +1 -1
  492. package/views/input/recognizers/support.js +1 -1
  493. package/views/magnifier/overlay-svg.js +1 -1
  494. package/views/support/LayerLayerViewInfo.js +1 -1
  495. package/views/support/LayerViewManager.js +1 -1
  496. package/views/support/TextureCompressionWorker.js +1 -1
  497. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  498. package/views/ui/video/DefaultUIVideo.js +5 -0
  499. package/views/webgl/RenderingContext.js +1 -1
  500. package/views/webgl/Texture.js +1 -1
  501. package/views/webgl/checkWebGLError.js +1 -1
  502. package/views/webgl/rasterUtils.js +1 -1
  503. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  504. package/widgets/AreaMeasurement3D.js +1 -1
  505. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  506. package/widgets/BatchAttributeForm.js +1 -1
  507. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  508. package/widgets/DirectLineMeasurement3D.js +1 -1
  509. package/widgets/ElevationProfile/support/geometryUtils.js +1 -1
  510. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  511. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  512. package/widgets/Legend/styles/support/sizeRampUtils.js +1 -1
  513. package/widgets/Legend/support/sizeRampUtils.js +1 -1
  514. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  515. package/widgets/LineOfSight.js +1 -1
  516. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  517. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  518. package/widgets/OrientedImageryViewer/components/Alert.js +5 -0
  519. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  520. package/widgets/OrientedImageryViewer/components/NavigationActions.js +5 -0
  521. package/widgets/OrientedImageryViewer/components/NavigationSettings.js +5 -0
  522. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  523. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +5 -0
  524. package/widgets/OrientedImageryViewer/css.js +1 -1
  525. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  526. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  527. package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
  528. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  529. package/widgets/OrientedImageryViewer.js +1 -1
  530. package/widgets/PanoramicViewer.js +1 -1
  531. package/widgets/Slice/SliceViewModel.js +1 -1
  532. package/widgets/Slice.js +1 -1
  533. package/widgets/VideoPlayer.js +1 -1
  534. package/widgets/Weather/WeatherViewModel.js +1 -1
  535. package/widgets/support/AnalysisViewModel.js +1 -1
  536. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  537. package/widgets/support/SelectionToolbar.js +1 -1
  538. package/assets/esri/core/workers/chunks/2873cb727c59328074db.js +0 -1
  539. package/assets/esri/core/workers/chunks/47fe2379f2214bf50036.js +0 -1
  540. package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.js +0 -1
  541. package/assets/esri/core/workers/chunks/a937076d2f8c2b6a5d8a.js +0 -1
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{pt2px as e}from"../../../../core/screenUtils.js";import{isWidthAndHeight as i}from"./utils.js";import{attachToNode as t}from"../../support/styleUtils.js";import"../../../support/widgetUtils.js";import{tsx as s}from"../../../support/jsxFactory.js";const n="#ddd",o=window.devicePixelRatio,a="esri-spike-ramp",p={spikeRampContainer:`${a}__container`,spikeRampPreviewContainer:`${a}__preview-container`,spikeRampPreview:`${a}__preview`,spikeRampSymbolPreview:`${a}__symbol-preview`,spikeRampLines:`${a}__lines`,spikeRampLabelsContainer:`${a}__labels-container`,spikeRampLabel:`${a}__label`};function r(e){return 5!==e.infos.length?null:s("div",{class:p.spikeRampContainer},s("div",{class:p.spikeRampPreviewContainer},l(e),m(e)),d(e))}function l(e){const[i,n,o]=h(e).map((({preview:e})=>{if(!e)return null;const i=e.cloneNode(!0);return i.classList.add(p.spikeRampSymbolPreview),i}));return i&&n&&o?s("div",{class:p.spikeRampPreview},s("div",{afterCreate:t,bind:o}),s("div",{afterCreate:t,bind:n}),s("div",{afterCreate:t,bind:i})):null}function m(a){const[{width:r,height:l},{width:m},{width:d,height:c}]=h(a).map((({size:t})=>i(t)?{width:e(t.width),height:e(t.height)}:{width:0,height:0})),v=10,b=r+m+d+3*v,u=l,w=document.createElement("canvas");w.width=(b+v)*o,w.height=u*o,w.style.width=w.width/o+"px",w.style.height=w.height/o+"px";const k=w.getContext("2d");k.beginPath();const f=b-(r/2+v),R=4,g=b,_=4;k.moveTo(f*o,R*o),k.lineTo(g*o,_*o);const y=b/2,C=(l-c)/2,L=b,x=(l-c)/2;k.moveTo(y*o,C*o),k.lineTo(L*o,x*o);const P=d/2,$=u-c,j=b,T=u-c;return k.moveTo(P*o,$*o),k.lineTo(j*o,T*o),k.strokeStyle=n,k.lineWidth=.5*o,k.stroke(),s("div",{afterCreate:t,bind:w,class:p.spikeRampLines})}function d(t){const[{label:n,height:o},{label:a},{label:r,height:l}]=h(t).map((({label:t,size:s})=>({label:t,height:i(s)?e(s.height):0}))),m=o-l,d={position:"absolute",top:"0"},c={position:"absolute",top:m/2+"px"},v={position:"absolute",top:`${m}px`};return s("div",{class:p.spikeRampLabelsContainer},s("div",{class:p.spikeRampLabel,styles:d},n),s("div",{class:p.spikeRampLabel,styles:c},a),s("div",{class:p.spikeRampLabel,styles:v},r))}function h(e){return e.infos.filter(((e,i)=>i%2==0))}export{r as renderSpikeRamp};
5
+ import{pt2px as e}from"../../../../core/screenUtils.js";import{isWidthAndHeight as i}from"./utils.js";import{attachToNode as t}from"../../support/styleUtils.js";import"../../../support/widgetUtils.js";import{tsx as s}from"../../../support/jsxFactory.js";const n="#ddd",o=window.devicePixelRatio,a="esri-spike-ramp",p={spikeRampContainer:`${a}__container`,spikeRampPreviewContainer:`${a}__preview-container`,spikeRampPreview:`${a}__preview`,spikeRampSymbolPreview:`${a}__symbol-preview`,spikeRampLines:`${a}__lines`,spikeRampLabelsContainer:`${a}__labels-container`,spikeRampLabel:`${a}__label`};function r(e){return 5!==e.infos.length?null:s("div",{class:p.spikeRampContainer},s("div",{class:p.spikeRampPreviewContainer},l(e),m(e)),d(e))}function l(e){const[i,n,o]=h(e).map((({preview:e})=>{if(!e)return null;const i=e.cloneNode(!0);return i.classList.add(p.spikeRampSymbolPreview),i}));return i&&n&&o?s("div",{class:p.spikeRampPreview},s("div",{afterCreate:t,bind:o}),s("div",{afterCreate:t,bind:n}),s("div",{afterCreate:t,bind:i})):null}function m(a){const[{width:r,height:l},{width:m},{width:d,height:c}]=h(a).map((({size:t})=>i(t)?{width:e(t.width),height:e(t.height)}:{width:0,height:0})),v=10,b=r+m+d+3*v,u=l,w=document.createElement("canvas");w.width=(b+v)*o,w.height=u*o,w.style.width=w.width/o+"px",w.style.height=w.height/o+"px";const k=w.getContext("2d");k.beginPath();const f=b-(r/2+v),R=0,g=b,_=0;k.moveTo(f*o,R*o),k.lineTo(g*o,_*o);const y=b/2,C=(l-c)/2,L=b,x=(l-c)/2;k.moveTo(y*o,C*o),k.lineTo(L*o,x*o);const P=d/2,$=u-c,j=b,T=u-c;return k.moveTo(P*o,$*o),k.lineTo(j*o,T*o),k.strokeStyle=n,k.lineWidth=.5*o,k.stroke(),s("div",{afterCreate:t,bind:w,class:p.spikeRampLines})}function d(t){const[{label:n,height:o},{label:a},{label:r,height:l}]=h(t).map((({label:t,size:s})=>({label:t,height:i(s)?e(s.height):0}))),m=o-l,d={position:"absolute",top:"0"},c={position:"absolute",top:m/2+"px"},v={position:"absolute",top:`${m}px`};return s("div",{class:p.spikeRampLabelsContainer},s("div",{class:p.spikeRampLabel,styles:d},n),s("div",{class:p.spikeRampLabel,styles:c},a),s("div",{class:p.spikeRampLabel,styles:v},r))}function h(e){return e.infos.filter(((e,i)=>i%2==0))}export{r as renderSpikeRamp};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../Color.js";import{getColorLuminance as t}from"../../../core/colorUtils.js";import{round as l,numDigits as i,percentChange as o}from"../../../renderers/support/numberUtils.js";import{updateReferenceSizeSymbol as s}from"../../../smartMapping/renderers/support/referenceSizeUtils.js";import{getSpikeSymbolBaseWidth as n,updateSpikeSymbol as r}from"../../../smartMapping/renderers/support/spikeUtils.js";import a from"../../../symbols/SimpleLineSymbol.js";import u from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolColor as c}from"../../../symbols/support/cimSymbolUtils.js";import{isSymbol3D as m}from"../../../symbols/support/typeUtils.js";import{isVolumetricSymbol as p,getSymbolOutlineSize as f}from"../../../symbols/support/utils.js";import{getAuthoringInfoVisualVariableByTheme as y,getSymbolForFlowRenderer as b,createStopLabel as h}from"./utils.js";import"../../support/widgetUtils.js";import{isDarkMode as d}from"../../../support/modeUtils.js";const g=30,w=12,S=24,v=10,z=[255,255,255],k=[200,200,200],j=[128,128,128],V=20,x=5;function I(e){return"esri.symbols.SimpleMarkerSymbol"===e.declaredClass}function U(e){return"esri.symbols.PictureMarkerSymbol"===e.declaredClass}function M(e){return"esri.symbols.SimpleLineSymbol"===e.declaredClass}function C(e){return"esri.symbols.TextSymbol"===e.declaredClass}function L(e,t){const l=e.length-1;return e.map(((e,i)=>h(e,i,l,t)))}async function D(e,t,i,o,s,r,a){const u=t.legendOptions,c=u?.customValues,m=a||await E(e,i),b=t.stops,h=!!m,d=!!c,g=null!=t.minSize&&null!=t.maxSize,w=b&&b.length>1,z=!!t.target;if(!h||!d&&!(g||w&&!z))return;const k=p(m);let j=!1,V=null,x=null;V=k&&!w?l([t.minDataValue,t.maxDataValue]):c??await O(t,m,o,s?.type);const I=e?.authoringInfo,U="univariate-color-size"===I?.type,M=U&&"above-and-below"===I?.univariateTheme,C=!!y(e,"reference-size"),D=!!y(e,"spike");if(!V&&w&&(V=b.map((e=>e.value)),j=b.some((e=>!!e.label)),"flow"===e.type&&(V=l(V)),j&&(x=b.map((e=>e.label)))),k&&null!=V&&V?.length>2&&!M&&(V=[V[0],V[V.length-1]]),!V)return null;U&&5!==V?.length&&(V=A({minSize:V[0],maxSize:V[V.length-1]}));const q=k?T(e,V):null,B=f(m),P=j?null:L(V,r);return(await Promise.all(V.map((async(l,i)=>{let r=k?q[i]:await J(t,m,l,o,s?.type),a=r;C&&(r*=S/t.maxSize||1,a=S),D&&"cim"===m.type&&(a={width:n(m)??v,height:r});return{value:l,symbol:K(m,r,e,i),label:j?x[i]:P[i],size:a,outlineSize:B}})))).reverse()}function T(e,t){const l=e?.authoringInfo,i="univariate-color-size"===l?.type;let o=[w,g];if(i){const e=t[0],l=t[t.length-1],i=w,s=g;o=t.map((t=>i+(t-e)/(l-e)*(s-i)))}return i&&"below"===l?.univariateTheme&&o.reverse(),o}function q(t,l,i,o){const n="class-breaks"===t.type,r=n?t.classBreakInfos?.[0]?.symbol?.clone():t.uniqueValueInfos?.[0]?.symbol?.clone();return r&&"type"in r&&"cim"===r.type?(s(r,{color:o??(n?null:new e(k)),innerDotSize:l*(S/i)||1,outerRingSize:S}),r):null}function B(e,t){const l=e.classBreakInfos,i=l.length,o=i<2||!(t>=2)?l[0].symbol.clone():l[i-1].symbol.clone(),s=e.visualVariables?.some((e=>"color"===e.type));return s&&(o.type.includes("3d")?R(o):H(o)),o}async function E(l,i){if("flow"===l.type)return b(l,i);if("pie-chart"===l.type)return new u({color:null,outline:l.outline?.width?l.outline:new a});let o=null,n=null;if("simple"===l.type)o=l.symbol;else if("class-breaks"===l.type){const e=l.classBreakInfos;o=e&&e[0]&&e[0].symbol,n=e.length>1}else if("unique-value"===l.type){const e=l.uniqueValueInfos;o=e?.[0]?.symbol,n=null!=e&&e.length>1}if(!o||P(o))return null;if(o=o.clone(),i||n)if(o.type.includes("3d"))R(o);else if(y(l,"reference-size")&&"cim"===o.type)s(o,{color:i??("class-breaks"!==l.type?new e(k):null)});else if(y(l,"spike")&&"cim"===o.type){const s=new e(k);let n,a=i??void 0;if(a){const e=t(a),l=d();if(!l&&e>225||l&&e<25){const e="CIMPointSymbol"===o.data.symbol?.type?o.data.symbol.symbolLayers:null,t=e?.some((e=>"CIMSolidFill"===e?.type));t?a=s:n=s}}else a="class-breaks"!==l.type?s:void 0;r(o,{color:a,strokeColor:n})}else H(o);return o}function P(e){return m(e)?e.symbolLayers?.some((e=>"fill"===e?.type))??!1:e?.type.includes("fill")??!1}function R(e){"line-3d"===e.type?e.symbolLayers.forEach((e=>{e.material={color:j}})):e.symbolLayers.forEach((e=>{"icon"!==e.type||e.resource?.href?e.material={color:k}:(e.material={color:z},e.outline={color:j,size:1.5})}))}function H(t){const l=d();if("cim"===t.type)c(t,new e(k));else if(t.type.includes("line"))t.color=j;else if(t.color=l?j:z,"simple-marker"===t.type)if(t.outline){const e=t.outline?.color?.toHex();"#ffffff"===e&&(t.outline.color=j)}else t.outline={color:j,width:1.5}}async function O(e,t,i,o){const s=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSizeRangeAtScale(e,i,o),n=s&&A(s);if(!s||!n)return;let r=n.map((t=>F(t,e,s)));r=l(r);for(let l=1;l<r.length-1;l++){const s=await G(e,t,r[l],r[l-1],i,o);s&&(r[l]=s[0],n[l]=s[1])}return r}function A(e){const t=e.minSize,l=e.maxSize,i=x,o=(l-t)/(i-1),s=[];for(let n=0;n<i;n++)s.push(t+o*n);return s}function F(e,t,l){const i=l.minSize,o=l.maxSize,s=t.minDataValue,n=t.maxDataValue;let r;if(e<=i)r=s;else if(e>=o)r=n;else{r=(e-i)/(o-i)*(n-s)+s}return r}async function G(e,t,s,n,r,a){const u=await J(e,t,s,r,a),c=await J(e,t,n,r,a),m=i(s),p=m.fractional,f=V;let y=m.integer,b=null,h=null;s>0&&s<1&&(b=10**p,y=i(s*=b).integer);for(let i=y-1;i>=0;i--){const n=10**i;let m=Math.floor(s/n)*n,p=Math.ceil(s/n)*n;null!=b&&(m/=b,p/=b);let y=(m+p)/2;[,y]=l([m,y,p],{indexes:[1]});const d=await J(e,t,m,r,a),g=await J(e,t,p,r,a),w=await J(e,t,y,r,a),S=o(u,d,c,null),v=o(u,g,c,null),z=o(u,w,c,null);let k=S.previous<=f,j=v.previous<=f;if(k&&j&&(S.previous<=v.previous?(k=!0,j=!1):(j=!0,k=!1)),k?h=[m,d]:j?h=[p,g]:z.previous<=f&&(h=[y,w]),h)break}return h}async function J(e,t,l,i,o){const{getSize:s}=await import("../../../renderers/visualVariables/support/visualVariableUtils.js");return s(e,l,{scale:i,view:o,shape:"simple-marker"===t.type?t.style:null})}function K(e,t,l,i){"univariate-color-size"===l?.authoringInfo?.type&&"above-and-below"===l?.authoringInfo?.univariateTheme&&"class-breaks"===l.type&&(e=B(l,i));const o=e.clone();if(m(o))p(o)||o.symbolLayers.forEach((e=>{"fill"!==e.type&&(e.size=t)}));else if(I(o))o.size=t;else if(U(o)){const e=o.width,l=o.height;o.height=t,o.width=t*(e/l)}else M(o)?o.width=t:C(o)?o.font&&(o.font.size=t):"cim"===o.type&&y(l,"reference-size")?s(o,{innerDotSize:t,outerRingSize:S}):"cim"===o.type&&y(l,"spike")&&r(o,{defaultHeight:t,primitiveOverrides:null});return o}export{D as getRampStops,q as getReferenceSizeSymbol,g as realWorldMaxSize,w as realWorldMinSize};
5
+ import e from"../../../Color.js";import{getColorLuminance as t}from"../../../core/colorUtils.js";import{round as l,numDigits as i,percentChange as o}from"../../../renderers/support/numberUtils.js";import{updateReferenceSizeSymbol as s}from"../../../smartMapping/renderers/support/referenceSizeUtils.js";import{updateSpikeSymbol as n}from"../../../smartMapping/renderers/support/spikeUtils.js";import r from"../../../symbols/SimpleLineSymbol.js";import a from"../../../symbols/SimpleMarkerSymbol.js";import{applyCIMSymbolColor as u}from"../../../symbols/support/cimSymbolUtils.js";import{getCIMSymbolPreviewSize as c}from"../../../symbols/support/previewCIMSymbol.js";import{isSymbol3D as m}from"../../../symbols/support/typeUtils.js";import{isVolumetricSymbol as p,getSymbolOutlineSize as f}from"../../../symbols/support/utils.js";import{getAuthoringInfoVisualVariableByTheme as y,getSymbolForFlowRenderer as b,createStopLabel as d}from"./utils.js";import"../../support/widgetUtils.js";import{isDarkMode as h}from"../../../support/modeUtils.js";const w=30,S=12,g=24,v=[255,255,255],z=[200,200,200],k=[128,128,128],j=20,I=5;function V(e){return"esri.symbols.SimpleMarkerSymbol"===e.declaredClass}function x(e){return"esri.symbols.PictureMarkerSymbol"===e.declaredClass}function M(e){return"esri.symbols.SimpleLineSymbol"===e.declaredClass}function U(e){return"esri.symbols.TextSymbol"===e.declaredClass}function C(e,t){const l=e.length-1;return e.map(((e,i)=>d(e,i,l,t)))}async function L(e,t,i,o,s,n,r){const a=t.legendOptions,u=a?.customValues,m=r||await B(e,i),b=t.stops,d=!!m,h=!!u,w=null!=t.minSize&&null!=t.maxSize,S=b&&b.length>1,v=!!t.target;if(!d||!h&&!(w||S&&!v))return;const z=p(m);let k=!1,j=null,I=null;j=z&&!S?l([t.minDataValue,t.maxDataValue]):u??await H(t,m,o,s?.type);const V=e?.authoringInfo,x="univariate-color-size"===V?.type,M=x&&"above-and-below"===V?.univariateTheme,U=!!y(e,"reference-size"),L=!!y(e,"spike");if(!j&&S&&(j=b.map((e=>e.value)),k=b.some((e=>!!e.label)),"flow"===e.type&&(j=l(j)),k&&(I=b.map((e=>e.label)))),z&&null!=j&&j?.length>2&&!M&&(j=[j[0],j[j.length-1]]),!j)return null;x&&5!==j?.length&&(j=O({minSize:j[0],maxSize:j[j.length-1]}));const T=z?D(e,j):null,q=f(m),E=k?null:C(j,n),P=await Promise.all(j.map((async(l,i)=>{let n=z?T[i]:await G(t,m,l,o,s?.type),r=n;const a=J(m,n,e,i);U&&(n*=g/t.maxSize||1,r=g),L&&"cim"===a.type&&(r=await c(a));return{value:l,symbol:a,label:k?I[i]:E[i],size:r,outlineSize:q}})));return P.reverse()}function D(e,t){const l=e?.authoringInfo,i="univariate-color-size"===l?.type;let o=[S,w];if(i){const e=t[0],l=t[t.length-1],i=S,s=w;o=t.map((t=>i+(t-e)/(l-e)*(s-i)))}return i&&"below"===l?.univariateTheme&&o.reverse(),o}function T(t,l,i,o){const n="class-breaks"===t.type,r=n?t.classBreakInfos?.[0]?.symbol?.clone():t.uniqueValueInfos?.[0]?.symbol?.clone();return r&&"type"in r&&"cim"===r.type?(s(r,{color:o??(n?null:new e(z)),innerDotSize:l*(g/i)||1,outerRingSize:g}),r):null}function q(e,t){const l=e.classBreakInfos,i=l.length,o=i<2||!(t>=2)?l[0].symbol.clone():l[i-1].symbol.clone(),s=e.visualVariables?.some((e=>"color"===e.type));return s&&(o.type.includes("3d")?P(o):R(o)),o}async function B(l,i){if("flow"===l.type)return b(l,i);if("pie-chart"===l.type)return new a({color:null,outline:l.outline?.width?l.outline:new r});let o=null,u=null;if("simple"===l.type)o=l.symbol;else if("class-breaks"===l.type){const e=l.classBreakInfos;o=e&&e[0]&&e[0].symbol,u=e.length>1}else if("unique-value"===l.type){const e=l.uniqueValueInfos;o=e?.[0]?.symbol,u=null!=e&&e.length>1}if(!o||E(o))return null;if(o=o.clone(),i||u)if(o.type.includes("3d"))P(o);else if(y(l,"reference-size")&&"cim"===o.type)s(o,{color:i??("class-breaks"!==l.type?new e(z):null)});else if(y(l,"spike")&&"cim"===o.type){const s=new e(z);let r,a=i??void 0;if(a){const e=t(a),l=h();if(!l&&e>225||l&&e<25){const e="CIMPointSymbol"===o.data.symbol?.type?o.data.symbol.symbolLayers:null,t=e?.some((e=>"CIMSolidFill"===e?.type));t?a=s:r=s}}else a="class-breaks"!==l.type?s:void 0;n(o,{color:a,strokeColor:r})}else R(o);return o}function E(e){return m(e)?e.symbolLayers?.some((e=>"fill"===e?.type))??!1:e?.type.includes("fill")??!1}function P(e){"line-3d"===e.type?e.symbolLayers.forEach((e=>{e.material={color:k}})):e.symbolLayers.forEach((e=>{"icon"!==e.type||e.resource?.href?e.material={color:z}:(e.material={color:v},e.outline={color:k,size:1.5})}))}function R(t){const l=h();if("cim"===t.type)u(t,new e(z));else if(t.type.includes("line"))t.color=k;else if(t.color=l?k:v,"simple-marker"===t.type)if(t.outline){const e=t.outline?.color?.toHex();"#ffffff"===e&&(t.outline.color=k)}else t.outline={color:k,width:1.5}}async function H(e,t,i,o){const s=(await import("../../../renderers/visualVariables/support/visualVariableUtils.js")).getSizeRangeAtScale(e,i,o),n=s&&O(s);if(!s||!n)return;let r=n.map((t=>A(t,e,s)));r=l(r);for(let l=1;l<r.length-1;l++){const s=await F(e,t,r[l],r[l-1],i,o);s&&(r[l]=s[0],n[l]=s[1])}return r}function O(e){const t=e.minSize,l=e.maxSize,i=I,o=(l-t)/(i-1),s=[];for(let n=0;n<i;n++)s.push(t+o*n);return s}function A(e,t,l){const i=l.minSize,o=l.maxSize,s=t.minDataValue,n=t.maxDataValue;let r;if(e<=i)r=s;else if(e>=o)r=n;else{r=(e-i)/(o-i)*(n-s)+s}return r}async function F(e,t,s,n,r,a){const u=await G(e,t,s,r,a),c=await G(e,t,n,r,a),m=i(s),p=m.fractional,f=j;let y=m.integer,b=null,d=null;s>0&&s<1&&(b=10**p,y=i(s*=b).integer);for(let i=y-1;i>=0;i--){const n=10**i;let m=Math.floor(s/n)*n,p=Math.ceil(s/n)*n;null!=b&&(m/=b,p/=b);let y=(m+p)/2;[,y]=l([m,y,p],{indexes:[1]});const h=await G(e,t,m,r,a),w=await G(e,t,p,r,a),S=await G(e,t,y,r,a),g=o(u,h,c,null),v=o(u,w,c,null),z=o(u,S,c,null);let k=g.previous<=f,j=v.previous<=f;if(k&&j&&(g.previous<=v.previous?(k=!0,j=!1):(j=!0,k=!1)),k?d=[m,h]:j?d=[p,w]:z.previous<=f&&(d=[y,S]),d)break}return d}async function G(e,t,l,i,o){const{getSize:s}=await import("../../../renderers/visualVariables/support/visualVariableUtils.js");return s(e,l,{scale:i,view:o,shape:"simple-marker"===t.type?t.style:null})}function J(e,t,l,i){"univariate-color-size"===l?.authoringInfo?.type&&"above-and-below"===l?.authoringInfo?.univariateTheme&&"class-breaks"===l.type&&(e=q(l,i));const o=e.clone();if(m(o))p(o)||o.symbolLayers.forEach((e=>{"fill"!==e.type&&(e.size=t)}));else if(V(o))o.size=t;else if(x(o)){const e=o.width,l=o.height;o.height=t,o.width=t*(e/l)}else M(o)?o.width=t:U(o)?o.font&&(o.font.size=t):"cim"===o.type&&y(l,"reference-size")?s(o,{innerDotSize:t,outerRingSize:g}):"cim"===o.type&&y(l,"spike")&&n(o,{defaultHeight:t,primitiveOverrides:null});return o}export{L as getRampStops,T as getReferenceSizeSymbol,w as realWorldMaxSize,S as realWorldMinSize};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../analysis/LineOfSightAnalysis.js";import s from"../../analysis/LineOfSightAnalysisObserver.js";import o from"../../analysis/LineOfSightAnalysisTarget.js";import i from"../../core/Collection.js";import{castForReferenceSetter as n,referenceSetter as r}from"../../core/collectionUtils.js";import{handlesGroup as a}from"../../core/handleUtils.js";import"../../core/has.js";import{watch as l,syncAndInitial as c,sync as d}from"../../core/reactiveUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/Logger.js";import"../../core/RandomLCG.js";import{subclass as g}from"../../core/accessorSupport/decorators/subclass.js";import p from"../../geometry/Point.js";import{getEffectiveElevationInfo as y,getConvertedElevation as m,absoluteHeightElevationInfo as v}from"../../support/elevationInfoUtils.js";import T from"./LineOfSightTarget.js";import{AnalysisViewModel as u}from"../support/AnalysisViewModel.js";const f=i.ofType(T);let w=class extends u{constructor(e){super(e),this.analysis=null,this.supportedViewType="3d",this.unsupportedErrorMessage="LineOfSightViewModel is only supported in 3D views.",this._vmTargetsToConnection=new Map,this._analysisTargetsToConnection=new Map}initialize(){this.addHandles([this.targets.on("after-add",(e=>this._onViewModelTargetAdded(e.item))),this.targets.on("after-remove",(e=>this._onViewModelTargetRemoved(e.item))),l((()=>this.analysis),(e=>this._onAnalysisChange(e)),c)])}destroy(){this._analysisTargetsToConnection.forEach((e=>e.remove()))}get state(){return this.disabled||!this.ready?"disabled":null==this.tool?"ready":this.tool.state}get observer(){const{observer:e}=this.analysis;return null==e?.position?null:this._convertAnalysisPointToAbsoluteHeight(e.position,e.elevationInfo)}set observer(e){let t=null;e&&(t=e.clone(),t.hasZ||(t.z=0)),this.analysis.observer=new s({position:t})}get targets(){return this._get("targets")||new f}set targets(e){this._set("targets",r(e,this.targets,f))}continue(){null!=this.tool&&this.tool.continue()}stop(){null!=this.tool&&this.tool.stop()}get testInfo(){}constructAnalysis(){return new t}async onConnectToAnalysisView(e){this.addHandles([e.on("result-changed",(e=>{const t=this._analysisTargetsToConnection.get(e.target);t&&(null!=e.result?(t.viewModelTarget.intersectedGraphic=e.result.intersectedGraphic,t.viewModelTarget.intersectedLocation=e.result.intersectedLocation,t.viewModelTarget.visible=e.result.visible):(t.viewModelTarget.intersectedGraphic=null,t.viewModelTarget.intersectedLocation=null,t.viewModelTarget.visible=void 0))}))],"view")}onDisconnectFromAnalysisView(){this.removeHandles("view")}_onViewModelTargetAdded(e){if(this._vmTargetsToConnection.get(e))return;const t=new o({position:e.location});this._connectViewModelWithAnalysisTarget(e,t),this.analysis.targets.add(t)}_onViewModelTargetRemoved(e){const t=this._vmTargetsToConnection.get(e);t&&(t.remove(),this.analysis.targets.remove(t.analysisTarget))}_onAnalysisTargetAdded(e){if(this._analysisTargetsToConnection.get(e))return;const{position:t}=e,s=new T({location:t?this._convertAnalysisPointToAbsoluteHeight(t,e.elevationInfo):null});this._connectViewModelWithAnalysisTarget(s,e),this.targets.add(s)}_onAnalysisTargetRemoved(e){const t=this._analysisTargetsToConnection.get(e);t&&(t.remove(),this.targets.remove(t.viewModelTarget))}_connectViewModelWithAnalysisTarget(e,t){let s=!1;const o=a([l((()=>({position:t.position,elevationInfo:t.elevationInfo})),(({position:t,elevationInfo:o})=>{s||(s=!0,e.location=t?this._convertAnalysisPointToAbsoluteHeight(t,o):null,s=!1)}),d),l((()=>e.location),(e=>{if(!s){s=!0;let o=null;e&&(o=e.clone(),o.hasZ||(o.z=0)),t.position=o,t.elevationInfo=null,s=!1}}),d)]),i={analysisTarget:t,viewModelTarget:e,remove:()=>{o.remove(),this._vmTargetsToConnection.delete(e),this._analysisTargetsToConnection.delete(t)}};this._vmTargetsToConnection.set(e,i),this._analysisTargetsToConnection.set(t,i)}_onAnalysisChange(e){const t="analysis";this.removeHandles(t),this.addHandles([this.analysis.targets.on("after-add",(e=>this._onAnalysisTargetAdded(e.item))),this.analysis.targets.on("after-remove",(e=>this._onAnalysisTargetRemoved(e.item)))],t),this.targets.removeAll(),e.targets.forEach((e=>{this._onAnalysisTargetAdded(e)}))}_convertAnalysisPointToAbsoluteHeight(e,t){const s=e.clone();if(null!=this.view){const o=y(e.hasZ,t);s.z=m(this.view,e,o,v)}return s}};e([h({type:t})],w.prototype,"analysis",void 0),e([h({readOnly:!0})],w.prototype,"state",null),e([h({type:p})],w.prototype,"observer",null),e([h({type:f,cast:n,nonNullable:!0})],w.prototype,"targets",null),w=e([g("esri.widgets.LineOfSight.LineOfSightViewModel")],w);const _=w;export{_ as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../analysis/LineOfSightAnalysis.js";import s from"../../analysis/LineOfSightAnalysisObserver.js";import o from"../../analysis/LineOfSightAnalysisTarget.js";import i from"../../core/Collection.js";import{castForReferenceSetter as n,referenceSetter as r}from"../../core/collectionUtils.js";import{deprecateUnnecessaryViewModel as a}from"../../core/deprecate.js";import{handlesGroup as l}from"../../core/handleUtils.js";import"../../core/has.js";import c from"../../core/Logger.js";import{watch as d,syncAndInitial as g,sync as h}from"../../core/reactiveUtils.js";import{property as p}from"../../core/accessorSupport/decorators/property.js";import"../../core/RandomLCG.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import y from"../../geometry/Point.js";import{getEffectiveElevationInfo as v,getConvertedElevation as T,absoluteHeightElevationInfo as u}from"../../support/elevationInfoUtils.js";import f from"./LineOfSightTarget.js";import{AnalysisViewModel as w}from"../support/AnalysisViewModel.js";const _=i.ofType(f);let A=class extends w{constructor(e){super(e),this.analysis=null,this.supportedViewType="3d",this.unsupportedErrorMessage="LineOfSightViewModel is only supported in 3D views.",this._vmTargetsToConnection=new Map,this._analysisTargetsToConnection=new Map,e?.isDefaultViewModel||a(c.getLogger(this),"Line Of Sight","arcgis-line-of-sight",{version:"4.33"})}initialize(){this.addHandles([this.targets.on("after-add",(e=>this._onViewModelTargetAdded(e.item))),this.targets.on("after-remove",(e=>this._onViewModelTargetRemoved(e.item))),d((()=>this.analysis),(e=>this._onAnalysisChange(e)),g)])}destroy(){this._analysisTargetsToConnection.forEach((e=>e.remove()))}get state(){return this.disabled||!this.ready?"disabled":null==this.tool?"ready":this.tool.state}get observer(){const{observer:e}=this.analysis;return null==e?.position?null:this._convertAnalysisPointToAbsoluteHeight(e.position,e.elevationInfo)}set observer(e){let t=null;e&&(t=e.clone(),t.hasZ||(t.z=0)),this.analysis.observer=new s({position:t})}get targets(){return this._get("targets")||new _}set targets(e){this._set("targets",r(e,this.targets,_))}continue(){null!=this.tool&&this.tool.continue()}stop(){null!=this.tool&&this.tool.stop()}get testInfo(){}constructAnalysis(){return new t}async onConnectToAnalysisView(e){this.addHandles([e.on("result-changed",(e=>{const t=this._analysisTargetsToConnection.get(e.target);t&&(null!=e.result?(t.viewModelTarget.intersectedGraphic=e.result.intersectedGraphic,t.viewModelTarget.intersectedLocation=e.result.intersectedLocation,t.viewModelTarget.visible=e.result.visible):(t.viewModelTarget.intersectedGraphic=null,t.viewModelTarget.intersectedLocation=null,t.viewModelTarget.visible=void 0))}))],"view")}onDisconnectFromAnalysisView(){this.removeHandles("view")}_onViewModelTargetAdded(e){if(this._vmTargetsToConnection.get(e))return;const t=new o({position:e.location});this._connectViewModelWithAnalysisTarget(e,t),this.analysis.targets.add(t)}_onViewModelTargetRemoved(e){const t=this._vmTargetsToConnection.get(e);t&&(t.remove(),this.analysis.targets.remove(t.analysisTarget))}_onAnalysisTargetAdded(e){if(this._analysisTargetsToConnection.get(e))return;const{position:t}=e,s=new f({location:t?this._convertAnalysisPointToAbsoluteHeight(t,e.elevationInfo):null});this._connectViewModelWithAnalysisTarget(s,e),this.targets.add(s)}_onAnalysisTargetRemoved(e){const t=this._analysisTargetsToConnection.get(e);t&&(t.remove(),this.targets.remove(t.viewModelTarget))}_connectViewModelWithAnalysisTarget(e,t){let s=!1;const o=l([d((()=>({position:t.position,elevationInfo:t.elevationInfo})),(({position:t,elevationInfo:o})=>{s||(s=!0,e.location=t?this._convertAnalysisPointToAbsoluteHeight(t,o):null,s=!1)}),h),d((()=>e.location),(e=>{if(!s){s=!0;let o=null;e&&(o=e.clone(),o.hasZ||(o.z=0)),t.position=o,t.elevationInfo=null,s=!1}}),h)]),i={analysisTarget:t,viewModelTarget:e,remove:()=>{o.remove(),this._vmTargetsToConnection.delete(e),this._analysisTargetsToConnection.delete(t)}};this._vmTargetsToConnection.set(e,i),this._analysisTargetsToConnection.set(t,i)}_onAnalysisChange(e){const t="analysis";this.removeHandles(t),this.addHandles([this.analysis.targets.on("after-add",(e=>this._onAnalysisTargetAdded(e.item))),this.analysis.targets.on("after-remove",(e=>this._onAnalysisTargetRemoved(e.item)))],t),this.targets.removeAll(),e.targets.forEach((e=>{this._onAnalysisTargetAdded(e)}))}_convertAnalysisPointToAbsoluteHeight(e,t){const s=e.clone();if(null!=this.view){const o=v(e.hasZ,t);s.z=T(this.view,e,o,u)}return s}};e([p({type:t})],A.prototype,"analysis",void 0),e([p({readOnly:!0})],A.prototype,"state",null),e([p({type:y})],A.prototype,"observer",null),e([p({type:_,cast:n,nonNullable:!0})],A.prototype,"targets",null),A=e([m("esri.widgets.LineOfSight.LineOfSightViewModel")],A);const M=A;export{M as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import"../core/has.js";import{ignoreAbortErrors as t}from"../core/promiseUtils.js";import{property as s}from"../core/accessorSupport/decorators/property.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{subclass as i}from"../core/accessorSupport/decorators/subclass.js";import n from"./Widget.js";import o from"./LineOfSight/LineOfSightViewModel.js";import{loadCalciteComponents as r}from"./support/componentsUtils.js";import{globalCss as l}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as a}from"./support/decorators/messageBundle.js";import{tsx as d}from"./support/jsxFactory.js";const u="esri-line-of-sight",p={base:u,actions:`${u}__actions`,container:`${u}__container`,error:`${u}__error`,hint:`${u}__hint`,hintText:`${u}__hint-text`,newAnalysisButton:`${u}__new-analysis-button`},c={newAnalysisButton:`${u}__new-button`,doneButton:`${u}__done-button`};let h=class extends n{constructor(e,s){super(e,s),this.messages=null,this.viewModel=new o,this._onNewAnalysis=()=>{t(this.viewModel.start())},this._onDone=()=>{this.viewModel.stop()},this._onContinue=()=>{this.viewModel.continue()}}loadDependencies(){return r({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get active(){return this.viewModel.active}get analysis(){return this.viewModel.analysis}set analysis(e){this.viewModel.analysis=e}get icon(){return"line-of-sight"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}render(){return d("div",{class:this.classes(p.base,l.widget,l.panel),role:"presentation"},this._renderContainerNode())}_renderContainerNode(){if(!this.visible)return null;if(!this.viewModel.supported)return this._renderUnsupportedMessage();let e=null;const t=[this._renderNewAnalysisButton()];return"creating"===this.viewModel.state?(e=this._renderHint(),t.unshift(this._renderDoneButton())):"created"===this.viewModel.state&&this.viewModel.targets.length>0&&t.unshift(this._renderContinueButton()),d("div",{class:p.container},e,d("div",{class:p.actions},t))}_renderUnsupportedMessage(){return d("div",{class:p.error,key:"esri-line-of-sight__unsupported"},d("p",null,this.messages.unsupported))}_renderHint(){return d("div",{class:p.hint,key:"esri-line-of-sight__hint"},d("p",{class:p.hintText},this.messages.hint))}_renderNewAnalysisButton(){return this._renderButton({className:p.newAnalysisButton,id:c.newAnalysisButton,label:this.messages.newAnalysis,onClick:this._onNewAnalysis,primary:!0})}_renderDoneButton(){return this._renderButton({id:c.doneButton,label:this.messages.done,onClick:this._onDone,primary:!1})}_renderContinueButton(){return this._renderButton({id:c.newAnalysisButton,label:this.messages.continueAnalysis,onClick:this._onContinue,primary:!1})}_renderButton({className:e,id:t,label:s,onClick:i,primary:n}){const o="disabled"===this.viewModel.state;return d("calcite-button",{appearance:n?"solid":"outline-fill",class:e,"data-id":t,disabled:o,key:t,onclick:i},s)}get test(){}};e([s()],h.prototype,"active",null),e([s({constructOnly:!0,nonNullable:!0})],h.prototype,"analysis",null),e([s()],h.prototype,"icon",null),e([s()],h.prototype,"label",null),e([s(),a("esri/widgets/LineOfSight/t9n/LineOfSight")],h.prototype,"messages",void 0),e([s()],h.prototype,"view",null),e([s({type:o})],h.prototype,"viewModel",void 0),e([s()],h.prototype,"visible",null),h=e([i("esri.widgets.LineOfSight")],h);const m=h;export{m as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import{deprecateWidget as t}from"../core/deprecate.js";import"../core/has.js";import s from"../core/Logger.js";import{ignoreAbortErrors as i}from"../core/promiseUtils.js";import{property as n}from"../core/accessorSupport/decorators/property.js";import"../core/RandomLCG.js";import{subclass as o}from"../core/accessorSupport/decorators/subclass.js";import r from"./Widget.js";import l from"./LineOfSight/LineOfSightViewModel.js";import{loadCalciteComponents as a}from"./support/componentsUtils.js";import{globalCss as d}from"./support/globalCss.js";import"./support/widgetUtils.js";import{messageBundle as u}from"./support/decorators/messageBundle.js";import{tsx as p}from"./support/jsxFactory.js";const c="esri-line-of-sight",h={base:c,actions:`${c}__actions`,container:`${c}__container`,error:`${c}__error`,hint:`${c}__hint`,hintText:`${c}__hint-text`,newAnalysisButton:`${c}__new-analysis-button`},m={newAnalysisButton:`${c}__new-button`,doneButton:`${c}__done-button`};let g=class extends r{constructor(e,n){super(e,n),this.messages=null,this.viewModel=new l({isDefaultViewModel:!0}),this._onNewAnalysis=()=>{i(this.viewModel.start())},this._onDone=()=>{this.viewModel.stop()},this._onContinue=()=>{this.viewModel.continue()},t(s.getLogger(this),"Line Of Sight","arcgis-line-of-sight",{version:"4.33"})}loadDependencies(){return a({button:()=>import("@esri/calcite-components/dist/components/calcite-button")})}get active(){return this.viewModel.active}get analysis(){return this.viewModel.analysis}set analysis(e){this.viewModel.analysis=e}get icon(){return"line-of-sight"}set icon(e){this._overrideIfSome("icon",e)}get label(){return this.messages?.widgetLabel??""}set label(e){this._overrideIfSome("label",e)}get view(){return this.viewModel.view}set view(e){this.viewModel.view=e}get visible(){return this.viewModel.visible}set visible(e){this.viewModel.visible=e}render(){return p("div",{class:this.classes(h.base,d.widget,d.panel),role:"presentation"},this._renderContainerNode())}_renderContainerNode(){if(!this.visible)return null;if(!this.viewModel.supported)return this._renderUnsupportedMessage();let e=null;const t=[this._renderNewAnalysisButton()];return"creating"===this.viewModel.state?(e=this._renderHint(),t.unshift(this._renderDoneButton())):"created"===this.viewModel.state&&this.viewModel.targets.length>0&&t.unshift(this._renderContinueButton()),p("div",{class:h.container},e,p("div",{class:h.actions},t))}_renderUnsupportedMessage(){return p("div",{class:h.error,key:"esri-line-of-sight__unsupported"},p("p",null,this.messages.unsupported))}_renderHint(){return p("div",{class:h.hint,key:"esri-line-of-sight__hint"},p("p",{class:h.hintText},this.messages.hint))}_renderNewAnalysisButton(){return this._renderButton({className:h.newAnalysisButton,id:m.newAnalysisButton,label:this.messages.newAnalysis,onClick:this._onNewAnalysis,primary:!0})}_renderDoneButton(){return this._renderButton({id:m.doneButton,label:this.messages.done,onClick:this._onDone,primary:!1})}_renderContinueButton(){return this._renderButton({id:m.newAnalysisButton,label:this.messages.continueAnalysis,onClick:this._onContinue,primary:!1})}_renderButton({className:e,id:t,label:s,onClick:i,primary:n}){const o="disabled"===this.viewModel.state;return p("calcite-button",{appearance:n?"solid":"outline-fill",class:e,"data-id":t,disabled:o,key:t,onclick:i},s)}get test(){}};e([n()],g.prototype,"active",null),e([n({constructOnly:!0,nonNullable:!0})],g.prototype,"analysis",null),e([n()],g.prototype,"icon",null),e([n()],g.prototype,"label",null),e([n(),u("esri/widgets/LineOfSight/t9n/LineOfSight")],g.prototype,"messages",void 0),e([n()],g.prototype,"view",null),e([n({type:l})],g.prototype,"viewModel",void 0),e([n()],g.prototype,"visible",null),g=e([o("esri.widgets.LineOfSight")],g);const _=g;export{_ as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as i}from"../../core/deprecate.js";import e from"../../core/Logger.js";import{when as a}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let n=class extends o{constructor(t){super(t),this._navigationMode="pan",this.view=null,t?.isDefaultViewModel||i(e.getLogger(this),"Navigation Toggle","navigation-toggle",{version:"4.33"})}normalizeCtorArgs(t={}){const{isDefaultViewModel:o,...i}=t;return i}initialize(){this.addHandles(a((()=>this.view?.navigation?.actionMap),(()=>this._updateNavigationActionMap())))}destroy(){this.view=null}get state(){return this.view?.ready&&"3d"===this.view?.type?"ready":"disabled"}get navigationMode(){return this._navigationMode}set navigationMode(t){this._navigationMode=t,this._updateNavigationActionMap()}toggle(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate")}_updateNavigationActionMap(){const t=this.view?.navigation?.actionMap;if(!t)return;const o="pan"===this._navigationMode;t.dragPrimary=o?"pan":"rotate",t.dragSecondary=o?"rotate":"pan"}};t([r({readOnly:!0})],n.prototype,"state",null),t([r()],n.prototype,"_navigationMode",void 0),t([r()],n.prototype,"view",void 0),n=t([s("esri.widgets.NavigationToggle.NavigationToggleViewModel")],n);const d=n;export{d as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import o from"../../core/Accessor.js";import{deprecateUnnecessaryViewModel as i}from"../../core/deprecate.js";import e from"../../core/Logger.js";import{when as a}from"../../core/reactiveUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as s}from"../../core/accessorSupport/decorators/subclass.js";let n=class extends o{constructor(t){super(t),this._navigationMode="pan",this.view=null,t?.isDefaultViewModel||i(e.getLogger(this),"Navigation Toggle","arcgis-navigation-toggle",{version:"4.33"})}normalizeCtorArgs(t={}){const{isDefaultViewModel:o,...i}=t;return i}initialize(){this.addHandles(a((()=>this.view?.navigation?.actionMap),(()=>this._updateNavigationActionMap())))}destroy(){this.view=null}get state(){return this.view?.ready&&"3d"===this.view?.type?"ready":"disabled"}get navigationMode(){return this._navigationMode}set navigationMode(t){this._navigationMode=t,this._updateNavigationActionMap()}toggle(){"disabled"!==this.state&&(this.navigationMode="pan"!==this.navigationMode?"pan":"rotate")}_updateNavigationActionMap(){const t=this.view?.navigation?.actionMap;if(!t)return;const o="pan"===this._navigationMode;t.dragPrimary=o?"pan":"rotate",t.dragSecondary=o?"rotate":"pan"}};t([r({readOnly:!0})],n.prototype,"state",null),t([r()],n.prototype,"_navigationMode",void 0),t([r()],n.prototype,"view",void 0),n=t([s("esri.widgets.NavigationToggle.NavigationToggleViewModel")],n);const g=n;export{g as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import{equals as a,isSome as r}from"../../core/arrayUtils.js";import{createTask as i}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import n from"../../core/Error.js";import c from"../../core/Evented.js";import{equalsShallow as l}from"../../core/lang.js";import u from"../../core/Logger.js";import{clamp as h}from"../../core/mathUtils.js";import{abortMaybe as m,destroyMaybe as p}from"../../core/maybe.js";import d from"../../core/Promise.js";import{isAbortError as g,throwIfAborted as y,waitTick as v}from"../../core/promiseUtils.js";import f from"../../core/ReactiveMap.js";import{whenOnce as w,on as F,watch as b,syncAndInitial as M,initial as _}from"../../core/reactiveUtils.js";import{sqlAnd as P}from"../../core/sql.js";import{getMetersPerUnitForSR as I}from"../../core/unitUtils.js";import{property as S}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as k}from"../../core/accessorSupport/decorators/subclass.js";import{distance as A}from"../../core/libs/gl-matrix-2/math/vec2.js";import{isSerializable as V}from"../../core/support/jsonUtils.js";import{UpdatingHandles as C}from"../../core/support/UpdatingHandles.js";import{union as G}from"../../geometry/geometryEngineAsync.js";import L from"../../geometry/Multipoint.js";import R from"../../geometry/Point.js";import O from"../../geometry/Polygon.js";import T from"../../geometry/Polyline.js";import{projectWithZConversion as B}from"../../geometry/projection.js";import j from"../../geometry/SpatialReference.js";import{isClockwise as x}from"../../geometry/support/coordsUtils.js";import{geographicToWebMercator as z}from"../../geometry/support/webMercatorUtils.js";import E from"../../layers/GraphicsLayer.js";import{searchImages as D}from"../../layers/orientedImagery/queries.js";import{calculateSuitabilities as H}from"../../layers/orientedImagery/core/bestImageUtils.js";import{createCoveragePolygon as U,computePolygonForInspection as N,resizePolygon as W,checkIfPolygonContainsSelectedPoint as q}from"../../layers/orientedImagery/core/coverageUtils.js";import{isConstantElevation as $,isElevationSource as J}from"../../layers/orientedImagery/core/ElevationSourceDefinitions.js";import{imageToWorld as Z,imageToWorldPanoramic as K}from"../../layers/orientedImagery/transformations/imageToWorld.js";import Q from"../../layers/orientedImagery/transformations/updateElevation.js";import{getElevationSampler as X}from"../../layers/orientedImagery/transformations/updateElevationUtils.js";import{or as Y,getInitialAngle as ee,convertPixelToHeadingPitch as te,convertHeadingPitchToSphereVertex as ae,getImageToWorldProperties as re,getUpdateElevationProps as ie,isElevationSampler as se,getImageToWorldPanoramicProperties as oe,pointToArray as ne,transformGraphicCoordinatesToPixel as ce,getWorldToImageProperties as le}from"../../layers/orientedImagery/transformations/utils.js";import{worldToImage as ue,worldToImagePanoramic as he}from"../../layers/orientedImagery/transformations/worldToImage.js";import{getFloorFilterClause as me}from"../../layers/support/floorFilterUtils.js";import pe from"../../symbols/SimpleLineSymbol.js";import de from"../../views/draw/Draw.js";import{scale as ge}from"../../views/draw/support/drawUtils.js";import{ViewEventPriorities as ye}from"../../views/input/InputManager.js";import ve from"../PanoramicViewer.js";import{defaultAngleThresholdInDegrees as fe,invalidCameraHeading as we,sectorsInOrder as Fe,sectorsRadii as be}from"./constants.js";import{configureSketchTool as Me,extractFieldsFromDataCaptureLayer as _e,isValidDataCaptureLayer as Pe,constructGraphicFromImageGeometry as Ie}from"./dataCaptureUtils.js";import{isFeatureAttachment as Se,getImageSourceFromAttachment as ke}from"./galleryUtils.js";import{formatPixels as Ae,heightMeasurementPanoramic as Ve,heightMeasurement2D as Ce,calculateHeightAccuracyPanoramic as Ge,calculateHeightAccuracy as Le,pixelAreaMeasurement2D as Re,pixelAreaMeasurementPanoramic as Oe,pixelDistanceMeasurement2D as Te,pixelDistanceMeasurementPanoramic as Be,generateCombinations as je,getRootOfSumOfSquaredErrors as xe,generateCombinationsPanoramic as ze,calculateLocationAccuracyFromDeviations as Ee,calculateReferenceImagePointPanoramic as De,calculateAnglePano as He,calculateTempImagePoint as Ue,calculateAngle as Ne,computeTriangulatedAreaMeasurement as We,computeTriangulatedDistanceMeasurement as qe,getModeCorrectedPoint as $e,calculateCorrectedPixel as Je,calculateHeightFromTemporaryDistance as Ze,computeTriangulatedVector as Ke,computeTriangulatedPoint as Qe}from"./imageMeasurementUtils.js";import{crossSymbol as Xe,crossSymbol3D as Ye,measurementPolygonSymbol as et,polylineSymbolPanoramic as tt,measurementPolylineSymbol as at,sourcePointSymbol as rt,diamondSymbol as it,diamondSymbol3D as st,locationSymbol as ot,locationSymbol3D as nt,activeSourcePointSymbol as ct}from"./symbols.js";import{isNoAttachmentError as lt,getContentType as ut,isTifOrMrf as ht,filterOILLayerView as mt,assignElevationSampleToFeatures as pt,calculateDirection as dt,calculateSegment as gt,isSceneView as yt,isGraphic as vt}from"./utils.js";import ft from"./components/ImageViewer.js";import wt from"./components/NavigationNode.js";import{NoActiveViewerError as Ft}from"./navigation/errors.js";import bt from"../Sketch/SketchViewModel.js";const Mt={click:"view-click",imageClick:"image-click",triangularImageClick:"triangular-click",interactionHandles:"interaction-handles"},_t=new Set(["JPG","JPEG"]),Pt=/\.(\w+)$/,It=()=>new n("orientedimageryviewer:sketch-not-initialized","Sketch property is not initialized, call loadSketch first");let St=class extends(c.EventedMixin(d)){constructor(e){super(e),this.additionalFeatures=new s,this.additionalCameraLocations=new s,this.additionalFootprints=new s,this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.bestFeatureAngle=0,this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null,this.cameraHeadingThreshold=fe,this.cameraPitchThreshold=fe,this.collectionId=null,this.conversionProps=null,this.coverageFrustums=new s,this.coveragePolygons=new s,this.currentBestFeature=null,this.currentBestFeatureMeasurementImage=null,this.currentBestFeatureLocation=null,this.currentCoverageVisible=!0,this.navigationNodes=new s,this.determineWorkflowForFeature=async(e,t,a)=>{const{currentBestFeature:r,selectedPoint:i,view:s}=this;if(s?.closePopup(),r&&i){this._initialCurrentCoverageUpdate=!0,this._updateGroundElevation=!0;try{await this._updatePointsAndPolygons(a),await this._loadImage(a)}catch(o){g(o)||(this.loadImageError(o),u.getLogger(this).error("#loadIImage()","error occured while loading image",o))}}},this.determineWorkflowForTriangularMeasurement=async(e,t,a)=>{if(this.view?.closePopup(),this.currentBestFeatureMeasurementImage&&this.selectedPoint)try{await this._loadMeasurementViewerImage(a)}catch(r){g(r)||(this.loadImageError(r),u.getLogger(this).error("#loadIImage()","error occured while loading image",r))}},this.disabled=!1,this.displayMessage={key:"onLoadMessage",type:"info"},this.displayNewMeasurementButton=!0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.dataCaptureLayer=null,this.features=new s,this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.heightMeasurementPixels=[],this.heightGraphic=null,this.heightMeasurementResult=0,this.heightMeasurementAccuracy=0,this.measurementAngle=null,this.tempDistance=null,this.imageGeometryField=null,this.imageLocationToolState=!1,this.imageMeasurementViewer=new ft,this.isAdditionalCoverageVisible=!1,this.isAdditionalPointSourcesVisible=!1,this.measurementVectors=[],this.layer=null,this.localPort=null,this.mapImageConversionToolState=!1,this.measureType=null,this.measurementGraphic=null,this.navigatorCurrentBestFeature=null,this.oiObjectIdField=null,this.overlayedCameraLocations=new s,this.overlayedMapFeatures=new f,this.pixelCoordinates=null,this.preserveAngle=!1,this.pointSources=new s,this.previousFeatureAngle=0,this.selectedPoint=null,this.shouldShowSelectedImage=!1,this.sketch=null,this.sketchTriangular=null,this.sketchTriangularGraphicsLayer=null,this.draw=null,this.sketchAdapter=null,this.triangularMeasurementActive=!1,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedAreaAccuracy=0,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.triangulatedMeasurementAdapter=null,this.updateFootprint=async(e,t)=>{"image-loaded"===this.state&&await(this._adapter?.updateFootprint(e,t))},this.updateFootprintPanorama=async(e,t)=>{await(this._adapter?.updateFootprintPanorama(e,t))},this.updatingTriangularMeasurementState=!1,this._adapter=null,this._highlightedFeatureHandle=null,this._imageViewer=new ft({navigationViewModel:this}),this._initialCurrentCoverageUpdate=!0,this._locationPointOnImage=null,this._correctedLocationPointOnImage=null,this._overlays=new E({listMode:"hide",internal:!0,elevationInfo:{mode:"absolute-height"}}),this._panoramicViewer=new ve,this._previousCursor=null,this._referencePointOnGround=null,this._referencePointOnImage=null,this._sectorData=null,this._featureToSector=null,this._updatingHandles=new C,this._clickTask=null,this._crossSymbol=null,this.footprintExtent=null,this._featureChangedTask=null,this._openPopupTask=null,this._suitabilities=null,this._transformController=new AbortController,this._updateFootprintTask=null,this._updateGroundElevation=!1,this.hideImageGeometry=e=>{},this.highlight=e=>{if(!this._overlaysView)return;this.removeHighlight();const t=this.additionalFootprints.find((({attributes:{imageID:t}})=>t===Number(e)));this._highlightedFeatureHandle=t?this._overlaysView?.highlight(t):null},this.loadDataCaptureAdapter=async e=>{await this.loadSketch(e);const t=import("./adapters/sketch/DataCaptureAdapter.js"),{default:a}=await t;return y(e),this.sketchAdapter=new a({viewModel:this}),this.sketchAdapter},this.loadImageFromSource=async(e,t)=>this._updatingHandles.addPromise(this._loadImageFromSourceInternal(e,t)),this.storeImageMeasurementViewer=e=>{this.imageMeasurementViewer=e},this.loadImageViewer=e=>{this._imageViewer.container=e},this.loadPanoramicViewer=e=>{this._panoramicViewer.container=e},this.getSectorFeatureById=e=>this._suitabilities?.find((({feature:{attributes:{objectId:t}}})=>t===e)),this.getFeatureSectorById=e=>this._featureToSector?.[`${e}`],this.navigate=async(e,t)=>{const{activeViewer:a}=this;if(!a)throw new Ft;return await a.navigate(e,t)},this.removeHighlight=()=>this._highlightedFeatureHandle?.remove(),this.revealImageGeometry=e=>{},this.selectBestFeature=async(e,t)=>(y(t),this.currentBestFeature=this.features?.find((({attributes:t})=>`${t.objectId}`==`${e}`)),w((()=>"image-loaded"===this.state),t)),this.toggleImageAttributes=()=>{m(this._openPopupTask),this._openPopupTask=i((async e=>{const{currentBestFeature:a,popupEnabled:r,layer:i,view:s}=this;if(s?.closePopup(),!(s&&a&&r&&i))return;const{attributes:o,geometry:n}=a,c=new t({geometry:n,attributes:o.toJSON(),layer:i});y(e),await s.openPopup({features:[c],location:o.location.clone()})}))},this.updateSuitabilities=(e,t=!0)=>{e.sort(((e,t)=>e.suitability-t.suitability)),this._suitabilities=e;const a=this._suitabilities.map((({feature:e})=>e));this._initialCurrentCoverageUpdate=!0,this._updateFeatures(a,t),this._groupFeaturesBySectors()},this._createViewClickHandle=()=>{if(this.removeHandles(Mt.click),"disabled"===this.state||null==this.view)return;const e=this.mapImageConversionToolState&&"image-loaded"===this.state?this._mapImageConversionToolViewClickHandler:this._viewClickHandler;this.addHandles(this.view.on("click",e,ye.WIDGET),Mt.click)},this._createImageClickHandle=()=>{this.removeHandles(Mt.imageClick);const{mapImageConversionToolState:e,mode:t,activeViewer:a,currentBestFeature:r,footprintExtent:s}=this,o=a?.imageSize;if(!(e&&"none"!==t&&o&&s&&r))return;a.clickAction="pixel-location";let n=null;const c=F((()=>a),"pixel-location",(e=>{this.plotReferencePointOnImage(e),n?.abort(),n=i((async a=>{if(!e)return;const i=await this.getMapPoint(e,{feature:r,imageSize:o,mode:t}).then((e=>{const t=this.view?.spatialReference;return Y(!t,e.spatialReference.equals(t))?e:B(e,t)}));y(a),this.plotReferencePointOnGround(i)}))}));this.addHandles(c,Mt.imageClick)},this._createTriangularImageClickHandle=()=>{this.removeHandles(Mt.triangularImageClick);const e=this.imageMeasurementViewer?.imageSize;this.triangularMeasurementActive&&"none"!==this.mode&&e&&this.currentBestFeature&&this.addHandles(this.imageMeasurementViewer.imageRenderer.on("double-click",this._measurementImageClickHandler),Mt.triangularImageClick)},this._createTriangularImageLocationHandle=()=>{this.removeHandles(Mt.triangularImageClick);const{imageLocationToolState:e,mode:t,imageMeasurementViewer:a}=this,r=a?.imageSize;if(!e||"none"===t||!r)return;a.clickAction="pixel-location";let s=null;const o=F((()=>a),"pixel-location",(e=>{1===this.measurementVectors.length&&(this.plotLocationPointOnImage(e,!0),s?.abort(),s=i((async a=>{if(!e||this.triangulatedPoint||2===this.measurementVectors?.length||!this.currentBestFeatureMeasurementImage)return;let i=await this.getMapPoint(e,{feature:this.currentBestFeatureMeasurementImage,imageSize:r,mode:t});y(a);const s=this.currentBestFeatureMeasurementImage.geometry.spatialReference;s&&!i.spatialReference.equals(s)&&(i=await B(i,s),y(a)),await this._calculateTriangulatedPointFromGroundPoint(i,{signal:a}),y(a)})))}));this.addHandles(o,Mt.triangularImageClick)},this._createImageLocationHandle=()=>{this.removeHandles(Mt.imageClick);const{imageLocationToolState:e,mode:t,activeViewer:a,currentBestFeature:r,footprintExtent:s}=this,o=a?.imageSize;if(!(e&&"none"!==t&&o&&s&&r))return;a.clickAction="pixel-location";let n=null;const c=F((()=>a),"pixel-location",(e=>{this.pixelCoordinates=e,this.plotLocationPointOnImage(e),n?.abort(),n=i((async a=>{if(!e)return;let i=await this.getMapPoint(e,{feature:r,imageSize:o,mode:t});y(a);const s=this.view?.spatialReference;s&&!i.spatialReference.equals(s)&&(i=await B(i,s),y(a)),this.groundCoordinates=i,this.triangularMeasurementActive&&i&&this._triangulatedLocationWorkflow(i);const n=await this.calculateLocationAccuracy(e,i,t,a);y(a),n&&(this.groundCoordinatesAccuracy=n)}))}));this.addHandles(c,Mt.imageClick)},this._loadImage=async e=>{const{currentBestFeature:t,layer:a,mode:r}=this;if(this.clearGraphics(),!a||!t||"none"===r)return;const{attributes:i}=t,{imagePath:s,imageRotation:o,cameraHeading:n,cameraRoll:c,cameraPitch:l,objectId:h,cameraOrientation:m,location:p}=i,d=(c??0)+(o??0),v=p.spatialReference.isWGS84&&4!==m?.type?z(p):new R(p);let f=s;if(Se(s))try{f=await ke(a,h,e)}catch(w){if(g(w))return;return lt(w)?(u.getLogger(this).error(w),void this.setMessage("noAttachment","error",`${a.objectIdField}: ${h}`)):(u.getLogger(this).error(w,{[a.objectIdField]:h,layer:a}),void this.setMessage("imageLoadError","error",`query-attachments-failed:${a.objectIdField} ${h}`))}try{await this.loadImageFromSource(f,{imageRotation:d,options:e,pitch:l,yaw:n,mode:r,cameraLocation:v}),y(e),await this.transformAndPlotSelectedLocation(e)}catch(w){g(w)||this.loadImageError(w)}},this._loadImageFromSourceInternal=async(e,t)=>{const{mode:a,imageRotation:r,options:i}=t,s="string"==typeof e,o=s?e:e.url,{pathname:n,searchParams:c}=new URL(o);let l=s?n.match(Pt)?.[1]:e.datasetFormat;if(!l)try{l=await ut(o,{...t.options})}catch(h){g(h)||u.getLogger(this).error("#getContentType()",h)}switch(l??="UNKNOWN FORMAT",a){case"default":this.triangularMeasurementActive?await this._setImageSource(this.imageMeasurementViewer,l,o,c,r,i):await this._setImageSource(this._imageViewer,l,o,c,r,i);break;case"panoramic":if(_t.has(l.toUpperCase())){const{selectedPoint:e}=this,{pitch:a,yaw:r,cameraLocation:s,viewAngle:n}=t;this._panoramicViewer.imageSource=o;let c=r??0;"number"==typeof n?c=n-c:s&&e&&(c=await ee(s,e)-c),this._panoramicViewer.pitch=a??0,this._panoramicViewer.yaw=c,await this._panoramicViewer.loadImage(i)}else this.setMessage("unsupportedPanoramicImageryError","error",void 0,{datasetFormat:l});break}},this._loadMeasurementViewerImage=async e=>{const{currentBestFeatureMeasurementImage:t,layer:a,mode:r}=this;if(this.imageMeasurementViewer.clearGraphics(),!a||!t||"none"===r)return;const{attributes:i}=t,{imagePath:s,imageRotation:o,cameraHeading:n,cameraRoll:c,cameraPitch:l,objectId:h,cameraOrientation:m,location:p}=i,d=(c??0)+(o??0),v=p.spatialReference.isWGS84&&4!==m?.type?z(p):new R(p);let f=s;if(Se(s))try{f=await ke(a,h,e)}catch(w){if(g(w))return;return lt(w)?(u.getLogger(this).error(w),void this.setMessage("noAttachment","error",`${a.objectIdField}: ${h}`)):(u.getLogger(this).error(w,{[a.objectIdField]:h,layer:a}),void this.setMessage("imageLoadError","error",`query-attachments-failed:${a.objectIdField} ${h}`))}try{await this.loadImageFromSource(f,{imageRotation:d,options:e,pitch:l,yaw:n,mode:r,cameraLocation:v}),y(e)}catch(w){g(w)||this.loadImageError(w)}},this._loadViewAdapter=async e=>{const{view:t}=this;if(t)switch(t.type){case"2d":{const{default:t}=await import("./adapters/view/MapViewAdapter.js");y(e),this._adapter=new t(this);break}case"3d":{const{default:t}=await import("./adapters/view/SceneViewAdapter.js");y(e),this._adapter=new t(this);break}}else this._adapter=null},this._mapImageConversionToolViewClickHandler=e=>{e.stopPropagation(),e.preventDefault(),e.mapPoint&&this.plotMapPoint(e.mapPoint)},this._measurementImageClickHandler=e=>{e.stopPropagation(),e.preventDefault();const{sketchTriangular:t,triangularMeasurementActive:a,currentBestFeatureMeasurementImage:r,triangulatedMeasurementGraphic:i}=this;t&&a&&r&&i&&"active"!==t.state&&(t.update([i],{tool:"reshape"}),this.updatingTriangularMeasurementState=!0)},this._viewClickHandler=e=>{this._clickTask?.abort(),this._clickTask=i((async t=>{const{pointerType:a,button:r,mapPoint:i}=e;if(("mouse"!==a||0===r)&&i)return e.stopPropagation(),e.preventDefault(),this._updatingHandles.addPromise(this.loadBestImage(i,{signal:t}))}))},this.plotSelectedPointOnImage=async(e,a)=>{if(await v(a),!e)return;const r=new R({...V(e)?e.toJSON():e});if("default"===this.mode)r.x-=.5,r.y=.5-r.y,r.spatialReference=this._imageViewer.imageRenderer.spatialReference.clone(),this._crossSymbol=new t({geometry:r,symbol:Xe}),this._imageViewer.addGraphic(this._crossSymbol,0);else if("panoramic"===this.mode){const{imageSize:a}=this._panoramicViewer;if(!a)return;const[r,i]=a,{heading:s,pitch:o}=te(e,r,i),n=ae(s,o);this._crossSymbol=new t({geometry:new R(n,j.WebMercator),symbol:Ye}),this._panoramicViewer.addGraphic(this._crossSymbol,0)}},this.handleSectorClick=this.handleSectorClick.bind(this),this.searchBestImage=this.searchBestImage.bind(this),this.transformAndPlotReferencePointOnImage=this.transformAndPlotReferencePointOnImage.bind(this)}initialize(){this.addHandles([b((()=>this.view),(()=>{this.load()}),M),b((()=>this.view?.map),((e,t)=>{t?.layers.remove(this._overlays),e?.layers.add(this._overlays)}),_),b((()=>this.view?.map?.allLayers?.length),(e=>{e&&this.view?.map?.layers.reorder(this._overlays,e-1)}),_),b((()=>[this.state,this.mapImageConversionToolState,this.view]),(()=>{this._createViewClickHandle(),this._createImageClickHandle()}),M),b((()=>[this.triangularMeasurementActive,this.currentBestFeatureMeasurementImage]),(()=>{this._createTriangularImageClickHandle()}),M),b((()=>[this.state,this.imageLocationToolState,this.view]),((e,t)=>{if(this._createImageLocationHandle(),!this.imageLocationToolState)return this.clearPreviousGroundLocation(),void this._resetCursor();e[1]!==t?.[1]&&this._setMeasurementCursor()}),M),b((()=>this.measureType),(()=>{this.clearPreviousMeasurements()}),M),b((()=>this.bestFeatureAngle),((e,t)=>{this.previousFeatureAngle=t??0}),M),b((()=>this.currentBestFeature),(async(e,t)=>{m(this._featureChangedTask),this._featureChangedTask=i((async a=>this.determineWorkflowForFeature.apply(this,[e,t,{signal:a}]))),await this._featureChangedTask.promise}),{sync:!0}),b((()=>this.currentBestFeatureMeasurementImage),(async(e,t)=>{m(this._featureChangedTask),t&&e!==t&&(this.measurementVectors=[],this.triangulatedPoint=null,this.sketchTriangularGraphicsLayer?.graphics.destroyAll()),this._featureChangedTask=i((async a=>{await this.determineWorkflowForTriangularMeasurement(e,t,{signal:a}),y(a),this._reorderTriangularSketchLayer()}))}),M),b((()=>this.triangularMeasurementActive),(async(e,t)=>{t&&!e&&(this.measurementVectors=[],this.currentBestFeatureMeasurementImage=null,this.triangulatedDistanceMeasurement=null,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaAccuracy=0,this.sketchTriangularGraphicsLayer?.graphics.destroyAll(),this.clearReferencePointOnImage(),this.imageMeasurementViewer.clearImage(),this.imageMeasurementViewer.clearGraphics())})),b((()=>this.mode),(e=>{switch(this.removeHandles(Mt.interactionHandles),e){case"default":this.addHandles(b((()=>{const{state:e}=this;return"image-loaded"===e?this._imageViewer.imagePointsInView:null}),(e=>{e&&(m(this._updateFootprintTask),this._updateFootprintTask=i((async t=>{await this.updateFootprint(e,{signal:t})})))}),{...M,equals:(e,t)=>a(e,t,l)}),Mt.interactionHandles);break;case"panoramic":this.addHandles(b((()=>{const{currentBestFeature:e,state:t}=this,{imageSize:a,vfov:r,hfov:i,pitch:s,yaw:o}=this._panoramicViewer;return e&&a&&!t.includes("loading")?[r,i,o,s]:null}),(e=>{if(!e||this.state.includes("loading"))return;const[t,a,r,s]=e;this.currentNode&&(this.currentNode.currentHeading=r+(this.currentNode.heading??0),this.currentNode.currentPitch=s+(this.currentNode.pitch??0)),m(this._updateFootprintTask),this._updateFootprintTask=i((async e=>{await this.updateFootprintPanorama({verticalFieldOfView:t,horizontalFieldOfView:a,yaw:r,pitch:s},{signal:e})}))}),{...M,equals:(e,t)=>a(e,t,l)}),Mt.interactionHandles)}}),M),b((()=>[this.brightness,this.contrast,this.sharpness]),(()=>{const{_imageViewer:e,brightness:t,contrast:a,mode:r,sharpness:i}=this;"default"===r&&(e.brightness=t,e.contrast=a,e.sharpness=i)}),M),b((()=>this.activeViewer?.imageRenderer),(()=>{this.sketch&&(this.sketch.view=this.activeViewer?.imageRenderer)}))]),this.when().finally((()=>{this.notifyChange("state")}))}destroy(){this._updateFootprintTask=m(this._updateFootprintTask),this._clickTask=m(this._clickTask),this.coverageFrustums.destroy(),this.coveragePolygons.destroy(),this.pointSources.destroy(),this.additionalFootprints.destroy(),this.additionalCameraLocations.destroy(),this.bestFeatureFootprint=p(this.bestFeatureFootprint),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),this._crossSymbol=p(this._crossSymbol),this._referencePointOnGround=p(this._referencePointOnGround),this._referencePointOnImage=p(this._referencePointOnImage),this._locationPointOnImage=p(this._locationPointOnImage),this._overlays&&this.view?.map?.remove(this._overlays),this._overlays.destroy(),this._imageViewer.destroy(),this.imageMeasurementViewer.destroy(),this._panoramicViewer.destroy()}get activeLayer(){return o(u.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){o(u.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeViewer(){const{_imageViewer:e,_panoramicViewer:t,mode:a}=this;switch(a){case"default":return e;case"panoramic":return t;default:return null}}get accuracyParametersMissing(){return this.layer?.orientationAccuracy?.every((e=>0===e))??!0}get brightness(){return this._get("brightness")??0}set brightness(e){this._set("brightness",h(e,-10,10))}get contrast(){return this._get("contrast")??0}set contrast(e){this._set("contrast",h(e,-10,10))}get currentNode(){const{currentBestFeature:e,navigationNodes:t}=this;return t.find((t=>t.id===e?.attributes.objectId))}get featureCount(){return this.features?.length??0}get imageGalleryEnabled(){const{currentBestFeature:e}=this;if(!e)return!1;const t=e.attributes.imagePath?.trim();return ht(t)||Se(t)}get imageLoaded(){return o(u.getLogger(this),"imageLoaded",{replacement:'Use OrientedImageryViewer.state === "image-loaded"',version:"4.29",warnOnce:!0}),"image-loaded"===this.state}get invalidCameraHeading(){return this.currentBestFeature?.attributes?.cameraHeading===we}get imagePointsInView(){const{mode:e,_imageViewer:t}=this;return"default"===e?t.imagePointsInView:null}get layerView(){const{layer:e,view:t}=this;if(e&&t)return t.allLayerViews.find(mt(e))}get layerFloorFilterClause(){const{layerView:e}=this;return e?me(e):null}get mode(){const e=this.currentBestFeature?.attributes;if(!e)return"none";const{horizontalFieldOfView:t,isSpherical:a}=e;return 360===t||a?"panoramic":"default"}get popupEnabled(){return!0===this.layer?.popupEnabled}get referencePoint(){return this._referencePointOnGround?.geometry}get sectorData(){const{_sectorData:e}=this;return e?Fe.map((t=>e[t])):null}get sharpness(){return this._get("sharpness")??0}set sharpness(e){this._set("sharpness",h(e,0,1))}get sketchGraphicsLayer(){return this.sketch?.layer}get state(){const{mode:e,disabled:t,_updatingHandles:{updating:a},_featureChangedTask:r}=this;if(t)return"disabled";if(!this.isFulfilled()||a||!1===r?.finished)return"loading";if(this.isRejected())return"error";if("error"===this.displayMessage?.type)return"image-load-error";switch(e){case"default":return this._imageViewer.state;case"panoramic":return this._panoramicViewer.state}return"ready"}get thumbnails(){const{features:e}=this;return e?new s(e.map((({attributes:{imagePath:e,objectId:t,cameraRoll:a,imageRotation:r}})=>{const i=e?.trim();return ht(i)||Se(i)?{url:i,objectId:t,rotation:(a??0)+(r??0)}:null})).filter(r)):null}set view(e){this._set("view",e)}get _sketchGraphicsLayer(){const{mode:e}=this;switch(e){case"panoramic":return new E({elevationInfo:{mode:"absolute-height"}});case"default":return new E;case"none":return}}get _overlaysView(){return this.view?.layerViews.find((({layer:e})=>e===this._overlays))}async computeHeight(e,t,a=!0){const{currentBestFeature:r,activeViewer:i,layer:s,footprintExtent:o}=this,n=i?.imageSize,c=r?.attributes,l=s?.orientationAccuracy;if(!c||!n||!e||e.length<2||!l)return;const u="panoramic"===t?await this.getMeasurementPropertiesPanoramic():re(c,n[0],n[1]),h=e.at(0),m=e.at(-1);if(!(u&&h&&m&&l&&o))return;const p=[m,h],d=Ae(p,!1),g="panoramic"===t?await Ve(p,u,l,r,!0,!1):await Ce(p,u,l,!0,a);if(!g)return;const y="panoramic"===t?await Ge(l,d,u,g,r,!0):await Le(l,d,u,g,!0);return y?{value:g,accuracy:y}:{value:g}}async calculateAreaMeasurement(e,t,a){if(e.length<3||!this.currentBestFeature||!this.activeViewer?.imageSize||"none"===t)return null;const r="default"===t?await this.getMeasurementProperties():await this.getMeasurementPropertiesPanoramic();return y(a),r?"default"===t?await Re(e,r,!0):await Oe(e,r,!0,a):null}async calculateDistanceMeasurement(e,t,a){const{currentBestFeature:r,activeViewer:i}=this;if(e.length<2||!r||!i?.imageSize||"none"===t)return null;const s="default"===t?await this.getMeasurementProperties():await this.getMeasurementPropertiesPanoramic();return y(a),s?"default"===t?await Te([e.at(0),e.at(-1)],s,!0):await Be([e.at(0),e.at(-1)],s,!0):null}async calculateAccuracy(e,t,a){const{layer:r,currentBestFeature:i,activeViewer:s}=this,o=r?.orientationAccuracy,n=o?.every((e=>0===e))||!o?.length;if("area"===t&&e.length<3||"distance"===t&&e.length<2||!i||!s?.imageSize||n)return null;let c=null;if(this.triangularMeasurementActive&&this.currentBestFeatureMeasurementImage&&this.imageMeasurementViewer?c=await this.getMeasurementProperties(this.currentBestFeatureMeasurementImage,this.imageMeasurementViewer):(c=await this.getMeasurementProperties(),y(a)),!c)return null;const l="area"===t?await Re(e,c,!0):await Te([e.at(0),e.at(-1)],c,!0);y(a);const{updateElevationProps:u,...h}=c,m=je(h,o);if(!m?.length)return null;const p=m.map((e=>({...e,updateElevationProps:u}))).map((async r=>{const i="area"===t?await Re(e,r,!0):await Te([e.at(0),e.at(-1)],r,!0);if(y(a),i&&l){if("area"===t){const e="number"!=typeof i?i.area:null;return e?Math.abs(e-l.area):null}return Math.abs(i-l)}return null})),d=await Promise.all(p);y(a);const g=d.filter((e=>null!==e));return 0===g.length?null:xe(g)}async calculateLocationAccuracy(e,t,a="default",r){const{layer:i,currentBestFeature:s}=this,o=i?.orientationAccuracy,n=this.view?.spatialReference,c=o?.every((e=>0===e))||!o?.length;if(!s||c)return null;const l="default"===a?await this.getMeasurementProperties():await this.getMeasurementPropertiesPanoramic();if(y(r),!l)return null;const{updateElevationProps:u,...h}=l,m="default"===a?je(h,o):ze(h,o);if(!m?.length)return null;const p=m.map((e=>({...e,updateElevationProps:u}))).map((async i=>{const{updateElevationProps:s,...o}=i;let c="default"===a?await Z(e,o,s):await K(e,o,s);return y(r),n&&!c.spatialReference.equals(n)&&(c=await B(c,n),y(r)),c&&t?[Math.abs(c.x-t.x),Math.abs(c.y-t.y),c.z&&t.z?Math.abs(c.z-t.z):0]:null})),d=await Promise.all(p);if(y(r),!d?.length)return null;const g=d.map((e=>[e?.[0]??0,e?.[1]??0,e?.[2]??0])),[v,f,w]=Ee(g);return{x:v,y:f,z:w}}async calculateAccuracyPanoramic(e,t,a){const{layer:r,currentBestFeature:i,activeViewer:s,mode:o}=this,n=r?.orientationAccuracy,c=n?.every((e=>0===e))||!n?.length;if("area"===t&&e.length<3||"distance"===t&&e.length<2||!i||!s?.imageSize||c||"panoramic"!==o)return null;const l=await this.getMeasurementPropertiesPanoramic();if(y(a),!l)return null;const u="area"===t?await Oe(e,l,!0):await Be([e.at(0),e.at(-1)],l,!0);y(a);const{updateElevationProps:h,...m}=l,p=ze(m,n);if(!p?.length)return null;const d=p.map((e=>({...e,updateElevationProps:h}))).map((async r=>{const i="area"===t?await Oe(e,r,!0):await Be([e.at(0),e.at(-1)],r,!0);if(y(a),i&&u){if("area"===t){const e="number"!=typeof i?i.area:null;return e?Math.abs(e-u.area):null}return Math.abs(i-u)}return null})),g=await Promise.all(d);y(a);const v=g.filter((e=>null!==e));return 0===v.length?null:xe(v)}async calculateHeightMeasurementInfo(e,t,a){const{currentBestFeature:r,activeViewer:i}=this,s=i?.imageSize;if(!r||!i||!s?.length||"none"===t)return;const{attributes:o}=r,[n]=Ae([e],"panoramic"!==t),c="panoramic"===t?await this.getMeasurementPropertiesPanoramic():re(o,s[0],s[1]);if("panoramic"===t){if(!c)return;const e=await De(n,c,r,a);if(!e)return;e?.heading>180&&(e.heading-=360);const t=He(n,e),i=A([n.x,n.y],[e.x,e.y]);if(!t||!i)return;return{measurementAngle:t,tempDistance:i}}const l=await Ue(n,c,a);if(!l)return;const u=Ne(n,l),h=A([n.x,n.y],[l.x,l.y]);return u&&h?{measurementAngle:u,tempDistance:h}:void 0}async calculateTriangulatedMeasurements(e){switch(this.measureType){case"distance":{this.triangulatedDistanceMeasurement=await qe(this.measurementVectors);const t=await this.calculateAccuracy(e,"distance");if(t&&this.triangulatedDistanceMeasurement?.distance){const e=Math.atan(t/this.triangulatedDistanceMeasurement.distance);this.triangulatedDistanceAccuracy={distanceAccuracy:t,angleAccuracy:e}}break}case"area":if(this.currentBestFeatureMeasurementImage?.geometry.spatialReference){const t=await We(this.measurementVectors,this.currentBestFeatureMeasurementImage.geometry.spatialReference);this.triangulatedAreaMeasurement=t,this.triangulatedAreaAccuracy=await this.calculateAccuracy(e,"area")??this.triangulatedAreaAccuracy}}}clearPreviousMeasurements(){this.clearMeasurementGraphics(),this.resetMeasurementData(),this.stopMeasurement()}clearPreviousGroundLocation(){this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.pixelCoordinates=null,this.clearLocationPointOnImage()}clearMeasurementGraphics(){this.measurementGraphic&&(this.activeViewer?.removeGraphic(this.measurementGraphic),this.measurementGraphic=null),this.heightGraphic&&(this.activeViewer?.removeGraphic(this.heightGraphic),this.heightGraphic=null),this.triangularMeasurementActive&&this.sketchTriangularGraphicsLayer?.graphics.destroyAll()}digitizeCancel(){return this.sketch?.cancel()}digitizeCanRedo(){return this.sketch?.canRedo()??!1}digitizeCanUndo(){return this.sketch?.canUndo()??!1}digitizeComplete(){return this.sketch?.complete()}async digitizeCreate(e,t){const{sketch:a,dataCaptureLayer:r}=this;if(!a)throw It();Me(r,e,a),await a.create(e,{...t,defaultZ:0})}async digitizeDelete(){if(!this.sketch)throw It();return this.sketch.delete()}digitizeDuplicate(){if(!this.sketch)throw It();return this.sketch.duplicate()}digitizePlace(e,t){if(!this.sketch)throw It();return this.sketch.place(e,t)}digitizeRedo(){if(!this.sketch)throw It();return this.sketch.redo()}digitizeUndo(){if(!this.sketch)throw It();return this.sketch.undo()}digitizeUpdate(e,t){if(!this.sketch)throw It();return this.sketch.update(e,t)}async displayHeightResults(){const{currentBestFeature:e,activeViewer:t,heightMeasurementPixels:a,mode:r}=this,i=t?.imageSize,s=e?.attributes;if(!s||!i)return;const o=await this.computeHeight(a,r);o?.value&&o?.accuracy&&(this.heightMeasurementResult=o.value,this.heightMeasurementAccuracy=o.accuracy)}filterByFootprints(e,t,a=!1){const r=[],i=[],s=[];return e.forEach((e=>{const{layer:{coveragePercent:o},attributes:n}=e;let c;const l=I(e.geometry.spatialReference);n.cameraHeight/=l,n.farDistance/=l,n.nearDistance/=l,$(n.elevationSource)&&(n.elevationSource.constantElevation/=l);const{polygon:u,frustum:h}=U(n);if(c=u.clone(),n.isInspection&&(c=N(n)),o&&(c=W(c,o)),a||!t||q(c,t)){s.push(e);const{geometry:t,objectId:a,cameraHeight:o,cameraHeading:c}=n,l=t.clone();l.z=o,l.imageID=a,this.pointSources.push(l),c!==we&&(r.push(u),h&&i.push(h))}})),{features:s,polygons:r,frustums:i}}getMeasurementProperties(e=this.currentBestFeature,t=this.activeViewer){if(!e||!t?.imageSize)return;const{elevationSample:a,attributes:r}=e,{elevationSource:i,cameraHeight:s}=r,o=re(r,t.imageSize[0],t.imageSize[1]);let n=o.cameraLocation;return(n.spatialReference.isGeographic?B(n,j.WebMercator):Promise.resolve(n)).then((e=>(n=e,ie((n.z??0)-s,{elevationSample:a,elevationSource:i,extent:this.footprintExtent})))).then((t=>("elevationSample"in t&&se(t.elevationSample)&&(e.elevationSample=t.elevationSample),{...o,cameraLocation:n,updateElevationProps:t})))}getMeasurementPropertiesPanoramic(){const{currentBestFeature:e,activeViewer:t}=this;if(!e||!t?.imageSize)return;const{elevationSample:a,attributes:r}=e,{elevationSource:i,cameraHeight:s}=r,o=oe(r,t.imageSize[0],t.imageSize[1]);let n=o.cameraLocation;return(n.spatialReference.isGeographic?B(n,j.WebMercator):Promise.resolve(n)).then((e=>(n=e,ie((n.z??0)-s,{elevationSample:a,elevationSource:i,extent:this.footprintExtent})))).then((t=>("elevationSample"in t&&se(t.elevationSample)&&(e.elevationSample=t.elevationSample),{...o,cameraLocation:n,updateElevationProps:t})))}async deleteDataCaptureFeatures(e){const{dataCaptureLayer:t}=this;if(!t)throw new n("orientedimagery","Data capture layer is not available");return t.queryFeatures({objectIds:e}).then((({features:e})=>t.applyEdits({deleteFeatures:e})))}handleSectorClick(e){if(isNaN(e))return;const t=this._sectorData?.[Fe[e]],a=t?.at(0);a&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(a):this._updateCurrentBestFeature(a))}handleFeatureClick(e){const{sector:t,featureIndexInSector:a}=e;if(isNaN(a))return;const r=this._sectorData?.[t],i=r?.at(a);i&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(i):this._updateCurrentBestFeature(i))}handleDrawCursorUpdateEvents(e){const{measurementAngle:t,tempDistance:a,heightMeasurementPixels:r,mode:i,activeViewer:s}=this,o=s?.imageSize;if(!e.vertices||!o)return;const n=$e(e.vertices.at(-1),i,o);if(r.length<1||!n||!a||!t||"none"===i)return;const c=Je(r[0],n,t);if(!c?.length)return;this.heightMeasurementPixels.push(c),"panoramic"===i?this.createPolylineGraphicPano():this.createPolylineGraphic();const l=Ze(this.heightMeasurementPixels,a);l&&(this.heightMeasurementResult=l)}async handleDrawVertexAddEvents(e,t){const{currentBestFeature:a,activeViewer:r,heightMeasurementPixels:i,mode:s}=this;if(!a||!r||!e.vertices?.length||"none"===s)return;const o=r?.imageSize;if(!i.length&&o){const a=$e(e.vertices.at(-1),s,o);this.heightMeasurementPixels.push(a);const r=await this.calculateHeightMeasurementInfo(a,s,t);if(!r?.measurementAngle||!r?.tempDistance)return;this.measurementAngle=r.measurementAngle,this.tempDistance=r.tempDistance}}async load(e){return this.addResolvingPromise(this._loadViewAdapter(e).catch((e=>{if(!g(e))throw e}))),this}async loadBestImage(e,t){return this.view?.closePopup(),this.displayMessage=null,this.clearPreviousGroundLocation(),this.triangularMeasurementActive=!1,this.currentBestFeatureMeasurementImage=null,this.measureType=null,this.imageLocationToolState=!1,this.selectedPoint=e.spatialReference.isGeographic?z(e):e.clone(),this.features.removeAll(),this.currentBestFeature=null,this.additionalFeatures.removeAll(),this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),this._overlays?.removeAll(),this._fetchFeaturesWithController(e,t)}loadImageError(e){u.getLogger(this).error("oriented-imagery-viewer:load-image",e),this.setMessage("imageLoadError","error",e.message)}async loadSketch(e){if(!this.sketch){const t=import("../Sketch/SketchViewModel.js"),{default:a}=await t;y(e),this.sketch=new a({layer:this._sketchGraphicsLayer,view:this.activeViewer?.imageRenderer,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{edgeOperation:"none",shapeOperation:"none",vertexOperation:void 0},enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"transform"}})}return this.sketch}async loadMeasurementAdapter(e){if(!this.sketchAdapter){const t=import("./adapters/sketch/MeasurementAdapter.js"),{default:a}=await t;if(y(e),this.sketchAdapter=new a({viewModel:this}),!this.sketchAdapter.viewModel.isResolved())return}return this.sketchAdapter}async loadTriangulatedMeasurementAdapter(e){if(!this.triangulatedMeasurementAdapter){const t=import("./adapters/sketch/TriangulatedMeasurementAdapter.js"),{default:a}=await t;if(y(e),this.triangulatedMeasurementAdapter=new a({viewModel:this}),!this.triangulatedMeasurementAdapter.viewModel.isResolved())return}return this.triangulatedMeasurementAdapter}async processFeatureResponse(e,t,a){const{features:r}=e;if(this._clearFeatureGeometries(),!this._checkFeatures(r))return;const{features:i,polygons:s,frustums:o}=this.filterByFootprints(r,t,a?.skipFilter);if(!this._checkFeatures(i))return;this.coveragePolygons.addMany(s),this.coverageFrustums.addMany(o);const n=await this.processElevationSample(s,i,a);y(a),await this._updateElevationOfSelectedPointAndLocations(i,t,n),y(a),pt(i,n);const c=this._processSuitableFeatures(i,t);this.updateSuitabilities(c,a?.loadBestImage)}async startMeasurement(e,t){this.sketch||await this.loadSketch(t),await this.loadMeasurementAdapter(t);const{sketch:a,sketchAdapter:r,activeViewer:i,mode:s}=this;if(!a||!r||!i||"none"===s)return;if(this.displayNewMeasurementButton=!1,"panoramic"===s&&(a.defaultCreateOptions.defaultZ=0),await a.create(e),"panoramic"===s){const{drawOperation:e}=a.view.activeTool;e.constraintsEnabled=!1,e._set("elevationDrawSurface",null)}const o=this.activeViewer?.imageRenderer.effectiveTheme.accentColor;o&&this.sketch&&(this.sketch.polygonSymbol=et(o),this.sketch.polylineSymbol="panoramic"===s?tt:at(o,2.5))}startHeightMeasurement(){this.heightMeasurementPixels=[],this.displayNewMeasurementButton=!1,this.draw??=new de({view:this.activeViewer?.imageRenderer});this.draw.create("polyline").on(["cursor-update","vertex-add","draw-complete"],(e=>this.handleDrawEvents(e)))}createPolylineGraphic(){const e=[this.heightMeasurementPixels[0],this.heightMeasurementPixels.at(-1)],a=this.activeViewer?.imageRenderer.spatialReference;if(this.heightGraphic)this.heightGraphic.geometry=new T({paths:[e],spatialReference:a});else{const r=new T({paths:[e],spatialReference:a}),i=this.activeViewer?.imageRenderer.effectiveTheme.accentColor;this.heightGraphic=new t({geometry:r,symbol:at(i,2.5)}),this.activeViewer?.addGraphic(this.heightGraphic)}}createPolylineGraphicPano(){const e=this.activeViewer?.imageRenderer.spatialReference,a=this.activeViewer?.imageSize;if(!a)return;const r={x:this.heightMeasurementPixels[0][0],y:this.heightMeasurementPixels[0][1]},i={x:this.heightMeasurementPixels.at(-1)[0],y:this.heightMeasurementPixels.at(-1)[1]},{heading:s,pitch:o}=te(r,a[0],a[1]),{heading:n,pitch:c}=te(i,a[0],a[1]),l=[[...ae(s,o)],[...ae(n,c)]];if(this.heightGraphic)this.heightGraphic.geometry=new T({paths:[l],spatialReference:e});else{const a=new T({paths:[l],spatialReference:e});this.heightGraphic=new t({geometry:a,symbol:tt}),this._panoramicViewer.addGraphic(this.heightGraphic,0)}}async editOverlayedGraphics(e){this.sketchTriangularGraphicsLayer||this._initializeSketchTriangularGraphicsLayer(),this.sketchTriangularGraphicsLayer?.destroyed&&this._handleDestroyedTriangularSketchLayer(),this.sketchTriangularGraphicsLayer.add(e),this.sketchTriangular||(this._initializeSketchTriangular(),await this.loadTriangulatedMeasurementAdapter()),this.updateOverlayedGeometry(e)}updateOverlayedGeometry(e){this.sketchTriangular?.update([e],{tool:"reshape"})}async processMeasurementVectors(e){this.triangularMeasurementActive&&this.currentBestFeature&&(this.measurementVectors?.length<2&&await this.updateMeasurementVectorsArray(e),2===this.measurementVectors.length&&await this.calculateTriangulatedMeasurements(e))}async updateMeasurementVectorsArray(e){const t=this.measurementVectors.length?this.currentBestFeatureMeasurementImage:this.currentBestFeature;if(t){const a=await this.computeMeasurementVector(e,t);a&&this.measurementVectors.push(a)}}async computeMeasurementVector(e,t){const{activeViewer:a,mode:r}=this,i=a?.imageSize;if(!e||!t||!i)return;const s=e.map((e=>[e[0]-.5,-.5-e[1]])),o=this.view?.spatialReference,n=[];for(let c=0;c<s.length;c++){const e={x:s[c][0],y:s[c][1]};let a=await this.getMapPoint(e,{feature:t,imageSize:i,mode:r});o&&!a.spatialReference.equals(o)&&(a=await B(a,o)),n.push(a)}return Ke(n,t)}async handleDrawEvents(e,t){if(this.draw)switch(e.type){case"cursor-update":this.handleDrawCursorUpdateEvents(e);break;case"vertex-add":this.handleDrawVertexAddEvents(e,t);break;case"draw-complete":await this.displayHeightResults()}}initializeMeasurement(e){switch(this.clearMeasurementGraphics(),this.resetMeasurementData(),e){case"distance":this.startMeasurement("polyline");break;case"area":this.startMeasurement("polygon");break;case"height":this.startHeightMeasurement()}}async overlayCameraLocations(e){const{activeViewer:a,currentBestFeature:r,overlayedCameraLocations:i,layer:s,mode:o,state:n}=this,c=a?.imageSize;if(!c||!r||!s||"none"===o||n.includes("loading"))return;const{polygon:l}=U(r.attributes);if(a.removeManyGraphics(i.toArray()),i.removeAll(),e){const{features:e}=await s.queryFeatures({where:`${s.objectIdField} <> ${r.attributes.objectId}`,geometry:l,returnGeometry:!0,outFields:[s.objectIdField]}),n=await Promise.all(e.map((async e=>{const{attributes:a,geometry:i}=e,s=await this.getPixels(i,{feature:r,imageSize:c,mode:o}),n=rt.clone();return n.outline=new pe({color:[0,0,0],width:1}),new t({attributes:a,symbol:n,geometry:s})})));i.addMany(n),a.addManyGraphics(i.toArray())}}overlayGraphicsOnImage(e,t){this.removeOverlayedGraphicsOnImage(e),this.overlayedMapFeatures.set(e,t),this.activeViewer?.addManyGraphics(t.toArray())}async overlayMapFeatures(e,a=!1){const{activeViewer:i,currentBestFeature:o,mode:n,state:c,layer:l}=this,h=i?.imageSize;if(!h||!o||"none"===n||c.includes("loading")||!l)return;const{polygon:m}=U(o.attributes);try{const{imageGeometryField:t,oiObjectIdField:a}=_e(e,l.imageGeometryField,l.imageReferenceField);this.imageGeometryField=t.name,this.oiObjectIdField=a.name}catch(g){u.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features",g)}const{features:p}=await e.queryFeatures({geometry:m,returnGeometry:!0,outFields:["*"]}),d=new s((await Promise.all(p.map((async r=>{const i=r.symbol?.clone()??e.renderer?.getSymbol(r)?.clone(),{attributes:s,geometry:c}=r,l=c,{imageGeometryField:m,oiObjectIdField:p}=this;if(m&&p&&Pe(e,m,p)&&`${s[p]}`==`${o.attributes.objectId}`)try{return Ie(s,m,e,a,h,n,i)}catch(g){u.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features","couldn't create graphic from attributes, geometry will be used",{error:g,feature:r,layer:e,imageGeometryField:this.imageGeometryField,imageReferenceField:this.oiObjectIdField})}switch(l?.type){case"point":{const r=await this.getPixels(l,{feature:o,imageSize:h,mode:n});return new t({attributes:s,layer:e,symbol:i,geometry:r,visible:e.visible&&a})}case"polygon":{const{rings:r,spatialReference:c}=l,u=r.map((e=>e.map((([e,t,a])=>new R({x:e,y:t,z:a,spatialReference:c}))))),m=await Promise.all(u.map((async e=>this.getPixels(e,{feature:o,imageSize:h,mode:n}).then((e=>e.map(ne))))));return new t({attributes:s,layer:e,symbol:i,geometry:new O({rings:m,spatialReference:j.WebMercator}),visible:e.visible&&a})}case"polyline":{const{paths:r,spatialReference:c}=l,u=r.map((e=>e.map((([e,t,a])=>new R({x:e,y:t,z:a,spatialReference:c}))))),m=await Promise.all(u.map((async e=>this.getPixels(e,{feature:o,imageSize:h,mode:n}).then((e=>e.map(ne))))));return new t({attributes:s,layer:e,symbol:i,geometry:new T({paths:m,spatialReference:j.WebMercator}),visible:e.visible&&a})}case"multipoint":{const{points:r,spatialReference:c}=l,u=r.map((([e,t,a])=>new R({x:e,y:t,z:a,spatialReference:c}))),m=await this.getPixels(u,{feature:o,imageSize:h,mode:n}).then((e=>e.map(ne)));return new t({attributes:s,layer:e,symbol:i,geometry:new L({points:m,spatialReference:j.WebMercator}),visible:e.visible&&a})}}return null})))).filter(r));this.overlayGraphicsOnImage(`${e.id}`,d)}async getPixels(e,t){const{imageSize:a,mode:r}=t,i=(await this.worldToImage(Array.isArray(e)?e:[e])).map((e=>{if("default"===r)return new R({x:e.x-.5,y:.5-e.y,spatialReference:j.WebMercator});const[t,i]=a,{heading:s,pitch:o}=te(e,t,i),n=ae(s,o);return new R(n,j.WebMercator)}));return Array.isArray(e)?i:i[0]}async getMapPoint(e,t){const{feature:a,mode:r,imageSize:i}=t,{elevationSample:s,attributes:o}=a,{elevationSource:n,location:c,elevation:l,cameraHeight:u}=o;let h=c.clone();h.spatialReference.isGeographic&&(h=await B(h,j.WebMercator));const m=await ie(l??(c.z??0)-u,{elevationSample:s,elevationSource:n,extent:this.footprintExtent});let p;if("elevationSample"in m&&se(m.elevationSample)&&(a.elevationSample=m.elevationSample),"default"===r){const t=re(o,i[0],i[1]);p=await Z(Array.isArray(e)?e:[e],{...t,cameraLocation:h},m)}else{const t=oe(o,i[0],i[1]);p=await K(Array.isArray(e)?e:[e],{...t,cameraLocation:h},m)}return Array.isArray(e)?p:p[0]}getActiveSectors(){return Fe.filter((e=>this._sectorData?.[e]?.length))}async plotMapPoint(e){return this.plotReferencePoint(e),this.transformAndPlotReferencePointOnImage({feature:this.currentBestFeature,selectedLocation:e,options:{signal:this._transformController?.signal}})}plotReferencePointOnGround(e){this._referencePointOnGround&&(this._overlays?.remove(this._referencePointOnGround),this._referencePointOnGround.destroy()),null!=e&&(this._referencePointOnGround=new t({geometry:new R({...e.toJSON()}),symbol:it}),this.view?this._overlays?.add(this._referencePointOnGround):this.emit("plot-ground-point",{data:{point:this._referencePointOnGround?.geometry}}))}plotReferencePointOnImage(e){if("image-loaded"===this.state)switch(this.clearReferencePointOnImage(),this.mode){case"default":{const a=V(e)?e.toJSON():e;a.x-=.5,a.y=.5-a.y,this._referencePointOnImage=new t({geometry:new R({spatialReference:this._imageViewer.imageRenderer.spatialReference,...a}),symbol:it}),this._imageViewer.addGraphic(this._referencePointOnImage,0);break}case"panoramic":{const{imageSize:a}=this._panoramicViewer;if(!a)return;const[r,i]=a,{heading:s,pitch:o}=te(e,r,i),n=ae(s,o);this._referencePointOnImage=new t({geometry:new R(n,j.WebMercator),symbol:st}),this._panoramicViewer.addGraphic(this._referencePointOnImage,0);break}}}plotLocationPointOnImage(e,t=!1){if("image-loaded"===this.state)switch(this.clearLocationPointOnImage(t),this.mode){case"default":this._plotLocationPointOnDefaultImage(e,t);break;case"panoramic":this._plotLocationPointOnPanoramicImage(e)}}removeAllOverlayMapFeatures(){this.overlayedMapFeatures.forEach((e=>{this._imageViewer.removeManyGraphics(e.toArray())})),this.overlayedMapFeatures.clear()}removeOverlayedGraphicsOnImage(e){const t=this.overlayedMapFeatures.get(e);t?.length&&(this.activeViewer?.removeManyGraphics(t.toArray()),this.overlayedMapFeatures.delete(e))}resetImage(){switch(this.setMessage("onLoadMessage","info"),this.mode){case"default":this._imageViewer.clearImage(),this._imageViewer.clearGraphics();break;case"panoramic":this._panoramicViewer.clearGraphics()}this._clickTask=m(this._clickTask)}resetMeasurementData(){this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.heightMeasurementPixels=[],this.measurementVectors=[],this.heightMeasurementResult=0,this.tempDistance=null,this.measurementAngle=null,this.heightMeasurementAccuracy=0,this.heightGraphic=null,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedMeasurementGraphic=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaAccuracy=0}async saveDrawing(){const{dataCaptureLayer:e,sketchAdapter:t}=this;if(!e||"data-capture"!==t?.type)return;const{pendingGraphics:a,savedGraphics:r}=t,i=a.get(e.id),s=i?.toArray();if(!i||!s?.length)return;const{addFeatureResults:o}=await this.saveDataCaptureFeatures(s),n=o.reduce(((t,{objectId:a,globalId:r,error:i},o)=>{const n=s[o],{attributes:c}=n;return i?t.error.push(n):(a&&(c[e.objectIdField]=a),r&&e.globalIdField&&(c[e.globalIdField]=r),t.success.push(n)),t}),{success:[],error:[]});r.addMany(n.success),i.removeAll(),i.addMany(n.error)}async saveDataCaptureFeatures(e){const{activeViewer:t,currentBestFeature:a,dataCaptureLayer:i,mode:s}=this,o=t?.imageSize;if(!o||!a||"none"===s)throw new n("orientedimagery","Image size, current best feature and mode are required to save data capture features");if(!i)throw new n("orientedimagery","Data capture layer is not available");const c=await Promise.all(e.map((async e=>{const t=e.clone(),{geometry:r}=t;if(!r)return;const n=r.type,c=i.hasZ,l=i.geometryType,u=n!==l,h=u?await import("./transformers.js"):null,m=h?.default[l],p=u?m?.(r):r;if(p)switch(p.type){case"point":return t.geometry=await this.getMapPoint(ce(s,p,o),{feature:a,imageSize:o,mode:s}),c||(delete t.geometry.z,t.geometry.hasZ=!1),t.geometry.hasM=!1,t;case"polygon":{const e=await Promise.all(p.rings.map((async e=>this.getMapPoint(e.map((([e,t,a])=>ce(s,{x:e,y:t,z:a},o))),{feature:a,imageSize:o,mode:s}))));return t.geometry=new O({spatialReference:e[0][0].spatialReference,hasZ:c,hasM:!1,rings:e.map((e=>e.map(ne)))}),t}case"polyline":{const e=await Promise.all(p.paths.map((async e=>this.getMapPoint(e.map((([e,t,a])=>ce(s,{x:e,y:t,z:a},o))),{feature:a,imageSize:o,mode:s}))));return t.geometry=new T({spatialReference:e[0][0].spatialReference,hasZ:c,hasM:!1,paths:e.map((e=>e.map(ne)))}),t}}}))),l=c.filter(r);return i.applyEdits({addFeatures:l}).then((e=>{const{addFeatureResults:t}=e;let a=0;const r=c.map((e=>{const r=t[a++];return e?r:{error:new n("orientedimagery","Error in saving data capture features"),objectId:null,globalId:null}}));return{...e,addFeatureResults:r}}))}async searchBestImage(e,t){try{const a=await D(e,t);a&&await this.processFeatureResponse(a,e.point,t)}catch(a){g(a)||(this.setMessage("imageLoadError","error",a.message),u.getLogger(this).error("error occurred while finding best image",a))}}selectTriangularMeasurementFeature(e){this.currentBestFeatureMeasurementImage=this.features?.find((({attributes:t})=>t.objectId===Number(e)))}setAdditionalCameraLocationsVisibility(e){this.additionalCameraLocations.forEach((t=>{t.visible=e}))}setAdditionalCoverageVisibility(e){this.additionalFootprints.forEach((t=>{t.visible=e}))}setCurrentCoverageVisibility(e){this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.visible=e),this.currentBestFeatureLocation&&(this.currentBestFeatureLocation.visible=e)}setMapImageConversionToolState(e){this.mapImageConversionToolState=e}setCurrentPanoramaView(e,t){this._panoramicViewer?.set({yaw:e,pitch:t})}async startDataCapture(e,t){const a=this.activeViewer?.imageRenderer,{oiObjectIdField:r,currentBestFeature:i}=this;if(!a||!i||!r)return;const{attributes:{objectId:o}}=i,n=this.overlayedMapFeatures.get(e.id)?.toArray()??[],c=[],l=[];for(const s of n)`${s.getAttribute(r)}`==`${o}`?c.push(s):l.push(s);this.overlayGraphicsOnImage(e.id,new s(l)),this.collectionId=e.id;const u=await this.loadSketch(t),h=await this.loadDataCaptureAdapter(t);y(t),u.layer.addMany(c),u.layer.blendMode="source-atop",h.savedGraphics.addMany(c);a.ui.find("zoom").visible=!1,a.map.layers.add(this.sketchGraphicsLayer)}async stopDataCapture(e=!1){this.sketch?.cancel(),this.sketchGraphicsLayer?.removeAll(),this.sketchAdapter=p(this.sketchAdapter),this.sketch=p(this.sketch),this.collectionId=null;const{dataCaptureLayer:t}=this,a=this.activeViewer?.imageRenderer;if(!a||a.destroyed)return;a.map.layers.remove(this.sketchGraphicsLayer),e&&t&&await this.overlayMapFeatures(t,!0);const r=a.ui.find("zoom");r&&(r.visible=!0)}stopMeasurement(){this.heightMeasurementPixels=[],this.draw?.reset(),this.sketch?.cancel()}toggleAllOverlayMapFeatures(e){this.overlayedMapFeatures.forEach((t=>{this._toggleVisiblity(t,e)}))}toggleOverlayMapFeatures(e,t){const a=this.overlayedMapFeatures.get(e);a&&this._toggleVisiblity(a,t)}toggleSelection(e){const{sketch:t}=this;t&&(t.updateOnGraphicClick=e,t.cancel())}async transformAndPlotReferencePointOnImage(e){const{selectedLocation:t,options:a}=e;let r=!1,i=!1;const s=this.bestFeatureFootprint?.geometry;switch(s?.type){case"polygon":{const e=t.spatialReference.equals(s.spatialReference)?t:await B(t,s.spatialReference);r=s.contains(e);break}case"mesh":{const e=t.spatialReference.equals(s.spatialReference)?t:await B(t,s.spatialReference);i=s.extent.contains(e);break}}if(!r&&!i)return void this.clearReferencePointOnImage();const o=await this.worldToImage(t,a);if(o)return y(a),this.plotReferencePointOnImage(o),{x:o.x,y:o.y};this.clearReferencePointOnImage()}async _calculateTriangulatedPointFromGroundPoint(e,t){if(this.currentBestFeatureMeasurementImage&&e){const{currentBestFeatureMeasurementImage:a}=this,r=Ke(e,a);r&&this.measurementVectors.push(r);const i=await Qe(this.measurementVectors);y(t),this.triangulatedPoint=i??this.triangulatedPoint}}async _fetchFeatures(e,t){if(!this.view)return;const a=this.layer;if(a){const r={include:a},i=this.view.toScreen(e);if(!i)return;const s=await this.view.hitTest(i,r);return this._processHitTestResults(a,s,t)}}async _fetchFeaturesWithController(e,t){try{await this._fetchFeatures(e,t)}catch(a){if(g(a))return;this.setMessage("imageLoadError","error"),u.getLogger(this).error("error occurred while fetching features",a)}}_groupFeaturesBySectors(){const{_suitabilities:e,additionalFeatures:t,currentBestFeature:a,features:r,invalidCameraHeading:i}=this;if(!e||!t||!a||!r||i)return void(this._sectorData=null);this._sectorData={};const o={};this._featureToSector=o;for(const h of Fe)this._sectorData[h]=new s;const n=e.map(((e,t)=>({...e,featureIndex:t})));n.sort(((e,t)=>e.trueSuitability-t.trueSuitability));const c=n.map((({distance:e})=>e)),l=Math.max(...c),u=r.reduce(((e,t)=>Math.max(e,t.attributes.location.z??0)),-1/0);n.forEach((e=>{const{distance:t,angle:a,featureIndex:i}=e,s=t/l*be[2],n=gt(t,l),c=dt(a);if(!this._sectorData)return;const h=be[3]+s*Math.sin(a*Math.PI/180),m=be[3]+s*Math.cos(a*Math.PI/180);let p;const d=r.at(i),g=(d.attributes.location.z??0)/u*be[2],y=d===this.currentBestFeature,v=this.currentBestFeature?.attributes.cameraPitch&&this.currentBestFeature?.attributes.cameraPitch<5;if(y&&v)p=-90;else{const e=h-be[3],t=m-be[3],a=t/Math.sqrt(e**2+t**2);let r=180*Math.acos(a)/Math.PI;(e<0&&t<0||e<0&&t>0)&&(r*=-1),p=r}const f=""===n?c:`${n}_${c}`;y&&(p===this.bestFeatureAngle?this.previousFeatureAngle=p:this.bestFeatureAngle=p,this.navigatorCurrentBestFeature=v?null:{x:h,y:m,direction:c}),o[`${d.attributes.objectId}`]=f;const w=this._sectorData[f];w.add({angle:a,featureIndex:i,x:h,y:m,z:g,objectID:d.attributes.objectId,sector:f,featureIndexInSector:w.length})}))}_handleDestroyedTriangularSketchLayer(){this.sketchTriangularGraphicsLayer&&(this.imageMeasurementViewer.imageRenderer.map.layers.remove(this.sketchTriangularGraphicsLayer),this.sketchTriangularGraphicsLayer=new E,this.imageMeasurementViewer.imageRenderer.map.layers.add(this.sketchTriangularGraphicsLayer),this.sketchTriangular&&(this.sketchTriangular.layer=this.sketchTriangularGraphicsLayer,this.sketchTriangular.view=this.imageMeasurementViewer.imageRenderer))}_initializeSketchTriangular(){this.sketchTriangular=new bt({view:this.imageMeasurementViewer.imageRenderer,layer:this.sketchTriangularGraphicsLayer,updateOnGraphicClick:!1,defaultUpdateOptions:{toggleToolOnClick:!1}})}_initializeSketchTriangularGraphicsLayer(){this.sketchTriangularGraphicsLayer=new E,this.imageMeasurementViewer.imageRenderer.map.layers.add(this.sketchTriangularGraphicsLayer)}_plotLocationPointOnDefaultImage(e,a=!1){const r=V(e)?e.toJSON():e;r.x-=.5,r.y=.5-r.y,a?(this._correctedLocationPointOnImage=new t({geometry:new R({spatialReference:j.WebMercator,...r}),symbol:ot}),this.imageMeasurementViewer.addGraphic(this._correctedLocationPointOnImage,0)):(this._locationPointOnImage=new t({geometry:new R({spatialReference:j.WebMercator,...r}),symbol:ot}),this._imageViewer.addGraphic(this._locationPointOnImage,0))}_plotLocationPointOnPanoramicImage(e){const{imageSize:a}=this._panoramicViewer;if(!a)return;const[r,i]=a,{heading:s,pitch:o}=te(e,r,i),n=ae(s,o);this._locationPointOnImage=new t({geometry:new R(n,j.WebMercator),symbol:nt}),this._panoramicViewer.addGraphic(this._locationPointOnImage,0)}_clearFeatureGeometries(){this.coveragePolygons.removeAll(),this.coverageFrustums.removeAll(),this.pointSources.removeAll()}_checkFeatures(e){return!!e?.length||(this.setMessage("noImageError","error"),this.currentBestFeature=null,!1)}async _getElevationSampleFromGround(e,t,a){if(!e[0])return;const r=await G(e);if(this._updateFootprintWithFeatures(t,r),this.view?.supportsGround)try{return await this.view.map.ground.createElevationSampler(this.footprintExtent,a)}catch(i){g(i)||u.getLogger(this).error(i)}}async processElevationSample(e,t,a){const{elevationSource:r}=t[0].attributes,i=await this._getElevationSampleFromGround(e,t,a);return i||(r&&this.footprintExtent&&J(r)?await X({extent:this.footprintExtent,lod:r.lod,url:r.url,rasterFunction:r.rasterFunction}):void 0)}_processSuitableFeatures(e,t){return H({features:e,selectedPoint:t,camera:yt(this.view)?this.view.camera:null,currentImage:this.currentBestFeature})}async _processHitTestResults(e,t,a){const{screenPoint:r,results:[i]}=t,s="graphic"===i?.type&&this.shouldShowSelectedImage,o=i?.mapPoint??this.view?.toMap(r);if(!o)return;const{layerFloorFilterClause:n}=this,c=e.spatialReference.equals(o.spatialReference)?o:await B(o,e.spatialReference),l=c.spatialReference.isGeographic?z(c):c,u=P("1=1",P(e.definitionExpression,n)),h=l.spatialReference.isGeographic?1:I(l.spatialReference),m={layerInstanceOrURL:e,point:l,queryParams:{where:u,maximumDistance:e.maximumDistance?e.maximumDistance/h:void 0,objectIds:s?[i.graphic.getAttribute(e.objectIdField)]:void 0}};await this.searchBestImage(m,a)}_reorderTriangularSketchLayer(){const e=this.imageMeasurementViewer.imageRenderer.map.layers?.length;this.sketchTriangularGraphicsLayer&&e&&this.imageMeasurementViewer.imageRenderer.map.layers.reorder(this.sketchTriangularGraphicsLayer,e-1)}_resetCursor(){const{activeViewer:e,imageMeasurementViewer:t}=this;e&&(e.imageRenderer.cursor=this._previousCursor),t&&(t.imageRenderer.cursor=this._previousCursor)}async _setImageSource(e,t,a,r,i,s){e.imageSource={datasetFormat:t.toUpperCase(),url:a.split("?")[0]},e.customParameters=Object.fromEntries(r),e.imageRotation=i??0,await e.loadImage(s)}_setMeasurementCursor(){const{activeViewer:e,imageMeasurementViewer:t,triangularMeasurementActive:a}=this;e&&(this._previousCursor=e.imageRenderer.cursor,e.imageRenderer.cursor="crosshair"),t&&a&&(t.imageRenderer.cursor="crosshair")}_toggleVisiblity(e,t){e.forEach((e=>{e.visible=t}))}_triangulatedLocationWorkflow(e){if(this.currentBestFeature&&e){const{currentBestFeature:t}=this;this.triangulatedPoint&&(this.measurementVectors=[],this.triangulatedPoint=null,this.clearLocationPointOnImage(!0));const a=Ke(e,t);if(!a)return;this.measurementVectors.push(a),this.plotReferenceLocationPoint(e),this._createTriangularImageLocationHandle()}}async _updateElevationOfSelectedPointAndLocations(e,t,a,r){const i=se(a),s=await ie((e[0].attributes.location.z??0)-e[0].attributes.cameraHeight,{elevationSample:i?a:void 0,elevationSource:i?void 0:e[0].attributes.elevationSource,extent:this.footprintExtent},r);y(r);const[o,...n]=await Q([t,...e.map((e=>e.attributes.geometry.clone()))],s);y(r),t.elevation=o.z,e.forEach(((e,t)=>{e.attributes.elevation=n[t].z}))}_updateFeatures(e,t=!0){if(!e.length)return this.currentBestFeature=null,void this.additionalFeatures.removeAll();this.features.removeAll(),this.features.addMany(e),this.navigationNodes.removeAll(),this.navigationNodes.addMany(e.map((e=>new wt({geometry:e.geometry,attributes:e.attributes})))),e.length>1?this.additionalFeatures.addMany(e.slice(1)):this.additionalFeatures.removeAll(),this._updateGroundElevation=!0,t&&(this.currentBestFeature=e[0])}_updateFootprintWithFeatures(e,t){const a=[];for(const{geometry:r}of e)t.contains(r)||a.push([r.x,r.y]);a.sort(((e,t)=>+x([e,t]))),t.addRing(a),this.footprintExtent=ge(t.extent,2,2)}async _updatePointsAndPolygons(e){const{pointSources:a,currentBestFeature:r,currentCoverageVisible:i,isAdditionalPointSourcesVisible:s}=this;if(r&&(this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.destroy(),this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null),!this.invalidCameraHeading)){await(this._adapter?.createFootprints(e)),y(e);for(const e of a)e.imageID===r.attributes.objectId?this.currentBestFeatureLocation=new t({attributes:{imageID:e.imageID},geometry:e.clone(),symbol:ct,visible:i}):this.additionalCameraLocations.push(new t({attributes:{imageID:e.imageID},geometry:e.clone(),symbol:rt,visible:s}))}}_updateCurrentBestFeature(e){if(!e)return;this.currentBestFeature=this.features?.at(e.featureIndex);const t=this.currentBestFeature?.attributes.cameraPitch&&this.currentBestFeature?.attributes.cameraPitch<5;let a;if(t)a=-90;else{const t=e.x-be[3],r=e.y-be[3],i=r/Math.sqrt(t**2+r**2);let s=180*Math.acos(i)/Math.PI;(t<0&&r<0||t<0&&r>0)&&(s*=-1),a=s}a===this.bestFeatureAngle?this.previousFeatureAngle=a:this.bestFeatureAngle=a,this.navigatorCurrentBestFeature=t?null:{x:e.x,y:e.y,direction:e.sector.includes("_")?e.sector.split("_")[1]:e.sector}}_updateImageMeasurementBestFeature(e){e&&(this.currentBestFeatureMeasurementImage=this.features?.at(e.featureIndex))}clearGraphics(){this._imageViewer.clearGraphics(),this._panoramicViewer.clearGraphics(),this.imageMeasurementViewer.clearGraphics()}clearReferencePointOnImage(){this._referencePointOnImage&&(this._imageViewer.removeGraphic(this._referencePointOnImage),this._panoramicViewer.removeGraphic(this._referencePointOnImage),this._referencePointOnImage=p(this._referencePointOnImage))}clearLocationPointOnImage(e=!1){this._locationPointOnImage&&!e&&(this._imageViewer.removeGraphic(this._locationPointOnImage),this._panoramicViewer.removeGraphic(this._locationPointOnImage),this._locationPointOnImage=p(this._locationPointOnImage)),this._correctedLocationPointOnImage&&(this.imageMeasurementViewer.removeGraphic(this._correctedLocationPointOnImage),this._correctedLocationPointOnImage=p(this._correctedLocationPointOnImage))}plotReferencePoint(e){"mapPoint"in e?this.plotReferencePointOnGround(e.mapPoint):this.plotReferencePointOnGround(e)}plotReferenceLocationPoint(e){if(this.currentBestFeatureMeasurementImage){const t=this.imageMeasurementViewer.imageSize[0],a=this.imageMeasurementViewer.imageSize[1],r=le(this.currentBestFeatureMeasurementImage.attributes,t,a),i=ue(e,r);this.plotLocationPointOnImage(i,!0)}}setMessage(e,t,a,r){this.displayMessage={key:e,type:t,data:a,map:r}}async transformAndPlotSelectedLocation(e){const{currentBestFeature:t,invalidCameraHeading:a,selectedPoint:r,activeViewer:i}=this;if(this._crossSymbol&&(this._panoramicViewer.removeGraphic(this._crossSymbol),this._imageViewer.removeGraphic(this._crossSymbol),this._crossSymbol=p(this._crossSymbol)),!r||!t||"image-loaded"!==i?.state||a)return;let s;try{s=await this.worldToImage(r,e),y(e),await this.plotSelectedPointOnImage(s,e)}catch(o){g(o)||u.getLogger(this).error("failed to transform map point to pixel, cross symbol will not be plotted on image",{error:o,selectedPoint:r,feature:t})}}async worldToImage(e,t){const{footprintExtent:a}=this,{imageSize:r}=this.activeViewer;if("none"===this.mode||!this.currentBestFeature||!r||!a)return;const{attributes:{location:i,elevationSource:s,cameraHeading:o,elevation:n,cameraHeight:c},elevationSample:l}=this.currentBestFeature;let u=i.clone();const h=await ie(n??(i.z??0)-c,{elevationSample:l,elevationSource:s});this.currentBestFeature.elevationSample=h.elevationSample;const m=Array.isArray(e)?e:[e];let p,d=await Promise.all(m.map((e=>new Promise((t=>{if(!e.hasZ)return t(Q(e,h));t(e)})))));if(i.spatialReference.isGeographic&&(u=await B(u,j.WebMercator,t)),d=await Promise.all(d.map((async e=>u.spatialReference.equals(e.spatialReference)?e:await B(e,u.spatialReference,t)))),y(t),"panoramic"===this.mode)p=he(d,{imageHeight:r[1],imageWidth:r[0],cameraHeading:o,cameraLocation:u});else{const e=le(this.currentBestFeature.attributes,r[0],r[1]);p=ue(d,{...e,cameraLocation:u})}return Array.isArray(e)?p:p[0]}updateCurrentCoveragePolygon(e){const{additionalFootprints:a,additionalCameraLocations:r,currentBestFeature:i,currentBestFeatureLocation:s,currentCoverageVisible:o,selectedPoint:n,view:c,_adapter:l,mode:u}=this,{attributes:{objectId:h},elevationSample:m}=i;if(this._initialCurrentCoverageUpdate){if(this._overlays?.removeAll(),this._initialCurrentCoverageUpdate=!1,this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint),e&&!this.invalidCameraHeading&&(e.visible=o,this.bestFeatureCurrentFootprint=e),c){const e=[...a,...r,s].filter(vt);c.supportsGround&&m&&l?.updateGroundElevation&&(this._updateGroundElevation&&l.updateGroundElevation(e,m),"panoramic"===u&&l.updateGroundElevation([this.bestFeatureCurrentFootprint],m)),this._updateGroundElevation=!1,n&&(e.splice(-2,0,this.bestFeatureCurrentFootprint),e.push(new t({geometry:n.clone(),symbol:Xe.clone(),attributes:{imageID:h}}))),this._overlays.graphics.addMany(e)}}else if(c){if(this.invalidCameraHeading)return;this.bestFeatureCurrentFootprint&&(this._overlays?.remove(this.bestFeatureCurrentFootprint),this.bestFeatureCurrentFootprint=p(this.bestFeatureCurrentFootprint));const t=this.bestFeatureCurrentFootprint&&this._overlays?this._overlays.graphics.indexOf(this.bestFeatureCurrentFootprint):-1;e&&(this.bestFeatureCurrentFootprint=e,c?.supportsGround&&m&&l?.updateGroundElevation&&"panoramic"===u&&l.updateGroundElevation([e],m),e.visible=this.currentCoverageVisible,this._overlays?.graphics.add(this.bestFeatureCurrentFootprint,t>=0?t:this._overlays.graphics.length-1))}}};e([S()],St.prototype,"activeLayer",null),e([S({readOnly:!0})],St.prototype,"activeViewer",null),e([S()],St.prototype,"accuracyParametersMissing",null),e([S()],St.prototype,"additionalFeatures",void 0),e([S({type:s.ofType(t)})],St.prototype,"additionalCameraLocations",void 0),e([S({type:s.ofType(t)})],St.prototype,"additionalFootprints",void 0),e([S()],St.prototype,"areaMeasurementResult",void 0),e([S()],St.prototype,"areaMeasurementAccuracy",void 0),e([S()],St.prototype,"bestFeatureAngle",void 0),e([S()],St.prototype,"bestFeatureCurrentFootprint",void 0),e([S({type:t})],St.prototype,"bestFeatureFootprint",void 0),e([S({type:Number})],St.prototype,"brightness",null),e([S()],St.prototype,"cameraHeadingThreshold",void 0),e([S()],St.prototype,"cameraPitchThreshold",void 0),e([S()],St.prototype,"collectionId",void 0),e([S({type:Number})],St.prototype,"contrast",null),e([S()],St.prototype,"conversionProps",void 0),e([S()],St.prototype,"coverageFrustums",void 0),e([S()],St.prototype,"coveragePolygons",void 0),e([S()],St.prototype,"currentBestFeature",void 0),e([S()],St.prototype,"currentBestFeatureMeasurementImage",void 0),e([S()],St.prototype,"currentBestFeatureLocation",void 0),e([S()],St.prototype,"currentCoverageVisible",void 0),e([S()],St.prototype,"currentNode",null),e([S()],St.prototype,"navigationNodes",void 0),e([S({json:{write:!1}})],St.prototype,"determineWorkflowForFeature",void 0),e([S({json:{write:!1}})],St.prototype,"determineWorkflowForTriangularMeasurement",void 0),e([S()],St.prototype,"disabled",void 0),e([S()],St.prototype,"displayMessage",void 0),e([S()],St.prototype,"displayNewMeasurementButton",void 0),e([S()],St.prototype,"distanceMeasurementResult",void 0),e([S()],St.prototype,"distanceAccuracyArray",void 0),e([S()],St.prototype,"dataCaptureLayer",void 0),e([S({readOnly:!0})],St.prototype,"featureCount",null),e([S()],St.prototype,"features",void 0),e([S()],St.prototype,"groundCoordinates",void 0),e([S()],St.prototype,"groundCoordinatesAccuracy",void 0),e([S()],St.prototype,"heightMeasurementPixels",void 0),e([S()],St.prototype,"heightGraphic",void 0),e([S()],St.prototype,"heightMeasurementResult",void 0),e([S()],St.prototype,"heightMeasurementAccuracy",void 0),e([S()],St.prototype,"measurementAngle",void 0),e([S()],St.prototype,"tempDistance",void 0),e([S({readOnly:!0})],St.prototype,"imageGalleryEnabled",null),e([S()],St.prototype,"imageGeometryField",void 0),e([S({readOnly:!0})],St.prototype,"imageLoaded",null),e([S()],St.prototype,"imageLocationToolState",void 0),e([S({readOnly:!0})],St.prototype,"invalidCameraHeading",null),e([S()],St.prototype,"imagePointsInView",null),e([S()],St.prototype,"imageMeasurementViewer",void 0),e([S()],St.prototype,"isAdditionalCoverageVisible",void 0),e([S()],St.prototype,"isAdditionalPointSourcesVisible",void 0),e([S()],St.prototype,"measurementVectors",void 0),e([S()],St.prototype,"layer",void 0),e([S()],St.prototype,"layerView",null),e([S({readOnly:!0})],St.prototype,"layerFloorFilterClause",null),e([S({type:Number})],St.prototype,"localPort",void 0),e([S()],St.prototype,"mapImageConversionToolState",void 0),e([S()],St.prototype,"measureType",void 0),e([S()],St.prototype,"measurementGraphic",void 0),e([S({readOnly:!0,value:"none"})],St.prototype,"mode",null),e([S()],St.prototype,"navigatorCurrentBestFeature",void 0),e([S()],St.prototype,"oiObjectIdField",void 0),e([S({type:s.ofType(t)})],St.prototype,"overlayedCameraLocations",void 0),e([S()],St.prototype,"overlayedMapFeatures",void 0),e([S()],St.prototype,"pixelCoordinates",void 0),e([S()],St.prototype,"preserveAngle",void 0),e([S()],St.prototype,"pointSources",void 0),e([S({readOnly:!0})],St.prototype,"popupEnabled",null),e([S()],St.prototype,"previousFeatureAngle",void 0),e([S()],St.prototype,"referencePoint",null),e([S({readOnly:!0})],St.prototype,"sectorData",null),e([S()],St.prototype,"selectedPoint",void 0),e([S({type:Number})],St.prototype,"sharpness",null),e([S()],St.prototype,"shouldShowSelectedImage",void 0),e([S()],St.prototype,"sketch",void 0),e([S()],St.prototype,"sketchTriangular",void 0),e([S()],St.prototype,"sketchTriangularGraphicsLayer",void 0),e([S()],St.prototype,"draw",void 0),e([S()],St.prototype,"sketchAdapter",void 0),e([S({readOnly:!0})],St.prototype,"sketchGraphicsLayer",null),e([S({readOnly:!0})],St.prototype,"state",null),e([S({readOnly:!0})],St.prototype,"thumbnails",null),e([S()],St.prototype,"triangularMeasurementActive",void 0),e([S()],St.prototype,"triangulatedDistanceMeasurement",void 0),e([S()],St.prototype,"triangulatedDistanceAccuracy",void 0),e([S()],St.prototype,"triangulatedAreaMeasurement",void 0),e([S()],St.prototype,"triangulatedAreaAccuracy",void 0),e([S()],St.prototype,"triangulatedMeasurementGraphic",void 0),e([S()],St.prototype,"triangulatedPoint",void 0),e([S()],St.prototype,"triangulatedMeasurementAdapter",void 0),e([S()],St.prototype,"updateFootprint",void 0),e([S()],St.prototype,"updateFootprintPanorama",void 0),e([S()],St.prototype,"updatingTriangularMeasurementState",void 0),e([S({value:null})],St.prototype,"view",null),e([S()],St.prototype,"_adapter",void 0),e([S()],St.prototype,"_sketchGraphicsLayer",null),e([S()],St.prototype,"_highlightedFeatureHandle",void 0),e([S()],St.prototype,"_imageViewer",void 0),e([S()],St.prototype,"_initialCurrentCoverageUpdate",void 0),e([S()],St.prototype,"_locationPointOnImage",void 0),e([S()],St.prototype,"_correctedLocationPointOnImage",void 0),e([S()],St.prototype,"_overlays",void 0),e([S({readOnly:!0})],St.prototype,"_overlaysView",null),e([S()],St.prototype,"_panoramicViewer",void 0),e([S()],St.prototype,"_previousCursor",void 0),e([S()],St.prototype,"_referencePointOnGround",void 0),e([S()],St.prototype,"_referencePointOnImage",void 0),e([S()],St.prototype,"_sectorData",void 0),e([S()],St.prototype,"_featureToSector",void 0),e([S({readOnly:!0})],St.prototype,"_updatingHandles",void 0),e([S()],St.prototype,"footprintExtent",void 0),e([S()],St.prototype,"_featureChangedTask",void 0),St=e([k("esri.widgets.OrientedImageryViewer.OrientedImageryViewerViewModel")],St);const kt=St;export{kt as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../Graphic.js";import{equals as a,isSome as r}from"../../core/arrayUtils.js";import{createTask as i}from"../../core/asyncUtils.js";import s from"../../core/Collection.js";import{deprecatedProperty as o}from"../../core/deprecate.js";import n from"../../core/Error.js";import c from"../../core/Evented.js";import{equalsShallow as l}from"../../core/lang.js";import u from"../../core/Logger.js";import{clamp as h}from"../../core/mathUtils.js";import{abortMaybe as m,destroyMaybe as d}from"../../core/maybe.js";import p from"../../core/Promise.js";import{isAbortError as g,throwIfAborted as y,waitTick as v}from"../../core/promiseUtils.js";import f from"../../core/ReactiveMap.js";import{whenOnce as w,on as b,watch as F,syncAndInitial as M,initial as _}from"../../core/reactiveUtils.js";import{sqlAnd as P}from"../../core/sql.js";import{getMetersPerUnitForSR as I}from"../../core/unitUtils.js";import{property as S}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import{subclass as k}from"../../core/accessorSupport/decorators/subclass.js";import{distance as A}from"../../core/libs/gl-matrix-2/math/vec2.js";import{isSerializable as V}from"../../core/support/jsonUtils.js";import{UpdatingHandles as C}from"../../core/support/UpdatingHandles.js";import{union as G}from"../../geometry/geometryEngineAsync.js";import L from"../../geometry/Multipoint.js";import R from"../../geometry/Point.js";import O from"../../geometry/Polygon.js";import T from"../../geometry/Polyline.js";import{projectWithZConversion as j}from"../../geometry/projection.js";import B from"../../geometry/SpatialReference.js";import{isClockwise as x}from"../../geometry/support/coordsUtils.js";import{geographicToWebMercator as E}from"../../geometry/support/webMercatorUtils.js";import z from"../../layers/GraphicsLayer.js";import{searchImages as D}from"../../layers/orientedImagery/queries.js";import{calculateSuitabilities as H}from"../../layers/orientedImagery/core/bestImageUtils.js";import{createCoveragePolygon as U,computePolygonForInspection as N,resizePolygon as W,checkIfPolygonContainsSelectedPoint as q}from"../../layers/orientedImagery/core/coverageUtils.js";import{isConstantElevation as $,isElevationSource as J}from"../../layers/orientedImagery/core/ElevationSourceDefinitions.js";import{convertGeographicToWebMercator as Z}from"../../layers/orientedImagery/core/utils.js";import{imageToWorld as K,imageToWorldPanoramic as Q}from"../../layers/orientedImagery/transformations/imageToWorld.js";import X from"../../layers/orientedImagery/transformations/updateElevation.js";import{getElevationSampler as Y}from"../../layers/orientedImagery/transformations/updateElevationUtils.js";import{or as ee,getInitialAngle as te,convertPixelToHeadingPitch as ae,convertHeadingPitchToSphereVertex as re,getImageToWorldProperties as ie,getUpdateElevationProps as se,isElevationSampler as oe,getImageToWorldPanoramicProperties as ne,pointToArray as ce,transformGraphicCoordinatesToPixel as le,getWorldToImageProperties as ue}from"../../layers/orientedImagery/transformations/utils.js";import{worldToImage as he,worldToImagePanoramic as me}from"../../layers/orientedImagery/transformations/worldToImage.js";import{getFloorFilterClause as de}from"../../layers/support/floorFilterUtils.js";import pe from"../../symbols/SimpleLineSymbol.js";import ge from"../../views/draw/Draw.js";import{scale as ye}from"../../views/draw/support/drawUtils.js";import{ViewEventPriorities as ve}from"../../views/input/InputManager.js";import fe from"../PanoramicViewer.js";import{defaultAngleThresholdInDegrees as we,invalidCameraHeading as be,sectorsInOrder as Fe,sectorsRadii as Me}from"./constants.js";import{configureSketchTool as _e,extractFieldsFromDataCaptureLayer as Pe,isValidDataCaptureLayer as Ie,constructGraphicFromImageGeometry as Se}from"./dataCaptureUtils.js";import{isFeatureAttachment as ke,getImageSourceFromAttachment as Ae}from"./galleryUtils.js";import{formatPixels as Ve,heightMeasurementPanoramic as Ce,heightMeasurement2D as Ge,calculateHeightAccuracyPanoramic as Le,calculateHeightAccuracy as Re,pixelAreaMeasurement2D as Oe,pixelAreaMeasurementPanoramic as Te,pixelDistanceMeasurement2D as je,pixelDistanceMeasurementPanoramic as Be,generateCombinations as xe,getRootOfSumOfSquaredErrors as Ee,generateCombinationsPanoramic as ze,calculateLocationAccuracyFromDeviations as De,calculateReferenceImagePointPanoramic as He,calculateAnglePano as Ue,calculateTempImagePoint as Ne,calculateAngle as We,computeTriangulatedAreaMeasurement as qe,computeTriangulatedDistanceMeasurement as $e,getModeCorrectedPoint as Je,calculateCorrectedPixel as Ze,calculateHeightFromTemporaryDistance as Ke,computeTriangulatedVector as Qe,computeTriangulatedPoint as Xe}from"./imageMeasurementUtils.js";import{crossSymbol as Ye,crossSymbol3D as et,measurementPolygonSymbol as tt,polylineSymbolPanoramic as at,measurementPolylineSymbol as rt,sourcePointSymbol as it,diamondSymbol as st,diamondSymbol3D as ot,locationSymbol as nt,locationSymbol3D as ct,activeSourcePointSymbol as lt}from"./symbols.js";import{isNoAttachmentError as ut,getContentType as ht,isTifOrMrf as mt,filterOILLayerView as dt,assignElevationSampleToFeatures as pt,calculateDirection as gt,calculateSegment as yt,isSceneView as vt,isGraphic as ft}from"./utils.js";import wt from"./components/ImageViewer.js";import bt from"./components/NavigationNode.js";import{NoActiveViewerError as Ft,NoFeatureFoundWithObjectIdError as Mt}from"./navigation/errors.js";import{queryFeatureByObjectIds as _t}from"./navigation/queries.js";import Pt from"../Sketch/SketchViewModel.js";const It={click:"view-click",imageClick:"image-click",triangularImageClick:"triangular-click",interactionHandles:"interaction-handles"},St=new Set(["JPG","JPEG"]),kt=/\.(\w+)$/,At=()=>new n("orientedimageryviewer:sketch-not-initialized","Sketch property is not initialized, call loadSketch first");let Vt=class extends(c.EventedMixin(p)){constructor(e){super(e),this.additionalFeatures=new s,this.additionalCameraLocations=new s,this.additionalFootprints=new s,this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.bestFeatureAngle=0,this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null,this.cameraHeadingThreshold=we,this.cameraPitchThreshold=we,this.collectionId=null,this.conversionProps=null,this.coverageFrustums=new s,this.coveragePolygons=new s,this.currentBestFeature=null,this.currentBestFeatureMeasurementImage=null,this.currentBestFeatureLocation=null,this.currentCoverageVisible=!0,this.navigationNodes=new s,this.determineWorkflowForFeature=async(e,t,a)=>{const{currentBestFeature:r,selectedPoint:i,view:s}=this;if(s?.closePopup(),r&&i){this._initialCurrentCoverageUpdate=!0,this._updateGroundElevation=!0;try{await this._updatePointsAndPolygons(a),await this._loadImage(a)}catch(o){g(o)||(this.loadImageError(o),u.getLogger(this).error("#loadIImage()","error occured while loading image",o))}}},this.determineWorkflowForTriangularMeasurement=async(e,t,a)=>{if(this.view?.closePopup(),this.currentBestFeatureMeasurementImage&&this.selectedPoint)try{await this._loadMeasurementViewerImage(a)}catch(r){g(r)||(this.loadImageError(r),u.getLogger(this).error("#loadIImage()","error occured while loading image",r))}},this.disabled=!1,this.displayMessage={key:"onLoadMessage",type:"info"},this.displayNewMeasurementButton=!0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.dataCaptureLayer=null,this.features=new s,this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.heightMeasurementPixels=[],this.heightGraphic=null,this.heightMeasurementResult=0,this.heightMeasurementAccuracy=0,this.measurementAngle=null,this.tempDistance=null,this.imageGeometryField=null,this.imageLocationToolState=!1,this.imageMeasurementViewer=new wt,this.isAdditionalCoverageVisible=!1,this.isAdditionalPointSourcesVisible=!1,this.measurementVectors=[],this.layer=null,this.localPort=null,this.mapImageConversionToolState=!1,this.measureType=null,this.measurementGraphic=null,this.navigatorCurrentBestFeature=null,this.oiObjectIdField=null,this.overlayedCameraLocations=new s,this.overlayedMapFeatures=new f,this.pixelCoordinates=null,this.preserveAngle=!1,this.pointSources=new s,this.previousFeatureAngle=0,this.selectedPoint=null,this.shouldShowSelectedImage=!1,this.sketch=null,this.sketchTriangular=null,this.sketchTriangularGraphicsLayer=null,this.draw=null,this.sketchAdapter=null,this.triangularMeasurementActive=!1,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedAreaAccuracy=0,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.triangulatedMeasurementAdapter=null,this.updateFootprint=async(e,t)=>{"image-loaded"===this.state&&await(this._adapter?.updateFootprint(e,t))},this.updateFootprintPanorama=async(e,t)=>{await(this._adapter?.updateFootprintPanorama(e,t))},this.updatingTriangularMeasurementState=!1,this._adapter=null,this._highlightedFeatureHandle=null,this._imageViewer=new wt,this._initialCurrentCoverageUpdate=!0,this._locationPointOnImage=null,this._correctedLocationPointOnImage=null,this._overlays=new z({listMode:"hide",internal:!0,elevationInfo:{mode:"absolute-height"}}),this._panoramicViewer=new fe,this._previousCursor=null,this._referencePointOnGround=null,this._referencePointOnImage=null,this._sectorData=null,this._featureToSector=null,this._updatingHandles=new C,this._clickTask=null,this._crossSymbol=null,this.footprintExtent=null,this._featureChangedTask=null,this._openPopupTask=null,this._suitabilities=null,this._transformController=new AbortController,this._updateFootprintTask=null,this._updateGroundElevation=!1,this.hideImageGeometry=e=>{},this.highlight=e=>{if(!this._overlaysView)return;this.removeHighlight();const t=this.additionalFootprints.find((({attributes:{imageID:t}})=>t===Number(e)));this._highlightedFeatureHandle=t?this._overlaysView?.highlight(t):null},this.loadDataCaptureAdapter=async e=>{await this.loadSketch(e);const t=import("./adapters/sketch/DataCaptureAdapter.js"),{default:a}=await t;return y(e),this.sketchAdapter=new a({viewModel:this}),this.sketchAdapter},this.loadImageFromSource=async(e,t)=>this._updatingHandles.addPromise(this._loadImageFromSourceInternal(e,t)),this.storeImageMeasurementViewer=e=>{this.imageMeasurementViewer=e},this.loadImageViewer=e=>{this._imageViewer?.destroy(),this._imageViewer=e},this.loadPanoramicViewer=e=>{this._panoramicViewer?.destroy(),this._panoramicViewer=e},this.showImageByObjectId=async(e,t)=>{const a=this.additionalFeatures.find((({attributes:t})=>t.objectId===e));if(a)this.currentBestFeature=a;else{const{layer:a,layerFloorFilterClause:i}=this;if(!a)return void this.setMessage("noLayerSelected","info");this.beforeLoad();const s=this._updatingHandles.addPromise(this._queryAndLoadByObjectId(a,e,i,t));try{await s,await this.selectBestFeature(e,t)}catch(r){g(r)||(u.getLogger(this).error("oriented-imagery-viewer:show-image",r),"NoFeatureFoundWithObjectIdError"===r.name?this.setMessage("noFeatureFoundWithObjectId","error","",{objectId:e}):this.setMessage("imageLoadError","error",r.message))}}},this.getSectorFeatureById=e=>this._suitabilities?.find((({feature:{attributes:{objectId:t}}})=>t===e)),this.getFeatureSectorById=e=>this._featureToSector?.[`${e}`],this.navigate=async(e,t)=>{const{activeViewer:a}=this;if(!a)throw new Ft;return await a.navigate(e,t)},this.removeHighlight=()=>this._highlightedFeatureHandle?.remove(),this.revealImageGeometry=e=>{},this.selectBestFeature=async(e,t)=>(y(t),this.currentBestFeature=this.features?.find((({attributes:t})=>`${t.objectId}`==`${e}`)),w((()=>"image-loaded"===this.state),t)),this.toggleImageAttributes=()=>{m(this._openPopupTask),this._openPopupTask=i((async e=>{const{currentBestFeature:a,popupEnabled:r,layer:i,view:s}=this;if(s?.closePopup(),!(s&&a&&r&&i))return;const{attributes:o,geometry:n}=a,c=new t({geometry:n,attributes:o.toJSON(),layer:i});y(e),await s.openPopup({features:[c],location:o.location.clone()})}))},this.updateSuitabilities=(e,t=!0)=>{e.sort(((e,t)=>e.suitability-t.suitability)),this._suitabilities=e;const a=this._suitabilities.map((({feature:e})=>e));this._initialCurrentCoverageUpdate=!0,this._updateFeatures(a,t),this._groupFeaturesBySectors()},this._createViewClickHandle=()=>{if(this.removeHandles(It.click),"disabled"===this.state||null==this.view)return;const e=this.mapImageConversionToolState&&"image-loaded"===this.state?this._mapImageConversionToolViewClickHandler:this._viewClickHandler;this.addHandles(this.view.on("click",e,ve.WIDGET),It.click)},this._createImageClickHandle=()=>{this.removeHandles(It.imageClick);const{mapImageConversionToolState:e,mode:t,activeViewer:a,currentBestFeature:r,footprintExtent:s}=this,o=a?.imageSize;if(!(e&&"none"!==t&&o&&s&&r))return;a.clickAction="pixel-location";let n=null;const c=b((()=>a),"pixel-location",(e=>{this.plotReferencePointOnImage(e),n?.abort(),n=i((async a=>{if(!e)return;const i=await this.getMapPoint(e,{feature:r,imageSize:o,mode:t}).then((e=>{const t=this.view?.spatialReference;return ee(!t,e.spatialReference.equals(t))?e:j(e,t)}));y(a),this.plotReferencePointOnGround(i)}))}));this.addHandles(c,It.imageClick)},this._createTriangularImageClickHandle=()=>{this.removeHandles(It.triangularImageClick);const e=this.imageMeasurementViewer?.imageSize;this.triangularMeasurementActive&&"none"!==this.mode&&e&&this.currentBestFeature&&this.addHandles(this.imageMeasurementViewer.imageRenderer.on("double-click",this._measurementImageClickHandler),It.triangularImageClick)},this._createTriangularImageLocationHandle=()=>{this.removeHandles(It.triangularImageClick);const{imageLocationToolState:e,mode:t,imageMeasurementViewer:a}=this,r=a?.imageSize;if(!e||"none"===t||!r)return;a.clickAction="pixel-location";let s=null;const o=b((()=>a),"pixel-location",(e=>{1===this.measurementVectors.length&&(this.plotLocationPointOnImage(e,!0),s?.abort(),s=i((async a=>{if(!e||this.triangulatedPoint||2===this.measurementVectors?.length||!this.currentBestFeatureMeasurementImage)return;let i=await this.getMapPoint(e,{feature:this.currentBestFeatureMeasurementImage,imageSize:r,mode:t});y(a);const s=this.currentBestFeatureMeasurementImage.geometry.spatialReference;s&&!i.spatialReference.equals(s)&&(i=await j(i,s),y(a)),await this._calculateTriangulatedPointFromGroundPoint(i,{signal:a}),y(a)})))}));this.addHandles(o,It.triangularImageClick)},this._createImageLocationHandle=()=>{this.removeHandles(It.imageClick);const{imageLocationToolState:e,mode:t,activeViewer:a,currentBestFeature:r,footprintExtent:s}=this,o=a?.imageSize;if(!(e&&"none"!==t&&o&&s&&r))return;a.clickAction="pixel-location";let n=null;const c=b((()=>a),"pixel-location",(e=>{this.pixelCoordinates=e,this.plotLocationPointOnImage(e),n?.abort(),n=i((async a=>{if(!e)return;let i=await this.getMapPoint(e,{feature:r,imageSize:o,mode:t});y(a);const s=this.view?.spatialReference;s&&!i.spatialReference.equals(s)&&(i=await j(i,s),y(a)),this.groundCoordinates=i,this.triangularMeasurementActive&&i&&this._triangulatedLocationWorkflow(i);const n=await this.calculateLocationAccuracy(e,i,t,a);y(a),n&&(this.groundCoordinatesAccuracy=n)}))}));this.addHandles(c,It.imageClick)},this._loadImage=async e=>{const{currentBestFeature:t,layer:a,mode:r}=this;if(this.clearGraphics(),!a||!t||"none"===r)return;const{attributes:i}=t,{imagePath:s,imageRotation:o,cameraHeading:n,cameraRoll:c,cameraPitch:l,objectId:h,cameraOrientation:m,location:d}=i,p=(c??0)+(o??0),v=d.spatialReference.isWGS84&&4!==m?.type?E(d):new R(d);let f=s;if(ke(s))try{f=await Ae(a,h,e)}catch(w){if(g(w))return;return ut(w)?(u.getLogger(this).error(w),void this.setMessage("noAttachment","error",`${a.objectIdField}: ${h}`)):(u.getLogger(this).error(w,{[a.objectIdField]:h,layer:a}),void this.setMessage("imageLoadError","error",`query-attachments-failed:${a.objectIdField} ${h}`))}try{await this.loadImageFromSource(f,{imageRotation:p,options:e,pitch:l,yaw:n,mode:r,cameraLocation:v}),y(e),await this.transformAndPlotSelectedLocation(e)}catch(w){g(w)||this.loadImageError(w)}},this._loadImageFromSourceInternal=async(e,t)=>{const{mode:a,imageRotation:r,options:i}=t,s="string"==typeof e,o=s?e:e.url,{pathname:n,searchParams:c}=new URL(o);let l=s?n.match(kt)?.[1]:e.datasetFormat;if(!l)try{l=await ht(o,{...t.options})}catch(h){g(h)||u.getLogger(this).error("#getContentType()",h)}switch(l??="UNKNOWN FORMAT",a){case"default":this.triangularMeasurementActive?await this._setImageSource(this.imageMeasurementViewer,l,o,c,r,i):await this._setImageSource(this._imageViewer,l,o,c,r,i);break;case"panoramic":if(St.has(l.toUpperCase())){const{selectedPoint:e}=this,{pitch:a,yaw:r,cameraLocation:s,viewAngle:n}=t;this._panoramicViewer.imageSource=o;let c=r??0;"number"==typeof n?c=n-c:s&&e&&(c=await te(s,e)-c),this._panoramicViewer.pitch=a??0,this._panoramicViewer.yaw=c,await this._panoramicViewer.loadImage(i)}else this.setMessage("unsupportedPanoramicImageryError","error",void 0,{datasetFormat:l});break}},this._loadMeasurementViewerImage=async e=>{const{currentBestFeatureMeasurementImage:t,layer:a,mode:r}=this;if(this.imageMeasurementViewer.clearGraphics(),!a||!t||"none"===r)return;const{attributes:i}=t,{imagePath:s,imageRotation:o,cameraHeading:n,cameraRoll:c,cameraPitch:l,objectId:h,cameraOrientation:m,location:d}=i,p=(c??0)+(o??0),v=d.spatialReference.isWGS84&&4!==m?.type?E(d):new R(d);let f=s;if(ke(s))try{f=await Ae(a,h,e)}catch(w){if(g(w))return;return ut(w)?(u.getLogger(this).error(w),void this.setMessage("noAttachment","error",`${a.objectIdField}: ${h}`)):(u.getLogger(this).error(w,{[a.objectIdField]:h,layer:a}),void this.setMessage("imageLoadError","error",`query-attachments-failed:${a.objectIdField} ${h}`))}try{await this.loadImageFromSource(f,{imageRotation:p,options:e,pitch:l,yaw:n,mode:r,cameraLocation:v}),y(e)}catch(w){g(w)||this.loadImageError(w)}},this._loadViewAdapter=async e=>{const{view:t}=this;if(t)switch(t.type){case"2d":{const{default:t}=await import("./adapters/view/MapViewAdapter.js");y(e),this._adapter=new t(this);break}case"3d":{const{default:t}=await import("./adapters/view/SceneViewAdapter.js");y(e),this._adapter=new t(this);break}}else this._adapter=null},this._mapImageConversionToolViewClickHandler=e=>{e.stopPropagation(),e.preventDefault(),e.mapPoint&&this.plotMapPoint(e.mapPoint)},this._measurementImageClickHandler=e=>{e.stopPropagation(),e.preventDefault();const{sketchTriangular:t,triangularMeasurementActive:a,currentBestFeatureMeasurementImage:r,triangulatedMeasurementGraphic:i}=this;t&&a&&r&&i&&"active"!==t.state&&(t.update([i],{tool:"reshape"}),this.updatingTriangularMeasurementState=!0)},this._viewClickHandler=e=>{this._clickTask?.abort(),this._clickTask=i((async t=>{const{pointerType:a,button:r,mapPoint:i}=e;if(("mouse"!==a||0===r)&&i)return e.stopPropagation(),e.preventDefault(),this._updatingHandles.addPromise(this.loadBestImage(i,{signal:t}))}))},this.plotSelectedPointOnImage=async(e,a)=>{if(await v(a),!e)return;const r=new R({...V(e)?e.toJSON():e});if("default"===this.mode)r.x-=.5,r.y=.5-r.y,r.spatialReference=this._imageViewer.imageRenderer.spatialReference.clone(),this._crossSymbol=new t({geometry:r,symbol:Ye}),this._imageViewer.addGraphic(this._crossSymbol,0);else if("panoramic"===this.mode){const{imageSize:a}=this._panoramicViewer;if(!a)return;const[r,i]=a,{heading:s,pitch:o}=ae(e,r,i),n=re(s,o);this._crossSymbol=new t({geometry:new R(n,B.WebMercator),symbol:et}),this._panoramicViewer.addGraphic(this._crossSymbol,0)}},this.handleSectorClick=this.handleSectorClick.bind(this),this.searchBestImage=this.searchBestImage.bind(this),this.transformAndPlotReferencePointOnImage=this.transformAndPlotReferencePointOnImage.bind(this)}initialize(){this.addHandles([F((()=>this.view),(()=>{this.load()}),M),F((()=>this.view?.map),((e,t)=>{t?.layers.remove(this._overlays),e?.layers.add(this._overlays)}),_),F((()=>this.view?.map?.allLayers?.length),(e=>{e&&this.view?.map?.layers.reorder(this._overlays,e-1)}),_),F((()=>[this.state,this.mapImageConversionToolState,this.view]),(()=>{this._createViewClickHandle(),this._createImageClickHandle()}),M),F((()=>[this.triangularMeasurementActive,this.currentBestFeatureMeasurementImage]),(()=>{this._createTriangularImageClickHandle()}),M),F((()=>[this.state,this.imageLocationToolState,this.view]),((e,t)=>{if(this._createImageLocationHandle(),!this.imageLocationToolState)return this.clearPreviousGroundLocation(),void this._resetCursor();e[1]!==t?.[1]&&this._setMeasurementCursor()}),M),F((()=>this.measureType),(()=>{this.clearPreviousMeasurements()}),M),F((()=>this.bestFeatureAngle),((e,t)=>{this.previousFeatureAngle=t??0}),M),F((()=>this.currentBestFeature),(async(e,t)=>{m(this._featureChangedTask),this._featureChangedTask=i((async a=>this.determineWorkflowForFeature.apply(this,[e,t,{signal:a}]))),await this._featureChangedTask.promise}),{sync:!0}),F((()=>this.currentBestFeatureMeasurementImage),(async(e,t)=>{m(this._featureChangedTask),t&&e!==t&&(this.measurementVectors=[],this.triangulatedPoint=null,this.sketchTriangularGraphicsLayer?.graphics.destroyAll()),this._featureChangedTask=i((async a=>{await this.determineWorkflowForTriangularMeasurement(e,t,{signal:a}),y(a),this._reorderTriangularSketchLayer()}))}),M),F((()=>this.triangularMeasurementActive),(async(e,t)=>{t&&!e&&(this.measurementVectors=[],this.currentBestFeatureMeasurementImage=null,this.triangulatedDistanceMeasurement=null,this.triangulatedMeasurementGraphic=null,this.triangulatedPoint=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaAccuracy=0,this.sketchTriangularGraphicsLayer?.graphics.destroyAll(),this.clearReferencePointOnImage(),this.imageMeasurementViewer.clearImage(),this.imageMeasurementViewer.clearGraphics())})),F((()=>this.mode),(e=>{switch(this.removeHandles(It.interactionHandles),e){case"default":this.addHandles(F((()=>{const{state:e}=this;return"image-loaded"===e?this._imageViewer.imagePointsInView:null}),(e=>{e&&(m(this._updateFootprintTask),this._updateFootprintTask=i((async t=>{await this.updateFootprint(e,{signal:t})})))}),{...M,equals:(e,t)=>a(e,t,l)}),It.interactionHandles);break;case"panoramic":this.addHandles(F((()=>{const{currentBestFeature:e,state:t}=this,{imageSize:a,vfov:r,hfov:i,pitch:s,yaw:o}=this._panoramicViewer;return e&&a&&!t.includes("loading")?[r,i,o,s]:null}),(e=>{if(!e||this.state.includes("loading"))return;const[t,a,r,s]=e;this.currentNode&&(this.currentNode.currentHeading=r+(this.currentNode.heading??0),this.currentNode.currentPitch=s+(this.currentNode.pitch??0)),m(this._updateFootprintTask),this._updateFootprintTask=i((async e=>{await this.updateFootprintPanorama({verticalFieldOfView:t,horizontalFieldOfView:a,yaw:r,pitch:s},{signal:e})}))}),{...M,equals:(e,t)=>a(e,t,l)}),It.interactionHandles)}}),M),F((()=>[this.brightness,this.contrast,this.sharpness]),(()=>{const{_imageViewer:e,brightness:t,contrast:a,mode:r,sharpness:i}=this;"default"===r&&(e.brightness=t,e.contrast=a,e.sharpness=i)}),M),F((()=>this.activeViewer?.imageRenderer),(()=>{this.sketch&&(this.sketch.view=this.activeViewer?.imageRenderer)}))]),this.when().finally((()=>{this.notifyChange("state")}))}destroy(){this._updateFootprintTask=m(this._updateFootprintTask),this._clickTask=m(this._clickTask),this.coverageFrustums.destroy(),this.coveragePolygons.destroy(),this.pointSources.destroy(),this.additionalFootprints.destroy(),this.additionalCameraLocations.destroy(),this.bestFeatureFootprint=d(this.bestFeatureFootprint),this.bestFeatureCurrentFootprint=d(this.bestFeatureCurrentFootprint),this._crossSymbol=d(this._crossSymbol),this._referencePointOnGround=d(this._referencePointOnGround),this._referencePointOnImage=d(this._referencePointOnImage),this._locationPointOnImage=d(this._locationPointOnImage),this._overlays&&this.view?.map?.remove(this._overlays),this._overlays.destroy(),this._imageViewer.destroy(),this.imageMeasurementViewer.destroy(),this._panoramicViewer.destroy()}get activeLayer(){return o(u.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer}set activeLayer(e){o(u.getLogger(this),"activeLayer",{replacement:"layer"}),this.layer=e}get activeViewer(){const{_imageViewer:e,_panoramicViewer:t,mode:a}=this;switch(a){case"default":return e;case"panoramic":return t;default:return null}}get accuracyParametersMissing(){return this.layer?.orientationAccuracy?.every((e=>0===e))??!0}get brightness(){return this._get("brightness")??0}set brightness(e){this._set("brightness",h(e,-10,10))}get contrast(){return this._get("contrast")??0}set contrast(e){this._set("contrast",h(e,-10,10))}get currentNode(){const{currentBestFeature:e,navigationNodes:t}=this;return t.find((t=>t.id===e?.attributes.objectId))}get featureCount(){return this.features?.length??0}get imageGalleryEnabled(){const{currentBestFeature:e}=this;if(!e)return!1;const t=e.attributes.imagePath?.trim();return mt(t)||ke(t)}get imageLoaded(){return o(u.getLogger(this),"imageLoaded",{replacement:'Use OrientedImageryViewer.state === "image-loaded"',version:"4.29",warnOnce:!0}),"image-loaded"===this.state}get invalidCameraHeading(){return this.currentBestFeature?.attributes?.cameraHeading===be}get imagePointsInView(){const{mode:e,_imageViewer:t}=this;return"default"===e?t.imagePointsInView:null}get layerView(){const{layer:e,view:t}=this;if(e&&t)return t.allLayerViews.find(dt(e))}get layerFloorFilterClause(){const{layerView:e}=this;return e?de(e):null}get mode(){const e=this.currentBestFeature?.attributes;if(!e)return"none";const{horizontalFieldOfView:t,isSpherical:a}=e;return 360===t||a?"panoramic":"default"}get popupEnabled(){return!0===this.layer?.popupEnabled}get referencePoint(){return this._referencePointOnGround?.geometry}get sectorData(){const{_sectorData:e}=this;return e?Fe.map((t=>e[t])):null}get sharpness(){return this._get("sharpness")??0}set sharpness(e){this._set("sharpness",h(e,0,1))}get sketchGraphicsLayer(){return this.sketch?.layer}get state(){const{mode:e,disabled:t,_updatingHandles:{updating:a},_featureChangedTask:r}=this;if(t)return"disabled";if(!this.isFulfilled()||a||!1===r?.finished)return"loading";if(this.isRejected())return"error";if("error"===this.displayMessage?.type)return"image-load-error";switch(e){case"default":return this._imageViewer.state;case"panoramic":return this._panoramicViewer.state}return"ready"}get thumbnails(){const{features:e}=this;return e?new s(e.map((({attributes:{imagePath:e,objectId:t,cameraRoll:a,imageRotation:r}})=>{const i=e?.trim();return mt(i)||ke(i)?{url:i,objectId:t,rotation:(a??0)+(r??0)}:null})).filter(r)):null}set view(e){this._set("view",e)}get _sketchGraphicsLayer(){const{mode:e}=this;switch(e){case"panoramic":return new z({elevationInfo:{mode:"absolute-height"}});case"default":return new z;case"none":return}}get _overlaysView(){return this.view?.layerViews.find((({layer:e})=>e===this._overlays))}beforeLoad(){this.view?.closePopup(),this.displayMessage=null,this.clearPreviousGroundLocation(),this.triangularMeasurementActive=!1,this.currentBestFeatureMeasurementImage=null,this.measureType=null,this.imageLocationToolState=!1,this.features.removeAll(),this.currentBestFeature=null,this.additionalFeatures.removeAll(),this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint=d(this.bestFeatureCurrentFootprint),this._overlays?.removeAll()}async computeHeight(e,t,a=!0){const{currentBestFeature:r,activeViewer:i,layer:s,footprintExtent:o}=this,n=i?.imageSize,c=r?.attributes,l=s?.orientationAccuracy;if(!c||!n||!e||e.length<2||!l)return;const u="panoramic"===t?await this.getMeasurementPropertiesPanoramic():ie(c,n[0],n[1]),h=e.at(0),m=e.at(-1);if(!(u&&h&&m&&l&&o))return;const d=[m,h],p=Ve(d,!1),g="panoramic"===t?await Ce(d,u,l,r,!0,!1):await Ge(d,u,l,!0,a);if(!g)return;const y="panoramic"===t?await Le(l,p,u,g,r,!0):await Re(l,p,u,g,!0);return y?{value:g,accuracy:y}:{value:g}}async calculateAreaMeasurement(e,t,a){if(e.length<3||!this.currentBestFeature||!this.activeViewer?.imageSize||"none"===t)return null;const r="default"===t?await this.getMeasurementProperties():await this.getMeasurementPropertiesPanoramic();return y(a),r?"default"===t?await Oe(e,r,!0):await Te(e,r,!0,a):null}async calculateDistanceMeasurement(e,t,a){const{currentBestFeature:r,activeViewer:i}=this;if(e.length<2||!r||!i?.imageSize||"none"===t)return null;const s="default"===t?await this.getMeasurementProperties():await this.getMeasurementPropertiesPanoramic();return y(a),s?"default"===t?await je([e.at(0),e.at(-1)],s,!0):await Be([e.at(0),e.at(-1)],s,!0):null}async calculateAccuracy(e,t,a){const{layer:r,currentBestFeature:i,activeViewer:s}=this,o=r?.orientationAccuracy,n=o?.every((e=>0===e))||!o?.length;if("area"===t&&e.length<3||"distance"===t&&e.length<2||!i||!s?.imageSize||n)return null;let c=null;if(this.triangularMeasurementActive&&this.currentBestFeatureMeasurementImage&&this.imageMeasurementViewer?c=await this.getMeasurementProperties(this.currentBestFeatureMeasurementImage,this.imageMeasurementViewer):(c=await this.getMeasurementProperties(),y(a)),!c)return null;const l="area"===t?await Oe(e,c,!0):await je([e.at(0),e.at(-1)],c,!0);y(a);const{updateElevationProps:u,...h}=c,m=xe(h,o);if(!m?.length)return null;const d=m.map((e=>({...e,updateElevationProps:u}))).map((async r=>{const i="area"===t?await Oe(e,r,!0):await je([e.at(0),e.at(-1)],r,!0);if(y(a),i&&l){if("area"===t){const e="number"!=typeof i?i.area:null;return e?Math.abs(e-l.area):null}return Math.abs(i-l)}return null})),p=await Promise.all(d);y(a);const g=p.filter((e=>null!==e));return 0===g.length?null:Ee(g)}async calculateLocationAccuracy(e,t,a="default",r){const{layer:i,currentBestFeature:s}=this,o=i?.orientationAccuracy,n=this.view?.spatialReference,c=o?.every((e=>0===e))||!o?.length;if(!s||c)return null;const l="default"===a?await this.getMeasurementProperties():await this.getMeasurementPropertiesPanoramic();if(y(r),!l)return null;const{updateElevationProps:u,...h}=l,m="default"===a?xe(h,o):ze(h,o);if(!m?.length)return null;const d=m.map((e=>({...e,updateElevationProps:u}))).map((async i=>{const{updateElevationProps:s,...o}=i;let c="default"===a?await K(e,o,s):await Q(e,o,s);return y(r),n&&!c.spatialReference.equals(n)&&(c=await j(c,n),y(r)),c&&t?[Math.abs(c.x-t.x),Math.abs(c.y-t.y),c.z&&t.z?Math.abs(c.z-t.z):0]:null})),p=await Promise.all(d);if(y(r),!p?.length)return null;const g=p.map((e=>[e?.[0]??0,e?.[1]??0,e?.[2]??0])),[v,f,w]=De(g);return{x:v,y:f,z:w}}async calculateAccuracyPanoramic(e,t,a){const{layer:r,currentBestFeature:i,activeViewer:s,mode:o}=this,n=r?.orientationAccuracy,c=n?.every((e=>0===e))||!n?.length;if("area"===t&&e.length<3||"distance"===t&&e.length<2||!i||!s?.imageSize||c||"panoramic"!==o)return null;const l=await this.getMeasurementPropertiesPanoramic();if(y(a),!l)return null;const u="area"===t?await Te(e,l,!0):await Be([e.at(0),e.at(-1)],l,!0);y(a);const{updateElevationProps:h,...m}=l,d=ze(m,n);if(!d?.length)return null;const p=d.map((e=>({...e,updateElevationProps:h}))).map((async r=>{const i="area"===t?await Te(e,r,!0):await Be([e.at(0),e.at(-1)],r,!0);if(y(a),i&&u){if("area"===t){const e="number"!=typeof i?i.area:null;return e?Math.abs(e-u.area):null}return Math.abs(i-u)}return null})),g=await Promise.all(p);y(a);const v=g.filter((e=>null!==e));return 0===v.length?null:Ee(v)}async calculateHeightMeasurementInfo(e,t,a){const{currentBestFeature:r,activeViewer:i}=this,s=i?.imageSize;if(!r||!i||!s?.length||"none"===t)return;const{attributes:o}=r,[n]=Ve([e],"panoramic"!==t),c="panoramic"===t?await this.getMeasurementPropertiesPanoramic():ie(o,s[0],s[1]);if("panoramic"===t){if(!c)return;const e=await He(n,c,r,a);if(!e)return;e?.heading>180&&(e.heading-=360);const t=Ue(n,e),i=A([n.x,n.y],[e.x,e.y]);if(!t||!i)return;return{measurementAngle:t,tempDistance:i}}const l=await Ne(n,c,a);if(!l)return;const u=We(n,l),h=A([n.x,n.y],[l.x,l.y]);return u&&h?{measurementAngle:u,tempDistance:h}:void 0}async calculateTriangulatedMeasurements(e){switch(this.measureType){case"distance":{this.triangulatedDistanceMeasurement=await $e(this.measurementVectors);const t=await this.calculateAccuracy(e,"distance");if(t&&this.triangulatedDistanceMeasurement?.distance){const e=Math.atan(t/this.triangulatedDistanceMeasurement.distance);this.triangulatedDistanceAccuracy={distanceAccuracy:t,angleAccuracy:e}}break}case"area":if(this.currentBestFeatureMeasurementImage?.geometry.spatialReference){const t=await qe(this.measurementVectors,this.currentBestFeatureMeasurementImage.geometry.spatialReference);this.triangulatedAreaMeasurement=t,this.triangulatedAreaAccuracy=await this.calculateAccuracy(e,"area")??this.triangulatedAreaAccuracy}}}clearPreviousMeasurements(){this.clearMeasurementGraphics(),this.resetMeasurementData(),this.stopMeasurement()}clearPreviousGroundLocation(){this.groundCoordinates=null,this.groundCoordinatesAccuracy=null,this.pixelCoordinates=null,this.clearLocationPointOnImage()}clearMeasurementGraphics(){this.measurementGraphic&&(this.activeViewer?.removeGraphic(this.measurementGraphic),this.measurementGraphic=null),this.heightGraphic&&(this.activeViewer?.removeGraphic(this.heightGraphic),this.heightGraphic=null),this.triangularMeasurementActive&&this.sketchTriangularGraphicsLayer?.graphics.destroyAll()}digitizeCancel(){return this.sketch?.cancel()}digitizeCanRedo(){return this.sketch?.canRedo()??!1}digitizeCanUndo(){return this.sketch?.canUndo()??!1}digitizeComplete(){return this.sketch?.complete()}async digitizeCreate(e,t){const{sketch:a,dataCaptureLayer:r}=this;if(!a)throw At();_e(r,e,a),await a.create(e,{...t,defaultZ:0})}async digitizeDelete(){if(!this.sketch)throw At();return this.sketch.delete()}digitizeDuplicate(){if(!this.sketch)throw At();return this.sketch.duplicate()}digitizePlace(e,t){if(!this.sketch)throw At();return this.sketch.place(e,t)}digitizeRedo(){if(!this.sketch)throw At();return this.sketch.redo()}digitizeUndo(){if(!this.sketch)throw At();return this.sketch.undo()}digitizeUpdate(e,t){if(!this.sketch)throw At();return this.sketch.update(e,t)}async displayHeightResults(){const{currentBestFeature:e,activeViewer:t,heightMeasurementPixels:a,mode:r}=this,i=t?.imageSize,s=e?.attributes;if(!s||!i)return;const o=await this.computeHeight(a,r);o?.value&&o?.accuracy&&(this.heightMeasurementResult=o.value,this.heightMeasurementAccuracy=o.accuracy)}filterByFootprints(e,t,a=!1){const r=[],i=[],s=[];return e.forEach((e=>{const{layer:{coveragePercent:o},attributes:n}=e;let c;const l=I(e.geometry.spatialReference);n.cameraHeight/=l,n.farDistance/=l,n.nearDistance/=l,$(n.elevationSource)&&(n.elevationSource.constantElevation/=l);const{polygon:u,frustum:h}=U(n);if(c=u.clone(),n.isInspection&&(c=N(n)),o&&(c=W(c,o)),a||!t||q(c,t)){s.push(e);const{geometry:t,objectId:a,cameraHeight:o,cameraHeading:c}=n,l=t.clone();l.z=o,l.imageID=a,this.pointSources.push(l),c!==be&&(r.push(u),h&&i.push(h))}})),{features:s,polygons:r,frustums:i}}getMeasurementProperties(e=this.currentBestFeature,t=this.activeViewer){if(!e||!t?.imageSize)return;const{elevationSample:a,attributes:r}=e,{elevationSource:i,cameraHeight:s}=r,o=ie(r,t.imageSize[0],t.imageSize[1]);let n=o.cameraLocation;return(n.spatialReference.isGeographic?j(n,B.WebMercator):Promise.resolve(n)).then((e=>(n=e,se((n.z??0)-s,{elevationSample:a,elevationSource:i,extent:this.footprintExtent})))).then((t=>("elevationSample"in t&&oe(t.elevationSample)&&(e.elevationSample=t.elevationSample),{...o,cameraLocation:n,updateElevationProps:t})))}getMeasurementPropertiesPanoramic(){const{currentBestFeature:e,activeViewer:t}=this;if(!e||!t?.imageSize)return;const{elevationSample:a,attributes:r}=e,{elevationSource:i,cameraHeight:s}=r,o=ne(r,t.imageSize[0],t.imageSize[1]);let n=o.cameraLocation;return(n.spatialReference.isGeographic?j(n,B.WebMercator):Promise.resolve(n)).then((e=>(n=e,se((n.z??0)-s,{elevationSample:a,elevationSource:i,extent:this.footprintExtent})))).then((t=>("elevationSample"in t&&oe(t.elevationSample)&&(e.elevationSample=t.elevationSample),{...o,cameraLocation:n,updateElevationProps:t})))}async deleteDataCaptureFeatures(e){const{dataCaptureLayer:t}=this;if(!t)throw new n("orientedimagery","Data capture layer is not available");return t.queryFeatures({objectIds:e}).then((({features:e})=>t.applyEdits({deleteFeatures:e})))}handleSectorClick(e){if(isNaN(e))return;const t=this._sectorData?.[Fe[e]],a=t?.at(0);a&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(a):this._updateCurrentBestFeature(a))}handleFeatureClick(e){const{sector:t,featureIndexInSector:a}=e;if(isNaN(a))return;const r=this._sectorData?.[t],i=r?.at(a);i&&(this.triangularMeasurementActive&&this.currentBestFeature?this._updateImageMeasurementBestFeature(i):this._updateCurrentBestFeature(i))}handleDrawCursorUpdateEvents(e){const{measurementAngle:t,tempDistance:a,heightMeasurementPixels:r,mode:i,activeViewer:s}=this,o=s?.imageSize;if(!e.vertices||!o)return;const n=Je(e.vertices.at(-1),i,o);if(r.length<1||!n||!a||!t||"none"===i)return;const c=Ze(r[0],n,t);if(!c?.length)return;this.heightMeasurementPixels.push(c),"panoramic"===i?this.createPolylineGraphicPano():this.createPolylineGraphic();const l=Ke(this.heightMeasurementPixels,a);l&&(this.heightMeasurementResult=l)}async handleDrawVertexAddEvents(e,t){const{currentBestFeature:a,activeViewer:r,heightMeasurementPixels:i,mode:s}=this;if(!a||!r||!e.vertices?.length||"none"===s)return;const o=r?.imageSize;if(!i.length&&o){const a=Je(e.vertices.at(-1),s,o);this.heightMeasurementPixels.push(a);const r=await this.calculateHeightMeasurementInfo(a,s,t);if(!r?.measurementAngle||!r?.tempDistance)return;this.measurementAngle=r.measurementAngle,this.tempDistance=r.tempDistance}}async load(e){return this.addResolvingPromise(this._loadViewAdapter(e).catch((e=>{if(!g(e))throw e}))),this}async loadBestImage(e,t){return this.selectedPoint=Z(e),this.beforeLoad(),this._fetchFeaturesWithController(e,t)}loadImageError(e){u.getLogger(this).error("oriented-imagery-viewer:load-image",e),this.setMessage("imageLoadError","error",e.message)}async loadSketch(e){if(!this.sketch){const t=import("../Sketch/SketchViewModel.js"),{default:a}=await t;y(e),this.sketch=new a({layer:this._sketchGraphicsLayer,view:this.activeViewer?.imageRenderer,updateOnGraphicClick:!1,defaultUpdateOptions:{reshapeOptions:{edgeOperation:"none",shapeOperation:"none",vertexOperation:void 0},enableMoveAllGraphics:!1,enableRotation:!1,enableScaling:!1,multipleSelectionEnabled:!1,toggleToolOnClick:!1,tool:"transform"}})}return this.sketch}async loadMeasurementAdapter(e){if(!this.sketchAdapter){const t=import("./adapters/sketch/MeasurementAdapter.js"),{default:a}=await t;if(y(e),this.sketchAdapter=new a({viewModel:this}),!this.sketchAdapter.viewModel.isResolved())return}return this.sketchAdapter}async loadTriangulatedMeasurementAdapter(e){if(!this.triangulatedMeasurementAdapter){const t=import("./adapters/sketch/TriangulatedMeasurementAdapter.js"),{default:a}=await t;if(y(e),this.triangulatedMeasurementAdapter=new a({viewModel:this}),!this.triangulatedMeasurementAdapter.viewModel.isResolved())return}return this.triangulatedMeasurementAdapter}async processFeatureResponse(e,t,a){const{features:r}=e;if(this._clearFeatureGeometries(),!this._checkFeatures(r))return;const{features:i,polygons:s,frustums:o}=this.filterByFootprints(r,t,a?.skipFilter);if(!this._checkFeatures(i))return;this.coveragePolygons.addMany(s),this.coverageFrustums.addMany(o);const n=await this.processElevationSample(s,i,a);y(a),await this._updateElevationOfSelectedPointAndLocations(i,t,n),y(a),pt(i,n);const c=this._processSuitableFeatures(i,t);this.updateSuitabilities(c,a?.loadBestImage)}async startMeasurement(e,t){this.sketch||await this.loadSketch(t),await this.loadMeasurementAdapter(t);const{sketch:a,sketchAdapter:r,activeViewer:i,mode:s}=this;if(!a||!r||!i||"none"===s)return;if(this.displayNewMeasurementButton=!1,"panoramic"===s&&(a.defaultCreateOptions.defaultZ=0),await a.create(e),"panoramic"===s){const{drawOperation:e}=a.view.activeTool;e.constraintsEnabled=!1,e._set("elevationDrawSurface",null)}const o=this.activeViewer?.imageRenderer.effectiveTheme.accentColor;o&&this.sketch&&(this.sketch.polygonSymbol=tt(o),this.sketch.polylineSymbol="panoramic"===s?at:rt(o,2.5))}startHeightMeasurement(){this.heightMeasurementPixels=[],this.displayNewMeasurementButton=!1,this.draw??=new ge({view:this.activeViewer?.imageRenderer});this.draw.create("polyline").on(["cursor-update","vertex-add","draw-complete"],(e=>this.handleDrawEvents(e)))}createPolylineGraphic(){const e=[this.heightMeasurementPixels[0],this.heightMeasurementPixels.at(-1)],a=this.activeViewer?.imageRenderer.spatialReference;if(this.heightGraphic)this.heightGraphic.geometry=new T({paths:[e],spatialReference:a});else{const r=new T({paths:[e],spatialReference:a}),i=this.activeViewer?.imageRenderer.effectiveTheme.accentColor;this.heightGraphic=new t({geometry:r,symbol:rt(i,2.5)}),this.activeViewer?.addGraphic(this.heightGraphic)}}createPolylineGraphicPano(){const e=this.activeViewer?.imageRenderer.spatialReference,a=this.activeViewer?.imageSize;if(!a)return;const r={x:this.heightMeasurementPixels[0][0],y:this.heightMeasurementPixels[0][1]},i={x:this.heightMeasurementPixels.at(-1)[0],y:this.heightMeasurementPixels.at(-1)[1]},{heading:s,pitch:o}=ae(r,a[0],a[1]),{heading:n,pitch:c}=ae(i,a[0],a[1]),l=[[...re(s,o)],[...re(n,c)]];if(this.heightGraphic)this.heightGraphic.geometry=new T({paths:[l],spatialReference:e});else{const a=new T({paths:[l],spatialReference:e});this.heightGraphic=new t({geometry:a,symbol:at}),this._panoramicViewer.addGraphic(this.heightGraphic,0)}}async editOverlayedGraphics(e){this.sketchTriangularGraphicsLayer||this._initializeSketchTriangularGraphicsLayer(),this.sketchTriangularGraphicsLayer?.destroyed&&this._handleDestroyedTriangularSketchLayer(),this.sketchTriangularGraphicsLayer.add(e),this.sketchTriangular||(this._initializeSketchTriangular(),await this.loadTriangulatedMeasurementAdapter()),this.updateOverlayedGeometry(e)}updateOverlayedGeometry(e){this.sketchTriangular?.update([e],{tool:"reshape"})}async processMeasurementVectors(e){this.triangularMeasurementActive&&this.currentBestFeature&&(this.measurementVectors?.length<2&&await this.updateMeasurementVectorsArray(e),2===this.measurementVectors.length&&await this.calculateTriangulatedMeasurements(e))}async updateMeasurementVectorsArray(e){const t=this.measurementVectors.length?this.currentBestFeatureMeasurementImage:this.currentBestFeature;if(t){const a=await this.computeMeasurementVector(e,t);a&&this.measurementVectors.push(a)}}async computeMeasurementVector(e,t){const{activeViewer:a,mode:r}=this,i=a?.imageSize;if(!e||!t||!i)return;const s=e.map((e=>[e[0]-.5,-.5-e[1]])),o=this.view?.spatialReference,n=[];for(let c=0;c<s.length;c++){const e={x:s[c][0],y:s[c][1]};let a=await this.getMapPoint(e,{feature:t,imageSize:i,mode:r});o&&!a.spatialReference.equals(o)&&(a=await j(a,o)),n.push(a)}return Qe(n,t)}async handleDrawEvents(e,t){if(this.draw)switch(e.type){case"cursor-update":this.handleDrawCursorUpdateEvents(e);break;case"vertex-add":this.handleDrawVertexAddEvents(e,t);break;case"draw-complete":await this.displayHeightResults()}}initializeMeasurement(e){switch(this.clearMeasurementGraphics(),this.resetMeasurementData(),e){case"distance":this.startMeasurement("polyline");break;case"area":this.startMeasurement("polygon");break;case"height":this.startHeightMeasurement()}}async overlayCameraLocations(e){const{activeViewer:a,currentBestFeature:r,overlayedCameraLocations:i,layer:s,mode:o,state:n}=this,c=a?.imageSize;if(!c||!r||!s||"none"===o||n.includes("loading"))return;const{polygon:l}=U(r.attributes);if(a.removeManyGraphics(i.toArray()),i.removeAll(),e){const{features:e}=await s.queryFeatures({where:`${s.objectIdField} <> ${r.attributes.objectId}`,geometry:l,returnGeometry:!0,outFields:[s.objectIdField]}),n=await Promise.all(e.map((async e=>{const{attributes:a,geometry:i}=e,s=await this.getPixels(i,{feature:r,imageSize:c,mode:o}),n=it.clone();return n.outline=new pe({color:[0,0,0],width:1}),new t({attributes:a,symbol:n,geometry:s})})));i.addMany(n),a.addManyGraphics(i.toArray())}}overlayGraphicsOnImage(e,t){this.removeOverlayedGraphicsOnImage(e),this.overlayedMapFeatures.set(e,t),this.activeViewer?.addManyGraphics(t.toArray())}async overlayMapFeatures(e,a=!1){const{activeViewer:i,currentBestFeature:o,mode:n,state:c,layer:l}=this,h=i?.imageSize;if(!h||!o||"none"===n||c.includes("loading")||!l)return;const{polygon:m}=U(o.attributes);try{const{imageGeometryField:t,oiObjectIdField:a}=Pe(e,l.imageGeometryField,l.imageReferenceField);this.imageGeometryField=t.name,this.oiObjectIdField=a.name}catch(g){u.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features",g)}const{features:d}=await e.queryFeatures({geometry:m,returnGeometry:!0,outFields:["*"]}),p=new s((await Promise.all(d.map((async r=>{const i=r.symbol?.clone()??e.renderer?.getSymbol(r)?.clone(),{attributes:s,geometry:c}=r,l=c,{imageGeometryField:m,oiObjectIdField:d}=this;if(m&&d&&Ie(e,m,d)&&`${s[d]}`==`${o.attributes.objectId}`)try{return Se(s,m,e,a,h,n,i)}catch(g){u.getLogger(this).warn("oriented-imagery-viewer:overlay-map-features","couldn't create graphic from attributes, geometry will be used",{error:g,feature:r,layer:e,imageGeometryField:this.imageGeometryField,imageReferenceField:this.oiObjectIdField})}switch(l?.type){case"point":{const r=await this.getPixels(l,{feature:o,imageSize:h,mode:n});return new t({attributes:s,layer:e,symbol:i,geometry:r,visible:e.visible&&a})}case"polygon":{const{rings:r,spatialReference:c}=l,u=r.map((e=>e.map((([e,t,a])=>new R({x:e,y:t,z:a,spatialReference:c}))))),m=await Promise.all(u.map((async e=>this.getPixels(e,{feature:o,imageSize:h,mode:n}).then((e=>e.map(ce))))));return new t({attributes:s,layer:e,symbol:i,geometry:new O({rings:m,spatialReference:B.WebMercator}),visible:e.visible&&a})}case"polyline":{const{paths:r,spatialReference:c}=l,u=r.map((e=>e.map((([e,t,a])=>new R({x:e,y:t,z:a,spatialReference:c}))))),m=await Promise.all(u.map((async e=>this.getPixels(e,{feature:o,imageSize:h,mode:n}).then((e=>e.map(ce))))));return new t({attributes:s,layer:e,symbol:i,geometry:new T({paths:m,spatialReference:B.WebMercator}),visible:e.visible&&a})}case"multipoint":{const{points:r,spatialReference:c}=l,u=r.map((([e,t,a])=>new R({x:e,y:t,z:a,spatialReference:c}))),m=await this.getPixels(u,{feature:o,imageSize:h,mode:n}).then((e=>e.map(ce)));return new t({attributes:s,layer:e,symbol:i,geometry:new L({points:m,spatialReference:B.WebMercator}),visible:e.visible&&a})}}return null})))).filter(r));this.overlayGraphicsOnImage(`${e.id}`,p)}async getPixels(e,t){const{imageSize:a,mode:r}=t,i=(await this.worldToImage(Array.isArray(e)?e:[e])).map((e=>{if("default"===r)return new R({x:e.x-.5,y:.5-e.y,spatialReference:B.WebMercator});const[t,i]=a,{heading:s,pitch:o}=ae(e,t,i),n=re(s,o);return new R(n,B.WebMercator)}));return Array.isArray(e)?i:i[0]}async getMapPoint(e,t){const{feature:a,mode:r,imageSize:i}=t,{elevationSample:s,attributes:o}=a,{elevationSource:n,location:c,elevation:l,cameraHeight:u}=o;let h=c.clone();h.spatialReference.isGeographic&&(h=await j(h,B.WebMercator));const m=await se(l??(c.z??0)-u,{elevationSample:s,elevationSource:n,extent:this.footprintExtent});let d;if("elevationSample"in m&&oe(m.elevationSample)&&(a.elevationSample=m.elevationSample),"default"===r){const t=ie(o,i[0],i[1]);d=await K(Array.isArray(e)?e:[e],{...t,cameraLocation:h},m)}else{const t=ne(o,i[0],i[1]);d=await Q(Array.isArray(e)?e:[e],{...t,cameraLocation:h},m)}return Array.isArray(e)?d:d[0]}getActiveSectors(){return Fe.filter((e=>this._sectorData?.[e]?.length))}async plotMapPoint(e){return this.plotReferencePoint(e),this.transformAndPlotReferencePointOnImage({feature:this.currentBestFeature,selectedLocation:e,options:{signal:this._transformController?.signal}})}plotReferencePointOnGround(e){this._referencePointOnGround&&(this._overlays?.remove(this._referencePointOnGround),this._referencePointOnGround.destroy()),null!=e&&(this._referencePointOnGround=new t({geometry:new R({...e.toJSON()}),symbol:st}),this.view?this._overlays?.add(this._referencePointOnGround):this.emit("plot-ground-point",{data:{point:this._referencePointOnGround?.geometry}}))}plotReferencePointOnImage(e){if("image-loaded"===this.state)switch(this.clearReferencePointOnImage(),this.mode){case"default":{const a=V(e)?e.toJSON():e;a.x-=.5,a.y=.5-a.y,this._referencePointOnImage=new t({geometry:new R({spatialReference:this._imageViewer.imageRenderer.spatialReference,...a}),symbol:st}),this._imageViewer.addGraphic(this._referencePointOnImage,0);break}case"panoramic":{const{imageSize:a}=this._panoramicViewer;if(!a)return;const[r,i]=a,{heading:s,pitch:o}=ae(e,r,i),n=re(s,o);this._referencePointOnImage=new t({geometry:new R(n,B.WebMercator),symbol:ot}),this._panoramicViewer.addGraphic(this._referencePointOnImage,0);break}}}plotLocationPointOnImage(e,t=!1){if("image-loaded"===this.state)switch(this.clearLocationPointOnImage(t),this.mode){case"default":this._plotLocationPointOnDefaultImage(e,t);break;case"panoramic":this._plotLocationPointOnPanoramicImage(e)}}removeAllOverlayMapFeatures(){this.overlayedMapFeatures.forEach((e=>{this._imageViewer.removeManyGraphics(e.toArray())})),this.overlayedMapFeatures.clear()}removeOverlayedGraphicsOnImage(e){const t=this.overlayedMapFeatures.get(e);t?.length&&(this.activeViewer?.removeManyGraphics(t.toArray()),this.overlayedMapFeatures.delete(e))}resetImage(){switch(this.setMessage("onLoadMessage","info"),this.mode){case"default":this._imageViewer.clearImage(),this._imageViewer.clearGraphics();break;case"panoramic":this._panoramicViewer.clearGraphics()}this._clickTask=m(this._clickTask)}resetMeasurementData(){this.areaMeasurementResult=0,this.areaMeasurementAccuracy=0,this.distanceMeasurementResult=0,this.distanceAccuracyArray=[],this.heightMeasurementPixels=[],this.measurementVectors=[],this.heightMeasurementResult=0,this.tempDistance=null,this.measurementAngle=null,this.heightMeasurementAccuracy=0,this.heightGraphic=null,this.triangulatedDistanceMeasurement=null,this.triangulatedDistanceAccuracy=null,this.triangulatedAreaMeasurement=null,this.triangulatedMeasurementGraphic=null,this.updatingTriangularMeasurementState=!1,this.triangulatedAreaAccuracy=0}async saveDrawing(){const{dataCaptureLayer:e,sketchAdapter:t}=this;if(!e||"data-capture"!==t?.type)return;const{pendingGraphics:a,savedGraphics:r}=t,i=a.get(e.id),s=i?.toArray();if(!i||!s?.length)return;const{addFeatureResults:o}=await this.saveDataCaptureFeatures(s),n=o.reduce(((t,{objectId:a,globalId:r,error:i},o)=>{const n=s[o],{attributes:c}=n;return i?t.error.push(n):(a&&(c[e.objectIdField]=a),r&&e.globalIdField&&(c[e.globalIdField]=r),t.success.push(n)),t}),{success:[],error:[]});r.addMany(n.success),i.removeAll(),i.addMany(n.error)}async saveDataCaptureFeatures(e){const{activeViewer:t,currentBestFeature:a,dataCaptureLayer:i,mode:s}=this,o=t?.imageSize;if(!o||!a||"none"===s)throw new n("orientedimagery","Image size, current best feature and mode are required to save data capture features");if(!i)throw new n("orientedimagery","Data capture layer is not available");const c=await Promise.all(e.map((async e=>{const t=e.clone(),{geometry:r}=t;if(!r)return;const n=r.type,c=i.hasZ,l=i.geometryType,u=n!==l,h=u?await import("./transformers.js"):null,m=h?.default[l],d=u?m?.(r):r;if(d)switch(d.type){case"point":return t.geometry=await this.getMapPoint(le(s,d,o),{feature:a,imageSize:o,mode:s}),c||(delete t.geometry.z,t.geometry.hasZ=!1),t.geometry.hasM=!1,t;case"polygon":{const e=await Promise.all(d.rings.map((async e=>this.getMapPoint(e.map((([e,t,a])=>le(s,{x:e,y:t,z:a},o))),{feature:a,imageSize:o,mode:s}))));return t.geometry=new O({spatialReference:e[0][0].spatialReference,hasZ:c,hasM:!1,rings:e.map((e=>e.map(ce)))}),t}case"polyline":{const e=await Promise.all(d.paths.map((async e=>this.getMapPoint(e.map((([e,t,a])=>le(s,{x:e,y:t,z:a},o))),{feature:a,imageSize:o,mode:s}))));return t.geometry=new T({spatialReference:e[0][0].spatialReference,hasZ:c,hasM:!1,paths:e.map((e=>e.map(ce)))}),t}}}))),l=c.filter(r);return i.applyEdits({addFeatures:l}).then((e=>{const{addFeatureResults:t}=e;let a=0;const r=c.map((e=>{const r=t[a++];return e?r:{error:new n("orientedimagery","Error in saving data capture features"),objectId:null,globalId:null}}));return{...e,addFeatureResults:r}}))}async searchBestImage(e,t){try{const a=await D(e,t);a&&await this.processFeatureResponse(a,e.point,t)}catch(a){g(a)||(this.setMessage("imageLoadError","error",a.message),u.getLogger(this).error("error occurred while finding best image",a))}}selectTriangularMeasurementFeature(e){this.currentBestFeatureMeasurementImage=this.features?.find((({attributes:t})=>t.objectId===Number(e)))}setAdditionalCameraLocationsVisibility(e){this.additionalCameraLocations.forEach((t=>{t.visible=e}))}setAdditionalCoverageVisibility(e){this.additionalFootprints.forEach((t=>{t.visible=e}))}setCurrentCoverageVisibility(e){this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.visible=e),this.currentBestFeatureLocation&&(this.currentBestFeatureLocation.visible=e)}setMapImageConversionToolState(e){this.mapImageConversionToolState=e}setCurrentPanoramaView(e,t){this._panoramicViewer?.set({yaw:e,pitch:t})}async startDataCapture(e,t){const a=this.activeViewer?.imageRenderer,{oiObjectIdField:r,currentBestFeature:i}=this;if(!a||!i||!r)return;const{attributes:{objectId:o}}=i,n=this.overlayedMapFeatures.get(e.id)?.toArray()??[],c=[],l=[];for(const s of n)`${s.getAttribute(r)}`==`${o}`?c.push(s):l.push(s);this.overlayGraphicsOnImage(e.id,new s(l)),this.collectionId=e.id;const u=await this.loadSketch(t),h=await this.loadDataCaptureAdapter(t);y(t),u.layer.addMany(c),u.layer.blendMode="source-atop",h.savedGraphics.addMany(c);a.ui.find("zoom").visible=!1,a.map.layers.add(this.sketchGraphicsLayer)}async stopDataCapture(e=!1){this.sketch?.cancel(),this.sketchGraphicsLayer?.removeAll(),this.sketchAdapter=d(this.sketchAdapter),this.sketch=d(this.sketch),this.collectionId=null;const{dataCaptureLayer:t}=this,a=this.activeViewer?.imageRenderer;if(!a||a.destroyed)return;a.map.layers.remove(this.sketchGraphicsLayer),e&&t&&await this.overlayMapFeatures(t,!0);const r=a.ui.find("zoom");r&&(r.visible=!0)}stopMeasurement(){this.heightMeasurementPixels=[],this.draw?.reset(),this.sketch?.cancel()}toggleAllOverlayMapFeatures(e){this.overlayedMapFeatures.forEach((t=>{this._toggleVisiblity(t,e)}))}toggleOverlayMapFeatures(e,t){const a=this.overlayedMapFeatures.get(e);a&&this._toggleVisiblity(a,t)}toggleSelection(e){const{sketch:t}=this;t&&(t.updateOnGraphicClick=e,t.cancel())}async transformAndPlotReferencePointOnImage(e){const{selectedLocation:t,options:a}=e;let r=!1,i=!1;const s=this.bestFeatureFootprint?.geometry;switch(s?.type){case"polygon":{const e=t.spatialReference.equals(s.spatialReference)?t:await j(t,s.spatialReference);r=s.contains(e);break}case"mesh":{const e=t.spatialReference.equals(s.spatialReference)?t:await j(t,s.spatialReference);i=s.extent.contains(e);break}}if(!r&&!i)return void this.clearReferencePointOnImage();const o=await this.worldToImage(t,a);if(o)return y(a),this.plotReferencePointOnImage(o),{x:o.x,y:o.y};this.clearReferencePointOnImage()}async _calculateTriangulatedPointFromGroundPoint(e,t){if(this.currentBestFeatureMeasurementImage&&e){const{currentBestFeatureMeasurementImage:a}=this,r=Qe(e,a);r&&this.measurementVectors.push(r);const i=await Xe(this.measurementVectors);y(t),this.triangulatedPoint=i??this.triangulatedPoint}}async _fetchFeatures(e,t){if(!this.view)return;const a=this.layer;if(a){const r={include:a},i=this.view.toScreen(e);if(!i)return;const s=await this.view.hitTest(i,r);return this._processHitTestResults(a,s,t)}}async _fetchFeaturesWithController(e,t){try{await this._fetchFeatures(e,t)}catch(a){if(g(a))return;this.setMessage("imageLoadError","error"),u.getLogger(this).error("error occurred while fetching features",a)}}_groupFeaturesBySectors(){const{_suitabilities:e,additionalFeatures:t,features:a,invalidCameraHeading:r}=this,i=a.at(0);if(!e||!t||!i||!a||r)return void(this._sectorData=null);this._sectorData={};const o={};this._featureToSector=o;for(const h of Fe)this._sectorData[h]=new s;const n=e.map(((e,t)=>({...e,featureIndex:t})));n.sort(((e,t)=>e.trueSuitability-t.trueSuitability));const c=n.map((({distance:e})=>e)),l=Math.max(...c),u=a.reduce(((e,t)=>Math.max(e,t.attributes.location.z??0)),-1/0);n.forEach((e=>{const{distance:t,angle:r,featureIndex:s}=e,n=t/l*Me[2],c=yt(t,l),h=gt(r);if(!this._sectorData)return;const m=Me[3]+n*Math.sin(r*Math.PI/180),d=Me[3]+n*Math.cos(r*Math.PI/180);let p;const g=a.at(s),y=(g.attributes.location.z??0)/u*Me[2],v=g===i,{cameraPitch:f}=g.attributes,w=f<5;if(v&&w)p=-90;else{const e=m-Me[3],t=d-Me[3],a=t/Math.sqrt(e**2+t**2);let r=180*Math.acos(a)/Math.PI;(e<0&&t<0||e<0&&t>0)&&(r*=-1),p=r}const b=""===c?h:`${c}_${h}`;v&&(p===this.bestFeatureAngle?this.previousFeatureAngle=p:this.bestFeatureAngle=p,this.navigatorCurrentBestFeature=w?null:{x:m,y:d,direction:h}),o[`${g.attributes.objectId}`]=b;const F=this._sectorData[b];F.add({angle:r,featureIndex:s,x:m,y:d,z:y,objectID:g.attributes.objectId,sector:b,featureIndexInSector:F.length})}))}_handleDestroyedTriangularSketchLayer(){this.sketchTriangularGraphicsLayer&&(this.imageMeasurementViewer.imageRenderer.map.layers.remove(this.sketchTriangularGraphicsLayer),this.sketchTriangularGraphicsLayer=new z,this.imageMeasurementViewer.imageRenderer.map.layers.add(this.sketchTriangularGraphicsLayer),this.sketchTriangular&&(this.sketchTriangular.layer=this.sketchTriangularGraphicsLayer,this.sketchTriangular.view=this.imageMeasurementViewer.imageRenderer))}_initializeSketchTriangular(){this.sketchTriangular=new Pt({view:this.imageMeasurementViewer.imageRenderer,layer:this.sketchTriangularGraphicsLayer,updateOnGraphicClick:!1,defaultUpdateOptions:{toggleToolOnClick:!1}})}_initializeSketchTriangularGraphicsLayer(){this.sketchTriangularGraphicsLayer=new z,this.imageMeasurementViewer.imageRenderer.map.layers.add(this.sketchTriangularGraphicsLayer)}_plotLocationPointOnDefaultImage(e,a=!1){const r=V(e)?e.toJSON():e;r.x-=.5,r.y=.5-r.y,a?(this._correctedLocationPointOnImage=new t({geometry:new R({spatialReference:B.WebMercator,...r}),symbol:nt}),this.imageMeasurementViewer.addGraphic(this._correctedLocationPointOnImage,0)):(this._locationPointOnImage=new t({geometry:new R({spatialReference:B.WebMercator,...r}),symbol:nt}),this._imageViewer.addGraphic(this._locationPointOnImage,0))}_plotLocationPointOnPanoramicImage(e){const{imageSize:a}=this._panoramicViewer;if(!a)return;const[r,i]=a,{heading:s,pitch:o}=ae(e,r,i),n=re(s,o);this._locationPointOnImage=new t({geometry:new R(n,B.WebMercator),symbol:ct}),this._panoramicViewer.addGraphic(this._locationPointOnImage,0)}_clearFeatureGeometries(){this.coveragePolygons.removeAll(),this.coverageFrustums.removeAll(),this.pointSources.removeAll()}_checkFeatures(e){return!!e?.length||(this.setMessage("noImageError","error"),this.currentBestFeature=null,!1)}async _getElevationSampleFromGround(e,t,a){if(!e[0])return;const r=await G(e);if(this._updateFootprintWithFeatures(t,r),this.view?.supportsGround)try{return await this.view.map.ground.createElevationSampler(this.footprintExtent,a)}catch(i){g(i)||u.getLogger(this).error(i)}}async processElevationSample(e,t,a){const{elevationSource:r}=t[0].attributes,i=await this._getElevationSampleFromGround(e,t,a);return i||(r&&this.footprintExtent&&J(r)?await Y({extent:this.footprintExtent,lod:r.lod,url:r.url,rasterFunction:r.rasterFunction}):void 0)}_processSuitableFeatures(e,t){return H({features:e,selectedPoint:t,camera:vt(this.view)?this.view.camera:null,currentImage:this.currentBestFeature})}async _processHitTestResults(e,t,a){const{screenPoint:r,results:[i]}=t,s="graphic"===i?.type&&this.shouldShowSelectedImage,o=i?.mapPoint??this.view?.toMap(r);if(!o)return;const{layerFloorFilterClause:n}=this,c=e.spatialReference.equals(o.spatialReference)?o:await j(o,e.spatialReference),l=c.spatialReference.isGeographic?E(c):c,u=P("1=1",P(e.definitionExpression,n)),h=l.spatialReference.isGeographic?1:I(l.spatialReference),m={layerInstanceOrURL:e,point:l,queryParams:{where:u,maximumDistance:e.maximumDistance?e.maximumDistance/h:void 0,objectIds:s?[i.graphic.getAttribute(e.objectIdField)]:void 0}};await this.searchBestImage(m,a)}async _queryAndLoadByObjectId(e,t,a,r){this.displayMessage=null;const{response:i}=await _t(e,t,a,r);if(y(r),!i?.features?.length)throw new Mt(t);const s=Z(U(i.features[0].attributes).polygon.centroid),o=I(s.spatialReference);this.selectedPoint=s;const n={layerInstanceOrURL:e,point:s,queryParams:{where:P("1=1",P(e.definitionExpression,a)),maximumDistance:e.maximumDistance?e.maximumDistance/o:void 0}};return await this.searchBestImage(n,{...r,loadBestImage:!1})}_reorderTriangularSketchLayer(){const e=this.imageMeasurementViewer.imageRenderer.map.layers?.length;this.sketchTriangularGraphicsLayer&&e&&this.imageMeasurementViewer.imageRenderer.map.layers.reorder(this.sketchTriangularGraphicsLayer,e-1)}_resetCursor(){const{activeViewer:e,imageMeasurementViewer:t}=this;e&&(e.imageRenderer.cursor=this._previousCursor),t&&(t.imageRenderer.cursor=this._previousCursor)}async _setImageSource(e,t,a,r,i,s){e.imageSource={datasetFormat:t.toUpperCase(),url:a.split("?")[0]},e.customParameters=Object.fromEntries(r),e.imageRotation=i??0,await e.loadImage(s)}_setMeasurementCursor(){const{activeViewer:e,imageMeasurementViewer:t,triangularMeasurementActive:a}=this;e&&(this._previousCursor=e.imageRenderer.cursor,e.imageRenderer.cursor="crosshair"),t&&a&&(t.imageRenderer.cursor="crosshair")}_toggleVisiblity(e,t){e.forEach((e=>{e.visible=t}))}_triangulatedLocationWorkflow(e){if(this.currentBestFeature&&e){const{currentBestFeature:t}=this;this.triangulatedPoint&&(this.measurementVectors=[],this.triangulatedPoint=null,this.clearLocationPointOnImage(!0));const a=Qe(e,t);if(!a)return;this.measurementVectors.push(a),this.plotReferenceLocationPoint(e),this._createTriangularImageLocationHandle()}}async _updateElevationOfSelectedPointAndLocations(e,t,a,r){const i=oe(a),s=await se((e[0].attributes.location.z??0)-e[0].attributes.cameraHeight,{elevationSample:i?a:void 0,elevationSource:i?void 0:e[0].attributes.elevationSource,extent:this.footprintExtent},r);y(r);const[o,...n]=await X([t,...e.map((e=>e.attributes.geometry.clone()))],s);y(r),t.elevation=o.z,e.forEach(((e,t)=>{e.attributes.elevation=n[t].z}))}_updateFeatures(e,t=!0){if(!e.length)return this.currentBestFeature=null,void this.additionalFeatures.removeAll();this.features.removeAll(),this.features.addMany(e),this.navigationNodes.removeAll(),this.navigationNodes.addMany(e.map((e=>new bt({geometry:e.geometry,attributes:e.attributes})))),e.length>1?this.additionalFeatures.addMany(e.slice(1)):this.additionalFeatures.removeAll(),this._updateGroundElevation=!0,t&&(this.currentBestFeature=e[0])}_updateFootprintWithFeatures(e,t){const a=[];for(const{geometry:r}of e)t.contains(r)||a.push([r.x,r.y]);a.sort(((e,t)=>+x([e,t]))),t.addRing(a),this.footprintExtent=ye(t.extent,2,2)}async _updatePointsAndPolygons(e){const{pointSources:a,currentBestFeature:r,currentCoverageVisible:i,isAdditionalPointSourcesVisible:s}=this;if(r&&(this.additionalFootprints.removeAll(),this.additionalCameraLocations.removeAll(),this.bestFeatureCurrentFootprint&&(this.bestFeatureCurrentFootprint.destroy(),this.bestFeatureCurrentFootprint=null,this.bestFeatureFootprint=null),!this.invalidCameraHeading)){await(this._adapter?.createFootprints(e)),y(e);for(const e of a)e.imageID===r.attributes.objectId?this.currentBestFeatureLocation=new t({attributes:{imageID:e.imageID},geometry:e.clone(),symbol:lt,visible:i}):this.additionalCameraLocations.push(new t({attributes:{imageID:e.imageID},geometry:e.clone(),symbol:it,visible:s}))}}_updateCurrentBestFeature(e){if(!e)return;this.currentBestFeature=this.features?.at(e.featureIndex);const t=this.currentBestFeature?.attributes.cameraPitch&&this.currentBestFeature?.attributes.cameraPitch<5;let a;if(t)a=-90;else{const t=e.x-Me[3],r=e.y-Me[3],i=r/Math.sqrt(t**2+r**2);let s=180*Math.acos(i)/Math.PI;(t<0&&r<0||t<0&&r>0)&&(s*=-1),a=s}a===this.bestFeatureAngle?this.previousFeatureAngle=a:this.bestFeatureAngle=a,this.navigatorCurrentBestFeature=t?null:{x:e.x,y:e.y,direction:e.sector.includes("_")?e.sector.split("_")[1]:e.sector}}_updateImageMeasurementBestFeature(e){e&&(this.currentBestFeatureMeasurementImage=this.features?.at(e.featureIndex))}clearGraphics(){this._imageViewer.clearGraphics(),this._panoramicViewer.clearGraphics(),this.imageMeasurementViewer.clearGraphics()}clearReferencePointOnImage(){this._referencePointOnImage&&(this._imageViewer.removeGraphic(this._referencePointOnImage),this._panoramicViewer.removeGraphic(this._referencePointOnImage),this._referencePointOnImage=d(this._referencePointOnImage))}clearLocationPointOnImage(e=!1){this._locationPointOnImage&&!e&&(this._imageViewer.removeGraphic(this._locationPointOnImage),this._panoramicViewer.removeGraphic(this._locationPointOnImage),this._locationPointOnImage=d(this._locationPointOnImage)),this._correctedLocationPointOnImage&&(this.imageMeasurementViewer.removeGraphic(this._correctedLocationPointOnImage),this._correctedLocationPointOnImage=d(this._correctedLocationPointOnImage))}plotReferencePoint(e){"mapPoint"in e?this.plotReferencePointOnGround(e.mapPoint):this.plotReferencePointOnGround(e)}plotReferenceLocationPoint(e){if(this.currentBestFeatureMeasurementImage){const t=this.imageMeasurementViewer.imageSize[0],a=this.imageMeasurementViewer.imageSize[1],r=ue(this.currentBestFeatureMeasurementImage.attributes,t,a),i=he(e,r);this.plotLocationPointOnImage(i,!0)}}setMessage(e,t,a,r){this.displayMessage={key:e,type:t,data:a,map:r}}async transformAndPlotSelectedLocation(e){const{currentBestFeature:t,invalidCameraHeading:a,selectedPoint:r,activeViewer:i}=this;if(this._crossSymbol&&(this._panoramicViewer.removeGraphic(this._crossSymbol),this._imageViewer.removeGraphic(this._crossSymbol),this._crossSymbol=d(this._crossSymbol)),!r||!t||"image-loaded"!==i?.state||a)return;let s;try{s=await this.worldToImage(r,e),y(e),await this.plotSelectedPointOnImage(s,e)}catch(o){g(o)||u.getLogger(this).error("failed to transform map point to pixel, cross symbol will not be plotted on image",{error:o,selectedPoint:r,feature:t})}}async worldToImage(e,t){const{footprintExtent:a}=this,{imageSize:r}=this.activeViewer;if("none"===this.mode||!this.currentBestFeature||!r||!a)return;const{attributes:{location:i,elevationSource:s,cameraHeading:o,elevation:n,cameraHeight:c},elevationSample:l}=this.currentBestFeature;let u=i.clone();const h=await se(n??(i.z??0)-c,{elevationSample:l,elevationSource:s});this.currentBestFeature.elevationSample=h.elevationSample;const m=Array.isArray(e)?e:[e];let d,p=await Promise.all(m.map((e=>new Promise((t=>{if(!e.hasZ)return t(X(e,h));t(e)})))));if(i.spatialReference.isGeographic&&(u=await j(u,B.WebMercator,t)),p=await Promise.all(p.map((async e=>u.spatialReference.equals(e.spatialReference)?e:await j(e,u.spatialReference,t)))),y(t),"panoramic"===this.mode)d=me(p,{imageHeight:r[1],imageWidth:r[0],cameraHeading:o,cameraLocation:u});else{const e=ue(this.currentBestFeature.attributes,r[0],r[1]);d=he(p,{...e,cameraLocation:u})}return Array.isArray(e)?d:d[0]}updateCurrentCoveragePolygon(e){const{additionalFootprints:a,additionalCameraLocations:r,currentBestFeature:i,currentBestFeatureLocation:s,currentCoverageVisible:o,selectedPoint:n,view:c,_adapter:l,mode:u}=this,{attributes:{objectId:h},elevationSample:m}=i;if(this._initialCurrentCoverageUpdate){if(this._overlays?.removeAll(),this._initialCurrentCoverageUpdate=!1,this.bestFeatureCurrentFootprint=d(this.bestFeatureCurrentFootprint),e&&!this.invalidCameraHeading&&(e.visible=o,this.bestFeatureCurrentFootprint=e),c){const e=[...a,...r,s].filter(ft);c.supportsGround&&m&&l?.updateGroundElevation&&(this._updateGroundElevation&&l.updateGroundElevation(e,m),"panoramic"===u&&l.updateGroundElevation([this.bestFeatureCurrentFootprint],m)),this._updateGroundElevation=!1,n&&(e.splice(-2,0,this.bestFeatureCurrentFootprint),e.push(new t({geometry:n.clone(),symbol:Ye.clone(),attributes:{imageID:h}}))),this._overlays.graphics.addMany(e)}}else if(c){if(this.invalidCameraHeading)return;this.bestFeatureCurrentFootprint&&(this._overlays?.remove(this.bestFeatureCurrentFootprint),this.bestFeatureCurrentFootprint=d(this.bestFeatureCurrentFootprint));const t=this.bestFeatureCurrentFootprint&&this._overlays?this._overlays.graphics.indexOf(this.bestFeatureCurrentFootprint):-1;e&&(this.bestFeatureCurrentFootprint=e,c?.supportsGround&&m&&l?.updateGroundElevation&&"panoramic"===u&&l.updateGroundElevation([e],m),e.visible=this.currentCoverageVisible,this._overlays?.graphics.add(this.bestFeatureCurrentFootprint,t>=0?t:this._overlays.graphics.length-1))}}};e([S()],Vt.prototype,"activeLayer",null),e([S({readOnly:!0})],Vt.prototype,"activeViewer",null),e([S()],Vt.prototype,"accuracyParametersMissing",null),e([S()],Vt.prototype,"additionalFeatures",void 0),e([S({type:s.ofType(t)})],Vt.prototype,"additionalCameraLocations",void 0),e([S({type:s.ofType(t)})],Vt.prototype,"additionalFootprints",void 0),e([S()],Vt.prototype,"areaMeasurementResult",void 0),e([S()],Vt.prototype,"areaMeasurementAccuracy",void 0),e([S()],Vt.prototype,"bestFeatureAngle",void 0),e([S()],Vt.prototype,"bestFeatureCurrentFootprint",void 0),e([S({type:t})],Vt.prototype,"bestFeatureFootprint",void 0),e([S({type:Number})],Vt.prototype,"brightness",null),e([S()],Vt.prototype,"cameraHeadingThreshold",void 0),e([S()],Vt.prototype,"cameraPitchThreshold",void 0),e([S()],Vt.prototype,"collectionId",void 0),e([S({type:Number})],Vt.prototype,"contrast",null),e([S()],Vt.prototype,"conversionProps",void 0),e([S()],Vt.prototype,"coverageFrustums",void 0),e([S()],Vt.prototype,"coveragePolygons",void 0),e([S()],Vt.prototype,"currentBestFeature",void 0),e([S()],Vt.prototype,"currentBestFeatureMeasurementImage",void 0),e([S()],Vt.prototype,"currentBestFeatureLocation",void 0),e([S()],Vt.prototype,"currentCoverageVisible",void 0),e([S()],Vt.prototype,"currentNode",null),e([S()],Vt.prototype,"navigationNodes",void 0),e([S({json:{write:!1}})],Vt.prototype,"determineWorkflowForFeature",void 0),e([S({json:{write:!1}})],Vt.prototype,"determineWorkflowForTriangularMeasurement",void 0),e([S()],Vt.prototype,"disabled",void 0),e([S()],Vt.prototype,"displayMessage",void 0),e([S()],Vt.prototype,"displayNewMeasurementButton",void 0),e([S()],Vt.prototype,"distanceMeasurementResult",void 0),e([S()],Vt.prototype,"distanceAccuracyArray",void 0),e([S()],Vt.prototype,"dataCaptureLayer",void 0),e([S({readOnly:!0})],Vt.prototype,"featureCount",null),e([S()],Vt.prototype,"features",void 0),e([S()],Vt.prototype,"groundCoordinates",void 0),e([S()],Vt.prototype,"groundCoordinatesAccuracy",void 0),e([S()],Vt.prototype,"heightMeasurementPixels",void 0),e([S()],Vt.prototype,"heightGraphic",void 0),e([S()],Vt.prototype,"heightMeasurementResult",void 0),e([S()],Vt.prototype,"heightMeasurementAccuracy",void 0),e([S()],Vt.prototype,"measurementAngle",void 0),e([S()],Vt.prototype,"tempDistance",void 0),e([S({readOnly:!0})],Vt.prototype,"imageGalleryEnabled",null),e([S()],Vt.prototype,"imageGeometryField",void 0),e([S({readOnly:!0})],Vt.prototype,"imageLoaded",null),e([S()],Vt.prototype,"imageLocationToolState",void 0),e([S({readOnly:!0})],Vt.prototype,"invalidCameraHeading",null),e([S()],Vt.prototype,"imagePointsInView",null),e([S()],Vt.prototype,"imageMeasurementViewer",void 0),e([S()],Vt.prototype,"isAdditionalCoverageVisible",void 0),e([S()],Vt.prototype,"isAdditionalPointSourcesVisible",void 0),e([S()],Vt.prototype,"measurementVectors",void 0),e([S()],Vt.prototype,"layer",void 0),e([S()],Vt.prototype,"layerView",null),e([S({readOnly:!0})],Vt.prototype,"layerFloorFilterClause",null),e([S({type:Number})],Vt.prototype,"localPort",void 0),e([S()],Vt.prototype,"mapImageConversionToolState",void 0),e([S()],Vt.prototype,"measureType",void 0),e([S()],Vt.prototype,"measurementGraphic",void 0),e([S({readOnly:!0,value:"none"})],Vt.prototype,"mode",null),e([S()],Vt.prototype,"navigationMode",void 0),e([S()],Vt.prototype,"navigatorCurrentBestFeature",void 0),e([S()],Vt.prototype,"oiObjectIdField",void 0),e([S({type:s.ofType(t)})],Vt.prototype,"overlayedCameraLocations",void 0),e([S()],Vt.prototype,"overlayedMapFeatures",void 0),e([S()],Vt.prototype,"pixelCoordinates",void 0),e([S()],Vt.prototype,"preserveAngle",void 0),e([S()],Vt.prototype,"pointSources",void 0),e([S({readOnly:!0})],Vt.prototype,"popupEnabled",null),e([S()],Vt.prototype,"previousFeatureAngle",void 0),e([S()],Vt.prototype,"referencePoint",null),e([S({readOnly:!0})],Vt.prototype,"sectorData",null),e([S()],Vt.prototype,"selectedPoint",void 0),e([S({type:Number})],Vt.prototype,"sharpness",null),e([S()],Vt.prototype,"shouldShowSelectedImage",void 0),e([S()],Vt.prototype,"sketch",void 0),e([S()],Vt.prototype,"sketchTriangular",void 0),e([S()],Vt.prototype,"sketchTriangularGraphicsLayer",void 0),e([S()],Vt.prototype,"draw",void 0),e([S()],Vt.prototype,"sketchAdapter",void 0),e([S({readOnly:!0})],Vt.prototype,"sketchGraphicsLayer",null),e([S({readOnly:!0})],Vt.prototype,"state",null),e([S({readOnly:!0})],Vt.prototype,"thumbnails",null),e([S()],Vt.prototype,"triangularMeasurementActive",void 0),e([S()],Vt.prototype,"triangulatedDistanceMeasurement",void 0),e([S()],Vt.prototype,"triangulatedDistanceAccuracy",void 0),e([S()],Vt.prototype,"triangulatedAreaMeasurement",void 0),e([S()],Vt.prototype,"triangulatedAreaAccuracy",void 0),e([S()],Vt.prototype,"triangulatedMeasurementGraphic",void 0),e([S()],Vt.prototype,"triangulatedPoint",void 0),e([S()],Vt.prototype,"triangulatedMeasurementAdapter",void 0),e([S()],Vt.prototype,"updateFootprint",void 0),e([S()],Vt.prototype,"updateFootprintPanorama",void 0),e([S()],Vt.prototype,"updatingTriangularMeasurementState",void 0),e([S({value:null})],Vt.prototype,"view",null),e([S()],Vt.prototype,"_adapter",void 0),e([S()],Vt.prototype,"_sketchGraphicsLayer",null),e([S()],Vt.prototype,"_highlightedFeatureHandle",void 0),e([S()],Vt.prototype,"_imageViewer",void 0),e([S()],Vt.prototype,"_initialCurrentCoverageUpdate",void 0),e([S()],Vt.prototype,"_locationPointOnImage",void 0),e([S()],Vt.prototype,"_correctedLocationPointOnImage",void 0),e([S()],Vt.prototype,"_overlays",void 0),e([S({readOnly:!0})],Vt.prototype,"_overlaysView",null),e([S()],Vt.prototype,"_panoramicViewer",void 0),e([S()],Vt.prototype,"_previousCursor",void 0),e([S()],Vt.prototype,"_referencePointOnGround",void 0),e([S()],Vt.prototype,"_referencePointOnImage",void 0),e([S()],Vt.prototype,"_sectorData",void 0),e([S()],Vt.prototype,"_featureToSector",void 0),e([S({readOnly:!0})],Vt.prototype,"_updatingHandles",void 0),e([S()],Vt.prototype,"footprintExtent",void 0),e([S()],Vt.prototype,"_featureChangedTask",void 0),Vt=e([k("esri.widgets.OrientedImageryViewer.OrientedImageryViewerViewModel")],Vt);const Ct=Vt;export{Ct as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as o}from"../../support/jsxFactory.js";const e=()=>t({alert:()=>import("@esri/calcite-components/dist/components/calcite-alert")});function i({autoCloseDuration:t,bind:e,icon:i,kind:s,message:l,onClose:n,open:r,title:a,tooltip:p}){return o("calcite-alert",{autoClose:!!t,autoCloseDuration:t??"medium",bind:e,icon:i,kind:s,label:a,open:r,slot:"alerts",onCalciteAlertClose:n},o("div",{slot:"title",title:p},a),l?o("div",{slot:"message"},l):null)}export{i as Alert,e as loadAlertComponents};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../../views/MapView.js";import r from"../../Widget.js";import s from"./ImageViewerViewModel.js";import a from"./NavigationUI.js";import n from"./NavigationUIViewModel.js";import{loadCalciteComponents as l}from"../../support/componentsUtils.js";import{globalCss as p}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{vmEvent as d}from"../../support/decorators/vmEvent.js";import{tsx as c}from"../../support/jsxFactory.js";const h="esri-image-viewer";let m=class extends r{constructor(){super(...arguments),this.navigationEnabled=!1,this.viewModel=new s,this._afterContainerCreate=e=>{this.imageRenderer.container=e},this.addGraphic=(e,t)=>{this.viewModel.addGraphic(e,t)},this.addManyGraphics=e=>{this.viewModel.addManyGraphics(e)},this.clearGraphics=()=>{this.viewModel.clearGraphics()},this.clearImage=()=>{this.viewModel.clearImage()},this.loadImage=async e=>this.viewModel.loadImage(e),this.navigate=async(e,t)=>this.viewModel.navigate(e,t),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}loadDependencies(){return l({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")})}get autoLoad(){return this.viewModel.autoLoad}set autoLoad(e){this.viewModel.autoLoad=e}get brightness(){return this.viewModel.brightness}set brightness(e){this.viewModel.brightness=e}get clickAction(){return this.viewModel.clickAction}set clickAction(e){this.viewModel.clickAction=e}get contrast(){return this.viewModel.contrast}set contrast(e){this.viewModel.contrast=e}get currentNode(){return this.navigationViewModel?.currentNode}get customParameters(){return this.viewModel.customParameters}set customParameters(e){this.viewModel.customParameters=e}get error(){return this.viewModel.error}get imageSize(){const e=this.viewModel.image?.serviceRasterInfo;return e?[e.width,e.height]:[0,0]}get imagePointsInView(){return this.viewModel.imagePointsInView}get imageRenderer(){return this.viewModel.imageRenderer}get imageRotation(){return this.viewModel.imageRotation}set imageRotation(e){this.viewModel.imageRotation=e}get imageSource(){return this.viewModel.imageSource}set imageSource(e){this.viewModel.imageSource=e}get navigationNodes(){return this.navigationViewModel?.navigationNodes}set navigationViewModel(e){this.viewModel.navigationViewModel=e}get sharpness(){return this.viewModel.sharpness}set sharpness(e){this.viewModel.sharpness=e}get state(){return this.viewModel.state}render(){return c("calcite-panel",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(p.widget,h)},this.navigationEnabled?c(a,{currentNode:this.currentNode,nodes:this.navigationNodes,viewModel:new n({preserveAngle:this.navigationViewModel?.preserveAngle,cameraHeadingThreshold:this.navigationViewModel?.cameraHeadingThreshold,cameraPitchThreshold:this.navigationViewModel?.cameraPitchThreshold})}):null)}static{this.vnodeSelector="calcite-panel"}};e([t({type:Boolean})],m.prototype,"autoLoad",null),e([t({type:Number}),t()],m.prototype,"brightness",null),e([t()],m.prototype,"clickAction",null),e([t({type:Number})],m.prototype,"contrast",null),e([t()],m.prototype,"currentNode",null),e([t({type:Object})],m.prototype,"customParameters",null),e([t({readOnly:!0})],m.prototype,"error",null),e([t()],m.prototype,"imageSize",null),e([t({readOnly:!0})],m.prototype,"imagePointsInView",null),e([t({readOnly:!0,type:o})],m.prototype,"imageRenderer",null),e([t()],m.prototype,"imageRotation",null),e([t()],m.prototype,"imageSource",null),e([t({type:Boolean})],m.prototype,"navigationEnabled",void 0),e([t()],m.prototype,"navigationNodes",null),e([t()],m.prototype,"navigationViewModel",null),e([t({type:Number})],m.prototype,"sharpness",null),e([t({readOnly:!0})],m.prototype,"state",null),e([d(["click","hittest-response","pixel-location"]),t({type:s})],m.prototype,"viewModel",void 0),m=e([i("esri.widgets.OrientedImageryViewer.components.ImageViewer")],m);const g=m;export{g as default};
5
+ import{_ as e}from"../../../chunks/tslib.es6.js";import{property as t}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as i}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../../views/MapView.js";import r from"../../Widget.js";import s from"./ImageViewerViewModel.js";import a from"./NavigationUI.js";import n from"./NavigationUIViewModel.js";import{loadSequentialNavigationUIComponents as l,SequentialNavigationUI as p}from"./SequentialNavigationUI.js";import{loadCalciteComponents as d}from"../../support/componentsUtils.js";import{globalCss as c}from"../../support/globalCss.js";import"../../support/widgetUtils.js";import{vmEvent as g}from"../../support/decorators/vmEvent.js";import{tsx as u}from"../../support/jsxFactory.js";const h="esri-image-viewer";let m=class extends r{constructor(){super(...arguments),this.navigationEnabled=!1,this.uiStrings=null,this.viewModel=new s,this._afterContainerCreate=e=>{this.imageRenderer.container=e},this.addGraphic=(e,t)=>{this.viewModel.addGraphic(e,t)},this.addManyGraphics=e=>{this.viewModel.addManyGraphics(e)},this.clearGraphics=()=>{this.viewModel.clearGraphics()},this.clearImage=()=>{this.viewModel.clearImage()},this.loadImage=async e=>this.viewModel.loadImage(e),this.navigate=async(e,t)=>this.viewModel.navigate(e,t),this.removeGraphic=e=>{this.viewModel.removeGraphic(e)},this.removeManyGraphics=e=>{this.viewModel.removeManyGraphics(e)}}loadDependencies(){return Promise.all([d({panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")}),l()])}get autoLoad(){return this.viewModel.autoLoad}set autoLoad(e){this.viewModel.autoLoad=e}get brightness(){return this.viewModel.brightness}set brightness(e){this.viewModel.brightness=e}get clickAction(){return this.viewModel.clickAction}set clickAction(e){this.viewModel.clickAction=e}get contrast(){return this.viewModel.contrast}set contrast(e){this.viewModel.contrast=e}get currentNode(){return this.navigationViewModel?.currentNode}get customParameters(){return this.viewModel.customParameters}set customParameters(e){this.viewModel.customParameters=e}get error(){return this.viewModel.error}get imageSize(){const e=this.viewModel.image?.serviceRasterInfo;return e?[e.width,e.height]:[0,0]}get imagePointsInView(){return this.viewModel.imagePointsInView}get imageRenderer(){return this.viewModel.imageRenderer}get imageRotation(){return this.viewModel.imageRotation}set imageRotation(e){this.viewModel.imageRotation=e}get imageSource(){return this.viewModel.imageSource}set imageSource(e){this.viewModel.imageSource=e}get navigationNodes(){return this.navigationViewModel?.navigationNodes}get navigationMode(){return this.navigationViewModel?.navigationMode}get navigationViewModel(){return this.viewModel.navigationViewModel}set navigationViewModel(e){this.viewModel.navigationViewModel=e}get sharpness(){return this.viewModel.sharpness}set sharpness(e){this.viewModel.sharpness=e}get state(){return this.viewModel.state}get ui(){return this.imageRenderer.ui}_renderNavigationUI(){switch(this.navigationMode){case"directional":return u(a,{navigate:this.navigate,viewModel:new n({currentNode:this.currentNode,nodes:this.navigationNodes})});case"sequential":return u(p,{layout:"horizontal",uiStrings:this.uiStrings,onAction:e=>{this.navigate(this.currentNode,e)}});default:return null}}render(){return u("calcite-panel",{afterCreate:this._afterContainerCreate,bind:this,class:this.classes(c.widget,h)},this.navigationEnabled?this._renderNavigationUI():null)}static{this.vnodeSelector="calcite-panel"}};e([t({type:Boolean})],m.prototype,"autoLoad",null),e([t({type:Number}),t()],m.prototype,"brightness",null),e([t()],m.prototype,"clickAction",null),e([t({type:Number})],m.prototype,"contrast",null),e([t()],m.prototype,"currentNode",null),e([t({type:Object})],m.prototype,"customParameters",null),e([t({readOnly:!0})],m.prototype,"error",null),e([t()],m.prototype,"imageSize",null),e([t({readOnly:!0})],m.prototype,"imagePointsInView",null),e([t({readOnly:!0,type:o})],m.prototype,"imageRenderer",null),e([t()],m.prototype,"imageRotation",null),e([t()],m.prototype,"imageSource",null),e([t({type:Boolean})],m.prototype,"navigationEnabled",void 0),e([t()],m.prototype,"navigationNodes",null),e([t()],m.prototype,"navigationMode",null),e([t()],m.prototype,"navigationViewModel",null),e([t({type:Number})],m.prototype,"sharpness",null),e([t({readOnly:!0})],m.prototype,"state",null),e([t()],m.prototype,"ui",null),e([t()],m.prototype,"uiStrings",void 0),e([g(["click","hittest-response","pixel-location"]),t({type:s})],m.prototype,"viewModel",void 0),m=e([i("esri.widgets.OrientedImageryViewer.components.ImageViewer")],m);const v=m;export{v as default};
@@ -0,0 +1,5 @@
1
+ /*
2
+ All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
+ See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
+ */
5
+ import{loadCalciteComponents as t}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as i}from"../../support/jsxFactory.js";function c(){return t({"action-menu":()=>import("@esri/calcite-components/dist/components/calcite-action-menu"),action:()=>import("@esri/calcite-components/dist/components/calcite-action")})}function e(t){const{activeAction:c}=t;return i("calcite-action-menu",{label:t.label,scale:t.scale},i("calcite-action",{active:!!c,icon:c?.icon??t.icon,slot:"trigger",text:c?.text??t.label,title:c?.title??t.title}),t.actions.map((t=>i("calcite-action",{active:t.active,disabled:t.disabled,icon:t.icon,onclick:t.onclick,text:t.text,textEnabled:!0,title:t.title}))))}export{e as NavigationActions,c as loadNavigationActionsComponents};