@arcgis/map-components 5.2.0-next.120 → 5.2.0-next.122

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 (316) hide show
  1. package/dist/cdn/33C5FBRZ.js +2 -0
  2. package/dist/cdn/{JD46SR26.js → 34E7N7GU.js} +1 -1
  3. package/dist/cdn/{IR2RGKT4.js → 3E36QFXG.js} +2 -2
  4. package/dist/cdn/3FRV7BIJ.js +2 -0
  5. package/dist/cdn/{Z4FIADPO.js → 3TR7QOHP.js} +1 -1
  6. package/dist/cdn/464EB67Q.js +2 -0
  7. package/dist/cdn/{W5B2F2LI.js → 4DENNWA5.js} +1 -1
  8. package/dist/cdn/{POEFPML6.js → 55AZTWOF.js} +1 -1
  9. package/dist/cdn/{2DDAZ3QO.js → 56PUZWIU.js} +1 -1
  10. package/dist/cdn/{YZUEPMQZ.js → 5IFQI7ML.js} +1 -1
  11. package/dist/cdn/{JMWMN4DG.js → 5SLLYIWJ.js} +1 -1
  12. package/dist/cdn/{7QH5PIWM.js → 6EQW3YHG.js} +1 -1
  13. package/dist/cdn/{U35IJFNU.js → 6VR7MKOM.js} +1 -1
  14. package/dist/cdn/6XJFRQ75.js +2 -0
  15. package/dist/cdn/7WBDTHNZ.js +2 -0
  16. package/dist/cdn/{RRC7AD75.js → AXFCL6D2.js} +1 -1
  17. package/dist/cdn/{LBVSFCZG.js → B4QA6HTE.js} +1 -1
  18. package/dist/cdn/BAV6JF4F.js +2 -0
  19. package/dist/cdn/{HNMWTX7W.js → BEZWJEYM.js} +1 -1
  20. package/dist/cdn/{LCNYVSCF.js → BTQUD5J4.js} +1 -1
  21. package/dist/cdn/CCFGYVBQ.js +2 -0
  22. package/dist/cdn/{FAN45DMA.js → CNYKQYK2.js} +1 -1
  23. package/dist/cdn/DOR5MVML.js +2 -0
  24. package/dist/cdn/E4JAHCCG.js +2 -0
  25. package/dist/cdn/{JD562WMM.js → EDMWGUZ2.js} +1 -1
  26. package/dist/cdn/{JKZMOIRA.js → EEHSPW4M.js} +1 -1
  27. package/dist/cdn/{GN4BH6SY.js → EMJLCAFX.js} +1 -1
  28. package/dist/cdn/{FAFDJABP.js → ESAIFZ6N.js} +1 -1
  29. package/dist/cdn/{2L6YCWXJ.js → EUV2XFUO.js} +1 -1
  30. package/dist/cdn/{GPIHHNP7.js → F46CTQWP.js} +1 -1
  31. package/dist/cdn/F5LP5CU2.js +2 -0
  32. package/dist/cdn/FKCRBOFP.js +2 -0
  33. package/dist/cdn/G3KYGRHM.js +2 -0
  34. package/dist/cdn/{3VGRIUOZ.js → G4HKU5PR.js} +1 -1
  35. package/dist/cdn/{Y5Q3Q4GW.js → GIOUZTHM.js} +1 -1
  36. package/dist/cdn/{4DWURRQB.js → GLH5GJZC.js} +1 -1
  37. package/dist/cdn/{BFGF2JTH.js → GLOUXFQV.js} +1 -1
  38. package/dist/cdn/{3VBI4PPT.js → H3CCHIXN.js} +1 -1
  39. package/dist/cdn/{W5O3OCTG.js → H5FV4C72.js} +1 -1
  40. package/dist/cdn/{ACIG6774.js → HH5GEJCC.js} +1 -1
  41. package/dist/cdn/{P2X5UYZB.js → I2IBXGQM.js} +1 -1
  42. package/dist/cdn/{VFSWB7LJ.js → IWOKTFPQ.js} +1 -1
  43. package/dist/cdn/{XO3NPMHQ.js → J4BQSA3J.js} +1 -1
  44. package/dist/cdn/{Z3JADSL3.js → J4TWDZII.js} +1 -1
  45. package/dist/cdn/{23KFFLAG.js → JBGNMAZ7.js} +1 -1
  46. package/dist/cdn/{3OQZ3SMG.js → JSYLRK26.js} +1 -1
  47. package/dist/cdn/{5FBX5V2M.js → KHHVCV55.js} +1 -1
  48. package/dist/cdn/{ZSQCIUGN.js → KIHX5LRN.js} +1 -1
  49. package/dist/cdn/{LBJMKYT2.js → KM2GXXBO.js} +1 -1
  50. package/dist/cdn/{F5EC22X4.js → KRYDKCJG.js} +1 -1
  51. package/dist/cdn/{46ZZWK6X.js → KY3ND2AY.js} +1 -1
  52. package/dist/cdn/KYWVUIH5.js +2 -0
  53. package/dist/cdn/{UJVNCEXT.js → LAY2RKKS.js} +1 -1
  54. package/dist/cdn/{REDWVTQJ.js → LP2PF2VT.js} +1 -1
  55. package/dist/cdn/LV5KLLVW.js +2 -0
  56. package/dist/cdn/{4IB44LRA.js → LWW6FUI2.js} +1 -1
  57. package/dist/cdn/{B6JX5OWP.js → M3EXGLNJ.js} +1 -1
  58. package/dist/cdn/{TOBWMRET.js → M3EZM5X5.js} +1 -1
  59. package/dist/cdn/{LH33ZRF7.js → MFBQRTJ3.js} +1 -1
  60. package/dist/cdn/{5RBUI62E.js → MLJ5RYY3.js} +1 -1
  61. package/dist/cdn/{2JMMBI2U.js → MV2EKVMR.js} +1 -1
  62. package/dist/cdn/{WWGWIJMC.js → NZSCPBS7.js} +1 -1
  63. package/dist/cdn/{PQTX5YLB.js → OKW62U6T.js} +1 -1
  64. package/dist/cdn/{3EYHGXI5.js → PLTLRYBF.js} +1 -1
  65. package/dist/cdn/PR6OAZWA.js +2 -0
  66. package/dist/cdn/{UNP7N3DO.js → PUYZDQHZ.js} +1 -1
  67. package/dist/cdn/{KKDZFKGV.js → PYP3U5W5.js} +1 -1
  68. package/dist/cdn/{OMZESNEM.js → Q4AJYCNY.js} +1 -1
  69. package/dist/cdn/{HGYJFGKA.js → QGFWUN5S.js} +1 -1
  70. package/dist/cdn/{X7KSMNND.js → QIEX43LK.js} +1 -1
  71. package/dist/cdn/{HH4T6PVP.js → QMQV37ML.js} +1 -1
  72. package/dist/cdn/QXVHT3RD.js +5 -0
  73. package/dist/cdn/{MZZGKPLV.js → R7E5VLXC.js} +1 -1
  74. package/dist/cdn/{CWQN57H6.js → RJSFDOIW.js} +1 -1
  75. package/dist/cdn/{TNY5ERJS.js → RKAZH2LM.js} +1 -1
  76. package/dist/cdn/{5IQQ6P2J.js → RU7PGLLB.js} +1 -1
  77. package/dist/cdn/{4W6PAHFY.js → S62FQUEJ.js} +1 -1
  78. package/dist/cdn/S7T2NPCW.js +2 -0
  79. package/dist/cdn/{NK74ZCP7.js → SXQRPAPL.js} +1 -1
  80. package/dist/cdn/{2KN3VFRG.js → TH6TT77M.js} +1 -1
  81. package/dist/cdn/{MU54WQG6.js → TILA2OKK.js} +1 -1
  82. package/dist/cdn/TJDMX7ZL.js +2 -0
  83. package/dist/cdn/TMJX7DFH.js +2 -0
  84. package/dist/cdn/{6XZKWBWD.js → TVZZB4KV.js} +1 -1
  85. package/dist/cdn/TZHXSIXK.js +2 -0
  86. package/dist/cdn/{SEMVPT7E.js → UJUD6U2G.js} +1 -1
  87. package/dist/cdn/US6PRR7S.js +2 -0
  88. package/dist/cdn/{TL7OKFLN.js → V7BQUMJL.js} +1 -1
  89. package/dist/cdn/VSH4WLRS.js +2 -0
  90. package/dist/cdn/{Q6MJXAPZ.js → WNLOSRMS.js} +1 -1
  91. package/dist/cdn/X6EQMX6U.js +2 -0
  92. package/dist/cdn/{6SKPV2U5.js → XGZ36AOT.js} +1 -1
  93. package/dist/cdn/{D3F6S7NU.js → XQKZNHH7.js} +1 -1
  94. package/dist/cdn/{CONE7FEI.js → YG4HDEP3.js} +1 -1
  95. package/dist/cdn/{NEQHSO5U.js → YRZRKOE3.js} +1 -1
  96. package/dist/cdn/YZ55QJUM.js +2 -0
  97. package/dist/cdn/{EZVWEV6T.js → ZSVZL6PT.js} +1 -1
  98. package/dist/cdn/ZUAZUUTW.js +2 -0
  99. package/dist/cdn/assets/feature-form-next/t9n/messages.ar.json +1 -1
  100. package/dist/cdn/assets/feature-form-next/t9n/messages.bg.json +1 -1
  101. package/dist/cdn/assets/feature-form-next/t9n/messages.ca.json +1 -1
  102. package/dist/cdn/assets/feature-form-next/t9n/messages.cs.json +1 -1
  103. package/dist/cdn/assets/feature-form-next/t9n/messages.da.json +1 -1
  104. package/dist/cdn/assets/feature-form-next/t9n/messages.de.json +1 -1
  105. package/dist/cdn/assets/feature-form-next/t9n/messages.el.json +1 -1
  106. package/dist/cdn/assets/feature-form-next/t9n/messages.en.json +1 -1
  107. package/dist/cdn/assets/feature-form-next/t9n/messages.es.json +1 -1
  108. package/dist/cdn/assets/feature-form-next/t9n/messages.et.json +1 -1
  109. package/dist/cdn/assets/feature-form-next/t9n/messages.fi.json +1 -1
  110. package/dist/cdn/assets/feature-form-next/t9n/messages.fr.json +1 -1
  111. package/dist/cdn/assets/feature-form-next/t9n/messages.he.json +1 -1
  112. package/dist/cdn/assets/feature-form-next/t9n/messages.hr.json +1 -1
  113. package/dist/cdn/assets/feature-form-next/t9n/messages.hu.json +1 -1
  114. package/dist/cdn/assets/feature-form-next/t9n/messages.id.json +1 -1
  115. package/dist/cdn/assets/feature-form-next/t9n/messages.it.json +1 -1
  116. package/dist/cdn/assets/feature-form-next/t9n/messages.ja.json +1 -1
  117. package/dist/cdn/assets/feature-form-next/t9n/messages.ko.json +1 -1
  118. package/dist/cdn/assets/feature-form-next/t9n/messages.lt.json +1 -1
  119. package/dist/cdn/assets/feature-form-next/t9n/messages.lv.json +1 -1
  120. package/dist/cdn/assets/feature-form-next/t9n/messages.nl.json +1 -1
  121. package/dist/cdn/assets/feature-form-next/t9n/messages.no.json +1 -1
  122. package/dist/cdn/assets/feature-form-next/t9n/messages.pl.json +1 -1
  123. package/dist/cdn/assets/feature-form-next/t9n/messages.pt-BR.json +1 -1
  124. package/dist/cdn/assets/feature-form-next/t9n/messages.pt-PT.json +1 -1
  125. package/dist/cdn/assets/feature-form-next/t9n/messages.ro.json +1 -1
  126. package/dist/cdn/assets/feature-form-next/t9n/messages.ru.json +1 -1
  127. package/dist/cdn/assets/feature-form-next/t9n/messages.sk.json +1 -1
  128. package/dist/cdn/assets/feature-form-next/t9n/messages.sl.json +1 -1
  129. package/dist/cdn/assets/feature-form-next/t9n/messages.sr.json +1 -1
  130. package/dist/cdn/assets/feature-form-next/t9n/messages.sv.json +1 -1
  131. package/dist/cdn/assets/feature-form-next/t9n/messages.th.json +1 -1
  132. package/dist/cdn/assets/feature-form-next/t9n/messages.tr.json +1 -1
  133. package/dist/cdn/assets/feature-form-next/t9n/messages.uk.json +1 -1
  134. package/dist/cdn/assets/feature-form-next/t9n/messages.vi.json +1 -1
  135. package/dist/cdn/assets/feature-form-next/t9n/messages.zh-CN.json +1 -1
  136. package/dist/cdn/assets/feature-form-next/t9n/messages.zh-TW.json +1 -1
  137. package/dist/cdn/assets/selection-list/t9n/messages.en.json +1 -1
  138. package/dist/cdn/assets/selection-toolbar/t9n/messages.en.json +1 -1
  139. package/dist/cdn/assets/sketch/t9n/messages.ar.json +1 -1
  140. package/dist/cdn/assets/sketch/t9n/messages.bg.json +1 -1
  141. package/dist/cdn/assets/sketch/t9n/messages.bs.json +1 -1
  142. package/dist/cdn/assets/sketch/t9n/messages.ca.json +1 -1
  143. package/dist/cdn/assets/sketch/t9n/messages.cs.json +1 -1
  144. package/dist/cdn/assets/sketch/t9n/messages.da.json +1 -1
  145. package/dist/cdn/assets/sketch/t9n/messages.de.json +1 -1
  146. package/dist/cdn/assets/sketch/t9n/messages.el.json +1 -1
  147. package/dist/cdn/assets/sketch/t9n/messages.es.json +1 -1
  148. package/dist/cdn/assets/sketch/t9n/messages.et.json +1 -1
  149. package/dist/cdn/assets/sketch/t9n/messages.fi.json +1 -1
  150. package/dist/cdn/assets/sketch/t9n/messages.fr.json +1 -1
  151. package/dist/cdn/assets/sketch/t9n/messages.he.json +1 -1
  152. package/dist/cdn/assets/sketch/t9n/messages.hr.json +1 -1
  153. package/dist/cdn/assets/sketch/t9n/messages.hu.json +1 -1
  154. package/dist/cdn/assets/sketch/t9n/messages.id.json +1 -1
  155. package/dist/cdn/assets/sketch/t9n/messages.it.json +1 -1
  156. package/dist/cdn/assets/sketch/t9n/messages.ja.json +1 -1
  157. package/dist/cdn/assets/sketch/t9n/messages.ko.json +1 -1
  158. package/dist/cdn/assets/sketch/t9n/messages.lt.json +1 -1
  159. package/dist/cdn/assets/sketch/t9n/messages.lv.json +1 -1
  160. package/dist/cdn/assets/sketch/t9n/messages.nl.json +1 -1
  161. package/dist/cdn/assets/sketch/t9n/messages.no.json +1 -1
  162. package/dist/cdn/assets/sketch/t9n/messages.pl.json +1 -1
  163. package/dist/cdn/assets/sketch/t9n/messages.pt-BR.json +1 -1
  164. package/dist/cdn/assets/sketch/t9n/messages.pt-PT.json +1 -1
  165. package/dist/cdn/assets/sketch/t9n/messages.ro.json +1 -1
  166. package/dist/cdn/assets/sketch/t9n/messages.ru.json +1 -1
  167. package/dist/cdn/assets/sketch/t9n/messages.sk.json +1 -1
  168. package/dist/cdn/assets/sketch/t9n/messages.sl.json +1 -1
  169. package/dist/cdn/assets/sketch/t9n/messages.sr.json +1 -1
  170. package/dist/cdn/assets/sketch/t9n/messages.sv.json +1 -1
  171. package/dist/cdn/assets/sketch/t9n/messages.th.json +1 -1
  172. package/dist/cdn/assets/sketch/t9n/messages.tr.json +1 -1
  173. package/dist/cdn/assets/sketch/t9n/messages.uk.json +1 -1
  174. package/dist/cdn/assets/sketch/t9n/messages.vi.json +1 -1
  175. package/dist/cdn/assets/sketch/t9n/messages.zh-CN.json +1 -1
  176. package/dist/cdn/assets/sketch/t9n/messages.zh-HK.json +1 -1
  177. package/dist/cdn/assets/sketch/t9n/messages.zh-TW.json +1 -1
  178. package/dist/cdn/assets/utility-network-trace-results/t9n/messages.en.json +1 -1
  179. package/dist/cdn/index.js +1 -1
  180. package/dist/cdn/main.css +1 -1
  181. package/dist/chunks/async-utils.js +3 -3
  182. package/dist/chunks/layer-utils.js +48 -44
  183. package/dist/chunks/slots.js +1 -1
  184. package/dist/components/arcgis-attachment-validation-view/customElement.d.ts +81 -0
  185. package/dist/components/arcgis-attachment-validation-view/customElement.js +109 -0
  186. package/dist/components/arcgis-attachment-validation-view/index.d.ts +1 -0
  187. package/dist/components/arcgis-attachment-validation-view/index.js +2 -0
  188. package/dist/components/arcgis-basemap-gallery/customElement.d.ts +10 -9
  189. package/dist/components/arcgis-basemap-gallery/customElement.js +39 -28
  190. package/dist/components/arcgis-basemap-gallery-item/customElement.js +30 -30
  191. package/dist/components/arcgis-editor/customElement.d.ts +10 -2
  192. package/dist/components/arcgis-editor/customElement.js +2 -2
  193. package/dist/components/arcgis-expand/customElement.d.ts +9 -0
  194. package/dist/components/arcgis-expand/customElement.js +47 -41
  195. package/dist/components/arcgis-exploratory-analysis/customElement.d.ts +23 -0
  196. package/dist/components/arcgis-exploratory-analysis/customElement.js +21 -21
  197. package/dist/components/arcgis-feature-attachments/customElement.js +17 -17
  198. package/dist/components/arcgis-feature-form-field/customElement.d.ts +48 -0
  199. package/dist/components/arcgis-feature-form-utility-network-association-list/customElement.js +1 -1
  200. package/dist/components/arcgis-feature-templates/customElement.js +1 -1
  201. package/dist/components/arcgis-fullscreen/customElement.js +9 -10
  202. package/dist/components/arcgis-legend/customElement.d.ts +5 -6
  203. package/dist/components/arcgis-legend/customElement.js +5 -5
  204. package/dist/components/arcgis-legend-card-element/customElement.js +26 -26
  205. package/dist/components/arcgis-link-chart/customElement.d.ts +9 -0
  206. package/dist/components/arcgis-link-chart/customElement.js +14 -11
  207. package/dist/components/arcgis-map/customElement.d.ts +9 -0
  208. package/dist/components/arcgis-map/customElement.js +9 -6
  209. package/dist/components/arcgis-paste/customElement.js +1 -1
  210. package/dist/components/arcgis-presentation/customElement.js +62 -62
  211. package/dist/components/arcgis-presentation-slide-list/customElement.js +1 -1
  212. package/dist/components/arcgis-scale-bar/customElement.js +8 -8
  213. package/dist/components/arcgis-scene/customElement.d.ts +9 -0
  214. package/dist/components/arcgis-scene/customElement.js +5 -2
  215. package/dist/components/arcgis-selection-list/customElement.d.ts +33 -12
  216. package/dist/components/arcgis-selection-list/customElement.js +79 -63
  217. package/dist/components/arcgis-selection-toolbar/customElement.d.ts +42 -2
  218. package/dist/components/arcgis-selection-toolbar/customElement.js +60 -37
  219. package/dist/components/arcgis-sketch/SketchComponentViewModel.d.ts +84 -0
  220. package/dist/components/arcgis-sketch/configuration.d.ts +33 -0
  221. package/dist/components/arcgis-sketch/customElement.d.ts +3 -2
  222. package/dist/components/arcgis-sketch/customElement.js +25 -21
  223. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.d.ts +18 -3
  224. package/dist/components/arcgis-utility-network-trace-aggregated-geometry-result-item/customElement.js +63 -53
  225. package/dist/components/arcgis-utility-network-trace-analysis/customElement.d.ts +11 -3
  226. package/dist/components/arcgis-utility-network-trace-analysis/customElement.js +107 -53
  227. package/dist/components/arcgis-utility-network-trace-analysis/index.js +1 -0
  228. package/dist/components/arcgis-utility-network-trace-analysis/types.d.ts +5 -1
  229. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.d.ts +19 -11
  230. package/dist/components/arcgis-utility-network-trace-elements-result-item/customElement.js +124 -110
  231. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.d.ts +29 -0
  232. package/dist/components/arcgis-utility-network-trace-functions-result-item/customElement.js +31 -17
  233. package/dist/components/arcgis-utility-network-trace-locations/customElement.js +1 -1
  234. package/dist/components/arcgis-utility-network-trace-results/customElement.d.ts +63 -14
  235. package/dist/components/arcgis-utility-network-trace-results/customElement.js +245 -55
  236. package/dist/components/arcgis-utility-network-trace-results/index.js +1 -2
  237. package/dist/components/arcgis-utility-network-trace-results-pane/customElement.js +7 -7
  238. package/dist/components/arcgis-utility-network-validate-network-topology/customElement.js +1 -1
  239. package/dist/docs/api.json +1 -1
  240. package/dist/docs/docs.json +1 -1
  241. package/dist/docs/vscode.html-custom-data.json +1 -1
  242. package/dist/docs/web-types.json +1 -1
  243. package/dist/index.d.ts +10 -0
  244. package/dist/loader.js +12 -11
  245. package/dist/types/lumina.d.ts +20 -10
  246. package/dist/types/preact.d.ts +21 -10
  247. package/dist/types/react.d.ts +22 -10
  248. package/dist/types/stencil.d.ts +20 -10
  249. package/package.json +8 -8
  250. package/dist/cdn/2OGEVHBC.js +0 -2
  251. package/dist/cdn/4FADGEJD.js +0 -2
  252. package/dist/cdn/5DV4N5DK.js +0 -2
  253. package/dist/cdn/5PNAHYUT.js +0 -2
  254. package/dist/cdn/7AKMHKTT.js +0 -2
  255. package/dist/cdn/A2FK4TED.js +0 -2
  256. package/dist/cdn/BOEHQXPR.js +0 -2
  257. package/dist/cdn/C2HB2U6P.js +0 -2
  258. package/dist/cdn/CRWARUC7.js +0 -2
  259. package/dist/cdn/CST7D7GR.js +0 -2
  260. package/dist/cdn/DDSMWDPS.js +0 -2
  261. package/dist/cdn/DOHO6T7Z.js +0 -2
  262. package/dist/cdn/GJZCVU6G.js +0 -5
  263. package/dist/cdn/IDE4IFH7.js +0 -2
  264. package/dist/cdn/IJTCIWOA.js +0 -2
  265. package/dist/cdn/IXVJQIMH.js +0 -2
  266. package/dist/cdn/KGBACXRG.js +0 -2
  267. package/dist/cdn/KWJAKUM4.js +0 -2
  268. package/dist/cdn/MRC7R44N.js +0 -2
  269. package/dist/cdn/MT6BTCFR.js +0 -2
  270. package/dist/cdn/QD7ELNLS.js +0 -2
  271. package/dist/cdn/TBSKBHHL.js +0 -2
  272. package/dist/cdn/WU7R423Z.js +0 -2
  273. package/dist/cdn/ZB6W452H.js +0 -2
  274. /package/dist/cdn/{ZU6D3YMF.js → 27MP6TEF.js} +0 -0
  275. /package/dist/cdn/{3XRSSDOC.js → 3JCF73F4.js} +0 -0
  276. /package/dist/cdn/{RLTZHJ26.js → 3XEPXV4Q.js} +0 -0
  277. /package/dist/cdn/{IMINWWQN.js → 43IOCYG5.js} +0 -0
  278. /package/dist/cdn/{HMZDI4HQ.js → 45JO7F4Y.js} +0 -0
  279. /package/dist/cdn/{232VF5GS.js → 4W35GLNO.js} +0 -0
  280. /package/dist/cdn/{7HQJTIYO.js → 5CER2N5T.js} +0 -0
  281. /package/dist/cdn/{33AEAI5T.js → 5M56ZA46.js} +0 -0
  282. /package/dist/cdn/{W6X34YBZ.js → 6NWR2Z4F.js} +0 -0
  283. /package/dist/cdn/{KMODOE6H.js → 7FVXPOAG.js} +0 -0
  284. /package/dist/cdn/{2PRRRGTC.js → AYJQLWX4.js} +0 -0
  285. /package/dist/cdn/{HJP2DQC3.js → AZ73DBU3.js} +0 -0
  286. /package/dist/cdn/{CQW2542N.js → B4CANXID.js} +0 -0
  287. /package/dist/cdn/{HLHFT3VN.js → BEFZSVBT.js} +0 -0
  288. /package/dist/cdn/{55Q2U4HS.js → BIWQEPK4.js} +0 -0
  289. /package/dist/cdn/{N5NLF7RI.js → BLYJE76S.js} +0 -0
  290. /package/dist/cdn/{2Q7J34UP.js → CESFJ6AD.js} +0 -0
  291. /package/dist/cdn/{5ZZ7JN5X.js → COKGOKO2.js} +0 -0
  292. /package/dist/cdn/{7Y65HW7Z.js → D3LYSFXK.js} +0 -0
  293. /package/dist/cdn/{FZATLDJD.js → EAM45WZP.js} +0 -0
  294. /package/dist/cdn/{6VBFCBUV.js → EDTGV4YF.js} +0 -0
  295. /package/dist/cdn/{62XRQDSI.js → FMBY3L4S.js} +0 -0
  296. /package/dist/cdn/{TKC3X6S6.js → GQ6SYNZS.js} +0 -0
  297. /package/dist/cdn/{YUZAZ3CJ.js → H4FH2RBM.js} +0 -0
  298. /package/dist/cdn/{P3MLJ7YL.js → I5ZESLWO.js} +0 -0
  299. /package/dist/cdn/{MM6LPGBW.js → KO7RD6SS.js} +0 -0
  300. /package/dist/cdn/{2LEEKX4J.js → LQ76PRWK.js} +0 -0
  301. /package/dist/cdn/{CTHAODQE.js → MUWOF7W4.js} +0 -0
  302. /package/dist/cdn/{G5DB24SO.js → OCLOCCB6.js} +0 -0
  303. /package/dist/cdn/{2UG26OVP.js → OJXNUBIA.js} +0 -0
  304. /package/dist/cdn/{ANRJPTRX.js → OUXE3CSQ.js} +0 -0
  305. /package/dist/cdn/{AKKV6RKF.js → PXAY7IM4.js} +0 -0
  306. /package/dist/cdn/{4PMOT2RS.js → QMYL4UM7.js} +0 -0
  307. /package/dist/cdn/{UCFBAQVW.js → QPFX5XH3.js} +0 -0
  308. /package/dist/cdn/{EGN54PEX.js → RFSBZHJD.js} +0 -0
  309. /package/dist/cdn/{4TZLBS5N.js → RYYBMDGS.js} +0 -0
  310. /package/dist/cdn/{CDGKQKVU.js → T2DT5I33.js} +0 -0
  311. /package/dist/cdn/{EJ5KLAEE.js → UINNR6FV.js} +0 -0
  312. /package/dist/cdn/{KWL3F4UP.js → UPZVIKOH.js} +0 -0
  313. /package/dist/cdn/{KXCLNNE5.js → VCRVQMYT.js} +0 -0
  314. /package/dist/cdn/{COSLSZXO.js → VWN2LORT.js} +0 -0
  315. /package/dist/cdn/{3NKJ4HFO.js → XAMLHDWZ.js} +0 -0
  316. /package/dist/cdn/{N43ZQ4C7.js → ZWN6DXNO.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import i from"./OMZESNEM.js";import{a as L}from"./UNPUCYYB.js";import h from"./JD562WMM.js";import g from"./C2HB2U6P.js";import f from"./CONE7FEI.js";import{a as k}from"./VJVKFKSG.js";import{b as j,c as K,d as q}from"./7N4V2IN6.js";import e from"./ILBDNJQP.js";import{a as U}from"./5JADSW57.js";import d from"./4FBTH6YD.js";import b from"./KORK4WZ7.js";import{f as z,h as V}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as M}from"./XPEGBUNJ.js";import{a as D}from"./XURWCCLX.js";import{M as _,N as m,O as N,Q as C,S as c,T as H,V as P,a as B,b as o,n as E,w as $}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([Y,X,ee,{initializeProjection:te},{renderingSanitizer:b},{stripHTML:R},{substitute:h,formatNumber:A},{when:ie,watch:u},,,,Z,,,{d:S},{c:G,d:W}])=>{var ae=B`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;function se(f){return f?.declaredClass.startsWith("esri.layers.")??!1}function ne(f){if(!(!f||!("featureReduction"in f)))return f.featureReduction?.type}var oe=Z(ee),le=25,O=class extends N{constructor(){super(...arguments),this._zoomToFeature=new Y({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=_(),this._featureMenuViewportNode=_(),this._actionBarMenuNode=_(),this._flowContainerNode=_(),this._aggregatedFeaturesComponent=_(),this.messages=U(),this._selectedFeatureComponent=_(),this._direction=z(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=k(this._openRelatedFeatureAbortController)},this._spinnerVisible=!1,this._spinnerVisibilityTimeout=null,this._openRelatedFeatureAbortController=null,this.flowItems=new X,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=oe(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new X,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=V()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=$(),this.arcgisClose=$(),this.arcgisTriggerAction=$()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_selectedFeatureHeadingText:16,_selectedFeatureContent:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=ae}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this._selectedFeatureHeading)&&!!(this.content||this._selectedFeatureContent))}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _selectedFeatureHeadingText(){return this._selectedFeatureHeading??this.messages.untitled}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelSetFocusAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:a}=t??{},i=new AbortController,{signal:s}=i,n=a?AbortSignal.any([s,a]):s;this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await te(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:n})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._clearSpinnerVisibilityTimeout(),this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[ie(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>{this.setFocus()}),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),u(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),u(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),u(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),u(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&E(()=>this.selectedFeatureComponent=e)}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=k(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(a=>{let i=a?.graphic;if(!i)return;let s=S(i),n=se(s)?s:null,l=t.get(n);l||(l=[],t.set(n,l)),l.push(a)}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let a=e.graphic,i=a?.geometry;if(i==null||a==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),t.signal.aborted)return;let{labelPointExecute:s}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let n=s(i);n!=null&&(this.location=n),this.features=[a],this.open=!0,this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"&&this._handleFeatureMenuBack()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionLabel(e){let{messages:t}=this;return e.id==="zoom-to-feature"?h(t.zoomLabel??"",{messages:t,title:this._selectedFeatureHeadingText}):null}_getActionTitle(e){let{messages:t,selectedFeature:a}=this,{id:i}=e,s=a?.attributes,n=e.title??"",l=i==="zoom-to-feature"?h(n,{messages:t}):i==="remove-selected-feature"?h(n,{messages:t}):i==="zoom-to-aggregated-features"?h(n,{messages:t}):i==="browse-aggregated-features"?h(n,{messages:t}):e.title;return l&&s?h(l,s):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||j(e)||(q(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._handleFeatureMenuBack(),this.previous()),K(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._handleFeatureMenuBack(),this.next()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:a,waitingForResult:i}=this.viewModel;i||!a||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){e.disabled||(e?.type==="toggle"&&(e.value=!e.value),W(e,this.viewModel),this.arcgisTriggerAction.emit({action:e}))}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||ne(S(e))!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);E(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=D(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=D(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_clearSpinnerVisibilityTimeout(){this._spinnerVisibilityTimeout!=null&&(clearTimeout(this._spinnerVisibilityTimeout),this._spinnerVisibilityTimeout=null)}_getSpinnerTrackLocation(){return!this.hideSpinner&&this.viewModel.open&&this.viewModel?.waitingForResult?this._spinnerVisible?!0:(this._spinnerVisibilityTimeout??=setTimeout(()=>{this._spinnerVisibilityTimeout=null,this._spinnerVisible=!0,this._createSpinner()},le),!1):(this._clearSpinnerVisibilityTimeout(),this._spinnerVisible=!1,!1)}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=H(o`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${this._getSpinnerTrackLocation()} .location=${this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return o`<div class="root">${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?o`<div slot=header-top class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:a}=this;return o`<div class="pagination-text">${h(a.pageText??"",{index:A(t+1),total:A(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:a,streamingFeatures:i,selectedFeatureIndex:s,pendingPromisesCount:n}=t,l=n>0||i;return o`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${l} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:A(s+1),total:A(a)})} text-enabled title=${e.showAllFeatures??""??c}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return o`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${a??""} @click=${e} .text=${a??""} title=${a??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e,t){let{initialDisplayMode:a}=this,{selectedFeatureItem:i}=this.viewModel,s=e===i;return o`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(t)}><span .innerHTML=${(b.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${a==="list"?o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,a=this._groupResultsByLayer(),i=new Map;t.featureItems.forEach((n,l)=>i.set(n,l));let s=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?o`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(a.keys(),n=>{let l=a.get(n)?.map(d=>{let g=i.get(d);return g==null?null:this._renderFeatureMenuItem(d,g)}),r=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&r!==null?L(n??"map-graphics",o`<calcite-list-item-group .heading=${r}>${l}</calcite-list-item-group>`):l})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?o`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:a,_isCollapsed:i,_collapseEnabled:s,featureNavigationTop:n,initialDisplayMode:l,selectedFeature:r,hideHeading:d}=this,{active:g,selectedFeatureItem:v,content:F}=this.viewModel,p=this._getHeading();if(l==="list"&&!r)return null;let w=v?!v.content:!F;return o`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${C(M({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!g} .collapsed=${i} .collapseDirection=${this.collapseDirection??(n?"down":"up")} .collapsible=${s} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d&&p?R(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?o`<div slot=heading><div .innerHTML=${b.sanitize(p??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${C(M("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:a,messages:i,initialDisplayMode:s,featureMenuOpen:n,_featureFlowItemSelected:l,_collapseEnabled:r,_isCollapsed:d,featureNavigationTop:g,headingLevel:v}=this,{active:F,featureItems:p,streamingFeatures:w,pendingPromisesCount:I}=e,y=I>0||w,x=a??i.selectFeature,T=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});if(s==="feature"&&!n)return null;let J=!l;return o`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${C(M({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!F} .collapsed=${s==="list"&&d} .collapseDirection=${this.collapseDirection??(g?"down":"up")} .collapsible=${s==="list"&&r} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:T}} .description=${this.hideFeatureMenuHeading?void 0:h(i.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:x} .headingLevel=${v} .loading=${e.waitingForContents} .selected=${J} @calciteFlowItemBack=${Q=>{Q.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${y?o`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${m(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${T} title=${T??c}>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n,hideHeading:l}=this,r="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,d=r&&!s,g=e.flowType==="feature-association",v=a.returnToInitialFeature??"",F=a?.selectFeature,p=this._getActionTitle(this._zoomToFeature),w=this._getActionLabel(this._zoomToFeature),I=!this.hideActionBar&&g&&r,y=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?o`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return o`<calcite-flow-item .closable=${!i} .closed=${!n} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${R(this._getDrillInFlowItemDescription(e)??"")} .heading=${l?void 0:R(e.heading??"")} .selected=${t} @calciteFlowItemBack=${x=>{x.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l?null:o`<div slot=heading><div .innerHTML=${b.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${b.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${v??""} title=${v??""??c}></calcite-action>${d?o`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${F??""} title=${F??c}></calcite-action>`:null}${I?o`<calcite-action-bar expand-toggle-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon??void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${p} title=${w??p??c} .label=${w??p} @click=${()=>G(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${y}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,a=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,i=a&&e.length===0,s=e.length===0&&this._featureFlowItemSelected&&!a,n=e?.map((d,g)=>this._renderFlowItem(d,this._featureFlowItemSelected&&g===e.length-1)),l=this._renderBrowseAggregateContainer(!!i),r=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return o`<calcite-flow ${m(this._flowContainerNode)}>${r}${l}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel,n=this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate,l=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});return n?o`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?h(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${r=>{r.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:l}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${s??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${l} title=${l??c}>${i.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable,t=this.viewModel.allActions.toArray(),a=e&&!this.location?t.filter(n=>n.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return o`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??c} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e){return e.map(t=>{let a=this._getActionTitle(t),i=this._getActionLabel(t);return o`<calcite-action .active=${t.type==="toggle"?t.value:!1} .disabled=${t.disabled} .icon=${t.icon??void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${a??""} .label=${i??a} title=${i??a??c} .hidden=${!t.visible} @click=${()=>this._triggerAction(t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?L(e,o`<div .innerHTML=${b.sanitize(e)??""}></div>`):e??null}};P("arcgis-features-next",O);return O},"support/actions/ActionButton","core/Collection","popup/FeatureContentCollection","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils",a,b,d,e,f,g,h,i)
2
+ import i from"./Q4AJYCNY.js";import{a as L}from"./UNPUCYYB.js";import h from"./EDMWGUZ2.js";import g from"./TMJX7DFH.js";import f from"./YG4HDEP3.js";import{a as k}from"./VJVKFKSG.js";import{b as j,c as K,d as q}from"./7N4V2IN6.js";import e from"./ILBDNJQP.js";import{a as U}from"./5JADSW57.js";import d from"./4FBTH6YD.js";import b from"./KORK4WZ7.js";import{f as z,h as V}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as M}from"./XPEGBUNJ.js";import{a as D}from"./XURWCCLX.js";import{M as _,N as m,O as N,Q as C,S as c,T as H,V as P,a as B,b as o,n as E,w as $}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([Y,X,ee,{initializeProjection:te},{renderingSanitizer:b},{stripHTML:R},{substitute:h,formatNumber:A},{when:ie,watch:u},,,,Z,,,{d:S},{c:G,d:W}])=>{var ae=B`:host{display:flex;overflow:hidden;flex:1 1 auto}.root{--calcite-color-background: var(--calcite-color-foreground-1);display:flex;overflow:hidden;flex:1 1 auto;flex-direction:column}.root img{image-orientation:from-image}.flow-item-collapsed{--calcite-flow-item-header-border-block-end: none}.container{display:flex;flex:1 1 auto;background-color:var(--calcite-color-foreground-1)}.container calcite-list{width:100%}.container:not(:empty,.content-hidden){padding:var(--arcgis-internal-padding-md, var(--calcite-spacing-md))}.root .arcgis-feature,.root .arcgis-feature-relationship,.root .arcgis-feature-utility-network-associations{background-color:transparent}.heading{word-break:break-word;word-wrap:break-word}.header,.footer{display:flex;align-items:center;justify-content:flex-end;background-color:var(--calcite-color-foreground-1)}.footer{flex:1}.pagination-text{padding-inline:var(--calcite-spacing-sm);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-sm)}.loader{align-self:center;padding-inline:var(--calcite-spacing-lg)}.pagination-action-bar{flex:1}.pagination-menu-button{padding-inline:var(--calcite-spacing-xxs);border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3)}.icon{display:inline-block;flex:0 0 var(--calcite-spacing-lg);width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.action-image{flex:0 0 var(--calcite-spacing-lg);background-position:50% 50%;background-repeat:no-repeat;background-size:contain;width:var(--calcite-spacing-lg);height:var(--calcite-spacing-lg)}.content-feature{--calcite-flow-item-footer-padding: 0;--calcite-flow-header-top-space: 0}.feature-menu-observer{position:relative;bottom:var(--calcite-spacing-xxl);z-index:2;text-align:center}.action-exit{transform:scaleX(-1)}.flow-item-drill-in{--calcite-flow-item-footer-padding: 0}`;function se(f){return f?.declaredClass.startsWith("esri.layers.")??!1}function ne(f){if(!(!f||!("featureReduction"in f)))return f.featureReduction?.type}var oe=Z(ee),le=25,O=class extends N{constructor(){super(...arguments),this._zoomToFeature=new Y({icon:"magnifying-glass-plus",id:"zoom-to-feature",title:"{messages.zoom}"}),this._fetchFeaturesController=null,this._featureMenuIntersectionObserverCallback=([e])=>{e?.isIntersecting&&this.viewModel.featurePage!=null&&this.viewModel.featurePage++},this._featureMenuIntersectionObserver=new IntersectionObserver(this._featureMenuIntersectionObserverCallback,{root:window.document}),this._featureMenuIntersectionObserverNode=null,this._setFocusAnimationFrameId=null,this._setFocusAnimationFrameResolve=null,this._rootFlowItemNode=_(),this._featureMenuViewportNode=_(),this._actionBarMenuNode=_(),this._flowContainerNode=_(),this._aggregatedFeaturesComponent=_(),this.messages=U(),this._selectedFeatureComponent=_(),this._direction=z(),this._cancelOpenRelatedFeature=()=>{this._openRelatedFeatureAbortController=k(this._openRelatedFeatureAbortController)},this._spinnerVisible=!1,this._spinnerVisibilityTimeout=null,this._openRelatedFeatureAbortController=null,this.flowItems=new X,this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._hasActionsStartSlotContent=!1,this._hasActionsEndSlotContent=!1,this.viewModel=oe(this),this.actions=this.viewModel.actions,this.active=this.viewModel.active,this.autoDestroyDisabled=!1,this.focusTrapEnabled=!1,this.collapsed=!1,this.content=this.viewModel.content,this.defaultPopupTemplateEnabled=this.viewModel.defaultPopupTemplateEnabled,this.effectiveHeading=this.viewModel.effectiveHeading,this.featureCount=this.viewModel.featureCount,this.featureMenuOpen=!1,this.featureNavigationTop=!1,this.features=this.viewModel.features,this.featuresPerPage=this.viewModel.featuresPerPage,this.featureItemAbilities=this.viewModel.featureItemAbilities,this.goToOverride=this.viewModel.goToOverride,this.headerActions=new X,this.heading=this.viewModel.heading,this.headingLevel=2,this.hideActionBar=!1,this.hideCloseButton=!1,this.hideFeatureMenuHeading=!1,this.hideFeatureNavigation=!1,this.hideFeatureListLayerTitle=!1,this.hideHeading=!1,this.hideSelectFeature=!1,this.hideSpinner=!1,this.hideContent=!1,this.chartAnimationDisabled=this.viewModel.featureItemAbilities?.chartAnimation,this.hideAttachmentsContent=this.viewModel.featureItemAbilities?.attachmentsContent,this.hideEmptyRelationshipContent=!1,this.hideCustomContent=this.viewModel.featureItemAbilities?.customContent,this.hideExpressionContent=!1,this.hideFieldsContent=this.viewModel.featureItemAbilities?.fieldsContent,this.hideMediaContent=this.viewModel.featureItemAbilities?.mediaContent,this.hideRelationshipContent=this.viewModel.featureItemAbilities?.relationshipContent,this.hideTextContent=this.viewModel.featureItemAbilities?.textContent,this.hideUtilityNetworkContent=this.viewModel.featureItemAbilities?.utilityNetworkAssociationsContent,this.hideLastEditedInfo=!1,this.highlightDisabled=this.viewModel.highlightEnabled,this.includeDefaultActionsDisabled=this.viewModel.includeDefaultActions,this.initialDisplayMode=this.viewModel.initialDisplayMode,this.location=this.viewModel.location,this.map=this.viewModel.map,this.open=this.viewModel.open,this.promises=this.viewModel.promises,this.responsiveActionsEnabled=!1,this.selectedFeature=this.viewModel.selectedFeature,this.selectedFeatureIndex=this.viewModel.selectedFeatureIndex,this.showCollapseButton=!1,this.spatialReference=this.viewModel.spatialReference,this.state=this.viewModel.state,this.timeZone=this.viewModel.timeZone,this.updateLocationEnabled=this.viewModel.updateLocationEnabled,this.view=this.viewModel.view,this.arcgisPropertyChange=V()("active","collapsed","effectiveHeading","featureCount","featureMenuOpen","features","promises","selectedDrillInFeature","selectedFeature","selectedFeatureComponent","selectedFeatureIndex","state","open"),this.arcgisReady=$(),this.arcgisClose=$(),this.arcgisTriggerAction=$()}static{this.properties={_openRelatedFeatureAbortController:16,flowItems:16,_aggregatedFeatureCount:16,_selectedAggregatedFeatureIndex:16,_aggregatedFeaturesLoading:16,_hasActionsStartSlotContent:16,_hasActionsEndSlotContent:16,_hideActionText:16,_featureNavigationVisible:16,_isCollapsed:16,_collapseEnabled:16,_selectedFeatureHeading:16,_selectedFeatureHeadingText:16,_selectedFeatureContent:16,_featureFlowItemSelected:16,viewModel:0,actions:0,active:0,autoDestroyDisabled:5,focusTrapEnabled:5,collapseDirection:1,collapsed:5,content:1,defaultPopupTemplateEnabled:5,effectiveHeading:32,featureCount:9,featureMenuOpen:5,featureMenuTitle:1,featureNavigationTop:5,features:0,featuresPerPage:9,featureItemAbilities:0,goToOverride:0,headerActions:0,heading:1,headingLevel:9,hideActionBar:5,hideCloseButton:5,hideFeatureMenuHeading:5,hideFeatureNavigation:5,hideFeatureListLayerTitle:5,hideHeading:5,hideSelectFeature:5,hideSpinner:5,hideContent:5,chartAnimationDisabled:5,hideAttachmentsContent:5,hideEmptyRelationshipContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,hideRelationshipContent:5,hideTextContent:5,hideUtilityNetworkContent:5,hideLastEditedInfo:5,highlightDisabled:5,icon:1,includeDefaultActionsDisabled:5,initialDisplayMode:1,label:1,location:0,map:0,messageOverrides:0,open:5,referenceElement:1,promises:0,responsiveActionsEnabled:5,selectedDrillInFeature:32,selectedFeature:0,selectedFeatureComponent:32,selectedFeatureIndex:9,showCollapseButton:5,spatialReference:0,state:32,timeZone:1,updateLocationEnabled:5,view:0}}static{this.styles=ae}get _hideActionText(){if(!this.responsiveActionsEnabled)return!1;let e=this.viewModel.view?.widthBreakpoint;return e==="xsmall"||e==="small"||e==="medium"}get _featureNavigationVisible(){return this.viewModel.active&&this.viewModel.featureCount>1&&!!this.viewModel.selectedFeature&&!this.hideFeatureNavigation}get _isCollapsed(){return this._collapseEnabled&&this.collapsed}get _collapseEnabled(){return this.showCollapseButton&&(this.initialDisplayMode==="list"||!!(this.heading||this._selectedFeatureHeading)&&!!(this.content||this._selectedFeatureContent))}get _selectedFeatureHeading(){return this.viewModel.selectedFeatureItem?.heading}get _selectedFeatureHeadingText(){return this._selectedFeatureHeading??this.messages.untitled}get _selectedFeatureContent(){return this.viewModel.selectedFeatureItem?.content}get _featureFlowItemSelected(){return this.initialDisplayMode==="list"?!!this.selectedFeature:!this.featureMenuOpen}clear(){this.viewModel.clear()}close(){this.open=!1}async destroy(){await this.manager.destroy(),this._clearSpinnerVisibilityTimeout(),this._removeSpinner(this.referenceElement),this._cancelOpenRelatedFeature(),this._cancelSetFocusAnimationFrame(),this._removeFlowItems(),this._unobserveFeatureMenuObserver(),this._cancelFetchingFeatures(),this._featureMenuIntersectionObserver?.disconnect()}async fetchFeatures(e,t){this._cancelFetchingFeatures();let{signal:a}=t??{},i=new AbortController,{signal:s}=i,n=a?AbortSignal.any([s,a]):s;this._fetchFeaturesController=i,!e&&this.view&&this.location&&(await te(this.location.spatialReference,this.view.spatialReference,null,{signal:n}),e=this.view.toScreen(this.location)??void 0),e&&await this.viewModel.fetchFeatures(e,{...t,signal:n})}next(){this.viewModel.next()}previous(){this.viewModel.previous()}async setFocus(){this._cancelSetFocusAnimationFrame(),await new Promise(e=>{this._setFocusAnimationFrameResolve=e,this._setFocusAnimationFrameId=requestAnimationFrame(()=>{this._setFocusAnimationFrameId=null;try{if(!this.isConnected||!this.viewModel?.active)return;this._flowContainerNode.value?.setFocus()}finally{this._resolveSetFocusAnimationFrame()}})})}connectedCallback(){super.connectedCallback(),this._createSpinner()}disconnectedCallback(){super.disconnectedCallback(),this._clearSpinnerVisibilityTimeout(),this._cancelSetFocusAnimationFrame(),this._removeSpinner(this.referenceElement)}loaded(){this.manager.onLifecycle(()=>[ie(()=>[this.initialDisplayMode==="list"&&!!this.viewModel?.selectedFeature,this.viewModel?.active],()=>{this.setFocus()}),u(()=>[this.flowItems?.length,this.featureMenuOpen],()=>{this.setFocus()}),u(()=>this.viewModel?.selectedFeatureIndex,(e,t)=>this._selectedFeatureIndexUpdated(e,t)),u(()=>this.viewModel?.view?.scale,()=>this._viewScaleChange()),u(()=>this.viewModel?.view,(e,t)=>t&&this._viewChange()),u(()=>this._spinnerEl?.screenLocation,()=>this._closeOpenActionMenu()),u(()=>this.selectedFeatureComponent?.viewModel,()=>this._removeFlowItems()),u(()=>this.viewModel?.featureItems,()=>this._featureMenuViewportScrollTop()),u(()=>this.flowItems.length,()=>this._syncSelectedDrillInFeature()),u(()=>this.viewModel.aggregatedFeaturesEnabled,e=>{e||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._aggregatedFeaturesLoading=!1,this._removeFlowItems())}),u(()=>this.referenceElement,(e,t)=>{this._removeSpinner(t),this._createSpinner()},{initial:!0}),u(()=>[this.hideSpinner,this.viewModel?.view,this.viewModel?.location,this.viewModel?.waitingForResult,this.viewModel?.open],()=>this._createSpinner(),{initial:!0})])}updated(){let e=this._selectedFeatureComponent.value??void 0;this.selectedFeatureComponent!==e&&E(()=>this.selectedFeatureComponent=e)}_resolveSetFocusAnimationFrame(){let e=this._setFocusAnimationFrameResolve;this._setFocusAnimationFrameResolve=null,e?.()}_cancelSetFocusAnimationFrame(){this._setFocusAnimationFrameId!=null&&(cancelAnimationFrame(this._setFocusAnimationFrameId),this._setFocusAnimationFrameId=null),this._resolveSetFocusAnimationFrame()}_cancelFetchingFeatures(){this._fetchFeaturesController=k(this._fetchFeaturesController)}_handleClose(){this.close(),this.arcgisClose.emit()}_groupResultsByLayer(){let{featureItems:e}=this.viewModel,t=new Map;return e.forEach(a=>{let i=a?.graphic;if(!i)return;let s=S(i),n=se(s)?s:null,l=t.get(n);l||(l=[],t.set(n,l)),l.push(a)}),t}_handleCollapseToggle(){this.collapsed=!this.collapsed}async _openRelatedFeature(e){this._cancelOpenRelatedFeature();let t=new AbortController;if(this._openRelatedFeatureAbortController=t,await e.updateGeometry(),t.signal.aborted)return;let a=e.graphic,i=a?.geometry;if(i==null||a==null){this._openRelatedFeatureAbortController=null;return}if(this._removeFlowItems(),await this.viewModel.zoomTo({target:i}),t.signal.aborted)return;let{labelPointExecute:s}=await $arcgis.t(m=>m[0],"geometry/operators/labelPointOperator");if(t.signal.aborted)return;let n=s(i);n!=null&&(this.location=n),this.features=[a],this.open=!0,this._openRelatedFeatureAbortController=null}_handlePaginationMenuButton(){this._updateFeatureMenu()}_openFeatureMenu(){this._updateFeatureMenu(!0)}_closeFeatureMenu(){this._updateFeatureMenu(!1)}_updateFeatureMenu(e=!this.featureMenuOpen){this.featureMenuOpen=e}_previousFeature(){this.viewModel.previous()}_nextFeature(){this.viewModel.next()}_handleFeatureBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this._openFeatureMenu()}_handleFeatureMenuBack(){this.initialDisplayMode==="list"?this.selectedFeatureIndex=-1:this.featureMenuOpen&&this._closeFeatureMenu()}_setActiveFeature(e){let{viewModel:t}=this;t.activeFeature=t.features?.[e]||null}_removeActiveFeature(){this.viewModel.activeFeature=null}_selectFeature(e){this.viewModel.selectedFeatureIndex=e,this.initialDisplayMode==="feature"&&this._handleFeatureMenuBack()}_unobserveFeatureMenuObserver(){this._featureMenuIntersectionObserverNode&&this._featureMenuIntersectionObserver.unobserve(this._featureMenuIntersectionObserverNode)}_featureMenuIntersectionObserverCreated(e){this._unobserveFeatureMenuObserver(),e&&this._featureMenuIntersectionObserver.observe(e),this._featureMenuIntersectionObserverNode=e}_getActionLabel(e){let{messages:t}=this;return e.id==="zoom-to-feature"?h(t.zoomLabel??"",{messages:t,title:this._selectedFeatureHeadingText}):null}_getActionTitle(e){let{messages:t,selectedFeature:a}=this,{id:i}=e,s=a?.attributes,n=e.title??"",l=i==="zoom-to-feature"?h(n,{messages:t}):i==="remove-selected-feature"?h(n,{messages:t}):i==="zoom-to-aggregated-features"?h(n,{messages:t}):i==="browse-aggregated-features"?h(n,{messages:t}):e.title;return l&&s?h(l,s):l??""}_onMainKeydown(e){let{key:t}=e;e.defaultPrevented||j(e)||(q(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._handleFeatureMenuBack(),this.previous()),K(t,this._direction,{horizontalOnly:!0})&&(e.preventDefault(),e.stopPropagation(),this._handleFeatureMenuBack(),this.next()))}_featureMenuViewportScrollTop(){this._featureMenuViewportNode.value?.scrollContentTo({top:0})}_selectedFeatureIndexUpdated(e,t){let{featureCount:a,waitingForResult:i}=this.viewModel;i||!a||e===t||e===-1||(this._aggregatedFeatureCount=0,this._selectedAggregatedFeatureIndex=-1,this._removeFlowItems(),this._rootFlowItemNode.value?.scrollContentTo({top:0}))}_triggerAction(e){e.disabled||(e?.type==="toggle"&&(e.value=!e.value),W(e,this.viewModel),this.arcgisTriggerAction.emit({action:e}))}_viewScaleChange(){let{selectedFeature:e}=this;!e?.isAggregate||ne(S(e))!=="cluster"||(this.viewModel.aggregatedFeaturesEnabled=!1,this.open=!1,this.clear())}_viewChange(){this.viewModel.clear(),this.open=!1,this._aggregatedFeatureCount=0,this._removeFlowItems()}_handleAggregatedFeaturesPropertyChange({detail:e,target:t}){e.name==="aggregatedFeatureCount"&&(this._aggregatedFeatureCount=t.aggregatedFeatureCount),e.name==="selectedAggregatedFeatureIndex"&&(this._selectedAggregatedFeatureIndex=t.selectedAggregatedFeatureIndex,this._syncSelectedDrillInFeature()),e.name==="loading"&&(this._aggregatedFeaturesLoading=t.loading)}_closeOpenActionMenu(){let{_actionBarMenuNode:e}=this;e.value&&(e.value.menuOpen=!1)}_syncSelectedDrillInFeature(){let e=this.flowItems.getItemAt(this.flowItems.length-1);E(()=>this.selectedDrillInFeature=e?.graphic??void 0)}_removeFlowItems(){this.viewModel.aggregatedFeaturesEnabled=!1,this.flowItems?.destroyAll()}_getDrillInFlowItemDescription(e){switch(e.flowType){case"feature":case"feature-association":case"feature-utility-network-associations":case"feature-utility-network-association-type":return e.description;case"feature-relationship":return e.allItemsDescription}}_handleDrillInBackClick(){this.flowItems?.pop()?.destroy()}_getHeading(){let{effectiveHeading:e}=this.viewModel;return!this.hideHeading&&e?e:""}_handleActionsStartSlotChange(e){this._hasActionsStartSlotContent=D(e)}_handleActionsEndSlotChange(e){this._hasActionsEndSlotContent=D(e)}_removeSpinner(e){e?.manager?.component?.extraContent?.remove(this._spinnerEl),this._spinnerEl=void 0}_clearSpinnerVisibilityTimeout(){this._spinnerVisibilityTimeout!=null&&(clearTimeout(this._spinnerVisibilityTimeout),this._spinnerVisibilityTimeout=null)}_getSpinnerTrackLocation(){return!this.hideSpinner&&this.viewModel.open&&this.viewModel?.waitingForResult?this._spinnerVisible?!0:(this._spinnerVisibilityTimeout??=setTimeout(()=>{this._spinnerVisibilityTimeout=null,this._spinnerVisible=!0,this._createSpinner()},le),!1):(this._clearSpinnerVisibilityTimeout(),this._spinnerVisible=!1,!1)}_createSpinner(){let e=this.referenceElement;e&&(this._removeSpinner(e),this._spinnerEl=H(o`<arcgis-spinner .label=${this.messages.loading??""} .trackLocation=${this._getSpinnerTrackLocation()} .location=${this.viewModel?.location??void 0} .referenceElement=${e} .view=${this.viewModel?.view??void 0}></arcgis-spinner>`),e.manager?.component?.extraContent?.add(this._spinnerEl))}render(){return o`<div class="root">${this._renderContentContainer()}</div>`}_renderFeatureNavigation(){return[this._renderPagination(()=>this._previousFeature(),()=>this._nextFeature()),this.initialDisplayMode==="list"?this._renderFeaturePaginationText(this.viewModel.featureCount,this.viewModel.selectedFeatureIndex):this._renderFeatureMenuButton()]}_renderHeader(){return this.featureNavigationTop&&this._featureNavigationVisible?o`<div slot=header-top class="header">${this._renderFeatureNavigation()}</div>`:null}_renderFooter(){return!this.featureNavigationTop&&this._featureNavigationVisible?o`<div class="footer" slot=footer>${this._renderFeatureNavigation()}</div>`:null}_renderFeaturePaginationText(e,t){let{messages:a}=this;return o`<div class="pagination-text">${h(a.pageText??"",{index:A(t+1),total:A(e)})}</div>`}_renderFeatureMenuButton(){let{messages:e,viewModel:t}=this,{featureCount:a,streamingFeatures:i,selectedFeatureIndex:s,pendingPromisesCount:n}=t,l=n>0||i;return o`<calcite-action class="pagination-menu-button" icon=list .label=${e.showAllFeatures??""} .loading=${l} @click=${this._handlePaginationMenuButton} .text=${h(e.pageText??"",{index:A(s+1),total:A(a)})} text-enabled title=${e.showAllFeatures??""??c}></calcite-action>`}_renderPagination(e,t){let{previous:a,next:i}=this.messages;return o`<calcite-action-bar class="pagination-action-bar" expand-toggle-disabled layout=horizontal overflow-mode=none scale=s><calcite-action-group scale=s><calcite-action class="pagination-previous" icon=chevron-left icon-flip-rtl .label=${a??""} @click=${e} .text=${a??""} title=${a??""??c}></calcite-action><calcite-action icon=chevron-right icon-flip-rtl .label=${i??""} @click=${t} .text=${i??""} title=${i??""??c}></calcite-action></calcite-action-group></calcite-action-bar>`}_renderFeatureMenuItem(e,t){let{initialDisplayMode:a}=this,{selectedFeatureItem:i}=this.viewModel,s=e===i;return o`<calcite-list-item @blur=${this._removeActiveFeature} @focus=${()=>this._setActiveFeature(t)} @mouseleave=${this._removeActiveFeature} @mouseover=${()=>this._setActiveFeature(t)} .selected=${s} @calciteListItemSelect=${()=>this._selectFeature(t)}><span .innerHTML=${(b.sanitize(e.heading)||this.messages.untitled)??""} slot=content></span>${a==="list"?o`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`:null}</calcite-list-item>`}_renderFeatureMenu(){let{messages:e,viewModel:t}=this,a=this._groupResultsByLayer(),i=new Map;t.featureItems.forEach((n,l)=>i.set(n,l));let s=this.initialDisplayMode==="list"?"none":"single";return t.featureItems.length?o`<calcite-list display-mode=flat .label=${e?.featuresList??""} selection-appearance=icon .selectionMode=${s}>${Array.from(a.keys(),n=>{let l=a.get(n)?.map(d=>{let g=i.get(d);return g==null?null:this._renderFeatureMenuItem(d,g)}),r=n?n.title??this.messages.untitled:null;return!this.hideFeatureListLayerTitle&&r!==null?L(n??"map-graphics",o`<calcite-list-item-group .heading=${r}>${l}</calcite-list-item-group>`):l})}</calcite-list>`:null}_renderHeaderAction(e){let t=e.title||"";return e.visible?o`<calcite-action .active=${e.type==="toggle"?e.value:!1} .disabled=${e.disabled} .icon=${e.icon??void 0} .indicator=${e.active} .loading=${e.active} @click=${()=>this._triggerAction(e)} slot=header-actions-end .text=${t} title=${t??c}></calcite-action>`:null}_renderHeaderActions(){return this.headerActions.map(e=>this._renderHeaderAction(e)).toArray()}_renderContentFeature(e){let{headingLevel:t,hideCloseButton:a,_isCollapsed:i,_collapseEnabled:s,featureNavigationTop:n,initialDisplayMode:l,selectedFeature:r,hideHeading:d}=this,{active:g,selectedFeatureItem:v,content:F}=this.viewModel,p=this._getHeading();if(l==="list"&&!r)return null;let w=v?!v.content:!F;return o`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${C(M({"content-feature":!0,"flow-item-collapsed":i}))} .closable=${!a} .closed=${!g} .collapsed=${i} .collapseDirection=${this.collapseDirection??(n?"down":"up")} .collapsible=${s} .headingLevel=${t} .selected=${e} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand}} @calciteFlowItemBack=${this._handleFeatureBack} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} @keydown=${this._onMainKeydown} .heading=${!d&&p?R(p):void 0} ${m(this._rootFlowItemNode)}>${this._renderHeader()}${!d&&p?o`<div slot=heading><div .innerHTML=${b.sanitize(p??"")??""}></div></div>`:null}${this._renderHeaderActions()}${this._renderActionBar()}<div class=${C(M("container","content-container",{"content-hidden":w}))}>${this._renderContent()}</div>${this._renderFooter()}</calcite-flow-item>`}_renderFeatureMenuContainer(){let{viewModel:e,hideCloseButton:t,featureMenuTitle:a,messages:i,initialDisplayMode:s,featureMenuOpen:n,_featureFlowItemSelected:l,_collapseEnabled:r,_isCollapsed:d,featureNavigationTop:g,headingLevel:v}=this,{active:F,featureItems:p,streamingFeatures:w,pendingPromisesCount:I}=e,y=I>0||w,x=a??i.selectFeature,T=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});if(s==="feature"&&!n)return null;let J=!l;return o`<calcite-flow-item .focusTrapEnabled=${this.focusTrapEnabled} class=${C(M({"flow-item-collapsed":d}))} .closable=${!t} .closed=${!F} .collapsed=${s==="list"&&d} .collapseDirection=${this.collapseDirection??(g?"down":"up")} .collapsible=${s==="list"&&r} .messageOverrides=${{collapse:this.messages.collapse,expand:this.messages.expand,back:T}} .description=${this.hideFeatureMenuHeading?void 0:h(i.total??"",{total:p.length})} .heading=${this.hideFeatureMenuHeading?void 0:x} .headingLevel=${v} .loading=${e.waitingForContents} .selected=${J} @calciteFlowItemBack=${Q=>{Q.preventDefault(),this._handleFeatureMenuBack()}} @calciteFlowItemClose=${this._handleClose} @calciteFlowItemToggle=${this._handleCollapseToggle} ${m(this._featureMenuViewportNode)}>${s==="list"?this._renderHeaderActions():null}${y?o`<calcite-loader class="loader" inline .label=${i.loading??""} slot=header-actions-end></calcite-loader>`:null}<div class="container">${this._renderFeatureMenu()}</div><div class="feature-menu-observer" ${m(this._featureMenuIntersectionObserverCreated)}></div>${s==="feature"?o`<calcite-button scale=s appearance=transparent @click=${this._handleFeatureMenuBack} slot=footer-start width=full .label=${T} title=${T??c}>${i.back}</calcite-button>`:null}</calcite-flow-item>`}_renderFlowItem(e,t){let{messages:a,hideCloseButton:i,hideSelectFeature:s,active:n,hideHeading:l}=this,r="graphic"in e&&"isFeatureFromTable"in e&&!e.isFeatureFromTable,d=r&&!s,g=e.flowType==="feature-association",v=a.returnToInitialFeature??"",F=a?.selectFeature,p=this._getActionTitle(this._zoomToFeature),w=this._getActionLabel(this._zoomToFeature),I=!this.hideActionBar&&g&&r,y=e.flowType==="feature"&&this.viewModel.aggregatedFeaturesEnabled?o`<div class="footer" slot=footer>${this._renderPagination(()=>{this._aggregatedFeaturesComponent.value?.previous()},()=>{this._aggregatedFeaturesComponent.value?.next()})}${this._renderFeaturePaginationText(this._aggregatedFeatureCount,this._selectedAggregatedFeatureIndex)}</div>`:null;return o`<calcite-flow-item .closable=${!i} .closed=${!n} .focusTrapEnabled=${this.focusTrapEnabled} class="flow-item-drill-in" .description=${R(this._getDrillInFlowItemDescription(e)??"")} .heading=${l?void 0:R(e.heading??"")} .selected=${t} @calciteFlowItemBack=${x=>{x.preventDefault(),this._handleDrillInBackClick()}} .loading=${!!this._openRelatedFeatureAbortController} @calciteFlowItemClose=${this._handleClose}>${l?null:o`<div slot=heading><div .innerHTML=${b.sanitize(e.heading??"")??""}></div></div>`}<div slot=description><div .innerHTML=${b.sanitize(this._getDrillInFlowItemDescription(e)??"")??""}></div></div><calcite-action class="action-exit" icon=move-up @click=${this._removeFlowItems} slot=header-actions-start .text=${v??""} title=${v??""??c}></calcite-action>${d?o`<calcite-action icon=zoom-to-object @click=${()=>this._openRelatedFeature(e)} slot=header-actions-end .text=${F??""} title=${F??c}></calcite-action>`:null}${I?o`<calcite-action-bar expand-toggle-disabled expanded scale=s slot=action-bar><calcite-action-group overlay-positioning=fixed scale=s><calcite-action .disabled=${this._zoomToFeature.disabled} .icon=${this._zoomToFeature.icon??void 0} .loading=${this._zoomToFeature.active} scale=s text-enabled .text=${p} title=${w??p??c} .label=${w??p} @click=${()=>G(this.viewModel,this._zoomToFeature,e)}></calcite-action></calcite-action-group></calcite-action-bar>`:null}<div class="container">${e}</div>${y}</calcite-flow-item>`}_renderContentContainer(){let e=this.flowItems?.toArray(),t=e.length>0,a=this.viewModel.aggregatedFeaturesEnabled&&this.viewModel.selectedFeature?.isAggregate&&!t,i=a&&e.length===0,s=e.length===0&&this._featureFlowItemSelected&&!a,n=e?.map((d,g)=>this._renderFlowItem(d,this._featureFlowItemSelected&&g===e.length-1)),l=this._renderBrowseAggregateContainer(!!i),r=this.initialDisplayMode==="list"?[this._renderFeatureMenuContainer(),this._renderContentFeature(s)]:[this._renderContentFeature(s),this._renderFeatureMenuContainer()];return o`<calcite-flow ${m(this._flowContainerNode)}>${r}${l}${n}</calcite-flow>`}_renderBrowseAggregateContainer(e){let{hideCloseButton:t,active:a,messages:i}=this,{selectedFeature:s}=this.viewModel,n=this.viewModel.aggregatedFeaturesEnabled&&s?.isAggregate,l=h(i.backLabel??"",{title:this._selectedFeatureHeadingText});return n?o`<calcite-flow-item .selected=${e} .closable=${!t} .closed=${!a} .focusTrapEnabled=${this.focusTrapEnabled} .description=${this._aggregatedFeatureCount?h(i.total??"",{total:this._aggregatedFeatureCount}):""} .heading=${i.aggregatedFeatures} @calciteFlowItemBack=${r=>{r.preventDefault(),this.viewModel.aggregatedFeaturesEnabled=!1}} .messageOverrides=${{back:l}} .loading=${this._aggregatedFeaturesLoading} @calciteFlowItemClose=${this._handleClose}><arcgis-aggregated-features .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .feature=${s??void 0} .flowItems=${this.flowItems} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map??void 0} .messageOverrides=${this.messageOverrides} .messages=${i} @arcgisPropertyChange=${this._handleAggregatedFeaturesPropertyChange} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference??void 0} .timeZone=${this.timeZone??void 0} .view=${this.view??void 0} ${m(this._aggregatedFeaturesComponent)}></arcgis-aggregated-features><calcite-button appearance=transparent @click=${()=>this.viewModel.aggregatedFeaturesEnabled=!1} slot=footer-start scale=s width=full .label=${l} title=${l??c}>${i.back}</calcite-button></calcite-flow-item>`:null}_renderActionBar(){let e=this.viewModel.selectedFeatureItem?.isFeatureFromTable,t=this.viewModel.allActions.toArray(),a=e&&!this.location?t.filter(n=>n.id!==this._zoomToFeature.id):t,i=!!a.length||this._hasActionsStartSlotContent||this._hasActionsEndSlotContent,s=this._isCollapsed||this.hideActionBar||!i;return o`<calcite-action-bar expand-toggle-disabled .expanded=${!this._hideActionText} scale=s slot=${(s?void 0:"action-bar")??c} .hidden=${s}><slot name=actions-start @slotchange=${this._handleActionsStartSlotChange}></slot><calcite-action-group overlay-positioning=fixed scale=s ${m(this._actionBarMenuNode)}>${this._renderActions(a)}</calcite-action-group><slot name=actions-end @slotchange=${this._handleActionsEndSlotChange}></slot></calcite-action-bar>`}_renderActions(e){return e.map(t=>{let a=this._getActionTitle(t),i=this._getActionLabel(t);return o`<calcite-action .active=${t.type==="toggle"?t.value:!1} .disabled=${t.disabled} .icon=${t.icon??void 0} .loading=${t.active} scale=s .textEnabled=${!this._hideActionText} .text=${a??""} .label=${i??a} title=${i??a??c} .hidden=${!t.visible} @click=${()=>this._triggerAction(t)}></calcite-action>`})}_renderContent(){let{content:e,selectedFeatureItem:t}=this.viewModel;return t?o`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${this.flowItems} .graphic=${t.graphic} .headingLevel=${this.headingLevel+1} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} hide-heading .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .showRelationshipContent=${!this.hideRelationshipContent} .showUtilityNetworkContent=${!this.hideUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} ${m(this._selectedFeatureComponent)}></arcgis-feature-next>`:typeof e=="string"?L(e,o`<div .innerHTML=${b.sanitize(e)??""}></div>`):e??null}};P("arcgis-features-next",O);return O},"support/actions/ActionButton","core/Collection","popup/FeatureContentCollection","applications/Components/featureUtils","applications/Components/sanitizerUtils","applications/Components/stringUtils","intl","core/reactiveUtils",a,b,d,e,f,g,h,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./LBJMKYT2.js";import"./HH4T6PVP.js";import"./Y5Q3Q4GW.js";import"./MRC7R44N.js";import{S as o}from"./3EYHGXI5.js";import"./CDGKQKVU.js";import"./W6X34YBZ.js";import"./H6RQVSYM.js";var t=["#2888B8","#EB7028","#48A375","#9370B1","#e55035","#3d9ccc","#DC7B04","#b87bb0","#3fa681","#EE6386"],c=t.map(r=>o(r));export{c as esriChartColorSet};
2
+ import"./KM2GXXBO.js";import"./QMQV37ML.js";import"./GIOUZTHM.js";import"./TZHXSIXK.js";import{S as o}from"./PLTLRYBF.js";import"./T2DT5I33.js";import"./6NWR2Z4F.js";import"./H6RQVSYM.js";var t=["#2888B8","#EB7028","#48A375","#9370B1","#e55035","#3d9ccc","#DC7B04","#b87bb0","#3fa681","#EE6386"],c=t.map(r=>o(r));export{c as esriChartColorSet};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as G}from"./5JADSW57.js";import{h as D}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import{b as w}from"./XURWCCLX.js";import{N as u,O as $,V as b,a as f,b as r,n as c,o as p,q as v,w as d}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([C,{a:k}])=>{var n=["arcgis-utility-network-trace-aggregated-geometry-result-item","arcgis-utility-network-trace-elements-result-item","arcgis-utility-network-trace-functions-result-item"],E=n.join(", ");function g(a){return a.localName==="arcgis-utility-network-trace-aggregated-geometry-result-item"}function o(a){return a.localName==="arcgis-utility-network-trace-elements-result-item"}function m(a){return a.localName==="arcgis-utility-network-trace-functions-result-item"}var A=f`:host{height:100%}slot:not([hidden]),.default-result-items{display:flex;flex-direction:column;gap:var(--calcite-spacing-md)}.results-block{min-height:100%;margin-top:0;margin-bottom:0}.no-selectable-results{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-md)}.no-results-landing calcite-icon{margin-bottom:var(--calcite-spacing-sm);--calcite-icon-color: var(--calcite-color-text-3)}.no-results-landing .no-results-heading{font-size:var(--calcite-font-size-2)}.no-results-landing .no-results-description{color:var(--calcite-color-text-3)}`,x=["hideGraphics","traceResult","view"],I=["actions","autoDestroyDisabled","hideActionBar","hideFeatureResults","hidePlaceholder","includeDefaultActionsDisabled","layers","messageOverrides","referenceElement","traceResult","utilityNetwork","view"],P=["traceResult"],y={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935,pathNotFound:-2147208444},R=class extends ${constructor(){super(...arguments),this._messages=G({blocking:!0}),this.#e=new Set,this.#s=new Map,this._slottedResultItems=[],this.aggregatedGeometryGraphicsColor=new C([255,255,0,.6]),this.autoDestroyDisabled=!1,this.disableHighlightFeatureResults=!1,this.expandable=!1,this.expanded=!1,this.hideActionBar=!1,this.hideGraphics=!1,this.hidePlaceholder=!1,this.hideFeatureResults=!1,this.includeDefaultActionsDisabled=!1,this.layers=[],this.state="ready",this.arcgisPropertyChange=D()("aggregatedGeometryGraphicsColor","hideGraphics","state","traceError"),this.arcgisResultsReady=d(),this.arcgisTraceResultClear=d(),this.arcgisTriggerAction=d()}static{this.properties={_slottedResultItems:16,actions:0,aggregatedGeometryGraphicsColor:0,autoDestroyDisabled:5,disableHighlightFeatureResults:5,expandable:5,expanded:5,heading:1,hideActionBar:5,hideGraphics:5,hidePlaceholder:5,hideFeatureResults:5,includeDefaultActionsDisabled:5,layers:0,messageOverrides:0,numFeatureResults:32,referenceElement:1,state:32,traceError:0,traceResult:0,traceResultFeatures:32,utilityNetwork:0,view:0}}static{this.styles=A}#l;#t;#o;#e;#s;get#n(){return Array.from(this.el.childNodes).some(t=>t.nodeType===Node.TEXT_NODE?!!t.textContent?.trim():t instanceof Element&&!t.slot)}get#v(){return this.traceResult?this.#n?this.#_():this.#F(this.traceResult):[]}get#i(){return!!this.traceResult&&!this.traceError&&this.#h}get#c(){if(!this.traceResult||!this.#h||!this._slottedResultItems.length)return!1;let{aggregatedGeometry:t,elements:s,globalFunctionResults:e}=this.traceResult;return this._slottedResultItems.some(i=>t!=null&&g(i)||s.length>0&&o(i)||e.length>0&&m(i))}get#h(){if(!this.traceResult)return!1;let{elements:t,globalFunctionResults:s,aggregatedGeometry:e}=this.traceResult;return!!(t.length||s.length||e)}get numFeatureResults(){return this.#t?this.#t.numResults:this._slottedResultItems.find(t=>o(t))?.numResults??0}get traceResultFeatures(){return this.#t?this.#t.features:this._slottedResultItems.find(t=>o(t))?.features??[]}clearResults(){this.#d(),this.arcgisTraceResultClear.emit()}async destroy(){let t=await Promise.allSettled([...this._slottedResultItems.map(s=>s.destroy()),this.#l?.destroy(),this.#t?.destroy(),this.#o?.destroy()]);for(let s of t)s.status==="rejected"&&k(s.reason,this,"Error while destroying trace result item");await this.manager.destroy()}load(){this.manager.onLifecycle(()=>{for(let t of this._slottedResultItems)this.#m(t);return()=>{for(let t of this.#s.keys())this.#y(t)}}),this.traceResult&&(this.view||p("warn",this,v("view")))}willUpdate(t){t.has("view")&&this.#E(),t.has("traceResult")&&(this.#d(),this.#i&&this.#g(this.#v)),this.#i&&this._slottedResultItems.length&&(this.#D(t),this.#k(t),this.#G(t))}#d(){this.#l?.clearResult(),this.#t?.clearResult(),this.#o?.clearResult(),this._slottedResultItems.forEach(t=>t.clearResult()),this.#e.clear(),c(()=>this.state="ready")}#$(t){t&&(this.#l=t)}#b(t){t&&(this.#t=t)}#w(t){t&&(this.#o=t)}#D(t){let s=this._slottedResultItems.filter(e=>g(e));x.filter(e=>t.has(e)).forEach(e=>{s.forEach(i=>this.#f(i,e,this[e]))}),t.has("aggregatedGeometryGraphicsColor")&&s.forEach(e=>this.#f(e,"graphicsColor",this.aggregatedGeometryGraphicsColor))}#k(t){let s=this._slottedResultItems.filter(e=>o(e));I.filter(e=>t.has(e)).forEach(e=>{s.forEach(i=>this.#p(i,e,this[e]))}),t.has("disableHighlightFeatureResults")&&s.forEach(e=>this.#p(e,"disableHighlight",this.disableHighlightFeatureResults))}#G(t){let s=this._slottedResultItems.filter(e=>m(e));P.filter(e=>t.has(e)).forEach(e=>{s.forEach(i=>this.#a(i,e,this[e]))}),t.has("heading")&&s.forEach(e=>this.#a(e,"heading",this._messages.headings.functions))}async#E(){let{view:t}=this;if(t){await t.when();for(let s of this._slottedResultItems)this.#R(s)}}#F(t){let{elements:s,globalFunctionResults:e,aggregatedGeometry:i}=t,[l,F,_]=n,h=[];return i!=null&&h.push(l),s!=null&&h.push(F),e.length>0&&h.push(_),h}#_(){return Array.from(this.el.children).filter(t=>t.matches(E))}#C(t){let{detail:s}=t;s.name==="isFeaturesListShown"&&this.requestUpdate()}#A(t){t.stopPropagation(),this.arcgisTriggerAction.emit(t.detail)}#x(t){let{detail:s,target:e}=t;s.name==="hideGraphics"?(t.stopPropagation(),this.hideGraphics=e[s.name]):s.name==="graphicsColor"&&(t.stopPropagation(),this.aggregatedGeometryGraphicsColor=e[s.name])}#I(){this.#r(n[0])}#P(){this.#r(n[1])}#N(){this.#r(n[2])}#u(){c(()=>this.state="ready"),this.arcgisResultsReady.emit()}#g(t){this.#e=new Set(t),this.#e.size===0?this.#u():c(()=>this.state="loading")}#m(t){if(this.#s.has(t))return;let s=({target:e})=>this.#r(e);this.#s.set(t,s),t.addEventListener("arcgisResultReady",s)}#y(t){let s=this.#s.get(t);s&&(t.removeEventListener("arcgisResultReady",s),this.#s.delete(t))}#H(t){let s=w(t,E);for(let e of this.#s.keys())s.includes(e)||(this.#y(e),this.#e.delete(e));this._slottedResultItems=s,this.#i&&this.#g(s);for(let e of this._slottedResultItems)this.#m(e),this.#R(e)}#r(t){this.#e.delete(t),this.state==="loading"&&this.#e.size===0&&this.#u()}#R(t){g(t)?this.#T(t):o(t)?this.#O(t):m(t)&&this.#B(t)}#f(t,s,e){t[s]=e}#T(t){let s={autoDestroyDisabled:this.autoDestroyDisabled,graphicsColor:this.aggregatedGeometryGraphicsColor,hideGraphics:this.hideGraphics,traceResult:this.traceResult,view:this.view};Object.assign(t,s)}#p(t,s,e){t[s]=e}#O(t){let s={actions:this.actions,autoDestroyDisabled:this.autoDestroyDisabled,disableHighlight:this.disableHighlightFeatureResults,hideActionBar:this.hideActionBar,hideFeatureResults:this.hideFeatureResults,hidePlaceholder:this.hidePlaceholder,includeDefaultActionsDisabled:this.includeDefaultActionsDisabled,layers:this.layers,messageOverrides:this.messageOverrides,referenceElement:this.referenceElement,traceResult:this.traceResult,utilityNetwork:this.utilityNetwork,view:this.view};Object.assign(t,s)}#a(t,s,e){t[s]=e}#B(t){let s={heading:this._messages.headings.functions,traceResult:this.traceResult};this.#a(t,"heading",s.heading),this.#a(t,"traceResult",s.traceResult)}render(){let{traceError:t,traceResult:s}=this,e,i=!this.#i||!this.#n||!this.#c,l=r`<slot .hidden=${i} @slotchange=${this.#H}></slot>`;return t?e=this.#j(t):s?this.#h?this.#n?this.#c||(e=this.#L()):e=this.#z(s):e=this.#M():e=this.#V(),r`<calcite-block class="results-block" .description=${this.heading} .expandable=${this.expandable} .expanded=${this.expanded} .heading=${this._messages.headings.traceResultsGeneric} .label=${this._messages.headings.traceResultsGeneric} .loading=${this.state==="loading"}>${l}${e}</calcite-block>`}#z(t){let s=this.#t?.isFeaturesListShown,{elements:e,globalFunctionResults:i,aggregatedGeometry:l}=t;return r`<div class="default-result-items">${l!=null?r`<arcgis-utility-network-trace-aggregated-geometry-result-item auto-destroy-disabled .graphicsColor=${this.aggregatedGeometryGraphicsColor} .hideGraphics=${this.hideGraphics} .hidden=${s} .traceResult=${t} .view=${this.view} @arcgisPropertyChange=${this.#x} @arcgisResultReady=${this.#I} ${u(this.#$)}></arcgis-utility-network-trace-aggregated-geometry-result-item>${!e.length&&!s?this.#S():null}`:null}${e!=null?r`<arcgis-utility-network-trace-elements-result-item .actions=${this.actions} auto-destroy-disabled .disableHighlight=${this.disableHighlightFeatureResults} .hideActionBar=${this.hideActionBar} .hideFeatureResults=${this.hideFeatureResults} .hidePlaceholder=${this.hidePlaceholder} .hidden=${!e.length} .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} .layers=${this.layers} .messageOverrides=${this.messageOverrides} .referenceElement=${this.referenceElement} .traceResult=${t} .utilityNetwork=${this.utilityNetwork} .view=${this.view} @arcgisPropertyChange=${this.#C} @arcgisResultReady=${this.#P} @arcgisTriggerAction=${this.#A} ${u(this.#b)}></arcgis-utility-network-trace-elements-result-item>`:null}${i.length>0?r`<arcgis-utility-network-trace-functions-result-item .heading=${this._messages.headings.functions} .hidden=${s} .traceResult=${t} @arcgisResultReady=${this.#N} ${u(this.#w)}></arcgis-utility-network-trace-functions-result-item>`:null}</div>`}#L(){return r`<div class="no-selectable-results">${this._messages.noMatchingResultItems}</div>`}#S(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}#j(t){let{_messages:s}=this,e=t.message;switch(t.details?.raw?.extendedCode){case y.dirtyAreasDiscovered:e=s.traceErrors.dirtyAreasDiscovered;break;case y.noValidControllers:e=s.traceErrors.noValidControllers;break;case y.pathNotFound:e=s.traceErrors.pathNotFound;break}return r`<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${s.traceFailedHeading}</div><div class="no-results-description">${s.traceFailedDescription}</div><div class="no-results-description">${e}</div></div>`}#M(){let{_messages:t}=this;return r`<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.noResultsHeading}</div><div class="no-results-description">${t.noResultsDescription}</div></div>`}#V(){let{_messages:t}=this;return r`<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${t.noTraceConfigHeading}</div><div class="no-results-description">${t.noTraceConfigDescription}</div></div>`}};b("arcgis-utility-network-trace-results",R);return R},"Color",a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as k}from"./XEK22IDA.js";import{a as C}from"./UNPUCYYB.js";import b from"./C2HB2U6P.js";import a from"./CONE7FEI.js";import"./VJVKFKSG.js";import{a as I}from"./5JADSW57.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as L,T as F,V as N,a as $,b as p}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:v,findUtilityNetwork:x,getOrCreateMapValue:P},{stripHTML:S},f,{ignoreAbortErrors:M},{watch:T},U,Q,B,O,,{c:E,g:A}])=>{var G=$`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,D=100,j={assetGroup:"assetgroup",assetType:"assettype"},V="{00000000-0000-0000-0000-000000000000}",q=class extends L{constructor(){super(...arguments),this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._messages=I({name:"utility-network-associations",blocking:!0}),this._messagesFeature=I({name:"feature",blocking:!0}),this._networkSourceIdsInUse=new Set,this._query=async e=>{if(!e)return;await this._loadUtilityNetworks();let{_queryAbortController:t}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(e,{signal:t?.signal})},this._queryController=async e=>{this._cancelQuery();let t=new AbortController;this._queryAbortController=t,await M(this._query(e)),this._queryAbortController===t&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await M(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=k(this._queryController,D),this._queryFeatureCountDebounced=k(this._queryFeatureCountController,D),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=v(),this._associationViewModels=v(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.useFeatureNextFlowItem=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,useFeatureNextFlowItem:5,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messageOverrides:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=G}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:e,map:t}=this;if(!e?.loaded||!t)return null;let s=A(e)?e.parent:e;return x(t,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:e,_canQuery:t,_featureCount:s,_loaded:i,_queryAbortController:a,_queryFeatureCountAbortController:r,_queryPageAbortController:o,associationTypes:l}=this;return r||e&&!i?"loading":a||o?"querying":!this._globalId||!l||!t||!s?"disabled":"ready"}get heading(){return this._heading}set heading(e){this._heading=e}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[T(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),T(()=>this._activeAssociationType,e=>{this._queryDebounced(e)}),T(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(e){let t=this.useFeatureNextFlowItem?F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(e)} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`):F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(e)} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`);this._addFlowItem(t)}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(e=>e.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(e,t){return e.title.localeCompare(t.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(e,t,s,i,a){let r=this._getFeatureQueryWhereClause(e,t,s,i),o=e.createQuery();return o.where=r,o.outFields=["*"],o.returnGeometry=!1,await e.queryFeatureCount(o,{signal:a?.signal})}async _countAssociatedFeatures(e,t,s,i,a){if(!t.length)return 0;let r=await this._findLayersBySourceId(e);await this._loadLayers(r);let o=r.map(l=>this._countAssociatedFeatureCount(l,t,s,i,a));return(await Promise.all(o)).reduce((l,c)=>l+c,0)}async _createAssociationFeatureObjects(e,t,s,i,a){if(!e.length)return[];let r=new Map,o=Array.from(t.entries()).map(async([c,d])=>{let u=await this._findLayersBySourceId(c);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,i,a));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=r.get(y)??[];w.push(n),r.set(y,w)}})})});await Promise.all(o);let l=[];return await Promise.all(e.toArray().map(async c=>{let{fromNetworkElement:d,toNetworkElement:u}=c,h=d.globalId===this._globalId?u:d,m=r.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:c,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(e=>e.destroyAll())}_equals(e,t){if(e.globalId===V&&t.globalId===V){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},i=e.fromNetworkElement,a=e.toNetworkElement,r=t.fromNetworkElement,o=t.toNetworkElement,l=s(i,r),c=s(a,o);return l&&c&&e.associationType===t.associationType}return e.globalId!=null&&t.globalId!=null&&e.globalId===t.globalId}async _findLayersBySourceId(e){let{_utilityNetwork:t,map:s}=this;t?.loaded||await t?.load();let i=t.getLayerIdBySourceId(e),a=s.allLayers.filter(o=>!!t?.isUtilityLayer(o)&&o.layerId===i),r=s.allTables.filter(o=>!!t?.isUtilityLayer(o)&&o.layerId===i);return a.concat(r).toArray()}_getAssociationsByType(e){switch(e){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(e){let{_messages:t}=this;if(e.title)return e.title;switch(e.type){case"attachment":return t.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return t.associationsConnectivity??this.messages?.noTitle??"";case"structure":return t.associationsStructure??this.messages?.noTitle??"";case"content":return t.associationsContents??this.messages?.noTitle??"";case"container":return t.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(e){switch(e){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(e,t,s,i){let a=e.globalIdField,r=e.fieldsIndex.get(j.assetGroup),o=e.fieldsIndex.get(j.assetType),l=s!=null,c=i!=null,d=a?U.sqlIn(a,t):null,u=l?`(${r?.name} = ${s})`:null,h=l&&c?`(${o?.name} = ${i})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(e){let t=e.attributes,s=e.sourceLayer;if(!t||!s)return"";let i="displayField"in s?s.displayField:null,a=i!=null?t[i.toString()]:null,r=a!=null?a.toString():null,o=e.getObjectId()?.toString();return r||o||""}_getParentFeatureDescription(){let{parentFeatureViewModel:e}=this;if(e){if("heading"in e)return e.heading;if("title"in e)return e.title}}async _loadUtilityNetworks(){let e=this.map;if(!e)return;e.utilityNetworks&&await Promise.allSettled(e.utilityNetworks.map(s=>s.load()));let t=this._utilityNetwork;if(t){let s=i=>{if("layerId"in i&&t.isUtilityLayer(i)){let a=i.layerId!=null?t.getSourceIdByLayerId(i.layerId):null;a!=null&&this._networkSourceIdsInUse.add(a)}};this._networkSourceIdsInUse=new Set,e.allLayers.forEach(s),e.allTables.forEach(s)}}async _loadLayers(e){let t=e.filter(s=>!s.loaded).map(s=>s.load());t.length&&await Promise.allSettled(t)}_matchesGlobalFeature(e,t){return this._equals(e.association,t.association)}async _queryAssociatedFeatures(e,t){let{layer:s,_globalId:i,associationTypes:a,_utilityNetwork:r,_canQuery:o,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),r?.load()]),!o||!s||!a||!r)return;let c=this._getAssociationsByType(e.type),{associatedAssetGroup:d,associatedAssetType:u}=e,h=new Map;c.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===i?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(c,h,d,u,t);this._parseFeatureObjects(m,l)}async _queryAssociations(e){let{layer:t,_globalId:s,associationTypes:i,_utilityNetwork:a,_canQuery:r}=this;if(await Promise.allSettled([t?.load(),a?.load()]),this._clearAssociations(),!r||!t||!i||!a||!s)return;let o=A(t)?t.parent:t,l=new Q({globalId:s,networkSourceId:a.getSourceIdByLayerId(o.layerId)}),c=new Set;i.forEach(n=>{switch(n.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity");break}});let d=await a?.queryAssociations(new B({elements:[l],types:Array.from(c)}),{signal:e?.signal}),u=new Map,h=new Map;i.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=i.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,e):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtilityNetworks();let{_queryFeatureCountAbortController:e,_canQuery:t}=this;if(!t){this._featureCount=0;return}await this._queryAssociations(e),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(e,t,s,i,a){let r=this._getFeatureQueryWhereClause(e,t,s,i),o=e.createQuery();o.where=r,o.outFields=["*"],o.returnGeometry=!1,o.cacheHint=this._supportsCacheHint;let{features:l}=await E(e,o,a);return l}_parseFeatureObjects(e,t){let s=v();e.forEach(i=>{let a=(i?.feature).sourceLayer;P(s,a,()=>new f).add(i)});for(let[i,a]of s)this._sortFeatureObjectsByTitle(a),t.set(i,a)}_selectAssociationType(e){let{flowItems:t}=this;t&&(this._activeAssociationType=e,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(e))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((a,r)=>{let o=this._associationFeatures.get(r);o?a.forEach(l=>{o.find(c=>this._matchesGlobalFeature(l,c))||(a.remove(l),a.length||this._associationViewModels.delete(r))}):(a.removeAll(),this._associationViewModels.delete(r))});let{map:e,view:t,spatialReference:s,timeZone:i}=this;this._associationFeatures.forEach((a,r)=>{let o=this._associationViewModels.get(r)||new f;a?.filter(Boolean).forEach((l,c)=>{if(!o.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;o.add({title:m,association:d,featureViewModel:new O({abilities:{utilityNetworkAssociationsContent:!1},map:e,view:t,spatialReference:s,timeZone:i,graphic:u}),terminalName:h},c)}}),this._associationViewModels.set(r,o)})}_shouldDiscardNetworkElement(e,t,s){if(!e)return!1;let{networkSourceId:i}=e,a=s.get(t)?.associatedNetworkSourceId,r=this._networkSourceIdsInUse.has(i);return a!=null&&a!==i||!r}_sortFeatureObjectsByTitle(e){e.sort(this._compareByFeatureTitle)}render(){let{_state:e}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this._messages.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(e){return this._getFeatureCountForAssociationType(e.type)>0?this._renderAssociationTypeListItem(e):null}_renderAssociationTypeListItem(e){let t=this._getAssociationTypeTitle(e);return C(`association-type-${e.type}`,p`<calcite-list-item .description=${S(e.description)} .label=${S(t)} .value=${e.type} @calciteListItemSelect=${()=>this._selectAssociationType(e)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:e,associationTypes:t}=this,s=this._messages.associationsList??this._messagesFeature.noTitle??"";return C("list-container",p`<div class="list-container">${e==="ready"?p`<div><calcite-list display-mode=flat .label=${s}>${t.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};N("arcgis-feature-utility-network-associations",q);return q},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","popup/FeatureContent",a,b)
2
+ import{a as k}from"./XEK22IDA.js";import{a as C}from"./UNPUCYYB.js";import b from"./TMJX7DFH.js";import a from"./YG4HDEP3.js";import"./VJVKFKSG.js";import{a as I}from"./5JADSW57.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as L,T as F,V as N,a as $,b as p}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createReactiveMap:v,findUtilityNetwork:x,getOrCreateMapValue:P},{stripHTML:S},f,{ignoreAbortErrors:M},{watch:T},U,Q,B,O,,{d:E,h:A}])=>{var G=$`.list-container{min-height:var(--calcite-spacing-xxxl)}.loading-container{display:flex;justify-content:center;padding:var(--calcite-spacing-md) 0;width:100%}.sticky-loading-container{display:flex;position:sticky;bottom:var(--calcite-spacing-sm);align-items:center;justify-content:center;z-index:2;margin:0;padding:0;height:var(--calcite-spacing-xxxl);pointer-events:none;height:500px}`,D=100,j={assetGroup:"assetgroup",assetType:"assettype"},V="{00000000-0000-0000-0000-000000000000}",q=class extends L{constructor(){super(...arguments),this._addFlowItem=e=>{e&&this.flowItems?.push(e)},this._attachmentAssociations=new f,this._attachmentFeatureCount=0,this._cancelQuery=()=>{let{_queryAbortController:e}=this;e&&e.abort(),this._queryAbortController=null},this._cancelQueryFeatureCount=()=>{let{_queryFeatureCountAbortController:e}=this;e&&e.abort(),this._queryFeatureCountAbortController=null},this._connectivityAssociations=new f,this._connectivityFeatureCount=0,this._containerAssociations=new f,this._containerFeatureCount=0,this._contentAssociations=new f,this._contentFeatureCount=0,this._messages=I({name:"utility-network-associations",blocking:!0}),this._messagesFeature=I({name:"feature",blocking:!0}),this._networkSourceIdsInUse=new Set,this._query=async e=>{if(!e)return;await this._loadUtilityNetworks();let{_queryAbortController:t}=this;this._destroyAssociatedFeatureViewModels(),this._clearFeatures(),this._featureCount&&await this._queryAssociatedFeatures(e,{signal:t?.signal})},this._queryController=async e=>{this._cancelQuery();let t=new AbortController;this._queryAbortController=t,await M(this._query(e)),this._queryAbortController===t&&(this._queryAbortController=null)},this._queryFeatureCountController=async()=>{this._loaded=!1,this._cancelQueryFeatureCount();let e=new AbortController;this._queryFeatureCountAbortController=e,await M(this._queryFeatureCount()),this._queryFeatureCountAbortController===e&&(this._queryFeatureCountAbortController=null),this._loaded=!0},this._queryDebounced=k(this._queryController,D),this._queryFeatureCountDebounced=k(this._queryFeatureCountController,D),this._structureAssociations=new f,this._structureFeatureCount=0,this._queryAssociationType=async()=>{this._activeAssociationType&&this._queryDebounced(this._activeAssociationType)},this._associationFeatures=v(),this._associationViewModels=v(),this._featureCount=0,this._loaded=!1,this._queryAbortController=null,this._queryFeatureCountAbortController=null,this._queryPageAbortController=null,this.associationTypes=null,this.autoDestroyDisabled=!1,this.useFeatureNextFlowItem=!1,this.flowType="feature-utility-network-associations",this.headingLevel=2,this.source="popup"}static{this.properties={_activeAssociationType:16,_associationFeatures:16,_associationViewModels:16,_canLoad:16,_canQuery:16,_featureCount:16,_loaded:16,_queryAbortController:16,_queryFeatureCountAbortController:16,_queryPageAbortController:16,_state:16,associationTypes:0,autoDestroyDisabled:5,description:1,flowItems:0,useFeatureNextFlowItem:5,flowType:1,graphic:0,heading:1,headingLevel:9,layer:0,map:0,messageOverrides:0,messages:0,parentFeatureViewModel:0,referenceElement:1,source:1,spatialReference:0,timeZone:1,view:0}}static{this.styles=G}get _globalId(){return(this._globalIdField&&this.graphic?.attributes?.[this._globalIdField])??null}get _globalIdField(){return this.layer?.globalIdField}get _objectId(){return(this._objectIdField&&this.graphic?.attributes?.[this._objectIdField])??null}get _objectIdField(){return this.layer?.objectIdField}get _supportsCacheHint(){return!!this.layer?.capabilities?.queryRelated?.supportsCacheHint}get _utilityNetwork(){let{layer:e,map:t}=this;if(!e?.loaded||!t)return null;let s=A(e)?e.parent:e;return x(t,s)}get _canLoad(){return!!this.map}get _canQuery(){return!!this.layer?.capabilities?.query?.supportsPagination}get _state(){let{_canLoad:e,_canQuery:t,_featureCount:s,_loaded:i,_queryAbortController:a,_queryFeatureCountAbortController:r,_queryPageAbortController:o,associationTypes:l}=this;return r||e&&!i?"loading":a||o?"querying":!this._globalId||!l||!t||!s?"disabled":"ready"}get heading(){return this._heading}set heading(e){this._heading=e}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[T(()=>[this.graphic,this.layer,this.map,this.associationTypes,this._canQuery,this._objectId,this._globalId],()=>{this._queryFeatureCountDebounced(),this._queryAssociationType()},{initial:!0}),T(()=>this._activeAssociationType,e=>{this._queryDebounced(e)}),T(()=>this._associationFeatures.values(),()=>{this._setUpUtilityNetworkAssociationsViewModels()})]),this.manager.onDestroy(()=>{this._cancelQuery(),this._cancelQueryFeatureCount()})}_addAssociationTypeFlowItem(e){let t=this.useFeatureNextFlowItem?F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(e)} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} use-feature-next-flow-item .view=${this.view}></arcgis-feature-utility-network-association-list>`):F(p`<arcgis-feature-utility-network-association-list .autoDestroyDisabled=${this.autoDestroyDisabled} .associationViewModels=${this._associationViewModels} .description=${this._getParentFeatureDescription()} .flowItems=${this.flowItems} .flowType=${this.flowType} .heading=${this._getAssociationTypeTitle(e)} .map=${this.map} .messageOverrides=${this.messageOverrides} .parentFeatureViewModel=${this.parentFeatureViewModel} .referenceElement=${this.referenceElement} .state=${this._state} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${this.view}></arcgis-feature-utility-network-association-list>`);this._addFlowItem(t)}_clearAssociations(){this._attachmentAssociations.removeAll(),this._connectivityAssociations.removeAll(),this._containerAssociations.removeAll(),this._contentAssociations.removeAll(),this._structureAssociations.removeAll()}_clearFeatures(){this._associationFeatures.forEach(e=>e.removeAll()),this._associationFeatures.clear()}_compareByFeatureTitle(e,t){return e.title.localeCompare(t.title,void 0,{numeric:!0})}async _countAssociatedFeatureCount(e,t,s,i,a){let r=this._getFeatureQueryWhereClause(e,t,s,i),o=e.createQuery();return o.where=r,o.outFields=["*"],o.returnGeometry=!1,await e.queryFeatureCount(o,{signal:a?.signal})}async _countAssociatedFeatures(e,t,s,i,a){if(!t.length)return 0;let r=await this._findLayersBySourceId(e);await this._loadLayers(r);let o=r.map(l=>this._countAssociatedFeatureCount(l,t,s,i,a));return(await Promise.all(o)).reduce((l,c)=>l+c,0)}async _createAssociationFeatureObjects(e,t,s,i,a){if(!e.length)return[];let r=new Map,o=Array.from(t.entries()).map(async([c,d])=>{let u=await this._findLayersBySourceId(c);await this._loadLayers(u);let h=u.map(m=>this._queryLayer(m,d,s,i,a));(await Promise.all(h)).forEach(m=>{m.forEach(n=>{if(this.source==="popup"?n.sourceLayer&&n.getEffectivePopupTemplate():n.sourceLayer){let _=n.layer.globalIdField??"",y=n.getAttribute(_),w=r.get(y)??[];w.push(n),r.set(y,w)}})})});await Promise.all(o);let l=[];return await Promise.all(e.toArray().map(async c=>{let{fromNetworkElement:d,toNetworkElement:u}=c,h=d.globalId===this._globalId?u:d,m=r.get(h.globalId)??[];await Promise.all(m.map(async n=>{let _=this._utilityNetwork?.getTerminalById(h?.terminalId??void 0)?.name,y=await n.sourceLayer.getFeatureTitle(n)||this._getFeatureTitle(n);l.push({title:y,feature:n,association:c,terminalName:_})}))})),l}_destroyAssociatedFeatureViewModels(){this._associationViewModels.forEach(e=>e.destroyAll())}_equals(e,t){if(e.globalId===V&&t.globalId===V){let s=function(d,u){return d.networkSourceId===u.networkSourceId&&d.globalId===u.globalId&&d.terminalId===u.terminalId&&d.firstUnit===u.firstUnit&&d.numUnits===u.numUnits},i=e.fromNetworkElement,a=e.toNetworkElement,r=t.fromNetworkElement,o=t.toNetworkElement,l=s(i,r),c=s(a,o);return l&&c&&e.associationType===t.associationType}return e.globalId!=null&&t.globalId!=null&&e.globalId===t.globalId}async _findLayersBySourceId(e){let{_utilityNetwork:t,map:s}=this;t?.loaded||await t?.load();let i=t.getLayerIdBySourceId(e),a=s.allLayers.filter(o=>!!t?.isUtilityLayer(o)&&o.layerId===i),r=s.allTables.filter(o=>!!t?.isUtilityLayer(o)&&o.layerId===i);return a.concat(r).toArray()}_getAssociationsByType(e){switch(e){case"attachment":return this._attachmentAssociations;case"structure":return this._structureAssociations;case"connectivity":return this._connectivityAssociations;case"container":return this._containerAssociations;case"content":return this._contentAssociations}}_getAssociationTypeTitle(e){let{_messages:t}=this;if(e.title)return e.title;switch(e.type){case"attachment":return t.associationsAttachments??this.messages?.noTitle??"";case"connectivity":return t.associationsConnectivity??this.messages?.noTitle??"";case"structure":return t.associationsStructure??this.messages?.noTitle??"";case"content":return t.associationsContents??this.messages?.noTitle??"";case"container":return t.associationsContainer??this.messages?.noTitle??""}}_getFeatureCountForAssociationType(e){switch(e){case"attachment":return this._attachmentFeatureCount;case"structure":return this._structureFeatureCount;case"content":return this._contentFeatureCount;case"container":return this._containerFeatureCount;case"connectivity":return this._connectivityFeatureCount}}_getFeatureQueryWhereClause(e,t,s,i){let a=e.globalIdField,r=e.fieldsIndex.get(j.assetGroup),o=e.fieldsIndex.get(j.assetType),l=s!=null,c=i!=null,d=a?U.sqlIn(a,t):null,u=l?`(${r?.name} = ${s})`:null,h=l&&c?`(${o?.name} = ${i})`:null;return[d,u,h].filter(Boolean).join(" AND ")}_getFeatureTitle(e){let t=e.attributes,s=e.sourceLayer;if(!t||!s)return"";let i="displayField"in s?s.displayField:null,a=i!=null?t[i.toString()]:null,r=a!=null?a.toString():null,o=e.getObjectId()?.toString();return r||o||""}_getParentFeatureDescription(){let{parentFeatureViewModel:e}=this;if(e){if("heading"in e)return e.heading;if("title"in e)return e.title}}async _loadUtilityNetworks(){let e=this.map;if(!e)return;e.utilityNetworks&&await Promise.allSettled(e.utilityNetworks.map(s=>s.load()));let t=this._utilityNetwork;if(t){let s=i=>{if("layerId"in i&&t.isUtilityLayer(i)){let a=i.layerId!=null?t.getSourceIdByLayerId(i.layerId):null;a!=null&&this._networkSourceIdsInUse.add(a)}};this._networkSourceIdsInUse=new Set,e.allLayers.forEach(s),e.allTables.forEach(s)}}async _loadLayers(e){let t=e.filter(s=>!s.loaded).map(s=>s.load());t.length&&await Promise.allSettled(t)}_matchesGlobalFeature(e,t){return this._equals(e.association,t.association)}async _queryAssociatedFeatures(e,t){let{layer:s,_globalId:i,associationTypes:a,_utilityNetwork:r,_canQuery:o,_associationFeatures:l}=this;if(await Promise.allSettled([s?.load(),r?.load()]),!o||!s||!a||!r)return;let c=this._getAssociationsByType(e.type),{associatedAssetGroup:d,associatedAssetType:u}=e,h=new Map;c.forEach(n=>{let{fromNetworkElement:_,toNetworkElement:y}=n,{networkSourceId:w,elementGlobalId:b}=_.globalId===i?{networkSourceId:y.networkSourceId,elementGlobalId:y.globalId}:{networkSourceId:_.networkSourceId,elementGlobalId:_.globalId},g=h.get(w)||[];g.push(b),h.set(w,g)});let m=await this._createAssociationFeatureObjects(c,h,d,u,t);this._parseFeatureObjects(m,l)}async _queryAssociations(e){let{layer:t,_globalId:s,associationTypes:i,_utilityNetwork:a,_canQuery:r}=this;if(await Promise.allSettled([t?.load(),a?.load()]),this._clearAssociations(),!r||!t||!i||!a||!s)return;let o=A(t)?t.parent:t,l=new Q({globalId:s,networkSourceId:a.getSourceIdByLayerId(o.layerId)}),c=new Set;i.forEach(n=>{switch(n.type){case"attachment":case"structure":c.add("attachment");break;case"container":case"content":c.add("containment");break;case"connectivity":c.add("connectivity"),c.add("junction-junction-connectivity"),c.add("junction-edge-from-connectivity"),c.add("junction-edge-midspan-connectivity"),c.add("junction-edge-to-connectivity");break}});let d=await a?.queryAssociations(new B({elements:[l],types:Array.from(c)}),{signal:e?.signal}),u=new Map,h=new Map;i.forEach(n=>{h.set(n.type,n),u.set(n.type,[])}),d.forEach(n=>{let{toNetworkElement:_,fromNetworkElement:y}=n;switch(n.associationType){case"attachment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"attachment",h))break;u.get("attachment")?.push(_.globalId),this._attachmentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"structure",h))break;u.get("structure")?.push(y.globalId),this._structureAssociations.add(n)}break;case"connectivity":case"junction-edge-from-connectivity":case"junction-edge-midspan-connectivity":case"junction-edge-to-connectivity":case"junction-junction-connectivity":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"connectivity",h))break;u.get("connectivity")?.push(_.globalId)}else{if(this._shouldDiscardNetworkElement(y,"connectivity",h))break;u.get("connectivity")?.push(y.globalId)}this._connectivityAssociations.add(n);break;case"containment":if(y?.globalId===s){if(this._shouldDiscardNetworkElement(_,"content",h))break;u.get("content")?.push(_.globalId),this._contentAssociations.add(n)}else{if(this._shouldDiscardNetworkElement(y,"container",h))break;u.get("container")?.push(y.globalId),this._containerAssociations.add(n)}break}});let m=i.map(async n=>{let{associatedNetworkSourceId:_,associatedAssetGroup:y,associatedAssetType:w}=n,b=u.get(n.type),g=y!=null?await this._countAssociatedFeatures(_,b,y,w,e):b.length;switch(n.type){case"attachment":this._attachmentFeatureCount=g;break;case"connectivity":this._connectivityFeatureCount=g;break;case"container":this._containerFeatureCount=g;break;case"content":this._contentFeatureCount=g;break;case"structure":this._structureFeatureCount=g;break}});await Promise.allSettled(m)}async _queryFeatureCount(){await this._loadUtilityNetworks();let{_queryFeatureCountAbortController:e,_canQuery:t}=this;if(!t){this._featureCount=0;return}await this._queryAssociations(e),this._featureCount=this._attachmentFeatureCount+this._connectivityFeatureCount+this._containerFeatureCount+this._contentFeatureCount+this._structureFeatureCount}async _queryLayer(e,t,s,i,a){let r=this._getFeatureQueryWhereClause(e,t,s,i),o=e.createQuery();o.where=r,o.outFields=["*"],o.returnGeometry=!1,o.cacheHint=this._supportsCacheHint;let{features:l}=await E(e,o,a);return l}_parseFeatureObjects(e,t){let s=v();e.forEach(i=>{let a=(i?.feature).sourceLayer;P(s,a,()=>new f).add(i)});for(let[i,a]of s)this._sortFeatureObjectsByTitle(a),t.set(i,a)}_selectAssociationType(e){let{flowItems:t}=this;t&&(this._activeAssociationType=e,this._setUpUtilityNetworkAssociationsViewModels(),this._addAssociationTypeFlowItem(e))}_setUpUtilityNetworkAssociationsViewModels(){this._associationViewModels.forEach((a,r)=>{let o=this._associationFeatures.get(r);o?a.forEach(l=>{o.find(c=>this._matchesGlobalFeature(l,c))||(a.remove(l),a.length||this._associationViewModels.delete(r))}):(a.removeAll(),this._associationViewModels.delete(r))});let{map:e,view:t,spatialReference:s,timeZone:i}=this;this._associationFeatures.forEach((a,r)=>{let o=this._associationViewModels.get(r)||new f;a?.filter(Boolean).forEach((l,c)=>{if(!o.some(d=>this._matchesGlobalFeature(d,l))){let{association:d,feature:u,terminalName:h,title:m}=l;o.add({title:m,association:d,featureViewModel:new O({abilities:{utilityNetworkAssociationsContent:!1},map:e,view:t,spatialReference:s,timeZone:i,graphic:u}),terminalName:h},c)}}),this._associationViewModels.set(r,o)})}_shouldDiscardNetworkElement(e,t,s){if(!e)return!1;let{networkSourceId:i}=e,a=s.get(t)?.associatedNetworkSourceId,r=this._networkSourceIdsInUse.has(i);return a!=null&&a!==i||!r}_sortFeatureObjectsByTitle(e){e.sort(this._compareByFeatureTitle)}render(){let{_state:e}=this;return p`<div class="root"><arcgis-feature-element-info .heading=${this.heading} .headingLevel=${this.headingLevel} .description=${this.description}></arcgis-feature-element-info>${e==="loading"?this._renderLoading():e==="disabled"?this._renderAssociationNotFound():this._renderContent()}</div>`}_renderAssociationNotFound(){return p`<calcite-notice icon=information kind=info open scale=s width=full><div slot=message>${this._messages.noAssociations}</div></calcite-notice>`}_renderAssociationTypeList(e){return this._getFeatureCountForAssociationType(e.type)>0?this._renderAssociationTypeListItem(e):null}_renderAssociationTypeListItem(e){let t=this._getAssociationTypeTitle(e);return C(`association-type-${e.type}`,p`<calcite-list-item .description=${S(e.description)} .label=${S(t)} .value=${e.type} @calciteListItemSelect=${()=>this._selectAssociationType(e)}><calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon></calcite-list-item>`)}_renderContent(){let{_state:e,associationTypes:t}=this,s=this._messages.associationsList??this._messagesFeature.noTitle??"";return C("list-container",p`<div class="list-container">${e==="ready"?p`<div><calcite-list display-mode=flat .label=${s}>${t.map(i=>this._renderAssociationTypeList(i))}</calcite-list></div>`:null}${this._renderStickyLoading()}</div>`)}_renderLoading(){return p`<div class="loading-container">${this._renderLoadingIcon()}${this._renderStickyLoading()}</div>`}_renderLoadingIcon(){return p`<calcite-loader inline label></calcite-loader>`}_renderStickyLoading(){return this._state==="querying"?p`<div class="sticky-loading-container">${this._renderLoadingIcon()}</div>`:null}};N("arcgis-feature-utility-network-associations",q);return q},"applications/Components/featureUtils","applications/Components/stringUtils","core/Collection","core/promiseUtils","core/reactiveUtils","core/sql","rest/networks/support/NetworkElement","rest/networks/support/QueryAssociationsParameters","popup/FeatureContent",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as P}from"./IZ46HAUJ.js";import h from"./HNMWTX7W.js";import{d as y,k as w}from"./G5VPRDMX.js";import e from"./CONE7FEI.js";import{a as B}from"./VJVKFKSG.js";import d from"./ILBDNJQP.js";import{a as $}from"./5JADSW57.js";import{a as u}from"./JD74LG7K.js";import c from"./4FBTH6YD.js";import b from"./KORK4WZ7.js";import{h as D}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import{a as f}from"./XURWCCLX.js";import{N as k,O as U,Q as v,S as g,V as M,a as C,b as l,w as S}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createChart:F},{signal:A},{ignoreAbortErrors:b},{watch:m},L,{property:a,subclass:I},,,,z,{b:O,d:_},E])=>{var T=C`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function R(t,e,i){let r=await H(t,e);return O(i),Z(r)?r.highlight(e):P()}async function H(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function Z(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function j({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function G({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function q(t){return t?.samples?.some(e=>e.z!=null)??!1}function J(t){return t?.type==="polyline"}var K=Object.defineProperty,N=Object.getOwnPropertyDescriptor,o=(t,e,i,r)=>{for(var n=r>1?void 0:r?N(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(n=(r?d(e,i,n):d(n))||n);return r&&n&&K(e,i,n),n},s=class extends E{constructor(){super(...arguments),this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||q(e)))}get doneButtonAvailable(){if(this.featureIsSelected)return!1;let{geometry:t}=this.analysis;return J(t)&&t.paths.length>0&&t.paths[0].length>2}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!j(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return G(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return w(this._userDistanceUnit,this.analysis.displayUnits?.distance,this.distanceUnitOptions,this.defaultMeasurementSystem)}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return w(this._userElevationUnit,this.analysis.displayUnits?.elevation,this.elevationUnitOptions,this.defaultMeasurementSystem)}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e)},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let r=i?.selectedFeature;e.forEach(n=>{switch(n.type){case"scene":this._excludeSelectedFeatureFromProfile(n,t,r);break;case"input":n.chartOptions.lineVisible=t!=null,n.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){if(this.interactionDisabled)return;let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let r=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=r.feature)},clear:!1});this._selectingPromise=e;try{await b(e)}finally{this._selectingPromise===e&&(this._selectingPromise=void 0)}}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new L}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=_(async i=>await R(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=B(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let r=new Set(t.exclude??[]);i&&r.delete(i),e&&r.add(e),t.exclude=Array.from(r)}};o([a()],s.prototype,"_userDistanceUnit",2);o([a()],s.prototype,"_userDistanceUnitOptions",2);o([a()],s.prototype,"_userElevationUnit",2);o([a()],s.prototype,"_userElevationUnitOptions",2);o([a()],s.prototype,"_selectingPromise",2);o([a()],s.prototype,"_selectedFeature",2);o([a()],s.prototype,"_selectionHighlightTask",2);o([a()],s.prototype,"_hasSamples",1);o([a()],s.prototype,"doneButtonAvailable",1);o([a({readOnly:!0})],s.prototype,"effectiveDisplayUnits",1);o([a({readOnly:!0})],s.prototype,"errorState",1);o([a()],s.prototype,"feature",1);o([a()],s.prototype,"featureIsSelected",1);o([a({readOnly:!0})],s.prototype,"hasVertices",1);o([a()],s.prototype,"highlightDisabled",2);o([a()],s.prototype,"indicatorRelativePosition",1);o([a()],s.prototype,"geometry",1);o([a()],s.prototype,"elevationInfo",1);o([a()],s.prototype,"profiles",1);o([a({readOnly:!0})],s.prototype,"progress",1);o([a({readOnly:!0})],s.prototype,"results",1);o([a({readOnly:!0})],s.prototype,"selectButtonAvailable",1);o([a({readOnly:!0})],s.prototype,"state",1);o([a()],s.prototype,"uniformChartScaling",2);o([a()],s.prototype,"distanceUnit",1);o([a()],s.prototype,"distanceUnitOptions",1);o([a()],s.prototype,"elevationUnit",1);o([a()],s.prototype,"elevationUnitOptions",1);s=o([I("components.elevation-profile.ElevationProfileViewModel")],s);function V(t){let e=t?.filter(i=>y.includes(i));return e&&e.length>0?e:y.slice()}var W=z(s),x=class extends U{constructor(){super(...arguments),this.viewModel=W(this),this._messages=$(),this._chartInitializationTask=A(void 0),this._hideZoomOutButton=!0,this._hasSettingsStartContent=!1,this._hasSettingsEndContent=!1,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideChartGridLines=!1,this.hideChartAxisLabels=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.interactionDisabled=this.viewModel.interactionDisabled,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=D()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","interactionDisabled","progress","state"),this.arcgisReady=S()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,_hasSettingsStartContent:16,_hasSettingsEndContent:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideChartGridLines:5,hideChartAxisLabels:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,interactionDisabled:5,geometry:0,elevationInfo:0,label:1,messageOverrides:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=T}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask.value?.value}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async select(){b(this.viewModel.select())}async start(){b(this.viewModel.start())}async stop(){this.viewModel.stop()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer}),({container:e})=>{this._destroyChart(),e&&(this._chartInitializationTask.value=_(async i=>await F({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:this._messages,signal:i,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,n)=>{this._hideZoomOutButton=r===1&&n===1},onCursorPositionChange:(r,n)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling,hideGridLines:this.hideChartGridLines,hideLabels:this.hideChartAxisLabels}),({chart:e,view:i,analysisView:r,uniformScaling:n})=>{e&&(e.view=i,e.analysisView=r,e.uniformScaling=n,e.hideGridLines=this.hideChartGridLines,e.hideAxisLabels=this.hideChartAxisLabels)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask.value?.abort(),this._chartInitializationTask.value=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=X[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return l`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:r}=this,{selectButtonAvailable:n}=this.viewModel,c=!i&&n,d;return!r&&c?d=e.readyPrompt:r?c?d=e.readyPromptSelectOnly:d=e.errors?.noProfile:d=e.readyPromptCreateOnly,this._renderContent({prompt:d,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let r=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let c=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:r,prompt:c})}let n=this._getErrorMessage();return n?this._renderContent({chart:!1,actions:r,prompt:n}):this._renderContent({chart:!0,actions:r})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,r=i.geometry!=null;return l`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!r,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[l`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return l`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return l`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${k(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",r=e.visible??!0;return l`<calcite-loader class=${v({spinner:!0,small:i,visible:r})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return l`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return l`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .profiles=${this.profiles} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return l`<arcgis-elevation-profile-settings .hasCustomStartContent=${this._hasSettingsStartContent} .hasCustomEndContent=${this._hasSettingsEndContent} .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .messages=${this._messages} .messageOverrides=${this.messageOverrides} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}><slot name=settings-start slot=settings-start @slotchange=${e=>{this._hasSettingsStartContent=f(e)}}></slot><slot name=settings-end slot=settings-end @slotchange=${e=>{this._hasSettingsEndContent=f(e)}}></slot></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,r=e.map(n=>{switch(n.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.sketchButtonLabel,primary:!0,onClick:()=>{this.start()}})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.selectButtonLabel,primary:!1,onClick:()=>{this.select()}})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return r.length?l`<footer class="actions">${r}</footer>`:void 0}_renderAction({action:e,label:i,onClick:r,primary:n}){return l`<calcite-button .appearance=${n?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||this.interactionDisabled&&(e.type==="sketch"||e.type==="select")} @click=${r}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],X={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};M("arcgis-elevation-profile",x);return x},"applications/Components/analysisUtils","applications/Components/reactiveUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,b,c,d,e,h)
2
+ import{a as P}from"./IZ46HAUJ.js";import h from"./BEZWJEYM.js";import{d as y,k as w}from"./G5VPRDMX.js";import e from"./YG4HDEP3.js";import{a as B}from"./VJVKFKSG.js";import d from"./ILBDNJQP.js";import{a as $}from"./5JADSW57.js";import{a as u}from"./JD74LG7K.js";import c from"./4FBTH6YD.js";import b from"./KORK4WZ7.js";import{h as D}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import{a as f}from"./XURWCCLX.js";import{N as k,O as U,Q as v,S as g,V as M,a as C,b as l,w as S}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([{createChart:F},{signal:A},{ignoreAbortErrors:b},{watch:m},L,{property:a,subclass:I},,,,z,{b:O,d:_},E])=>{var T=C`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}:host{--internal-chart-height: 180px;--internal-gap: var(--calcite-spacing-sm-plus);width:550px;isolation:isolate;position:relative;container-type:inline-size}.root{display:flex;flex-direction:column;width:100%;min-width:0;gap:var(--internal-gap)}.header{display:flex;flex-direction:row;align-items:center;justify-content:flex-end;margin-bottom:calc(var(--internal-gap) * -1)}.actions{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:var(--calcite-spacing-xs)}.action-button{width:auto;min-height:32px}.main-container{display:flex;position:relative;flex-flow:column;width:100%;height:var(--internal-chart-height)}.chart-container{position:relative;width:100%;height:100%}.prompt-container{box-sizing:border-box;display:grid;place-content:center;padding-inline:var(--calcite-spacing-md);height:100%;text-align:center}.prompt-message{margin:0;width:100%}.spinner{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transition:opacity .15s ease-in-out;transition-delay:0;opacity:0;&.visible{transition-delay:50ms;opacity:1}&.small{inset-inline-start:0;inset-block-start:-24px;left:unset;transform:none;color:var(--calcite-color-brand)}}@container (max-width: 400px){.esri-widget--panel{height:auto}.actions{flex-direction:column}.action-button{align-self:stretch}}`;async function R(t,e,i){let r=await H(t,e);return O(i),Z(r)?r.highlight(e):P()}async function H(t,e){let i=e?.layer;if(!(!i||i.type==="subtype-sublayer"||i.type==="sublayer"||i.type==="building-component"))return await t.whenLayerView(i)}function Z(t){return t!=null&&"highlight"in t&&typeof t.highlight=="function"}function j({geometry:t}){return t?.type==="polyline"&&t.paths.length>0&&t.paths.every(e=>e.length>=2)}function G({geometry:t}){return t?.type==="polyline"&&t.paths.reduce((e,i)=>e+i.length,0)>0}function q(t){return t?.samples?.some(e=>e.z!=null)??!1}function J(t){return t?.type==="polyline"}var K=Object.defineProperty,N=Object.getOwnPropertyDescriptor,o=(t,e,i,r)=>{for(var n=r>1?void 0:r?N(e,i):e,c=t.length-1,d;c>=0;c--)(d=t[c])&&(n=(r?d(e,i,n):d(n))||n);return r&&n&&K(e,i,n),n},s=class extends E{constructor(){super(...arguments),this.highlightDisabled=!1,this.uniformChartScaling=!1,this.shouldForceInteractive=!1,this.supportedViewType="both",this.unsupportedErrorMessage=""}get _hasSamples(){let{progress:t}=this;return!!this.analysisView?.results?.some(e=>e.available&&(t<1||q(e)))}get doneButtonAvailable(){if(this.featureIsSelected)return!1;let{geometry:t}=this.analysis;return J(t)&&t.paths.length>0&&t.paths[0].length>2}get effectiveDisplayUnits(){return this.analysisView?.effectiveDisplayUnits}get errorState(){if(!j(this.analysis))return"no-valid-input";let t=this.analysisView?.error;if(t)switch(t.name){case"too-complex":return"too-complex";case"elevation-query-error":return"no-valid-input";default:return"unknown"}return this._hasSamples?"none":"no-available-profiles"}get feature(){return this._selectedFeature}set feature(t){t?t!==this.feature&&(this.analysis.setGeometryFromFeature(t),this._selectedFeature=t):this._selectedFeature=void 0}get featureIsSelected(){return this.feature!=null}get hasVertices(){return G(this.analysis)}get indicatorRelativePosition(){return this.analysisView?.indicatorRelativePosition??void 0}get geometry(){return this.analysis.geometry}set geometry(t){this.analysis.geometry=t}get elevationInfo(){return this.analysis.elevationInfo}set elevationInfo(t){this.analysis.elevationInfo=t}get profiles(){return this.analysis.profiles}set profiles(t){this.analysis.profiles=t}get progress(){return this.analysisView?.progress??0}get results(){return this.analysisView?.results??[]}get selectButtonAvailable(){for(let t of this.view?.map?.allLayers.toArray()??[])if(t.type==="graphics"&&!("internal"in t&&t.internal)&&t.graphics.some(e=>e.geometry?.type==="polyline")||"geometryType"in t&&t.geometryType==="polyline")return!0;return!!this.view?.graphics?.some(t=>t.geometry?.type==="polyline")}get state(){return this.disabled||!this.ready?"disabled":this._selectingPromise?"selecting":this.operationState==="active"?"creating":this.analysis.valid?this.featureIsSelected?"selected":"created":"ready"}get distanceUnit(){return w(this._userDistanceUnit,this.analysis.displayUnits?.distance,this.distanceUnitOptions,this.defaultMeasurementSystem)}set distanceUnit(t){this._userDistanceUnit=t}get distanceUnitOptions(){return V(this._userDistanceUnitOptions)}set distanceUnitOptions(t){this._userDistanceUnitOptions=t}get elevationUnit(){return w(this._userElevationUnit,this.analysis.displayUnits?.elevation,this.elevationUnitOptions,this.defaultMeasurementSystem)}set elevationUnit(t){this._userElevationUnit=t}get elevationUnitOptions(){return V(this._userElevationUnitOptions)}set elevationUnitOptions(t){this._userElevationUnitOptions=t}initialize(){this.addHandles([m(()=>({analysis:this.analysis,unitDistance:this._userDistanceUnit,unitElevation:this._userElevationUnit}),({analysis:t,unitDistance:e,unitElevation:i})=>{i&&(t.displayUnits.elevation=i),e&&(t.displayUnits.distance=e)},{sync:!0,initial:!0}),m(()=>({selectedFeature:this.feature,profiles:this.analysis.profiles.toArray()}),({selectedFeature:t,profiles:e},i)=>{this._highlightSelectedFeature(this.highlightDisabled?void 0:t),this.analysis.viewOptions.geometryVisualizationVisible=!this.highlightDisabled&&t==null;let r=i?.selectedFeature;e.forEach(n=>{switch(n.type){case"scene":this._excludeSelectedFeatureFromProfile(n,t,r);break;case"input":n.chartOptions.lineVisible=t!=null,n.viewOptions.lineVisible=t!=null;break}})},{initial:!0})])}destroy(){this._removeSelectionHighlight()}async select(){if(this.interactionDisabled)return;let t=this.analysisView;if(!t)return;this.clear();let e=super.start({operation:async i=>{let r=await t.pickFeature(i);i?.signal?.aborted||(t.interactive=!1,this.feature=r.feature)},clear:!1});this._selectingPromise=e;try{await b(e)}finally{this._selectingPromise===e&&(this._selectingPromise=void 0)}}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.geometry=null,this.elevationInfo=null,this.feature=void 0}constructAnalysis(){return new L}_highlightSelectedFeature(t){this._removeSelectionHighlight();let e=this.view;!e||!t||(this._selectionHighlightTask=_(async i=>await R(e,t,{signal:i})))}_removeSelectionHighlight(){this._selectionHighlightTask?.value?.remove(),this._selectionHighlightTask=B(this._selectionHighlightTask)}_excludeSelectedFeatureFromProfile(t,e,i){let r=new Set(t.exclude??[]);i&&r.delete(i),e&&r.add(e),t.exclude=Array.from(r)}};o([a()],s.prototype,"_userDistanceUnit",2);o([a()],s.prototype,"_userDistanceUnitOptions",2);o([a()],s.prototype,"_userElevationUnit",2);o([a()],s.prototype,"_userElevationUnitOptions",2);o([a()],s.prototype,"_selectingPromise",2);o([a()],s.prototype,"_selectedFeature",2);o([a()],s.prototype,"_selectionHighlightTask",2);o([a()],s.prototype,"_hasSamples",1);o([a()],s.prototype,"doneButtonAvailable",1);o([a({readOnly:!0})],s.prototype,"effectiveDisplayUnits",1);o([a({readOnly:!0})],s.prototype,"errorState",1);o([a()],s.prototype,"feature",1);o([a()],s.prototype,"featureIsSelected",1);o([a({readOnly:!0})],s.prototype,"hasVertices",1);o([a()],s.prototype,"highlightDisabled",2);o([a()],s.prototype,"indicatorRelativePosition",1);o([a()],s.prototype,"geometry",1);o([a()],s.prototype,"elevationInfo",1);o([a()],s.prototype,"profiles",1);o([a({readOnly:!0})],s.prototype,"progress",1);o([a({readOnly:!0})],s.prototype,"results",1);o([a({readOnly:!0})],s.prototype,"selectButtonAvailable",1);o([a({readOnly:!0})],s.prototype,"state",1);o([a()],s.prototype,"uniformChartScaling",2);o([a()],s.prototype,"distanceUnit",1);o([a()],s.prototype,"distanceUnitOptions",1);o([a()],s.prototype,"elevationUnit",1);o([a()],s.prototype,"elevationUnitOptions",1);s=o([I("components.elevation-profile.ElevationProfileViewModel")],s);function V(t){let e=t?.filter(i=>y.includes(i));return e&&e.length>0?e:y.slice()}var W=z(s),x=class extends U{constructor(){super(...arguments),this.viewModel=W(this),this._messages=$(),this._chartInitializationTask=A(void 0),this._hideZoomOutButton=!0,this._hasSettingsStartContent=!1,this._hasSettingsEndContent=!1,this.analysis=this.viewModel.analysis,this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.effectiveDisplayUnits=this.viewModel.effectiveDisplayUnits,this.feature=this.viewModel.feature,this.hideChart=!1,this.hideChartGridLines=!1,this.hideChartAxisLabels=!1,this.hideClearButton=!1,this.hideLegend=!1,this.hideSelectButton=!1,this.hideSettingsButton=!1,this.hideStartButton=!1,this.hideUniformChartScalingToggle=!1,this.hideDistanceDisplayUnitSelect=!1,this.hideElevationDisplayUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.highlightDisabled=this.viewModel.highlightDisabled,this.icon="altitude",this.indicatorRelativePosition=this.viewModel.indicatorRelativePosition,this.interactionDisabled=this.viewModel.interactionDisabled,this.geometry=this.viewModel.geometry,this.elevationInfo=this.viewModel.elevationInfo,this.profiles=this.viewModel.profiles,this.progress=this.viewModel.progress,this.state=this.viewModel.state,this.uniformChartScaling=this.viewModel.uniformChartScaling,this.distanceUnit=this.viewModel.distanceUnit,this.distanceUnitOptions=this.viewModel.distanceUnitOptions,this.elevationUnit=this.viewModel.elevationUnit,this.elevationUnitOptions=this.viewModel.elevationUnitOptions,this.arcgisPropertyChange=D()("analysis","effectiveDisplayUnits","elevationInfo","feature","geometry","indicatorRelativePosition","interactionDisabled","progress","state"),this.arcgisReady=S()}static{this.properties={_hideZoomOutButton:16,_chartContainer:16,_hasSettingsStartContent:16,_hasSettingsEndContent:16,analysis:0,view:0,autoDestroyDisabled:5,effectiveDisplayUnits:32,feature:0,hideChart:5,hideChartGridLines:5,hideChartAxisLabels:5,hideClearButton:5,hideLegend:5,hideSelectButton:5,hideSettingsButton:5,hideStartButton:5,hideUniformChartScalingToggle:5,hideDistanceDisplayUnitSelect:5,hideElevationDisplayUnitSelect:5,hideVisualization:5,highlightDisabled:5,icon:3,indicatorRelativePosition:40,interactionDisabled:5,geometry:0,elevationInfo:0,label:1,messageOverrides:0,referenceElement:1,profiles:0,progress:40,state:32,uniformChartScaling:5,distanceUnit:1,distanceUnitOptions:0,elevationUnit:1,elevationUnitOptions:0}}static{this.styles=T}get _selectButtonVisible(){return!this.hideSelectButton&&this.viewModel.selectButtonAvailable}get _chart(){return this._chartInitializationTask.value?.value}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async select(){b(this.viewModel.select())}async start(){b(this.viewModel.start())}async stop(){this.viewModel.stop()}load(){this.manager.onLifecycle(()=>[m(()=>({container:this._chartContainer}),({container:e})=>{this._destroyChart(),e&&(this._chartInitializationTask.value=_(async i=>await F({view:this.viewModel.view,analysisView:this.viewModel.analysisView,container:e,messages:this._messages,signal:i,uniformScaling:this.viewModel.uniformChartScaling,onRangeChange:(r,n)=>{this._hideZoomOutButton=r===1&&n===1},onCursorPositionChange:(r,n)=>{let{analysisView:c}=this.viewModel;c&&(c.indicatorRelativePosition=r)}})))},{sync:!0,initial:!0}),m(()=>({chart:this._chart,view:this.viewModel.view,analysisView:this.viewModel.analysisView,uniformScaling:this.viewModel.uniformChartScaling,hideGridLines:this.hideChartGridLines,hideLabels:this.hideChartAxisLabels}),({chart:e,view:i,analysisView:r,uniformScaling:n})=>{e&&(e.view=i,e.analysisView=r,e.uniformScaling=n,e.hideGridLines=this.hideChartGridLines,e.hideAxisLabels=this.hideChartAxisLabels)},{sync:!0,initial:!0}),{remove:()=>this._destroyChart()}])}_destroyChart(){let e=this._chart;this._chartInitializationTask.value?.abort(),this._chartInitializationTask.value=void 0,e?.destroy()}_onCancelButtonClick(){this.viewModel.stop(),this.viewModel.clear()}_onDoneButtonClick(){this.viewModel.stop()}_getErrorMessage(){let e=X[this.viewModel.errorState];return e?this._messages?.errors?.[e]:void 0}_onClearButtonClick(){this.viewModel.clear()}_onZoomOutButtonClick(){this._chart?.zoomOut()}_onChartContainerRef(e){this._chartContainer=e}render(){return l`<div aria-label=${this._messages.componentLabel??g} class=${v({root:!0,[u.widget]:!0,[u.widgetDisabled]:this.viewModel.state==="disabled",[u.panel]:!0})} role=presentation>${this._renderContentForState()}</div>`}_renderContentForState(){switch(this.viewModel.state){case"ready":return this._renderContentForReadyState();case"selecting":return this._renderContentForSelectingState();case"creating":return this._renderContentForCreatingState();case"selected":return this._renderContentForSelectedState();case"created":return this._renderContentForCreatedState();case"disabled":return this._renderContentForReadyState()}}_renderContentForReadyState(){let{_messages:e,hideSelectButton:i,hideStartButton:r}=this,{selectButtonAvailable:n}=this.viewModel,c=!i&&n,d;return!r&&c?d=e.readyPrompt:r?c?d=e.readyPromptSelectOnly:d=e.errors?.noProfile:d=e.readyPromptCreateOnly,this._renderContent({prompt:d,chart:!1,actions:p})}_renderContentForSelectingState(){let{view:e}=this.viewModel;if(!e)return;let i=this._messages[`selectingPrompt-${e.type}`];return this._renderContent({prompt:i,chart:!1,actions:[{type:"select-cancel"}]})}_renderContentForCreatingState(){let{viewModel:e}=this,{view:i}=e;if(!i)return;let r=e.hasVertices?[{type:"sketch-cancel"},{type:"sketch-done",disabled:!e.doneButtonAvailable}]:[{type:"select"},{type:"sketch",disabled:!0}];if(e.errorState==="no-valid-input"){let c=this._messages[`creatingPrompt-${i.type}`];return this._renderContent({chart:!1,actions:r,prompt:c})}let n=this._getErrorMessage();return n?this._renderContent({chart:!1,actions:r,prompt:n}):this._renderContent({chart:!0,actions:r})}_renderContentForSelectedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContentForCreatedState(){let e=this._getErrorMessage();return e?this._renderContent({chart:!1,actions:p,prompt:e}):this._renderContent({chart:!0,actions:p})}_renderContent(e){let{viewModel:i}=this,r=i.geometry!=null;return l`<header class="header">${h({hidden:this._hideZoomOutButton,children:this._renderZoomOutButton()})}${h({hidden:this.hideClearButton||!r,children:this._renderClearButton()})}${h({hidden:this.hideSettingsButton,children:this._renderSettingsButton()})}</header><div class="main-container">${e.prompt!=null?this._renderPrompt(e.prompt):e.chart?this._renderChart():void 0}</div>${h({hidden:this.hideLegend,children:this._renderLegend()})}${this._renderActions(e)}`}_renderPrompt(e){return[l`<div class="prompt-container"><p class="prompt-message">${e}</p></div>`]}_renderZoomOutButton(){let e=this._messages.zoomOut??"";return l`<calcite-action icon=magnifying-glass-minus @click=${this._onZoomOutButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderChart(){if(this.hideChart)return;let e=this._chart;return l`${this._renderSpinner({size:e?.chartVisible?"small":"large",visible:e?.spinnerVisible??!1})}<div class="chart-container" ${k(this._onChartContainerRef)}></div>`}_renderSpinner(e){let i=e.size==="small",r=e.visible??!0;return l`<calcite-loader class=${v({spinner:!0,small:i,visible:r})} .inline=${i} label></calcite-loader>`}_renderClearButton(){let e=this._messages.clearProfile??"";return l`<calcite-action icon=trash @click=${this._onClearButtonClick} .text=${e} title=${e??g}></calcite-action>`}_renderLegend(){return l`<arcgis-elevation-profile-legend .effectiveDisplayUnits=${this.viewModel.effectiveDisplayUnits} .featureSelected=${this.viewModel.featureIsSelected} .messages=${this._messages} .profiles=${this.profiles} .results=${this.viewModel.results}></arcgis-elevation-profile-legend>`}_renderSettingsButton(){return l`<arcgis-elevation-profile-settings .hasCustomStartContent=${this._hasSettingsStartContent} .hasCustomEndContent=${this._hasSettingsEndContent} .viewModel=${this.viewModel} .hideUniformChartScalingToggle=${this.hideUniformChartScalingToggle} .hideDistanceDisplayUnitSelect=${this.hideDistanceDisplayUnitSelect} .hideElevationDisplayUnitSelect=${this.hideElevationDisplayUnitSelect} .messages=${this._messages} .messageOverrides=${this.messageOverrides} .uniformChartScaling=${this.viewModel.uniformChartScaling} .unitOptionsDistance=${this.viewModel.distanceUnitOptions} .unitOptionsElevation=${this.viewModel.elevationUnitOptions} @arcgisElevationProfileSettingsUniformChartScalingChange=${e=>{this.viewModel.uniformChartScaling=e.detail}}><slot name=settings-start slot=settings-start @slotchange=${e=>{this._hasSettingsStartContent=f(e)}}></slot><slot name=settings-end slot=settings-end @slotchange=${e=>{this._hasSettingsEndContent=f(e)}}></slot></arcgis-elevation-profile-settings>`}_renderActions({actions:e}){let i=this._messages,r=e.map(n=>{switch(n.type){case"sketch":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.sketchButtonLabel,primary:!0,onClick:()=>{this.start()}})});case"sketch-cancel":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});case"sketch-done":return h({hidden:this.hideStartButton,children:this._renderAction({action:n,label:i.doneButtonLabel,primary:!0,onClick:this._onDoneButtonClick})});case"select":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.selectButtonLabel,primary:!1,onClick:()=>{this.select()}})});case"select-cancel":return h({hidden:!this._selectButtonVisible,children:this._renderAction({action:n,label:i.cancelButtonLabel,primary:!1,onClick:this._onCancelButtonClick})});default:return}}).filter(Boolean);return r.length?l`<footer class="actions">${r}</footer>`:void 0}_renderAction({action:e,label:i,onClick:r,primary:n}){return l`<calcite-button .appearance=${n?"solid":"outline-fill"} class="action-button" .disabled=${e.disabled||this.interactionDisabled&&(e.type==="sketch"||e.type==="select")} @click=${r}>${i}</calcite-button>`}};function h(t){return t.hidden?void 0:t.children}var p=[{type:"select"},{type:"sketch"}],X={none:void 0,"no-valid-input":"noProfile","no-available-profiles":"noProfile","too-complex":"tooComplex",unknown:"unknown"};M("arcgis-elevation-profile",x);return x},"applications/Components/analysisUtils","applications/Components/reactiveUtils","core/promiseUtils","core/reactiveUtils","analysis/ElevationProfileAnalysis","core/accessorSupport/decorators",a,b,c,d,e,h)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import f from"./RU7PGLLB.js";import{a as _}from"./VSH4WLRS.js";import{a as c}from"./TN5C3MSL.js";import{a as V}from"./I7GS3EKH.js";import e from"./4SLCQ6RS.js";import d from"./4FBTH6YD.js";import"./XSCEZHHS.js";import"./UVNNXZHK.js";import b from"./GNASFNLA.js";import"./QUZTFUWM.js";import"./XPEGBUNJ.js";import"./XURWCCLX.js";import{M as n,N as o,O as l,Q as h,V as p,b as a,w as r}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([M,{watch:s},R,I,k,{c:u,d:g,e:d,f:y,g:f,h:b},{c:w,e:v},t,{a:C,b:E,c:P,d:A}])=>{var L=w(k,{}),x=w(I,{}),m=class extends l{constructor(){super(),this._attributionMode=null,this._containerRef=n(),this._mapRef=n(),this._uiController=new C(this),this._cameraProperties={},this.arcgisLoadError=P(this),this.arcgisViewReadyError=A(this),this._map=L(this),this.view=x(this),this.allLayerViews=this.view.allLayerViews,this.alphaCompositingEnabled=this.view.alphaCompositingEnabled,this.analyses=this.view.analyses,this.animationsDisabled=this.view.animationsEnabled,this.autoDestroyDisabled=!1,this.basemap=this._map.basemap,this.basemapView=this.view.basemapView,this.canZoomIn=this.view.canZoomIn,this.canZoomOut=this.view.canZoomOut,this.clippingArea=this.view.clippingArea,this.constraints=this.view.constraints,this.displayFilterDisabled=this.view.displayFilterEnabled,this.environment=this.view.environment,this.fatalError=this.view.fatalError,this.floors=this.view.floors,this.graphics=this.view.graphics,this.ground=this._map.ground,this.groundView=this.view.groundView,this.highlights=this.view.highlights,this.layerViews=this.view.layerViews,this.magnifier=this.view.magnifier,this.map=this.view.map,this.navigation=this.view.navigation,this.options=this.view.options,this.padding=this.view.padding,this.popup=this.view.popup,this.popupDisabled=this.view.popupEnabled,this.popupComponentEnabled=!1,this.qualityProfile=this.view.qualityProfile,this.ready=this.view.ready,this.selectionManager=this.view.selectionManager,this.slotGroupRefs=this._uiController.slotGroupRefs,this.spatialReference=this.view.spatialReference,this.suspended=this.view.suspended,this.theme=this.view.theme,this.timeExtent=this.view.timeExtent,this.timeZone=this.view.timeZone,this.viewingMode=this.view.viewingMode,this.visibleArea=this.view.visibleArea,this.arcgisViewAnalysisViewCreate=t(()=>this.view,"analysis-view-create"),this.arcgisViewAnalysisViewCreateError=t(()=>this.view,"analysis-view-create-error"),this.arcgisViewAnalysisViewDestroy=t(()=>this.view,"analysis-view-destroy"),this.arcgisViewChange=r(),this.arcgisViewClick=t(()=>this.view,"click"),this.arcgisViewDoubleClick=t(()=>this.view,"double-click"),this.arcgisViewDoubleTapDrag=t(()=>this.view,"double-tap-drag"),this.arcgisViewDrag=t(()=>this.view,"drag"),this.arcgisViewHold=t(()=>this.view,"hold"),this.arcgisViewImmediateClick=t(()=>this.view,"immediate-click"),this.arcgisViewImmediateDoubleClick=t(()=>this.view,"immediate-double-click"),this.arcgisViewKeyDown=t(()=>this.view,"key-down"),this.arcgisViewKeyUp=t(()=>this.view,"key-up"),this.arcgisViewLayerviewCreate=t(()=>this.view,"layerview-create"),this.arcgisViewLayerviewCreateError=t(()=>this.view,"layerview-create-error"),this.arcgisViewLayerviewDestroy=t(()=>this.view,"layerview-destroy"),this.arcgisViewMouseWheel=t(()=>this.view,"mouse-wheel"),this.arcgisViewPointerDown=t(()=>this.view,"pointer-down"),this.arcgisViewPointerEnter=t(()=>this.view,"pointer-enter"),this.arcgisViewPointerLeave=t(()=>this.view,"pointer-leave"),this.arcgisViewPointerMove=t(()=>this.view,"pointer-move"),this.arcgisViewPointerUp=t(()=>this.view,"pointer-up"),this.arcgisViewReadyChange=r(),this.arcgisViewVerticalTwoFingerDrag=t(()=>this.view,"vertical-two-finger-drag"),E(this),this.view.ui={components:[]}}static{this.properties={_map:16,aria:0,view:32,allLayerViews:32,alphaCompositingEnabled:5,analyses:0,animationsDisabled:5,attributionItems:32,attributionMode:1,autoDestroyDisabled:5,basemap:1,basemapView:0,camera:0,cameraFov:9,cameraHeading:9,cameraPosition:1,cameraTilt:9,canZoomIn:36,canZoomOut:36,center:1,clippingArea:0,constraints:0,displayFilterDisabled:5,environment:0,extent:0,fatalError:0,floors:0,focusAreas:0,gamepad:32,graphics:0,ground:1,groundView:32,hideAttribution:5,highlights:0,interacting:32,itemId:3,layerViews:32,magnifier:32,map:0,navigating:32,navigation:0,options:0,padding:0,performanceInfo:32,popup:0,popupElement:32,popupDisabled:5,popupComponentEnabled:5,qualityProfile:1,ready:36,resolution:32,selectionManager:32,scale:9,slotGroupRefs:32,spatialReference:0,stationary:32,suspended:39,theme:0,timeExtent:0,timeZone:1,updating:32,viewingMode:1,viewpoint:0,visibleArea:32,zoom:9,loadErrorSources:0}}static{this.styles=[V,_]}get aria(){return this.view?.aria??null}set aria(i){this.view&&(this.view.aria=i)}get attributionItems(){return this.view?.attributionItems??[]}get attributionMode(){return this._attributionMode}set attributionMode(i){this._attributionMode=i,i!=="auto"&&(this.view.attributionMode=i)}get camera(){return this.view.camera}set camera(i){u(this.camera,i)||(this.view.camera=i)}get cameraFov(){let{view:i}=this;return i.ready?this.view.camera?.fov:this._cameraProperties.fov}set cameraFov(i){i!=null&&this._mutateCamera(e=>{e.fov=i})}get cameraHeading(){let{view:i}=this;return i.ready?i.camera?.heading:this._cameraProperties.heading}set cameraHeading(i){i!=null&&this._mutateCamera(e=>{e.heading=i})}get cameraPosition(){let{view:i}=this;if(i.ready)return i.camera?.position;let{position:e}=this._cameraProperties;return e?new R(e):void 0}set cameraPosition(i){let e=b(this.view.camera?.position,i);e&&this._mutateCamera(D=>{D.position=e})}get cameraTilt(){let{view:i}=this;return i.ready?i.camera?.tilt:this._cameraProperties.tilt}set cameraTilt(i){i!=null&&this._mutateCamera(e=>{e.tilt=i})}get center(){return this.view.center}set center(i){if(d(i,this._center))return;this._center=y(i);let e=f(i,this.view);e&&(this.view.center=e)}get extent(){return this.view.extent}set extent(i){i&&!this.extent.equals(i)&&(this.view.extent=i)}get focusAreas(){return this.map?this.map?.focusAreas:{areas:[],style:"bright"}}set focusAreas(i){this.map&&(this.map.focusAreas=i)}get gamepad(){return this.view.input.gamepad}get hideAttribution(){return!this.view.attributionVisible}set hideAttribution(i){this.view.attributionVisible=!i}get interacting(){return this.view.interacting}get itemId(){return this._map.portalItem?.id}set itemId(i){v(this._map,this),this._map.portalItem={id:i},this.view.map=this._map}get navigating(){return this.view.navigating}get performanceInfo(){return this.view.performanceInfo}get popupElement(){return this._uiController.popupElement||null}get resolution(){return this.view.resolution}get scale(){return this.view.scale}set scale(i){this.view.scale=i}get stationary(){return this.view.stationary}get updating(){return this.view.updating}get viewpoint(){return this.view.viewpoint}set viewpoint(i){g(this.viewpoint,i)&&(this.view.viewpoint=i)}get zoom(){return this.view.zoom}set zoom(i){this.view.zoom=i}async closePopup(){this._uiController.closePopup()}async destroy(){await this.manager.destroy()}async fetchPopupFeatures(i,e){return this.view.fetchPopupFeatures(i,e)}async goTo(i,e){return await this.view.goTo(i,e)}async hitTest(i,e){return await this.view.hitTest(i,e)}async openPopup(i){this._uiController.openPopup(i)}async takeScreenshot(i){return await this.view.takeScreenshot(i)}toMap(i,e){return this.view.toMap(i,e)}toScreen(i){return this.view.toScreen(i)}async tryFatalErrorRecovery(){this.view.tryFatalErrorRecovery()}async viewOnReady(i,e){return await this.componentOnReady(),await this.view.whenReady().then(()=>i?.()).catch(e)}async whenAnalysisView(i){return await this.view.whenAnalysisView(i)}async whenLayerView(i){return await this.view.whenLayerView(i)}async zoomIn(){this.view.zoomIn()}async zoomOut(){this.view.zoomOut()}loaded(){let i=this;i.el.childElem=this._mapRef.value,this.view.container??=i.el.childElem,this.map||=this._map,this.manager.onLifecycle(()=>[s(()=>this.map,e=>{e&&(this._map=e)},{initial:!0,sync:!0}),s(()=>this.view.stationary,()=>this.arcgisViewChange.emit(),{initial:!0}),s(()=>this.view.ready,e=>{e&&(this.camera=this.view.camera.clone().set(this._cameraProperties),this._cameraProperties={}),this.arcgisViewReadyChange.emit()},{initial:this.view.ready}),s(()=>this.view.attributionHeight,e=>{this._uiController.handleAttributionHeightChange(e)},{initial:!0})])}_mutateCamera(i){if(!this.view.ready){i(this._cameraProperties);return}let e=this.view.camera?.clone()??new M;i(e),this.camera=e}renderMain(){return a`<div class=${h(c.base)} ${o(this._mapRef)}></div>`}render(){return a`${this.renderMain()}<section class=${h(c.containerUI)} ${o(this._containerRef)}>${this._uiController.render()}</section>`}};p("arcgis-scene",m);return m},"Camera","core/reactiveUtils","geometry/Point","views/SceneView","WebScene",b,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import j from"./HNMWTX7W.js";import{a as $,b as S,d as h,g as l,j as U,k as V}from"./G5VPRDMX.js";import{a as u}from"./POKO37D3.js";import i from"./CONE7FEI.js";import"./VJVKFKSG.js";import e from"./ILBDNJQP.js";import{a as D}from"./5JADSW57.js";import{a as p}from"./JD74LG7K.js";import d from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as k}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as y}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as f,Q as v,S as b,V as x,a as _,b as g,w}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{isAboveGeodesicDistanceThreshold:C},{property:c,subclass:E},{watch:P},,,,M,{e:z},O])=>{var A=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:var(--arcgis-internal-panel-width, 300px)}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}`,B=Object.defineProperty,T=Object.getOwnPropertyDescriptor,s=(t,e,r,o)=>{for(var i=o>1?void 0:o?T(e,r):e,n=t.length-1,d;n>=0;n--)(d=t[n])&&(i=(o?d(e,r,i):d(i))||i);return o&&i&&B(e,r,i),i},a=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Direct Line Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(P(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:t,unit:e})=>{e&&(t.unit=e)},{sync:!0,initial:!0}))}get state(){let{analysis:t,disabled:e,operationState:r,ready:o,supported:i}=this,{valid:n}=t;return $({supported:i,disabled:e,ready:o,operationState:r,valid:n})}get displayState(){return S(this.state,!!this.analysis.startPoint)}get measurement(){let t=this.analysisView?.result,e=t?.mode??"euclidean";if(!this.analysis.valid)return{mode:e,directDistance:l(void 0),horizontalDistance:l(void 0),verticalDistance:l(void 0)};let r=t?.directDistance,o=r!=null&&C(r);return{mode:e,directDistance:l(o?void 0:r),horizontalDistance:l(t?.horizontalDistance),verticalDistance:l(t?.verticalDistance)}}get unitOptions(){return U(this._userUnitOptions,h,h)}set unitOptions(t){this._userUnitOptions=t}get unit(){return V(this._userUnit,this.analysis.unit,this.unitOptions,this.defaultMeasurementSystem)}set unit(t){this._userUnit=t}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.analysis.startPoint=null,this.analysis.endPoint=null}constructAnalysis(){return new j}};s([c({readOnly:!0})],a.prototype,"state",1);s([c({readOnly:!0})],a.prototype,"displayState",1);s([c({readOnly:!0})],a.prototype,"measurement",1);s([c()],a.prototype,"unitOptions",1);s([c()],a.prototype,"_userUnitOptions",2);s([c()],a.prototype,"unit",1);s([c()],a.prototype,"_userUnit",2);a=s([E("components.direct-line-measurement-3d.DirectLineMeasurement3dViewModel")],a);var G=M(a),m=class extends f{constructor(){super(...arguments),this.viewModel=G(this),this.messages=D({name:"directline-measurement-3d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,state:32,unit:1,unitOptions:0}}static{this.styles=A}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:e,unit:r,unitOptions:o,viewModel:i}=this,{measurement:n,state:d}=i;return g`<div aria-label=${e.componentLabel??b} class=${v(y("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${i.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[{title:e.direct,measurement:n.directDistance},{title:e.horizontal,measurement:n.horizontalDistance},{title:e.vertical,measurement:n.verticalDistance}]}>${u({hidden:this.hideUnitSelect,children:g`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${r} @arcgisUnitSelectChange=${L=>{this.unit=L.detail}}></arcgis-unit-select>`})}${u({hidden:this.hideStartButton,children:g`<calcite-button slot=actions .disabled=${d==="disabled"||d==="unsupported"||this.interactionDisabled} @click=${this.start}>${e.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-direct-line-measurement-3d",m);return m},"analysis/DirectLineMeasurementAnalysis","applications/Components/analysisUtils","core/accessorSupport/decorators","core/reactiveUtils",a,c,d,e,i,j)
2
+ import j from"./BEZWJEYM.js";import{a as $,b as S,d as h,g as l,j as U,k as V}from"./G5VPRDMX.js";import{a as u}from"./POKO37D3.js";import i from"./YG4HDEP3.js";import"./VJVKFKSG.js";import e from"./ILBDNJQP.js";import{a as D}from"./5JADSW57.js";import{a as p}from"./JD74LG7K.js";import d from"./4FBTH6YD.js";import c from"./KORK4WZ7.js";import{h as k}from"./XSCEZHHS.js";import"./UVNNXZHK.js";import a from"./GNASFNLA.js";import"./QUZTFUWM.js";import{b as y}from"./XPEGBUNJ.js";import"./XURWCCLX.js";import{O as f,Q as v,S as b,V as x,a as _,b as g,w}from"./GFTZ7EZP.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{isAboveGeodesicDistanceThreshold:C},{property:c,subclass:E},{watch:P},,,,M,{e:z},O])=>{var A=_`.esri-widget__heading{color:var(--calcite-color-text-2);margin:0 0 .5rem;font-weight:var(--calcite-font-weight-semibold)}h1.esri-widget__heading{font-size:var(--calcite-font-size-xl)}h2.esri-widget__heading{font-size:var(--calcite-font-size-md)}h3.esri-widget__heading,h4.esri-widget__heading,h5.esri-widget__heading,h6.esri-widget__heading{font-size:var(--calcite-font-size)}.esri-widget{box-sizing:border-box;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget *,.esri-widget :before,.esri-widget :after{box-sizing:inherit}.esri-widget.esri-widget--disabled>*{opacity:.4;pointer-events:none}.esri-widget.esri-widget--compact{--esri-widget-padding-y: 0;--esri-widget-padding-x: 0}.esri-widget__anchor{color:var(--calcite-color-text-2)}.esri-widget__anchor:hover{color:var(--calcite-color-text-3)}.esri-widget__anchor:hover,.esri-widget__anchor:focus{text-decoration:underline}.esri-widget__anchor--disabled{opacity:.4;pointer-events:none}.esri-widget__header{background-color:var(--calcite-color-foreground-1);flex:1 0 100%;justify-content:space-between;align-items:center;width:100%;min-height:48px;padding:12px 0 12px 15px;display:flex}.esri-widget__heading{word-break:break-word}.esri-widget__header .esri-widget__heading{width:calc(100% - 48px);text-align:initial;color:var(--calcite-color-text-1);align-items:center;margin:0;padding:0;display:flex}.esri-widget__header-button{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background-color:var(--calcite-color-foreground-1);border:none;flex:0 0 48px;justify-content:center;align-self:stretch;align-items:center;width:48px;padding:0;display:flex}.esri-widget__footer{background-color:var(--calcite-color-foreground-1);justify-content:center;align-items:center;width:100%;min-height:48px;display:flex}.esri-widget__footer-pagination{color:var(--calcite-color-text-2);justify-content:space-between;align-items:center;display:flex}.esri-widget__footer-pagination-previous-button,.esri-widget__footer-pagination-next-button{cursor:pointer;background-color:var(--calcite-color-foreground-1);border:0;margin:0 7px;padding:12px 15px;transition:background-color .125s ease-in-out}.esri-widget__footer-pagination-previous-button:hover,.esri-widget__footer-pagination-previous-button:focus,.esri-widget__footer-pagination-next-button:hover,.esri-widget__footer-pagination-next-button:focus{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1)}.esri-menu{visibility:hidden;z-index:1;background-clip:padding;background-color:var(--calcite-color-foreground-1);background-clip:padding-box;width:100%;max-height:0;margin:2px 0 0;padding:0;font-size:var(--calcite-font-size);line-height:var(--calcite-spacing-xl);position:absolute;top:100%;left:0;overflow:hidden;box-shadow:0 1px 2px #0000004d}.esri-menu .esri-menu__header{color:var(--calcite-color-text-inverse);background-color:var(--calcite-color-inverse);padding:6px 12px}.esri-menu__list{margin:0;padding:0;list-style:none}.esri-menu__list-item{cursor:pointer;border-top:1px solid #adadad4d;border-left:3px solid #0000;padding:.8em 1em}.esri-menu__list-item [class^=esri-icon-],.esri-menu__list-item [class*=" esri-icon-"]{padding-right:2.8px}.esri-menu__list-item:first-child{border-top:none}.esri-menu__list-item--focus,.esri-menu__list-item:hover,.esri-menu__list-item:focus{background-color:var(--calcite-color-foreground-1)}.esri-menu__list-item:active{background-color:var(--calcite-color-foreground-current)}.esri-menu__list-item--active,.esri-menu__list-item--active:hover,.esri-menu__list-item--active:focus{background-color:var(--calcite-color-foreground-1);border-left-color:var(--calcite-color-brand)}.esri-widget__table{border-collapse:collapse;color:var(--calcite-color-text-1);border:none;width:100%;line-height:var(--calcite-font-line-height-relative-tight)}.esri-widget__table tr:nth-child(odd){background-color:var(--calcite-color-transparent)}.esri-widget__table tr:nth-child(2n){background-color:var(--calcite-color-transparent-press)}.esri-widget__table tr a{color:var(--calcite-color-text-2)}.esri-widget__table tr a:hover,.esri-widget__table tr a:focus{color:var(--calcite-color-text-1)}.esri-widget__table tr td,.esri-widget__table tr th{vertical-align:top;word-break:break-word;padding:.5em .7em;font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular)}.esri-widget__table tr th{text-align:left;border-right:3px solid #0000000d;width:50%}.esri-widget__table tr td{width:50%}.esri-input{color:var(--calcite-color-text-1);background-color:var(--calcite-color-foreground-1);border:1px solid #959595;font-size:var(--calcite-font-size)}.esri-input::-ms-clear{display:none}.esri-input::placeholder{opacity:1;color:var(--calcite-color-text-2)}.esri-input:placeholder-shown{text-overflow:ellipsis}.esri-input[type=text],.esri-input[type=password],.esri-input[type=number]{height:32px;padding:0 .5em}calcite-combobox.esri-input{border:none}.esri-widget__content--empty{text-align:center;color:var(--calcite-color-border-input);flex-flow:column wrap;align-items:center;padding:18px 22px;display:flex}.esri-widget__content--empty h1.esri-widget__heading,.esri-widget__content--empty h2.esri-widget__heading,.esri-widget__content--empty h3.esri-widget__heading,.esri-widget__content--empty h4.esri-widget__heading,.esri-widget__content--empty h5.esri-widget__heading{font-weight:var(--calcite-font-weight-regular)}.esri-widget__content-illustration--empty{width:128px;padding:1rem 0}.esri-widget__content-icon--empty{width:32px;padding:.5rem 0}.esri-select{appearance:none;cursor:pointer;color:var(--calcite-color-text-2);background:var(--calcite-color-foreground-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='-8 -8 32 32' width='32' height='32'%3E%3Cpath d='M8 11.207l-4-4V5.793l4 4 4-4v1.414z' fill='%23adadad' fillrule='nonzero'/%3E%3C/svg%3E") 100% no-repeat;border:1px solid #959595;border-radius:0;width:100%;height:32px;margin:0;padding:0 .5em;font-family:inherit;font-size:.85em;display:block}.esri-select[disabled]{cursor:auto}.esri-select::-ms-expand{display:none}.esri-disabled a,.esri-disabled [role=menu],.esri-disabled [role=checkbox],.esri-disabled [class^=esri-icon-],.esri-disabled [class*=" esri-icon-"]{color:var(--calcite-color-text-3)}.keynav-mode .esri-widget:focus,.keynav-mode .esri-widget :focus{z-index:1;outline-offset:2px;outline:2px solid #adadad}.esri-widget__loader-animation{border:.15em solid #adadad4d;border-top-color:var(--calcite-color-border-input);border-radius:100%;width:1em;height:1em;font-size:var(--calcite-font-size-md);animation:1.25s linear infinite esri-rotate;display:block;transform:translateZ(0)}:dir(rtl) .esri-widget__table th{text-align:right;border-left:3px solid #0000000d;border-right:none}:dir(rtl) .esri-select{background-position:0}:dir(rtl) .esri-menu__list-item{border-left:none;border-right:3px solid #0000}:dir(rtl) .esri-menu__list-item [class^=esri-icon-],:dir(rtl) .esri-menu__list-item [class*=" esri-icon-"]{padding-left:2px;padding-right:0}:dir(rtl) .esri-menu__list-item--active{border-right-color:var(--calcite-color-brand)}.esri-icon-font-fallback-text{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.esri-rotating{animation:1.25s linear infinite esri-rotate;transform:translateZ(0)}.esri-clearfix:before,.esri-clearfix:after{content:" ";display:table}.esri-clearfix:after{clear:both}.esri-interactive{cursor:pointer}.esri-hidden{display:none!important}.esri-invisible{visibility:hidden!important}.esri-offscreen{position:absolute;top:-999em;left:-999em}.esri-match-height{flex-direction:column;flex:auto;display:flex;overflow:hidden}.esri-widget--panel{min-width:300px;min-height:32px;padding:var(--arcgis-internal-padding);transition:max-height .25s ease-in-out;overflow-y:auto}.esri-unit-select{width:100%}.esri-unit-select__label{--calcite-label-margin-bottom: 0;width:100%}:host{display:block}.esri-measurement-widget-content{padding:var(--arcgis-internal-padding);flex-direction:column;gap:var(--calcite-spacing-xxl);display:flex;position:relative;overflow-y:auto}.esri-measurement-widget-content__error{color:var(--calcite-color-status-danger)}.esri-measurement-widget-content__error,.esri-measurement-widget-content__hint{overflow:hidden}.esri-measurement-widget-content__error p,.esri-measurement-widget-content__hint p{margin:0;padding:0}.esri-measurement-widget-content__hint,.esri-measurement-widget-content__error,.esri-measurement-widget-content__measurement,.esri-measurement-widget-content__measurement-item{flex-direction:column;gap:var(--calcite-spacing-md);animation:.25s ease-in-out esri-fade-in;display:flex}.esri-measurement-widget-content__measurement-item--disabled{color:var(--calcite-color-border-ghost)}.esri-measurement-widget-content__measurement-item__value{font-weight:var(--calcite-font-weight-semibold)}.esri-measurement-widget-content__actions{flex-direction:column;justify-content:center;gap:var(--calcite-spacing-xs);display:flex}:host{width:var(--arcgis-internal-panel-width, 300px)}.root{min-width:var(--arcgis-internal-panel-min-width);overflow:var(--arcgis-internal-panel-overflow, visible);height:fit-content}`,B=Object.defineProperty,T=Object.getOwnPropertyDescriptor,s=(t,e,r,o)=>{for(var i=o>1?void 0:o?T(e,r):e,n=t.length-1,d;n>=0;n--)(d=t[n])&&(i=(o?d(e,r,i):d(i))||i);return o&&i&&B(e,r,i),i},a=class extends O{constructor(){super(...arguments),this.supportedViewType="3d",this.unsupportedErrorMessage="The Direct Line Measurement 3D component is only supported in 3D views."}initialize(){this.addHandles(P(()=>({analysis:this.analysis,unit:this._userUnit}),({analysis:t,unit:e})=>{e&&(t.unit=e)},{sync:!0,initial:!0}))}get state(){let{analysis:t,disabled:e,operationState:r,ready:o,supported:i}=this,{valid:n}=t;return $({supported:i,disabled:e,ready:o,operationState:r,valid:n})}get displayState(){return S(this.state,!!this.analysis.startPoint)}get measurement(){let t=this.analysisView?.result,e=t?.mode??"euclidean";if(!this.analysis.valid)return{mode:e,directDistance:l(void 0),horizontalDistance:l(void 0),verticalDistance:l(void 0)};let r=t?.directDistance,o=r!=null&&C(r);return{mode:e,directDistance:l(o?void 0:r),horizontalDistance:l(t?.horizontalDistance),verticalDistance:l(t?.verticalDistance)}}get unitOptions(){return U(this._userUnitOptions,h,h)}set unitOptions(t){this._userUnitOptions=t}get unit(){return V(this._userUnit,this.analysis.unit,this.unitOptions,this.defaultMeasurementSystem)}set unit(t){this._userUnit=t}async place(t){await this.analysisView?.place(t)}clearAnalysis(){this.analysis.startPoint=null,this.analysis.endPoint=null}constructAnalysis(){return new j}};s([c({readOnly:!0})],a.prototype,"state",1);s([c({readOnly:!0})],a.prototype,"displayState",1);s([c({readOnly:!0})],a.prototype,"measurement",1);s([c()],a.prototype,"unitOptions",1);s([c()],a.prototype,"_userUnitOptions",2);s([c()],a.prototype,"unit",1);s([c()],a.prototype,"_userUnit",2);a=s([E("components.direct-line-measurement-3d.DirectLineMeasurement3dViewModel")],a);var G=M(a),m=class extends f{constructor(){super(...arguments),this.viewModel=G(this),this.messages=D({name:"directline-measurement-3d",blocking:!0}),this.view=this.viewModel.view,this.analysis=this.viewModel.analysis,this.autoDestroyDisabled=!1,this.hideStartButton=!1,this.hideUnitSelect=!1,this.hideVisualization=this.viewModel.hideVisualization,this.icon="measure-line",this.interactionDisabled=this.viewModel.interactionDisabled,this.state=this.viewModel.state,this.unit=this.viewModel.unit,this.unitOptions=this.viewModel.unitOptions,this.arcgisPropertyChange=k()("analysis","interactionDisabled","state"),this.arcgisReady=w()}static{this.properties={view:0,analysis:0,autoDestroyDisabled:5,hideStartButton:5,hideUnitSelect:5,hideVisualization:5,icon:3,interactionDisabled:5,label:1,messageOverrides:0,referenceElement:1,state:32,unit:1,unitOptions:0}}static{this.styles=A}async clear(){this.viewModel.clear()}async destroy(){await this.manager.destroy()}async start(){z(this.viewModel.start())}render(){let{messages:e,unit:r,unitOptions:o,viewModel:i}=this,{measurement:n,state:d}=i;return g`<div aria-label=${e.componentLabel??b} class=${v(y("root",p.widget,p.panel))} role=presentation><arcgis-measurement-content .state=${i.displayState} .hintLabel=${e.hint} .unsupportedLabel=${e.unsupported} .items=${[{title:e.direct,measurement:n.directDistance},{title:e.horizontal,measurement:n.horizontalDistance},{title:e.vertical,measurement:n.verticalDistance}]}>${u({hidden:this.hideUnitSelect,children:g`<arcgis-unit-select slot=settings .options=${o} .selectLabel=${e.unit} .value=${r} @arcgisUnitSelectChange=${L=>{this.unit=L.detail}}></arcgis-unit-select>`})}${u({hidden:this.hideStartButton,children:g`<calcite-button slot=actions .disabled=${d==="disabled"||d==="unsupported"||this.interactionDisabled} @click=${this.start}>${e.newMeasurement}</calcite-button>`})}</arcgis-measurement-content></div>`}};x("arcgis-direct-line-measurement-3d",m);return m},"analysis/DirectLineMeasurementAnalysis","applications/Components/analysisUtils","core/accessorSupport/decorators","core/reactiveUtils",a,c,d,e,i,j)