@arcgis/core 4.33.0-next.20250520 → 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 (449) hide show
  1. package/Graphic.js +1 -1
  2. package/arcade/Feature.js +1 -1
  3. package/assets/esri/core/workers/RemoteClient.js +1 -1
  4. package/assets/esri/core/workers/chunks/{91cd29f53f07bc38fe75.js → 14b3c18581b31c93af82.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{66a1b92358344dd28ee1.js → 571252c9822d73cf7b01.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{2adf558cd8d8155d07d7.js → 80b596496800e8d60eb8.js} +1 -1
  7. package/assets/esri/core/workers/chunks/9b610fbfcd47c3dde34d.js +1 -0
  8. package/assets/esri/core/workers/chunks/a0c35521e677459f6fa3.js +1 -0
  9. package/assets/esri/core/workers/chunks/{0a4cece5e96fb7e8a57b.js → b893012bff5dc55e542d.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{2113da9429f6272339d7.js → cc4a6f4000cb6680be48.js} +3 -3
  11. package/assets/esri/themes/base/_core.scss +2 -0
  12. package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +1 -1
  13. package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationSettingsUI.scss +16 -0
  14. package/assets/esri/themes/dark/main.css +1 -1
  15. package/assets/esri/themes/light/main.css +1 -1
  16. package/assets/esri/themes/light/view.css +1 -1
  17. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  18. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  19. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  20. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  21. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  22. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  23. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  24. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  25. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  26. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  27. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  28. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  29. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  30. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  31. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  32. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  33. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  34. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  35. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  36. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  37. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  38. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  39. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_no.json +1 -1
  40. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  41. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  42. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  43. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  44. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  45. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  46. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  47. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  48. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  49. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  50. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  51. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  52. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  53. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  54. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  55. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  56. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm.json +1 -1
  57. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_en.json +1 -1
  58. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ar.json +1 -1
  59. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bg.json +1 -1
  60. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_bs.json +1 -1
  61. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ca.json +1 -1
  62. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_cs.json +1 -1
  63. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_da.json +1 -1
  64. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_de.json +1 -1
  65. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_el.json +1 -1
  66. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_es.json +1 -1
  67. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_et.json +1 -1
  68. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fi.json +1 -1
  69. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_fr.json +1 -1
  70. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_he.json +1 -1
  71. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hr.json +1 -1
  72. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_hu.json +1 -1
  73. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_id.json +1 -1
  74. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_it.json +1 -1
  75. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ja.json +1 -1
  76. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ko.json +1 -1
  77. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lt.json +1 -1
  78. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_lv.json +1 -1
  79. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_nl.json +1 -1
  80. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_no.json +1 -1
  81. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pl.json +1 -1
  82. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-BR.json +1 -1
  83. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_pt-PT.json +1 -1
  84. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ro.json +1 -1
  85. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_ru.json +1 -1
  86. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sk.json +1 -1
  87. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sl.json +1 -1
  88. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sr.json +1 -1
  89. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_sv.json +1 -1
  90. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_th.json +1 -1
  91. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_tr.json +1 -1
  92. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_uk.json +1 -1
  93. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_vi.json +1 -1
  94. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-CN.json +1 -1
  95. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-HK.json +1 -1
  96. package/assets/esri/widgets/CatalogLayerList/t9n/CatalogLayerList_zh-TW.json +1 -1
  97. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  98. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  99. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  100. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  101. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  102. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  103. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  104. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  105. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  106. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  107. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  108. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  109. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  110. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  111. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  112. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  113. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  114. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  115. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  116. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  117. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  118. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  119. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  120. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  121. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  122. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  123. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  124. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  125. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  126. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  127. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  128. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  129. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  130. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  131. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  132. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  133. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  134. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  135. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  136. package/assets/esri/widgets/LayerList/t9n/LayerList_ar.json +1 -1
  137. package/assets/esri/widgets/LayerList/t9n/LayerList_bg.json +1 -1
  138. package/assets/esri/widgets/LayerList/t9n/LayerList_bs.json +1 -1
  139. package/assets/esri/widgets/LayerList/t9n/LayerList_ca.json +1 -1
  140. package/assets/esri/widgets/LayerList/t9n/LayerList_cs.json +1 -1
  141. package/assets/esri/widgets/LayerList/t9n/LayerList_da.json +1 -1
  142. package/assets/esri/widgets/LayerList/t9n/LayerList_de.json +1 -1
  143. package/assets/esri/widgets/LayerList/t9n/LayerList_el.json +1 -1
  144. package/assets/esri/widgets/LayerList/t9n/LayerList_es.json +1 -1
  145. package/assets/esri/widgets/LayerList/t9n/LayerList_et.json +1 -1
  146. package/assets/esri/widgets/LayerList/t9n/LayerList_fi.json +1 -1
  147. package/assets/esri/widgets/LayerList/t9n/LayerList_fr.json +1 -1
  148. package/assets/esri/widgets/LayerList/t9n/LayerList_he.json +1 -1
  149. package/assets/esri/widgets/LayerList/t9n/LayerList_hr.json +1 -1
  150. package/assets/esri/widgets/LayerList/t9n/LayerList_hu.json +1 -1
  151. package/assets/esri/widgets/LayerList/t9n/LayerList_id.json +1 -1
  152. package/assets/esri/widgets/LayerList/t9n/LayerList_it.json +1 -1
  153. package/assets/esri/widgets/LayerList/t9n/LayerList_ja.json +1 -1
  154. package/assets/esri/widgets/LayerList/t9n/LayerList_ko.json +1 -1
  155. package/assets/esri/widgets/LayerList/t9n/LayerList_lt.json +1 -1
  156. package/assets/esri/widgets/LayerList/t9n/LayerList_lv.json +1 -1
  157. package/assets/esri/widgets/LayerList/t9n/LayerList_nl.json +1 -1
  158. package/assets/esri/widgets/LayerList/t9n/LayerList_no.json +1 -1
  159. package/assets/esri/widgets/LayerList/t9n/LayerList_pl.json +1 -1
  160. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-BR.json +1 -1
  161. package/assets/esri/widgets/LayerList/t9n/LayerList_pt-PT.json +1 -1
  162. package/assets/esri/widgets/LayerList/t9n/LayerList_ro.json +1 -1
  163. package/assets/esri/widgets/LayerList/t9n/LayerList_ru.json +1 -1
  164. package/assets/esri/widgets/LayerList/t9n/LayerList_sk.json +1 -1
  165. package/assets/esri/widgets/LayerList/t9n/LayerList_sl.json +1 -1
  166. package/assets/esri/widgets/LayerList/t9n/LayerList_sr.json +1 -1
  167. package/assets/esri/widgets/LayerList/t9n/LayerList_sv.json +1 -1
  168. package/assets/esri/widgets/LayerList/t9n/LayerList_th.json +1 -1
  169. package/assets/esri/widgets/LayerList/t9n/LayerList_tr.json +1 -1
  170. package/assets/esri/widgets/LayerList/t9n/LayerList_uk.json +1 -1
  171. package/assets/esri/widgets/LayerList/t9n/LayerList_vi.json +1 -1
  172. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-CN.json +1 -1
  173. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-HK.json +1 -1
  174. package/assets/esri/widgets/LayerList/t9n/LayerList_zh-TW.json +1 -1
  175. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
  176. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  178. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
  185. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  186. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  187. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  188. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  189. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  190. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  191. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  192. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  193. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  194. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  195. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  196. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  197. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  198. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  199. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  200. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  216. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  217. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  218. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  219. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  220. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  221. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  222. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  223. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  224. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  225. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  226. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  227. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  228. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  229. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  230. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  231. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  232. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  233. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  234. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  235. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  236. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  237. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  238. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  239. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  240. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  241. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  242. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  243. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  244. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  245. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  246. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  247. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  248. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  249. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  250. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  251. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  252. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  253. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  254. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  255. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ar.json +1 -1
  256. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bg.json +1 -1
  257. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_bs.json +1 -1
  258. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ca.json +1 -1
  259. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_cs.json +1 -1
  260. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_da.json +1 -1
  261. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_de.json +1 -1
  262. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_el.json +1 -1
  263. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_es.json +1 -1
  264. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_et.json +1 -1
  265. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fi.json +1 -1
  266. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_fr.json +1 -1
  267. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_he.json +1 -1
  268. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hr.json +1 -1
  269. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_hu.json +1 -1
  270. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_id.json +1 -1
  271. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_it.json +1 -1
  272. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ja.json +1 -1
  273. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ko.json +1 -1
  274. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lt.json +1 -1
  275. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_lv.json +1 -1
  276. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_nl.json +1 -1
  277. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_no.json +1 -1
  278. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pl.json +1 -1
  279. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-BR.json +1 -1
  280. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_pt-PT.json +1 -1
  281. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ro.json +1 -1
  282. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_ru.json +1 -1
  283. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sk.json +1 -1
  284. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sl.json +1 -1
  285. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sr.json +1 -1
  286. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_sv.json +1 -1
  287. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_th.json +1 -1
  288. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_tr.json +1 -1
  289. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_uk.json +1 -1
  290. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_vi.json +1 -1
  291. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-CN.json +1 -1
  292. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-HK.json +1 -1
  293. package/assets/esri/widgets/TimeSlider/t9n/TimeSlider_zh-TW.json +1 -1
  294. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ar.json +1 -1
  295. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bg.json +1 -1
  296. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_bs.json +1 -1
  297. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ca.json +1 -1
  298. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_cs.json +1 -1
  299. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_da.json +1 -1
  300. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_de.json +1 -1
  301. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_el.json +1 -1
  302. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_es.json +1 -1
  303. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_et.json +1 -1
  304. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fi.json +1 -1
  305. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_fr.json +1 -1
  306. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_he.json +1 -1
  307. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hr.json +1 -1
  308. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_hu.json +1 -1
  309. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_id.json +1 -1
  310. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_it.json +1 -1
  311. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ja.json +1 -1
  312. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ko.json +1 -1
  313. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lt.json +1 -1
  314. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_lv.json +1 -1
  315. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_nl.json +1 -1
  316. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_no.json +1 -1
  317. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pl.json +1 -1
  318. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-BR.json +1 -1
  319. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_pt-PT.json +1 -1
  320. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ro.json +1 -1
  321. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_ru.json +1 -1
  322. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sk.json +1 -1
  323. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sl.json +1 -1
  324. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sr.json +1 -1
  325. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_sv.json +1 -1
  326. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_th.json +1 -1
  327. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_tr.json +1 -1
  328. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_uk.json +1 -1
  329. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_vi.json +1 -1
  330. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-CN.json +1 -1
  331. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-HK.json +1 -1
  332. package/assets/esri/widgets/support/SelectionList/t9n/SelectionList_zh-TW.json +1 -1
  333. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ar.json +1 -1
  334. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bg.json +1 -1
  335. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_bs.json +1 -1
  336. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ca.json +1 -1
  337. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_cs.json +1 -1
  338. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_da.json +1 -1
  339. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_de.json +1 -1
  340. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_el.json +1 -1
  341. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_es.json +1 -1
  342. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_et.json +1 -1
  343. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fi.json +1 -1
  344. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_fr.json +1 -1
  345. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_he.json +1 -1
  346. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hr.json +1 -1
  347. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_hu.json +1 -1
  348. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_id.json +1 -1
  349. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_it.json +1 -1
  350. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ja.json +1 -1
  351. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ko.json +1 -1
  352. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lt.json +1 -1
  353. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_lv.json +1 -1
  354. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_nl.json +1 -1
  355. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_no.json +1 -1
  356. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pl.json +1 -1
  357. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-BR.json +1 -1
  358. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_pt-PT.json +1 -1
  359. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ro.json +1 -1
  360. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_ru.json +1 -1
  361. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sk.json +1 -1
  362. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sl.json +1 -1
  363. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sr.json +1 -1
  364. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_sv.json +1 -1
  365. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_th.json +1 -1
  366. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_tr.json +1 -1
  367. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_uk.json +1 -1
  368. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_vi.json +1 -1
  369. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-CN.json +1 -1
  370. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-HK.json +1 -1
  371. package/assets/esri/widgets/support/SelectionToolbar/t9n/SelectionToolbar_zh-TW.json +1 -1
  372. package/interfaces.d.ts +59 -3
  373. package/layers/OrientedImageryLayer.js +1 -1
  374. package/layers/orientedImagery/core/ExposurePoint.js +1 -1
  375. package/layers/support/rasterFunctions/clipUtils.js +1 -1
  376. package/networks/CircuitManager.js +5 -0
  377. package/package.json +2 -2
  378. package/request.js +1 -1
  379. package/rest/networks/circuits/exportCircuits.js +5 -0
  380. package/rest/networks/circuits/queryCircuits.js +1 -1
  381. package/rest/networks/circuits/support/ExportCircuitsParameters.js +5 -0
  382. package/rest/networks/circuits/support/ExportCircuitsResult.js +5 -0
  383. package/rest/networks/circuits/support/QueryCircuitsParameters.js +1 -1
  384. package/rest/networks/circuits/support/QueryCircuitsResult.js +1 -1
  385. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  386. package/support/revision.js +1 -1
  387. package/views/2d/engine/imagery/RasterBitmap.js +1 -1
  388. package/views/2d/engine/vectorTiles/VectorTileFeatureIndex.js +1 -1
  389. package/views/2d/engine/webgl/shaderGraph/techniques/heatmap/HeatmapTechnique.js +1 -1
  390. package/views/3d/FocusAreasView.js +1 -1
  391. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementVisualization.js +1 -1
  392. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  393. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  394. package/views/3d/interactive/measurementTools/areaMeasurement3D/AreaMeasurement3DTool.js +1 -1
  395. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  396. package/views/3d/layers/I3SMeshView3D.js +1 -1
  397. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  398. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  399. package/views/3d/layers/SceneLayerView3D.js +1 -1
  400. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  401. package/views/3d/layers/i3s/I3SMaterialUtil.js +1 -1
  402. package/views/3d/terrain/TerrainRenderer.js +1 -1
  403. package/views/3d/terrain/TileRenderer.js +1 -1
  404. package/views/3d/webgl-engine/core/FBOCache.js +1 -1
  405. package/views/3d/webgl-engine/effects/RenderPlugin.js +1 -1
  406. package/views/3d/webgl-engine/effects/RenderPluginManager.js +1 -1
  407. package/views/3d/webgl-engine/effects/focusArea/FocusAreaColorNode.js +1 -1
  408. package/views/3d/webgl-engine/effects/focusArea/FocusAreaMaskNode.js +1 -1
  409. package/views/3d/webgl-engine/effects/geometry/RenderOccludedRenderNode.js +1 -1
  410. package/views/3d/webgl-engine/lib/Material.js +1 -1
  411. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  412. package/views/3d/webgl-engine/lib/ShadowMap.js +1 -1
  413. package/views/3d/webgl-engine/lib/SortedRenderGeometryRenderer.js +1 -1
  414. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  415. package/views/3d/webgl-engine/materials/renderers/MergedRenderer.js +1 -1
  416. package/views/FocusArea.js +1 -1
  417. package/views/FocusAreaOutline.js +1 -1
  418. package/views/FocusAreaOutlineItem.js +1 -1
  419. package/views/support/LayerLayerViewInfo.js +1 -1
  420. package/views/support/LayerViewManager.js +1 -1
  421. package/views/support/TextureCompressionWorker.js +1 -1
  422. package/views/support/TextureCompressionWorkerHandle.js +1 -1
  423. package/views/webgl/RenderingContext.js +1 -1
  424. package/views/webgl/Texture.js +1 -1
  425. package/views/webgl/rasterUtils.js +1 -1
  426. package/widgets/AreaMeasurement3D/AreaMeasurement3DViewModel.js +1 -1
  427. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  428. package/widgets/BatchAttributeForm.js +1 -1
  429. package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
  430. package/widgets/LineOfSight/LineOfSightViewModel.js +1 -1
  431. package/widgets/NavigationToggle/NavigationToggleViewModel.js +1 -1
  432. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  433. package/widgets/OrientedImageryViewer/components/Alert.js +5 -0
  434. package/widgets/OrientedImageryViewer/components/ImageViewer.js +1 -1
  435. package/widgets/OrientedImageryViewer/components/NavigationActions.js +5 -0
  436. package/widgets/OrientedImageryViewer/components/NavigationSettings.js +5 -0
  437. package/widgets/OrientedImageryViewer/components/NavigationUI.js +1 -1
  438. package/widgets/OrientedImageryViewer/components/SequentialNavigationUI.js +5 -0
  439. package/widgets/OrientedImageryViewer/css.js +1 -1
  440. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  441. package/widgets/OrientedImageryViewer/navigation/NavigationManager.js +1 -1
  442. package/widgets/OrientedImageryViewer/navigation/errors.js +1 -1
  443. package/widgets/OrientedImageryViewer/navigation/queries.js +1 -1
  444. package/widgets/OrientedImageryViewer.js +1 -1
  445. package/widgets/PanoramicViewer.js +1 -1
  446. package/widgets/Slice/SliceViewModel.js +1 -1
  447. package/widgets/Weather/WeatherViewModel.js +1 -1
  448. package/assets/esri/core/workers/chunks/47fe2379f2214bf50036.js +0 -1
  449. package/assets/esri/core/workers/chunks/7a9a0383f27f4967bcfa.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{_ as t}from"../../chunks/tslib.es6.js";import e from"../../analysis/DirectLineMeasurementAnalysis.js";import{deprecateUnnecessaryViewModel as s}from"../../core/deprecate.js";import i from"../../core/Logger.js";import{watch as r,syncAndInitial as n}from"../../core/reactiveUtils.js";import{measurementLengthUnits as o}from"../../core/unitUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{defaultUnitPropertyMetadata as u}from"../../properties/defaultUnit.js";import{AnalysisViewModel as p}from"../support/AnalysisViewModel.js";let c=class extends p{constructor(t){super(t),this.analysis=null,this._userUnitOptions=null,this._userUnit=null,this.supportedViewType="3d",this.unsupportedErrorMessage="DirectLineMeasurement3DViewModel is only supported in 3D views.",t?.isDefaultViewModel||s(i.getLogger(this),"Directline Measurement 3D","directline-measurement-3d",{version:"4.33"})}initialize(){this.addHandles(r((()=>({analysis:this.analysis,unit:this.unit})),(({analysis:t,unit:e})=>{null!=t&&(t.unit=e)}),n))}get state(){return this.disabled||!this.ready?"disabled":null==this.tool?"ready":this.tool.state}get measurement(){const{tool:t}=this;if(null==t)return null;const e=()=>({text:null,state:"unavailable"}),s=t=>({text:t,state:"available"}),{analysisViewData:i}=t,r=null!=i.result;return{mode:i.result?.mode??"euclidean",directDistance:r&&"euclidean"===i.actualVisualizedMeasurement?s(i.directLabelText):e(),horizontalDistance:r?s(i.horizontalLabelText):e(),verticalDistance:r?s(i.verticalLabelText):e()}}get unitOptions(){const t=this._userUnitOptions?.filter((t=>o.includes(t)));return t&&t.length>0?t:o.slice()}set unitOptions(t){this._userUnitOptions=t}get unit(){const t=this._userUnit,e=this.unitOptions;if(t&&e.includes(t))return t;const s=this.defaultUnit;return s&&e.includes(s)?s:e[0]}set unit(t){this._userUnit=t}constructAnalysis(){return new e}};t([l({type:e})],c.prototype,"analysis",void 0),t([l({readOnly:!0})],c.prototype,"state",null),t([l({readOnly:!0})],c.prototype,"measurement",null),t([l()],c.prototype,"unitOptions",null),t([l()],c.prototype,"_userUnitOptions",void 0),t([l()],c.prototype,"unit",null),t([l()],c.prototype,"_userUnit",void 0),t([l(u)],c.prototype,"defaultUnit",void 0),c=t([a("esri.widgets.DirectLineMeasurement3D.DirectLineMeasurement3DViewModel")],c);const d=c;export{d as default};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../analysis/DirectLineMeasurementAnalysis.js";import{deprecateUnnecessaryViewModel as s}from"../../core/deprecate.js";import i from"../../core/Logger.js";import{watch as r,syncAndInitial as n}from"../../core/reactiveUtils.js";import{measurementLengthUnits as o}from"../../core/unitUtils.js";import{property as l}from"../../core/accessorSupport/decorators/property.js";import"../../core/has.js";import"../../core/RandomLCG.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{defaultUnitPropertyMetadata as u}from"../../properties/defaultUnit.js";import{AnalysisViewModel as p}from"../support/AnalysisViewModel.js";let c=class extends p{constructor(t){super(t),this.analysis=null,this._userUnitOptions=null,this._userUnit=null,this.supportedViewType="3d",this.unsupportedErrorMessage="DirectLineMeasurement3DViewModel is only supported in 3D views.",t?.isDefaultViewModel||s(i.getLogger(this),"Directline Measurement 3D","arcgis-directline-measurement-3d",{version:"4.33"})}initialize(){this.addHandles(r((()=>({analysis:this.analysis,unit:this.unit})),(({analysis:t,unit:e})=>{null!=t&&(t.unit=e)}),n))}get state(){return this.disabled||!this.ready?"disabled":null==this.tool?"ready":this.tool.state}get measurement(){const{tool:t}=this;if(null==t)return null;const e=()=>({text:null,state:"unavailable"}),s=t=>({text:t,state:"available"}),{analysisViewData:i}=t,r=null!=i.result;return{mode:i.result?.mode??"euclidean",directDistance:r&&"euclidean"===i.actualVisualizedMeasurement?s(i.directLabelText):e(),horizontalDistance:r?s(i.horizontalLabelText):e(),verticalDistance:r?s(i.verticalLabelText):e()}}get unitOptions(){const t=this._userUnitOptions?.filter((t=>o.includes(t)));return t&&t.length>0?t:o.slice()}set unitOptions(t){this._userUnitOptions=t}get unit(){const t=this._userUnit,e=this.unitOptions;if(t&&e.includes(t))return t;const s=this.defaultUnit;return s&&e.includes(s)?s:e[0]}set unit(t){this._userUnit=t}constructAnalysis(){return new e}};t([l({type:e})],c.prototype,"analysis",void 0),t([l({readOnly:!0})],c.prototype,"state",null),t([l({readOnly:!0})],c.prototype,"measurement",null),t([l()],c.prototype,"unitOptions",null),t([l()],c.prototype,"_userUnitOptions",void 0),t([l()],c.prototype,"unit",null),t([l()],c.prototype,"_userUnit",void 0),t([l(u)],c.prototype,"defaultUnit",void 0),c=t([a("esri.widgets.DirectLineMeasurement3D.DirectLineMeasurement3DViewModel")],c);const d=c;export{d 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"../../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","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};
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 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};
@@ -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{_ as e}from"../../../chunks/tslib.es6.js";import{clamp as t}from"../../../core/mathUtils.js";import{property as i}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as s}from"../../../core/accessorSupport/decorators/subclass.js";import o from"../../Widget.js";import{css as r}from"../css.js";import{loadCalciteComponents as a}from"../../support/componentsUtils.js";import{tsx as n}from"../../support/jsxFactory.js";const c=5;let l=class extends o{constructor(e){super(e),this.cameraHeadingThreshold=c,this.cameraPitchThreshold=c,this.uiStrings=null,this._handleHeadingThresholdChange=e=>{this.cameraHeadingThreshold=+e.target.value,this.onInputChange?.("cameraHeading",this.cameraHeadingThreshold)},this._handlePitchThresholdChange=e=>{this.cameraPitchThreshold=+e.target.value,this.onInputChange?.("cameraPitch",this.cameraPitchThreshold)}}loadDependencies(){return a({label:()=>import("@esri/calcite-components/dist/components/calcite-label"),list:()=>import("@esri/calcite-components/dist/components/calcite-list"),"list-item":()=>import("@esri/calcite-components/dist/components/calcite-list-item"),input:()=>import("@esri/calcite-components/dist/components/calcite-input"),panel:()=>import("@esri/calcite-components/dist/components/calcite-panel")})}static{this.vnodeSelector="calcite-panel"}render(){return n("calcite-panel",{heading:this.uiStrings.configureNavigation,scale:"s"},n("calcite-list",{class:r.navigationSettingsUI,label:this.uiStrings.configureNavigation,scale:"s",selectionMode:"multiple"},n("calcite-list-item",{description:this.uiStrings.preserveHeadingDescription,label:this.uiStrings.preserveHeading,value:this.uiStrings.preserveHeading},n("calcite-label",{layout:"inline",scale:"s",slot:"content-bottom"},this.uiStrings.thresholdLabel,n("calcite-input",{max:30,min:0,scale:"s",type:"number",value:`${this.cameraHeadingThreshold}`,onCalciteInputChange:this._handleHeadingThresholdChange}))),n("calcite-list-item",{description:this.uiStrings.preservePitchDescription,label:this.uiStrings.preservePitch,value:this.uiStrings.preservePitch},n("calcite-label",{layout:"inline",scale:"s",slot:"content-bottom"},this.uiStrings.thresholdLabel,n("calcite-input",{max:30,min:0,scale:"s",type:"number",value:`${this.cameraPitchThreshold}`,onCalciteInputChange:this._handlePitchThresholdChange})))))}};e([i({cast:e=>t(e,0,30)})],l.prototype,"cameraHeadingThreshold",void 0),e([i()],l.prototype,"onInputChange",void 0),e([i({cast:e=>t(e,0,30)})],l.prototype,"cameraPitchThreshold",void 0),e([i()],l.prototype,"uiStrings",void 0),l=e([s("esri.widgets.OrientedImageryViewer.components.NavigationSettings")],l);const h=l;export{h 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{createTask as o}from"../../../core/asyncUtils.js";import i from"../../../core/Collection.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{whenOnce as r}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../Widget.js";import{css as a}from"../css.js";import l from"./NavigationNode.js";import d from"./NavigationUIViewModel.js";import{loadCalciteComponents as p}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as h}from"../../support/jsxFactory.js";let m=class extends c{constructor(t){super(t),this.navigate=null,this.viewModel=new d,this._clickTask=null,this._handleClick=t=>{this._clickTask?.abort(),this._clickTask=o((async o=>{const i=t.target;if(!this.navigate||!this.currentNode)return;await r((()=>"compiled"===this.viewModel.state),{signal:o});const s=i.getAttribute("data-direction");e(o),await this.navigate(this.currentNode,{direction:s,signal:o})}))}}loadDependencies(){return p({icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")})}set currentNode(t){this.viewModel.currentNode=t}get currentNode(){return this.viewModel.currentNode}get nodes(){return this.viewModel.nodes}set nodes(t){this.viewModel.nodes=t}render(){const{currentNode:t}=this;if(!t)return null;const{currentHeading:o}=t,i={"--rotate-transform":` rotate(${-o}deg)`},e=t=>{const i=(t-(o??0)+360)%360;return i<45||i>=315?"towards":i>=135&&i<225?"backwards":i>=45&&i<135?"right":"left"},r=e(0),s=e(90),n=e(180),c=e(270);return h("div",{class:a.navigationUI},h("div",{class:a.navigationDirectionPad,styles:i},t[r]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationTop),"data-direction":r,icon:"chevron-up",key:"chevron-up",onclick:this._handleClick}):null,t[s]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationRight),"data-direction":s,icon:"chevron-right",key:"chevron-right",onclick:this._handleClick}):null,t[n]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationBottom),"data-direction":n,icon:"chevron-down",key:"chevron-down",onclick:this._handleClick}):null,t[c]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationLeft),"data-direction":c,icon:"chevron-left",key:"chevron-left",onclick:this._handleClick}):null))}};t([s()],m.prototype,"currentNode",null),t([s()],m.prototype,"navigate",void 0),t([s({type:i.ofType(l),nonNullable:!0})],m.prototype,"nodes",null),t([s({type:d})],m.prototype,"viewModel",void 0),t([s()],m.prototype,"_clickTask",void 0),m=t([n("esri.widgets.OrientedImageryViewer.components.NavigationUI")],m);const u=m;export{u as default};
5
+ import{_ as t}from"../../../chunks/tslib.es6.js";import{createTask as o}from"../../../core/asyncUtils.js";import i from"../../../core/Collection.js";import{throwIfAborted as e}from"../../../core/promiseUtils.js";import{whenOnce as r}from"../../../core/reactiveUtils.js";import{property as s}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as n}from"../../../core/accessorSupport/decorators/subclass.js";import c from"../../Widget.js";import{css as a}from"../css.js";import l from"./NavigationNode.js";import d from"./NavigationUIViewModel.js";import{loadCalciteComponents as p}from"../../support/componentsUtils.js";import"../../support/widgetUtils.js";import{tsx as h}from"../../support/jsxFactory.js";let m=class extends c{constructor(t){super(t),this.navigate=null,this.viewModel=new d,this._clickTask=null,this._handleClick=t=>{this._clickTask?.abort(),this._clickTask=o((async o=>{const i=t.target;if(!this.navigate||!this.currentNode)return;await r((()=>"compiled"===this.viewModel.state),{signal:o});const s=i.getAttribute("data-direction");e(o),await this.navigate(this.currentNode,{direction:s,signal:o})}))}}loadDependencies(){return p({icon:()=>import("@esri/calcite-components/dist/components/calcite-icon")})}set currentNode(t){this.viewModel.currentNode=t}get currentNode(){return this.viewModel.currentNode}get nodes(){return this.viewModel.nodes}set nodes(t){this.viewModel.nodes=t}render(){const{currentNode:t}=this;if(!t)return null;const{currentHeading:o}=t,i={"--rotate-transform":` rotate(${-o}deg)`},e=t=>{const i=(t-(o??0)+360)%360;return i<45||i>=315?"towards":i>=135&&i<225?"backwards":i>=45&&i<135?"right":"left"},r=e(0),s=e(90),n=e(180),c=e(270);return h("div",{class:a.navigationUI},h("div",{class:a.navigationDirectionPad,styles:i},t[r]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationTop),"data-direction":r,icon:"chevron-up",key:"chevron-up",onclick:this._handleClick}):null,t[s]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationRight),"data-direction":s,icon:"chevron-right",key:"chevron-right",onclick:this._handleClick}):null,t[n]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationBottom),"data-direction":n,icon:"chevron-down",key:"chevron-down",onclick:this._handleClick}):null,t[c]?h("calcite-icon",{class:this.classes(a.navigationDirection,a.navigationLeft),"data-direction":c,icon:"chevron-left",key:"chevron-left",onclick:this._handleClick}):null))}};t([s()],m.prototype,"currentNode",null),t([s()],m.prototype,"navigate",void 0),t([s({type:i.ofType(l),nonNullable:!0})],m.prototype,"nodes",null),t([s()],m.prototype,"viewModel",void 0),t([s()],m.prototype,"_clickTask",void 0),m=t([n("esri.widgets.OrientedImageryViewer.components.NavigationUI")],m);const u=m;export{u 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";function i(){return t({action:()=>import("@esri/calcite-components/dist/components/calcite-action"),"action-pad":()=>import("@esri/calcite-components/dist/components/calcite-action-pad")})}function e(t){const{expandDisabled:i,layout:e,overlayPositioning:n,actions:c}=t;return o("calcite-action-pad",{expandDisabled:i,layout:e,overlayPositioning:n,slot:"fab"},c.map((t=>o("calcite-action",{icon:t.icon,key:t.title,onclick:t.onclick,scale:t.scale,text:t.text,title:t.title}))))}function n(t){const{uiStrings:i,layout:n,onAction:c}=t;return o(e,{actions:[{icon:"chevron-start",scale:"s",text:i.start,title:i.start,onclick:()=>{c({goTo:"start"})}},{icon:"chevron-left",scale:"s",text:i.previous,title:i.previous,onclick:()=>{c({step:-1})}},{icon:"chevron-right",scale:"s",text:i.next,title:i.next,onclick:()=>{c({step:1})}},{icon:"chevron-end",scale:"s",text:i.end,title:i.end,onclick:()=>{c({goTo:"end"})}}],expandDisabled:!1,layout:n,overlayPositioning:"fixed"})}export{e as FloatingActionPad,n as SequentialNavigationUI,i as loadSequentialNavigationUIComponents};
@@ -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
- const e="esri-oriented-imagery-viewer",t=`${e}__carousel`,a=`${e}__image-enhancement`,o=`${e}__navigation`,r="--oi-navigation-tool-rotation-from",n="--oi-navigation-tool-rotation-to",i=`${o}-ui`,s=`${i}__direction`,$=`${e}__image-overlays`,m={alert:`${e}__alert`,addCoverage:`${e}__body-additional-coverage`,addExpPoints:`${e}__body-additional-camera-locations`,body:`${e}__body`,carousel:`${e}__carousel`,carouselContainer:`${t}-container`,carouselContent:`${t}-content`,carouselItem:`${t}-item`,carouselItemWrapper:`${t}-item-wrapper`,close:`${e}__close`,currentCoverage:`${e}__body-current-coverage`,feature:`${o}-feature`,footprint:`${e}__body-footprint`,imageEnhancementToolContainer:`${a}-tool-container`,imageEnhancementTools:`${a}-tools`,imageEnhancementWrapper:`${a}-wrapper`,imageOverlays:$,imageOverlaysContainer:`${$}-container`,imageOverlaysNoResult:`${$}-no-result`,imageOverlaysIncreasedHeight:`${$}-increased-height`,imageOverlaysLayerList:`${$}-layer-list`,measurementResults:`${e}__measurement-results`,measurementsBar:`${e}__measurements-bar`,measurementsButton:`${e}__measurements-button`,measurementsTable:`${e}__measurements-table`,measurementDisplay:`${e}__measurement-display`,messageBox:`${e}__message-box`,navigationPathOffset0:`${o}-feature-path-stop-offset-0`,navigationPathOffset1:`${o}-feature-path-stop-offset-1`,navigationWrapper:`${o}-wrapper`,navigationZoomed:`${o}-wrapper--zoomed`,north:`${o}-pointer-north`,outerSector:`${o}-sector-outer`,overlaysSwitch:`${$}-switch`,pointer:`${o}-pointer`,rotateWithAnimation:`${o}-animate`,sector:`${o}-sector`,sectorCross:`${o}-sector-cross`,sectorDisabled:`${o}-sector-disabled`,sectorEnabled:`${o}-sector-enabled`,sectorSeparator:`${o}-sector-separator`,selectedFeaturePath:`${o}-feature-path`,sketchTools:`${e}__sketch-tools`,submenu:`${e}__submenu`,viewer:`${e}__viewer`,viewerHidden:`${e}__viewer--hidden`,viewerContainer:`${e}__viewer-container`,viewerContainerMeasurement:`${e}__viewer-container-measurement`,navigationUI:i,navigationDirection:s,navigationDirectionPad:`${s}-pad`,navigationTop:`${s}--top`,navigationBottom:`${s}--bottom`,navigationLeft:`${s}--left`,navigationRight:`${s}--right`};export{t as carousel,m as css,a as imageEnhancement,o as navigation,r as navigationToolRotationFrom,n as navigationToolRotationTo,e as root};
5
+ const e="esri-oriented-imagery-viewer",t=`${e}__carousel`,a=`${e}__image-enhancement`,o=`${e}__navigation`,r="--oi-navigation-tool-rotation-from",n="--oi-navigation-tool-rotation-to",i=`${o}-ui`,s=`${i}__direction`,$=`${e}__image-overlays`,m={alert:`${e}__alert`,addCoverage:`${e}__body-additional-coverage`,addExpPoints:`${e}__body-additional-camera-locations`,body:`${e}__body`,carousel:`${e}__carousel`,carouselContainer:`${t}-container`,carouselContent:`${t}-content`,carouselItem:`${t}-item`,carouselItemWrapper:`${t}-item-wrapper`,close:`${e}__close`,currentCoverage:`${e}__body-current-coverage`,feature:`${o}-feature`,footprint:`${e}__body-footprint`,imageEnhancementToolContainer:`${a}-tool-container`,imageEnhancementTools:`${a}-tools`,imageEnhancementWrapper:`${a}-wrapper`,imageOverlays:$,imageOverlaysContainer:`${$}-container`,imageOverlaysNoResult:`${$}-no-result`,imageOverlaysIncreasedHeight:`${$}-increased-height`,imageOverlaysLayerList:`${$}-layer-list`,measurementResults:`${e}__measurement-results`,measurementsBar:`${e}__measurements-bar`,measurementsButton:`${e}__measurements-button`,measurementsTable:`${e}__measurements-table`,measurementDisplay:`${e}__measurement-display`,messageBox:`${e}__message-box`,navigationPathOffset0:`${o}-feature-path-stop-offset-0`,navigationPathOffset1:`${o}-feature-path-stop-offset-1`,navigationWrapper:`${o}-wrapper`,navigationZoomed:`${o}-wrapper--zoomed`,north:`${o}-pointer-north`,outerSector:`${o}-sector-outer`,overlaysSwitch:`${$}-switch`,pointer:`${o}-pointer`,rotateWithAnimation:`${o}-animate`,sector:`${o}-sector`,sectorCross:`${o}-sector-cross`,sectorDisabled:`${o}-sector-disabled`,sectorEnabled:`${o}-sector-enabled`,sectorSeparator:`${o}-sector-separator`,selectedFeaturePath:`${o}-feature-path`,sketchTools:`${e}__sketch-tools`,submenu:`${e}__submenu`,viewer:`${e}__viewer`,viewerHidden:`${e}__viewer--hidden`,viewerContainer:`${e}__viewer-container`,viewerContainerMeasurement:`${e}__viewer-container-measurement`,navigationUI:i,navigationDirection:s,navigationDirectionPad:`${s}-pad`,navigationTop:`${s}--top`,navigationBottom:`${s}--bottom`,navigationLeft:`${s}--left`,navigationRight:`${s}--right`,navigationSettingsUI:`${o}-settings-ui`};export{t as carousel,m as css,a as imageEnhancement,o as navigation,r as navigationToolRotationFrom,n as navigationToolRotationTo,e as root};