@arcgis/core 5.2.0-next.67 → 5.2.0-next.69

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 (443) hide show
  1. package/arcgisGlobal.d.ts +2 -0
  2. package/assets/components/assets/combobox/t9n/messages.ar.json +1 -1
  3. package/assets/components/assets/combobox/t9n/messages.bg.json +1 -1
  4. package/assets/components/assets/combobox/t9n/messages.bs.json +1 -1
  5. package/assets/components/assets/combobox/t9n/messages.ca.json +1 -1
  6. package/assets/components/assets/combobox/t9n/messages.cs.json +1 -1
  7. package/assets/components/assets/combobox/t9n/messages.da.json +1 -1
  8. package/assets/components/assets/combobox/t9n/messages.de.json +1 -1
  9. package/assets/components/assets/combobox/t9n/messages.el.json +1 -1
  10. package/assets/components/assets/combobox/t9n/messages.en.json +1 -1
  11. package/assets/components/assets/combobox/t9n/messages.es.json +1 -1
  12. package/assets/components/assets/combobox/t9n/messages.et.json +1 -1
  13. package/assets/components/assets/combobox/t9n/messages.fi.json +1 -1
  14. package/assets/components/assets/combobox/t9n/messages.fr.json +1 -1
  15. package/assets/components/assets/combobox/t9n/messages.he.json +1 -1
  16. package/assets/components/assets/combobox/t9n/messages.hr.json +1 -1
  17. package/assets/components/assets/combobox/t9n/messages.hu.json +1 -1
  18. package/assets/components/assets/combobox/t9n/messages.id.json +1 -1
  19. package/assets/components/assets/combobox/t9n/messages.it.json +1 -1
  20. package/assets/components/assets/combobox/t9n/messages.ja.json +1 -1
  21. package/assets/components/assets/combobox/t9n/messages.json +1 -1
  22. package/assets/components/assets/combobox/t9n/messages.ko.json +1 -1
  23. package/assets/components/assets/combobox/t9n/messages.lt.json +1 -1
  24. package/assets/components/assets/combobox/t9n/messages.lv.json +1 -1
  25. package/assets/components/assets/combobox/t9n/messages.nl.json +1 -1
  26. package/assets/components/assets/combobox/t9n/messages.no.json +1 -1
  27. package/assets/components/assets/combobox/t9n/messages.pl.json +1 -1
  28. package/assets/components/assets/combobox/t9n/messages.pt-BR.json +1 -1
  29. package/assets/components/assets/combobox/t9n/messages.pt-PT.json +1 -1
  30. package/assets/components/assets/combobox/t9n/messages.ro.json +1 -1
  31. package/assets/components/assets/combobox/t9n/messages.ru.json +1 -1
  32. package/assets/components/assets/combobox/t9n/messages.sk.json +1 -1
  33. package/assets/components/assets/combobox/t9n/messages.sl.json +1 -1
  34. package/assets/components/assets/combobox/t9n/messages.sr.json +1 -1
  35. package/assets/components/assets/combobox/t9n/messages.sv.json +1 -1
  36. package/assets/components/assets/combobox/t9n/messages.th.json +1 -1
  37. package/assets/components/assets/combobox/t9n/messages.tr.json +1 -1
  38. package/assets/components/assets/combobox/t9n/messages.uk.json +1 -1
  39. package/assets/components/assets/combobox/t9n/messages.vi.json +1 -1
  40. package/assets/components/assets/combobox/t9n/messages.zh-CN.json +1 -1
  41. package/assets/components/assets/combobox/t9n/messages.zh-HK.json +1 -1
  42. package/assets/components/assets/combobox/t9n/messages.zh-TW.json +1 -1
  43. package/assets/components/assets/icon/arcgisEnterprise16.json +1 -0
  44. package/assets/components/assets/icon/arcgisEnterprise24.json +1 -0
  45. package/assets/components/assets/icon/arcgisEnterprise32.json +1 -0
  46. package/assets/components/assets/icon/buildingIndex16.json +1 -0
  47. package/assets/components/assets/icon/buildingIndex24.json +1 -0
  48. package/assets/components/assets/icon/buildingIndex32.json +1 -0
  49. package/assets/components/assets/icon/fireIndex16.json +1 -0
  50. package/assets/components/assets/icon/fireIndex24.json +1 -0
  51. package/assets/components/assets/icon/fireIndex32.json +1 -0
  52. package/assets/components/assets/icon/geologyIndex16.json +1 -0
  53. package/assets/components/assets/icon/geologyIndex24.json +1 -0
  54. package/assets/components/assets/icon/geologyIndex32.json +1 -0
  55. package/assets/components/assets/icon/orientedImageryFullSuperimpose16.json +1 -0
  56. package/assets/components/assets/icon/orientedImageryFullSuperimpose24.json +1 -0
  57. package/assets/components/assets/icon/orientedImageryFullSuperimpose32.json +1 -0
  58. package/assets/components/assets/icon/orientedImageryHalfSuperimpose16.json +1 -0
  59. package/assets/components/assets/icon/orientedImageryHalfSuperimpose24.json +1 -0
  60. package/assets/components/assets/icon/orientedImageryHalfSuperimpose32.json +1 -0
  61. package/assets/components/assets/icon/orientedImagerySceneOnly16.json +1 -0
  62. package/assets/components/assets/icon/orientedImagerySceneOnly24.json +1 -0
  63. package/assets/components/assets/icon/orientedImagerySceneOnly32.json +1 -0
  64. package/assets/components/assets/icon/parquetFeatureLayer16.json +1 -0
  65. package/assets/components/assets/icon/parquetFeatureLayer24.json +1 -0
  66. package/assets/components/assets/icon/parquetFeatureLayer32.json +1 -0
  67. package/assets/components/assets/icon/publish32.json +1 -1
  68. package/assets/components/assets/icon/radarChart16.json +1 -0
  69. package/assets/components/assets/icon/radarChart24.json +1 -0
  70. package/assets/components/assets/icon/radarChart32.json +1 -0
  71. package/assets/components/assets/icon/returnToDefault16.json +1 -1
  72. package/assets/components/assets/icon/returnToDefault32.json +1 -1
  73. package/assets/components/assets/icon/smartSearch16.json +1 -0
  74. package/assets/components/assets/icon/smartSearch24.json +1 -0
  75. package/assets/components/assets/icon/smartSearch32.json +1 -0
  76. package/assets/components/assets/icon/snowIndex16.json +1 -0
  77. package/assets/components/assets/icon/snowIndex24.json +1 -0
  78. package/assets/components/assets/icon/snowIndex32.json +1 -0
  79. package/assets/components/assets/icon/soilAdjustedVegetationIndex16.json +1 -0
  80. package/assets/components/assets/icon/soilAdjustedVegetationIndex24.json +1 -0
  81. package/assets/components/assets/icon/soilAdjustedVegetationIndex32.json +1 -0
  82. package/assets/components/assets/icon/treeMap16.json +1 -0
  83. package/assets/components/assets/icon/treeMap24.json +1 -0
  84. package/assets/components/assets/icon/treeMap32.json +1 -0
  85. package/assets/components/assets/icon/userSave16.json +1 -0
  86. package/assets/components/assets/icon/userSave24.json +1 -0
  87. package/assets/components/assets/icon/userSave32.json +1 -0
  88. package/assets/components/assets/icon/vegetationIndex16.json +1 -0
  89. package/assets/components/assets/icon/vegetationIndex24.json +1 -0
  90. package/assets/components/assets/icon/vegetationIndex32.json +1 -0
  91. package/assets/components/assets/icon/weatherRadar16.json +1 -0
  92. package/assets/components/assets/icon/weatherRadar24.json +1 -0
  93. package/assets/components/assets/icon/weatherRadar32.json +1 -0
  94. package/assets/components/assets/input/t9n/messages.ar.json +1 -1
  95. package/assets/components/assets/input/t9n/messages.bg.json +1 -1
  96. package/assets/components/assets/input/t9n/messages.bs.json +1 -1
  97. package/assets/components/assets/input/t9n/messages.ca.json +1 -1
  98. package/assets/components/assets/input/t9n/messages.cs.json +1 -1
  99. package/assets/components/assets/input/t9n/messages.da.json +1 -1
  100. package/assets/components/assets/input/t9n/messages.de.json +1 -1
  101. package/assets/components/assets/input/t9n/messages.el.json +1 -1
  102. package/assets/components/assets/input/t9n/messages.en.json +1 -1
  103. package/assets/components/assets/input/t9n/messages.es.json +1 -1
  104. package/assets/components/assets/input/t9n/messages.et.json +1 -1
  105. package/assets/components/assets/input/t9n/messages.fi.json +1 -1
  106. package/assets/components/assets/input/t9n/messages.fr.json +1 -1
  107. package/assets/components/assets/input/t9n/messages.he.json +1 -1
  108. package/assets/components/assets/input/t9n/messages.hr.json +1 -1
  109. package/assets/components/assets/input/t9n/messages.hu.json +1 -1
  110. package/assets/components/assets/input/t9n/messages.id.json +1 -1
  111. package/assets/components/assets/input/t9n/messages.it.json +1 -1
  112. package/assets/components/assets/input/t9n/messages.ja.json +1 -1
  113. package/assets/components/assets/input/t9n/messages.json +1 -1
  114. package/assets/components/assets/input/t9n/messages.ko.json +1 -1
  115. package/assets/components/assets/input/t9n/messages.lt.json +1 -1
  116. package/assets/components/assets/input/t9n/messages.lv.json +1 -1
  117. package/assets/components/assets/input/t9n/messages.nl.json +1 -1
  118. package/assets/components/assets/input/t9n/messages.no.json +1 -1
  119. package/assets/components/assets/input/t9n/messages.pl.json +1 -1
  120. package/assets/components/assets/input/t9n/messages.pt-BR.json +1 -1
  121. package/assets/components/assets/input/t9n/messages.pt-PT.json +1 -1
  122. package/assets/components/assets/input/t9n/messages.ro.json +1 -1
  123. package/assets/components/assets/input/t9n/messages.ru.json +1 -1
  124. package/assets/components/assets/input/t9n/messages.sk.json +1 -1
  125. package/assets/components/assets/input/t9n/messages.sl.json +1 -1
  126. package/assets/components/assets/input/t9n/messages.sr.json +1 -1
  127. package/assets/components/assets/input/t9n/messages.sv.json +1 -1
  128. package/assets/components/assets/input/t9n/messages.th.json +1 -1
  129. package/assets/components/assets/input/t9n/messages.tr.json +1 -1
  130. package/assets/components/assets/input/t9n/messages.uk.json +1 -1
  131. package/assets/components/assets/input/t9n/messages.vi.json +1 -1
  132. package/assets/components/assets/input/t9n/messages.zh-CN.json +1 -1
  133. package/assets/components/assets/input/t9n/messages.zh-HK.json +1 -1
  134. package/assets/components/assets/input/t9n/messages.zh-TW.json +1 -1
  135. package/assets/components/assets/input-date-picker/t9n/messages.ar.json +1 -1
  136. package/assets/components/assets/input-date-picker/t9n/messages.bg.json +1 -1
  137. package/assets/components/assets/input-date-picker/t9n/messages.bs.json +1 -1
  138. package/assets/components/assets/input-date-picker/t9n/messages.ca.json +1 -1
  139. package/assets/components/assets/input-date-picker/t9n/messages.cs.json +1 -1
  140. package/assets/components/assets/input-date-picker/t9n/messages.da.json +1 -1
  141. package/assets/components/assets/input-date-picker/t9n/messages.de.json +1 -1
  142. package/assets/components/assets/input-date-picker/t9n/messages.el.json +1 -1
  143. package/assets/components/assets/input-date-picker/t9n/messages.en.json +1 -1
  144. package/assets/components/assets/input-date-picker/t9n/messages.es.json +1 -1
  145. package/assets/components/assets/input-date-picker/t9n/messages.et.json +1 -1
  146. package/assets/components/assets/input-date-picker/t9n/messages.fi.json +1 -1
  147. package/assets/components/assets/input-date-picker/t9n/messages.fr.json +1 -1
  148. package/assets/components/assets/input-date-picker/t9n/messages.he.json +1 -1
  149. package/assets/components/assets/input-date-picker/t9n/messages.hr.json +1 -1
  150. package/assets/components/assets/input-date-picker/t9n/messages.hu.json +1 -1
  151. package/assets/components/assets/input-date-picker/t9n/messages.id.json +1 -1
  152. package/assets/components/assets/input-date-picker/t9n/messages.it.json +1 -1
  153. package/assets/components/assets/input-date-picker/t9n/messages.ja.json +1 -1
  154. package/assets/components/assets/input-date-picker/t9n/messages.json +1 -1
  155. package/assets/components/assets/input-date-picker/t9n/messages.ko.json +1 -1
  156. package/assets/components/assets/input-date-picker/t9n/messages.lt.json +1 -1
  157. package/assets/components/assets/input-date-picker/t9n/messages.lv.json +1 -1
  158. package/assets/components/assets/input-date-picker/t9n/messages.nl.json +1 -1
  159. package/assets/components/assets/input-date-picker/t9n/messages.no.json +1 -1
  160. package/assets/components/assets/input-date-picker/t9n/messages.pl.json +1 -1
  161. package/assets/components/assets/input-date-picker/t9n/messages.pt-BR.json +1 -1
  162. package/assets/components/assets/input-date-picker/t9n/messages.pt-PT.json +1 -1
  163. package/assets/components/assets/input-date-picker/t9n/messages.ro.json +1 -1
  164. package/assets/components/assets/input-date-picker/t9n/messages.ru.json +1 -1
  165. package/assets/components/assets/input-date-picker/t9n/messages.sk.json +1 -1
  166. package/assets/components/assets/input-date-picker/t9n/messages.sl.json +1 -1
  167. package/assets/components/assets/input-date-picker/t9n/messages.sr.json +1 -1
  168. package/assets/components/assets/input-date-picker/t9n/messages.sv.json +1 -1
  169. package/assets/components/assets/input-date-picker/t9n/messages.th.json +1 -1
  170. package/assets/components/assets/input-date-picker/t9n/messages.tr.json +1 -1
  171. package/assets/components/assets/input-date-picker/t9n/messages.uk.json +1 -1
  172. package/assets/components/assets/input-date-picker/t9n/messages.vi.json +1 -1
  173. package/assets/components/assets/input-date-picker/t9n/messages.zh-CN.json +1 -1
  174. package/assets/components/assets/input-date-picker/t9n/messages.zh-HK.json +1 -1
  175. package/assets/components/assets/input-date-picker/t9n/messages.zh-TW.json +1 -1
  176. package/assets/components/assets/input-number/t9n/messages.ar.json +1 -1
  177. package/assets/components/assets/input-number/t9n/messages.bg.json +1 -1
  178. package/assets/components/assets/input-number/t9n/messages.bs.json +1 -1
  179. package/assets/components/assets/input-number/t9n/messages.ca.json +1 -1
  180. package/assets/components/assets/input-number/t9n/messages.cs.json +1 -1
  181. package/assets/components/assets/input-number/t9n/messages.da.json +1 -1
  182. package/assets/components/assets/input-number/t9n/messages.de.json +1 -1
  183. package/assets/components/assets/input-number/t9n/messages.el.json +1 -1
  184. package/assets/components/assets/input-number/t9n/messages.en.json +1 -1
  185. package/assets/components/assets/input-number/t9n/messages.es.json +1 -1
  186. package/assets/components/assets/input-number/t9n/messages.et.json +1 -1
  187. package/assets/components/assets/input-number/t9n/messages.fi.json +1 -1
  188. package/assets/components/assets/input-number/t9n/messages.fr.json +1 -1
  189. package/assets/components/assets/input-number/t9n/messages.he.json +1 -1
  190. package/assets/components/assets/input-number/t9n/messages.hr.json +1 -1
  191. package/assets/components/assets/input-number/t9n/messages.hu.json +1 -1
  192. package/assets/components/assets/input-number/t9n/messages.id.json +1 -1
  193. package/assets/components/assets/input-number/t9n/messages.it.json +1 -1
  194. package/assets/components/assets/input-number/t9n/messages.ja.json +1 -1
  195. package/assets/components/assets/input-number/t9n/messages.json +1 -1
  196. package/assets/components/assets/input-number/t9n/messages.ko.json +1 -1
  197. package/assets/components/assets/input-number/t9n/messages.lt.json +1 -1
  198. package/assets/components/assets/input-number/t9n/messages.lv.json +1 -1
  199. package/assets/components/assets/input-number/t9n/messages.nl.json +1 -1
  200. package/assets/components/assets/input-number/t9n/messages.no.json +1 -1
  201. package/assets/components/assets/input-number/t9n/messages.pl.json +1 -1
  202. package/assets/components/assets/input-number/t9n/messages.pt-BR.json +1 -1
  203. package/assets/components/assets/input-number/t9n/messages.pt-PT.json +1 -1
  204. package/assets/components/assets/input-number/t9n/messages.ro.json +1 -1
  205. package/assets/components/assets/input-number/t9n/messages.ru.json +1 -1
  206. package/assets/components/assets/input-number/t9n/messages.sk.json +1 -1
  207. package/assets/components/assets/input-number/t9n/messages.sl.json +1 -1
  208. package/assets/components/assets/input-number/t9n/messages.sr.json +1 -1
  209. package/assets/components/assets/input-number/t9n/messages.sv.json +1 -1
  210. package/assets/components/assets/input-number/t9n/messages.th.json +1 -1
  211. package/assets/components/assets/input-number/t9n/messages.tr.json +1 -1
  212. package/assets/components/assets/input-number/t9n/messages.uk.json +1 -1
  213. package/assets/components/assets/input-number/t9n/messages.vi.json +1 -1
  214. package/assets/components/assets/input-number/t9n/messages.zh-CN.json +1 -1
  215. package/assets/components/assets/input-number/t9n/messages.zh-HK.json +1 -1
  216. package/assets/components/assets/input-number/t9n/messages.zh-TW.json +1 -1
  217. package/assets/components/assets/input-text/t9n/messages.ar.json +1 -1
  218. package/assets/components/assets/input-text/t9n/messages.bg.json +1 -1
  219. package/assets/components/assets/input-text/t9n/messages.bs.json +1 -1
  220. package/assets/components/assets/input-text/t9n/messages.ca.json +1 -1
  221. package/assets/components/assets/input-text/t9n/messages.cs.json +1 -1
  222. package/assets/components/assets/input-text/t9n/messages.da.json +1 -1
  223. package/assets/components/assets/input-text/t9n/messages.de.json +1 -1
  224. package/assets/components/assets/input-text/t9n/messages.el.json +1 -1
  225. package/assets/components/assets/input-text/t9n/messages.en.json +1 -1
  226. package/assets/components/assets/input-text/t9n/messages.es.json +1 -1
  227. package/assets/components/assets/input-text/t9n/messages.et.json +1 -1
  228. package/assets/components/assets/input-text/t9n/messages.fi.json +1 -1
  229. package/assets/components/assets/input-text/t9n/messages.fr.json +1 -1
  230. package/assets/components/assets/input-text/t9n/messages.he.json +1 -1
  231. package/assets/components/assets/input-text/t9n/messages.hr.json +1 -1
  232. package/assets/components/assets/input-text/t9n/messages.hu.json +1 -1
  233. package/assets/components/assets/input-text/t9n/messages.id.json +1 -1
  234. package/assets/components/assets/input-text/t9n/messages.it.json +1 -1
  235. package/assets/components/assets/input-text/t9n/messages.ja.json +1 -1
  236. package/assets/components/assets/input-text/t9n/messages.json +1 -1
  237. package/assets/components/assets/input-text/t9n/messages.ko.json +1 -1
  238. package/assets/components/assets/input-text/t9n/messages.lt.json +1 -1
  239. package/assets/components/assets/input-text/t9n/messages.lv.json +1 -1
  240. package/assets/components/assets/input-text/t9n/messages.nl.json +1 -1
  241. package/assets/components/assets/input-text/t9n/messages.no.json +1 -1
  242. package/assets/components/assets/input-text/t9n/messages.pl.json +1 -1
  243. package/assets/components/assets/input-text/t9n/messages.pt-BR.json +1 -1
  244. package/assets/components/assets/input-text/t9n/messages.pt-PT.json +1 -1
  245. package/assets/components/assets/input-text/t9n/messages.ro.json +1 -1
  246. package/assets/components/assets/input-text/t9n/messages.ru.json +1 -1
  247. package/assets/components/assets/input-text/t9n/messages.sk.json +1 -1
  248. package/assets/components/assets/input-text/t9n/messages.sl.json +1 -1
  249. package/assets/components/assets/input-text/t9n/messages.sr.json +1 -1
  250. package/assets/components/assets/input-text/t9n/messages.sv.json +1 -1
  251. package/assets/components/assets/input-text/t9n/messages.th.json +1 -1
  252. package/assets/components/assets/input-text/t9n/messages.tr.json +1 -1
  253. package/assets/components/assets/input-text/t9n/messages.uk.json +1 -1
  254. package/assets/components/assets/input-text/t9n/messages.vi.json +1 -1
  255. package/assets/components/assets/input-text/t9n/messages.zh-CN.json +1 -1
  256. package/assets/components/assets/input-text/t9n/messages.zh-HK.json +1 -1
  257. package/assets/components/assets/input-text/t9n/messages.zh-TW.json +1 -1
  258. package/assets/components/assets/input-time-picker/t9n/messages.ar.json +1 -1
  259. package/assets/components/assets/input-time-picker/t9n/messages.bg.json +1 -1
  260. package/assets/components/assets/input-time-picker/t9n/messages.bs.json +1 -1
  261. package/assets/components/assets/input-time-picker/t9n/messages.ca.json +1 -1
  262. package/assets/components/assets/input-time-picker/t9n/messages.cs.json +1 -1
  263. package/assets/components/assets/input-time-picker/t9n/messages.da.json +1 -1
  264. package/assets/components/assets/input-time-picker/t9n/messages.de.json +1 -1
  265. package/assets/components/assets/input-time-picker/t9n/messages.el.json +1 -1
  266. package/assets/components/assets/input-time-picker/t9n/messages.en.json +1 -1
  267. package/assets/components/assets/input-time-picker/t9n/messages.es.json +1 -1
  268. package/assets/components/assets/input-time-picker/t9n/messages.et.json +1 -1
  269. package/assets/components/assets/input-time-picker/t9n/messages.fi.json +1 -1
  270. package/assets/components/assets/input-time-picker/t9n/messages.fr.json +1 -1
  271. package/assets/components/assets/input-time-picker/t9n/messages.he.json +1 -1
  272. package/assets/components/assets/input-time-picker/t9n/messages.hr.json +1 -1
  273. package/assets/components/assets/input-time-picker/t9n/messages.hu.json +1 -1
  274. package/assets/components/assets/input-time-picker/t9n/messages.id.json +1 -1
  275. package/assets/components/assets/input-time-picker/t9n/messages.it.json +1 -1
  276. package/assets/components/assets/input-time-picker/t9n/messages.ja.json +1 -1
  277. package/assets/components/assets/input-time-picker/t9n/messages.json +1 -1
  278. package/assets/components/assets/input-time-picker/t9n/messages.ko.json +1 -1
  279. package/assets/components/assets/input-time-picker/t9n/messages.lt.json +1 -1
  280. package/assets/components/assets/input-time-picker/t9n/messages.lv.json +1 -1
  281. package/assets/components/assets/input-time-picker/t9n/messages.nl.json +1 -1
  282. package/assets/components/assets/input-time-picker/t9n/messages.no.json +1 -1
  283. package/assets/components/assets/input-time-picker/t9n/messages.pl.json +1 -1
  284. package/assets/components/assets/input-time-picker/t9n/messages.pt-BR.json +1 -1
  285. package/assets/components/assets/input-time-picker/t9n/messages.pt-PT.json +1 -1
  286. package/assets/components/assets/input-time-picker/t9n/messages.ro.json +1 -1
  287. package/assets/components/assets/input-time-picker/t9n/messages.ru.json +1 -1
  288. package/assets/components/assets/input-time-picker/t9n/messages.sk.json +1 -1
  289. package/assets/components/assets/input-time-picker/t9n/messages.sl.json +1 -1
  290. package/assets/components/assets/input-time-picker/t9n/messages.sr.json +1 -1
  291. package/assets/components/assets/input-time-picker/t9n/messages.sv.json +1 -1
  292. package/assets/components/assets/input-time-picker/t9n/messages.th.json +1 -1
  293. package/assets/components/assets/input-time-picker/t9n/messages.tr.json +1 -1
  294. package/assets/components/assets/input-time-picker/t9n/messages.uk.json +1 -1
  295. package/assets/components/assets/input-time-picker/t9n/messages.vi.json +1 -1
  296. package/assets/components/assets/input-time-picker/t9n/messages.zh-CN.json +1 -1
  297. package/assets/components/assets/input-time-picker/t9n/messages.zh-HK.json +1 -1
  298. package/assets/components/assets/input-time-picker/t9n/messages.zh-TW.json +1 -1
  299. package/assets/esri/core/workers/RemoteClient.js +1 -1
  300. package/assets/esri/core/workers/chunks/{6f39545710d1b35d922c.js → 181f330314c1989f642f.js} +1 -1
  301. package/assets/esri/core/workers/chunks/{d4058352db1e8255b52e.js → 1d38a710cf799cb0e5b3.js} +1 -1
  302. package/assets/esri/core/workers/chunks/{59dd83e5aee2908c7eca.js → 3f84ade6285560b692d1.js} +1 -1
  303. package/assets/esri/core/workers/chunks/{25197ecb324d6f08e03e.js → 538bdf02c4dfb5ec72fe.js} +1 -1
  304. package/assets/esri/core/workers/chunks/{f5c9659fc5d571d501c9.js → 59a795eba31061dc357a.js} +1 -1
  305. package/assets/esri/core/workers/chunks/{7d163d9d90393e491ee5.js → 5fb0e8f89b885e5e3742.js} +1 -1
  306. package/assets/esri/core/workers/chunks/{19bf6826e7d9a4d52035.js → 6cc1120554bcb1b4899b.js} +1 -1
  307. package/assets/esri/core/workers/chunks/7dd672c25beb8813cc75.js +2 -0
  308. package/assets/esri/core/workers/chunks/{d7267f429a051943187b.js → 873d8332e2149eb1b36a.js} +1 -1
  309. package/assets/esri/core/workers/chunks/{a97e0b9b057664911c14.js → 8f8db62f126e4a8c1bf7.js} +1 -1
  310. package/assets/esri/core/workers/chunks/b526055794e64b0227ca.js +256 -0
  311. package/assets/esri/core/workers/chunks/be291d920ebc68fde02b.js +2 -0
  312. package/assets/esri/core/workers/chunks/c10a0eebd935472d8fae.js +1 -0
  313. package/assets/esri/core/workers/chunks/c97451f75c23be979476.js +1 -0
  314. package/assets/esri/core/workers/chunks/d198ecb1fe3690d6092f.js +2 -0
  315. package/assets/esri/core/workers/chunks/d2a51c797b2966cb95f3.js +2 -0
  316. package/assets/esri/core/workers/chunks/d303621c902330be5035.js +1 -0
  317. package/assets/esri/core/workers/chunks/{7d4c65311064a5c2e0b1.js → df89bf05c18f0c8e418b.js} +1 -1
  318. package/assets/esri/core/workers/chunks/f4e813ead56d963b16b8.js +1 -0
  319. package/assets/esri/core/workers/chunks/f6f1122bed931f1d960b.js +1 -0
  320. package/assets/esri/core/workers/chunks/f82cd34a79c8aa58d40c.js +2 -0
  321. package/assets/esri/themes/base/widgets/_SelectionToolbar.scss +1 -0
  322. package/assets/esri/themes/dark/main.css +1 -1
  323. package/assets/esri/themes/light/main.css +1 -1
  324. package/assets/esri/themes/light/view.css +1 -1
  325. package/assets/esri/views/3d/environment/resources/milkyway-band.ktx2 +0 -0
  326. package/chunks/DeepSky.glsl.js +66 -0
  327. package/chunks/GaussianSplat.glsl.js +10 -9
  328. package/chunks/GaussianSplatDepth.glsl.js +11 -0
  329. package/chunks/GaussianSplatShadow.glsl.js +7 -16
  330. package/config.js +1 -1
  331. package/interfaces.d.ts +0 -14
  332. package/kernel.js +1 -1
  333. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  334. package/networks/RulesTable.js +1 -1
  335. package/networks/UtilityNetwork.js +1 -1
  336. package/networks/support/utils.js +1 -1
  337. package/package.json +4 -4
  338. package/popup/FeatureContent.d.ts +17 -96
  339. package/popup/FeatureContentCollection.d.ts +71 -188
  340. package/support/revision.js +1 -1
  341. package/symbols/LabelSymbol3D.js +1 -1
  342. package/symbols/LineSymbol3D.js +1 -1
  343. package/symbols/MeshSymbol3D.js +1 -1
  344. package/symbols/PointSymbol3D.js +1 -1
  345. package/symbols/PolygonSymbol3D.js +1 -1
  346. package/third-party-notices.txt +9 -0
  347. package/views/2d/engine/imagery/RasterVFDisplayObject.js +1 -1
  348. package/views/2d/engine/webgl/AFeatureTile.js +1 -1
  349. package/views/2d/interactive/editingTools/ControlPointsTransformTool.js +1 -1
  350. package/views/2d/layers/support/MediaLayerInteraction.js +1 -1
  351. package/views/2d/layers/support/MediaLayerInteractionOptions.d.ts +46 -0
  352. package/views/2d/layers/support/MediaLayerInteractionOptions.js +1 -1
  353. package/views/2d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +22 -0
  354. package/views/2d/layers/support/MediaLayerInteractionReshapeOptions.js +2 -0
  355. package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
  356. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  357. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  358. package/views/3d/analysis/Viewshed/ViewshedSnappingController.js +1 -1
  359. package/views/3d/analysis/Viewshed/ViewshedTool.js +1 -1
  360. package/views/3d/analysis/Viewshed/placementUtils.js +1 -1
  361. package/views/3d/layers/GaussianSplatLayerView3D.js +1 -1
  362. package/views/3d/layers/I3SMeshView3D.js +1 -1
  363. package/views/3d/layers/i3s/I3SIntersectionHandler.js +1 -1
  364. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  365. package/views/3d/layers/i3s/PointCloudRenderer.js +1 -1
  366. package/views/3d/layers/i3s/SweptSphereVolume.js +2 -0
  367. package/views/3d/layers/support/MediaLayerInteractionReshapeOptions.d.ts +0 -1
  368. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  369. package/views/3d/support/gaussianSplatting/GaussianSplatFadeHelper.js +1 -1
  370. package/views/3d/support/hitTest.js +1 -1
  371. package/views/3d/terrain/TerrainSurface.js +1 -1
  372. package/views/3d/webgl/RenderCamera.js +1 -1
  373. package/views/3d/webgl-engine/collections/Component/ComponentObjectCollection.js +1 -1
  374. package/views/3d/webgl-engine/collections/Component/ComponentObjectElevationAgnosticBVH.js +1 -1
  375. package/views/3d/webgl-engine/collections/Component/ComponentObjectFixedBVH.js +1 -1
  376. package/views/3d/webgl-engine/collections/Component/ElevationAgnosticBVH.js +1 -1
  377. package/views/3d/webgl-engine/collections/Component/IntersectionGeometry.js +1 -1
  378. package/views/3d/webgl-engine/effects/stars/DeepSky.glsl.js +2 -0
  379. package/views/3d/webgl-engine/effects/stars/DeepSkyTechnique.js +2 -0
  380. package/views/3d/webgl-engine/effects/stars/Stars.js +1 -1
  381. package/views/3d/webgl-engine/effects/stars/starsUtils.js +2 -0
  382. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  383. package/views/3d/webgl-engine/lib/GaussianSplatDepthRenderer.js +2 -0
  384. package/views/3d/webgl-engine/lib/GaussianSplatRenderer.js +1 -1
  385. package/views/3d/webgl-engine/lib/GaussianSplatShadows.js +1 -1
  386. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  387. package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
  388. package/views/3d/webgl-engine/lib/screenPolygonOverlapUtils.js +1 -1
  389. package/views/3d/webgl-engine/shaders/GaussianSplat.glsl.js +1 -1
  390. package/views/3d/webgl-engine/shaders/GaussianSplatDepth.glsl.js +2 -0
  391. package/views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js +2 -0
  392. package/views/3d/webgl-engine/shaders/GaussianSplatDepthTechnique.js +2 -0
  393. package/views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js +97 -0
  394. package/views/3d/webgl-engine/shaders/GaussianSplatShadow.glsl.js +1 -1
  395. package/views/3d/webgl-engine/shaders/GaussianSplatShadowTechnique.js +1 -1
  396. package/views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js +1 -1
  397. package/views/3d/webgl.js +1 -1
  398. package/widgets/BasemapLayerList.js +1 -1
  399. package/widgets/Bookmarks.js +1 -1
  400. package/widgets/Daylight.js +1 -1
  401. package/widgets/Editor/AddAssociationWorkflow.js +1 -1
  402. package/widgets/Editor/AddAssociationWorkflowData.js +1 -1
  403. package/widgets/Editor/legacy/AddAssociationWorkflow.js +1 -1
  404. package/widgets/Editor/legacy/AddAssociationWorkflowData.js +1 -1
  405. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/AssociationDetails.js +1 -1
  406. package/widgets/FeatureForm/FeatureFormUtilityNetworkAssociations/UtilityNetworkAssociationItemList.js +1 -1
  407. package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
  408. package/widgets/FeatureTable/Grid/EditorColumn.js +1 -1
  409. package/widgets/LayerList.js +1 -1
  410. package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
  411. package/widgets/OrientedImageryViewer/support/panConstraint.js +1 -1
  412. package/widgets/PanoramicVideoViewer.js +1 -1
  413. package/widgets/PanoramicViewer.js +1 -1
  414. package/widgets/Print.js +1 -1
  415. package/widgets/Search/support/locatorUtils.js +1 -1
  416. package/widgets/ShadowCast.js +1 -1
  417. package/widgets/Sketch.js +1 -1
  418. package/widgets/TableList.js +1 -1
  419. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeature.js +1 -1
  420. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceFeaturesDrillIn.js +1 -1
  421. package/widgets/UtilityNetworkTrace/UtilityNetworkTraceViewModel.js +1 -1
  422. package/widgets/support/SelectionToolbar.js +1 -1
  423. package/widgets/support/SketchTooltipControls.js +1 -1
  424. package/widgets/support/UtilityNetworkAssociations/FeatureUtilityNetworkAssociationsViewModel.js +1 -1
  425. package/widgets/support/UtilityNetworkAssociations/utils/createAssociation.js +1 -1
  426. package/widgets/support/UtilityNetworkAssociations/utils/isFromElement.js +1 -1
  427. package/assets/esri/core/workers/chunks/15de305ac3d6433748e7.js +0 -1
  428. package/assets/esri/core/workers/chunks/2426601b8cae7f06af4d.js +0 -256
  429. package/assets/esri/core/workers/chunks/242cad472fbc38b24dbc.js +0 -2
  430. package/assets/esri/core/workers/chunks/24c0b3586bb6500eda53.js +0 -2
  431. package/assets/esri/core/workers/chunks/394716bd1ecfd638d708.js +0 -2
  432. package/assets/esri/core/workers/chunks/55af58b6dff52dc040fe.js +0 -2
  433. package/assets/esri/core/workers/chunks/5b18696109fe84a1010a.js +0 -2
  434. package/assets/esri/core/workers/chunks/7f6eee102871769fdf8f.js +0 -1
  435. package/assets/esri/core/workers/chunks/93c0a620a147cbf4a0ba.js +0 -1
  436. package/assets/esri/core/workers/chunks/a27172dacdb85a774c4b.js +0 -1
  437. package/assets/esri/core/workers/chunks/ddafe402f1bc9e8285ef.js +0 -1
  438. package/views/3d/layers/i3s/SphereCone.js +0 -2
  439. /package/assets/esri/core/workers/chunks/{394716bd1ecfd638d708.js.LICENSE.txt → 7dd672c25beb8813cc75.js.LICENSE.txt} +0 -0
  440. /package/assets/esri/core/workers/chunks/{55af58b6dff52dc040fe.js.LICENSE.txt → be291d920ebc68fde02b.js.LICENSE.txt} +0 -0
  441. /package/assets/esri/core/workers/chunks/{24c0b3586bb6500eda53.js.LICENSE.txt → d198ecb1fe3690d6092f.js.LICENSE.txt} +0 -0
  442. /package/assets/esri/core/workers/chunks/{5b18696109fe84a1010a.js.LICENSE.txt → d2a51c797b2966cb95f3.js.LICENSE.txt} +0 -0
  443. /package/assets/esri/core/workers/chunks/{242cad472fbc38b24dbc.js.LICENSE.txt → f82cd34a79c8aa58d40c.js.LICENSE.txt} +0 -0
@@ -0,0 +1,66 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{invertOrIdentity as a}from"../core/libs/gl-matrix-2/math/mat4.js";import{create as e}from"../core/libs/gl-matrix-2/factories/mat4f64.js";import{fromValues as t}from"../core/libs/gl-matrix-2/factories/vec3f64.js";import{Gamma as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/Gamma.glsl.js";import{glsl as o}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as n}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Matrix4PassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/Matrix4PassUniform.js";import{Texture2DPassUniform as i}from"../views/3d/webgl-engine/core/shaderModules/Texture2DPassUniform.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";function l(){const e=new s;e.attributes.add("position","vec2"),e.varyings.add("worldRay","vec3");const{vertex:t,fragment:l}=e;return t.uniforms.add(new n("inverseProjectionMatrix",a=>a.camera.inverseProjectionMatrix),new n("inverseViewMatrix",e=>a(c,e.camera.viewMatrix))),t.main.add(o`vec3 posViewNear = (inverseProjectionMatrix * vec4(position, -1.0, 1.0)).xyz;
3
+ worldRay = (inverseViewMatrix * vec4(posViewNear, 0.0)).xyz;
4
+ gl_Position = vec4(position, 1.0, 1.0);`),l.uniforms.add(new d("inverseModelMatrix",a=>a.inverseModelMatrix),new i("bandTexture",a=>a.bandTexture)),l.constants.add("bandInner","float",u).constants.add("bandOuter","float",m).constants.add("bandEncodeScale","float",g).constants.add("bandBrightness","float",S).constants.add("bandAlpha","float",k).constants.add("residualOuter","float",f).constants.add("residualBrightness","float",B).constants.add("residualAlpha","float",C).constants.add("residualUnderBandStrength","float",P).constants.add("residualFloorColor","vec3",b).constants.add("residualBroadPlaneColor","vec3",v).constants.add("residualCorePlaneColor","vec3",p).constants.add("residualCenterBulgeColor","vec3",h).constants.add("residualSigmaBroad","float",x).constants.add("residualSigmaCore","float",M).constants.add("residualSigmaCenterLon","float",w).constants.add("residualSigmaCenterLat","float",y),l.include(r),l.code.add(o`vec2 wrapBandUv(vec2 uv) {
5
+ return vec2(fract(uv.x), clamp(uv.y, 0.0, 1.0));
6
+ }`),l.code.add(o`vec3 sampleBand(vec2 uv) {
7
+ vec3 encoded = texture(bandTexture, wrapBandUv(uv)).rgb;
8
+ return (encoded * encoded) / bandEncodeScale;
9
+ }`),l.code.add(o`vec3 equatorialToGalactic(vec3 dir) {
10
+ return vec3(
11
+ dot(dir, vec3(-0.0548755604, -0.8734370902, -0.4838350155)),
12
+ dot(dir, vec3( 0.4941094279, -0.4448296300, 0.7469822445)),
13
+ dot(dir, vec3(-0.8676661490, -0.1980763734, 0.4559837762))
14
+ );
15
+ }
16
+ float gaussian1D(float x, float sigma) {
17
+ float t = x / sigma;
18
+ return exp(-0.5 * t * t);
19
+ }
20
+ float wrapAngle(float angle) {
21
+ return atan(sin(angle), cos(angle));
22
+ }`),l.code.add(o`vec3 sampleResidual(float galacticLon, float galacticLat) {
23
+ float absB = abs(galacticLat);
24
+ float broadPlane = exp(-absB / residualSigmaBroad);
25
+ float corePlane = gaussian1D(galacticLat, residualSigmaCore);
26
+ float centerBulge = gaussian1D(wrapAngle(galacticLon), residualSigmaCenterLon) * gaussian1D(galacticLat, residualSigmaCenterLat);
27
+ return residualFloorColor +
28
+ residualBroadPlaneColor * broadPlane +
29
+ residualCorePlaneColor * corePlane +
30
+ residualCenterBulgeColor * centerBulge;
31
+ }`),l.main.add(o`
32
+ // Rotate the view ray into the current celestial frame, then flip into the equatorial
33
+ // convention used by the stars data and the deep-sky preprocessing pipeline.
34
+ vec3 worldDir = normalize(worldRay);
35
+ vec3 celestialDir = normalize((inverseModelMatrix * vec4(worldDir, 0.0)).xyz);
36
+ vec3 equatorialDir = vec3(-celestialDir.xy, celestialDir.z);
37
+ vec3 galacticDir = normalize(equatorialToGalactic(equatorialDir));
38
+
39
+ float b = asin(clamp(galacticDir.z, -1.0, 1.0));
40
+ float absB = abs(b);
41
+ float l = atan(galacticDir.y, galacticDir.x);
42
+
43
+ // Both masks come from absolute galactic latitude. The band is only supported near the plane,
44
+ // while the residual extends farther and fades to zero in the outer sky.
45
+ float bandMask = (1.0 - smoothstep(bandInner, bandOuter, absB));
46
+ float residualMask = (1.0 - smoothstep(bandOuter, residualOuter, absB));
47
+
48
+ if (bandMask == 0.0 && residualMask == 0.0) {
49
+ discard;
50
+ }
51
+
52
+ // The band texture is parameterized by galactic longitude and by latitude remapped from the
53
+ // cropped [-bandOuter, +bandOuter] interval into [0, 1].
54
+ vec2 bandUv = vec2(fract(l / ${o.float(2*Math.PI)} + 0.5), clamp((b + bandOuter) / (2.0 * bandOuter), 0.0, 1.0));
55
+ vec3 bandColor = bandMask * sampleBand(bandUv);
56
+
57
+ // Under the textured band, keep only a reduced share of the residual so the low-frequency fit
58
+ // supports the texture instead of washing it out.
59
+ vec3 residualColor = residualMask * sampleResidual(l, b) * mix(1.0, residualUnderBandStrength, bandMask);
60
+
61
+ // Combine both linear-space contributions, then output through the usual display gamma path.
62
+ vec3 deepSkyColor = bandColor * bandBrightness + residualColor * residualBrightness;
63
+ float deepSkyAlpha = max(bandMask * bandAlpha, residualMask * residualAlpha);
64
+
65
+ fragColor = vec4(delinearizeGamma(deepSkyColor), deepSkyAlpha);
66
+ `),e}const c=e(),u=8*Math.PI/180,m=18*Math.PI/180,g=48,f=30*Math.PI/180,b=t(.00037912933280105036,966403148172618e-19,0),v=t(.0006391131181262561,.001663171662153682,.0019988993871838086),p=t(.0022710911301533463,.0014036775769294533,.0008699157429814243),h=t(.012048146292768035,.008078340563000157,.005795412645214463),x=34.3609898352314*Math.PI/180,M=7.496212095292093*Math.PI/180,w=51.566192676725976*Math.PI/180,y=9.564164702743726*Math.PI/180,B=15,C=.03,P=.35,S=48,k=.2,D=Object.freeze(Object.defineProperty({__proto__:null,build:l},Symbol.toStringTag,{value:"Module"}));export{D,l as b};
@@ -1,14 +1,15 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{RejectBySlicePass as n}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{EvaluateSceneLighting as i,addAmbientBoostFactor as t,addLightingGlobalFactor as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as r}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{positionOutsideClipSpace as s}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{ReadShadowMapPassFragment as l}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{GaussianSplatCovariance as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as d}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as g}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as p}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as u}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{RgbNormalizedDepthEncoding as m}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float2BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float2PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float2PassUniform.js";import{Float3BindUniform as h}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{Float3PassUniform as w}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as x}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as b,If as y}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as P}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as C}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{getGaussianSplatAlphaCutoffValue as S}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as M}from"../views/webgl/ShaderBuilder.js";function j(a){const{clippingEnabled:j,hasSlicePlane:z,receiveShadows:F,spherical:G}=a,D=new M;D.varyings.add("vColor","vec4"),D.varyings.add("conicOpacity","vec4"),D.varyings.add("gaussianLogAlphaCutoff","float"),D.varyings.add("offsetFromCenter","vec2"),R(a)&&D.varyings.add("fragmentPositionCameraRelative","vec3"),D.vertex.uniforms.add(new C("splatOrderTexture",e=>e.splatOrder),new C("splatFadingTexture",e=>e.splatFading),new C("splatAtlasTexture",e=>e.splatAtlas),new C("splatHeaderTexture",e=>e.splatHeader),new x("focalLength",e=>e.focalLength),new x("minSplatRadius",e=>e.minSplatRadius),new v("tanFov",e=>e.tanFov),new f("inverseScreenSize",({camera:a})=>e(L,1/a.fullWidth,1/a.fullHeight)),new P("proj",e=>e.camera.projectionMatrix),new P("view",e=>e.camera.viewMatrix),new f("nearFar",e=>e.camera.nearFar),new h("cameraPosition",e=>e.camera.eye)),j&&(D.vertex.uniforms.add(new w("clipMin",e=>e.clipMinCameraRelative),new w("clipMax",e=>e.clipMaxCameraRelative)),D.fragment.uniforms.add(new w("clipMin",e=>e.clipMinCameraRelative),new w("clipMax",e=>e.clipMaxCameraRelative))),D.vertex.include(p),D.vertex.include(g),D.vertex.include(u),D.vertex.include(c),D.vertex.include(d),D.vertex.include(n,a),F?(D.fragment.uniforms.add(new h("cameraPosition",e=>e.camera.eye)),D.fragment.include(i,a)):D.vertex.include(i,a),D.include(r,a),t(F?D.fragment:D.vertex),o(F?D.fragment:D.vertex),F&&D.include(l,a),D.outputs.add("fragColor","vec4",0),D.outputs.add("fragDepthColor","vec4",1);const A=S(a.alphaCutoff),T=Math.log(A),B=b`float groundLightAlignment = dot(groundNormal, mainLightDirection);
2
+ import{EvaluateSceneLighting as e,addAmbientBoostFactor as a,addLightingGlobalFactor as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js";import{NormalUtils as i}from"../views/3d/webgl-engine/core/shaderLibrary/shading/NormalUtils.glsl.js";import{ReadShadowMapPassFragment as o}from"../views/3d/webgl-engine/core/shaderLibrary/shading/ReadShadowMap.glsl.js";import{RgbNormalizedDepthEncoding as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/RgbNormalizedDepthEncoding.glsl.js";import{Float3BindUniform as t}from"../views/3d/webgl-engine/core/shaderModules/Float3BindUniform.js";import{glsl as s,If as l}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as d}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPerspectivePass as g,GaussianSplatFading as h,gaussianSplatPerspectiveVertex as c}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{getGaussianSplatAlphaCutoffValue as m}from"../views/3d/webgl-engine/shaders/GaussianSplatTechniqueConfiguration.js";import{ShaderBuilder as p}from"../views/webgl/ShaderBuilder.js";function u(u){const{receiveShadows:f,spherical:v}=u,b=new p;b.varyings.add("vColor","vec4"),b.include(g,u),u.fadingEnabled&&b.vertex.include(h),b.vertex.uniforms.add(new t("cameraPosition",e=>e.camera.eye)),f?(b.fragment.uniforms.add(new t("cameraPosition",e=>e.camera.eye)),b.fragment.include(e,u)):b.vertex.include(e,u),b.include(i,u),a(f?b.fragment:b.vertex),n(f?b.fragment:b.vertex),f&&b.include(o,u),b.outputs.add("fragColor","vec4",0),b.outputs.add("fragDepthColor","vec4",1);const w=m(u.alphaCutoff),C=s`float groundLightAlignment = dot(groundNormal, mainLightDirection);
3
3
  float additionalAmbientScale = additionalDirectedAmbientLight(groundLightAlignment);
4
- vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,$=b`
5
- vec3 groundNormal = ${G?b`normalize(cameraRelativePosition + cameraPosition)`:b`vec3(0.0, 0.0, 1.0)`};
6
- ${B}
7
- float shadow = ${G?b`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:b`0.0`};
4
+ vec3 additionalLight = mainLightIntensity * additionalAmbientScale * ambientBoostFactor * lightingGlobalFactor;`,y=s`
5
+ vec3 groundNormal = ${v?s`normalize(cameraRelativePosition + cameraPosition)`:s`vec3(0.0, 0.0, 1.0)`};
6
+ ${C}
7
+ float shadow = ${v?s`lightingGlobalFactor * (1.0 - additionalAmbientScale)`:s`0.0`};
8
8
  vColor.rgb = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
9
- `,E=b`
10
- vec3 groundNormal = ${G?b`normalize(fragmentPositionCameraRelative + cameraPosition)`:b`vec3(0.0, 0.0, 1.0)`};
11
- ${B}
9
+ `,S=s`
10
+ vec3 groundNormal = ${v?s`normalize(fragmentPositionCameraRelative + cameraPosition)`:s`vec3(0.0, 0.0, 1.0)`};
11
+ ${C}
12
12
  float shadow = readShadow(additionalAmbientScale, fragmentPositionCameraRelative);
13
13
  shadedColor = evaluateSceneLighting(groundNormal, vColor.rgb, shadow, 0.0, additionalLight);
14
- `;return D.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n uint pageNum = fetchGaussianPageIndex(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n\n // Apply per-page fading before the early alpha rejection.\n ${y(a.fadingEnabled,"\n uint fadingTextureWidth = uint(textureSize(splatFadingTexture, 0).x);\n uint fadeX = pageNum % fadingTextureWidth;\n uint fadeY = pageNum / fadingTextureWidth;\n uint opacityModifierByte = texelFetch(splatFadingTexture, ivec2(fadeX , fadeY), 0).r;\n float opacityModifier = float(opacityModifierByte) / 255.0;\n vColor.a *= opacityModifier;\n ")}\n\n // Set default position outside clip space for early returns.\n gl_Position = ${s};\n\n if (vColor.a < ${A}) {\n return;\n }\n\n // Delay the page header fetch until the splat survives the opacity reject.\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${y(j,"\n if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||\n cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {\n return;\n }\n ")}\n\n ${y(z,"if (rejectBySlice(cameraRelativePosition)) {\n return;\n }")}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec3 covariance2D = computeGaussianCovariance2D(viewPos.xyz, focalLength, tanFov, covariance3D, view);\n\n // Reject degenerate covariances before inverting them into conic coefficients.\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n // Fold the per-splat opacity into the log cutoff so the vertex-side ellipse\n // bound matches the fragment alpha discard after fading.\n gaussianLogAlphaCutoff = ${T} - log(vColor.a);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Ignore Gaussians with very small contribution, with tolerance based on the quality profile.\n if (rejectGaussianByMinimumRadius(maxRadius, vColor.a, minSplatRadius)) {\n return;\n }\n\n vec4 projPos = proj * viewPos;\n float invW = 1. / (projPos.w + 1e-7);\n vec3 ndcPos = projPos.xyz * invW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n // Cull splats whose screen-space ellipse cannot touch the viewport.\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n\n ${y(R(a),"float viewSpacePixelScale = -viewPos.z / focalLength;\n vec3 fragmentViewOffset = vec3(offsetFromCenter * viewSpacePixelScale, 0.0);\n fragmentPositionCameraRelative = cameraRelativePosition + transpose(mat3(view)) * fragmentViewOffset;")}\n\n // Store conic coefficients with opacity for fragment-side falloff.\n vec3 conic = computeGaussianConic(covariance2D, determinant);\n conicOpacity = vec4(conic, vColor.a);\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${y(F,"forwardLinearDepth(-viewPos.z);",$)}\n\n // Place this quad corner in clip space around the projected splat center.\n vec2 quadClipPosition = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n\n gl_Position = vec4(quadClipPosition, ndcPos.z, 1.0);\n\n `),D.fragment.include(m),D.fragment.include(d),D.fragment.include(n,a),D.fragment.main.add(`\n ${y(j,"if (fragmentPositionCameraRelative.x < clipMin.x || fragmentPositionCameraRelative.y < clipMin.y || fragmentPositionCameraRelative.z < clipMin.z ||\n fragmentPositionCameraRelative.x > clipMax.x || fragmentPositionCameraRelative.y > clipMax.y || fragmentPositionCameraRelative.z > clipMax.z) {\n discard;\n }")}\n ${y(z,"if (rejectBySlice(fragmentPositionCameraRelative)) { discard; }")}\n\n float gaussianExponent = evaluateGaussianExponent(conicOpacity.xyz, offsetFromCenter);\n\n // A positive exponent indicates alpha > 1, which should not happen.\n // We also early check the opacity-aware alpha cutoff to avoid unnecessary exp().\n if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {\n discard;\n }\n\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, conicOpacity.w * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${y(F,E)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using 0.25 as the opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(0.25, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),D}function R({clippingEnabled:e,hasSlicePlane:a,receiveShadows:n}){return n||a||e}const L=a(),z=Object.freeze(Object.defineProperty({__proto__:null,build:j},Symbol.toStringTag,{value:"Module"}));export{z as G,j as b};
14
+ `;return b.vertex.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n\n // Unpack color first so very transparent splats can discard before fetching the page header.\n vColor = unpackColor(packedGaussian);\n float opacity = vColor.a;\n\n // Apply per-page fading before the early alpha rejection.\n ${l(u.fadingEnabled,s`opacity = applyGaussianSplatFading(opacity, gaussianIndex);
15
+ vColor.a = opacity;`)}\n\n ${c(u,w)}\n\n // Handle environment lighting per vertex when no shadow map is active.\n // When shadows are received, defer lighting to the fragment shader for crisp shadow borders.\n ${l(f,"forwardLinearDepth(-viewPos.z);",y)}\n `),b.fragment.include(r),b.fragment.main.add(`\n float gaussianFalloff = exp(gaussianExponent);\n\n // Cap at 0.99 to avoid blending issues, such as seams between overlapping Gaussians.\n float alpha = min(.99f, vColor.a * gaussianFalloff);\n\n vec3 shadedColor = vColor.rgb;\n ${l(f,S)}\n fragColor = vec4(shadedColor * alpha, alpha);\n\n // We simulate first hit based depth using the shared opacity threshold.\n // This works because we render in front-to-back order,\n // i.e. the first hit that counts completely saturates the alpha channel\n // and further splats do not contribute.\n float depthHit = step(${s.float(d)}, alpha);\n float normalizedDepth = gl_FragCoord.z;\n fragDepthColor = vec4(encodeNormalizedDepthToRGB(normalizedDepth) * depthHit, depthHit);\n `),b}const f=Object.freeze(Object.defineProperty({__proto__:null,build:u},Symbol.toStringTag,{value:"Module"}));export{f as G,u as b};
@@ -0,0 +1,11 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{If as e,glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatFirstHitAlpha as s}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPerspectivePass as n,GaussianSplatFading as i,gaussianSplatPerspectiveVertex as t}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{ShaderBuilder as d}from"../views/webgl/ShaderBuilder.js";function l(l){const{fadingEnabled:r}=l,o=new d,{vertex:u}=o;return o.include(n,l),l.fadingEnabled&&o.vertex.include(i),u.main.add(a`
3
+ uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));
4
+ uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);
5
+
6
+ float opacity = unpackOpacity(packedGaussian);
7
+
8
+ ${e(r,a`opacity = applyGaussianSplatFading(opacity, gaussianIndex);`)}
9
+
10
+ ${t(l,s)}
11
+ `),o}const r=Object.freeze(Object.defineProperty({__proto__:null,build:l},Symbol.toStringTag,{value:"Module"}));export{r as G,l as b};
@@ -1,7 +1,7 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{set as e}from"../core/libs/gl-matrix-2/math/vec2.js";import{create as a}from"../core/libs/gl-matrix-2/factories/vec2f64.js";import{RejectBySlicePass as i}from"../views/3d/webgl-engine/core/shaderLibrary/Slice.glsl.js";import{positionOutsideClipSpace as n}from"../views/3d/webgl-engine/core/shaderLibrary/shading/PositionOutsideClipSpace.js";import{GaussianSplatCovariance as r}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatCovariance.glsl.js";import{GaussianSplatEvaluation as o}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatEvaluation.glsl.js";import{GaussianSplatTextureFetch as c}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatTextureFetch.glsl.js";import{GaussianSplatUnpacking as s}from"../views/3d/webgl-engine/core/shaderLibrary/util/GaussianSplatUnpacking.glsl.js";import{QuaternionToRotationMatrix as t}from"../views/3d/webgl-engine/core/shaderLibrary/util/QuaternionToRotationMatrix.glsl.js";import{Float2BindUniform as l}from"../views/3d/webgl-engine/core/shaderModules/Float2BindUniform.js";import{Float3PassUniform as v}from"../views/3d/webgl-engine/core/shaderModules/Float3PassUniform.js";import{FloatPassUniform as d}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as p,If as u}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{Matrix4BindUniform as f}from"../views/3d/webgl-engine/core/shaderModules/Matrix4BindUniform.js";import{Texture2DUintPassUniform as m}from"../views/3d/webgl-engine/core/shaderModules/Texture2DUintPassUniform.js";import{ShaderBuilder as x}from"../views/webgl/ShaderBuilder.js";function g(a){const{clippingEnabled:g,hasSlicePlane:h}=a,S=new x,{fragment:P,varyings:j,vertex:y}=S;j.add("conic","vec3"),j.add("gaussianLogAlphaCutoff","float"),j.add("offsetFromCenter","vec2"),y.uniforms.add(new m("splatOrderTexture",e=>e.splatOrder),new m("splatAtlasTexture",e=>e.splatAtlas),new m("splatHeaderTexture",e=>e.splatHeader),new d("minSplatRadius",e=>e.minSplatRadius),new l("inverseScreenSize",({camera:a})=>e(w,1/a.fullWidth,1/a.fullHeight)),new f("proj",e=>e.camera.projectionMatrix),new f("view",e=>e.camera.viewMatrix),new l("nearFar",e=>e.camera.nearFar)),g&&y.uniforms.add(new v("clipMin",e=>e.clipMinCameraRelative),new v("clipMax",e=>e.clipMaxCameraRelative)),y.include(s),y.include(c),y.include(t),y.include(r),y.include(o),y.include(i,a),y.code.add(p`float safeClipW(float clipW) {
2
+ import{FloatPassUniform as e}from"../views/3d/webgl-engine/core/shaderModules/FloatPassUniform.js";import{glsl as a}from"../views/3d/webgl-engine/core/shaderModules/glsl.js";import{gaussianSplatDepthPolicy as i}from"../views/3d/webgl-engine/shaders/GaussianSplatDepthPolicy.js";import{GaussianSplatPass as n,gaussianSplatUnpackCovariance3D as r,gaussianSplatComputeQuad as o,gaussianSplatCullAndTransformVertex as c,gaussianSplatComputeEllipse as t}from"../views/3d/webgl-engine/shaders/GaussianSplatPass.glsl.js";import{GaussianSplatRenderParameters as l}from"../views/3d/webgl-engine/shaders/GaussianSplatPassParameters.js";import{ShaderBuilder as s}from"../views/webgl/ShaderBuilder.js";class p extends l{constructor(){super(...arguments),this.alphaCutoff=i.direct.alphaCutoff,this.depthBias=i.direct.depthBias}}function v(i){const l=new s,{vertex:p}=l;return l.include(n,i),p.uniforms.add(new e("alphaCutoff",e=>e.alphaCutoff),new e("depthBias",e=>e.depthBias)),p.code.add(a`float safeClipW(float clipW) {
3
3
  return abs(clipW) < 1e-7 ? (clipW < 0.0 ? -1e-7 : 1e-7) : clipW;
4
- }`),y.code.add(p`vec3 computeProjectivePixelGradient(
4
+ }`),p.code.add(a`vec3 computeProjectivePixelGradient(
5
5
  vec3 clipGradient,
6
6
  vec3 clipWGradient,
7
7
  float clipValue,
@@ -10,13 +10,13 @@ float invWSquared,
10
10
  float halfScreenSize
11
11
  ) {
12
12
  return (clipGradient * safeW - clipValue * clipWGradient) * invWSquared * halfScreenSize;
13
- }`),y.code.add(p`vec3 multiplyCovariance3D(float[6] covariance3D, vec3 value) {
13
+ }`),p.code.add(a`vec3 multiplyCovariance3D(float[6] covariance3D, vec3 value) {
14
14
  return vec3(
15
15
  covariance3D[0] * value.x + covariance3D[1] * value.y + covariance3D[2] * value.z,
16
16
  covariance3D[1] * value.x + covariance3D[3] * value.y + covariance3D[4] * value.z,
17
17
  covariance3D[2] * value.x + covariance3D[4] * value.y + covariance3D[5] * value.z
18
18
  );
19
- }`),y.code.add(p`vec3 computeProjectiveCovariance2D(vec3 pixelXGradient, vec3 pixelYGradient, float[6] covariance3D, mat4 view) {
19
+ }`),p.code.add(a`vec3 computeProjectiveCovariance2D(vec3 pixelXGradient, vec3 pixelYGradient, float[6] covariance3D, mat4 view) {
20
20
  mat3 worldToView = transpose(mat3(view));
21
21
  vec3 axisX = worldToView * pixelXGradient;
22
22
  vec3 axisY = worldToView * pixelYGradient;
@@ -27,15 +27,6 @@ float covarianceXX = dot(axisX, covarianceAxisX) + regularization;
27
27
  float covarianceXY = dot(axisX, covarianceAxisY);
28
28
  float covarianceYY = dot(axisY, covarianceAxisY) + regularization;
29
29
  return vec3(covarianceXX, covarianceXY, covarianceYY);
30
- }`),y.code.add(p`float biasDepth(float linearDepth) {
31
- const float bias = 80.0 * .000015259;
32
- return min(linearDepth + bias, 1.0);
33
- }`);const G=.25,D=Math.log(G);return y.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n\n float opacity = unpackOpacity(packedGaussian);\n\n gl_Position = ${n};\n\n if (opacity < ${G}) {\n return;\n }\n\n vec3 cameraRelativePosition = fetchGaussianCameraRelativePosition(gaussianIndex, packedGaussian);\n\n ${u(g,p`if (cameraRelativePosition.x < clipMin.x || cameraRelativePosition.y < clipMin.y || cameraRelativePosition.z < clipMin.z ||
34
- cameraRelativePosition.x > clipMax.x || cameraRelativePosition.y > clipMax.y || cameraRelativePosition.z > clipMax.z) {
35
- return;
36
- }`)}\n\n ${u(h,p`if (rejectBySlice(cameraRelativePosition)) {
37
- return;
38
- }`)}\n\n vec4 viewPos = vec4(mat3(view) * cameraRelativePosition, 1.0);\n\n if (viewPos.z > -nearFar.x || viewPos.z < -nearFar.y) {\n return;\n }\n\n vec3 covarianceA;\n vec3 covarianceB;\n computePackedGaussianCovariance3D(packedGaussian, covarianceA, covarianceB);\n\n float covariance3D[6] = float[6](covarianceA.x, covarianceA.y, covarianceA.z, covarianceB.x, covarianceB.y, covarianceB.z);\n\n vec4 projPos = proj * viewPos;\n float safeW = safeClipW(projPos.w);\n float invWSquared = 1.0 / (safeW * safeW);\n vec2 halfScreenSize = 0.5 / inverseScreenSize;\n float maxShadowSplatRadius = max(halfScreenSize.x, halfScreenSize.y);\n\n // Projection matrix columns are the clip-space derivatives with respect to view-space xyz.\n vec3 clipWGradient = vec3(proj[0][3], proj[1][3], proj[2][3]);\n vec3 pixelXGradient = computeProjectivePixelGradient(\n vec3(proj[0][0], proj[1][0], proj[2][0]),\n clipWGradient,\n projPos.x,\n safeW,\n invWSquared,\n halfScreenSize.x\n );\n vec3 pixelYGradient = computeProjectivePixelGradient(\n vec3(proj[0][1], proj[1][1], proj[2][1]),\n clipWGradient,\n projPos.y,\n safeW,\n invWSquared,\n halfScreenSize.y\n );\n vec3 covariance2D = computeProjectiveCovariance2D(pixelXGradient, pixelYGradient, covariance3D, view);\n\n float determinant = computeGaussianCovarianceDeterminant(covariance2D);\n if (determinant <= 0.0) {\n return;\n }\n\n vec2 eigenvalues = computeGaussianCovarianceEigenvalues(covariance2D);\n\n gaussianLogAlphaCutoff = ${D} - log(opacity);\n float gaussianEllipseThreshold = computeGaussianEllipseThreshold(gaussianLogAlphaCutoff);\n vec2 axisLengths = computeGaussianAxisLengths(eigenvalues, gaussianEllipseThreshold);\n float maxRadius = max(axisLengths.x, axisLengths.y);\n\n // Avoid invalid/extremely large footprints.\n if (maxRadius < 0.0 || maxRadius > maxShadowSplatRadius) {\n return;\n }\n\n if (rejectGaussianByMinimumRadius(maxRadius, opacity, minSplatRadius)) {\n return;\n }\n\n vec3 ndcPos = projPos.xyz / safeW;\n vec2 clipSpacePixelScale = 2.0 * inverseScreenSize;\n\n if (rejectGaussianByScreenBounds(ndcPos.xy, maxRadius, clipSpacePixelScale)) {\n return;\n }\n\n offsetFromCenter = computeGaussianQuadOffset(covariance2D, eigenvalues, axisLengths, gl_VertexID);\n conic = computeGaussianConic(covariance2D, determinant);\n float linearDepth = (-viewPos.z - nearFar.x) / (nearFar.y - nearFar.x);\n float biasedDepth = biasDepth(linearDepth);\n\n vec2 clipPos = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n gl_Position = vec4(clipPos, biasedDepth * 2.0 - 1.0, 1.0);\n `),P.include(o),P.main.add(p`float gaussianExponent = evaluateGaussianExponent(conic, offsetFromCenter);
39
- if (gaussianExponent > 0.0 || gaussianExponent < gaussianLogAlphaCutoff) {
40
- discard;
41
- }`),S}const w=a(),h=Object.freeze(Object.defineProperty({__proto__:null,build:g},Symbol.toStringTag,{value:"Module"}));export{h as G,g as b};
30
+ }`),p.code.add(a`float biasDepth(float linearDepth) {
31
+ return min(linearDepth + depthBias, 1.0);
32
+ }`),p.main.add(`\n uint gaussianIndex = fetchOrderedGaussianIndex(uint(gl_InstanceID));\n uvec4 packedGaussian = fetchPackedGaussian(gaussianIndex);\n\n float opacity = unpackOpacity(packedGaussian);\n\n ${c(i,"alphaCutoff")}\n\n ${r}\n\n vec4 projPos = proj * viewPos;\n float safeW = safeClipW(projPos.w);\n float invWSquared = 1.0 / (safeW * safeW);\n vec2 halfScreenSize = 0.5 / inverseScreenSize;\n float maxShadowSplatRadius = max(halfScreenSize.x, halfScreenSize.y);\n\n // Projection matrix columns are the clip-space derivatives with respect to view-space xyz.\n vec3 clipWGradient = vec3(proj[0][3], proj[1][3], proj[2][3]);\n vec3 pixelXGradient = computeProjectivePixelGradient(\n vec3(proj[0][0], proj[1][0], proj[2][0]),\n clipWGradient,\n projPos.x,\n safeW,\n invWSquared,\n halfScreenSize.x\n );\n vec3 pixelYGradient = computeProjectivePixelGradient(\n vec3(proj[0][1], proj[1][1], proj[2][1]),\n clipWGradient,\n projPos.y,\n safeW,\n invWSquared,\n halfScreenSize.y\n );\n vec3 covariance2D = computeProjectiveCovariance2D(pixelXGradient, pixelYGradient, covariance3D, view);\n\n ${t("log(alphaCutoff) - log(opacity)")}\n\n // Avoid invalid/extremely large footprints.\n if (maxRadius < 0.0 || maxRadius > maxShadowSplatRadius) {\n return;\n }\n\n vec3 ndcPos = projPos.xyz / safeW;\n ${o}\n float linearDepth = (-viewPos.z - nearFar.x) / (nearFar.y - nearFar.x);\n float biasedDepth = biasDepth(linearDepth);\n\n vec2 clipPos = ndcPos.xy + offsetFromCenter * clipSpacePixelScale - inverseScreenSize;\n gl_Position = vec4(clipPos, biasedDepth * 2.0 - 1.0, 1.0);\n `),l}const d=Object.freeze(Object.defineProperty({__proto__:null,GaussianSplatShadowPassParameters:p,build:v},Symbol.toStringTag,{value:"Module"}));export{p as G,d as a,v as b};
package/config.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.67";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
2
+ import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="5.2.0-next.69";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
package/interfaces.d.ts CHANGED
@@ -6390,20 +6390,6 @@ declare namespace __esri {
6390
6390
  export type PopupFeature = import("./popup/Feature.js").default;
6391
6391
  export const PopupFeature: typeof import("./popup/Feature.js").default;
6392
6392
 
6393
- /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
6394
- export type PopupFeatureContentProperties = import("./popup/FeatureContent.js").FeatureContentProperties;
6395
-
6396
- /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
6397
- export type PopupFeatureContent = import("./popup/FeatureContent.js").default;
6398
- export const PopupFeatureContent: typeof import("./popup/FeatureContent.js").default;
6399
-
6400
- /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
6401
- export type PopupFeatureContentCollectionProperties = import("./popup/FeatureContentCollection.js").FeatureContentCollectionProperties;
6402
-
6403
- /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
6404
- export type PopupFeatureContentCollection = import("./popup/FeatureContentCollection.js").default;
6405
- export const PopupFeatureContentCollection: typeof import("./popup/FeatureContentCollection.js").default;
6406
-
6407
6393
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
6408
6394
  export type PopupFeaturesProperties = import("./popup/Features.js").FeaturesProperties;
6409
6395
 
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.67",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.2";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.2.0-next.69",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import r from"../../../core/PooledArray.js";import{EsriPromiseMixin as a}from"../../../core/Promise.js";import{isAbortError as d}from"../../../core/promiseUtils.js";import{watch as n,sync as o,initial as l}from"../../../core/reactiveUtils.js";import{property as h,subclass as u}from"../../../core/accessorSupport/decorators.js";import{runUntracked as _}from"../../../core/accessorSupport/tracking.js";import{exactEquals as c}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{UpdatingHandles as p}from"../../../core/support/UpdatingHandles.js";import{projectBoundingRect as g}from"../../../geometry/projection/projectBoundingRect.js";import{create as m}from"../../../geometry/support/aaBoundingRect.js";import{viewingModeFromString as y}from"../../../views/ViewingMode.js";import{I3SClientNodeLoader as f}from"../../../views/3d/layers/i3s/I3SClientNodeLoader.js";import{I3SDataRequester as x}from"../../../views/3d/layers/i3s/I3SDataRequester.js";import{addCallback as N}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as b}from"../../../views/3d/layers/i3s/I3SIndex.js";import v from"../../../views/3d/layers/i3s/I3SLodHandling.js";import w from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{getVertexCrs as L,getIndexCrs as D,findIntersectingNodes as C}from"../../../views/3d/layers/i3s/I3SUtil.js";import V from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{toBoundingRect as A}from"../../../views/3d/support/extentUtils.js";import{minQuality as I}from"../../../views/3d/support/MemoryController.js";import{PromiseQueue as M}from"../../../views/support/PromiseQueue.js";import{noBudget as F}from"../../../views/support/Scheduler.js";const O=100,q=2,P=1e4,R=1e-4,S=1.2,G=500,U=1.5;let H=class extends(a(t)){get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store?.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(null==this.layer.priority||"High"===this.layer.priority)}get indexRequester(){return new x(this.layer.customParameters,this.layer.apiKey)}get dataRequester(){return new x(this.layer.customParameters,this.layer.apiKey)}get crsVertex(){return L(this.layer)}get crsIndex(){return D(this.layer)}get layer(){return this.layerView.layer}get updating(){return this.running||this._updatingHandles.updating}get rootNodeVisible(){return _(()=>{if(this._index){const e=this._index.rootNode;if(e)return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0})}get index(){return this._index}get requiredAttributes(){return this._requiredAttributes}constructor(e){super(e),this.featureTarget=5e4,this.fixedFeatureTarget=!1,this._updatingHandles=new p,this.running=!0,this.updatingProgress=1,this.leavesReached=!1,this.worker=null,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._newLoadingNodes=new r({deallocator:null}),this._modificationsNodeFilteringArray=new r,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._idleQueue=new M,this._elevationUpdateNodes=new r({deallocator:null}),this._errorCount=0}initialize(){const{layerView:e,layer:t}=this;this._disableMemCache=!e.loadCachedGPUData||!e.addCachedGPUData,this._lodHandling=new v(e),this._defaultGeometrySchema=t.store.defaultGeometrySchema,this.disableIDBCache=!!has("disable-feature:idb-cache"),"fields"in t&&(this._fields=t.fields,this._attributeStorageInfo=t.attributeStorageInfo),this.addResolvingPromise(Promise.all([t.indexInfo,t.when(),e.when()]).then(([s])=>{if(this.destroyed||!e||e.destroyed||!s)return;const{view:r,clientGeometry:a}=e;if(this._setClippingArea(r.clippingArea),this.addHandles([this._updatingHandles.add(()=>r?.pointsOfInterest?.focus?.renderLocation,e=>this._pointOfInterestChanged(e),{initial:!0,equals:c}),n(()=>r.quality,()=>this._setCameraDirty(),o),this._updatingHandles.add(()=>2===r.state.mode,t=>{this._updateIdleState(t),t&&(this._index?.resetFailedNodes(),e.contentVisible||this._updateViewData())},l),this._updatingHandles.add(()=>e.contentVisible,e=>{e&&this._index?.invalidateAllElevationRanges(),this.restartNodeLoading()},l),N(e.view.resourceController.scheduler,this),this._updatingHandles.add(()=>[this.featureTarget,this.fixedFeatureTarget],()=>{this._setCameraDirty(),this._stableFeatureLOD=!1}),this._updatingHandles.add(()=>r.state?.contentCamera,()=>this._setCameraDirty()),this._updatingHandles.add(()=>t.elevationInfo,e=>this._elevationInfoChanged(e),o),this._updatingHandles.add(()=>e.lodFactor,()=>this._setCameraDirty()),this._updatingHandles.add(()=>e.availableFields,()=>this._requiredFieldsChange()),this._updatingHandles.add(()=>e.holeFilling,e=>null!=this._index&&(this._index.holeFilling=e))]),this._viewportQueries=new V(this.crsIndex,r.renderCoordsHelper,r.state.contentCamera,!r.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,this.isMeshPyramid?r.groundView:r.elevationProvider,y(r.viewingMode),this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this._lod,angleDependentLoD:this._lod<.5}),this._clientNodeLoader=new f(this.layer.uid,{indexSR:this.crsIndex,vertexSR:this.crsVertex,renderSR:r.renderCoordsHelper.spatialReference},r.resourceController.memoryController,this.worker),this._index=new b(y(r.viewingMode),t,s,this.indexRequester,this._clientNodeLoader,this._viewportQueries,i.getLogger(this),e.holeFilling,t=>e.isNodeLoaded(t),t=>e.isNodeReloading(t),e=>this._shouldLoadNode(e),e=>this._enableFromGPUCache(e,1),e=>this._needsUpdate(e),t=>e.computeVisibilityObb?.(t)??null,e?.computeNodeFiltering?t=>e.computeNodeFiltering(t):void 0),this._index.updateElevationInfo(this.layer.elevationInfo,this.isMeshPyramid||this.isGraphics3D),this._index.imModificationsChanged(!!e.hasModifications),this._index.layerFilterChanged(!!e.hasGeometryFilter),null!=a){for(const e of a)this._addMesh(e.mesh,e.oid);this.addHandles(a.on("change",e=>{for(const t of e.removed)this._removeMesh(t.oid);for(const t of e.added)this._addMesh(t.mesh,t.oid)}))}this._startNodeLoading()}))}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;null!=t&&i?.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll(e=>{const i=t.getNode(e);null!=i&&this._modificationsNodeFilteringArray.push(i)}),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._updatingHandles.destroy(),this._nodeLoader=null,Q.prune(),this._newLoadingNodes.prune(),this._modificationsNodeFilteringArray.prune(),this._elevationUpdateNodes.prune(),null!=j&&(j.hide(),j=null),this._index=null,this._lodHandling=s(this._lodHandling),this._nodeLoader=null,this._clientNodeLoader=null,this._viewportQueries=null,this._set("worker",null)}get viewportQueries(){return this._viewportQueries}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map(i=>{const s=T(e,i),r=T(t,i);return s>=0&&r>=0?{index:s,name:t[r].name,field:t[r],attributeStorageInfo:e[s]}:null}).filter(e=>null!=e&&e.name!==i)}_requiredFieldsChange(){const e=this._getRequiredAttributes();E(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=m();A(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){null!=this._viewportQueries&&(this._viewportQueries.setPointOfInterest(e),null!=this._index&&this._index.requestUpdate())}updateClippingArea(e){this._setClippingArea(e),null!=this._viewportQueries&&null!=this._index&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this._lodHandling.setLodGlobalDirty(),this._evaluateRunning()}_addMesh(e,t){if(null==this._index)return;const i=this._clientNodeLoader.createMeshNodeInfo(e,t),s=this._index.addClientNodeToIndex(i.id,i.mbs);this._clientNodeLoader.addMeshNode(s,i),this._evaluateRunning(),this.notifyChange("rootNodeVisible")}_removeMesh(e){const t=this._clientNodeLoader.getMeshNodeIndex(e);if(null!=t){if(null==this._index)throw new Error("delayed removal of client side i3s node geometry not supported yet.");{const e=(e,t)=>{this.layerView.removeNode(t),this._clientNodeLoader.removeNode(e),this.layerView.deleteCachedNodeData&&null!=e&&this.layerView.deleteCachedNodeData(e),this.layerView.deleteCachedGPUData?.(this.layerView.loadCachedGPUData?.(t))},i=(e,t,i)=>{this._clientNodeLoader.updateNodeIndex(e,t,i),this.layerView.updateNodeIndex&&this.layerView.updateNodeIndex(t,i)};this._index.removeClientNodeFromIndex(t,e,i),this.notifyChange("rootNodeVisible")}}}updateElevationChanged(e,t){const i=this._index;if(null==i?.rootNode||null==t)return null;this.crsIndex.equals(t)||(g(e,t,k,this.crsIndex),e=k);const s=this._elevationUpdateNodes;return s.clear(),C(e,i.rootNode,i,e=>s.push(e.index)),s.length&&(s.forAll(e=>i.updateElevationChanged(e)),this._setCameraDirty()),s}removeAllGeometryObbs(){null!=this._index&&this._index.removeAllGeometryObbs()}getRenderMbs(e){return null!=this._viewportQueries?this._viewportQueries.calculateServiceMbsInRenderSRElevationAdjusted(e):null}_elevationInfoChanged(e){null!=this._index&&(this._index.updateElevationInfo(e,this.isMeshPyramid||this.isGraphics3D),this._setCameraDirty())}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateRunning()}schedule(e,t){const i=this._idleQueue.push(e,t);return this._evaluateRunning(),i}reschedule(e,t){const i=this._idleQueue.unshift(e,t);return this._evaluateRunning(),i}get _isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get unloadedMemoryEstimate(){return null!=this._index&&this.layerView.contentVisible?this._index.unloadedMemoryEstimate*this._lodDropFactor:0}async _loadNodeData(e,t){return e.index<0?this._clientNodeLoader.loadNodeData(e.id,t):this._nodeLoader.loadNodeData(e,t)}async _loadAttributes(e,t,i){return(e.index<0?this._clientNodeLoader:this._nodeLoader).loadAttributes(e,t,i)}get indexDepth(){return null!=this._index?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData?this._disableMemCache=e:this._disableMemCache=!0}runTask(e,t){return this.layerView.contentVisible?this.layerView.visible&&null!=this._index?(this._processWithErrorLogging(e,t),this._index.maxPriority):-1/0:(this._updateViewData(),this._evaluateRunning(),-1/0)}_processWithErrorLogging(e,t){try{this._process(e,t)}catch(s){this._errorCount<50?i.getLogger(this).error(`Error during processing: ${s} at ${s.stack}`):50===this._errorCount&&i.getLogger(this).error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null!=this._nodeLoader&&null!=this._index&&(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this._isIntegratedMesh&&(e.enabled=!1),e.run(()=>this._processIndex(e)),this._updateFeatureLOD(),e.run(()=>this._processCache(e)),this._isIntegratedMesh&&(e.enabled=!0),e.run(()=>this._processNodes(e,t)),this._idleQueue.runTask(e),e.run(()=>this._prefetchIndex()),t.numIndexLoading+=this._index.indexLoading,t.numNodesLoading+=this._downloadingCount,e.run(()=>this._lodHandling.lodGlobalHandling(e)),this._evaluateRunning())}_processIndex(e){if(null==this._index)return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update(Array.from(this._loadingNodes.keys()),e,e=>this.updateNodeModificationStatus(e)),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushAll(this._index.updates.missing));const t=this._index.featureEstimate.leavesReached;this._index.isLoading||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(null==this._index||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||null==this._index||null==this._viewportQueries)return;const e=!this._index.isLoading,t=this.featureTarget*this._baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.indexMissing>G){if(this._featureLOD<=R)return;this._featureLOD/=U,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=P||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this._lod,r=this._index.checkFeatureTarget(t,s);r!==s&&(this._featureLOD=r/this._baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*S||e&&i.estimate>t))return;if(this._featureLOD<=R)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(P,Math.max(R,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(null==t)return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);null!=s&&!this.layerView.isNodeLoaded(s.index);s=t.getParent(s.index))if(this._enableFromGPUCache(s,0)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(null==this._index)return!1;let i=(this._isIdle?O:q)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());null!=t&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const r=this._index.getNode(s.add.back());if(null==r||2!==r.cacheState&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(r),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach(e=>e.abort()),this._loadingNodes.clear(),this._updatingNodes.forEach(e=>e.abort()),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=q)&&(null==this.index||!this.dataRequester.isFull(this._index.urlPrefix))}_evaluateRunning(){let e=!1,t=0;if(this.layerView){if(this.layerView.contentVisible){const i=(this._index?.indexMissing??0)+3*(this._index?.updates.add.length??0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.updating||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling||null!=this._index&&this._index.isPrefetching),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}else e=this._cameraDirty,t=e?0:1;this.running=e,this.updatingProgress=t}}_updateViewData(){if(!this._cameraDirty||null==this._index||null==this._viewportQueries)return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.invalidateVisibilityCache(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.quality<1?1:this.layerView.progressiveLoadFactor}get _lod(){return this._featureLOD*this._baseLOD}get _baseLOD(){const e=this.layerView.lodFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*this.layerView.view.quality}get _lodDropFactor(){if(this.fixedFeatureTarget)return 1;return(Math.min(this.layerView.view.quality,.5)-I)/(.5-I)}isGeometryVisible(e){return!!this._index?.isGeometryVisible(e.index)}updateVisibility(e){this._index?.invalidateNodeVisibilityCache(e)}invalidateGeometryVisibility(e){this._index?.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){this._index?.invalidateVisibilityObbs()}modificationsChanged(){this._index?.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&!(null==this._index||!this._index.isGeometryVisible(e.index))}_shouldDropNode(e){if(null==this._viewportQueries)return!1;const t=this._lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenterAndUpdateMinmax(e))-this._viewportQueries.minDistance>(this._viewportQueries.maxDistance-this._viewportQueries.minDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||null==e||null==this._viewportQueries)return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new w(this.layer,this.dataRequester,i.getLogger(this),this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading((e,t)=>this._removeNodes(e,t,1),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateRunning()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexRequester.cancelAll(),this.dataRequester.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateRunning())}_removeInvisibleNodes(e){const t=this._index;if(null==t||null==this._viewportQueries)return!1;Q.clear(),this.layerView.getLoadedNodeIndices(Q);const i=0===this._viewportQueries.maxDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return Q.filterInPlace(e=>{const i=t.getNode(e);return null==i||!t.isGeometryVisible(e)||s(i)}),Q.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(Q,e,0),!(i&&this._lodDropFactor<1)&&(0===Q.length||(Q.clear(),!1))}markNodeToRemove(e){Q.push(e)}removeMarkedNodes(){this._removeNodes(Q,F,0)}_removeNodes(e,t,i){if(0!==e.length&&!t.done)for(null!=this._index&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),r=this._index;1===i&&this.layerView.nodeFadeoutEnabled&&null!=r&&r.isGeometryVisible(s)?this.layerView.fadeNode(s,1,!0):this.layerView.removeNode(s),t.madeProgress()}}_needsUpdate(e){if(e.resources.isEmpty||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}async _updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t),this._evaluateRunning();try{const i=this.layerView.getLoadedAttributes(e.index),s=E(i,this._requiredAttributes)?this.layerView.getAttributeData(e.index):await this._loadAttributes(e,this._requiredAttributes,t.signal);await this.schedule(()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:s},t.signal),t.signal)}catch(i){if(!d(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)}this._updatingNodes.delete(e.index),this._evaluateRunning()}_loadNode(e){if(this._loadingNodes.has(e.index))return void i.getLogger(this).error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateRunning(),this._loadAndAddNode(e,t.signal).then(i=>{i&&null!=this._index&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())}).catch(()=>{}).finally(()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateRunning()})}_loadAndAddNode(e,t){return 1===e.cacheState?this._loadUncached(e,t).then(()=>!1):this._loadCached(e,t).then(t=>!t&&(e.cacheState=1,!0)).catch(t=>!d(t)&&(e.cacheState=1,!0))}_enableFromGPUCache(e,t){if(this._disableMemCache||null==this._index)return!1;if(0===t&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e.index);return null!=t?.attributeInfo&&E(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){null!=this._index&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateRunning()}updateLoadStatus(e,t){const i=this._index;null!=i&&i.updateChildrenLoaded(e,t?1:-1)}async _loadCached(e,t){if(this._enableFromGPUCache(e,1))return!0;const i=this.layerView;if(this.disableIDBCache||!i.loadCachedNodeData||!i.addCachedNodeData)return!1;const s=(t,i)=>this._nodeLoader.loadTextures(e,t,i),r=t=>this._clientNodeLoader.loadTextures(e,t),a=e.index>=0?s:r,d=await this.schedule(()=>i.loadCachedNodeData(e,t,a),t);if(null==d)return!1;const n=this._requiredAttributes,o=await this.reschedule(()=>this._loadAttributes(e,n,t),t);return await this.reschedule(()=>i.addCachedNodeData(e,d,{loadedAttributes:n,attributeData:o},t),t),this._nodeAdded(),!0}_loadUncached(e,t){return this._downloadingCount++,this._loadNodeData(e,t).then(i=>this.schedule(()=>this.layerView.addNode(e,i,t),t)).finally(()=>this._downloadingCount--).then(()=>{this._nodeAdded(),e.cacheState=2}).catch(t=>{if(!d(t))throw i.getLogger(this).error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,this._index?.requestUpdate(),t})}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateRunning())}get test(){}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateRunning(),null!=this._index&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;null!=t&&t.layerFilterChanged(e),this._setCameraDirty()}};e([h({readOnly:!0})],H.prototype,"isMeshPyramid",null),e([h({readOnly:!0})],H.prototype,"isGraphics3D",null),e([h({readOnly:!0})],H.prototype,"useMaximumNumberOfFeatures",null),e([h({readOnly:!0})],H.prototype,"indexRequester",null),e([h({readOnly:!0})],H.prototype,"dataRequester",null),e([h({readOnly:!0})],H.prototype,"crsVertex",null),e([h({readOnly:!0})],H.prototype,"crsIndex",null),e([h()],H.prototype,"featureTarget",void 0),e([h()],H.prototype,"fixedFeatureTarget",void 0),e([h()],H.prototype,"layerView",void 0),e([h()],H.prototype,"layer",null),e([h()],H.prototype,"_updatingHandles",void 0),e([h()],H.prototype,"updating",null),e([h()],H.prototype,"running",void 0),e([h()],H.prototype,"updatingProgress",void 0),e([h({readOnly:!0})],H.prototype,"leavesReached",void 0),e([h({constructOnly:!0})],H.prototype,"worker",void 0),e([h({readOnly:!0})],H.prototype,"rootNodeVisible",null),H=e([u("esri.layers.graphics.controllers.I3SOnDemandController")],H);const Q=new r({deallocator:null});let j;function E(e,t){return null!=e&&e.length===t.length&&e.every(e=>T(t,e.name)>=0)}function T(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const k=m(),B=H;export{B as default};
2
+ import{__decorate as e}from"tslib";import t from"../../../core/Accessor.js";import has from"../../../core/has.js";import i from"../../../core/Logger.js";import{destroyMaybe as s}from"../../../core/maybe.js";import r from"../../../core/PooledArray.js";import{EsriPromiseMixin as a}from"../../../core/Promise.js";import{isAbortError as d}from"../../../core/promiseUtils.js";import{watch as n,sync as o,initial as l}from"../../../core/reactiveUtils.js";import{property as h,subclass as u}from"../../../core/accessorSupport/decorators.js";import{runUntracked as _}from"../../../core/accessorSupport/tracking.js";import{exactEquals as c}from"../../../core/libs/gl-matrix-2/math/vec3.js";import{UpdatingHandles as p}from"../../../core/support/UpdatingHandles.js";import{projectBoundingRect as g}from"../../../geometry/projection/projectBoundingRect.js";import{create as m}from"../../../geometry/support/aaBoundingRect.js";import{viewingModeFromString as y}from"../../../views/ViewingMode.js";import{I3SClientNodeLoader as f}from"../../../views/3d/layers/i3s/I3SClientNodeLoader.js";import{I3SDataRequester as x}from"../../../views/3d/layers/i3s/I3SDataRequester.js";import{addCallback as N}from"../../../views/3d/layers/i3s/I3SFrameTask.js";import{I3SIndex as b}from"../../../views/3d/layers/i3s/I3SIndex.js";import v from"../../../views/3d/layers/i3s/I3SLodHandling.js";import w from"../../../views/3d/layers/i3s/I3SNodeLoader.js";import{getVertexCrs as L,getIndexCrs as D,findIntersectingNodes as C}from"../../../views/3d/layers/i3s/I3SUtil.js";import V from"../../../views/3d/layers/i3s/I3SViewportQueries.js";import{toBoundingRect as A}from"../../../views/3d/support/extentUtils.js";import{minQuality as I}from"../../../views/3d/support/MemoryController.js";import{PromiseQueue as M}from"../../../views/support/PromiseQueue.js";import{noBudget as F}from"../../../views/support/Scheduler.js";const O=100,q=2,P=1e4,R=1e-4,S=1.2,G=500,U=1.5;let H=class extends(a(t)){get isMeshPyramid(){return"mesh-pyramids"===this.layer.profile||"MeshPyramid"===this.layer.store?.lodType}get isGraphics3D(){return"points"===this.layer.profile}get useMaximumNumberOfFeatures(){return!this.isMeshPyramid&&(null==this.layer.priority||"High"===this.layer.priority)}get indexRequester(){return new x(this.layer.customParameters,this.layer.apiKey)}get dataRequester(){return new x(this.layer.customParameters,this.layer.apiKey)}get crsVertex(){return L(this.layer)}get crsIndex(){return D(this.layer)}get layer(){return this.layerView.layer}get updating(){return this.running||this._updatingHandles.updating}get rootNodeVisible(){return _(()=>{if(this._index){const e=this._index.rootNode;if(e)return this._updateViewData(),this._index.isNodeVisible(e.index)}return!0})}get index(){return this._index}get requiredAttributes(){return this._requiredAttributes}constructor(e){super(e),this.featureTarget=5e4,this.fixedFeatureTarget=!1,this._updatingHandles=new p,this.running=!0,this.updatingProgress=1,this.leavesReached=!1,this.worker=null,this._featureLOD=1,this._stableFeatureLOD=!1,this._isIdle=!1,this._cameraDirty=!0,this._invisibleDirty=!1,this._newLoadingNodes=new r({deallocator:null}),this._modificationsNodeFilteringArray=new r,this._downloadingCount=0,this._loadingNodes=new Map,this._updatingNodes=new Map,this._progressMaxNumNodes=1,this._requiredAttributes=new Array,this._requiredAttributesDirty=!0,this._updatesDisabled=!1,this.disableIDBCache=!1,this._disableMemCache=!1,this._restartNodeLoading=!1,this._fields=null,this._attributeStorageInfo=null,this._idleQueue=new M,this._elevationUpdateNodes=new r({deallocator:null}),this._errorCount=0}initialize(){const{layerView:e,layer:t}=this;this._disableMemCache=!e.loadCachedGPUData||!e.addCachedGPUData,this._lodHandling=new v(e),this._defaultGeometrySchema=t.store.defaultGeometrySchema,this.disableIDBCache=!!has("disable-feature:idb-cache"),"fields"in t&&(this._fields=t.fields,this._attributeStorageInfo=t.attributeStorageInfo),this.addResolvingPromise(Promise.all([t.indexInfo,t.when(),e.when()]).then(([s])=>{if(this.destroyed||!e||e.destroyed||!s)return;const{view:r,clientGeometry:a}=e;if(this._setClippingArea(r.clippingArea),this.addHandles([this._updatingHandles.add(()=>r?.pointsOfInterest?.focus?.renderLocation,e=>this._pointOfInterestChanged(e),{initial:!0,equals:c}),n(()=>r.quality,()=>this._setCameraDirty(),o),this._updatingHandles.add(()=>2===r.state.mode,t=>{this._updateIdleState(t),t&&(this._index?.resetFailedNodes(),e.contentVisible||this._updateViewData())},l),this._updatingHandles.add(()=>e.contentVisible,e=>{e&&this._index?.invalidateAllElevationRanges(),this.restartNodeLoading()},l),N(e.view.resourceController.scheduler,this),this._updatingHandles.add(()=>[this.featureTarget,this.fixedFeatureTarget],()=>{this._setCameraDirty(),this._stableFeatureLOD=!1}),this._updatingHandles.add(()=>r.state?.contentCamera,()=>this._setCameraDirty()),this._updatingHandles.add(()=>t.elevationInfo,e=>this._elevationInfoChanged(e),o),this._updatingHandles.add(()=>e.lodFactor,()=>this._setCameraDirty()),this._updatingHandles.add(()=>e.availableFields,()=>this._requiredFieldsChange()),this._updatingHandles.add(()=>e.holeFilling,e=>null!=this._index&&(this._index.holeFilling=e))]),this._viewportQueries=new V(this.crsIndex,r.renderCoordsHelper,r.state.contentCamera,!r.state.fixedContentCamera||this.isGraphics3D,this._clippingArea,this.isMeshPyramid?r.groundView:r.elevationProvider,y(r.viewingMode),this.layer.elevationInfo,{progressiveLoadFactor:this._getProgressiveLoadFactor(),screenspaceErrorBias:this._lod,angleDependentLoD:this._lod<.5}),this._clientNodeLoader=new f(this.layer.uid,{indexSR:this.crsIndex,vertexSR:this.crsVertex,renderSR:r.renderCoordsHelper.spatialReference},r.resourceController.memoryController,this.worker),this._index=new b(y(r.viewingMode),t,s,this.indexRequester,this._clientNodeLoader,this._viewportQueries,i.getLogger(this),e.holeFilling,t=>e.isNodeLoaded(t),t=>e.isNodeReloading(t),e=>this._shouldLoadNode(e),e=>this._enableFromGPUCache(e,1),e=>this._needsUpdate(e),t=>e.computeVisibilityObb?.(t)??null,e?.computeNodeFiltering?t=>e.computeNodeFiltering(t):void 0),this._index.updateElevationInfo(this.layer.elevationInfo,this.isMeshPyramid||this.isGraphics3D),this._index.imModificationsChanged(!!e.hasModifications),this._index.layerFilterChanged(!!e.hasGeometryFilter),null!=a){for(const e of a)this._addMesh(e.mesh,e.oid);this.addHandles(a.on("change",e=>{for(const t of e.removed)this._removeMesh(t.oid);for(const t of e.added)this._addMesh(t.mesh,t.oid)}))}this._startNodeLoading()}))}updateNodeModificationStatus(e){const t=this._index,i=this.layerView;null!=t&&i?.updateNodeModificationStatus&&(this._modificationsNodeFilteringArray.clear(),e.forAll(e=>{const i=t.getNode(e);null!=i&&this._modificationsNodeFilteringArray.push(i)}),i.updateNodeModificationStatus(this._modificationsNodeFilteringArray),this._invisibleDirty=!0)}destroy(){this.cancelNodeLoading(),this._updatingHandles.destroy(),this._nodeLoader=null,Q.prune(),this._newLoadingNodes.prune(),this._modificationsNodeFilteringArray.prune(),this._elevationUpdateNodes.prune(),null!=j&&(j.hide(),j=null),this._index=null,this._lodHandling=s(this._lodHandling),this._nodeLoader=null,this._clientNodeLoader=null,this._viewportQueries=null,this._set("worker",null)}get viewportQueries(){return this._viewportQueries}_getRequiredAttributes(){if(null==this._attributeStorageInfo||!this._fields||!this.layerView.availableFields)return[];const e=this._attributeStorageInfo,t=this._fields,i=this.layer.objectIdField;return this.layerView.availableFields.map(i=>{const s=T(e,i),r=T(t,i);return s>=0&&r>=0?{index:s,name:t[r].name,field:t[r],attributeStorageInfo:e[s]}:null}).filter(e=>null!=e&&e.name!==i)}_requiredFieldsChange(){const e=this._getRequiredAttributes();E(this._requiredAttributes,e)||(this._requiredAttributes=e,this._requiredAttributesDirty=!1,this.restartNodeLoading())}requestUpdate(){this._requiredAttributesDirty=!0,this.restartNodeLoading()}_setClippingArea(e){const t=m();A(e,t,this.layerView.view.renderSpatialReference)?this._clippingArea=t:this._clippingArea=null}_pointOfInterestChanged(e){null!=this._viewportQueries&&(this._viewportQueries.setPointOfInterest(e),null!=this._index&&this._index.requestUpdate())}updateClippingArea(e){this._setClippingArea(e),null!=this._viewportQueries&&null!=this._index&&(this._viewportQueries.updateClippingArea(this._clippingArea),this._index.invalidateVisibilityCache()),this._setCameraDirty()}_setCameraDirty(){this._cameraDirty=!0,this._lodHandling.setLodGlobalDirty(),this._evaluateRunning()}_addMesh(e,t){if(null==this._index)return;const i=this._clientNodeLoader.createMeshNodeInfo(e,t),s=this._index.addClientNodeToIndex(i.id,i.mbs);this._clientNodeLoader.addMeshNode(s,i),this._evaluateRunning(),this.notifyChange("rootNodeVisible")}_removeMesh(e){const t=this._clientNodeLoader.getMeshNodeIndex(e);if(null!=t){if(null==this._index)throw new Error("delayed removal of client side i3s node geometry not supported yet.");{const e=(e,t)=>{this.layerView.removeNode(t),this._clientNodeLoader.removeNode(e),this.layerView.deleteCachedNodeData&&null!=e&&this.layerView.deleteCachedNodeData(e),this.layerView.deleteCachedGPUData?.(this.layerView.loadCachedGPUData?.(t))},i=(e,t,i)=>{this._clientNodeLoader.updateNodeIndex(e,t,i),this.layerView.updateNodeIndex&&this.layerView.updateNodeIndex(t,i)};this._index.removeClientNodeFromIndex(t,e,i),this.notifyChange("rootNodeVisible")}}}updateElevationChanged(e,t){const i=this._index;if(null==i?.rootNode||null==t)return null;this.crsIndex.equals(t)||(g(e,t,k,this.crsIndex),e=k);const s=this._elevationUpdateNodes;return s.clear(),C(e,i.rootNode,i,e=>s.push(e.index)),s.length&&(s.forAll(e=>i.updateElevationChanged(e)),this._setCameraDirty()),s}removeAllGeometryObbs(){null!=this._index&&this._index.removeAllGeometryObbs()}getRenderMbs(e){return null!=this._viewportQueries?this._viewportQueries.calculateServiceMbsInRenderSRElevationAdjusted(e):null}_elevationInfoChanged(e){null!=this._index&&(this._index.updateElevationInfo(e,this.isMeshPyramid||this.isGraphics3D),this._setCameraDirty())}restartNodeLoading(){this._restartNodeLoading=!0,this.cancelNodeLoading(),this._evaluateRunning()}schedule(e,t){const i=this._idleQueue.push(e,t);return this._evaluateRunning(),i}reschedule(e,t){const i=this._idleQueue.unshift(e,t);return this._evaluateRunning(),i}get _isIntegratedMesh(){return"integrated-mesh"===this.layer.type}get unloadedMemoryEstimate(){return null!=this._index&&this.layerView.contentVisible?this._index.unloadedMemoryEstimate*this._lodDropFactor:0}async _loadNodeData(e,t){return e.index<0?this._clientNodeLoader.loadNodeData(e.id,t):this._nodeLoader.loadNodeData(e,t)}async _loadAttributes(e,t,i){return(e.index<0?this._clientNodeLoader:this._nodeLoader).loadAttributes(e,t,i)}get indexDepth(){return null!=this._index?this._index.maxLevel:0}set disableMemCache(e){this.layerView.loadCachedGPUData&&this.layerView.addCachedGPUData?this._disableMemCache=e:this._disableMemCache=!0}runTask(e,t){return this.layerView.contentVisible?this.layerView.visible&&null!=this._index?(this._processWithErrorLogging(e,t),this._index.maxPriority):-1/0:(this._updateViewData(),this._evaluateRunning(),-1/0)}_processWithErrorLogging(e,t){try{this._process(e,t)}catch(s){this._errorCount<50?i.getLogger(this).error(`Error during processing: ${s} at ${s.stack}`):50===this._errorCount&&i.getLogger(this).error("Too many errors for this layer. Further errors will not be displayed."),this._errorCount++}}_process(e,t){this._restartNodeLoading&&this._startNodeLoading(),null!=this._nodeLoader&&null!=this._index&&(this._updateViewData(),this._invisibleDirty&&this._removeInvisibleNodes(e)&&(this._invisibleDirty=!1),this._isIntegratedMesh&&(e.enabled=!1),e.run(()=>this._processIndex(e)),this._updateFeatureLOD(),e.run(()=>this._processCache(e)),this._isIntegratedMesh&&(e.enabled=!0),e.run(()=>this._processNodes(e,t)),this._idleQueue.runTask(e),e.run(()=>this._prefetchIndex()),t.numIndexLoading+=this._index.indexLoading,t.numNodesLoading+=this._downloadingCount,e.run(()=>this._lodHandling.lodGlobalHandling(e)),this._evaluateRunning())}_processIndex(e){if(null==this._index)return!1;if(this._index.dirty){this._newLoadingNodes.clear(),this._index.update(Array.from(this._loadingNodes.keys()),e,e=>this.updateNodeModificationStatus(e)),this._disableMemCache||(this._newLoadingNodes.pushArray(this._index.updates.add.data,this._index.updates.add.length),this._newLoadingNodes.pushAll(this._index.updates.missing));const t=this._index.featureEstimate.leavesReached;this._index.isLoading||t===this._get("leavesReached")||this._set("leavesReached",t)}return this._index.load()}_prefetchIndex(){return!(null==this._index||this._loadingNodes.size>0||this._index.updates.add.length>0)&&this._index.prefetch()}_updateFeatureLOD(){if(!this.useMaximumNumberOfFeatures||null==this._index||null==this._viewportQueries)return;const e=!this._index.isLoading,t=this.featureTarget*this._baseLOD,i=this._index.featureEstimate;if(i.estimate=i.estimate||t/2,this._index.indexMissing>G){if(this._featureLOD<=R)return;this._featureLOD/=U,this._stableFeatureLOD=!1}else if(e&&i.estimate<t){if(i.leavesReached||this._featureLOD>=P||this._stableFeatureLOD)return;const e=Math.min(10,Math.max(t/i.estimate,1.001));this._featureLOD*=e;const s=this._lod,r=this._index.checkFeatureTarget(t,s);r!==s&&(this._featureLOD=r/this._baseLOD,this._stableFeatureLOD=!0)}else{if(!(i.estimate>t*S||e&&i.estimate>t))return;if(this._featureLOD<=R)return;this._featureLOD/=1+.25*(i.estimate/t-1),this._stableFeatureLOD=!1}this._featureLOD=Math.min(P,Math.max(R,this._featureLOD)),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.requestUpdate()}_processCache(e){const t=this._index;if(null==t)return!1;for(;this._newLoadingNodes.length>0&&!e.done;){const i=this._newLoadingNodes.pop();for(let s=t.getParent(i);null!=s&&!this.layerView.isNodeLoaded(s.index);s=t.getParent(s.index))if(this._enableFromGPUCache(s,0)){e.madeProgress();break}}return e.hasProgressed}_processNodes(e,t){if(null==this._index)return!1;let i=(this._isIdle?O:q)-this._loadingNodes.size;const s=this._index.updates;for(s.cancel.forEach(this._cancelNode,this),s.cancel=[];s.remove.length>0&&!e.done;)this.layerView.removeNode(s.remove.pop()),e.madeProgress();for(;s.update.length>0&&!e.done;){const t=this._index.getNode(s.update.pop());null!=t&&(this._updateLoadedNode(t),e.madeProgress())}for(;s.add.length>0&&!e.done&&i>0;){--i;const r=this._index.getNode(s.add.back());if(null==r||2!==r.cacheState&&!this._hasNodeLoadToken(t))break;s.add.pop(),this._loadNode(r),e.madeProgress()}return e.hasProgressed}_cancelAllNodes(){this._loadingNodes.forEach(e=>e.abort()),this._loadingNodes.clear(),this._updatingNodes.forEach(e=>e.abort()),this._updatingNodes.clear()}_cancelNode(e){const t=this._loadingNodes.get(e);t&&(t.abort(),this._loadingNodes.delete(e))}_hasNodeLoadToken(e){return!(!this._isIdle&&e.numNodesLoading+this._loadingNodes.size>=q)&&(null==this.index||!this.dataRequester.isFull(this._index.urlPrefix))}_evaluateRunning(){let e=!1,t=0;if(this.layerView){if(this.layerView.contentVisible){const i=(this._index?.indexMissing??0)+3*(this._index?.updates.add.length??0)+2*this._loadingNodes.size;e=!!(i>0||this._updatingNodes.size>0||this._restartNodeLoading||this._cameraDirty||this._idleQueue.updating||this._lodHandling&&this._lodHandling.requiresLODGlobalHandling||null!=this._index&&this._index.isPrefetching),0===i&&(this._progressMaxNumNodes=1),this._progressMaxNumNodes=Math.max(i,this._progressMaxNumNodes),t=1-i/this._progressMaxNumNodes}else e=this._cameraDirty,t=e?0:1;this.running=e,this.updatingProgress=t}}_updateViewData(){if(!this._cameraDirty||null==this._index||null==this._viewportQueries)return;const e=this.layerView.view,{contentCamera:t,fixedContentCamera:i}=e.state;this._viewportQueries.updateCamera(t,!i||this.isGraphics3D),this._viewportQueries.setPointOfInterest(e.pointsOfInterest.focus.renderLocation),this._viewportQueries.updateScreenSpaceErrorBias(this._lod),this._index.invalidateVisibilityCache(),this._index.requestUpdate(),this._stableFeatureLOD=!1,this._invisibleDirty=!0,this._cameraDirty=!1,this.notifyChange("rootNodeVisible")}_getProgressiveLoadFactor(){return this.layerView.view.quality<1?1:this.layerView.progressiveLoadFactor}get _lod(){return this._featureLOD*this._baseLOD}get _baseLOD(){const e=this.layerView.lodFactor;return this.fixedFeatureTarget?1:(e>0?e:1)*this.layerView.view.quality}get _lodDropFactor(){if(this.fixedFeatureTarget)return 1;return(Math.min(this.layerView.view.quality,.5)-I)/(.5-I)}isGeometryVisible(e){return!!this._index?.isGeometryVisible(e.index)}updateVisibility(e){this._index?.invalidateNodeVisibilityCache(e)}invalidateGeometryVisibility(e){this._index?.invalidateGeometryVisibility(e)}invalidateVisibilityObbs(){this._index?.invalidateVisibilityObbs()}modificationsChanged(){this._index?.imModificationsChanged(!!this.layerView.hasModifications),this._invisibleDirty=!0}_shouldLoadNode(e){return!(!this._lodHandling.shouldLoadNode(e)||this._shouldDropNode(e))&&!(null==this._index||!this._index.isGeometryVisible(e.index))}_shouldDropNode(e){if(null==this._viewportQueries)return!1;const t=this._lodDropFactor;if(t>=1||!this._lodHandling.hasNoVisibleChildren(e))return!1;return Math.abs(this._viewportQueries.calcCameraDistanceToCenterAndUpdateMinmax(e))-this._viewportQueries.minCenterDistance>(this._viewportQueries.maxCenterDistance-this._viewportQueries.minCenterDistance)*t}_startNodeLoading(){this._restartNodeLoading=!1;const e=this._index;if(this._updatesDisabled||null==e||null==this._viewportQueries)return;this._updateViewData(),this._requiredAttributesDirty&&(this._requiredAttributes=this._getRequiredAttributes(),this._requiredAttributesDirty=!1);const t={textureEncodings:this.layerView.supportedTextureEncodings,textureUsageMask:this.layerView.rendererTextureUsage,loadFeatureData:this.useMaximumNumberOfFeatures};this._nodeLoader=new w(this.layer,this.dataRequester,i.getLogger(this),this._defaultGeometrySchema,this._requiredAttributes,t),e.requestUpdate(),this._lodHandling.startNodeLoading((e,t)=>this._removeNodes(e,t,1),e,{maxLodLevel:this._viewportQueries.maxLodLevel}),this._evaluateRunning()}isNodeLoading(){return null!=this._nodeLoader&&null!=this._index}cancelNodeLoading(){this.isNodeLoading()&&(this.indexRequester.cancelAll(),this.dataRequester.cancelAll(),this._idleQueue.cancelAll(),this._cancelAllNodes(),this._nodeLoader=null,this._evaluateRunning())}_removeInvisibleNodes(e){const t=this._index;if(null==t||null==this._viewportQueries)return!1;Q.clear(),this.layerView.getLoadedNodeIndices(Q);const i=0===this._viewportQueries.maxCenterDistance,s=i?()=>!1:e=>this._shouldDropNode(e);return Q.filterInPlace(e=>{const i=t.getNode(e);return null==i||!t.isGeometryVisible(e)||s(i)}),Q.length>0&&this._lodHandling.setLodGlobalDirty(),this._removeNodes(Q,e,0),!(i&&this._lodDropFactor<1)&&(0===Q.length||(Q.clear(),!1))}markNodeToRemove(e){Q.push(e)}removeMarkedNodes(){this._removeNodes(Q,F,0)}_removeNodes(e,t,i){if(0!==e.length&&!t.done)for(null!=this._index&&this._index.requestUpdate();e.length>0&&!t.done;){const s=e.pop(),r=this._index;1===i&&this.layerView.nodeFadeoutEnabled&&null!=r&&r.isGeometryVisible(s)?this.layerView.fadeNode(s,1,!0):this.layerView.removeNode(s),t.madeProgress()}}_needsUpdate(e){if(e.resources.isEmpty||this._updatingNodes.has(e.index))return!1;const t=this.layerView.getLoadedAttributes(e.index);return null!=t&&t!==this._requiredAttributes}async _updateLoadedNode(e){const t=new AbortController;this._updatingNodes.set(e.index,t),this._evaluateRunning();try{const i=this.layerView.getLoadedAttributes(e.index),s=E(i,this._requiredAttributes)?this.layerView.getAttributeData(e.index):await this._loadAttributes(e,this._requiredAttributes,t.signal);await this.schedule(()=>this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:s},t.signal),t.signal)}catch(i){if(!d(i))return this.layerView.updateAttributes(e.index,{loadedAttributes:this._requiredAttributes,attributeData:{}},t.signal)}this._updatingNodes.delete(e.index),this._evaluateRunning()}_loadNode(e){if(this._loadingNodes.has(e.index))return void i.getLogger(this).error("already loading node "+e.index);const t=new AbortController;this._loadingNodes.set(e.index,t),this._evaluateRunning(),this._loadAndAddNode(e,t.signal).then(i=>{i&&null!=this._index&&this._loadingNodes.get(e.index)===t&&(this._loadingNodes.delete(e.index),this._index.requestUpdate())}).catch(()=>{}).finally(()=>{this._loadingNodes.get(e.index)===t&&this._loadingNodes.delete(e.index),this._evaluateRunning()})}_loadAndAddNode(e,t){return 1===e.cacheState?this._loadUncached(e,t).then(()=>!1):this._loadCached(e,t).then(t=>!t&&(e.cacheState=1,!0)).catch(t=>!d(t)&&(e.cacheState=1,!0))}_enableFromGPUCache(e,t){if(this._disableMemCache||null==this._index)return!1;if(0===t&&!this._index.useNodeAsHole(e.index))return!0;const i=this._loadCachedGPUData(e);return!!i&&(this.layerView.addCachedGPUData(e,i,t),this._nodeAdded(),!0)}_loadCachedGPUData(e){const t=this.layerView.loadCachedGPUData(e.index);return null!=t?.attributeInfo&&E(t.attributeInfo.loadedAttributes,this._requiredAttributes)?t:(this.layerView.deleteCachedGPUData(t),null)}_nodeAdded(){null!=this._index&&this._index.requestUpdate(),this._lodHandling.setLodGlobalDirty(),this._evaluateRunning()}updateLoadStatus(e,t){const i=this._index;null!=i&&i.updateChildrenLoaded(e,t?1:-1)}async _loadCached(e,t){if(this._enableFromGPUCache(e,1))return!0;const i=this.layerView;if(this.disableIDBCache||!i.loadCachedNodeData||!i.addCachedNodeData)return!1;const s=(t,i)=>this._nodeLoader.loadTextures(e,t,i),r=t=>this._clientNodeLoader.loadTextures(e,t),a=e.index>=0?s:r,d=await this.schedule(()=>i.loadCachedNodeData(e,t,a),t);if(null==d)return!1;const n=this._requiredAttributes,o=await this.reschedule(()=>this._loadAttributes(e,n,t),t);return await this.reschedule(()=>i.addCachedNodeData(e,d,{loadedAttributes:n,attributeData:o},t),t),this._nodeAdded(),!0}_loadUncached(e,t){return this._downloadingCount++,this._loadNodeData(e,t).then(i=>this.schedule(()=>this.layerView.addNode(e,i,t),t)).finally(()=>this._downloadingCount--).then(()=>{this._nodeAdded(),e.cacheState=2}).catch(t=>{if(!d(t))throw i.getLogger(this).error("#loadNodeData()",this.layer,`Failed to load node '${e.id}'`,t),e.failed=!0,this._index?.requestUpdate(),t})}_updateIdleState(e){e!==this._isIdle&&(this._isIdle=e,this._evaluateRunning())}get test(){}notifyLODUpdate(){this._lodHandling.setLodGlobalDirty(),this._evaluateRunning(),null!=this._index&&this._index.requestUpdate()}geometryFilterChanged(e){const t=this._index;null!=t&&t.layerFilterChanged(e),this._setCameraDirty()}};e([h({readOnly:!0})],H.prototype,"isMeshPyramid",null),e([h({readOnly:!0})],H.prototype,"isGraphics3D",null),e([h({readOnly:!0})],H.prototype,"useMaximumNumberOfFeatures",null),e([h({readOnly:!0})],H.prototype,"indexRequester",null),e([h({readOnly:!0})],H.prototype,"dataRequester",null),e([h({readOnly:!0})],H.prototype,"crsVertex",null),e([h({readOnly:!0})],H.prototype,"crsIndex",null),e([h()],H.prototype,"featureTarget",void 0),e([h()],H.prototype,"fixedFeatureTarget",void 0),e([h()],H.prototype,"layerView",void 0),e([h()],H.prototype,"layer",null),e([h()],H.prototype,"_updatingHandles",void 0),e([h()],H.prototype,"updating",null),e([h()],H.prototype,"running",void 0),e([h()],H.prototype,"updatingProgress",void 0),e([h({readOnly:!0})],H.prototype,"leavesReached",void 0),e([h({constructOnly:!0})],H.prototype,"worker",void 0),e([h({readOnly:!0})],H.prototype,"rootNodeVisible",null),H=e([u("esri.layers.graphics.controllers.I3SOnDemandController")],H);const Q=new r({deallocator:null});let j;function E(e,t){return null!=e&&e.length===t.length&&e.every(e=>T(t,e.name)>=0)}function T(e,t){const i=t.toLowerCase();for(let s=0;s<e.length;s++)if(e[s].name.toLowerCase()===i)return s;return-1}const k=m(),B=H;export{B as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../request.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{Loadable as r}from"../core/Loadable.js";import{sqlIn as o,sqlAnd as n,sqlOr as i}from"../core/sql.js";import{property as a,subclass as c}from"../core/accessorSupport/decorators.js";import{getAssetFieldNames as u,getRuleValues as l,getCompatibleRuleElements as p,getFeatureSourceLayerId as y,doesRuleAllowAssociation as d}from"./support/utils.js";import{isGraphic as h}from"../support/graphicInstanceUtils.js";let f=class extends(s(r)){constructor(e){super(e),this.rulesCategorized={attachment:[],containment:[],connectivity:[]},this.request=t}initialize(){}async load(e){const t=this.rulesLayer.load(e).then(()=>this._initializeRulesTable());return this.addResolvingPromise(t),this}getFeaturesCanAssociateWithClause(e,t,s){const r=new Map,[i,a]=u(e.sourceLayer);if(!i||!a)return"";const c=l(e),y=l(t);s.forEach(e=>{const{type:t,direction:s}=e;this._getRulesForAssociationType(t).forEach(e=>{p(e,c,s).filter(e=>e.networkSource?.layerId===y.layerId).forEach(e=>{const t=e.assetGroup?.assetGroupCode,s=e.assetType?.assetTypeCode;if(null!=t&&null!=s){const e=r.get(t)??new Set;e.add(s),r.set(t,e)}})})});let d=[];return this._mergeAssetCodes(r).forEach((e,t)=>{const s=`${i} IN (${t})`,r=o(a,[...e]);s&&r&&d.push(n(s,r))}),d.length>1&&(d=d.map(e=>`(${e})`)),d.join(" OR ")}getFeaturesCanAssociateWith(e,t,s){return null==y(e)?[]:t.filter(t=>this.canAssociateFeatures(e,t,s))}canAssociateFeatures(e,t,s){if(!this._canSupportAssociations([e,t]))return!1;const r=l(e),o=l(t);return s.some(e=>{const{type:t,direction:s}=e;return this._getRulesForAssociationType(t).some(e=>"to"===s?d(e,o,r):d(e,r,o))})}getLayersCanAssociateWith(e,t,s){return null==y(e)?[]:t.filter(t=>this.canAssociateFeatureToLayer(e,t,s))}canAssociateFeatureToLayer(e,t,s){if(!this._canSupportAssociations([e,t]))return!1;const r=l(e),o=l(t);return s.some(e=>{const{type:t,direction:s}=e;return this._getRulesForAssociationType(t).some(e=>"to"===s?d(e,o,r):d(e,r,o))})}getFeatureSQL(e,t){const s=e.layerId.toString(),r=e.fieldsIndex?.normalizeFieldName("assetGroup"),o=e.fieldsIndex?.normalizeFieldName("assetType"),n=r?t.attributes[r]:null,i=o?t.attributes[o]:null,a=this.rulesHash[s];if(a){const e=a.assetGroupHash[n];if(e){return e.assetTypeHash[i]||null}}return null}_initializeRulesTable(){const e={},t=[{networkSourceId:"fromNetworkSource",assetGroupId:"fromAssetGroup",assetTypeId:"fromAssetType"},{networkSourceId:"toNetworkSource",assetGroupId:"toAssetGroup",assetTypeId:"toAssetType"},{networkSourceId:"viaNetworkSource",assetGroupId:"viaAssetGroup",assetTypeId:"viaAssetType"}];this.rulesCategorized={attachment:[],containment:[],connectivity:[]};for(const s of this.rules){if(3===s.ruleType){this.rulesCategorized.attachment.push(s);continue}if(2===s.ruleType){this.rulesCategorized.containment.push(s);continue}if(1===s.ruleType){this.rulesCategorized.connectivity.push(s);continue}this.rulesCategorized.connectivity.push(s);let r=[[0,1],[1,0]];5===s.ruleType&&(r=[[0,2],[2,0],[1,2],[2,1]]);for(const o of r){const r=o.shift(),a=o.shift();let c=!1;switch(s.ruleType){case 5:c=0===r||1===r;break;case 4:c=1===r}const u=t[r],l=s[u.networkSourceId]?.layerId.toString()??"",p=s[u.assetGroupId]?.assetGroupCode?.toString(),y=s[u.assetTypeId],d=y?.assetTypeCode?.toString(),h=t[a],f=s[h.networkSourceId]?.layerId.toString()??"",m=s[h.assetGroupId]?.assetGroupCode?.toString(),g=s[h.assetTypeId],T=g?.assetTypeCode?.toString(),S=e[l]??{assetGroupHash:{}};if(!(p&&d&&m&&T))continue;const I=S.assetGroupHash[p]??{assetTypeHash:{}},v=I.assetTypeHash[d]??{};if(v[f]=v[f]??{},c){v[l]=v[l]??{};const e=n(`assetgroup = ${p}`,`assettype = ${d}`);"esriNECPEndVertex"===g?.connectivityPolicy?v[l].endVertex=v[l]?.endVertex?`${v[l].endVertex}`:`(${e})`:v[l].anyVertex=v[l].anyVertex?`${v[l].anyVertex}`:`(${e})`}const A=n(`assetgroup = ${m}`,`assettype = ${T}`);"esriNECPEndVertex"===g?.connectivityPolicy?v[f].endVertex=v[f]?.endVertex?i(v[f].endVertex,A):`(${A})`:v[f].anyVertex=v[f]?.anyVertex?i(v[f].anyVertex,A):`(${A})`,I.assetTypeHash[d]=v,S.assetGroupHash[p]=I,e[l]=S}}this._set("rulesHash",e)}_getRulesForAssociationType(e){const{rulesCategorized:t}=this;switch(e){case"attachment":return t.attachment;case"containment":return t.containment;case"connectivity":case"junction-junction-connectivity":return t.connectivity.filter(e=>1===e.ruleType);case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":return t.connectivity.filter(e=>4===e.ruleType||5===e.ruleType);default:return[]}}_areSetsEqual(e,t){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}_mergeAssetCodes(e){const t=new Map,s=new Set;for(const[r,o]of e){const n=new Set([r]);for(const[t,a]of e)r!==t&&!s.has(t)&&this._areSetsEqual(o,a)&&(n.add(t),s.add(t));const i=Array.from(n).sort().join(",");t.set(i,o)}return t}_canSupportAssociations(e){return e.every(e=>{const t=h(e)?e.sourceLayer:e,[s,r]=u(t);return null!=s&&null!=r})}};e([a({constructOnly:!0})],f.prototype,"rulesLayer",void 0),e([a({constructOnly:!0})],f.prototype,"rules",void 0),e([a({readOnly:!0})],f.prototype,"rulesHash",void 0),e([a()],f.prototype,"rulesCategorized",void 0),e([a({constructOnly:!0})],f.prototype,"request",void 0),f=e([c("esri.networks.RulesTable")],f);export{f as default};
2
+ import{__decorate as e}from"tslib";import t from"../request.js";import{JSONSupportMixin as s}from"../core/JSONSupport.js";import{Loadable as r}from"../core/Loadable.js";import{sqlIn as o,sqlAnd as n,sqlOr as i}from"../core/sql.js";import{property as a,subclass as c}from"../core/accessorSupport/decorators.js";import{getGraphicLayer as u}from"../graphic/graphicOriginUtils.js";import{getAssetFieldNames as p,getRuleValues as l,getCompatibleRuleElements as d,getFeatureSourceLayerId as y,doesRuleAllowAssociation as h}from"./support/utils.js";import{isGraphic as f}from"../support/graphicInstanceUtils.js";let m=class extends(s(r)){constructor(e){super(e),this.rulesCategorized={attachment:[],containment:[],connectivity:[]},this.request=t}initialize(){}async load(e){const t=this.rulesLayer.load(e).then(()=>this._initializeRulesTable());return this.addResolvingPromise(t),this}getFeaturesCanAssociateWithClause(e,t,s){const r=new Map,[i,a]=p(u(e));if(!i||!a)return"";const c=l(e),y=l(t);s.forEach(e=>{const{type:t,direction:s}=e;this._getRulesForAssociationType(t).forEach(e=>{d(e,c,s).filter(e=>e.networkSource?.layerId===y.layerId).forEach(e=>{const t=e.assetGroup?.assetGroupCode,s=e.assetType?.assetTypeCode;if(null!=t&&null!=s){const e=r.get(t)??new Set;e.add(s),r.set(t,e)}})})});let h=[];return this._mergeAssetCodes(r).forEach((e,t)=>{const s=`${i} IN (${t})`,r=o(a,[...e]);s&&r&&h.push(n(s,r))}),h.length>1&&(h=h.map(e=>`(${e})`)),h.join(" OR ")}getFeaturesCanAssociateWith(e,t,s){return null==y(e)?[]:t.filter(t=>this.canAssociateFeatures(e,t,s))}canAssociateFeatures(e,t,s){if(!this._canSupportAssociations([e,t]))return!1;const r=l(e),o=l(t);return s.some(e=>{const{type:t,direction:s}=e;return this._getRulesForAssociationType(t).some(e=>"to"===s?h(e,o,r):h(e,r,o))})}getLayersCanAssociateWith(e,t,s){return null==y(e)?[]:t.filter(t=>this.canAssociateFeatureToLayer(e,t,s))}canAssociateFeatureToLayer(e,t,s){if(!this._canSupportAssociations([e,t]))return!1;const r=l(e),o=l(t);return s.some(e=>{const{type:t,direction:s}=e;return this._getRulesForAssociationType(t).some(e=>"to"===s?h(e,o,r):h(e,r,o))})}getFeatureSQL(e,t){const s=e.layerId.toString(),r=e.fieldsIndex?.normalizeFieldName("assetGroup"),o=e.fieldsIndex?.normalizeFieldName("assetType"),n=r?t.attributes[r]:null,i=o?t.attributes[o]:null,a=this.rulesHash[s];if(a){const e=a.assetGroupHash[n];if(e){return e.assetTypeHash[i]||null}}return null}_initializeRulesTable(){const e={},t=[{networkSourceId:"fromNetworkSource",assetGroupId:"fromAssetGroup",assetTypeId:"fromAssetType"},{networkSourceId:"toNetworkSource",assetGroupId:"toAssetGroup",assetTypeId:"toAssetType"},{networkSourceId:"viaNetworkSource",assetGroupId:"viaAssetGroup",assetTypeId:"viaAssetType"}];this.rulesCategorized={attachment:[],containment:[],connectivity:[]};for(const s of this.rules){if(3===s.ruleType){this.rulesCategorized.attachment.push(s);continue}if(2===s.ruleType){this.rulesCategorized.containment.push(s);continue}if(1===s.ruleType){this.rulesCategorized.connectivity.push(s);continue}this.rulesCategorized.connectivity.push(s);let r=[[0,1],[1,0]];5===s.ruleType&&(r=[[0,2],[2,0],[1,2],[2,1]]);for(const o of r){const r=o.shift(),a=o.shift();let c=!1;switch(s.ruleType){case 5:c=0===r||1===r;break;case 4:c=1===r}const u=t[r],p=s[u.networkSourceId]?.layerId.toString()??"",l=s[u.assetGroupId]?.assetGroupCode?.toString(),d=s[u.assetTypeId],y=d?.assetTypeCode?.toString(),h=t[a],f=s[h.networkSourceId]?.layerId.toString()??"",m=s[h.assetGroupId]?.assetGroupCode?.toString(),g=s[h.assetTypeId],T=g?.assetTypeCode?.toString(),S=e[p]??{assetGroupHash:{}};if(!(l&&y&&m&&T))continue;const I=S.assetGroupHash[l]??{assetTypeHash:{}},v=I.assetTypeHash[y]??{};if(v[f]=v[f]??{},c){v[p]=v[p]??{};const e=n(`assetgroup = ${l}`,`assettype = ${y}`);"esriNECPEndVertex"===g?.connectivityPolicy?v[p].endVertex=v[p]?.endVertex?`${v[p].endVertex}`:`(${e})`:v[p].anyVertex=v[p].anyVertex?`${v[p].anyVertex}`:`(${e})`}const A=n(`assetgroup = ${m}`,`assettype = ${T}`);"esriNECPEndVertex"===g?.connectivityPolicy?v[f].endVertex=v[f]?.endVertex?i(v[f].endVertex,A):`(${A})`:v[f].anyVertex=v[f]?.anyVertex?i(v[f].anyVertex,A):`(${A})`,I.assetTypeHash[y]=v,S.assetGroupHash[l]=I,e[p]=S}}this._set("rulesHash",e)}_getRulesForAssociationType(e){const{rulesCategorized:t}=this;switch(e){case"attachment":return t.attachment;case"containment":return t.containment;case"connectivity":case"junction-junction-connectivity":return t.connectivity.filter(e=>1===e.ruleType);case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":return t.connectivity.filter(e=>4===e.ruleType||5===e.ruleType);default:return[]}}_areSetsEqual(e,t){if(e.size!==t.size)return!1;for(const s of e)if(!t.has(s))return!1;return!0}_mergeAssetCodes(e){const t=new Map,s=new Set;for(const[r,o]of e){const n=new Set([r]);for(const[t,a]of e)r!==t&&!s.has(t)&&this._areSetsEqual(o,a)&&(n.add(t),s.add(t));const i=Array.from(n).sort().join(",");t.set(i,o)}return t}_canSupportAssociations(e){return e.every(e=>{const t=f(e)?u(e):e,[s,r]=p(t);return null!=s&&null!=r})}};e([a({constructOnly:!0})],m.prototype,"rulesLayer",void 0),e([a({constructOnly:!0})],m.prototype,"rules",void 0),e([a({readOnly:!0})],m.prototype,"rulesHash",void 0),e([a()],m.prototype,"rulesCategorized",void 0),e([a({constructOnly:!0})],m.prototype,"request",void 0),m=e([c("esri.networks.RulesTable")],m);export{m as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../core/Error.js";import{getOrCreateMapValue as s}from"../core/MapUtils.js";import{watch as o}from"../core/reactiveUtils.js";import{property as i,subclass as a}from"../core/accessorSupport/decorators.js";import n from"../layers/FeatureLayer.js";import{queryAllJSON as l}from"../layers/support/featureQueryAll.js";import u from"./Network.js";import d from"./RulesTable.js";import m from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as c}from"./support/networkFieldUtils.js";import y from"./support/NetworkSystemLayers.js";import h from"./support/TerminalConfiguration.js";import f from"./support/TraceJobInfo.js";import{AssociationTypeEnum as p,nullGuid as w,associationTypeKebabDict as I}from"./support/typeUtils.js";import{doesRuleAllowAssociation as b}from"./support/utils.js";import g from"../rest/networks/support/TelecomNetworkElement.js";import T from"../rest/support/Query.js";let k=class extends u{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(o(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new n({url:r,gdbVersion:e,historicMoment:t})}get _telecomSourceSet(){const e=new Set;return this.dataElement?.domainNetworks.forEach(t=>{t.isTelecomNetwork&&(t.edgeSources?.forEach(t=>e.add(t.sourceId)),t.junctionSources?.forEach(t=>e.add(t.sourceId)))}),e}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new y({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>h.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e);const{dataElement:t,layerId:s,sourceJSON:o}=this;if(!(t&&"domainNetworks"in t&&Array.isArray(t.domainNetworks)))throw new r("network:invalid-data-element",`The data element for layer ${s} does not have the expected properties for a utility network.`);if(!o||!("type"in o)||"string"!=typeof o.type||"Utility Network Layer"!==o.type)throw new r("network:invalid-layer",`The metadata for layer ${s} does not have the expected properties for a utility network.`);await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=e.sourceLayer??e.origin??e.layer??null;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const l of Object.keys(i))"ASSETGROUP"===l.toUpperCase()&&(t=e.getAttribute(l)),"ASSETTYPE"===l.toUpperCase()&&(r=e.getAttribute(l));if(!this.dataElement)return null;let a=null;const n=this.dataElement.domainNetworks;for(const l of n){const e=l.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?h.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new d({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:r}=await import("./CircuitManager.js");return s(this._circuitManagerMap,e,()=>new r({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from({...e,telecomSourceSet:this._telecomSourceSet});return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new f({statusUrl:o,telecomSourceSet:this._telecomSourceSet})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>b(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromLastUnit:n,toNetworkSourceId:l,toGlobalId:u,toTerminalId:d,toFirstUnit:m,toLastUnit:y,associationType:h,isContentVisible:f,percentAlong:w,globalId:I}=c(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[u]:e.toNetworkElement?.globalId,[d]:e.toNetworkElement?.terminalId,[h]:p[e.associationType],[f]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[w]:e.percentAlong,[I]:e.globalId}}),c=e.associationType.includes("connectivity");return e.fromNetworkElement instanceof g&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.lastUnit),e.toNetworkElement instanceof g&&(r.attributes[m]=e.toNetworkElement?.firstUnit,r.attributes[y]=e.toNetworkElement?.lastUnit),c&&(r.attributes[i]=e.fromNetworkElement?.terminalId??1,r.attributes[d]=e.toNetworkElement?.terminalId??1),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),h=s.get("VIANETWORKSOURCEID"),f=s.get("VIAASSETGROUP"),p=s.get("VIAASSETTYPE"),w=s.get("VIATERMINALID"),I=r.attributes[o.name],b=new Date(r.attributes[i.name]),g=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[h.name],assetGroupId:r.attributes[f.name],assetTypeId:r.attributes[p.name],terminalId:r.attributes[w.name]}],T={ruleType:I,creationDate:b};for(const k of[0,1,2]){if(5!==I&&2===k)continue;const e=g[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=o,T[`${a}Terminal`]=i?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new T({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await l(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??w,associationType:I.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}};e([i({readOnly:!0})],k.prototype,"_rulesLayer",null),e([i({readOnly:!0})],k.prototype,"_telecomSourceSet",null),e([i({type:[m],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],k.prototype,"sharedNamedTraceConfigurations",void 0),e([i({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],k.prototype,"type",void 0),e([i({readOnly:!0})],k.prototype,"serviceTerritoryFeatureLayerId",null),e([i({readOnly:!0})],k.prototype,"networkSystemLayers",null),e([i({readOnly:!0})],k.prototype,"terminalConfigurations",null),e([i({readOnly:!0})],k.prototype,"domainNetworkNames",null),e([i({readOnly:!0})],k.prototype,"hasTelecomNetwork",null),e([i({readOnly:!0,json:{read:!1}})],k.prototype,"associationsTable",null),k=e([a("esri.networks.UtilityNetwork")],k);const S=k;export{S as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import r from"../core/Error.js";import{getOrCreateMapValue as s}from"../core/MapUtils.js";import{watch as o}from"../core/reactiveUtils.js";import{property as i,subclass as a}from"../core/accessorSupport/decorators.js";import{getGraphicLayer as n}from"../graphic/graphicOriginUtils.js";import l from"../layers/FeatureLayer.js";import{queryAllJSON as u}from"../layers/support/featureQueryAll.js";import d from"./Network.js";import m from"./RulesTable.js";import c from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as y}from"./support/networkFieldUtils.js";import h from"./support/NetworkSystemLayers.js";import p from"./support/TerminalConfiguration.js";import f from"./support/TraceJobInfo.js";import{AssociationTypeEnum as w,nullGuid as I,associationTypeKebabDict as b}from"./support/typeUtils.js";import{doesRuleAllowAssociation as g}from"./support/utils.js";import T from"../rest/networks/support/TelecomNetworkElement.js";import k from"../rest/support/Query.js";let S=class extends d{constructor(e){super(e),this.sharedNamedTraceConfigurations=[],this.type="utility",this._circuitManagerMap=new Map,this._terminalById=new Map,this._unitIdentifierManager=null}initialize(){this.addHandles(o(()=>[this.gdbVersion,this.historicMoment],()=>{this.networkSystemLayers.associationsTable&&(this.networkSystemLayers.associationsTable.gdbVersion!==this.gdbVersion&&(this.networkSystemLayers.associationsTable.gdbVersion=this.gdbVersion),this.networkSystemLayers.associationsTable.historicMoment!==this.historicMoment&&(this.networkSystemLayers.associationsTable.historicMoment=this.historicMoment))}))}get _rulesLayer(){const{gdbVersion:e,historicMoment:t}=this,r=this.networkSystemLayers.rulesTableUrl;return new l({url:r,gdbVersion:e,historicMoment:t})}get _telecomSourceSet(){const e=new Set;return this.dataElement?.domainNetworks.forEach(t=>{t.isTelecomNetwork&&(t.edgeSources?.forEach(t=>e.add(t.sourceId)),t.junctionSources?.forEach(t=>e.add(t.sourceId)))}),e}get _utilityLayerList(){const e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:r})=>{this._layerIdBySourceId.set(r,t),this._sourceIdByLayerId.set(t,r),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new h({rulesTableId:this.sourceJSON?.systemLayers.rulesTableId,rulesTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.rulesTableId}`:null,subnetworksTableId:this.sourceJSON?.systemLayers.subnetworksTableId,subnetworksTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.subnetworksTableId}`:null,dirtyAreasLayerId:this.sourceJSON?.systemLayers.dirtyAreasLayerId,dirtyAreasLayerUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.dirtyAreasLayerId}`:null,associationsTableId:this.sourceJSON?.systemLayers.associationsTableId,associationsTableUrl:this.sourceJSON?`${this.featureServiceUrl}/${this.sourceJSON?.systemLayers.associationsTableId}`:null})}get terminalConfigurations(){return this.dataElement?.terminalConfigurations.map(e=>p.fromJSON(e))||[]}get domainNetworkNames(){return this.dataElement?.domainNetworks.map(e=>e.domainNetworkName)||[]}get hasTelecomNetwork(){return this.dataElement?.domainNetworks.some(e=>e.isTelecomNetwork)??!1}get associationsTable(){return this.networkSystemLayers.associationsTable}async load(e){return this.addResolvingPromise(this._load(e)),this}async _load(e){await super._load(e);const{dataElement:t,layerId:s,sourceJSON:o}=this;if(!(t&&"domainNetworks"in t&&Array.isArray(t.domainNetworks)))throw new r("network:invalid-data-element",`The data element for layer ${s} does not have the expected properties for a utility network.`);if(!o||!("type"in o)||"string"!=typeof o.type||"Utility Network Layer"!==o.type)throw new r("network:invalid-layer",`The metadata for layer ${s} does not have the expected properties for a utility network.`);await Promise.all([this._loadNamedTraceConfigurationsFromNetwork(e),this.networkSystemLayers.loadAssociationsTable(e)])}getTerminalConfiguration(e){let t=null,r=null;const s=n(e)??null;let o=null;if("feature"===s?.type){if(o=s.layerId,null===o)return null}else{if("subtype-sublayer"!==s?.type)return null;if(o=s?.parent?.layerId??null,null===o)return null}const i=e.attributes;if(null==i)return null;for(const n of Object.keys(i))"ASSETGROUP"===n.toUpperCase()&&(t=e.getAttribute(n)),"ASSETTYPE"===n.toUpperCase()&&(r=e.getAttribute(n));if(!this.dataElement)return null;let a=null;const l=this.dataElement.domainNetworks;for(const n of l){const e=n.junctionSources?.find(e=>e.layerId===o);if(e){const s=e.assetGroups?.find(e=>e.assetGroupCode===t);if(s){const e=s.assetTypes?.find(e=>e.assetTypeCode===r);if(e?.isTerminalConfigurationSupported){a=e.terminalConfigurationId;break}}}}if(null!=a){const e=this.dataElement.terminalConfigurations,t=e?.find(e=>e.terminalConfigurationId===a);return t?p.fromJSON(t):null}return null}getTierNames(e){const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e);return t?.tiers?.map(e=>e.name)||[]}async getRulesTable(){const e=this._rulesLayer;e.loaded||await e.load();const t=this.dataElement?.domainNetworks;if(!t)return null;const r=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),s=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,r,t));return new m({rulesLayer:e,rules:s})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;const t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;const{default:r}=await import("./CircuitManager.js");return s(this._circuitManagerMap,e,()=>new r({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;const{default:e}=await import("./UnitIdentifierManager.js");return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){if(!this.dataElement||null==e)return null;const t=this._terminalById.get(e);return null!=t?t:(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return"layerId"in e?null!=e.layerId&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):!("subtype-sublayer"!==e.type||!e.parent)&&(this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1))}async queryAssociations(e,t){const[{queryAssociations:r},{default:s}]=await Promise.all([import("../rest/networks/queryAssociations.js"),import("../rest/networks/support/QueryAssociationsParameters.js")]),o=s.from(e);o.gdbVersion=this.gdbVersion,o.moment=this.historicMoment;return(await r(this.networkServiceUrl,o,t)).associations}async synthesizeAssociationGeometries(e){const[{synthesizeAssociationGeometries:t},{default:r}]=await Promise.all([import("../rest/networks/synthesizeAssociationGeometries.js"),import("../rest/networks/support/SynthesizeAssociationGeometriesParameters.js")]),s=r.from(e);return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async trace(e){const[{trace:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from({...e,telecomSourceSet:this._telecomSourceSet});return s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment,t(this.networkServiceUrl,s)}async submitTraceJob(e){const[{submitTraceJob:t},{default:r}]=await Promise.all([import("../rest/networks/trace.js"),import("../rest/networks/support/TraceParameters.js")]),s=r.from(e);s.gdbVersion=this.gdbVersion,s.moment=this.historicMoment;const o=await t(this.networkServiceUrl,s);return new f({statusUrl:o,telecomSourceSet:this._telecomSourceSet})}async canAddAssociation(e){const t=await this.getRulesTable();if(!t)return!1;const{fromNetworkElement:r,toNetworkElement:s}=e;if(!r||!s)return!1;await t.load();let o=null;switch(e.associationType){case"containment":o=t.rulesCategorized.containment;break;case"attachment":o=t.rulesCategorized.attachment;break;default:o=t.rulesCategorized.connectivity}return o.some(e=>g(e,r,s))}generateAddAssociations(e){const{associationsTable:r}=this.networkSystemLayers,{fromNetworkSourceId:s,fromGlobalId:o,fromTerminalId:i,fromFirstUnit:a,fromLastUnit:n,toNetworkSourceId:l,toGlobalId:u,toTerminalId:d,toFirstUnit:m,toLastUnit:c,associationType:h,isContentVisible:p,percentAlong:f,globalId:I}=y(r);return{addFeatures:e.map(e=>{const r=new t({attributes:{[s]:e.fromNetworkElement?.networkSourceId,[o]:e.fromNetworkElement?.globalId,[i]:e.fromNetworkElement?.terminalId,[l]:e.toNetworkElement?.networkSourceId,[u]:e.toNetworkElement?.globalId,[d]:e.toNetworkElement?.terminalId,[h]:w[e.associationType],[p]:null==e.isContentVisible?void 0:e.isContentVisible?1:0,[f]:e.percentAlong,[I]:e.globalId}}),y=e.associationType.includes("connectivity");return e.fromNetworkElement instanceof T&&(r.attributes[a]=e.fromNetworkElement?.firstUnit,r.attributes[n]=e.fromNetworkElement?.lastUnit),e.toNetworkElement instanceof T&&(r.attributes[m]=e.toNetworkElement?.firstUnit,r.attributes[c]=e.toNetworkElement?.lastUnit),y&&(r.attributes[i]=e.fromNetworkElement?.terminalId??1,r.attributes[d]=e.toNetworkElement?.terminalId??1),r}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:r?.globalIdField??"globalid",objectIdField:r?.objectIdField??"objectid"}}}generateDeleteAssociations(e){const{associationsTable:t,associationsTableId:r}=this.networkSystemLayers,s={id:r,identifierFields:{globalIdField:t?.globalIdField??"globalid",objectIdField:t?.objectIdField??"objectid"}};if(-8===this.dataElement?.schemaGeneration){const t=this._generateDeleteTelecomAssociationPayload(e);return{...s,deleteAssociations:t}}const o=e.map(e=>({globalId:e.globalId}));return{...s,deleteFeatures:o}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(0===this.sharedNamedTraceConfigurations?.length)return;const t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),r=await this.queryNamedTraceConfigurations({globalIds:t},e);for(const s of this.sharedNamedTraceConfigurations){const e=r?.find(e=>e.globalId===s.globalId);if(e){const t=e.write({},{origin:"service"});s.read(t,{origin:"service"})}}}_hydrateRuleInfo(e,t,r){const s=e.fieldsIndex,o=s.get("RULETYPE"),i=s.get("CREATIONDATE"),a=s.get("FROMNETWORKSOURCEID"),n=s.get("FROMASSETGROUP"),l=s.get("FROMASSETTYPE"),u=s.get("FROMTERMINALID"),d=s.get("TONETWORKSOURCEID"),m=s.get("TOASSETGROUP"),c=s.get("TOASSETTYPE"),y=s.get("TOTERMINALID"),h=s.get("VIANETWORKSOURCEID"),p=s.get("VIAASSETGROUP"),f=s.get("VIAASSETTYPE"),w=s.get("VIATERMINALID"),I=r.attributes[o.name],b=new Date(r.attributes[i.name]),g=[{networkSourceId:r.attributes[a.name],assetGroupId:r.attributes[n.name],assetTypeId:r.attributes[l.name],terminalId:r.attributes[u.name]},{networkSourceId:r.attributes[d.name],assetGroupId:r.attributes[m.name],assetTypeId:r.attributes[c.name],terminalId:r.attributes[y.name]},{networkSourceId:r.attributes[h.name],assetGroupId:r.attributes[p.name],assetTypeId:r.attributes[f.name],terminalId:r.attributes[w.name]}],T={ruleType:I,creationDate:b};for(const k of[0,1,2]){if(5!==I&&2===k)continue;const e=g[k],r=t.find(t=>t.sourceId===e.networkSourceId),s=r?.assetGroups.find(t=>t.assetGroupCode===e.assetGroupId),o=s?.assetTypes.find(t=>t.assetTypeCode===e.assetTypeId),i=this._getTerminal(o,e);let a="";switch(k){case 0:a="from";break;case 1:a="to";break;case 2:a="via"}T[`${a}NetworkSource`]=r,T[`${a}AssetGroup`]=s,T[`${a}AssetType`]=o,T[`${a}Terminal`]=i?.toJSON()}return T}_getTerminal(e,t){const r=e?.terminalConfigurationId,s=this.terminalConfigurations?.find(e=>e.id===r);return s?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){const{gdbVersion:t,historicMoment:r}=this,s=new k({where:"1=1",outFields:["*"],gdbVersion:t,historicMoment:r});return(await u(e,s)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??I,associationType:b.toJSON(e.associationType),fromSourceId:e.fromNetworkElement.networkSourceId,fromGlobalId:e.fromNetworkElement.globalId,fromTerminalId:e.fromNetworkElement.terminalId,toSourceId:e.toNetworkElement.networkSourceId,toGlobalId:e.toNetworkElement.globalId,toTerminalId:e.toNetworkElement.terminalId}))}};e([i({readOnly:!0})],S.prototype,"_rulesLayer",null),e([i({readOnly:!0})],S.prototype,"_telecomSourceSet",null),e([i({type:[c],json:{origins:{"web-map":{read:{source:"traceConfigurations"},write:{target:"traceConfigurations"}},service:{read:{source:"traceConfigurations"}}},read:!1}})],S.prototype,"sharedNamedTraceConfigurations",void 0),e([i({type:["utility"],readOnly:!0,json:{read:!1,write:!1}})],S.prototype,"type",void 0),e([i({readOnly:!0})],S.prototype,"serviceTerritoryFeatureLayerId",null),e([i({readOnly:!0})],S.prototype,"networkSystemLayers",null),e([i({readOnly:!0})],S.prototype,"terminalConfigurations",null),e([i({readOnly:!0})],S.prototype,"domainNetworkNames",null),e([i({readOnly:!0})],S.prototype,"hasTelecomNetwork",null),e([i({readOnly:!0,json:{read:!1}})],S.prototype,"associationsTable",null),S=e([a("esri.networks.UtilityNetwork")],S);const N=S;export{N as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../request.js";import t from"../../core/Error.js";import{queryAllJSON as r}from"../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as o,isFeatureLayer as n}from"../../layers/support/layerUtils.js";import s from"../../portal/PortalItem.js";import u from"../../rest/support/FeatureSet.js";import{isGraphic as a}from"../../support/graphicInstanceUtils.js";function l(e,t,r="from"){const{fromRuleElement:o,viaRuleElement:n,toRuleElement:s}=y(e),u=[];switch(e.ruleType){case 2:case 3:"from"===r&&m(t,o,!1)?u.push(s):"to"===r&&m(t,s,!1)&&u.push(o);break;case 1:m(t,o,!0)?u.push(s):m(t,s,!0)&&u.push(o);break;case 4:s.networkSource?.usesGeometry||(m(t,o,!0)?u.push(s):m(t,s,!0)&&u.push(o));break;case 5:n&&(m(t,n,!0)?(o.networkSource?.usesGeometry||u.push(o),s.networkSource?.usesGeometry||u.push(s)):(!o.networkSource?.usesGeometry&&m(t,o,!0)||!s.networkSource?.usesGeometry&&m(t,s,!0))&&u.push(n));break;default:return[]}return u}function i(e,t,r){const{fromRuleElement:o,viaRuleElement:n,toRuleElement:s}=y(e);switch(e.ruleType){case 2:case 3:return c(t,r,o,s,!1,!1);case 1:return c(t,r,o,s,!0,!0);case 4:return!s.networkSource?.usesGeometry&&c(t,r,o,s,!0,!0);case 5:return!o.networkSource?.usesGeometry&&c(t,r,o,n,!0,!0)||!s.networkSource?.usesGeometry&&c(t,r,s,n,!0,!0);default:return!1}}function c(e,t,r,o,n,s){if(!r||!o)return!1;const u=m(e,r,s),a=m(t,o,s);if(n){const n=m(e,o,s),l=m(t,r,s);return u&&a||n&&l}return u&&a}function p(e,t){const r=e.terminal?.terminalId,o=t.terminalId;return null==r&&null==o||(1===r?null==o||1===o:r===o)}function m(e,t,r){const{assetGroupCode:o,assetTypeCode:n}=e;return("layerId"in e?e.layerId===t.networkSource?.layerId:e.networkSourceId===t.networkSource?.sourceId)&&(null==o||o===t.assetGroup?.assetGroupCode)&&(null==n||n===t.assetType?.assetTypeCode)&&(!r||!("terminalId"in e)||p(t,e))}function y(e){return{fromRuleElement:{networkSource:e.fromNetworkSource,assetGroup:e.fromAssetGroup,assetType:e.fromAssetType,terminal:e.fromTerminal},viaRuleElement:e.viaNetworkSource?{networkSource:e.viaNetworkSource,assetGroup:e.viaAssetGroup,assetType:e.viaAssetType,terminal:e.viaTerminal}:void 0,toRuleElement:{networkSource:e.toNetworkSource,assetGroup:e.toAssetGroup,assetType:e.toAssetType,terminal:e.toTerminal}}}function f(e){let t=null,r=null,n=null;if(a(e))t=d(e),[r,n]=w(e);else if(o(e)){t=e.parent?.layerId??null;const[o]=I(e);o===e.subtypeField&&(r=e.subtypeCode)}else t=e.layerId??null;return{layerId:t,assetGroupCode:r,assetTypeCode:n}}function d(e){const{sourceLayer:t}=e;let r;return n(t)?r=t.layerId:o(t)&&(r=t.parent?.layerId),r??null}function w(e){const[t,r]=I(e.sourceLayer);return[t?e.attributes[t]:null,r?e.attributes[r]:null]}function I(e){if(!e||!("fieldsIndex"in e))return[null,null];return[e.fieldsIndex.normalizeFieldName("assetGroup")??null,e.fieldsIndex.normalizeFieldName("assetType")??null]}async function k(e,t){const o=e.layers,n=e.layerInfos,s=e.returnGeometry||!1,a=e.outSpatialReference;await Promise.all(o.map(async e=>{await e.load()}));return(await Promise.all(o.map(async e=>{const o=n.find(t=>t.layerUrl===e.parsedUrl?.path);if(!o?.objectIds?.length)return{layer:e,featureSet:void 0};const l=e.createQuery();l.returnGeometry=s,l.outFields=o.outFields||["*"],l.outSpatialReference=a,l.gdbVersion=e.gdbVersion,l.objectIds=o.objectIds,t&&(l.where="1=1");const i=u.fromJSON(await r(e,l));return i.features.forEach(t=>{t.layer=t.sourceLayer=e}),{layer:e,featureSet:i}}))).filter(e=>void 0!==e.featureSet)}async function S(e,t){if("Utility Network Layer"===e){const{default:e}=await import("../UtilityNetwork.js");return new e({layerUrl:t})}return null}async function G(r){let o="portalItem"in r?r:{portalItem:r};!o.portalItem||o.portalItem instanceof s||(o={...o,portalItem:new s(o.portalItem)});const n=o.portalItem;if(await n.load(),"Feature Service"!==n.type)throw new t("portal:unknown-item-type","Unknown item type '${type}'",{type:n.type});const u=n.url,a=await e(u,{responseType:"json",query:{f:"json"}}),l="Network Layer";if(a.data.type?.includes(l))return S(a.data.type,u);if(a.data.layers){const e=a.data.layers.find(e=>e.type.includes(l));if(e){const t=`${u}/${e.id}`;return S(e.type,t)}}return null}export{c as doElementsMatchRule,i as doesRuleAllowAssociation,I as getAssetFieldNames,l as getCompatibleRuleElements,y as getElementsFromRule,w as getFeatureAssetCodes,d as getFeatureSourceLayerId,k as getFeaturesFromLayers,f as getRuleValues,m as isRuleElementMatch,p as isTerminalMatch,G as networkFromPortalItem};
2
+ import e from"../../request.js";import r from"../../core/Error.js";import{getGraphicLayer as t}from"../../graphic/graphicOriginUtils.js";import{queryAllJSON as o}from"../../layers/support/featureQueryAll.js";import{isSubtypeSublayer as n,isFeatureLayer as s,isSubtypeGroupLayer as u}from"../../layers/support/layerUtils.js";import a from"../../portal/PortalItem.js";import l from"../../rest/support/FeatureSet.js";import{isGraphic as i}from"../../support/graphicInstanceUtils.js";function c(e,r,t="from"){const{fromRuleElement:o,viaRuleElement:n,toRuleElement:s}=d(e),u=[];switch(e.ruleType){case 2:case 3:"from"===t&&f(r,o,!1)?u.push(s):"to"===t&&f(r,s,!1)&&u.push(o);break;case 1:f(r,o,!0)?u.push(s):f(r,s,!0)&&u.push(o);break;case 4:s.networkSource?.usesGeometry||(f(r,o,!0)?u.push(s):f(r,s,!0)&&u.push(o));break;case 5:n&&(f(r,n,!0)?(o.networkSource?.usesGeometry||u.push(o),s.networkSource?.usesGeometry||u.push(s)):(!o.networkSource?.usesGeometry&&f(r,o,!0)||!s.networkSource?.usesGeometry&&f(r,s,!0))&&u.push(n));break;default:return[]}return u}function p(e,r,t){const{fromRuleElement:o,viaRuleElement:n,toRuleElement:s}=d(e);switch(e.ruleType){case 2:case 3:return m(r,t,o,s,!1,!1);case 1:return m(r,t,o,s,!0,!0);case 4:return!s.networkSource?.usesGeometry&&m(r,t,o,s,!0,!0);case 5:return!o.networkSource?.usesGeometry&&m(r,t,o,n,!0,!0)||!s.networkSource?.usesGeometry&&m(r,t,s,n,!0,!0);default:return!1}}function m(e,r,t,o,n,s){if(!t||!o)return!1;const u=f(e,t,s),a=f(r,o,s);if(n){const n=f(e,o,s),l=f(r,t,s);return u&&a||n&&l}return u&&a}function y(e,r){const t=e.terminal?.terminalId,o=r.terminalId;return null==t&&null==o||(1===t?null==o||1===o:t===o)}function f(e,r,t){const{assetGroupCode:o,assetTypeCode:n}=e;return("layerId"in e?e.layerId===r.networkSource?.layerId:e.networkSourceId===r.networkSource?.sourceId)&&(null==o||o===r.assetGroup?.assetGroupCode)&&(null==n||n===r.assetType?.assetTypeCode)&&(!t||!("terminalId"in e)||y(r,e))}function d(e){return{fromRuleElement:{networkSource:e.fromNetworkSource,assetGroup:e.fromAssetGroup,assetType:e.fromAssetType,terminal:e.fromTerminal},viaRuleElement:e.viaNetworkSource?{networkSource:e.viaNetworkSource,assetGroup:e.viaAssetGroup,assetType:e.viaAssetType,terminal:e.viaTerminal}:void 0,toRuleElement:{networkSource:e.toNetworkSource,assetGroup:e.toAssetGroup,assetType:e.toAssetType,terminal:e.toTerminal}}}function w(e){let r=null,t=null,o=null;if(i(e))r=I(e),[t,o]=S(e);else if(n(e)){r=e.parent?.layerId??null;const[o]=k(e);o===e.subtypeField&&(t=e.subtypeCode)}else r=e.layerId??null;return{layerId:r,assetGroupCode:t,assetTypeCode:o}}function I(e){const{sourceLayer:r}=e;let t;return s(r)?t=r.layerId:n(r)&&(t=r.parent?.layerId),t??null}function S(e){const[r,o]=k(t(e));return[r?e.attributes[r]:null,o?e.attributes[o]:null]}function k(e){if(!e||!("fieldsIndex"in e))return[null,null];return[e.fieldsIndex.normalizeFieldName("assetGroup")??null,e.fieldsIndex.normalizeFieldName("assetType")??null]}async function h(e,r){const t=e.layers,n=e.layerInfos,s=e.returnGeometry||!1,a=e.outSpatialReference;await Promise.all(t.map(async e=>{await e.load()}));return(await Promise.all(t.map(async e=>{const t=n.find(r=>r.layerUrl===e.parsedUrl?.path);if(!t?.objectIds?.length)return{layer:e,featureSet:void 0};const i=e.createQuery();i.returnGeometry=s,i.outFields=t.outFields||["*"],i.outSpatialReference=a,i.gdbVersion=e.gdbVersion,i.objectIds=t.objectIds,r&&(i.where="1=1");const c=l.fromJSON(await o(e,i));return c.features.forEach(r=>{r.sourceLayer=r.layer=u(e)?e.findSublayerForFeature(r):e,r.origin=u(e)?e.findSublayerForFeature(r)?.graphicOrigin:e.graphicOrigin}),{layer:e,featureSet:c}}))).filter(e=>void 0!==e.featureSet)}async function G(e,r){if("Utility Network Layer"===e){const{default:e}=await import("../UtilityNetwork.js");return new e({layerUrl:r})}return null}async function T(t){let o="portalItem"in t?t:{portalItem:t};!o.portalItem||o.portalItem instanceof a||(o={...o,portalItem:new a(o.portalItem)});const n=o.portalItem;if(await n.load(),"Feature Service"!==n.type)throw new r("portal:unknown-item-type","Unknown item type '${type}'",{type:n.type});const s=n.url,u=await e(s,{responseType:"json",query:{f:"json"}}),l="Network Layer";if(u.data.type?.includes(l))return G(u.data.type,s);if(u.data.layers){const e=u.data.layers.find(e=>e.type.includes(l));if(e){const r=`${s}/${e.id}`;return G(e.type,r)}}return null}export{m as doElementsMatchRule,p as doesRuleAllowAssociation,k as getAssetFieldNames,c as getCompatibleRuleElements,d as getElementsFromRule,S as getFeatureAssetCodes,I as getFeatureSourceLayerId,h as getFeaturesFromLayers,w as getRuleValues,f as isRuleElementMatch,y as isTerminalMatch,T as networkFromPortalItem};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.67",
3
+ "version": "5.2.0-next.69",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -19,10 +19,10 @@
19
19
  "type": "module",
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
- "@amcharts/amcharts5": "~5.20.0",
23
- "@arcgis/toolkit": "^5.2.0-next.61",
22
+ "@amcharts/amcharts5": "~5.20.1",
23
+ "@arcgis/toolkit": "^5.2.0-next.65",
24
24
  "@esri/arcgis-html-sanitizer": "~4.1.0",
25
- "@esri/calcite-components": "^5.1.1",
25
+ "@esri/calcite-components": "^5.2.0-next.40",
26
26
  "@vaadin/grid": "~25.2.6",
27
27
  "@zip.js/zip.js": "~2.8.34",
28
28
  "luxon": "~3.7.2",