@arcgis/map-components 5.2.0-next.69 → 5.2.0-next.70

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 (242) hide show
  1. package/dist/cdn/{JP4O5WU5.js → 263UQZGD.js} +1 -1
  2. package/dist/cdn/{LXTI5SZB.js → 27ESFL5A.js} +1 -1
  3. package/dist/cdn/{XEP6CP26.js → 2JK6IHRU.js} +1 -1
  4. package/dist/cdn/{N34R2VNP.js → 2MNCEI34.js} +1 -1
  5. package/dist/cdn/{54O3XEKS.js → 2SVHWSVG.js} +1 -1
  6. package/dist/cdn/{LIBO3YUY.js → 34IPKNHM.js} +1 -1
  7. package/dist/cdn/{AATMBHJB.js → 3AN2HM4J.js} +1 -1
  8. package/dist/cdn/{CPHT7EKR.js → 3EJEDTKE.js} +1 -1
  9. package/dist/cdn/{NKK2XLSQ.js → 3I3LMAGG.js} +1 -1
  10. package/dist/cdn/{KHIHHUKA.js → 3MGDX726.js} +1 -1
  11. package/dist/cdn/{TIHHIJTK.js → 3S4WSOMS.js} +1 -1
  12. package/dist/cdn/{WZWVAXA2.js → 3SN6IS3V.js} +1 -1
  13. package/dist/cdn/{VJMC3CMB.js → 42UVPIOD.js} +1 -1
  14. package/dist/cdn/{TYQO3UPC.js → 45KA6IYP.js} +1 -1
  15. package/dist/cdn/{ZE6S2MJB.js → 4HUPP5KY.js} +1 -1
  16. package/dist/cdn/{OE6LEA2U.js → 4IYAEXT6.js} +1 -1
  17. package/dist/cdn/{LEH4MQJ4.js → 4JVOJINY.js} +1 -1
  18. package/dist/cdn/{B2EZWEK5.js → 4QNVMHPG.js} +1 -1
  19. package/dist/cdn/{OCXHXWGB.js → 4TUKX6PS.js} +1 -1
  20. package/dist/cdn/{DYE5BE43.js → 4VH44HXD.js} +1 -1
  21. package/dist/cdn/{SRNGMDBR.js → 4WL7ZDOR.js} +1 -1
  22. package/dist/cdn/{5O7NTWBV.js → 4YZWUM36.js} +1 -1
  23. package/dist/cdn/{HTTHJG2D.js → 53HZB27L.js} +1 -1
  24. package/dist/cdn/{YB4MKEGG.js → 54LZZPH7.js} +1 -1
  25. package/dist/cdn/{C37ZD43S.js → 56HANFHY.js} +1 -1
  26. package/dist/cdn/{IYBQ72KJ.js → 5FOOE24C.js} +1 -1
  27. package/dist/cdn/{CNA7TDZN.js → 5GFBHLDY.js} +1 -1
  28. package/dist/cdn/{LFK5PEIC.js → 5OJHCEN4.js} +1 -1
  29. package/dist/cdn/{36ZK37RS.js → 5OPSVESB.js} +1 -1
  30. package/dist/cdn/{PG4VOR7W.js → 5UBFTTQG.js} +1 -1
  31. package/dist/cdn/{THM67RBC.js → 5VHXHQ36.js} +1 -1
  32. package/dist/cdn/{6UESIAYD.js → 63AG67W4.js} +1 -1
  33. package/dist/cdn/{MWAV3XSL.js → 6LPVSXTP.js} +1 -1
  34. package/dist/cdn/{RCGWBUTM.js → 6T4SNDWL.js} +1 -1
  35. package/dist/cdn/{2N34V44S.js → 732AA2XJ.js} +1 -1
  36. package/dist/cdn/{OGALSAFL.js → 7AJVAY4L.js} +1 -1
  37. package/dist/cdn/{YO6Z5FD4.js → 7ATMAAIA.js} +1 -1
  38. package/dist/cdn/{ACHF5ALD.js → 7B2ON35Y.js} +1 -1
  39. package/dist/cdn/{GRVMJD2H.js → 7BHMRVKK.js} +1 -1
  40. package/dist/cdn/{IR3EJA2Q.js → 7F6SCTJC.js} +1 -1
  41. package/dist/cdn/{6OVA7KIZ.js → 7FSKEJN5.js} +1 -1
  42. package/dist/cdn/{5OBZQUJE.js → 7HGCXEVW.js} +1 -1
  43. package/dist/cdn/{3Y5SDD5P.js → 7MIEKJ57.js} +1 -1
  44. package/dist/cdn/{PHBSNX42.js → 7OBUF2FK.js} +1 -1
  45. package/dist/cdn/{COLRADFQ.js → 7RUDSAAC.js} +1 -1
  46. package/dist/cdn/{I25PKHLU.js → 7THMBHKF.js} +1 -1
  47. package/dist/cdn/{ILAKSMYE.js → A4VZEZU3.js} +1 -1
  48. package/dist/cdn/{YGC3D43Q.js → A6CH2UFJ.js} +1 -1
  49. package/dist/cdn/{DBQPOOGQ.js → ABWJWVAT.js} +1 -1
  50. package/dist/cdn/{AVHHBQZF.js → AFFS32W5.js} +1 -1
  51. package/dist/cdn/{35HJTZDP.js → AQ5MEMRU.js} +1 -1
  52. package/dist/cdn/{ID7AG4JH.js → AZKD3JVJ.js} +1 -1
  53. package/dist/cdn/{BSI2WP7F.js → AZSWPMSD.js} +1 -1
  54. package/dist/cdn/{KCLELCOU.js → B2GZY6PZ.js} +1 -1
  55. package/dist/cdn/{5OQPKSGX.js → B5GF4C7T.js} +1 -1
  56. package/dist/cdn/{V3SICJ32.js → B5TWZ7RP.js} +1 -1
  57. package/dist/cdn/{VVC4QG6F.js → BHAY27CX.js} +1 -1
  58. package/dist/cdn/{PW62476X.js → BMVELPGD.js} +1 -1
  59. package/dist/cdn/{G3BAPTZZ.js → BPARROZU.js} +1 -1
  60. package/dist/cdn/{YZQG6WS5.js → BV5DVFHY.js} +1 -1
  61. package/dist/cdn/{VVRTT47C.js → BYURJH5S.js} +1 -1
  62. package/dist/cdn/{2XFBIC3F.js → CDGKWT2J.js} +1 -1
  63. package/dist/cdn/{YLDF7U5D.js → CEZOPIBZ.js} +1 -1
  64. package/dist/cdn/{2CUYHI36.js → CG52ER6Q.js} +1 -1
  65. package/dist/cdn/{6N5H4GYH.js → CL2BELDC.js} +1 -1
  66. package/dist/cdn/{PNZO7PJX.js → CVFKHMDF.js} +1 -1
  67. package/dist/cdn/{U7PLIM7D.js → D5DGYDNC.js} +1 -1
  68. package/dist/cdn/{ZHA4C7BC.js → D6Z3MYCF.js} +1 -1
  69. package/dist/cdn/{6JYLZLVD.js → D75QAAQT.js} +1 -1
  70. package/dist/cdn/{NCSFZ67G.js → DKIT622U.js} +1 -1
  71. package/dist/cdn/{JUB5EAFV.js → DSVRIWYW.js} +1 -1
  72. package/dist/cdn/{7GGF4VK3.js → EF5I2PGI.js} +1 -1
  73. package/dist/cdn/{EBOBXBZK.js → EFLJBQJB.js} +1 -1
  74. package/dist/cdn/{HQBA7OPQ.js → ELVDMQEB.js} +1 -1
  75. package/dist/cdn/{HX5ZGPW4.js → ETV3RIV4.js} +1 -1
  76. package/dist/cdn/{3K5L7C4B.js → EUSNS4ZR.js} +1 -1
  77. package/dist/cdn/{JBKFFPLV.js → EZ32225G.js} +1 -1
  78. package/dist/cdn/{R5TL5I6S.js → F3IKTIUT.js} +1 -1
  79. package/dist/cdn/{AIUZUNQB.js → FC2KR2OJ.js} +1 -1
  80. package/dist/cdn/{YJ36H7AG.js → FCGXXNEE.js} +1 -1
  81. package/dist/cdn/FHDJ7G3W.js +2 -0
  82. package/dist/cdn/{4BYHEBLT.js → FKGG2CUG.js} +1 -1
  83. package/dist/cdn/{UI2M6TYH.js → FQVFZLFR.js} +1 -1
  84. package/dist/cdn/{PT7XD6RE.js → FR3DD5XU.js} +1 -1
  85. package/dist/cdn/{QBTMCEFA.js → FRBI5DO2.js} +1 -1
  86. package/dist/cdn/{2WLXD7OI.js → G3GFYB3W.js} +1 -1
  87. package/dist/cdn/{NE62OHLY.js → G7AAB5J7.js} +1 -1
  88. package/dist/cdn/{BWECC664.js → GG4ZP72A.js} +1 -1
  89. package/dist/cdn/{CL6JXK4J.js → GIMPEDA6.js} +1 -1
  90. package/dist/cdn/{JJUKCRBV.js → GTVZDMAZ.js} +1 -1
  91. package/dist/cdn/{6YLBLUPL.js → GVCVI2FM.js} +1 -1
  92. package/dist/cdn/{N5NWRDVD.js → GWNHAPDJ.js} +1 -1
  93. package/dist/cdn/{6BD3TWBH.js → H2EVMLHD.js} +1 -1
  94. package/dist/cdn/{QT2LSBKF.js → H5BVJ264.js} +1 -1
  95. package/dist/cdn/{KWY2WPOP.js → HGPMWYEJ.js} +1 -1
  96. package/dist/cdn/{XYV2ZB6J.js → HHEQGXDE.js} +1 -1
  97. package/dist/cdn/{BOHA6O3E.js → HSF2MYAX.js} +1 -1
  98. package/dist/cdn/{C7NIEQKO.js → HZR3HENL.js} +1 -1
  99. package/dist/cdn/{WTEY2GUR.js → I236E7AW.js} +1 -1
  100. package/dist/cdn/{TIIFMOFF.js → ICAEEYON.js} +1 -1
  101. package/dist/cdn/{TWW6WTPJ.js → IEUVYAB2.js} +1 -1
  102. package/dist/cdn/{Y6AJ3R7J.js → IIYUVBKU.js} +1 -1
  103. package/dist/cdn/{YKJYY74T.js → IKTXSXXQ.js} +1 -1
  104. package/dist/cdn/{6GIDI7Z2.js → ILE73UJE.js} +1 -1
  105. package/dist/cdn/{EIYWFIVH.js → IMG33Z76.js} +1 -1
  106. package/dist/cdn/{AVFYZ2BD.js → IOORBLHL.js} +1 -1
  107. package/dist/cdn/{2DCEODPQ.js → IVBBBGIP.js} +1 -1
  108. package/dist/cdn/{VZ3LSB3Z.js → JFNKQEAB.js} +1 -1
  109. package/dist/cdn/JLZ2PFNC.js +2 -0
  110. package/dist/cdn/{TMO4U4HG.js → JNZQSIHO.js} +1 -1
  111. package/dist/cdn/{T27FCYV7.js → JWCHEYHG.js} +1 -1
  112. package/dist/cdn/{3TZJEZDM.js → K2HEKJRC.js} +1 -1
  113. package/dist/cdn/{R6NLZOD6.js → K2KLJ32T.js} +1 -1
  114. package/dist/cdn/{RTXRLIYL.js → K3VQUQ6I.js} +1 -1
  115. package/dist/cdn/K5WNMCOI.js +2 -0
  116. package/dist/cdn/{GCPF5PAX.js → K76HO7P7.js} +1 -1
  117. package/dist/cdn/{GZUBRPJC.js → KDTYT2TI.js} +1 -1
  118. package/dist/cdn/{HROETYFU.js → KG4DME7S.js} +1 -1
  119. package/dist/cdn/{5AO4WCMO.js → KG4E7MUN.js} +1 -1
  120. package/dist/cdn/{IC33XDTT.js → KI373EER.js} +1 -1
  121. package/dist/cdn/{FPBIHRY5.js → KJJVLZO6.js} +1 -1
  122. package/dist/cdn/{IGORAGVE.js → KL6LVGWT.js} +1 -1
  123. package/dist/cdn/{WRRFKLB6.js → KNC343OA.js} +1 -1
  124. package/dist/cdn/{OKBDQ3G2.js → KUR5PBEN.js} +1 -1
  125. package/dist/cdn/{L4UVDZFM.js → KXYV52R5.js} +1 -1
  126. package/dist/cdn/{IPS6PJBP.js → KZQ5ZQEP.js} +1 -1
  127. package/dist/cdn/{Z63PHR6E.js → LBL4JL7T.js} +1 -1
  128. package/dist/cdn/{LYBMSSWT.js → LFFKXHGN.js} +1 -1
  129. package/dist/cdn/{CE7BKSHD.js → LGFVRB7B.js} +1 -1
  130. package/dist/cdn/{VFFB35S6.js → LI7PGPU4.js} +1 -1
  131. package/dist/cdn/{NMQUDSWT.js → LIEZSWE4.js} +1 -1
  132. package/dist/cdn/{N4AIZK72.js → LSTPPCUH.js} +1 -1
  133. package/dist/cdn/LTBXZRS5.js +2 -0
  134. package/dist/cdn/{BL743E5J.js → M2EPGLCO.js} +1 -1
  135. package/dist/cdn/{JE3VXBIT.js → M2MHL5UA.js} +1 -1
  136. package/dist/cdn/{ZOP2TIVZ.js → M2O6IGEH.js} +1 -1
  137. package/dist/cdn/{DMDH2HX6.js → M47N46M3.js} +1 -1
  138. package/dist/cdn/{DY6AWYYR.js → M7P6P7TR.js} +1 -1
  139. package/dist/cdn/MCKFNVHF.js +2 -0
  140. package/dist/cdn/{M3E7HDLV.js → MIRNWIIY.js} +1 -1
  141. package/dist/cdn/{BOVVMQMM.js → MNMMINQH.js} +1 -1
  142. package/dist/cdn/{ZAJLG5HP.js → N6Y3DBA3.js} +1 -1
  143. package/dist/cdn/{BLKRIIHC.js → N7G6DMQS.js} +1 -1
  144. package/dist/cdn/{JTNXXFZB.js → N7QPTZOY.js} +1 -1
  145. package/dist/cdn/{PTHSNQL2.js → NDMHZQ2Z.js} +1 -1
  146. package/dist/cdn/{EO2XFNMR.js → NEA3AO6Y.js} +1 -1
  147. package/dist/cdn/{AM3UJO3A.js → NFE73D6R.js} +1 -1
  148. package/dist/cdn/{HKAQY5N7.js → NJ4CBOJN.js} +1 -1
  149. package/dist/cdn/{G5IFQKFE.js → NMWFIDS3.js} +1 -1
  150. package/dist/cdn/{HVYQFEOR.js → O2HG2WMJ.js} +1 -1
  151. package/dist/cdn/{WTNO7O72.js → OEOLTZDB.js} +1 -1
  152. package/dist/cdn/{FVNPR5KH.js → OGYCHIZS.js} +1 -1
  153. package/dist/cdn/{FG4BZ3AS.js → OHVLO7G3.js} +1 -1
  154. package/dist/cdn/{M47KXCDY.js → OIZPPRAI.js} +1 -1
  155. package/dist/cdn/{BLEHZ6OK.js → OMNTRBAL.js} +1 -1
  156. package/dist/cdn/{VYS45ONH.js → P62M6P6V.js} +1 -1
  157. package/dist/cdn/{OPU3AHDF.js → PGOXXWOQ.js} +1 -1
  158. package/dist/cdn/{46OBBNLU.js → PLZVYFQY.js} +1 -1
  159. package/dist/cdn/{DTB572CE.js → PUF3LPVV.js} +1 -1
  160. package/dist/cdn/{ZNQZFSHJ.js → Q44GFWWJ.js} +1 -1
  161. package/dist/cdn/{RITUH7JT.js → Q547RMCD.js} +1 -1
  162. package/dist/cdn/{R6HFI3H6.js → QBG72UPT.js} +1 -1
  163. package/dist/cdn/{VJNK2ZS5.js → QJHRY67D.js} +1 -1
  164. package/dist/cdn/{XHT2V7M3.js → QJUYGJUN.js} +1 -1
  165. package/dist/cdn/{M3DP7XNI.js → QLIWDFZI.js} +1 -1
  166. package/dist/cdn/{N2H3FZDY.js → QMBBO7TG.js} +1 -1
  167. package/dist/cdn/{C6GVSQON.js → QMVQEHGP.js} +1 -1
  168. package/dist/cdn/{GTSPZDUD.js → QMXF5LPA.js} +1 -1
  169. package/dist/cdn/{CMNJTTHD.js → QORUWAIX.js} +1 -1
  170. package/dist/cdn/{BE273TAF.js → QXYIAQJR.js} +1 -1
  171. package/dist/cdn/{Z7ULZVXI.js → R5RHR73A.js} +1 -1
  172. package/dist/cdn/{OXJ6JBJF.js → R5ZY52DF.js} +1 -1
  173. package/dist/cdn/{ZVPFP6UF.js → RAUX4YDR.js} +1 -1
  174. package/dist/cdn/{N3DNKKJG.js → RDA3MEE2.js} +1 -1
  175. package/dist/cdn/{AOZTFK3U.js → RDWM76R2.js} +1 -1
  176. package/dist/cdn/{4ZPF4DPX.js → RNUWRSX7.js} +1 -1
  177. package/dist/cdn/{4B63G73N.js → RP6OFG3R.js} +1 -1
  178. package/dist/cdn/{MT2XDN52.js → RUPHNC7P.js} +1 -1
  179. package/dist/cdn/{ALID7JW4.js → RYBETUNL.js} +1 -1
  180. package/dist/cdn/{EYVFMVPE.js → S6IOKQMR.js} +1 -1
  181. package/dist/cdn/{COI7ESYH.js → SB4Y3KAP.js} +1 -1
  182. package/dist/cdn/{LG7BOXTO.js → SMTTIAFG.js} +1 -1
  183. package/dist/cdn/{6W3RHVL6.js → SRAXSED3.js} +1 -1
  184. package/dist/cdn/{XCDWWNUJ.js → SWDOEOEG.js} +1 -1
  185. package/dist/cdn/{ND64EMQB.js → T2JPACWT.js} +1 -1
  186. package/dist/cdn/{3RQ3RPYE.js → T2SDOX4F.js} +1 -1
  187. package/dist/cdn/{USMSBMGF.js → T4TCUOUB.js} +1 -1
  188. package/dist/cdn/{AACRVMCQ.js → TCLKWOOM.js} +1 -1
  189. package/dist/cdn/{MGVKXR2F.js → THUDFQBI.js} +1 -1
  190. package/dist/cdn/{GP76UUFG.js → TKTHZ2GE.js} +1 -1
  191. package/dist/cdn/{PPP32ZQ6.js → TPF6CQWI.js} +1 -1
  192. package/dist/cdn/{7BQONNCF.js → TZGK64CZ.js} +1 -1
  193. package/dist/cdn/{R4QRHWKF.js → TZTJY3L5.js} +1 -1
  194. package/dist/cdn/{3B3RGT2G.js → U257QRYB.js} +1 -1
  195. package/dist/cdn/{EVKE3MXB.js → U5BDUCMV.js} +1 -1
  196. package/dist/cdn/{3VRGZ2CJ.js → U6BJ5CHT.js} +1 -1
  197. package/dist/cdn/{OBWR4UBY.js → UFBHHNY2.js} +1 -1
  198. package/dist/cdn/{YI4GBTAA.js → UHY4YPDH.js} +1 -1
  199. package/dist/cdn/{GKOH4UXJ.js → UJ3FO7VY.js} +1 -1
  200. package/dist/cdn/{QGWMP6TU.js → UVZRGGFM.js} +1 -1
  201. package/dist/cdn/{BNRS5ISC.js → VJIYYZW3.js} +1 -1
  202. package/dist/cdn/{3H2WSSI4.js → VOQLL5JZ.js} +1 -1
  203. package/dist/cdn/{XKC3DFCU.js → VQG7S23K.js} +1 -1
  204. package/dist/cdn/{CSXSF4DA.js → VQUASLS6.js} +1 -1
  205. package/dist/cdn/VRD2Y5E5.js +2 -0
  206. package/dist/cdn/{JHNUTIAE.js → VRZ2TCPU.js} +1 -1
  207. package/dist/cdn/{3Y4QI3WS.js → W3LWWKRB.js} +1 -1
  208. package/dist/cdn/{COUGJ3JE.js → WCWRRXW6.js} +1 -1
  209. package/dist/cdn/{VV6AUGJZ.js → WTQIUFRF.js} +1 -1
  210. package/dist/cdn/{EKJMDF7F.js → WW47L2EV.js} +1 -1
  211. package/dist/cdn/{HEOLO6IC.js → X3TEGOBL.js} +1 -1
  212. package/dist/cdn/{PCH6Y2RV.js → X6USSZBP.js} +1 -1
  213. package/dist/cdn/{APBDKO3B.js → XLAW24IV.js} +1 -1
  214. package/dist/cdn/{Y6OCHJCV.js → XLFPJW7K.js} +1 -1
  215. package/dist/cdn/{JEYAZUI2.js → XPBKTZ6K.js} +1 -1
  216. package/dist/cdn/{GRALXE5Q.js → XRPHEZZD.js} +1 -1
  217. package/dist/cdn/{MAYBKX24.js → XUL2L7MJ.js} +1 -1
  218. package/dist/cdn/{UBUAQKOP.js → XZSUBU4T.js} +1 -1
  219. package/dist/cdn/{N4PYAXDZ.js → Y52XLS45.js} +1 -1
  220. package/dist/cdn/YJYUG3DP.js +2 -0
  221. package/dist/cdn/{BEOMWPHI.js → YVQ5XK57.js} +1 -1
  222. package/dist/cdn/{JRY4Y7OA.js → ZA7J2T63.js} +1 -1
  223. package/dist/cdn/{DVDREAS2.js → ZMLP2ZB4.js} +1 -1
  224. package/dist/cdn/{UJAX7TII.js → ZWAOPC3F.js} +1 -1
  225. package/dist/cdn/index.js +1 -1
  226. package/dist/chunks/slots.js +9 -9
  227. package/dist/chunks/useArcgisViewReadyError.js +30 -35
  228. package/dist/components/arcgis-aggregated-features/customElement.js +58 -58
  229. package/dist/components/arcgis-features-next/customElement.js +30 -30
  230. package/dist/docs/api.json +1 -1
  231. package/dist/docs/docs.json +1 -1
  232. package/dist/docs/web-types.json +1 -1
  233. package/dist/loader.js +1 -1
  234. package/package.json +4 -4
  235. package/dist/cdn/2XJT2TPM.js +0 -2
  236. package/dist/cdn/BEEFONS5.js +0 -2
  237. package/dist/cdn/CRQRQION.js +0 -2
  238. package/dist/cdn/EOUNEK6M.js +0 -2
  239. package/dist/cdn/ERZ355Q7.js +0 -2
  240. package/dist/cdn/NEEJOYOU.js +0 -2
  241. package/dist/cdn/PZLLNFJO.js +0 -2
  242. /package/dist/cdn/{QL3M4ZI7.js → ZJZBS5ZY.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as z}from"./6OVA7KIZ.js";import j from"./2WLXD7OI.js";import{a as y}from"./PTHSNQL2.js";import{a as d}from"./JD74LG7K.js";import h from"./RTXRLIYL.js";import g from"./AM3UJO3A.js";import{g as x}from"./CNA7TDZN.js";import"./VJMC3CMB.js";import e from"./LIBO3YUY.js";import"./QUZTFUWM.js";import{d as s}from"./M3DP7XNI.js";import{N as _,O as a,P as c,Q as o,T as w,a as b,b as i,w as f}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:E},{getBasemapThumbnailUrl:T},j,,,,k])=>{var C=b`.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}.root{box-shadow:none;background-color:var(--calcite-color-transparent)}.root calcite-button{flex-direction:row;justify-content:center;align-items:center;width:69px;height:69px;display:flex;position:relative;overflow:visible}.container,.image{width:64px;height:64px;position:absolute;top:0;left:0;overflow:hidden}.container{box-shadow:0 1px 2px #0000004d}.image{background-color:var(--calcite-color-foreground-1);background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%3e%3cpath%20fill='%236E6E6E'%20d='M16%2016v32h32V16H16zm17.028%2011.947l.022.106c.175.863.272%201.67-.46%202.066-.52.28-.792.764-1.014%201.155-.28.497-.414.684-.715.684-.158%200-.283-.085-.486-.24-.25-.192-.558-.426-1.03-.426-.692%200-1.255.606-1.255%201.35%200%20.475-.422%201.353-1.022%201.353-.49%200-.652-.172-.763-.37-.296-.53-.665-1.193-1.51-1.193-.85%200-1.542.735-1.542%201.635%200%20.286.06.508.11.702.044.165.083.31.083.478%200%20.244-.102.428-.23.666-.152.278-.34.62-.34%201.09%200%20.613.563%201.113%201.255%201.113.393%200%20.654-.104.865-.186.195-.078.332-.125.56-.103.103.01.21.3.21.5%200%20.323-.274.598-.59.914-.514.512-1.22%201.212-.638%202.368.22.444.758.57%201.277.69.24.057.416.095.56.132%200%200%20.254.34.318.536a.616.616%200%2000.013.23.92.92%200%2001-.17.506c-.253.382-.548.597-.862.825-.623.458-1.14.536-1.156%201.47H18V18h21.48c.03.578-.903%201.22-.903%201.22l-.98.58c-1.054.672-2.254%201.703-2.254%202.56%200%20.377.15.646.27.86.1.177.157.283.157.417%200%20.19-.126.316-.41.56-.25.215-.534.453-.663.84a1.27%201.27%200%2000-.064.4c0%20.138.03.307.063.488.028.153.09.472.042.547%200%200-.054.04-.258.04l-.174-.006c-.37%200-.75.303-.98.582-.172.206-.363.528-.298.86zM46%2046h-9.23c-.207-1.22-1.35-1.258-2.168-1.556-.288-.107-.585-.213-.858-.353-.354-.184-.35-.585-.296-.89%200%200%20.102-.303.09-.37l.003-.002c-.006-.036-.013-.067-.013-.11%200-.23.213-.34.7-.574.507-.25%201.2-.577%201.2-1.39%200-.293-.13-.488-.216-.62-.053-.08-.07-.11-.07-.132%200-.172.068-.286.332-.524.283-.253.628-.6.628-1.19v-.93c0-.092.27-.195.605-.03.165.078.41.188.715.188.672%200%201.04-.494%201.3-.853.24-.332.33-.516.565-.48.235.042.15.05.324.41.12.25.26.538.52.763.454.397.98.528%201.506.57a6.126%206.126%200%20001.996.005l.168-.027a4.14%204.14%200%2001.98-.067s.09.022.14.006c.39.044.717.177.98.458l.1.248c.003.005-.003.01%200%20.015V46z'/%3e%3cpath%20clip-rule='evenodd'%20fill='none'%20d='M16%2016h32v32H16z'/%3e%3cpath%20fill='none'%20d='M0%200h64v64H0z'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:cover}.image-loading{background-image:unset;justify-content:center;align-items:center;display:flex}.image-secondary{margin-top:5px;margin-left:5px;animation:2s ease-in-out esri-basemap-slide;box-shadow:0 1px 2px #0000004d}.overlay-scrim{--calcite-scrim-background: #00000080;color:var(--calcite-color-text-inverse)}.overlay{background-color:var(--calcite-color-transparent);justify-content:center;align-items:flex-end;width:100%;height:100%;transition:background-color .125s ease-in-out;display:flex;position:absolute}.overlay .root:hover{background-color:var(--calcite-color-background)}.title{text-align:center;background-color:var(--calcite-color-transparent-tint);flex:1 0 100%;height:auto;padding:.5em;font-size:var(--calcite-font-size-xs);font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-tight)}.title-wrap{text-wrap:wrap}`,D=k(j),g=class extends _{constructor(){super(...arguments),this.messages=y(),this.viewModel=D(this),this.view=this.viewModel.view,this.activeBasemap=this.viewModel.activeBasemap,this.autoDestroyDisabled=!1,this.icon="layer-basemap",this.nextBasemap=this.viewModel.nextBasemap,this.showTitle=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=x()("activeBasemap","nextBasemap","state"),this.arcgisReady=f()}static{this.properties={_basemapSelectedMessage:16,view:0,activeBasemap:32,autoDestroyDisabled:5,icon:1,label:1,messageOverrides:0,nextBasemap:1,referenceElement:1,showTitle:5,state:32}}static{this.styles=[C,z]}async destroy(){await this.manager.destroy()}async toggle(){return await this.viewModel.toggle()}loaded(){this.manager.onLifecycle(()=>[E(()=>this.activeBasemap?.title,(e,t)=>{!e||!t||(this._basemapSelectedMessage=e?this.messages.basemapSelected?.replace("{activeBasemap.title}",e):void 0)})])}_getThumbnailStyles(e){let t=T(e);return t?{backgroundImage:`url(${t})`}:{backgroundImage:""}}render(){let e=this.viewModel,t=e.state==="disabled"?null:e.activeBasemap,r=e.state==="disabled"?null:e.nextBasemap,$=e.state==="loading",p=e.state==="incompatible-next-basemap",n=r?.title??"",h=r&&r.loadStatus!=="loaded",m,u=this.showTitle&&n,v=p,M=u||v,B=this._getThumbnailStyles(t),S=this._getThumbnailStyles(r);M&&(m=i`<div class="overlay">${u?i`<span class=${a(s("title","title-wrap"))} title=${n??o}>${n}</span>`:null}${v?i`<calcite-scrim class="overlay-scrim" title=${this.messages.incompatibleSpatialReference??o}><calcite-icon icon=exclamation-mark-triangle></calcite-icon></calcite-scrim>`:null}</div>`);let l=this.label??this.messages.componentLabel;return i`<div class=${a(s("root",d.widget))}>${this._basemapSelectedMessage?i`<div class="sr-only" aria-live=polite>${this._basemapSelectedMessage}</div>`:null}<calcite-button appearance=transparent data-basemap-id=${(r?r.id:"")??o} .disabled=${p} kind=neutral .label=${l} @click=${()=>{this.toggle()}} title=${l??o}><span class="sr-only">${l}</span><div class=${a(s("container","image-secondary"))}><div class="image" style=${c(B)}></div></div><div class="container"><div class=${a(s("image",h?"image-loading":null))} style=${c(S)}>${h||$?i`<calcite-scrim><span aria-hidden=true class=${a(d.loaderAnimation)} role=presentation></span></calcite-scrim>`:null}</div>${m}</div></calcite-button></div>`}};w("arcgis-basemap-toggle",g);return g},"core/reactiveUtils","applications/Components/basemapUtils","widgets/BasemapToggle/BasemapToggleViewModel",e,g,h,j)
2
+ import{a as z}from"./7FSKEJN5.js";import j from"./G3GFYB3W.js";import{a as y}from"./NDMHZQ2Z.js";import{a as d}from"./JD74LG7K.js";import h from"./K3VQUQ6I.js";import g from"./NFE73D6R.js";import{g as x}from"./5GFBHLDY.js";import"./42UVPIOD.js";import e from"./34IPKNHM.js";import"./QUZTFUWM.js";import{d as s}from"./QLIWDFZI.js";import{N as _,O as a,P as c,Q as o,T as w,a as b,b as i,w as f}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:E},{getBasemapThumbnailUrl:T},j,,,,k])=>{var C=b`.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}.root{box-shadow:none;background-color:var(--calcite-color-transparent)}.root calcite-button{flex-direction:row;justify-content:center;align-items:center;width:69px;height:69px;display:flex;position:relative;overflow:visible}.container,.image{width:64px;height:64px;position:absolute;top:0;left:0;overflow:hidden}.container{box-shadow:0 1px 2px #0000004d}.image{background-color:var(--calcite-color-foreground-1);background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2064%2064'%3e%3cpath%20fill='%236E6E6E'%20d='M16%2016v32h32V16H16zm17.028%2011.947l.022.106c.175.863.272%201.67-.46%202.066-.52.28-.792.764-1.014%201.155-.28.497-.414.684-.715.684-.158%200-.283-.085-.486-.24-.25-.192-.558-.426-1.03-.426-.692%200-1.255.606-1.255%201.35%200%20.475-.422%201.353-1.022%201.353-.49%200-.652-.172-.763-.37-.296-.53-.665-1.193-1.51-1.193-.85%200-1.542.735-1.542%201.635%200%20.286.06.508.11.702.044.165.083.31.083.478%200%20.244-.102.428-.23.666-.152.278-.34.62-.34%201.09%200%20.613.563%201.113%201.255%201.113.393%200%20.654-.104.865-.186.195-.078.332-.125.56-.103.103.01.21.3.21.5%200%20.323-.274.598-.59.914-.514.512-1.22%201.212-.638%202.368.22.444.758.57%201.277.69.24.057.416.095.56.132%200%200%20.254.34.318.536a.616.616%200%2000.013.23.92.92%200%2001-.17.506c-.253.382-.548.597-.862.825-.623.458-1.14.536-1.156%201.47H18V18h21.48c.03.578-.903%201.22-.903%201.22l-.98.58c-1.054.672-2.254%201.703-2.254%202.56%200%20.377.15.646.27.86.1.177.157.283.157.417%200%20.19-.126.316-.41.56-.25.215-.534.453-.663.84a1.27%201.27%200%2000-.064.4c0%20.138.03.307.063.488.028.153.09.472.042.547%200%200-.054.04-.258.04l-.174-.006c-.37%200-.75.303-.98.582-.172.206-.363.528-.298.86zM46%2046h-9.23c-.207-1.22-1.35-1.258-2.168-1.556-.288-.107-.585-.213-.858-.353-.354-.184-.35-.585-.296-.89%200%200%20.102-.303.09-.37l.003-.002c-.006-.036-.013-.067-.013-.11%200-.23.213-.34.7-.574.507-.25%201.2-.577%201.2-1.39%200-.293-.13-.488-.216-.62-.053-.08-.07-.11-.07-.132%200-.172.068-.286.332-.524.283-.253.628-.6.628-1.19v-.93c0-.092.27-.195.605-.03.165.078.41.188.715.188.672%200%201.04-.494%201.3-.853.24-.332.33-.516.565-.48.235.042.15.05.324.41.12.25.26.538.52.763.454.397.98.528%201.506.57a6.126%206.126%200%20001.996.005l.168-.027a4.14%204.14%200%2001.98-.067s.09.022.14.006c.39.044.717.177.98.458l.1.248c.003.005-.003.01%200%20.015V46z'/%3e%3cpath%20clip-rule='evenodd'%20fill='none'%20d='M16%2016h32v32H16z'/%3e%3cpath%20fill='none'%20d='M0%200h64v64H0z'/%3e%3c/svg%3e");background-position:50%;background-repeat:no-repeat;background-size:cover}.image-loading{background-image:unset;justify-content:center;align-items:center;display:flex}.image-secondary{margin-top:5px;margin-left:5px;animation:2s ease-in-out esri-basemap-slide;box-shadow:0 1px 2px #0000004d}.overlay-scrim{--calcite-scrim-background: #00000080;color:var(--calcite-color-text-inverse)}.overlay{background-color:var(--calcite-color-transparent);justify-content:center;align-items:flex-end;width:100%;height:100%;transition:background-color .125s ease-in-out;display:flex;position:absolute}.overlay .root:hover{background-color:var(--calcite-color-background)}.title{text-align:center;background-color:var(--calcite-color-transparent-tint);flex:1 0 100%;height:auto;padding:.5em;font-size:var(--calcite-font-size-xs);font-weight:var(--calcite-font-weight-medium);line-height:var(--calcite-font-line-height-relative-tight)}.title-wrap{text-wrap:wrap}`,D=k(j),g=class extends _{constructor(){super(...arguments),this.messages=y(),this.viewModel=D(this),this.view=this.viewModel.view,this.activeBasemap=this.viewModel.activeBasemap,this.autoDestroyDisabled=!1,this.icon="layer-basemap",this.nextBasemap=this.viewModel.nextBasemap,this.showTitle=!1,this.state=this.viewModel.state,this.arcgisPropertyChange=x()("activeBasemap","nextBasemap","state"),this.arcgisReady=f()}static{this.properties={_basemapSelectedMessage:16,view:0,activeBasemap:32,autoDestroyDisabled:5,icon:1,label:1,messageOverrides:0,nextBasemap:1,referenceElement:1,showTitle:5,state:32}}static{this.styles=[C,z]}async destroy(){await this.manager.destroy()}async toggle(){return await this.viewModel.toggle()}loaded(){this.manager.onLifecycle(()=>[E(()=>this.activeBasemap?.title,(e,t)=>{!e||!t||(this._basemapSelectedMessage=e?this.messages.basemapSelected?.replace("{activeBasemap.title}",e):void 0)})])}_getThumbnailStyles(e){let t=T(e);return t?{backgroundImage:`url(${t})`}:{backgroundImage:""}}render(){let e=this.viewModel,t=e.state==="disabled"?null:e.activeBasemap,r=e.state==="disabled"?null:e.nextBasemap,$=e.state==="loading",p=e.state==="incompatible-next-basemap",n=r?.title??"",h=r&&r.loadStatus!=="loaded",m,u=this.showTitle&&n,v=p,M=u||v,B=this._getThumbnailStyles(t),S=this._getThumbnailStyles(r);M&&(m=i`<div class="overlay">${u?i`<span class=${a(s("title","title-wrap"))} title=${n??o}>${n}</span>`:null}${v?i`<calcite-scrim class="overlay-scrim" title=${this.messages.incompatibleSpatialReference??o}><calcite-icon icon=exclamation-mark-triangle></calcite-icon></calcite-scrim>`:null}</div>`);let l=this.label??this.messages.componentLabel;return i`<div class=${a(s("root",d.widget))}>${this._basemapSelectedMessage?i`<div class="sr-only" aria-live=polite>${this._basemapSelectedMessage}</div>`:null}<calcite-button appearance=transparent data-basemap-id=${(r?r.id:"")??o} .disabled=${p} kind=neutral .label=${l} @click=${()=>{this.toggle()}} title=${l??o}><span class="sr-only">${l}</span><div class=${a(s("container","image-secondary"))}><div class="image" style=${c(B)}></div></div><div class="container"><div class=${a(s("image",h?"image-loading":null))} style=${c(S)}>${h||$?i`<calcite-scrim><span aria-hidden=true class=${a(d.loaderAnimation)} role=presentation></span></calcite-scrim>`:null}</div>${m}</div></calcite-button></div>`}};w("arcgis-basemap-toggle",g);return g},"core/reactiveUtils","applications/Components/basemapUtils","widgets/BasemapToggle/BasemapToggleViewModel",e,g,h,j)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{l as g}from"./LDDAJOTV.js";import{g as p}from"./CNA7TDZN.js";import{N as l,R as d,T as c,a as n,b as s}from"./QL3M4ZI7.js";var m=n`@keyframes esri-basemap-slide{0%{opacity:0;margin-top:0;margin-left:0}75%{opacity:0;margin-top:0;margin-left:0}to{opacity:1;margin-top:5px;margin-left:5px}}@keyframes esri-docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes popup-intro-animation-up{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted #000}}@keyframes esri-spinner--start-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes esri-spinner--finish-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@keyframes esri-spinner--rotate-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion){.esri-utility-network-trace__reset-prompt{animation:none!important}}@media(prefers-reduced-motion){.esri-popup--aligned-top-center,.esri-popup--aligned-top-left,.esri-popup--aligned-top-right,.esri-popup--aligned-bottom-center,.esri-popup--aligned-bottom-left,.esri-popup--aligned-bottom-right,.esri-popup--is-docked{animation:none!important}}@media(prefers-reduced-motion:reduce){.esri-fov-overlay{animation:none!important}}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}.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{display:flex;width:100%;div{width:100%}}arcgis-legend{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow:hidden;overflow-y:auto}`,r=class extends l{constructor(){super(...arguments),this._disabled=null,this.content=this.item?.panel.content,this.listItem=this.item?.panel.listItem??this.item,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=p()("listItem")}static{this.properties={_canCreateLegend:16,_legendLayerInfo:16,content:1,item:0,disabled:5,listItem:0,view:0,autoDestroyDisabled:5}}static{this.styles=m}get _canCreateLegend(){let{content:e,listItem:t}=this.item?.panel??{};if(!t)return!1;let i="legend";return e===i?!0:e!=null&&(Array.isArray(e)?e.includes(i):!1)}get _legendLayerInfo(){let e=this.item?.panel?.listItem?.layer;if(!e||e.type==="subtype-sublayer")return null;let t=g(e)?e:null,i=t?.source?.type==="map-layer"?t.source:null,o="layer"in e&&e.layer,a="";return i&&o?{layer:o,title:a,sublayerIds:[i.mapLayerId]}:{layer:e,title:a}}get disabled(){let{_legendElement:e}=this,{content:t,listItem:i}=this.item?.panel??{};return this._disabled!=null?this._disabled:i?Array.isArray(t)&&t.length>1?!1:e?!e.activeLayerInfos?.length||!i.visibleAtCurrentScale||!i.visible:!1:!0}set disabled(e){this._disabled=e}async destroy(){await this.manager.destroy()}updated(){this._loadLegend()}async _loadLegend(){this._canCreateLegend&&(this._legendElement||(this._legendElement=this._createLegendElement()))}_createLegendElement(){return d(s`<arcgis-legend .view=${this.view} @arcgisReady=${e=>e.stopPropagation()} .layerInfos=${this._legendLayerInfo?[this._legendLayerInfo]:[]}></arcgis-legend>`)}render(){return this._renderContents()}_renderContent(e){let{disabled:t}=this;return!e||t||!this.item?.panel?.open?null:e==="legend"?(this._legendElement||this._loadLegend(),this._legendElement):e instanceof HTMLElement||typeof e=="string"?e:null}_renderContents(){let{content:e,open:t}=this.item?.panel??{};return t?Array.isArray(e)?e.map(i=>this._renderContent(i)):this._renderContent(e):null}};c("arcgis-layer-list-item-panel",r);export{r as a};
2
+ import{l as g}from"./LDDAJOTV.js";import{g as p}from"./5GFBHLDY.js";import{N as l,R as d,T as c,a as n,b as s}from"./ZJZBS5ZY.js";var m=n`@keyframes esri-basemap-slide{0%{opacity:0;margin-top:0;margin-left:0}75%{opacity:0;margin-top:0;margin-left:0}to{opacity:1;margin-top:5px;margin-left:5px}}@keyframes esri-docking-animation{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes popup-intro-animation-down{0%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes popup-intro-animation-up{0%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@supports (-ms-ime-align: auto){.esri-slider__anchor:focus{outline:1px dotted #000}}@keyframes esri-spinner--start-animation{0%{opacity:0;transform:scale(0)}to{opacity:1;transform:scale(1)}}@keyframes esri-spinner--finish-animation{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(0)}}@keyframes esri-spinner--rotate-animation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media(prefers-reduced-motion){.esri-utility-network-trace__reset-prompt{animation:none!important}}@media(prefers-reduced-motion){.esri-popup--aligned-top-center,.esri-popup--aligned-top-left,.esri-popup--aligned-top-right,.esri-popup--aligned-bottom-center,.esri-popup--aligned-bottom-left,.esri-popup--aligned-bottom-right,.esri-popup--is-docked{animation:none!important}}@media(prefers-reduced-motion:reduce){.esri-fov-overlay{animation:none!important}}@keyframes esri-fade-in-down{0%{opacity:0;transform:translateY(-5px)}25%{opacity:0;transform:translateY(-5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in-up{0%{opacity:0;transform:translateY(5px)}25%{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translate(0)}}@keyframes esri-fade-in{0%{opacity:0}25%{opacity:0}to{opacity:1}}@keyframes esri-fade-in-scale{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes looping-progresss-bar-ani{0%{width:0;left:0}20%{width:20%;left:0}80%{width:20%;left:80%}to{width:0;left:100%}}@keyframes esri-rotate{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@keyframes panel-advance{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-advance--rtl{0%{opacity:0;transform:translate(-50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}@keyframes panel-retreat--rtl{0%{opacity:0;transform:translate(50px) scale(.99)}to{opacity:1;transform:translate(0) scale(1)}}.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{display:flex;width:100%;div{width:100%}}arcgis-legend{width:100%;max-width:100%;min-width:0;box-sizing:border-box;overflow:hidden;overflow-y:auto}`,r=class extends l{constructor(){super(...arguments),this._disabled=null,this.content=this.item?.panel.content,this.listItem=this.item?.panel.listItem??this.item,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=p()("listItem")}static{this.properties={_canCreateLegend:16,_legendLayerInfo:16,content:1,item:0,disabled:5,listItem:0,view:0,autoDestroyDisabled:5}}static{this.styles=m}get _canCreateLegend(){let{content:e,listItem:t}=this.item?.panel??{};if(!t)return!1;let i="legend";return e===i?!0:e!=null&&(Array.isArray(e)?e.includes(i):!1)}get _legendLayerInfo(){let e=this.item?.panel?.listItem?.layer;if(!e||e.type==="subtype-sublayer")return null;let t=g(e)?e:null,i=t?.source?.type==="map-layer"?t.source:null,o="layer"in e&&e.layer,a="";return i&&o?{layer:o,title:a,sublayerIds:[i.mapLayerId]}:{layer:e,title:a}}get disabled(){let{_legendElement:e}=this,{content:t,listItem:i}=this.item?.panel??{};return this._disabled!=null?this._disabled:i?Array.isArray(t)&&t.length>1?!1:e?!e.activeLayerInfos?.length||!i.visibleAtCurrentScale||!i.visible:!1:!0}set disabled(e){this._disabled=e}async destroy(){await this.manager.destroy()}updated(){this._loadLegend()}async _loadLegend(){this._canCreateLegend&&(this._legendElement||(this._legendElement=this._createLegendElement()))}_createLegendElement(){return d(s`<arcgis-legend .view=${this.view} @arcgisReady=${e=>e.stopPropagation()} .layerInfos=${this._legendLayerInfo?[this._legendLayerInfo]:[]}></arcgis-legend>`)}render(){return this._renderContents()}_renderContent(e){let{disabled:t}=this;return!e||t||!this.item?.panel?.open?null:e==="legend"?(this._legendElement||this._loadLegend(),this._legendElement):e instanceof HTMLElement||typeof e=="string"?e:null}_renderContents(){let{content:e,open:t}=this.item?.panel??{};return t?Array.isArray(e)?e.map(i=>this._renderContent(i)):this._renderContent(e):null}};c("arcgis-layer-list-item-panel",r);export{r as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import g from"./CL6JXK4J.js";import{a as Y,k as G}from"./4SV6HHMC.js";import f from"./PT7XD6RE.js";import"./VJVKFKSG.js";import e from"./2WLXD7OI.js";import{a as L}from"./PTHSNQL2.js";import c from"./RTXRLIYL.js";import b from"./AM3UJO3A.js";import{e as B,g as I}from"./CNA7TDZN.js";import"./VJMC3CMB.js";import a from"./LIBO3YUY.js";import"./QUZTFUWM.js";import{b as z}from"./M3DP7XNI.js";import{L as A,M,N as W,T as N,a as R,b as d,o as j,w as C}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([x,ut,mt,ht,{convertDateFormatToIntlOptions:T},it,{getTimeSliderSettingsFromWebDocument:ct},{property:l,subclass:dt},{watch:w,whenOnce:at},,,,U,{d:q,f:V,i:H},{a:J,b:K,c:S,d:$,e:Q,f:X,g:tt,h:D,i:et}])=>{var nt=new WeakMap,ot=new WeakMap;function vt(t){let{locale:e,formatOptions:a}=t,n=yt(a),u=new Intl.DateTimeFormat(e,n);return nt.set(t,u),u}function pt(t){let{locale:e,formatOptions:a}=t,n=new Intl.NumberFormat(e,a);return ot.set(t,n),n}function ft(t){return nt.get(t)??vt(t)}function gt(t){return ot.get(t)??pt(t)}function yt(t){return t.timeZone?{...t,timeZone:G(t.timeZone)}:t}var i=(t,e,a)=>({minorTick:t,majorTick:e,majorTickFormat:a}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},wt=[i({value:1,unit:"milliseconds"},{value:20,unit:"milliseconds"},s.sf),i({value:2,unit:"milliseconds"},{value:50,unit:"milliseconds"},s.sf),i({value:5,unit:"milliseconds"},{value:100,unit:"milliseconds"},s.sf),i({value:10,unit:"milliseconds"},{value:200,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},{value:500,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},{value:1,unit:"seconds"},s.s),i({value:100,unit:"milliseconds"},{value:2,unit:"seconds"},s.s),i({value:200,unit:"milliseconds"},{value:5,unit:"seconds"},s.s),i({value:500,unit:"milliseconds"},{value:10,unit:"seconds"},s.s),i({value:1,unit:"seconds"},{value:20,unit:"seconds"},s.ms),i({value:2,unit:"seconds"},{value:30,unit:"seconds"},s.ms),i({value:5,unit:"seconds"},{value:1,unit:"minutes"},s.mi),i({value:10,unit:"seconds"},{value:2,unit:"minutes"},s.mi),i({value:20,unit:"seconds"},{value:5,unit:"minutes"},s.mi),i({value:40,unit:"seconds"},{value:10,unit:"minutes"},s.mi),i({value:1,unit:"minutes"},{value:30,unit:"minutes"},s.hm),i({value:2,unit:"minutes"},{value:1,unit:"hours"},s.hm),i({value:5,unit:"minutes"},{value:2,unit:"hours"},s.hm),i({value:10,unit:"minutes"},{value:4,unit:"hours"},s.hm),i({value:20,unit:"minutes"},{value:8,unit:"hours"},s.hm),i({value:40,unit:"minutes"},{value:1,unit:"days"},s.dm),i({value:1,unit:"hours"},{value:1,unit:"days"},s.dm),i({value:2,unit:"hours"},{value:2,unit:"days"},s.dm),i({value:5,unit:"hours"},{value:4,unit:"days"},s.dm),i({value:10,unit:"hours"},{value:10,unit:"days"},s.dm),i({value:20,unit:"hours"},{value:15,unit:"days"},s.dm),i({value:1,unit:"days"},{value:20,unit:"days"},s.dm),i({value:2,unit:"days"},{value:1,unit:"months"},s.m),i({value:5,unit:"days"},{value:3,unit:"months"},s.m),i({value:10,unit:"days"},{value:6,unit:"months"},s.my),i({value:20,unit:"days"},{value:1,unit:"years"},s.y),i({value:1,unit:"months"},{value:2,unit:"years"},s.y),i({value:2,unit:"months"},{value:4,unit:"years"},s.y),i({value:5,unit:"months"},{value:10,unit:"years"},s.y),i({value:1,unit:"years"},{value:20,unit:"years"},s.y),i({value:2,unit:"years"},{value:50,unit:"years"},s.y),i({value:5,unit:"years"},{value:100,unit:"years"},s.y),i({value:10,unit:"years"},{value:200,unit:"years"},s.y),i({value:20,unit:"years"},{value:500,unit:"years"},s.y),i({value:50,unit:"years"},{value:1e3,unit:"years"},s.y),i({value:1,unit:"centuries"},{value:20,unit:"centuries"},s.y),i({value:2,unit:"centuries"},{value:50,unit:"centuries"},s.y),i({value:5,unit:"centuries"},{value:100,unit:"centuries"},s.y),i({value:10,unit:"centuries"},{value:200,unit:"centuries"},s.y),i({value:20,unit:"centuries"},{value:500,unit:"centuries"},s.y),i({value:50,unit:"centuries"},{value:1e3,unit:"centuries"},s.y),i({value:100,unit:"centuries"},{value:2e3,unit:"centuries"},s.y),i({value:200,unit:"centuries"},{value:5e3,unit:"centuries"},s.y),i({value:500,unit:"centuries"},{value:1e4,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},{value:2e4,unit:"centuries"},s.y)];function xt(t){return wt.map(({minorTick:e,majorTick:a,majorTickFormat:n},u)=>{let h=new it(e),m=new it(a),p=h.toMilliseconds(),g={...n,timeZone:t};return{minor:h,major:m,duration:p,format:g,index:u}})}var Et=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,rt=t=>{throw TypeError(t)},r=(t,e,a,n)=>{for(var u=n>1?void 0:n?bt(e,a):e,h=t.length-1,m;h>=0;h--)(m=t[h])&&(u=(n?m(e,a,u):m(u))||u);return n&&u&&Et(e,a,u),u},lt=(t,e,a)=>e.has(t)||rt("Cannot "+a),k=(t,e,a)=>(lt(t,e,"read from private field"),a?a.call(t):e.get(t)),st=(t,e,a)=>e.has(t)?rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),v=(t,e,a)=>(lt(t,e,"access private method"),a),E,c,P,Z,b,_,F,o=class extends ut{constructor(){super(...arguments),st(this,c),st(this,E,new AbortController),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.savePersistedSettingsDisabled=!1,this.stops=J}get _adjustedMajorTickFormat(){let{era:t,timeZone:e}=this;return{...this.majorTickFormat,era:this.majorTickFormat?.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...T("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...T("short-date"),...T("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _timeFormat(){let{timeZone:t}=this;return{...T("long-time"),timeZone:t}}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if($(e)){let{dates:n}=e;if(!n?.length)return;let u=n.sort((f,y)=>f.getTime()-y.getTime());if(!t?.start||!t?.end)return u;let{start:h,end:m}=t,p=h.getTime(),g=m.getTime();return u.filter(f=>{let y=f.getTime();return y>=p&&y<=g})}let a=e.timeExtent??t;if(a)return S(e)?X(a,e.count):tt(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled")}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:n}=e??{};if(!a||!n||!t||t.isAllTime||t.isEmpty)return!0;let{start:u,end:h}=t??{},m=u!=null&&(u<a||u>n),p=h!=null&&(h>n||h<a);return m||p}get majorTickFormatter(){return t=>this._formatDate(t,this._adjustedMajorTickFormat)}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&v(this,c,Z).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormats(){return xt(this.timeZone)}get timeZone(){return this._userTimeZone??this.viewTimeZone??Y}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.type==="2d"?this.view.timeZone:void 0}destroy(){k(this,E).abort(),this.view?.unregisterComponent(this),v(this,c,_).call(this)}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}getTickValues(t){let{fullTimeExtent:e,timeZone:a}=this;if(!e)return[];let{start:n,end:u}=e;return!n||!u?[]:et(n,u,t,a).map(h=>h.getTime())}async initialize(){this.addHandles([w(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=D(t,this.mode))},{initial:!0}),w(()=>this.timeExtent,t=>{!this.view||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||(this.view.timeExtent=t)},{initial:!0}),w(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),w(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),w(()=>this.view?.timeExtent,t=>{!t||t.equals(this.timeExtent)||t.isAllTime&&(!this.timeExtent||this.timeExtent.isAllTime)||(this.timeExtent=t??void 0)}),w(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new x({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await V((async()=>{if(await at(()=>this.view?.ready,{signal:k(this,E).signal}),this.loadPersistedSettingsDisabled)return;let t=await ct(this.view?.map,k(this,E).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){v(this,c,b).call(this,{forward:!0,allowRestart:!1})}play(){v(this,c,Z).call(this)}previous(){v(this,c,b).call(this,{forward:!1,allowRestart:!1})}stop(){v(this,c,_).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new mt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:S(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:Q(this.stops)?this.stops.interval:null,stops:$(this.stops)?this.stops.dates:null});t.widgets??=new ht,t.widgets.timeSlider=e}_formatDate(t,e){return ft({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return gt({locale:this.locale,formatOptions:e}).format(t)}};E=new WeakMap;c=new WeakSet;P=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([H(this.playRate,e),t&&at(()=>!t.updating,e)])}catch(t){q(t)||j("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}v(this,c,b).call(this,{forward:!0,allowRestart:!1}),this._animationController&&v(this,c,P).call(this)};Z=function(){v(this,c,_).call(this),this._animationController=new AbortController,v(this,c,b).call(this,{forward:!0,allowRestart:!0}),v(this,c,P).call(this)};b=function({forward:t,allowRestart:e}){let{_thumbPositions:a,effectiveStopsEpoch:n}=this;if(!a||!n)return;let u=a.map(m=>{let p=n.indexOf(m);if(p!==-1)return p;let g=n.reduce((f,y)=>Math.abs(y-m)<Math.abs(f-m)?y:f);return n.indexOf(g)}),h=u.map(m=>m+=t?1:-1);if(h.some(m=>m<0||m>n.length-1))if(this.loop||e){let m=Math.min(...u),p=Math.max(...u),g=(t?u.map(f=>f-m):u.map(f=>f+(n.length-1-p))).map(f=>n[f]);this.timeExtent=v(this,c,F).call(this,g)}else this.state==="playing"&&this.stop();else{let m=h.map(p=>n[p]);this.timeExtent=v(this,c,F).call(this,m)}};_=function(){this._animationController?.abort(),this._animationController=void 0};F=function(t){if(!t)return;let e=[...t].sort((a,n)=>a-n).map(a=>new Date(a));return D(e,this.mode)};r([l()],o.prototype,"_adjustedMajorTickFormat",1);r([l()],o.prototype,"_animationController",2);r([l()],o.prototype,"_dateFormat",1);r([l()],o.prototype,"_dateTimeFormat",1);r([l()],o.prototype,"_thumbPositions",1);r([l()],o.prototype,"_timeFormat",1);r([l()],o.prototype,"_userTimeZone",2);r([l()],o.prototype,"disabled",2);r([l()],o.prototype,"effectiveStops",1);r([l()],o.prototype,"effectiveStopsEpoch",1);r([l()],o.prototype,"era",1);r([l()],o.prototype,"format",2);r([l({type:x})],o.prototype,"fullTimeExtent",2);r([l()],o.prototype,"interactive",1);r([l()],o.prototype,"isOutOfRange",1);r([l()],o.prototype,"loadPersistedSettingsDisabled",2);r([l()],o.prototype,"locale",2);r([l()],o.prototype,"loop",2);r([l()],o.prototype,"majorTickFormat",2);r([l()],o.prototype,"majorTickFormatter",1);r([l()],o.prototype,"mode",2);r([l({value:1e3})],o.prototype,"playRate",1);r([l()],o.prototype,"savePersistedSettingsDisabled",2);r([l()],o.prototype,"state",1);r([l({cast:K})],o.prototype,"stops",2);r([l()],o.prototype,"tickFormats",1);r([l({type:x})],o.prototype,"timeExtent",2);r([l()],o.prototype,"timeZone",1);r([l()],o.prototype,"view",2);r([l()],o.prototype,"viewTimeZone",1);o=r([dt("components.time-bar.TimeBarViewModel")],o);var Tt=R`:host{box-shadow:var(--arcgis-internal-box-shadow, var(--calcite-shadow-sm));transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`,_t=U(o),O=class extends W{constructor(){super(...arguments),this._viewModel=_t(this),this.messages=L({name:"time-bar",blocking:!0}),this.#t=A(),this.#e=B(),this.#i=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=I()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=C()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=Tt}#t;#e;#i;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#m(e){let{currentTarget:a}=e,n=z(a).at(0)??a.querySelector("arcgis-time-bar-extent");n&&(n.viewModel=this._viewModel)}async#h(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return d`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-disabled floating>${this.#e==="ltr"?d`${this.#a()}${this.#u()}${this.#l()}${this.#s()}`:d`${this.#l()}${this.#u()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#s(){return d`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?d`<calcite-action-group>${this.#e==="ltr"?d`${this.#o()}${this.#r()}${this.#n()}`:d`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"} icon=forward @click=${this.next} .text=${this.messages.next}></calcite-action>`:null}#o(){return this.showPlay?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#h} .text=${this.state==="playing"?this.messages.stop:this.messages.play}></calcite-action>`:null}#r(){return this.showPrevious?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"} icon=reverse @click=${this.previous} .text=${this.messages.previous}></calcite-action>`:null}#l(){return this.showSettings?d`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal ${M(this.#i)}></calcite-action>${this._settingsActionElement?d`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#u(){return d`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent class="label" .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`}};N("arcgis-time-bar",O);return O},"time/TimeExtent","core/Accessor","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,e,f,g)
2
+ import g from"./GIMPEDA6.js";import{a as Y,k as G}from"./4SV6HHMC.js";import f from"./FR3DD5XU.js";import"./VJVKFKSG.js";import e from"./G3GFYB3W.js";import{a as L}from"./NDMHZQ2Z.js";import c from"./K3VQUQ6I.js";import b from"./NFE73D6R.js";import{e as B,g as I}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import{b as z}from"./QLIWDFZI.js";import{L as A,M,N as W,T as N,a as R,b as d,o as j,w as C}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([x,ut,mt,ht,{convertDateFormatToIntlOptions:T},it,{getTimeSliderSettingsFromWebDocument:ct},{property:l,subclass:dt},{watch:w,whenOnce:at},,,,U,{d:q,f:V,i:H},{a:J,b:K,c:S,d:$,e:Q,f:X,g:tt,h:D,i:et}])=>{var nt=new WeakMap,ot=new WeakMap;function vt(t){let{locale:e,formatOptions:a}=t,n=yt(a),u=new Intl.DateTimeFormat(e,n);return nt.set(t,u),u}function pt(t){let{locale:e,formatOptions:a}=t,n=new Intl.NumberFormat(e,a);return ot.set(t,n),n}function ft(t){return nt.get(t)??vt(t)}function gt(t){return ot.get(t)??pt(t)}function yt(t){return t.timeZone?{...t,timeZone:G(t.timeZone)}:t}var i=(t,e,a)=>({minorTick:t,majorTick:e,majorTickFormat:a}),s={sf:{second:"numeric",fractionalSecondDigits:3},s:{second:"numeric"},ms:{minute:"numeric",second:"numeric"},mi:{minute:"numeric"},hm:{hour:"numeric",minute:"numeric"},dm:{day:"numeric",month:"short"},m:{month:"short"},my:{month:"short",year:"numeric"},y:{year:"numeric"}},wt=[i({value:1,unit:"milliseconds"},{value:20,unit:"milliseconds"},s.sf),i({value:2,unit:"milliseconds"},{value:50,unit:"milliseconds"},s.sf),i({value:5,unit:"milliseconds"},{value:100,unit:"milliseconds"},s.sf),i({value:10,unit:"milliseconds"},{value:200,unit:"milliseconds"},s.sf),i({value:20,unit:"milliseconds"},{value:500,unit:"milliseconds"},s.sf),i({value:50,unit:"milliseconds"},{value:1,unit:"seconds"},s.s),i({value:100,unit:"milliseconds"},{value:2,unit:"seconds"},s.s),i({value:200,unit:"milliseconds"},{value:5,unit:"seconds"},s.s),i({value:500,unit:"milliseconds"},{value:10,unit:"seconds"},s.s),i({value:1,unit:"seconds"},{value:20,unit:"seconds"},s.ms),i({value:2,unit:"seconds"},{value:30,unit:"seconds"},s.ms),i({value:5,unit:"seconds"},{value:1,unit:"minutes"},s.mi),i({value:10,unit:"seconds"},{value:2,unit:"minutes"},s.mi),i({value:20,unit:"seconds"},{value:5,unit:"minutes"},s.mi),i({value:40,unit:"seconds"},{value:10,unit:"minutes"},s.mi),i({value:1,unit:"minutes"},{value:30,unit:"minutes"},s.hm),i({value:2,unit:"minutes"},{value:1,unit:"hours"},s.hm),i({value:5,unit:"minutes"},{value:2,unit:"hours"},s.hm),i({value:10,unit:"minutes"},{value:4,unit:"hours"},s.hm),i({value:20,unit:"minutes"},{value:8,unit:"hours"},s.hm),i({value:40,unit:"minutes"},{value:1,unit:"days"},s.dm),i({value:1,unit:"hours"},{value:1,unit:"days"},s.dm),i({value:2,unit:"hours"},{value:2,unit:"days"},s.dm),i({value:5,unit:"hours"},{value:4,unit:"days"},s.dm),i({value:10,unit:"hours"},{value:10,unit:"days"},s.dm),i({value:20,unit:"hours"},{value:15,unit:"days"},s.dm),i({value:1,unit:"days"},{value:20,unit:"days"},s.dm),i({value:2,unit:"days"},{value:1,unit:"months"},s.m),i({value:5,unit:"days"},{value:3,unit:"months"},s.m),i({value:10,unit:"days"},{value:6,unit:"months"},s.my),i({value:20,unit:"days"},{value:1,unit:"years"},s.y),i({value:1,unit:"months"},{value:2,unit:"years"},s.y),i({value:2,unit:"months"},{value:4,unit:"years"},s.y),i({value:5,unit:"months"},{value:10,unit:"years"},s.y),i({value:1,unit:"years"},{value:20,unit:"years"},s.y),i({value:2,unit:"years"},{value:50,unit:"years"},s.y),i({value:5,unit:"years"},{value:100,unit:"years"},s.y),i({value:10,unit:"years"},{value:200,unit:"years"},s.y),i({value:20,unit:"years"},{value:500,unit:"years"},s.y),i({value:50,unit:"years"},{value:1e3,unit:"years"},s.y),i({value:1,unit:"centuries"},{value:20,unit:"centuries"},s.y),i({value:2,unit:"centuries"},{value:50,unit:"centuries"},s.y),i({value:5,unit:"centuries"},{value:100,unit:"centuries"},s.y),i({value:10,unit:"centuries"},{value:200,unit:"centuries"},s.y),i({value:20,unit:"centuries"},{value:500,unit:"centuries"},s.y),i({value:50,unit:"centuries"},{value:1e3,unit:"centuries"},s.y),i({value:100,unit:"centuries"},{value:2e3,unit:"centuries"},s.y),i({value:200,unit:"centuries"},{value:5e3,unit:"centuries"},s.y),i({value:500,unit:"centuries"},{value:1e4,unit:"centuries"},s.y),i({value:1e3,unit:"centuries"},{value:2e4,unit:"centuries"},s.y)];function xt(t){return wt.map(({minorTick:e,majorTick:a,majorTickFormat:n},u)=>{let h=new it(e),m=new it(a),p=h.toMilliseconds(),g={...n,timeZone:t};return{minor:h,major:m,duration:p,format:g,index:u}})}var Et=Object.defineProperty,bt=Object.getOwnPropertyDescriptor,rt=t=>{throw TypeError(t)},r=(t,e,a,n)=>{for(var u=n>1?void 0:n?bt(e,a):e,h=t.length-1,m;h>=0;h--)(m=t[h])&&(u=(n?m(e,a,u):m(u))||u);return n&&u&&Et(e,a,u),u},lt=(t,e,a)=>e.has(t)||rt("Cannot "+a),k=(t,e,a)=>(lt(t,e,"read from private field"),a?a.call(t):e.get(t)),st=(t,e,a)=>e.has(t)?rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,a),v=(t,e,a)=>(lt(t,e,"access private method"),a),E,c,P,Z,b,_,F,o=class extends ut{constructor(){super(...arguments),st(this,c),st(this,E,new AbortController),this.disabled=!1,this.format="date",this.loadPersistedSettingsDisabled=!1,this.loop=!1,this.mode="time-window",this.savePersistedSettingsDisabled=!1,this.stops=J}get _adjustedMajorTickFormat(){let{era:t,timeZone:e}=this;return{...this.majorTickFormat,era:this.majorTickFormat?.year?t:void 0,timeZone:e}}get _dateFormat(){let{era:t,timeZone:e}=this;return{...T("short-date"),era:t,timeZone:e}}get _dateTimeFormat(){let{era:t,timeZone:e}=this;return{...T("short-date"),...T("long-time"),era:t,timeZone:e}}get _thumbPositions(){if(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty)return null;let{start:t,end:e}=this.timeExtent;switch(this.mode){case"cumulative-from-end":case"instant":return t?[t.getTime()]:null;case"cumulative-from-start":return e?[e.getTime()]:null;case"time-window":return t&&e?[t.getTime(),e.getTime()]:null}}get _timeFormat(){let{timeZone:t}=this;return{...T("long-time"),timeZone:t}}get effectiveStops(){let{fullTimeExtent:t,stops:e}=this;if(!e)return;if($(e)){let{dates:n}=e;if(!n?.length)return;let u=n.sort((f,y)=>f.getTime()-y.getTime());if(!t?.start||!t?.end)return u;let{start:h,end:m}=t,p=h.getTime(),g=m.getTime();return u.filter(f=>{let y=f.getTime();return y>=p&&y<=g})}let a=e.timeExtent??t;if(a)return S(e)?X(a,e.count):tt(a,e.interval)}get effectiveStopsEpoch(){return this.effectiveStops?.map(t=>t.getTime())}get era(){return(this.fullTimeExtent?.start?.getFullYear()??0)<0?"short":void 0}get interactive(){return!(this.disabled||this.state==="disabled")}get isOutOfRange(){let{timeExtent:t,fullTimeExtent:e}=this,{start:a,end:n}=e??{};if(!a||!n||!t||t.isAllTime||t.isEmpty)return!0;let{start:u,end:h}=t??{},m=u!=null&&(u<a||u>n),p=h!=null&&(h>n||h<a);return m||p}get majorTickFormatter(){return t=>this._formatDate(t,this._adjustedMajorTickFormat)}set playRate(t){t<=0||t>1e3*60*60||(this.state==="playing"&&v(this,c,Z).call(this),this._set("playRate",t))}get state(){return this.fullTimeExtent?this._animationController?"playing":"ready":"disabled"}get tickFormats(){return xt(this.timeZone)}get timeZone(){return this._userTimeZone??this.viewTimeZone??Y}set timeZone(t){this._userTimeZone=t??void 0}get viewTimeZone(){return this.view?.type==="2d"?this.view.timeZone:void 0}destroy(){k(this,E).abort(),this.view?.unregisterComponent(this),v(this,c,_).call(this)}formatDate(t){return this._formatDate(t,this._dateFormat)}formatDateTime(t){return this._formatDate(t,this._dateTimeFormat)}formatNumber(t,e){return this._formatNumber(t,e)}formatTime(t){return this._formatDate(t,this._timeFormat)}getTickValues(t){let{fullTimeExtent:e,timeZone:a}=this;if(!e)return[];let{start:n,end:u}=e;return!n||!u?[]:et(n,u,t,a).map(h=>h.getTime())}async initialize(){this.addHandles([w(()=>this.effectiveStops,t=>{t&&(this.timeExtent??=D(t,this.mode))},{initial:!0}),w(()=>this.timeExtent,t=>{!this.view||this.view.timeExtent&&t?.equals(this.view.timeExtent)||(!t||t.isAllTime)&&(!this.view.timeExtent||this.view.timeExtent.isAllTime)||(this.view.timeExtent=t)},{initial:!0}),w(()=>this.view,t=>{t?.timeExtent&&(this.timeExtent=t.timeExtent)}),w(()=>this.view,(t,e)=>{e?.unregisterComponent(this),t?.registerComponent(this)},{initial:!0,sync:!0}),w(()=>this.view?.timeExtent,t=>{!t||t.equals(this.timeExtent)||t.isAllTime&&(!this.timeExtent||this.timeExtent.isAllTime)||(this.timeExtent=t??void 0)}),w(()=>this.mode,t=>{if(!(!this.timeExtent||this.timeExtent.isAllTime||this.timeExtent.isEmpty||!this.fullTimeExtent?.start||!this.fullTimeExtent.end))switch(t){case"time-window":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-start":this.timeExtent=new x({start:null,end:this.timeExtent.end??this.timeExtent.start});break;case"cumulative-from-end":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:null});break;case"instant":this.timeExtent=new x({start:this.timeExtent.start??this.timeExtent.end,end:this.timeExtent.start??this.timeExtent.end});break}})]),await V((async()=>{if(await at(()=>this.view?.ready,{signal:k(this,E).signal}),this.loadPersistedSettingsDisabled)return;let t=await ct(this.view?.map,k(this,E).signal);t&&(this.fullTimeExtent=t.fullTimeExtent??void 0,this.loop=t.loop,this.mode=t.mode,this.playRate=t.playRate,this.stops=t.stops??void 0,this.timeExtent=t.timeExtent??void 0)})())}next(){v(this,c,b).call(this,{forward:!0,allowRestart:!1})}play(){v(this,c,Z).call(this)}previous(){v(this,c,b).call(this,{forward:!1,allowRestart:!1})}stop(){v(this,c,_).call(this)}updateWebDocument(t){if(this.savePersistedSettingsDisabled)return;let e=new mt({currentTimeExtent:this.timeExtent,fullTimeExtent:this.fullTimeExtent,loop:this.loop,numStops:S(this.stops)?this.stops.count:null,numThumbs:this.mode==="time-window"?2:1,stopDelay:this.playRate,stopInterval:Q(this.stops)?this.stops.interval:null,stops:$(this.stops)?this.stops.dates:null});t.widgets??=new ht,t.widgets.timeSlider=e}_formatDate(t,e){return ft({locale:this.locale,formatOptions:e}).format(t)}_formatNumber(t,e){return gt({locale:this.locale,formatOptions:e}).format(t)}};E=new WeakMap;c=new WeakSet;P=async function(){try{let{view:t}=this,e=this._animationController?.signal;await Promise.all([H(this.playRate,e),t&&at(()=>!t.updating,e)])}catch(t){q(t)||j("error","arcgis-slider-time","animation error",{detail:{error:t}}),this._animationController=void 0;return}v(this,c,b).call(this,{forward:!0,allowRestart:!1}),this._animationController&&v(this,c,P).call(this)};Z=function(){v(this,c,_).call(this),this._animationController=new AbortController,v(this,c,b).call(this,{forward:!0,allowRestart:!0}),v(this,c,P).call(this)};b=function({forward:t,allowRestart:e}){let{_thumbPositions:a,effectiveStopsEpoch:n}=this;if(!a||!n)return;let u=a.map(m=>{let p=n.indexOf(m);if(p!==-1)return p;let g=n.reduce((f,y)=>Math.abs(y-m)<Math.abs(f-m)?y:f);return n.indexOf(g)}),h=u.map(m=>m+=t?1:-1);if(h.some(m=>m<0||m>n.length-1))if(this.loop||e){let m=Math.min(...u),p=Math.max(...u),g=(t?u.map(f=>f-m):u.map(f=>f+(n.length-1-p))).map(f=>n[f]);this.timeExtent=v(this,c,F).call(this,g)}else this.state==="playing"&&this.stop();else{let m=h.map(p=>n[p]);this.timeExtent=v(this,c,F).call(this,m)}};_=function(){this._animationController?.abort(),this._animationController=void 0};F=function(t){if(!t)return;let e=[...t].sort((a,n)=>a-n).map(a=>new Date(a));return D(e,this.mode)};r([l()],o.prototype,"_adjustedMajorTickFormat",1);r([l()],o.prototype,"_animationController",2);r([l()],o.prototype,"_dateFormat",1);r([l()],o.prototype,"_dateTimeFormat",1);r([l()],o.prototype,"_thumbPositions",1);r([l()],o.prototype,"_timeFormat",1);r([l()],o.prototype,"_userTimeZone",2);r([l()],o.prototype,"disabled",2);r([l()],o.prototype,"effectiveStops",1);r([l()],o.prototype,"effectiveStopsEpoch",1);r([l()],o.prototype,"era",1);r([l()],o.prototype,"format",2);r([l({type:x})],o.prototype,"fullTimeExtent",2);r([l()],o.prototype,"interactive",1);r([l()],o.prototype,"isOutOfRange",1);r([l()],o.prototype,"loadPersistedSettingsDisabled",2);r([l()],o.prototype,"locale",2);r([l()],o.prototype,"loop",2);r([l()],o.prototype,"majorTickFormat",2);r([l()],o.prototype,"majorTickFormatter",1);r([l()],o.prototype,"mode",2);r([l({value:1e3})],o.prototype,"playRate",1);r([l()],o.prototype,"savePersistedSettingsDisabled",2);r([l()],o.prototype,"state",1);r([l({cast:K})],o.prototype,"stops",2);r([l()],o.prototype,"tickFormats",1);r([l({type:x})],o.prototype,"timeExtent",2);r([l()],o.prototype,"timeZone",1);r([l()],o.prototype,"view",2);r([l()],o.prototype,"viewTimeZone",1);o=r([dt("components.time-bar.TimeBarViewModel")],o);var Tt=R`:host{box-shadow:var(--arcgis-internal-box-shadow, var(--calcite-shadow-sm));transition:max-height var(--calcite-internal-animation-timing-medium) ease-in-out}::slotted([slot="actions-end"]){border-inline-start:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);padding-inline-start:var(--calcite-spacing-sm)}.action-bar,.time-extent-group,.time-extent-group>slot{display:flex;flex:1 0 auto;place-items:center}.label{block-size:var(--calcite-size-fixed-xxxl);inline-size:175px}.settings{inline-size:calc(var(--arcgis-internal-panel-width) - 2 * var(--calcite-spacing-lg))}`,_t=U(o),O=class extends W{constructor(){super(...arguments),this._viewModel=_t(this),this.messages=L({name:"time-bar",blocking:!0}),this.#t=A(),this.#e=B(),this.#i=e=>{this._settingsActionElement=e},this.autoDestroyDisabled=!1,this.disabled=this._viewModel.disabled,this.effectiveStops=this._viewModel.effectiveStops,this.format=this._viewModel.format,this.fullTimeExtent=this._viewModel.fullTimeExtent,this.icon="clock",this.loadPersistedSettingsDisabled=this._viewModel.loadPersistedSettingsDisabled,this.loop=this._viewModel.loop,this.mode=this._viewModel.mode,this.playRate=this._viewModel.playRate,this.savePersistedSettingsDisabled=this._viewModel.savePersistedSettingsDisabled,this.showNext=!1,this.showPlay=!1,this.showPrevious=!1,this.showSettings=!1,this.state=this._viewModel.state,this.stops=this._viewModel.stops,this.timeExtent=this._viewModel.timeExtent,this.timeZone=this._viewModel.timeZone,this.view=this._viewModel.view,this.arcgisPropertyChange=I()("effectiveStops","fullTimeExtent","state","timeExtent"),this.arcgisReady=C()}static{this.properties={_settingsActionElement:16,autoDestroyDisabled:5,disabled:5,effectiveStops:32,format:1,fullTimeExtent:0,icon:1,label:1,loadPersistedSettingsDisabled:5,loop:5,messageOverrides:0,mode:1,playRate:9,referenceElement:1,savePersistedSettingsDisabled:5,showNext:5,showPlay:5,showPrevious:5,showSettings:5,state:32,stops:0,timeExtent:0,timeZone:1,view:0}}static{this.styles=Tt}#t;#e;#i;async applyTimeSettings(e){this._viewModel.set(e)}async destroy(){await this.manager.destroy()}async next(){this._viewModel.next()}async play(){this._viewModel.play()}async previous(){this._viewModel.previous()}async stop(){this._viewModel.stop()}async updateWebDocument(e){this._viewModel.updateWebDocument(e)}willUpdate(e){e.has("messages")&&(this._viewModel.locale=this.messages._lang)}#m(e){let{currentTarget:a}=e,n=z(a).at(0)??a.querySelector("arcgis-time-bar-extent");n&&(n.viewModel=this._viewModel)}async#h(){switch(this.state){case"disabled":case"playing":return await this.stop();case"ready":return await this.play()}}render(){return d`<div role=presentation><calcite-action-bar class="action-bar" layout=horizontal expand-disabled floating>${this.#e==="ltr"?d`${this.#a()}${this.#u()}${this.#l()}${this.#s()}`:d`${this.#l()}${this.#u()}${this.#a()}${this.#s()}`}</calcite-action-bar></div>`}#s(){return d`<slot name=actions-end slot=actions-end></slot>`}#a(){return this.showPrevious||this.showPlay||this.showNext?d`<calcite-action-group>${this.#e==="ltr"?d`${this.#o()}${this.#r()}${this.#n()}`:d`${this.#n()}${this.#r()}${this.#o()}`}</calcite-action-group>`:null}#n(){return this.showNext?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"} icon=forward @click=${this.next} .text=${this.messages.next}></calcite-action>`:null}#o(){return this.showPlay?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length} .icon=${this.state==="playing"?"pause-f":"play-f"} @click=${this.#h} .text=${this.state==="playing"?this.messages.stop:this.messages.play}></calcite-action>`:null}#r(){return this.showPrevious?d`<calcite-action .disabled=${this._viewModel.isOutOfRange||!this._viewModel.interactive||!this.effectiveStops?.length||this.state==="playing"} icon=reverse @click=${this.previous} .text=${this.messages.previous}></calcite-action>`:null}#l(){return this.showSettings?d`<calcite-action-group><calcite-action .disabled=${!this._viewModel.interactive} .text=${this.messages.settings} icon=sliders-horizontal ${M(this.#i)}></calcite-action>${this._settingsActionElement?d`<calcite-popover auto-close .heading=${this.messages.timeBarSettings} .label=${this.messages.timeBarSettings} .referenceElement=${this._settingsActionElement} @calcitePopoverClose=${()=>{this.#t.value?.navigateToOverview()}} overlay-positioning=fixed><slot name=settings><arcgis-time-bar-settings class="settings" .messages=${this.messages} .viewModel=${this._viewModel} ${M(this.#t)}></arcgis-time-bar-settings></slot></calcite-popover>`:void 0}</calcite-action-group>`:null}#u(){return d`<calcite-action-group class="time-extent-group"><slot name=time-extent @slotchange=${this.#m}><arcgis-time-bar-extent class="label" .viewModel=${this._viewModel}></arcgis-time-bar-extent></slot></calcite-action-group>`}};N("arcgis-time-bar",O);return O},"time/TimeExtent","core/Accessor","webdoc/widgets/TimeSlider","webdoc/Widgets","intl","time/TimeInterval","support/timeUtils","core/accessorSupport/decorators","core/reactiveUtils",a,b,c,e,f,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./XEK22IDA.js";import j from"./ZHA4C7BC.js";import i from"./3Y5SDD5P.js";import{a as G}from"./JCRPP54Z.js";import{a as A,b as x,c as B,g as R}from"./LDDAJOTV.js";import{a as U}from"./BOHA6O3E.js";import{a as w}from"./AOZTFK3U.js";import g from"./3TZJEZDM.js";import f from"./MZWO5JYA.js";import e from"./PT7XD6RE.js";import"./VJVKFKSG.js";import d from"./2WLXD7OI.js";import{a as T}from"./PTHSNQL2.js";import{a as m}from"./JD74LG7K.js";import c from"./RTXRLIYL.js";import b from"./AM3UJO3A.js";import{g as D}from"./CNA7TDZN.js";import"./VJMC3CMB.js";import a from"./LIBO3YUY.js";import"./QUZTFUWM.js";import{d as F}from"./M3DP7XNI.js";import{A as y,L as C,M as $,N as M,O as p,Q as E,T as L,b as o,w as h}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{watch:b,on:q},V,,,{a:P},N,,,,,{b:O,c:S,d:k}])=>{var _=G,H="nested",J=N(V),v=class extends M{constructor(){super(...arguments),this._lastDragDetail=null,this._rootGroupUid=`table-${y()}`,this._rootListRef=C(),this._selectedDragItemLayerUid=null,this.messages=T(),this.viewModel=J(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=this._getItem(e);if(!l||!("sortable"in l)||!l.sortable)return!1;let c=this._getItem(t),d=this._getLayerType(t),n=this._getItem(i),g=this._getLayerType(i),I=!!d&&!!g&&d===g,u={selected:l,from:c,to:n},f=t?.group,r=i?.group;return f&&r&&typeof a=="function"?a(u):I},this._onPanelOpen=()=>{this.requestUpdate()},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.map=this.viewModel.map,this.minDragEnabledItems=B,this.minFilterItems=x,this.selectedItems=new j,this.selectionMode="none",this.tables=this.viewModel.tables,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryTableIndicators=!1,this.arcgisClose=h(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=h(),this.arcgisFilterChange=h(),this.arcgisSelectedItemsChange=h(),this.arcgisTableItemsChanged=h(),this.arcgisTriggerAction=P(()=>this.viewModel,"trigger-action")}static{this.properties={_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,view:0,autoDestroyDisabled:5,closed:5,referenceElement:1,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,map:0,minDragEnabledItems:9,minFilterItems:9,selectedItems:0,selectionMode:1,state:32,tableItems:32,tables:0,showCloseButton:5,showCollapseButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryTableIndicators:5,messageOverrides:0}}static{this.styles=[k,S]}get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.showFilter}get state(){return this.viewModel.state}get tableItems(){return this.viewModel.tableItems}async destroy(){await this.manager.destroy()}willUpdate(e){e.has("map")&&(this.viewModel.map=this.map),e.has("tables")&&(this.viewModel.tables=this.tables),e.has("listItemCreatedFunction")&&(this.viewModel.listItemCreatedFunction=this.listItemCreatedFunction)}loaded(){this.manager.onLifecycle(()=>[b(()=>this.view?.map,e=>{this.map||(this.viewModel.map=e)},{initial:!0}),q(()=>this.viewModel.tableItems,"change",()=>{R(this.selectedItems),this.arcgisTableItemsChanged.emit(),this.requestUpdate()},{initial:!0}),q(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),b(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),b(()=>[this.filterPredicate,this._rootListRef.value],()=>this._setFilterPredicate())])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_getItem(e){if(e?.tagName.toLowerCase()==="calcite-list-item")return e.value;let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.tableItems?.toArray()??[];for(;t.length;){let i=t.shift();if(i){if(i.uid===e)return i;t.push(...i.children?.toArray()??[])}}return null}_getLayerType(e){return e?.getAttribute("data-layer-type")??null}_setFilterPredicate(){let e=this._rootListRef.value;e&&(e.filterPredicate=this.filterPredicate?t=>{let i=this._getItem(t);return i?this.filterPredicate(i):!1}:void 0)}_handlePanelFlowItemBack(e){e.open=!1}_sortTablesToIds(e,t){e?.sort((i,s)=>{let a=i.uid!=null?t.indexOf(i.uid):-1,l=s.uid!=null?t.indexOf(s.uid):-1;return a>l?-1:a<l?1:0})}_handleCalciteListDragEnd(e){let{fromEl:t,dragEl:i,oldIndex:s}=e;s==null||!t||!i||t.insertBefore(i,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:l}=e,c=t?.newIndex===l&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||c)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value;let d=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortTablesToIds(this.viewModel.tables,d)}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let s=e.target.selectedItems.map(a=>this._getItem(a)).filter(Boolean);i.removeAll(),i.addMany(s)}_handleFlowItemClose(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}render(){let{state:e}=this,t={[m.hidden]:e==="loading",[m.disabled]:e==="disabled"};return o`<div class=${p(F(m.widget,m.panel,t))}>${this._renderItems()}</div>`}_renderNoItemsMessage(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return this.hideNoItemsNotice?null:o`<div class=${p(_.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderPanelFlowItems(){return U(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t===this._openedPanelItems.length-1} @calciteFlowItemBack=${l=>{l.preventDefault(),a()}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_filterEnabled:i,_rootGroupUid:s,showCloseButton:a,showCollapseButton:l,showHeading:c,_dragEnabled:d,selectionMode:n,filterText:g,filterPlaceholder:I,messages:u}=this,f=[o`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${c?this.label??u.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${()=>this._handleFlowItemClose()}>${t?.length?o`<calcite-list .canPull=${r=>this._canMove(r,"pull")} .canPut=${r=>this._canMove(r,"put")} data-layer-type=${s??E} .displayMode=${H} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${I} .filterProps=${A} .filterText=${i?g:""} .group=${s} .label=${this.label??u.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${r=>this._handleCalciteListDragEnd(r.detail)} @calciteListFilter=${r=>{this.filterText=r.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${r=>this._onCalciteListOrderChange(r.detail)} ${$(this._rootListRef)}>${t.toArray().map(r=>this._renderItem(r))}${i&&!this.hideNoFilterResultsNotice?o`<div class=${p(_.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems()];return this.closed?null:w("root-flow",o`<calcite-flow>${f}</calcite-flow>`)}_renderItem(e){return w(e.uid,O({canMove:this._canMove,css:_,displayMode:H,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,item:e,itemType:"table",listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,showErrors:this.showErrors,showFilter:this.showFilter,showTemporaryTableIndicators:this.showTemporaryTableIndicators,handleAction:(t,i)=>this._onTriggerAction(t,i),handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,view:this.view}))}};L("arcgis-table-list-next",v);return v},"core/Collection","core/reactiveUtils","widgets/TableList/TableListViewModel",a,b,c,d,e,f,g,i,j)
2
+ import"./XEK22IDA.js";import j from"./D6Z3MYCF.js";import i from"./7MIEKJ57.js";import{a as G}from"./JCRPP54Z.js";import{a as A,b as x,c as B,g as R}from"./LDDAJOTV.js";import{a as U}from"./HSF2MYAX.js";import{a as w}from"./RDWM76R2.js";import g from"./K2HEKJRC.js";import f from"./MZWO5JYA.js";import e from"./FR3DD5XU.js";import"./VJVKFKSG.js";import d from"./G3GFYB3W.js";import{a as T}from"./NDMHZQ2Z.js";import{a as m}from"./JD74LG7K.js";import c from"./K3VQUQ6I.js";import b from"./NFE73D6R.js";import{g as D}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import{d as F}from"./QLIWDFZI.js";import{A as y,L as C,M as $,N as M,O as p,Q as E,T as L,b as o,w as h}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([j,{watch:b,on:q},V,,,{a:P},N,,,,,{b:O,c:S,d:k}])=>{var _=G,H="nested",J=N(V),v=class extends M{constructor(){super(...arguments),this._lastDragDetail=null,this._rootGroupUid=`table-${y()}`,this._rootListRef=C(),this._selectedDragItemLayerUid=null,this.messages=T(),this.viewModel=J(this),this._canMove=({dragEl:e,fromEl:t,toEl:i},s)=>{let a=s==="pull"?this.listItemCanGiveFunction:this.listItemCanReceiveFunction,l=this._getItem(e);if(!l||!("sortable"in l)||!l.sortable)return!1;let c=this._getItem(t),d=this._getLayerType(t),n=this._getItem(i),g=this._getLayerType(i),I=!!d&&!!g&&d===g,u={selected:l,from:c,to:n},f=t?.group,r=i?.group;return f&&r&&typeof a=="function"?a(u):I},this._onPanelOpen=()=>{this.requestUpdate()},this._onSelectedDragItemLayerUidChange=e=>{this._selectedDragItemLayerUid=e},this._onTriggerAction=(e,t)=>{this.triggerAction(e,t)},this.autoDestroyDisabled=!1,this.closed=!1,this.collapsed=!1,this.dragEnabled=!1,this.filterPlaceholder="",this.filterText="",this.headingLevel=2,this.icon="table",this.listItemCreatedFunction=this.viewModel.listItemCreatedFunction,this.listModeDisabled=this.viewModel.listModeDisabled,this.map=this.viewModel.map,this.minDragEnabledItems=B,this.minFilterItems=x,this.selectedItems=new j,this.selectionMode="none",this.tables=this.viewModel.tables,this.showCloseButton=!1,this.showCollapseButton=!1,this.showErrors=!1,this.hideNoFilterResultsNotice=!1,this.hideNoItemsNotice=!1,this.showFilter=!1,this.showHeading=!1,this.hideStatusIndicators=!1,this.showTemporaryTableIndicators=!1,this.arcgisClose=h(),this.arcgisPropertyChange=D()("state"),this.arcgisReady=h(),this.arcgisFilterChange=h(),this.arcgisSelectedItemsChange=h(),this.arcgisTableItemsChanged=h(),this.arcgisTriggerAction=P(()=>this.viewModel,"trigger-action")}static{this.properties={_visibleItems:16,_openedPanelItems:16,_dragEnabled:16,_filterEnabled:16,view:0,autoDestroyDisabled:5,closed:5,referenceElement:1,collapsed:7,dragEnabled:5,filterPlaceholder:1,filterPredicate:0,filterText:1,headingLevel:9,icon:1,label:1,listItemCanGiveFunction:0,listItemCanReceiveFunction:0,listItemCreatedFunction:0,listModeDisabled:5,map:0,minDragEnabledItems:9,minFilterItems:9,selectedItems:0,selectionMode:1,state:32,tableItems:32,tables:0,showCloseButton:5,showCollapseButton:5,showErrors:5,hideNoFilterResultsNotice:5,hideNoItemsNotice:5,showFilter:5,showHeading:5,hideStatusIndicators:5,showTemporaryTableIndicators:5,messageOverrides:0}}static{this.styles=[k,S]}get _visibleItems(){return this.tableItems?.filter(e=>!e.hidden&&(this.showErrors||!e.error))}get _openedPanelItems(){return this._visibleItems.filter(({hidden:e,panel:t})=>!e&&t?.open&&!t.disabled&&t.flowEnabled)}get _dragEnabled(){return this.viewModel.totalItems>=this.minDragEnabledItems&&this.dragEnabled}get _filterEnabled(){return this.viewModel.totalItems>=this.minFilterItems&&this.showFilter}get state(){return this.viewModel.state}get tableItems(){return this.viewModel.tableItems}async destroy(){await this.manager.destroy()}willUpdate(e){e.has("map")&&(this.viewModel.map=this.map),e.has("tables")&&(this.viewModel.tables=this.tables),e.has("listItemCreatedFunction")&&(this.viewModel.listItemCreatedFunction=this.listItemCreatedFunction)}loaded(){this.manager.onLifecycle(()=>[b(()=>this.view?.map,e=>{this.map||(this.viewModel.map=e)},{initial:!0}),q(()=>this.viewModel.tableItems,"change",()=>{R(this.selectedItems),this.arcgisTableItemsChanged.emit(),this.requestUpdate()},{initial:!0}),q(()=>this.selectedItems,"change",()=>this.arcgisSelectedItemsChange.emit()),b(()=>[this.viewModel.state,this.viewModel.totalItems],()=>this.requestUpdate(),{initial:!0}),b(()=>[this.filterPredicate,this._rootListRef.value],()=>this._setFilterPredicate())])}triggerAction(e,t){return this.viewModel.triggerAction(e,t)}_getItem(e){if(e?.tagName.toLowerCase()==="calcite-list-item")return e.value;let t=e?.getAttribute("data-item");return t?this._findItemByUid(t):null}_findItemByUid(e){let t=this.tableItems?.toArray()??[];for(;t.length;){let i=t.shift();if(i){if(i.uid===e)return i;t.push(...i.children?.toArray()??[])}}return null}_getLayerType(e){return e?.getAttribute("data-layer-type")??null}_setFilterPredicate(){let e=this._rootListRef.value;e&&(e.filterPredicate=this.filterPredicate?t=>{let i=this._getItem(t);return i?this.filterPredicate(i):!1}:void 0)}_handlePanelFlowItemBack(e){e.open=!1}_sortTablesToIds(e,t){e?.sort((i,s)=>{let a=i.uid!=null?t.indexOf(i.uid):-1,l=s.uid!=null?t.indexOf(s.uid):-1;return a>l?-1:a<l?1:0})}_handleCalciteListDragEnd(e){let{fromEl:t,dragEl:i,oldIndex:s}=e;s==null||!t||!i||t.insertBefore(i,t.children[s])}_onCalciteListOrderChange(e){let{_lastDragDetail:t}=this,{toEl:i,fromEl:s,dragEl:a,newIndex:l}=e,c=t?.newIndex===l&&t?.dragEl===a&&t?.toEl===i&&t?.fromEl===s;if(!s||!i||c)return;this._lastDragDetail=e,this._selectedDragItemLayerUid=a.value;let d=Array.from(s.children).filter(n=>n?.matches("calcite-list-item")).map(n=>n.value.layer?.uid??"");this._sortTablesToIds(this.viewModel.tables,d)}_handleCalciteListChange(e){let{selectionMode:t,selectedItems:i}=this;if(t==="none")return;let s=e.target.selectedItems.map(a=>this._getItem(a)).filter(Boolean);i.removeAll(),i.addMany(s)}_handleFlowItemClose(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}render(){let{state:e}=this,t={[m.hidden]:e==="loading",[m.disabled]:e==="disabled"};return o`<div class=${p(F(m.widget,m.panel,t))}>${this._renderItems()}</div>`}_renderNoItemsMessage(){return o`<div slot=message>${this.messages.noItemsToDisplay}</div>`}_renderNoItems(){return this.hideNoItemsNotice?null:o`<div class=${p(_.itemMessage)}><calcite-notice icon=information kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`}_renderPanelFlowItems(){return U(this._openedPanelItems.toArray(),e=>e.uid,(e,t)=>{let{panel:i,title:s}=e,a=()=>this._handlePanelFlowItemBack(i);return o`<calcite-flow-item .description=${s} .heading=${i.title} .headingLevel=${this.headingLevel} .selected=${t===this._openedPanelItems.length-1} @calciteFlowItemBack=${l=>{l.preventDefault(),a()}}><arcgis-layer-list-item-panel .item=${e} .view=${this.view}></arcgis-layer-list-item-panel><calcite-button appearance=transparent @click=${a} slot=footer-actions width=full>${this.messages.back}</calcite-button></calcite-flow-item>`})}_renderItems(){let{collapsed:e,_visibleItems:t,_filterEnabled:i,_rootGroupUid:s,showCloseButton:a,showCollapseButton:l,showHeading:c,_dragEnabled:d,selectionMode:n,filterText:g,filterPlaceholder:I,messages:u}=this,f=[o`<calcite-flow-item .closable=${a} .closed=${this.closed} .collapsed=${e} .collapsible=${l} .heading=${c?this.label??u.componentLabel:void 0} .headingLevel=${this.headingLevel} .selected=${!this._openedPanelItems.length} @calciteFlowItemClose=${()=>this._handleFlowItemClose()}>${t?.length?o`<calcite-list .canPull=${r=>this._canMove(r,"pull")} .canPut=${r=>this._canMove(r,"put")} data-layer-type=${s??E} .displayMode=${H} .dragEnabled=${d} .filterEnabled=${i} .filterPlaceholder=${I} .filterProps=${A} .filterText=${i?g:""} .group=${s} .label=${this.label??u.componentLabel} selection-appearance=border .selectionMode=${n} @calciteListChange=${this._handleCalciteListChange} @calciteListDragEnd=${r=>this._handleCalciteListDragEnd(r.detail)} @calciteListFilter=${r=>{this.filterText=r.currentTarget?.filterText??"",this.arcgisFilterChange.emit()}} @calciteListOrderChange=${r=>this._onCalciteListOrderChange(r.detail)} ${$(this._rootListRef)}>${t.toArray().map(r=>this._renderItem(r))}${i&&!this.hideNoFilterResultsNotice?o`<div class=${p(_.filterNoResults)} slot=filter-no-results><calcite-notice kind=info open width=full>${this._renderNoItemsMessage()}</calcite-notice></div>`:null}</calcite-list>`:this._renderNoItems()}</calcite-flow-item>`,this._renderPanelFlowItems()];return this.closed?null:w("root-flow",o`<calcite-flow>${f}</calcite-flow>`)}_renderItem(e){return w(e.uid,O({canMove:this._canMove,css:_,displayMode:H,dragEnabled:this.dragEnabled,hideStatusIndicators:this.hideStatusIndicators,item:e,itemType:"table",listModeDisabled:this.viewModel.listModeDisabled,messages:this.messages,rootGroupUid:this._rootGroupUid,selectedDragItemLayerUid:this._selectedDragItemLayerUid,selectedItems:this.selectedItems,selectionMode:this.selectionMode,showErrors:this.showErrors,showFilter:this.showFilter,showTemporaryTableIndicators:this.showTemporaryTableIndicators,handleAction:(t,i)=>this._onTriggerAction(t,i),handlePanelOpen:this._onPanelOpen,handleSelectedDragItemLayerUidChange:this._onSelectedDragItemLayerUidChange,view:this.view}))}};L("arcgis-table-list-next",v);return v},"core/Collection","core/reactiveUtils","widgets/TableList/TableListViewModel",a,b,c,d,e,f,g,i,j)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as w}from"./IZ46HAUJ.js";import{L as o,M as m,N as u,O as v,Q as g,T as f,a as h,b as a}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([c,{watch:x}])=>{var p=h`:host{background-color:var(--calcite-color-surface-2);block-size:var(--calcite-size-fixed-xxxl);color:var(--calcite-color-text-1);display:flex;flex:1 0 auto;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-sm);inline-size:auto}.root{align-items:center;block-size:100%;display:flex;inline-size:100%}slot[name=max],slot[name=min]{display:flex}.slider{--labels-container-width: 100%;flex:1 1 auto;min-inline-size:calc(var(--calcite-spacing-md) * 15)}.slider--has-ticks{margin-top:calc(var(--calcite-spacing-md) * -1)}.hidden,.max-date,.min-date{flex:0 0 auto}.hidden{inline-size:0}.max-date,.min-date{inline-size:calc(var(--calcite-size-md) * 3.125)}.popover{padding:var(--calcite-spacing-xxs) var(--calcite-spacing-xs) var(--calcite-spacing-xs)}.ticks-container{flex:1;position:relative;width:100%}.major-ticks,.minor-ticks{inset:0;position:absolute}.major-ticks,.minor-ticks{--arcgis-ticks-tick-transform: unset;--arcgis-ticks-tick-width: var(--calcite-size-px)}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-size-fixed-xxs)}.major-ticks{--arcgis-ticks-font-weight: var(--calcite-font-weight-normal)}.slider.slider--out-of-range{--arcgis-internal-slider-handle-color: var(--calcite-color-status-danger);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-status-danger)}`,d=class extends u{constructor(){super(...arguments),this.#e=new ResizeObserver(()=>{let e=this.#r.value?.clientWidth;e&&(this._sliderWidth=e)}),this.#l=3,this.#a=o(),this.#r=o(),this._sliderWidth=100,this.autoDestroyDisabled=!1,this.showMax=!1,this.showMin=!1,this.showTicks=!1,this.showTimeExtentPopover=!1}static{this.properties={_activeValue:16,_sliderFillPlacement:16,_sliderWidth:16,_timeExtentEpochValues:16,activeValue:32,autoDestroyDisabled:5,showMax:5,showMin:5,showTicks:5,showTimeExtentPopover:5,viewModel:0}}static{this.styles=p}#e;#t;#i;#s;#l;#a;#r;get _sliderFillPlacement(){switch(this.viewModel?.mode){case"cumulative-from-end":return"end";case"cumulative-from-start":return"start";case"instant":return"none";default:return}}get _timeExtentEpochValues(){let{viewModel:e}=this;if(!e)return;let{timeExtent:t,fullTimeExtent:i}=e;if(!t||!i)return;let{start:s,end:r}=t,{start:l,end:n}=i;if(!(!l||!n))switch(e.mode){case"cumulative-from-end":case"instant":return s?s.getTime()<l.getTime()?[l.getTime()]:s.getTime()>n.getTime()?[n.getTime()]:[s.getTime()]:void 0;case"cumulative-from-start":return r?r.getTime()<l.getTime()?[l.getTime()]:r.getTime()>n.getTime()?[n.getTime()]:[r.getTime()]:void 0;case"time-window":return s&&r?[s.getTime(),r.getTime()]:void 0}}get activeValue(){switch(this._activeValue){case void 0:return;case"all":return this.viewModel?.timeExtent;default:return new Date(this._activeValue)}}async destroy(){await this.manager.destroy()}async loaded(){this.manager.onLifecycle(()=>[x(()=>this.#a.value,e=>{this.#e.disconnect(),e&&this.#e.observe(e)},{initial:!0}),w(()=>{this.#e.disconnect()})])}#n(e,t){let{viewModel:i}=this;if(!i)return;let{start:s,end:r}=e;if(!s||!r)return;let l=(r.getTime()-s.getTime())/t;return i.tickFormats.find(({duration:n})=>n>this.#l*l)??i.tickFormats.at(-1)}#c(e){this._activeValue=e.target.activeValue}#o(e){let{viewModel:t}=this,i=t?.mode;i&&(t.timeExtent=this.#m(e.target.values,i),this._activeValue=e.target.activeValue)}#m([e,t],i){switch(i){case"cumulative-from-end":return new c({start:new Date(e),end:null});case"cumulative-from-start":return new c({start:null,end:new Date(e)});case"instant":return new c({start:new Date(e),end:new Date(e)});case"time-window":return new c({start:new Date(e),end:new Date(t??e)})}}render(){return a`<div class="root" ${m(this.#a)}>${this.#h()}${this.#g()}${this.#d()}</div>`}#d(){return this.showMax?a`<slot name=max><arcgis-time-bar-date class="max-date" .date=${this.viewModel?.fullTimeExtent?.end} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>`:a`<div class="hidden"></div>`}#h(){return this.showMin?a`<slot name=min><arcgis-time-bar-date class="min-date" .date=${this.viewModel?.fullTimeExtent?.start} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>`:a`<div class="hidden"></div>`}#u(){return this.showTimeExtentPopover?a`<div class="popover" slot=popover><slot name=popover>${this.#v()}</slot></div>`:null}#v(){return this.activeValue?this.activeValue instanceof Date?a`<arcgis-time-bar-date .date=${this.activeValue} .viewModel=${this.viewModel}></arcgis-time-bar-date>`:a`<arcgis-time-bar-extent .viewModel=${this.viewModel}></arcgis-time-bar-extent>`:null}#g(){let{viewModel:e}=this;if(!e?.fullTimeExtent?.start||!e?.fullTimeExtent?.end||!this._sliderWidth)return null;let t=this.#n(e.fullTimeExtent,this._sliderWidth);if(!t)return null;(!this.#t||!this.#s||!this.#i||this.#t!==t)&&(this.#t=t,this.#s=e.getTickValues(t.minor),this.#i=e.getTickValues(t.major),e.majorTickFormat=t.format);let i=e.fullTimeExtent.start.getTime(),s=e.fullTimeExtent.end.getTime();return a`<arcgis-slider allow-values-overlap class=${v({slider:!0,"slider--has-ticks":this.showTicks,"slider--out-of-range":e.isOutOfRange})} .disabled=${!e.interactive} fill-placement=${this._sliderFillPlacement??g} .max=${s} .min=${i} @arcgisActiveValueChange=${this.#c} @arcgisInput=${this.#o} precision=0 .steps=${e.effectiveStopsEpoch} .values=${this._timeExtentEpochValues} ${m(this.#r)}>${this.#u()}${this.#f(e,i,s)}</arcgis-slider>`}#f(e,t,i){return this.showTicks?a`<div slot=content-end class="ticks-container"><arcgis-ticks class="minor-ticks" .max=${i} .min=${t} mode=value .values=${this.#s}></arcgis-ticks><arcgis-ticks class="major-ticks" .labelFormatter=${e.majorTickFormatter} .max=${i} .min=${t} mode=value show-labels .values=${this.#i}></arcgis-ticks></div>`:null}};f("arcgis-time-bar-slider",d);return d},"time/TimeExtent","core/reactiveUtils")
2
+ import{a as w}from"./IZ46HAUJ.js";import{L as o,M as m,N as u,O as v,Q as g,T as f,a as h,b as a}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([c,{watch:x}])=>{var p=h`:host{background-color:var(--calcite-color-surface-2);block-size:var(--calcite-size-fixed-xxxl);color:var(--calcite-color-text-1);display:flex;flex:1 0 auto;font-family:var(--calcite-font-family);font-size:var(--calcite-font-size-sm);inline-size:auto}.root{align-items:center;block-size:100%;display:flex;inline-size:100%}slot[name=max],slot[name=min]{display:flex}.slider{--labels-container-width: 100%;flex:1 1 auto;min-inline-size:calc(var(--calcite-spacing-md) * 15)}.slider--has-ticks{margin-top:calc(var(--calcite-spacing-md) * -1)}.hidden,.max-date,.min-date{flex:0 0 auto}.hidden{inline-size:0}.max-date,.min-date{inline-size:calc(var(--calcite-size-md) * 3.125)}.popover{padding:var(--calcite-spacing-xxs) var(--calcite-spacing-xs) var(--calcite-spacing-xs)}.ticks-container{flex:1;position:relative;width:100%}.major-ticks,.minor-ticks{inset:0;position:absolute}.major-ticks,.minor-ticks{--arcgis-ticks-tick-transform: unset;--arcgis-ticks-tick-width: var(--calcite-size-px)}.minor-ticks{--arcgis-ticks-tick-length: var(--calcite-size-fixed-xxs)}.major-ticks{--arcgis-ticks-font-weight: var(--calcite-font-weight-normal)}.slider.slider--out-of-range{--arcgis-internal-slider-handle-color: var(--calcite-color-status-danger);--arcgis-internal-slider-track-range-background-color: var(--calcite-color-status-danger)}`,d=class extends u{constructor(){super(...arguments),this.#e=new ResizeObserver(()=>{let e=this.#r.value?.clientWidth;e&&(this._sliderWidth=e)}),this.#l=3,this.#a=o(),this.#r=o(),this._sliderWidth=100,this.autoDestroyDisabled=!1,this.showMax=!1,this.showMin=!1,this.showTicks=!1,this.showTimeExtentPopover=!1}static{this.properties={_activeValue:16,_sliderFillPlacement:16,_sliderWidth:16,_timeExtentEpochValues:16,activeValue:32,autoDestroyDisabled:5,showMax:5,showMin:5,showTicks:5,showTimeExtentPopover:5,viewModel:0}}static{this.styles=p}#e;#t;#i;#s;#l;#a;#r;get _sliderFillPlacement(){switch(this.viewModel?.mode){case"cumulative-from-end":return"end";case"cumulative-from-start":return"start";case"instant":return"none";default:return}}get _timeExtentEpochValues(){let{viewModel:e}=this;if(!e)return;let{timeExtent:t,fullTimeExtent:i}=e;if(!t||!i)return;let{start:s,end:r}=t,{start:l,end:n}=i;if(!(!l||!n))switch(e.mode){case"cumulative-from-end":case"instant":return s?s.getTime()<l.getTime()?[l.getTime()]:s.getTime()>n.getTime()?[n.getTime()]:[s.getTime()]:void 0;case"cumulative-from-start":return r?r.getTime()<l.getTime()?[l.getTime()]:r.getTime()>n.getTime()?[n.getTime()]:[r.getTime()]:void 0;case"time-window":return s&&r?[s.getTime(),r.getTime()]:void 0}}get activeValue(){switch(this._activeValue){case void 0:return;case"all":return this.viewModel?.timeExtent;default:return new Date(this._activeValue)}}async destroy(){await this.manager.destroy()}async loaded(){this.manager.onLifecycle(()=>[x(()=>this.#a.value,e=>{this.#e.disconnect(),e&&this.#e.observe(e)},{initial:!0}),w(()=>{this.#e.disconnect()})])}#n(e,t){let{viewModel:i}=this;if(!i)return;let{start:s,end:r}=e;if(!s||!r)return;let l=(r.getTime()-s.getTime())/t;return i.tickFormats.find(({duration:n})=>n>this.#l*l)??i.tickFormats.at(-1)}#c(e){this._activeValue=e.target.activeValue}#o(e){let{viewModel:t}=this,i=t?.mode;i&&(t.timeExtent=this.#m(e.target.values,i),this._activeValue=e.target.activeValue)}#m([e,t],i){switch(i){case"cumulative-from-end":return new c({start:new Date(e),end:null});case"cumulative-from-start":return new c({start:null,end:new Date(e)});case"instant":return new c({start:new Date(e),end:new Date(e)});case"time-window":return new c({start:new Date(e),end:new Date(t??e)})}}render(){return a`<div class="root" ${m(this.#a)}>${this.#h()}${this.#g()}${this.#d()}</div>`}#d(){return this.showMax?a`<slot name=max><arcgis-time-bar-date class="max-date" .date=${this.viewModel?.fullTimeExtent?.end} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>`:a`<div class="hidden"></div>`}#h(){return this.showMin?a`<slot name=min><arcgis-time-bar-date class="min-date" .date=${this.viewModel?.fullTimeExtent?.start} .viewModel=${this.viewModel}></arcgis-time-bar-date></slot>`:a`<div class="hidden"></div>`}#u(){return this.showTimeExtentPopover?a`<div class="popover" slot=popover><slot name=popover>${this.#v()}</slot></div>`:null}#v(){return this.activeValue?this.activeValue instanceof Date?a`<arcgis-time-bar-date .date=${this.activeValue} .viewModel=${this.viewModel}></arcgis-time-bar-date>`:a`<arcgis-time-bar-extent .viewModel=${this.viewModel}></arcgis-time-bar-extent>`:null}#g(){let{viewModel:e}=this;if(!e?.fullTimeExtent?.start||!e?.fullTimeExtent?.end||!this._sliderWidth)return null;let t=this.#n(e.fullTimeExtent,this._sliderWidth);if(!t)return null;(!this.#t||!this.#s||!this.#i||this.#t!==t)&&(this.#t=t,this.#s=e.getTickValues(t.minor),this.#i=e.getTickValues(t.major),e.majorTickFormat=t.format);let i=e.fullTimeExtent.start.getTime(),s=e.fullTimeExtent.end.getTime();return a`<arcgis-slider allow-values-overlap class=${v({slider:!0,"slider--has-ticks":this.showTicks,"slider--out-of-range":e.isOutOfRange})} .disabled=${!e.interactive} fill-placement=${this._sliderFillPlacement??g} .max=${s} .min=${i} @arcgisActiveValueChange=${this.#c} @arcgisInput=${this.#o} precision=0 .steps=${e.effectiveStopsEpoch} .values=${this._timeExtentEpochValues} ${m(this.#r)}>${this.#u()}${this.#f(e,i,s)}</arcgis-slider>`}#f(e,t,i){return this.showTicks?a`<div slot=content-end class="ticks-container"><arcgis-ticks class="minor-ticks" .max=${i} .min=${t} mode=value .values=${this.#s}></arcgis-ticks><arcgis-ticks class="major-ticks" .labelFormatter=${e.majorTickFormatter} .max=${i} .min=${t} mode=value show-labels .values=${this.#i}></arcgis-ticks></div>`:null}};f("arcgis-time-bar-slider",d);return d},"time/TimeExtent","core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./K2HEKJRC.js";import b from"./MZWO5JYA.js";import a from"./FR3DD5XU.js";import{a as A}from"./VJVKFKSG.js";import{g as y}from"./5GFBHLDY.js";import"./42UVPIOD.js";import"./QUZTFUWM.js";import"./QLIWDFZI.js";import{N as F,R as _,T as p,a as m,b as n,n as d}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([,w,I,v,{getDisplayedSymbol:b},{stripHTML:x},{watch:h},{d:C},,{d:f}])=>{var $=m`calcite-notice{padding:var(--calcite-space-lg)}`,l=class extends F{constructor(){super(...arguments),this._aggregatedGraphicsSet=new Set,this.aggregatedFeatureCount=0,this.selectedAggregatedFeatureIndex=-1,this.aggregatedFeatureItems=[],this.aggregatedFeatures=[],this.autoDestroyDisabled=!1,this.chartAnimationDisabled=!1,this.defaultPopupTemplateEnabled=!1,this.headingLevel=2,this.hideHeading=!1,this.hideContent=!1,this.hideAttachmentsContent=!1,this.hideCustomContent=!1,this.hideExpressionContent=!1,this.hideFieldsContent=!1,this.hideMediaContent=!1,this.showRelationshipContent=!1,this.hideTextContent=!1,this.showUtilityNetworkContent=!1,this.hideLastEditedInfo=!1,this.loading=!1,this.selectedAggregateBoundaryFeature=new I({symbol:new v({outline:{width:1.5,color:"cyan"},style:"none"})}),this.arcgisPropertyChange=y()("aggregatedFeatureCount","selectedAggregatedFeatureIndex","aggregatedFeatureItems","aggregatedFeatures","loading"),this._renderableAggregatedFeatureItems=[]}static{this.properties={_abortController:16,aggregatedFeatureCount:32,selectedAggregatedFeatureIndex:32,aggregatedFeatureItems:32,aggregatedFeatures:32,autoDestroyDisabled:5,chartAnimationDisabled:5,defaultPopupTemplateEnabled:5,headingLevel:9,location:0,messageOverrides:0,hideHeading:5,hideContent:5,hideAttachmentsContent:5,hideCustomContent:5,hideExpressionContent:5,hideFieldsContent:5,hideMediaContent:5,showRelationshipContent:5,hideTextContent:5,showUtilityNetworkContent:5,hideLastEditedInfo:5,feature:0,flowItems:0,loading:32,map:0,messages:0,selectedAggregateBoundaryFeature:32,spatialReference:0,timeZone:1,view:0}}static{this.styles=$}async destroy(){await this.manager.destroy(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}async next(){await this._selectRelativeAggregatedFeature(1)}async previous(){await this._selectRelativeAggregatedFeature(-1)}loaded(){this.manager.onLifecycle(()=>[h(()=>[this.feature,this.view],()=>{this._updateAggregatedFeatures()},{initial:!0}),h(()=>this._getAggregatedFeatureItemsHeadingSignature(),()=>this.requestUpdate()),h(()=>this.flowItems?.length,()=>{let{flowItems:e}=this,t=e?.getItemAt((e.length??0)-1)?.graphic??void 0;this._setSelectedAggregatedFeatureIndex(t?this.aggregatedFeatures.indexOf(t):-1),this._removeSelectedAggregatedFeature(),t&&this._aggregatedGraphicsSet.has(t)&&this._addSelectedAggregatedFeature(t)})])}disconnectedCallback(){super.disconnectedCallback(),this._cancelQuery(),this._clearAggregatedFeatureItems(),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureCount(e){d(()=>this.aggregatedFeatureCount=e)}_setSelectedAggregatedFeatureIndex(e){d(()=>this.selectedAggregatedFeatureIndex=e)}_setAggregatedFeatureItemsReadOnly(e){d(()=>{this.aggregatedFeatureItems=e}),this._renderableAggregatedFeatureItems=e.filter(t=>!!t.graphic)}_setAggregatedFeatures(e){this._aggregatedGraphicsSet=new Set(e),d(()=>this.aggregatedFeatures=e)}_getAggregatedFeatureItemsHeadingSignature(){let e="";for(let t of this.aggregatedFeatureItems)e+=`${t.heading??""}|`;return e}_setLoading(e){d(()=>this.loading=e)}_cancelQuery(){this._abortController=A(this._abortController),this._setLoading(!1)}_removeBoundaryGraphicFromView(e){e?.graphics.remove(this.selectedAggregateBoundaryFeature)}_clearAggregatedFeatureItems(){this._setAggregatedFeatureItemsReadOnly([]),this._setSelectedAggregatedFeatureIndex(-1),this._removeSelectedAggregatedFeature()}_resetAggregatedFeaturesState(){this._setAggregatedFeatures([]),this._clearAggregatedFeatureItems(),this._setAggregatedFeatureCount(0),this._removeAggregateBoundaryFeature()}_setAggregatedFeatureItems(e){this._setAggregatedFeatureItemsReadOnly(e.map(t=>new w({graphic:t})))}_setAggregatedFeaturesState(e){this._setAggregatedFeatures(e),this._setAggregatedFeatureItems(e),this._setAggregatedFeatureCount(e.length)}_removeAggregateBoundaryFeature(){this._removeBoundaryGraphicFromView(this._boundaryGraphicView),this.selectedAggregateBoundaryFeature.geometry=null,this._boundaryGraphicView=void 0}_updateAggregateBoundaryFeature(e){let{view:t}=this,a=this._boundaryGraphicView;if(!t){this._removeAggregateBoundaryFeature();return}a!==t&&this._removeBoundaryGraphicFromView(a),this.selectedAggregateBoundaryFeature.geometry=e,this._boundaryGraphicView=t,t.graphics.includes(this.selectedAggregateBoundaryFeature)||t.graphics.add(this.selectedAggregateBoundaryFeature)}async _getLayerViewAndQuery(e){let{view:t}=this,a=f(e);if(!t||!a)return null;let r=await t.whenLayerView(a);if(!r?.createQuery||!r?.queryFeatures||!r?.queryExtent)return null;let s=r.createQuery(),i=e.getObjectId();return s.aggregateIds=i!=null?[i]:[],[r,s]}async _updateAggregatedFeatures(){this._cancelQuery();let{feature:e}=this;if(!e?.isAggregate){this._resetAggregatedFeaturesState();return}let t=await this._getLayerViewAndQuery(e);if(!t){this._resetAggregatedFeaturesState();return}let[a,r]=t,s=new AbortController;this._abortController=s,this._setLoading(!0);try{let[i,o]=await Promise.all([a.queryFeatures(r,{signal:s.signal}),a.queryExtent(r,{signal:s.signal})]);if(this._abortController!==s||s.signal.aborted)return;this._abortController=null,this._setLoading(!1);let g=i.features??[];this._setAggregatedFeaturesState(g),o.extent?this._updateAggregateBoundaryFeature(o.extent):this._removeAggregateBoundaryFeature()}catch(i){if(this._abortController!==s||(this._abortController=null,this._setLoading(!1),C(i)))return;this._resetAggregatedFeaturesState()}}_addFlowItem(e){e&&this.flowItems?.push(e)}async _addSelectedAggregatedFeature(e){let{view:t}=this;if(e&&t){let a=await b(e),r=e.clone();r.symbol=a,this._selectedAggregatedFeature=r,t.graphics.add(this._selectedAggregatedFeature)}}_removeSelectedAggregatedFeature(){this._selectedAggregatedFeature&&this.view&&(this.view.graphics.remove(this._selectedAggregatedFeature),this._selectedAggregatedFeature=void 0)}async _selectFeature(e){let{flowItems:t,view:a}=this;t&&this._addFlowItem(_(n`<arcgis-feature-next .autoDestroyDisabled=${this.autoDestroyDisabled} .chartAnimationDisabled=${this.chartAnimationDisabled} .defaultPopupTemplateEnabled=${this.defaultPopupTemplateEnabled} .flowItems=${t} .graphic=${e.graphic} .headingLevel=${this.headingLevel} .hideAttachmentsContent=${this.hideAttachmentsContent} .hideContent=${this.hideContent} .hideCustomContent=${this.hideCustomContent} .hideExpressionContent=${this.hideExpressionContent} .hideFieldsContent=${this.hideFieldsContent} .hideHeading=${this.hideHeading} .hideLastEditedInfo=${this.hideLastEditedInfo} .hideMediaContent=${this.hideMediaContent} .hideTextContent=${this.hideTextContent} .location=${this.location} .map=${this.map} .messageOverrides=${this.messageOverrides} .showRelationshipContent=${this.showRelationshipContent} .showUtilityNetworkContent=${this.showUtilityNetworkContent} .spatialReference=${this.spatialReference} .timeZone=${this.timeZone} .view=${a??void 0}></arcgis-feature-next>`))}async _selectRelativeAggregatedFeature(e){let{aggregatedFeatures:t,aggregatedFeatureItems:a,flowItems:r}=this;if(!r||t.length===0||a.length===0)return;let s=t.length,i=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<s?this.selectedAggregatedFeatureIndex:-1;if(i===-1){let c=r.getItemAt(r.length-1)?.graphic;i=c?t.indexOf(c):-1}let o=i===-1?e>0?0:s-1:(i+e+s)%s,g=a[o];if(!g?.graphic)return;this._setSelectedAggregatedFeatureIndex(o);let u=r.getItemAt(r.length-1);if(u?.flowType==="feature"){u.graphic=g.graphic,this._removeSelectedAggregatedFeature(),await this._addSelectedAggregatedFeature(g.graphic);return}await this._selectFeature(g)}_renderChevronIconNode(){return n`<calcite-icon flip-rtl icon=chevron-right scale=s slot=content-end></calcite-icon>`}render(){let{_renderableAggregatedFeatureItems:e}=this,{loading:t}=this;return t||e.length>0?n`<calcite-list .loading=${t} display-mode=flat .label=${this.messages?.aggregatedFeatures??""} selection-mode=none>${e.map(a=>n`<calcite-list-item .label=${a.heading?x(a.heading):void 0} @calciteListItemSelect=${()=>this._selectFeature(a)}>${this._renderChevronIconNode()}</calcite-list-item>`)}</calcite-list>`:n`<calcite-notice icon=information kind=brand open scale=s width=full><div slot=message>${this.messages?.noAggregatedFeatures}</div></calcite-notice>`}};p("arcgis-aggregated-features",l);return l},"core/Collection","popup/FeatureContent","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{N as m,T as u,a as l,b as o}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:c},d,f])=>{var p=l`.invalid-wkid-text{color:var(--calcite-color-status-danger);font-size:var(--calcite-font-size--0)}`,h=/^\s*\d+(?:\s*\+\s*\d+)*(?:\s*,\s*\d+(?:\s*\+\s*\d+)*)*\s*$/u;function T(i){if(!/^\d+$/u.test(i))return null;let t=Number(i);return Number.isSafeInteger(t)&&t>0?t:null}function v(i){if(!h.test(i))return null;let t=[];for(let s of i.split(",")){let r=[];for(let a of s.split("+")){let n=T(a.trim());if(n==null)return null;r.push(new f({wkid:n}))}t.push(new d({steps:r}))}return t}function _(i){return i==null||i.length===0?"":i.map(t=>t.steps.map(s=>s.wkid).filter(s=>s!=null).join("+")).filter(t=>t.length>0).join(",")}var e=class extends m{constructor(){super(...arguments),this._isValidDatumTransformations=!0}static{this.properties={_datumTransformations:16,_isValidDatumTransformations:16,templateOptions:0,viewModel:0,messages:0}}static{this.styles=p}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel.datumTransformations,t=>{this._datumTransformations=_(t),this._isValidDatumTransformations=!0},{initial:!0})])}render(){let{messages:t}=this,s=this.viewModel.cimVersion;if(!(s!=null&&Number.parseFloat(s)<3.7))return o`<div><calcite-label>${t.datumTransformations}<calcite-input .value=${this._datumTransformations??""} .max=${Number.MAX_SAFE_INTEGER} @calciteInputInput=${({currentTarget:r})=>{let a=r.value?.trim()??"";if(this._datumTransformations=a,a===""){this.viewModel.datumTransformations=null,this._isValidDatumTransformations=!0;return}let n=v(a);if(n==null){this._isValidDatumTransformations=!1;return}this._isValidDatumTransformations=!0,this.viewModel.datumTransformations=n}}></calcite-input>${this._isValidDatumTransformations?null:o`<div class="invalid-wkid-text">${t.invalidWkid}</div>`}</calcite-label></div>`}};u("arcgis-print-datum-transformation-input",e);return e},"core/reactiveUtils","geometry/operators/support/GeographicTransformation","geometry/operators/support/GeographicTransformationStep")
2
+ import{N as m,T as u,a as l,b as o}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:c},d,f])=>{var p=l`.invalid-wkid-text{color:var(--calcite-color-status-danger);font-size:var(--calcite-font-size--0)}`,h=/^\s*\d+(?:\s*\+\s*\d+)*(?:\s*,\s*\d+(?:\s*\+\s*\d+)*)*\s*$/u;function T(i){if(!/^\d+$/u.test(i))return null;let t=Number(i);return Number.isSafeInteger(t)&&t>0?t:null}function v(i){if(!h.test(i))return null;let t=[];for(let s of i.split(",")){let r=[];for(let a of s.split("+")){let n=T(a.trim());if(n==null)return null;r.push(new f({wkid:n}))}t.push(new d({steps:r}))}return t}function _(i){return i==null||i.length===0?"":i.map(t=>t.steps.map(s=>s.wkid).filter(s=>s!=null).join("+")).filter(t=>t.length>0).join(",")}var e=class extends m{constructor(){super(...arguments),this._isValidDatumTransformations=!0}static{this.properties={_datumTransformations:16,_isValidDatumTransformations:16,templateOptions:0,viewModel:0,messages:0}}static{this.styles=p}loaded(){this.manager.onLifecycle(()=>[c(()=>this.viewModel.datumTransformations,t=>{this._datumTransformations=_(t),this._isValidDatumTransformations=!0},{initial:!0})])}render(){let{messages:t}=this,s=this.viewModel.cimVersion;if(!(s!=null&&Number.parseFloat(s)<3.7))return o`<div><calcite-label>${t.datumTransformations}<calcite-input .value=${this._datumTransformations??""} .max=${Number.MAX_SAFE_INTEGER} @calciteInputInput=${({currentTarget:r})=>{let a=r.value?.trim()??"";if(this._datumTransformations=a,a===""){this.viewModel.datumTransformations=null,this._isValidDatumTransformations=!0;return}let n=v(a);if(n==null){this._isValidDatumTransformations=!1;return}this._isValidDatumTransformations=!0,this.viewModel.datumTransformations=n}}></calcite-input>${this._isValidDatumTransformations?null:o`<div class="invalid-wkid-text">${t.invalidWkid}</div>`}</calcite-label></div>`}};u("arcgis-print-datum-transformation-input",e);return e},"core/reactiveUtils","geometry/operators/support/GeographicTransformation","geometry/operators/support/GeographicTransformationStep")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as h}from"./AOZTFK3U.js";import{L as r,M as c,N as u,O as l,T as d,b as a}from"./QL3M4ZI7.js";export default $arcgis.t(([{createReactiveMap:v},{watch:m},{substitute:F}])=>{var o=class extends u{constructor(){super(...arguments),this._associationFeaturesIntersectionObserver=new IntersectionObserver(([t])=>{t?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._associationFeaturesIntersectionObserverNode=r(),this._currentFeaturePage=1,this._increaseFeaturePage=()=>{let{state:t,showAllEnabled:e,associatedFeatureCount:i,featuresPerPage:s,currentFeaturePage:n}=this;t==="ready"&&e&&i>=s*n&&this.currentFeaturePage++},this._isFeatureCountNoticeOpen=!0,this.associationViewModels=new Map,this.featuresPerPage=50,this.maxFeatureCount=1e3,this.showAllEnabled=!1,this.state="ready",this.tooltipReferenceMap=v()}static{this.properties={associatedFeatureCount:32,associationViewModels:0,currentFeaturePage:9,featuresPerPage:9,maxFeatureCount:9,messages:0,parentFeatureViewModel:0,selectedLayer:0,showAllEnabled:5,state:1,tooltipReferenceMap:0}}get associatedFeatureCount(){let t=this.associationViewModels,e=this.selectedLayer?t.get(this.selectedLayer):null;return e?e.length:0}get currentFeaturePage(){return this._currentFeaturePage}set currentFeaturePage(t){let{featuresPerPage:e,associatedFeatureCount:i}=this,s=Math.ceil(i/e)||1,n=Math.max(Math.min(t,s),1);this._currentFeaturePage=n}loaded(){this.manager.onLifecycle(()=>[m(()=>[this.state,this.showAllEnabled,this._associationFeaturesIntersectionObserverNode],()=>{this._handleAssociationFeaturesObserverChange()},{initial:!0})])}getConnectivityTooltip(t){let{messages:e}=this;if(!e)return"";switch(t){case"connectivity":case"junction-junction-connectivity":return e.associationsJunctionJunction;case"junction-edge-from-connectivity":return e.associationsJunctionEdgeFrom;case"junction-edge-midspan-connectivity":return e.associationsJunctionEdgeMidspan;case"junction-edge-to-connectivity":return e.associationsJunctionEdgeTo;default:return""}}_handleAssociationFeaturesObserverChange(){this._unobserveAssociationFeaturesObserver();let{state:t,showAllEnabled:e}=this;this._associationFeaturesIntersectionObserverNode.value&&t==="ready"&&e&&this._associationFeaturesIntersectionObserver.observe(this._associationFeaturesIntersectionObserverNode.value)}_unobserveAssociationFeaturesObserver(){this._associationFeaturesIntersectionObserverNode.value&&this._associationFeaturesIntersectionObserver.unobserve(this._associationFeaturesIntersectionObserverNode.value)}_renderConnectivityIcon(t,e){let{tooltipReferenceMap:i}=this,s;switch(t){case"junction-edge-from-connectivity":s="connection-end-left";break;case"junction-edge-to-connectivity":s="connection-end-right";break;case"junction-edge-midspan-connectivity":s="connection-middle";break;default:s="connection-to-connection"}return a`<calcite-icon .icon=${s} @pointerover=${n=>{i.set(e,n.currentTarget)}} scale=s slot=content-start></calcite-icon>`}_renderFeatureCountWarning(){let{associatedFeatureCount:t,maxFeatureCount:e,messages:i}=this,s=F(i?.associationsLimitNoticeMessage??"",{number:e}),n=t>e,g=i?.associationsLimitNoticeTitle??"";return n?a`<calcite-notice class=${l(this._isFeatureCountNoticeOpen?"notice-container":"")} closable icon=information kind=info open scale=s width=full @calciteNoticeBeforeOpen=${()=>this._isFeatureCountNoticeOpen=!0} @calciteNoticeClose=${()=>this._isFeatureCountNoticeOpen=!1}><div slot=title>${g}</div><div slot=message>${s}</div></calcite-notice>`:null}_renderFeatureObserver(){return a`<div class="feature-observer" ${c(this._associationFeaturesIntersectionObserverNode)}></div>`}_renderLoading(){return h("loading-container",a`<div class="loading-container">${this._renderLoadingIcon()}</div>`)}_renderLoadingIcon(){let t=this.messages?.loading??"";return a`<calcite-loader inline .label=${t}></calcite-loader>`}};d("arcgis-utility-network-association-list",o);return o},"applications/Components/featureUtils","core/reactiveUtils","intl")
2
+ import{a as h}from"./RDWM76R2.js";import{L as r,M as c,N as u,O as l,T as d,b as a}from"./ZJZBS5ZY.js";export default $arcgis.t(([{createReactiveMap:v},{watch:m},{substitute:F}])=>{var o=class extends u{constructor(){super(...arguments),this._associationFeaturesIntersectionObserver=new IntersectionObserver(([t])=>{t?.isIntersecting&&this._increaseFeaturePage()},{root:window.document}),this._associationFeaturesIntersectionObserverNode=r(),this._currentFeaturePage=1,this._increaseFeaturePage=()=>{let{state:t,showAllEnabled:e,associatedFeatureCount:i,featuresPerPage:s,currentFeaturePage:n}=this;t==="ready"&&e&&i>=s*n&&this.currentFeaturePage++},this._isFeatureCountNoticeOpen=!0,this.associationViewModels=new Map,this.featuresPerPage=50,this.maxFeatureCount=1e3,this.showAllEnabled=!1,this.state="ready",this.tooltipReferenceMap=v()}static{this.properties={associatedFeatureCount:32,associationViewModels:0,currentFeaturePage:9,featuresPerPage:9,maxFeatureCount:9,messages:0,parentFeatureViewModel:0,selectedLayer:0,showAllEnabled:5,state:1,tooltipReferenceMap:0}}get associatedFeatureCount(){let t=this.associationViewModels,e=this.selectedLayer?t.get(this.selectedLayer):null;return e?e.length:0}get currentFeaturePage(){return this._currentFeaturePage}set currentFeaturePage(t){let{featuresPerPage:e,associatedFeatureCount:i}=this,s=Math.ceil(i/e)||1,n=Math.max(Math.min(t,s),1);this._currentFeaturePage=n}loaded(){this.manager.onLifecycle(()=>[m(()=>[this.state,this.showAllEnabled,this._associationFeaturesIntersectionObserverNode],()=>{this._handleAssociationFeaturesObserverChange()},{initial:!0})])}getConnectivityTooltip(t){let{messages:e}=this;if(!e)return"";switch(t){case"connectivity":case"junction-junction-connectivity":return e.associationsJunctionJunction;case"junction-edge-from-connectivity":return e.associationsJunctionEdgeFrom;case"junction-edge-midspan-connectivity":return e.associationsJunctionEdgeMidspan;case"junction-edge-to-connectivity":return e.associationsJunctionEdgeTo;default:return""}}_handleAssociationFeaturesObserverChange(){this._unobserveAssociationFeaturesObserver();let{state:t,showAllEnabled:e}=this;this._associationFeaturesIntersectionObserverNode.value&&t==="ready"&&e&&this._associationFeaturesIntersectionObserver.observe(this._associationFeaturesIntersectionObserverNode.value)}_unobserveAssociationFeaturesObserver(){this._associationFeaturesIntersectionObserverNode.value&&this._associationFeaturesIntersectionObserver.unobserve(this._associationFeaturesIntersectionObserverNode.value)}_renderConnectivityIcon(t,e){let{tooltipReferenceMap:i}=this,s;switch(t){case"junction-edge-from-connectivity":s="connection-end-left";break;case"junction-edge-to-connectivity":s="connection-end-right";break;case"junction-edge-midspan-connectivity":s="connection-middle";break;default:s="connection-to-connection"}return a`<calcite-icon .icon=${s} @pointerover=${n=>{i.set(e,n.currentTarget)}} scale=s slot=content-start></calcite-icon>`}_renderFeatureCountWarning(){let{associatedFeatureCount:t,maxFeatureCount:e,messages:i}=this,s=F(i?.associationsLimitNoticeMessage??"",{number:e}),n=t>e,g=i?.associationsLimitNoticeTitle??"";return n?a`<calcite-notice class=${l(this._isFeatureCountNoticeOpen?"notice-container":"")} closable icon=information kind=info open scale=s width=full @calciteNoticeBeforeOpen=${()=>this._isFeatureCountNoticeOpen=!0} @calciteNoticeClose=${()=>this._isFeatureCountNoticeOpen=!1}><div slot=title>${g}</div><div slot=message>${s}</div></calcite-notice>`:null}_renderFeatureObserver(){return a`<div class="feature-observer" ${c(this._associationFeaturesIntersectionObserverNode)}></div>`}_renderLoading(){return h("loading-container",a`<div class="loading-container">${this._renderLoadingIcon()}</div>`)}_renderLoadingIcon(){let t=this.messages?.loading??"";return a`<calcite-loader inline .label=${t}></calcite-loader>`}};d("arcgis-utility-network-association-list",o);return o},"applications/Components/featureUtils","core/reactiveUtils","intl")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as $}from"./XEK22IDA.js";import f from"./MZWO5JYA.js";import e from"./2WLXD7OI.js";import{a as F}from"./PTHSNQL2.js";import d from"./RTXRLIYL.js";import c from"./AM3UJO3A.js";import{g as w}from"./CNA7TDZN.js";import"./VJMC3CMB.js";import a from"./LIBO3YUY.js";import"./QUZTFUWM.js";import"./M3DP7XNI.js";import{N as g,T as b,a as T,b as r,w as h}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:l,subclass:x},B,_,{getAllStandardFeatureTemplatesForLayer:D,getTemplatesForLayers:L},{isTable:y,getEffectiveLayerCapabilities:E},{watch:v},,{a:M},,S,{e:m,f:f}])=>{var U=T`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`,C=Object.defineProperty,R=Object.getOwnPropertyDescriptor,a=(t,e,i,o)=>{for(var n=o>1?void 0:o?R(e,i):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(n=(o?c(e,i,n):c(n))||n);return o&&n&&C(e,i,n),n};function I(t){switch(t){case"point":case"multipoint":case"polyline":case"polygon":case"extent":case"mesh":return t}return"noneSpecified"}var A=t=>I(t.layer.geometryType??""),s=class extends B{constructor(t){super(t),this._hasRunInitialLoad=!1,this.favoritesEnabled=!1,this.recentlyUsedEnabled=!1,this.hideTemplateDescription=!1,this.filterText="",this.recentFilterText="",this.favoritesFilterText="",this.display="grouped",this.groupBy="layer",this.hideTemplatesMode="never",this.disableTemplatesMode="never",this.sectionSortBy="system",this.templateSortBy="alphabetical",this.sharedTemplatesDisabled=!1,this.excludeTables=!1,this.favorites=new Set,this.fetchingTemplateMetaData=!1,this.recentlyUsed=[]}async handleTemplateSourceDefinitionChanged(){if(this._hasRunInitialLoad=!1,this.applicationTemplates){await this._restore();return}try{this.fetchingTemplateMetaData=!0;let t=this.activeLayers;if(await Promise.allSettled(t.map(e=>e.load())),this.sharedTemplatesDisabled){let e=[];for(let i of t){let o=D(i);o.length>0&&e.push({layer:i,templates:o})}this.mapTemplates=e;return}this.mapTemplates=await L(t,this.view,void 0,{returnVisibleTemplatesOnly:!0}),await this._restore()}catch{this.mapTemplates=[]}finally{this.fetchingTemplateMetaData=!1}}get loading(){return!this._hasRunInitialLoad||this.layers!==void 0||this.applicationTemplates!==void 0||!this.view?.ready}async addFavorite(t){this.favorites.add(t.id),this.favorites=new Set(this.favorites)}async removeFavorite(t){this.favorites.delete(t.id),this.favorites=new Set(this.favorites)}addRecent(t){if(!this.recentlyUsedEnabled)return;let e=this.recentlyUsed.filter(i=>i!==t.id);e.unshift(t.id)>20&&(e.length=20),this.recentlyUsed=e}async removeRecent(t){this.recentlyUsed=this.recentlyUsed.filter(e=>e!==t.id)}async _restore(){try{if(this.favoritesEnabled&&this.restoreFavorites){let t=await this.restoreFavorites();this.favorites=new Set(t??[])}}catch{}try{if(this.recentlyUsedEnabled&&this.restoreRecentlyUsed){let t=await this.restoreRecentlyUsed();this.recentlyUsed=t??[]}}catch{}}_sortTemplates(t){if(this.templateSortByFunction){let e=this.templateSortByFunction(t)??null;return e===null?t:e}return this.templateSortBy==="alphabetical"?t.toSorted((e,i)=>e.label.localeCompare(i.label)):t}_sortSections(t){if(this.sectionSortByFunction){let e=this.sectionSortByFunction(t);e&&(t=e)}else if(this.sectionSortBy==="alphabetical")t=t.toSorted((e,i)=>e.sectionName.localeCompare(i.sectionName));else if(this.groupBy==="geometry"&&!this.groupByFunction){let e={point:1,multipoint:2,polyline:3,polygon:4,extent:5,mesh:6,noneSpecified:7};t=t.toSorted((i,o)=>{let n=e[i.sectionName]??10,p=e[o.sectionName]??10;return n-p})}for(let e of t)e.templates=this._sortTemplates(e.templates);return t}_layerIsVisibleAtCurrentScale(t){if(!this.view)return!0;let e=t;f(t)&&(e=t.parent);let i=this.view.allLayerViews.find(o=>o.layer===e);if(!i)return!0;if(f(t)){let o=this.view.scale;if(i.visibleAtCurrentScale){let n=t.minScale,p=t.maxScale,c=!n,d=!p;return!c&&o<=n&&(c=!0),!d&&o>=p&&(d=!0),c&&d}}return i.visibleAtCurrentScale}get activeLayers(){let t=[];for(let e of this.layers??[])if(m(e))for(let i of e.sublayers)t.push(i);else t.push(e);if(this.layers===void 0||this.layers===null){for(let e of[...this.view?.map?.allLayers?.slice(0).reverse()??[],...this.excludeTables?[]:this.view?.map?.allTables?.slice(0).reverse()??[]])if(e.type==="feature"||e.type==="scene"||e.type==="geojson"||e.type==="oriented-imagery"||e.type==="knowledge-graph")t.push(e);else if(m(e))for(let i of e.sublayers)t.push(i)}return t}get selectedTemplate(){return this.allTemplates.find(t=>t.id===this.selectedTemplateId)}get effectiveTemplates(){return this.templates.map(t=>({...t,templates:t.templates.filter(e=>this.inclusionFilter(e))})).filter(t=>t.templates.length>0)}get templateList(){return this._sortTemplates(this.effectiveTemplates.flatMap(t=>t.templates))}get allTemplates(){return this._sortTemplates(this.templates.flatMap(t=>t.templates))}inclusionFilter(t){if(this.excludeTables&&y(t.layer)||this.applicationFilterFunction?.(t)===!1)return!1;let e=E(t.layer)?.operations;return e?.supportsEditing===!1&&!e?.supportsAdd?!1:y(t.layer)?!0:!(this.hideTemplatesMode==="visible"&&!t.layer.visible||this.hideTemplatesMode==="scale"&&!this._layerIsVisibleAtCurrentScale(t.layer))}get templateSetKey(){return this._sortTemplates(this.allTemplates).map(t=>t.id).join(",")}get disabledTemplates(){let t=new Set;for(let e of this.allTemplates){if(this.applicationDisabledFunction&&this.applicationDisabledFunction(e)){t.add(e);continue}if(!y(e.layer)){if(this.disableTemplatesMode==="visible"&&!e.layer.visible){t.add(e);continue}if(this.disableTemplatesMode==="scale"&&this.view&&!this._layerIsVisibleAtCurrentScale(e.layer)){t.add(e);continue}}}return t}get templates(){return this.applicationTemplates??this.organizedMapTemplates}get organizedMapTemplates(){if(this.groupByFunction||this.groupBy==="geometry"){let t=!this.groupByFunction,e=this.groupByFunction??A,i=new Map;for(let o of this.mapTemplates??[])for(let n of o.templates){let p=new _({template:n,layer:o.layer}),c=e(p);if(c!=null)if(i.has(c))i.get(c)?.templates.push(p);else{let d={sectionName:c,...t?{autoTranslate:!0}:{},templates:[p]};i.set(c,d)}}return this._sortSections(Array.from(i.values()))}return this._sortSections((this.mapTemplates??[]).map(({layer:t,templates:e})=>({sectionName:t.title??"",templates:e.map(i=>new _({layer:t,template:i}))})).filter(t=>t.templates.length>0))}get updating(){return this.fetchingTemplateMetaData}get favoriteTemplates(){let t=[];for(let e of this.effectiveTemplates)for(let i of e.templates)this.favorites.has(i.id)&&t.push(i);return t}get recentTemplates(){let t=new Map;for(let i of this.effectiveTemplates)for(let o of i.templates)t.set(o.id,o);let e=[];for(let i of this.recentlyUsed)t.has(i)&&e.push(t.get(i));return e}};a([l()],s.prototype,"loading",1);a([l()],s.prototype,"_hasRunInitialLoad",2);a([l()],s.prototype,"activeLayers",1);a([l()],s.prototype,"favoritesEnabled",2);a([l()],s.prototype,"recentlyUsedEnabled",2);a([l()],s.prototype,"hideTemplateDescription",2);a([l()],s.prototype,"filterText",2);a([l()],s.prototype,"recentFilterText",2);a([l()],s.prototype,"favoritesFilterText",2);a([l()],s.prototype,"selectedTemplateId",2);a([l()],s.prototype,"selectedTemplate",1);a([l()],s.prototype,"layers",2);a([l()],s.prototype,"restoreFavorites",2);a([l()],s.prototype,"restoreRecentlyUsed",2);a([l()],s.prototype,"applicationDisabledFunction",2);a([l()],s.prototype,"applicationFilterFunction",2);a([l()],s.prototype,"display",2);a([l()],s.prototype,"groupBy",2);a([l()],s.prototype,"hideTemplatesMode",2);a([l()],s.prototype,"disableTemplatesMode",2);a([l()],s.prototype,"groupByFunction",2);a([l()],s.prototype,"sectionSortBy",2);a([l()],s.prototype,"templateSortBy",2);a([l()],s.prototype,"sectionSortByFunction",2);a([l()],s.prototype,"templateSortByFunction",2);a([l()],s.prototype,"sharedTemplatesDisabled",2);a([l()],s.prototype,"excludeTables",2);a([l()],s.prototype,"favorites",2);a([l()],s.prototype,"effectiveTemplates",1);a([l()],s.prototype,"templateList",1);a([l()],s.prototype,"allTemplates",1);a([l()],s.prototype,"templateSetKey",1);a([l()],s.prototype,"disabledTemplates",1);a([l()],s.prototype,"templates",1);a([l()],s.prototype,"mapTemplates",2);a([l()],s.prototype,"organizedMapTemplates",1);a([l()],s.prototype,"fetchingTemplateMetaData",2);a([l()],s.prototype,"updating",1);a([l()],s.prototype,"applicationTemplates",2);a([l()],s.prototype,"favoriteTemplates",1);a([l()],s.prototype,"recentTemplates",1);a([l()],s.prototype,"recentlyUsed",2);a([l()],s.prototype,"view",2);s=a([x("components.feature-templates.FeatureTemplatesViewModel")],s);var N=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=N(this),this.favoritesEnabled=this.viewModel.favoritesEnabled,this.favorites=this.viewModel.favorites,this.restoreFavorites=this.viewModel.restoreFavorites,this.restoreRecentlyUsed=this.viewModel.restoreRecentlyUsed,this.recentlyUsed=this.viewModel.recentlyUsed,this.sharedTemplatesDisabled=this.viewModel.sharedTemplatesDisabled,this.filterText=this.viewModel.filterText,this.recentFilterText=this.viewModel.recentFilterText,this.favoritesFilterText=this.viewModel.favoritesFilterText,this.recentlyUsedEnabled=this.viewModel.recentlyUsedEnabled,this.excludeTables=this.viewModel.excludeTables,this.effectiveTemplates=this.viewModel.effectiveTemplates,this.applicationTemplates=this.viewModel.applicationTemplates,this.selectedTemplateId=this.viewModel.selectedTemplateId,this.selectedTemplate=this.viewModel.selectedTemplate,this.applicationFilterFunction=this.viewModel.applicationFilterFunction,this.applicationDisabledFunction=this.viewModel.applicationDisabledFunction,this.display=this.viewModel.display,this.groupBy=this.viewModel.groupBy,this.sectionSortBy=this.viewModel.sectionSortBy,this.templateSortBy=this.viewModel.templateSortBy,this.templateSortByFunction=this.viewModel.templateSortByFunction,this.sectionSortByFunction=this.viewModel.sectionSortByFunction,this.hideTemplatesMode=this.viewModel.hideTemplatesMode,this.disableTemplatesMode=this.viewModel.disableTemplatesMode,this.groupByFunction=this.viewModel.groupByFunction,this.hideTemplateDescription=this.viewModel.hideTemplateDescription,this.layers=this.viewModel.layers,this.view=M(this),this.autoDestroyDisabled=!1,this.updating=this.viewModel.updating,this.disabled=!1,this.showCollapseButton=!1,this.showFilter=!1,this.minRequiredFilterCount=2,this.arcgisPropertyChange=w()("effectiveTemplates","filterText","recentlyUsed","favorites"),this.arcgisReady=h(),this.arcgisTemplatesChanged=h(),this.arcgisSelectTemplate=h()}static{this.properties={favoritesEnabled:5,favorites:32,restoreFavorites:0,restoreRecentlyUsed:0,recentlyUsed:32,sharedTemplatesDisabled:5,filterText:1,recentFilterText:1,favoritesFilterText:1,recentlyUsedEnabled:5,excludeTables:5,effectiveTemplates:32,applicationTemplates:0,selectedTemplateId:1,selectedTemplate:32,applicationFilterFunction:0,applicationDisabledFunction:0,display:1,groupBy:1,sectionSortBy:1,templateSortBy:1,templateSortByFunction:0,sectionSortByFunction:0,hideTemplatesMode:1,disableTemplatesMode:1,groupByFunction:0,hideTemplateDescription:5,layers:0,view:0,referenceElement:1,autoDestroyDisabled:5,updating:32,disabled:5,showCollapseButton:5,showFilter:5,minRequiredFilterCount:9}}static{this.styles=U}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>this.view,()=>{this.viewModel.view=this.view},{initial:!0}),v(()=>this.viewModel.templateSetKey,()=>{this.arcgisTemplatesChanged.emit()}),v(()=>[this.viewModel.activeLayers?.map(e=>e.id).join(","),this.viewModel?.applicationTemplates,this.viewModel?.sharedTemplatesDisabled],$(()=>this.viewModel.handleTemplateSourceDefinitionChanged(),10),{initial:!0})])}_handleSelectTemplate(e){this.selectedTemplateId=e.id,this.arcgisSelectTemplate.emit({template:e}),this.viewModel.addRecent(e)}_removeTemplateFromList(e,i){if(i==="favorites"){this.viewModel.removeFavorite(e);return}this.viewModel.removeRecent(e)}_renderTemplates(){return this.effectiveTemplates.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>`:r`<calcite-list .filterPlaceholder=${this._messages.filterPlaceholder??""} .filterText=${this.filterText} .label=${this._messages?.templates??""} .filterEnabled=${this.showFilter&&this.viewModel.templateList.length>=this.minRequiredFilterCount} selection-appearance=border selection-mode=single @calciteListFilter=${e=>{this.filterText=e.target.filterText}}>${this.display==="grouped"?this.effectiveTemplates.map(e=>r`<calcite-list-item-group .heading=${e.autoTranslate?this._messages[e.sectionName]??"":e.sectionName}>${e.templates.map(i=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:i.description} .value=${i.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(i)}}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`):this.viewModel.templateList.map(e=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:e.description} .value=${e.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(e)}}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderAddFavorite(e){return this.viewModel.favoritesEnabled?r`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id)?"heart-f":"heart"} @click=${()=>{this.viewModel.favorites.has(e.id)?this.viewModel.removeFavorite(e):this.viewModel.addFavorite(e)}} .text=${this._messages.addFavorite??""}></calcite-action>`:""}_renderList(e){let i=e==="favorites"?this.viewModel.favoriteTemplates:this.viewModel.recentTemplates;return i.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e==="favorites"?this._messages.noFavorites:this._messages.noRecent}</div></calcite-notice>`:r`<calcite-list .filterText=${e==="favorites"?this.favoritesFilterText:this.recentFilterText} .filterPlaceholder=${this._messages.filterPlaceholder??""} .label=${(e==="favorites"?this._messages.favorites:this._messages.recent)??""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${o=>{this.filterText=o.target.filterText}}>${i.map(o=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(o)} .label=${o.label} .description=${this.hideTemplateDescription?void 0:o.description} .value=${o.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(o)}}><arcgis-template-image slot=content-start .template=${o}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${()=>{this._removeTemplateFromList(o,e)}} .text=${(e==="favorites"?this._messages.removeFavorite:this._messages.removeRecent)??""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderFilteredEmpty(){return r`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`}_renderContent(){return this.effectiveTemplates.length===0&&this.viewModel.loading?null:this.favoritesEnabled||this.recentlyUsedEnabled?r`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled?r`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>`:""}${this.favoritesEnabled?r`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>`:""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>`:this._renderTemplates()}render(){return r`<div class="root">${this._renderContent()}${this.viewModel.updating||this.disabled?r`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>`:null}</div>`}};b("arcgis-feature-templates",u);return u},"core/accessorSupport/decorators","core/Accessor","editing/templates/TemplateListItem","applications/Components/templateUtils","applications/Components/layerUtils","core/reactiveUtils",a,c,d,e,f)
2
+ import{a as $}from"./XEK22IDA.js";import f from"./MZWO5JYA.js";import e from"./G3GFYB3W.js";import{a as F}from"./NDMHZQ2Z.js";import d from"./K3VQUQ6I.js";import c from"./NFE73D6R.js";import{g as w}from"./5GFBHLDY.js";import"./42UVPIOD.js";import a from"./34IPKNHM.js";import"./QUZTFUWM.js";import"./QLIWDFZI.js";import{N as g,T as b,a as T,b as r,w as h}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([{property:l,subclass:x},B,_,{getAllStandardFeatureTemplatesForLayer:D,getTemplatesForLayers:L},{isTable:y,getEffectiveLayerCapabilities:E},{watch:v},,{a:M},,S,{e:m,f:f}])=>{var U=T`:host{display:flex;position:relative;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-relative-tight)}.filter-no-results{padding:var(--calcite-spacing-md) var(--calcite-spacing-lg)}.root{display:flex;flex:1 1 auto;overflow:hidden auto;transition:max-height .25s ease-in-out}.root>*{width:100%;box-sizing:border-box}.feature-template-tabs{--calcite-tab-background-color: transparent}`,C=Object.defineProperty,R=Object.getOwnPropertyDescriptor,a=(t,e,i,o)=>{for(var n=o>1?void 0:o?R(e,i):e,p=t.length-1,c;p>=0;p--)(c=t[p])&&(n=(o?c(e,i,n):c(n))||n);return o&&n&&C(e,i,n),n};function I(t){switch(t){case"point":case"multipoint":case"polyline":case"polygon":case"extent":case"mesh":return t}return"noneSpecified"}var A=t=>I(t.layer.geometryType??""),s=class extends B{constructor(t){super(t),this._hasRunInitialLoad=!1,this.favoritesEnabled=!1,this.recentlyUsedEnabled=!1,this.hideTemplateDescription=!1,this.filterText="",this.recentFilterText="",this.favoritesFilterText="",this.display="grouped",this.groupBy="layer",this.hideTemplatesMode="never",this.disableTemplatesMode="never",this.sectionSortBy="system",this.templateSortBy="alphabetical",this.sharedTemplatesDisabled=!1,this.excludeTables=!1,this.favorites=new Set,this.fetchingTemplateMetaData=!1,this.recentlyUsed=[]}async handleTemplateSourceDefinitionChanged(){if(this._hasRunInitialLoad=!1,this.applicationTemplates){await this._restore();return}try{this.fetchingTemplateMetaData=!0;let t=this.activeLayers;if(await Promise.allSettled(t.map(e=>e.load())),this.sharedTemplatesDisabled){let e=[];for(let i of t){let o=D(i);o.length>0&&e.push({layer:i,templates:o})}this.mapTemplates=e;return}this.mapTemplates=await L(t,this.view,void 0,{returnVisibleTemplatesOnly:!0}),await this._restore()}catch{this.mapTemplates=[]}finally{this.fetchingTemplateMetaData=!1}}get loading(){return!this._hasRunInitialLoad||this.layers!==void 0||this.applicationTemplates!==void 0||!this.view?.ready}async addFavorite(t){this.favorites.add(t.id),this.favorites=new Set(this.favorites)}async removeFavorite(t){this.favorites.delete(t.id),this.favorites=new Set(this.favorites)}addRecent(t){if(!this.recentlyUsedEnabled)return;let e=this.recentlyUsed.filter(i=>i!==t.id);e.unshift(t.id)>20&&(e.length=20),this.recentlyUsed=e}async removeRecent(t){this.recentlyUsed=this.recentlyUsed.filter(e=>e!==t.id)}async _restore(){try{if(this.favoritesEnabled&&this.restoreFavorites){let t=await this.restoreFavorites();this.favorites=new Set(t??[])}}catch{}try{if(this.recentlyUsedEnabled&&this.restoreRecentlyUsed){let t=await this.restoreRecentlyUsed();this.recentlyUsed=t??[]}}catch{}}_sortTemplates(t){if(this.templateSortByFunction){let e=this.templateSortByFunction(t)??null;return e===null?t:e}return this.templateSortBy==="alphabetical"?t.toSorted((e,i)=>e.label.localeCompare(i.label)):t}_sortSections(t){if(this.sectionSortByFunction){let e=this.sectionSortByFunction(t);e&&(t=e)}else if(this.sectionSortBy==="alphabetical")t=t.toSorted((e,i)=>e.sectionName.localeCompare(i.sectionName));else if(this.groupBy==="geometry"&&!this.groupByFunction){let e={point:1,multipoint:2,polyline:3,polygon:4,extent:5,mesh:6,noneSpecified:7};t=t.toSorted((i,o)=>{let n=e[i.sectionName]??10,p=e[o.sectionName]??10;return n-p})}for(let e of t)e.templates=this._sortTemplates(e.templates);return t}_layerIsVisibleAtCurrentScale(t){if(!this.view)return!0;let e=t;f(t)&&(e=t.parent);let i=this.view.allLayerViews.find(o=>o.layer===e);if(!i)return!0;if(f(t)){let o=this.view.scale;if(i.visibleAtCurrentScale){let n=t.minScale,p=t.maxScale,c=!n,d=!p;return!c&&o<=n&&(c=!0),!d&&o>=p&&(d=!0),c&&d}}return i.visibleAtCurrentScale}get activeLayers(){let t=[];for(let e of this.layers??[])if(m(e))for(let i of e.sublayers)t.push(i);else t.push(e);if(this.layers===void 0||this.layers===null){for(let e of[...this.view?.map?.allLayers?.slice(0).reverse()??[],...this.excludeTables?[]:this.view?.map?.allTables?.slice(0).reverse()??[]])if(e.type==="feature"||e.type==="scene"||e.type==="geojson"||e.type==="oriented-imagery"||e.type==="knowledge-graph")t.push(e);else if(m(e))for(let i of e.sublayers)t.push(i)}return t}get selectedTemplate(){return this.allTemplates.find(t=>t.id===this.selectedTemplateId)}get effectiveTemplates(){return this.templates.map(t=>({...t,templates:t.templates.filter(e=>this.inclusionFilter(e))})).filter(t=>t.templates.length>0)}get templateList(){return this._sortTemplates(this.effectiveTemplates.flatMap(t=>t.templates))}get allTemplates(){return this._sortTemplates(this.templates.flatMap(t=>t.templates))}inclusionFilter(t){if(this.excludeTables&&y(t.layer)||this.applicationFilterFunction?.(t)===!1)return!1;let e=E(t.layer)?.operations;return e?.supportsEditing===!1&&!e?.supportsAdd?!1:y(t.layer)?!0:!(this.hideTemplatesMode==="visible"&&!t.layer.visible||this.hideTemplatesMode==="scale"&&!this._layerIsVisibleAtCurrentScale(t.layer))}get templateSetKey(){return this._sortTemplates(this.allTemplates).map(t=>t.id).join(",")}get disabledTemplates(){let t=new Set;for(let e of this.allTemplates){if(this.applicationDisabledFunction&&this.applicationDisabledFunction(e)){t.add(e);continue}if(!y(e.layer)){if(this.disableTemplatesMode==="visible"&&!e.layer.visible){t.add(e);continue}if(this.disableTemplatesMode==="scale"&&this.view&&!this._layerIsVisibleAtCurrentScale(e.layer)){t.add(e);continue}}}return t}get templates(){return this.applicationTemplates??this.organizedMapTemplates}get organizedMapTemplates(){if(this.groupByFunction||this.groupBy==="geometry"){let t=!this.groupByFunction,e=this.groupByFunction??A,i=new Map;for(let o of this.mapTemplates??[])for(let n of o.templates){let p=new _({template:n,layer:o.layer}),c=e(p);if(c!=null)if(i.has(c))i.get(c)?.templates.push(p);else{let d={sectionName:c,...t?{autoTranslate:!0}:{},templates:[p]};i.set(c,d)}}return this._sortSections(Array.from(i.values()))}return this._sortSections((this.mapTemplates??[]).map(({layer:t,templates:e})=>({sectionName:t.title??"",templates:e.map(i=>new _({layer:t,template:i}))})).filter(t=>t.templates.length>0))}get updating(){return this.fetchingTemplateMetaData}get favoriteTemplates(){let t=[];for(let e of this.effectiveTemplates)for(let i of e.templates)this.favorites.has(i.id)&&t.push(i);return t}get recentTemplates(){let t=new Map;for(let i of this.effectiveTemplates)for(let o of i.templates)t.set(o.id,o);let e=[];for(let i of this.recentlyUsed)t.has(i)&&e.push(t.get(i));return e}};a([l()],s.prototype,"loading",1);a([l()],s.prototype,"_hasRunInitialLoad",2);a([l()],s.prototype,"activeLayers",1);a([l()],s.prototype,"favoritesEnabled",2);a([l()],s.prototype,"recentlyUsedEnabled",2);a([l()],s.prototype,"hideTemplateDescription",2);a([l()],s.prototype,"filterText",2);a([l()],s.prototype,"recentFilterText",2);a([l()],s.prototype,"favoritesFilterText",2);a([l()],s.prototype,"selectedTemplateId",2);a([l()],s.prototype,"selectedTemplate",1);a([l()],s.prototype,"layers",2);a([l()],s.prototype,"restoreFavorites",2);a([l()],s.prototype,"restoreRecentlyUsed",2);a([l()],s.prototype,"applicationDisabledFunction",2);a([l()],s.prototype,"applicationFilterFunction",2);a([l()],s.prototype,"display",2);a([l()],s.prototype,"groupBy",2);a([l()],s.prototype,"hideTemplatesMode",2);a([l()],s.prototype,"disableTemplatesMode",2);a([l()],s.prototype,"groupByFunction",2);a([l()],s.prototype,"sectionSortBy",2);a([l()],s.prototype,"templateSortBy",2);a([l()],s.prototype,"sectionSortByFunction",2);a([l()],s.prototype,"templateSortByFunction",2);a([l()],s.prototype,"sharedTemplatesDisabled",2);a([l()],s.prototype,"excludeTables",2);a([l()],s.prototype,"favorites",2);a([l()],s.prototype,"effectiveTemplates",1);a([l()],s.prototype,"templateList",1);a([l()],s.prototype,"allTemplates",1);a([l()],s.prototype,"templateSetKey",1);a([l()],s.prototype,"disabledTemplates",1);a([l()],s.prototype,"templates",1);a([l()],s.prototype,"mapTemplates",2);a([l()],s.prototype,"organizedMapTemplates",1);a([l()],s.prototype,"fetchingTemplateMetaData",2);a([l()],s.prototype,"updating",1);a([l()],s.prototype,"applicationTemplates",2);a([l()],s.prototype,"favoriteTemplates",1);a([l()],s.prototype,"recentTemplates",1);a([l()],s.prototype,"recentlyUsed",2);a([l()],s.prototype,"view",2);s=a([x("components.feature-templates.FeatureTemplatesViewModel")],s);var N=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=N(this),this.favoritesEnabled=this.viewModel.favoritesEnabled,this.favorites=this.viewModel.favorites,this.restoreFavorites=this.viewModel.restoreFavorites,this.restoreRecentlyUsed=this.viewModel.restoreRecentlyUsed,this.recentlyUsed=this.viewModel.recentlyUsed,this.sharedTemplatesDisabled=this.viewModel.sharedTemplatesDisabled,this.filterText=this.viewModel.filterText,this.recentFilterText=this.viewModel.recentFilterText,this.favoritesFilterText=this.viewModel.favoritesFilterText,this.recentlyUsedEnabled=this.viewModel.recentlyUsedEnabled,this.excludeTables=this.viewModel.excludeTables,this.effectiveTemplates=this.viewModel.effectiveTemplates,this.applicationTemplates=this.viewModel.applicationTemplates,this.selectedTemplateId=this.viewModel.selectedTemplateId,this.selectedTemplate=this.viewModel.selectedTemplate,this.applicationFilterFunction=this.viewModel.applicationFilterFunction,this.applicationDisabledFunction=this.viewModel.applicationDisabledFunction,this.display=this.viewModel.display,this.groupBy=this.viewModel.groupBy,this.sectionSortBy=this.viewModel.sectionSortBy,this.templateSortBy=this.viewModel.templateSortBy,this.templateSortByFunction=this.viewModel.templateSortByFunction,this.sectionSortByFunction=this.viewModel.sectionSortByFunction,this.hideTemplatesMode=this.viewModel.hideTemplatesMode,this.disableTemplatesMode=this.viewModel.disableTemplatesMode,this.groupByFunction=this.viewModel.groupByFunction,this.hideTemplateDescription=this.viewModel.hideTemplateDescription,this.layers=this.viewModel.layers,this.view=M(this),this.autoDestroyDisabled=!1,this.updating=this.viewModel.updating,this.disabled=!1,this.showCollapseButton=!1,this.showFilter=!1,this.minRequiredFilterCount=2,this.arcgisPropertyChange=w()("effectiveTemplates","filterText","recentlyUsed","favorites"),this.arcgisReady=h(),this.arcgisTemplatesChanged=h(),this.arcgisSelectTemplate=h()}static{this.properties={favoritesEnabled:5,favorites:32,restoreFavorites:0,restoreRecentlyUsed:0,recentlyUsed:32,sharedTemplatesDisabled:5,filterText:1,recentFilterText:1,favoritesFilterText:1,recentlyUsedEnabled:5,excludeTables:5,effectiveTemplates:32,applicationTemplates:0,selectedTemplateId:1,selectedTemplate:32,applicationFilterFunction:0,applicationDisabledFunction:0,display:1,groupBy:1,sectionSortBy:1,templateSortBy:1,templateSortByFunction:0,sectionSortByFunction:0,hideTemplatesMode:1,disableTemplatesMode:1,groupByFunction:0,hideTemplateDescription:5,layers:0,view:0,referenceElement:1,autoDestroyDisabled:5,updating:32,disabled:5,showCollapseButton:5,showFilter:5,minRequiredFilterCount:9}}static{this.styles=U}async destroy(){await this.manager.destroy()}loaded(){this.manager.onLifecycle(()=>[v(()=>this.view,()=>{this.viewModel.view=this.view},{initial:!0}),v(()=>this.viewModel.templateSetKey,()=>{this.arcgisTemplatesChanged.emit()}),v(()=>[this.viewModel.activeLayers?.map(e=>e.id).join(","),this.viewModel?.applicationTemplates,this.viewModel?.sharedTemplatesDisabled],$(()=>this.viewModel.handleTemplateSourceDefinitionChanged(),10),{initial:!0})])}_handleSelectTemplate(e){this.selectedTemplateId=e.id,this.arcgisSelectTemplate.emit({template:e}),this.viewModel.addRecent(e)}_removeTemplateFromList(e,i){if(i==="favorites"){this.viewModel.removeFavorite(e);return}this.viewModel.removeRecent(e)}_renderTemplates(){return this.effectiveTemplates.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${this._messages.noTemplates}</div></calcite-notice>`:r`<calcite-list .filterPlaceholder=${this._messages.filterPlaceholder??""} .filterText=${this.filterText} .label=${this._messages?.templates??""} .filterEnabled=${this.showFilter&&this.viewModel.templateList.length>=this.minRequiredFilterCount} selection-appearance=border selection-mode=single @calciteListFilter=${e=>{this.filterText=e.target.filterText}}>${this.display==="grouped"?this.effectiveTemplates.map(e=>r`<calcite-list-item-group .heading=${e.autoTranslate?this._messages[e.sectionName]??"":e.sectionName}>${e.templates.map(i=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(i)} .label=${i.label} .selected=${i.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:i.description} .value=${i.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(i)}}><arcgis-template-image slot=content-start .template=${i}></arcgis-template-image>${this._renderAddFavorite(i)}</calcite-list-item>`)}</calcite-list-item-group>`):this.viewModel.templateList.map(e=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(e)} .label=${e.label} .selected=${e.id===this.selectedTemplateId} .description=${this.hideTemplateDescription?void 0:e.description} .value=${e.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(e)}}><arcgis-template-image slot=content-start .template=${e}></arcgis-template-image>${this._renderAddFavorite(e)}</calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderAddFavorite(e){return this.viewModel.favoritesEnabled?r`<calcite-action slot=actions-end .icon=${this.viewModel.favorites.has(e.id)?"heart-f":"heart"} @click=${()=>{this.viewModel.favorites.has(e.id)?this.viewModel.removeFavorite(e):this.viewModel.addFavorite(e)}} .text=${this._messages.addFavorite??""}></calcite-action>`:""}_renderList(e){let i=e==="favorites"?this.viewModel.favoriteTemplates:this.viewModel.recentTemplates;return i.length===0?r`<calcite-notice icon=list open class="filter-no-results"><div slot=message>${e==="favorites"?this._messages.noFavorites:this._messages.noRecent}</div></calcite-notice>`:r`<calcite-list .filterText=${e==="favorites"?this.favoritesFilterText:this.recentFilterText} .filterPlaceholder=${this._messages.filterPlaceholder??""} .label=${(e==="favorites"?this._messages.favorites:this._messages.recent)??""} .filterEnabled=${this.showFilter} selection-appearance=border selection-mode=single @calciteListFilter=${o=>{this.filterText=o.target.filterText}}>${i.map(o=>r`<calcite-list-item .disabled=${this.viewModel.disabledTemplates.has(o)} .label=${o.label} .description=${this.hideTemplateDescription?void 0:o.description} .value=${o.id} @calciteListItemSelect=${()=>{this._handleSelectTemplate(o)}}><arcgis-template-image slot=content-start .template=${o}></arcgis-template-image><calcite-action slot=actions-end icon=x @click=${()=>{this._removeTemplateFromList(o,e)}} .text=${(e==="favorites"?this._messages.removeFavorite:this._messages.removeRecent)??""}></calcite-action></calcite-list-item>`)}${this._renderFilteredEmpty()}</calcite-list>`}_renderFilteredEmpty(){return r`<calcite-notice icon=filter slot=filter-no-results open class="filter-no-results"><div slot=message>${this._messages.noMatchingTemplates}</div></calcite-notice>`}_renderContent(){return this.effectiveTemplates.length===0&&this.viewModel.loading?null:this.favoritesEnabled||this.recentlyUsedEnabled?r`<calcite-tabs class="feature-template-tabs"><calcite-tab-nav slot=title-group><calcite-tab-title icon-start=templates selected>${this._messages.templates}</calcite-tab-title>${this.recentlyUsedEnabled?r`<calcite-tab-title icon-start=clock>${this._messages.recent}</calcite-tab-title>`:""}${this.favoritesEnabled?r`<calcite-tab-title icon-start=heart>${this._messages.favorites}</calcite-tab-title>`:""}</calcite-tab-nav><calcite-tab selected>${this._renderTemplates()}</calcite-tab><calcite-tab>${this._renderList("recent")}</calcite-tab><calcite-tab>${this._renderList("favorites")}</calcite-tab></calcite-tabs>`:this._renderTemplates()}render(){return r`<div class="root">${this._renderContent()}${this.viewModel.updating||this.disabled?r`<calcite-scrim><calcite-loader scale=s label .hidden=${!this.viewModel.updating}></calcite-loader></calcite-scrim>`:null}</div>`}};b("arcgis-feature-templates",u);return u},"core/accessorSupport/decorators","core/Accessor","editing/templates/TemplateListItem","applications/Components/templateUtils","applications/Components/layerUtils","core/reactiveUtils",a,c,d,e,f)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./MZWO5JYA.js";import a from"./PT7XD6RE.js";import"./VJVKFKSG.js";import{a as C}from"./PTHSNQL2.js";import"./CNA7TDZN.js";import"./VJMC3CMB.js";import"./QUZTFUWM.js";import"./M3DP7XNI.js";import{L as y,M as d,N as f,T as b,a as p,b as r,o,q as g,r as v,w as h}from"./QL3M4ZI7.js";import"./H6RQVSYM.js";export default $arcgis.t(([E,,,{a:R},{b:$,e:w}])=>{var x=p`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);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)}`,u={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935,pathNotFound:-2147208444},m=class extends f{constructor(){super(...arguments),this._messages=C({blocking:!0}),this.#c=!0,this.#t=[],this.#s=y(),this.#a=new Map,this.#o=new Map,this.#i=new Map,this.#r=new Map,this.#l=[],this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=h(),this.arcgisHideGraphicsChange=h(),this.arcgisSelectedResultTypeChange=h(),this.arcgisTraceResultFeaturesReady=h()}static{this.properties={_aggregatedGeometryDisabled:16,_featuresComponentElement:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=x}#c;#t;#n;#s;#a;#o;#i;#r;#l;get numResults(){return this.traceResultFeatures.length+this.#t.length}clearAggregatedGeometryGraphics(){this.#n?.destroy()}async destroy(){this.#a.clear(),this.#i.clear(),this.#r.clear(),this.#n?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this.#$(),this.#f().then(()=>this.#b()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this.#t=[]))}loaded(){this.traceResult&&(this.utilityNetwork||o("warn",this,g("utilityNetwork")),this.layers.length||o("warn",this,v("layers")),this.view||o("warn",this,g("view")))}disconnectedCallback(){super.disconnectedCallback(),this.#o.clear()}#g(e){e&&(this.#n=e)}#u(e){e&&(this._featuresComponentElement=e)}async#m([e,t]){let a=this.utilityNetwork?.getLayerIdBySourceId(e),s=this.#p(a),i=this.#v(t);if(a==null||!s){this.#t.push(...i);return}let l=s.createQuery();l.gdbVersion=this.utilityNetwork?.gdbVersion,l.objectIds=i.map(n=>n.objectId),l.outFields=["*"];let{features:c}=await $(s,l);c.forEach(n=>{let k=n.layer;n.getEffectivePopupTemplate(this.#c)||(n.popupTemplate=k.createPopupTemplate())}),w(s)?c.forEach(n=>this.#h(this.#i,n.layer.subtypeCode,n)):this.#a.set(a,c)}#h(e,t,a){let s=e.get(t);s==null?e.set(t,[a]):s.push(a)}#p(e){if(e==null)return;let t=this.#o,a=this.#l,s=t.get(e);if(s)return s;if(!a)return;let i=a.find(l=>"layerId"in l&&l.layerId===e);return i&&t.set(e,i),i}#v(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#y(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this.#s.value?.open&&(this.#s.value.open=!1)}async#f(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){R(s,this,"Error while loading the selected utility network")}this.#l=e.filter(s=>t.isUtilityLayer(s));let a=this.#l.filter(s=>!s.loaded).map(s=>s.load());a.length>0&&(this.state="loading",(await Promise.allSettled(a)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async#b(){let e=Array.from(this.#r.entries());if(!e.length)return;this.state="loading";let t=e.map(i=>this.#m(i));(await Promise.allSettled(t)).forEach((i,l)=>{if(i.status==="rejected"){let[c]=e[l];o("error",this,`Failed to query features for source ${c}. Reason: ${i.reason}`)}});let a=Array.from(this.#a.values()),s=Array.from(this.#i.values());this.traceResultFeatures=a.concat(s).flat()}#$(){this.traceResult.elements?.forEach(e=>this.#h(this.#r,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this.#G(e);if(!t)return this.#A();let{elements:a,globalFunctionResults:s,aggregatedGeometry:i}=t,l=!a.length&&!s.length&&!i,c=a.length>0&&!s.length&&!i;return l?this.#_():this.state==="loading"?this.#w():this.hideFeatureResults&&c?this.#k():this.isElementsSelected||c?r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#c} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${c} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.isElementsSelected=!1} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#u)}></arcgis-features-next>`:this.#R(t)}#w(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}#R(e){let{elements:t,globalFunctionResults:a,aggregatedGeometry:s}=e;return r`<calcite-panel class="white-panel-background">${this.#e()}${s!=null?this.#C(s):null}${s!=null&&!t.length?this.#E():null}${t.length>0?this.hideFeatureResults?this.#d():this.#x():null}${a.length>0?this.#F(a):null}</calcite-panel>`}#C(e){let{_aggregatedGeometryDisabled:t,aggregatedGeometryGraphicsColor:a,_messages:s}=this;return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${a} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this.#y} auto-destroy-disabled ${d(this.#g)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${s.labels.aggregatedGeometryGraphicsColor} .color=${a.toCss()} .disabled=${t}></calcite-swatch><calcite-popover .heading=${s.headings.setColor} .label=${s.headings.setColor} reference-element=geometry-color-swatch closable ${d(this.#s)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${a} @calciteColorPickerChange=${i=>{let l=i.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(l)}} .disabled=${t}></calcite-color-picker></calcite-popover></div>`}#k(){return r`<calcite-panel class="white-panel-background">${this.#e()}${this.#d()}</calcite-panel>`}#d(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}#E(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}#x(){let{_messages:e}=this;return r`<calcite-list .label=${e.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${e.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${e.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}#F(e){let{_messages:t}=this;return r`<div class="functions-heading">${t.headings.functions}</div><calcite-table .caption=${t.labels.functionResults}>${e.filter(a=>a.networkAttributeName!=null&&a.result!=null&&a.functionType!=null).map(a=>{let{functionName:s,networkAttributeName:i,functionType:l,result:c}=a,n=s||`${i} ${l}`;return r`<calcite-table-row><calcite-table-cell>${n}</calcite-table-cell><calcite-table-cell>${c}</calcite-table-cell></calcite-table-row>`})}</calcite-table>`}#e(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}#G(e){let{_messages:t}=this,a=e.message;switch(e.details?.raw?.extendedCode){case u.dirtyAreasDiscovered:a=t.traceErrors.dirtyAreasDiscovered;break;case u.noValidControllers:a=t.traceErrors.noValidControllers;break;case u.pathNotFound:a=t.traceErrors.pathNotFound;break}return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.traceFailedHeading}</div><div class="no-results-description">${t.traceFailedDescription}</div><div class="no-results-description">${a}</div></div></calcite-panel>`}#_(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${e.noResultsHeading}</div><div class="no-results-description">${e.noResultsDescription}</div></div></calcite-panel>`}#A(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${e.noTraceConfigHeading}</div><div class="no-results-description">${e.noTraceConfigDescription}</div></div></calcite-panel>`}};b("arcgis-utility-network-trace-results",m);return m},"Color","core/Error","Graphic",a,c)
2
+ import c from"./MZWO5JYA.js";import a from"./FR3DD5XU.js";import"./VJVKFKSG.js";import{a as C}from"./NDMHZQ2Z.js";import"./5GFBHLDY.js";import"./42UVPIOD.js";import"./QUZTFUWM.js";import"./QLIWDFZI.js";import{L as y,M as d,N as f,T as b,a as p,b as r,o,q as g,r as v,w as h}from"./ZJZBS5ZY.js";import"./H6RQVSYM.js";export default $arcgis.t(([E,,,{a:R},{b:$,e:w}])=>{var x=p`:host{min-height:var(--arcgis-internal-panel-height-sm, 240px);height:100%}arcgis-features-next{height:100%}calcite-table{--calcite-table-border-color: none}calcite-table-row{--calcite-table-row-border-color: var(--calcite-color-border-3)}.white-panel-background{--calcite-panel-background-color: var(--calcite-color-foreground-1)}.aggregated-geometry-container{display:flex;justify-content:space-between;margin:0 var(--calcite-spacing-md) var(--calcite-spacing-md)}#elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm);margin:0 var(--calcite-spacing-sm)}.no-selectable-results{margin:0 var(--calcite-spacing-md);color:var(--calcite-color-text-3);font-size:var(--calcite-font-size)}.results-heading{display:flex;flex-direction:column;margin:var(--calcite-spacing-md);gap:var(--calcite-spacing-xs)}.results-heading-title{font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.results-heading-subtitle{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3)}.functions-heading{margin:var(--calcite-spacing-md) var(--calcite-spacing-md) var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);font-size:var(--calcite-font-size);color:var(--calcite-color-text-1)}.no-results-landing{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;margin:var(--calcite-spacing-sm) var(--calcite-spacing-xl) var(--calcite-spacing-xl);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)}`,u={dirtyAreasDiscovered:-2147208511,noValidControllers:-2147208935,pathNotFound:-2147208444},m=class extends f{constructor(){super(...arguments),this._messages=C({blocking:!0}),this.#c=!0,this.#t=[],this.#s=y(),this.#a=new Map,this.#o=new Map,this.#i=new Map,this.#r=new Map,this.#l=[],this._aggregatedGeometryDisabled=!1,this.aggregatedGeometryGraphicsColor=new E([255,255,0,.6]),this.hideActionBar=!1,this.hideFeatureResults=!1,this.isElementsSelected=!1,this.layers=[],this.state="ready",this.traceResultFeatures=[],this.autoDestroyDisabled=!1,this.arcgisAggregatedGeometryGraphicsColorChange=h(),this.arcgisHideGraphicsChange=h(),this.arcgisSelectedResultTypeChange=h(),this.arcgisTraceResultFeaturesReady=h()}static{this.properties={_aggregatedGeometryDisabled:16,_featuresComponentElement:16,aggregatedGeometryGraphicsColor:0,hideActionBar:5,hideFeatureResults:5,isElementsSelected:5,layers:0,messageOverrides:0,numResults:32,referenceElement:1,state:1,traceConfigTitle:1,traceError:0,traceResult:0,traceResultFeatures:0,utilityNetwork:0,view:0,autoDestroyDisabled:5}}static{this.styles=x}#c;#t;#n;#s;#a;#o;#i;#r;#l;get numResults(){return this.traceResultFeatures.length+this.#t.length}clearAggregatedGeometryGraphics(){this.#n?.destroy()}async destroy(){this.#a.clear(),this.#i.clear(),this.#r.clear(),this.#n?.destroy(),this._featuresComponentElement?.destroy(),await this.manager.destroy()}load(){this.traceResult&&(this.#$(),this.#f().then(()=>this.#b()).finally(()=>{this.arcgisTraceResultFeaturesReady.emit(),this.state="ready"}))}willUpdate(e){e.has("isElementsSelected")&&this.arcgisSelectedResultTypeChange.emit(),e.has("traceResult")&&(this.isElementsSelected=!1,this.traceResult||(this.traceResultFeatures=[],this.#t=[]))}loaded(){this.traceResult&&(this.utilityNetwork||o("warn",this,g("utilityNetwork")),this.layers.length||o("warn",this,v("layers")),this.view||o("warn",this,g("view")))}disconnectedCallback(){super.disconnectedCallback(),this.#o.clear()}#g(e){e&&(this.#n=e)}#u(e){e&&(this._featuresComponentElement=e)}async#m([e,t]){let a=this.utilityNetwork?.getLayerIdBySourceId(e),s=this.#p(a),i=this.#v(t);if(a==null||!s){this.#t.push(...i);return}let l=s.createQuery();l.gdbVersion=this.utilityNetwork?.gdbVersion,l.objectIds=i.map(n=>n.objectId),l.outFields=["*"];let{features:c}=await $(s,l);c.forEach(n=>{let k=n.layer;n.getEffectivePopupTemplate(this.#c)||(n.popupTemplate=k.createPopupTemplate())}),w(s)?c.forEach(n=>this.#h(this.#i,n.layer.subtypeCode,n)):this.#a.set(a,c)}#h(e,t,a){let s=e.get(t);s==null?e.set(t,[a]):s.push(a)}#p(e){if(e==null)return;let t=this.#o,a=this.#l,s=t.get(e);if(s)return s;if(!a)return;let i=a.find(l=>"layerId"in l&&l.layerId===e);return i&&t.set(e,i),i}#v(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#y(e){e.stopPropagation();let t=e.detail;this.arcgisHideGraphicsChange.emit(t),this._aggregatedGeometryDisabled=t,t&&this.#s.value?.open&&(this.#s.value.open=!1)}async#f(){let{layers:e,utilityNetwork:t}=this;if(!t)return;try{t.loaded||(this.state="loading",await t.load())}catch(s){R(s,this,"Error while loading the selected utility network")}this.#l=e.filter(s=>t.isUtilityLayer(s));let a=this.#l.filter(s=>!s.loaded).map(s=>s.load());a.length>0&&(this.state="loading",(await Promise.allSettled(a)).forEach(s=>{s.status==="rejected"&&o("error",this,`Failed to load layer. Reason: ${s.reason}`)}))}async#b(){let e=Array.from(this.#r.entries());if(!e.length)return;this.state="loading";let t=e.map(i=>this.#m(i));(await Promise.allSettled(t)).forEach((i,l)=>{if(i.status==="rejected"){let[c]=e[l];o("error",this,`Failed to query features for source ${c}. Reason: ${i.reason}`)}});let a=Array.from(this.#a.values()),s=Array.from(this.#i.values());this.traceResultFeatures=a.concat(s).flat()}#$(){this.traceResult.elements?.forEach(e=>this.#h(this.#r,e.networkSourceId,e))}render(){let{traceError:e,traceResult:t}=this;if(e)return this.#G(e);if(!t)return this.#A();let{elements:a,globalFunctionResults:s,aggregatedGeometry:i}=t,l=!a.length&&!s.length&&!i,c=a.length>0&&!s.length&&!i;return l?this.#_():this.state==="loading"?this.#w():this.hideFeatureResults&&c?this.#k():this.isElementsSelected||c?r`<arcgis-features-next .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#c} .features=${this.traceResultFeatures} .hideActionBar=${this.hideActionBar} .hideCloseButton=${c} hide-select-feature initial-display-mode=list .messageOverrides=${this.messageOverrides} @arcgisClose=${()=>this.isElementsSelected=!1} open .referenceElement=${this.referenceElement} .view=${this.view} ${d(this.#u)}></arcgis-features-next>`:this.#R(t)}#w(){return r`<calcite-panel class="white-panel-background"><calcite-loader .label=${this._messages.gettingResults} .text=${this._messages.gettingResults}></calcite-loader></calcite-panel>`}#R(e){let{elements:t,globalFunctionResults:a,aggregatedGeometry:s}=e;return r`<calcite-panel class="white-panel-background">${this.#e()}${s!=null?this.#C(s):null}${s!=null&&!t.length?this.#E():null}${t.length>0?this.hideFeatureResults?this.#d():this.#x():null}${a.length>0?this.#F(a):null}</calcite-panel>`}#C(e){let{_aggregatedGeometryDisabled:t,aggregatedGeometryGraphicsColor:a,_messages:s}=this;return r`<div class="aggregated-geometry-container"><arcgis-utility-network-aggregated-geometry .graphicsColor=${a} .geometry=${e} .view=${this.view} @arcgisHideGraphicsChange=${this.#y} auto-destroy-disabled ${d(this.#g)}></arcgis-utility-network-aggregated-geometry><calcite-swatch id=geometry-color-swatch .label=${s.labels.aggregatedGeometryGraphicsColor} .color=${a.toCss()} .disabled=${t}></calcite-swatch><calcite-popover .heading=${s.headings.setColor} .label=${s.headings.setColor} reference-element=geometry-color-swatch closable ${d(this.#s)}><calcite-color-picker alpha-channel channels-disabled clearable hex-disabled saved-disabled .value=${a} @calciteColorPickerChange=${i=>{let l=i.target.value;this.arcgisAggregatedGeometryGraphicsColorChange.emit(l)}} .disabled=${t}></calcite-color-picker></calcite-popover></div>`}#k(){return r`<calcite-panel class="white-panel-background">${this.#e()}${this.#d()}</calcite-panel>`}#d(){return r`<div class="no-selectable-results">${this._messages.resultFeaturesAreHidden}</div>`}#E(){return r`<div class="no-selectable-results">${this._messages.noSelectableFeatures}</div>`}#x(){let{_messages:e}=this;return r`<calcite-list .label=${e.headings.traceResultsGeneric}><calcite-list-item id=elements-list-item .label=${e.headings.features} @calciteListItemSelect=${()=>this.isElementsSelected=!0}><calcite-chip .label=${e.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}#F(e){let{_messages:t}=this;return r`<div class="functions-heading">${t.headings.functions}</div><calcite-table .caption=${t.labels.functionResults}>${e.filter(a=>a.networkAttributeName!=null&&a.result!=null&&a.functionType!=null).map(a=>{let{functionName:s,networkAttributeName:i,functionType:l,result:c}=a,n=s||`${i} ${l}`;return r`<calcite-table-row><calcite-table-cell>${n}</calcite-table-cell><calcite-table-cell>${c}</calcite-table-cell></calcite-table-row>`})}</calcite-table>`}#e(){return r`<div class="results-heading"><div class="results-heading-title">${this._messages.headings.traceResultsGeneric}</div>${this.traceConfigTitle?r`<div class="results-heading-subtitle">${this.traceConfigTitle}</div>`:null}</div>`}#G(e){let{_messages:t}=this,a=e.message;switch(e.details?.raw?.extendedCode){case u.dirtyAreasDiscovered:a=t.traceErrors.dirtyAreasDiscovered;break;case u.noValidControllers:a=t.traceErrors.noValidControllers;break;case u.pathNotFound:a=t.traceErrors.pathNotFound;break}return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${t.traceFailedHeading}</div><div class="no-results-description">${t.traceFailedDescription}</div><div class="no-results-description">${a}</div></div></calcite-panel>`}#_(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=exclamation-mark-triangle scale=l></calcite-icon><div class="no-results-heading">${e.noResultsHeading}</div><div class="no-results-description">${e.noResultsDescription}</div></div></calcite-panel>`}#A(){let{_messages:e}=this;return r`<calcite-panel class="white-panel-background">${this.#e()}<div class="no-results-landing"><calcite-icon icon=utility-network-trace scale=l></calcite-icon><div class="no-results-heading">${e.noTraceConfigHeading}</div><div class="no-results-description">${e.noTraceConfigDescription}</div></div></calcite-panel>`}};b("arcgis-utility-network-trace-results",m);return m},"Color","core/Error","Graphic",a,c)