@arcgis/core 5.2.0-next.136 → 5.2.0-next.138

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 (507) hide show
  1. package/analysis/LineOfSightAnalysisObserver.d.ts +12 -0
  2. package/analysis/LineOfSightAnalysisObserver.js +1 -1
  3. package/analysis/LineOfSightAnalysisTarget.d.ts +12 -0
  4. package/analysis/LineOfSightAnalysisTarget.js +1 -1
  5. package/arcade/featureset/sources/FeatureLayerParquet.js +1 -1
  6. package/arcgisGlobal.d.ts +4 -0
  7. package/assets/components/assets/icon/blockHeightMedium16.json +1 -0
  8. package/assets/components/assets/icon/blockHeightMedium24.json +1 -0
  9. package/assets/components/assets/icon/blockHeightMedium32.json +1 -0
  10. package/assets/components/assets/icon/blockHeightShort16.json +1 -0
  11. package/assets/components/assets/icon/blockHeightShort24.json +1 -0
  12. package/assets/components/assets/icon/blockHeightShort32.json +1 -0
  13. package/assets/components/assets/icon/blockHeightTall16.json +1 -0
  14. package/assets/components/assets/icon/blockHeightTall24.json +1 -0
  15. package/assets/components/assets/icon/blockHeightTall32.json +1 -0
  16. package/assets/components/assets/icon/cursorCircle16.json +1 -0
  17. package/assets/components/assets/icon/cursorCircle24.json +1 -0
  18. package/assets/components/assets/icon/cursorCircle32.json +1 -0
  19. package/assets/components/assets/icon/dictionary16.json +1 -0
  20. package/assets/components/assets/icon/dictionary24.json +1 -0
  21. package/assets/components/assets/icon/dictionary32.json +1 -0
  22. package/assets/components/assets/icon/jobDependency16.json +1 -0
  23. package/assets/components/assets/icon/jobDependency24.json +1 -0
  24. package/assets/components/assets/icon/jobDependency32.json +1 -0
  25. package/assets/components/assets/icon/referenceChip16.json +1 -0
  26. package/assets/components/assets/icon/referenceChip24.json +1 -0
  27. package/assets/components/assets/icon/referenceChip32.json +1 -0
  28. package/assets/esri/core/workers/RemoteClient.js +1 -1
  29. package/assets/esri/core/workers/chunks/{4e6f95d8c624d513849a.js → 05963f57cbe5a5249496.js} +1 -1
  30. package/assets/esri/core/workers/chunks/{0b8681ca4a83e97f1f71.js → 067de1910190da228291.js} +1 -1
  31. package/assets/esri/core/workers/chunks/{3c0fd1c6cda44e9f40ab.js → 070684943698fa43c2b4.js} +1 -1
  32. package/assets/esri/core/workers/chunks/{bc1cb4b9a02e6c78deb7.js → 076e8d2e08ff2a013736.js} +1 -1
  33. package/assets/esri/core/workers/chunks/{c10e040368065411506a.js → 10445313d0d57b34511b.js} +1 -1
  34. package/assets/esri/core/workers/chunks/{d537c59b46cdaaf66034.js → 1188d0a136fffc009643.js} +1 -1
  35. package/assets/esri/core/workers/chunks/{20af3f085f60c32c6c53.js → 178083d8ed7707b45ca2.js} +1 -1
  36. package/assets/esri/core/workers/chunks/{f5efe3e800c6e23efcf3.js → 1819c45655c836b9a8d7.js} +1 -1
  37. package/assets/esri/core/workers/chunks/1b946714ca4a1a7359d4.js +2 -0
  38. package/assets/esri/core/workers/chunks/{d8d8b38ac8a91d9e45fc.js → 1cc744ab5eee5ee3bed8.js} +1 -1
  39. package/assets/esri/core/workers/chunks/{05e39b4de7f62c5b22cc.js → 20f75cc777af13fa249b.js} +1 -1
  40. package/assets/esri/core/workers/chunks/2a1ec30f9ad305763f81.js +2 -0
  41. package/assets/esri/core/workers/chunks/34570e6bbf559f18c1a5.js +1 -0
  42. package/assets/esri/core/workers/chunks/{60f6d5da9480dd36e877.js → 3dddae78286d05eb10fc.js} +1 -1
  43. package/assets/esri/core/workers/chunks/{9efd30bbd02ec0d1031b.js → 3ec3589f6e74d7cb87cf.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{0bec054fca104f3bf141.js → 3f776d9fd2ab68b21fca.js} +1 -1
  45. package/assets/esri/core/workers/chunks/402a82c77420254831bc.js +1 -0
  46. package/assets/esri/core/workers/chunks/{e2ebf0ea3af2e6907987.js → 406f24ec13eb30d43405.js} +1 -1
  47. package/assets/esri/core/workers/chunks/43fc42405167a5537039.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ddedc414bb478b376221.js → 46b2d4addfc73f9183a4.js} +1 -1
  49. package/assets/esri/core/workers/chunks/498d6dfd3bb0d3490548.js +1 -0
  50. package/assets/esri/core/workers/chunks/{36ef86701883a20dd6f6.js → 4a640548032355e57acd.js} +1 -1
  51. package/assets/esri/core/workers/chunks/5566f14afb63065e438f.js +1 -0
  52. package/assets/esri/core/workers/chunks/{c3b96d1d43afccd23e45.js → 590e6c70206122e4cc3c.js} +2 -2
  53. package/assets/esri/core/workers/chunks/{54860dd53a46cf4c47f3.js → 59295b99bdff4045a0e7.js} +1 -1
  54. package/assets/esri/core/workers/chunks/5aeb5e18514644fe2cf9.js +1 -0
  55. package/assets/esri/core/workers/chunks/{5da86409d70098fc6a10.js → 5b3cfe95314a75a735c1.js} +1 -1
  56. package/assets/esri/core/workers/chunks/{a54678bfa0f1807b61cd.js → 5c855af73ee3c3e764fb.js} +1 -1
  57. package/assets/esri/core/workers/chunks/{06da3409992bb1fa85b0.js → 5e90c1b49f2b7e21d05a.js} +39 -31
  58. package/assets/esri/core/workers/chunks/5fd099ca1024707387b2.js +1 -0
  59. package/assets/esri/core/workers/chunks/{30f808cac8a34f95ea6e.js → 6079d27f4ab319fb8f0c.js} +1 -1
  60. package/assets/esri/core/workers/chunks/66c2a28a851130b87c04.js +1 -0
  61. package/assets/esri/core/workers/chunks/{dac90b3631f7f7158f68.js → 67f15538c51838201fc7.js} +1 -1
  62. package/assets/esri/core/workers/chunks/{cfaba0470619786e1ef8.js → 68d8ae42ab71d01a70a5.js} +2 -2
  63. package/assets/esri/core/workers/chunks/6aebf7cfd294e88bf926.js +1 -0
  64. package/assets/esri/core/workers/chunks/{864e7030c4ddbfcf0114.js → 6ccf9535013fe672c93b.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{ba7f0cf7e495d3ec2d55.js → 6e62581d933e7298d1f6.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{83b5dd4029e00abd80bf.js → 700b1d5bc67b7e1b3ff3.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{f9fea72cc222a30ef2f9.js → 72399062767abdfb0bee.js} +1 -1
  68. package/assets/esri/core/workers/chunks/{2a7fbfd77002a24bf737.js → 747461bb6a1bc2f0a64d.js} +1 -1
  69. package/assets/esri/core/workers/chunks/{c333f6ed42985bb2b11f.js → 7851aef196eea5d6c94e.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{f0b6bd6fab5320c3082f.js → 7a05b18f655c1167ce0a.js} +1 -1
  71. package/assets/esri/core/workers/chunks/{04296b75d0f81fbd1bb5.js → 864194927d05ebc4cc31.js} +1 -1
  72. package/assets/esri/core/workers/chunks/{3c4a13a9f0b305394a26.js → 876f7633c15f1e31078d.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{62298dba3f6cbdc3f4ae.js → 879b2f0ff1977bca9376.js} +1 -1
  74. package/assets/esri/core/workers/chunks/{b547b3bce729c9dac90d.js → 898359be6996fd9763b8.js} +1 -1
  75. package/assets/esri/core/workers/chunks/8cb716f110d164030309.js +1 -0
  76. package/assets/esri/core/workers/chunks/8dc1c3042267618fd710.js +2 -0
  77. package/assets/esri/core/workers/chunks/{625f02db93d7fbf175ca.js → 9001e9a1e81bce175ddd.js} +1 -1
  78. package/assets/esri/core/workers/chunks/{9ffa6c8d93d3443834c6.js → 912080c90b5cc2e817cf.js} +1 -1
  79. package/assets/esri/core/workers/chunks/96c50a0dda0f1503ef92.js +2 -0
  80. package/assets/esri/core/workers/chunks/{13e4379441499599c3b5.js → 9cbde13e536676767900.js} +1 -1
  81. package/assets/esri/core/workers/chunks/{408db4f32850b77264ae.js → 9cd3fcb5fca6f9dbbcd8.js} +1 -1
  82. package/assets/esri/core/workers/chunks/a054da6cbd8ee4774a57.js +1 -0
  83. package/assets/esri/core/workers/chunks/a05790444115e4cf1bcc.js +1 -0
  84. package/assets/esri/core/workers/chunks/{d1f2685782b423ef87a6.js → a556dd4e9e6d35e33a2c.js} +1 -1
  85. package/assets/esri/core/workers/chunks/{00d576d355599c88931e.js → bc38def1983089514e4b.js} +1 -1
  86. package/assets/esri/core/workers/chunks/{0725e515f3004bdd5c56.js → ca2adcbcf44454484fd5.js} +1 -1
  87. package/assets/esri/core/workers/chunks/{f3507b9e831ffd7a6bf8.js → cca8bd07bcd1d267a2e8.js} +1 -1
  88. package/assets/esri/core/workers/chunks/cfae60b9d2f2939e9c16.js +1 -0
  89. package/assets/esri/core/workers/chunks/{1d6b2a64f4e40e5cc13d.js → d201fbf3ceff946d2bd6.js} +1 -1
  90. package/assets/esri/core/workers/chunks/{4439078780d9ba49fd26.js → d51bb11baadc741c46bc.js} +1 -1
  91. package/assets/esri/core/workers/chunks/db1ab9b9c8bf5c7635d3.js +1 -0
  92. package/assets/esri/core/workers/chunks/de02a6a1f4810f99e9bb.js +1 -0
  93. package/assets/esri/core/workers/chunks/e630f3c56c077cb2bd8e.js +1 -0
  94. package/assets/esri/core/workers/chunks/e81173724e8de8c1e65b.js +1 -0
  95. package/assets/esri/core/workers/chunks/{2025288bed125594ceda.js → f6e62d2d279a328cbed7.js} +1 -1
  96. package/assets/esri/core/workers/chunks/{47c19778fcee7154ca38.js → f8bc474434fd365ab174.js} +1 -1
  97. package/assets/esri/core/workers/chunks/{9a20dc26cb9c7b2087cf.js → f95a1f878c9c1146180e.js} +1 -1
  98. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ar.json +1 -1
  99. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bg.json +1 -1
  100. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.bs.json +1 -1
  101. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ca.json +1 -1
  102. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.cs.json +1 -1
  103. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.da.json +1 -1
  104. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.de.json +1 -1
  105. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.el.json +1 -1
  106. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.en.json +1 -1
  107. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.es.json +1 -1
  108. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.et.json +1 -1
  109. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fi.json +1 -1
  110. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.fr.json +1 -1
  111. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.he.json +1 -1
  112. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hr.json +1 -1
  113. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.hu.json +1 -1
  114. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.id.json +1 -1
  115. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.it.json +1 -1
  116. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ja.json +1 -1
  117. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ko.json +1 -1
  118. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lt.json +1 -1
  119. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.lv.json +1 -1
  120. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.nl.json +1 -1
  121. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.no.json +1 -1
  122. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pl.json +1 -1
  123. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-BR.json +1 -1
  124. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.pt-PT.json +1 -1
  125. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ro.json +1 -1
  126. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.ru.json +1 -1
  127. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sk.json +1 -1
  128. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sl.json +1 -1
  129. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sr.json +1 -1
  130. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.sv.json +1 -1
  131. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.th.json +1 -1
  132. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.tr.json +1 -1
  133. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.uk.json +1 -1
  134. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.vi.json +1 -1
  135. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-CN.json +1 -1
  136. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-HK.json +1 -1
  137. package/assets/esri/widgets/BatchAttributeForm/t9n/messages.zh-TW.json +1 -1
  138. package/assets/esri/widgets/FeatureForm/t9n/messages.ar.json +1 -1
  139. package/assets/esri/widgets/FeatureForm/t9n/messages.bg.json +1 -1
  140. package/assets/esri/widgets/FeatureForm/t9n/messages.bs.json +1 -1
  141. package/assets/esri/widgets/FeatureForm/t9n/messages.ca.json +1 -1
  142. package/assets/esri/widgets/FeatureForm/t9n/messages.cs.json +1 -1
  143. package/assets/esri/widgets/FeatureForm/t9n/messages.da.json +1 -1
  144. package/assets/esri/widgets/FeatureForm/t9n/messages.de.json +1 -1
  145. package/assets/esri/widgets/FeatureForm/t9n/messages.el.json +1 -1
  146. package/assets/esri/widgets/FeatureForm/t9n/messages.es.json +1 -1
  147. package/assets/esri/widgets/FeatureForm/t9n/messages.et.json +1 -1
  148. package/assets/esri/widgets/FeatureForm/t9n/messages.fi.json +1 -1
  149. package/assets/esri/widgets/FeatureForm/t9n/messages.fr.json +1 -1
  150. package/assets/esri/widgets/FeatureForm/t9n/messages.he.json +1 -1
  151. package/assets/esri/widgets/FeatureForm/t9n/messages.hr.json +1 -1
  152. package/assets/esri/widgets/FeatureForm/t9n/messages.hu.json +1 -1
  153. package/assets/esri/widgets/FeatureForm/t9n/messages.id.json +1 -1
  154. package/assets/esri/widgets/FeatureForm/t9n/messages.it.json +1 -1
  155. package/assets/esri/widgets/FeatureForm/t9n/messages.ja.json +1 -1
  156. package/assets/esri/widgets/FeatureForm/t9n/messages.ko.json +1 -1
  157. package/assets/esri/widgets/FeatureForm/t9n/messages.lt.json +1 -1
  158. package/assets/esri/widgets/FeatureForm/t9n/messages.lv.json +1 -1
  159. package/assets/esri/widgets/FeatureForm/t9n/messages.nl.json +1 -1
  160. package/assets/esri/widgets/FeatureForm/t9n/messages.no.json +1 -1
  161. package/assets/esri/widgets/FeatureForm/t9n/messages.pl.json +1 -1
  162. package/assets/esri/widgets/FeatureForm/t9n/messages.pt-BR.json +1 -1
  163. package/assets/esri/widgets/FeatureForm/t9n/messages.pt-PT.json +1 -1
  164. package/assets/esri/widgets/FeatureForm/t9n/messages.ro.json +1 -1
  165. package/assets/esri/widgets/FeatureForm/t9n/messages.ru.json +1 -1
  166. package/assets/esri/widgets/FeatureForm/t9n/messages.sk.json +1 -1
  167. package/assets/esri/widgets/FeatureForm/t9n/messages.sl.json +1 -1
  168. package/assets/esri/widgets/FeatureForm/t9n/messages.sr.json +1 -1
  169. package/assets/esri/widgets/FeatureForm/t9n/messages.sv.json +1 -1
  170. package/assets/esri/widgets/FeatureForm/t9n/messages.th.json +1 -1
  171. package/assets/esri/widgets/FeatureForm/t9n/messages.tr.json +1 -1
  172. package/assets/esri/widgets/FeatureForm/t9n/messages.uk.json +1 -1
  173. package/assets/esri/widgets/FeatureForm/t9n/messages.vi.json +1 -1
  174. package/assets/esri/widgets/FeatureForm/t9n/messages.zh-CN.json +1 -1
  175. package/assets/esri/widgets/FeatureForm/t9n/messages.zh-HK.json +1 -1
  176. package/assets/esri/widgets/FeatureForm/t9n/messages.zh-TW.json +1 -1
  177. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ar.json +1 -1
  178. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bg.json +1 -1
  179. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.bs.json +1 -1
  180. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ca.json +1 -1
  181. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.cs.json +1 -1
  182. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.da.json +1 -1
  183. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.de.json +1 -1
  184. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.el.json +1 -1
  185. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.en.json +1 -1
  186. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.es.json +1 -1
  187. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.et.json +1 -1
  188. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fi.json +1 -1
  189. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.fr.json +1 -1
  190. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.he.json +1 -1
  191. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hr.json +1 -1
  192. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.hu.json +1 -1
  193. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.id.json +1 -1
  194. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.it.json +1 -1
  195. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ja.json +1 -1
  196. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ko.json +1 -1
  197. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lt.json +1 -1
  198. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.lv.json +1 -1
  199. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.nl.json +1 -1
  200. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.no.json +1 -1
  201. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pl.json +1 -1
  202. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-BR.json +1 -1
  203. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.pt-PT.json +1 -1
  204. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ro.json +1 -1
  205. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.ru.json +1 -1
  206. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sk.json +1 -1
  207. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sl.json +1 -1
  208. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sr.json +1 -1
  209. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.sv.json +1 -1
  210. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.th.json +1 -1
  211. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.tr.json +1 -1
  212. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.uk.json +1 -1
  213. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.vi.json +1 -1
  214. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-CN.json +1 -1
  215. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-HK.json +1 -1
  216. package/assets/esri/widgets/OrientedImageryViewer/t9n/messages.zh-TW.json +1 -1
  217. package/chunks/Bufferer-CclWhXVb.js +1 -1
  218. package/chunks/Component.glsl.js +3 -3
  219. package/chunks/DefaultMaterial.glsl.js +2 -2
  220. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  221. package/chunks/Envelope.js +1 -1
  222. package/chunks/Envelope2D.js +1 -1
  223. package/chunks/FocusArea.glsl.js +8 -10
  224. package/chunks/GaussianSplat.glsl.js +2 -2
  225. package/chunks/GeodeticDistanceCalculator-zRp89-dW.js +1 -1
  226. package/chunks/GeodeticUtils.js +1 -1
  227. package/chunks/Geometry.js +1 -1
  228. package/chunks/GeometryCleaner-CIE8Wfmb.js +1 -1
  229. package/chunks/GlobalIllumination.glsl.js +3 -3
  230. package/chunks/LineMarker.glsl.js +35 -42
  231. package/chunks/MultiPathImpl.js +1 -1
  232. package/chunks/OperatorAffineTransform.js +1 -1
  233. package/chunks/OperatorClip.js +1 -1
  234. package/chunks/OperatorDensify.js +1 -1
  235. package/chunks/OperatorDistance.js +1 -1
  236. package/chunks/OperatorGeneralize.js +1 -1
  237. package/chunks/OperatorGeodesicBuffer.js +1 -1
  238. package/chunks/OperatorGeodeticArea.js +1 -1
  239. package/chunks/OperatorGeodeticDensifyByLength.js +1 -1
  240. package/chunks/OperatorGeodeticDistance.js +1 -1
  241. package/chunks/OperatorGeodeticLength.js +1 -1
  242. package/chunks/OperatorGraphicBuffer.js +1 -1
  243. package/chunks/OperatorIntegrate.js +1 -1
  244. package/chunks/OperatorMultiPartToSinglePart.js +1 -1
  245. package/chunks/OperatorProximity.js +1 -1
  246. package/chunks/OperatorProximityGeodesic.js +1 -1
  247. package/chunks/OperatorShapePreservingLength.js +1 -1
  248. package/chunks/OperatorShapePreservingProject.js +1 -1
  249. package/chunks/OperatorSimplifyOGC.js +1 -1
  250. package/chunks/Path.glsl.js +2 -2
  251. package/chunks/Point2D.js +1 -1
  252. package/chunks/RealisticTree.glsl.js +2 -2
  253. package/chunks/RibbonLine.glsl.js +51 -57
  254. package/chunks/SideCalculator2D-DX0718xq.js +1 -1
  255. package/chunks/Terrain.glsl.js +2 -2
  256. package/chunks/Transformation2D.js +1 -1
  257. package/chunks/UnitFactory.js +1 -1
  258. package/config.js +1 -1
  259. package/core/workers/RemoteClient.js +1 -1
  260. package/core/workers/workerFactory.js +1 -1
  261. package/editing/fieldUtils.d.ts +12 -0
  262. package/editing/sharedTemplates/templateDefinitions/TemplateDefinitionBase.js +1 -1
  263. package/geometry/operators/extendOperator.js +1 -1
  264. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  265. package/geometry/operators/gx/operatorBoundary.js +1 -1
  266. package/geometry/operators/gx/operatorBuffer.js +1 -1
  267. package/geometry/operators/gx/operatorConvexHull.js +1 -1
  268. package/geometry/operators/gx/operatorLabelPoint.js +1 -1
  269. package/geometry/operators/gx/operatorLinesToPolygons.js +1 -1
  270. package/geometry/operators/gx/operatorLocateBetween.js +1 -1
  271. package/geometry/operators/gx/operatorMinimumBoundingCircle.js +1 -1
  272. package/geometry/operators/gx/operatorOffset.js +1 -1
  273. package/geometry/operators/gx/operatorPolygonOverlay.js +1 -1
  274. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  275. package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
  276. package/geometry/operators/isNearOperator.js +1 -1
  277. package/geometry/operators/reshapeOperator.js +1 -1
  278. package/geometry/operators/support/jsonConverter.js +1 -1
  279. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  280. package/geometry/support/ellipseUtils.js +2 -0
  281. package/interfaces.d.ts +15 -18
  282. package/kernel.js +1 -1
  283. package/layers/LinkChartLayer.js +1 -1
  284. package/layers/ParquetLayer.js +1 -1
  285. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  286. package/layers/list/LayerItemCollection.d.ts +1 -0
  287. package/layers/list/types.d.ts +5 -1
  288. package/layers/orientedImagery/core/coverageUtils.js +1 -1
  289. package/layers/orientedImagery/queries.js +1 -1
  290. package/layers/support/TimeSeriesCalculation.d.ts +1 -1
  291. package/layers/support/TimeSeriesCalculation.js +1 -1
  292. package/layers/support/dataSeriesUtils.d.ts +10 -0
  293. package/layers/support/timeSeriesUtils.js +17 -6
  294. package/libs/lyr3d/Lyr3DModule.js +1 -1
  295. package/networks/UtilityNetwork.d.ts +15 -0
  296. package/networks/UtilityNetwork.js +1 -1
  297. package/package.json +4 -4
  298. package/popup/FeatureContent.d.ts +14 -1
  299. package/popup/FeatureContent.js +1 -1
  300. package/popup/FeatureContentCollection.d.ts +4 -10
  301. package/popup/FeatureContentCollection.js +1 -1
  302. package/popup/actions.js +1 -1
  303. package/popup/support/featureUtils.js +1 -1
  304. package/renderers/support/RenderingInfo.js +1 -1
  305. package/renderers/support/renderingInfoUtils.js +1 -1
  306. package/renderers/visualVariables/SizeVariable.d.ts +16 -20
  307. package/renderers/visualVariables/support/SizeStop.d.ts +6 -2
  308. package/rest/networks/support/TraceLocation.js +1 -1
  309. package/rest/networks/support/TraceResult.d.ts +7 -0
  310. package/rest/networks/support/TraceResult.js +1 -1
  311. package/smartMapping/renderers/color.js +1 -1
  312. package/smartMapping/renderers/opacity.js +1 -1
  313. package/smartMapping/renderers/size.js +1 -1
  314. package/smartMapping/renderers/support/timeSeriesUtils.js +1 -1
  315. package/smartMapping/statistics/histogramForTimeSeries.d.ts +11 -0
  316. package/smartMapping/statistics/histogramForTimeSeries.js +2 -0
  317. package/smartMapping/statistics/summaryStatisticsForTimeSeries.d.ts +11 -0
  318. package/smartMapping/statistics/summaryStatisticsForTimeSeries.js +2 -0
  319. package/smartMapping/statistics/support/timeSeriesUtils.js +24 -0
  320. package/smartMapping/statistics/types.d.ts +50 -0
  321. package/support/tests/serviceMockDependencies.js +1 -1
  322. package/support/tests/setupServiceMocksMesh.js +1 -1
  323. package/symbols/cim/CIMPlacements.js +1 -1
  324. package/symbols/cim/callouts/calloutAnalysisUtils.js +1 -1
  325. package/symbols/cim/callouts/effects/BackgroundCallout.js +1 -1
  326. package/symbols/cim/callouts/effects/BalloonCallout.js +1 -1
  327. package/symbols/cim/callouts/effects/PointSymbolCallout.js +1 -1
  328. package/symbols/cim/callouts/effects/calloutUtils.js +1 -1
  329. package/symbols/cim/cimAnalyzer.js +1 -1
  330. package/views/2d/analysis/AreaMeasurement/AreaMeasurementTool.js +1 -1
  331. package/views/2d/analysis/DistanceMeasurement/DistanceMeasurementTool.js +1 -1
  332. package/views/2d/engine/vectorTiles/decluttering/CollisionJob.js +1 -1
  333. package/views/2d/engine/vectorTiles/decluttering/SymbolFader.js +1 -1
  334. package/views/2d/engine/vectorTiles/decluttering/jobsUtil.js +1 -1
  335. package/views/2d/engine/webgl/collisions/LabelMetric.js +1 -1
  336. package/views/2d/engine/webgl/definitions.js +1 -1
  337. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AAnimatedShader.js +1 -1
  338. package/views/2d/engine/webgl/shaderGraph/techniques/animated/AnimatedPolyMeshWriters.js +1 -1
  339. package/views/2d/engine/webgl/shaderGraph/techniques/animated/ComputedAnimatedParams.js +1 -1
  340. package/views/2d/engine/webgl/shaderGraph/techniques/markers/ComputedMarkerParams.js +1 -1
  341. package/views/2d/engine/webgl/shaderGraph/techniques/mesh/CalloutMeshWriterPolicy.js +1 -1
  342. package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
  343. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextParams.js +1 -1
  344. package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
  345. package/views/2d/layers/SketchLayerView2D.js +1 -1
  346. package/views/2d/layers/features/layerAdapters/AnnotationLayerAdapter.js +1 -1
  347. package/views/2d/layers/features/layerAdapters/CatalogFootprintLayerAdapter.js +1 -1
  348. package/views/2d/layers/features/layerAdapters/DimensionLayerAdapter.js +1 -1
  349. package/views/2d/layers/features/layerAdapters/FeatureLayerAdapter.js +1 -1
  350. package/views/2d/layers/features/layerAdapters/InMemoryLayerAdapter.js +1 -1
  351. package/views/2d/layers/features/layerAdapters/KnowledgeGraphSublayerAdapter.js +1 -1
  352. package/views/2d/layers/features/layerAdapters/OGCFeatureLayerAdapter.js +1 -1
  353. package/views/2d/layers/features/layerAdapters/OrientedImageryLayerAdapter.js +1 -1
  354. package/views/2d/layers/features/layerAdapters/ParquetLayerAdapter.js +1 -1
  355. package/views/2d/layers/features/layerAdapters/StreamLayerAdapter.js +1 -1
  356. package/views/2d/layers/features/layerAdapters/SubtypeGroupLayerAdapter.js +1 -1
  357. package/views/2d/layers/features/layerAdapters/labelingUtils.js +1 -1
  358. package/views/2d/layers/features/schema/ExceedsLimitCache.js +1 -1
  359. package/views/2d/layers/features/schema/TimeSchema.js +2 -0
  360. package/views/2d/layers/features/schema/processor/LabelMatcherSchema.js +1 -1
  361. package/views/2d/layers/features/schema/processor/MatcherSchema.js +1 -1
  362. package/views/2d/layers/features/schema/processor/symbols/SymbolSchema.js +1 -1
  363. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  364. package/views/2d/layers/features/sources/strategies/ParquetTileLoadStrategy.js +1 -1
  365. package/views/2d/layers/support/annodime/cimAnnotations.js +1 -1
  366. package/views/2d/layers/support/vectorTileDebugUtils.js +1 -1
  367. package/views/2d/layers/support/visualVariableSimpleUtils.js +1 -1
  368. package/views/2d/types.d.ts +2 -1
  369. package/views/3d/analysis/LineOfSight/LineOfSightEditTool.js +1 -1
  370. package/views/3d/analysis/LineOfSight/LineOfSightItemManipulatedObject3D.js +1 -1
  371. package/views/3d/analysis/LineOfSight/LineOfSightItemTool.js +1 -1
  372. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +24 -0
  373. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  374. package/views/3d/analysis/Viewshed/ViewshedObserverManipulatedObject3D.js +1 -1
  375. package/views/3d/analysis/Viewshed/ViewshedPlacementController.js +1 -1
  376. package/views/3d/analysis/Viewshed/ViewshedSubTool.js +1 -1
  377. package/views/3d/analysis/VolumeMeasurement/VolumeMeasurementShiftTool.js +1 -1
  378. package/views/3d/camera/constraintUtils.js +1 -1
  379. package/views/3d/input/handlers/ground/GroundDoubleClickMove.js +1 -1
  380. package/views/3d/input/handlers/ground/GroundNavigation.js +1 -1
  381. package/views/3d/interactive/editingTools/tooltipUtils3D.js +1 -1
  382. package/views/3d/interactive/placementTools/GroundNavigationPlacementTool3D.js +1 -1
  383. package/views/3d/layers/graphics/Graphics3DLineSymbolLayer.js +1 -1
  384. package/views/3d/layers/i3s/I3SOverrides.js +1 -1
  385. package/views/3d/layers/support/FastSymbolUpdates.js +1 -1
  386. package/views/3d/state/controllers/GroundNavigationController.js +1 -1
  387. package/views/3d/state/controllers/momentum/GroundNavigationMomentumController.js +1 -1
  388. package/views/3d/state/utils/OffsetCorrectionController.js +1 -1
  389. package/views/3d/state/utils/groundNavigationUtils.js +1 -1
  390. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  391. package/views/3d/webgl-engine/collections/Component/Material/ComponentTechniqueConfiguration.js +1 -1
  392. package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +16 -8
  393. package/views/3d/webgl-engine/core/shaderLibrary/shading/LineStipple.glsl.js +5 -1
  394. package/views/3d/webgl-engine/core/shaderLibrary/shading/evaluateSceneLightingFragment.glsl.js +12 -0
  395. package/views/3d/webgl-engine/core/shaderLibrary/terrain/Overlay.glsl.js +2 -2
  396. package/views/3d/webgl-engine/effects/focusArea/FocusArea.glsl.js +1 -1
  397. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +1 -1
  398. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  399. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  400. package/views/3d/webgl-engine/shaders/LineMarker.glsl.js +1 -1
  401. package/views/3d/webgl-engine/shaders/RibbonLine.glsl.js +1 -1
  402. package/views/SelectionManager.d.ts +3 -3
  403. package/views/draw/support/Reshape.js +1 -1
  404. package/views/interactive/options/bindViewToolOptions.js +1 -1
  405. package/views/interactive/sketch/SketchLabelOptions.d.ts +3 -0
  406. package/views/interactive/sketch/SketchLabelOptions.js +1 -1
  407. package/views/interactive/sketch/SketchTooltipOptions.d.ts +3 -0
  408. package/views/interactive/sketch/SketchTooltipOptions.js +1 -1
  409. package/views/interactive/sketch/SketchValueOptions.d.ts +3 -0
  410. package/views/interactive/sketch/SketchValueOptions.js +1 -1
  411. package/views/interactive/snapping/SnappingOptions.d.ts +3 -0
  412. package/views/interactive/snapping/SnappingOptions.js +1 -1
  413. package/views/interactive/snapping/snappingUtils.js +1 -1
  414. package/views/interactive/tooltip/fields/parsingAndFormattingUtils.js +1 -1
  415. package/views/layers/SketchLayerView.d.ts +34 -0
  416. package/views/layers/SketchLayerView.js +2 -0
  417. package/views/layers/types.d.ts +3 -2
  418. package/views/selection/types.d.ts +15 -4
  419. package/widgets/BasemapGallery/BasemapGalleryViewModel.js +1 -1
  420. package/widgets/BasemapGallery.js +1 -1
  421. package/widgets/Bookmarks/BookmarksViewModel.d.ts +4 -0
  422. package/widgets/Bookmarks/BookmarksVisibleElements.d.ts +5 -1
  423. package/widgets/Bookmarks/types.d.ts +2 -0
  424. package/widgets/Editor/EditorViewModel.d.ts +31 -30
  425. package/widgets/Editor/EditorViewModel.js +1 -1
  426. package/widgets/Editor/components/Settings.js +1 -1
  427. package/widgets/Editor/types.d.ts +44 -0
  428. package/widgets/Editor.d.ts +30 -27
  429. package/widgets/Editor.js +1 -1
  430. package/widgets/FeatureTable/FeatureTableViewModel.d.ts +1 -1
  431. package/widgets/FeatureTable/FeatureTableViewModel.js +1 -1
  432. package/widgets/FeatureTable/support/FeatureStore.d.ts +1 -1
  433. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  434. package/widgets/FeatureTable.d.ts +6 -0
  435. package/widgets/FeatureTable.js +1 -1
  436. package/widgets/Histogram/types.d.ts +10 -2
  437. package/widgets/HistogramRangeSlider/types.d.ts +4 -1
  438. package/widgets/LayerList/LayerListViewModel.d.ts +2 -1
  439. package/widgets/Legend/LegendViewModel.d.ts +2 -0
  440. package/widgets/Legend/styles/card/CardView.d.ts +2 -0
  441. package/widgets/Legend/styles/classic/ClassicView.d.ts +4 -1
  442. package/widgets/Legend.d.ts +3 -0
  443. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.d.ts +7 -0
  444. package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
  445. package/widgets/OrientedImageryViewer/components/OrientedImageryVideoViewModel.js +1 -1
  446. package/widgets/OrientedImageryViewer/support/VideoFeatureCache.js +2 -0
  447. package/widgets/OrientedImageryViewer/types.d.ts +9 -0
  448. package/widgets/OrientedImageryViewer.d.ts +7 -0
  449. package/widgets/OrientedImageryViewer.js +2 -2
  450. package/widgets/PanoramicVideoViewer.js +1 -1
  451. package/widgets/PanoramicViewer/PanoramicVideoViewerViewModel.js +1 -1
  452. package/widgets/ScaleRangeSlider/types.d.ts +9 -2
  453. package/widgets/Sketch/SketchViewModel.d.ts +32 -1
  454. package/widgets/Sketch/SketchViewModel.js +1 -1
  455. package/widgets/Sketch.d.ts +27 -1
  456. package/widgets/Sketch.js +1 -1
  457. package/widgets/Slider/types.d.ts +58 -13
  458. package/widgets/Slider.d.ts +6 -0
  459. package/widgets/smartMapping/BinaryColorSizeSlider/BinaryColorSizeSliderViewModel.d.ts +2 -0
  460. package/widgets/smartMapping/ClassedColorSlider/ClassedColorSliderViewModel.d.ts +2 -0
  461. package/widgets/smartMapping/ClassedSizeSlider/ClassedSizeSliderViewModel.d.ts +2 -0
  462. package/widgets/smartMapping/ColorSizeSlider/ColorSizeSliderViewModel.d.ts +2 -0
  463. package/widgets/smartMapping/ColorSlider/ColorSliderViewModel.d.ts +2 -0
  464. package/widgets/smartMapping/HeatmapSlider/HeatmapSliderViewModel.d.ts +2 -0
  465. package/widgets/smartMapping/OpacitySlider/OpacitySliderViewModel.d.ts +2 -0
  466. package/widgets/smartMapping/SizeSlider/SizeSliderViewModel.d.ts +3 -0
  467. package/widgets/smartMapping/SmartMappingPrimaryHandleSliderViewModel.d.ts +2 -0
  468. package/widgets/smartMapping/SmartMappingSliderViewModel.d.ts +2 -0
  469. package/widgets/smartMapping/types.d.ts +30 -7
  470. package/widgets/support/FilterBuilder/FilterBuilderViewModel.d.ts +21 -11
  471. package/widgets/support/FilterBuilder/FilterBuilderViewModel.js +1 -1
  472. package/widgets/support/FilterBuilder/types.d.ts +28 -0
  473. package/widgets/support/FilterBuilder.js +1 -1
  474. package/widgets/support/FilterCondition/FilterConditionViewModel.d.ts +24 -0
  475. package/widgets/support/FilterCondition/FilterConditionViewModel.js +1 -1
  476. package/widgets/support/FilterCondition/types.d.ts +16 -1
  477. package/widgets/support/FilterCondition.js +1 -1
  478. package/widgets/support/SnappingControls/snappingLayerListUtils.js +1 -1
  479. package/widgets/support/iconUtils.js +1 -1
  480. package/assets/esri/core/workers/chunks/0606ab6fdfc1dfea3856.js +0 -1
  481. package/assets/esri/core/workers/chunks/078dcd17f46403d44b24.js +0 -1
  482. package/assets/esri/core/workers/chunks/1289204f8ca96032c17a.js +0 -1
  483. package/assets/esri/core/workers/chunks/12b5a645c0987a0efe54.js +0 -2
  484. package/assets/esri/core/workers/chunks/152fe3d6ad7aebbd23d1.js +0 -1
  485. package/assets/esri/core/workers/chunks/17b938ba49fb1e7ab8c4.js +0 -1
  486. package/assets/esri/core/workers/chunks/1dbb3e25e005a8220779.js +0 -2
  487. package/assets/esri/core/workers/chunks/3d6fef25af7e1a51e1bd.js +0 -1
  488. package/assets/esri/core/workers/chunks/3ef367c9b7bf1588307d.js +0 -1
  489. package/assets/esri/core/workers/chunks/5f4feca26102088ea565.js +0 -1
  490. package/assets/esri/core/workers/chunks/74211d096cc3296e0968.js +0 -1
  491. package/assets/esri/core/workers/chunks/7926faab76a721a2e1c4.js +0 -1
  492. package/assets/esri/core/workers/chunks/ad28486bc6afaa346de5.js +0 -1
  493. package/assets/esri/core/workers/chunks/ad29c729e90b5866713c.js +0 -1
  494. package/assets/esri/core/workers/chunks/b72a2514aa4cc4ae7d1b.js +0 -1
  495. package/assets/esri/core/workers/chunks/bb51cf52b8ea8283f4f8.js +0 -1
  496. package/assets/esri/core/workers/chunks/be761749f8d77fbd9df5.js +0 -1
  497. package/assets/esri/core/workers/chunks/dbfd25aa0d19aed5890c.js +0 -1
  498. package/assets/esri/core/workers/chunks/de28a86775235bd5d3c4.js +0 -2
  499. package/assets/esri/core/workers/chunks/f6cfc901267a229de7a1.js +0 -2
  500. package/assets/esri/core/workers/chunks/fb147097149a89e671ff.js +0 -1
  501. package/support/revision.js +0 -2
  502. /package/assets/esri/core/workers/chunks/{1dbb3e25e005a8220779.js.LICENSE.txt → 1b946714ca4a1a7359d4.js.LICENSE.txt} +0 -0
  503. /package/assets/esri/core/workers/chunks/{f6cfc901267a229de7a1.js.LICENSE.txt → 2a1ec30f9ad305763f81.js.LICENSE.txt} +0 -0
  504. /package/assets/esri/core/workers/chunks/{c3b96d1d43afccd23e45.js.LICENSE.txt → 590e6c70206122e4cc3c.js.LICENSE.txt} +0 -0
  505. /package/assets/esri/core/workers/chunks/{cfaba0470619786e1ef8.js.LICENSE.txt → 68d8ae42ab71d01a70a5.js.LICENSE.txt} +0 -0
  506. /package/assets/esri/core/workers/chunks/{de28a86775235bd5d3c4.js.LICENSE.txt → 8dc1c3042267618fd710.js.LICENSE.txt} +0 -0
  507. /package/assets/esri/core/workers/chunks/{12b5a645c0987a0efe54.js.LICENSE.txt → 96c50a0dda0f1503ef92.js.LICENSE.txt} +0 -0
@@ -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 n from"../core/Error.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{watch as i}from"../core/reactiveUtils.js";import{property as a,subclass as o}from"../core/accessorSupport/decorators.js";import{getGraphicLayer as s}from"../graphic/graphicOriginUtils.js";import c from"../layers/FeatureLayer.js";import{queryAllJSON as l}from"../layers/support/featureQueryAll.js";import u from"./Network.js";import d from"./RulesTable.js";import f from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as p}from"./support/networkFieldUtils.js";import m from"./support/NetworkSystemLayers.js";import h from"./support/TerminalConfiguration.js";import g from"./support/TraceJobInfo.js";import{AssociationTypeEnum as _,nullGuid as v,associationTypeKebabDict as y}from"./support/typeUtils.js";import{doesRuleAllowAssociation as b}from"./support/utils.js";import x from"../rest/networks/support/TelecomNetworkElement.js";import S from"../rest/support/Query.js";let C=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(i(()=>[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(){let{gdbVersion:e,historicMoment:t}=this,n=this.networkSystemLayers.rulesTableUrl;return new c({url:n,gdbVersion:e,historicMoment:t})}get _telecomSourceSet(){let 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(){let e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:n})=>{this._layerIdBySourceId.set(n,t),this._sourceIdByLayerId.set(t,n),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:n})=>{this._layerIdBySourceId.set(n,t),this._sourceIdByLayerId.set(t,n),e.add(t)})}),e}get serviceTerritoryFeatureLayerId(){return this.dataElement?.serviceTerritoryFeatureLayerId??null}get networkSystemLayers(){return new m({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);let{dataElement:t,layerId:r,sourceJSON:i}=this;if(!(t&&`domainNetworks`in t&&Array.isArray(t.domainNetworks)))throw new n(`network:invalid-data-element`,`The data element for layer ${r} does not have the expected properties for a utility network.`);if(!(i&&`type`in i&&typeof i.type==`string`&&i.type===`Utility Network Layer`))throw new n(`network:invalid-layer`,`The metadata for layer ${r} 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,n=null,r=s(e)??null,i=null;if(r?.type===`feature`){if(i=r.layerId,i===null)return null}else if(r?.type===`subtype-sublayer`){if(i=r?.parent?.layerId??null,i===null)return null}else return null;let a=e.attributes;if(a==null)return null;for(let r of Object.keys(a))r.toUpperCase()===`ASSETGROUP`&&(t=e.getAttribute(r)),r.toUpperCase()===`ASSETTYPE`&&(n=e.getAttribute(r));if(!this.dataElement)return null;let o=null,c=this.dataElement.domainNetworks;for(let e of c){let r=e.junctionSources?.find(e=>e.layerId===i);if(r){let e=r.assetGroups?.find(e=>e.assetGroupCode===t);if(e){let t=e.assetTypes?.find(e=>e.assetTypeCode===n);if(t?.isTerminalConfigurationSupported){o=t.terminalConfigurationId;break}}}}if(o!=null){let e=this.dataElement.terminalConfigurations?.find(e=>e.terminalConfigurationId===o);return e?h.fromJSON(e):null}return null}getTierNames(e){return(this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e))?.tiers?.map(e=>e.name)||[]}async getRulesTable(){let e=this._rulesLayer;e.loaded||await e.load();let t=this.dataElement?.domainNetworks;if(!t)return null;let n=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),r=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,n,t));return new d({rulesLayer:e,rules:r})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;let t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;let{default:n}=await import(`./CircuitManager.js`);return r(this._circuitManagerMap,e,()=>new n({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;let{default:e}=await import(`./UnitIdentifierManager.js`);return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){return!this.dataElement||e==null?null:this._terminalById.get(e)??(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return`layerId`in e?e.layerId!=null&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):e.type===`subtype-sublayer`&&e.parent?this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1):!1}async queryAssociations(e,t){let[{queryAssociations:n},{default:r}]=await Promise.all([import(`../rest/networks/queryAssociations.js`),import(`../rest/networks/support/QueryAssociationsParameters.js`)]),i=r.from(e);return i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment,(await n(this.networkServiceUrl,i,t)).associations}async synthesizeAssociationGeometries(e){let[{synthesizeAssociationGeometries:t},{default:n}]=await Promise.all([import(`../rest/networks/synthesizeAssociationGeometries.js`),import(`../rest/networks/support/SynthesizeAssociationGeometriesParameters.js`)]),r=n.from(e);return r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment,t(this.networkServiceUrl,r)}async trace(e){let[{trace:t},{default:n}]=await Promise.all([import(`../rest/networks/trace.js`),import(`../rest/networks/support/TraceParameters.js`)]),r=n.from({...e,telecomSourceSet:this._telecomSourceSet});return r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment,t(this.networkServiceUrl,r)}async submitTraceJob(e){let[{submitTraceJob:t},{default:n}]=await Promise.all([import(`../rest/networks/trace.js`),import(`../rest/networks/support/TraceParameters.js`)]),r=n.from(e);r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment;let i=await t(this.networkServiceUrl,r);return new g({statusUrl:i,telecomSourceSet:this._telecomSourceSet})}async canAddAssociation(e){let t=await this.getRulesTable();if(!t)return!1;let{fromNetworkElement:n,toNetworkElement:r}=e;if(!n||!r)return!1;await t.load();let i=null;switch(e.associationType){case`containment`:i=t.rulesCategorized.containment;break;case`attachment`:i=t.rulesCategorized.attachment;break;default:i=t.rulesCategorized.connectivity}return i.some(e=>b(e,n,r))}generateAddAssociations(e){let{associationsTable:n}=this.networkSystemLayers,{fromNetworkSourceId:r,fromGlobalId:i,fromTerminalId:a,fromFirstUnit:o,fromLastUnit:s,toNetworkSourceId:c,toGlobalId:l,toTerminalId:u,toFirstUnit:d,toLastUnit:f,associationType:m,isContentVisible:h,percentAlong:g,globalId:v}=p(n);return{addFeatures:e.map(e=>{let n=new t({attributes:{[r]:e.fromNetworkElement?.networkSourceId,[i]:e.fromNetworkElement?.globalId,[a]:e.fromNetworkElement?.terminalId,[c]:e.toNetworkElement?.networkSourceId,[l]:e.toNetworkElement?.globalId,[u]:e.toNetworkElement?.terminalId,[m]:_[e.associationType],[h]:e.isContentVisible==null?void 0:+!!e.isContentVisible,[g]:e.percentAlong,[v]:e.globalId}}),p=e.associationType.includes(`connectivity`);return e.fromNetworkElement instanceof x&&(n.attributes[o]=e.fromNetworkElement?.firstUnit,n.attributes[s]=e.fromNetworkElement?.lastUnit),e.toNetworkElement instanceof x&&(n.attributes[d]=e.toNetworkElement?.firstUnit,n.attributes[f]=e.toNetworkElement?.lastUnit),p&&(n.attributes[a]=e.fromNetworkElement?.terminalId??1,n.attributes[u]=e.toNetworkElement?.terminalId??1),n}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:n?.globalIdField??`globalid`,objectIdField:n?.objectIdField??`objectid`}}}generateDeleteAssociations(e){let{associationsTable:t,associationsTableId:n}=this.networkSystemLayers,r={id:n,identifierFields:{globalIdField:t?.globalIdField??`globalid`,objectIdField:t?.objectIdField??`objectid`}};if(this.dataElement?.schemaGeneration===-8){let t=this._generateDeleteTelecomAssociationPayload(e);return{...r,deleteAssociations:t}}let i=e.map(e=>({globalId:e.globalId}));return{...r,deleteFeatures:i}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}async _loadNamedTraceConfigurationsFromNetwork(e){if(this.sharedNamedTraceConfigurations?.length===0)return;let t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),n=await this.queryNamedTraceConfigurations({globalIds:t},e);for(let e of this.sharedNamedTraceConfigurations){let t=n?.find(t=>t.globalId===e.globalId);if(t){let n=t.write({},{origin:`service`});e.read(n,{origin:`service`})}}}_hydrateRuleInfo(e,t,n){let r=e.fieldsIndex,i=r.get(`RULETYPE`),a=r.get(`CREATIONDATE`),o=r.get(`FROMNETWORKSOURCEID`),s=r.get(`FROMASSETGROUP`),c=r.get(`FROMASSETTYPE`),l=r.get(`FROMTERMINALID`),u=r.get(`TONETWORKSOURCEID`),d=r.get(`TOASSETGROUP`),f=r.get(`TOASSETTYPE`),p=r.get(`TOTERMINALID`),m=r.get(`VIANETWORKSOURCEID`),h=r.get(`VIAASSETGROUP`),g=r.get(`VIAASSETTYPE`),_=r.get(`VIATERMINALID`),v=n.attributes[i.name],y=new Date(n.attributes[a.name]),b=n.attributes[o.name],x=n.attributes[s.name],S=n.attributes[c.name],C=n.attributes[l.name],w=n.attributes[u.name],T=n.attributes[d.name],E=n.attributes[f.name],D=n.attributes[p.name],O=n.attributes[m.name],k=n.attributes[h.name],A=n.attributes[g.name],j=n.attributes[_.name],M=[{networkSourceId:b,assetGroupId:x,assetTypeId:S,terminalId:C},{networkSourceId:w,assetGroupId:T,assetTypeId:E,terminalId:D},{networkSourceId:O,assetGroupId:k,assetTypeId:A,terminalId:j}],N={ruleType:v,creationDate:y};for(let e of[0,1,2]){if(v!==5&&e===2)continue;let n=M[e],r=t.find(e=>e.sourceId===n.networkSourceId),i=r?.assetGroups.find(e=>e.assetGroupCode===n.assetGroupId),a=i?.assetTypes.find(e=>e.assetTypeCode===n.assetTypeId),o=this._getTerminal(a,n),s=``;switch(e){case 0:s=`from`;break;case 1:s=`to`;break;case 2:s=`via`}N[`${s}NetworkSource`]=r,N[`${s}AssetGroup`]=i,N[`${s}AssetType`]=a,N[`${s}Terminal`]=o?.toJSON()}return N}_getTerminal(e,t){let n=e?.terminalConfigurationId;return(this.terminalConfigurations?.find(e=>e.id===n))?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){let{gdbVersion:t,historicMoment:n}=this,r=new S({where:`1=1`,outFields:[`*`],gdbVersion:t,historicMoment:n});return(await l(e,r)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??v,associationType:y.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([a({readOnly:!0})],C.prototype,`_rulesLayer`,null),e([a({readOnly:!0})],C.prototype,`_telecomSourceSet`,null),e([a({type:[f],json:{origins:{"web-map":{read:{source:`traceConfigurations`},write:{target:`traceConfigurations`}},service:{read:{source:`traceConfigurations`}}},read:!1}})],C.prototype,`sharedNamedTraceConfigurations`,void 0),e([a({type:[`utility`],readOnly:!0,json:{read:!1,write:!1}})],C.prototype,`type`,void 0),e([a({readOnly:!0})],C.prototype,`serviceTerritoryFeatureLayerId`,null),e([a({readOnly:!0})],C.prototype,`networkSystemLayers`,null),e([a({readOnly:!0})],C.prototype,`terminalConfigurations`,null),e([a({readOnly:!0})],C.prototype,`domainNetworkNames`,null),e([a({readOnly:!0})],C.prototype,`hasTelecomNetwork`,null),e([a({readOnly:!0,json:{read:!1}})],C.prototype,`associationsTable`,null),C=e([o(`esri.networks.UtilityNetwork`)],C);const w=C;export{w as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../core/Error.js";import{getOrCreateMapValue as r}from"../core/MapUtils.js";import{watch as i}from"../core/reactiveUtils.js";import{property as a,subclass as o}from"../core/accessorSupport/decorators.js";import{getGraphicLayer as s}from"../graphic/graphicOriginUtils.js";import c from"../layers/FeatureLayer.js";import{queryAllJSON as l}from"../layers/support/featureQueryAll.js";import{isSubtypeSublayer as u}from"../layers/support/layerUtils.js";import d from"./Network.js";import f from"./RulesTable.js";import p from"./support/NamedTraceConfiguration.js";import{getAssociationsTableFields as m}from"./support/networkFieldUtils.js";import h from"./support/NetworkSystemLayers.js";import g from"./support/TerminalConfiguration.js";import _ from"./support/TraceJobInfo.js";import{AssociationTypeEnum as v,nullGuid as y,associationTypeKebabDict as b}from"./support/typeUtils.js";import{doesRuleAllowAssociation as x}from"./support/utils.js";import S from"../rest/networks/support/TelecomNetworkElement.js";import C from"../rest/networks/support/TraceLocation.js";import w from"../rest/support/Query.js";let T=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(i(()=>[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(){let{gdbVersion:e,historicMoment:t}=this,n=this.networkSystemLayers.rulesTableUrl;return new c({url:n,gdbVersion:e,historicMoment:t})}get _telecomSourceSet(){let 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(){let e=new Set;return this.dataElement?.domainNetworks?.map(t=>{t?.edgeSources?.map(({layerId:t,sourceId:n})=>{this._layerIdBySourceId.set(n,t),this._sourceIdByLayerId.set(t,n),e.add(t)}),t?.junctionSources?.map(({layerId:t,sourceId:n})=>{this._layerIdBySourceId.set(n,t),this._sourceIdByLayerId.set(t,n),e.add(t)})}),e}get _edgeSourceLayerIds(){let e=this.dataElement?.domainNetworks;return e?e.flatMap(e=>e.edgeSources).map(e=>e.layerId).filter(Boolean):[]}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=>g.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);let{dataElement:t,layerId:r,sourceJSON:i}=this;if(!(t&&`domainNetworks`in t&&Array.isArray(t.domainNetworks)))throw new n(`network:invalid-data-element`,`The data element for layer ${r} does not have the expected properties for a utility network.`);if(!(i&&`type`in i&&typeof i.type==`string`&&i.type===`Utility Network Layer`))throw new n(`network:invalid-layer`,`The metadata for layer ${r} 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,n=null,r=s(e)??null,i=null;if(r?.type===`feature`){if(i=r.layerId,i===null)return null}else if(r?.type===`subtype-sublayer`){if(i=r?.parent?.layerId??null,i===null)return null}else return null;let a=e.attributes;if(a==null)return null;for(let r of Object.keys(a))r.toUpperCase()===`ASSETGROUP`&&(t=e.getAttribute(r)),r.toUpperCase()===`ASSETTYPE`&&(n=e.getAttribute(r));if(!this.dataElement)return null;let o=null,c=this.dataElement.domainNetworks;for(let e of c){let r=e.junctionSources?.find(e=>e.layerId===i);if(r){let e=r.assetGroups?.find(e=>e.assetGroupCode===t);if(e){let t=e.assetTypes?.find(e=>e.assetTypeCode===n);if(t?.isTerminalConfigurationSupported){o=t.terminalConfigurationId;break}}}}if(o!=null){let e=this.dataElement.terminalConfigurations?.find(e=>e.terminalConfigurationId===o);return e?g.fromJSON(e):null}return null}getTierNames(e){return(this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e))?.tiers?.map(e=>e.name)||[]}async getRulesTable(){let e=this._rulesLayer;e.loaded||await e.load();let t=this.dataElement?.domainNetworks;if(!t)return null;let n=t.flatMap(e=>[...e.edgeSources||[],...e.junctionSources||[]]),r=(await this._queryRulesTable(e)).map(t=>this._hydrateRuleInfo(e,n,t));return new f({rulesLayer:e,rules:r})}async getCircuitManager(e){if(!this.hasTelecomNetwork)return null;let t=this.dataElement?.domainNetworks.find(t=>t.domainNetworkName===e&&t.isTelecomNetwork);if(!t)return null;let{default:n}=await import(`./CircuitManager.js`);return r(this._circuitManagerMap,e,()=>new n({utilityNetwork:this,telecomDomainNetwork:t}))}async getUnitIdentifierManager(){if(!this.hasTelecomNetwork)return null;if(this._unitIdentifierManager)return this._unitIdentifierManager;let{default:e}=await import(`./UnitIdentifierManager.js`);return this._unitIdentifierManager=new e({utilityNetwork:this}),this._unitIdentifierManager}getTerminalById(e){return!this.dataElement||e==null?null:this._terminalById.get(e)??(this.terminalConfigurations.forEach(e=>{e.terminals.forEach(e=>{this._terminalById.set(e.id,e)})}),this._terminalById.get(e))}isUtilityLayer(e){return`layerId`in e?e.layerId!=null&&this._utilityLayerList.has(e.layerId)&&(e.url?.startsWith(this.featureServiceUrl)??!1):e.type===`subtype-sublayer`&&e.parent?this._utilityLayerList.has(e.parent.layerId)&&(e.parent.url?.startsWith(this.featureServiceUrl)??!1):!1}async queryAssociations(e,t){let[{queryAssociations:n},{default:r}]=await Promise.all([import(`../rest/networks/queryAssociations.js`),import(`../rest/networks/support/QueryAssociationsParameters.js`)]),i=r.from(e);return i.gdbVersion=this.gdbVersion,i.moment=this.historicMoment,(await n(this.networkServiceUrl,i,t)).associations}async synthesizeAssociationGeometries(e){let[{synthesizeAssociationGeometries:t},{default:n}]=await Promise.all([import(`../rest/networks/synthesizeAssociationGeometries.js`),import(`../rest/networks/support/SynthesizeAssociationGeometriesParameters.js`)]),r=n.from(e);return r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment,t(this.networkServiceUrl,r)}async trace(e){let[{trace:t},{default:n}]=await Promise.all([import(`../rest/networks/trace.js`),import(`../rest/networks/support/TraceParameters.js`)]),r=n.from({...e,telecomSourceSet:this._telecomSourceSet});return r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment,t(this.networkServiceUrl,r)}async submitTraceJob(e){let[{submitTraceJob:t},{default:n}]=await Promise.all([import(`../rest/networks/trace.js`),import(`../rest/networks/support/TraceParameters.js`)]),r=n.from(e);r.gdbVersion=this.gdbVersion,r.moment=this.historicMoment;let i=await t(this.networkServiceUrl,r);return new _({statusUrl:i,telecomSourceSet:this._telecomSourceSet})}async canAddAssociation(e){let t=await this.getRulesTable();if(!t)return!1;let{fromNetworkElement:n,toNetworkElement:r}=e;if(!n||!r)return!1;await t.load();let i=null;switch(e.associationType){case`containment`:i=t.rulesCategorized.containment;break;case`attachment`:i=t.rulesCategorized.attachment;break;default:i=t.rulesCategorized.connectivity}return i.some(e=>x(e,n,r))}generateAddAssociations(e){let{associationsTable:n}=this.networkSystemLayers,{fromNetworkSourceId:r,fromGlobalId:i,fromTerminalId:a,fromFirstUnit:o,fromLastUnit:s,toNetworkSourceId:c,toGlobalId:l,toTerminalId:u,toFirstUnit:d,toLastUnit:f,associationType:p,isContentVisible:h,percentAlong:g,globalId:_}=m(n);return{addFeatures:e.map(e=>{let n=new t({attributes:{[r]:e.fromNetworkElement?.networkSourceId,[i]:e.fromNetworkElement?.globalId,[a]:e.fromNetworkElement?.terminalId,[c]:e.toNetworkElement?.networkSourceId,[l]:e.toNetworkElement?.globalId,[u]:e.toNetworkElement?.terminalId,[p]:v[e.associationType],[h]:e.isContentVisible==null?void 0:+!!e.isContentVisible,[g]:e.percentAlong,[_]:e.globalId}}),m=e.associationType.includes(`connectivity`);return e.fromNetworkElement instanceof S&&(n.attributes[o]=e.fromNetworkElement?.firstUnit,n.attributes[s]=e.fromNetworkElement?.lastUnit),e.toNetworkElement instanceof S&&(n.attributes[d]=e.toNetworkElement?.firstUnit,n.attributes[f]=e.toNetworkElement?.lastUnit),m&&(n.attributes[a]=e.fromNetworkElement?.terminalId??1,n.attributes[u]=e.toNetworkElement?.terminalId??1),n}),id:this.networkSystemLayers.associationsTableId,identifierFields:{globalIdField:n?.globalIdField??`globalid`,objectIdField:n?.objectIdField??`objectid`}}}generateDeleteAssociations(e){let{associationsTable:t,associationsTableId:n}=this.networkSystemLayers,r={id:n,identifierFields:{globalIdField:t?.globalIdField??`globalid`,objectIdField:t?.objectIdField??`objectid`}};if(this.dataElement?.schemaGeneration===-8){let t=this._generateDeleteTelecomAssociationPayload(e);return{...r,deleteAssociations:t}}let i=e.map(e=>({globalId:e.globalId}));return{...r,deleteFeatures:i}}async loadAssociationsTable(){return this.networkSystemLayers.loadAssociationsTable()}async loadSubnetworksTable(){return this.networkSystemLayers.loadSubnetworksTable()}createTraceLocation(e,t){let n=e.getGlobalId()??``,r=e.geometry?.type;if(r===`point`||r===`polygon`){let r=this.getTerminalConfiguration(e),i=r?r.terminals[0].id:1;return new C({type:t,isFilterBarrier:!1,globalId:n,terminalId:i})}if(r===`polyline`)return new C({type:t,isFilterBarrier:!1,globalId:n,percentAlong:.5});if(!r){let r=u(e.layer)?e.layer.parent:e.layer,i=r&&this._edgeSourceLayerIds.includes(r.layerId),a=this.getTerminalConfiguration(e),o=a?a.terminals[0].id:i?-1:1;return new C({type:t,isFilterBarrier:!1,globalId:n,terminalId:o,percentAlong:i?.5:-1})}throw Error(`Unsupported geometry type: ${r}`)}async _loadNamedTraceConfigurationsFromNetwork(e){if(this.sharedNamedTraceConfigurations?.length===0)return;let t=this.sharedNamedTraceConfigurations.map(e=>e.globalId),n=await this.queryNamedTraceConfigurations({globalIds:t},e);for(let e of this.sharedNamedTraceConfigurations){let t=n?.find(t=>t.globalId===e.globalId);if(t){let n=t.write({},{origin:`service`});e.read(n,{origin:`service`})}}}_hydrateRuleInfo(e,t,n){let r=e.fieldsIndex,i=r.get(`RULETYPE`),a=r.get(`CREATIONDATE`),o=r.get(`FROMNETWORKSOURCEID`),s=r.get(`FROMASSETGROUP`),c=r.get(`FROMASSETTYPE`),l=r.get(`FROMTERMINALID`),u=r.get(`TONETWORKSOURCEID`),d=r.get(`TOASSETGROUP`),f=r.get(`TOASSETTYPE`),p=r.get(`TOTERMINALID`),m=r.get(`VIANETWORKSOURCEID`),h=r.get(`VIAASSETGROUP`),g=r.get(`VIAASSETTYPE`),_=r.get(`VIATERMINALID`),v=n.attributes[i.name],y=new Date(n.attributes[a.name]),b=n.attributes[o.name],x=n.attributes[s.name],S=n.attributes[c.name],C=n.attributes[l.name],w=n.attributes[u.name],T=n.attributes[d.name],E=n.attributes[f.name],D=n.attributes[p.name],O=n.attributes[m.name],k=n.attributes[h.name],A=n.attributes[g.name],j=n.attributes[_.name],M=[{networkSourceId:b,assetGroupId:x,assetTypeId:S,terminalId:C},{networkSourceId:w,assetGroupId:T,assetTypeId:E,terminalId:D},{networkSourceId:O,assetGroupId:k,assetTypeId:A,terminalId:j}],N={ruleType:v,creationDate:y};for(let e of[0,1,2]){if(v!==5&&e===2)continue;let n=M[e],r=t.find(e=>e.sourceId===n.networkSourceId),i=r?.assetGroups.find(e=>e.assetGroupCode===n.assetGroupId),a=i?.assetTypes.find(e=>e.assetTypeCode===n.assetTypeId),o=this._getTerminal(a,n),s=``;switch(e){case 0:s=`from`;break;case 1:s=`to`;break;case 2:s=`via`}N[`${s}NetworkSource`]=r,N[`${s}AssetGroup`]=i,N[`${s}AssetType`]=a,N[`${s}Terminal`]=o?.toJSON()}return N}_getTerminal(e,t){let n=e?.terminalConfigurationId;return(this.terminalConfigurations?.find(e=>e.id===n))?.terminals?.find(e=>e.id===t.terminalId)??null}async _queryRulesTable(e){let{gdbVersion:t,historicMoment:n}=this,r=new w({where:`1=1`,outFields:[`*`],gdbVersion:t,historicMoment:n});return(await l(e,r)).features}_generateDeleteTelecomAssociationPayload(e){return e.map(e=>({globalId:e.globalId??y,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([a({readOnly:!0})],T.prototype,`_rulesLayer`,null),e([a({readOnly:!0})],T.prototype,`_telecomSourceSet`,null),e([a({type:[p],json:{origins:{"web-map":{read:{source:`traceConfigurations`},write:{target:`traceConfigurations`}},service:{read:{source:`traceConfigurations`}}},read:!1}})],T.prototype,`sharedNamedTraceConfigurations`,void 0),e([a({type:[`utility`],readOnly:!0,json:{read:!1,write:!1}})],T.prototype,`type`,void 0),e([a({readOnly:!0})],T.prototype,`serviceTerritoryFeatureLayerId`,null),e([a({readOnly:!0})],T.prototype,`networkSystemLayers`,null),e([a({readOnly:!0})],T.prototype,`terminalConfigurations`,null),e([a({readOnly:!0})],T.prototype,`domainNetworkNames`,null),e([a({readOnly:!0})],T.prototype,`hasTelecomNetwork`,null),e([a({readOnly:!0,json:{read:!1}})],T.prototype,`associationsTable`,null),T=e([o(`esri.networks.UtilityNetwork`)],T);const E=T;export{E as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.2.0-next.136",
3
+ "version": "5.2.0-next.138",
4
4
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -20,13 +20,13 @@
20
20
  "license": "SEE LICENSE IN LICENSE.md",
21
21
  "dependencies": {
22
22
  "@amcharts/amcharts5": "~5.20.8",
23
- "@arcgis/toolkit": "5.2.0-next.136",
23
+ "@arcgis/toolkit": "5.2.0-next.138",
24
24
  "@esri/arcgis-html-sanitizer": "~4.2.0-next.2",
25
- "@esri/calcite-components": "^5.2.0-next.80",
25
+ "@esri/calcite-components": "^5.2.0-next.89",
26
26
  "@vaadin/grid": "~25.3.2",
27
27
  "@zip.js/zip.js": "~2.23.0",
28
28
  "luxon": "~3.7.2",
29
- "marked": "~18.0.14",
29
+ "marked": "~18.1.0",
30
30
  "tslib": "^2.8.1"
31
31
  }
32
32
  }
@@ -1,12 +1,13 @@
1
1
  import type Graphic from "../Graphic.js";
2
2
  import type EsriMap from "../Map.js";
3
3
  import type Accessor from "../core/Accessor.js";
4
+ import type Collection from "../core/Collection.js";
4
5
  import type Point from "../geometry/Point.js";
5
6
  import type SpatialReference from "../geometry/SpatialReference.js";
6
7
  import type FeatureAbilities from "./support/FeatureAbilities.js";
7
8
  import type { IdentifiableMixin, IdentifiableMixinProperties } from "../core/Identifiable.js";
8
9
  import type { SpatialReferenceProperties } from "../geometry/SpatialReference.js";
9
- import type { FeatureFormattedAttributes, LastEditInfo, PopupTemplateContentResolved, RelatedInfo, State } from "./types.js";
10
+ import type { FeatureFormattedAttributes, LastEditInfo, PopupAction, PopupTemplateContentResolved, RelatedInfo, State } from "./types.js";
10
11
  import type { TimeZone } from "../time/types.js";
11
12
  import type { MapViewOrSceneView } from "../views/MapViewOrSceneView.js";
12
13
  import type { FeatureAbilitiesProperties } from "./support/FeatureAbilities.js";
@@ -96,6 +97,11 @@ export default class FeatureContent extends FeatureContentSuperclass {
96
97
  set abilities(value: FeatureAbilitiesProperties);
97
98
  /** The [PopupTemplate.content](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#content) of the feature. */
98
99
  get content(): PopupContent | null | undefined;
100
+ /**
101
+ * A read-only property that specifies the [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of default action [buttons](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) and/or [toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/).
102
+ * By default, there is a "Zoom to" action that allows users to zoom to the selected feature.
103
+ */
104
+ get defaultActions(): Collection<PopupAction>;
99
105
  /**
100
106
  * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. Supported for [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/), [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)), [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/), [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/), [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/), [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/), [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/), [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/), [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/).
101
107
  *
@@ -220,6 +226,13 @@ export default class FeatureContent extends FeatureContentSuperclass {
220
226
  accessor view: MapViewOrSceneView | null | undefined;
221
227
  /** Indicates whether the feature is currently waiting for all of its content to finish loading. */
222
228
  get waitingForContent(): boolean;
229
+ /**
230
+ * @param actions - The custom actions to include with the feature's actions.
231
+ * @param includeDefaultActions - Indicates whether to include the default actions.
232
+ * @returns The actions available for the feature.
233
+ * @internal
234
+ */
235
+ getAllActions(actions: Collection<PopupAction>, includeDefaultActions?: boolean): Collection<PopupAction>;
223
236
  /**
224
237
  * Fetches and updates the geometry of the [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic).
225
238
  * This method can be called to refresh the [graphic](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContent/#graphic)'s geometry before taking actions such as calling
@@ -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{FeatureSetQueryInterceptor as n}from"../arcade/featureset/support/FeatureSetQueryInterceptor.js";import r from"../core/Accessor.js";import{isSome as i}from"../core/arrayUtils.js";import{createTask as a}from"../core/asyncUtils.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import s from"../core/Logger.js";import{abortMaybe as c}from"../core/maybe.js";import{eachAlways as l,isAbortError as u,throwIfAborted as d}from"../core/promiseUtils.js";import{watch as f,initial as p,when as m}from"../core/reactiveUtils.js";import{throttle as h}from"../core/throttle.js";import{property as g,subclass as _}from"../core/accessorSupport/decorators.js";import v from"../geometry/Point.js";import y from"../geometry/SpatialReference.js";import b from"./content/TextContent.js";import{compileExpressionInfos as x,formatArcadeValue as S}from"./support/arcadeFeatureUtils.js";import C from"./support/FeatureAbilities.js";import{preLayerQueryCallback as w,preRequestCallback as T,getPopupLayer as E,createFieldInfoMap as D,getAllFieldInfos as O,querySourceLayer as k,queryUpdatedFeature as A,isRelatableFeatureSupportedLayer as j,isAssociatedFeatureSupportedLayer as M,formatEditInfo as N,substituteFieldsInLinksAndAttributes as P,graphicCallback as F,formatAttributes as I,isRelatedField as L}from"./support/featureUtils.js";import{queryLayerInfos as R,queryRelatedFeatures as z,setRelatedFeatures as B,getRelatedFieldInfo as V,createRelatedInfo as H,updateRelatedInfo as U}from"./support/relatedFeatureUtils.js";import{system as W}from"../time/constants.js";var G;let K=class extends o(r){static{G=this}constructor(e){super(e),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._graphicExpressionAttributes=null,this.abilities=new C,this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.expressionAttributes=null,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.heading=``,this.view=null,this._graphicChangedThrottled=h(this._graphicChanged,()=>this.notifyChange(`waitingForContent`),1,this),this._isAllowedContentType=e=>{let{abilities:t}=this;return e.type===`attachments`&&!!t.attachmentsContent||e.type===`custom`&&!!t.customContent||e.type===`fields`&&!!t.fieldsContent||e.type===`media`&&!!t.mediaContent||e.type===`text`&&!!t.textContent||e.type===`expression`&&!!t.expressionContent||e.type===`relationship`&&!!t.relationshipContent||e.type===`utility-network-associations`&&!!t.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=h(this._evaluateExpressionAttributes,()=>this.notifyChange(`waitingForContent`),1,this),this.addHandles([f(()=>[this._effectivePopupTemplate,this.abilities.attachmentsContent,this.abilities.chartAnimation,this.abilities.customContent,this.abilities.expressionContent,this.abilities.fieldsContent,this.abilities.mediaContent,this.abilities.relationshipContent,this.abilities.textContent,this.abilities.utilityNetworkAssociationsContent,this.graphic,this.timeZone],()=>this._graphicChangedThrottled(),p),m(()=>{if(!this._graphicChangedTask?.finished||this._graphicChangedTask.value==null)return null;let e=this._graphicChangedTask.value,t=e?.expressionInfos?.dependencies;return[e,t?.has(`view-scale`)?this.view?.scale:null,t?.has(`view-time-extent`)?this.view?.timeExtent?.start:null,t?.has(`view-time-extent`)?this.view?.timeExtent?.end:null]},([e])=>this._evaluateExpressionAttributesThrottled(e))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=c(this._graphicChangedTask),this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this.relatedInfos.clear()}static{this.interceptor=new n(w,T)}get _effectivePopupTemplate(){return this.graphic?.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled)??null}get _fieldInfoMap(){let e=E(this.graphic);return D(O(this._effectivePopupTemplate),e)}get isFeatureFromTable(){return E(this.graphic)?.isTable??!1}get state(){return this.graphic?this._error?`error`:this.waitingForContent?`loading`:`ready`:`disabled`}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override(`spatialReference`,e)}get timeZone(){return this.view?.timeZone??W}set timeZone(e){this._overrideIfSome(`timeZone`,e)}get map(){return this.view?.map||null}set map(e){this._override(`map`,e)}get waitingForContent(){let{_graphicChangedThrottled:e,_evaluateExpressionAttributesThrottled:t,_graphicChangedTask:n,_evaluateExpressionAttributesTask:r}=this;return e.hasPendingUpdates()||t.hasPendingUpdates()||n!=null&&!n.finished||r!=null&&!r.finished}async updateGeometry(){let{graphic:e,spatialReference:t}=this,n=E(e);await n?.load();let r=n?.objectIdField;if(!r||!e)return;let i=e.attributes?.[r];if(i==null)return;let a=(await k({layer:n,graphic:e,outFields:[],objectIds:[i],returnGeometry:!0,spatialReference:t}))?.geometry;a&&(e.geometry=a)}_clear(){this._set(`heading`,``),this._set(`content`,null),this._set(`formattedAttributes`,null),this._set(`expressionAttributes`,null)}_graphicChanged(){this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._graphicChangedTask=c(this._graphicChangedTask),this._graphicChangedTask=a(async e=>{this._error=null,this._clear();let{graphic:t}=this;try{if(!t)return null;let{_effectivePopupTemplate:n}=this,r=E(t),i=this.spatialReference;await A({graphic:t,popupTemplate:n,layer:r,spatialReference:i},{signal:e});let[{value:a},{value:o}]=await l([this._getContent(),this._getTitle()]),[,{value:s}]=await l([this._checkForRelatedFeatures({signal:e}),x(n?.expressionInfos,t)]);return{expressionInfos:s,content:a,heading:o}}catch(e){throw u(e)||(this._error=e,s.getLogger(this).error(`error`,`The popupTemplate could not be displayed for this feature.`,{error:e,graphic:t,popupTemplate:this._effectivePopupTemplate})),e}})}_compileContentElement(e){let t=E(this.graphic);return e.type===`relationship`?j(t)?e:void 0:e.type===`utility-network-associations`?M(t)?e:void 0:e}_compileContent(e){if(this.graphic)return Array.isArray(e)?e.filter(this._isAllowedContentType).map(e=>this._compileContentElement(e)).filter(i):typeof e==`string`?new b({text:e}).text:e}_compileLastEditInfo(){let{_effectivePopupTemplate:e,graphic:t,timeZone:n}=this,r=E(t);if(!e)return;let{lastEditInfoEnabled:i}=e,a=r?.editFieldsInfo;if(i&&a)return N(a,t?.attributes,n,r)}_compileHeading(e){let{_fieldInfoMap:t,graphic:n,expressionAttributes:r}=this,i=E(n),a=n?.attributes??{},o=this.formattedAttributes?.global??{};return P({attributes:a,fieldInfoMap:t,globalAttributes:o,expressionAttributes:r,layer:i,text:e})}async _getTitle(){let{_effectivePopupTemplate:e,graphic:t}=this;return t?F({type:`title`,value:e?.title,event:{graphic:t}}):null}async _getContent(){let{_effectivePopupTemplate:e,graphic:t}=this;return t?F({type:`content`,value:e?.content,event:{graphic:t}}):null}_evaluateExpressionAttributes({heading:e,content:t,expressionInfos:n}){this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=a(async r=>{let{graphic:i,map:a,view:o,spatialReference:c,location:l}=this;try{if(!i)return;let s;if(n!=null){let e=[];for(let[t,s]of n.expressions.entries())s==null?e.push(Promise.resolve([t,void 0])):e.push(s.evaluate({graphic:i,interceptor:G.interceptor,location:l,map:a,options:{signal:r},spatialReference:c,view:o}).then(e=>[t,typeof e==`string`?S(e):e]).catch(()=>[t,void 0]));s=Object.fromEntries(await Promise.all(e)),d(r)}this._set(`expressionAttributes`,s??null),this._graphicExpressionAttributes={...i.attributes,...s},this._set(`formattedAttributes`,this._createFormattedAttributes(t)),this._set(`heading`,this._compileHeading(e)),this._set(`lastEditInfo`,this._compileLastEditInfo()||null),this._set(`content`,this._compileContent(t)||null)}catch(e){u(e)||(this._error=e,s.getLogger(this).error(`error`,`The popupTemplate could not be displayed for this feature.`,{error:e,graphic:i,popupTemplate:this._effectivePopupTemplate}))}})}_createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:n}){let{_effectivePopupTemplate:r,graphic:i,relatedInfos:a,_fieldInfoMap:o,_graphicExpressionAttributes:s,timeZone:c}=this,l=E(i);n.content[t]=I({attributes:{...s,...e.attributes},fieldInfoMap:o,fieldInfos:r?.fieldInfos,graphic:i,layer:l,relatedInfos:a,timeZone:c})}_createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:n}){if(e.fieldInfos){let{graphic:r,relatedInfos:i,_fieldInfoMap:a,_graphicExpressionAttributes:o,timeZone:s}=this,c=E(r);n.content[t]=I({attributes:{...o,...e.attributes},fieldInfoMap:a,fieldInfos:e.fieldInfos,graphic:r,isContentFieldInfos:!0,layer:c,relatedInfos:i,timeZone:s})}}_createFormattedAttributes(e){let{_effectivePopupTemplate:t,graphic:n,relatedInfos:r,_fieldInfoMap:i,_graphicExpressionAttributes:a,timeZone:o}=this,s=E(n),c=t?.fieldInfos,l={global:I({attributes:a,fieldInfoMap:i,fieldInfos:c,graphic:n,layer:s,relatedInfos:r,timeZone:o}),content:[]};return Array.isArray(e)&&e.forEach((e,t)=>{e.type===`fields`&&this._createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:l}),e.type===`media`&&this._createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:l})}),l}_checkForRelatedFeatures(e){let{graphic:t,_effectivePopupTemplate:n}=this;return this._queryRelatedInfos(t,O(n),e)}async _queryRelatedInfos(e,t,n){let{relatedInfos:r}=this,i=E(e);r.clear();let a=await i?.associatedLayer?.load(n)??i;if(!a||!e||!t.filter(e=>!!e.fieldName&&L(e.fieldName))?.length)return;t.forEach(e=>this._configureRelatedInfo(e,a));let o=await R({relatedInfos:r,layer:a},n);Object.keys(o).forEach(e=>{let t=r.get(e.toString()),n=o[e]?.value;t&&n&&(t.layerInfo=n.data)});let s=await z({graphic:e,relatedInfos:r,layer:a},n);Object.keys(s).forEach(e=>{B(s[e]?.value,r.get(e.toString()))})}_configureRelatedInfo(e,t){let{relatedInfos:n}=this,r=V(e.fieldName||``);if(!r)return;let{layerId:i,fieldName:a}=r;if(!i)return;let o=n.get(i.toString())||H(i,t);o&&(U({relatedInfo:o,fieldName:a,fieldInfo:e}),this.relatedInfos.set(i,o))}};e([g()],K.prototype,`_error`,void 0),e([g()],K.prototype,`_graphicChangedTask`,void 0),e([g()],K.prototype,`_evaluateExpressionAttributesTask`,void 0),e([g({readOnly:!0})],K.prototype,`_effectivePopupTemplate`,null),e([g({readOnly:!0})],K.prototype,`_fieldInfoMap`,null),e([g({type:C})],K.prototype,`abilities`,void 0),e([g({readOnly:!0})],K.prototype,`content`,void 0),e([g()],K.prototype,`description`,void 0),e([g({type:Boolean})],K.prototype,`defaultPopupTemplateEnabled`,void 0),e([g({readOnly:!0})],K.prototype,`expressionAttributes`,void 0),e([g({readOnly:!0})],K.prototype,`isFeatureFromTable`,null),e([g({readOnly:!0})],K.prototype,`state`,null),e([g({readOnly:!0})],K.prototype,`formattedAttributes`,void 0),e([g({type:t})],K.prototype,`graphic`,void 0),e([g({readOnly:!0})],K.prototype,`lastEditInfo`,void 0),e([g({type:v})],K.prototype,`location`,void 0),e([g({readOnly:!0})],K.prototype,`relatedInfos`,void 0),e([g({type:y})],K.prototype,`spatialReference`,null),e([g()],K.prototype,`timeZone`,null),e([g({readOnly:!0})],K.prototype,`heading`,void 0),e([g()],K.prototype,`map`,null),e([g({readOnly:!0})],K.prototype,`waitingForContent`,null),e([g()],K.prototype,`view`,void 0),K=G=e([_(`esri.popup.FeatureContent`)],K);const q=K;export{q as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import{FeatureSetQueryInterceptor as n}from"../arcade/featureset/support/FeatureSetQueryInterceptor.js";import r from"../core/Accessor.js";import{isSome as i}from"../core/arrayUtils.js";import{createTask as a}from"../core/asyncUtils.js";import{IdentifiableMixin as o}from"../core/Identifiable.js";import s from"../core/Logger.js";import{abortMaybe as c}from"../core/maybe.js";import{eachAlways as l,isAbortError as u,throwIfAborted as d}from"../core/promiseUtils.js";import{watch as f,initial as p,when as m}from"../core/reactiveUtils.js";import{throttle as h}from"../core/throttle.js";import{property as g,subclass as _}from"../core/accessorSupport/decorators.js";import v from"../geometry/Point.js";import y from"../geometry/SpatialReference.js";import{ActionsCollection as b,createDefaultAggregateActions as x,createDefaultActions as S}from"./actions.js";import C from"./content/TextContent.js";import{compileExpressionInfos as w,formatArcadeValue as T}from"./support/arcadeFeatureUtils.js";import E from"./support/FeatureAbilities.js";import{preLayerQueryCallback as D,preRequestCallback as O,getPopupLayer as k,createFieldInfoMap as A,getAllFieldInfos as j,querySourceLayer as M,queryUpdatedFeature as N,isRelatableFeatureSupportedLayer as P,isAssociatedFeatureSupportedLayer as F,formatEditInfo as I,substituteFieldsInLinksAndAttributes as L,graphicCallback as R,formatAttributes as z,isRelatedField as B}from"./support/featureUtils.js";import{queryLayerInfos as V,queryRelatedFeatures as H,setRelatedFeatures as U,getRelatedFieldInfo as W,createRelatedInfo as G,updateRelatedInfo as K}from"./support/relatedFeatureUtils.js";import{system as q}from"../time/constants.js";var J;let Y=class extends o(r){static{J=this}constructor(e){super(e),this._error=null,this._graphicChangedTask=null,this._evaluateExpressionAttributesTask=null,this._graphicExpressionAttributes=null,this.abilities=new E,this.content=null,this.description=null,this.defaultPopupTemplateEnabled=!1,this.expressionAttributes=null,this.formattedAttributes=null,this.graphic=null,this.lastEditInfo=null,this.location=null,this.relatedInfos=new Map,this.heading=``,this.view=null,this._graphicChangedThrottled=h(this._graphicChanged,()=>this.notifyChange(`waitingForContent`),1,this),this._isAllowedContentType=e=>{let{abilities:t}=this;return e.type===`attachments`&&!!t.attachmentsContent||e.type===`custom`&&!!t.customContent||e.type===`fields`&&!!t.fieldsContent||e.type===`media`&&!!t.mediaContent||e.type===`text`&&!!t.textContent||e.type===`expression`&&!!t.expressionContent||e.type===`relationship`&&!!t.relationshipContent||e.type===`utility-network-associations`&&!!t.utilityNetworkAssociationsContent},this._evaluateExpressionAttributesThrottled=h(this._evaluateExpressionAttributes,()=>this.notifyChange(`waitingForContent`),1,this),this.addHandles([f(()=>[this._effectivePopupTemplate,this.abilities.attachmentsContent,this.abilities.chartAnimation,this.abilities.customContent,this.abilities.expressionContent,this.abilities.fieldsContent,this.abilities.mediaContent,this.abilities.relationshipContent,this.abilities.textContent,this.abilities.utilityNetworkAssociationsContent,this.graphic,this.timeZone],()=>this._graphicChangedThrottled(),p),m(()=>{if(!this._graphicChangedTask?.finished||this._graphicChangedTask.value==null)return null;let e=this._graphicChangedTask.value,t=e?.expressionInfos?.dependencies;return[e,t?.has(`view-scale`)?this.view?.scale:null,t?.has(`view-time-extent`)?this.view?.timeExtent?.start:null,t?.has(`view-time-extent`)?this.view?.timeExtent?.end:null]},([e])=>this._evaluateExpressionAttributesThrottled(e))])}initialize(){this.addHandles([this._graphicChangedThrottled,this._evaluateExpressionAttributesThrottled])}destroy(){this._clear(),this._graphicChangedTask=c(this._graphicChangedTask),this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._error=null,this.graphic=null,this.relatedInfos.clear()}static{this.interceptor=new n(D,O)}get _effectivePopupTemplate(){return this.graphic?.getEffectivePopupTemplate(this.defaultPopupTemplateEnabled)??null}get _fieldInfoMap(){let e=k(this.graphic);return A(j(this._effectivePopupTemplate),e)}get defaultActions(){let e=this._get(`defaultActions`)||new b;return e.removeAll(),e.addMany(this.graphic?.isAggregate?x():S()),e}get isFeatureFromTable(){return k(this.graphic)?.isTable??!1}get state(){return this.graphic?this._error?`error`:this.waitingForContent?`loading`:`ready`:`disabled`}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override(`spatialReference`,e)}get timeZone(){return this.view?.timeZone??q}set timeZone(e){this._overrideIfSome(`timeZone`,e)}get map(){return this.view?.map||null}set map(e){this._override(`map`,e)}get waitingForContent(){let{_graphicChangedThrottled:e,_evaluateExpressionAttributesThrottled:t,_graphicChangedTask:n,_evaluateExpressionAttributesTask:r}=this;return e.hasPendingUpdates()||t.hasPendingUpdates()||n!=null&&!n.finished||r!=null&&!r.finished}async updateGeometry(){let{graphic:e,spatialReference:t}=this,n=k(e);await n?.load();let r=n?.objectIdField;if(!r||!e)return;let i=e.attributes?.[r];if(i==null)return;let a=(await M({layer:n,graphic:e,outFields:[],objectIds:[i],returnGeometry:!0,spatialReference:t}))?.geometry;a&&(e.geometry=a)}getAllActions(e,t=!1){let n=new b,{defaultActions:r,defaultPopupTemplateEnabled:a,graphic:o}=this,s=t?r.concat(e):e,c=o&&(typeof o.getEffectivePopupTemplate==`function`&&o.getEffectivePopupTemplate(a)||o.popupTemplate),l=c?.actions;return(c?.overwriteActions?l:l?.concat(s)??s)?.filter(i).forEach(e=>n.add(e)),n}_clear(){this._set(`heading`,``),this._set(`content`,null),this._set(`formattedAttributes`,null),this._set(`expressionAttributes`,null)}_graphicChanged(){this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._graphicChangedTask=c(this._graphicChangedTask),this._graphicChangedTask=a(async e=>{this._error=null,this._clear();let{graphic:t}=this;try{if(!t)return null;let{_effectivePopupTemplate:n}=this,r=k(t),i=this.spatialReference;await N({graphic:t,popupTemplate:n,layer:r,spatialReference:i},{signal:e});let[{value:a},{value:o}]=await l([this._getContent(),this._getTitle()]),[,{value:s}]=await l([this._checkForRelatedFeatures({signal:e}),w(n?.expressionInfos,t)]);return{expressionInfos:s,content:a,heading:o}}catch(e){throw u(e)||(this._error=e,s.getLogger(this).error(`error`,`The popupTemplate could not be displayed for this feature.`,{error:e,graphic:t,popupTemplate:this._effectivePopupTemplate})),e}})}_compileContentElement(e){let t=k(this.graphic);return e.type===`relationship`?P(t)?e:void 0:e.type===`utility-network-associations`?F(t)?e:void 0:e}_compileContent(e){if(this.graphic)return Array.isArray(e)?e.filter(this._isAllowedContentType).map(e=>this._compileContentElement(e)).filter(i):typeof e==`string`?new C({text:e}).text:e}_compileLastEditInfo(){let{_effectivePopupTemplate:e,graphic:t,timeZone:n}=this,r=k(t);if(!e)return;let{lastEditInfoEnabled:i}=e,a=r?.editFieldsInfo;if(i&&a)return I(a,t?.attributes,n,r)}_compileHeading(e){let{_fieldInfoMap:t,graphic:n,expressionAttributes:r}=this,i=k(n),a=n?.attributes??{},o=this.formattedAttributes?.global??{};return L({attributes:a,fieldInfoMap:t,globalAttributes:o,expressionAttributes:r,layer:i,text:e})}async _getTitle(){let{_effectivePopupTemplate:e,graphic:t}=this;return t?R({type:`title`,value:e?.title,event:{graphic:t}}):null}async _getContent(){let{_effectivePopupTemplate:e,graphic:t}=this;return t?R({type:`content`,value:e?.content,event:{graphic:t}}):null}_evaluateExpressionAttributes({heading:e,content:t,expressionInfos:n}){this._evaluateExpressionAttributesTask=c(this._evaluateExpressionAttributesTask),this._evaluateExpressionAttributesTask=a(async r=>{let{graphic:i,map:a,view:o,spatialReference:c,location:l}=this;try{if(!i)return;let s;if(n!=null){let e=[];for(let[t,s]of n.expressions.entries())s==null?e.push(Promise.resolve([t,void 0])):e.push(s.evaluate({graphic:i,interceptor:J.interceptor,location:l,map:a,options:{signal:r},spatialReference:c,view:o}).then(e=>[t,typeof e==`string`?T(e):e]).catch(()=>[t,void 0]));s=Object.fromEntries(await Promise.all(e)),d(r)}this._set(`expressionAttributes`,s??null),this._graphicExpressionAttributes={...i.attributes,...s},this._set(`formattedAttributes`,this._createFormattedAttributes(t)),this._set(`heading`,this._compileHeading(e)),this._set(`lastEditInfo`,this._compileLastEditInfo()||null),this._set(`content`,this._compileContent(t)||null)}catch(e){u(e)||(this._error=e,s.getLogger(this).error(`error`,`The popupTemplate could not be displayed for this feature.`,{error:e,graphic:i,popupTemplate:this._effectivePopupTemplate}))}})}_createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:n}){let{_effectivePopupTemplate:r,graphic:i,relatedInfos:a,_fieldInfoMap:o,_graphicExpressionAttributes:s,timeZone:c}=this,l=k(i);n.content[t]=z({attributes:{...s,...e.attributes},fieldInfoMap:o,fieldInfos:r?.fieldInfos,graphic:i,layer:l,relatedInfos:a,timeZone:c})}_createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:n}){if(e.fieldInfos){let{graphic:r,relatedInfos:i,_fieldInfoMap:a,_graphicExpressionAttributes:o,timeZone:s}=this,c=k(r);n.content[t]=z({attributes:{...o,...e.attributes},fieldInfoMap:a,fieldInfos:e.fieldInfos,graphic:r,isContentFieldInfos:!0,layer:c,relatedInfos:i,timeZone:s})}}_createFormattedAttributes(e){let{_effectivePopupTemplate:t,graphic:n,relatedInfos:r,_fieldInfoMap:i,_graphicExpressionAttributes:a,timeZone:o}=this,s=k(n),c=t?.fieldInfos,l={global:z({attributes:a,fieldInfoMap:i,fieldInfos:c,graphic:n,layer:s,relatedInfos:r,timeZone:o}),content:[]};return Array.isArray(e)&&e.forEach((e,t)=>{e.type===`fields`&&this._createFieldsFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:l}),e.type===`media`&&this._createMediaFormattedAttributes({contentElement:e,contentElementIndex:t,formattedAttributes:l})}),l}_checkForRelatedFeatures(e){let{graphic:t,_effectivePopupTemplate:n}=this;return this._queryRelatedInfos(t,j(n),e)}async _queryRelatedInfos(e,t,n){let{relatedInfos:r}=this,i=k(e);r.clear();let a=await i?.associatedLayer?.load(n)??i;if(!a||!e||!t.filter(e=>!!e.fieldName&&B(e.fieldName))?.length)return;t.forEach(e=>this._configureRelatedInfo(e,a));let o=await V({relatedInfos:r,layer:a},n);Object.keys(o).forEach(e=>{let t=r.get(e.toString()),n=o[e]?.value;t&&n&&(t.layerInfo=n.data)});let s=await H({graphic:e,relatedInfos:r,layer:a},n);Object.keys(s).forEach(e=>{U(s[e]?.value,r.get(e.toString()))})}_configureRelatedInfo(e,t){let{relatedInfos:n}=this,r=W(e.fieldName||``);if(!r)return;let{layerId:i,fieldName:a}=r;if(!i)return;let o=n.get(i.toString())||G(i,t);o&&(K({relatedInfo:o,fieldName:a,fieldInfo:e}),this.relatedInfos.set(i,o))}};e([g()],Y.prototype,`_error`,void 0),e([g()],Y.prototype,`_graphicChangedTask`,void 0),e([g()],Y.prototype,`_evaluateExpressionAttributesTask`,void 0),e([g({readOnly:!0})],Y.prototype,`_effectivePopupTemplate`,null),e([g({readOnly:!0})],Y.prototype,`_fieldInfoMap`,null),e([g({type:E})],Y.prototype,`abilities`,void 0),e([g({readOnly:!0})],Y.prototype,`content`,void 0),e([g()],Y.prototype,`description`,void 0),e([g({type:b,readOnly:!0})],Y.prototype,`defaultActions`,null),e([g({type:Boolean})],Y.prototype,`defaultPopupTemplateEnabled`,void 0),e([g({readOnly:!0})],Y.prototype,`expressionAttributes`,void 0),e([g({readOnly:!0})],Y.prototype,`isFeatureFromTable`,null),e([g({readOnly:!0})],Y.prototype,`state`,null),e([g({readOnly:!0})],Y.prototype,`formattedAttributes`,void 0),e([g({type:t})],Y.prototype,`graphic`,void 0),e([g({readOnly:!0})],Y.prototype,`lastEditInfo`,void 0),e([g({type:v})],Y.prototype,`location`,void 0),e([g({readOnly:!0})],Y.prototype,`relatedInfos`,void 0),e([g({type:y})],Y.prototype,`spatialReference`,null),e([g()],Y.prototype,`timeZone`,null),e([g({readOnly:!0})],Y.prototype,`heading`,void 0),e([g()],Y.prototype,`map`,null),e([g({readOnly:!0})],Y.prototype,`waitingForContent`,null),e([g()],Y.prototype,`view`,void 0),Y=J=e([_(`esri.popup.FeatureContent`)],Y);const X=Y;export{X as default};
@@ -31,6 +31,7 @@ export interface FeatureContentCollectionProperties extends GoToProperties, Part
31
31
  * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
32
32
  * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
33
33
  *
34
+ * @internal
34
35
  * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
35
36
  * @example
36
37
  * ```js
@@ -110,6 +111,7 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
110
111
  * [PopupTemplate.overwriteActions](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/#overwriteActions) property to `true` in a [PopupTemplate](https://developers.arcgis.com/javascript/latest/references/core/PopupTemplate/).
111
112
  * The order of each action is the order in which they appear in the actions [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/).
112
113
  *
114
+ * @internal
113
115
  * @see [Sample - Popup actions](https://developers.arcgis.com/javascript/latest/sample-code/popup-actions/)
114
116
  * @example
115
117
  * ```js
@@ -143,8 +145,6 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
143
145
  * @default false
144
146
  */
145
147
  accessor aggregatedFeaturesEnabled: boolean;
146
- /** A collection of all the [action buttons](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) or [action toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/). */
147
- get allActions(): Collection<PopupAction>;
148
148
  /**
149
149
  * The information to display. When this property is set, this content may
150
150
  * only be static and cannot use fields to set content templates. To set a template
@@ -159,14 +159,7 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
159
159
  * ```
160
160
  */
161
161
  accessor content: string | HTMLElement | null | undefined;
162
- /**
163
- * A read-only property that specifies a [Collection](https://developers.arcgis.com/javascript/latest/references/core/core/Collection/) of action [buttons](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionButton/) and/or [toggles](https://developers.arcgis.com/javascript/latest/references/core/support/actions/ActionToggle/).
164
- * By default, there is a "Zoom to" action that allows users to zoom to the selected feature.
165
- *
166
- * > [!WARNING]
167
- * >
168
- * > In order to disable any default actions, it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#includeDefaultActions) to `false`.
169
- */
162
+ /** The default actions for the selected feature, or the default zoom action when no feature is selected. */
170
163
  get defaultActions(): Collection<PopupAction>;
171
164
  /**
172
165
  * Enables automatic creation of a popup template for layers that have popups enabled but no popupTemplate defined. Automatic popup templates are supported for layers that support the `createPopupTemplate` method. Supported for [BuildingComponentSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/buildingSublayers/BuildingComponentSublayer/), [CatalogFootprintLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/catalog/CatalogFootprintLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/), [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [ImageryLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryLayer/)), [ImageryTileLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ImageryTileLayer/), [KnowledgeGraphSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/knowledgeGraph/KnowledgeGraphSublayer/), [OGCFeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/OGCFeatureLayer/), [ParquetLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/ParquetLayer/), [PointCloudLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/PointCloudLayer/), [SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), [StreamLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/StreamLayer/), [Sublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/Sublayer/), [SubtypeSublayer](https://developers.arcgis.com/javascript/latest/references/core/layers/support/SubtypeSublayer/), [VoxelLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VoxelLayer/), [WCSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WCSLayer/), and [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/).
@@ -281,6 +274,7 @@ export default class FeatureContentCollection extends FeatureContentCollectionSu
281
274
  * > In order to disable any [default actions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#defaultActions), it is necessary to set [includeDefaultActions](https://developers.arcgis.com/javascript/latest/references/core/popup/FeatureContentCollection/#includeDefaultActions) to `false`.
282
275
  *
283
276
  * @default true
277
+ * @internal
284
278
  * @example
285
279
  * // Removes the default actions
286
280
  * featureContentCollection.includeDefaultActions = false;
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{isSome as t}from"../core/arrayUtils.js";import n from"../core/Error.js";import{EventedAccessor as r}from"../core/Evented.js";import i from"../core/Logger.js";import{abortMaybe as a}from"../core/maybe.js";import{debounce as o,logOnError as s,isAbortError as c}from"../core/promiseUtils.js";import{watch as l,when as u}from"../core/reactiveUtils.js";import{property as d,subclass as f}from"../core/accessorSupport/decorators.js";import p from"../geometry/Point.js";import{project as m}from"../geometry/projectionUtils.js";import h from"../geometry/SpatialReference.js";import{geographicToWebMercator as g}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as _}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as v}from"../layers/LayerConstants.js";import{ActionsCollection as y,zoomToAggregatedFeatures as b,browseAggregatedFeatures as x,zoomToFeature as S}from"./actions.js";import{getSelectedTarget as C}from"./actionUtils.js";import w from"./FeatureContent.js";import T from"./support/FeatureAbilities.js";import{getDisplayedSymbol as E}from"../symbols/support/symbolUtils.js";import{system as D}from"../time/constants.js";import{highlightsSupported as O}from"../views/support/layerViewUtils.js";import{GoTo as k}from"../widgets/support/GoTo.js";const A=()=>[S.clone()],j=()=>[b.clone(),x.clone()];let M=null;function N(e,t){switch(e){case`building-scene`:case`map-image`:case`tile`:case`imagery`:return!0;case`imagery-tile`:return t===`2d`;default:return!1}}let P=class extends k(r){constructor(e){super(e),this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new T,this._activeFeatureStream=null,this._featureStreamHasYielded=!1,this.actions=new y,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.diagnostics=null,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=o(async()=>{this._cancelLocationUpdate();let e=new AbortController,{signal:t}=e;this._locationUpdateController=e,await this._locationUpdate({signal:t}).catch(()=>{}).finally(()=>{this._locationUpdateController===e&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([l(()=>this.view?.scale,()=>{this.open&&s(this._debouncedLocationUpdate(),i.getLogger(this))}),l(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),l(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),l(()=>this.location,e=>this._locationChange(e)),l(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),l(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),l(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),l(()=>this.featureItems,()=>this._featureItemsChange()),l(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),u(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelCenterAtLocation(),this._cancelFeatureStream(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get active(){return this.open&&!this.waitingForResult}get allActions(){let e=this._get(`allActions`)||new y;e.removeAll();let{actions:n,defaultActions:r,defaultPopupTemplateEnabled:i,includeDefaultActions:a,selectedFeature:o}=this,s=a?r.concat(n):n,c=o&&(typeof o.getEffectivePopupTemplate==`function`&&o.getEffectivePopupTemplate(i)||o.popupTemplate),l=c?.actions;return(c?.overwriteActions?l:l?.concat(s)??s)?.filter(t).forEach(t=>e.add(t)),e}set content(e){this.featureStream=null,this._set(`diagnostics`,null),this.features=[],this._set(`content`,e)}get defaultActions(){let e=this._get(`defaultActions`)||new y;return e.removeAll(),e.addMany(this.selectedFeature?.isAggregate?j():A()),e}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get(`features`)===e)return;let t=e||[];this._set(`features`,t),this._syncSelectedFeatureIndex(t)}get featureStream(){return this._get(`featureStream`)||null}set featureStream(e){this._setFeatureStream(e)}_setFeatureStream(e,t,n){this._set(`diagnostics`,n??null),this._get(`featureStream`)!==e&&(this._set(`featureStream`,e),this._cancelFeatureStream(),e&&(this._featureStreamHasYielded=!1,this._set(`pendingLocation`,t??null),this._activeFeatureStream=e,this._consumeFeatureStream(e,t).catch(()=>{})))}get initialDisplayMode(){return this._initialDisplayMode??(this.view?.focusRegionEnabled?`list`:`feature`)}set initialDisplayMode(e){this._initialDisplayMode=e,this._syncSelectedFeatureIndex(this.features)}set location(e){let t=e?.spatialReference?.isWGS84&&this.spatialReference?.isWebMercator?g(e):e;this._set(`location`,t)}get map(){return this.view?.map??null}set map(e){this._override(`map`,e)}get pendingLocation(){return this._get(`pendingLocation`)??null}get streamingFeatures(){return this._activeFeatureStream!=null}get selectedFeature(){return this.selectedFeatureIndex===-1?null:this.features[this.selectedFeatureIndex]??null}get selectedFeatureIndex(){let e=this._get(`selectedFeatureIndex`);return typeof e==`number`?e:-1}set selectedFeatureIndex(e){let{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set(`selectedFeatureIndex`,e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override(`spatialReference`,e)}get state(){return this.view?this.view.ready?`ready`:`disabled`:this.map?`ready`:`disabled`}get timeZone(){return this.view?.timeZone??D}set timeZone(e){this._overrideIfSome(`timeZone`,e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return this.streamingFeatures&&!this._featureStreamHasYielded}zoomTo(e){return this.callGoTo(e)}clear(){this._cancelFeatureStream(),this._set(`diagnostics`,null),this.set({featureStream:null,features:[],content:null,heading:null,location:null,activeFeature:null})}openFeatureStream(e){this._setFeatureStream(e.featureStream,e.location??null,e.diagnostics),this.open=!0}async fetchFeatures(e,t){let{view:r}=this;if(!r||!e)throw new n(`fetch-features:invalid-screenpoint-or-view`,`Cannot fetch features without a screen point/screen area and view.`,{screenPoint:e,view:r});let i={},a=r.fetchPopupFeatures(e,{diagnostics:i,pointerType:t?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:t?.signal});this._setFeatureStream(a,void 0,i)}next(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount)}previous(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount)}_syncSelectedFeatureIndex(e){let{selectedFeatureIndex:t}=this,n=this._activeFeatureStream!=null&&e.length>0;if(this.initialDisplayMode===`list`){n||(this.selectedFeatureIndex=-1);return}if(n&&t===-1){this.selectedFeatureIndex=0;return}n&&t!==-1||(this.selectedFeatureIndex=e.length?0:-1)}_centerAtLocation(){let{view:e}=this,t=C(this);this._cancelCenterAtLocation();let r=new AbortController,{signal:a}=r;return this._centerAtLocationController=r,!t||!e?Promise.reject(new n(`center-at-location:invalid-target-or-view`,`Cannot center at a location without a target and view.`,{target:t,view:e})):this.callGoTo({target:{target:t,scale:e.scale},options:{signal:a}}).catch(e=>{c(e)||i.getLogger(this).error(e)})}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){let{selectedFeature:t,updateLocationEnabled:n,view:r}=this;r&&!this._locationUpdateController&&n&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){this.selectedFeatureIndex!==-1&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){let{features:e,featureCount:t,featurePage:n,featuresPerPage:r,featureItems:i}=this;if(n==null)return;let a=((n-1)*r+t)%t,o=Math.min(a+r,i.length);for(let t=a;t<o;t++){let n=i[t];n&&(n.graphic??=e[t])}}async _selectedFeatureChange(e){let{location:t,updateLocationEnabled:n,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;let i=_(e)?.type;if((i===`map-image`||i===`imagery`||i===`imagery-tile`)&&(e.symbol=await E(e)),(n||!t)&&e.geometry){if(e.geometry.type===`point`){this.location=e.geometry;return}let{labelPointExecute:t}=await import(`../geometry/operators/labelPointOperator.js`);this.location=t(e.geometry);return}if(n&&!e.geometry){await this._centerAtLocation();let e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.featureStream&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set(`featureItems`,[])}_updateFeatureItems(){let e=this.selectedFeature,t=this.features,n=this.featureItems,r=this.view,i=this.spatialReference,a=this.map,o=this.timeZone,s=this.location,c=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length){this._destroyFeatureItems();return}let l=[],u=new Map,d=new Set;n.forEach(e=>{let t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,f)=>{if(!t)return;let p=n[f];if(p&&!d.has(p)&&(p.graphic==null||p.graphic===t)){p.abilities=c,l[f]=p,d.add(p);return}let m=u.get(t);if(m&&!d.has(m)){m.abilities=c,l[f]=m,d.add(m);return}let h=new w({abilities:c,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:i,graphic:t===e?t:null,location:s,map:a,view:r,timeZone:o});l[f]=h,d.add(h)}),n.forEach(e=>{e&&!d.has(e)&&!e.destroyed&&e.destroy()}),this._set(`featureItems`,l)}_cancelCenterAtLocation(){this._centerAtLocationController=a(this._centerAtLocationController)}_cancelFeatureStream(){let e=this._activeFeatureStream;this._activeFeatureStream=null,this._set(`pendingLocation`,null),this._get(`featureStream`)===e&&this._set(`featureStream`,null),e?.return&&e.return(void 0).catch(()=>{})}async _locationUpdate(e){let{spatialReference:t}=this,n=this.selectedFeature,r=n?.geometry?.type,a=this.location;if(r&&r!==`mesh`&&t&&a&&n){if(r===`point`){let{labelPointExecute:t}=await import(`../geometry/operators/labelPointOperator.js`);if(e?.signal?.aborted||this.selectedFeature!==n||!n.geometry)return;this.location=t(n.geometry);return}try{let r=n.geometry,i=this._getHighlightLayer(n),o=n.getObjectId();if(!i||!this.view)return;if(o!=null){let n=this.view?.allLayerViews.find(e=>e.layer.uid===i.uid);if(!n||!(`queryFeatures`in n))return;let a=n.createQuery();a.outSpatialReference=t,a.objectIds=[o],a.returnGeometry=!0;let{features:s}=await n.queryFeatures(a,e);if(e?.signal?.aborted)return;r=s[0]?.geometry}if(!r||r.type===`mesh`)return;r=m(r,t),M??=await Promise.all([import(`../geometry/operators/intersectsOperator.js`),import(`../geometry/operators/proximityOperator.js`)]);let[{intersectsExecute:s},{proximityGetNearestCoordinate:c}]=M;if(!s(r,a)){let e=c(r,a).coordinate??a;this.selectedFeature===n&&(this.location=e)}}catch(e){c(e)||i.getLogger(this).error(e)}}}_cancelLocationUpdate(){this._locationUpdateController=a(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){let t=_(e),{layer:n}=e;return t&&`layer`in t&&t.layer?t.layer:t?.type===`map-notes`||t?.type===`sketch`||t?.type===`subtype-group`?t:n??t}_getHighlightLayerView(e,t){return t.type===`subtype-sublayer`&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,n){if(N(t.type,n))return e;let r=e.getObjectId();if(r!=null)return r;let i=t.type===`imagery`?void 0:`objectIdField`in t?t.objectIdField||v:null,a=e.attributes;return a&&i&&a[i]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);let n=this[t];if(!n)return;let{highlightEnabled:r,view:i,open:a}=this;if(!i||!r||!a)return;let o=this._getHighlightLayer(n);if(!o)return;let s=this._getHighlightLayerView(i,o);if(!s)return;this._highlightPromises[e]=s;let c=await s;if(!c||!O(c)||this._highlightPromises[e]!==s||!this[t]||!this.highlightEnabled)return;let l=c.highlight(this._getHighlightTarget(n,o,i.type));this.addHandles(l,e)}async _highlightActiveFeature(){return this._highlightFeature(`highlight-active-feature`,`activeFeature`)}async _highlightSelectedFeature(){return this._highlightFeature(`highlight-selected-feature`,`selectedFeature`)}async _consumeFeatureStream(e,t){try{for await(let n of e){if(e!==this._activeFeatureStream)return;let r=!this._featureStreamHasYielded;r&&(this.features=[]),t!==void 0&&(this.location=t,t=void 0),this._set(`pendingLocation`,null),this._addFeature(n),r&&(this._featureStreamHasYielded=!0)}}finally{this._activeFeatureStream===e&&(this._featureStreamHasYielded||(this.features=[]),this._activeFeatureStream=null,this._set(`pendingLocation`,null),this._waitingForResultChange())}}_addFeature(e){let{features:t}=this;t.includes(e)||(this.features=t.concat(e))}};e([d()],P.prototype,`_initialDisplayMode`,void 0),e([d()],P.prototype,`_activeFeatureStream`,void 0),e([d()],P.prototype,`_featureStreamHasYielded`,void 0),e([d({type:y})],P.prototype,`actions`,void 0),e([d({readOnly:!0})],P.prototype,`active`,null),e([d()],P.prototype,`activeFeature`,void 0),e([d({readOnly:!0})],P.prototype,`allActions`,null),e([d()],P.prototype,`aggregatedFeaturesEnabled`,void 0),e([d({value:null})],P.prototype,`content`,null),e([d({type:y,readOnly:!0})],P.prototype,`defaultActions`,null),e([d({type:Boolean})],P.prototype,`defaultPopupTemplateEnabled`,void 0),e([d({readOnly:!0})],P.prototype,`diagnostics`,void 0),e([d({readOnly:!0})],P.prototype,`effectiveHeading`,null),e([d({readOnly:!0})],P.prototype,`featureCount`,null),e([d()],P.prototype,`featurePage`,void 0),e([d({value:[]})],P.prototype,`features`,null),e([d()],P.prototype,`featureStream`,null),e([d()],P.prototype,`featuresPerPage`,void 0),e([d()],P.prototype,`featureMenuOpen`,void 0),e([d({type:T})],P.prototype,`featureItemAbilities`,void 0),e([d({readOnly:!0})],P.prototype,`featureItems`,void 0),e([d()],P.prototype,`heading`,void 0),e([d()],P.prototype,`highlightEnabled`,void 0),e([d()],P.prototype,`includeDefaultActions`,void 0),e([d()],P.prototype,`initialDisplayMode`,null),e([d({type:p})],P.prototype,`location`,null),e([d()],P.prototype,`map`,null),e([d()],P.prototype,`open`,void 0),e([d({readOnly:!0})],P.prototype,`pendingLocation`,null),e([d({readOnly:!0})],P.prototype,`streamingFeatures`,null),e([d({value:null,readOnly:!0})],P.prototype,`selectedFeature`,null),e([d({value:-1})],P.prototype,`selectedFeatureIndex`,null),e([d({readOnly:!0})],P.prototype,`selectedFeatureItem`,null),e([d({type:h})],P.prototype,`spatialReference`,null),e([d({readOnly:!0})],P.prototype,`state`,null),e([d()],P.prototype,`timeZone`,null),e([d()],P.prototype,`updateLocationEnabled`,void 0),e([d()],P.prototype,`view`,void 0),e([d({readOnly:!0})],P.prototype,`waitingForContents`,null),e([d({readOnly:!0})],P.prototype,`waitingForResult`,null),e([d()],P.prototype,`zoomFactor`,void 0),P=e([f(`esri.popup.FeatureContentCollection`)],P);const F=P;export{F as default};
2
+ import{__decorate as e}from"tslib";import t from"../core/Error.js";import{EventedAccessor as n}from"../core/Evented.js";import r from"../core/Logger.js";import{abortMaybe as i}from"../core/maybe.js";import{debounce as a,logOnError as o,isAbortError as s}from"../core/promiseUtils.js";import{watch as c,when as l}from"../core/reactiveUtils.js";import{property as u,subclass as d}from"../core/accessorSupport/decorators.js";import f from"../geometry/Point.js";import{project as p}from"../geometry/projectionUtils.js";import m from"../geometry/SpatialReference.js";import{geographicToWebMercator as h}from"../geometry/support/webMercatorUtils.js";import{getGraphicLayer as g}from"../graphic/graphicOriginUtils.js";import{fallbackObjectIDAttribute as _}from"../layers/LayerConstants.js";import{ActionsCollection as v,createDefaultActions as y}from"./actions.js";import{getSelectedTarget as b}from"./actionUtils.js";import x from"./FeatureContent.js";import S from"./support/FeatureAbilities.js";import{getDisplayedSymbol as C}from"../symbols/support/symbolUtils.js";import{system as w}from"../time/constants.js";import{highlightsSupported as T}from"../views/support/layerViewUtils.js";import{GoTo as E}from"../widgets/support/GoTo.js";let D=null;function O(e,t){switch(e){case`building-scene`:case`map-image`:case`tile`:case`imagery`:return!0;case`imagery-tile`:return t===`2d`;default:return!1}}let k=class extends E(n){constructor(e){super(e),this._centerAtLocationController=null,this._locationUpdateController=null,this._highlightPromises={"highlight-active-feature":null,"highlight-selected-feature":null},this._defaultFeatureAbilities=new S,this._activeFeatureStream=null,this._featureStreamHasYielded=!1,this.actions=new v,this.activeFeature=null,this.aggregatedFeaturesEnabled=!1,this.defaultPopupTemplateEnabled=!1,this.diagnostics=null,this.featurePage=null,this.featuresPerPage=20,this.featureMenuOpen=!1,this.featureItemAbilities=null,this.featureItems=[],this.heading=null,this.highlightEnabled=!0,this.includeDefaultActions=!0,this.open=!1,this.updateLocationEnabled=!1,this.view=null,this.zoomFactor=4,this._debouncedLocationUpdate=a(async()=>{this._cancelLocationUpdate();let e=new AbortController,{signal:t}=e;this._locationUpdateController=e,await this._locationUpdate({signal:t}).catch(()=>{}).finally(()=>{this._locationUpdateController===e&&(this._locationUpdateController=null)})})}initialize(){this.addHandles([c(()=>this.view?.scale,()=>{this.open&&o(this._debouncedLocationUpdate(),r.getLogger(this))}),c(()=>[this.highlightEnabled,this.selectedFeature,this.open,this.view],()=>this._highlightSelectedFeature()),c(()=>[this.highlightEnabled,this.activeFeature,this.open,this.view],()=>this._highlightActiveFeature()),c(()=>this.location,e=>this._locationChange(e)),c(()=>this.selectedFeature,e=>this._selectedFeatureChange(e)),c(()=>[this.selectedFeatureIndex,this.featureCount,this.featuresPerPage],()=>this._selectedFeatureIndexChange()),c(()=>[this.featurePage,this.selectedFeatureIndex,this.featureCount,this.featuresPerPage,this.featureItems],()=>this._setGraphicOnFeatureItems()),c(()=>this.featureItems,()=>this._featureItemsChange()),c(()=>[this.featureItemAbilities?.attachmentsContent,this.featureItemAbilities?.chartAnimation,this.featureItemAbilities?.customContent,this.featureItemAbilities?.expressionContent,this.featureItemAbilities?.fieldsContent,this.featureItemAbilities?.mediaContent,this.featureItemAbilities?.relationshipContent,this.featureItemAbilities?.textContent,this.featureItemAbilities?.utilityNetworkAssociationsContent,this.features,this.map,this.spatialReference,this.timeZone],()=>this._updateFeatureItems()),l(()=>!this.open,()=>this.aggregatedFeaturesEnabled=!1)])}destroy(){this._cancelLocationUpdate(),this._cancelCenterAtLocation(),this._cancelFeatureStream(),this.aggregatedFeaturesEnabled=!1,this.view=null,this.map=null,this.spatialReference=null,this.timeZone=null}get defaultActions(){let e=this._get(`defaultActions`)||new v;return e.removeAll(),e.addMany(this.selectedFeatureItem?.defaultActions.toArray()??y()),e}get active(){return this.open&&!this.waitingForResult}set content(e){this.featureStream=null,this._set(`diagnostics`,null),this.features=[],this._set(`content`,e)}get effectiveHeading(){return this.selectedFeatureItem?.heading??this.heading}get featureCount(){return this.features.length}set features(e){if(this._get(`features`)===e)return;let t=e||[];this._set(`features`,t),this._syncSelectedFeatureIndex(t)}get featureStream(){return this._get(`featureStream`)||null}set featureStream(e){this._setFeatureStream(e)}_setFeatureStream(e,t,n){this._set(`diagnostics`,n??null),this._get(`featureStream`)!==e&&(this._set(`featureStream`,e),this._cancelFeatureStream(),e&&(this._featureStreamHasYielded=!1,this._set(`pendingLocation`,t??null),this._activeFeatureStream=e,this._consumeFeatureStream(e,t).catch(()=>{})))}get initialDisplayMode(){return this._initialDisplayMode??(this.view?.focusRegionEnabled?`list`:`feature`)}set initialDisplayMode(e){this._initialDisplayMode=e,this._syncSelectedFeatureIndex(this.features)}set location(e){let t=e?.spatialReference?.isWGS84&&this.spatialReference?.isWebMercator?h(e):e;this._set(`location`,t)}get map(){return this.view?.map??null}set map(e){this._override(`map`,e)}get pendingLocation(){return this._get(`pendingLocation`)??null}get streamingFeatures(){return this._activeFeatureStream!=null}get selectedFeature(){return this.selectedFeatureIndex===-1?null:this.features[this.selectedFeatureIndex]??null}get selectedFeatureIndex(){let e=this._get(`selectedFeatureIndex`);return typeof e==`number`?e:-1}set selectedFeatureIndex(e){let{featureCount:t}=this;(isNaN(e)||e<0||!t)&&(e=-1),this.activeFeature=null,this._set(`selectedFeatureIndex`,e)}get selectedFeatureItem(){return this.featureItems[this.selectedFeatureIndex]||null}get spatialReference(){return this.view?.spatialReference??null}set spatialReference(e){this._override(`spatialReference`,e)}get state(){return this.view?this.view.ready?`ready`:`disabled`:this.map?`ready`:`disabled`}get timeZone(){return this.view?.timeZone??w}set timeZone(e){this._overrideIfSome(`timeZone`,e)}get waitingForContents(){return this.featureItems.some(e=>e.waitingForContent)}get waitingForResult(){return this.streamingFeatures&&!this._featureStreamHasYielded}zoomTo(e){return this.callGoTo(e)}clear(){this._cancelFeatureStream(),this._set(`diagnostics`,null),this.set({featureStream:null,features:[],content:null,heading:null,location:null,activeFeature:null})}openFeatureStream(e){this._setFeatureStream(e.featureStream,e.location??null,e.diagnostics),this.open=!0}async fetchFeatures(e,n){let{view:r}=this;if(!r||!e)throw new t(`fetch-features:invalid-screenpoint-or-view`,`Cannot fetch features without a screen point/screen area and view.`,{screenPoint:e,view:r});let i={},a=r.fetchPopupFeatures(e,{diagnostics:i,pointerType:n?.event?.pointerType,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,signal:n?.signal});this._setFeatureStream(a,void 0,i)}next(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex+1,this.featureCount)}previous(){this.selectedFeatureIndex=this._getRoundRobinIndex(this.selectedFeatureIndex-1,this.featureCount)}_syncSelectedFeatureIndex(e){let{selectedFeatureIndex:t}=this,n=this._activeFeatureStream!=null&&e.length>0;if(this.initialDisplayMode===`list`){n||(this.selectedFeatureIndex=-1);return}if(n&&t===-1){this.selectedFeatureIndex=0;return}n&&t!==-1||(this.selectedFeatureIndex=e.length?0:-1)}_centerAtLocation(){let{view:e}=this,n=b(this);this._cancelCenterAtLocation();let i=new AbortController,{signal:a}=i;return this._centerAtLocationController=i,!n||!e?Promise.reject(new t(`center-at-location:invalid-target-or-view`,`Cannot center at a location without a target and view.`,{target:n,view:e})):this.callGoTo({target:{target:n,scale:e.scale},options:{signal:a}}).catch(e=>{s(e)||r.getLogger(this).error(e)})}_getRoundRobinIndex(e,t){return(e+t)%t}_locationChange(e){let{selectedFeature:t,updateLocationEnabled:n,view:r}=this;r&&!this._locationUpdateController&&n&&e&&(!t||t.geometry)&&this._centerAtLocation()}_selectedFeatureIndexChange(){this.selectedFeatureIndex!==-1&&(this.featurePage=this.featureCount>0?Math.floor(this.selectedFeatureIndex/this.featuresPerPage)+1:null)}_featureItemsChange(){this.featurePage=this.featureCount>0?1:null}_setGraphicOnFeatureItems(){let{features:e,featureCount:t,featurePage:n,featuresPerPage:r,featureItems:i}=this;if(n==null)return;let a=((n-1)*r+t)%t,o=Math.min(a+r,i.length);for(let t=a;t<o;t++){let n=i[t];n&&(n.graphic??=e[t])}}async _selectedFeatureChange(e){let{location:t,updateLocationEnabled:n,view:r}=this;if(this.aggregatedFeaturesEnabled=!1,!e||!r)return;let i=g(e)?.type;if((i===`map-image`||i===`imagery`||i===`imagery-tile`)&&(e.symbol=await C(e)),(n||!t)&&e.geometry){if(e.geometry.type===`point`){this.location=e.geometry;return}let{labelPointExecute:t}=await import(`../geometry/operators/labelPointOperator.js`);this.location=t(e.geometry);return}if(n&&!e.geometry){await this._centerAtLocation();let e=r.center?.clone();e&&(this.location=e)}}_waitingForResultChange(){!this.featureCount&&this.featureStream&&(this.open=!1)}_destroyFeatureItems(){this.featureItems.forEach(e=>e&&!e.destroyed&&e.destroy()),this._set(`featureItems`,[])}_updateFeatureItems(){let e=this.selectedFeature,t=this.features,n=this.featureItems,r=this.view,i=this.spatialReference,a=this.map,o=this.timeZone,s=this.location,c=this.featureItemAbilities??this._defaultFeatureAbilities;if(!t?.length){this._destroyFeatureItems();return}let l=[],u=new Map,d=new Set;n.forEach(e=>{let t=e?.graphic;e&&t&&u.set(t,e)}),t.forEach((t,f)=>{if(!t)return;let p=n[f];if(p&&!d.has(p)&&(p.graphic==null||p.graphic===t)){p.abilities=c,l[f]=p,d.add(p);return}let m=u.get(t);if(m&&!d.has(m)){m.abilities=c,l[f]=m,d.add(m);return}let h=new x({abilities:c,defaultPopupTemplateEnabled:this.defaultPopupTemplateEnabled,spatialReference:i,graphic:t===e?t:null,location:s,map:a,view:r,timeZone:o});l[f]=h,d.add(h)}),n.forEach(e=>{e&&!d.has(e)&&!e.destroyed&&e.destroy()}),this._set(`featureItems`,l)}_cancelCenterAtLocation(){this._centerAtLocationController=i(this._centerAtLocationController)}_cancelFeatureStream(){let e=this._activeFeatureStream;this._activeFeatureStream=null,this._set(`pendingLocation`,null),this._get(`featureStream`)===e&&this._set(`featureStream`,null),e?.return&&e.return(void 0).catch(()=>{})}async _locationUpdate(e){let{spatialReference:t}=this,n=this.selectedFeature,i=n?.geometry?.type,a=this.location;if(i&&i!==`mesh`&&t&&a&&n){if(i===`point`){let{labelPointExecute:t}=await import(`../geometry/operators/labelPointOperator.js`);if(e?.signal?.aborted||this.selectedFeature!==n||!n.geometry)return;this.location=t(n.geometry);return}try{let r=n.geometry,i=this._getHighlightLayer(n),o=n.getObjectId();if(!i||!this.view)return;if(o!=null){let n=this.view?.allLayerViews.find(e=>e.layer.uid===i.uid);if(!n||!(`queryFeatures`in n))return;let a=n.createQuery();a.outSpatialReference=t,a.objectIds=[o],a.returnGeometry=!0;let{features:s}=await n.queryFeatures(a,e);if(e?.signal?.aborted)return;r=s[0]?.geometry}if(!r||r.type===`mesh`)return;r=p(r,t),D??=await Promise.all([import(`../geometry/operators/intersectsOperator.js`),import(`../geometry/operators/proximityOperator.js`)]);let[{intersectsExecute:s},{proximityGetNearestCoordinate:c}]=D;if(!s(r,a)){let e=c(r,a).coordinate??a;this.selectedFeature===n&&(this.location=e)}}catch(e){s(e)||r.getLogger(this).error(e)}}}_cancelLocationUpdate(){this._locationUpdateController=i(this._locationUpdateController)}async _getLayerView(e,t){return await e.when(),e.whenLayerView(t)}_getHighlightLayer(e){let t=g(e),{layer:n}=e;return t&&`layer`in t&&t.layer?t.layer:t?.type===`map-notes`||t?.type===`sketch`||t?.type===`subtype-group`?t:n??t}_getHighlightLayerView(e,t){return t.type===`subtype-sublayer`&&t.parent&&this._mapIncludesLayer(t.parent)?this._getLayerView(e,t.parent):t&&this._mapIncludesLayer(t)?this._getLayerView(e,t):null}_getHighlightTarget(e,t,n){if(O(t.type,n))return e;let r=e.getObjectId();if(r!=null)return r;let i=t.type===`imagery`?void 0:`objectIdField`in t?t.objectIdField||_:null,a=e.attributes;return a&&i&&a[i]||e}_mapIncludesLayer(e){return!!this.map?.allLayers?.includes(e)}async _highlightFeature(e,t){this.removeHandles(e);let n=this[t];if(!n)return;let{highlightEnabled:r,view:i,open:a}=this;if(!i||!r||!a)return;let o=this._getHighlightLayer(n);if(!o)return;let s=this._getHighlightLayerView(i,o);if(!s)return;this._highlightPromises[e]=s;let c=await s;if(!c||!T(c)||this._highlightPromises[e]!==s||!this[t]||!this.highlightEnabled)return;let l=c.highlight(this._getHighlightTarget(n,o,i.type));this.addHandles(l,e)}async _highlightActiveFeature(){return this._highlightFeature(`highlight-active-feature`,`activeFeature`)}async _highlightSelectedFeature(){return this._highlightFeature(`highlight-selected-feature`,`selectedFeature`)}async _consumeFeatureStream(e,t){try{for await(let n of e){if(e!==this._activeFeatureStream)return;let r=!this._featureStreamHasYielded;r&&(this.features=[]),t!==void 0&&(this.location=t,t=void 0),this._set(`pendingLocation`,null),this._addFeature(n),r&&(this._featureStreamHasYielded=!0)}}finally{this._activeFeatureStream===e&&(this._featureStreamHasYielded||(this.features=[]),this._activeFeatureStream=null,this._set(`pendingLocation`,null),this._waitingForResultChange())}}_addFeature(e){let{features:t}=this;t.includes(e)||(this.features=t.concat(e))}};e([u()],k.prototype,`_initialDisplayMode`,void 0),e([u()],k.prototype,`_activeFeatureStream`,void 0),e([u()],k.prototype,`_featureStreamHasYielded`,void 0),e([u({type:v})],k.prototype,`actions`,void 0),e([u({type:v,readOnly:!0})],k.prototype,`defaultActions`,null),e([u({readOnly:!0})],k.prototype,`active`,null),e([u()],k.prototype,`activeFeature`,void 0),e([u()],k.prototype,`aggregatedFeaturesEnabled`,void 0),e([u({value:null})],k.prototype,`content`,null),e([u({type:Boolean})],k.prototype,`defaultPopupTemplateEnabled`,void 0),e([u({readOnly:!0})],k.prototype,`diagnostics`,void 0),e([u({readOnly:!0})],k.prototype,`effectiveHeading`,null),e([u({readOnly:!0})],k.prototype,`featureCount`,null),e([u()],k.prototype,`featurePage`,void 0),e([u({value:[]})],k.prototype,`features`,null),e([u()],k.prototype,`featureStream`,null),e([u()],k.prototype,`featuresPerPage`,void 0),e([u()],k.prototype,`featureMenuOpen`,void 0),e([u({type:S})],k.prototype,`featureItemAbilities`,void 0),e([u({readOnly:!0})],k.prototype,`featureItems`,void 0),e([u()],k.prototype,`heading`,void 0),e([u()],k.prototype,`highlightEnabled`,void 0),e([u()],k.prototype,`includeDefaultActions`,void 0),e([u()],k.prototype,`initialDisplayMode`,null),e([u({type:f})],k.prototype,`location`,null),e([u()],k.prototype,`map`,null),e([u()],k.prototype,`open`,void 0),e([u({readOnly:!0})],k.prototype,`pendingLocation`,null),e([u({readOnly:!0})],k.prototype,`streamingFeatures`,null),e([u({value:null,readOnly:!0})],k.prototype,`selectedFeature`,null),e([u({value:-1})],k.prototype,`selectedFeatureIndex`,null),e([u({readOnly:!0})],k.prototype,`selectedFeatureItem`,null),e([u({type:m})],k.prototype,`spatialReference`,null),e([u({readOnly:!0})],k.prototype,`state`,null),e([u()],k.prototype,`timeZone`,null),e([u()],k.prototype,`updateLocationEnabled`,void 0),e([u()],k.prototype,`view`,void 0),e([u({readOnly:!0})],k.prototype,`waitingForContents`,null),e([u({readOnly:!0})],k.prototype,`waitingForResult`,null),e([u()],k.prototype,`zoomFactor`,void 0),k=e([d(`esri.popup.FeatureContentCollection`)],k);const A=k;export{A as default};
package/popup/actions.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../core/Collection.js";import t from"../support/actions/ActionBase.js";import n from"../support/actions/ActionButton.js";import r from"../support/actions/ActionToggle.js";const i=e.ofType({key:`type`,defaultKeyValue:`button`,base:t,typeMap:{button:n,toggle:r}}),a=new n({icon:`magnifying-glass-plus`,id:`zoom-to-feature`,title:`{messages.zoom}`}),o=new n({icon:`magnifying-glass-plus`,id:`zoom-to-aggregated-features`,title:`{messages.zoom}`}),s=new n({icon:`list`,id:`browse-aggregated-features`,title:`{messages.browseAggregatedFeatures}`});export{i as ActionsCollection,s as browseAggregatedFeatures,o as zoomToAggregatedFeatures,a as zoomToFeature};
2
+ import e from"../core/Collection.js";import t from"../support/actions/ActionBase.js";import n from"../support/actions/ActionButton.js";import r from"../support/actions/ActionToggle.js";const i=e.ofType({key:`type`,defaultKeyValue:`button`,base:t,typeMap:{button:n,toggle:r}}),a=new n({icon:`magnifying-glass-plus`,id:`zoom-to-feature`,title:`{messages.zoom}`}),o=()=>[a.clone()],s=new n({icon:`magnifying-glass-plus`,id:`zoom-to-aggregated-features`,title:`{messages.zoom}`}),c=new n({icon:`list`,id:`browse-aggregated-features`,title:`{messages.browseAggregatedFeatures}`}),l=()=>[s.clone(),c.clone()];export{i as ActionsCollection,c as browseAggregatedFeatures,o as createDefaultActions,l as createDefaultAggregateActions,s as zoomToAggregatedFeatures,a as zoomToFeature};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"../../core/Logger.js";import{replace as t}from"../../core/string.js";import{getGraphicLayer as n}from"../../graphic/graphicOriginUtils.js";import{formatDate as r,convertDateFormatToIntlOptions as i}from"../../intl/date.js";import{convertNumberFieldFormatToIntlOptions as a,convertNumberFormatToIntlOptions as o,formatNumber as s}from"../../intl/number.js";import{typesHaveUniqueIdsAndNames as c}from"../../layers/support/featureLayerUtils.js";import{fieldFormatFromFieldInfo as l}from"../../layers/support/fieldFormatUtils.js";import{isRasterPixelValueField as u,featureHasFields as d,isTimeOnlyField as f}from"../../layers/support/fieldUtils.js";import{getFieldConfigurationsContainer as p,getEffectiveLayerCapabilities as m}from"../../layers/support/layerUtils.js";import{formatAnyDate as h,isAnyDateField as g}from"../../smartMapping/support/utils.js";import{loadArcade as _}from"../../support/loadArcade.js";import{getTimeZoneFormattingOptions as v}from"../../time/timeZoneUtils.js";const y=()=>e.getLogger(`esri.popup.support.featureUtils`),b=/href=(""|'')/gi,ee=/(\{([^{\r\n]+)\})/g,te=/'/g,x=/^\s*expression\//i,ne=/(\n)/gi,re=/[\u00A0-\u9999<>&]/gim,ie=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,ae=/^(?:mailto:|tel:)/,S=`relationships/`,C=i(`short-date-short-time`);function oe(e){if(e!=null)return(e.sourceLayer||e.layer)??void 0}const se=new Set([`building`,`knowledge-graph`,`link-chart`,`map-image`,`map-notes`,`subtype-group`,`tile`]);function ce(e){let t=e?.origin;return(t==null?void 0:se.has(t.type??``)?t.sublayer:t.layer)??e?.layer}async function le({type:e,value:t,event:n}){try{return typeof t==`function`?t(n):await t}catch(r){y().error(`error`,`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t});return}}function ue(e=``){if(e)return!ae.test(e.trim().toLowerCase())}function w(e){return e?x.test(e):!1}function T(e,t){if(!t||!w(t)||!e)return;let n=t.replace(x,``).toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function E(e){let{fieldInfo:t,graphic:n,layer:r}=e;return de({fieldInfo:t,graphic:n})?p(r,{graphic:n}):null}function de({fieldInfo:e,graphic:t}){return!!e?.fieldName&&!w(e.fieldName)&&!J(e.fieldName)&&!t?.popupTemplate}function fe({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;let a=T(e,t.fieldName);if(a)return a.title||null;let o=E({fieldInfo:t,graphic:n,layer:i});if(o){let e=o.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function D(e){let{configurableFieldsContainer:t,fieldInfo:n,isContentFieldInfos:r}=e;if(!n?.fieldName)return null;let i=!t.popupTemplate&&!t.fieldConfigurations?l(n,t.getField(n.fieldName)):t.getFieldConfiguration(n.fieldName)?.fieldFormat;return r&&n.fieldFormat||i}function pe(e,t){return`{${t.get(e.toLowerCase())?.fieldName||e}}`}function me(e){return e.replaceAll(b,``)}function O(e,t){let n=k(t,e);return n?n.name:e}function he(e,t){return e&&e.map(e=>O(e,t))}function k(e,t){return!(e&&typeof e.getField==`function`)||!t?null:e.getField(t)??null}function A(e){return`${e}`.trim()}function ge({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:a}){return r?j({formattedAttributes:t,template:I(r,{...t,...i,...e},n),fieldInfoMap:a}):``}function j({formattedAttributes:e,template:n,fieldInfoMap:r}){return A(me(t(t(n,e=>pe(e,r)),e)))}function M(e,t,n=!1){let r=t[e];typeof r==`string`&&(t[e]=(n?encodeURIComponent(r):r).replaceAll(te,`%27`))}function N(e,t=!1){let n={...e};return Object.keys(n).forEach(e=>M(e,n,t)),n}function P(e,n,r){n=A(n);let i=n&&!n.startsWith(`{`);return t(e,N(r,i||!1))}function F(e,t){return e.replaceAll(ee,(e,n,r)=>{let i=k(t,r);return i?`{${i.name}}`:n})}function I(e,t,n){let r=F(e,n);return r&&r.replaceAll(ie,(e,n,r)=>P(e,n||r,t))}function L(e,t){let n=t?.fieldFormat?.type===`number`||t?.format&&t.format.dateFormat==null&&(t.format.places!=null||t.format.digitSeparator!=null);if(typeof e==`string`&&n){let t=Number(e);if(!isNaN(t))return t}return e}function R(e){return typeof e==`object`&&!!e&&`fieldsIndex`in e&&`geometryType`in e&&`getField`in e&&`load`in e&&`loaded`in e&&`objectIdField`in e&&`spatialReference`in e&&`type`in e&&(e.type===`feature`||e.type===`scene`||e.type===`subtype-group`||e.type===`subtype-sublayer`||e.type===`sublayer`)&&`when`in e}function z(e){return typeof e==`object`&&!!e&&`createQuery`in e&&`queryFeatureCount`in e&&`queryObjectIds`in e&&`queryRelatedFeatures`in e&&`queryRelatedFeaturesCount`in e&&`relationships`in e}function B(e){return R(e)&&z(e)}function _e(e){return e&&typeof e==`object`&&`createQuery`in e&&`getField`in e&&`queryFeatureCount`in e&&`queryFeatures`in e&&`queryObjectIds`in e&&`capabilities`in e&&`fields`in e&&`fieldsIndex`in e&&`type`in e&&(e.type===`feature`||e.type===`subtype-group`||e.type===`subtype-sublayer`||e.type===`sublayer`)&&`when`in e?e.type===`subtype-sublayer`&&`parent`in e&&e.parent&&typeof e.parent==`object`?`globalIdField`in e.parent:`globalIdField`in e:!1}function ve(e){return!e||typeof e!=`object`?!1:B(n(e))}function V(e,t){let{fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:c,layer:l,preventPlacesFormatting:d,timeZone:f}=t,p=U(n,r),m=E({fieldInfo:p,graphic:i,layer:l}),g=k(m||l,r),_=m?null:p?.format,v=m?D({configurableFieldsContainer:m,fieldInfo:p,isContentFieldInfos:c}):null,y=v?.type===`number`;if(p&&!u(r)){let t=g?.type,n=v?.type===`date-time`,r=_?.dateFormat;if(t===`date`||t===`date-only`||t===`time-only`||t===`timestamp-offset`||n||r)return h(e,{format:n?void 0:r,fieldFormat:n?v:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:l&&`preferredTimeZone`in l?l.preferredTimeZone:null,viewTimeZone:f,datesInUnknownTimezone:l&&`datesInUnknownTimezone`in l?!!l.datesInUnknownTimezone:!1}})}if(typeof e==`string`&&u(r)&&_)return ye(e,_);if(e=L(e,{format:y?void 0:_,fieldFormat:y?v:void 0}),typeof e==`string`||e==null||_==null&&v==null)return G(e);let b=y?a(v):_?o(_):void 0;return d?s(e,{...b,minimumFractionDigits:0,maximumFractionDigits:20}):s(e,b)}function ye(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(`,`)?H(e,`,`,`, `,t):e.includes(`;`)?H(e,`;`,`; `,t):e.includes(` `)?H(e,` `,` `,t):s(Number(e),o(t))}function H(e,t,n,r){return e.trim().split(t).map(e=>s(Number(e),o(r))).join(n)}function U(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function be({fieldName:e,graphic:t,layer:n}){if(J(e)||!n||typeof n.getFeatureType!=`function`)return null;let{typeIdField:r}=n;if(!r||e!==r)return null;let i=n.getFeatureType(t);return i?i.name:null}function xe({fieldName:e,value:t,graphic:n,layer:r}){if(J(e)||!r||typeof r.getFieldDomain!=`function`)return null;let i=n&&r.getFieldDomain(e,{feature:n});return!i||i.type!==`coded-value`?null:i.getName(t)}function Se(e,t,n,i){let{creatorField:a,creationDateField:o,editorField:s,editDateField:c}=e;if(!t)return;let l=v(i&&`preferredTimeZone`in i?i.preferredTimeZone:null,i&&`datesInUnknownTimezone`in i?!!i.datesInUnknownTimezone:!1,n,C,`date`),u={...C,...l},d=t[c];if(typeof d==`number`){let e=t[s];return{type:`edit`,date:r(d,u),user:e}}let f=t[o];if(typeof f==`number`){let e=t[a];return{type:`create`,date:r(f,u),user:e}}return null}function W(e,t){let n=new Map;if(!e)return n;for(let r of e){if(!r.fieldName)continue;let e=O(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function Ce(e){let t=[];if(!e)return t;let{fieldInfos:n,content:r}=e;return n&&t.push(...n),!r||!Array.isArray(r)||r.forEach(e=>{if(e.type===`fields`){let n=e?.fieldInfos;n&&t.push(...n)}}),t}function we(e){return e.replaceAll(re,e=>`&#${e.charCodeAt(0)};`)}function G(e){return typeof e==`string`?e.replaceAll(ne,`<br class="esri-text-new-line" />`):e}function K(e){let{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:a,layer:o,timeZone:s,value:l}=e;if(l==null)return``;let u=xe({fieldName:r,value:l,graphic:i,layer:o});if(u)return u;let d=o?.types&&c(o.types)?be({fieldName:r,graphic:i,layer:o}):null;if(d)return d;if(t.get(r.toLowerCase()))return V(l,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:a,layer:o,timeZone:s});let p=o?.fieldsIndex?.get(r);return p&&(g(p)||f(p))?h(l,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&`preferredTimeZone`in o?o.preferredTimeZone:null,viewTimeZone:s,datesInUnknownTimezone:o&&`datesInUnknownTimezone`in o?!!o.datesInUnknownTimezone:!1}}):G(l)}function Te({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:a,relatedInfos:o,timeZone:s}){let c={};return o?.forEach(e=>Ae({attributes:c,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:a,timeZone:s})),e&&Object.keys(e).forEach(o=>{let l=e[o];c[o]=K({fieldInfoMap:t,fieldInfos:n,fieldName:o,graphic:r,isContentFieldInfos:i,layer:a,timeZone:s,value:l})}),c}async function q(e,t){let{layer:n,graphic:r,outFields:i,objectIds:a,returnGeometry:o,spatialReference:s}=e,c=a[0];if(typeof c!=`number`&&typeof c!=`string`){let e={layer:n,graphic:r,objectId:c,requiredFields:i};return y().warn(`Could not query required fields for the specified feature. The feature's ID is invalid.`,e),null}if(!m(n)?.operations?.supportsQuery){let e={layer:n,graphic:r,requiredFields:i,returnGeometry:o};return y().warn(`The specified layer cannot be queried. The following fields will not be available.`,e),null}let l=n.createQuery();return l.objectIds=a,l.outFields=i?.length?i:[n.objectIdField],l.returnGeometry=!!o,l.returnZ=!!o,l.returnM=!!o,l.outSpatialReference=s,(await n.queryFeatures(l,t)).features[0]}async function Ee(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{hasGeometryFunctions:t}}=await _();return t(e)}async function De(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{requiresTrack:t}}=await _();return t(e)}async function Oe({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t||(typeof n.load==`function`&&await n.load(i),!e.attributes))return;let a=n.objectIdField,o=e.attributes[a];if(o==null)return;let s=[o],c=new Set(await t.getRequiredFields(n.fieldsIndex));n.timeInfo?.trackIdField!=null&&!c.has(n.timeInfo.trackIdField)&&await De(t)&&c.add(n.timeInfo.trackIdField);let l=d(e,c),u=l?[]:c.has(a)?[...c]:[...c,a],f=t.returnGeometry||await Ee(t);if(l&&!f)return;let p=await q({layer:n,graphic:e,outFields:u,objectIds:s,returnGeometry:f,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function J(e=``){return e?e.includes(S):!1}function ke(e){return e?`${S}${e.layerId}/${e.fieldName}`:``}function Y({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:a,timeZone:o}){e&&t&&n&&Object.keys(t.attributes).forEach(s=>{let c=ke({layerId:n.relation.id.toString(),fieldName:s}),l=t.attributes[s];e[c]=K({fieldName:c,fieldInfos:r,fieldInfoMap:i,layer:a,value:l,graphic:t,timeZone:o})})}function Ae({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a}){e&&t&&(t.relatedFeatures?.forEach(o=>Y({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a})),t.relatedStatsFeatures?.forEach(o=>Y({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a})))}const X=e=>{if(!e)return!1;let t=e.toUpperCase();return t.includes(`CURRENT_TIMESTAMP`)||t.includes(`CURRENT_DATE`)||t.includes(`CURRENT_TIME`)},Z=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||t===`attachments`)return;let i=n.where==null?null:n.where,a=n.geometry==null?null:n.geometry;!X(r)&&!X(i)&&a?.type!==`extent`&&n.resultType!==`tile`&&(n.cacheHint=!0)},je=({query:e,layer:t,method:n})=>{Z({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??``}`})},Me=({queryPayload:e,layer:t,method:n})=>{Z({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??``}`})};function Ne(e,t,n){return!e||!t||!n?null:t.type===`sublayer`?$({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||$({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):$({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||$({layers:e.allTables,map:e,relatedLayer:t,relationship:n})}function Pe(e,t){return!e||!(`utilityNetworks`in e)||!t?null:e.utilityNetworks?.find(e=>e.isUtilityLayer(t))}function Q(e,t){return e?.allTables.find(e=>e.type===`feature`&&e.layerId===t.id&&e.url===t.layer?.url)}function $({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(let a of i){if(a.type===`map-image`){let n=$({layers:a.sublayers,map:e,relatedLayer:r,relationship:t})||$({layers:a.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!B(a))continue;if(r.type===`sublayer`){if(a!==r&&a.id===n)return a.isTable?Q(e,a):a;continue}let i=r.type===`scene`&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if(a.type===`sublayer`){if(a!==r&&a.layer?.url===i&&a.id===n)return a.isTable?Q(e,a):a;continue}if(a!==r&&a.url===i&&a.layerId===n)return a}return null}export{G as applyTextFormattingHTML,W as createFieldInfoMap,Ne as findRelatedLayer,Pe as findUtilityNetwork,F as fixTokens,Te as formatAttributes,Se as formatEditInfo,V as formatValueToFieldInfo,Ce as getAllFieldInfos,E as getConfigurableFieldsContainer,D as getFieldFormat,U as getFieldInfo,fe as getFieldInfoLabel,O as getFixedFieldName,he as getFixedFieldNames,ce as getPopupLayer,oe as getSourceLayer,le as graphicCallback,we as htmlEntities,_e as isAssociatedFeatureSupportedLayer,w as isExpressionField,R as isFeatureSupportedLayer,ve as isGraphicForRelatableFeatureSupportedLayer,B as isRelatableFeatureSupportedLayer,z as isRelatableLayer,J as isRelatedField,je as preLayerQueryCallback,Me as preRequestCallback,q as querySourceLayer,Oe as queryUpdatedFeature,ue as shouldOpenInNewTab,j as substituteAttributes,ge as substituteFieldsInLinksAndAttributes};
2
+ import e from"../../core/Logger.js";import{replace as t}from"../../core/string.js";import{getGraphicLayer as n}from"../../graphic/graphicOriginUtils.js";import{formatDate as r,convertDateFormatToIntlOptions as i}from"../../intl/date.js";import{convertNumberFieldFormatToIntlOptions as a,convertNumberFormatToIntlOptions as o,formatNumber as s}from"../../intl/number.js";import{typesHaveUniqueIdsAndNames as c}from"../../layers/support/featureLayerUtils.js";import{fieldFormatFromFieldInfo as l}from"../../layers/support/fieldFormatUtils.js";import{isRasterPixelValueField as u,featureHasFields as d,isTimeOnlyField as f}from"../../layers/support/fieldUtils.js";import{getFieldConfigurationsContainer as p,getEffectiveLayerCapabilities as m}from"../../layers/support/layerUtils.js";import{formatAnyDate as h,isAnyDateField as g}from"../../smartMapping/support/utils.js";import{loadArcade as _}from"../../support/loadArcade.js";import{getTimeZoneFormattingOptions as v}from"../../time/timeZoneUtils.js";const y=()=>e.getLogger(`esri.popup.support.featureUtils`),b=/href=(""|'')/gi,ee=/(\{([^{\r\n]+)\})/g,te=/'/g,x=/^\s*expression\//i,ne=/(\n)/gi,re=/[\u00A0-\u9999<>&]/gim,ie=/href\s*=\s*(?:"([^"]+)"|'([^']+)')/gi,ae=/^(?:mailto:|tel:)/,S=`relationships/`,C=i(`short-date-short-time`);function oe(e){if(e!=null)return(e.sourceLayer||e.layer)??void 0}const se=new Set([`building`,`knowledge-graph`,`link-chart`,`map-image`,`map-notes`,`subtype-group`,`tile`]);function ce(e){let t=e?.origin;return(t==null?void 0:se.has(t.type??``)?t.sublayer:t.layer)??e?.layer}async function le({type:e,value:t,event:n}){try{return typeof t==`function`?t(n):await t}catch(r){y().error(`error`,`An error occurred when calling the "${e}" function`,{error:r,graphic:n.graphic,value:t});return}}function ue(e=``){if(e)return!ae.test(e.trim().toLowerCase())}function w(e){return e?x.test(e):!1}function T(e,t){if(!t||!w(t)||!e)return;let n=t.replace(x,``).toLowerCase();return e.find(({name:e})=>e.toLowerCase()===n)}function E(e){let{fieldInfo:t,graphic:n,layer:r}=e;return de({fieldInfo:t,graphic:n})?p(r,{graphic:n}):null}function de({fieldInfo:e,graphic:t}){return!!e?.fieldName&&!w(e.fieldName)&&!J(e.fieldName)&&!t?.popupTemplate}function fe({expressionInfos:e,fieldInfo:t,graphic:n,isContentFieldInfos:r,layer:i}){if(!t?.fieldName)return null;let a=T(e,t.fieldName);if(a)return a.title||null;let o=E({fieldInfo:t,graphic:n,layer:i});if(o){let e=o.getFieldAlias(t.fieldName);return r?t.label||e||t.fieldName:e||t.fieldName}return t.label||t.fieldName}function D(e){let{configurableFieldsContainer:t,fieldInfo:n,isContentFieldInfos:r}=e;if(!n?.fieldName)return null;let i=!t.popupTemplate&&!t.fieldConfigurations?l(n,t.getField(n.fieldName)):t.getFieldConfiguration(n.fieldName)?.fieldFormat;return r&&n.fieldFormat||i}function pe(e,t){return`{${t.get(e.toLowerCase())?.fieldName||e}}`}function me(e){return e.replaceAll(b,``)}function O(e,t){let n=k(t,e);return n?n.name:e}function he(e,t){return e&&e.map(e=>O(e,t))}function k(e,t){return!(e&&typeof e.getField==`function`)||!t?null:e.getField(t)??null}function A(e){return`${e}`.trim()}function ge({attributes:e,globalAttributes:t,layer:n,text:r,expressionAttributes:i,fieldInfoMap:a}){return r?j({formattedAttributes:t,template:I(r,{...t,...i,...e},n),fieldInfoMap:a}):``}function j({formattedAttributes:e,template:n,fieldInfoMap:r}){return A(me(t(t(n,e=>pe(e,r)),e)))}function M(e,t,n=!1){let r=t[e];typeof r==`string`&&(t[e]=(n?encodeURIComponent(r):r).replaceAll(te,`%27`))}function N(e,t=!1){let n={...e};return Object.keys(n).forEach(e=>M(e,n,t)),n}function P(e,n,r){n=A(n);let i=n&&!n.startsWith(`{`);return t(e,N(r,i||!1))}function F(e,t){return e.replaceAll(ee,(e,n,r)=>{let i=k(t,r);return i?`{${i.name}}`:n})}function I(e,t,n){let r=F(e,n);return r&&r.replaceAll(ie,(e,n,r)=>P(e,n||r,t))}function L(e,t){let n=t?.fieldFormat?.type===`number`||t?.format&&t.format.dateFormat==null&&(t.format.places!=null||t.format.digitSeparator!=null);if(typeof e==`string`&&n){let t=Number(e);if(!isNaN(t))return t}return e}function R(e){return typeof e==`object`&&!!e&&`fieldsIndex`in e&&`geometryType`in e&&`getField`in e&&`load`in e&&`loaded`in e&&`objectIdField`in e&&`spatialReference`in e&&`type`in e&&(e.type===`feature`||e.type===`scene`||e.type===`subtype-group`||e.type===`subtype-sublayer`||e.type===`sublayer`)&&`when`in e}function z(e){return typeof e==`object`&&!!e&&`createQuery`in e&&`queryFeatureCount`in e&&`queryObjectIds`in e&&`queryRelatedFeatures`in e&&`queryRelatedFeaturesCount`in e&&`relationships`in e}function B(e){return R(e)&&z(e)}function _e(e){return e&&typeof e==`object`&&`createQuery`in e&&`getField`in e&&`queryFeatureCount`in e&&`queryFeatures`in e&&`queryObjectIds`in e&&`capabilities`in e&&`fields`in e&&`fieldsIndex`in e&&`type`in e&&(e.type===`feature`||e.type===`subtype-group`||e.type===`subtype-sublayer`||e.type===`sublayer`)&&`when`in e?e.type===`subtype-sublayer`&&`parent`in e&&e.parent&&typeof e.parent==`object`?`globalIdField`in e.parent:`globalIdField`in e:!1}function ve(e){return!e||typeof e!=`object`?!1:B(n(e))}function V(e,t){let{fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:c,layer:l,preventPlacesFormatting:d,timeZone:f}=t,p=U(n,r),m=E({fieldInfo:p,graphic:i,layer:l}),g=k(m||l,r),_=m?null:p?.format,v=m?D({configurableFieldsContainer:m,fieldInfo:p,isContentFieldInfos:c}):null,y=v?.type===`number`;if(p&&!u(r)){let t=g?.type,n=v?.type===`date-time`,r=_?.dateFormat;if(t===`date`||t===`date-only`||t===`time-only`||t===`timestamp-offset`||n||r)return h(e,{format:n?void 0:r,fieldFormat:n?v:void 0,fieldType:t,timeZoneOptions:{layerTimeZone:l&&`preferredTimeZone`in l?l.preferredTimeZone:null,viewTimeZone:f,datesInUnknownTimezone:l&&`datesInUnknownTimezone`in l?!!l.datesInUnknownTimezone:!1}})}if(typeof e==`string`&&u(r)&&_)return ye(e,_);if(e=L(e,{format:y?void 0:_,fieldFormat:y?v:void 0}),typeof e==`string`||e==null||_==null&&v==null)return G(e);let b=y?a(v):_?o(_):void 0;return d?s(e,{...b,minimumFractionDigits:0,maximumFractionDigits:20}):s(e,b)}function ye(e,t){return e=e.trim(),/\d{2}-\d{2}/.test(e)?e:e.includes(`,`)?H(e,`,`,`, `,t):e.includes(`;`)?H(e,`;`,`; `,t):e.includes(` `)?H(e,` `,` `,t):s(Number(e),o(t))}function H(e,t,n,r){return e.trim().split(t).map(e=>s(Number(e),o(r))).join(n)}function U(e,t){if(e?.length&&t)return e.find(e=>e.fieldName?.toLowerCase()===t.toLowerCase())}function be({fieldName:e,graphic:t,layer:n}){if(J(e)||!n||typeof n.getFeatureType!=`function`)return null;let{typeIdField:r}=n;if(!r||e!==r)return null;let i=n.getFeatureType(t);return i?i.name:null}function xe({fieldName:e,value:t,graphic:n,layer:r}){if(J(e)||!r||typeof r.getFieldDomain!=`function`)return null;let i=n&&r.getFieldDomain(e,{feature:n});return!i||i.type!==`coded-value`?null:i.getName(t)}function Se(e,t,n,i){let{creatorField:a,creationDateField:o,editorField:s,editDateField:c}=e;if(!t)return;let l=v(i&&`preferredTimeZone`in i?i.preferredTimeZone:null,i&&`datesInUnknownTimezone`in i?!!i.datesInUnknownTimezone:!1,n,C,`date`),u={...C,...l},d=t[c];if(typeof d==`number`){let e=t[s];return{type:`edit`,date:r(d,u),user:e}}let f=t[o];if(typeof f==`number`){let e=t[a];return{type:`create`,date:r(f,u),user:e}}return null}function W(e,t){let n=new Map;if(!e)return n;for(let r of e){if(!r.fieldName)continue;let e=O(r.fieldName,t);r.fieldName=e,n.set(e.toLowerCase(),r)}return n}function Ce(e){let t=[];if(!e)return t;let{fieldInfos:n,content:r}=e;return n&&t.push(...n),!r||!Array.isArray(r)||r.forEach(e=>{if(e.type===`fields`){let n=e?.fieldInfos;n&&t.push(...n)}}),t}function we(e){return e.replaceAll(re,e=>`&#${e.charCodeAt(0)};`)}function G(e){return typeof e==`string`?e.replaceAll(ne,`<br class="esri-text-new-line" />`):e}function K(e){let{fieldInfoMap:t,fieldInfos:n,fieldName:r,graphic:i,isContentFieldInfos:a,layer:o,timeZone:s,value:l}=e;if(l==null)return``;let u=xe({fieldName:r,value:l,graphic:i,layer:o});if(u)return u;let d=o?.types&&c(o.types)?be({fieldName:r,graphic:i,layer:o}):null;if(d)return d;if(t.get(r.toLowerCase()))return V(l,{fieldInfos:n||Array.from(t.values()),fieldName:r,graphic:i,isContentFieldInfos:a,layer:o,timeZone:s});let p=o?.fieldsIndex?.get(r);return p&&(g(p)||f(p))?h(l,{fieldType:p.type,timeZoneOptions:{layerTimeZone:o&&`preferredTimeZone`in o?o.preferredTimeZone:null,viewTimeZone:s,datesInUnknownTimezone:o&&`datesInUnknownTimezone`in o?!!o.datesInUnknownTimezone:!1}}):G(l)}function Te({attributes:e,fieldInfoMap:t,fieldInfos:n,graphic:r,isContentFieldInfos:i,layer:a,relatedInfos:o,timeZone:s}){let c={};return o?.forEach(e=>Ae({attributes:c,relatedInfo:e,fieldInfoMap:t,fieldInfos:n,layer:a,timeZone:s})),e&&Object.keys(e).forEach(o=>{let l=e[o];c[o]=K({fieldInfoMap:t,fieldInfos:n,fieldName:o,graphic:r,isContentFieldInfos:i,layer:a,timeZone:s,value:l})}),c}async function q(e,t){let{layer:n,graphic:r,outFields:i,objectIds:a,returnGeometry:o,spatialReference:s}=e,c=a[0];if(typeof c!=`number`&&typeof c!=`string`){let e={layer:n,graphic:r,objectId:c,requiredFields:i};return y().warn(`Could not query required fields for the specified feature. The feature's ID is invalid.`,e),null}if(!m(n)?.operations?.supportsQuery){let e={layer:n,graphic:r,requiredFields:i,returnGeometry:o};return y().warn(`The specified layer cannot be queried. The following fields will not be available.`,e),null}let l=n.createQuery();return l.objectIds=a,l.outFields=i?.length?i:[n.objectIdField],l.returnGeometry=!!o,l.returnZ=!!o,l.returnM=!!o,l.outSpatialReference=s,(await n.queryFeatures(l,t)).features[0]}async function Ee(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{hasGeometryFunctions:t}}=await _();return t(e)}async function De(e){if(!e.expressionInfos?.length)return!1;let{arcadeUtils:{requiresTrack:t}}=await _();return t(e)}async function Oe({graphic:e,popupTemplate:t,layer:n,spatialReference:r},i){if(!n||!t||(typeof n.load==`function`&&await n.load(i),!e.attributes))return;let a=n.objectIdField,o=e.attributes[a];if(o==null)return;let s=[o],c=new Set(await t.getRequiredFields(n.fieldsIndex));n.timeInfo?.trackIdField!=null&&!c.has(n.timeInfo.trackIdField)&&await De(t)&&c.add(n.timeInfo.trackIdField);let l=d(e,c),u=l?[]:c.has(a)?[...c]:[...c,a],f=t.returnGeometry||await Ee(t);if(l&&!f)return;let p=await q({layer:n,graphic:e,outFields:u,objectIds:s,returnGeometry:f,spatialReference:r},i);p&&(p.geometry&&(e.geometry=p.geometry),p.attributes&&(e.attributes={...e.attributes,...p.attributes}))}function J(e=``){return e?e.includes(S):!1}function ke(e){return e?`${S}${e.layerId}/${e.fieldName}`:``}function Y({attributes:e,graphic:t,relatedInfo:n,fieldInfos:r,fieldInfoMap:i,layer:a,timeZone:o}){e&&t&&n&&Object.keys(t.attributes).forEach(s=>{let c=ke({layerId:n.relation.id.toString(),fieldName:s}),l=t.attributes[s];e[c]=K({fieldName:c,fieldInfos:r,fieldInfoMap:i,layer:a,value:l,graphic:t,timeZone:o})})}function Ae({attributes:e,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a}){e&&t&&(t.relatedFeatures?.forEach(o=>Y({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a})),t.relatedStatsFeatures?.forEach(o=>Y({attributes:e,graphic:o,relatedInfo:t,fieldInfoMap:n,fieldInfos:r,layer:i,timeZone:a})))}const X=e=>{if(!e)return!1;let t=e.toUpperCase();return t.includes(`CURRENT_TIMESTAMP`)||t.includes(`CURRENT_DATE`)||t.includes(`CURRENT_TIME`)},Z=({layer:e,method:t,query:n,definitionExpression:r})=>{if(!e.capabilities?.query?.supportsCacheHint||t===`attachments`)return;let i=n.where==null?null:n.where,a=n.geometry==null?null:n.geometry;e.capabilities.query.supportsCacheHint&&!X(r)&&!X(i)&&a?.type!==`extent`&&n.resultType!==`tile`&&(n.cacheHint=!0)},je=({query:e,layer:t,method:n})=>{Z({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??``}`})},Me=({queryPayload:e,layer:t,method:n})=>{Z({layer:t,method:n,query:e,definitionExpression:`${t.definitionExpression} ${t.serviceDefinitionExpression??``}`})};function Ne(e,t,n){return!e||!t||!n?null:t.type===`sublayer`?$({layers:t.layer?.allSublayers,map:e,relatedLayer:t,relationship:n})||$({layers:t.layer?.subtables,map:e,relatedLayer:t,relationship:n}):$({layers:e.allLayers,map:e,relatedLayer:t,relationship:n})||$({layers:e.allTables,map:e,relatedLayer:t,relationship:n})}function Pe(e,t){return!e||!(`utilityNetworks`in e)||!t?null:e.utilityNetworks?.find(e=>e.isUtilityLayer(t))}function Q(e,t){return e?.allTables.find(e=>e.type===`feature`&&e.layerId===t.id&&e.url===t.layer?.url)}function $({map:e,relationship:t,relationship:{relatedTableId:n},relatedLayer:r,layers:i}){if(!i)return null;for(let a of i){if(a.type===`map-image`){let n=$({layers:a.sublayers,map:e,relatedLayer:r,relationship:t})||$({layers:a.subtables,map:e,relatedLayer:r,relationship:t});if(n)return n;continue}if(!B(a))continue;if(r.type===`sublayer`){if(a!==r&&a.id===n)return a.isTable?Q(e,a):a;continue}let i=r.type===`scene`&&r.associatedLayer?r.associatedLayer.url:r.url;if(!i)return null;if(a.type===`sublayer`){if(a!==r&&a.layer?.url===i&&a.id===n)return a.isTable?Q(e,a):a;continue}if(a!==r&&a.url===i&&a.layerId===n)return a}return null}export{G as applyTextFormattingHTML,W as createFieldInfoMap,Ne as findRelatedLayer,Pe as findUtilityNetwork,F as fixTokens,Te as formatAttributes,Se as formatEditInfo,V as formatValueToFieldInfo,Ce as getAllFieldInfos,E as getConfigurableFieldsContainer,D as getFieldFormat,U as getFieldInfo,fe as getFieldInfoLabel,O as getFixedFieldName,he as getFixedFieldNames,ce as getPopupLayer,oe as getSourceLayer,le as graphicCallback,we as htmlEntities,_e as isAssociatedFeatureSupportedLayer,w as isExpressionField,R as isFeatureSupportedLayer,ve as isGraphicForRelatableFeatureSupportedLayer,B as isRelatableFeatureSupportedLayer,z as isRelatableLayer,J as isRelatedField,je as preLayerQueryCallback,Me as preRequestCallback,q as querySourceLayer,Oe as queryUpdatedFeature,ue as shouldOpenInNewTab,j as substituteAttributes,ge as substituteFieldsInLinksAndAttributes};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- class e{constructor(e,t){this.renderer=e,this.symbol=t,this.color=null,this.size=null,this.opacity=null,this.outlineSize=null,this.heading=null,this.tilt=null,this.roll=null}}class t{constructor(e,t){this.output=e,this.input=t}}export{e as RenderingInfo,t as RenderingInfoVisualVariableInfo};
2
+ class e{constructor(e,t){this.renderer=e,this.symbol=t,this.color=null,this.size=null,this.opacity=null,this.outlineSize=null,this.heading=null,this.tilt=null,this.roll=null}}class t{constructor(e,t){this.output=e,this.input=t}}class n extends t{constructor(e,t,n){super(e,t),this.variables=n}}export{e as RenderingInfo,n as RenderingInfoSizeVariableInfo,t as RenderingInfoVisualVariableInfo};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{RenderingInfo as e,RenderingInfoVisualVariableInfo as t}from"./RenderingInfo.js";import{getVisualVariableValues as n}from"../visualVariables/support/visualVariableUtils.js";function r(e,t){if(e.symbol!=null)return e.symbol;let n=t?.renderer;return n!=null&&n.type!==`dot-density`?n.getSymbol(e,t):null}function i(e,t){return a(e,r(e,t),t)}function a(r,i,a){if(!i)return null;let o=a?.renderer,s=new e(o,i);if(o==null||!(`visualVariables`in o)||!o.visualVariables)return s;let c=n(o,r,a)??[],l=[`proportional`,`proportional`,`proportional`],u=[null,null,null];for(let{type:e,variable:n,output:r,input:i}of c)switch(e){case`color`:if(r==null)continue;s.color=new t(r.toRgba(),i);break;case`size`:if(n.target===`outline`){if(r==null)continue;s.outlineSize=new t(r??0,i)}else{let e=n.axis,t=n.useSymbolValue?`symbol-value`:r??`proportional`;switch(e){case`width`:l[0]=t,u[0]=i;break;case`depth`:l[1]=t,u[1]=i;break;case`height`:l[2]=t,u[2]=i;break;case`width-and-depth`:l[0]=l[1]=t,u[0]=u[1]=i;break;default:l[0]=l[1]=l[2]=t,u[0]=u[1]=u[2]=i}}break;case`opacity`:if(r==null)continue;s.opacity=new t(r,i);break;case`rotation`:if(r==null)continue;switch(n.axis){case`tilt`:s.tilt=new t(r,i);break;case`roll`:s.roll=new t(r,i);break;default:s.heading=new t(r,i)}}return(l[0]!==`proportional`||l[1]!==`proportional`||l[2]!==`proportional`)&&(s.size=new t(l,u)),s}async function o(e,t){return e.symbol==null?t?.renderer?.getSymbolAsync(e,t)??null:e.symbol}async function s(e,t){return a(e,await o(e,t),t)}function c(e,t=0){let n=e[t];return typeof n==`number`&&isFinite(n)?n:null}function l(e){for(let t=0;t<3;t++){let n=e[t];if(typeof n==`number`)return isFinite(n)?n:0}return 0}export{c as getDriverAxisSizeValue,l as getDriverAxisSizeValueAny,i as getRenderingInfo,s as getRenderingInfoAsync,o as getSymbolAsync};
2
+ import{RenderingInfo as e,RenderingInfoVisualVariableInfo as t,RenderingInfoSizeVariableInfo as n}from"./RenderingInfo.js";import{getVisualVariableValues as r}from"../visualVariables/support/visualVariableUtils.js";function i(e,t){if(e.symbol!=null)return e.symbol;let n=t?.renderer;return n!=null&&n.type!==`dot-density`?n.getSymbol(e,t):null}function a(e,t){return o(e,i(e,t),t)}function o(i,a,o){if(!a)return null;let s=o?.renderer,c=new e(s,a);if(s==null||!(`visualVariables`in s)||!s.visualVariables)return c;let u=r(s,i,o)??[],d=[`proportional`,`proportional`,`proportional`],f=[null,null,null],p=[null,null,null];for(let{type:e,variable:n,output:r,input:i}of u)switch(e){case`color`:if(r==null)continue;c.color=new t(r.toRgba(),i);break;case`size`:if(n.target===`outline`){if(r==null)continue;c.outlineSize=new t(r??0,i)}else{let e=n.axis;l(d,e,n.useSymbolValue?`symbol-value`:r??`proportional`),l(f,e,i),l(p,e,n)}break;case`opacity`:if(r==null)continue;c.opacity=new t(r,i);break;case`rotation`:if(r==null)continue;switch(n.axis){case`tilt`:c.tilt=new t(r,i);break;case`roll`:c.roll=new t(r,i);break;default:c.heading=new t(r,i)}}return(d[0]!==`proportional`||d[1]!==`proportional`||d[2]!==`proportional`)&&(c.size=new n(d,f,p)),c}async function s(e,t){return e.symbol==null?t?.renderer?.getSymbolAsync(e,t)??null:e.symbol}async function c(e,t){return o(e,await s(e,t),t)}function l(e,t,n){switch(t){case`width`:e[0]=n;break;case`depth`:e[1]=n;break;case`height`:e[2]=n;break;case`width-and-depth`:e[0]=e[1]=n;break;default:e[0]=e[1]=e[2]=n}}function u(e,t=0){let n=e[t];return typeof n==`number`&&isFinite(n)?n:null}function d(e){let t=e.find(e=>typeof e==`number`);return t!=null&&isFinite(t)?t:0}export{u as getDriverAxisSizeValue,d as getDriverAxisSizeValueAny,a as getRenderingInfo,c as getRenderingInfoAsync,s as getSymbolAsync};
@@ -15,10 +15,9 @@ export interface SizeVariableProperties extends VisualVariableProperties, Partia
15
15
  /**
16
16
  * The size used to render a feature containing the maximum data value.
17
17
  *
18
- * * When setting a number, sizes are expressed in points for all 2D symbols and 3D flat symbol layers; size is
19
- * expressed in meters for all 3D volumetric symbols.
20
- * * String values are only supported for 2D symbols and 3D flat symbol layers. Strings may specify size in
21
- * either points or pixels (e.g. `minSize: "16pt"`, `minSize: "12px"`).
18
+ * * When setting a number, sizes are expressed in points for all 2D symbols and screen-sized 3D symbol layers,
19
+ * and in meters for world-sized 3D symbol layers.
20
+ * * This value may also be autocast from a string in points or pixels (e.g. `"16pt"`, `"12px"`).
22
21
  * * When an object is used, the
23
22
  * size of features whose data value (defined in [field](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#field) or [valueExpression](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#valueExpression))
24
23
  * is greater than or equal to the [maxDataValue](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#maxDataValue) for the given view scale.
@@ -27,10 +26,9 @@ export interface SizeVariableProperties extends VisualVariableProperties, Partia
27
26
  /**
28
27
  * The size used to render a feature containing the minimum data value.
29
28
  *
30
- * * When setting a number, sizes are expressed in points for all 2D symbols and 3D flat symbol layers; size is
31
- * expressed in meters for all 3D volumetric symbols.
32
- * * String values are only supported for 2D symbols and 3D flat symbol layers. Strings may specify size in
33
- * either points or pixels (e.g. `minSize: "16pt"`, `minSize: "12px"`).
29
+ * * When setting a number, sizes are expressed in points for all 2D symbols and screen-sized 3D symbol layers,
30
+ * and in meters for world-sized 3D symbol layers.
31
+ * * This value may also be autocast from a string in points or pixels (e.g. `"16pt"`, `"12px"`).
34
32
  * * When an object is used, the
35
33
  * size of features whose data value (defined in [field](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#field) or [valueExpression](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#valueExpression))
36
34
  * is greater than or equal to the [minDataValue](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#minDataValue) for the given view scale.
@@ -269,10 +267,9 @@ export default class SizeVariable extends VisualVariable {
269
267
  /**
270
268
  * The size used to render a feature containing the maximum data value.
271
269
  *
272
- * * When setting a number, sizes are expressed in points for all 2D symbols and 3D flat symbol layers; size is
273
- * expressed in meters for all 3D volumetric symbols.
274
- * * String values are only supported for 2D symbols and 3D flat symbol layers. Strings may specify size in
275
- * either points or pixels (e.g. `minSize: "16pt"`, `minSize: "12px"`).
270
+ * * When setting a number, sizes are expressed in points for all 2D symbols and screen-sized 3D symbol layers,
271
+ * and in meters for world-sized 3D symbol layers.
272
+ * * This value may also be autocast from a string in points or pixels (e.g. `"16pt"`, `"12px"`).
276
273
  * * When an object is used, the
277
274
  * size of features whose data value (defined in [field](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#field) or [valueExpression](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#valueExpression))
278
275
  * is greater than or equal to the [maxDataValue](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#maxDataValue) for the given view scale.
@@ -288,10 +285,9 @@ export default class SizeVariable extends VisualVariable {
288
285
  /**
289
286
  * The size used to render a feature containing the minimum data value.
290
287
  *
291
- * * When setting a number, sizes are expressed in points for all 2D symbols and 3D flat symbol layers; size is
292
- * expressed in meters for all 3D volumetric symbols.
293
- * * String values are only supported for 2D symbols and 3D flat symbol layers. Strings may specify size in
294
- * either points or pixels (e.g. `minSize: "16pt"`, `minSize: "12px"`).
288
+ * * When setting a number, sizes are expressed in points for all 2D symbols and screen-sized 3D symbol layers,
289
+ * and in meters for world-sized 3D symbol layers.
290
+ * * This value may also be autocast from a string in points or pixels (e.g. `"16pt"`, `"12px"`).
295
291
  * * When an object is used, the
296
292
  * size of features whose data value (defined in [field](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#field) or [valueExpression](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#valueExpression))
297
293
  * is greater than or equal to the [minDataValue](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#minDataValue) for the given view scale.
@@ -344,20 +340,20 @@ export default class SizeVariable extends VisualVariable {
344
340
  * >
345
341
  * > **Known Limitations**
346
342
  * >
347
- * > * This property is not supported for flat (2D) line symbols driven by real world sizes in 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/)s.
348
343
  * > * Data values must refer to the planar size of the feature in the units of the view's spatial reference.
349
344
  */
350
345
  accessor valueRepresentation: SizeVariableRepresentation | null | undefined;
351
346
  /**
352
347
  * Indicates the unit of measurement used to interpret the value returned by [field](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#field) or [valueExpression](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/SizeVariable/#valueExpression).
353
- * For 3D volumetric symbols the default is `meters`. This property should not be used if the data value
354
- * represents a thematic quantity (e.g. traffic count, census data, etc.).
348
+ * This property should not be used if the data value represents a thematic quantity (e.g. traffic count, census data, etc.).
349
+ *
350
+ * When using `valueUnit` to render real-world widths with a [LineSymbol3D](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3D/),
351
+ * it is recommended to set [LineSymbol3D.worldSized](https://developers.arcgis.com/javascript/latest/references/core/symbols/LineSymbol3D/#worldSized) to `true`.
355
352
  *
356
353
  * > [!WARNING]
357
354
  * >
358
355
  * > **Known Limitations**
359
356
  * >
360
- * > * This property is not supported for flat (2D) line symbols driven by real world sizes in 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/)s.
361
357
  * > * Data values must refer to the planar size of the feature in the units of the view's spatial reference.
362
358
  */
363
359
  accessor valueUnit: SizeVariableUnit;
@@ -2,7 +2,9 @@ import type { JSONSupport } from "../../../core/JSONSupport.js";
2
2
 
3
3
  export interface SizeStopProperties extends Partial<Pick<SizeStop, "label" | "value">> {
4
4
  /**
5
- * The size value in points (between `0` and `90`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/support/SizeStop/#value).
5
+ * The size value used to render features with the given [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/support/SizeStop/#value).
6
+ * Numeric sizes are expressed in points (between `0` and `90`) for all 2D symbols and screen-sized 3D symbol layers,
7
+ * and in meters for world-sized 3D symbol layers.
6
8
  * This value may also be autocast from a string in points or pixels.
7
9
  *
8
10
  * @example
@@ -43,7 +45,9 @@ export default class SizeStop extends JSONSupport {
43
45
  /** A string value used to label the stop in the [Legend](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-legend/). */
44
46
  accessor label: string | null | undefined;
45
47
  /**
46
- * The size value in points (between `0` and `90`) used to render features with the given [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/support/SizeStop/#value).
48
+ * The size value used to render features with the given [value](https://developers.arcgis.com/javascript/latest/references/core/renderers/visualVariables/support/SizeStop/#value).
49
+ * Numeric sizes are expressed in points (between `0` and `90`) for all 2D symbols and screen-sized 3D symbol layers,
50
+ * and in meters for world-sized 3D symbol layers.
47
51
  * This value may also be autocast from a string in points or pixels.
48
52
  *
49
53
  * @example
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../../core/Clonable.js";import{JSONSupport as n}from"../../../core/JSONSupport.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{traceLocationTypeKebabDict as a}from"../../../networks/support/typeUtils.js";let o=class extends t(n){constructor(e){super(e),this.globalId=null,this.isFilterBarrier=!1,this.percentAlong=null,this.terminalId=null,this.type=null,this.firstUnit=null,this.lastUnit=null,this.networkSourceId=null}};e([r({type:String,json:{write:!0}})],o.prototype,`globalId`,void 0),e([r({type:Boolean,json:{write:!0}})],o.prototype,`isFilterBarrier`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`percentAlong`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`terminalId`,void 0),e([r({type:a.apiValues,json:{type:a.jsonValues,read:{reader:a.read,source:`traceLocationType`},write:{writer:a.write,target:`traceLocationType`}}})],o.prototype,`type`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`firstUnit`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`lastUnit`,void 0),e([r({type:Number})],o.prototype,`networkSourceId`,void 0),o=e([i(`esri.rest.networks.support.TraceLocation`)],o);const s=o;export{s as default};
2
+ import{__decorate as e}from"tslib";import{ClonableMixin as t}from"../../../core/Clonable.js";import{JSONSupport as n}from"../../../core/JSONSupport.js";import{property as r,subclass as i}from"../../../core/accessorSupport/decorators.js";import{traceLocationTypeKebabDict as a}from"../../../networks/support/typeUtils.js";let o=class extends t(n){constructor(e){super(e),this.globalId=null,this.isFilterBarrier=!1,this.percentAlong=null,this.terminalId=null,this.type=null,this.firstUnit=null,this.lastUnit=null,this.networkSourceId=null}};e([r({type:String,json:{write:!0}})],o.prototype,`globalId`,void 0),e([r({type:Boolean,json:{write:!0}})],o.prototype,`isFilterBarrier`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`percentAlong`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`terminalId`,void 0),e([r({type:a.apiValues,json:{type:a.jsonValues,read:{reader:a.read,source:`traceLocationType`},write:{writer:a.write,target:`traceLocationType`}}})],o.prototype,`type`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`firstUnit`,void 0),e([r({type:Number,json:{write:!0}})],o.prototype,`lastUnit`,void 0),e([r({type:Number})],o.prototype,`networkSourceId`,void 0),o=e([i(`esri.rest.networks.support.TraceLocation`)],o);export{o as default};
@@ -54,6 +54,13 @@ export default class TraceResult extends JSONSupport {
54
54
  * @since 4.34
55
55
  */
56
56
  get paths(): CircuitPath[] | null | undefined;
57
+ /**
58
+ * The JSON used to populate this trace result.
59
+ *
60
+ * @since 5.2
61
+ * @see [Trace JSON response syntax](https://developers.arcgis.com/rest/services-reference/enterprise/trace-utility-network-server/#json-response-syntax)
62
+ */
63
+ get sourceJSON(): Record<string, unknown>;
57
64
  /**
58
65
  * Returns `true` if the starting points in the network trace operation are ignored.
59
66
  *