@arcgis/core 4.24.0-next.20220521 → 4.24.0-next.20220525

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 (509) hide show
  1. package/WebScene.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0ad179f4332d5242cc5f.js +1 -0
  4. package/assets/esri/core/workers/chunks/{d63f736b3560c577a8a4.js → 112b851bc61ae59fb558.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{9d738aab0d907cd09a9d.js → 1f4ba2fd71425b875eb4.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{8cd8dad8bcd5c0ef445e.js → 222d51ad2b897188363c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/4e982d988c343d71c35e.js +1 -0
  8. package/assets/esri/core/workers/chunks/{ab2a0480dc2b608deda3.js → 51b0bcd367a563512cbb.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{18b4f015e1d6be7a8965.js → 5242c9badca17ba2ab25.js} +1 -1
  10. package/assets/esri/core/workers/chunks/525b24097af208a100da.js +1 -0
  11. package/assets/esri/core/workers/chunks/533d190f63c31246f3fb.js +1 -0
  12. package/assets/esri/core/workers/chunks/58b39f18cd0c6579e2fd.js +1 -0
  13. package/assets/esri/core/workers/chunks/5bfd11944c4bd19f50fb.js +1 -0
  14. package/assets/esri/core/workers/chunks/660abe7152e55e2bf39c.js +1 -0
  15. package/assets/esri/core/workers/chunks/{7391422fc51acb96a25d.js → 7727b55b4198eb5d5037.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{3c8c020d9e723888352b.js → 7f4c1c67551584bb9f0f.js} +1 -1
  17. package/assets/esri/core/workers/chunks/8bc3129cd2bd85dfd7e3.js +1 -0
  18. package/assets/esri/core/workers/chunks/{b597c04a4abb98e29d1c.js → 9391126baab105086d1d.js} +1 -1
  19. package/assets/esri/core/workers/chunks/9b4159f2e4150414b594.js +1 -0
  20. package/assets/esri/core/workers/chunks/a595e1026c3f7b905b00.js +1 -0
  21. package/assets/esri/core/workers/chunks/{b362d1ae9a87397ce2c5.js → aa40e324e59038c2f123.js} +1 -1
  22. package/assets/esri/core/workers/chunks/b86c18b188955aa7f48f.js +1 -0
  23. package/assets/esri/core/workers/chunks/be78dd8dbb8d8149d27a.js +1 -0
  24. package/assets/esri/core/workers/chunks/{7cf3cff7b28ff007dbad.js → d29751b88b6bd05e9c9b.js} +1 -1
  25. package/assets/esri/core/workers/chunks/d8a355386a75adb29980.js +1 -0
  26. package/assets/esri/core/workers/chunks/ddf3cbca19a02d085b1d.js +1 -0
  27. package/assets/esri/core/workers/chunks/e47d24c5b9ff34393dbf.js +1 -0
  28. package/assets/esri/core/workers/chunks/eb20148c756ff919bbbf.js +1 -0
  29. package/assets/esri/core/workers/chunks/{2f4a8eff11d263fa798a.js → f5d10ea7b8888f822b0c.js} +1 -1
  30. package/assets/esri/themes/base/_core.scss +0 -2
  31. package/assets/esri/themes/base/widgets/_Editor.scss +4 -3
  32. package/assets/esri/themes/dark/main.css +1 -1
  33. package/assets/esri/themes/light/main.css +1 -1
  34. package/assets/esri/themes/light/view.css +1 -1
  35. package/assets/esri/views/interactive/tooltip/t9n/Tooltip.json +1 -1
  36. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ar.json +1 -1
  37. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bg.json +1 -1
  38. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_bs.json +1 -1
  39. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ca.json +1 -1
  40. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_cs.json +1 -1
  41. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_da.json +1 -1
  42. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_de.json +1 -1
  43. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_el.json +1 -1
  44. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_en.json +1 -1
  45. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_es.json +1 -1
  46. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_et.json +1 -1
  47. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fi.json +1 -1
  48. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_fr.json +1 -1
  49. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_he.json +1 -1
  50. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hr.json +1 -1
  51. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_hu.json +1 -1
  52. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_id.json +1 -1
  53. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_it.json +1 -1
  54. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ja.json +1 -1
  55. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ko.json +1 -1
  56. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lt.json +1 -1
  57. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_lv.json +1 -1
  58. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nb.json +1 -1
  59. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_nl.json +1 -1
  60. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pl.json +1 -1
  61. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-BR.json +1 -1
  62. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_pt-PT.json +1 -1
  63. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ro.json +1 -1
  64. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_ru.json +1 -1
  65. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sk.json +1 -1
  66. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sl.json +1 -1
  67. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sr.json +1 -1
  68. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_sv.json +1 -1
  69. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_th.json +1 -1
  70. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_tr.json +1 -1
  71. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_uk.json +1 -1
  72. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_vi.json +1 -1
  73. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-CN.json +1 -1
  74. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-HK.json +1 -1
  75. package/assets/esri/views/interactive/tooltip/t9n/Tooltip_zh-TW.json +1 -1
  76. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ar.json +1 -1
  77. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bg.json +1 -1
  78. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_bs.json +1 -1
  79. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ca.json +1 -1
  80. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_cs.json +1 -1
  81. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_da.json +1 -1
  82. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_de.json +1 -1
  83. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_el.json +1 -1
  84. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_es.json +1 -1
  85. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_et.json +1 -1
  86. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fi.json +1 -1
  87. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_fr.json +1 -1
  88. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_he.json +1 -1
  89. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hr.json +1 -1
  90. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_hu.json +1 -1
  91. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_id.json +1 -1
  92. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_it.json +1 -1
  93. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ja.json +1 -1
  94. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ko.json +1 -1
  95. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lt.json +1 -1
  96. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_lv.json +1 -1
  97. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nb.json +1 -1
  98. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_nl.json +1 -1
  99. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pl.json +1 -1
  100. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-BR.json +1 -1
  101. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_pt-PT.json +1 -1
  102. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ro.json +1 -1
  103. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_ru.json +1 -1
  104. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sk.json +1 -1
  105. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sl.json +1 -1
  106. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sr.json +1 -1
  107. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_sv.json +1 -1
  108. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_th.json +1 -1
  109. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_tr.json +1 -1
  110. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_uk.json +1 -1
  111. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_vi.json +1 -1
  112. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-CN.json +1 -1
  113. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-HK.json +1 -1
  114. package/assets/esri/widgets/BasemapLayerList/t9n/BasemapLayerList_zh-TW.json +1 -1
  115. package/assets/esri/widgets/Daylight/t9n/Daylight.json +1 -1
  116. package/assets/esri/widgets/Daylight/t9n/Daylight_ar.json +1 -1
  117. package/assets/esri/widgets/Daylight/t9n/Daylight_bg.json +1 -1
  118. package/assets/esri/widgets/Daylight/t9n/Daylight_bs.json +1 -1
  119. package/assets/esri/widgets/Daylight/t9n/Daylight_ca.json +1 -1
  120. package/assets/esri/widgets/Daylight/t9n/Daylight_cs.json +1 -1
  121. package/assets/esri/widgets/Daylight/t9n/Daylight_da.json +1 -1
  122. package/assets/esri/widgets/Daylight/t9n/Daylight_de.json +1 -1
  123. package/assets/esri/widgets/Daylight/t9n/Daylight_el.json +1 -1
  124. package/assets/esri/widgets/Daylight/t9n/Daylight_en.json +1 -1
  125. package/assets/esri/widgets/Daylight/t9n/Daylight_es.json +1 -1
  126. package/assets/esri/widgets/Daylight/t9n/Daylight_et.json +1 -1
  127. package/assets/esri/widgets/Daylight/t9n/Daylight_fi.json +1 -1
  128. package/assets/esri/widgets/Daylight/t9n/Daylight_fr.json +1 -1
  129. package/assets/esri/widgets/Daylight/t9n/Daylight_he.json +1 -1
  130. package/assets/esri/widgets/Daylight/t9n/Daylight_hr.json +1 -1
  131. package/assets/esri/widgets/Daylight/t9n/Daylight_hu.json +1 -1
  132. package/assets/esri/widgets/Daylight/t9n/Daylight_id.json +1 -1
  133. package/assets/esri/widgets/Daylight/t9n/Daylight_it.json +1 -1
  134. package/assets/esri/widgets/Daylight/t9n/Daylight_ja.json +1 -1
  135. package/assets/esri/widgets/Daylight/t9n/Daylight_ko.json +1 -1
  136. package/assets/esri/widgets/Daylight/t9n/Daylight_lt.json +1 -1
  137. package/assets/esri/widgets/Daylight/t9n/Daylight_lv.json +1 -1
  138. package/assets/esri/widgets/Daylight/t9n/Daylight_nb.json +1 -1
  139. package/assets/esri/widgets/Daylight/t9n/Daylight_nl.json +1 -1
  140. package/assets/esri/widgets/Daylight/t9n/Daylight_pl.json +1 -1
  141. package/assets/esri/widgets/Daylight/t9n/Daylight_pt-BR.json +1 -1
  142. package/assets/esri/widgets/Daylight/t9n/Daylight_pt-PT.json +1 -1
  143. package/assets/esri/widgets/Daylight/t9n/Daylight_ro.json +1 -1
  144. package/assets/esri/widgets/Daylight/t9n/Daylight_ru.json +1 -1
  145. package/assets/esri/widgets/Daylight/t9n/Daylight_sk.json +1 -1
  146. package/assets/esri/widgets/Daylight/t9n/Daylight_sl.json +1 -1
  147. package/assets/esri/widgets/Daylight/t9n/Daylight_sr.json +1 -1
  148. package/assets/esri/widgets/Daylight/t9n/Daylight_sv.json +1 -1
  149. package/assets/esri/widgets/Daylight/t9n/Daylight_th.json +1 -1
  150. package/assets/esri/widgets/Daylight/t9n/Daylight_tr.json +1 -1
  151. package/assets/esri/widgets/Daylight/t9n/Daylight_uk.json +1 -1
  152. package/assets/esri/widgets/Daylight/t9n/Daylight_vi.json +1 -1
  153. package/assets/esri/widgets/Daylight/t9n/Daylight_zh-CN.json +1 -1
  154. package/assets/esri/widgets/Daylight/t9n/Daylight_zh-HK.json +1 -1
  155. package/assets/esri/widgets/Daylight/t9n/Daylight_zh-TW.json +1 -1
  156. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ar.json +1 -1
  157. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bg.json +1 -1
  158. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_bs.json +1 -1
  159. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ca.json +1 -1
  160. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_cs.json +1 -1
  161. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_da.json +1 -1
  162. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_de.json +1 -1
  163. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_el.json +1 -1
  164. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_es.json +1 -1
  165. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_et.json +1 -1
  166. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fi.json +1 -1
  167. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_fr.json +1 -1
  168. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_he.json +1 -1
  169. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hr.json +1 -1
  170. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_hu.json +1 -1
  171. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_id.json +1 -1
  172. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_it.json +1 -1
  173. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ja.json +1 -1
  174. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ko.json +1 -1
  175. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lt.json +1 -1
  176. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_lv.json +1 -1
  177. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nb.json +1 -1
  178. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_nl.json +1 -1
  179. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pl.json +1 -1
  180. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-BR.json +1 -1
  181. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_pt-PT.json +1 -1
  182. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ro.json +1 -1
  183. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_ru.json +1 -1
  184. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sk.json +1 -1
  185. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sl.json +1 -1
  186. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sr.json +1 -1
  187. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_sv.json +1 -1
  188. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_th.json +1 -1
  189. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_tr.json +1 -1
  190. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_uk.json +1 -1
  191. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_vi.json +1 -1
  192. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-CN.json +1 -1
  193. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-HK.json +1 -1
  194. package/assets/esri/widgets/UtilityNetworkTrace/t9n/UtilityNetworkTrace_zh-TW.json +1 -1
  195. package/assets/esri/widgets/Weather/t9n/Weather.json +1 -1
  196. package/assets/esri/widgets/Weather/t9n/Weather_ar.json +1 -1
  197. package/assets/esri/widgets/Weather/t9n/Weather_bg.json +1 -1
  198. package/assets/esri/widgets/Weather/t9n/Weather_bs.json +1 -1
  199. package/assets/esri/widgets/Weather/t9n/Weather_ca.json +1 -1
  200. package/assets/esri/widgets/Weather/t9n/Weather_cs.json +1 -1
  201. package/assets/esri/widgets/Weather/t9n/Weather_da.json +1 -1
  202. package/assets/esri/widgets/Weather/t9n/Weather_de.json +1 -1
  203. package/assets/esri/widgets/Weather/t9n/Weather_el.json +1 -1
  204. package/assets/esri/widgets/Weather/t9n/Weather_en.json +1 -1
  205. package/assets/esri/widgets/Weather/t9n/Weather_es.json +1 -1
  206. package/assets/esri/widgets/Weather/t9n/Weather_et.json +1 -1
  207. package/assets/esri/widgets/Weather/t9n/Weather_fi.json +1 -1
  208. package/assets/esri/widgets/Weather/t9n/Weather_fr.json +1 -1
  209. package/assets/esri/widgets/Weather/t9n/Weather_he.json +1 -1
  210. package/assets/esri/widgets/Weather/t9n/Weather_hr.json +1 -1
  211. package/assets/esri/widgets/Weather/t9n/Weather_hu.json +1 -1
  212. package/assets/esri/widgets/Weather/t9n/Weather_id.json +1 -1
  213. package/assets/esri/widgets/Weather/t9n/Weather_it.json +1 -1
  214. package/assets/esri/widgets/Weather/t9n/Weather_ja.json +1 -1
  215. package/assets/esri/widgets/Weather/t9n/Weather_ko.json +1 -1
  216. package/assets/esri/widgets/Weather/t9n/Weather_lt.json +1 -1
  217. package/assets/esri/widgets/Weather/t9n/Weather_lv.json +1 -1
  218. package/assets/esri/widgets/Weather/t9n/Weather_nb.json +1 -1
  219. package/assets/esri/widgets/Weather/t9n/Weather_nl.json +1 -1
  220. package/assets/esri/widgets/Weather/t9n/Weather_pl.json +1 -1
  221. package/assets/esri/widgets/Weather/t9n/Weather_pt-BR.json +1 -1
  222. package/assets/esri/widgets/Weather/t9n/Weather_pt-PT.json +1 -1
  223. package/assets/esri/widgets/Weather/t9n/Weather_ro.json +1 -1
  224. package/assets/esri/widgets/Weather/t9n/Weather_ru.json +1 -1
  225. package/assets/esri/widgets/Weather/t9n/Weather_sk.json +1 -1
  226. package/assets/esri/widgets/Weather/t9n/Weather_sl.json +1 -1
  227. package/assets/esri/widgets/Weather/t9n/Weather_sr.json +1 -1
  228. package/assets/esri/widgets/Weather/t9n/Weather_sv.json +1 -1
  229. package/assets/esri/widgets/Weather/t9n/Weather_th.json +1 -1
  230. package/assets/esri/widgets/Weather/t9n/Weather_tr.json +1 -1
  231. package/assets/esri/widgets/Weather/t9n/Weather_uk.json +1 -1
  232. package/assets/esri/widgets/Weather/t9n/Weather_vi.json +1 -1
  233. package/assets/esri/widgets/Weather/t9n/Weather_zh-CN.json +1 -1
  234. package/assets/esri/widgets/Weather/t9n/Weather_zh-HK.json +1 -1
  235. package/assets/esri/widgets/Weather/t9n/Weather_zh-TW.json +1 -1
  236. package/chunks/Heatmap.glsl.js +7 -11
  237. package/chunks/HeatmapDensity.glsl.js +7 -20
  238. package/chunks/Terrain.glsl.js +38 -41
  239. package/chunks/geometryEngineBase.js +1 -1
  240. package/core/Identifiable.js +1 -1
  241. package/core/accessorSupport/originUtils.js +1 -1
  242. package/core/accessorSupport/watch.js +1 -1
  243. package/core/has.js +1 -1
  244. package/core/lang.js +1 -1
  245. package/core/maybe.js +1 -1
  246. package/core/scheduling.js +1 -1
  247. package/core/watchUtils.js +1 -1
  248. package/geometry/projection.js +1 -1
  249. package/geometry/support/aaBoundingRect.js +1 -1
  250. package/interfaces.d.ts +762 -234
  251. package/layers/ImageryTileLayer.js +1 -1
  252. package/layers/TileLayer.js +1 -1
  253. package/layers/VectorTileLayer.js +1 -1
  254. package/layers/WMSLayer.js +1 -1
  255. package/layers/WMTSLayer.js +1 -1
  256. package/layers/WebTileLayer.js +1 -1
  257. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  258. package/layers/graphics/controllers/StreamController.js +1 -1
  259. package/layers/mixins/ArcGISImageService.js +1 -1
  260. package/layers/mixins/ImageryTileMixin.js +1 -1
  261. package/layers/support/ImageElement.js +1 -1
  262. package/layers/support/LocalMediaElementSource.js +1 -1
  263. package/layers/support/VideoElement.d.ts +4 -0
  264. package/layers/support/VideoElement.js +5 -0
  265. package/layers/support/imageryRendererUtils.js +1 -1
  266. package/networks/UtilityNetwork.js +1 -1
  267. package/package.json +1 -1
  268. package/portal/schemas/definitions.js +1 -1
  269. package/renderers/HeatmapRenderer.js +1 -1
  270. package/renderers/support/HeatmapColorStop.js +1 -1
  271. package/renderers/support/heatmapUtils.js +1 -1
  272. package/renderers/support/types.js +1 -1
  273. package/smartMapping/renderers/heatmap.js +1 -1
  274. package/smartMapping/statistics/heatmapStatistics.js +1 -1
  275. package/smartMapping/statistics/support/statsWorker.js +1 -1
  276. package/smartMapping/statistics/support/utils.js +1 -1
  277. package/smartMapping/support/adapters/FeatureLayerAdapter.js +1 -1
  278. package/support/revision.js +1 -1
  279. package/views/2d/PaddedViewState.js +1 -1
  280. package/views/2d/engine/webgl/Overlay.js +1 -1
  281. package/views/2d/engine/webgl/brushes/WGLBrushHeatmap.js +1 -1
  282. package/views/2d/engine/webgl/collisions/CollisionEngine.js +1 -1
  283. package/views/2d/engine/webgl/enums.js +1 -1
  284. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  285. package/views/2d/engine/webgl/techniques/heatmap/TechniqueHeatmap.js +1 -1
  286. package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
  287. package/views/2d/layers/MediaLayerView2D.js +1 -1
  288. package/views/2d/layers/WMTSLayerView2D.js +1 -1
  289. package/views/2d/layers/features/schemaUtils.js +1 -1
  290. package/views/2d/layers/features/support/pixelBuffering.js +1 -1
  291. package/views/2d/layers/features/support/rendererUtils.js +1 -1
  292. package/views/2d/layers/features/tileRenderers/HeatmapTileRenderer.js +1 -1
  293. package/views/2d/layers/features/tileRenderers/support/HeatmapSource.js +1 -1
  294. package/views/2d/magnifier/MagnifierView2D.js +1 -1
  295. package/views/3d/analysis/AreaMeasurement/support/AreaMeasurementPathHelper.js +1 -1
  296. package/views/3d/analysis/AreaMeasurementAnalysisView3D.js +1 -1
  297. package/views/3d/analysis/Dimensioning/DimensioningTool.js +1 -1
  298. package/views/3d/analysis/Dimensioning/LengthDimensionSubTool.js +1 -1
  299. package/views/3d/analysis/Dimensioning/LengthDimensionVisualization.js +1 -1
  300. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  301. package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
  302. package/views/3d/analysis/LineOfSight/LineOfSightVisualization.js +1 -1
  303. package/views/3d/environment/CloudsGenerator.js +1 -1
  304. package/views/3d/environment/CloudyWeather.js +1 -1
  305. package/views/3d/environment/FoggyWeather.js +1 -1
  306. package/views/3d/environment/RainyWeather.js +1 -1
  307. package/views/3d/environment/SceneViewEnvironment.js +1 -1
  308. package/views/3d/environment/SceneViewEnvironmentManager.js +1 -1
  309. package/views/3d/environment/SnowyWeather.js +1 -1
  310. package/views/3d/environment/Stars.js +1 -1
  311. package/views/3d/environment/SunLighting.js +1 -1
  312. package/views/3d/environment/SunnyWeather.js +1 -1
  313. package/views/3d/environment/VirtualLighting.js +1 -1
  314. package/views/3d/environment/weather.js +1 -1
  315. package/views/3d/interactive/SegmentLabels3D.js +1 -1
  316. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  317. package/views/3d/interactive/editingTools/moveGraphic/GraphicMoveTool.js +1 -1
  318. package/views/3d/interactive/editingTools/originGraphicVisualElementUtils.js +1 -1
  319. package/views/3d/interactive/editingTools/reshapeGraphic/GraphicReshapeTool.js +1 -1
  320. package/views/3d/interactive/editingTools/reshapeGraphic/ReshapeOperation.js +1 -1
  321. package/views/3d/interactive/editingTools/transformGraphic/ExtentTransformTool.js +1 -1
  322. package/views/3d/interactive/editingTools/transformGraphic/GraphicScaleRotateTransform.js +1 -1
  323. package/views/3d/interactive/editingTools/transformGraphic/GraphicTransformTool.js +1 -1
  324. package/views/3d/layers/MediaLayerView3D.js +1 -1
  325. package/views/3d/layers/VectorTileLayerView3D.js +1 -1
  326. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  327. package/views/3d/layers/support/HeatmapFeatureProcessor.js +1 -1
  328. package/views/3d/state/ConstraintsManager.js +1 -1
  329. package/views/3d/state/ViewStateManager.js +1 -1
  330. package/views/3d/terrain/GeometryState.js +1 -1
  331. package/views/3d/terrain/OverlayManager.js +1 -1
  332. package/views/3d/terrain/PatchGeometry.js +1 -1
  333. package/views/3d/terrain/PatchGeometryFactory.js +1 -1
  334. package/views/3d/terrain/PatchGeometryLUT.js +5 -0
  335. package/views/3d/terrain/PatchRenderData.js +1 -1
  336. package/views/3d/terrain/PlanarPatch.js +1 -1
  337. package/views/3d/terrain/SphericalPatch.js +1 -1
  338. package/views/3d/terrain/TerrainConst.js +1 -1
  339. package/views/3d/terrain/TerrainRenderer.js +1 -1
  340. package/views/3d/terrain/TerrainSurface.js +1 -1
  341. package/views/3d/terrain/Tile.js +1 -1
  342. package/views/3d/terrain/TileCompositor.js +1 -1
  343. package/views/3d/terrain/terrainUtils.js +1 -1
  344. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TerrainTexture.glsl.js +9 -9
  345. package/views/3d/webgl-engine/core/shaderLibrary/terrain/TileBlendInput.js +5 -0
  346. package/views/3d/webgl-engine/lib/DrapedHeatmapRenderer.js +1 -1
  347. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  348. package/views/3d/webgl-engine/lib/Texture.js +1 -1
  349. package/views/3d/webgl-engine/materials/HeatmapDensityMaterial.js +1 -1
  350. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  351. package/views/3d/webgl-engine/shaders/Heatmap.glsl.js +1 -1
  352. package/views/3d/webgl-engine/shaders/HeatmapDensity.glsl.js +1 -1
  353. package/views/3d/webgl-engine/shaders/HeatmapDensityTechnique.js +1 -1
  354. package/views/3d/webgl-engine/shaders/HeatmapTechnique.js +1 -1
  355. package/views/3d/webgl-engine/shaders/TerrainTechniqueConfiguration.js +1 -1
  356. package/views/SceneView.js +1 -1
  357. package/views/analysis/analysisViewUtils.js +1 -1
  358. package/views/draw/DrawAction.js +1 -1
  359. package/views/draw/DrawOperation.js +1 -1
  360. package/views/draw/SegmentDrawAction.js +1 -1
  361. package/views/interactive/GraphicManipulator.js +1 -1
  362. package/views/interactive/InteractiveToolBase.js +1 -1
  363. package/views/interactive/SegmentLabels.js +1 -1
  364. package/views/interactive/ToolViewManagerManipulatorState.js +1 -1
  365. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  366. package/views/interactive/sketch/SketchLabelOptions.d.ts +4 -0
  367. package/views/interactive/sketch/SketchLabelOptions.js +5 -0
  368. package/views/interactive/sketch/SketchTooltipOptions.d.ts +4 -0
  369. package/views/interactive/sketch/SketchTooltipOptions.js +5 -0
  370. package/views/interactive/snapping/FeatureSnappingEngine.js +1 -1
  371. package/views/interactive/snapping/SceneSnappingManagerPool.js +5 -0
  372. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  373. package/views/interactive/snapping/SnappingManager.js +1 -1
  374. package/views/interactive/snapping/SnappingOperation.js +5 -0
  375. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorker.js +1 -1
  376. package/views/interactive/snapping/featureSources/sceneLayerSource/SceneLayerSnappingSourceWorkerHandle.js +1 -1
  377. package/views/interactive/support/viewUtils.js +1 -1
  378. package/views/interactive/tooltip/DrawTooltipInfos.js +1 -1
  379. package/views/interactive/tooltip/ExtentTooltipInfos.js +1 -1
  380. package/views/interactive/tooltip/ReshapeTooltipInfos.js +1 -1
  381. package/views/interactive/tooltip/SketchTooltipInfo.js +5 -0
  382. package/views/interactive/tooltip/Tooltip.js +1 -1
  383. package/views/interactive/tooltip/TransformTooltipInfos.js +1 -1
  384. package/views/interactive/tooltip/TranslateTooltipInfos.js +5 -0
  385. package/views/interactive/tooltip/content/TooltipContentDrawPoint.js +1 -1
  386. package/views/interactive/tooltip/content/TooltipContentDrawPolygon.js +1 -1
  387. package/views/interactive/tooltip/content/TooltipContentDrawPolyline.js +1 -1
  388. package/views/interactive/tooltip/content/TooltipContentExtentMoveZ.js +1 -1
  389. package/views/interactive/tooltip/content/TooltipContentExtentRotate.js +1 -1
  390. package/views/interactive/tooltip/content/TooltipContentExtentScale.js +1 -1
  391. package/views/interactive/tooltip/content/TooltipContentReshapeEdgeOffset.js +1 -1
  392. package/views/interactive/tooltip/content/TooltipContentReshapeMoveGraphic.js +5 -0
  393. package/views/interactive/tooltip/content/TooltipContentTransformAbsolute.js +1 -1
  394. package/views/interactive/tooltip/content/TooltipContentTransformRotate.js +1 -1
  395. package/views/interactive/tooltip/content/TooltipContentTransformScale.js +1 -1
  396. package/views/interactive/tooltip/content/TooltipContentTranslateVertex.js +1 -1
  397. package/views/interactive/tooltip/content/tooltipContentFactory.js +1 -1
  398. package/views/overlay/TextOverlayItem.js +1 -1
  399. package/views/support/lengthMeasurementUtils.js +1 -1
  400. package/webscene/Environment.js +1 -1
  401. package/webscene/Slide.js +1 -1
  402. package/webscene/SunLighting.d.ts +4 -0
  403. package/webscene/SunLighting.js +5 -0
  404. package/webscene/VirtualLighting.d.ts +4 -0
  405. package/webscene/VirtualLighting.js +5 -0
  406. package/webscene/lightingTypes.js +5 -0
  407. package/webscene/support/SlideEnvironment.js +1 -1
  408. package/widgets/BasemapGallery/support/PortalBasemapsSource.js +1 -1
  409. package/widgets/BasemapLayerList/BasemapLayerListViewModel.js +1 -1
  410. package/widgets/Daylight/DaylightViewModel.js +1 -1
  411. package/widgets/Daylight.js +1 -1
  412. package/widgets/Editor/EditorViewModel.js +1 -1
  413. package/widgets/Editor/workflowUtils.js +1 -1
  414. package/widgets/Editor.js +1 -1
  415. package/widgets/ElevationProfile.js +1 -1
  416. package/widgets/Feature/FeatureMedia.js +1 -1
  417. package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
  418. package/widgets/FeatureForm.js +1 -1
  419. package/widgets/FeatureTemplates/TemplateItem.js +1 -1
  420. package/widgets/FloorFilter/FloorFilterViewModel.js +1 -1
  421. package/widgets/LayerList/LayerListViewModel.js +1 -1
  422. package/widgets/Legend/LegendViewModel.js +1 -1
  423. package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
  424. package/widgets/Measurement.js +1 -1
  425. package/widgets/Popup/PopupViewModel.js +1 -1
  426. package/widgets/Popup.js +1 -1
  427. package/widgets/Print/FileLink.js +1 -1
  428. package/widgets/ScaleBar.js +1 -1
  429. package/widgets/Search/SearchViewModel.js +1 -1
  430. package/widgets/Sketch/SketchViewModel.js +1 -1
  431. package/widgets/Sketch.js +1 -1
  432. package/widgets/Swipe/SwipeViewModel.js +1 -1
  433. package/widgets/TableList/TableListViewModel.js +1 -1
  434. package/widgets/Weather.js +1 -1
  435. package/widgets/Widget.js +1 -1
  436. package/widgets/smartMapping/SmartMappingSliderBase.js +1 -1
  437. package/widgets/support/AnalysisViewModel.js +1 -1
  438. package/widgets/support/AnchorElementViewModel.js +1 -1
  439. package/widgets/support/tests.js +5 -0
  440. package/assets/esri/core/workers/chunks/1d109cd048170e2d529a.js +0 -1
  441. package/assets/esri/core/workers/chunks/38a752f8bd456c8912a8.js +0 -1
  442. package/assets/esri/core/workers/chunks/4487fb2d274e49bdb2b0.js +0 -1
  443. package/assets/esri/core/workers/chunks/55b2b80b9e3684feaa8e.js +0 -1
  444. package/assets/esri/core/workers/chunks/605202e3c29250650492.js +0 -1
  445. package/assets/esri/core/workers/chunks/7ea06c86adfc827fda08.js +0 -1
  446. package/assets/esri/core/workers/chunks/816ae3f0513ecf856f8f.js +0 -1
  447. package/assets/esri/core/workers/chunks/8417b3d5821b306a0fc4.js +0 -1
  448. package/assets/esri/core/workers/chunks/8793070d288878d6f49b.js +0 -1
  449. package/assets/esri/core/workers/chunks/88912dbc2b60623bc6a3.js +0 -1
  450. package/assets/esri/core/workers/chunks/b97a34d2e7cceef1ac41.js +0 -1
  451. package/assets/esri/core/workers/chunks/cd04bae81e5fc27ec97b.js +0 -1
  452. package/assets/esri/core/workers/chunks/f6aaee4db0bd5096164c.js +0 -1
  453. package/assets/esri/core/workers/chunks/f9d83a48b69c5728feba.js +0 -1
  454. package/assets/esri/core/workers/chunks/fc9b5f40c5179a8c90de.js +0 -1
  455. package/assets/esri/core/workers/chunks/fe18d2d251a5ad80eb54.js +0 -1
  456. package/assets/esri/images/search/search-symbol-32.svg +0 -1
  457. package/assets/esri/themes/base/widgets/_NumericalFeedbackControls.scss +0 -23
  458. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls.json +0 -1
  459. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ar.json +0 -1
  460. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bg.json +0 -1
  461. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_bs.json +0 -1
  462. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ca.json +0 -1
  463. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_cs.json +0 -1
  464. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_da.json +0 -1
  465. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_de.json +0 -1
  466. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_el.json +0 -1
  467. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_en.json +0 -1
  468. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_es.json +0 -1
  469. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_et.json +0 -1
  470. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fi.json +0 -1
  471. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_fr.json +0 -1
  472. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_he.json +0 -1
  473. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hr.json +0 -1
  474. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_hu.json +0 -1
  475. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_id.json +0 -1
  476. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_it.json +0 -1
  477. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ja.json +0 -1
  478. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ko.json +0 -1
  479. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lt.json +0 -1
  480. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_lv.json +0 -1
  481. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nb.json +0 -1
  482. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_nl.json +0 -1
  483. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pl.json +0 -1
  484. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-BR.json +0 -1
  485. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_pt-PT.json +0 -1
  486. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ro.json +0 -1
  487. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_ru.json +0 -1
  488. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sk.json +0 -1
  489. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sl.json +0 -1
  490. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sr.json +0 -1
  491. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_sv.json +0 -1
  492. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_th.json +0 -1
  493. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_tr.json +0 -1
  494. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_uk.json +0 -1
  495. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_vi.json +0 -1
  496. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-CN.json +0 -1
  497. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-HK.json +0 -1
  498. package/assets/esri/widgets/support/NumericalFeedbackControls/t9n/NumericalFeedbackControls_zh-TW.json +0 -1
  499. package/views/interactive/tooltip/NumericalFeedbackOptions.d.ts +0 -4
  500. package/views/interactive/tooltip/NumericalFeedbackOptions.js +0 -5
  501. package/views/interactive/tooltip/SegmentLabelOptions.js +0 -5
  502. package/views/interactive/tooltip/TooltipOptions.js +0 -5
  503. package/views/interactive/tooltip/content/TooltipContentExtentMoveXY.js +0 -5
  504. package/webscene/Lighting.d.ts +0 -4
  505. package/webscene/Lighting.js +0 -5
  506. package/widgets/support/NumericalFeedbackControls/NumericalFeedbackControlsViewModel.js +0 -5
  507. package/widgets/support/NumericalFeedbackControls/VisibleElements.js +0 -5
  508. package/widgets/support/NumericalFeedbackControls/css.js +0 -5
  509. package/widgets/support/NumericalFeedbackControls.js +0 -5
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/has.js";import{ReloadableShaderModule as t}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as s}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as o}from"../lib/DefaultVertexAttributeLocations.js";import{MaterialParameters as n}from"../lib/Material.js";import{Program as a}from"../lib/Program.js";import{DefaultTechniqueConfiguration as l}from"../materials/DefaultTechniqueConfiguration.js";import{H as m,a as u}from"../../../../chunks/HeatmapDensity.glsl.js";export{H as HeatmapMode}from"../../../../chunks/HeatmapDensity.glsl.js";import{BlendOperation as c,BlendFactor as p}from"../../../webgl/enums.js";import{makePipelineState as d,simpleBlendingParams as h,defaultColorWriteParams as f}from"../../../webgl/renderState.js";var j;!function(e){e[e.Screen=0]="Screen",e[e.World=1]="World"}(j||(j={}));class b extends n{constructor(){super(...arguments),this.searchRadius=128,this.resolutionForScale=0}}class g extends s{initializeProgram(e){const r=g.shader.get().build(this.configuration);return new a(e.rctx,r,o)}initializePipeline(){return d({blending:h(p.ONE,p.ONE,c.ADD),colorWrite:f,depthTest:null,depthWrite:null})}destroy(){super.destroy()}}g.shader=new t(u,(()=>import("./HeatmapDensity.glsl.js")));class D extends l{constructor(){super(...arguments),this.mode=r("heatmap-kernel-density")?m.KernelDensity:m.GaussianBlur,this.isAttributeDriven=!1}}e([i({count:m.COUNT})],D.prototype,"mode",void 0),e([i()],D.prototype,"isAttributeDriven",void 0);export{b as HeatmapDensityPassParameters,g as HeatmapDensityTechnique,D as HeatmapDensityTechniqueConfiguration,j as RadiusMode};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import{ReloadableShaderModule as r}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as i}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as o}from"../lib/DefaultVertexAttributeLocations.js";import{MaterialParameters as s}from"../lib/Material.js";import{Program as n}from"../lib/Program.js";import{DefaultTechniqueConfiguration as a}from"../materials/DefaultTechniqueConfiguration.js";import{H as l}from"../../../../chunks/HeatmapDensity.glsl.js";import{BlendOperation as u,BlendFactor as m}from"../../../webgl/enums.js";import{makePipelineState as c,simpleBlendingParams as d,defaultColorWriteParams as h}from"../../../webgl/renderState.js";var p;!function(e){e[e.Screen=0]="Screen",e[e.World=1]="World"}(p||(p={}));class f extends s{constructor(){super(...arguments),this.searchRadius=128,this.resolutionForScale=0}}class b extends t{initializeProgram(e){const r=b.shader.get().build(this.configuration);return new n(e.rctx,r,o)}initializePipeline(){return c({blending:d(m.ONE,m.ONE,u.ADD),colorWrite:h,depthTest:null,depthWrite:null})}destroy(){super.destroy()}}b.shader=new r(l,(()=>import("./HeatmapDensity.glsl.js")));class j extends a{constructor(){super(...arguments),this.isAttributeDriven=!1}}e([i()],j.prototype,"isAttributeDriven",void 0);export{f as HeatmapDensityPassParameters,b as HeatmapDensityTechnique,j as HeatmapDensityTechniqueConfiguration,p as RadiusMode};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import r from"../../../../core/has.js";import{NoParameters as t}from"../core/shaderModules/interfaces.js";import{ReloadableShaderModule as s}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as i}from"../core/shaderTechnique/ShaderTechnique.js";import{parameter as o,ShaderTechniqueConfiguration as n}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{Default3D as a}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as m}from"../lib/OrderIndependentTransparency.js";import{Program as l}from"../lib/Program.js";import{H as p}from"../../../../chunks/Heatmap.glsl.js";import{PrimitiveType as d}from"../../../webgl/enums.js";import{makePipelineState as u,defaultColorWriteParams as c}from"../../../webgl/renderState.js";import{H as h}from"../../../../chunks/HeatmapDensity.glsl.js";export{H as HeatmapMode}from"../../../../chunks/HeatmapDensity.glsl.js";class f extends t{constructor(){super(...arguments),this.colorRamp=null,this.densityMap=null,this.searchRadius=1,this.fieldTotal=0,this.minDensity=0,this.maxDensity=100}}class j extends i{constructor(e,r){super(e,r,(()=>this.destroy()))}initializeProgram(e){const r=j.shader.get().build({mode:this.configuration.mode});return new l(e.rctx,r,a)}initializePipeline(){return u({blending:m,colorWrite:c,depthTest:null,depthWrite:null})}get primitiveType(){return d.TRIANGLE_STRIP}}j.shader=new s(p,(()=>import("./Heatmap.glsl.js")));class g extends n{constructor(){super(...arguments),this.mode=r("heatmap-kernel-density")?h.KernelDensity:h.GaussianBlur}}e([o({count:h.COUNT})],g.prototype,"mode",void 0);export{f as HeatmapPassParameters,j as HeatmapTechnique,g as HeatmapTechniqueConfiguration};
5
+ import{NoParameters as e}from"../core/shaderModules/interfaces.js";import{ReloadableShaderModule as r}from"../core/shaderTechnique/ReloadableShaderModule.js";import{ShaderTechnique as t}from"../core/shaderTechnique/ShaderTechnique.js";import{Default3D as i}from"../lib/DefaultVertexAttributeLocations.js";import{blendingDefault as s}from"../lib/OrderIndependentTransparency.js";import{Program as o}from"../lib/Program.js";import{H as n}from"../../../../chunks/Heatmap.glsl.js";import{PrimitiveType as l}from"../../../webgl/enums.js";import{makePipelineState as a,defaultColorWriteParams as m}from"../../../webgl/renderState.js";class d extends e{constructor(){super(...arguments),this.colorRamp=null,this.densityMap=null,this.searchRadius=1,this.fieldTotal=0,this.minDensity=0,this.maxDensity=100}}class p extends t{constructor(e,r){super(e,r,(()=>this.destroy()))}initializeProgram(e){const r=p.shader.get().build();return new o(e.rctx,r,i)}initializePipeline(){return a({blending:s,colorWrite:m,depthTest:null,depthWrite:null})}get primitiveType(){return l.TRIANGLE_STRIP}}p.shader=new r(n,(()=>import("./Heatmap.glsl.js")));export{d as HeatmapPassParameters,p as HeatmapTechnique};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import{ShaderOutput as o}from"../core/shaderLibrary/ShaderOutputOptions.js";import{PBRMode as t}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{OverlayMode as r}from"../core/shaderLibrary/terrain/Overlay.glsl.js";import{TileBlendInput as i}from"../core/shaderLibrary/terrain/TerrainTexture.glsl.js";import{parameter as s}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as p}from"../materials/DefaultTechniqueConfiguration.js";class a extends p{constructor(){super(...arguments),this.output=o.Color,this.overlayMode=r.Disabled,this.tileBlendInput=i.LayerOnly,this.spherical=!1,this.atmosphere=!1,this.receiveShadows=!1,this.hasSlicePlane=!1,this.backfaceCullingEnabled=!1,this.stencilEnabled=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.hasScreenSpaceReflections=!1,this.hasCloudsReflections=!1,this.tileBorders=!1,this.screenSizePerspective=!1,this.receiveAmbientOcclusion=!1}}e([s({count:o.COUNT})],a.prototype,"output",void 0),e([s({count:r.COUNT})],a.prototype,"overlayMode",void 0),e([s({count:i.COUNT})],a.prototype,"tileBlendInput",void 0),e([s()],a.prototype,"spherical",void 0),e([s()],a.prototype,"atmosphere",void 0),e([s()],a.prototype,"receiveShadows",void 0),e([s()],a.prototype,"hasSlicePlane",void 0),e([s()],a.prototype,"backfaceCullingEnabled",void 0),e([s()],a.prototype,"stencilEnabled",void 0),e([s()],a.prototype,"textureFadingEnabled",void 0),e([s()],a.prototype,"renderOccluded",void 0),e([s()],a.prototype,"hasScreenSpaceReflections",void 0),e([s()],a.prototype,"hasCloudsReflections",void 0),e([s()],a.prototype,"tileBorders",void 0),e([s()],a.prototype,"screenSizePerspective",void 0),e([s()],a.prototype,"receiveAmbientOcclusion",void 0),e([s({constValue:!0})],a.prototype,"isGround",void 0),e([s({constValue:t.Disabled})],a.prototype,"pbrMode",void 0),e([s({constValue:!1})],a.prototype,"highStepCount",void 0),e([s({constValue:!1})],a.prototype,"useCustomDTRExponentForWater",void 0),e([s({constValue:!1})],a.prototype,"useFillLights",void 0);export{a as TerrainTechniqueConfiguration};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import o from"../../../../core/has.js";import{ShaderOutput as t}from"../core/shaderLibrary/ShaderOutputOptions.js";import{PBRMode as r}from"../core/shaderLibrary/shading/PhysicallyBasedRenderingParameters.glsl.js";import{OverlayMode as i}from"../core/shaderLibrary/terrain/Overlay.glsl.js";import{TileBlendInput as s}from"../core/shaderLibrary/terrain/TileBlendInput.js";import{parameter as a}from"../core/shaderTechnique/ShaderTechniqueConfiguration.js";import{DefaultTechniqueConfiguration as p}from"../materials/DefaultTechniqueConfiguration.js";class n extends p{constructor(){super(...arguments),this.output=t.Color,this.overlayMode=i.Disabled,this.tileBlendInput=s.LayerOnly,this.spherical=!1,this.atmosphere=!1,this.receiveShadows=!1,this.hasSlicePlane=!1,this.backfaceCullingEnabled=!1,this.stencilEnabled=!1,this.textureFadingEnabled=!1,this.renderOccluded=!1,this.hasScreenSpaceReflections=!1,this.hasCloudsReflections=!1,this.tileBorders=!1,this.screenSizePerspective=!1,this.receiveAmbientOcclusion=!1,this.shading=o("enable-feature:terrain-shading")}}e([a({count:t.COUNT})],n.prototype,"output",void 0),e([a({count:i.COUNT})],n.prototype,"overlayMode",void 0),e([a({count:s.COUNT})],n.prototype,"tileBlendInput",void 0),e([a()],n.prototype,"spherical",void 0),e([a()],n.prototype,"atmosphere",void 0),e([a()],n.prototype,"receiveShadows",void 0),e([a()],n.prototype,"hasSlicePlane",void 0),e([a()],n.prototype,"backfaceCullingEnabled",void 0),e([a()],n.prototype,"stencilEnabled",void 0),e([a()],n.prototype,"textureFadingEnabled",void 0),e([a()],n.prototype,"renderOccluded",void 0),e([a()],n.prototype,"hasScreenSpaceReflections",void 0),e([a()],n.prototype,"hasCloudsReflections",void 0),e([a()],n.prototype,"tileBorders",void 0),e([a()],n.prototype,"screenSizePerspective",void 0),e([a()],n.prototype,"receiveAmbientOcclusion",void 0),e([a()],n.prototype,"shading",void 0),e([a({constValue:!0})],n.prototype,"isGround",void 0),e([a({constValue:r.Disabled})],n.prototype,"pbrMode",void 0),e([a({constValue:!1})],n.prototype,"highStepCount",void 0),e([a({constValue:!1})],n.prototype,"useCustomDTRExponentForWater",void 0),e([a({constValue:!1})],n.prototype,"useFillLights",void 0);export{n as TerrainTechniqueConfiguration};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Viewpoint.js";import s from"../core/Collection.js";import{byId as n}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{handlesGroup as l,makeHandle as p}from"../core/handleUtils.js";import h from"../core/has.js";import{isIterable as d}from"../core/iteratorUtils.js";import{equalsShallow as c}from"../core/lang.js";import u from"../core/Logger.js";import{destroyMaybe as g,isNone as m,isSome as f,unwrapOr as y}from"../core/maybe.js";import{ObservableChangesType as w}from"../core/ObservableChangesType.js";import{throwIfAborted as v}from"../core/promiseUtils.js";import{on as _,watch as b,initial as S,syncAndInitial as M,whenOnce as R,sync as V}from"../core/reactiveUtils.js";import{setFrameDuration as T}from"../core/scheduling.js";import{screenPointObjectToArray as C,createScreenPoint as x,createScreenPointArray as O}from"../core/screenUtils.js";import{initialize as E}from"../core/workers/workers.js";import{property as j}from"../core/accessorSupport/decorators/property.js";import{cast as P}from"../core/accessorSupport/decorators/cast.js";import{subclass as I}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as L}from"../core/accessorSupport/ensureType.js";import{c as G}from"../chunks/vec3f64.js";import{owningCollectionProperty as H}from"../core/support/OwningCollection.js";import U from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as A,project as W,projectPointToVector as F,projectVectorToVector as D,projectBoundingRect as q}from"../geometry/projection.js";import{create as k,toExtent as z}from"../geometry/support/aaBoundingRect.js";import{B as N,a as B}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as Q}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as $}from"../geometry/support/scaleUtils.js";import{isImageryTileLayer as X,isTiledLayer as Y,isVoxelLayer as Z}from"../layers/support/layerUtils.js";import{AnalysesCollection as J}from"../support/AnalysesCollection.js";import{BreakpointsOwner as K}from"./BreakpointsOwner.js";import{DOMContainer as ee}from"./DOMContainer.js";import te from"./GroundView.js";import{PopupView as ie}from"./PopupView.js";import re from"./View.js";import se from"./ViewAnimation.js";import{ViewingMode as ne,stringFromViewingMode as ae,viewingModeFromString as oe}from"./ViewingMode.js";import{layerView3DImporter as le}from"./3d/layerViewModuleImportUtils.js";import pe from"./3d/analysis/AnalysisViewManager3D.js";import{Constraints as he}from"./3d/constraints/Constraints.js";import de from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as ce}from"./3d/environment/SceneViewEnvironmentManager.js";import ue from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as ge}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as me}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as fe}from"./3d/layers/graphics/ObjectResourceCache.js";import{FeatureTileTree3D as ye}from"./3d/layers/support/FeatureTileTree3D.js";import we from"./3d/state/ViewState.js";import ve from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as _e}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as be}from"./3d/support/CombinedElevationProvider.js";import Se from"./3d/support/debugFlags.js";import Me from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as Re}from"./3d/support/ElevationProvider.js";import Ve from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Te}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Ce}from"./3d/support/PropertiesPool.js";import xe from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as Oe}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Ee}from"./3d/support/ResourceController.js";import je from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as Pe}from"./3d/support/SharedSymbolResources.js";import{PointsOfInterest as Ie}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Le from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Ge,getTiledLayerInfo as He,checkIfTileInfoSupportedForView as Ue}from"./3d/terrain/terrainUtils.js";import{Stage as Ae}from"./3d/webgl-engine/Stage.js";import{newIntersector as We,DEFAULT_TOLERANCE as Fe}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as De,IntersectorType as qe}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as ke}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toHit as ze,toOwner as Ne}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as Be}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSimilarDistance as Qe}from"./support/hitTestSelectUtils.js";import{occludeesSupported as $e}from"./support/layerViewUtils.js";import{encode as Xe,encodeData as Ye,toRenderSettings as Ze,screenshotSuperSampleSettings as Je}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Ke,createScreenPointFromSupportedEvent as et}from"./support/screenUtils.js";import{isSpatialReferenceSupported as tt}from"./support/spatialReferenceSupport.js";import{check as it}from"./support/WebGLRequirements.js";import rt from"./ui/3d/DefaultUI3D.js";import st from"../webscene/Environment.js";import nt from"../geometry/Extent.js";import at from"../geometry/SpatialReference.js";import ot from"../geometry/Point.js";const lt=u.getLogger("esri.views.SceneView");let pt=class extends(K(ee(ie(re)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Ce({slicePlane:N},this),this._resourceController=Ee(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new ge({view:this}),this.labeler=new me({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new J,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new he,this.environmentManager=new ce,this.extent=null,this.floors=new s,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new pe({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new we,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new rt,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Ve,this.voxelWasm=null,this.voxelWasmPromise=null,E(),e&&e.environment||(this._defaults.environment=new de,this.environment=this._defaults.environment);const t=(e=null)=>{f(e)&&e.type===w.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([_((()=>this.map?.allLayers),"after-changes",(e=>t(e)),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),b((()=>this.map),(e=>{e&&"load"in e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new ue({view:this}),this.stateManager=new ve({view:this})}initialize(){this.groundView=new te({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(_((()=>this.map?.allLayers),"after-changes",e,{onListenerAdd:e,onListenerRemove:e})),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),S),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),S),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>T(e>0?1e3/Math.ceil(e):0)),S),this.updatingHandles.add((()=>this.map?.ground),e,M),this.updatingHandles.add((()=>this.map?.ground?.opacity),(()=>this._updateDefaultHitTestOptions()),M),this.handles.add(b((()=>this.spatialReference),(()=>this.notifyChange("clippingArea")),V))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=g(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=g(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=g(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||m(e)?(this._clippingArea=null,null):e instanceof nt?this.spatialReference&&(e=ct(e,this.spatialReference),m(e))?(lt.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),m(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(lt.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&f(e)?lt.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===ne.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return m(t)||m(e)||t.spatialReference.equals(e)?t:ct(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||at.WGS84,i=ct(this.clippingArea,t);f(i)&&(e=f(e)?e.intersection(i):i);const r=this._get("dataExtent");return f(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||at.WGS84;let t;const i=i=>{const r=ct(i,e);m(r)||(f(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(r?.spatialReference){const e=r.groundExtent;i(new nt({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!f(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(m(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof de?e:e instanceof st?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):de.fromWebsceneEnvironment(e):L(de,e):new de}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||f(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(m(this.state)||this.state.stationary)}set qualityProfile(e){Me.isValidProfile(e)&&(Me.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Me.getDefaultProfile()}set slicePlane(e){if(f(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),m(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");B(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?$(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?U.deriveUnitFromSR(e,this.spatialReference):null}get updating(){if(this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Ge(r))return;++i,e+=r.updatingProgress}}else++i}));for(const r of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(f(r)&&r.updating){const t=.1;i+=t,e+=.5*t}for(const r of[this.deconflictor,this.labeler,this.basemapTerrain])f(r)&&r.updating&&(++i,e+=r.updatingProgress);if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||this.inputManager?.hasPendingInputs||this.map?.allLayers?.some((e=>!e.isFulfilled()))),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get viewingMode(){const e=this._predeterminedViewingMode;if(f(e))return ae(e);const t=this.spatialReference;return t?f(this.defaultsFromMap?.viewingMode)&&t.equals(this.defaultsFromMap.spatialReference)?ae(this.defaultsFromMap.viewingMode):tt(t,ne.Global)?"global":"local":"global"}set viewingMode(e){this.ready?lt.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new je(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return lt.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=f(i.graphics)&&(f(i.graphics.include)||f(i.graphics.exclude)),s=Ke(e)?et(this,e):e,n=C(s);i.enableDraped=i.include&&!i.include.has(Be)||i.exclude&&i.exclude.has(Be);const a=this.sceneIntersectionHelper,o=We(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?De.ALL:De.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=ze(e,this);if(m(t))return this._intersectResultToMapPoint(e);if("graphic"!==t.type||this._testGraphicUidFilter(i.graphics,t.graphic))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return lt.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=y(null==e.z&&Re(this.elevationProvider,e),0);return F(e,gt,this.renderSpatialReference,t),this.state.camera.projectToScreen(gt,mt),x(mt[0],mt[1])}pixelSizeAt(e){return this.ready?e?(F(e,gt,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(gt)):0:(lt.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return lt.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Ke(e)?et(this,e):e,r=O(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=We(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=De.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=Ne(o,this),p=f(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:ke(o)?o.distanceInRenderSpace:0,layer:p}};return Se.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}async popupHitTest(e){const{results:t,ground:i}=await Qe(this,e);let r=null;return!(0===t.length||Math.abs(y(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(await this.whenReady(),m(e.parent))throw new a("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});if("line-of-sight"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView()}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=this._completeSettings(e);await this.whenReady();const i=await this._stage.renderView.takeScreenshot(t);return Xe(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=this._completeSettings(e);await this.whenReady();const i=await this._stage.renderView.takeScreenshot(t);return Ye(i,this._pixelFormat())}_completeSettings(e){const t=Ze(e,this);return t.pixelRatio/=this.state.pixelRatio,Je(t,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this._stage.renderView.getAlpha()}}get test(){return{takeScreenshot:e=>this._takeScreenshot(e)}}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return le.importLayerView(e)}hasLayerViewModule(e){return le.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}async validate(){let e=it(this.type);if(h("safari")&&h("safari")<9&&(e=new a("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:h("safari")})),f(e))throw lt.warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):(this.map&&"initialViewProperties"in this.map?this.map.initialViewProperties?.viewingMode:null)??null;return f(e)?oe(e):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(f(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,ne.Local),s=this._validateSpatialReferenceForViewingMode(e,t,ne.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,ne.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,ne.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!tt(e,i)&&(!!m(t)||(!!X(t)||(!Y(t)||!m(He(t,e,i)))&&(!Z(t)||i!==ne.Global)))}_makeSpatialReferenceConstraints(e,t,i){if(m(t))return[{spatialReference:e,viewingMode:i}];const r=e.isWebMercator,s=e.isWGS84;if(X(t)&&(r||s)){return!s||i===ne.Local||null===Ue(t.tileInfo,t.fullExtent,e,ne.Global)?[{spatialReference:e,viewingMode:i},{spatialReference:at.WebMercator,viewingMode:i}]:[{spatialReference:r?at.WGS84:at.WebMercator,viewingMode:i}]}return Y(t)||Z(t)||!r&&!s?Y(t)&&r&&i!==ne.Global?[{spatialReference:e,viewingMode:i},{spatialReference:at.WGS84,viewingMode:ne.Local}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?at.WGS84:at.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=f(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(f(i)?lt.warnOnce(`Spatial reference defined on view not supported in ${ae(i)} viewing mode.`):e.isGeographic&&lt.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||at.WGS84;return D(e,this.renderSpatialReference,e,i)||(i=at.WGS84,D(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new ot(e,i),t}trackGraphicState(e){if(!e.graphic)return lt.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&f(t)&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return f(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return l(e.map((e=>this.highlight(e))));if(s.isCollection(e))return l(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):p()}maskOccludee(e){if(!e)return lt.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&f(t)&&$e(t)&&(i=t.maskOccludee(e))};return f(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,f(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){f(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await R((()=>this.graphicsView)),this.graphicsView;if(!e.layer||!this.map)throw new a("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ut.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ut.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(gt)?(t=this.computeMapPointFromVec3d(gt,t),e.intersector===qe.TERRAIN&&this.basemapTerrain&&(t.z=y(Re(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=Ne(n,this);if(f(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=ze(n,this);if(m(o))continue;if("graphic"===o.type){if(m(r)&&s!==e.length-1&&(r=new Set),f(r)){const e=this._getGraphicFilterUid(o.graphic);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o.graphic))continue}const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({...o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return m(e)||(m(e.include)||e.include.has(i))&&(m(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,r={layerUids:null,graphicUids:null}){if(!e)return r;if(e instanceof i)dt(r,this._getGraphicFilterUid(e)),t===ut.INCLUDE&&(f(this.graphicsView)&&e.layer===this?ht(r,this.graphicsView.processor.layer.id):e.layer&&ht(r,e.layer.uid));else if(d(e))for(const i of e)i===this.graphics&&f(this.graphicsView)?ht(r,this.graphicsView.processor.layer.id):i===this.map.ground?ht(r,Be):this._externalToInternalRenderItems(i,t,r);else"uid"in e&&ht(r,e.uid);return r}_initBasemapTerrain(){this._set("basemapTerrain",new Le({view:this})),this._set("elevationProvider",new be({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Ie({view:this})),this._set("featureTiles",new ye({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain?.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=f(this.basemapTerrain.extent)?W(z(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;f(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>Se.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&Se.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||Se.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),M),this.updatingHandles.add((()=>this.clippingArea),e,M),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,M)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Te(this.map,e));const t=this.state.isGlobal,i=Q(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",Oe.create(this.state.viewingMode,i)),t||this.handles.add(b((()=>this.basemapTerrain?.extent),(e=>{const t=this.renderCoordsHelper.spatialReference;e&&(0!==e[0]||0!==e[1]||0!==e[2]||0!==e[3])&&q(e,this.basemapTerrain.spatialReference,ft,t)&&(this.renderCoordsHelper.extent=ft)}),V),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(Fe/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){f(e)&&e.type===w.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add(b((()=>[e.updating,e.updatingProgress]),(()=>this._updatingChanged()),{sync:!0,equals:c}),"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new _e(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=n(this.surface),{resourceController:r,state:s,renderSpatialReference:l}=this;this._stage=new Ae({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:l}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=o(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new a("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),S),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),S),b((()=>this.magnifier),(e=>this._stage.renderView.magnifier=e),M)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Ve.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(Fe/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new Pe({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new fe})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;v(e),await R((()=>this.basemapTerrain?.ready),e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),f(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=oe(this.viewingMode);if(e===ne.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(_((()=>this.graphics),"after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(Be);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(Be);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}addVoxelLayerViewToWasm(e){return m(this.voxelWasm)?(m(this.voxelWasmPromise)&&(this.voxelWasmPromise=import("../layers/VoxelWasmPerSceneView.js").then((e=>(this.voxelWasm=new e.default(this),this.voxelWasm)))),this.voxelWasmPromise.then((t=>t.addVoxelLayer(e)))):this.voxelWasm.addVoxelLayer(e)}removeVoxelLayerViewFromWasm(e){if(f(this.voxelWasm)){this.voxelWasm.removeVoxelLayer(e)<1&&(this.voxelWasm=null,this.voxelWasmPromise=null)}}};function ht(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function dt(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function ct(e,t){return f(e)&&A(e.spatialReference,t)?W(e,t):null}var ut;pt.type="3d",e([j()],pt.prototype,"_userClippingArea",void 0),e([j()],pt.prototype,"_resourceController",void 0),e([j()],pt.prototype,"_stage",void 0),e([j({readOnly:!0})],pt.prototype,"deconflictor",void 0),e([j({readOnly:!0})],pt.prototype,"labeler",void 0),e([j(H(J,"analyses"))],pt.prototype,"analyses",void 0),e([j({type:se,readOnly:!0,aliasOf:"state.animation"})],pt.prototype,"animation",void 0),e([j({readOnly:!0})],pt.prototype,"basemapTerrain",void 0),e([j({readOnly:!0})],pt.prototype,"elevationProvider",void 0),e([j({type:t,aliasOf:"stateManager.camera"})],pt.prototype,"camera",void 0),e([j({type:t,aliasOf:"stateManager.contentCamera"})],pt.prototype,"contentCamera",void 0),e([j({readOnly:!0})],pt.prototype,"canvas",void 0),e([j({type:ot,aliasOf:"stateManager.center"})],pt.prototype,"center",void 0),e([j({type:nt})],pt.prototype,"clippingArea",null),e([j({type:he})],pt.prototype,"constraints",void 0),e([j({type:nt,readOnly:!0})],pt.prototype,"renderDataExtent",null),e([j({type:nt,readOnly:!0})],pt.prototype,"dataExtent",null),e([j({type:nt,readOnly:!0})],pt.prototype,"groundAndLayersExtent",null),e([j({value:null,type:de})],pt.prototype,"environment",null),e([P("environment")],pt.prototype,"castEnvironment",null),e([j({readOnly:!0})],pt.prototype,"environmentManager",void 0),e([j({type:nt,aliasOf:"stateManager.extent"})],pt.prototype,"extent",void 0),e([j()],pt.prototype,"floors",void 0),e([j({readOnly:!0,aliasOf:"stateManager.screenCenter"})],pt.prototype,"screenCenter",void 0),e([j({aliasOf:"stateManager.frustum"})],pt.prototype,"frustum",void 0),e([j({type:Number,readOnly:!0})],pt.prototype,"fullOpacity",void 0),e([j({readOnly:!0})],pt.prototype,"graphicsView",void 0),e([j({readOnly:!0})],pt.prototype,"analysisViewManager",void 0),e([j()],pt.prototype,"groundView",void 0),e([j({type:Boolean})],pt.prototype,"initialExtentRequired",null),e([j()],pt.prototype,"_defaultsFromMapSettings",null),e([j({type:Boolean,readOnly:!0})],pt.prototype,"interacting",null),e([j()],pt.prototype,"stationary",null),e([j({aliasOf:"state.navigating"})],pt.prototype,"navigating",void 0),e([j()],pt.prototype,"map",void 0),e([j({readOnly:!0})],pt.prototype,"mapCoordsHelper",void 0),e([j({aliasOf:"stateManager.padding"})],pt.prototype,"padding",void 0),e([j({type:Ie,readOnly:!0})],pt.prototype,"pointsOfInterest",void 0),e([j({type:ye,readOnly:!0})],pt.prototype,"featureTiles",void 0),e([j()],pt.prototype,"featureTreeDebugger",void 0),e([j({type:Boolean})],pt.prototype,"screenSizePerspectiveEnabled",void 0),e([j({constructOnly:!0})],pt.prototype,"deactivatedWebGLExtensions",void 0),e([j({constructOnly:!0})],pt.prototype,"debugWebGLExtensions",void 0),e([j({constructOnly:!0})],pt.prototype,"renderCanvas",void 0),e([j({constructOnly:!0})],pt.prototype,"state",void 0),e([j({readOnly:!0})],pt.prototype,"inputManager",void 0),e([j({readOnly:!0})],pt.prototype,"stateManager",void 0),e([j({type:["low","medium","high"]})],pt.prototype,"qualityProfile",null),e([j({type:xe,get(){let e=this._get("qualitySettings");return e||(e=new xe,Me.apply(this.qualityProfile,e)),e}})],pt.prototype,"qualitySettings",void 0),e([j()],pt.prototype,"slicePlane",null),e([j({readOnly:!0})],pt.prototype,"typeSpecificPreconditionsReady",null),e([j({readOnly:!0})],pt.prototype,"renderCoordsHelper",void 0),e([j({readOnly:!0})],pt.prototype,"sceneIntersectionHelper",void 0),e([j({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],pt.prototype,"resolution",null),e([j({type:Number,aliasOf:"stateManager.scale"})],pt.prototype,"scale",void 0),e([j()],pt.prototype,"heightModelInfo",null),e([j()],pt.prototype,"spatialReference",void 0),e([j({type:Boolean,constructOnly:!0})],pt.prototype,"alphaCompositingEnabled",void 0),e([j({type:Boolean})],pt.prototype,"supersampleScreenshotsEnabled",void 0),e([j({readOnly:!0})],pt.prototype,"type",void 0),e([j({type:rt})],pt.prototype,"ui",void 0),e([j({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],pt.prototype,"updating",null),e([j({type:Number,readOnly:!0,dependsOn:["updating"]})],pt.prototype,"updatingProgress",void 0),e([j({type:["global","local"]})],pt.prototype,"viewingMode",null),e([j({type:r,aliasOf:"stateManager.viewpoint"})],pt.prototype,"viewpoint",void 0),e([j({type:Number,aliasOf:"stateManager.zoom"})],pt.prototype,"zoom",void 0),e([j({type:Ve})],pt.prototype,"highlightOptions",void 0),pt=e([I("esri.views.SceneView")],pt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ut||(ut={}));const gt=G(),mt=O(),ft=k(),yt=pt;export{yt as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../Camera.js";import"../geometry.js";import i from"../Graphic.js";import r from"../Viewpoint.js";import s from"../core/Collection.js";import{byId as n}from"../core/domUtils.js";import a from"../core/Error.js";import{on as o}from"../core/events.js";import{handlesGroup as l,makeHandle as p}from"../core/handleUtils.js";import h from"../core/has.js";import{isIterable as d}from"../core/iteratorUtils.js";import c from"../core/Logger.js";import{destroyMaybe as u,isNone as g,isSome as m,unwrapOr as f}from"../core/maybe.js";import{ObservableChangesType as y}from"../core/ObservableChangesType.js";import{throwIfAborted as w}from"../core/promiseUtils.js";import{on as v,watch as _,initial as b,syncAndInitial as S,whenOnce as M,sync as R}from"../core/reactiveUtils.js";import{setFrameDuration as V}from"../core/scheduling.js";import{screenPointObjectToArray as T,createScreenPoint as C,createScreenPointArray as x}from"../core/screenUtils.js";import{initialize as O}from"../core/workers/workers.js";import{property as E}from"../core/accessorSupport/decorators/property.js";import"../core/arrayUtils.js";import{cast as j}from"../core/accessorSupport/decorators/cast.js";import{subclass as P}from"../core/accessorSupport/decorators/subclass.js";import{ensureType as I}from"../core/accessorSupport/ensureType.js";import{c as L}from"../chunks/vec3f64.js";import{owningCollectionProperty as G}from"../core/support/OwningCollection.js";import H from"../geometry/HeightModelInfo.js";import{canProjectWithoutEngine as U,project as A,projectPointToVector as D,projectVectorToVector as W,projectBoundingRect as F}from"../geometry/projection.js";import{create as k,toExtent as q}from"../geometry/support/aaBoundingRect.js";import{B as z,a as B}from"../chunks/boundedPlane.js";import{renderSRFromViewSR as N}from"../geometry/support/coordinateSystem.js";import{getResolutionForScale as Q}from"../geometry/support/scaleUtils.js";import{isImageryTileLayer as $,isTiledLayer as X,isVoxelLayer as Y}from"../layers/support/layerUtils.js";import{AnalysesCollection as Z}from"../support/AnalysesCollection.js";import{BreakpointsOwner as J}from"./BreakpointsOwner.js";import{DOMContainer as K}from"./DOMContainer.js";import ee from"./GroundView.js";import{PopupView as te}from"./PopupView.js";import ie from"./View.js";import re from"./ViewAnimation.js";import{ViewingMode as se,stringFromViewingMode as ne,viewingModeFromString as ae}from"./ViewingMode.js";import{layerView3DImporter as oe}from"./3d/layerViewModuleImportUtils.js";import le from"./3d/analysis/AnalysisViewManager3D.js";import{Constraints as pe}from"./3d/constraints/Constraints.js";import he from"./3d/environment/SceneViewEnvironment.js";import{SceneViewEnvironmentManager as de}from"./3d/environment/SceneViewEnvironmentManager.js";import ce from"./3d/input/SceneInputManager.js";import{GraphicsDeconflictor as ue}from"./3d/layers/graphics/GraphicsDeconflictor.js";import{Labeler as ge}from"./3d/layers/graphics/Labeler.js";import{ObjectResourceCache as me}from"./3d/layers/graphics/ObjectResourceCache.js";import{FeatureTileTree3D as fe}from"./3d/layers/support/FeatureTileTree3D.js";import ye from"./3d/state/ViewState.js";import we from"./3d/state/ViewStateManager.js";import{SceneIntersectionHelper as ve}from"./3d/state/helpers/SceneIntersectionHelper.js";import{CombinedElevationProvider as _e}from"./3d/support/CombinedElevationProvider.js";import be from"./3d/support/debugFlags.js";import Se from"./3d/support/DisplayQualityProfile.js";import{getElevationAtPoint as Me}from"./3d/support/ElevationProvider.js";import Re from"./3d/support/HighlightOptions.js";import{MapCoordsHelper as Ve}from"./3d/support/MapCoordsHelper.js";import{PropertiesPool as Te}from"./3d/support/PropertiesPool.js";import Ce from"./3d/support/QualitySettings.js";import{RenderCoordsHelper as xe}from"./3d/support/RenderCoordsHelper.js";import{newResourceController as Oe}from"./3d/support/ResourceController.js";import Ee from"./3d/support/SceneViewPerformanceInfo.js";import{SharedSymbolResources as je}from"./3d/support/SharedSymbolResources.js";import{PointsOfInterest as Pe}from"./3d/support/pointsOfInterest/PointsOfInterest.js";import Ie from"./3d/terrain/TerrainSurface.js";import{isSurfaceLayerView as Le,getTiledLayerInfo as Ge,checkIfTileInfoSupportedForView as He}from"./3d/terrain/terrainUtils.js";import{Stage as Ue}from"./3d/webgl-engine/Stage.js";import{newIntersector as Ae,DEFAULT_TOLERANCE as De}from"./3d/webgl-engine/lib/Intersector.js";import{StoreResults as We,IntersectorType as Fe}from"./3d/webgl-engine/lib/IntersectorInterfaces.js";import{isValidIntersectorResult as ke}from"./3d/webgl-engine/lib/intersectorUtils.js";import{toHit as qe,toOwner as ze}from"./3d/webgl-engine/lib/intersectorUtilsConversions.js";import{TERRAIN_ID as Be}from"./3d/webgl-engine/lib/verticalOffsetUtils.js";import{hitTestSelectSimilarDistance as Ne}from"./support/hitTestSelectUtils.js";import{occludeesSupported as Qe}from"./support/layerViewUtils.js";import{encode as $e,encodeData as Xe,toRenderSettings as Ye,screenshotSuperSampleSettings as Ze}from"./support/screenshotUtils.js";import{isSupportedScreenPointEvent as Je,createScreenPointFromSupportedEvent as Ke}from"./support/screenUtils.js";import{isSpatialReferenceSupported as et}from"./support/spatialReferenceSupport.js";import{check as tt}from"./support/WebGLRequirements.js";import it from"./ui/3d/DefaultUI3D.js";import rt from"../webscene/Environment.js";import st from"../geometry/Extent.js";import nt from"../geometry/SpatialReference.js";import at from"../geometry/Point.js";const ot=c.getLogger("esri.views.SceneView");let lt=class extends(J(K(te(ie)))){constructor(e){super(e),this._userClippingArea=null,this._clippingArea=null,this._initialDefaultSpatialReference=null,this._defaults={},this._externallySet={environment:!1},this._createGraphicsViewController=null,this._resolveWhenReady=[],this.propertiesPool=new Te({slicePlane:z},this),this._resourceController=Oe(this),this._defaultToMapOptions={include:new Set},this._defaultHitTestOptions={exclude:new Set},this.deconflictor=new ue({view:this}),this.labeler=new ge({view:this,deconflictor:this.deconflictor.labels}),this.sharedSymbolResources=null,this.analyses=new Z,this.basemapTerrain=null,this.elevationProvider=null,this.camera=null,this.canvas=null,this.center=null,this.constraints=new pe,this.environmentManager=new de,this.extent=null,this.floors=new s,this.fullOpacity=1,this.graphicsView=null,this.analysisViewManager=new le({view:this}),this.groundView=null,this.navigating=!1,this.map=null,this.screenSizePerspectiveEnabled=!0,this.state=new ye,this.scale=null,this.spatialReference=null,this.alphaCompositingEnabled=!1,this.preserveDrawingBufferEnabled=!1,this.supersampleScreenshotsEnabled=!0,this.type="3d",this.ui=new it,this._numUpdating=0,this._lastUpdateTime=0,this.updatingProgress=.5,this.viewpoint=null,this.zoom=null,this.highlightOptions=new Re,this.voxelWasm=null,this.voxelWasmPromise=null,O(),e&&e.environment||(this._defaults.environment=new he,this.environment=this._defaults.environment);const t=(e=null)=>{m(e)&&e.type===y.MOVE||(this._updatingChanged(),this.map&&this.map.allLayers.forEach((async e=>{try{await e.when()}catch{}this._updatingChanged()})))};this.handles.add([v((()=>this.map?.allLayers),"after-changes",(e=>t(e)),{onListenerAdd:()=>t(),onListenerRemove:()=>t(),sync:!0}),this.allLayerViews.on("after-changes",(e=>this._updateUpdatingMonitors(e))),_((()=>this.map),(e=>{e&&"load"in e&&e.load&&e.load().catch((()=>{}))}))]),this.inputManager=new ce({view:this}),this.stateManager=new we({view:this})}initialize(){this.groundView=new ee({view:this}),this._updateUpdatingMonitors();const e=()=>this._updateDefaultToMapOptions();this.handles.add(v((()=>this.map?.allLayers),"after-changes",e,{onListenerAdd:e,onListenerRemove:e})),this.updatingHandles.add((()=>this.qualitySettings.memoryLimit),(e=>{this.resourceController&&(this.resourceController.memoryController.maxMemory=e)}),b),this.updatingHandles.add((()=>this.qualitySettings.additionalCacheMemory),(e=>{this.resourceController&&(this.resourceController.memoryController.additionalCacheMemory=e)}),b),this.updatingHandles.add((()=>this.qualitySettings.frameRate),(e=>V(e>0?1e3/Math.ceil(e):0)),b),this.updatingHandles.add((()=>this.map?.ground),e,S),this.updatingHandles.add((()=>this.map?.ground?.opacity),(()=>this._updateDefaultHitTestOptions()),S),this.handles.add(_((()=>this.spatialReference),(()=>this.notifyChange("clippingArea")),R))}destroy(){this.destroyed||(this.invalidate(),this.activeTool=null,this.layerViewManager.clear(),this._exitSurface(),this._disposeGraphicsView(),this.sharedSymbolResources=u(this.sharedSymbolResources),this.labeler.destroy(),this._set("labeler",null),this.deconflictor.destroy(),this._set("deconflictor",null),this._resourceController=u(this._resourceController),this.stateManager.destroy(),this._set("stateManager",null),this.inputManager.destroy(),this._set("inputManager",null),this.propertiesPool.destroy(),this.handles.remove("updatingMonitors"),this.environmentManager.destroy(),this._set("environmentManager",null),this.groundView=u(this.groundView))}get renderSpatialReference(){return this.renderCoordsHelper&&this.renderCoordsHelper.spatialReference}get basemapSpatialReference(){return this.basemapTerrain?.spatialReference}installContentCameraReset(e={sticky:!1}){return this.stateManager.installContentCameraReset(e)}get clippingArea(){if("global"===this.viewingMode)return null;let e=this._userClippingArea||this.get("map.clippingArea");return!(!!this._userClippingArea||this.get("map.clippingEnabled"))||g(e)?(this._clippingArea=null,null):e instanceof st?this.spatialReference&&(e=dt(e,this.spatialReference),g(e))?(ot.error("#clippingArea","setting clippingArea with incompatible SpatialReference"),this._clippingArea):(e=e.clone(),g(e.intersection(this.groundAndLayersExtent))&&(e.xmin=e.xmax,e.ymin=e.ymax),e.zmin=void 0,e.zmax=void 0,e.equals(this._clippingArea)||(this._clippingArea=e),this._clippingArea):(ot.error("#clippingArea","only clippingArea geometries of type Extent are supported"),this._clippingArea)}set clippingArea(e){this.ready&&"global"===this.viewingMode&&m(e)?ot.error("#clippingArea=","Clipping area is only supported in local viewingMode"):this._userClippingArea=e}get renderDataExtent(){if(this.state.viewingMode===se.Global)return null;const e=this.renderSpatialReference,t=this.dataExtent;return g(t)||g(e)||t.spatialReference.equals(e)?t:dt(t,e)}get dataExtent(){let e=this.groundAndLayersExtent;const t=this.spatialReference||nt.WGS84,i=dt(this.clippingArea,t);m(i)&&(e=m(e)?e.intersection(i):i);const r=this._get("dataExtent");return m(e)&&e.equals(r)?r:e}get groundAndLayersExtent(){const e=this.spatialReference||nt.WGS84;let t;const i=i=>{const r=dt(i,e);g(r)||(m(t)?t.union(r):t=r.clone())},r=this.basemapTerrain;if(r?.spatialReference){const e=r.groundExtent;i(new st({xmin:e[0],ymin:e[1],zmin:0,xmax:e[2],ymax:e[3],zmax:0,spatialReference:r.spatialReference}))}if(this.map){const e=e=>{!m(e.fullExtent)||"graphics"===e.type&&e.internal||i(e.fullExtent)};this.map.allLayers.forEach((t=>e(t)))}if(g(t))return null;t.hasZ?(t.zmin=Math.min(0,t.zmin),t.zmax=Math.max(0,t.zmax)):(t.zmin=0,t.zmax=0);const s=this._get("groundAndLayersExtent");return t.equals(s)?s:t}set environment(e){e!==this._defaults.environment&&(this._externallySet.environment=!0),this._set("environment",e)}castEnvironment(e){return e?e instanceof he?e:e instanceof rt?null!=this.environment?this.environment.cloneWithWebsceneEnvironment(e):he.fromWebsceneEnvironment(e):I(he,e):new he}get initialExtentRequired(){return this.stateManager&&!this.stateManager.hasInitialView}get _defaultsFromMapSettings(){return{required:{tileInfo:!1,heightModelInfo:!0,extent:!1}}}get interacting(){return this.navigating||m(this.activeTool)}get stationary(){return!this.animation&&!this.resizing&&(g(this.state)||this.state.stationary)}set qualityProfile(e){Se.isValidProfile(e)&&(Se.apply(e,this.qualitySettings),this._set("qualityProfile",e))}get qualityProfile(){return this._get("qualityProfile")||Se.getDefaultProfile()}set slicePlane(e){if(m(this._stage)&&this._stage.renderView.setRenderParameters({slicePlane:e}),g(e))return void this._set("slicePlane",null);const t=this.propertiesPool.get("slicePlane");B(e,t),this._set("slicePlane",t)}get typeSpecificPreconditionsReady(){return!!this.viewingMode}get resolution(){return null!=this.spatialReference?Q(this.scale,this.spatialReference):0}get heightModelInfo(){const e=this.getDefaultHeightModelInfo();return null!=e?H.deriveUnitFromSR(e,this.spatialReference):null}get updating(){if(this.destroyed)return!1;let e=0,t=this.layerViewManager.updating,i=t?this.layerViewManager.updatingRemaining:0;this.allLayerViews.forEach((r=>{if(r.isFulfilled()){if(r.updating){if(t=!0,r.suspended||Le(r))return;++i,e+=r.updatingProgress}}else++i}));for(const r of[this.graphicsView,this.basemapView,this._resourceController,this._stage,this.featureTiles,this.pointsOfInterest,this.environmentManager,this.overlay,this.featureTreeDebugger,this.toolViewManager,this.analysisViewManager])if(m(r)&&r.updating){const t=.1;i+=t,e+=.5*t}for(const r of[this.deconflictor,this.labeler,this.basemapTerrain])m(r)&&r.updating&&(++i,e+=r.updatingProgress);if(t=!!(t||i>0||this.updatingHandles.updating||!this.ready||!this.stationary||this._createGraphicsViewController||this.inputManager?.hasPendingInputs||this.map?.allLayers?.some((e=>!e.isFulfilled()))),t?(this._numUpdating=Math.max(i,this._numUpdating),e+=this._numUpdating-i):this._numUpdating=0,this._numUpdating>0?e/=this._numUpdating:e=t?0:1,this._get("updatingProgress")!==e){const i=performance.now();if(e<1){const t=Math.min((i-this._lastUpdateTime)/2e3,1);e=this.updatingProgress*(1-t)+e*t}this._set("updatingProgress",e),this._lastUpdateTime=t&&e<1?i:0}return t}get viewingMode(){const e=this._predeterminedViewingMode;if(m(e))return ne(e);const t=this.spatialReference;return t?m(this.defaultsFromMap?.viewingMode)&&t.equals(this.defaultsFromMap.spatialReference)?ne(this.defaultsFromMap.viewingMode):et(t,se.Global)?"global":"local":"global"}set viewingMode(e){this.ready?ot.error("#viewingMode","viewingMode cannot be set once view is ready"):e?this._override("viewingMode",e):void 0===e&&this._clearOverride("viewingMode")}get resourceController(){return this._resourceController}get performanceInfo(){return new Ee(this)}forceAnimationTime(e){this._stage.renderView.forcedAnimationTime=this.basemapTerrain.overlayManager.forcedAnimationTime=e}on(e,t,i,r){const s=this.viewEvents.on(e,t,i,r);return s||super.on(e,t)}hasEventListener(e){return super.hasEventListener(e)||this.viewEvents.hasHandler(e)}toMap(e,t){if(!this.ready)return ot.error("#toMap()","Scene view cannot be used before it is ready"),null;const i=t?this.externalToInternalIntersectOptions(t):this._defaultToMapOptions,r=m(i.graphics)&&(m(i.graphics.include)||m(i.graphics.exclude)),s=Je(e)?Ke(this,e):e,n=T(s);i.enableDraped=i.include&&!i.include.has(Be)||i.exclude&&i.exclude.has(Be);const a=this.sceneIntersectionHelper,o=Ae(this.state.viewingMode);if(o.options.selectionMode=!0,o.options.store=r?We.ALL:We.MIN,a.intersectIntersectorScreen(n,o,i),r){for(const e of o.results.all){const t=qe(e,this);if(g(t))return this._intersectResultToMapPoint(e);if("graphic"!==t.type||this._testGraphicUidFilter(i.graphics,t.graphic))return this._intersectResultToMapPoint(e)}return null}return this._intersectResultToMapPoint(o.results.min)}toScreen(e){if(!this.ready)return ot.error("#toScreen()","Scene view cannot be used before it is ready"),null;const t=f(null==e.z&&Me(this.elevationProvider,e),0);return D(e,ut,this.renderSpatialReference,t),this.state.camera.projectToScreen(ut,gt),C(gt[0],gt[1])}pixelSizeAt(e){return this.ready?e?(D(e,ut,this.renderSpatialReference),this.state.camera.computeScreenPixelSizeAt(ut)):0:(ot.error("#pixelSizeAt()","Scene view cannot be used before it is ready"),null)}overlayPixelSizeInMapUnits(e){const t=this.basemapTerrain.overlayManager;return t?t.overlayPixelSizeInMapUnits(e):1}hitTest(e,t){if(!this.ready)return ot.error("#hitTest()","Scene view cannot be used before it is ready"),null;const i=Je(e)?Ke(this,e):e,r=x(i.x,i.y),s=t?this.externalToInternalIntersectOptions(t):this._defaultHitTestOptions;s.requiresGroundFeedback=!0,s.enableDraped=!0;const n=Ae(this.state.viewingMode);n.options.selectionMode=!0,n.options.store=We.ALL,this.sceneIntersectionHelper.intersectIntersectorScreen(r,n,s);const a=this._intersectResultsToHits(n.results.all,s.graphics),o=n.results.ground,l=ze(o,this),p=m(l)&&"type"in l&&"integrated-mesh"===l.type?l:null,h={screenPoint:i,results:a,ground:{mapPoint:this._intersectResultToMapPoint(o),distance:ke(o)?o.distanceInRenderSpace:0,layer:p}};return be.SCENEVIEW_HITTEST_RETURN_INTERSECTOR&&(h.intersector=n),Promise.resolve(h)}async popupHitTest(e){const{results:t,ground:i}=await Ne(this,e);let r=null;return!(0===t.length||Math.abs(f(t[0].distance,0)-i.distance)<1e-5)||i.layer&&"integrated-mesh"===i.layer.type||(r=i.mapPoint),{results:t,screenPoint:e,mapPoint:r}}goTo(e,t){return this.updatingHandles.addPromise(this.stateManager.goTo(e,t))}async whenAnalysisView(e){if(await this.whenReady(),g(e.parent))throw new a("view:no-analysisview-for-analysis","The analysis has not been added to view.analyses",{analysis:e});if("line-of-sight"===e.parent.type){return(await this.whenLayerView(e.parent)).whenAnalysisView()}return this.analysisViewManager.whenAnalysisView(e)}whenLayerView(e){return super.whenLayerView(e)}async takeScreenshot(e){const t=this._completeSettings(e);await this.whenReady();const i=await this._stage.renderView.takeScreenshot(t);return $e(i,t,this._pixelFormat())}async _takeScreenshot(e){const t=this._completeSettings(e);await this.whenReady();const i=await this._stage.renderView.takeScreenshot(t);return Xe(i,this._pixelFormat())}_completeSettings(e){const t=Ye(e,this);return t.pixelRatio/=this.state.pixelRatio,Ze(t,this.supersampleScreenshotsEnabled,this.padding)}_pixelFormat(){return{flipY:!0,premultipliedAlpha:this._stage.renderView.getAlpha()}}get test(){return{takeScreenshot:e=>this._takeScreenshot(e)}}addUpdatingPromise(e){return this.updatingHandles.addPromise(e)}importLayerView(e){return oe.importLayerView(e)}hasLayerViewModule(e){return oe.hasLayerViewModule(e)}forceDOMReadyCycle(){this.forceReadyCycle()}getDefaultSpatialReference(){return this.map&&"initialViewProperties"in this.map&&this.map?.initialViewProperties?.spatialReference||this.defaultsFromMap?.spatialReference||this.defaultsFromMap?.ready&&this._initialDefaultSpatialReference||null}async validate(){let e=tt(this.type);if(h("safari")&&h("safari")<9&&(e=new a("sceneview:browser-not-supported","This browser is not supported by SceneView (Safari < 9)",{type:"safari",requiredVersion:9,detectedVersion:h("safari")})),m(e))throw ot.warn("#validate()",e.message),e}get _predeterminedViewingMode(){const e=this._isOverridden("viewingMode")?this._get("viewingMode"):(this.map&&"initialViewProperties"in this.map?this.map.initialViewProperties?.viewingMode:null)??null;return m(e)?ae(e):null}getSpatialReferenceSupport({spatialReference:e,layer:t}){const i=this._predeterminedViewingMode;if(m(i))return this._validateSpatialReferenceForViewingMode(e,t,i)?{constraints:this._makeSpatialReferenceConstraints(e,t,i)}:null;const r=this._validateSpatialReferenceForViewingMode(e,t,se.Local),s=this._validateSpatialReferenceForViewingMode(e,t,se.Global);return r||s?r&&s?{constraints:this._makeSpatialReferenceConstraints(e,t,null)}:r?{constraints:this._makeSpatialReferenceConstraints(e,t,se.Local)}:{constraints:this._makeSpatialReferenceConstraints(e,t,se.Global)}:null}_validateSpatialReferenceForViewingMode(e,t,i){return!!et(e,i)&&(!!g(t)||(!!$(t)||(!X(t)||!g(Ge(t,e,i)))&&(!Y(t)||i!==se.Global)))}_makeSpatialReferenceConstraints(e,t,i){if(g(t))return[{spatialReference:e,viewingMode:i}];const r=e.isWebMercator,s=e.isWGS84;if($(t)&&(r||s)){return!s||i===se.Local||null===He(t.tileInfo,t.fullExtent,e,se.Global)?[{spatialReference:e,viewingMode:i},{spatialReference:nt.WebMercator,viewingMode:i}]:[{spatialReference:r?nt.WGS84:nt.WebMercator,viewingMode:i}]}return X(t)||Y(t)||!r&&!s?X(t)&&r&&i!==se.Global?[{spatialReference:e,viewingMode:i},{spatialReference:nt.WGS84,viewingMode:se.Local}]:[{spatialReference:e,viewingMode:i}]:[{spatialReference:e,viewingMode:i},{spatialReference:r?nt.WGS84:nt.WebMercator,viewingMode:i}]}_validateSpatialReference(e){const t=m(this.getSpatialReferenceSupport({spatialReference:e})),i=this._predeterminedViewingMode;return t||(m(i)?ot.warnOnce(`Spatial reference defined on view not supported in ${ne(i)} viewing mode.`):e.isGeographic&&ot.warnOnce("Spatial reference is geographic but not supported.")),t}whenReady(){return new Promise((e=>{this.ready?e(this):this._resolveWhenReady.push(e)}))}computeMapPointFromVec3d(e,t){let i=this.spatialReference||nt.WGS84;return W(e,this.renderSpatialReference,e,i)||(i=nt.WGS84,W(e,this.renderSpatialReference,e,i)),t?(t.x=e[0],t.y=e[1],t.z=e[2],t.spatialReference=i):t=new at(e,i),t}trackGraphicState(e){if(!e.graphic)return ot.error("trackGraphicState","GraphicState.graphic must not be null or undefined to start tracking"),null;const t=this.getViewForGraphic(e.graphic);let i=null,r=!1;const s=t=>{!r&&m(t)&&"processor"in t&&"graphics-3d"===t.processor?.type&&t.processor.graphicsCore&&(i=t.processor.graphicsCore.trackGraphicState(e))};return m(t)?s(t):this.whenViewForGraphic(e.graphic,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,m(i)&&(i.remove(),i=null)}}}highlight(e){if(Array.isArray(e))return l(e.map((e=>this.highlight(e))));if(s.isCollection(e))return l(e.toArray().map((e=>this.highlight(e))));const t=this.getViewForGraphic(e);return t&&"highlight"in t?t.highlight(e):p()}maskOccludee(e){if(!e)return ot.error("maskOccludee","GraphicState.graphic must not be null or undefined to mask an occludee"),null;const t=this.getViewForGraphic(e);let i=null,r=!1;const s=t=>{!r&&m(t)&&Qe(t)&&(i=t.maskOccludee(e))};return m(t)?s(t):this.whenViewForGraphic(e,{waitForLayer:!0}).then((e=>s(e)),(()=>{})).catch((()=>{})),{remove:()=>{r=!0,m(i)&&(i.remove(),i=null)}}}getViewForGraphic(e){return e.layer===this.graphics?this.graphicsView:e.layer?this.allLayerViews.find((t=>t.layer===e.layer)):null}graphicChanged(e){m(this.graphicsView)&&this.graphicsView.graphicChanged(e)}async whenViewForGraphic(e,t){if(e.layer===this)return await M((()=>this.graphicsView)),this.graphicsView;if(!e.layer||!this.map)throw new a("no-view-for-graphic");return t&&t.waitForLayer&&!this.map.allLayers.includes(e.layer)?new Promise(((t,i)=>{const r=this.map.allLayers.on("change",(s=>{s.added.includes(e.layer)&&(r.remove(),this.whenLayerView(e.layer).then(t,i))}))})):this.whenLayerView(e.layer)}externalToInternalIntersectOptions(e){const t=this._externalToInternalRenderItems(e.include,ct.INCLUDE),i=this._externalToInternalRenderItems(e.exclude,ct.EXCLUDE);return{include:t.layerUids,exclude:i.layerUids,graphics:{include:t.graphicUids,exclude:i.graphicUids}}}_intersectResultToMapPoint(e,t){return e.getIntersectionPoint(ut)?(t=this.computeMapPointFromVec3d(ut,t),e.intersector===Fe.TERRAIN&&this.basemapTerrain&&(t.z=f(Me(this.basemapTerrain,t),0)),t):null}_intersectResultsToHits(e,t){const i=new Array;let r=null;for(let s=0;s<e.length;s++){const n=e[s],a=ze(n,this);if(m(a)&&(a===this.map.ground||"type"in a&&"integrated-mesh"===a.type))break;const o=qe(n,this);if(g(o))continue;if("graphic"===o.type){if(g(r)&&s!==e.length-1&&(r=new Set),m(r)){const e=this._getGraphicFilterUid(o.graphic);if(r.has(e))continue;r.add(e)}if(!this._testGraphicUidFilter(t,o.graphic))continue}const l=this._intersectResultToMapPoint(n),p=n.distanceInRenderSpace;i.push({...o,mapPoint:l,distance:p})}return i}_getGraphicFilterUid(e){if(e.layer&&"objectIdField"in e.layer){const t=e.attributes[e.layer.objectIdField];if(t)return`o-${e.layer.id}-${t}`}return`u-${e.uid}`}_testGraphicUidFilter(e,t){const i=this._getGraphicFilterUid(t);return g(e)||(g(e.include)||e.include.has(i))&&(g(e.exclude)||!e.exclude.has(i))}_externalToInternalRenderItems(e,t,r={layerUids:null,graphicUids:null}){if(!e)return r;if(e instanceof i)ht(r,this._getGraphicFilterUid(e)),t===ct.INCLUDE&&(m(this.graphicsView)&&e.layer===this?pt(r,this.graphicsView.processor.layer.id):e.layer&&pt(r,e.layer.uid));else if(d(e))for(const i of e)i===this.graphics&&m(this.graphicsView)?pt(r,this.graphicsView.processor.layer.id):i===this.map.ground?pt(r,Be):this._externalToInternalRenderItems(i,t,r);else"uid"in e&&pt(r,e.uid);return r}_initBasemapTerrain(){this._set("basemapTerrain",new Ie({view:this})),this._set("elevationProvider",new _e({view:this})),this.elevationProvider.register("ground",this.basemapTerrain)}_exitBasemapTerrain(){this.basemapTerrain&&(this.elevationProvider.unregister(this.basemapTerrain),this.elevationProvider.destroy(),this._set("elevationProvider",null),this.basemapTerrain.destroy(),this._set("basemapTerrain",null))}_initGlobe(){this._initCoordinateSystem(),this.state.createInitialCamera(),this._initBasemapTerrain(),this._set("pointsOfInterest",new Pe({view:this})),this._set("featureTiles",new fe({renderCoordsHelper:this.renderCoordsHelper,cameraOnSurface:this.pointsOfInterest.contentCameraOnSurface,focus:this.pointsOfInterest.focus,tilingSchemeOwner:this.basemapTerrain,viewState:this.state,scheduler:this._resourceController.scheduler,terrain:this.basemapTerrain}));const e=()=>{const e=this.basemapTerrain?.extent;if(this.clippingArea||e)if(e&&this.basemapTerrain.spatialReference){const e=m(this.basemapTerrain.extent)?A(q(this.basemapTerrain.extent,this.basemapTerrain.spatialReference),this.spatialReference):null;m(this.clippingArea)?this.featureTiles.filterExtent=this.clippingArea.intersection(e):this.featureTiles.filterExtent=e}else this.featureTiles.filterExtent=this.clippingArea;else this.featureTiles.filterExtent=null};this.handles.add([this.updatingHandles.add((()=>be.FEATURE_TILE_TREE_SHOW_TILES),(e=>{e&&this.featureTiles&&!this.featureTreeDebugger?this.updatingHandles.addPromise(import("./3d/layers/support/FeatureTileTree3DDebugger.js")).then((({FeatureTileTree3DDebugger:e})=>{!this.featureTreeDebugger&&be.FEATURE_TILE_TREE_SHOW_TILES&&(this.featureTreeDebugger=new e({view:this}))})):e||!this.featureTreeDebugger||be.FEATURE_TILE_TREE_SHOW_TILES||(this.featureTreeDebugger.destroy(),this.featureTreeDebugger=null)}),S),this.updatingHandles.add((()=>this.clippingArea),e,S),this.updatingHandles.add((()=>this.basemapTerrain.extent),e,S)],"feature-tiles"),this.stateManager.init()}_exitGlobe(){this.state&&(this.stateManager.deinit(),this.handles.remove("render-coords-helper"),this.handles.remove("feature-tiles"),this.featureTiles.destroy(),this._set("featureTiles",null),this.pointsOfInterest.destroy(),this._set("pointsOfInterest",null),this._exitBasemapTerrain(),this.state.exit(),this._exitCoordinateSystem())}_initCoordinateSystem(){if(this.spatialReference){const e=this.spatialReference;this.mapCoordsHelper&&this.mapCoordsHelper.spatialReference.equals(e)||this._set("mapCoordsHelper",new Ve(this.map,e));const t=this.state.isGlobal,i=N(t,e);i!==this.renderSpatialReference&&(this._set("renderCoordsHelper",xe.create(this.state.viewingMode,i)),t||this.handles.add(_((()=>this.basemapTerrain?.extent),(e=>{const t=this.renderCoordsHelper.spatialReference;e&&(0!==e[0]||0!==e[1]||0!==e[2]||0!==e[3])&&F(e,this.basemapTerrain.spatialReference,mt,t)&&(this.renderCoordsHelper.extent=mt)}),R),"render-coords-helper"),this.sceneIntersectionHelper&&this.sceneIntersectionHelper.setTolerance(De/this.renderCoordsHelper.unitInMeters))}else this._set("mapCoordsHelper",null),this._set("renderCoordsHelper",null)}_exitCoordinateSystem(){this.mapCoordsHelper&&(this.handles.remove("render-coords-helper"),this._set("renderCoordsHelper",null),this._set("mapCoordsHelper",null))}_updatingChanged(){this.notifyChange("updating")}_updateUpdatingMonitors(e=null){m(e)&&e.type===y.MOVE||(this.handles.remove("updatingMonitors"),this.allLayerViews.forEach((e=>{e.destroyed||(this.handles.add(_((()=>[e.updating,e.updatingProgress]),(()=>this._updatingChanged()),R),"updatingMonitors"),e.when((()=>this._updatingChanged()),(()=>this._updatingChanged())))})),this._updatingChanged())}_renderScreenshotOverlay(e,t){if(!this.overlay||!this.overlay.hasVisibleItems)return t;const i=e.getContext("2d");return i.putImageData(t,0,0),this.overlay.renderCanvas(e),i.getImageData(0,0,t.width,t.height)}_initStage(){const e={deactivatedWebGLExtensions:this.deactivatedWebGLExtensions,debugWebGLExtensions:this.debugWebGLExtensions,alpha:this.alphaCompositingEnabled,preserveDrawingBuffer:this.preserveDrawingBufferEnabled,canvas:this.renderCanvas,screenshot:{renderOverlay:(e,t)=>this._renderScreenshotOverlay(e,t)}},t=new ve(this.state.viewingMode,(e=>this._stage.layers.forAll(e)),this);this._set("sceneIntersectionHelper",t);const i=n(this.surface),{resourceController:r,state:s,renderSpatialReference:l}=this;this._stage=new Ue({options:e,container:i,resourceController:r,state:s,sceneIntersectionHelper:t,renderSR:l}),this._stage.renderView.setRenderParameters({slicePlane:this.slicePlane}),this._lostWebGLContextHandle=o(this._stage.renderView.canvas,"webglcontextlost",(()=>this.fatalError=new a("webgl-context-lost"))),this.handles.add([this.updatingHandles.add((()=>this.qualitySettings.antialiasingEnabled),(()=>this._stage.renderView.setRenderParameters({antialiasingEnabled:this.qualitySettings.antialiasingEnabled})),b),this.updatingHandles.add((()=>this.qualitySettings.highQualityTransparency),(()=>this._stage.renderView.setRenderParameters({highQualityTransparency:this.qualitySettings.highQualityTransparency})),b),_((()=>this.magnifier),(e=>this._stage.renderView.magnifier=e),S)],"stage");const p=()=>{this._stage.renderView.setRenderParameters({defaultHighlightOptions:Re.toEngineOptions(this.highlightOptions)})};this.handles.add(this.updatingHandles.add((()=>[this.highlightOptions.color,this.highlightOptions.haloColor,this.highlightOptions.haloOpacity,this.highlightOptions.fillOpacity,this.highlightOptions.shadowOpacity,this.highlightOptions.shadowColor,this.highlightOptions.shadowDifference]),p),"stage"),p(),this.renderCoordsHelper&&this.sceneIntersectionHelper.setTolerance(De/this.renderCoordsHelper.unitInMeters),this._set("canvas",this._stage.renderView.canvas)}_exitStage(){this._set("sceneIntersectionHelper",null),this._stage.destroy(),this._stage=null,this._lostWebGLContextHandle.remove(),this._lostWebGLContextHandle=null,this.handles.remove("stage"),this._set("canvas",null)}_initSurface(e){this._exitSurface(),this.state.init(e,this.spatialReference),this._initStage(),this._initGlobe(),this.sharedSymbolResources=new je({view:this,viewingMode:e,resourceController:this._resourceController,pointsOfInterest:this.pointsOfInterest,viewState:this.state,objectResourceCache:new me})}_exitSurface(){this.sharedSymbolResources&&(this.sharedSymbolResources.objectResourceCache.destroy(),this.sharedSymbolResources.destroy(),this.sharedSymbolResources=null,this._exitGlobe(),this._exitStage())}_createGraphicsViewIfNeeded(){if(this.graphicsView||this._createGraphicsViewController)return;if(0===this.graphics.length)return;this.handles.remove("graphics-view"),this._createGraphicsViewController=new AbortController;const e=()=>{this._createGraphicsViewController=null,this._updatingChanged()};this._createGraphicsViewAsync(this._createGraphicsViewController.signal).then(e,e),this._updatingChanged()}async _createGraphicsViewAsync(e){const t=(await import("./3d/layers/GraphicsView3D.js")).default;w(e),await M((()=>this.basemapTerrain?.ready),e),this._set("graphicsView",new t({view:this}))}_disposeGraphicsView(){this._createGraphicsViewController&&(this._createGraphicsViewController.abort(),this._createGraphicsViewController=null),this.handles.remove("graphics-view"),m(this.graphicsView)&&(this.handles.remove(this.graphicsView.processor.layer.id),this.graphicsView.destroy(),this._set("graphicsView",null))}_startup(){const e=ae(this.viewingMode);if(e===se.Global&&(this._clippingArea=null),this._initSurface(e),this._set("ready",!0),this.handles.add(v((()=>this.graphics),"after-changes",(()=>this._createGraphicsViewIfNeeded())),"graphics-view"),this._createGraphicsViewIfNeeded(),!this._externallySet.environment){const e=this.get("map.initialViewProperties.environment");e&&(this.environment=e)}this.labeler.setup(),this.environmentManager.connectView(this),this.inputManager.connect();const t=this._resolveWhenReady;this._resolveWhenReady=[],t.forEach((e=>e(this)))}_teardown(){this._initialDefaultSpatialReference=null,this.inputManager.disconnect(),this.environmentManager.disconnectView(),this.labeler.dispose(),this._disposeGraphicsView(),this.handles.remove("graphics-view"),this._exitSurface(),this._set("ready",!1)}_updateDefaultToMapOptions(){if(this._defaultToMapOptions.include.clear(),this.map){this.map.ground&&this._defaultToMapOptions.include.add(Be);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&this._defaultToMapOptions.include.add(e.uid)}}_updateDefaultHitTestOptions(){if(this._defaultHitTestOptions.exclude.clear(),this.map){this.map.ground&&this.map.ground.opacity<1&&this._defaultHitTestOptions.exclude.add(Be);for(const e of this.map.allLayers.items)"integrated-mesh"===e.type&&e.opacity<1&&this._defaultToMapOptions.exclude.add(e.uid)}}addVoxelLayerViewToWasm(e){return g(this.voxelWasm)?(g(this.voxelWasmPromise)&&(this.voxelWasmPromise=import("../layers/VoxelWasmPerSceneView.js").then((e=>(this.voxelWasm=new e.default(this),this.voxelWasm)))),this.voxelWasmPromise.then((t=>t.addVoxelLayer(e)))):this.voxelWasm.addVoxelLayer(e)}removeVoxelLayerViewFromWasm(e){if(m(this.voxelWasm)){this.voxelWasm.removeVoxelLayer(e)<1&&(this.voxelWasm=null,this.voxelWasmPromise=null)}}};function pt(e,t){e.layerUids||(e.layerUids=new Set),e.layerUids.add(t)}function ht(e,t){e.graphicUids||(e.graphicUids=new Set),e.graphicUids.add(t)}function dt(e,t){return m(e)&&U(e.spatialReference,t)?A(e,t):null}var ct;lt.type="3d",e([E()],lt.prototype,"_userClippingArea",void 0),e([E()],lt.prototype,"_resourceController",void 0),e([E()],lt.prototype,"_stage",void 0),e([E({readOnly:!0})],lt.prototype,"deconflictor",void 0),e([E({readOnly:!0})],lt.prototype,"labeler",void 0),e([E(G(Z,"analyses"))],lt.prototype,"analyses",void 0),e([E({type:re,readOnly:!0,aliasOf:"state.animation"})],lt.prototype,"animation",void 0),e([E({readOnly:!0})],lt.prototype,"basemapTerrain",void 0),e([E({readOnly:!0})],lt.prototype,"elevationProvider",void 0),e([E({type:t,aliasOf:"stateManager.camera"})],lt.prototype,"camera",void 0),e([E({type:t,aliasOf:"stateManager.contentCamera"})],lt.prototype,"contentCamera",void 0),e([E({readOnly:!0})],lt.prototype,"canvas",void 0),e([E({type:at,aliasOf:"stateManager.center"})],lt.prototype,"center",void 0),e([E({type:st})],lt.prototype,"clippingArea",null),e([E({type:pe})],lt.prototype,"constraints",void 0),e([E({type:st,readOnly:!0})],lt.prototype,"renderDataExtent",null),e([E({type:st,readOnly:!0})],lt.prototype,"dataExtent",null),e([E({type:st,readOnly:!0})],lt.prototype,"groundAndLayersExtent",null),e([E({value:null,type:he})],lt.prototype,"environment",null),e([j("environment")],lt.prototype,"castEnvironment",null),e([E({readOnly:!0})],lt.prototype,"environmentManager",void 0),e([E({type:st,aliasOf:"stateManager.extent"})],lt.prototype,"extent",void 0),e([E()],lt.prototype,"floors",void 0),e([E({readOnly:!0,aliasOf:"stateManager.screenCenter"})],lt.prototype,"screenCenter",void 0),e([E({aliasOf:"stateManager.frustum"})],lt.prototype,"frustum",void 0),e([E({type:Number,readOnly:!0})],lt.prototype,"fullOpacity",void 0),e([E({readOnly:!0})],lt.prototype,"graphicsView",void 0),e([E({readOnly:!0})],lt.prototype,"analysisViewManager",void 0),e([E()],lt.prototype,"groundView",void 0),e([E({type:Boolean})],lt.prototype,"initialExtentRequired",null),e([E()],lt.prototype,"_defaultsFromMapSettings",null),e([E({type:Boolean,readOnly:!0})],lt.prototype,"interacting",null),e([E()],lt.prototype,"stationary",null),e([E({aliasOf:"state.navigating"})],lt.prototype,"navigating",void 0),e([E()],lt.prototype,"map",void 0),e([E({readOnly:!0})],lt.prototype,"mapCoordsHelper",void 0),e([E({aliasOf:"stateManager.padding"})],lt.prototype,"padding",void 0),e([E({type:Pe,readOnly:!0})],lt.prototype,"pointsOfInterest",void 0),e([E({type:fe,readOnly:!0})],lt.prototype,"featureTiles",void 0),e([E()],lt.prototype,"featureTreeDebugger",void 0),e([E({type:Boolean})],lt.prototype,"screenSizePerspectiveEnabled",void 0),e([E({constructOnly:!0})],lt.prototype,"deactivatedWebGLExtensions",void 0),e([E({constructOnly:!0})],lt.prototype,"debugWebGLExtensions",void 0),e([E({constructOnly:!0})],lt.prototype,"renderCanvas",void 0),e([E({constructOnly:!0})],lt.prototype,"state",void 0),e([E({readOnly:!0})],lt.prototype,"inputManager",void 0),e([E({readOnly:!0})],lt.prototype,"stateManager",void 0),e([E({type:["low","medium","high"]})],lt.prototype,"qualityProfile",null),e([E({type:Ce,get(){let e=this._get("qualitySettings");return e||(e=new Ce,Se.apply(this.qualityProfile,e)),e}})],lt.prototype,"qualitySettings",void 0),e([E()],lt.prototype,"slicePlane",null),e([E({readOnly:!0})],lt.prototype,"typeSpecificPreconditionsReady",null),e([E({readOnly:!0})],lt.prototype,"renderCoordsHelper",void 0),e([E({readOnly:!0})],lt.prototype,"sceneIntersectionHelper",void 0),e([E({type:Number,dependsOn:["scale","spatialReference"],readOnly:!0})],lt.prototype,"resolution",null),e([E({type:Number,aliasOf:"stateManager.scale"})],lt.prototype,"scale",void 0),e([E()],lt.prototype,"heightModelInfo",null),e([E()],lt.prototype,"spatialReference",void 0),e([E({type:Boolean,constructOnly:!0})],lt.prototype,"alphaCompositingEnabled",void 0),e([E({constructOnly:!0})],lt.prototype,"preserveDrawingBufferEnabled",void 0),e([E({type:Boolean})],lt.prototype,"supersampleScreenshotsEnabled",void 0),e([E({readOnly:!0})],lt.prototype,"type",void 0),e([E({type:it})],lt.prototype,"ui",void 0),e([E({type:Boolean,readOnly:!0,dependsOn:["graphicsView.updating","basemapView.updating","basemapTerrain.updating","layerViewManager.updating","layerViewManager.updatingRemaining","_resourceController.updating","_stage.updating","featureTiles.updating","pointsOfInterest.updating","environmentManager.updating","overlay.updating","updatingHandles.updating","featureTreeDebugger.updating","labeler.updating","deconflictor.updating","ready","stationary","inputManager.hasPendingInputs","toolViewManager.updating","analysisViewManager.updating"]})],lt.prototype,"updating",null),e([E({type:Number,readOnly:!0,dependsOn:["updating"]})],lt.prototype,"updatingProgress",void 0),e([E({type:["global","local"]})],lt.prototype,"viewingMode",null),e([E({type:r,aliasOf:"stateManager.viewpoint"})],lt.prototype,"viewpoint",void 0),e([E({type:Number,aliasOf:"stateManager.zoom"})],lt.prototype,"zoom",void 0),e([E({type:Re})],lt.prototype,"highlightOptions",void 0),lt=e([P("esri.views.SceneView")],lt),function(e){e[e.INCLUDE=0]="INCLUDE",e[e.EXCLUDE=1]="EXCLUDE"}(ct||(ct={}));const ut=L(),gt=x(),mt=k(),ft=lt;export{ft 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{isSome as o,removeMaybe as t,isNone as i}from"../../core/maybe.js";import{createTask as e,onAbort as n}from"../../core/promiseUtils.js";import{watch as r,whenOnce as s,syncAndInitial as a}from"../../core/reactiveUtils.js";function l(i,r,a){const l=o(i.tool)?i.tool:m(i,r);i.view.activeTool=l;let c=n(a,(()=>v(i,r)));return e((async o=>{await s((()=>!l.active),o),c=t(c),v(i,r)}),a)}function c(o,t){return r((()=>o.interactive),(()=>v(o,t)),a)}function v(o,t){o.interactive?m(o,t):u(o)}function m(o,t){u(o);const{view:i,analysis:e,visible:n}=o,r=new t({view:i,analysis:e,analysisViewData:o,visible:n});return o.tool=r,i.tools.add(r),r}function u(o){const{view:t,tool:e}=o;i(e)||(t.tools.remove(e),o.tool=null)}export{l as activateTemporaryAnalysisViewTool,c as connectAnalysisViewToTool,m as createAnalysisViewTool,u as removeAnalysisViewTool};
5
+ import{removeMaybe as o,isNone as t}from"../../core/maybe.js";import{createTask as i,onAbort as e}from"../../core/promiseUtils.js";import{watch as n,whenOnce as r,syncAndInitial as s}from"../../core/reactiveUtils.js";function a(t,n,s){const a=v(t,n);t.view.activeTool=a;let c=e(s,(()=>l(t,n)));return i((async i=>{await r((()=>!a.active),i),c=o(c),l(t,n)}),s)}function c(o,t){return n((()=>o.interactive),(()=>l(o,t)),s)}function l(o,t){o.interactive?v(o,t):m(o)}function v(o,t){m(o);const{view:i,analysis:e,visible:n}=o,r=new t({view:i,analysis:e,analysisViewData:o,visible:n});return o.tool=r,i.tools.add(r),r}function m(o){const{view:i,tool:e}=o;t(e)||(i.tools.remove(e),o.tool=null)}export{a as activateTemporaryAnalysisViewTool,c as connectAnalysisViewToTool,m as removeAnalysisViewTool};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import i from"../../core/Handles.js";import{isSome as s,isNone as r,unwrapOr as o,abortMaybe as n}from"../../core/maybe.js";import{debounce as a,ignoreAbortErrors as p}from"../../core/promiseUtils.js";import{createScreenPointArray as h}from"../../core/screenUtils.js";import{property as d}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../layers/GraphicsLayer.js";import{makeDehydratedPoint as _}from"../../layers/graphics/dehydratedFeatures.js";import{ViewingMode as m}from"../ViewingMode.js";import{SnappingVisualizer2D as y}from"../2d/interactive/SnappingVisualizer2D.js";import{createCoordinateHelper as u}from"../interactive/coordinateHelper.js";import{EditGeometry as g,Component as v}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as f}from"../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as x}from"../interactive/snapping/SnappingContext.js";var w;let G=w=class extends t.EventedAccessor{constructor(e){super(e),this._hasZ=null,this._cursorScreenPoint=null,this._activePointerId=null,this._snappingAbortController=null,this._stagedVertex=null,this._stagedVertexUnsnapped=null,this._lastVertexUnsnapped=null,this._handles=new i,this._viewHandlesKey="view-handles",this._undoRedoHandlesKey="undo-redo-handles",this._drawToolHandlesKey="draw-tool",this._nativeEventHistory={undoStack:[],redoStack:[]},this.interactiveUndoDisabled=!1,this.history=[],this.redoHistory=[],this.snapToScene=!1,this.view=null,this.elevationInfo=null,this.defaultZ=0,this._snap=a((async({snappingManager:e,point:t,updated:i},s)=>{const r=await e.snap(t,this._snappingContext,s);r.valid&&(this._stagedVertex=r.apply(),this._lastSnapPoint!==t&&(this._stagedVertex=e.update(t,this._snappingContext)),this.notifyChange("vertices"),i())})),this._coordinateHelper=u(e.hasZ,!1,e.view.spatialReference),this._snappingManager=e.snappingManager,this._editGeometryOperations=new f(new g(e.editGeometryType??"polygon",this._coordinateHelper,m.Local)),this._snappingGraphicsLayer=new c({id:w.SNAPPING_GRAPHICS_LAYER_ID,listMode:"hide",internal:!0}),this._snappingContext=new x({editGeometryOperations:this._editGeometryOperations,elevationInfo:{mode:"on-the-ground",offset:0},pointer:"mouse",visualizer:new y(this._snappingGraphicsLayer)}),this._activeComponent=new v(e.view.spatialReference,m.Local),this._editGeometryOperations.data.components.push(this._activeComponent)}normalizeCtorArgs(e){const t={...e};return delete t.editGeometryType,t}initialize(){"2d"===this.view.type&&this.view.map.layers.add(this._snappingGraphicsLayer)}destroy(){this._handles.destroy(),this._abortSnapping(),this.view.map.layers.remove(this._snappingGraphicsLayer),this._snappingGraphicsLayer.destroy(),s(this._snappingManager)&&this._snappingManager.doneSnapping(),this._editGeometryOperations.destroy()}get _committedVertices(){return this._editGeometryOperations.data.components[0].vertices.map((e=>e.pos))}get vertices(){return s(this._stagedVertex)?[...this._committedVertices,this._coordinateHelper.pointToArray(this._stagedVertex)]:this._committedVertices}get hasZ(){return s(this._hasZ)?this._hasZ:"3d"===this.view.type}set hasZ(e){this._hasZ=e,this.notifyChange("hasZ")}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this.canUndo&&this._editGeometryOperations.undo()}redo(){this.canRedo&&this._editGeometryOperations.redo()}getCoordsFromScreenPoint(e){const t=this.screenToMap(e);return r(t)?null:t.hasZ?[t.x,t.y,t.z]:[t.x,t.y]}getCoordsAndPointFromScreenPoint(e){const t=this.screenToMap(e);return r(t)?null:t.hasZ?{vertex:[t.x,t.y,t.z],mapPoint:t}:{vertex:[t.x,t.y],mapPoint:t}}screenToMap(e){let t=null;if("3d"===this.view.type)if(this.hasZ){const i=o(this.elevationInfo,V);t=this.view.sceneIntersectionHelper.intersectElevationFromScreen(h(e.x,e.y),i,this._getGeometryZValue())}else{const i=o(this.elevationInfo,C);t=this.view.sceneIntersectionHelper.intersectElevationFromScreen(h(e.x,e.y),i,0),s(t)&&(t.z=void 0)}else t=this.view.toMap(e),s(t)&&(t.z=this.hasZ?this._getGeometryZValue():void 0);return t}_pushCursorVertex(e,t){const i=_(e[0],e[1],null,this.view.spatialReference);this._stagedVertexUnsnapped=i;const s=this._snappingManager;if(r(s))return this._stagedVertex=i,this.notifyChange("vertices"),void t();this._lastSnapPoint=i,this._stagedVertex=s.update(i,this._snappingContext),this.notifyChange("vertices"),r(this._snappingAbortController)&&(this._snappingAbortController=new AbortController),p(this._snap({snappingManager:s,point:i,updated:t},this._snappingAbortController.signal))}_popCursorVertex(){this._stagedVertex=null,this._stagedVertexUnsnapped=null,this.notifyChange("vertices")}_getGeometryZValue(){return this.defaultZ}_abortSnapping(){this._snappingAbortController=n(this._snappingAbortController)}_isDuplicateOfLastVertex(e){const t=this._editGeometryOperations.data.components[0].getLastVertex();if(s(t)&&e[0]===t[0]&&e[1]===t[1])return!0;const{x:i,y:r}=this._coordinateHelper.vectorToDehydratedPoint(e);return!(!s(this._lastVertexUnsnapped)||i!==this._lastVertexUnsnapped.x||r!==this._lastVertexUnsnapped.y)}_shouldHandlePointerEvent(e){return this._isPrimaryPointerAction(e)&&(r(this._activePointerId)||this._activePointerId===e.pointerId)}_vertexAddHandler(e){const t=s(this._stagedVertex)?this._coordinateHelper.pointToArray(this._stagedVertex):this.getCoordsFromScreenPoint(this._cursorScreenPoint);s(t)&&this._addVertex(t,e.native)}_drawCompleteHandler(e){this._completeDrawing(e.native)}_isPrimaryPointerAction(e){return"mouse"!==e.pointerType||0===e.button}};G.SNAPPING_GRAPHICS_LAYER_ID="DrawAction-snapping-graphics-layer",e([d({readOnly:!0})],G.prototype,"vertices",null),e([d({type:Boolean,nonNullable:!0})],G.prototype,"interactiveUndoDisabled",void 0),e([d({readOnly:!0})],G.prototype,"history",void 0),e([d({readOnly:!0})],G.prototype,"redoHistory",void 0),e([d()],G.prototype,"snapToScene",void 0),e([d()],G.prototype,"view",void 0),e([d()],G.prototype,"elevationInfo",void 0),e([d({nonNullable:!0})],G.prototype,"defaultZ",void 0),e([d()],G.prototype,"hasZ",null),G=w=e([l("esri.views.draw.DrawAction")],G);const V={mode:"absolute-height",offset:0},C={mode:"on-the-ground",offset:0},P=G;export{P as default};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import i from"../../core/Handles.js";import{clone as r}from"../../core/lang.js";import{isSome as s,destroyMaybe as o,isNone as n,unwrapOr as a}from"../../core/maybe.js";import{ignoreAbortErrors as p}from"../../core/promiseUtils.js";import{createScreenPointArray as d}from"../../core/screenUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as l}from"../../core/accessorSupport/decorators/subclass.js";import c from"../../layers/GraphicsLayer.js";import{makeDehydratedPoint as m}from"../../layers/graphics/dehydratedFeatures.js";import{ViewingMode as _}from"../ViewingMode.js";import{SnappingVisualizer2D as y}from"../2d/interactive/SnappingVisualizer2D.js";import{createCoordinateHelper as u}from"../interactive/coordinateHelper.js";import{EditGeometry as g,Component as v}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as f}from"../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as x}from"../interactive/snapping/SnappingContext.js";import{SnappingOperation as w}from"../interactive/snapping/SnappingOperation.js";var G;let V=G=class extends t.EventedAccessor{constructor(e){super(e),this._hasZ=null,this._cursorScreenPoint=null,this._activePointerId=null,this._stagedVertexUnsnapped=null,this._lastVertexUnsnapped=null,this._handles=new i,this._viewHandlesKey="view-handles",this._undoRedoHandlesKey="undo-redo-handles",this._drawToolHandlesKey="draw-tool",this._nativeEventHistory={undoStack:[],redoStack:[]},this.interactiveUndoDisabled=!1,this.history=[],this.redoHistory=[],this.snapToScene=!1,this.view=null,this.elevationInfo=null,this.defaultZ=0,this._coordinateHelper=u(e.hasZ,!1,e.view.spatialReference),this._snappingManager=e.snappingManager,this._editGeometryOperations=new f(new g(e.editGeometryType??"polygon",this._coordinateHelper)),this._snappingGraphicsLayer=new c({id:G.SNAPPING_GRAPHICS_LAYER_ID,listMode:"hide",internal:!0}),this._snappingContext=new x({editGeometryOperations:this._editGeometryOperations,elevationInfo:{mode:"on-the-ground",offset:0},pointer:"mouse",visualizer:new y(this._snappingGraphicsLayer)}),this._activeComponent=new v(e.view.spatialReference,_.Local),this._editGeometryOperations.data.components.push(this._activeComponent)}normalizeCtorArgs(e){const t={...e};return delete t.editGeometryType,t}initialize(){this._snappingOperation=new w({view:this.view}),"2d"===this.view.type&&this.view.map.layers.add(this._snappingGraphicsLayer)}destroy(){this._handles.destroy(),this.view.map.layers.remove(this._snappingGraphicsLayer),this._snappingGraphicsLayer.destroy(),s(this._snappingManager)&&this._snappingManager.doneSnapping(),this._snappingOperation=o(this._snappingOperation),this._editGeometryOperations.destroy()}get _committedVertices(){return this._editGeometryOperations.data.components[0].vertices.map((e=>e.pos))}get vertices(){return s(this._stagedVertex)?[...this._committedVertices,this._coordinateHelper.pointToArray(this._stagedVertex)]:this._committedVertices}get hasZ(){return s(this._hasZ)?this._hasZ:"3d"===this.view.type}set hasZ(e){this._hasZ=e,this.notifyChange("hasZ")}get _stagedVertex(){return this._snappingOperation.stagedPoint}set _stagedVertex(e){this._snappingOperation.stagedPoint=r(e)}canUndo(){return this._editGeometryOperations.canUndo}canRedo(){return this._editGeometryOperations.canRedo}undo(){this.canUndo&&this._editGeometryOperations.undo()}redo(){this.canRedo&&this._editGeometryOperations.redo()}getCoordsFromScreenPoint(e){const t=this.screenToMap(e);return n(t)?null:t.hasZ?[t.x,t.y,t.z]:[t.x,t.y]}getCoordsAndPointFromScreenPoint(e){const t=this.screenToMap(e);return n(t)?null:t.hasZ?{vertex:[t.x,t.y,t.z],mapPoint:t}:{vertex:[t.x,t.y],mapPoint:t}}screenToMap(e){let t=null;if("3d"===this.view.type)if(this.hasZ){const i=a(this.elevationInfo,O);t=this.view.sceneIntersectionHelper.intersectElevationFromScreen(d(e.x,e.y),i,this._getGeometryZValue())}else{const i=a(this.elevationInfo,P);t=this.view.sceneIntersectionHelper.intersectElevationFromScreen(d(e.x,e.y),i,0),s(t)&&(t.z=void 0)}else t=this.view.toMap(e),s(t)&&(t.z=this.hasZ?this._getGeometryZValue():void 0);return t}_pushCursorVertex(e,t){const i=m(e[0],e[1],null,this.view.spatialReference);this._stagedVertexUnsnapped=i;const r=this._snappingManager;if(n(r))return this._stagedVertex=i,void t();p(this._snappingOperation.snap(i,r,this._snappingContext)).then((()=>{t()}))}_popCursorVertex(){this._stagedVertexUnsnapped=null,this._stagedVertex=null}_getGeometryZValue(){return this.defaultZ}_abortSnapping(){this._snappingOperation.abort()}_isDuplicateOfLastVertex(e){const t=this._editGeometryOperations.data.components[0].getLastVertex();if(s(t)&&e[0]===t[0]&&e[1]===t[1])return!0;const{x:i,y:r}=this._coordinateHelper.vectorToDehydratedPoint(e);return!(!s(this._lastVertexUnsnapped)||i!==this._lastVertexUnsnapped.x||r!==this._lastVertexUnsnapped.y)}_shouldHandlePointerEvent(e){return this._isPrimaryPointerAction(e)&&(n(this._activePointerId)||this._activePointerId===e.pointerId)}_vertexAddHandler(e){const t=s(this._stagedVertex)?this._coordinateHelper.pointToArray(this._stagedVertex):this.getCoordsFromScreenPoint(this._cursorScreenPoint);s(t)&&this._addVertex(t,e.native)}_drawCompleteHandler(e){this._completeDrawing(e.native)}_isPrimaryPointerAction(e){return"mouse"!==e.pointerType||0===e.button}};V.SNAPPING_GRAPHICS_LAYER_ID="DrawAction-snapping-graphics-layer",e([h({readOnly:!0})],V.prototype,"vertices",null),e([h({type:Boolean,nonNullable:!0})],V.prototype,"interactiveUndoDisabled",void 0),e([h({readOnly:!0})],V.prototype,"history",void 0),e([h({readOnly:!0})],V.prototype,"redoHistory",void 0),e([h()],V.prototype,"snapToScene",void 0),e([h()],V.prototype,"view",void 0),e([h()],V.prototype,"elevationInfo",void 0),e([h({nonNullable:!0})],V.prototype,"defaultZ",void 0),e([h()],V.prototype,"hasZ",null),e([h()],V.prototype,"_snappingOperation",void 0),e([h()],V.prototype,"_stagedVertex",null),V=G=e([l("esri.views.draw.DrawAction")],V);const O={mode:"absolute-height",offset:0},P={mode:"on-the-ground",offset:0},S=V;export{S 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.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Evented.js";import{HandleOwner as i}from"../../core/HandleOwner.js";import{clone as o}from"../../core/lang.js";import{isNone as n,isSome as r,destroyMaybe as s,removeMaybe as a,abortMaybe as p,unwrap as l,unwrapOr as h}from"../../core/maybe.js";import{debounce as c,ignoreAbortErrors as d}from"../../core/promiseUtils.js";import{createLength as g,createArea as m}from"../../core/quantityUtils.js";import{watch as u,syncAndInitial as _,initial as y}from"../../core/reactiveUtils.js";import{createScreenPoint as v}from"../../core/screenUtils.js";import{property as x}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as f}from"../../core/accessorSupport/decorators/subclass.js";import{pointEquals as b}from"../../layers/graphics/dehydratedFeatureComparison.js";import{ViewingMode as T}from"../ViewingMode.js";import{defaultDrawingMode as V}from"./DrawingMode.js";import{DrawManipulator as w}from"./DrawManipulator.js";import{createCoordinateHelper as S}from"../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as C}from"../interactive/dragEventPipeline.js";import{EditGeometry as M,Component as O}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as D}from"../interactive/editGeometry/EditGeometryOperations.js";import{SnappingContext as I}from"../interactive/snapping/SnappingContext.js";import{SnappingPipeline as E}from"../interactive/snapping/SnappingDragPipelineStep.js";import{DrawPolygonTooltipInfo as P,DrawPolylineTooltipInfo as k,DrawPointTooltipInfo as A}from"../interactive/tooltip/DrawTooltipInfos.js";import j from"../interactive/tooltip/NumericalFeedbackOptions.js";import{Tooltip as G}from"../interactive/tooltip/Tooltip.js";import{computeAreaWithStagedVertex as H,computeLengthWithStagedVertex as L}from"../interactive/tooltip/support/measurements.js";import{TaskPriority as Z,ImmediateTask as z}from"../support/Scheduler.js";let U=class extends(t.EventedMixin(i)){constructor(e){super(e),this._createOperationCompleted=!1,this._pointerDownStates=new Set,this._snappingPipeline=new E,this._snappingAbortController=null,this._tooltip=null,this._tooltipContext={calculateElevation:null,calculateTotalLength:null,calculateArea:null},this._stagedVertex=null,this.feedbackOptions=new j,this.snapToSceneEnabled=null,this._snap=c((async({snappingManager:e,mapPoint:t,context:i},o)=>{const n=await this._frameTask.schedule((()=>e.snap(t,i,o)),o);n.valid&&await this._frameTask.schedule((()=>{this.stagedVertex=n.apply(),t!==this._snapMapPoint&&(this.stagedVertex=e.update(this._snapMapPoint,i))}),o)})),n(e.elevationInfo)&&(this.elevationInfo={mode:e.hasZ?"absolute-height":"on-the-ground",offset:0})}initialize(){const{geometryType:e,view:t}=this,i="3d"===t.type?t?.resourceController?.scheduler:null;this._frameTask=i?i.registerTask(Z.SNAPPING):z;const{spatialReference:o}=t,n="viewingMode"in t.state?t.state.viewingMode:T.Local,a="segment"===e||"multipoint"===e?"polyline":e;this.coordinateHelper=S(this.hasZ,this.hasM,o),this._editGeometryOperations=new D(new M(a,this.coordinateHelper,n)),this._activeComponent=new O(o,n),this._editGeometryOperations.data.components.push(this._activeComponent);const p=this.segmentLabels;r(p)&&(p.context={view:t,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo},this.handles.add([u((()=>this._segmentLabelsEnabled),(e=>{p.visible=e}),_),this.on("cursor-update",(()=>{const e=this._activeComponent.getLastVertex(),t=this._stagedVertex;p.stagedEdge=r(e)&&r(t)?[e.pos,this.coordinateHelper.pointToVector(t)]:null}))])),this.handles.add(this._editGeometryOperations.on(["vertex-add","vertex-update","vertex-remove"],(e=>{const t=e.vertices.map((e=>({componentIndex:0,vertexIndex:e.index,coordinates:this.coordinateHelper.vectorToArray(e.pos)}))),i=t.map((e=>e.coordinates));switch(e.type){case"vertex-add":this.emit(e.type,{...e,added:i,vertices:t});break;case"vertex-update":this.emit(e.type,{...e,updated:i,vertices:t});break;case"vertex-remove":this.emit(e.type,{...e,removed:i,vertices:t})}}))),this._manipulator=new w({grabbableForEvent:e=>"click"!==this.drawingMode||"touch"===e.pointerType&&this._snappingEnabled&&1===this._pointerDownStates.size}),this.manipulators.add(this._manipulator),this._manipulator.grabbable="point"!==e,this.handles.add([this._createManipulatorDragPipeline(this._manipulator),this._manipulator.events.on("immediate-click",(e=>this._onImmediateClick(e))),this._manipulator.events.on("immediate-double-click",(e=>this._onImmediateDoubleClick(e))),u((()=>this._tooltipEnabled),(e=>{this._tooltip=e?new G({view:t,info:this._getTooltipInfo()}):s(this._tooltip)}),y)])}destroy(){s(this.segmentLabels),this._tooltip=s(this._tooltip),this._editGeometryOperations=s(this._editGeometryOperations),this._frameTask=a(this._frameTask)}get _snappingEnabled(){return r(this.snappingManager)&&this.snappingManager.options.effectiveEnabled}get _tooltipEnabled(){return this.feedbackOptions.tooltipEnabled}get _segmentLabelsEnabled(){return this.feedbackOptions.labelsEnabled}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activeComponent.vertices.map((e=>this.coordinateHelper.vectorToArray(e.pos)))}set drawingMode(e){this._set("drawingMode",e??V)}get hasStagedVertex(){return r(this._stagedVertex)}get interactive(){return this._manipulator.interactive}set interactive(e){this._manipulator.interactive=e}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activeComponent.vertices.length}get numVertices(){return r(this._stagedVertex)?this._activeComponent.vertices.length+1:this._activeComponent.vertices.length}get stagedVertex(){return this._stagedVertex}set stagedVertex(e){if(n(e))this.discardStagedVertex();else{if(n(this._stagedVertex))this._stagedVertex=o(e);else{if(b(this._stagedVertex,e))return;this._stagedVertex.x=e.x,this._stagedVertex.y=e.y,this._stagedVertex.z=e.z,this._stagedVertex.m=e.m,this._stagedVertex.hasZ=e.hasZ,this._stagedVertex.hasM=e.hasM,this._stagedVertex.spatialReference=e.spatialReference}this.emit("cursor-update",{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activeComponent.vertices.length,coordinates:this.coordinateHelper.pointToArray(e)}],operation:"apply",type:"vertex-update"})}}get updating(){return this.updatingHandles.updating}get vertices(){const e=this.committedVertices;return r(this._stagedVertex)&&e.push(this.coordinateHelper.pointToArray(this._stagedVertex)),e}cancel(){this.complete({aborted:!0})}commitStagedVertex(){if(this._snappingAbortController=p(this._snappingAbortController),r(this._stagedVertex)){const e=this._stagedVertex;this._stagedVertex=null,this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(e))}}complete(e){const t=e&&e.aborted||!1;this._snappingAbortController=p(this._snappingAbortController),r(this.snappingManager)&&this.snappingManager.doneSnapping(),"segment"===this.geometryType||"point"===this.geometryType?this.commitStagedVertex():this.discardStagedVertex();const i="multipoint"===this.geometryType&&0===this.numVertices||"polyline"===this.geometryType&&this.numVertices<2||"polygon"===this.geometryType&&this.numVertices<3;this._createOperationCompleted=!i,(this.isCompleted||t)&&this.emit("complete",{vertices:this.vertices.map(((e,t)=>({componentIndex:0,vertexIndex:t,coordinates:e}))),aborted:t,type:"complete"})}discardStagedVertex(){this._stagedVertex=null}onInputEvent(e){switch(e.type){case"pointer-down":this._pointerDownStates.add(e.pointerId);break;case"pointer-up":this._pointerDownStates.delete(e.pointerId)}switch(e.type){case"pointer-move":return this._onPointerMove(e);case"hold":return this._onHold(e)}}redo(){this._editGeometryOperations.redo()}undo(){r(this.snappingManager)&&this.snappingManager.doneSnapping(),this._editGeometryOperations.undo()}_closeOnClickVertexIndex(e){const t=this._activeComponent;if("polygon"===this.geometryType&&t.vertices.length>2){if(this._vertexWithinPointerDistance(t.vertices[0].pos,e))return 0;if(this._vertexWithinPointerDistance(t.vertices[t.vertices.length-1].pos,e))return t.vertices.length-1}return null}_createManipulatorDragPipeline(e){switch(l(this.drawingMode)){case"click":return this._createManipulatorDragPipelineClick(e);case"freehand":return this._createManipulatorDragPipelineFreehand(e);case"hybrid":return this._createManipulatorDragPipelineHybrid(e)}}_createManipulatorDragPipelineClick(e){return C(e,((e,t,i,o)=>{const n="touch"===o&&this._snappingEnabled;!this.isCompleted&&n&&(t.next(this._screenToMapDragEventStep()).next((e=>("start"===e.action&&(this.stagedVertex=e.mapStart,("segment"===this.geometryType||n&&0===this.numVertices)&&this.commitStagedVertex()),e))).next(this._snappingPipeline.createSnapDragEventPipelineStep({predicate:()=>n,cancel:i,snappingManager:this.snappingManager,snappingContext:new I({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:o,visualizer:this.snappingVisualizer}),updatingHandles:this.updatingHandles}),this._snappingPipeline.next).next((e=>(n&&(this.stagedVertex=e.mapEnd,"end"===e.action&&this.commitStagedVertex()),e))).next((e=>("end"===e.action&&("segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()),e))),i.next((()=>{n&&r(this.snappingManager)&&this.snappingManager.doneSnapping()})))}))}_createManipulatorDragPipelineFreehand(e){return C(e,((e,t)=>{this.isCompleted||t.next(this._screenToMapDragEventStep()).next((e=>("start"===e.action&&(n(this.stagedVertex)&&(this.stagedVertex=e.mapStart),"segment"===this.geometryType&&this.commitStagedVertex()),e))).next((e=>{switch(e.action){case"start":case"update":this.stagedVertex=e.mapEnd,"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":this.complete()}return e}))}))}_createManipulatorDragPipelineHybrid(e){return C(e,((e,t)=>{this.isCompleted||t.next(this._screenToMapDragEventStep()).next((e=>("start"===e.action&&(n(this.stagedVertex)&&(this.stagedVertex=e.mapStart),this.commitStagedVertex()),e))).next((e=>{switch(e.action){case"start":case"update":this.stagedVertex=e.mapEnd,"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()}return e}))}))}_getDrawSurface(){if(n(this.elevationDrawSurface))return this.drawSurface;if(!this.coordinateHelper.hasZ)return this.elevationDrawSurface.defaultZ=null,this.elevationDrawSurface;let e=this.defaultZ,t=!1;r(this.elevationInfo)&&"absolute-height"===this.elevationInfo.mode&&(t=!0),r(this.snapToSceneEnabled)&&(t=this.snapToSceneEnabled),r(this.elevationInfo)&&"on-the-ground"===this.elevationInfo.mode&&(t=!1);const i=this._activeComponent.vertices.length;return("segment"===this.geometryType||"polygon"===this.geometryType)&&i>0&&(e=this.coordinateHelper.getZ(this._activeComponent.vertices[0].pos),t=!1),t?this.drawSurface:(this.elevationDrawSurface.defaultZ=e,this.elevationDrawSurface)}_mapToScreen(e){return this._getDrawSurface().mapToScreen(e)}_onHold(e){this._snappingAbortController=p(this._snappingAbortController),"click"===this.drawingMode&&"touch"===e.pointerType&&this._snappingEnabled&&(this.stagedVertex=e.mapPoint),e.stopPropagation()}_onImmediateClick(e){if("mouse"===e.pointerType&&2===e.button||this._manipulator.dragging)return;const t=this._activeComponent,i=this._closeOnClickVertexIndex(e.screenPoint);if(r(i))return e.stopPropagation(),void this.complete();const o=this._screenToMap(e.screenPoint);if(r(o))switch(this.drawingMode){case"freehand":"point"===this.geometryType&&(this.hasStagedVertex?this.commitStagedVertex():this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(o)),this.complete());break;case"click":case"hybrid":this._snappingAbortController=p(this._snappingAbortController),this.hasStagedVertex?this.commitStagedVertex():this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(o)),("point"===this.geometryType||"segment"===this.geometryType&&2===t.vertices.length||"segment"===this.geometryType&&"hybrid"===this.drawingMode&&1===t.vertices.length)&&this.complete()}e.stopPropagation()}_onImmediateDoubleClick(e){this._manipulator.dragging||"point"===this.geometryType||(this.complete(),e.stopPropagation())}_onPointerMove(e){const t=v(e.x,e.y);if(r(this._tooltip)&&(this._tooltip.screenPoint=t,this._updateTooltipInfo()),this._manipulator.dragging||this._pointerDownStates.has(e.pointerId)||this._manipulator.grabbing||!this._manipulator.interactive)return void(this._snappingAbortController=p(this._snappingAbortController));e.stopPropagation();const i=this._closeOnClickVertexIndex(t);if(r(i))return this._closeOnVertex(i),void(this._snappingAbortController=p(this._snappingAbortController));const o=this._screenToMap(t);if(this._manipulator.cursor=r(o)?"crosshair":null,n(o))return void(this._snappingAbortController=p(this._snappingAbortController));if(n(this.snappingManager))return this.stagedVertex=o,void(this._snappingAbortController=p(this._snappingAbortController));const s=this.snappingManager,a=new I({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:e.pointerType,visualizer:this.snappingVisualizer});this.stagedVertex=s.update(o,a),this._snapMapPoint=o,n(this._snappingAbortController)&&(this._snappingAbortController=new AbortController),this.updatingHandles.addPromise(d(this._snap({snappingManager:s,mapPoint:o,context:a},this._snappingAbortController.signal)))}_closeOnVertex(e){this.discardStagedVertex();const t={componentIndex:0,vertexIndex:e,coordinates:this.coordinateHelper.vectorToArray(this._activeComponent.vertices[e].pos)};this.emit("cursor-update",{updated:null,vertices:[t],operation:"apply",type:"vertex-update"})}_screenToMap(e){return this._getDrawSurface().screenToMap(e)}_screenToMapDragEventStep(){let e=null;return t=>{if("start"===t.action&&(e=this._screenToMap(t.screenStart)),n(e))return null;const i=this._screenToMap(t.screenEnd);return r(i)?{...t,mapStart:e,mapEnd:i}:null}}_vertexWithinPointerDistance(e,t){const i=25,o=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(e));return!!r(o)&&F(o,t,i)}_getTooltipInfo(){this._tooltipContext.calculateElevation=e=>g(r(e)&&e.hasZ?e.z:this.defaultZ,"meters");const{stagedVertex:e}=this,t=this._elevationTooltipDetail(e);switch(this.geometryType){case"point":return new A({elevation:t});case"polyline":return this._tooltipContext.calculateTotalLength=e=>L(this._editGeometryOperations.data.geometry)(e),new k({elevation:t,totalLength:this._totalLengthTooltipDetail(e)});case"polygon":return this._tooltipContext.calculateArea=e=>H(this._editGeometryOperations.data.geometry)(e),new P({elevation:t,area:this._areaTooltipDetail(e)});default:return null}}_elevationTooltipDetail(e){return{mode:this.elevationInfo.mode,...l(this._tooltipContext.calculateElevation)(e)}}_totalLengthTooltipDetail(e){return{...h(l(this._tooltipContext.calculateTotalLength)(e),g(0,"meters"))}}_areaTooltipDetail(e){return{...h(l(this._tooltipContext.calculateArea)(e),m(0,"square-meters"))}}_updateTooltipInfo(){const e=this._tooltip;if(n(e))return;const{stagedVertex:t}=this,i=this._elevationTooltipDetail(t);switch(this.geometryType){case"point":e.info.elevation=i;break;case"polyline":{const o=e.info;o.elevation=i,o.totalLength=this._totalLengthTooltipDetail(t);break}case"polygon":{const o=e.info;o.elevation=i,o.area=this._areaTooltipDetail(t);break}}}};function F(e,t,i){const o=e.x-t.x,n=e.y-t.y;return o*o+n*n<=i}e([x()],U.prototype,"_tooltipEnabled",null),e([x()],U.prototype,"_segmentLabelsEnabled",null),e([x()],U.prototype,"defaultZ",void 0),e([x({value:V})],U.prototype,"drawingMode",null),e([x({constructOnly:!0})],U.prototype,"elevationDrawSurface",void 0),e([x({constructOnly:!0})],U.prototype,"elevationInfo",void 0),e([x({constructOnly:!0,type:j})],U.prototype,"feedbackOptions",void 0),e([x({constructOnly:!0})],U.prototype,"geometryType",void 0),e([x({constructOnly:!0})],U.prototype,"hasM",void 0),e([x({constructOnly:!0})],U.prototype,"hasZ",void 0),e([x({constructOnly:!0})],U.prototype,"manipulators",void 0),e([x({constructOnly:!0})],U.prototype,"drawSurface",void 0),e([x({constructOnly:!0})],U.prototype,"segmentLabels",void 0),e([x({constructOnly:!0})],U.prototype,"snappingManager",void 0),e([x({constructOnly:!0})],U.prototype,"snappingVisualizer",void 0),e([x()],U.prototype,"snapToSceneEnabled",void 0),e([x()],U.prototype,"updating",null),e([x({constructOnly:!0})],U.prototype,"view",void 0),U=e([f("esri.views.draw.DrawOperation")],U);export{U as DrawOperation};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Evented.js";import{HandleOwner as i}from"../../core/HandleOwner.js";import{clone as o}from"../../core/lang.js";import{isNone as n,isSome as r,destroyMaybe as s,unwrap as a,unwrapOr as p,equalsMaybe as l}from"../../core/maybe.js";import{ignoreAbortErrors as c}from"../../core/promiseUtils.js";import{createLength as h,createArea as d}from"../../core/quantityUtils.js";import{watch as m,syncAndInitial as g,initial as u}from"../../core/reactiveUtils.js";import{createScreenPoint as v}from"../../core/screenUtils.js";import{getMetersPerVerticalUnitForSR as y}from"../../core/unitUtils.js";import{property as _}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as x}from"../../core/accessorSupport/decorators/subclass.js";import{pointEquals as f}from"../../layers/graphics/dehydratedFeatureComparison.js";import{getConvertedElevation as T}from"../../support/elevationInfoUtils.js";import{ViewingMode as O}from"../ViewingMode.js";import{defaultDrawingMode as w}from"./DrawingMode.js";import{DrawManipulator as V}from"./DrawManipulator.js";import{createCoordinateHelper as b}from"../interactive/coordinateHelper.js";import{createManipulatorDragEventPipeline as S}from"../interactive/dragEventPipeline.js";import{EditGeometry as M,Component as D}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as C}from"../interactive/editGeometry/EditGeometryOperations.js";import I from"../interactive/sketch/SketchLabelOptions.js";import E from"../interactive/sketch/SketchTooltipOptions.js";import{SnappingContext as P}from"../interactive/snapping/SnappingContext.js";import{SnappingPipeline as j}from"../interactive/snapping/SnappingDragPipelineStep.js";import{SnappingOperation as k}from"../interactive/snapping/SnappingOperation.js";import{DrawPolygonTooltipInfo as G,DrawPolylineTooltipInfo as H,DrawPointTooltipInfo as L}from"../interactive/tooltip/DrawTooltipInfos.js";import{Tooltip as Z}from"../interactive/tooltip/Tooltip.js";import{computeAreaWithStagedVertex as A,computeLengthWithStagedVertex as U}from"../interactive/tooltip/support/measurements.js";let z=class extends(e.EventedMixin(i)){constructor(t){super(t),this._createOperationCompleted=!1,this._pointerDownStates=new Set,this._snappingPipeline=new j,this._tooltip=null,this._tooltipContext={calculateElevation:null,calculateTotalLength:null,calculateArea:null},this.labelOptions=new I,this.tooltipOptions=new E,this.snapToSceneEnabled=null,n(t.elevationInfo)&&(this.elevationInfo={mode:t.hasZ?"absolute-height":"on-the-ground",offset:0})}initialize(){const{geometryType:t,view:e}=this,{spatialReference:i}=e,o="viewingMode"in e.state?e.state.viewingMode:O.Local,a="segment"===t||"multipoint"===t?"polyline":t;this.coordinateHelper=b(this.hasZ,this.hasM,i),this._editGeometryOperations=new C(new M(a,this.coordinateHelper)),this._snappingOperation=new k({view:e}),this.handles.add(m((()=>this.stagedVertex),(t=>{n(t)||this.emit("cursor-update",{updated:null,vertices:[{componentIndex:0,vertexIndex:this._activeComponent.vertices.length,coordinates:this.coordinateHelper.pointToArray(t)}],operation:"apply",type:"vertex-update"})}),{sync:!0,equals:(t,e)=>l(t,e,f)})),this._activeComponent=new D(i,o),this._editGeometryOperations.data.components.push(this._activeComponent);const p=this.segmentLabels;r(p)&&(p.context={view:e,editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo},this.handles.add([m((()=>this.labelOptions.enabled),(t=>{p.visible=t}),g),this.on("cursor-update",(()=>{const t=this.stagedVertex;p.stagedVertex=r(t)?this.coordinateHelper.pointToVector(t):null}))])),this.handles.add(this._editGeometryOperations.on(["vertex-add","vertex-update","vertex-remove"],(t=>{const e=t.vertices.map((t=>({componentIndex:0,vertexIndex:t.index,coordinates:this.coordinateHelper.vectorToArray(t.pos)}))),i=e.map((t=>t.coordinates));switch(t.type){case"vertex-add":this.emit(t.type,{...t,added:i,vertices:e});break;case"vertex-update":this.emit(t.type,{...t,updated:i,vertices:e});break;case"vertex-remove":this.emit(t.type,{...t,removed:i,vertices:e})}}))),this._manipulator=new V({grabbableForEvent:t=>"click"!==this.drawingMode||"touch"===t.pointerType&&this._snappingEnabled&&1===this._pointerDownStates.size}),this.manipulators.add(this._manipulator),this._manipulator.grabbable="point"!==t,this.handles.add([this._createManipulatorDragPipeline(this._manipulator),this._manipulator.events.on("immediate-click",(t=>this._onImmediateClick(t))),this._manipulator.events.on("immediate-double-click",(t=>this._onImmediateDoubleClick(t))),m((()=>this.tooltipOptions.enabled),(t=>{this._tooltip=t?new Z({view:e,info:this._getTooltipInfo()}):s(this._tooltip)}),u)])}destroy(){s(this.segmentLabels),s(this._snappingOperation),this._tooltip=s(this._tooltip),this._editGeometryOperations=s(this._editGeometryOperations)}get _snappingEnabled(){return r(this.snappingManager)&&this.snappingManager.options.effectiveEnabled}get _defaultElevation(){return h(this.defaultZ,"meters")}get canRedo(){return this._editGeometryOperations.canRedo}get canUndo(){return this._editGeometryOperations.canUndo}get committedVertices(){return this._activeComponent.vertices.map((t=>this.coordinateHelper.vectorToArray(t.pos)))}set drawingMode(t){this._set("drawingMode",t??w)}get interactive(){return this._manipulator.interactive}set interactive(t){this._manipulator.interactive=t}get isCompleted(){return this._createOperationCompleted}get numCommittedVertices(){return this._activeComponent.vertices.length}get numVertices(){return r(this.stagedVertex)?this._activeComponent.vertices.length+1:this._activeComponent.vertices.length}get stagedVertex(){return this._snappingOperation.stagedPoint}set stagedVertex(t){this._snappingOperation.stagedPoint=o(t)}get updating(){return this.updatingHandles.updating}get vertices(){const t=this.committedVertices;return r(this.stagedVertex)&&t.push(this.coordinateHelper.pointToArray(this.stagedVertex)),t}cancel(){this.complete({aborted:!0})}commitStagedVertex(){if(this._snappingOperation.abort(),r(this.stagedVertex)){const{stagedVertex:t}=this;this.stagedVertex=null,this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(t))}}complete(t){const e=t&&t.aborted||!1;this._snappingOperation.abort(),r(this.snappingManager)&&this.snappingManager.doneSnapping(),"segment"===this.geometryType||"point"===this.geometryType?this.commitStagedVertex():this.stagedVertex=null;const i="multipoint"===this.geometryType&&0===this.numVertices||"polyline"===this.geometryType&&this.numVertices<2||"polygon"===this.geometryType&&this.numVertices<3;this._createOperationCompleted=!i,(this.isCompleted||e)&&this.emit("complete",{vertices:this.vertices.map(((t,e)=>({componentIndex:0,vertexIndex:e,coordinates:t}))),aborted:e,type:"complete"})}onInputEvent(t){switch(t.type){case"pointer-down":this._pointerDownStates.add(t.pointerId);break;case"pointer-up":this._pointerDownStates.delete(t.pointerId)}switch(t.type){case"pointer-move":return this._onPointerMove(t);case"hold":return this._onHold(t)}}redo(){this._editGeometryOperations.redo()}undo(){r(this.snappingManager)&&this.snappingManager.doneSnapping(),this._editGeometryOperations.undo()}_closeOnClickVertexIndex(t){const e=this._activeComponent;if("polygon"===this.geometryType&&e.vertices.length>2){if(this._vertexWithinPointerDistance(e.vertices[0].pos,t))return 0;if(this._vertexWithinPointerDistance(e.vertices[e.vertices.length-1].pos,t))return e.vertices.length-1}return null}_createManipulatorDragPipeline(t){switch(a(this.drawingMode)){case"click":return this._createManipulatorDragPipelineClick(t);case"freehand":return this._createManipulatorDragPipelineFreehand(t);case"hybrid":return this._createManipulatorDragPipelineHybrid(t)}}_createManipulatorDragPipelineClick(t){return S(t,((t,e,i,o)=>{const n="touch"===o&&this._snappingEnabled;!this.isCompleted&&n&&(e.next(this._screenToMapDragEventStep()).next((t=>("start"===t.action&&(this.stagedVertex=t.mapStart,("segment"===this.geometryType||n&&0===this.numVertices)&&this.commitStagedVertex()),t))).next(this._snappingPipeline.createSnapDragEventPipelineStep({predicate:()=>n,cancel:i,snappingManager:this.snappingManager,snappingContext:new P({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:o,visualizer:this.snappingVisualizer}),updatingHandles:this.updatingHandles}),this._snappingPipeline.next).next((t=>(n&&(this.stagedVertex=t.mapEnd,"end"===t.action&&this.commitStagedVertex()),t))).next((t=>("end"===t.action&&("segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()),t))),i.next((()=>{n&&r(this.snappingManager)&&this.snappingManager.doneSnapping()})))}))}_createManipulatorDragPipelineFreehand(t){return S(t,((t,e)=>{this.isCompleted||e.next(this._screenToMapDragEventStep()).next((t=>("start"===t.action&&(n(this.stagedVertex)&&(this.stagedVertex=t.mapStart),"segment"===this.geometryType&&this.commitStagedVertex()),t))).next((t=>{switch(t.action){case"start":case"update":this.stagedVertex=t.mapEnd,"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":this.complete()}return t}))}))}_createManipulatorDragPipelineHybrid(t){return S(t,((t,e)=>{this.isCompleted||e.next(this._screenToMapDragEventStep()).next((t=>("start"===t.action&&(n(this.stagedVertex)&&(this.stagedVertex=t.mapStart),this.commitStagedVertex()),t))).next((t=>{switch(t.action){case"start":case"update":this.stagedVertex=t.mapEnd,"polygon"!==this.geometryType&&"polyline"!==this.geometryType||this.commitStagedVertex();break;case"end":"segment"!==this.geometryType&&"point"!==this.geometryType||this.complete()}return t}))}))}_getDrawSurface(){if(n(this.elevationDrawSurface))return this.drawSurface;if(!this.coordinateHelper.hasZ)return this.elevationDrawSurface.defaultZ=null,this.elevationDrawSurface;let t=this.defaultZ,e=!1;r(this.elevationInfo)&&"absolute-height"===this.elevationInfo.mode&&(e=!0),r(this.snapToSceneEnabled)&&(e=this.snapToSceneEnabled),r(this.elevationInfo)&&"on-the-ground"===this.elevationInfo.mode&&(e=!1);const i=this._activeComponent.vertices.length;return("segment"===this.geometryType||"polygon"===this.geometryType)&&i>0&&(t=this.coordinateHelper.getZ(this._activeComponent.vertices[0].pos),e=!1),e?this.drawSurface:(this.elevationDrawSurface.defaultZ=t,this.elevationDrawSurface)}_mapToScreen(t){return this._getDrawSurface().mapToScreen(t)}_onHold(t){this._snappingOperation.abort(),"click"===this.drawingMode&&"touch"===t.pointerType&&this._snappingEnabled&&(this.stagedVertex=t.mapPoint),t.stopPropagation()}_onImmediateClick(t){if("mouse"===t.pointerType&&2===t.button||this._manipulator.dragging)return;const e=this._activeComponent,i=this._closeOnClickVertexIndex(t.screenPoint);if(r(i))return t.stopPropagation(),void this.complete();const o=this._screenToMap(t.screenPoint);if(r(o))switch(this.drawingMode){case"freehand":"point"===this.geometryType&&(r(this.stagedVertex)?this.commitStagedVertex():this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(o)),this.complete());break;case"click":case"hybrid":this._snappingOperation.abort(),r(this.stagedVertex)?this.commitStagedVertex():this._editGeometryOperations.appendVertex(this.coordinateHelper.pointToVector(o)),("point"===this.geometryType||"segment"===this.geometryType&&2===e.vertices.length||"segment"===this.geometryType&&"hybrid"===this.drawingMode&&1===e.vertices.length)&&this.complete()}t.stopPropagation()}_onImmediateDoubleClick(t){this._manipulator.dragging||"point"===this.geometryType||(this.complete(),t.stopPropagation())}_onPointerMove(t){const e=v(t.x,t.y);if(r(this._tooltip)&&this._updateTooltipInfo(),this._manipulator.dragging||this._pointerDownStates.has(t.pointerId)||this._manipulator.grabbing||!this._manipulator.interactive)return void this._snappingOperation.abort();t.stopPropagation();const i=this._closeOnClickVertexIndex(e);if(r(i))return this._closeOnVertex(i),void this._snappingOperation.abort();const o=this._screenToMap(e);if(this._manipulator.cursor=r(o)?"crosshair":null,n(o))return void this._snappingOperation.abort();if(n(this.snappingManager))return this.stagedVertex=o,void this._snappingOperation.abort();const s=this.snappingManager,a=new P({editGeometryOperations:this._editGeometryOperations,elevationInfo:this.elevationInfo,pointer:t.pointerType,visualizer:this.snappingVisualizer});this.updatingHandles.addPromise(c(this._snappingOperation.snap(o,s,a)))}_closeOnVertex(t){this.stagedVertex=null;const e={componentIndex:0,vertexIndex:t,coordinates:this.coordinateHelper.vectorToArray(this._activeComponent.vertices[t].pos)};this.emit("cursor-update",{updated:null,vertices:[e],operation:"apply",type:"vertex-update"})}_screenToMap(t){return this._getDrawSurface().screenToMap(t)}_screenToMapDragEventStep(){let t=null;return e=>{if("start"===e.action&&(t=this._screenToMap(e.screenStart)),n(t))return null;const i=this._screenToMap(e.screenEnd);return r(i)?{...e,mapStart:t,mapEnd:i}:null}}_vertexWithinPointerDistance(t,e){const i=25,o=this._mapToScreen(this.coordinateHelper.vectorToDehydratedPoint(t));return!!r(o)&&F(o,e,i)}_calculateVertexTooltipElevation(t){const{tooltipOptions:e,view:i}=this;if(n(t)||"2d"===i.type)return this._defaultElevation;const o=this.elevationInfo,r=e.elevation.mode,{spatialReference:s}=t,a=y(s),p=T(i,t,o,{mode:r,offset:0});return h(p*a,"meters")}_getTooltipInfo(){const{tooltipOptions:t}=this;if(!t.enabled)return null;this._tooltipContext.calculateElevation=t=>this._calculateVertexTooltipElevation(t);const{stagedVertex:e}=this,i=this._elevationTooltipDetail(e);switch(this.geometryType){case"point":return new L({tooltipOptions:t,elevation:i});case"polyline":return this._tooltipContext.calculateTotalLength=t=>U(this._editGeometryOperations.data.geometry)(t),new H({tooltipOptions:t,elevation:i,totalLength:this._totalLengthTooltipDetail(e)});case"polygon":return this._tooltipContext.calculateArea=t=>A(this._editGeometryOperations.data.geometry)(t),new G({tooltipOptions:t,elevation:i,area:this._areaTooltipDetail(e)});default:return null}}_elevationTooltipDetail(t){return{mode:this.elevationInfo.mode,...a(this._tooltipContext.calculateElevation)(t)}}_totalLengthTooltipDetail(t){return{...p(a(this._tooltipContext.calculateTotalLength)(t),h(0,"meters"))}}_areaTooltipDetail(t){return{...p(a(this._tooltipContext.calculateArea)(t),d(0,"square-meters"))}}_updateTooltipInfo(){const t=this._tooltip;if(n(t))return;const{stagedVertex:e}=this,i=this._elevationTooltipDetail(e);switch(this.geometryType){case"point":t.info.elevation=i;break;case"polyline":{const o=t.info;o.elevation=i,o.totalLength=this._totalLengthTooltipDetail(e);break}case"polygon":{const o=t.info;o.elevation=i,o.area=this._areaTooltipDetail(e);break}}}get test(){return{tooltip:this._tooltip}}};function F(t,e,i){const o=t.x-e.x,n=t.y-e.y;return o*o+n*n<=i}t([_()],z.prototype,"_defaultElevation",null),t([_()],z.prototype,"defaultZ",void 0),t([_({value:w})],z.prototype,"drawingMode",null),t([_({constructOnly:!0})],z.prototype,"elevationDrawSurface",void 0),t([_({constructOnly:!0})],z.prototype,"elevationInfo",void 0),t([_({constructOnly:!0,type:I})],z.prototype,"labelOptions",void 0),t([_({constructOnly:!0,type:E})],z.prototype,"tooltipOptions",void 0),t([_({constructOnly:!0})],z.prototype,"geometryType",void 0),t([_({constructOnly:!0})],z.prototype,"hasM",void 0),t([_({constructOnly:!0})],z.prototype,"hasZ",void 0),t([_({constructOnly:!0})],z.prototype,"manipulators",void 0),t([_({constructOnly:!0})],z.prototype,"drawSurface",void 0),t([_({constructOnly:!0})],z.prototype,"segmentLabels",void 0),t([_({constructOnly:!0})],z.prototype,"snappingManager",void 0),t([_({constructOnly:!0})],z.prototype,"snappingVisualizer",void 0),t([_()],z.prototype,"snapToSceneEnabled",void 0),t([_()],z.prototype,"_snappingOperation",void 0),t([_()],z.prototype,"stagedVertex",null),t([_()],z.prototype,"updating",null),t([_({constructOnly:!0})],z.prototype,"view",void 0),z=t([x("esri.views.draw.DrawOperation")],z);export{z as DrawOperation};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{isSome as t,isNone as i,destroyMaybe as r}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{ViewingMode as n}from"../ViewingMode.js";import a from"./DrawAction.js";import{DrawTool as h}from"./DrawTool.js";import{VertexAddEvent as d,CursorUpdateEvent as p,DrawCompleteEvent as l}from"./input/DrawEvents.js";import{createViewAlignedCoordinateSystem as _}from"./support/surfaceCoordinateSystems.js";import{ViewEventPriorities as c}from"../input/InputManager.js";import{SKETCH_KEYS as m}from"../interactive/keybindings.js";import{EditGeometry as v,Component as g}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as w}from"../interactive/editGeometry/EditGeometryOperations.js";import{createScreenPointFromEvent as u}from"../support/screenUtils.js";import y from"../../geometry/Point.js";const T=["freehand","click"];let O=class extends a{constructor(e){super(e),this._isDragging=!1,this._panEnabled=!1,this._addVertexOnPointerUp=!1,this.viewAlignedCoordinateSystem=null,this.mode="freehand"}initialize(){"2d"===this.view.type?this._addViewHandles():this._addDrawTool()}destroy(){"2d"===this.view.type?this._removeViewHandles():this._removeDrawTool(),this.emit("destroy")}complete(){"2d"===this.view.type?this._completeDrawing():this._drawTool.completeCreateOperation()}_getGeometryZValue(){return this.hasZ&&this.vertices.length>0?this.vertices[0][2]:this.defaultZ}_addViewHandles(){this._removeViewHandles(),"click"===this.mode?this._handles.add(this._getClickModeViewHandles(),this._viewHandlesKey):this._handles.add(this._getDragModeViewHandles(),this._viewHandlesKey)}_getDragModeViewHandles(){return[this.view.on("immediate-click",(e=>{if(e.stopPropagation(),e.mapPoint&&!this._panEnabled){const i=this.getCoordsFromScreenPoint(u(e));t(i)&&(this._vertexAddHandler(e),this._drawCompleteHandler(e))}}),c.TOOL),this.view.on("pointer-down",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._panEnabled||(this._resetGeometry(),this._addVertexOnPointerUp=!0,this._cursorScreenPoint=u(e),this._activePointerId=e.pointerId,this._vertexAddHandler(e),this._isDragging=!1,"touch"===e.pointerType&&this._updateCursor(e.native)))}),c.TOOL),this.view.on("pointer-move",(e=>{this._abortSnapping(),i(this._activePointerId)&&"touch"!==e.pointerType&&(this._cursorScreenPoint=u(e),this._updateCursor(e.native))}),c.TOOL),this.view.on("pointer-drag",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._isDragging=!0,this._cursorScreenPoint=u(e),this._updateCursor(e.native))}),c.TOOL),this.view.on("pointer-up",(e=>{this._shouldHandlePointerEvent(e)&&this._addVertexOnPointerUp&&(this._abortSnapping(),this._activePointerId=null,this._isDragging&&this._vertexAddHandler(e),2===this._committedVertices.length&&this._drawCompleteHandler(e),this._isDragging=!1)}),c.TOOL),this.view.on("key-down",(e=>{e.key===m.complete&&this._cursorScreenPoint?(this._abortSnapping(),this._vertexAddHandler(e),this._drawCompleteHandler(e)):e.key===m.pan&&(this._panEnabled=!0)}),c.TOOL),this.view.on("key-up",(e=>{e.key===m.pan&&(this._panEnabled=!1)}),c.TOOL),this.view.on("drag",(e=>{t(this._activePointerId)&&e.stopPropagation()}),c.TOOL),this.view.on("drag",["Shift"],(e=>{e.stopPropagation()}),c.TOOL)]}_getClickModeViewHandles(){return[this.view.on("pointer-down",(e=>{this._abortSnapping(),this._cursorScreenPoint=u(e),this._activePointerId=e.pointerId,this._isDragging=!1,"touch"===e.pointerType&&this._updateCursor(e.native)}),c.TOOL),this.view.on("pointer-move",(e=>{this._abortSnapping(),this._cursorScreenPoint=u(e),i(this._activePointerId)&&"touch"!==e.pointerType&&this._updateCursor(e.native)}),c.TOOL),this.view.on("pointer-drag",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._isDragging=!0)}),c.TOOL),this.view.on("pointer-up",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._activePointerId=null,e.stopPropagation(),this._isDragging||this._vertexAddHandler(e),2!==this.vertices.length||this._isDragging||this._drawCompleteHandler(e),this._isDragging=!1)}),c.TOOL),this.view.on("key-down",(e=>{e.key===m.vertexAdd&&this._cursorScreenPoint&&(this._vertexAddHandler(e),2===this.vertices.length&&this._drawCompleteHandler(e)),e.key===m.complete&&this._cursorScreenPoint&&2===this.vertices.length&&(this._vertexAddHandler(e),this._drawCompleteHandler(e))}),c.TOOL)]}_removeViewHandles(){this._handles.remove(this._viewHandlesKey)}_addDrawTool(){this._drawTool=new h({view:this.view,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"segment",mode:this.mode}),this.view.addAndActivateTool(this._drawTool),this._handles.add([this._drawTool.on("vertex-add",(e=>{1===e.vertices.length&&this.emit("vertex-add",new d(this.view,null,e.vertices[0].vertexIndex,this._drawTool.getVertexCoords()))})),this._drawTool.on("cursor-update",(e=>{1===e.vertices.length&&this.emit("cursor-update",new p(this.view,null,e.vertices[0].vertexIndex,this._drawTool.getVertexCoords()))})),this._drawTool.on("complete",(e=>{this.emit("draw-complete",new l(null,this._drawTool.getVertexCoords())),this._removeDrawTool()}))],this._drawToolHandlesKey)}_removeDrawTool(){this._handles.remove(this._drawToolHandlesKey),this.view.tools.remove(this._drawTool),this._drawTool=r(this._drawTool)}_addVertex(e,t){const i=this._coordinateHelper.arrayToVector(e);if(this._isDuplicateOfLastVertex(i))return;this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometryOperations.appendVertex(i),1===this._committedVertices.length&&(this.viewAlignedCoordinateSystem=_(this.view,this._committedVertices[0]));const r=this._committedVertices.length-1,s=new d(this.view,t,r,this.vertices);this.emit("vertex-add",s)}_updateCursor(e){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const i=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);t(i)&&this._pushCursorVertex(i.vertex,(()=>this.emit("cursor-update",new p(this.view,e,this._activeComponent.vertices.length,this.vertices,t(this._stagedVertex)?new y(this._stagedVertex):null))))}_completeDrawing(e){if(this._activePointerId=null,this._popCursorVertex(),this._cursorScreenPoint=null,this._isDragging=!1,this._abortSnapping(),t(this._snappingManager)&&this._snappingManager.doneSnapping(),this.vertices.length<1)return;const i=new l(e,this.vertices);this.emit("draw-complete",i),i.defaultPrevented||this._removeViewHandles()}_resetGeometry(){this._editGeometryOperations.destroy(),this._editGeometryOperations=new w(new v("polygon",this._coordinateHelper,n.Local)),this._activeComponent=new g(this._coordinateHelper.spatialReference,n.Local),this._editGeometryOperations.data.components.push(this._activeComponent)}};e([s({type:T})],O.prototype,"mode",void 0),O=e([o("esri/views/2d/engine/markup/SegmentDrawAction")],O);export{O as SegmentDrawAction};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import"../../geometry.js";import{isSome as t,isNone as i,destroyMaybe as r}from"../../core/maybe.js";import{property as s}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as o}from"../../core/accessorSupport/decorators/subclass.js";import{ViewingMode as n}from"../ViewingMode.js";import a from"./DrawAction.js";import{DrawTool as h}from"./DrawTool.js";import{VertexAddEvent as d,CursorUpdateEvent as p,DrawCompleteEvent as l}from"./input/DrawEvents.js";import{createViewAlignedCoordinateSystem as _}from"./support/surfaceCoordinateSystems.js";import{ViewEventPriorities as c}from"../input/InputManager.js";import{SKETCH_KEYS as m}from"../interactive/keybindings.js";import{EditGeometry as v,Component as g}from"../interactive/editGeometry/EditGeometry.js";import{EditGeometryOperations as w}from"../interactive/editGeometry/EditGeometryOperations.js";import{createScreenPointFromEvent as u}from"../support/screenUtils.js";import y from"../../geometry/Point.js";const T=["freehand","click"];let O=class extends a{constructor(e){super(e),this._isDragging=!1,this._panEnabled=!1,this._addVertexOnPointerUp=!1,this.viewAlignedCoordinateSystem=null,this.mode="freehand"}initialize(){"2d"===this.view.type?this._addViewHandles():this._addDrawTool()}destroy(){"2d"===this.view.type?this._removeViewHandles():this._removeDrawTool(),this.emit("destroy")}complete(){"2d"===this.view.type?this._completeDrawing():this._drawTool.completeCreateOperation()}_getGeometryZValue(){return this.hasZ&&this.vertices.length>0?this.vertices[0][2]:this.defaultZ}_addViewHandles(){this._removeViewHandles(),"click"===this.mode?this._handles.add(this._getClickModeViewHandles(),this._viewHandlesKey):this._handles.add(this._getDragModeViewHandles(),this._viewHandlesKey)}_getDragModeViewHandles(){return[this.view.on("immediate-click",(e=>{if(e.stopPropagation(),e.mapPoint&&!this._panEnabled){const i=this.getCoordsFromScreenPoint(u(e));t(i)&&(this._vertexAddHandler(e),this._drawCompleteHandler(e))}}),c.TOOL),this.view.on("pointer-down",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._panEnabled||(this._resetGeometry(),this._addVertexOnPointerUp=!0,this._cursorScreenPoint=u(e),this._activePointerId=e.pointerId,this._vertexAddHandler(e),this._isDragging=!1,"touch"===e.pointerType&&this._updateCursor(e.native)))}),c.TOOL),this.view.on("pointer-move",(e=>{this._abortSnapping(),i(this._activePointerId)&&"touch"!==e.pointerType&&(this._cursorScreenPoint=u(e),this._updateCursor(e.native))}),c.TOOL),this.view.on("pointer-drag",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._isDragging=!0,this._cursorScreenPoint=u(e),this._updateCursor(e.native))}),c.TOOL),this.view.on("pointer-up",(e=>{this._shouldHandlePointerEvent(e)&&this._addVertexOnPointerUp&&(this._abortSnapping(),this._activePointerId=null,this._isDragging&&this._vertexAddHandler(e),2===this._committedVertices.length&&this._drawCompleteHandler(e),this._isDragging=!1)}),c.TOOL),this.view.on("key-down",(e=>{e.key===m.complete&&this._cursorScreenPoint?(this._abortSnapping(),this._vertexAddHandler(e),this._drawCompleteHandler(e)):e.key===m.pan&&(this._panEnabled=!0)}),c.TOOL),this.view.on("key-up",(e=>{e.key===m.pan&&(this._panEnabled=!1)}),c.TOOL),this.view.on("drag",(e=>{t(this._activePointerId)&&e.stopPropagation()}),c.TOOL),this.view.on("drag",["Shift"],(e=>{e.stopPropagation()}),c.TOOL)]}_getClickModeViewHandles(){return[this.view.on("pointer-down",(e=>{this._abortSnapping(),this._cursorScreenPoint=u(e),this._activePointerId=e.pointerId,this._isDragging=!1,"touch"===e.pointerType&&this._updateCursor(e.native)}),c.TOOL),this.view.on("pointer-move",(e=>{this._abortSnapping(),this._cursorScreenPoint=u(e),i(this._activePointerId)&&"touch"!==e.pointerType&&this._updateCursor(e.native)}),c.TOOL),this.view.on("pointer-drag",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._isDragging=!0)}),c.TOOL),this.view.on("pointer-up",(e=>{this._shouldHandlePointerEvent(e)&&(this._abortSnapping(),this._activePointerId=null,e.stopPropagation(),this._isDragging||this._vertexAddHandler(e),2!==this.vertices.length||this._isDragging||this._drawCompleteHandler(e),this._isDragging=!1)}),c.TOOL),this.view.on("key-down",(e=>{e.key===m.vertexAdd&&this._cursorScreenPoint&&(this._vertexAddHandler(e),2===this.vertices.length&&this._drawCompleteHandler(e)),e.key===m.complete&&this._cursorScreenPoint&&2===this.vertices.length&&(this._vertexAddHandler(e),this._drawCompleteHandler(e))}),c.TOOL)]}_removeViewHandles(){this._handles.remove(this._viewHandlesKey)}_addDrawTool(){this._drawTool=new h({view:this.view,elevationInfo:this.elevationInfo,hasZ:this.hasZ,geometryType:"segment",mode:this.mode}),this.view.addAndActivateTool(this._drawTool),this._handles.add([this._drawTool.on("vertex-add",(e=>{1===e.vertices.length&&this.emit("vertex-add",new d(this.view,null,e.vertices[0].vertexIndex,this._drawTool.getVertexCoords()))})),this._drawTool.on("cursor-update",(e=>{1===e.vertices.length&&this.emit("cursor-update",new p(this.view,null,e.vertices[0].vertexIndex,this._drawTool.getVertexCoords()))})),this._drawTool.on("complete",(e=>{this.emit("draw-complete",new l(null,this._drawTool.getVertexCoords())),this._removeDrawTool()}))],this._drawToolHandlesKey)}_removeDrawTool(){this._handles.remove(this._drawToolHandlesKey),this.view.tools.remove(this._drawTool),this._drawTool=r(this._drawTool)}_addVertex(e,t){const i=this._coordinateHelper.arrayToVector(e);if(this._isDuplicateOfLastVertex(i))return;this._lastVertexUnsnapped=this._stagedVertexUnsnapped,this._popCursorVertex(),this._editGeometryOperations.appendVertex(i),1===this._committedVertices.length&&(this.viewAlignedCoordinateSystem=_(this.view,this._committedVertices[0]));const r=this._committedVertices.length-1,s=new d(this.view,t,r,this.vertices);this.emit("vertex-add",s)}_updateCursor(e){if(this._popCursorVertex(),!this._cursorScreenPoint)return;const i=this.getCoordsAndPointFromScreenPoint(this._cursorScreenPoint);t(i)&&this._pushCursorVertex(i.vertex,(()=>this.emit("cursor-update",new p(this.view,e,this._activeComponent.vertices.length,this.vertices,t(this._stagedVertex)?new y(this._stagedVertex):null))))}_completeDrawing(e){if(this._activePointerId=null,this._popCursorVertex(),this._cursorScreenPoint=null,this._isDragging=!1,this._abortSnapping(),t(this._snappingManager)&&this._snappingManager.doneSnapping(),this.vertices.length<1)return;const i=new l(e,this.vertices);this.emit("draw-complete",i),i.defaultPrevented||this._removeViewHandles()}_resetGeometry(){this._editGeometryOperations.destroy(),this._editGeometryOperations=new w(new v("polygon",this._coordinateHelper)),this._activeComponent=new g(this._coordinateHelper.spatialReference,n.Local),this._editGeometryOperations.data.components.push(this._activeComponent)}};e([s({type:T})],O.prototype,"mode",void 0),O=e([o("esri/views/2d/engine/markup/SegmentDrawAction")],O);export{O as SegmentDrawAction};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import i from"../../core/Evented.js";import{isNone as o,isSome as s}from"../../core/maybe.js";import{watch as r,sync as l}from"../../core/reactiveUtils.js";import{pt2px as a,screenPointObjectToArray as n,createScreenPointArray as c}from"../../core/screenUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{s as m}from"../../chunks/vec2.js";import{i as u}from"../../chunks/vec3.js";import{c as y}from"../../chunks/vec3f64.js";import{canProjectWithoutEngine as g,project as d,projectPointToVector as b}from"../../geometry/projection.js";import{getGraphicEffectiveElevationMode as f}from"../../support/elevationInfoUtils.js";import{getDefaultSymbol2D as _}from"../../symbols/support/defaults.js";import v from"../../symbols/support/ElevationInfo.js";import{intersectsDrapedGeometry as S}from"../support/drapedUtils.js";let C=class extends t{constructor(e){super(e),this.layer=null,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.dragging=!1,this.cursor=null,this.events=new i.EventEmitter,this._circleCollisionCache=null,this._graphicSymbolChangedHandle=null,this._originalSymbol=null}set graphic(e){this._circleCollisionCache=null,this._originalSymbol=e.symbol,this._set("graphic",e),this.attachSymbolChanged()}get elevationInfo(){const e="elevationInfo"in this.graphic.layer&&this.graphic.layer.elevationInfo,t=f(this.graphic),i=e?e.offset:0;return new v({mode:t,offset:i})}set focusedSymbol(e){e!==this._get("focusedSymbol")&&(this._set("focusedSymbol",e),this._updateGraphicSymbol(),this._circleCollisionCache=null)}grabbableForEvent(){return!0}set grabbing(e){e!==this._get("grabbing")&&(this._set("grabbing",e),this._updateGraphicSymbol())}set hovering(e){e!==this._get("hovering")&&(this._set("hovering",e),this._updateGraphicSymbol())}set selected(e){e!==this._get("selected")&&(this._set("selected",e),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get _focused(){return this._get("hovering")||this._get("grabbing")}destroy(){this.detachSymbolChanged(),this._resetGraphicSymbol(),this._set("view",null)}intersectionDistance(e){const t=this.graphic;if(!1===t.visible)return null;const i=t.geometry;if(o(i))return null;const r=this._get("focusedSymbol"),l=s(r)?r:t.symbol;return"2d"===this.view.type?this._intersectDistance2D(this.view,e,i,l):this._intersectDistance3D(this.view,e,t)}attach(){this.attachSymbolChanged(),s(this.layer)&&this.layer.add(this.graphic)}detach(){this.detachSymbolChanged(),this._resetGraphicSymbol(),s(this.layer)&&this.layer.remove(this.graphic)}attachSymbolChanged(){this.detachSymbolChanged(),this._graphicSymbolChangedHandle=r((()=>this.graphic?.symbol),(e=>{s(e)&&e!==this.focusedSymbol&&e!==this._originalSymbol&&(this._originalSymbol=e,this._focused&&s(this.focusedSymbol)&&(this.graphic.symbol=this.focusedSymbol))}),l)}detachSymbolChanged(){s(this._graphicSymbolChangedHandle)&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)}_updateGraphicSymbol(){this.graphic.symbol=this._focused&&s(this.focusedSymbol)?this.focusedSymbol:this._originalSymbol}_resetGraphicSymbol(){this.graphic.symbol=this._originalSymbol}_intersectDistance2D(e,t,i,r){if(r=r||_(i),o(r))return null;const l=1;let c=this._circleCollisionCache;if("point"!==i.type||"simple-marker"!==r.type)return S(t,i,e)?l:null;if(o(c)||!c.originalPoint.equals(i)){const t=i,o=e.spatialReference;if(g(t.spatialReference,o)){const e=d(t,o);c={originalPoint:t.clone(),mapPoint:e,radiusPx:a(r.size)},this._circleCollisionCache=c}}if(s(c)){const i=n(t,D),o=e.toScreen(c.mapPoint),s=c.radiusPx,h=o.x+a(r.xoffset),p=o.y-a(r.yoffset);return m(i,[h,p])<s*s?l:null}return null}_intersectDistance3D(e,t,i){const o=e.toMap(t,{include:[i]});return o&&b(o,j,e.renderSpatialReference)?u(j,e.state.camera.eye):null}};e([h({constructOnly:!0,nonNullable:!0})],C.prototype,"graphic",null),e([h({readOnly:!0})],C.prototype,"elevationInfo",null),e([h({constructOnly:!0,nonNullable:!0})],C.prototype,"view",void 0),e([h({value:null})],C.prototype,"focusedSymbol",null),e([h({constructOnly:!0})],C.prototype,"layer",void 0),e([h()],C.prototype,"interactive",void 0),e([h()],C.prototype,"selectable",void 0),e([h()],C.prototype,"grabbable",void 0),e([h({value:!1})],C.prototype,"grabbing",null),e([h()],C.prototype,"dragging",void 0),e([h()],C.prototype,"hovering",null),e([h({value:!1})],C.prototype,"selected",null),e([h()],C.prototype,"cursor",void 0),C=e([p("esri.views.interactive.GraphicManipulator")],C);const j=y(),D=c();export{C as GraphicManipulator};
5
+ import{_ as e}from"../../chunks/tslib.es6.js";import t from"../../core/Accessor.js";import i from"../../core/Evented.js";import{isNone as o,isSome as s}from"../../core/maybe.js";import{watch as r,sync as l}from"../../core/reactiveUtils.js";import{pt2px as a,screenPointObjectToArray as n,createScreenPointArray as c}from"../../core/screenUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as p}from"../../core/accessorSupport/decorators/subclass.js";import{s as m}from"../../chunks/vec2.js";import{i as u}from"../../chunks/vec3.js";import{c as y}from"../../chunks/vec3f64.js";import{canProjectWithoutEngine as g,project as b,projectPointToVector as d}from"../../geometry/projection.js";import{getGraphicEffectiveElevationMode as f}from"../../support/elevationInfoUtils.js";import{getDefaultSymbol2D as _}from"../../symbols/support/defaults.js";import v from"../../symbols/support/ElevationInfo.js";import{intersectsDrapedGeometry as S}from"../support/drapedUtils.js";let C=class extends t{constructor(e){super(e),this.layer=null,this.interactive=!0,this.selectable=!1,this.grabbable=!0,this.dragging=!1,this.cursor=null,this.events=new i.EventEmitter,this._circleCollisionCache=null,this._graphicSymbolChangedHandle=null,this._originalSymbol=null}set graphic(e){this._circleCollisionCache=null,this._originalSymbol=e.symbol,this._set("graphic",e),this.attachSymbolChanged()}get elevationInfo(){const e="elevationInfo"in this.graphic.layer&&this.graphic.layer.elevationInfo,t=f(this.graphic),i=e?e.offset:0;return new v({mode:t,offset:i})}set focusedSymbol(e){e!==this._get("focusedSymbol")&&(this._set("focusedSymbol",e),this._updateGraphicSymbol(),this._circleCollisionCache=null)}grabbableForEvent(){return!0}set grabbing(e){e!==this._get("grabbing")&&(this._set("grabbing",e),this._updateGraphicSymbol())}set hovering(e){e!==this._get("hovering")&&(this._set("hovering",e),this._updateGraphicSymbol())}set selected(e){e!==this._get("selected")&&(this._set("selected",e),this._updateGraphicSymbol(),this.events.emit("select-changed",{action:e?"select":"deselect"}))}get _focused(){return this._get("hovering")||this._get("grabbing")}destroy(){this.detachSymbolChanged(),this._resetGraphicSymbol(),this._set("view",null)}intersectionDistance(e){const t=this.graphic;if(!1===t.visible)return null;const i=t.geometry;if(o(i))return null;const r=this._get("focusedSymbol"),l=s(r)?r:t.symbol;return"2d"===this.view.type?this._intersectDistance2D(this.view,e,i,l):this._intersectDistance3D(this.view,e,t)}attach(){this.attachSymbolChanged(),s(this.layer)&&this.layer.add(this.graphic)}detach(){this.detachSymbolChanged(),this._resetGraphicSymbol(),s(this.layer)&&this.layer.remove(this.graphic)}attachSymbolChanged(){this.detachSymbolChanged(),this._graphicSymbolChangedHandle=r((()=>this.graphic?.symbol),(e=>{s(e)&&e!==this.focusedSymbol&&e!==this._originalSymbol&&(this._originalSymbol=e,this._focused&&s(this.focusedSymbol)&&(this.graphic.symbol=this.focusedSymbol))}),l)}detachSymbolChanged(){s(this._graphicSymbolChangedHandle)&&(this._graphicSymbolChangedHandle.remove(),this._graphicSymbolChangedHandle=null)}_updateGraphicSymbol(){this.graphic.symbol=this._focused&&s(this.focusedSymbol)?this.focusedSymbol:this._originalSymbol}_resetGraphicSymbol(){this.graphic.symbol=this._originalSymbol}_intersectDistance2D(e,t,i,r){if(r=r||_(i),o(r))return null;const l=1;let c=this._circleCollisionCache;if("point"!==i.type||"simple-marker"!==r.type)return S(t,i,e)?l:null;if(o(c)||!c.originalPoint.equals(i)){const t=i,o=e.spatialReference;if(g(t.spatialReference,o)){const e=b(t,o);c={originalPoint:t.clone(),mapPoint:e,radiusPx:a(r.size)},this._circleCollisionCache=c}}if(s(c)){const i=n(t,D),o=e.toScreen(c.mapPoint),s=c.radiusPx,h=o.x+a(r.xoffset),p=o.y-a(r.yoffset);return m(i,[h,p])<s*s?l:null}return null}_intersectDistance3D(e,t,i){const o=e.toMap(t,{include:[i]});return o&&d(o,j,e.renderSpatialReference)?u(j,e.state.camera.eye):null}};e([h({constructOnly:!0,nonNullable:!0})],C.prototype,"graphic",null),e([h()],C.prototype,"elevationInfo",null),e([h({constructOnly:!0,nonNullable:!0})],C.prototype,"view",void 0),e([h({value:null})],C.prototype,"focusedSymbol",null),e([h({constructOnly:!0})],C.prototype,"layer",void 0),e([h()],C.prototype,"interactive",void 0),e([h()],C.prototype,"selectable",void 0),e([h()],C.prototype,"grabbable",void 0),e([h({value:!1})],C.prototype,"grabbing",null),e([h()],C.prototype,"dragging",void 0),e([h()],C.prototype,"hovering",null),e([h({value:!1})],C.prototype,"selected",null),e([h()],C.prototype,"cursor",void 0),C=e([p("esri.views.interactive.GraphicManipulator")],C);const j=y(),D=c();export{C as GraphicManipulator};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import i from"../../core/Logger.js";import{isNone as o}from"../../core/maybe.js";import{createResolver as s}from"../../core/promiseUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{isDOMContainer as n}from"../DOMContainer.js";import{EditableFlag as l}from"./interfaces.js";import{ManipulatorCollection as h}from"./ManipulatorCollection.js";const p=i.getLogger("esri.views.interactive.InteractiveToolBase");let c=class extends e{constructor(t){super(t),this.created=!1,this.manipulators=new h,this.updating=!1,this.preferManipulatorCursor=!1,this.automaticManipulatorSelection=!0,this._editableFlags=new Map([[l.MANAGER,!0],[l.USER,!0]]),this._creationFinishedResolver=s()}get active(){return null!=this.view&&this.view.activeTool===this}set visible(t){this._get("visible")!==t&&(this._set("visible",t),this._syncVisible())}get editable(){return this.getEditableFlag(l.USER)}set editable(t){this.setEditableFlag(l.USER,t)}get cursor(){return null}destroy(){this.manipulators.destroy(),this._set("view",null)}onAdd(){this._syncVisible()}activate(){o(this.view)?p.error("Can't activate tool if view is not defined."):(n(this.view)&&this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}handleInputEvent(t){this.onInputEvent(t)}handleInputEventAfter(t){this.onInputEventAfter(t)}setEditableFlag(t,e){this._editableFlags.set(t,e),this.manipulators.isToolEditable=this.internallyEditable,this._updateManipulatorAttachment(),t===l.USER&&this.notifyChange("editable"),this.onEditableChange()}getEditableFlag(t){return this._editableFlags.get(t)}whenCreated(){return this._creationFinishedResolver.promise}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(t){}onInputEventAfter(t){}get internallyEditable(){return this.getEditableFlag(l.USER)&&this.getEditableFlag(l.MANAGER)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this),this._set("created",!0)}_syncVisible(){if(this.constructed)if(this.visible)this._show();else if(this._hide(),this.active)return void(this.view.activeTool=null)}_show(){this._updateManipulatorAttachment(),this.onShow()}_hide(){this._updateManipulatorAttachment(),this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};t([r({constructOnly:!0})],c.prototype,"view",void 0),t([r({readOnly:!0})],c.prototype,"active",null),t([r({value:!0})],c.prototype,"visible",null),t([r({value:!0})],c.prototype,"editable",null),t([r({readOnly:!0})],c.prototype,"created",void 0),t([r({readOnly:!0})],c.prototype,"manipulators",void 0),t([r({readOnly:!0})],c.prototype,"updating",void 0),t([r()],c.prototype,"cursor",null),t([r({readOnly:!0})],c.prototype,"preferManipulatorCursor",void 0),t([r({readOnly:!0})],c.prototype,"automaticManipulatorSelection",void 0),c=t([a("esri.views.interactive.InteractiveToolBase")],c);export{c as InteractiveToolBase};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import i from"../../core/Logger.js";import{isNone as o}from"../../core/maybe.js";import{createResolver as s}from"../../core/promiseUtils.js";import{property as r}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as a}from"../../core/accessorSupport/decorators/subclass.js";import{isDOMContainer as n}from"../DOMContainer.js";import{EditableFlag as l}from"./interfaces.js";import{ManipulatorCollection as p}from"./ManipulatorCollection.js";const h=i.getLogger("esri.views.interactive.InteractiveToolBase");let c=class extends e{constructor(t){super(t),this.created=!1,this.manipulators=new p,this.preferManipulatorCursor=!1,this.automaticManipulatorSelection=!0,this.hasFocusedManipulators=!1,this._editableFlags=new Map([[l.MANAGER,!0],[l.USER,!0]]),this._creationFinishedResolver=s()}get active(){return null!=this.view&&this.view.activeTool===this}set visible(t){this._get("visible")!==t&&(this._set("visible",t),this._syncVisible())}get editable(){return this.getEditableFlag(l.USER)}set editable(t){this.setEditableFlag(l.USER,t)}get updating(){return!1}get cursor(){return null}destroy(){this.manipulators.destroy(),this._set("view",null)}onAdd(){this._syncVisible()}activate(){o(this.view)?h.error("Can't activate tool if view is not defined."):(n(this.view)&&this.view.focus(),this.onActivate())}deactivate(){this.onDeactivate()}handleInputEvent(t){this.onInputEvent(t)}handleInputEventAfter(t){this.onInputEventAfter(t)}setEditableFlag(t,e){this._editableFlags.set(t,e),this.manipulators.isToolEditable=this.internallyEditable,this._updateManipulatorAttachment(),t===l.USER&&this.notifyChange("editable"),this.onEditableChange()}getEditableFlag(t){return this._editableFlags.get(t)}whenCreated(){return this._creationFinishedResolver.promise}onActivate(){}onDeactivate(){}onShow(){}onHide(){}onEditableChange(){}onInputEvent(t){}onInputEventAfter(t){}get internallyEditable(){return this.getEditableFlag(l.USER)&&this.getEditableFlag(l.MANAGER)}finishToolCreation(){this.created||this._creationFinishedResolver.resolve(this),this._set("created",!0)}_syncVisible(){if(this.constructed)if(this.visible)this._show();else if(this._hide(),this.active)return void(this.view.activeTool=null)}_show(){this._updateManipulatorAttachment(),this.onShow()}_hide(){this._updateManipulatorAttachment(),this.onHide()}_updateManipulatorAttachment(){this.visible?this.manipulators.attach():this.manipulators.detach()}};t([r({constructOnly:!0})],c.prototype,"view",void 0),t([r({readOnly:!0})],c.prototype,"active",null),t([r({value:!0})],c.prototype,"visible",null),t([r({value:!0})],c.prototype,"editable",null),t([r({readOnly:!0})],c.prototype,"created",void 0),t([r({readOnly:!0})],c.prototype,"manipulators",void 0),t([r({readOnly:!0})],c.prototype,"updating",null),t([r()],c.prototype,"cursor",null),t([r({readOnly:!0})],c.prototype,"preferManipulatorCursor",void 0),t([r({readOnly:!0})],c.prototype,"automaticManipulatorSelection",void 0),t([r()],c.prototype,"hasFocusedManipulators",void 0),c=t([a("esri.views.interactive.InteractiveToolBase")],c);export{c as InteractiveToolBase};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.24/esri/copyright.txt for details.
4
4
  */
5
- import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import{makeHandle as s}from"../../core/handleUtils.js";import{equalsShallow as o}from"../../core/lang.js";import{isSome as i,isNone as r,applySome as a}from"../../core/maybe.js";import{createTask as n,throwIfAborted as l}from"../../core/promiseUtils.js";import{formatLength as p}from"../../core/quantityFormatUtils.js";import{watch as d,on as c}from"../../core/reactiveUtils.js";import{property as h}from"../../core/accessorSupport/decorators/property.js";import"../../core/accessorSupport/ensureType.js";import{subclass as m}from"../../core/accessorSupport/decorators/subclass.js";import{fetchMessageBundle as b}from"../../intl/messages.js";import{euclideanDirectDistance as _}from"../support/lengthMeasurementUtils.js";let u=class extends e{constructor(t){super(t),this.context=null,this.stagedEdge=null,this.visible=!0,this._messagesUnits=null,this._labels=[],this._nextLabelIndex=0}initialize(){const t=n((async t=>{this._messagesUnits=await b("esri/core/t9n/Units"),l(t),this._update()})),e=()=>a(this.context,(t=>t.editGeometryOperations));this.own([d((()=>{const t=this.context;return{context:t,stationary:i(t)&&t.view.stationary,visible:this.visible,stagedEdge:this.stagedEdge}}),(({stationary:t})=>{t&&this._update()}),{sync:!0,equals:o}),...["vertex-add","vertex-update","vertex-remove"].map((t=>c(e,t,(()=>this._update())))),s((()=>t.abort()))])}destroy(){this._nextLabelIndex=0;const t=this._labels;for(;t.length;)t.pop().destroy()}get updating(){return r(this._messagesUnits)}_update(){this._nextLabelIndex=0;const t=this.context;if(i(t)){for(const e of t.editGeometryOperations.data.components)for(const s of e.edges)this._addLabel(t,s.leftVertex.pos,s.rightVertex.pos);a(this.stagedEdge,(e=>this._addLabel(t,e[0],e[1])))}this._destroyUnusedLabels()}_addLabel(t,e,s){const o=this._getOrCreateLabel(t);if(this.screenDistanceSquared(t,e,s)<g)return void(o.visible=!1);const{coordinateHelper:r,spatialReference:a}=t.editGeometryOperations.data,n=_(r.toXYZ(e),r.toXYZ(s),a);o.text=i(this._messagesUnits)&&i(n)?p(this._messagesUnits,n,"metric"):"",o.visible=this.visible,this.positionLabel(t,o,e,s)}_getOrCreateLabel(t){if(this._labels.length>this._nextLabelIndex)return this._labels[this._nextLabelIndex++];const e=this.createLabel(t);return this._labels.push(e),this._nextLabelIndex=this._labels.length,e}_destroyUnusedLabels(){const t=this._labels;for(;t.length>this._nextLabelIndex;)t.pop().destroy()}};t([h()],u.prototype,"context",void 0),t([h()],u.prototype,"stagedEdge",void 0),t([h()],u.prototype,"visible",void 0),t([h()],u.prototype,"updating",null),t([h()],u.prototype,"_messagesUnits",void 0),t([h()],u.prototype,"_labels",void 0),t([h()],u.prototype,"_nextLabelIndex",void 0),u=t([m("esri.views.interactive")],u);const g=3025;export{u as SegmentLabels};
5
+ import{_ as t}from"../../chunks/tslib.es6.js";import e from"../../core/Accessor.js";import{makeHandle as s}from"../../core/handleUtils.js";import{isNone as o,isSome as r,applySome as i}from"../../core/maybe.js";import{createTask as a,throwIfAborted as n}from"../../core/promiseUtils.js";import{formatLength as l}from"../../core/quantityFormatUtils.js";import{watch as h,on as c}from"../../core/reactiveUtils.js";import{createScreenPointArray as p}from"../../core/screenUtils.js";import{property as m}from"../../core/accessorSupport/decorators/property.js";import"../../core/arrayUtils.js";import"../../core/has.js";import"../../core/accessorSupport/ensureType.js";import{subclass as d}from"../../core/accessorSupport/decorators/subclass.js";import{s as b,a as f,i as u,f as _,l as x,b as y}from"../../chunks/vec2.js";import{a as g}from"../../chunks/vec2f64.js";import{z as v}from"../../chunks/vec3.js";import{isClockwise as j}from"../../geometry/support/coordsUtils.js";import{fetchMessageBundle as L}from"../../intl/messages.js";import U from"../overlay/TextOverlayItem.js";import{euclideanDirectDistance as I}from"../support/lengthMeasurementUtils.js";let O=class extends e{constructor(t){super(t),this.context=null,this.stagedVertex=null,this.visible=!0,this._messagesUnits=null,this._labelInfos=[],this._nextLabelIndex=0}initialize(){const t=a((async t=>{this._messagesUnits=await L("esri/core/t9n/Units"),n(t),this._update()})),e=()=>i(this.context,(t=>t.editGeometryOperations));this.own([h((()=>({cameraOrExtent:r(this.context)&&this.getCameraOrExtent(this.context),visible:this.visible,stagedVertex:this.stagedVertex})),(()=>this._update())),...["vertex-add","vertex-update","vertex-remove"].map((t=>c(e,t,(()=>this._update())))),s((()=>t.abort()))])}destroy(){for(this._nextLabelIndex=0;this._labelInfos.length;)this._destroyLabel(this._labelInfos.pop())}get updating(){return o(this._messagesUnits)}_update(){this._nextLabelIndex=0;const t=this.context;if(o(t))return void this._destroyUnusedLabels();const{components:e,geometry:s,coordinateHelper:i}=t.editGeometryOperations.data;if(!s)return void this._destroyUnusedLabels();const{hasZ:a,hasM:n}=s,l=e.length;for(let o=0;o<l;++o){const h=e[o].vertices.map((t=>i.toXYZ(t.pos)));if(0===o&&r(this.stagedVertex)&&h.push(i.toXYZ(this.stagedVertex)),h.length<2)continue;const c=h[0],p=h[h.length-1];"polygon"===s.type&&h.length>2&&!v(c,p)&&h.push(c);const m=1===l&&!j(h,n,a);let d=V,b=k;this.toScreenPointArray(t,c,d);for(let e=1;e<h.length;++e){const s=h[e-1],o=h[e];this.toScreenPointArray(t,o,b),this._addLabel(t,s,d,o,b,m),[d,b]=[b,d]}}this._destroyUnusedLabels()}_addLabel(t,e,s,o,i,a){const{label:n}=this._getOrCreateLabel(t);if(!this.visible||b(s,i)<M)return void(n.visible=!1);const h=I(e,o,t.editGeometryOperations.data.spatialReference),c=this._messagesUnits;n.text=r(c)&&r(h)?l(c,h,"metric"):"",n.visible=!0;const p=i[0]-s[0],m=i[1]-s[1];a?f(w,-m,p):f(w,m,-p),u(w,w),_(w,w,z),x(S,s,i,.5),y(S,S,w),n.position=[S[0],S[1]],Math.abs(w[0])>Math.abs(w[1])?n.anchor=w[0]>0?"left":"right":n.anchor=-w[1]<0?"top":"bottom"}_getOrCreateLabel(t){if(this._labelInfos.length>this._nextLabelIndex)return this._labelInfos[this._nextLabelIndex++];const e=new U({fontSize:10,anchor:"center"});t.view.overlay.items.add(e);const s={label:e};return this._labelInfos.push(s),this._nextLabelIndex=this._labelInfos.length,s}_destroyUnusedLabels(){for(;this._labelInfos.length>this._nextLabelIndex;)this._destroyLabel(this._labelInfos.pop())}_destroyLabel({label:t}){i(this.context,(e=>e.view.overlay.items.remove(t))),t.destroy()}};t([m()],O.prototype,"context",void 0),t([m()],O.prototype,"stagedVertex",void 0),t([m()],O.prototype,"visible",void 0),t([m()],O.prototype,"updating",null),t([m()],O.prototype,"_messagesUnits",void 0),O=t([d("esri.views.interactive")],O);const w=g(),S=g(),V=p(),k=p(),M=3025,z=15;export{O as SegmentLabels};