@arcgis/core 4.34.0-next.11 → 4.34.0-next.13

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 (623) hide show
  1. package/applications/Components/stringUtils.d.ts +6 -0
  2. package/applications/Components/stringUtils.js +5 -0
  3. package/arcade/Dictionary.js +1 -1
  4. package/arcade/Feature.js +1 -1
  5. package/arcade/arcadeAsyncRuntime.js +1 -1
  6. package/arcade/arcadeCompiler.js +1 -1
  7. package/arcade/arcadeRuntime.js +1 -1
  8. package/arcade/containerUtils.js +1 -1
  9. package/arcade/deepClone.js +1 -1
  10. package/arcade/featureSetUtils.js +1 -1
  11. package/arcade/featureset/actions/Adapted.js +1 -1
  12. package/arcade/featureset/sources/FeatureLayerDynamic.js +1 -1
  13. package/arcade/functions/convertdirection.js +1 -1
  14. package/arcade/functions/date.js +1 -1
  15. package/arcade/functions/feature.js +1 -1
  16. package/arcade/functions/featuresetbase.js +1 -1
  17. package/arcade/functions/featuresetgeom.js +1 -1
  18. package/arcade/functions/featuresetstats.js +1 -1
  19. package/arcade/functions/featuresetstring.js +1 -1
  20. package/arcade/functions/fieldStats.js +1 -1
  21. package/arcade/functions/geomasync.js +1 -1
  22. package/arcade/functions/geometry.js +1 -1
  23. package/arcade/functions/geomsync.js +1 -1
  24. package/arcade/functions/knowledgegraph.js +1 -1
  25. package/arcade/functions/maths.js +1 -1
  26. package/arcade/functions/stats.js +1 -1
  27. package/arcade/functions/string.js +1 -1
  28. package/arcade/geometry/constructors.js +1 -1
  29. package/arcade/geometry/functions.js +1 -1
  30. package/arcade/languageUtils.js +1 -1
  31. package/arcade.js +1 -1
  32. package/assets/esri/core/workers/RemoteClient.js +1 -1
  33. package/assets/esri/core/workers/chunks/0229c573fa8a2fff2d8b.js.LICENSE.txt +1 -1
  34. package/assets/esri/core/workers/chunks/{9f964467f7353039dd9c.js → 0b21651eb93efe9ce089.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{e0ae33206f519b159b49.js → 0eeb0dce918e4827309a.js} +1 -1
  36. package/assets/esri/core/workers/chunks/0ff6f15d46d7ddf6fe4d.js +1 -0
  37. package/assets/esri/core/workers/chunks/{e385a27fd1ac2123a05f.js → 178260e8a263f2f1584f.js} +1 -1
  38. package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js → 17fcdaeb42e932712096.js} +2 -2
  39. package/assets/esri/core/workers/chunks/{28b1819bf744ce957dfd.js.LICENSE.txt → 17fcdaeb42e932712096.js.LICENSE.txt} +1 -1
  40. package/assets/esri/core/workers/chunks/{3ae2e9f469020f777d9f.js → 183a7dec68c8ba6eb3d6.js} +1 -1
  41. package/assets/esri/core/workers/chunks/{52c34d6ecd9d45a33e69.js → 275a724c18bd15591e3c.js} +1 -1
  42. package/assets/esri/core/workers/chunks/29fb64826bb1351aca8d.js.LICENSE.txt +1 -1
  43. package/assets/esri/core/workers/chunks/{0039dee1337160366112.js → 3145218abe59b5e99ff8.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{dea3e131bbd48cc48e1a.js → 369978472cc9ee6a00b5.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{539541dec5fcf3b657aa.js → 3f58da371633967a61ca.js} +1 -1
  46. package/assets/esri/core/workers/chunks/{d0372bac0c5f4fbed468.js → 3f59a73f9a758095976f.js} +1 -1
  47. package/assets/esri/core/workers/chunks/{f48eb59b94ba8b7d4d72.js → 4079e307a0fce4516aa4.js} +1 -1
  48. package/assets/esri/core/workers/chunks/{a2e9141ff4efd13413a1.js → 4a805e7a57d25c4b595f.js} +2 -2
  49. package/assets/esri/core/workers/chunks/53ff5b7691ba1444358e.js +1 -0
  50. package/assets/esri/core/workers/chunks/54f981fe0f8851767be9.js.LICENSE.txt +1 -1
  51. package/assets/esri/core/workers/chunks/{a6fb75929e456f87f804.js → 58b2dc0ec977af7413b0.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{92a5dccb328229a9336b.js → 58f92100b1b2343111c6.js} +1 -1
  53. package/assets/esri/core/workers/chunks/5cc5f32b474ee723e192.js +1 -0
  54. package/assets/esri/core/workers/chunks/5dcc8fa321f0a7c49f36.js +1 -0
  55. package/assets/esri/core/workers/chunks/64f5f27e7c5649d79cbc.js +1 -0
  56. package/assets/esri/core/workers/chunks/64fc44f99486c7ffe6fa.js +1 -0
  57. package/assets/esri/core/workers/chunks/658e82c9b722852e02d0.js +1 -0
  58. package/assets/esri/core/workers/chunks/{6b0ae9ccdd1acef5b5b4.js → 679d7baea233faf3fdbc.js} +1 -1
  59. package/assets/esri/core/workers/chunks/73ddb356121add556994.js.LICENSE.txt +1 -1
  60. package/assets/esri/core/workers/chunks/8a87c181b85d0b86b9bb.js.LICENSE.txt +1 -1
  61. package/assets/esri/core/workers/chunks/8b93cd4132934b0d7d39.js +1 -0
  62. package/assets/esri/core/workers/chunks/97b69fec3e87f11210ba.js +1 -0
  63. package/assets/esri/core/workers/chunks/{fda48126f67e80034404.js → 998819aade3898f52414.js} +1 -1
  64. package/assets/esri/core/workers/chunks/9a87c367ee5ba44f3081.js +1 -0
  65. package/assets/esri/core/workers/chunks/{427318722815bef1496b.js → a08ce98672ab94d19613.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{6d90887dc605261dd7b3.js → a250a5c6e055e33bd25c.js} +1 -1
  67. package/assets/esri/core/workers/chunks/aad9a693813b47a51530.js.LICENSE.txt +1 -1
  68. package/assets/esri/core/workers/chunks/b72137c63b7f2a525d9e.js +1 -0
  69. package/assets/esri/core/workers/chunks/b8c8acf75e09014d8346.js +1 -0
  70. package/assets/esri/core/workers/chunks/c2264451d12f1fbaad22.js +1 -0
  71. package/assets/esri/core/workers/chunks/c6c86cbe65a58c3093ae.js +1 -0
  72. package/assets/esri/core/workers/chunks/{562800b0af52a38a311b.js → cf25f487fe4eb1579aee.js} +1 -1
  73. package/assets/esri/core/workers/chunks/e717832326d1b1f817d3.js +1 -0
  74. package/assets/esri/core/workers/chunks/{bd2dcc55ac3418421ee5.js → f20ba89ac21f05b7020c.js} +1 -1
  75. package/assets/esri/core/workers/chunks/f3b51aa0a1a8fc3b231c.js.LICENSE.txt +1 -1
  76. package/assets/esri/core/workers/chunks/{a41f9b6deff08196566e.js → fa894be8cfb6ed485df9.js} +1 -1
  77. package/assets/esri/core/workers/chunks/fe3703ec198cbfebec30.js +1 -0
  78. package/assets/esri/themes/base/widgets/_BuildingPhasePicker.scss +7 -1
  79. package/assets/esri/themes/base/widgets/_TimeSlider.scss +1 -0
  80. package/assets/esri/themes/dark/main.css +1 -1
  81. package/assets/esri/themes/light/main.css +1 -1
  82. package/assets/esri/themes/light/view.css +1 -1
  83. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ar.json +1 -1
  84. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bg.json +1 -1
  85. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_bs.json +1 -1
  86. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ca.json +1 -1
  87. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_cs.json +1 -1
  88. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_da.json +1 -1
  89. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_de.json +1 -1
  90. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_el.json +1 -1
  91. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_es.json +1 -1
  92. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_et.json +1 -1
  93. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fi.json +1 -1
  94. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_fr.json +1 -1
  95. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_he.json +1 -1
  96. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hr.json +1 -1
  97. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_hu.json +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_id.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_it.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ja.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ko.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lt.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_lv.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_nl.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_no.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pl.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-BR.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_pt-PT.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ro.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_ru.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sk.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sl.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sr.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_sv.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_th.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_tr.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_uk.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_vi.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-CN.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-HK.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/BatchAttributeForm_zh-TW.json +1 -1
  122. package/assets/esri/widgets/Directions/t9n/Directions_ar.json +1 -1
  123. package/assets/esri/widgets/Directions/t9n/Directions_bg.json +1 -1
  124. package/assets/esri/widgets/Directions/t9n/Directions_bs.json +1 -1
  125. package/assets/esri/widgets/Directions/t9n/Directions_ca.json +1 -1
  126. package/assets/esri/widgets/Directions/t9n/Directions_cs.json +1 -1
  127. package/assets/esri/widgets/Directions/t9n/Directions_da.json +1 -1
  128. package/assets/esri/widgets/Directions/t9n/Directions_de.json +1 -1
  129. package/assets/esri/widgets/Directions/t9n/Directions_el.json +1 -1
  130. package/assets/esri/widgets/Directions/t9n/Directions_es.json +1 -1
  131. package/assets/esri/widgets/Directions/t9n/Directions_et.json +1 -1
  132. package/assets/esri/widgets/Directions/t9n/Directions_fi.json +1 -1
  133. package/assets/esri/widgets/Directions/t9n/Directions_fr.json +1 -1
  134. package/assets/esri/widgets/Directions/t9n/Directions_he.json +1 -1
  135. package/assets/esri/widgets/Directions/t9n/Directions_hr.json +1 -1
  136. package/assets/esri/widgets/Directions/t9n/Directions_hu.json +1 -1
  137. package/assets/esri/widgets/Directions/t9n/Directions_id.json +1 -1
  138. package/assets/esri/widgets/Directions/t9n/Directions_it.json +1 -1
  139. package/assets/esri/widgets/Directions/t9n/Directions_ja.json +1 -1
  140. package/assets/esri/widgets/Directions/t9n/Directions_ko.json +1 -1
  141. package/assets/esri/widgets/Directions/t9n/Directions_lt.json +1 -1
  142. package/assets/esri/widgets/Directions/t9n/Directions_lv.json +1 -1
  143. package/assets/esri/widgets/Directions/t9n/Directions_nl.json +1 -1
  144. package/assets/esri/widgets/Directions/t9n/Directions_no.json +1 -1
  145. package/assets/esri/widgets/Directions/t9n/Directions_pl.json +1 -1
  146. package/assets/esri/widgets/Directions/t9n/Directions_pt-BR.json +1 -1
  147. package/assets/esri/widgets/Directions/t9n/Directions_pt-PT.json +1 -1
  148. package/assets/esri/widgets/Directions/t9n/Directions_ro.json +1 -1
  149. package/assets/esri/widgets/Directions/t9n/Directions_ru.json +1 -1
  150. package/assets/esri/widgets/Directions/t9n/Directions_sk.json +1 -1
  151. package/assets/esri/widgets/Directions/t9n/Directions_sl.json +1 -1
  152. package/assets/esri/widgets/Directions/t9n/Directions_sr.json +1 -1
  153. package/assets/esri/widgets/Directions/t9n/Directions_sv.json +1 -1
  154. package/assets/esri/widgets/Directions/t9n/Directions_th.json +1 -1
  155. package/assets/esri/widgets/Directions/t9n/Directions_tr.json +1 -1
  156. package/assets/esri/widgets/Directions/t9n/Directions_uk.json +1 -1
  157. package/assets/esri/widgets/Directions/t9n/Directions_vi.json +1 -1
  158. package/assets/esri/widgets/Directions/t9n/Directions_zh-CN.json +1 -1
  159. package/assets/esri/widgets/Directions/t9n/Directions_zh-HK.json +1 -1
  160. package/assets/esri/widgets/Directions/t9n/Directions_zh-TW.json +1 -1
  161. package/assets/esri/widgets/Editor/t9n/Editor_ar.json +1 -1
  162. package/assets/esri/widgets/Editor/t9n/Editor_bg.json +1 -1
  163. package/assets/esri/widgets/Editor/t9n/Editor_bs.json +1 -1
  164. package/assets/esri/widgets/Editor/t9n/Editor_ca.json +1 -1
  165. package/assets/esri/widgets/Editor/t9n/Editor_cs.json +1 -1
  166. package/assets/esri/widgets/Editor/t9n/Editor_da.json +1 -1
  167. package/assets/esri/widgets/Editor/t9n/Editor_de.json +1 -1
  168. package/assets/esri/widgets/Editor/t9n/Editor_el.json +1 -1
  169. package/assets/esri/widgets/Editor/t9n/Editor_es.json +1 -1
  170. package/assets/esri/widgets/Editor/t9n/Editor_et.json +1 -1
  171. package/assets/esri/widgets/Editor/t9n/Editor_fi.json +1 -1
  172. package/assets/esri/widgets/Editor/t9n/Editor_fr.json +1 -1
  173. package/assets/esri/widgets/Editor/t9n/Editor_he.json +1 -1
  174. package/assets/esri/widgets/Editor/t9n/Editor_hr.json +1 -1
  175. package/assets/esri/widgets/Editor/t9n/Editor_hu.json +1 -1
  176. package/assets/esri/widgets/Editor/t9n/Editor_id.json +1 -1
  177. package/assets/esri/widgets/Editor/t9n/Editor_it.json +1 -1
  178. package/assets/esri/widgets/Editor/t9n/Editor_ja.json +1 -1
  179. package/assets/esri/widgets/Editor/t9n/Editor_ko.json +1 -1
  180. package/assets/esri/widgets/Editor/t9n/Editor_lt.json +1 -1
  181. package/assets/esri/widgets/Editor/t9n/Editor_lv.json +1 -1
  182. package/assets/esri/widgets/Editor/t9n/Editor_nl.json +1 -1
  183. package/assets/esri/widgets/Editor/t9n/Editor_no.json +1 -1
  184. package/assets/esri/widgets/Editor/t9n/Editor_pl.json +1 -1
  185. package/assets/esri/widgets/Editor/t9n/Editor_pt-BR.json +1 -1
  186. package/assets/esri/widgets/Editor/t9n/Editor_pt-PT.json +1 -1
  187. package/assets/esri/widgets/Editor/t9n/Editor_ro.json +1 -1
  188. package/assets/esri/widgets/Editor/t9n/Editor_ru.json +1 -1
  189. package/assets/esri/widgets/Editor/t9n/Editor_sk.json +1 -1
  190. package/assets/esri/widgets/Editor/t9n/Editor_sl.json +1 -1
  191. package/assets/esri/widgets/Editor/t9n/Editor_sr.json +1 -1
  192. package/assets/esri/widgets/Editor/t9n/Editor_sv.json +1 -1
  193. package/assets/esri/widgets/Editor/t9n/Editor_th.json +1 -1
  194. package/assets/esri/widgets/Editor/t9n/Editor_tr.json +1 -1
  195. package/assets/esri/widgets/Editor/t9n/Editor_uk.json +1 -1
  196. package/assets/esri/widgets/Editor/t9n/Editor_vi.json +1 -1
  197. package/assets/esri/widgets/Editor/t9n/Editor_zh-CN.json +1 -1
  198. package/assets/esri/widgets/Editor/t9n/Editor_zh-HK.json +1 -1
  199. package/assets/esri/widgets/Editor/t9n/Editor_zh-TW.json +1 -1
  200. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ar.json +1 -1
  201. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bg.json +1 -1
  202. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_bs.json +1 -1
  203. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ca.json +1 -1
  204. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_cs.json +1 -1
  205. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_da.json +1 -1
  206. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_de.json +1 -1
  207. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_el.json +1 -1
  208. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_es.json +1 -1
  209. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_et.json +1 -1
  210. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fi.json +1 -1
  211. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_fr.json +1 -1
  212. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_he.json +1 -1
  213. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hr.json +1 -1
  214. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_hu.json +1 -1
  215. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_id.json +1 -1
  216. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_it.json +1 -1
  217. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ja.json +1 -1
  218. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ko.json +1 -1
  219. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lt.json +1 -1
  220. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_lv.json +1 -1
  221. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_nl.json +1 -1
  222. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_no.json +1 -1
  223. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pl.json +1 -1
  224. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-BR.json +1 -1
  225. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_pt-PT.json +1 -1
  226. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ro.json +1 -1
  227. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_ru.json +1 -1
  228. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sk.json +1 -1
  229. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sl.json +1 -1
  230. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sr.json +1 -1
  231. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_sv.json +1 -1
  232. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_th.json +1 -1
  233. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_tr.json +1 -1
  234. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_uk.json +1 -1
  235. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_vi.json +1 -1
  236. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-CN.json +1 -1
  237. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-HK.json +1 -1
  238. package/assets/esri/widgets/FeatureForm/t9n/FeatureForm_zh-TW.json +1 -1
  239. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ar.json +1 -1
  240. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bg.json +1 -1
  241. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_bs.json +1 -1
  242. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ca.json +1 -1
  243. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_cs.json +1 -1
  244. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_da.json +1 -1
  245. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_de.json +1 -1
  246. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_el.json +1 -1
  247. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_es.json +1 -1
  248. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_et.json +1 -1
  249. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fi.json +1 -1
  250. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_fr.json +1 -1
  251. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_he.json +1 -1
  252. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hr.json +1 -1
  253. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_hu.json +1 -1
  254. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_id.json +1 -1
  255. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_it.json +1 -1
  256. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ja.json +1 -1
  257. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ko.json +1 -1
  258. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lt.json +1 -1
  259. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_lv.json +1 -1
  260. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_nl.json +1 -1
  261. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_no.json +1 -1
  262. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pl.json +1 -1
  263. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-BR.json +1 -1
  264. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_pt-PT.json +1 -1
  265. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ro.json +1 -1
  266. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_ru.json +1 -1
  267. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sk.json +1 -1
  268. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sl.json +1 -1
  269. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sr.json +1 -1
  270. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_sv.json +1 -1
  271. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_th.json +1 -1
  272. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_tr.json +1 -1
  273. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_uk.json +1 -1
  274. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_vi.json +1 -1
  275. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-CN.json +1 -1
  276. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-HK.json +1 -1
  277. package/assets/esri/widgets/FeatureTable/t9n/FeatureTable_zh-TW.json +1 -1
  278. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
  279. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
  280. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
  281. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
  282. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
  283. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
  284. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
  285. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
  286. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
  287. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
  288. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
  289. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
  290. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
  291. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
  292. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
  293. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
  294. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
  295. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
  296. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
  297. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
  298. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
  299. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
  300. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_no.json +1 -1
  301. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
  302. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
  303. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
  304. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
  305. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
  306. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
  307. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
  308. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
  309. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
  310. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
  311. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
  312. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
  313. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
  314. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
  315. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
  316. package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
  317. package/assets/esri/widgets/Search/t9n/Search_ar.json +1 -1
  318. package/assets/esri/widgets/Search/t9n/Search_bg.json +1 -1
  319. package/assets/esri/widgets/Search/t9n/Search_bs.json +1 -1
  320. package/assets/esri/widgets/Search/t9n/Search_ca.json +1 -1
  321. package/assets/esri/widgets/Search/t9n/Search_cs.json +1 -1
  322. package/assets/esri/widgets/Search/t9n/Search_da.json +1 -1
  323. package/assets/esri/widgets/Search/t9n/Search_de.json +1 -1
  324. package/assets/esri/widgets/Search/t9n/Search_el.json +1 -1
  325. package/assets/esri/widgets/Search/t9n/Search_es.json +1 -1
  326. package/assets/esri/widgets/Search/t9n/Search_et.json +1 -1
  327. package/assets/esri/widgets/Search/t9n/Search_fi.json +1 -1
  328. package/assets/esri/widgets/Search/t9n/Search_fr.json +1 -1
  329. package/assets/esri/widgets/Search/t9n/Search_he.json +1 -1
  330. package/assets/esri/widgets/Search/t9n/Search_hr.json +1 -1
  331. package/assets/esri/widgets/Search/t9n/Search_hu.json +1 -1
  332. package/assets/esri/widgets/Search/t9n/Search_id.json +1 -1
  333. package/assets/esri/widgets/Search/t9n/Search_it.json +1 -1
  334. package/assets/esri/widgets/Search/t9n/Search_ja.json +1 -1
  335. package/assets/esri/widgets/Search/t9n/Search_ko.json +1 -1
  336. package/assets/esri/widgets/Search/t9n/Search_lt.json +1 -1
  337. package/assets/esri/widgets/Search/t9n/Search_lv.json +1 -1
  338. package/assets/esri/widgets/Search/t9n/Search_nl.json +1 -1
  339. package/assets/esri/widgets/Search/t9n/Search_no.json +1 -1
  340. package/assets/esri/widgets/Search/t9n/Search_pl.json +1 -1
  341. package/assets/esri/widgets/Search/t9n/Search_pt-BR.json +1 -1
  342. package/assets/esri/widgets/Search/t9n/Search_pt-PT.json +1 -1
  343. package/assets/esri/widgets/Search/t9n/Search_ro.json +1 -1
  344. package/assets/esri/widgets/Search/t9n/Search_ru.json +1 -1
  345. package/assets/esri/widgets/Search/t9n/Search_sk.json +1 -1
  346. package/assets/esri/widgets/Search/t9n/Search_sl.json +1 -1
  347. package/assets/esri/widgets/Search/t9n/Search_sr.json +1 -1
  348. package/assets/esri/widgets/Search/t9n/Search_sv.json +1 -1
  349. package/assets/esri/widgets/Search/t9n/Search_th.json +1 -1
  350. package/assets/esri/widgets/Search/t9n/Search_tr.json +1 -1
  351. package/assets/esri/widgets/Search/t9n/Search_uk.json +1 -1
  352. package/assets/esri/widgets/Search/t9n/Search_vi.json +1 -1
  353. package/assets/esri/widgets/Search/t9n/Search_zh-CN.json +1 -1
  354. package/assets/esri/widgets/Search/t9n/Search_zh-HK.json +1 -1
  355. package/assets/esri/widgets/Search/t9n/Search_zh-TW.json +1 -1
  356. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ar.json +1 -1
  357. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bg.json +1 -1
  358. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_bs.json +1 -1
  359. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ca.json +1 -1
  360. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_cs.json +1 -1
  361. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_da.json +1 -1
  362. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_de.json +1 -1
  363. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_el.json +1 -1
  364. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_es.json +1 -1
  365. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_et.json +1 -1
  366. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fi.json +1 -1
  367. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_fr.json +1 -1
  368. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_he.json +1 -1
  369. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hr.json +1 -1
  370. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_hu.json +1 -1
  371. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_id.json +1 -1
  372. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_it.json +1 -1
  373. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ja.json +1 -1
  374. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ko.json +1 -1
  375. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lt.json +1 -1
  376. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_lv.json +1 -1
  377. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_nl.json +1 -1
  378. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_no.json +1 -1
  379. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pl.json +1 -1
  380. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-BR.json +1 -1
  381. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_pt-PT.json +1 -1
  382. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ro.json +1 -1
  383. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_ru.json +1 -1
  384. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sk.json +1 -1
  385. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sl.json +1 -1
  386. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sr.json +1 -1
  387. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_sv.json +1 -1
  388. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_th.json +1 -1
  389. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_tr.json +1 -1
  390. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_uk.json +1 -1
  391. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_vi.json +1 -1
  392. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-CN.json +1 -1
  393. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-HK.json +1 -1
  394. package/assets/esri/widgets/ShadowCast/t9n/ShadowCast_zh-TW.json +1 -1
  395. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ar.json +1 -1
  396. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bg.json +1 -1
  397. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_bs.json +1 -1
  398. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ca.json +1 -1
  399. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_cs.json +1 -1
  400. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_da.json +1 -1
  401. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_de.json +1 -1
  402. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_el.json +1 -1
  403. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_es.json +1 -1
  404. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_et.json +1 -1
  405. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fi.json +1 -1
  406. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_fr.json +1 -1
  407. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_he.json +1 -1
  408. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hr.json +1 -1
  409. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_hu.json +1 -1
  410. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_id.json +1 -1
  411. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_it.json +1 -1
  412. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ja.json +1 -1
  413. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ko.json +1 -1
  414. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lt.json +1 -1
  415. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_lv.json +1 -1
  416. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_nl.json +1 -1
  417. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_no.json +1 -1
  418. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pl.json +1 -1
  419. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-BR.json +1 -1
  420. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_pt-PT.json +1 -1
  421. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ro.json +1 -1
  422. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_ru.json +1 -1
  423. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sk.json +1 -1
  424. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sl.json +1 -1
  425. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sr.json +1 -1
  426. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_sv.json +1 -1
  427. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_th.json +1 -1
  428. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_tr.json +1 -1
  429. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_uk.json +1 -1
  430. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_vi.json +1 -1
  431. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-CN.json +1 -1
  432. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-HK.json +1 -1
  433. package/assets/esri/widgets/support/FilterBuilder/t9n/FilterBuilder_zh-TW.json +1 -1
  434. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ar.json +1 -1
  435. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bg.json +1 -1
  436. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_bs.json +1 -1
  437. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ca.json +1 -1
  438. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_cs.json +1 -1
  439. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_da.json +1 -1
  440. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_de.json +1 -1
  441. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_el.json +1 -1
  442. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_es.json +1 -1
  443. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_et.json +1 -1
  444. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fi.json +1 -1
  445. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_fr.json +1 -1
  446. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_he.json +1 -1
  447. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hr.json +1 -1
  448. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_hu.json +1 -1
  449. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_id.json +1 -1
  450. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_it.json +1 -1
  451. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ja.json +1 -1
  452. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ko.json +1 -1
  453. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lt.json +1 -1
  454. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_lv.json +1 -1
  455. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_nl.json +1 -1
  456. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_no.json +1 -1
  457. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pl.json +1 -1
  458. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-BR.json +1 -1
  459. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_pt-PT.json +1 -1
  460. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ro.json +1 -1
  461. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_ru.json +1 -1
  462. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sk.json +1 -1
  463. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sl.json +1 -1
  464. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sr.json +1 -1
  465. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_sv.json +1 -1
  466. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_th.json +1 -1
  467. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_tr.json +1 -1
  468. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_uk.json +1 -1
  469. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_vi.json +1 -1
  470. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-CN.json +1 -1
  471. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-HK.json +1 -1
  472. package/assets/esri/widgets/support/FilterCondition/t9n/FilterCondition_zh-TW.json +1 -1
  473. package/chunks/PointRenderer.glsl.js +2 -2
  474. package/chunks/aiServices.js +1 -1
  475. package/chunks/array.js +1 -1
  476. package/chunks/languageUtils.js +1 -1
  477. package/config.js +1 -1
  478. package/core/urlUtils.js +1 -1
  479. package/geometry/support/MeshTexture.js +1 -1
  480. package/geometry/support/coordsUtils.js +1 -1
  481. package/interfaces.d.ts +340 -94
  482. package/kernel.js +1 -1
  483. package/layers/CatalogLayer.js +1 -1
  484. package/layers/FeatureLayer.js +1 -1
  485. package/layers/VideoLayer.js +1 -1
  486. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  487. package/layers/knowledgeGraph/KnowledgeGraphSublayer.js +1 -1
  488. package/layers/mixins/ArcGISImageService.js +1 -1
  489. package/layers/mixins/FeatureLayerBase.js +1 -1
  490. package/layers/support/PlaybackInfo.d.ts +4 -0
  491. package/layers/support/arcgisLayers.js +1 -1
  492. package/layers/support/fetchService.js +1 -1
  493. package/layers/support/layerUtils.js +1 -1
  494. package/layers/support/rasterDatasets/FunctionRaster.js +1 -1
  495. package/networks/CircuitManager.js +1 -1
  496. package/networks/UnitIdentifierManager.js +1 -1
  497. package/package.json +2 -2
  498. package/portal/support/layersLoader.js +1 -1
  499. package/portal/support/loadUtils.js +1 -1
  500. package/portal/support/portalLayers.js +1 -1
  501. package/renderers/support/rendererConversion.js +1 -1
  502. package/rest/networks/circuits/alterCircuit.js +1 -1
  503. package/rest/networks/circuits/createCircuit.js +1 -1
  504. package/rest/networks/circuits/deleteCircuits.js +1 -1
  505. package/rest/networks/circuits/support/CircuitVerifyResult.js +1 -1
  506. package/rest/networks/circuits/support/EditCircuitsResult.js +5 -0
  507. package/rest/networks/circuits/support/ExportCircuitsResult.js +1 -1
  508. package/rest/networks/circuits/support/VerifyCircuitsResult.js +1 -1
  509. package/rest/networks/support/utils.js +5 -0
  510. package/rest/networks/unitIdentifiers/insertGap.js +1 -1
  511. package/rest/networks/unitIdentifiers/reset.js +1 -1
  512. package/rest/networks/unitIdentifiers/resize.js +1 -1
  513. package/rest/networks/unitIdentifiers/support/EditUnitIdentifiersResult.js +5 -0
  514. package/support/arcadeUtils.js +1 -1
  515. package/support/popupUtils.js +1 -1
  516. package/support/revision.js +1 -1
  517. package/symbols/support/symbolConversion.js +1 -1
  518. package/views/2d/engine/flow/dataUtils.js +1 -1
  519. package/views/2d/engine/webgl/shaderGraph/techniques/FeatureInstanceStore.js +1 -1
  520. package/views/2d/layers/FeatureLayerView2D.js +1 -1
  521. package/views/3d/FocusAreasView.js +1 -1
  522. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  523. package/views/3d/layers/FeatureLikeLayerView3D.js +1 -1
  524. package/views/3d/layers/FlowSubView3D.js +1 -1
  525. package/views/3d/layers/GraphicsLayerView3D.js +1 -1
  526. package/views/3d/layers/I3SMeshViewLabeler.js +1 -1
  527. package/views/3d/layers/ImageryLayerView3D.js +1 -1
  528. package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
  529. package/views/3d/layers/RouteLayerView3D.js +1 -1
  530. package/views/3d/layers/SceneLayerGraphicsView3D.js +1 -1
  531. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  532. package/views/3d/layers/graphics/Graphics3DGraphicsPipeline.js +1 -1
  533. package/views/3d/layers/graphics/Graphics3DSymbolLayer.js +1 -1
  534. package/views/3d/layers/graphics/GraphicsProcessor.js +1 -1
  535. package/views/3d/layers/graphics/Labeler.js +1 -1
  536. package/views/3d/state/controllers/PinchAndPanControllerGlobal.js +1 -1
  537. package/views/3d/state/controllers/PinchAndPanControllerLocal.js +1 -1
  538. package/views/3d/state/controllers/RotateController.js +1 -1
  539. package/views/3d/state/controllers/ZoomControllerGlobal.js +1 -1
  540. package/views/3d/state/controllers/ZoomControllerLocal.js +1 -1
  541. package/views/3d/state/controllers/ZoomStepControllerGlobal.js +1 -1
  542. package/views/3d/state/controllers/ZoomStepControllerLocal.js +1 -1
  543. package/views/3d/state/utils/navigationUtils.js +1 -1
  544. package/views/3d/support/DisplayQualityProfile.js +1 -1
  545. package/views/3d/support/QualitySettings.js +1 -1
  546. package/views/3d/support/flow/FlowSubViewExtent3D.js +5 -0
  547. package/views/3d/support/flow/FlowSubViewTiles3D.js +5 -0
  548. package/views/3d/support/flow/loadUtils.js +1 -1
  549. package/views/3d/support/sunUtils.js +1 -1
  550. package/views/3d/terrain/OverlayManager.js +1 -1
  551. package/views/3d/terrain/TerrainSurface.js +1 -1
  552. package/views/3d/terrain/TileRenderer.js +1 -1
  553. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  554. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  555. package/views/3d/webgl-engine/lib/textureUtils.js +1 -1
  556. package/views/3d/webgl-engine/materials/RibbonLineMaterial.js +1 -1
  557. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  558. package/views/ToolViewManager.js +1 -1
  559. package/views/View2D.js +1 -1
  560. package/views/Viewport2DMixin.js +1 -1
  561. package/views/support/layerViewUtils.js +1 -1
  562. package/views/ui/UI.js +1 -1
  563. package/views/webgl/FramebufferObject.js +1 -1
  564. package/views/webgl/Parameters.js +1 -1
  565. package/widgets/BasemapLayerList.js +1 -1
  566. package/widgets/CatalogLayerList.js +1 -1
  567. package/widgets/Editor/EditorViewModel.js +1 -1
  568. package/widgets/Editor/UpdateFeaturesWorkflow.js +1 -1
  569. package/widgets/Editor/UpdateWorkflow.js +1 -1
  570. package/widgets/Editor/UpdateWorkflowData.js +1 -1
  571. package/widgets/Editor/workflowUtils.js +1 -1
  572. package/widgets/Editor.js +1 -1
  573. package/widgets/Expand.js +1 -1
  574. package/widgets/Feature/FeatureUtilityNetworkAssociationList.js +1 -1
  575. package/widgets/Feature/FeatureViewModel.js +1 -1
  576. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  577. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/FeatureFormUtilityNetworkAssociationList.js +1 -1
  578. package/widgets/FeatureForm/FieldInput.js +1 -1
  579. package/widgets/FeatureForm/UtilityNetworkAssociationInput.js +1 -1
  580. package/widgets/FeatureForm/featureFormUtils.js +1 -1
  581. package/widgets/LayerList/LayerListItem.js +1 -1
  582. package/widgets/LayerList.js +1 -1
  583. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  584. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  585. package/widgets/OrientedImageryViewer/imageMeasurementUtils.js +1 -1
  586. package/widgets/OrientedImageryViewer.js +1 -1
  587. package/widgets/Print.js +1 -1
  588. package/widgets/Search.js +1 -1
  589. package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
  590. package/widgets/Sketch/support/ResponsiveToolbar/ResponsiveToolbar.js +1 -1
  591. package/widgets/Sketch/support/ResponsiveToolbar/SplitButton.js +1 -1
  592. package/widgets/Sketch.js +1 -1
  593. package/widgets/TableList.js +1 -1
  594. package/widgets/TimeSlider.js +1 -1
  595. package/widgets/support/GridControls/GridControlsViewModel.js +1 -1
  596. package/widgets/support/SelectionList/FeatureItem.js +1 -1
  597. package/widgets/support/SelectionList/GroupLayerItem.js +1 -1
  598. package/widgets/support/SelectionList/LayerItem.js +1 -1
  599. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  600. package/widgets/support/SelectionList/selectionListUtils.js +1 -1
  601. package/widgets/support/SelectionList.js +1 -1
  602. package/widgets/support/SelectionToolbar/SelectionToolbarViewModel.js +1 -1
  603. package/widgets/support/SelectionToolbar.js +1 -1
  604. package/widgets/support/Selector2D/SelectionOperation.js +1 -1
  605. package/widgets/support/Selector2D/selectorUtils.js +1 -1
  606. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  607. package/assets/esri/core/workers/chunks/2dc54925d473a959119c.js +0 -1
  608. package/assets/esri/core/workers/chunks/464c15b2779f9b803a06.js +0 -1
  609. package/assets/esri/core/workers/chunks/543b8dc8baa21b99147b.js +0 -1
  610. package/assets/esri/core/workers/chunks/5d3246b8fc50f9d9e2c4.js +0 -1
  611. package/assets/esri/core/workers/chunks/5d50a8d0427eab0a2514.js +0 -1
  612. package/assets/esri/core/workers/chunks/7a2189614f2dad49ffcd.js +0 -1
  613. package/assets/esri/core/workers/chunks/91d484960df25ec9554b.js +0 -1
  614. package/assets/esri/core/workers/chunks/9cd55043f3d789f41815.js +0 -1
  615. package/assets/esri/core/workers/chunks/b09539a4b491a90a6bbe.js +0 -1
  616. package/assets/esri/core/workers/chunks/b6c3a2d93a59df9a1418.js +0 -1
  617. package/assets/esri/core/workers/chunks/c45a314ace9725aa250e.js +0 -1
  618. package/assets/esri/core/workers/chunks/c6fa79ce324122e08dbb.js +0 -1
  619. package/assets/esri/core/workers/chunks/cbbbaccc0d3683e1c0fe.js +0 -1
  620. package/assets/esri/core/workers/chunks/e7a440476cd1eb4c6547.js +0 -1
  621. package/assets/esri/core/workers/chunks/e9993d4f2bfdc434fbcc.js +0 -1
  622. package/assets/esri/core/workers/chunks/eb23ce385b0d18959c7c.js +0 -1
  623. package/views/3d/support/flow/StreamlinesStyle3D.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.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import a from"../../../../core/Logger.js";import{findInMap as n}from"../../../../core/MapUtils.js";import{abortMaybe as o,removeMaybe as l,destroyMaybe as h,disposeMaybe as d}from"../../../../core/maybe.js";import{MinPriority as p}from"../../../../core/MemCache.js";import c from"../../../../core/PooledArray.js";import{throwIfAborted as y,ignoreAbortErrors as g,createResolver as u,isAbortError as m}from"../../../../core/promiseUtils.js";import{when as b,watch as _,on as f,syncAndInitial as v,whenOnce as C}from"../../../../core/reactiveUtils.js";import{schedule as S}from"../../../../core/scheduling.js";import{property as G}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as w}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as x,isEmpty as P}from"../../../../core/accessorSupport/diffUtils.js";import{i as R,f as D,g as E}from"../../../../chunks/vec32.js";import{create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import I from"../../../../geometry/Extent.js";import A from"../../../../geometry/Point.js";import{canProjectWithoutEngine as L}from"../../../../geometry/projectionUtils.js";import{projectBuffer as j}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as O}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as V}from"../../../../geometry/projection/projectXYZToVector.js";import{center as F,create as T,fromRect as M,equals as k}from"../../../../geometry/support/aaBoundingBox.js";import{create as z}from"../../../../geometry/support/aaBoundingRect.js";import{equals as W}from"../../../../geometry/support/spatialReferenceUtils.js";import H from"../../../../layers/Layer.js";import{getObjectId as N,computeAABB as B,hasGeometry as q}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Y}from"../../../../layers/graphics/hydratedFeatures.js";import{PromiseQueue as Q}from"../../../../layers/support/PromiseQueue.js";import $ from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as Z,validateTo3D as J}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as X}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as K}from"../../../../support/basemapUtils.js";import{loadArcade as ee}from"../../../../support/loadArcade.js";import te from"../../../../symbols/LabelSymbol3D.js";import ie from"../../../../symbols/TextSymbol.js";import re from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as se}from"../../../../symbols/support/defaults3D.js";import{to3D as ae}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as ne,defaultSymbolComplexity as oe}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as le}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as he}from"./ElevationQuery.js";import{VisibilityGroup as de,VisibilityFlag as pe}from"./enums.js";import{extractExpressionInfo as ce,createContext as ye}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ge}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ue}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as me}from"./Graphics3DSymbolCreationContext.js";import{make as be}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as _e}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as fe}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as ve}from"./GraphicStateTracking.js";import{computeCentroid as Ce}from"./graphicUtils.js";import{FastUpdateStatus as Se,ApplyRendererDiffResult as Ge}from"./interfaces.js";import{LoadStatus as we}from"./Loadable.js";import{SpatialIndex2D as xe}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as Pe}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Re}from"../../support/extentUtils.js";import{GridLocalOriginFactory as De}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{UpdatePolicy as Ee}from"../../webgl-engine/lib/UpdatePolicy.js";import{affectsGeometry as Ue}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Ie}from"../../webgl-engine/lib/WebGLLayer.js";import{hasPopupTemplate as Ae}from"../../../layers/support/popupUtils.js";import{PropertiesPool as Le}from"../../../support/PropertiesPool.js";import{ImmediateTask as je,noBudget as Oe,TaskPriority as Ve}from"../../../support/Scheduler.js";import{TextureCompressionTracker as Fe}from"../../../support/TextureCompressionTracker.js";import{Yield as Te}from"../../../support/Yield.js";import{alphaCutoff as Me}from"../../../../webscene/support/AlphaCutoff.js";var ke;const ze=U(),We=T();let He=class extends t{static{ke=this}static{this.tmpVec=U()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new xe({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?Ee.ASYNC:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this._updateQueue.updating||this.running)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.updating||this._loadingSymbols>0||this.compressionTracker.compressing)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.running||this._updateQueue.running}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new le(s,h,a)}get averageSymbolComplexity(){const e=ne(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce(((e,t)=>e+t.memory.resourceBytes),0);if(null==this._symbolMaterials){this._symbolMaterials=[];for(const e of this._symbols.values())if(null!=e)for(const t of e.symbolLayers)if(t)for(const e of t.materials)e&&this._symbolMaterials.push(e)}const i=this.owner.view.stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=this._symbolMaterials.reduce(((e,t)=>e+((i.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0)),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){const t=e;if("web-style"===t.type)return t.clone();const i=this._symbolConversionCache.get(t.id);if(null!=i)return i;const r=ae(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),s=r.symbol||null;return null==s&&r.error&&a.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,s),s}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.symbols,i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?oe(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((t=>{null!=t&&e.push(t.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new Le({computedExtent:I},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=je,this._dataUpdateQueue=new Q,this._updateQueue=new Q,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this._pendingUpdatesPool=new c({allocator:e=>e||new Be,deallocator:e=>(e.clear(),e)}),this.compressionTracker=new Fe,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new c,this.preferredUpdatePolicy=Ee.SYNC,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache("graphics-3d-unused-symbols",(e=>e.destroy())),this.symbolCreationContext=new me(e.owner.view.resourceController.scheduler,((e,t)=>this._updateQueue.push(e,t)),e.owner.layerViewUid,this.compressionTracker)}initialize(){this._featureStore=new ge({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e(N(t.graphic,this._objectIdField))))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.FILTER,!0)))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(b((()=>this.owner.view.state.highlights),(()=>{const{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach((t=>t.updateHighlights(e)))}))),this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new he(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,this._sharedSymbolResourcesOwnerHandle=i.addGraphicsOwner(this.owner),null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new De(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ye(r,this._viewSpatialReference,e,a.getLogger(this)),y(e),this.symbolCreationContext.screenSizePerspectiveEnabled=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this.addHandles(s((()=>t.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this.addHandles([_((()=>this.suspendedOrOutsideOfView),(()=>this._updateQueue.unshift((()=>this._updateLayerVisibility()),null).catch(g))),_((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view?.screenSizePerspectiveEnabled]),(()=>{const e=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),_((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),_((()=>this.owner.view.state?.rasterPixelRatio),(()=>this._pixelRatioChange())),_((()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),_((()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods),(e=>this._skipHighSymbolLoDsChange(e))),_((()=>this.owner.view.focusAreasView?.polygons),(()=>this._updateFocusedLabels())),_((()=>this.owner.view.map?.focusAreas.style),(()=>this.recreateAllGraphicsAndSymbols())),b((()=>t.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([f(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),_((()=>this.effectiveUpdatePolicy),(e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Ee.ASYNC,e===Ee.SYNC&&this.runTask(Oe)}),v)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(Ve.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(_((()=>this.layer.featureReduction),(()=>this._deconflictor?.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=o(this._initializeAbortController)}_updateFocusedLabels(){this.forEachGraphics3DSymbol(((e,t)=>{t&&e.updateFocus((({graphic:e})=>this.recreateGraphics([e])),t)}))}destroy(){this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=o(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=je,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=l(this._deconflictor),this._labeler=l(this._labeler),this._elevationAlignment=h(this._elevationAlignment),this._scaleVisibility=h(this._scaleVisibility),this._filterVisibility=h(this._filterVisibility),this._objectStates=h(this._objectStates),this.clear(),this._featureStore=h(this._featureStore),this._updatingPendingLoadedGraphicsChange=l(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=h(this._graphicStateTracking),this.stage&&(this.stageLayer=h(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=l(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=h(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=h(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(h),this._symbols.clear(),this._symbolMaterials=null,this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("dataUpdating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Ie(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("shaderTransformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.graphicUid))),i.on("geometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("geometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("attributesChanged",(e=>Ue(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid)))}notifyGraphicGeometryChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*qe,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){const e=this._visible&&(null==this.layer.opacity||this.layer.opacity>=Me);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return N(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)})),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){const t=this._deconflictor?.labelingInfoChange(e),i=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=!1,t=!1;for(const[i,r]of this._symbols)if(null!=r){switch(r.getFastUpdateStatus()){case Se.Loading:return"unknown";case Se.Fast:this._graphicsBySymbol.has(i)&&(t=!0);break;case Se.Slow:this._graphicsBySymbol.has(i)&&(e=!0);break;case Se.Mixed:this._graphicsBySymbol.has(i)&&(t=e=!0);case Se.Undefined:}}return t?e?"mixed":"fast":e?"slow":"mixed"}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("dataUpdating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Te}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return n(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(de.GRAPHIC,pe.USER,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=u();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>j(e,r,t,e,i,t,s),n=(e,t,r)=>j(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){F(h,ze);const t=e.getElevation(ze[0],ze[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await C((()=>this.owner?.loadedGraphics));const i=this.owner.layer?.objectIdField,s=this.owner.loadedGraphics.find((t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;R(Ye,0,0,0);let s=0;if(r.render.num>0){if(!O(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(R(Qe,e,i,a),!O(Qe,this._viewElevationProvider.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}return s>1&&E(Ye,Ye,1/s),new A({x:Ye[0],y:Ye[1],z:Ye[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t)){switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":case"popupTemplate":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>!(null==t.newValue||null==e||!e.graphics3DSymbol.updateGeometry(e,t.newValue)||!(this._labeler?.updateGraphicGeometry(e)??1))&&(this._labeler?.setDirty(),!0)));const i=t.graphic.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action)))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.graphic.geometry)if(null!=e)i()||this._recreateGraphic(e.graphic);else{const e=t.graphic.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&t.loadStatus===we.LOADING)return}this._recreateGraphic(t.graphic)}else this._recreateGraphic(t.graphic)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=x(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!P(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i,!1);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Ee.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("dataUpdating"),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((t=>{null!=t&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=We,i=e.spatialReference;B(e,t);const r=this._viewSpatialReference,s=ke.tmpVec;if(W(i,r)||V(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],V(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ye(t,this._viewSpatialReference,e.signal,a.getLogger(this)),y(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t?.forEach((e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Pe({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);h(r),this._symbols.delete(e),this._symbolMaterials=null,h(this._unusedSymbolsCache.pop(e)),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===Ee.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("dataUpdating")):a.getLogger(this).error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Ee.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return Ee.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t),Ee.SYNC);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?i.state!==Ne.NEW&&i.abortController?.abort():this._pendingAdds++:(i=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}remove(e){this.effectiveUpdatePolicy===Ee.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("dataUpdating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),i.state===Ne.LOADING&&i.abortController?.abort(),this._pendingAdds--);else{const i=this._pendingUpdatesPool.pushNew();i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&a.getLogger(this).warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&i.state===Ne.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Ne.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=Ee.SYNC),i.add)switch(i.state){case Ne.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case Ne.REJECTED:i.add=null,this._pendingAdds--;case Ne.LOADING:}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("dataUpdating"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Ne.READY);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=Ne.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,m(t)?e.state=Ne.NEW:e.state=Ne.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add),void(e.state=Ne.READY);e.state=Ne.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(m(i)?e.state=Ne.NEW:e.state=Ne.REJECTED)}null==t?.symbol?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Ne.READY}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!q(e))return;const r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){const t=K(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.owner.layerViewUid,!!this.layer.popupEnabled&&!t&&Ae(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const s=t.symbol,a=this.getOrCreateGraphics3DSymbol(s,t.renderer);if(null==a)return;this._expandComputedExtent(e.geometry);const n=this._beginGraphicUpdate(e),o=new ue(e,t,this.layer);let l=!1;const h=e=>{e===a.symbol.id&&(l=!0)};this._whenSymbolRemoved.push(h);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(h);if(this._graphicsWaitingForSymbol.get(e.uid)!==n||l||a.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==a.symbol.id)--a.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(a,o);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(h),l||(m(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,i===Ee.ASYNC?a.load((()=>this._dataUpdateQueue.push(d,null).catch(g)),(e=>this._dataUpdateQueue.push((()=>p(e)),null).catch(g))):a.load(d,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating"))}_hasLabelingContext(e){if(e instanceof te||e instanceof ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof te&&!this._hasLabelingContext(e))||(a.getLogger(this).error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t=!0){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!L(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Y(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))s=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{const e=r.symbol||se(r.geometry);s=new X(null,e)}return null==s?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){if(null==e.geometry)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?Y(e,this.layer):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=ae(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&(r=e.symbol.symbolLayers)}const s=be(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);if(void 0===i){const r=this._unusedSymbolsCache.pop(e.id);i=null!=r?r:e instanceof re?new _e(e,(e=>this._dataUpdateQueue.push(e,null)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i),this._symbolMaterials=null}return null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new ve(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=Ce(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=o(this._rendererChangeAbortController),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),Z(e))if(e?.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();y(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),y(t)),this.effectiveUpdatePolicy===Ee.ASYNC?await this._updateQueue.push((()=>this._currentRendererChange(e,r)),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Ee.ASYNC){const t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push((()=>this._currentRendererChange(e,!1)),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await ee(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=x(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof H?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(Y(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){const s=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(s||a){const n=a?a.added.map((e=>e.symbol)).filter(i):[],o=a?a.removed.map((e=>e.symbol)).filter(i):[];if(a)for(let e=0;e<a.changed.length;e++)n.push(a.changed[e].newValue.symbol),o.push(a.changed[e].oldValue.symbol);return s?(r.defaultSymbol&&o.push(r.defaultSymbol),t.defaultSymbol&&n.push(t.defaultSymbol)):r.defaultSymbol&&n.length&&o.push(t.defaultSymbol),this._applySymbolSetDiff(n,o,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),this._symbolMaterials=null,null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,i){if(this._diffHasSymbolChange(e))return!1;if(t instanceof $&&i instanceof $&&this._applyUniqueValueRendererDiff(e,t,i)&&0===Object.keys(e.diff).length)return!0;for(const r of this._graphicsBySymbol.keys()){const i=this._symbols.get(r);if(null!=i)switch(i.applyRendererDiff(e,t)){case Ge.RecreateSymbol:this._recreateSymbol(r);break;case Ge.RecreateGraphics:this._recreateGraphicsForSymbol(r);case Ge.FastUpdate:}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t)))}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)}))}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)}))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=S((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=z();return Re(e,r,t)?this.symbolCreationContext.clippingExtent=M(T(),r):this.symbolCreationContext.clippingExtent=null,!k(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(const[i,r]of this._symbols){if(null==r)return;e(r,this._graphicsBySymbol.get(i)||$e,i)}if(!t?.excludeUnused)for(const i of this._unusedSymbolsCache)e(i,void 0,i.symbol.id)}updateGraphicsVisibilities(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=!!this._scaleVisibility?.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.USER,!1)))}_validateRenderer(e){const t=()=>`'${this.layer.title?`${this.layer.title}, `:""}id:${this.layer.id}'`,i=J(e,{geometryType:this.layer?.geometryType,logWarning:(e,i)=>a.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${i}`)});if(i){const e=`Renderer for layer ${t} is not supported in a SceneView`;a.getLogger(this).warn(e,i.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),this._symbolMaterials=null,this._unusedSymbolsCache.put(i,t,p),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){}get performanceInfo(){return new fe(this.graphics3DGraphics.size,Array.from(this.graphics3DGraphics.values()).reduce(((e,t)=>e+(t.isVisible()?1:0)),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};var Ne;e([G({readOnly:!0})],He.prototype,"computedExtent",void 0),e([G()],He.prototype,"currentRenderer",void 0),e([G()],He.prototype,"rendererHasGeometryOperations",void 0),e([G()],He.prototype,"_frameTaskHandle",void 0),e([G()],He.prototype,"_dataUpdateQueue",void 0),e([G()],He.prototype,"_updateQueue",void 0),e([G({readOnly:!0})],He.prototype,"_viewSpatialReference",null),e([G()],He.prototype,"_rendererChangeAbortController",void 0),e([G()],He.prototype,"_elevationInfoChangeAbortController",void 0),e([G()],He.prototype,"_initializeAbortController",void 0),e([G()],He.prototype,"_elevationAlignment",void 0),e([G()],He.prototype,"_scaleVisibility",void 0),e([G()],He.prototype,"_filterVisibility",void 0),e([G()],He.prototype,"_initializePromise",void 0),e([G()],He.prototype,"_spatialIndex",void 0),e([G({readOnly:!0})],He.prototype,"extentPadding",void 0),e([G()],He.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([G()],He.prototype,"_featureStore",void 0),e([G()],He.prototype,"_objectStates",void 0),e([G()],He.prototype,"_loadingSymbols",void 0),e([G({constructOnly:!0})],He.prototype,"compressionTracker",void 0),e([G()],He.prototype,"preferredUpdatePolicy",void 0),e([G()],He.prototype,"_forcedUpdatePolicy",void 0),e([G({readOnly:!0})],He.prototype,"effectiveUpdatePolicy",null),e([G({constructOnly:!0})],He.prototype,"elevationFeatureExpressionEnabled",void 0),e([G({constructOnly:!0})],He.prototype,"owner",void 0),e([G({constructOnly:!0})],He.prototype,"layer",void 0),e([G({constructOnly:!0})],He.prototype,"graphicSymbolSupported",void 0),e([G({constructOnly:!0})],He.prototype,"getRenderingInfoWithoutRenderer",void 0),e([G({constructOnly:!0})],He.prototype,"componentFactories",void 0),e([G({constructOnly:!0})],He.prototype,"setUidToIdOnAdd",void 0),e([G()],He.prototype,"featureStore",null),e([G()],He.prototype,"initializePromise",null),e([G()],He.prototype,"scaleVisibility",null),e([G()],He.prototype,"elevationAlignment",null),e([G()],He.prototype,"objectStates",null),e([G()],He.prototype,"filterVisibility",null),e([G({readOnly:!0})],He.prototype,"updating",null),e([G({readOnly:!0})],He.prototype,"dataUpdating",null),e([G({readOnly:!0})],He.prototype,"running",null),e([G({readOnly:!0})],He.prototype,"suspendedOrOutsideOfView",null),e([G({readOnly:!0,dependsOn:[]})],He.prototype,"updatingRemaining",null),e([G({readOnly:!0})],He.prototype,"displayFeatureLimit",null),e([G({readOnly:!0,dependsOn:[]})],He.prototype,"averageSymbolComplexity",null),e([G({constructOnly:!0})],He.prototype,"hasZ",void 0),e([G({constructOnly:!0})],He.prototype,"hasM",void 0),e([G()],He.prototype,"_objectIdField",null),He=ke=e([w("esri.views.3d.layers.graphics.Graphics3DCore")],He),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Ne||(Ne={}));class Be{constructor(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}}const qe=10,Ye=U(),Qe=U(),$e=new Map;export{He as Graphics3DCore};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{isSome as i}from"../../../../core/arrayUtils.js";import"../../../../core/has.js";import r from"../../../../core/Error.js";import{makeHandle as s}from"../../../../core/handleUtils.js";import a from"../../../../core/Logger.js";import{findInMap as n}from"../../../../core/MapUtils.js";import{abortMaybe as o,removeMaybe as l,destroyMaybe as h,disposeMaybe as d}from"../../../../core/maybe.js";import{MinPriority as p}from"../../../../core/MemCache.js";import c from"../../../../core/PooledArray.js";import{throwIfAborted as y,ignoreAbortErrors as g,createResolver as u,isAbortError as m}from"../../../../core/promiseUtils.js";import{when as b,watch as _,on as f,syncAndInitial as v,whenOnce as C}from"../../../../core/reactiveUtils.js";import{schedule as S}from"../../../../core/scheduling.js";import{property as G}from"../../../../core/accessorSupport/decorators/property.js";import{subclass as w}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as x,isEmpty as P}from"../../../../core/accessorSupport/diffUtils.js";import{i as R,f as D,g as E}from"../../../../chunks/vec32.js";import{create as U}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import I from"../../../../geometry/Extent.js";import A from"../../../../geometry/Point.js";import{canProjectWithoutEngine as L}from"../../../../geometry/projectionUtils.js";import{projectBuffer as j}from"../../../../geometry/projection/projectBuffer.js";import{projectVectorToVector as O}from"../../../../geometry/projection/projectVectorToVector.js";import{projectXYZToVector as V}from"../../../../geometry/projection/projectXYZToVector.js";import{center as F,create as T,fromRect as M,equals as k}from"../../../../geometry/support/aaBoundingBox.js";import{create as z}from"../../../../geometry/support/aaBoundingRect.js";import{equals as W}from"../../../../geometry/support/spatialReferenceUtils.js";import H from"../../../../layers/Layer.js";import{getObjectId as N,computeAABB as B,hasGeometry as q}from"../../../../layers/graphics/dehydratedFeatures.js";import{hydrateGraphic as Y}from"../../../../layers/graphics/hydratedFeatures.js";import{PromiseQueue as Q}from"../../../../layers/support/PromiseQueue.js";import $ from"../../../../renderers/UniqueValueRenderer.js";import{isSupportedRenderer3D as Z,validateTo3D as J}from"../../../../renderers/support/rendererConversion.js";import{RenderingInfo as X}from"../../../../renderers/support/RenderingInfo.js";import{isBasemapLayerView as K}from"../../../../support/basemapUtils.js";import{loadArcade as ee}from"../../../../support/loadArcade.js";import te from"../../../../symbols/LabelSymbol3D.js";import ie from"../../../../symbols/TextSymbol.js";import re from"../../../../symbols/WebStyleSymbol.js";import{getDefaultSymbol3D as se}from"../../../../symbols/support/defaults3D.js";import{to3D as ae}from"../../../../symbols/support/symbolConversion.js";import{averageSymbolComplexities as ne,defaultSymbolComplexity as oe}from"./defaultSymbolComplexity.js";import{DisplayFeatureLimit as le}from"./DisplayFeatureLimit.js";import{ViewElevationProvider as he}from"./ElevationQuery.js";import{VisibilityGroup as de,VisibilityFlag as pe}from"./enums.js";import{extractExpressionInfo as ce,createContext as ye}from"./featureExpressionInfoUtils.js";import{Graphics3DFeatureStore as ge}from"./Graphics3DFeatureStore.js";import{Graphics3DGraphicCreationContext as ue}from"./Graphics3DGraphicCreationContext.js";import{Graphics3DSymbolCreationContext as me}from"./Graphics3DSymbolCreationContext.js";import{make as be}from"./Graphics3DSymbolFactory.js";import{Graphics3DWebStyleSymbol as _e}from"./Graphics3DWebStyleSymbol.js";import{GraphicsCorePerformanceInfo as fe}from"./GraphicsCorePerformanceInfo.js";import{GraphicStateTracking as ve}from"./GraphicStateTracking.js";import{computeCentroid as Ce}from"./graphicUtils.js";import{FastUpdateStatus as Se,ApplyRendererDiffResult as Ge}from"./interfaces.js";import{LoadStatus as we}from"./Loadable.js";import{SpatialIndex2D as xe}from"./SpatialIndex2D.js";import{StageLayerElevationProvider as Pe}from"../support/StageLayerElevationProvider.js";import{toBoundingRect as Re}from"../../support/extentUtils.js";import{GridLocalOriginFactory as De}from"../../webgl-engine/lib/GridLocalOriginFactory.js";import{UpdatePolicy as Ee}from"../../webgl-engine/lib/UpdatePolicy.js";import{affectsGeometry as Ue}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as Ie}from"../../webgl-engine/lib/WebGLLayer.js";import{hasPopupTemplate as Ae}from"../../../layers/support/popupUtils.js";import{PropertiesPool as Le}from"../../../support/PropertiesPool.js";import{ImmediateTask as je,noBudget as Oe,TaskPriority as Ve}from"../../../support/Scheduler.js";import{TextureCompressionTracker as Fe}from"../../../support/TextureCompressionTracker.js";import{Yield as Te}from"../../../support/Yield.js";import{alphaCutoff as Me}from"../../../../webscene/support/AlphaCutoff.js";var ke;const ze=U(),We=T();let He=class extends t{static{ke=this}static{this.tmpVec=U()}get _viewSpatialReference(){return this.owner.view.spatialReference}get spatialIndex(){return this._spatialIndex||(this._spatialIndex=new xe({objectIdField:this.owner.layer?.objectIdField,spatialReference:this._viewSpatialReference,hasZ:!!this.hasZ,hasM:!!this.hasM}),this._spatialIndex.setup(Array.from(this.graphics3DGraphics.values()))),this._spatialIndex.update(),this._spatialIndex}get deconflictor(){return this._deconflictor}get labeler(){return this._labeler}get numberOfGraphics(){return this._numberOfGraphics}get effectiveUpdatePolicy(){return null!=this.currentRenderer&&"dictionary"===this.currentRenderer.type?Ee.ASYNC:this._forcedUpdatePolicy??this.preferredUpdatePolicy}get featureStore(){return this._featureStore}get initializePromise(){return this._initializePromise}get scaleVisibility(){return this._scaleVisibility}get elevationAlignment(){return this._elevationAlignment}get objectStates(){return this._objectStates}get filterVisibility(){return this._filterVisibility}get updating(){return!!(this.dataUpdating||this._elevationAlignment?.updating||this._scaleVisibility?.updating||this._filterVisibility?.updating||this._rendererChangeAbortController||this._elevationInfoChangeAbortController||this._frameTaskHandle.updating||this._updateQueue.updating||this.running)}get dataUpdating(){return!!(this._graphicsWaitingForSymbol.size>0||this._pendingUpdates.size>0||this._spatialIndex?.updating||this._updatingPendingLoadedGraphicsChange||this._dataUpdateQueue.updating||this._loadingSymbols>0||this.compressionTracker.compressing)}get running(){return this._pendingUpdates.size>0||!!this._spatialIndex?.updating||this._dataUpdateQueue.running||this._updateQueue.running}get suspendedOrOutsideOfView(){return this.owner.suspended||!!this.owner.suspendInfo?.outsideOfView}get updatingRemaining(){return this.updating?this._pendingUpdates.size+.1*(this._spatialIndex?.updatingRemaining||0)+.1*(this._elevationAlignment?.updatingRemaining||0):0}get displayFeatureLimit(){const e=this.owner&&this.owner.view&&this.owner.view.qualitySettings,t=e?.graphics3D.minTotalNumberOfFeatures??0,i=e?.graphics3D.maxTotalNumberOfFeatures??0,r=e?.graphics3D.maxNumberOfDrawCalls??0,s=e?.graphics3D.maxTotalNumberOfVertices??0,a=this.averageSymbolComplexity,n=Math.max(1,a?.verticesPerFeature??1),o=a&&a.drawCallsPerFeature>0&&r>0?r/a.drawCallsPerFeature:i,l=Math.ceil(s/n),h=Math.max(t,Math.min(i,l,o)),d=this._get("displayFeatureLimit");return d&&d.maximumTotalNumberOfVertices===s&&d.averageSymbolComplexity===a&&d.maximumNumberOfFeatures===h?d:new le(s,h,a)}get averageSymbolComplexity(){const e=ne(this._symbolComplexities),t=this._get("averageSymbolComplexity");return 0===e.numComplexities||null!=t&&(e.estimated&&(t.verticesPerFeature>=e.verticesPerFeature||t.verticesPerCoordinate>=e.verticesPerCoordinate||t.drawCallsPerFeature>=e.drawCallsPerFeature)||t.verticesPerFeature===e.verticesPerFeature&&t.verticesPerCoordinate===e.verticesPerCoordinate&&t.drawCallsPerFeature===e.drawCallsPerFeature)?t:e}get usedMemory(){const e=this.labelsEnabled?(this.averageSymbolComplexity?.memory.bytesPerFeatureLabel??0)*this._numberOfGraphics:0,t=this._getSymbolComplexitiesUsed().reduce(((e,t)=>e+t.memory.resourceBytes),0);if(null==this._symbolMaterials){this._symbolMaterials=[];for(const e of this._symbols.values())if(null!=e)for(const t of e.symbolLayers)if(t)for(const e of t.materials)e&&this._symbolMaterials.push(e)}const i=this.owner.view.stage.renderer,r=this.owner.view.basemapTerrain.overlayManager.renderer,s=this._symbolMaterials.reduce(((e,t)=>e+((i.getMaterialRenderer(t)||r.getMaterialRenderer(t))?.usedMemory??0)),0);return this._usedMemory+e+t+s}get usedMemoryPerGraphic(){if(this._usedMemory&&this._numberOfGraphics){const e=this._numberOfGraphics/(this._numberOfGraphics+Math.max(this._pendingAdds,this._pendingRemoves));return this._usedMemory/this._numberOfGraphics*e}if(null!=this.averageSymbolComplexity){const e=this.labelsEnabled?this.averageSymbolComplexity.memory.bytesPerFeatureLabel:0;return this.averageSymbolComplexity.memory.bytesPerFeature+e}return 0}get unprocessedMemoryEstimate(){return(this._pendingAdds-this._pendingRemoves)*this.usedMemoryPerGraphic}get _symbolComplexities(){return this.currentRenderer?this._getSymbolComplexitiesUsedOrRenderer(this.currentRenderer):this._getSymbolComplexitiesUsed()}get visible(){return this._visible}_getConvertedSymbol(e){const t=e;if("web-style"===t.type)return t.clone();const i=this._symbolConversionCache.get(t.id);if(null!=i)return i;const r=ae(t,{geometryType:this.layer?.geometryType??void 0,retainId:!0,hasLabelingContext:this._hasLabelingContext(t),cimFallbackEnabled:!0}),s=r.symbol||null;return null==s&&r.error&&a.getLogger(this).error(r.error.message),this._symbolConversionCache.set(t.id,s),s}_getSymbolComplexitiesUsedOrRenderer(e){if(null==e)return[];const t=e.symbols,i="backgroundFillSymbol"in e?e.backgroundFillSymbol:null;if(!i&&!t.length)return[];const r=[],s=this._getSymbolComplexityUsedOrRenderer(i);null!=s&&r.push(s);for(const a of t){const e=this._getSymbolComplexityUsedOrRenderer(a);null!=e&&r.push(e)}return r}_getSymbolComplexityUsedOrRenderer(e){if(null==e)return null;const t=this._symbols.get(e.id);if(null!=t)return t.complexity;const i=this._getConvertedSymbol(e);return null!=i?oe(i):null}_getSymbolComplexitiesUsed(){const e=[];return this._symbols.forEach((t=>{null!=t&&e.push(t.complexity)})),e}get _objectIdField(){return this.layer.objectIdField}constructor(e){super(e),this._propertiesPool=new Le({computedExtent:I},this),this.computedExtent=null,this.currentRenderer=null,this.rendererHasGeometryOperations=!1,this._graphicStateTracking=null,this.graphics3DGraphics=new Map,this.stageLayer=null,this.stage=null,this._graphicsDrapedUids=new Set,this._graphicsBySymbol=new Map,this._symbolConversionCache=new Map,this._symbols=new Map,this._graphicsWithoutSymbol=new Map,this._graphicsWaitingForSymbol=new Map,this._graphicsUpdateId=0,this._frameTaskHandle=je,this._dataUpdateQueue=new Q,this._updateQueue=new Q,this._suspendSymbolCleanup=!1,this._arcadeOnDemand=null,this._rendererChangeAbortController=null,this._elevationInfoChangeAbortController=null,this._initializeAbortController=null,this._elevationAlignment=null,this._scaleVisibility=null,this._filterVisibility=null,this._spatialIndex=null,this.extentPadding=0,this._updatingPendingLoadedGraphicsChange=null,this._featureStore=null,this._deconflictor=null,this._labeler=null,this._objectStates=null,this._viewElevationProvider=null,this._stageLayerElevationProvider=null,this._sharedSymbolResourcesOwnerHandle=null,this._whenGraphics3DGraphicRequests={},this._pendingUpdates=new Map,this._numberOfGraphics=0,this._numberOfGraphicsProvidingElevation=0,this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this._loadingSymbols=0,this._pendingUpdatesPool=new c({allocator:e=>e||new Be,deallocator:e=>(e.clear(),e)}),this.compressionTracker=new Fe,this._symbolWarningLogged=!1,this._geometryWarningLogged=!1,this._objectIdInvisibleSet=new Set,this._whenSymbolRemoved=new c,this.preferredUpdatePolicy=Ee.SYNC,this._forcedUpdatePolicy=null,this.elevationFeatureExpressionEnabled=!0,this.owner=null,this.layer=null,this.graphicSymbolSupported=!0,this.getRenderingInfoWithoutRenderer=!1,this.setUidToIdOnAdd=!0,this.hasZ=null,this.hasM=null,this._usedMemory=0,this._visible=!1,this._startCreateGraphics=!1,this._unusedSymbolsCache=e.owner.view.resourceController.memoryController.newCache("graphics-3d-unused-symbols",(e=>e.destroy())),this.symbolCreationContext=new me(e.owner.view.resourceController.scheduler,((e,t)=>this._updateQueue.push(e,t)),e.owner.layerViewUid,this.compressionTracker)}initialize(){this._featureStore=new ge({objectIdField:this.owner.layer?.objectIdField,hasZ:!!this.hasZ,hasM:!!this.hasM,viewSpatialReference:this._viewSpatialReference,featureSpatialReference:this.owner.featureSpatialReference,getSpatialIndex:()=>this.spatialIndex,forEach:e=>this.graphics3DGraphics.forEach(e)});const e=(e,t,i)=>this.spatialIndex.queryGraphicUIDsInExtent(e,t,i),{componentFactories:t}=this;this._elevationAlignment=t.elevationAlignment?.(this,e),this._scaleVisibility=t.scaleVisibility?.(this,e),this._filterVisibility=t.filterVisibility?.({featureStore:this._featureStore,getFeatureCount:()=>this.graphics3DGraphics.size,updateFeatureVisibilities:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e(N(t.graphic,this._objectIdField))))),setAllFeaturesVisibility:e=>this.modifyGraphics3DGraphicVisibilities((t=>t.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e))),clearFeaturesVisibility:()=>this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.FILTER,!0)))}),this._deconflictor=t.deconflictor?.(this),this._labeler=t.labeler?.(this,this._scaleVisibility),this._objectStates=t.objectStates?.(this),this._initializeAbortController=new AbortController,this.addHandles(b((()=>this.owner.view.state.highlights),(()=>{const{highlightOrderMap:e}=this.owner.view.state;this.graphics3DGraphics.forEach((t=>t.updateHighlights(e)))}))),this._initializePromise=this._initializeAsync()}async _initializeAsync(){const e=this._initializeAbortController?.signal,t=this.owner.view;this._viewElevationProvider=new he(this._viewSpatialReference,t),this._initializeStage(t,this.owner.layerViewUid);const i=t.sharedSymbolResources;this.symbolCreationContext.sharedResources=i,this._sharedSymbolResourcesOwnerHandle=i.addGraphicsOwner(this.owner),null!=this.currentRenderer&&(this.symbolCreationContext.renderer=this.currentRenderer),this.symbolCreationContext.stage=this.stage,this.symbolCreationContext.streamDataRequester=i.streamDataRequester,this.symbolCreationContext.renderCoordsHelper=t.renderCoordsHelper,this.symbolCreationContext.layer=this.layer,this.symbolCreationContext.graphicsCoreOwner=this.owner,this.symbolCreationContext.localOriginFactory=new De(t.renderSpatialReference),this.symbolCreationContext.elevationProvider=t.elevationProvider,this.symbolCreationContext.notifyGraphicGeometryChanged=e=>this.notifyGraphicGeometryChanged(e),this.symbolCreationContext.notifyGraphicVisibilityChanged=e=>this.notifyGraphicVisibilityChanged(e);const r=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);if(this.symbolCreationContext.featureExpressionInfoContext=await ye(r,this._viewSpatialReference,e,a.getLogger(this)),y(e),this.symbolCreationContext.screenSizePerspectiveEnabled=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this.symbolCreationContext.physicalBasedRenderingEnabled=!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled,this.symbolCreationContext.skipHighSymbolLods=!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods,"drapeSourceType"in this.owner){const{owner:e}=this;this.symbolCreationContext.drapeSourceRenderer=t.basemapTerrain.overlayManager.registerGeometryDrapeSource(e),this.addHandles(s((()=>t.basemapTerrain.overlayManager.unregisterDrapeSource(e))))}this.addHandles([_((()=>this.suspendedOrOutsideOfView),(()=>this._updateQueue.unshift((()=>this._updateLayerVisibility()),null).catch(g))),_((()=>[this.layer?.screenSizePerspectiveEnabled,this.owner.view?.screenSizePerspectiveEnabled]),(()=>{const e=t.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled;e!==this.symbolCreationContext.screenSizePerspectiveEnabled&&(this.symbolCreationContext.screenSizePerspectiveEnabled=e,this._labeler?.reset(),this.recreateAllGraphicsAndSymbols())})),_((()=>this.owner.slicePlaneEnabled),(e=>this._slicePlaneEnabledChange(!!e))),_((()=>this.owner.view.state?.rasterPixelRatio),(()=>this._pixelRatioChange())),_((()=>!!this.owner.view.qualitySettings?.physicallyBasedRenderingEnabled),(e=>this._physicalBasedRenderingChange(e))),_((()=>!!this.owner.view.qualitySettings?.graphics3D?.skipHighSymbolLods),(e=>this._skipHighSymbolLoDsChange(e))),_((()=>this.owner.view.focusAreasView?.polygons),(()=>this._updateFocusedLabels())),_((()=>this.owner.view.map?.focusAreas.style),(()=>this.recreateAllGraphicsAndSymbols())),b((()=>t.basemapTerrain?.tilingScheme),(e=>{if(e.spatialReference.equals(this.symbolCreationContext.overlaySR)||null==t.basemapTerrain.spatialReference||(this.symbolCreationContext.overlaySR=t.basemapTerrain.spatialReference),this.hasHandles("loaded-graphics"))this.recreateAllGraphics();else{const e=()=>this.owner?.loadedGraphics;this.addHandles([f(e,"change",(e=>{this._graphicsCollectionChanged(e),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}),{onListenerAdd:()=>{this.recreateAllGraphics(),this._signalUpdatingDuringAsyncLoadedGraphicsChange()}})],"loaded-graphics")}}),{initial:!0}),_((()=>this.effectiveUpdatePolicy),(e=>{null!=this.stageLayer&&(this.stageLayer.updatePolicy=e),this.symbolCreationContext.isAsync=this.effectiveUpdatePolicy===Ee.ASYNC,e===Ee.SYNC&&this.runTask(Oe)}),v)]),this._frameTaskHandle=t.resourceController.scheduler.registerTask(Ve.GRAPHICS_CORE,this),this.layer&&"featureReduction"in this.layer&&this.addHandles(_((()=>this.layer.featureReduction),(()=>this._deconflictor?.featureReductionChange()))),this.notifyChange("averageSymbolComplexity"),this.rendererChange(this.owner.renderer).catch((()=>{})),this._initializeAbortController=null}_abortInitialize(){this._initializeAbortController=o(this._initializeAbortController)}_updateFocusedLabels(){this.forEachGraphics3DSymbol(((e,t)=>{t&&e.updateFocus((({graphic:e})=>this.recreateGraphics([e])),t)}))}destroy(){this._unusedSymbolsCache.destroy(),this._abortInitialize(),this._rendererChangeAbortController=o(this._rendererChangeAbortController),this._abortElevationInfoChange(),this._frameTaskHandle.remove(),this._frameTaskHandle=je,this._dataUpdateQueue.cancelAll(),this._updateQueue.cancelAll(),this._deconflictor=l(this._deconflictor),this._labeler=l(this._labeler),this._elevationAlignment=h(this._elevationAlignment),this._scaleVisibility=h(this._scaleVisibility),this._filterVisibility=h(this._filterVisibility),this._objectStates=h(this._objectStates),this.clear(),this._featureStore=h(this._featureStore),this._updatingPendingLoadedGraphicsChange=l(this._updatingPendingLoadedGraphicsChange),this._graphicStateTracking=h(this._graphicStateTracking),this.stage&&(this.stageLayer=h(this.stageLayer),this.stage=null),this._set("owner",null);for(const e in this._whenGraphics3DGraphicRequests)this._whenGraphics3DGraphicRequests[e].reject(new r("graphic:layer-destroyed","Layer has been destroyed"));this._whenGraphics3DGraphicRequests=null,this._sharedSymbolResourcesOwnerHandle=l(this._sharedSymbolResourcesOwnerHandle),this._propertiesPool=h(this._propertiesPool),this._pendingUpdatesPool=null,this._symbolConversionCache.clear(),this._objectIdInvisibleSet.clear(),this._spatialIndex=h(this._spatialIndex)}clear(){this._objectStates?.allGraphicsDeleted(),null!=this._graphicStateTracking&&this._graphicStateTracking.allGraphicsDeleted(),this.graphics3DGraphics.forEach((e=>e.destroy())),this._spatialIndex?.clear(),this.graphics3DGraphics.clear(),this._numberOfGraphics=0,this._usedMemory=0,this._updateLayerVisibility(),this._symbols.forEach(h),this._symbols.clear(),this._symbolMaterials=null,this._graphicsBySymbol.clear(),this._graphicsWithoutSymbol.clear(),this._graphicsWaitingForSymbol.clear(),this._pendingUpdates.clear(),this._pendingUpdatesPool.clear(),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1,this.notifyChange("dataUpdating"),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}_initializeStage(e,t){this.stage=e.stage,this.stageLayer=new Ie(this.stage,{visible:!this.suspendedOrOutsideOfView,updatePolicy:this.effectiveUpdatePolicy},t);const i=this.stageLayer.events;i.on("transformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("shaderTransformationChanged",(e=>this.notifyGraphicGeometryChanged(e.graphicUid))),i.on("visibilityChanged",(e=>this.notifyGraphicVisibilityChanged(e.graphicUid))),i.on("geometryAdded",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("geometryRemoved",(e=>this.notifyGraphicGeometryChanged(e.object.graphicUid))),i.on("attributesChanged",(e=>Ue(e.attribute)&&this.notifyGraphicGeometryChanged(e.object.graphicUid)))}notifyGraphicGeometryChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicGeometry(t)}notifyGraphicVisibilityChanged(e){if(null==this._graphicStateTracking||null==e)return;const t=this.graphics3DGraphics.get(e);t&&this._graphicStateTracking.updateGraphicVisibility(t)}_updateLayerVisibility(){const e=this.displayFeatureLimit.maximumNumberOfFeatures,t=this._numberOfGraphics>e*qe,i=!this.suspendedOrOutsideOfView&&!t;i!==this._visible&&(this._visible=i,this._updateStageLayerVisibility())}_updateStageLayerVisibility(){const e=this._visible&&(null==this.layer.opacity||this.layer.opacity>=Me);this.stageLayer.visible!==e&&(this.stageLayer.visible=e,e?this.updateGraphicsVisibilities():this._hideAllGraphics(),this.owner.notifyContentGeometryUpdate?.())}getGraphics3DGraphicById(e){return null!=e?this.graphics3DGraphics.get(e):void 0}getGraphics3DGraphicByObjectId(e){return this.owner.layer?.objectIdField?this._findGraphics3DGraphicByObjectId(e):null}_getGraphicObjectID(e,t=this.owner.layer?.objectIdField){return N(e,t)}get graphics3DGraphicsByObjectID(){const e=this.owner.layer?.objectIdField;if(!e)return;const t=new Map;return this.graphics3DGraphics.forEach((i=>{if(!i)return;const r=i.graphic,s=this._getGraphicObjectID(r,e);null!=s&&t.set(s,i)})),t}get labelsEnabled(){return!!this._labeler?.layerLabelsEnabled()}async updateLabelingInfo(e){const t=this._deconflictor?.labelingInfoChange(e),i=this._labeler?.labelingInfoChange(e);await Promise.allSettled([t,i])}updateVisibilityInfo(){this._deconflictor?.labelingInfoChange(),this._labeler?.visibilityInfoChange()}get symbolUpdateType(){if(this._pendingUpdates.size>0)return"unknown";let e=!1,t=!1;for(const[i,r]of this._symbols)if(null!=r){switch(r.getFastUpdateStatus()){case Se.Loading:return"unknown";case Se.Fast:this._graphicsBySymbol.has(i)&&(t=!0);break;case Se.Slow:this._graphicsBySymbol.has(i)&&(e=!0);break;case Se.Mixed:this._graphicsBySymbol.has(i)&&(t=e=!0);case Se.Undefined:}}return t?e?"mixed":"fast":e?"slow":"mixed"}runTask(e){if(this._dataUpdateQueue.runTask(e),this._updateQueue.runTask(e),this._applyPendingUpdates(e),this.notifyChange("running"),this.running||this.notifyChange("dataUpdating"),this.notifyChange("updatingRemaining"),!e.hasProgressed)return Te}setObjectIdVisibility(e,t){t?this._objectIdInvisibleSet.delete(e):this._objectIdInvisibleSet.add(e);const i=this._findGraphics3DGraphicByObjectId(e);null!=i&&this._updateUserVisibility(i)}_findGraphics3DGraphicByObjectId(e){return n(this.graphics3DGraphics,(t=>this._getGraphicObjectID(t.graphic)===e))}_updateUserVisibility(e){if(null==e)return!1;const t=e.graphic,i=this._getGraphicObjectID(t),r=t.visible&&!this.owner.suspended&&this.stageLayer.visible&&(null==i||!this._objectIdInvisibleSet.has(i));return e.setVisibilityFlag(de.GRAPHIC,pe.USER,r)}_whenGraphics3DGraphic(e){const t=this.graphics3DGraphics.get(e.uid);if(t)return Promise.resolve(t);const i=this._whenGraphics3DGraphicRequests[e.uid];if(i)return i.promise;const r=u();return this._whenGraphics3DGraphicRequests[e.uid]=r,r.promise}async _boundsForGraphics3DGraphic(e,t){const i=this._viewSpatialReference,r=this.owner.view.renderSpatialReference,s=this.owner.view.basemapTerrain.spatialReference,a=(e,t,s)=>j(e,r,t,e,i,t,s),n=(e,t,r)=>j(e,s,t,e,i,t,r),o=this._viewElevationProvider?{service:this._viewElevationProvider,useViewElevation:null!=t&&!!t.useViewElevation,minDemResolution:null!=t?t.minDemResolution:null,minDemResolutionForPoints:this.owner.view.resolution}:null,l=await e.getProjectedBoundingBox(a,n,o,t?.signal);if(!l)return null;const h=l.boundingBox;if(l.requiresDrapedElevation){const e=this.symbolCreationContext.elevationProvider;if(e){F(h,ze);const t=e.getElevation(ze[0],ze[1],0,i,"ground")??0;h[2]=Math.min(h[2],t),h[5]=Math.max(h[5],t)}}return{boundingBox:h,screenSpaceObjects:l.screenSpaceObjects}}async whenGraphicBounds(e,t){await C((()=>this.owner?.loadedGraphics));const i=this.owner.layer?.objectIdField,s=this.owner.loadedGraphics.find((t=>t===e||null!=i&&null!=t.attributes&&e.attributes&&t.attributes[i]===e.attributes[i]));if(!s)throw new r("internal:graphic-not-part-of-view","Graphic is not part of this view");const a=await this._whenGraphics3DGraphic(s);return this._boundsForGraphics3DGraphic(a,t)}computeAttachmentOrigin(e,t){const i=this.graphics3DGraphics.get(e.uid);if(!i)return null;const r=i.computeAttachmentOrigin();if(0===r.render.num&&0===r.draped.num)return null;R(Ye,0,0,0);let s=0;if(r.render.num>0){if(!O(r.render.origin,this.symbolCreationContext.renderCoordsHelper.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}if(r.draped.num>0){const[e,i]=r.draped.origin,a=this._viewElevationProvider.getElevation(e,i,"ground")??0;if(R(Qe,e,i,a),!O(Qe,this._viewElevationProvider.spatialReference,Qe,t))return null;D(Ye,Ye,Qe),s++}return s>1&&E(Ye,Ye,1/s),new A({x:Ye[0],y:Ye[1],z:Ye[2],spatialReference:t})}getSymbolLayerSize(e,t){const i=this._symbols.get(e.id);if(null==i)throw new r("internal:symbol-not-part-of-view","Symbol is not part of this view");const s=e.symbolLayers.indexOf(t);if(-1===s)throw new r("internal:missing-symbol-layer","Symbol layer is not in symbol");const a=i.getSymbolLayerSize(s);if(null==a)throw new r("internal:missing-size","Symbol layer has no valid size");return a}_graphicsCollectionChanged(e){this._startCreateGraphics&&(this.add(e.added),this.remove(e.removed))}graphicUpdateHandler(e){const t=e.graphic.uid,i=this.graphics3DGraphics.get(t);if(null!=i||null!=this._graphicsWithoutSymbol.get(t)){switch(e.property){case"visible":this._graphicUpdateVisibleHandler(i);break;case"geometry":this._graphicUpdateGeometryHandler(i,e);break;case"symbol":this._graphicUpdateSymbolHandler(i,e);break;case"attributes":case"popupTemplate":break;case"origin-transform":this._graphicUpdateTransformHandler(i,e)}this.owner.notifyContentGeometryUpdate?.()}}_graphicUpdateGeometryHandler(e,t){this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>!(null==t.newValue||null==e||!e.graphics3DSymbol.updateGeometry(e,t.newValue)||!(this._labeler?.updateGraphicGeometry(e)??1))&&(this._labeler?.setDirty(),!0)));const i=t.graphic.geometry;null!=i&&this._expandComputedExtent(i)}_graphicUpdateTransformHandler(e,t){const i=t.graphic.geometry;this._graphicUpdateGeometryOrTransformHandler(e,t,(()=>null!=t.newValue&&null!=e&&null!=i&&e.graphics3DSymbol.updateTransform(e,i.spatialReference,t.newValue,t.action)))}_graphicUpdateGeometryOrTransformHandler(e,t,i){if(null!=t.graphic.geometry)if(null!=e)i()||this._recreateGraphic(e.graphic);else{const e=t.graphic.symbol?.id;if(e){const t=this._symbols.get(e);if(null!=t&&t.loadStatus===we.LOADING)return}this._recreateGraphic(t.graphic)}else this._recreateGraphic(t.graphic)}_graphicUpdateSymbolHandler(e,t){const i=t.graphic,r=null!=e?e.graphics3DSymbol:null!=t.oldValue?this._symbols.get(t.oldValue.id):null;if(null==r||null==t.newValue)return void this._recreateGraphic(i);const s=r.symbol,a=this._getConvertedSymbol(t.newValue);if(null!=a&&(a.type!==s.type||"web-style"===a.type)||"web-style"===s.type)return void this._recreateGraphic(i);const n=this._graphicsBySymbol.get(s.id);if(n&&1!==n.size)return void this._recreateGraphic(i);const o=x(s,a);if(null==o)return void this._updateSymbolMapping(s.id,a);const l={diff:o,graphics3DGraphicPatches:[],symbolStatePatches:[]};if(r.prepareSymbolPatch(l),!P(l.diff))return void this._recreateGraphic(i);const h=this._getRenderingInfo(i,!1);if(null==h)return void this._recreateGraphic(i);const d=r.extentPadding;for(const p of l.symbolStatePatches)p();if(d!==r.extentPadding&&this._recomputeExtentPadding(),null!=e)for(const p of l.graphics3DGraphicPatches)p(e,h);this._updateSymbolMapping(s.id,a)}_graphicUpdateVisibleHandler(e){this._updateUserVisibility(e)&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}recreateGraphics(e){this._suspendSymbolCleanup=!0,this.remove(e),this.add(e),this._suspendSymbolCleanup=!1,this.effectiveUpdatePolicy===Ee.SYNC&&this._cleanupSymbols()}_recreateGraphic(e){this.recreateGraphics([e])}_beginGraphicUpdate(e){const t=this._graphicsUpdateId;return this._graphicsUpdateId++,this._graphicsWaitingForSymbol.set(e.uid,t),1===this._graphicsWaitingForSymbol.size&&this.notifyChange("dataUpdating"),t}_endGraphicUpdate(e,t){e&&(t&&this._graphicStateTracking?.updateGraphicError(e,t),this._graphicsWaitingForSymbol.delete(e.uid),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating")))}_recomputeExtentPadding(){let e=0;this._symbols.forEach((t=>{null!=t&&(e=Math.max(e,t.extentPadding))})),this._set("extentPadding",e)}_expandComputedExtent(e){const t=We,i=e.spatialReference;B(e,t);const r=this._viewSpatialReference,s=ke.tmpVec;if(W(i,r)||V(t[0],t[1],0,i,s,r)&&(t[0]=s[0],t[1]=s[1],V(t[3],t[4],0,i,s,r),t[3]=s[0],t[4]=s[1]),!(isFinite(t[0])&&isFinite(t[3])&&isFinite(t[1])&&isFinite(t[4])))return;const a=this.computedExtent;let n=null;const o=isFinite(t[2])&&isFinite(t[5]),l=o&&(null==a?.zmin||t[2]<a.zmin),h=o&&(null==a?.zmax||t[5]>a.zmax);if(a){(t[0]<a.xmin||t[1]<a.ymin||t[3]>a.xmax||t[4]>a.ymax||l||h)&&(n=this._propertiesPool.get("computedExtent"),n.xmin=Math.min(t[0],a.xmin),n.ymin=Math.min(t[1],a.ymin),n.xmax=Math.max(t[3],a.xmax),n.ymax=Math.max(t[4],a.ymax),n.spatialReference=r)}else n=this._propertiesPool.get("computedExtent"),n.xmin=t[0],n.ymin=t[1],n.xmax=t[3],n.ymax=t[4],n.spatialReference=r;n&&(l&&(n.zmin=t[2]),h&&(n.zmax=t[5]),this._set("computedExtent",n))}_abortElevationInfoChange(){this._elevationInfoChangeAbortController&&(this._elevationInfoChangeAbortController.abort(),this._elevationInfoChangeAbortController=null)}async elevationInfoChange(){this._abortElevationInfoChange();const e=new AbortController;this._elevationInfoChangeAbortController=e;const t=ce(this.layer.elevationInfo,this.elevationFeatureExpressionEnabled);this.symbolCreationContext.featureExpressionInfoContext=await ye(t,this._viewSpatialReference,e.signal,a.getLogger(this)),y(e.signal),this._elevationInfoChangeAbortController=null,this._labeler?.elevationInfoChange(),this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("elevationInfo",t)?t?.forEach((e=>{const t=e.graphic,i=e.labelLayers;for(const r of i){r.graphics3DSymbolLayer.updateGraphicElevationContext(t,r)}})):this._recreateSymbol(i)})),this.updateStageLayerElevationProvider(),this._elevationAlignment?.elevationInfoChange()}updateStageLayerElevationProvider(){this._stageLayerElevationProvider?(this.layer.elevationInfo&&"relative-to-scene"===this.layer.elevationInfo.mode||0===this._numberOfGraphicsProvidingElevation)&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider)):(!this.layer.elevationInfo||this.layer.elevationInfo&&"relative-to-scene"!==this.layer.elevationInfo.mode)&&this._numberOfGraphicsProvidingElevation>0&&(this._stageLayerElevationProvider=new Pe({layer:this.layer,stageLayer:this.stageLayer,view:this.owner.view}),this.owner.view.elevationProvider.register("scene",this._stageLayerElevationProvider))}_clearSymbolsAndGraphics(){this.clear(),null!=this._filterVisibility&&this._filterVisibility.clear(),this._labeler?.reset(),this._deconflictor?.clear(),this._elevationAlignment?.clear(),this.stageLayer?.invalidateSpatialQueryAccelerator(),this._stageLayerElevationProvider&&(this.owner.view.elevationProvider.unregister(this._stageLayerElevationProvider),this._stageLayerElevationProvider=d(this._stageLayerElevationProvider))}startCreateGraphics(){this._startCreateGraphics=!0,this.recreateAllGraphics()}recreateAllGraphics(){this._recreateAllGraphics(!1)}recreateAllGraphicsAndSymbols(){this._recreateAllGraphics(!0)}_recreateAllGraphics(e=!1){if(!this._startCreateGraphics)return;const{loadedGraphics:t,view:i}=this.owner,r=i.basemapTerrain?.tilingScheme&&t?.length?t.toArray():null;!e&&r||this._clearSymbolsAndGraphics(),this.symbolCreationContext.screenSizePerspectiveEnabled=this.owner.view.screenSizePerspectiveEnabled&&!!this.layer.screenSizePerspectiveEnabled,this.symbolCreationContext.slicePlaneEnabled=!!this.owner.slicePlaneEnabled,this._set("computedExtent",null),r&&(e?this.add(r):this.recreateGraphics(r))}_recreateSymbol(e){const t=this._graphicsBySymbol.get(e),i=[];t&&(t.forEach(((e,t)=>{const r=e.usedMemory;this._conditionalRemove(e,t),this._spatialIndex?.remove(e),i.push(e.graphic),e.destroy(),this._removeGraphics3DGraphic(t,r),this._updateLayerVisibility(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()})),this._graphicsBySymbol.set(e,new Map));const r=this._symbols.get(e);h(r),this._symbols.delete(e),this._symbolMaterials=null,h(this._unusedSymbolsCache.pop(e)),this.add(i)}_recreateGraphicsForSymbol(e){const t=this._graphicsBySymbol.get(e);if(t){const e=[];t.forEach((t=>e.push(t.graphic))),this.recreateGraphics(e)}}_conditionalRemove(e,t){this._graphicsDrapedUids.delete(t),this._objectStates?.removeGraphic(e),this._labeler?.removeGraphic(e),this._deconflictor?.removeGraphic(e),null!=this._graphicStateTracking&&this._graphicStateTracking.removeGraphic(e)}add(e){e&&0!==e.length&&(this.owner.view.basemapTerrain?.tilingScheme?(this._updatePolicyForGraphics(e)===Ee.ASYNC?this._addDelayed(e):this._addImmediate(e),this.notifyChange("dataUpdating")):a.getLogger(this).error("#add()","Cannot add graphics before terrain surface has been initialized"))}_updatePolicyForGraphics(e){if(this.effectiveUpdatePolicy===Ee.SYNC&&("mesh"===this.layer.geometryType||null==this.layer.geometryType))for(const t of e)if(null!=t.geometry&&"mesh"===t.geometry.type&&!t.geometry.loaded)return Ee.ASYNC;return this.effectiveUpdatePolicy}_addImmediate(e){this._geometryWarningLogged=!1,this._symbolWarningLogged=!1;for(const t of e)this._addGraphic(t,this._getRenderingInfo(t),Ee.SYNC);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_addDelayed(e){for(const t of e){const e=t.uid;let i=this._pendingUpdates.get(e);i?i.add?i.state!==Ne.NEW&&i.abortController?.abort():this._pendingAdds++:(i=this._pendingUpdatesPool.pushNew(),this._pendingAdds++,this._pendingUpdates.set(e,i)),i.add=t}this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}remove(e){this.effectiveUpdatePolicy===Ee.ASYNC?this._removeDelayed(e):this._removeImmediate(e),this.notifyChange("dataUpdating")}_removeImmediate(e){for(const t of e)this._removeGraphic(t);this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_removeDelayed(e){for(const t of e){const e=t.uid,i=this._pendingUpdates.get(e);if(i)i.add&&(i.remove?i.add=null:this._pendingUpdates.delete(e),i.state===Ne.LOADING&&i.abortController?.abort(),this._pendingAdds--);else{const i=this._pendingUpdatesPool.pushNew();i.remove=t,this._pendingUpdates.set(e,i),this._pendingRemoves++,this._applyPendingRemovesFirst=!0}}0===this._pendingUpdates.size&&this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("updatingRemaining"),this.notifyChange("dataUpdating")}_finishPendingUpdates(){this._pendingUpdatesPool.clear(),this._cleanupSymbols(),(this._pendingAdds||this._pendingRemoves)&&a.getLogger(this).warn("pendingAdds/Removes in inconsistent state!"),this._pendingAdds=0,this._pendingRemoves=0,this._applyPendingRemovesFirst=!1}_applyPendingUpdates(e){if(this._geometryWarningLogged=!1,this._symbolWarningLogged=!1,0===this._pendingUpdates.size&&this._spatialIndex?.updating)return this._spatialIndex.update(),void e.madeProgress();if(this._applyPendingRemovesFirst){this._applyPendingRemovesFirst=!1;for(const[t,i]of this._pendingUpdates){if(e.done){this._applyPendingRemovesFirst=!0;break}if(i.remove&&!i.add&&(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,this._pendingUpdates.delete(t),0===this._pendingRemoves))break}}for(const[t,i]of this._pendingUpdates){if(e.done)break;i.add&&i.state===Ne.NEW&&this._processPendingUpdateNew(i);let r=this.effectiveUpdatePolicy;if(!i.remove||i.add&&i.state!==Ne.READY||(this._pendingRemoves--,e.madeProgress(),this._removeGraphic(i.remove),i.remove=null,r=Ee.SYNC),i.add)switch(i.state){case Ne.READY:this._addGraphic(i.add,i.renderingInfo,r),i.add=null,this._pendingAdds--,e.madeProgress();break;case Ne.REJECTED:i.add=null,this._pendingAdds--;case Ne.LOADING:}null==i.remove&&null==i.add&&this._pendingUpdates.delete(t)}0===this._pendingUpdates.size&&(this._finishPendingUpdates(),this.notifyChange("running"),this.notifyChange("dataUpdating"))}_processPendingUpdateNew(e){if(!e.add)return void(e.state=Ne.READY);const t=e.add.geometry;null==t||"mesh"!==t.type||t.loaded?this._processPendingUpdateNewRenderingInfo(e):this._processPendingUpdateNewMesh(e,t)}async _processPendingUpdateNewMesh(e,t){e.state=Ne.LOADING,e.abortController=new AbortController;const i=e.abortController.signal;try{await t.load({signal:i})}catch(r){return this._processPendingUpdateNewError(e,r)}e.abortController=null,this._processPendingUpdateNewRenderingInfo(e)}_processPendingUpdateNewError(e,t){e.abortController=null,m(t)?e.state=Ne.NEW:e.state=Ne.REJECTED}async _processPendingUpdateNewRenderingInfo(e){if(null==this.layer.renderer||"dictionary"!==this.layer.renderer.type)return e.renderingInfo=this._getRenderingInfo(e.add),void(e.state=Ne.READY);e.state=Ne.LOADING,e.abortController=new AbortController;let t=null;try{t=await this._getRenderingInfoAsync(e.add,{signal:e.abortController.signal})}catch(i){return e.abortController=null,void(m(i)?e.state=Ne.NEW:e.state=Ne.REJECTED)}null==t?.symbol?(this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),e.renderingInfo=null):e.renderingInfo=t,e.state=Ne.READY}_addGraphic(e,t,i){if(this._graphicsWithoutSymbol.set(e.uid,e),null==t?.symbol||!q(e))return;const r=this.stage.renderView.olidRenderHelper;if(r&&this.setUidToIdOnAdd){const t=K(this.owner.view,this.owner.layerViewUid);r.setUidToObjectAndLayerId(e.objectId,e.uid,this.layer.id,this.owner.layerViewUid,!!this.layer.popupEnabled&&!t&&Ae(this.layer,this.owner.view.popup?.defaultPopupTemplateEnabled))}const s=t.symbol,a=this.getOrCreateGraphics3DSymbol(s,t.renderer);if(null==a)return;this._expandComputedExtent(e.geometry);const n=this._beginGraphicUpdate(e),o=new ue(e,t,this.layer);let l=!1;const h=e=>{e===a.symbol.id&&(l=!0)};this._whenSymbolRemoved.push(h);const d=()=>{if(--this._loadingSymbols,this.destroyed)return;this._whenSymbolRemoved.removeUnordered(h);if(this._graphicsWaitingForSymbol.get(e.uid)!==n||l||a.destroyed||this.graphicSymbolSupported&&e.symbol&&e.symbol.id!==a.symbol.id)--a.referenced,this._cleanupSymbols();else{const t=this._createGraphics3DGraphic(a,o);this._spatialIndex&&null!=t&&this._spatialIndex.add(t),--a.referenced,this._endGraphicUpdate(e)}this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.(),this._labeler?.setDirty()},p=t=>{--this._loadingSymbols,this.destroyed||(this._whenSymbolRemoved.removeUnordered(h),l||(m(t)?this.add([e]):a.destroyed||this._endGraphicUpdate(e,t)))};++this._loadingSymbols,i===Ee.ASYNC?a.load((()=>this._dataUpdateQueue.push(d,null).catch(g)),(e=>this._dataUpdateQueue.push((()=>p(e)),null).catch(g))):a.load(d,p)}_removeGraphic(e){const t=e.uid,i=this.graphics3DGraphics.get(t);if(i){i.graphics3DSymbol.onRemoveGraphic(i);const e=i.usedMemory,r=i.isElevationSource;this._conditionalRemove(i,t),this._spatialIndex?.remove(i);const s=i.graphics3DSymbol.symbol.id;this._graphicsBySymbol.get(s)?.delete(t),this._graphicsWithoutSymbol.delete(t),this._removeGraphics3DGraphic(t,e,r),i.destroy(),this._featureStore.events.emit("changed"),this.owner.notifyContentGeometryUpdate?.()}else this._graphicsWithoutSymbol.delete(t),this._graphicsWaitingForSymbol.delete(t),0===this._graphicsWaitingForSymbol.size&&(this._cleanupSymbols(),this.notifyChange("dataUpdating"))}_hasLabelingContext(e){if(e instanceof te||e instanceof ie){const t=this.symbolCreationContext.layer;return!!t.labelingInfo&&t.labelingInfo.some((t=>t.symbol===e))}return!1}_hasValidSymbolCreationContext(e){return!(e instanceof te&&!this._hasLabelingContext(e))||(a.getLogger(this).error("LabelSymbol3D is only valid as part of a LabelClass. Using LabelSymbol3D as a renderer symbol is not supported."),!1)}_getRenderingInfo(e,t=!0){const i=e.geometry;if(null==i)return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!L(i.spatialReference,this._viewSpatialReference))return t&&!this._geometryWarningLogged&&(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has incompatible spatial reference and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const r=this.rendererHasGeometryOperations?Y(e,this.layer):e;let s;if(this.owner.getRenderingInfo&&(this.getRenderingInfoWithoutRenderer||null!=this.currentRenderer))s=this.owner.getRenderingInfo(r,this.currentRenderer,this._arcadeOnDemand);else{const e=r.symbol||se(r.geometry);s=new X(null,e)}return null==s?.symbol?(t&&!this._symbolWarningLogged&&(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no symbol and will not render`)),null):s}_getRenderingInfoAsync(e,t){if(null==e.geometry)return this._geometryWarningLogged||(this._geometryWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} has no geometry and will not render`)),null;if(!this.graphicSymbolSupported&&null!=e.symbol)return this._symbolWarningLogged||(this._symbolWarningLogged=!0,a.getLogger(this).warn(`Graphic in layer ${this.layer.id} is not allowed to have a symbol, use a renderer instead`)),null;const i=this.rendererHasGeometryOperations?Y(e,this.layer):e;return this.owner.getRenderingInfoAsync(i,this.currentRenderer,this._arcadeOnDemand,t)}_createGraphics3DSymbol(e,t){if(!this._hasValidSymbolCreationContext(e))return null;const i=this._getConvertedSymbol(e);if(!i)return null;let r;if(null!=t&&"backgroundFillSymbol"in t&&t.backgroundFillSymbol){const e=ae(t.backgroundFillSymbol,{ignoreDrivers:!0});null!=e.symbol&&(r=e.symbol.symbolLayers)}const s=be(i,this.symbolCreationContext,r);return s.load((()=>{const e=s.extentPadding;e>this.extentPadding&&this._set("extentPadding",e),this.notifyChange("averageSymbolComplexity")}),(()=>{})),s}getOrCreateGraphics3DSymbol(e,t){let i=this._symbols.get(e.id);if(void 0===i){const r=this._unusedSymbolsCache.pop(e.id);i=null!=r?r:e instanceof re?new _e(e,(e=>this._dataUpdateQueue.push(e,null)),(e=>this._createGraphics3DSymbol(e,t))):this._createGraphics3DSymbol(e,t),this._symbols.set(e.id,i),this._symbolMaterials=null}return null!=i&&++i.referenced,i}trackGraphicState(e){return null==this._graphicStateTracking&&(this._graphicStateTracking=new ve(this)),this._graphicStateTracking.add(e)}_addGraphics3DGraphic(e){this._usedMemory+=e.usedMemory,this.graphics3DGraphics.set(e.graphic.uid,e),this._numberOfGraphics++,e.isElevationSource&&(this._numberOfGraphicsProvidingElevation++,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_removeGraphics3DGraphic(e,t,i=!1){this._usedMemory-=t,this.graphics3DGraphics.delete(e),this._numberOfGraphics--,i&&(this._numberOfGraphicsProvidingElevation--,this.updateStageLayerElevationProvider()),this._updateLayerVisibility()}_createGraphics3DGraphic(e,t){const i=t.graphic;if(this._graphicsWithoutSymbol.delete(i.uid),!this._symbols.has(e.symbol.id))return this.add([i]),null;if(this.graphics3DGraphics.has(i.uid))return null;const r=e.createGraphics3DGraphic(t);if(null==r)return null;this._addGraphics3DGraphic(r);const s=e.symbol.id;this._graphicsBySymbol.has(s)||this._graphicsBySymbol.set(s,new Map),this._graphicsBySymbol.get(s).set(i.uid,r);if(r.isDraped&&this._graphicsDrapedUids.add(i.uid),r.centroid=null,null!=i.geometry&&"point"!==i.geometry.type&&(r.centroid=Ce(i.geometry,this._viewSpatialReference)),this._updateUserVisibility(r),null!=this._scaleVisibility&&this._scaleVisibility.updateVisibility(r),null!=this._filterVisibility){const{defaultVisibility:e}=this._filterVisibility;r.setVisibilityFlag(de.GRAPHIC,pe.FILTER,e),e||this._filterVisibility.reapply()}this._deconflictor?.addGraphic(r),this._labeler?.addGraphic(r),this._objectStates?.addGraphic(r),r.initialize(this.stageLayer),null!=this._graphicStateTracking&&this._graphicStateTracking.addGraphic(r);const a=this._whenGraphics3DGraphicRequests[i.uid];return a&&(delete this._whenGraphics3DGraphicRequests[i.uid],a.resolve(r)),this._symbolMaterials=null,r}async rendererChange(e){if(this._rendererChangeAbortController=o(this._rendererChangeAbortController),e!==this.currentRenderer)if(this._validateRenderer(e),null==e&&this._currentRendererChange(null,!1),Z(e))if(e?.arcadeRequired){const t=new AbortController;this._rendererChangeAbortController=t;const{arcadeUtils:i}=await this._ensureArcade();y(t);const r=i.hasGeometryOperations(e);r&&(await i.enableGeometryOperations(),y(t)),this.effectiveUpdatePolicy===Ee.ASYNC?await this._updateQueue.push((()=>this._currentRendererChange(e,r)),t.signal):this._currentRendererChange(e,r),this._rendererChangeAbortController=null}else if(this.effectiveUpdatePolicy===Ee.ASYNC){const t=new AbortController;this._rendererChangeAbortController=t,await this._updateQueue.push((()=>this._currentRendererChange(e,!1)),t.signal),this._rendererChangeAbortController=null}else this._currentRendererChange(e,!1);else this._currentRendererChange(e,!1)}async _ensureArcade(){return null==this._arcadeOnDemand?(this._arcadeOnDemand=await ee(),this._arcadeOnDemand):this._arcadeOnDemand}_currentRendererChange(e,t){this.currentRenderer=e,this.rendererHasGeometryOperations=t,this.symbolCreationContext.arcade=this._arcadeOnDemand;const i=this.symbolCreationContext.renderer;if(e===i)return;if(this._symbolConversionCache.clear(),this._unusedSymbolsCache.clear(),null==e)return this.symbolCreationContext.renderer=null,void this.recreateAllGraphicsAndSymbols();const r=x(i,e);this._updateUnchangedSymbolMappings(r,e,i),this.symbolCreationContext.renderer=e,null!=r&&("complete"===r.type?this.recreateAllGraphicsAndSymbols():"partial"===r.type&&(this._applyRendererDiff(r,e,i)?this._labeler?.reset():this.recreateAllGraphicsAndSymbols()),this.notifyChange("averageSymbolComplexity"))}_diffHasSymbolChange(e){for(const t in e.diff)switch(t){case"visualVariables":case"defaultSymbol":case"uniqueValueInfos":break;case"uniqueValueGroups":case"authoringInfo":case"fieldDelimiter":delete e.diff[t];break;default:return!0}return!1}_applySymbolSetDiff(e,t,i){e=e||[],t=t||[];const r=[];for(const s of t){const t=this._graphicsBySymbol.get(s.id);t&&t.forEach(((a,n)=>{const o=a.graphic,l=this.layer instanceof H?this.layer:null,h=this._arcadeOnDemand;if(s===i.defaultSymbol&&i.getSymbol(Y(o,l),{arcade:h})===i.defaultSymbol)return;const d=a.usedMemory;e.length||i.defaultSymbol?r.push(o):this._graphicsWithoutSymbol.set(n,o);const p=this.graphics3DGraphics.get(n);this._conditionalRemove(p,n),a.destroy(),t.delete(n),this._removeGraphics3DGraphic(n,d),this._updateLayerVisibility()})),this._whenSymbolRemoved.forAll((e=>e(s.id)))}(e.length||r.length)&&(this._graphicsWithoutSymbol.forEach((e=>r.push(e))),this._graphicsWithoutSymbol.clear(),this.add(r)),this._cleanupSymbols(),this._labeler?.setDirty(),this._deconflictor?.setDirty()}_applyUniqueValueRendererDiff(e,t,r){const s=e.diff.defaultSymbol,a=e.diff.uniqueValueInfos;if(s||a){const n=a?.changed,o=a?.unchanged;if(n&&o&&n.some((e=>o.some((t=>t.oldValue.symbol?.id===e.oldValue.symbol?.id)))))return!1;const l=a?a.added.map((e=>e.symbol)).filter(i):[],h=a?a.removed.map((e=>e.symbol)).filter(i):[];if(n)for(let e=0;e<n.length;e++)l.push(n[e].newValue.symbol),h.push(n[e].oldValue.symbol);return s?(r.defaultSymbol&&h.push(r.defaultSymbol),t.defaultSymbol&&l.push(t.defaultSymbol)):r.defaultSymbol&&l.length&&h.push(t.defaultSymbol),this._applySymbolSetDiff(l,h,t),delete e.diff.defaultSymbol,delete e.diff.uniqueValueInfos,!0}return!1}_calculateUnchangedSymbolMapping(e,t,i){if("unique-value"!==t?.type||"unique-value"!==i?.type||null!=e&&"partial"!==e.type)return[];const r=e=>null!=e?e.id:null,s=e&&e.diff,a=s?.defaultSymbol,n=s&&s.uniqueValueInfos;let o;if(n)o=n.unchanged.map((e=>({oldId:r(e.oldValue.symbol),newId:r(e.newValue.symbol)})));else{o=[];for(const e of i.uniqueValueInfos??[]){const i=r(e.symbol),s=t.uniqueValueInfos?.find((t=>t.value===e.value));s&&i!==r(s.symbol)&&o.push({oldId:i,newId:r(s.symbol)})}}return!a&&i.defaultSymbol&&o.push({oldId:r(i.defaultSymbol),newId:r(t.defaultSymbol)}),o}_updateSymbolMapping(e,t){const i=null!=t&&t?"string"==typeof t?t:t.id:null;if(null==e||e===i)return;const r=this._graphicsBySymbol.get(e);this._graphicsBySymbol.delete(e),void 0!==r&&this._graphicsBySymbol.set(i,r);const s=this._symbols.get(e);if(void 0!==s&&(this._symbols.delete(e),this._symbols.set(i,s),this._symbolMaterials=null,null!=s)){const e="string"==typeof t?null:t;null!=e?s.symbol=e:s.symbol.id=i}}_updateUnchangedSymbolMappings(e,t,i){const r=this._calculateUnchangedSymbolMapping(e,t,i);for(const{oldId:s,newId:a}of r)this._updateSymbolMapping(s,a)}_applyRendererDiff(e,t,i){if(this._diffHasSymbolChange(e))return!1;if(t instanceof $&&i instanceof $&&this._applyUniqueValueRendererDiff(e,t,i)&&0===Object.keys(e.diff).length)return!0;for(const r of this._graphicsBySymbol.keys()){const i=this._symbols.get(r);if(null!=i)switch(i.applyRendererDiff(e,t)){case Ge.RecreateSymbol:this._recreateSymbol(r);break;case Ge.RecreateGraphics:this._recreateGraphicsForSymbol(r);case Ge.FastUpdate:}}return!0}opacityChange(){this._updateStageLayerVisibility(),this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("opacity",t)))}_slicePlaneEnabledChange(e){e!==this.symbolCreationContext.slicePlaneEnabled&&(this.symbolCreationContext.slicePlaneEnabled=e,this.stageLayer.sliceable=e,this.forEachGraphics3DSymbol(((e,t)=>e.globalPropertyChanged("slicePlaneEnabled",t))),this._deconflictor?.slicePlaneEnabledChange(),this._labeler?.slicePlaneEnabledChange())}_physicalBasedRenderingChange(e){this.symbolCreationContext.physicalBasedRenderingEnabled=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("physicalBasedRenderingEnabled",t)||this._recreateSymbol(i)}))}_skipHighSymbolLoDsChange(e){this.symbolCreationContext.skipHighSymbolLods=e,this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("skipHighSymbolLods",t)||this._recreateSymbol(i)}))}_pixelRatioChange(){this.forEachGraphics3DSymbol(((e,t,i)=>{e.globalPropertyChanged("pixelRatio",t)||this._recreateSymbol(i)}))}_signalUpdatingDuringAsyncLoadedGraphicsChange(){this._updatingPendingLoadedGraphicsChange&&this._updatingPendingLoadedGraphicsChange.remove(),this._updatingPendingLoadedGraphicsChange=S((()=>{this._updatingPendingLoadedGraphicsChange=null}))}setClippingExtent(e,t){const i=this.symbolCreationContext.clippingExtent,r=z();return Re(e,r,t)?this.symbolCreationContext.clippingExtent=M(T(),r):this.symbolCreationContext.clippingExtent=null,!k(this.symbolCreationContext.clippingExtent,i)}modifyGraphics3DGraphicVisibilities(e){if(this.destroyed)return;let t=!1;this.graphics3DGraphics.forEach((i=>{e(i)&&(t=!0)})),t&&(this._labeler?.setDirty(),this._deconflictor?.setDirty())}forEachGraphics3DSymbol(e,t){for(const[i,r]of this._symbols){if(null==r)return;e(r,this._graphicsBySymbol.get(i)||$e,i)}if(!t?.excludeUnused)for(const i of this._unusedSymbolsCache)e(i,void 0,i.symbol.id)}updateGraphicsVisibilities(){null!=this._filterVisibility&&this._filterVisibility.reapply(),this.modifyGraphics3DGraphicVisibilities((e=>{const t=this._updateUserVisibility(e),i=!!this._scaleVisibility?.updateVisibility(e);return t||i}))}_hideAllGraphics(){this.modifyGraphics3DGraphicVisibilities((e=>e.setVisibilityFlag(de.GRAPHIC,pe.USER,!1)))}_validateRenderer(e){const t=()=>`'${this.layer.title?`${this.layer.title}, `:""}id:${this.layer.id}'`,i=J(e,{geometryType:this.layer?.geometryType,logWarning:(e,i)=>a.getLogger(this).warn(e,`Symbology conversion for layer ${t()}: ${i}`)});if(i){const e=`Renderer for layer ${t} is not supported in a SceneView`;a.getLogger(this).warn(e,i.message)}}_cleanupSymbols(){if(this._graphicsWaitingForSymbol.size>0||this._suspendSymbolCleanup)return;let e=!1;this._symbols.forEach(((t,i)=>{if(null==t||t.referenced>0)return;const r=this._graphicsBySymbol.get(i);r&&0!==r.size||(this._graphicsBySymbol.delete(i),this._symbols.delete(i),this._symbolMaterials=null,this._unusedSymbolsCache.put(i,t,p),e=!0)})),e&&(this._recomputeExtentPadding(),this.notifyChange("averageSymbolComplexity"))}get test(){}get performanceInfo(){return new fe(this.graphics3DGraphics.size,Array.from(this.graphics3DGraphics.values()).reduce(((e,t)=>e+(t.isVisible()?1:0)),0),this._graphicsWithoutSymbol.size,this._pendingUpdates.size)}};var Ne;e([G({readOnly:!0})],He.prototype,"computedExtent",void 0),e([G()],He.prototype,"currentRenderer",void 0),e([G()],He.prototype,"rendererHasGeometryOperations",void 0),e([G()],He.prototype,"_frameTaskHandle",void 0),e([G()],He.prototype,"_dataUpdateQueue",void 0),e([G()],He.prototype,"_updateQueue",void 0),e([G({readOnly:!0})],He.prototype,"_viewSpatialReference",null),e([G()],He.prototype,"_rendererChangeAbortController",void 0),e([G()],He.prototype,"_elevationInfoChangeAbortController",void 0),e([G()],He.prototype,"_initializeAbortController",void 0),e([G()],He.prototype,"_elevationAlignment",void 0),e([G()],He.prototype,"_scaleVisibility",void 0),e([G()],He.prototype,"_filterVisibility",void 0),e([G()],He.prototype,"_initializePromise",void 0),e([G()],He.prototype,"_spatialIndex",void 0),e([G({readOnly:!0})],He.prototype,"extentPadding",void 0),e([G()],He.prototype,"_updatingPendingLoadedGraphicsChange",void 0),e([G()],He.prototype,"_featureStore",void 0),e([G()],He.prototype,"_objectStates",void 0),e([G()],He.prototype,"_loadingSymbols",void 0),e([G({constructOnly:!0})],He.prototype,"compressionTracker",void 0),e([G()],He.prototype,"preferredUpdatePolicy",void 0),e([G()],He.prototype,"_forcedUpdatePolicy",void 0),e([G({readOnly:!0})],He.prototype,"effectiveUpdatePolicy",null),e([G({constructOnly:!0})],He.prototype,"elevationFeatureExpressionEnabled",void 0),e([G({constructOnly:!0})],He.prototype,"owner",void 0),e([G({constructOnly:!0})],He.prototype,"layer",void 0),e([G({constructOnly:!0})],He.prototype,"graphicSymbolSupported",void 0),e([G({constructOnly:!0})],He.prototype,"getRenderingInfoWithoutRenderer",void 0),e([G({constructOnly:!0})],He.prototype,"componentFactories",void 0),e([G({constructOnly:!0})],He.prototype,"setUidToIdOnAdd",void 0),e([G()],He.prototype,"featureStore",null),e([G()],He.prototype,"initializePromise",null),e([G()],He.prototype,"scaleVisibility",null),e([G()],He.prototype,"elevationAlignment",null),e([G()],He.prototype,"objectStates",null),e([G()],He.prototype,"filterVisibility",null),e([G({readOnly:!0})],He.prototype,"updating",null),e([G({readOnly:!0})],He.prototype,"dataUpdating",null),e([G({readOnly:!0})],He.prototype,"running",null),e([G({readOnly:!0})],He.prototype,"suspendedOrOutsideOfView",null),e([G({readOnly:!0,dependsOn:[]})],He.prototype,"updatingRemaining",null),e([G({readOnly:!0})],He.prototype,"displayFeatureLimit",null),e([G({readOnly:!0,dependsOn:[]})],He.prototype,"averageSymbolComplexity",null),e([G({constructOnly:!0})],He.prototype,"hasZ",void 0),e([G({constructOnly:!0})],He.prototype,"hasM",void 0),e([G()],He.prototype,"_objectIdField",null),He=ke=e([w("esri.views.3d.layers.graphics.Graphics3DCore")],He),function(e){e[e.NEW=0]="NEW",e[e.LOADING=1]="LOADING",e[e.READY=2]="READY",e[e.REJECTED=3]="REJECTED"}(Ne||(Ne={}));class Be{constructor(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}clear(){this.add=null,this.renderingInfo=null,this.state=Ne.NEW,this.abortController=null,this.remove=null}}const qe=10,Ye=U(),Qe=U(),$e=new Map;export{He as Graphics3DCore};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import i from"../../../../core/Promise.js";import{initial as s,watch as o,sync as n,whenOnce as a}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{FeatureTileController3D as u}from"../../../../layers/graphics/controllers/FeatureTileController3D.js";import{symbolHasExtrudeSymbolLayer as d}from"../../../../symbols/support/utils.js";import{elevationAlignPointsInFeatures as c}from"./elevationAlignPointsInFeatures.js";import{Graphics3DFeatureProcessor as y}from"./Graphics3DFeatureProcessor.js";import{QueryEngine as g}from"./QueryEngine.js";import{QueryEngineContext as m}from"./QueryEngineContext.js";import{queryForSymbologySnapping as f}from"./queryForSymbologySnapping.js";import{HeatmapFeatureProcessor as E}from"../support/HeatmapFeatureProcessor.js";import{LayerViewPerformanceInfo as w}from"../support/LayerViewPerformanceInfo.js";import{UpdatePolicy as C}from"../../webgl-engine/lib/UpdatePolicy.js";import{hasLayerBasedScaleVisibility as b}from"../../../support/layerViewUtils.js";import{TaskPriority as O}from"../../../support/Scheduler.js";let _=class extends i{constructor(e){super(e),this._dataUpdatingState=v.NONE,this.graphicsQuery={queryForSymbologySnapping:async(e,t)=>this.symbologySnappingSupported?f(this.graphics3DProcessor,e,t):{candidates:[],sourceCandidateIndices:[]},executeQuery:(e,t)=>this.queryEngine.executeQuery(e,t),executeQueryForIds:(e,t)=>this.queryEngine.executeQueryForIds(e,t),executeQueryForCount:(e,t)=>this.queryEngine.executeQueryForCount(e,t),executeQueryForExtent:(e,t)=>this.queryEngine.executeQueryForExtent(e,t),executeQueryForLatestObservations:(e,t)=>this.queryEngine.executeQueryForLatestObservations(e,t)},this.controller=null,this.updatingHandles=new h,this._controllerCreated=!1,this._pendingController=null}initialize(){this.addResolvingPromise(this._initializeController()),this.updatingHandles.add((()=>this.layer.renderer),(e=>this._recreateProcessor(e)),s),this.updatingHandles.add((()=>this.updatePolicy),(e=>this.processor.preferredUpdatePolicy=e));const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:o,resourceController:n}=t,a=new m(o,e,n,(()=>this.processor.featureStore),i,r);this.queryEngine=new g({context:a,priority:O.FEATURE_QUERY_ENGINE})}destroy(){this.removeAllHandles(),this.updatingHandles.destroy(),this._destroyPendingController(),this.controller=r(this.controller),this.processor=r(this.processor),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this._pendingController=r(this._pendingController)}get updating(){return this.updatingHandles.updating||!this._controllerCreated||this.controller?.updating||this.processor?.updating}get legendEnabled(){return this.processor.legendEnabled}get layer(){return this.layerView.layer}get layerViewUid(){return this.layerView.uid}get view(){return this.layerView.view}get hasZ(){return this.layerView.hasZ}get hasM(){return this.layerView.hasM}get fullOpacity(){return this.layerView.fullOpacity}get suspended(){return this.layerView.suspended}get filter(){return"filter"in this.layerView?this.layerView.filter:null}get effectiveDisplayFilter(){return"effectiveDisplayFilter"in this.layerView?this.layerView.effectiveDisplayFilter:null}get slicePlaneEnabled(){return this.layerView.slicePlaneEnabled}get featureSpatialReference(){return"featureSpatialReference"in this.layerView?this.layerView.featureSpatialReference:null}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}get hasAllFeatures(){return!(!this.controller||!("hasAllFeatures"in this.controller))&&this.controller.hasAllFeatures}get hasAllFeaturesInView(){return!(!this.controller||!("hasAllFeaturesInView"in this.controller))&&this.controller.hasAllFeaturesInView}get hasFullGeometries(){return!(!this.controller||!("hasFullGeometries"in this.controller))&&this.controller.hasFullGeometries}get symbologySnappingSupported(){return this.layer?.renderer?.symbols?.some(d)??!1}get updatePolicy(){return C.SYNC}get scaleVisibilitySuspended(){return this.processor?.scaleVisibilitySuspended}get timeExtent(){return"timeExtent"in this.layerView?this.layerView.timeExtent:null}get dataUpdating(){return this._dataUpdatingState!==v.NONE}get suspendInfo(){return this.processor?.suspendInfo??{}}forEachGraphic(e){this.loadedGraphics.forEach(e)}findGraphic(e){return this.loadedGraphics.find(e)}queryObjectIds(e,t){return this.layerView.queryObjectIds(e,t)}whenGraphicBounds(e,t){return this.processor?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,r){const i=this.graphics3DProcessor;if(null==i)throw new t("featurelayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");return c(this.view,this.layer,(e=>i.getGraphics3DGraphicByObjectId(e)),e,r)}highlight(e,t){return this.processor.highlight(e,this.layer.objectIdField,t)}maskOccludee(e){return this.processor.maskOccludee(e)}notifyContentGeometryUpdate(){this.layerView.emit("visible-geometry-changed")}async _initializeController(){const e=this.createController();this._pendingController=e,this._setupDataUpdating(e),await e.when(),this._setControllerWhenInitialized(e)}_setupDataUpdating(e){"dataUpdating"in e&&this.addHandles([o((()=>e.dataUpdating),(e=>{e&&this._dataUpdatingState===v.NONE?this._dataUpdatingState=v.CONTROLLER:e||this._dataUpdatingState!==v.CONTROLLER||(this._dataUpdatingState=v.NONE)}),n),o((()=>!!this.graphics3DProcessor?.dataUpdating),(t=>{t&&this._dataUpdatingState===v.CONTROLLER?this._dataUpdatingState=v.CORE:t||this._dataUpdatingState!==v.CORE||(this._dataUpdatingState=e.dataUpdating?v.CONTROLLER:v.NONE)}),n)])}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.isResolved()&&!this.destroyed?(await a((()=>this.view?.basemapTerrain?.ready)),this.beforeSetController(e),this._pendingController=null,this.controller=e,this.loadedGraphics=e.graphics):this._destroyPendingController()}_recreateProcessor(e){const t="heatmap"===e?.type,r="heatmap"===this.processor?.type,i=this.processor;if(i&&t===r)return;const s=t?new E({owner:this}):new y({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!b,filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this.processor=s,i?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(s.when())}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}get usedMemory(){return this.processor?.usedMemory??0}get performanceInfo(){const e=this.controller instanceof u?this.controller:null;return new w(this.usedMemory,this.loadedGraphics?.length,e?.serviceDataCount??-1,e?.maximumNumberOfFeatures??-1,0,this.processor.performanceInfo)}};var v;e([l()],_.prototype,"updating",null),e([l()],_.prototype,"legendEnabled",null),e([l()],_.prototype,"layerView",void 0),e([l()],_.prototype,"layer",null),e([l()],_.prototype,"layerViewUid",null),e([l()],_.prototype,"view",null),e([l()],_.prototype,"hasZ",null),e([l()],_.prototype,"hasM",null),e([l()],_.prototype,"fullOpacity",null),e([l()],_.prototype,"suspended",null),e([l()],_.prototype,"filter",null),e([l()],_.prototype,"effectiveDisplayFilter",null),e([l()],_.prototype,"slicePlaneEnabled",null),e([l()],_.prototype,"featureSpatialReference",null),e([l()],_.prototype,"loadedGraphics",void 0),e([l()],_.prototype,"graphics3DProcessor",null),e([l()],_.prototype,"heatmapProcessor",null),e([l()],_.prototype,"hasAllFeatures",null),e([l()],_.prototype,"hasAllFeaturesInView",null),e([l()],_.prototype,"hasFullGeometries",null),e([l()],_.prototype,"symbologySnappingSupported",null),e([l()],_.prototype,"updatePolicy",null),e([l()],_.prototype,"scaleVisibilitySuspended",null),e([l()],_.prototype,"timeExtent",null),e([l()],_.prototype,"_dataUpdatingState",void 0),e([l({readOnly:!0})],_.prototype,"dataUpdating",null),e([l()],_.prototype,"controller",void 0),e([l()],_.prototype,"processor",void 0),e([l()],_.prototype,"updatingHandles",void 0),e([l()],_.prototype,"_controllerCreated",void 0),_=e([p("esri.views.3d.layers.graphics.Graphics3DGraphicsPipeline")],_),function(e){e[e.NONE=0]="NONE",e[e.CONTROLLER=1]="CONTROLLER",e[e.CORE=2]="CORE"}(v||(v={}));export{_ as Graphics3DGraphicsPipeline};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Error.js";import{destroyMaybe as r}from"../../../../core/maybe.js";import i from"../../../../core/Promise.js";import{initial as s,watch as o,sync as n,whenOnce as a}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as p}from"../../../../core/accessorSupport/decorators/subclass.js";import{UpdatingHandles as h}from"../../../../core/support/UpdatingHandles.js";import{FeatureTileController3D as u}from"../../../../layers/graphics/controllers/FeatureTileController3D.js";import{symbolHasExtrudeSymbolLayer as d}from"../../../../symbols/support/utils.js";import{elevationAlignPointsInFeatures as c}from"./elevationAlignPointsInFeatures.js";import{Graphics3DFeatureProcessor as y}from"./Graphics3DFeatureProcessor.js";import{QueryEngine as g}from"./QueryEngine.js";import{QueryEngineContext as m}from"./QueryEngineContext.js";import{queryForSymbologySnapping as f}from"./queryForSymbologySnapping.js";import{HeatmapFeatureProcessor as E}from"../support/HeatmapFeatureProcessor.js";import{LayerViewPerformanceInfo as w}from"../support/LayerViewPerformanceInfo.js";import{UpdatePolicy as C}from"../../webgl-engine/lib/UpdatePolicy.js";import{hasLayerBasedScaleVisibility as b}from"../../../support/layerViewUtils.js";import{TaskPriority as O}from"../../../support/Scheduler.js";let _=class extends i{constructor(e){super(e),this._dataUpdatingState=v.NONE,this.graphicsQuery={queryForSymbologySnapping:async(e,t)=>this.symbologySnappingSupported?f(this.graphics3DProcessor,e,t):{candidates:[],sourceCandidateIndices:[]},executeQuery:(e,t)=>this.queryEngine.executeQuery(e,t),executeQueryForIds:(e,t)=>this.queryEngine.executeQueryForIds(e,t),executeQueryForCount:(e,t)=>this.queryEngine.executeQueryForCount(e,t),executeQueryForExtent:(e,t)=>this.queryEngine.executeQueryForExtent(e,t),executeQueryForLatestObservations:(e,t)=>this.queryEngine.executeQueryForLatestObservations(e,t)},this.controller=null,this.updatingHandles=new h,this._controllerCreated=!1,this._pendingController=null}initialize(){this.addResolvingPromise(this._initializeController()),this.updatingHandles.add((()=>this.layer.renderer),(e=>this._recreateProcessor(e)),s),this.updatingHandles.add((()=>this.updatePolicy),(e=>this.processor.preferredUpdatePolicy=e));const{layer:e,view:t,hasM:r,hasZ:i}=this,{spatialReference:o,resourceController:n}=t,a=new m(o,e,n,(()=>this.processor.featureStore),i,r);this.queryEngine=new g({context:a,priority:O.FEATURE_QUERY_ENGINE})}destroy(){this.removeAllHandles(),this.updatingHandles.destroy(),this._destroyPendingController(),this.controller=r(this.controller),this.processor=r(this.processor),this.queryEngine=r(this.queryEngine),this.loadedGraphics=null}_destroyPendingController(){this._pendingController=r(this._pendingController)}get updating(){return this.updatingHandles.updating||!this._controllerCreated||this.controller?.updating||this.processor?.updating}get legendEnabled(){return this.processor.legendEnabled}get layer(){return this.layerView.layer}get layerViewUid(){return this.layerView.uid}get view(){return this.layerView.view}get hasZ(){return this.layerView.hasZ}get hasM(){return this.layerView.hasM}get fullOpacity(){return this.layerView.fullOpacity}get suspended(){return this.layerView.suspended}get filter(){return"filter"in this.layerView?this.layerView.filter:null}get effectiveDisplayFilter(){return"effectiveDisplayFilter"in this.layerView?this.layerView.effectiveDisplayFilter:null}get slicePlaneEnabled(){return this.layerView.slicePlaneEnabled}get featureSpatialReference(){return"featureSpatialReference"in this.layerView?this.layerView.featureSpatialReference:null}get graphics3DProcessor(){return"graphics-3d"===this.processor?.type?this.processor:null}get heatmapProcessor(){return"heatmap"===this.processor?.type?this.processor:null}get hasAllFeatures(){return!(!this.controller||!("hasAllFeatures"in this.controller))&&this.controller.hasAllFeatures}get hasAllFeaturesInView(){return!(!this.controller||!("hasAllFeaturesInView"in this.controller))&&this.controller.hasAllFeaturesInView}get hasFullGeometries(){return!(!this.controller||!("hasFullGeometries"in this.controller))&&this.controller.hasFullGeometries}get symbologySnappingSupported(){return this.layer?.renderer?.symbols?.some(d)??!1}get updatePolicy(){return C.SYNC}get scaleVisibilitySuspended(){return this.processor?.scaleVisibilitySuspended}get timeExtent(){return"timeExtent"in this.layerView?this.layerView.timeExtent:null}get dataUpdating(){return this._dataUpdatingState!==v.NONE}get suspendInfo(){return this.processor?.suspendInfo??{}}forEachGraphic(e){this.loadedGraphics.forEach(e)}findGraphic(e){return this.loadedGraphics.find(e)}queryObjectIds(e,t){return this.layerView.queryObjectIds(e,t)}whenGraphicBounds(e,t){return this.processor?.whenGraphicBounds(e,t)}computeAttachmentOrigin(e,t){return this.processor?.computeAttachmentOrigin(e,t)}async elevationAlignPointsInFeatures(e,r){const i=this.graphics3DProcessor;if(null==i)throw new t("featurelayerview3d:missing-processor","A Graphics3D processor is needed to resolve graphics elevation.");return c(this.view,this.layer,(e=>i.getGraphics3DGraphicByObjectId(e)),e,r)}highlight(e,t){return this.processor.highlight(e,this.layer.objectIdField,t)}maskOccludee(e){return this.processor.maskOccludee(e)}notifyContentGeometryUpdate(){this.layerView.emit("visible-geometry-changed")}async _initializeController(){const e=this.createController();this._pendingController=e,this._setupDataUpdating(e),await e.when(),this._setControllerWhenInitialized(e)}_setupDataUpdating(e){"dataUpdating"in e&&this.addHandles([o((()=>e.dataUpdating),(e=>{e&&this._dataUpdatingState===v.NONE?this._dataUpdatingState=v.CONTROLLER:e||this._dataUpdatingState!==v.CONTROLLER||(this._dataUpdatingState=v.NONE)}),n),o((()=>!!this.graphics3DProcessor?.dataUpdating),(t=>{t&&this._dataUpdatingState===v.CONTROLLER?this._dataUpdatingState=v.CORE:t||this._dataUpdatingState!==v.CORE||(this._dataUpdatingState=e.dataUpdating?v.CONTROLLER:v.NONE)}),n)])}async _setControllerWhenInitialized(e){try{await this.when()}catch(t){}this._controllerCreated=!0,this.isResolved()&&!this.destroyed?(await a((()=>this.view?.basemapTerrain?.ready)),this.beforeSetController(e),this._pendingController=null,this.controller=e,this.loadedGraphics=e.graphics):this._destroyPendingController()}_recreateProcessor(e){const t="heatmap"===e?.type,r="heatmap"===this.processor?.type,i=this.processor;if(i&&t===r)return;const s=t?new E({owner:this}):new y({owner:this,frustumVisibilityEnabled:!0,scaleVisibilityEnabled:!b(),filterVisibilityEnabled:!0,timeExtentEnabled:!0,elevationAlignmentEnabled:!0,elevationFeatureExpressionEnabled:!0,preferredUpdatePolicy:this.updatePolicy,updateClippingExtent:e=>this._updateClippingExtent(e)});this.processor=s,i?.destroy(),this.queryEngine?.clear(),this.addResolvingPromise(s.when())}_updateClippingExtent(e){if(this.clippingExtent=e,!this.controller)return!1;switch(this.controller.type){case"stream":return!1;case"feature-tile-3d":return this.controller.extent=e,!0}}get usedMemory(){return this.processor?.usedMemory??0}get performanceInfo(){const e=this.controller instanceof u?this.controller:null;return new w(this.usedMemory,this.loadedGraphics?.length,e?.serviceDataCount??-1,e?.maximumNumberOfFeatures??-1,0,this.processor.performanceInfo)}};var v;e([l()],_.prototype,"updating",null),e([l()],_.prototype,"legendEnabled",null),e([l()],_.prototype,"layerView",void 0),e([l()],_.prototype,"layer",null),e([l()],_.prototype,"layerViewUid",null),e([l()],_.prototype,"view",null),e([l()],_.prototype,"hasZ",null),e([l()],_.prototype,"hasM",null),e([l()],_.prototype,"fullOpacity",null),e([l()],_.prototype,"suspended",null),e([l()],_.prototype,"filter",null),e([l()],_.prototype,"effectiveDisplayFilter",null),e([l()],_.prototype,"slicePlaneEnabled",null),e([l()],_.prototype,"featureSpatialReference",null),e([l()],_.prototype,"loadedGraphics",void 0),e([l()],_.prototype,"graphics3DProcessor",null),e([l()],_.prototype,"heatmapProcessor",null),e([l()],_.prototype,"hasAllFeatures",null),e([l()],_.prototype,"hasAllFeaturesInView",null),e([l()],_.prototype,"hasFullGeometries",null),e([l()],_.prototype,"symbologySnappingSupported",null),e([l()],_.prototype,"updatePolicy",null),e([l()],_.prototype,"scaleVisibilitySuspended",null),e([l()],_.prototype,"timeExtent",null),e([l()],_.prototype,"_dataUpdatingState",void 0),e([l({readOnly:!0})],_.prototype,"dataUpdating",null),e([l()],_.prototype,"controller",void 0),e([l()],_.prototype,"processor",void 0),e([l()],_.prototype,"updatingHandles",void 0),e([l()],_.prototype,"_controllerCreated",void 0),_=e([p("esri.views.3d.layers.graphics.Graphics3DGraphicsPipeline")],_),function(e){e[e.NONE=0]="NONE",e[e.CONTROLLER=1]="CONTROLLER",e[e.CORE=2]="CORE"}(v||(v={}));export{_ as Graphics3DGraphicsPipeline};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import e from"../../../../Color.js";import"../../../../core/has.js";import t from"../../../../core/Logger.js";import{ONES as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as o}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as n}from"./defaultSymbolComplexity.js";import{SymbolUpdateType as s}from"./elevationAlignmentUtils.js";import{ElevationContext as a}from"./ElevationContext.js";import{zeroContext as l}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as p}from"./graphicUtils.js";import{ApplyRendererDiffResult as c}from"./interfaces.js";import{Loadable as d}from"./Loadable.js";import{getAttributeValue as u}from"../support/FastSymbolUpdates.js";const h=()=>t.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class y extends d{constructor(e,t,i,r,o=!0){super(i.schedule),this.symbol=e,this.symbolLayer=t,this._context=i,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=h(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=r.renderPriority,this._renderPriorityStep=r.renderPriorityStep,this._elevationContext=new a,this.updateComplexity(),this.ignoreDrivers=r.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=f(this._context.renderer,o)),this._updateElevationContext()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get usedMemory(){const e=this.complexity;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,i=f(e,this._drivenOpacityFallbackAlwaysOpaque);return i.color!==t.color||i.opacity!==t.opacity||i.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||i.size!==t.size||i.rotation!==t.rotation}get needsDrivenTransparentPass(){return(this._drivenProperties.color||this._drivenProperties.opacity)&&!this._drivenProperties.opacityAlwaysOpaque}_logGeometryCreationWarnings(e,t,i,r){const o=e.projectionSuccess,n="polygons"in e?e.polygons:null,s=`${r} geometry failed to be created`;o?!this._logGeometryValidationWarnings(t,i,r)&&n&&0===n.length&&"rings"===i&&t.length>0&&t[0].length>2&&h().warnOncePerTick(`${s} (filled rings should use clockwise winding - try reversing the order of vertices)`):h().warnOncePerTick(`${s} (failed to project geometry to view spatial reference)`)}updateFocus(e,t){}_logGeometryValidationWarnings(e,t,i){const r=`${i} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(h().warnOncePerTick(`${r} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(h().warnOncePerTick(`${r} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,i=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+i+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return h().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":o(e)&&h().warnOnce("Fixed a non-closed polygon ring.")}return!0}_defaultElevationInfoNoZ(){return g}_defaultElevationInfoZ(){return m}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.updateFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.updateFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}setGraphicElevationContext(e,t=new a){const i=e.geometry,r=this.getDefaultElevationInfo(i);t.unit=null!=this._elevationContext.unit?this._elevationContext.unit:r.unit,t.mode=this.getGeometryElevationMode(i,r),t.offsetMeters=this._elevationContext.meterUnitOffset??r.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===t.mode;o&&(t.mode="relative-to-ground",t.offsetMeters=0);const n=o?l:this._elevationContext.featureExpressionInfoContext;return t.updateFeatureExpressionInfoContext(n,e,this._context.layer),t}prepareSymbolLayerPatch(e){}updateGeometry(e,t){return!1}updateTransform(e,t,i,r){return!1}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=v){const i=this.draped?1:this._getLayerOpacity();return this._drivenProperties.opacity||this._drivenProperties.color?i:e?i*e.a:t.hasIntrinsicColor?i:0}_getCombinedOpacityAndColor(t,r=v){const o=this._getCombinedOpacity(t,r);if(this._drivenProperties.color)return p(null,o);const n=null!=t?e.toUnitRGB(t):i;return p(n,o)}_getVertexOpacityAndColor(e,t,i=null){const r=this._drivenProperties.color?e.color??t:null,o=this._drivenProperties.opacity?e.opacity??t[3]:null,n=p(r,o);return i&&(n[0]*=i,n[1]*=i,n[2]*=i,n[3]*=i),n}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return n(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,i){switch(e){case"opacity":return this.layerOpacityChanged(t,i),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return this.layerElevationInfoChanged(t,i,e)!==s.RECREATE}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,i);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;default:return!1}}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,i){let r=s.UPDATE;return e?.forEach((e=>{const o=t(e);if(null!=o){const t=e.graphic;this.setGraphicElevationContext(t,o.elevationContext),o.needsElevationUpdates=i(o.elevationContext.mode)}else r=s.RECREATE})),r}applyRendererDiff(e,t){return c.RecreateSymbol}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,i=t.size?u(t.size.field,e):0,o=t.color?u(t.color.field,e):0,n=t.opacity?u(t.opacity.field,e):0;return r(i,o,n,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&h().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.field??null,color:this._fastUpdates?.visualVariables.color?.field??null,opacity:this._fastUpdates?.visualVariables.opacity?.field??null,rotation:this._fastUpdates?.visualVariables.rotation?.field??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function f(e,t){const i={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach((e=>{switch(e.type){case"color":if(i.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const r=e.stops[t].color;r&&r.a<1&&(i.opacityAlwaysOpaque=!1)}break;case"opacity":i.opacity=!0,i.opacityAlwaysOpaque=!1;break;case"size":i.size=!0;break;case"rotation":i.rotation=!0}})),i}const g={mode:"on-the-ground",offset:0,unit:"meters"},m={mode:"absolute-height",offset:0,unit:"meters"},v={hasIntrinsicColor:!1};export{y as Graphics3DSymbolLayer,f as getDrivenProperties};
5
+ import e from"../../../../Color.js";import"../../../../core/has.js";import t from"../../../../core/Logger.js";import{ONES as i}from"../../../../core/libs/gl-matrix-2/factories/vec3f64.js";import{fromValues as r}from"../../../../core/libs/gl-matrix-2/factories/vec4f64.js";import{closeRings as o}from"../../../../geometry/support/coordsUtils.js";import{defaultSymbolLayerComplexity as n}from"./defaultSymbolComplexity.js";import{SymbolUpdateType as s}from"./elevationAlignmentUtils.js";import{ElevationContext as a}from"./ElevationContext.js";import{zeroContext as l}from"./featureExpressionInfoUtils.js";import{mixinColorAndOpacity as p}from"./graphicUtils.js";import{ApplyRendererDiffResult as c}from"./interfaces.js";import{Loadable as d}from"./Loadable.js";import{getAttributeValue as u}from"../support/FastSymbolUpdates.js";const h=()=>t.getLogger("esri.views.3d.layers.graphics.Graphics3DSymbolLayer");class y extends d{constructor(e,t,i,r,o=!0){super(i.schedule),this.symbol=e,this.symbolLayer=t,this._context=i,this._drivenOpacityFallbackAlwaysOpaque=o,this.ignoreDrivers=!1,this._drivenProperties={color:!1,opacity:!1,opacityAlwaysOpaque:!0,size:!1,rotation:!1},this._materials=[],this.logger=h(),this._elevationOptions={supportsOffsetAdjustment:!1,supportsOnTheGround:!0},this.skipHighSymbolLodsChanged=!0,this._renderPriority=r.renderPriority,this._renderPriorityStep=r.renderPriorityStep,this._elevationContext=new a,this.updateComplexity(),this.ignoreDrivers=r.ignoreDrivers,this.ignoreDrivers||(this._drivenProperties=f(this._context.renderer,o)),this._updateElevationContext()}get view(){return this._context.stage.view}getCachedSize(){return null}get extentPadding(){return 0}get materials(){return this._materials}get usedMemory(){const e=this.complexity;if(null==e)return 0;return(this.draped?e.memory.draped:e.memory).bytesPerFeature}_drivenPropertiesChanged(e){if(this.ignoreDrivers)return!1;const t=this._drivenProperties,i=f(e,this._drivenOpacityFallbackAlwaysOpaque);return i.color!==t.color||i.opacity!==t.opacity||i.opacityAlwaysOpaque!==t.opacityAlwaysOpaque||i.size!==t.size||i.rotation!==t.rotation}get needsDrivenTransparentPass(){return(this._drivenProperties.color||this._drivenProperties.opacity)&&!this._drivenProperties.opacityAlwaysOpaque}_logGeometryCreationWarnings(e,t,i,r){const o=e.projectionSuccess,n="polygons"in e?e.polygons:null,s=`${r} geometry failed to be created`;o?!this._logGeometryValidationWarnings(t,i,r)&&n&&0===n.length&&"rings"===i&&t.length>0&&t[0].length>2&&h().warnOncePerTick(`${s} (filled rings should use clockwise winding - try reversing the order of vertices)`):h().warnOncePerTick(`${s} (failed to project geometry to view spatial reference)`)}updateFocus(e,t){}_logGeometryValidationWarnings(e,t,i){const r=`${i} geometry failed to be created`;return!e.length||1===e.length&&!e[0].length?(h().warnOncePerTick(`${r} (no ${t} were defined)`),!0):(!Array.isArray(e)||!Array.isArray(e[0]))&&(h().warnOncePerTick(`${r} (${t} should be defined as a 2D array)`),!0)}_validateGeometry(e,t=null,i=null){if(null!=t&&!t.includes(e.type))return this.logger.warn("unsupported geometry type for "+i+` symbol: ${e.type}`),!1;switch(e.type){case"point":{const t=e;if(!isFinite(t.x)||!isFinite(t.y))return h().warn("point coordinate is not a valid number, graphic skipped"),!1;break}case"polygon":o(e)}return!0}_defaultElevationInfoNoZ(){return m}_defaultElevationInfoZ(){return g}_updateElevationContext(){null!=this._elevationInfoOverride?(this._elevationContext.setFromElevationInfo(this._elevationInfoOverride),this._elevationContext.updateFeatureExpressionInfoContext(null)):this._context.layer.elevationInfo?(this._elevationContext.setFromElevationInfo(this._context.layer.elevationInfo),this._elevationContext.updateFeatureExpressionInfoContext(this._context.featureExpressionInfoContext)):this._elevationContext.reset()}getDefaultElevationInfo(e){return e.hasZ?this._defaultElevationInfoZ():this._defaultElevationInfoNoZ()}getGeometryElevationMode(e,t=this.getDefaultElevationInfo(e)){return this._elevationContext.mode||t.mode}setElevationInfoOverride(e){this._elevationInfoOverride=e,this._updateElevationContext()}setGraphicElevationContext(e,t=new a){const i=e.geometry,r=this.getDefaultElevationInfo(i);t.unit=null!=this._elevationContext.unit?this._elevationContext.unit:r.unit,t.mode=this.getGeometryElevationMode(i,r),t.offsetMeters=this._elevationContext.meterUnitOffset??r.offset??0;const o=!this._elevationOptions.supportsOnTheGround&&"on-the-ground"===t.mode;o&&(t.mode="relative-to-ground",t.offsetMeters=0);const n=o?l:this._elevationContext.featureExpressionInfoContext;return t.updateFeatureExpressionInfoContext(n,e,this._context.layer),t}prepareSymbolLayerPatch(e){}updateGeometry(e,t){return!1}updateTransform(e,t,i,r){return!1}onRemoveGraphic(e){}_getLayerOpacity(){if(this._context.graphicsCoreOwner&&"fullOpacity"in this._context.graphicsCoreOwner)return this._context.graphicsCoreOwner.fullOpacity??0;const e=this._context.layer.opacity;return e??1}_getCombinedOpacity(e,t=v){const i=this.draped?1:this._getLayerOpacity();return this._drivenProperties.opacity||this._drivenProperties.color?i:e?i*e.a:t.hasIntrinsicColor?i:0}_getCombinedOpacityAndColor(t,r=v){const o=this._getCombinedOpacity(t,r);if(this._drivenProperties.color)return p(null,o);const n=null!=t?e.toUnitRGB(t):i;return p(n,o)}_getVertexOpacityAndColor(e,t,i=null){const r=this._drivenProperties.color?e.color??t:null,o=this._drivenProperties.opacity?e.opacity??t[3]:null,n=p(r,o);return i&&(n[0]*=i,n[1]*=i,n[2]*=i,n[3]*=i),n}isFastUpdatesEnabled(){return null!=this._fastUpdates}updateComplexity(){this.complexity=this.computeComplexity()}computeComplexity(){return n(this.symbol,this.symbolLayer)}globalPropertyChanged(e,t,i){switch(e){case"opacity":return this.layerOpacityChanged(t,i),!0;case"elevationInfo":{const e=this._elevationContext.mode;this._updateElevationContext();return this.layerElevationInfoChanged(t,i,e)!==s.RECREATE}case"slicePlaneEnabled":return this.slicePlaneEnabledChanged(t,i);case"physicalBasedRenderingEnabled":return this.physicalBasedRenderingChanged();case"pixelRatio":return this.pixelRatioChanged;case"skipHighSymbolLods":return this.skipHighSymbolLodsChanged;default:return!1}}get pixelRatioChanged(){return!0}updateGraphics3DGraphicElevationInfo(e,t,i){let r=s.UPDATE;return e?.forEach((e=>{const o=t(e);if(null!=o){const t=e.graphic;this.setGraphicElevationContext(t,o.elevationContext),o.needsElevationUpdates=i(o.elevationContext.mode)}else r=s.RECREATE})),r}applyRendererDiff(e,t){return c.RecreateSymbol}getFastUpdateAttrValues(e){if(!this._fastUpdates)return null;const t=this._fastUpdates.visualVariables,i=t.size?u(t.size.field,e):0,o=t.color?u(t.color.field,e):0,n=t.opacity?u(t.opacity.field,e):0;return r(i,o,n,0)}get draped(){return this._draped}ensureDrapedStatus(e){return null==this._draped?(this._draped=e,!0):(e!==this.draped&&h().warnOnce("A symbol can only produce either draped or non-draped visualizations. Use two separate symbol instances for draped and non-draped graphics if necessary."),!1)}test(){const e=()=>({size:this._fastUpdates?.visualVariables.size?.field??null,color:this._fastUpdates?.visualVariables.color?.field??null,opacity:this._fastUpdates?.visualVariables.opacity?.field??null,rotation:this._fastUpdates?.visualVariables.rotation?.field??null});return{drivenProperties:this._drivenProperties,getVisVarFields:e}}}function f(e,t){const i={color:!1,opacity:!1,opacityAlwaysOpaque:t,size:!1,rotation:!1};return e&&"visualVariables"in e&&e.visualVariables&&e.visualVariables.forEach((e=>{switch(e.type){case"color":if(i.color=!0,e.stops)for(let t=0;t<e.stops.length;t++){const r=e.stops[t].color;r&&r.a<1&&(i.opacityAlwaysOpaque=!1)}break;case"opacity":i.opacity=!0,i.opacityAlwaysOpaque=!1;break;case"size":i.size=!0;break;case"rotation":i.rotation=!0}})),i}const m={mode:"on-the-ground",offset:0,unit:"meters"},g={mode:"absolute-height",offset:0,unit:"meters"},v={hasIntrinsicColor:!1};export{y as Graphics3DSymbolLayer,f as getDrivenProperties};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import e from"../../../../core/Accessor.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{isAbortError as n}from"../../../../core/promiseUtils.js";import{watch as o,sync as a,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as h}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../layers/Layer.js";import{hydrateGraphic as y}from"../../../../layers/graphics/hydratedFeatures.js";import{getRenderingInfo as g,getRenderingInfoAsync as m}from"../../../../renderers/support/renderingInfoUtils.js";import f from"../../../../rest/support/Query.js";import{DrapeSourceType as b}from"../interfaces.js";import{suspendResumeExtentOptimism as C}from"./constants.js";import{Graphics3DCore as w}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as j}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as V}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as v}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as G}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as S}from"./graphicUtils.js";import{normalizeHighlightTargetExceptQuery as E}from"../support/highlightUtils.js";import{UpdatePolicy as O}from"../../webgl-engine/lib/UpdatePolicy.js";import{hasLayerBasedScaleVisibility as _}from"../../../support/layerViewUtils.js";let x=class extends e{constructor(i){super(i),this.drapeSourcePriorityOffset=0,this.type="graphics-3d",this.graphicsCore=null,this.drapeSourceType=b.Features,this.scaleVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this._suspendResumeExtent=null,this._updatingHandles=new u}initialize(){const{layer:i}=this,t="effectiveScaleRange"in i?i:null,e=!_&&this.scaleVisibilityEnabled&&null!=t,r=new w({owner:this,layer:this.owner.layer,preferredUpdatePolicy:O.SYNC,graphicSymbolSupported:!0,componentFactories:{elevationAlignment:(i,t)=>new j({graphicsCoreOwner:this,graphicsCore:i,queryGraphicUIDsInExtent:t,elevationProvider:this.view.elevationProvider}),scaleVisibility:e?(i,e)=>new G({graphicsCoreOwner:this,layer:t,queryGraphicUIDsInExtent:e,graphicsCore:i,basemapTerrain:this.owner.view.basemapTerrain}):null,objectStates:i=>new v(i)}});if(this._set("graphicsCore",r),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new V({graphicsCoreOwner:this})),"fullOpacity"in this.owner){const i=this.owner;this._updatingHandles.add((()=>i.fullOpacity),(()=>this.graphicsCore.opacityChange()))}if("elevationInfo"in i){const t=i;this._updatingHandles.add((()=>t.elevationInfo),((i,t)=>{h(i,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())}))}this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){try{await this.graphicsCore.initializePromise}catch(i){if(n(i))return;throw i}this.destroyed||(this.addHandles(o((()=>this.view.clippingArea),(()=>this._updateClippingExtent()),a)),this._updateClippingExtent(),this._setupSuspendResumeExtent(),this.graphicsCore.startCreateGraphics())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",s(this.frustumVisibility)),this._set("graphicsCore",s(this.graphicsCore))}get layer(){return this.owner.layer}get layerViewUid(){return this.owner.uid}get view(){return this.owner.view}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get scaleVisibilitySuspended(){return!(null==this.scaleVisibility||!this.scaleVisibility.suspended)}get frustumVisibilitySuspended(){return null!=this.frustumVisibility&&this.frustumVisibility.suspended}get suspended(){return this.owner.suspended??!1}get updating(){return!!(this.graphicsCore?.updating||null!=this.scaleVisibility&&this.scaleVisibility.updating||null!=this.frustumVisibility&&this.frustumVisibility.updating||this._updatingHandles.updating)}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity??1}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}notifyGraphicGeometryChanged(i){this.graphicsCore.notifyGraphicGeometryChanged(i)}notifyGraphicVisibilityChanged(i){this.graphicsCore.notifyGraphicVisibilityChanged(i)}notifyContentGeometryUpdate(){this.owner.notifyContentGeometryUpdate?.()}getRenderingInfo(i,t,e){const r=g(i,{renderer:t,arcade:e});if(r?.color){const i=r.color;i[0]=i[0]/255,i[1]=i[1]/255,i[2]=i[2]/255}return r}getRenderingInfoAsync(i,t,e,r){return m(i,{renderer:t,arcade:e,...r})}getHit(i){if(this.owner.loadedGraphics){const t=this.owner.loadedGraphics.find((t=>t.uid===i));if(t){const i=this.layer instanceof d?this.layer:null,e=y(t,i);return{type:"graphic",graphic:e,layer:e.layer}}}return null}whenGraphicBounds(i,t){return this.graphicsCore?this.graphicsCore.whenGraphicBounds(i,t):Promise.reject()}computeAttachmentOrigin(i,t){return this.graphicsCore?this.graphicsCore.computeAttachmentOrigin(i,t):null}getSymbolLayerSize(i,t){return this.graphicsCore?this.graphicsCore.getSymbolLayerSize(i,t):null}maskOccludee(i){const t=this.graphicsCore?.objectStates;if(!t)return r();const{set:e,handle:s}=t.acquireOccludeeSet(null);return t.setUid(e,i.uid),s}highlight(i,e){const r=this.graphicsCore?.objectStates;if(!r)return P;if(i instanceof f)return P;const s=E(i);if(0===s.length)return P;if(s[0]instanceof t){const i=s.map((i=>i.uid)),{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setUids(t,i),n}if("number"==typeof s[0]){const i=s,{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setObjectIds(t,i),n}return P}_setupSuspendResumeExtent(){const{scaleVisibility:i,frustumVisibility:t}=this;if(null==i&&null==t)return;const e=({computedExtent:e,extentPadding:r})=>{this._suspendResumeExtent=S(e,this._suspendResumeExtent,C,r),null!=i&&i.setExtent(this._suspendResumeExtent),null!=t&&t.setExtent(this._suspendResumeExtent)};this.addHandles(o((()=>({computedExtent:this.graphicsCore?.computedExtent,extentPadding:this.graphicsCore?.extentPadding})),(i=>e(i)),p))}_updateClippingExtent(){const i=this.view.clippingArea;this.graphicsCore.setClippingExtent(i,this.view.spatialReference)&&this.graphicsCore.recreateAllGraphics()}};i([l()],x.prototype,"drapeSourcePriorityOffset",void 0),i([l()],x.prototype,"type",void 0),i([l({constructOnly:!0})],x.prototype,"owner",void 0),i([l()],x.prototype,"layer",null),i([l()],x.prototype,"layerViewUid",null),i([l()],x.prototype,"view",null),i([l({constructOnly:!0})],x.prototype,"graphicsCore",void 0),i([l()],x.prototype,"scaleVisibility",null),i([l({constructOnly:!0})],x.prototype,"frustumVisibility",void 0),i([l()],x.prototype,"elevationAlignment",null),i([l()],x.prototype,"scaleVisibilitySuspended",null),i([l({readOnly:!0})],x.prototype,"frustumVisibilitySuspended",null),i([l()],x.prototype,"suspended",null),i([l({readOnly:!0})],x.prototype,"updating",null),i([l()],x.prototype,"loadedGraphics",null),i([l()],x.prototype,"fullOpacity",null),i([l()],x.prototype,"slicePlaneEnabled",null),i([l()],x.prototype,"drapeSourceType",void 0),i([l()],x.prototype,"updatePolicy",null),i([l({constructOnly:!0})],x.prototype,"scaleVisibilityEnabled",void 0),i([l({constructOnly:!0})],x.prototype,"frustumVisibilityEnabled",void 0),i([l()],x.prototype,"initializePromise",void 0),x=i([c("esri.views.3d.layers.graphics.GraphicsProcessor")],x);const P=r();export{x as GraphicsProcessor};
5
+ import{_ as i}from"../../../../chunks/tslib.es6.js";import t from"../../../../Graphic.js";import e from"../../../../core/Accessor.js";import{makeHandle as r}from"../../../../core/handleUtils.js";import{destroyMaybe as s}from"../../../../core/maybe.js";import{isAbortError as n}from"../../../../core/promiseUtils.js";import{watch as o,sync as a,syncAndInitial as p}from"../../../../core/reactiveUtils.js";import{property as l}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/has.js";import"../../../../core/Logger.js";import"../../../../core/RandomLCG.js";import{subclass as c}from"../../../../core/accessorSupport/decorators/subclass.js";import{diff as h}from"../../../../core/accessorSupport/diffUtils.js";import{UpdatingHandles as u}from"../../../../core/support/UpdatingHandles.js";import d from"../../../../layers/Layer.js";import{hydrateGraphic as y}from"../../../../layers/graphics/hydratedFeatures.js";import{getRenderingInfo as g,getRenderingInfoAsync as m}from"../../../../renderers/support/renderingInfoUtils.js";import f from"../../../../rest/support/Query.js";import{DrapeSourceType as b}from"../interfaces.js";import{suspendResumeExtentOptimism as C}from"./constants.js";import{Graphics3DCore as w}from"./Graphics3DCore.js";import{Graphics3DElevationAlignment as j}from"./Graphics3DElevationAlignment.js";import{Graphics3DFrustumVisibility as V}from"./Graphics3DFrustumVisibility.js";import{Graphics3DObjectStates as v}from"./Graphics3DObjectStates.js";import{Graphics3DScaleVisibility as G}from"./Graphics3DScaleVisibility.js";import{enlargeExtent as S}from"./graphicUtils.js";import{normalizeHighlightTargetExceptQuery as E}from"../support/highlightUtils.js";import{UpdatePolicy as O}from"../../webgl-engine/lib/UpdatePolicy.js";import{hasLayerBasedScaleVisibility as _}from"../../../support/layerViewUtils.js";let x=class extends e{constructor(i){super(i),this.drapeSourcePriorityOffset=0,this.type="graphics-3d",this.graphicsCore=null,this.drapeSourceType=b.Features,this.scaleVisibilityEnabled=!1,this.frustumVisibilityEnabled=!1,this._suspendResumeExtent=null,this._updatingHandles=new u}initialize(){const{layer:i}=this,t="effectiveScaleRange"in i?i:null,e=!_()&&this.scaleVisibilityEnabled&&null!=t,r=new w({owner:this,layer:this.owner.layer,preferredUpdatePolicy:O.SYNC,graphicSymbolSupported:!0,componentFactories:{elevationAlignment:(i,t)=>new j({graphicsCoreOwner:this,graphicsCore:i,queryGraphicUIDsInExtent:t,elevationProvider:this.view.elevationProvider}),scaleVisibility:e?(i,e)=>new G({graphicsCoreOwner:this,layer:t,queryGraphicUIDsInExtent:e,graphicsCore:i,basemapTerrain:this.owner.view.basemapTerrain}):null,objectStates:i=>new v(i)}});if(this._set("graphicsCore",r),this.frustumVisibilityEnabled&&this._set("frustumVisibility",new V({graphicsCoreOwner:this})),"fullOpacity"in this.owner){const i=this.owner;this._updatingHandles.add((()=>i.fullOpacity),(()=>this.graphicsCore.opacityChange()))}if("elevationInfo"in i){const t=i;this._updatingHandles.add((()=>t.elevationInfo),((i,t)=>{h(i,t)&&this._updatingHandles.addPromise(this.graphicsCore.elevationInfoChange())}))}this._set("initializePromise",this._initializeAsync()),this._updatingHandles.addPromise(this.initializePromise)}async _initializeAsync(){try{await this.graphicsCore.initializePromise}catch(i){if(n(i))return;throw i}this.destroyed||(this.addHandles(o((()=>this.view.clippingArea),(()=>this._updateClippingExtent()),a)),this._updateClippingExtent(),this._setupSuspendResumeExtent(),this.graphicsCore.startCreateGraphics())}destroy(){this._updatingHandles.destroy(),this._set("frustumVisibility",s(this.frustumVisibility)),this._set("graphicsCore",s(this.graphicsCore))}get layer(){return this.owner.layer}get layerViewUid(){return this.owner.uid}get view(){return this.owner.view}get scaleVisibility(){return this.graphicsCore?.scaleVisibility}get elevationAlignment(){return this.graphicsCore?.elevationAlignment}get scaleVisibilitySuspended(){return!(null==this.scaleVisibility||!this.scaleVisibility.suspended)}get frustumVisibilitySuspended(){return null!=this.frustumVisibility&&this.frustumVisibility.suspended}get suspended(){return this.owner.suspended??!1}get updating(){return!!(this.graphicsCore?.updating||null!=this.scaleVisibility&&this.scaleVisibility.updating||null!=this.frustumVisibility&&this.frustumVisibility.updating||this._updatingHandles.updating)}get graphics3DGraphics(){return this.graphicsCore?.graphics3DGraphics}get graphics3DGraphicsByObjectID(){return this.graphicsCore?.graphics3DGraphicsByObjectID}get loadedGraphics(){return this.owner.loadedGraphics}get fullOpacity(){return this.owner.fullOpacity??1}get slicePlaneEnabled(){return this.owner.slicePlaneEnabled}get updatePolicy(){return this.owner.updatePolicy}notifyGraphicGeometryChanged(i){this.graphicsCore.notifyGraphicGeometryChanged(i)}notifyGraphicVisibilityChanged(i){this.graphicsCore.notifyGraphicVisibilityChanged(i)}notifyContentGeometryUpdate(){this.owner.notifyContentGeometryUpdate?.()}getRenderingInfo(i,t,e){const r=g(i,{renderer:t,arcade:e});if(r?.color){const i=r.color;i[0]=i[0]/255,i[1]=i[1]/255,i[2]=i[2]/255}return r}getRenderingInfoAsync(i,t,e,r){return m(i,{renderer:t,arcade:e,...r})}getHit(i){if(this.owner.loadedGraphics){const t=this.owner.loadedGraphics.find((t=>t.uid===i));if(t){const i=this.layer instanceof d?this.layer:null,e=y(t,i);return{type:"graphic",graphic:e,layer:e.layer}}}return null}whenGraphicBounds(i,t){return this.graphicsCore?this.graphicsCore.whenGraphicBounds(i,t):Promise.reject()}computeAttachmentOrigin(i,t){return this.graphicsCore?this.graphicsCore.computeAttachmentOrigin(i,t):null}getSymbolLayerSize(i,t){return this.graphicsCore?this.graphicsCore.getSymbolLayerSize(i,t):null}maskOccludee(i){const t=this.graphicsCore?.objectStates;if(!t)return r();const{set:e,handle:s}=t.acquireOccludeeSet(null);return t.setUid(e,i.uid),s}highlight(i,e){const r=this.graphicsCore?.objectStates;if(!r)return P;if(i instanceof f)return P;const s=E(i);if(0===s.length)return P;if(s[0]instanceof t){const i=s.map((i=>i.uid)),{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setUids(t,i),n}if("number"==typeof s[0]){const i=s,{set:t,handle:n}=r.acquireHighlightSet(e,null);return r.setObjectIds(t,i),n}return P}_setupSuspendResumeExtent(){const{scaleVisibility:i,frustumVisibility:t}=this;if(null==i&&null==t)return;const e=({computedExtent:e,extentPadding:r})=>{this._suspendResumeExtent=S(e,this._suspendResumeExtent,C,r),null!=i&&i.setExtent(this._suspendResumeExtent),null!=t&&t.setExtent(this._suspendResumeExtent)};this.addHandles(o((()=>({computedExtent:this.graphicsCore?.computedExtent,extentPadding:this.graphicsCore?.extentPadding})),(i=>e(i)),p))}_updateClippingExtent(){const i=this.view.clippingArea;this.graphicsCore.setClippingExtent(i,this.view.spatialReference)&&this.graphicsCore.recreateAllGraphics()}};i([l()],x.prototype,"drapeSourcePriorityOffset",void 0),i([l()],x.prototype,"type",void 0),i([l({constructOnly:!0})],x.prototype,"owner",void 0),i([l()],x.prototype,"layer",null),i([l()],x.prototype,"layerViewUid",null),i([l()],x.prototype,"view",null),i([l({constructOnly:!0})],x.prototype,"graphicsCore",void 0),i([l()],x.prototype,"scaleVisibility",null),i([l({constructOnly:!0})],x.prototype,"frustumVisibility",void 0),i([l()],x.prototype,"elevationAlignment",null),i([l()],x.prototype,"scaleVisibilitySuspended",null),i([l({readOnly:!0})],x.prototype,"frustumVisibilitySuspended",null),i([l()],x.prototype,"suspended",null),i([l({readOnly:!0})],x.prototype,"updating",null),i([l()],x.prototype,"loadedGraphics",null),i([l()],x.prototype,"fullOpacity",null),i([l()],x.prototype,"slicePlaneEnabled",null),i([l()],x.prototype,"drapeSourceType",void 0),i([l()],x.prototype,"updatePolicy",null),i([l({constructOnly:!0})],x.prototype,"scaleVisibilityEnabled",void 0),i([l({constructOnly:!0})],x.prototype,"frustumVisibilityEnabled",void 0),i([l()],x.prototype,"initializePromise",void 0),x=i([c("esri.views.3d.layers.graphics.GraphicsProcessor")],x);const P=r();export{x as GraphicsProcessor};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.34/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{forEach as s,result as i}from"../../../../core/asyncUtils.js";import"../../../../core/has.js";import l from"../../../../core/Logger.js";import{disposeMaybe as a,abortMaybe as r}from"../../../../core/maybe.js";import{throwIfAborted as o,isAbortError as n}from"../../../../core/promiseUtils.js";import{watch as c}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as b}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{hydrateGraphic as u}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as d}from"../../../../layers/support/labelFormatUtils.js";import{hasCalloutSupport as y}from"../../../../symbols/callouts/calloutUtils.js";import{VisibilityGroup as g,VisibilityFlag as m}from"./enums.js";import{make as f}from"./Graphics3DCalloutSymbolLayerFactory.js";import{LineCalloutCreationContext as C,LineCalloutSymbolLayerRenderingInfo as x}from"./Graphics3DLineCalloutSymbolLayer.js";import{getGraphics3DSymbol as _}from"./graphicSymbolUtils.js";import{LabelInfo as L}from"./LabelInfo.js";import{LabelParameters as v}from"./LabelParameters.js";import{horizontalPlacementFromAnchor as G,verticalPlacementFromAnchor as w,textRenderAlignmentFromHorizontalPlacement as D}from"./placementUtils.js";import{placePointOnGeometry as A}from"./pointUtils.js";import{TextRenderer as I}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as S}from"../../webgl-engine/lib/TextRenderParameters.js";import{TextTextureAtlas as T}from"../../webgl-engine/lib/TextTextureAtlas.js";import{VertexAttribute as R}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as P}from"../../webgl-engine/lib/WebGLLayer.js";import{hasLayerBasedScaleVisibility as j,isInEffectiveScaleRange as E}from"../../../support/layerViewUtils.js";import{TaskPriority as V}from"../../../support/Scheduler.js";import{Yield as O}from"../../../support/Yield.js";class F{constructor(e,t){this.labelingContext=e,this.graphics3DGraphic=t,this.hasGraphics3DResources=!1,this.visible=!1,this.textureAtlasHandles=[],this.textInitialized=!1,this.textRenderers=new Array,this.textLabelPlacements=new Array}}class U{constructor(e,t,s,i,l){this.labelClass=e,this.graphics3DSymbol=t,this.graphics3DCalloutSymbolLayer=s,this.textRenderParameters=i,this.labelFunction=l,this.calloutSymbolLayerIndex=0,this.graphics=new Map,this.scaleVisibility=null}}class z{constructor(e,t,s,i,l,a,r,o){this.layer=t,this.graphics3DCore=s,this.scaleVisibility=i,this.emptySymbolLabelSupported=l,this.elevationInfoOverride=a,this.disablePlacement=r,this.active=o,this.labelClassAbortController=new AbortController,this.labelClassContexts=new Array,this.graphics=new Map,this.labelsToInitialize=new Map,this.stageLayer=new P(e,{pickable:!0},s.owner.layerViewUid)}destroy(){this.stageLayer.destroy()}}let H=class extends t{constructor(e){super(e),this._hudMaterials=new Map,this._calloutMaterials=new Map,this._dirty=!1,this._labels=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this.addHandles([c((()=>this.view.state?.camera),(()=>this.setDirty())),c((()=>this.view.state?.rasterPixelRatio),(()=>this._resetAllLabels())),c((()=>this.view.focusAreasView?.polygons),(()=>this._updateFocus())),this.view.resourceController.scheduler.registerTask(V.LABELER,this)]),j&&this.addHandles(c((()=>this.view.scale),(()=>this._updateScaleVisibility()))),this._textTextureAtlas=new T({view:this.view})}dispose(){this.removeAllHandles(),this._textTextureAtlas=a(this._textTextureAtlas),this._hudMaterials.clear(),this._calloutMaterials.clear(),this._labelingContexts.length=0,this._labels.clear()}destroy(){this.dispose(),$.graphic=null,$.renderingInfo=null,$.layer=null}_updateFocus(){this._labelingContexts.forEach((e=>{e.graphics.forEach((t=>{if(0===t.labelLayers.length)return;const s=A(t.graphic.geometry);if(null==s)return;const i=this.view.focusAreasView?.containsGeometry(s)??!0;t.labelLayers.forEach((s=>{s.stageObject.geometries.some((e=>e.material.parameters.isFocused!==i))&&(this._removeGraphic(e,t),this._addGraphic(e,t),this.setDirty())}))}))}))}_activateLabelingContext(e){e.graphics.forEach(((t,s)=>{const i=new F(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i),t.setVisibilityFlag(g.LABEL,m.USER,!0)})),e.active=!0}_deactivateLabelingContext(e){e.graphics.forEach(((e,t)=>{e.setVisibilityFlag(g.LABEL,m.USER,!1),this.setLabelGraphicVisibility(e,!1),e.clearLabelGraphics(),this._labels.delete(t)})),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelLayers){if(!t.labelClass)continue;const s=e.textRenderers[t.labelClassContextIndex];s&&(e.textureAtlasHandles.push(this._textTextureAtlas.addText(s,(e=>k(t.stageObject,e)))),M(t.stageObject,s))}}_removeLabelTextureFromAtlas(e){e.textureAtlasHandles.forEach((e=>e.remove())),e.textureAtlasHandles.length=0}get running(){return this.view.ready&&(this._dirty||this.deconflictor.running)}runTask(e){return this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e),O}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(t.active)if(B(t))this._dirty=!0;else if(N(t.labelClassContexts)){if(null===t.labelClassContexts){this._deactivateLabelingContext(t);continue}this._createLabelClassContext(t),this._dirty=!0}else for(const[s,i]of t.labelsToInitialize)if(this._ensureGraphics3DResources(i)&&(this._labels.set(s,i),this.deconflictor.setDirty(),e.madeProgress()),(i.visible&&i.textInitialized||!i.visible&&i.hasGraphics3DResources)&&(t.labelsToInitialize.delete(s),e.madeProgress()),e.done){this._dirty=!0;break}this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController?.signal;e.layer.when&&await e.layer.when(),o(t),e.scaleVisibility?.updateScaleRangeActive();const a=e.graphics3DCore,r=a.layer,n=r.labelingInfo?.filter((e=>!!e.symbol));if(!n||0===n.length)return;let c=!1;await s(n,(async(s,r)=>{const n=s.symbol,h=_(a.getOrCreateGraphics3DSymbol(n));if(null==h)return void l.getLogger(this).error("Failed to create Graphics3DSymbol for label");await h.load(),o(t);let b=null;y(n)&&n.hasVisibleCallout()&&(b=f(n,a.symbolCreationContext),await b.load(),o(t));const p=await i(d(s,e.layer.fieldsIndex,this.view.spatialReference));if(o(t),!0===p.ok){const i=await this._createTextRenderParameters(h.symbol);o(t);const l=new U(s,h,b,i,p.value);this._updateLabelClassContextVisibility(l),e.labelClassContexts[r]=l}else l.getLogger(this).error(`Label expression failed to evaluate: ${p.error}`),c=!0})),o(t)}async _createLabelClassContext(e){return null==e.labelClassPromise&&(e.labelClassPromise=this._createLabelClassContextAsync(e).catch((t=>{if(n(t))throw t;e.labelClassContexts.length=0})).then((()=>{e.labelClassAbortController=null,this.notifyChange("updating")})).catch((()=>{})),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.at(0);return"text"!==t?.type?null:S.fromSymbol(t,this.view.state.rasterPixelRatio)}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,r(t),e.labelClassContexts.length=0,e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,i,l,a){const r=new v(s,G(s.anchor),w(s.anchor),e.text,p(e.displayWidth,e.displayHeight));return $.graphic=t,$.layer=i,$.renderingInfo=null,l.createLabel($,r,this._hudMaterials,this._textTextureAtlas,(()=>a.placement?.elevationOffset??null))}_createLineCalloutGraphic(e,t,s,i,l){$.graphic=e,$.layer=l;const a=i.screenOffset[0];return $.renderingInfo=new x(null,t,i.translation,i.centerOffset,a,i.centerOffsetUnits,i.elevationOffset),s.createGraphics3DGraphic($,this._calloutMaterials)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,i=s.labelClassContexts;if(N(i)||!s.emptySymbolLabelSupported&&0===t.layers.length)return!1;let l=!1;const a=t.graphic,r=s.layer,o=Z(s.layer);for(let n=0;n<i.length;n++){const c=e.textRenderers[n],h=e.textLabelPlacements[n];if(null==c||null==h)continue;const b=i[n],p=b.graphics3DSymbol,u=W(p),d=p.symbolLayers[0];if(!d)continue;d.setElevationInfoOverride(s.elevationInfoOverride);const y=new L(t,u,b.labelClass),f=this._createTextSymbolGraphic(c,a,h,r,d,y);if(null==f)return!1;f.labelClass=b.labelClass,f.labelClassContextIndex=n,t.addLabelGraphic(f,s.stageLayer),this.deconflictor.setPriority(t,b.textRenderParameters?.definition.size??0),t.setVisibilityFlag(g.LABEL,m.USER,o),t.setVisibilityFlag(g.LABEL,m.SCALE_RANGE,b.scaleVisibility??!0),t.setVisibilityFlag(g.LABEL,m.DECONFLICTION,!1),j&&b.graphics.set(a.uid,t),l=!0;const C=b.graphics3DCalloutSymbolLayer;if(C&&h.hasLabelVerticalOffset){C.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(a,u,C,h,r);null!=e&&(b.calloutSymbolLayerIndex=t.labelLayers.length,t.addLabelGraphic(e,s.stageLayer))}break}return l&&s.scaleVisibility?.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelLayers){if(null==s.labelClass)continue;const e=t[s.labelClassContextIndex].graphics3DSymbol.symbolLayers[0];e?.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.textInitialized)return;const t=e.labelingContext,s=t.labelClassContexts;if(N(s))return;const i=e.graphics3DGraphic.graphic;for(let a=0;a<s.length;a++){const r=s[a];if(e.textRenderers[a]=null,e.textLabelPlacements[a]=null,null==r?.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?u(i,t.layer):i;n=o.evaluate(e)}catch(l){n=null}else n=o.evaluate(i);if(null==n||""===n||/^\s+$/.test(n))continue;const c=r.graphics3DSymbol;if(!c.symbolLayers[0])continue;const h=e.graphics3DGraphic,b="label-3d"===c.symbol?.type?c.symbol:null,p=r.labelClass,d=t.disablePlacement,y=new L(h,b,p,d).placement;if(null==y)continue;const g=G(y.anchor),m=D(g);e.textRenderers[a]=new I(n,m,r.textRenderParameters,T.maxSize),e.textLabelPlacements[a]=y}e.textInitialized=!0}_destroyTextTextureResources(e){e.textInitialized=!1,e.textRenderers.length=0,e.textLabelPlacements.length=0}_addGraphic(e,t){const s=t.graphic.uid;if(e.graphics.set(s,t),e.active){const i=new F(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i)}this.setDirty(),this.deconflictor.setDirty()}_updateGraphicGeometry(e,t){const s=t.graphic.uid,i=this._labels.get(s);if(!i)return!0;for(const l of i.graphics3DGraphic.labelLayers){if(null==l.labelClass)continue;if(!e.labelClassContexts[l.labelClassContextIndex].graphics3DSymbol.symbolLayers[0].updateGeometry(l,t.graphic.geometry))return!1}return this.setDirty(),this.deconflictor.setDirty(),!0}_removeGraphic(e,t){const s=t.graphic.uid,i=this._labels.get(s);e.graphics.delete(s),i&&(this._destroyGraphic(i,s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.delete(t),e.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const s of t){const t=e.graphics.get(s);t&&(this._removeGraphic(e,t),this._addGraphic(e,t))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const i=new Map;t.graphics.forEach((e=>i.set(e.graphic.uid,e)));const l=e=>e.labelLayers[0];if(s.graphics3DSymbol.symbolLayers[0].globalPropertyChanged(e,i,l),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelLayers[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,i,t)}}}_visibilityInfoChange(e){const t=Z(e.layer);t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.graphics.forEach(((t,s)=>{const i=this._labels.get(s);i&&(this._destroyGraphic(i,s),i.visible=!1,e.labelsToInitialize.set(s,i))})),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,s){const i=s?.emptySymbolLabelSupported||!1,l=s?.elevationInfoOverride||null,a=s?.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o=new z(this.view.stage,r,e,t,i,l,a,Z(r));return this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),updateGraphicGeometry:e=>this._updateGraphicGeometry(o,e),layerLabelsEnabled:()=>Z(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),remove:()=>this._removeGraphicsOwner(e),setDirty:()=>this.setDirty()}}_removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.graphics.forEach((e=>this._removeGraphic(t,e))),t.destroy(),this.setDirty()}_updateScaleVisibility(){for(const e of this._labelingContexts)if(e.active)for(const t of e.labelClassContexts)this._updateLabelClassContextVisibility(t)}_updateLabelClassContextVisibility(e){if(!j)return;const{labelClass:t,graphics:s}=e,i={minScale:t.minScale,maxScale:t.maxScale},l=E(i,this.view.scale),a=null==e.scaleVisibility||e.scaleVisibility!==l;e.scaleVisibility=l,a&&s.size&&(s.forEach((e=>e.setVisibilityFlag(g.LABEL,m.SCALE_RANGE,l))),this.deconflictor.setDirty(),this.setDirty())}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,i=this._labels.get(s);i&&i.visible!==t&&(t&&!i.textureAtlasHandles.length?(this._addLabelTextureToAtlas(i),i.textInitialized||i.labelingContext.labelsToInitialize.set(s,i)):!t&&i.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(i),i.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._dirty||this._textTextureAtlas?.updating||this.deconflictor.updating||this._labelingContexts.some((e=>B(e)))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce(((e,t)=>e+(B(t)?0:1)),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get test(){}};function M(e,t){e.geometries[0].setAttributeData(R.SIZE,[t.displayWidth,t.displayHeight]),e.geometryVertexAttributeUpdated(e.geometries[0],R.SIZE)}function k(e,t){e.geometries[0].setAttributeData(R.UVI,t),e.geometryVertexAttributeUpdated(e.geometries[0],R.UVI,!0)}function B(e){return!!e.labelClassPromise&&!!e.labelClassAbortController}function N(e){return!e||0===e.length}function W(e){return"label-3d"===e.symbol?.type?e.symbol:null}function Z(e){return!!e.labelsVisible&&!!e.labelingInfo?.some((e=>!!e.symbol))}e([h({constructOnly:!0})],H.prototype,"view",void 0),e([h({constructOnly:!0})],H.prototype,"deconflictor",void 0),e([h()],H.prototype,"_textTextureAtlas",void 0),e([h({type:Boolean,readOnly:!0})],H.prototype,"updating",null),H=e([b("esri.views.3d.layers.graphics.Labeler")],H);const $=new C(null,null,null);export{H as Labeler,Z as areLabelsVisible};
5
+ import{_ as e}from"../../../../chunks/tslib.es6.js";import t from"../../../../core/Accessor.js";import{forEach as s,result as i}from"../../../../core/asyncUtils.js";import"../../../../core/has.js";import l from"../../../../core/Logger.js";import{disposeMaybe as a,abortMaybe as r}from"../../../../core/maybe.js";import{throwIfAborted as o,isAbortError as n}from"../../../../core/promiseUtils.js";import{watch as c}from"../../../../core/reactiveUtils.js";import{property as h}from"../../../../core/accessorSupport/decorators/property.js";import"../../../../core/RandomLCG.js";import{subclass as b}from"../../../../core/accessorSupport/decorators/subclass.js";import{fromValues as p}from"../../../../core/libs/gl-matrix-2/factories/vec2f64.js";import{hydrateGraphic as u}from"../../../../layers/graphics/hydratedFeatures.js";import{createLabelFunction as d}from"../../../../layers/support/labelFormatUtils.js";import{hasCalloutSupport as y}from"../../../../symbols/callouts/calloutUtils.js";import{VisibilityGroup as g,VisibilityFlag as m}from"./enums.js";import{make as f}from"./Graphics3DCalloutSymbolLayerFactory.js";import{LineCalloutCreationContext as C,LineCalloutSymbolLayerRenderingInfo as x}from"./Graphics3DLineCalloutSymbolLayer.js";import{getGraphics3DSymbol as _}from"./graphicSymbolUtils.js";import{LabelInfo as L}from"./LabelInfo.js";import{LabelParameters as v}from"./LabelParameters.js";import{horizontalPlacementFromAnchor as G,verticalPlacementFromAnchor as w,textRenderAlignmentFromHorizontalPlacement as D}from"./placementUtils.js";import{placePointOnGeometry as A}from"./pointUtils.js";import{TextRenderer as I}from"../../webgl-engine/lib/TextRenderer.js";import{TextRenderParameters as S}from"../../webgl-engine/lib/TextRenderParameters.js";import{TextTextureAtlas as T}from"../../webgl-engine/lib/TextTextureAtlas.js";import{VertexAttribute as R}from"../../webgl-engine/lib/VertexAttribute.js";import{WebGLLayer as P}from"../../webgl-engine/lib/WebGLLayer.js";import{hasLayerBasedScaleVisibility as j,isInEffectiveScaleRange as E}from"../../../support/layerViewUtils.js";import{TaskPriority as V}from"../../../support/Scheduler.js";import{Yield as O}from"../../../support/Yield.js";class F{constructor(e,t){this.labelingContext=e,this.graphics3DGraphic=t,this.hasGraphics3DResources=!1,this.visible=!1,this.textureAtlasHandles=[],this.textInitialized=!1,this.textRenderers=new Array,this.textLabelPlacements=new Array}}class U{constructor(e,t,s,i,l){this.labelClass=e,this.graphics3DSymbol=t,this.graphics3DCalloutSymbolLayer=s,this.textRenderParameters=i,this.labelFunction=l,this.calloutSymbolLayerIndex=0,this.graphics=new Map,this.scaleVisibility=null}}class z{constructor(e,t,s,i,l,a,r,o){this.layer=t,this.graphics3DCore=s,this.scaleVisibility=i,this.emptySymbolLabelSupported=l,this.elevationInfoOverride=a,this.disablePlacement=r,this.active=o,this.labelClassAbortController=new AbortController,this.labelClassContexts=new Array,this.graphics=new Map,this.labelsToInitialize=new Map,this.stageLayer=new P(e,{pickable:!0},s.owner.layerViewUid)}destroy(){this.stageLayer.destroy()}}let H=class extends t{constructor(e){super(e),this._hudMaterials=new Map,this._calloutMaterials=new Map,this._dirty=!1,this._labels=new Map,this._labelingContexts=new Array}setup(){this.dispose(),this.addHandles([c((()=>this.view.state?.camera),(()=>this.setDirty())),c((()=>this.view.state?.rasterPixelRatio),(()=>this._resetAllLabels())),c((()=>this.view.focusAreasView?.polygons),(()=>this._updateFocus())),this.view.resourceController.scheduler.registerTask(V.LABELER,this)]),j()&&this.addHandles(c((()=>this.view.scale),(()=>this._updateScaleVisibility()))),this._textTextureAtlas=new T({view:this.view})}dispose(){this.removeAllHandles(),this._textTextureAtlas=a(this._textTextureAtlas),this._hudMaterials.clear(),this._calloutMaterials.clear(),this._labelingContexts.length=0,this._labels.clear()}destroy(){this.dispose(),$.graphic=null,$.renderingInfo=null,$.layer=null}_updateFocus(){this._labelingContexts.forEach((e=>{e.graphics.forEach((t=>{if(0===t.labelLayers.length)return;const s=A(t.graphic.geometry);if(null==s)return;const i=this.view.focusAreasView?.containsGeometry(s)??!0;t.labelLayers.forEach((s=>{s.stageObject.geometries.some((e=>e.material.parameters.isFocused!==i))&&(this._removeGraphic(e,t),this._addGraphic(e,t),this.setDirty())}))}))}))}_activateLabelingContext(e){e.graphics.forEach(((t,s)=>{const i=new F(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i),t.setVisibilityFlag(g.LABEL,m.USER,!0)})),e.active=!0}_deactivateLabelingContext(e){e.graphics.forEach(((e,t)=>{e.setVisibilityFlag(g.LABEL,m.USER,!1),this.setLabelGraphicVisibility(e,!1),e.clearLabelGraphics(),this._labels.delete(t)})),e.active=!1}_addLabelTextureToAtlas(e){for(const t of e.graphics3DGraphic.labelLayers){if(!t.labelClass)continue;const s=e.textRenderers[t.labelClassContextIndex];s&&(e.textureAtlasHandles.push(this._textTextureAtlas.addText(s,(e=>k(t.stageObject,e)))),M(t.stageObject,s))}}_removeLabelTextureFromAtlas(e){e.textureAtlasHandles.forEach((e=>e.remove())),e.textureAtlasHandles.length=0}get running(){return this.view.ready&&(this._dirty||this.deconflictor.running)}runTask(e){return this._updateLabels(e),!this._dirty&&this.deconflictor.running&&this.deconflictor.runTask(e),O}_updateLabels(e){if(this._dirty){this._dirty=!1;for(const t of this._labelingContexts)if(t.active)if(B(t))this._dirty=!0;else if(N(t.labelClassContexts)){if(null===t.labelClassContexts){this._deactivateLabelingContext(t);continue}this._createLabelClassContext(t),this._dirty=!0}else for(const[s,i]of t.labelsToInitialize)if(this._ensureGraphics3DResources(i)&&(this._labels.set(s,i),this.deconflictor.setDirty(),e.madeProgress()),(i.visible&&i.textInitialized||!i.visible&&i.hasGraphics3DResources)&&(t.labelsToInitialize.delete(s),e.madeProgress()),e.done){this._dirty=!0;break}this._dirty||this.notifyChange("updating")}}async _createLabelClassContextAsync(e){const t=e.labelClassAbortController?.signal;e.layer.when&&await e.layer.when(),o(t),e.scaleVisibility?.updateScaleRangeActive();const a=e.graphics3DCore,r=a.layer,n=r.labelingInfo?.filter((e=>!!e.symbol));if(!n||0===n.length)return;let c=!1;await s(n,(async(s,r)=>{const n=s.symbol,h=_(a.getOrCreateGraphics3DSymbol(n));if(null==h)return void l.getLogger(this).error("Failed to create Graphics3DSymbol for label");await h.load(),o(t);let b=null;y(n)&&n.hasVisibleCallout()&&(b=f(n,a.symbolCreationContext),await b.load(),o(t));const p=await i(d(s,e.layer.fieldsIndex,this.view.spatialReference));if(o(t),!0===p.ok){const i=await this._createTextRenderParameters(h.symbol);o(t);const l=new U(s,h,b,i,p.value);this._updateLabelClassContextVisibility(l),e.labelClassContexts[r]=l}else l.getLogger(this).error(`Label expression failed to evaluate: ${p.error}`),c=!0})),o(t)}async _createLabelClassContext(e){return null==e.labelClassPromise&&(e.labelClassPromise=this._createLabelClassContextAsync(e).catch((t=>{if(n(t))throw t;e.labelClassContexts.length=0})).then((()=>{e.labelClassAbortController=null,this.notifyChange("updating")})).catch((()=>{})),this.notifyChange("updating")),e.labelClassPromise}async _createTextRenderParameters(e){const t=e.symbolLayers.at(0);return"text"!==t?.type?null:S.fromSymbol(t,this.view.state.rasterPixelRatio)}_destroyLabelClassContext(e){for(const s of e.labelClassContexts)--s.graphics3DSymbol.referenced;const t=e.labelClassAbortController;e.labelClassAbortController=new AbortController,r(t),e.labelClassContexts.length=0,e.labelClassPromise=null,this.notifyChange("updating")}_createTextSymbolGraphic(e,t,s,i,l,a){const r=new v(s,G(s.anchor),w(s.anchor),e.text,p(e.displayWidth,e.displayHeight));return $.graphic=t,$.layer=i,$.renderingInfo=null,l.createLabel($,r,this._hudMaterials,this._textTextureAtlas,(()=>a.placement?.elevationOffset??null))}_createLineCalloutGraphic(e,t,s,i,l){$.graphic=e,$.layer=l;const a=i.screenOffset[0];return $.renderingInfo=new x(null,t,i.translation,i.centerOffset,a,i.centerOffsetUnits,i.elevationOffset),s.createGraphics3DGraphic($,this._calloutMaterials)}_ensureGraphics3DResources(e){if(e.hasGraphics3DResources)return!1;const t=e.graphics3DGraphic;if(t.destroyed)return!1;this._ensureTextTextureResources(e);const s=e.labelingContext,i=s.labelClassContexts;if(N(i)||!s.emptySymbolLabelSupported&&0===t.layers.length)return!1;let l=!1;const a=t.graphic,r=s.layer,o=Z(s.layer);for(let n=0;n<i.length;n++){const c=e.textRenderers[n],h=e.textLabelPlacements[n];if(null==c||null==h)continue;const b=i[n],p=b.graphics3DSymbol,u=W(p),d=p.symbolLayers[0];if(!d)continue;d.setElevationInfoOverride(s.elevationInfoOverride);const y=new L(t,u,b.labelClass),f=this._createTextSymbolGraphic(c,a,h,r,d,y);if(null==f)return!1;f.labelClass=b.labelClass,f.labelClassContextIndex=n,t.addLabelGraphic(f,s.stageLayer),this.deconflictor.setPriority(t,b.textRenderParameters?.definition.size??0),t.setVisibilityFlag(g.LABEL,m.USER,o),t.setVisibilityFlag(g.LABEL,m.SCALE_RANGE,b.scaleVisibility??!0),t.setVisibilityFlag(g.LABEL,m.DECONFLICTION,!1),j()&&b.graphics.set(a.uid,t),l=!0;const C=b.graphics3DCalloutSymbolLayer;if(C&&h.hasLabelVerticalOffset){C.setElevationInfoOverride(s.elevationInfoOverride);const e=this._createLineCalloutGraphic(a,u,C,h,r);null!=e&&(b.calloutSymbolLayerIndex=t.labelLayers.length,t.addLabelGraphic(e,s.stageLayer))}break}return l&&s.scaleVisibility?.updateGraphicLabelScaleVisibility(t),e.hasGraphics3DResources=!0,!0}_destroyGraphics3DResources(e){const t=e.labelingContext.labelClassContexts;for(const s of e.graphics3DGraphic.labelLayers){if(null==s.labelClass)continue;const e=t[s.labelClassContextIndex].graphics3DSymbol.symbolLayers[0];e?.onRemoveGraphic(s)}e.graphics3DGraphic.clearLabelGraphics(),e.hasGraphics3DResources=!1}_ensureTextTextureResources(e){if(e.textInitialized)return;const t=e.labelingContext,s=t.labelClassContexts;if(N(s))return;const i=e.graphics3DGraphic.graphic;for(let a=0;a<s.length;a++){const r=s[a];if(e.textRenderers[a]=null,e.textLabelPlacements[a]=null,null==r?.textRenderParameters)continue;const o=r.labelFunction;let n;if("arcade"===o.type)try{const e=o.needsHydrationToEvaluate()?u(i,t.layer):i;n=o.evaluate(e)}catch(l){n=null}else n=o.evaluate(i);if(null==n||""===n||/^\s+$/.test(n))continue;const c=r.graphics3DSymbol;if(!c.symbolLayers[0])continue;const h=e.graphics3DGraphic,b="label-3d"===c.symbol?.type?c.symbol:null,p=r.labelClass,d=t.disablePlacement,y=new L(h,b,p,d).placement;if(null==y)continue;const g=G(y.anchor),m=D(g);e.textRenderers[a]=new I(n,m,r.textRenderParameters,T.maxSize),e.textLabelPlacements[a]=y}e.textInitialized=!0}_destroyTextTextureResources(e){e.textInitialized=!1,e.textRenderers.length=0,e.textLabelPlacements.length=0}_addGraphic(e,t){const s=t.graphic.uid;if(e.graphics.set(s,t),e.active){const i=new F(e,t);this._labels.set(s,i),e.labelsToInitialize.set(s,i)}this.setDirty(),this.deconflictor.setDirty()}_updateGraphicGeometry(e,t){const s=t.graphic.uid,i=this._labels.get(s);if(!i)return!0;for(const l of i.graphics3DGraphic.labelLayers){if(null==l.labelClass)continue;if(!e.labelClassContexts[l.labelClassContextIndex].graphics3DSymbol.symbolLayers[0].updateGeometry(l,t.graphic.geometry))return!1}return this.setDirty(),this.deconflictor.setDirty(),!0}_removeGraphic(e,t){const s=t.graphic.uid,i=this._labels.get(s);e.graphics.delete(s),i&&(this._destroyGraphic(i,s),e.labelsToInitialize.delete(s),this.setDirty(),this.deconflictor.setDirty())}_destroyGraphic(e,t){this._labels.delete(t),e.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(e),this._destroyTextTextureResources(e),e.hasGraphics3DResources&&this._destroyGraphics3DResources(e)}async _labelingInfoChange(e,t){if(!t)return this._visibilityInfoChange(e),this._resetLabels(e),this._createLabelClassContext(e);for(const s of t){const t=e.graphics.get(s);t&&(this._removeGraphic(e,t),this._addGraphic(e,t))}}_globalPropertyChanged(e,t){for(const s of t.labelClassContexts){const i=new Map;t.graphics.forEach((e=>i.set(e.graphic.uid,e)));const l=e=>e.labelLayers[0];if(s.graphics3DSymbol.symbolLayers[0].globalPropertyChanged(e,i,l),s.graphics3DCalloutSymbolLayer){const t=e=>e.labelLayers[s.calloutSymbolLayerIndex];s.graphics3DCalloutSymbolLayer.globalPropertyChanged(e,i,t)}}}_visibilityInfoChange(e){const t=Z(e.layer);t&&!e.active&&this._activateLabelingContext(e),!t&&e.active&&this._deactivateLabelingContext(e),this.setDirty()}_resetAllLabels(){for(const e of this._labelingContexts)this._resetLabels(e)}_resetLabels(e){e.graphics.forEach(((t,s)=>{const i=this._labels.get(s);i&&(this._destroyGraphic(i,s),i.visible=!1,e.labelsToInitialize.set(s,i))})),this._destroyLabelClassContext(e),this.setDirty(),this.deconflictor.setDirty()}_findLabelingContext(e){for(const t of this._labelingContexts)if(t.graphics3DCore===e)return t;return null}addGraphicsOwner(e,t,s){const i=s?.emptySymbolLabelSupported||!1,l=s?.elevationInfoOverride||null,a=s?.disablePlacement||null;if(this._findLabelingContext(e))return;const r=e.layer,o=new z(this.view.stage,r,e,t,i,l,a,Z(r));return this._labelingContexts.push(o),this.setDirty(),{addGraphic:e=>this._addGraphic(o,e),removeGraphic:e=>this._removeGraphic(o,e),updateGraphicGeometry:e=>this._updateGraphicGeometry(o,e),layerLabelsEnabled:()=>Z(o.layer),labelingInfoChange:e=>this._labelingInfoChange(o,e),elevationInfoChange:()=>this._globalPropertyChanged("elevationInfo",o),slicePlaneEnabledChange:()=>this._globalPropertyChanged("slicePlaneEnabled",o),visibilityInfoChange:()=>this._visibilityInfoChange(o),reset:()=>this._resetLabels(o),remove:()=>this._removeGraphicsOwner(e),setDirty:()=>this.setDirty()}}_removeGraphicsOwner(e){const t=this._findLabelingContext(e);if(!t)return;const s=this._labelingContexts.indexOf(t);this._labelingContexts.splice(s,1),t.graphics.forEach((e=>this._removeGraphic(t,e))),t.destroy(),this.setDirty()}_updateScaleVisibility(){for(const e of this._labelingContexts)if(e.active)for(const t of e.labelClassContexts)this._updateLabelClassContextVisibility(t)}_updateLabelClassContextVisibility(e){if(!j())return;const{labelClass:t,graphics:s}=e,i={minScale:t.minScale,maxScale:t.maxScale},l=E(i,this.view.scale),a=null==e.scaleVisibility||e.scaleVisibility!==l;e.scaleVisibility=l,a&&s.size&&(s.forEach((e=>e.setVisibilityFlag(g.LABEL,m.SCALE_RANGE,l))),this.deconflictor.setDirty(),this.setDirty())}setLabelGraphicVisibility(e,t){const s=e.graphic.uid,i=this._labels.get(s);i&&i.visible!==t&&(t&&!i.textureAtlasHandles.length?(this._addLabelTextureToAtlas(i),i.textInitialized||i.labelingContext.labelsToInitialize.set(s,i)):!t&&i.textureAtlasHandles.length&&this._removeLabelTextureFromAtlas(i),i.visible=t,this.setDirty())}setDirty(){!this._dirty&&this._labelingContexts.length>0&&(this._dirty=!0,this.notifyChange("updating"))}get updating(){return this._dirty||this._textTextureAtlas?.updating||this.deconflictor.updating||this._labelingContexts.some((e=>B(e)))}get updatingProgress(){if(!this.updating||!this._textTextureAtlas)return 1;const e=this._labelingContexts.length>0?this._labelingContexts.reduce(((e,t)=>e+(B(t)?0:1)),0)/this._labelingContexts.length:1;return(this._dirty?0:.3)+(this._textTextureAtlas.updating?0:.1)+.1*e+.5*this.deconflictor.updatingProgress}get test(){}};function M(e,t){e.geometries[0].setAttributeData(R.SIZE,[t.displayWidth,t.displayHeight]),e.geometryVertexAttributeUpdated(e.geometries[0],R.SIZE)}function k(e,t){e.geometries[0].setAttributeData(R.UVI,t),e.geometryVertexAttributeUpdated(e.geometries[0],R.UVI,!0)}function B(e){return!!e.labelClassPromise&&!!e.labelClassAbortController}function N(e){return!e||0===e.length}function W(e){return"label-3d"===e.symbol?.type?e.symbol:null}function Z(e){return!!e.labelsVisible&&!!e.labelingInfo?.some((e=>!!e.symbol))}e([h({constructOnly:!0})],H.prototype,"view",void 0),e([h({constructOnly:!0})],H.prototype,"deconflictor",void 0),e([h()],H.prototype,"_textTextureAtlas",void 0),e([h({type:Boolean,readOnly:!0})],H.prototype,"updating",null),H=e([b("esri.views.3d.layers.graphics.Labeler")],H);const $=new C(null,null,null);export{H as Labeler,Z as areLabelsVisible};