@arcgis/map-components 5.2.4 → 5.2.6

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 (262) hide show
  1. package/dist/cdn/{EKSBCS54.js → 25A56PXK.js} +1 -1
  2. package/dist/cdn/{ZJE2W2CU.js → 2CFJPN4S.js} +1 -1
  3. package/dist/cdn/{7ZT4OUUW.js → 2FP7IKKN.js} +1 -1
  4. package/dist/cdn/{RAWM42BS.js → 2FR4CLUD.js} +1 -1
  5. package/dist/cdn/{Y7AXHIRQ.js → 2GSOQ24O.js} +1 -1
  6. package/dist/cdn/{SMT4LA5X.js → 2HI2GJRN.js} +1 -1
  7. package/dist/cdn/{4TGV2X47.js → 2JBDXTTD.js} +1 -1
  8. package/dist/cdn/{Z4BEJRTJ.js → 2PBCUATI.js} +1 -1
  9. package/dist/cdn/{3YL6SRFS.js → 2S7LIDVT.js} +1 -1
  10. package/dist/cdn/{KSGX44II.js → 2VKUFSSX.js} +1 -1
  11. package/dist/cdn/{CUX6ELAH.js → 3AFCHGXC.js} +1 -1
  12. package/dist/cdn/{VFGAPD6E.js → 3CFNER5S.js} +1 -1
  13. package/dist/cdn/{GBGU5QK5.js → 3K56NQBG.js} +1 -1
  14. package/dist/cdn/{J7OIAUDA.js → 3KOLD5XB.js} +1 -1
  15. package/dist/cdn/{45ZOIFQJ.js → 3OAQCH4R.js} +1 -1
  16. package/dist/cdn/{NC77ZFVJ.js → 3OSWVLRC.js} +1 -1
  17. package/dist/cdn/{4UQ6UUHY.js → 3YPRWZEQ.js} +1 -1
  18. package/dist/cdn/{G55BOIXB.js → 463RVG74.js} +1 -1
  19. package/dist/cdn/{AETNFVGH.js → 473ABYHW.js} +1 -1
  20. package/dist/cdn/{DLYAECAD.js → 4CFPZELD.js} +1 -1
  21. package/dist/cdn/{M5MUX3SR.js → 4CZYIMXZ.js} +1 -1
  22. package/dist/cdn/{CLVKSUYH.js → 4G4MMUFH.js} +1 -1
  23. package/dist/cdn/{AXUOAFV7.js → 4S7GDURY.js} +1 -1
  24. package/dist/cdn/{VVCANCHO.js → 4T5CO3R3.js} +1 -1
  25. package/dist/cdn/{HSA4KTTI.js → 4UM7OFIQ.js} +1 -1
  26. package/dist/cdn/{L4HEGMVE.js → 4VYHSFFJ.js} +1 -1
  27. package/dist/cdn/{DRGUJ5LY.js → 4YZX4KJS.js} +1 -1
  28. package/dist/cdn/{F5B4WIVL.js → 4ZTKK3XC.js} +1 -1
  29. package/dist/cdn/{45DBVQ5G.js → 53GUZKRC.js} +1 -1
  30. package/dist/cdn/{3Z2A32L3.js → 55PIRXM5.js} +1 -1
  31. package/dist/cdn/{QGMWSIUI.js → 5BOCI774.js} +1 -1
  32. package/dist/cdn/{6CRONNHI.js → 5GBH7Q3I.js} +1 -1
  33. package/dist/cdn/{N6L2XHFN.js → 5HFXUGWD.js} +1 -1
  34. package/dist/cdn/{YLB7LLOQ.js → 5IBF3LPQ.js} +1 -1
  35. package/dist/cdn/{76ZJGD75.js → 5IQ47S32.js} +1 -1
  36. package/dist/cdn/{FBL6FWKR.js → 5JNRDQCA.js} +1 -1
  37. package/dist/cdn/{2NW2URBZ.js → 5LOEWEGB.js} +1 -1
  38. package/dist/cdn/{NXABZYBC.js → 5OMRYPCZ.js} +1 -1
  39. package/dist/cdn/{HKKK7PAM.js → 5PZ4YP7B.js} +1 -1
  40. package/dist/cdn/{HP2P5OYN.js → 5RABZG2H.js} +1 -1
  41. package/dist/cdn/{22YQ2I4Q.js → 5UAW2E7Q.js} +1 -1
  42. package/dist/cdn/{S6RI6HCD.js → 5VI3IG5Z.js} +1 -1
  43. package/dist/cdn/{PPURK2BH.js → 5X7CUWTJ.js} +1 -1
  44. package/dist/cdn/{UEDZF47N.js → 5XCSK4KA.js} +1 -1
  45. package/dist/cdn/{27YN5YT4.js → 5XYNDXYU.js} +1 -1
  46. package/dist/cdn/{RLUANYVV.js → 623IOSG5.js} +1 -1
  47. package/dist/cdn/{42PE2SPG.js → 63PTAZB7.js} +1 -1
  48. package/dist/cdn/{CRSLMZ6H.js → 63X25JWZ.js} +1 -1
  49. package/dist/cdn/{OSV6AIA4.js → 63XX2EC6.js} +1 -1
  50. package/dist/cdn/{CTWWJ6FV.js → 64LUDGU7.js} +1 -1
  51. package/dist/cdn/{PLYXWZK5.js → 6C4F25GU.js} +1 -1
  52. package/dist/cdn/{AXA4NQBL.js → 6DD6U4YE.js} +1 -1
  53. package/dist/cdn/{X4FA56YR.js → 6FA3Z5YP.js} +1 -1
  54. package/dist/cdn/{F2WMR3YQ.js → 6T7X6FX2.js} +1 -1
  55. package/dist/cdn/{65VYDNYQ.js → 72LTFDRQ.js} +1 -1
  56. package/dist/cdn/{HXPDO6CM.js → 74P7YNL7.js} +1 -1
  57. package/dist/cdn/{65F7YFJC.js → 74SWKHIC.js} +1 -1
  58. package/dist/cdn/{5IS4UXVE.js → 7HG2FAQG.js} +1 -1
  59. package/dist/cdn/{5XBLTA7T.js → 7JSO4EXW.js} +1 -1
  60. package/dist/cdn/{B72ELQQW.js → 7MGBISTN.js} +1 -1
  61. package/dist/cdn/{TFVRJUSJ.js → 7PY43HO6.js} +1 -1
  62. package/dist/cdn/{ZXTGLPB7.js → 7TRMSQUP.js} +1 -1
  63. package/dist/cdn/{R5YS4GKL.js → 7URKIQ55.js} +1 -1
  64. package/dist/cdn/{3XGDS5QW.js → A7663BNM.js} +1 -1
  65. package/dist/cdn/{4TI6CNOV.js → ADRQCJ2Q.js} +1 -1
  66. package/dist/cdn/AFPDNKPL.js +2 -0
  67. package/dist/cdn/AUAMUJF2.js +2 -0
  68. package/dist/cdn/{GCBY5PIC.js → B3HDV53M.js} +1 -1
  69. package/dist/cdn/{QARHM5T5.js → B3YR45OK.js} +1 -1
  70. package/dist/cdn/{D3YO4ZOH.js → B5VQZNW7.js} +1 -1
  71. package/dist/cdn/{HUZONYD7.js → BA6W4QD4.js} +1 -1
  72. package/dist/cdn/{5MIP6ZL7.js → BCNDQDLZ.js} +1 -1
  73. package/dist/cdn/{UC2COAGW.js → BI4AWJIO.js} +1 -1
  74. package/dist/cdn/{ADWVRV5I.js → BQ6MLBGP.js} +1 -1
  75. package/dist/cdn/{725LPPIM.js → BQQGIUPB.js} +1 -1
  76. package/dist/cdn/{3QFEQCVN.js → BSTFFS4W.js} +1 -1
  77. package/dist/cdn/{OCPTS6HN.js → BTLHGTOP.js} +1 -1
  78. package/dist/cdn/{TLKQ4SHF.js → BWQHPMXS.js} +1 -1
  79. package/dist/cdn/{3Q4C6BLY.js → BXB243NN.js} +1 -1
  80. package/dist/cdn/{E2NFVZER.js → C2LXKJYV.js} +1 -1
  81. package/dist/cdn/{G76VVSVA.js → C4SVRS4H.js} +1 -1
  82. package/dist/cdn/{7Z6N5WXJ.js → C5OTEBGC.js} +1 -1
  83. package/dist/cdn/{LZL7VTQH.js → C6BGBOHC.js} +1 -1
  84. package/dist/cdn/{Z7EK7SAF.js → CCUNOWR3.js} +1 -1
  85. package/dist/cdn/{IBPMRPU6.js → CFTLRJP2.js} +1 -1
  86. package/dist/cdn/{WGDJZRA7.js → CGFJYNQ2.js} +1 -1
  87. package/dist/cdn/{R7UUK7UW.js → CIVSPEMY.js} +1 -1
  88. package/dist/cdn/{OJGHH26G.js → CJNH6IJX.js} +1 -1
  89. package/dist/cdn/{IYJPEFK5.js → CJPXNA5A.js} +1 -1
  90. package/dist/cdn/{JXONVBDR.js → CKIQ4BDA.js} +1 -1
  91. package/dist/cdn/{C5MWND53.js → CLFSDWFC.js} +1 -1
  92. package/dist/cdn/{26VIAHPF.js → CR6AAH7F.js} +1 -1
  93. package/dist/cdn/CREY4Z6D.js +2 -0
  94. package/dist/cdn/{7LWKOSKH.js → D4R2XIGR.js} +1 -1
  95. package/dist/cdn/{XJVBEFHM.js → DDWGVKRL.js} +1 -1
  96. package/dist/cdn/{ADYG2EMM.js → DS2MUI4M.js} +1 -1
  97. package/dist/cdn/{OQEFMTO6.js → DX7V4NXG.js} +1 -1
  98. package/dist/cdn/{RZHSZ3H2.js → E5SUKEXA.js} +1 -1
  99. package/dist/cdn/{DDVFTISN.js → E6HZ7FK5.js} +1 -1
  100. package/dist/cdn/{PEER45DY.js → ECVUMLQY.js} +1 -1
  101. package/dist/cdn/{JPP2BFD4.js → EGH2DIPQ.js} +1 -1
  102. package/dist/cdn/{7NQQ3S77.js → EHUMNX7W.js} +1 -1
  103. package/dist/cdn/{3ASVOZZN.js → ERE4LLTO.js} +1 -1
  104. package/dist/cdn/{ZE7TYDWG.js → ESBRNEHV.js} +1 -1
  105. package/dist/cdn/{CNBOU73I.js → EWLYQETG.js} +1 -1
  106. package/dist/cdn/{JXZOSS7R.js → F27TCSSR.js} +1 -1
  107. package/dist/cdn/{2P4UY266.js → FISDVO72.js} +1 -1
  108. package/dist/cdn/{LF2NKUJA.js → FKJVY66M.js} +1 -1
  109. package/dist/cdn/{6N7PM73F.js → FMHP6L74.js} +1 -1
  110. package/dist/cdn/{UWPWTJ2J.js → FMKSZYHG.js} +1 -1
  111. package/dist/cdn/{A7E66LIH.js → FSLYS2UZ.js} +1 -1
  112. package/dist/cdn/{Z3EC3N7C.js → FXIQTDXI.js} +1 -1
  113. package/dist/cdn/{FQBXGJER.js → G2CJRHJX.js} +1 -1
  114. package/dist/cdn/{JJTRGGUD.js → GAW357NY.js} +1 -1
  115. package/dist/cdn/{WM2BIX22.js → GC5AUTOI.js} +1 -1
  116. package/dist/cdn/{SDQDUGKX.js → GMAWKMJU.js} +1 -1
  117. package/dist/cdn/{L2JMPLBI.js → GMJ2BGZJ.js} +1 -1
  118. package/dist/cdn/{NZUH5VXN.js → GXOPZYS6.js} +1 -1
  119. package/dist/cdn/{YGLWJECZ.js → GXXTJR5X.js} +1 -1
  120. package/dist/cdn/{33CM77ZT.js → GZQ5S6OJ.js} +1 -1
  121. package/dist/cdn/{6RB62D2W.js → HGHKUKDU.js} +1 -1
  122. package/dist/cdn/{AVIXHXI6.js → HGJEEYWB.js} +1 -1
  123. package/dist/cdn/{WVBYHVGU.js → HJUNRFFP.js} +1 -1
  124. package/dist/cdn/HKVHH5S7.js +2 -0
  125. package/dist/cdn/{VLIXVXP3.js → HPG7MJVU.js} +1 -1
  126. package/dist/cdn/{C2DNE5TB.js → I675U3AI.js} +1 -1
  127. package/dist/cdn/{3UZK6UYW.js → IAKYKOOL.js} +1 -1
  128. package/dist/cdn/{ZBTXET66.js → IHVVALDE.js} +1 -1
  129. package/dist/cdn/{K5FZWX5N.js → IIOUXXXA.js} +1 -1
  130. package/dist/cdn/{4QN3V76Q.js → IJ3WQDI2.js} +1 -1
  131. package/dist/cdn/{XRTRPQD7.js → IQMONREK.js} +1 -1
  132. package/dist/cdn/{6R6R3XTH.js → IU6C2BF7.js} +1 -1
  133. package/dist/cdn/{PTTMCU4E.js → J7J7MHFY.js} +1 -1
  134. package/dist/cdn/{2IYRSXZS.js → JKDO7CJ5.js} +1 -1
  135. package/dist/cdn/{G6OJLMKT.js → JMTCMMUJ.js} +1 -1
  136. package/dist/cdn/{GPPCLLAX.js → JTZ4ADQX.js} +1 -1
  137. package/dist/cdn/{TULJ7Y32.js → JV5HU2P3.js} +1 -1
  138. package/dist/cdn/{66I2OTCZ.js → JVS4TF4J.js} +1 -1
  139. package/dist/cdn/{P2GMODLP.js → K76CC5SU.js} +1 -1
  140. package/dist/cdn/{P5PUHTTZ.js → KEW5XA6H.js} +1 -1
  141. package/dist/cdn/{2BBD6VW2.js → KFP27BHL.js} +1 -1
  142. package/dist/cdn/{J6SWGP36.js → KGDQMML5.js} +1 -1
  143. package/dist/cdn/{PE2PWL2J.js → KIRD6MFZ.js} +1 -1
  144. package/dist/cdn/{NZVK73Y3.js → KQDKBJZK.js} +1 -1
  145. package/dist/cdn/{LHPWDJ75.js → KQQBUMWO.js} +1 -1
  146. package/dist/cdn/{YVZZACFZ.js → LWJRON65.js} +1 -1
  147. package/dist/cdn/{VLPW3VFM.js → LYS5KKCI.js} +1 -1
  148. package/dist/cdn/{KBRTUP24.js → M2HY6CLQ.js} +1 -1
  149. package/dist/cdn/{JM6DRQRN.js → MD5SOSQZ.js} +1 -1
  150. package/dist/cdn/{4RATJWRO.js → MHRGKC47.js} +1 -1
  151. package/dist/cdn/{LTMZ7TOT.js → MKTY2EZX.js} +1 -1
  152. package/dist/cdn/{FEBHYZ6D.js → MM4NZ3OE.js} +1 -1
  153. package/dist/cdn/{VVRC5BEV.js → MXWOTLK7.js} +1 -1
  154. package/dist/cdn/{43BJYWX5.js → MYHXKD6I.js} +1 -1
  155. package/dist/cdn/{UX6GYAWK.js → NA7MAHEV.js} +1 -1
  156. package/dist/cdn/{FQJ27ZN5.js → NDT34NBY.js} +1 -1
  157. package/dist/cdn/{PJKKBIRS.js → NJ4S342W.js} +1 -1
  158. package/dist/cdn/{VXEZRMIB.js → NL7EF3SL.js} +1 -1
  159. package/dist/cdn/{YX5HLX3D.js → NNB3XTRP.js} +1 -1
  160. package/dist/cdn/{BDNXOVLN.js → NNW5TRZN.js} +1 -1
  161. package/dist/cdn/{TWCJYCYQ.js → NTKXD63E.js} +1 -1
  162. package/dist/cdn/{VO5QOZLY.js → ODKFGRBW.js} +1 -1
  163. package/dist/cdn/{FHYP6EF2.js → OGDHPVHL.js} +1 -1
  164. package/dist/cdn/{YJQE7EHO.js → OGNO6LK2.js} +1 -1
  165. package/dist/cdn/{DZH4KU2P.js → OOUJLZ5Y.js} +1 -1
  166. package/dist/cdn/{ICXOGGZG.js → OXN4KDEM.js} +1 -1
  167. package/dist/cdn/{H65Z7MWV.js → OY2V3ITB.js} +1 -1
  168. package/dist/cdn/{QPY7IYQY.js → P23YOWRV.js} +1 -1
  169. package/dist/cdn/{FG72D6YZ.js → P7O2PUPO.js} +1 -1
  170. package/dist/cdn/{LZGMWFOO.js → PCYQ7KBI.js} +1 -1
  171. package/dist/cdn/{RZ5SLTHC.js → PEZE34ZX.js} +1 -1
  172. package/dist/cdn/{7IHIG427.js → PFPLJDX4.js} +1 -1
  173. package/dist/cdn/{J4FJYZ25.js → PHSGPNUO.js} +1 -1
  174. package/dist/cdn/PR3LFC6X.js +2 -0
  175. package/dist/cdn/{27KYQNKP.js → PSBKVBLU.js} +1 -1
  176. package/dist/cdn/{5JQT4A7C.js → PWMNTTWQ.js} +1 -1
  177. package/dist/cdn/{IQ3QP74J.js → PY2AD3SA.js} +1 -1
  178. package/dist/cdn/{Y6AHWNUS.js → QG32Z3FU.js} +1 -1
  179. package/dist/cdn/{USFLEWDK.js → QYSEVHOP.js} +1 -1
  180. package/dist/cdn/{UXW5MQM7.js → QZR27KPH.js} +1 -1
  181. package/dist/cdn/{3AXMZRRO.js → R2IWNHUS.js} +1 -1
  182. package/dist/cdn/{JCRUAYGH.js → R5S53Q74.js} +1 -1
  183. package/dist/cdn/{CYISOXDZ.js → RBIPQKHC.js} +1 -1
  184. package/dist/cdn/{KP4YBPWU.js → RDQMC4U5.js} +1 -1
  185. package/dist/cdn/{JNOTFCBC.js → RFZCABOP.js} +1 -1
  186. package/dist/cdn/RMPTTU44.js +2 -0
  187. package/dist/cdn/{CSS4XGEC.js → RN7TERZS.js} +1 -1
  188. package/dist/cdn/{5GJOYBI7.js → S2LWYEIV.js} +1 -1
  189. package/dist/cdn/{OC5LFUMP.js → S6JQDPNK.js} +1 -1
  190. package/dist/cdn/{N4R7LN4Y.js → SNAFVANI.js} +1 -1
  191. package/dist/cdn/{CXUGFNZW.js → SUFM3RB5.js} +1 -1
  192. package/dist/cdn/{AL6L663C.js → SXRFAMDI.js} +1 -1
  193. package/dist/cdn/{6BCQ52L7.js → SXZSMTBG.js} +1 -1
  194. package/dist/cdn/{3GPIVC5P.js → SYX3VAKX.js} +1 -1
  195. package/dist/cdn/{IAAFKO6G.js → SZH7BGJI.js} +1 -1
  196. package/dist/cdn/{FG2YJIYE.js → T3AOKIBN.js} +1 -1
  197. package/dist/cdn/{VJSPMUHM.js → T5Q6V6TJ.js} +1 -1
  198. package/dist/cdn/{GQ3SO3TR.js → T7KV2GLV.js} +1 -1
  199. package/dist/cdn/{RMMYKX2C.js → TCYR5PM4.js} +1 -1
  200. package/dist/cdn/{OGJW7OTX.js → TGX2CLGU.js} +1 -1
  201. package/dist/cdn/{GFZOUGIU.js → TMVM7RBO.js} +1 -1
  202. package/dist/cdn/{45COW2XC.js → TYFJJMSR.js} +1 -1
  203. package/dist/cdn/{OOAN57X4.js → U7QPKZAK.js} +1 -1
  204. package/dist/cdn/{3UB7YDP2.js → UBFTJWX6.js} +1 -1
  205. package/dist/cdn/{NDAKSOSF.js → UDHYXRPB.js} +1 -1
  206. package/dist/cdn/{IRN4ISDZ.js → UTKIRJ2E.js} +1 -1
  207. package/dist/cdn/{2Z5F2BEF.js → UU4XFZ3T.js} +1 -1
  208. package/dist/cdn/{7NHKX7LM.js → UW6JPJZQ.js} +1 -1
  209. package/dist/cdn/{26HV57H7.js → UXX7PUPN.js} +1 -1
  210. package/dist/cdn/{OAOXF5KZ.js → UYKMNICN.js} +1 -1
  211. package/dist/cdn/{4UHNVQPP.js → VAYHZ3VY.js} +1 -1
  212. package/dist/cdn/{3XBN5QVA.js → VLEDMSBM.js} +1 -1
  213. package/dist/cdn/{OW7VEQ7M.js → VOZE5FCK.js} +1 -1
  214. package/dist/cdn/VSJHTIKP.js +2 -0
  215. package/dist/cdn/{ZF5GBMSS.js → VY2QCKFS.js} +1 -1
  216. package/dist/cdn/{NU7WF2LD.js → W7XMDR4O.js} +1 -1
  217. package/dist/cdn/{Y37A4DUY.js → WFHFJSXA.js} +1 -1
  218. package/dist/cdn/{6AWNWO34.js → WGUVMOU5.js} +1 -1
  219. package/dist/cdn/WIVJUPOP.js +2 -0
  220. package/dist/cdn/{XF2UVS35.js → WLAXLYUL.js} +1 -1
  221. package/dist/cdn/{Y4XOPAG7.js → WS6V6H6O.js} +1 -1
  222. package/dist/cdn/{E3LXH4CS.js → WSOSZNOG.js} +1 -1
  223. package/dist/cdn/{7HSEOEBC.js → WT3F3EXR.js} +1 -1
  224. package/dist/cdn/{ADQWQBEW.js → WXH2AUIM.js} +1 -1
  225. package/dist/cdn/{I4KVOO6N.js → X7DPVTML.js} +1 -1
  226. package/dist/cdn/{7BUZBVCD.js → X7K5JY6V.js} +1 -1
  227. package/dist/cdn/{MRD6F6I3.js → XFYNHZJA.js} +1 -1
  228. package/dist/cdn/{IN5R6JL7.js → XHLERBQC.js} +1 -1
  229. package/dist/cdn/{GVUTAN2R.js → XHT4SN2J.js} +1 -1
  230. package/dist/cdn/{EHE46WJD.js → XJ2M5MYA.js} +1 -1
  231. package/dist/cdn/{Z5M2ALAH.js → XOI62O2T.js} +1 -1
  232. package/dist/cdn/{LQG26YL6.js → XR4OCVXI.js} +1 -1
  233. package/dist/cdn/Y5K6C565.js +2 -0
  234. package/dist/cdn/{JA7KC626.js → Y7NGCD4U.js} +1 -1
  235. package/dist/cdn/{FJBCC7ZH.js → YAMG2P7Q.js} +1 -1
  236. package/dist/cdn/{A4TJO5PZ.js → YFBVLNP4.js} +1 -1
  237. package/dist/cdn/{4QTVZIDY.js → YRUYS2Z6.js} +1 -1
  238. package/dist/cdn/{UVLOCGTT.js → YWKNEODK.js} +1 -1
  239. package/dist/cdn/{M5LPUEIS.js → YXXL3UQI.js} +1 -1
  240. package/dist/cdn/{BYJVWNVL.js → YYNR3ZFT.js} +1 -1
  241. package/dist/cdn/{XHHIPQFI.js → ZI2XM56L.js} +1 -1
  242. package/dist/cdn/{QTFACWJS.js → ZLDMHG4Z.js} +1 -1
  243. package/dist/cdn/{IXBOTGHC.js → ZN3G5W36.js} +1 -1
  244. package/dist/cdn/{BMJXYAYT.js → ZNNDL6TI.js} +1 -1
  245. package/dist/cdn/{7EMK74ZF.js → ZUNVTMPM.js} +1 -1
  246. package/dist/cdn/index.js +1 -1
  247. package/dist/chunks/runtime.js +1 -1
  248. package/dist/components/arcgis-layer-list-next/customElement.js +68 -60
  249. package/dist/components/arcgis-layer-list-next/layer-list-item/customElement.js +62 -62
  250. package/dist/docs/api.json +1 -1
  251. package/dist/docs/docs.json +1 -1
  252. package/dist/docs/web-types.json +1 -1
  253. package/package.json +6 -6
  254. package/dist/cdn/3GXZW3ZZ.js +0 -2
  255. package/dist/cdn/DGYFI3QX.js +0 -2
  256. package/dist/cdn/NBGFUVYW.js +0 -2
  257. package/dist/cdn/OCNR4NPT.js +0 -2
  258. package/dist/cdn/OOCTOODF.js +0 -2
  259. package/dist/cdn/TR7SBUZN.js +0 -2
  260. package/dist/cdn/TSGJUXIR.js +0 -2
  261. package/dist/cdn/XVWPYACH.js +0 -2
  262. package/dist/cdn/YRYVYLP7.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as ne}from"./TN5C3MSL.js";import g from"./HP32VJJ5.js";import"./IZ46HAUJ.js";import{a as _}from"./POKO37D3.js";import f from"./6CRONNHI.js";import"./VJVKFKSG.js";import e from"./X4FA56YR.js";import{a as ie}from"./7EMK74ZF.js";import d from"./NBGFUVYW.js";import c from"./76ZJGD75.js";import b from"./PPURK2BH.js";import{d as Z,h as ee}from"./6N7PM73F.js";import"./7IHIG427.js";import a from"./2IYRSXZS.js";import"./QUZTFUWM.js";import{f as Y}from"./P2GMODLP.js";import{D as H,E as q,M as j,N as P,O as E,P as J,Q,U as G,X,a as W,b as v,e as O,x as U,z as N}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:fe},Ce,we,{watch:y,on:Te,whenOnce:Se},Ee,{getOrCreateMapValue:ce,createReactiveMap:_e},Me,{property:p,subclass:ke},{ignoreAbortErrors:T},Pe,Le,,,,w,oe,{f:te},se])=>{var M=Q({defaultAssetPath:"https://js.arcgis.com/5.2.4/common-components/",hydratedAttribute:"hydrated"}),{customElement:He,getAssetPath:ye,setAssetPath:be}=M;M.t=void 0;M.o=void 0;M.c=void 0;M.r=void 0;var f={ForceCollapse:0,Default:1,Medium:100,High:200,Max:300,NeverCollapse:1e3};function le(i,e){let t=e;for(let o of i.split(".")){if(typeof t!="object"||t===null)return;t=Reflect.get(t,o)}return typeof t=="string"?t:void 0}var Ae=W`.editing-controls-panel{min-inline-size:100px;max-inline-size:400px;-webkit-user-select:none;user-select:none;pointer-events:initial;padding:var(--calcite-space-sm);arcgis-sketch-tooltip-controls+arcgis-snapping-controls{border-block-start:1px solid var(--calcite-color-border-3)}}:host{pointer-events:none}.toolbar-container{block-size:100%;min-block-size:0;min-inline-size:0}arcgis-toolbar-stack[layout=vertical]{block-size:100cqh;min-block-size:100%;max-block-size:100%}:host([data-intrinsic-toolbar-sizing]){min-inline-size:0;min-block-size:0;max-inline-size:100%;max-block-size:100%;arcgis-toolbar-stack[layout=vertical]{block-size:100%}}:host([data-intrinsic-toolbar-sizing][layout="vertical"]){display:grid;grid-template-columns:minmax(min-content,1fr);grid-template-rows:minmax(0,1fr);inline-size:fit-content;block-size:100%;.toolbar-container{block-size:auto}.toolbar-container,arcgis-view-popover{grid-area:1 / 1}}:host([data-intrinsic-toolbar-sizing][layout="vertical"][toolbar-kind="floating"]){block-size:auto}`,Oe={point:"pin",polyline:"line",polygon:"polygon",rectangle:"rectangle",circle:"circle",multipoint:"pins",mesh:"i3d-building",freehandPolygon:"freehand-area",freehandPolyline:"freehand",text:"text"},Ge={selectionTools:{defaultPriority:f.Default,groupKind:"split-button",overflowLabel:"selection"},selectionSet:{defaultPriority:f.High,groupKind:"actions"},createTools:{defaultPriority:f.High,groupKind:"more-button",overflowLabel:"drawing"},undoRedo:{defaultPriority:f.Medium,groupKind:"split-button",overflowLabel:"action",preferEndSlot:!0},settings:{defaultPriority:f.Max,groupKind:"more-button",overflowLabel:"action",preferEndSlot:!0},geometrySimplification:{defaultPriority:f.Default,groupKind:"actions",preferEndSlot:!0}},xe=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,d=(i,e,t,o)=>{for(var s=o>1?void 0:o?Re(e,t):e,r=i.length-1,c;r>=0;r--)(c=i[r])&&(s=(o?c(e,t,s):c(s))||s);return o&&s&&xe(e,t,s),s},h=class extends Me{constructor(i){super(i),this._effectiveRenderStateCache=new Map,this._effectiveGeometrySimplificationInProgress=!1,this.visibleElements=new Pe,this.settingsPopoverOpen=!1,this.availableCreateTools=["point","polyline","freehandPolyline","polygon","freehandPolygon","rectangle","circle"]}initialize(){this.selectionViewModel??=new Le({persistSelection:!1}),this.addHandles([y(()=>this.sketchViewModel,(i,e)=>{i!==e&&this._effectiveRenderStateCache.clear()},{sync:!0}),se({getLoading:()=>this.sketchViewModel?.geometrySimplificationInProgress??!1,setEffectiveLoading:i=>{this._effectiveGeometrySimplificationInProgress=i}}),y(()=>this.view,i=>{this.selectionViewModel.view=i},{initial:!0,sync:!0}),y(()=>this.sketchViewModel?.layer,i=>this.selectionViewModel.sources=i?[i]:[],{initial:!0,sync:!0}),this.selectionViewModel.on("complete",({selection:i})=>{let{sketchViewModel:e}=this;if(i.length&&e){let{defaultUpdateOptions:t}=e,{tool:o}=t;this.update(i,{...t,tool:i.length>1&&o==="reshape"?"transform":o})}}),y(()=>this.selectionViewModel.activeOperation,i=>{i&&(this.sketchViewModel?.cancel(),this._activeCustomToolOptions=void 0)},{sync:!0}),Te(()=>this.sketchViewModel,"create",i=>{i.state==="complete"&&this.sketchViewModel?.creationMode!=="continuous"&&(this._activeCustomToolOptions=void 0)}),y(()=>this.visibleElements.settingsMenu,i=>{i||(this.settingsPopoverOpen=!1)},{sync:!0})])}destroy(){this._pendingCommandAbortController?.abort(),this.selectionViewModel.destroy(),this.sketchViewModel=void 0}get _isEffectiveRenderStateFrozen(){let{sketchViewModel:i}=this;return!!(i?.toolTransitionInProgress||i?.geometrySimplificationInProgress)}_getEffectiveValue(i,e){if(!this._isEffectiveRenderStateFrozen||!this._effectiveRenderStateCache.has(i)){let t=e();return this._effectiveRenderStateCache.set(i,t),t}return this._effectiveRenderStateCache.get(i)}get _state(){return this.sketchViewModel?.state??"disabled"}get test(){return{activeCustomToolOptions:this._activeCustomToolOptions,activeSelectionTool:this._activeSelectionTool,selectionViewModel:this.selectionViewModel}}get _activeSelectionTool(){switch(this.selectionViewModel.activeOperation?.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";default:return}}get _activePluginUniqueIds(){let i=this.sketchViewModel?.activePluginConfigurations.filter(e=>!e.hidden).map(e=>e.uniqueId);return new Set(i??[])}get _createToolActions(){let{sketchViewModel:i}=this;if(!i)return[];let e=i.effectiveAvailablePlugins,t=this.state==="disabled",o=this.visibleElements.createTools,s=this.activeTool,r=this._activeCustomToolOptions,c=r||!i.firstPluginWithSwappableLeaf?this._customToolOptions:[],a=i.rootPlugins,l=c?.map(n=>({active:n===r,disabled:t,icon:n.icon,labelKey:n.label,onClick:n===r?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n.toolName,n.createOptions,n)}))??[];if(r&&a)return[...this._pluginsToActions(a),...l];if(e?.length&&this.view?.type!=="3d")return[...this._pluginsToActions(e),...l];let g=this.view?.type==="3d";return[...this.availableCreateTools?.filter(n=>g&&n==="multipoint"?!1:n==="mesh"?!0:o[n])?.map(n=>({active:n===s,disabled:t,icon:Oe[n],labelKey:`draw.${n}`,onClick:n===s?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n)}))??[],...l]}get _shouldShowBackButton(){let i=this.sketchViewModel?.firstPluginWithSwappableLeaf,e=this.sketchViewModel?.rootPlugins,t=this._activeCustomToolOptions;return!!(this.sketchViewModel?.multiplePluginsActive&&i&&e&&!(e.length<2&&e.includes(i)&&!this.visibleElements.singlePluginBackButton)&&!t)}get _selectionToolActions(){return this._shouldShowBackButton?[{active:!1,disabled:this.state==="disabled",icon:"chevron-left",iconFlipRTL:!0,labelKey:"back",onClick:()=>this._cancelActiveOperation()}]:this._selectionCommands}get _settingsActions(){let i=this._customActions?.get("settings-before"),e=this._customActions?.get("settings-after"),t=this.visibleElements.settingsMenu,o=[];return!i?.length&&!e?.length&&!t||(i&&o.push(...this._customActionsToSketchActions(i)),t&&o.push({icon:"gear",active:this.settingsPopoverOpen,disabled:this.state==="disabled",labelKey:"settings.heading",tooltipKey:"settings.heading",refKey:"settings",onClick:()=>this.toggleSettingsPopover()}),e&&o.push(...this._customActionsToSketchActions(e))),o}get _activeTool(){let i=this.selectionViewModel.activeOperation;if(i)switch(i.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";case"default":return"custom-selection"}if(!this.sketchViewModel)return;let{availableCreateTools:e}=this,{activeTool:t,activeCreateToolDrawMode:o}=this.sketchViewModel;return t==="polygon"&&o==="freehand"&&e?.includes("freehandPolygon")?"freehandPolygon":t==="polyline"&&o==="freehand"&&e?.includes("freehandPolyline")?"freehandPolyline":t??void 0}get _selectionCommands(){let{state:i,visibleElements:e,_activeSelectionTool:t,_customActions:o}=this,s=this.state==="disabled",r=[];this.sketchViewModel?.updateOnGraphicClick!==!1&&r.push({active:i==="ready"&&this._activeSelectionTool==null,disabled:s,icon:"cursor",labelKey:"selectFeature",onClick:()=>this._activateDefaultSelectionTool()});let c=e.selectionTools;c["rectangle-selection"]&&r.push({active:t==="rectangle-selection",disabled:s,icon:"cursor-marquee",labelKey:"rectangleSelection",onClick:()=>this._activateSelectionTool("rectangle-selection")}),c["lasso-selection"]&&r.push({active:t==="lasso-selection",disabled:s,icon:"lasso-select",labelKey:"lassoSelection",onClick:()=>this._activateSelectionTool("lasso-selection")});let a=o?.get("selection-toolbar");return a&&r.push(...this._customActionsToSketchActions(a)),r}get _selectionSetActions(){let i=this.sketchViewModel?.updateGraphics.length??0;if(!i)return[];let e=this.state==="disabled",t=[],o=this._customActions?.get("before-selection-set"),s=this._customActions?.get("after-selection-set");return this.visibleElements.selectionCountLabel&&t.push({active:!1,appearance:"outline",disabled:e,icon:"selection-x",kind:"brand",labelKey:"deselectCount",labelParameters:{count:i},textEnabled:!0,renderAsAction:!0,onClick:()=>this._cancelSketchOperation()}),o&&t.push(...this._customActionsToSketchActions(o)),this.visibleElements.duplicateButton&&t.push({active:!1,disabled:e,icon:"copy",renderAsAction:!0,labelKey:i>1?"duplicateFeatures":"duplicateFeature",onClick:()=>this._duplicate()}),this.visibleElements.deleteButton&&t.push({active:!1,disabled:e,icon:"trash",kind:"danger",renderAsAction:!0,labelKey:i>1?"deleteFeatures":"deleteFeature",onClick:()=>this._delete()}),s&&t.push(...this._customActionsToSketchActions(s)),t}get _undoRedoActions(){return this.visibleElements.undoRedoMenu?[{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canUndo(),icon:"undo",labelKey:"undo",iconFlipRTL:!0,onClick:()=>this._undo()},{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canRedo(),icon:"redo",labelKey:"redo",iconFlipRTL:!0,onClick:()=>this._redo()}]:[]}get state(){return this._getEffectiveValue("state",()=>this._state)}get activeTool(){return this._getEffectiveValue("activeTool",()=>this._activeTool)}get activePluginIds(){return this._getEffectiveValue("activePluginId",()=>this._activePluginUniqueIds)}get groupedActions(){let i=this._getEffectiveValue("availableCommandGroups",()=>[["selectionTools",this._selectionToolActions],["createTools",this._createToolActions],["undoRedo",this._undoRedoActions],["settings",this._settingsActions],["selectionSet",this._selectionSetActions]].map(([t,o])=>({name:t,commands:o,visible:o.length>0}))),e=this._effectiveGeometrySimplificationInProgress?i.map(t=>({...t,commands:t.commands.map(o=>({...o,disabled:!0}))})):i;return!this.visibleElements.geometrySimplificationActivityIndicator||!this._effectiveGeometrySimplificationInProgress?e:[...e,{name:"geometrySimplification",commands:[{active:!1,appearance:"transparent",disabled:!0,kind:"warning",labelKey:"processing",loading:!0,onClick:()=>{},renderAsAction:!0}],visible:!0}]}async create(i,e){await this._executeWhenReady(async()=>{this.cancelAll();let t=this.sketchViewModel;t&&await T(t.create(i,e))})}async _executeWhenReady(i){this._pendingCommandAbortController?.abort();let e=new AbortController;this._pendingCommandAbortController=e;try{await T((async()=>{this.sketchViewModel?.geometrySimplificationInProgress&&await Se(()=>!this.sketchViewModel?.geometrySimplificationInProgress,e.signal),e.signal.aborted||await i()})())}finally{this._pendingCommandAbortController===e&&(this._pendingCommandAbortController=void 0)}}toggleSettingsPopover(){this.settingsPopoverOpen=!this.settingsPopoverOpen}setCustomTools(i,e){this._customToolOptions=i??void 0;let t=this._activeCustomToolOptions;if(t){let o=this._customToolOptions?.find(s=>s.toolKey===t.toolKey);o?this._activeCustomToolOptions=o:this.cancelAll()}if(e?.length){let o=new Map;for(let s of e)ce(o,s.position,()=>[]).push(s);this._customActions=o}else this._customActions=void 0}cancelAll(){this._pendingCommandAbortController?.abort(),this._cancelSupportingOperations(),this.sketchViewModel?.cancel()}async update(i,e){await this._executeWhenReady(async()=>{let t=this.sketchViewModel;t&&await T(t.update(i,e))})}_activateDefaultSelectionTool(){this._executeWhenReady(()=>{this.cancelAll(),this.view?.focus()})}_cancelActiveOperation(){this._executeWhenReady(()=>this.cancelAll())}_cancelSketchOperation(){this._executeWhenReady(()=>this.sketchViewModel?.cancel())}_cancelSupportingOperations(){this.selectionViewModel.cancel(),this._activeCustomToolOptions=void 0}_activatePlugin(i){this._executeWhenReady(()=>{let e=this._activeCustomToolOptions!=null;this._cancelSupportingOperations();let t=this.sketchViewModel;if(t){if(e){t.cancel(),T(t.create(i));return}t.firstPluginWithSwappableLeaf?(t.replaceLeaf(i),this.view?.focus()):T(t.create(i))}})}_activateLegacyDrawTool(i,e,t){this._executeWhenReady(()=>{this._cancelSupportingOperations();let o=this.sketchViewModel;o&&(this._activeCustomToolOptions=t,T(o.create(i,e)))})}_activateSelectionTool(i){this._executeWhenReady(()=>{if(this._activeSelectionTool===i){this.selectionViewModel.cancel();return}this.cancelAll();let e={createTool:i==="lasso-selection"?"polygon":"rectangle",...i==="lasso-selection"?{mode:"hybrid",toolName:"lasso"}:{toolName:"rectangle"},type:"replace",selectOnComplete:!0};this.selectionViewModel.activate(e)&&this.view?.focus()})}_delete(){this._executeWhenReady(()=>this.sketchViewModel?.delete())}_duplicate(){this._executeWhenReady(()=>{this.sketchViewModel?.duplicate()})}_executeCustomAction(i){this._executeWhenReady(()=>i.onclick?.())}_redo(){this._executeWhenReady(()=>{this.sketchViewModel?.redo()})}_undo(){this._executeWhenReady(()=>{this.sketchViewModel?.undo()})}_customActionsToSketchActions(i){let e=this.state==="disabled";return i.map(t=>({active:t.active??!1,afterCreate:t.afterCreate,afterRemoved:t.afterRemoved,afterUpdate:t.afterUpdate,disabled:e||(t.disabled??!1),icon:t.icon,iconFlipRTL:t.flipRTL,id:t.id,labelKey:t.text,onClick:()=>this._executeCustomAction(t)}))}_pluginsToActions(i){let e=this.activePluginIds,t=this._activeCustomToolOptions,o=this.state==="disabled";return i.map(s=>({active:(e?.has(s.uniqueId)??!1)&&!t,icon:s.icon,disabled:o,labelKey:`digitizers.${s.localizationKey}`,onClick:()=>this._activatePlugin([s])}))}};d([p()],h.prototype,"_isEffectiveRenderStateFrozen",1);d([p()],h.prototype,"_effectiveGeometrySimplificationInProgress",2);d([p()],h.prototype,"_state",1);d([p()],h.prototype,"_customToolOptions",2);d([p()],h.prototype,"_activeCustomToolOptions",2);d([p()],h.prototype,"_customActions",2);d([p()],h.prototype,"selectionViewModel",2);d([p()],h.prototype,"_activeSelectionTool",1);d([p()],h.prototype,"_activePluginUniqueIds",1);d([p()],h.prototype,"_createToolActions",1);d([p()],h.prototype,"_shouldShowBackButton",1);d([p()],h.prototype,"_selectionToolActions",1);d([p()],h.prototype,"_settingsActions",1);d([p()],h.prototype,"_activeTool",1);d([p()],h.prototype,"_selectionCommands",1);d([p()],h.prototype,"_selectionSetActions",1);d([p()],h.prototype,"_undoRedoActions",1);d([p()],h.prototype,"sketchViewModel",2);d([p()],h.prototype,"visibleElements",2);d([p()],h.prototype,"view",2);d([p()],h.prototype,"settingsPopoverOpen",2);d([p()],h.prototype,"availableCreateTools",2);d([p()],h.prototype,"state",1);d([p()],h.prototype,"activeTool",1);d([p()],h.prototype,"activePluginIds",1);d([p()],h.prototype,"groupedActions",1);h=d([ke("components.sketch.SketchComponentViewModel")],h);var R=class extends j{#t;#e=!1;#i;constructor(e){if(super(e),e.type!==H.ELEMENT)throw new Error("nodeHooks() can only be used on elements")}render(e){return O}update(e,[t]){let o=e.element;if(!(o instanceof HTMLElement))throw new TypeError("nodeHooks() can only be used on HTMLElements");let s=this.#e?t.afterUpdate:t.afterCreate;return this.#t=o,this.#e=!0,this.#i=t,queueMicrotask(()=>{o.isConnected&&s?.(o)}),O}disconnected(){let e=this.#t,t=this.#i?.afterRemoved;!e||!t||queueMicrotask(()=>{e.isConnected||te(()=>t(e),{timeout:16})})}},ae=q(R),$e=new Set(["arcgis-map","arcgis-scene"]),Ve=8,$=class extends N{constructor(e){super(e),this.#t=new MutationObserver(()=>this.#c()),this.#e=new ResizeObserver(()=>this.#v()),this.#i=new ResizeObserver(([t])=>{if(!t)return;let o=this.component.layout==="horizontal"?t.contentRect.height:t.contentRect.width;o!==this.#s&&(this.#s=o,this.#v())}),this.#h=[],this.ref=t=>{this.#o!==t&&(this.#o=t,this.#a=void 0,this.#r=void 0,this.#c())},this.#u=()=>this.#c(),this.exports=void 0,e.listenOn(window,"resize",()=>this.#g()),this.onConnected(()=>this.#g()),this.onUpdated(()=>{(this.#d!==this.component.layout||this.#y!==this.component.toolbarKind)&&this.#c()}),this.onDisconnected(()=>this.#C()),this.onLifecycle(()=>y(()=>this.component.view?.attributionHeight,()=>{this.#g()},{initial:!0}))}#t;#e;#i;#l;#s;#n;#h;#m;#o;#a;#r;#d;#y;#p;#g(){queueMicrotask(()=>{this.component.el.isConnected&&this.#c()})}#c(){this.#y=this.component.toolbarKind;let e=this.#b();if(this.component.el.toggleAttribute("data-intrinsic-toolbar-sizing",!e),!e){this.#f(),this.#C();return}this.#w(e.toolbar),this.#T(e),this.#S(e),this.#v(e)}#b(){let e=this.component.el,t=e.parentElement,o=this.#o,s=e.assignedSlot;if(!t||!$e.has(t.localName)||!o||!s?.parentElement)return;let r=getComputedStyle(t).direction==="rtl"?"rtl":"ltr",c=he(e.slot,r);if(!c)return;let a=Array.from(t.children).filter(l=>l instanceof HTMLElement&&l.localName!=="arcgis-sketch");return{assignedSlot:s,content:a,direction:r,parent:t,position:c,toolbar:o}}#u;#w(e){this.#d!==this.component.layout&&(this.#s=void 0,this.#d=this.component.layout),this.#l!==e&&(this.#i.disconnect(),this.#l=e,this.#s=void 0,this.#i.observe(e))}#T(e){let t=e.assignedSlot;this.#n!==t&&(this.#n?.removeEventListener("slotchange",this.#u),this.#n=t,t.addEventListener("slotchange",this.#u)),this.#m!==e.parent&&(this.#t.disconnect(),this.#p?.(),this.#m=e.parent,this.#p=Y(e.parent,["dir"],()=>{this.#g()}),this.#t.observe(e.parent,{childList:!0,subtree:!1}))}#S(e){let t=[e.parent,...e.content];De(this.#h,t)||(this.#e.disconnect(),t.forEach(o=>this.#e.observe(o)),this.#h=t)}#v(e=this.#b()){if(!e){this.#f();return}let t=this.component.layout,o=e.parent.getBoundingClientRect(),s=Be({content:Ie(e),gap:Ve,layout:t,position:e.position,sameSlotReserve:ze(e.assignedSlot,this.component.el,t,e.assignedSlot.parentElement),toolbarBounds:e.toolbar.getBoundingClientRect(),viewBounds:o}),r=s;if(e.toolbar.toolbarKind==="floating"){let c=getComputedStyle(e.assignedSlot.parentElement.parentElement),a=Math.max(Number.parseFloat(c.marginLeft),Number.parseFloat(c.marginRight)),l=t==="horizontal"?window.innerWidth:window.innerHeight,g=t==="horizontal"?o.width:o.height,n=t==="vertical"?this.component.view?.attributionHeight??0:0;r=Math.max(0,Math.min(s,g-2*a-n,l-2*a))}this.#E(e.toolbar,t,s,r)}#E(e,t,o,s){o===this.#a&&s===e.allocatedLength&&t===this.#r||(this.#a=o,this.#r=t,e.allocatedLength=s,t==="horizontal"?(e.style.height="",e.style.maxHeight="",e.style.maxWidth=`${o}px`,e.style.width="fit-content"):(e.style.height="fit-content",e.style.maxHeight=`${o}px`,e.style.maxWidth="",e.style.width=""))}#f(){this.#o&&(this.#o.style.maxHeight="",this.#o.style.maxWidth="",this.#o.style.height="",this.#o.style.width="",this.#o.allocatedLength=void 0,this.#a=void 0,this.#r=void 0)}#C(){this.#t.disconnect(),this.#p?.(),this.#p=void 0,this.#e.disconnect(),this.#i.disconnect(),this.#l=void 0,this.#s=void 0,this.#h=[],this.#n?.removeEventListener("slotchange",this.#u),this.#n=void 0,this.#a=void 0,this.#r=void 0,this.#d=void 0,this.#m=void 0}};function Be({content:i,gap:e,layout:t,position:o,sameSlotReserve:s,toolbarBounds:r,viewBounds:c}){let a=x(c,t),l=x(r,t),g=re(o,t),n=g?l.start-a.start:a.end-l.end,u=0,m=!1;for(let S of i){if(re(S.position,t)===g)continue;let C=x(S.bounds,t);if(!(C.crossStart<l.crossEnd&&C.crossEnd>l.crossStart))continue;let k=g?a.end-C.start:C.end-a.start;u=Math.max(u,k),m=!0}let b=m?e:0;return Math.max(0,a.length-Math.max(0,n)-s-u-b)}function x(i,e){return e==="horizontal"?{start:i.left,end:i.right,length:i.width,crossStart:i.top,crossEnd:i.bottom}:{start:i.top,end:i.bottom,length:i.height,crossStart:i.left,crossEnd:i.right}}function re(i,e){return e==="horizontal"?i.endsWith("left"):i.startsWith("top")}function Ie(i){return i.content.flatMap(e=>{if(e.assignedSlot===i.assignedSlot)return[];let t=he(e.slot,i.direction);return t?[{bounds:e.getBoundingClientRect(),position:t}]:[]})}function De(i,e){return i.length===e.length&&i.every((t,o)=>t===e[o])}function ze(i,e,t,o){let s=getComputedStyle(o).flexDirection;if(!(t==="horizontal"?s.startsWith("row"):s.startsWith("column")))return 0;let r=i.assignedElements().filter(g=>g instanceof HTMLElement),c=r.indexOf(e);if(c<0)return 0;let a=getComputedStyle(e),l=s==="row"?Number.parseFloat(a.marginRight):s==="row-reverse"?Number.parseFloat(a.marginLeft):s==="column"?Number.parseFloat(a.marginBottom):Number.parseFloat(a.marginTop);return r.slice(c+1).reduce((g,n)=>{let u=n.getBoundingClientRect(),m=getComputedStyle(n),b=t==="horizontal"?u.width+Number.parseFloat(m.marginLeft)+Number.parseFloat(m.marginRight):u.height+Number.parseFloat(m.marginTop)+Number.parseFloat(m.marginBottom);return g+b},l)}function he(i,e){let[t,o]=i.split("-");if(t!=="bottom"&&t!=="top")return;let s=o==="start"?e==="ltr"?"left":"right":o==="end"?e==="ltr"?"right":"left":o;return s==="left"||s==="right"?`${t}-${s}`:void 0}var Fe=["bottom-end","bottom-start","bottom-left","bottom-right","top-end","top-start","top-left","top-right"],Ke=new Set(Fe),We=oe(i=>new Ee({...i,cancelUpdateOnClickAway:!0,creationMode:"continuous",textSymbol:new we({text:"text"}),useLegacyCreateTools:!1})),V=class extends J{constructor(){super(),this.#t=new h,this.#l=P(),this.#s=new $(this),this.#n=P(),this._defaultGraphicsLayer=null,this._messages=ie(),this.test={componentViewModel:this.#t},this._groupLayoutPriorityOverrides=new Map,this._contextualToolLocation="separate",this._refMap=_e(),this.viewModel=We(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.createGraphic=this.viewModel.createGraphic,this.creationMode=this.viewModel.creationMode,this.defaultCreateOptions=this.viewModel.defaultCreateOptions,this.defaultGraphicsLayerDisabled=!1,this.defaultUpdateOptions=this.viewModel.defaultUpdateOptions,this.geometrySimplificationInProgress=this.viewModel.geometrySimplificationInProgress,this.icon="pencil",this.label=this._messages?.componentLabel,this.labelOptions=this.viewModel.labelOptions,this.layer=this.viewModel.layer,this.layout="horizontal",this.pointSymbol=this.viewModel.pointSymbol,this.polygonSymbol=this.viewModel.polygonSymbol,this.polylineSymbol=this.viewModel.polylineSymbol,this.activeFillSymbol=this.viewModel.activeFillSymbol,this.activeLineSymbol=this.viewModel.activeLineSymbol,this.activeVertexSymbol=this.viewModel.activeVertexSymbol,this.activeCreateToolDrawMode=this.viewModel.activeCreateToolDrawMode,this.visualScale="m",this.snappingOptions=this.viewModel.snappingOptions,this.textSymbol=this.viewModel.textSymbol,this.toolbarKind="floating",this.tooltipOptions=this.viewModel.tooltipOptions,this.useViewOptions=this.viewModel.useViewOptions,this.valueOptions=this.viewModel.valueOptions,this.useLegacyCreateTools=this.viewModel.useLegacyCreateTools,this.updateOnGraphicClickDisabled=this.viewModel.updateOnGraphicClick,this.updateGraphics=this.viewModel.updateGraphics,this.activeTooltip=this.viewModel.activeTooltip,this.arcgisCreate=w(()=>this.viewModel,"create"),this.arcgisDelete=w(()=>this.viewModel,"delete"),this.arcgisDuplicate=w(()=>this.viewModel,"duplicate"),this.arcgisPropertyChange=ee()("activeTool","geometrySimplificationInProgress","state"),this.arcgisReady=U(),this.arcgisRedo=w(()=>this.viewModel,"redo"),this.arcgisUndo=w(()=>this.viewModel,"undo"),this.arcgisUpdate=w(()=>this.viewModel,"update"),Z(["slot"],()=>{this.requestUpdate()}),this.manager.onLifecycle(()=>[y(()=>this.el.view?.map,(e,t)=>{let o=this._defaultGraphicsLayer;o&&(t?.allLayers.includes(o)&&t.remove(o),o&&!e?.allLayers.includes(o)&&e?.add(o))}),y(()=>this.el.view,e=>{this.viewModel.view=e,this.#t.view=e??void 0},{initial:!0}),y(()=>this.viewModel,e=>{this.#t.sketchViewModel=e,this.viewModel.pluginManager.sketch=this},{initial:!0}),y(()=>this.#t.state,(e,t)=>{this.requestUpdate("state",t)},{initial:!0}),y(()=>this.#t.activeTool,()=>this.arcgisPropertyChange.emit({name:"activeTool"}),{sync:!0})]),this.manager.onDestroy(()=>{this._defaultGraphicsLayer&&this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.el.view?.map?.remove(this._defaultGraphicsLayer),this._defaultGraphicsLayer?.destroy(),this._defaultGraphicsLayer=null,this.#t.destroy()})}static{this.properties={_groupLayoutPriorityOverrides:16,_contextualToolLocation:16,_refMap:16,viewModel:0,view:0,activeTool:32,autoDestroyDisabled:5,visibleElements:0,availableCreateTools:0,createGraphic:32,creationMode:1,defaultCreateOptions:0,defaultGraphicsLayerDisabled:5,defaultUpdateOptions:0,geometrySimplificationInProgress:36,hideCreateToolsCircle:5,hideCreateToolsMultipoint:5,hideCreateToolsPoint:5,hideCreateToolsPolygon:5,hideCreateToolsPolyline:5,hideCreateToolsRectangle:5,hideDuplicateButton:5,hideDeleteButton:5,hideSelectionCountLabel:5,hideLabelsToggle:5,hideSelectionToolsLassoSelection:5,hideSelectionToolsRectangleSelection:5,hideSettingsMenu:5,hideSinglePluginBackButton:5,hideSnappingControls:5,hideSnappingControlsElementsEnabledToggle:5,hideSnappingControlsElementsFeatureEnabledToggle:5,hideSnappingControlsElementsLayerList:5,hideSnappingControlsElementsSelfEnabledToggle:5,hideSnappingControlsElementsGridEnabledToggle:5,hideSnappingControlsElementsGridControls:5,hideSnappingControlsElementsGridControlsElementsColorSelection:5,hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle:5,hideSnappingControlsElementsGridControlsElementsLineIntervalInput:5,hideSnappingControlsElementsGridControlsElementsNumericInputs:5,hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning:5,hideSnappingControlsElementsGridControlsElementsPlacementButtons:5,hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle:5,hideTooltipsToggle:5,hideUndoRedoMenu:5,icon:1,label:1,labelOptions:0,layer:0,layout:3,pointSymbol:0,polygonSymbol:0,polylineSymbol:0,activeFillSymbol:0,activeLineSymbol:0,activeVertexSymbol:0,activeCreateToolDrawMode:1,referenceElement:1,relativePosition:1,scale:1,visualScale:1,showSnappingControlsElementsHeader:5,showCreateToolsFreehandPolygon:5,showCreateToolsFreehandPolyline:5,showCreateToolsText:5,hideGeometrySimplificationActivityIndicator:5,snappingOptions:0,state:32,textSymbol:0,toolbarKind:3,tooltipOptions:0,useViewOptions:5,valueOptions:0,useLegacyCreateTools:5,updateOnGraphicClickDisabled:5,cancelUpdateOnClickAwayDisabled:5,updateGraphics:32,activeTooltip:0}}static{this.styles=Ae}#t;get#e(){return this.#t.visibleElements}#i;#l;#s;#n;get activeTool(){return this.#t.activeTool}get visibleElements(){return this.#t.visibleElements}set visibleElements(e){this.#t.visibleElements=e}get availableCreateTools(){return this.#t.availableCreateTools}set availableCreateTools(e){this.#t.availableCreateTools=e}get hideCreateToolsCircle(){return!this.#e.createTools.circle}set hideCreateToolsCircle(e){this.#e.createTools.circle=!e}get hideCreateToolsMultipoint(){return!this.#e.createTools.multipoint}set hideCreateToolsMultipoint(e){this.#e.createTools.multipoint=!e}get hideCreateToolsPoint(){return!this.#e.createTools.point}set hideCreateToolsPoint(e){this.#e.createTools.point=!e}get hideCreateToolsPolygon(){return!this.#e.createTools.polygon}set hideCreateToolsPolygon(e){this.#e.createTools.polygon=!e}get hideCreateToolsPolyline(){return!this.#e.createTools.polyline}set hideCreateToolsPolyline(e){this.#e.createTools.polyline=!e}get hideCreateToolsRectangle(){return!this.#e.createTools.rectangle}set hideCreateToolsRectangle(e){this.#e.createTools.rectangle=!e}get hideDuplicateButton(){return!this.#e.duplicateButton}set hideDuplicateButton(e){this.#e.duplicateButton=!e}get hideDeleteButton(){return!this.#e.deleteButton}set hideDeleteButton(e){this.#e.deleteButton=!e}get hideSelectionCountLabel(){return!this.#e.selectionCountLabel}set hideSelectionCountLabel(e){this.#e.selectionCountLabel=!e}get hideLabelsToggle(){return!this.#e.labelsToggle}set hideLabelsToggle(e){this.#e.labelsToggle=!e}get hideSelectionToolsLassoSelection(){return!this.#e.selectionTools["lasso-selection"]}set hideSelectionToolsLassoSelection(e){this.#e.selectionTools["lasso-selection"]=!e}get hideSelectionToolsRectangleSelection(){return!this.#e.selectionTools["rectangle-selection"]}set hideSelectionToolsRectangleSelection(e){this.#e.selectionTools["rectangle-selection"]=!e}get hideSettingsMenu(){return!this.#e.settingsMenu}set hideSettingsMenu(e){this.#e.settingsMenu=!e}get hideSinglePluginBackButton(){return!this.#e.singlePluginBackButton}set hideSinglePluginBackButton(e){this.#e.singlePluginBackButton=!e}get hideSnappingControls(){return!this.#e.snappingControls}set hideSnappingControls(e){this.#e.snappingControls=!e}get hideSnappingControlsElementsEnabledToggle(){return!this.#e.snappingControlsElements.enabledToggle}set hideSnappingControlsElementsEnabledToggle(e){this.#e.snappingControlsElements.enabledToggle=!e}get hideSnappingControlsElementsFeatureEnabledToggle(){return!this.#e.snappingControlsElements.featureEnabledToggle}set hideSnappingControlsElementsFeatureEnabledToggle(e){this.#e.snappingControlsElements.featureEnabledToggle=!e}get hideSnappingControlsElementsLayerList(){return!this.#e.snappingControlsElements.layerList}set hideSnappingControlsElementsLayerList(e){this.#e.snappingControlsElements.layerList=!e}get hideSnappingControlsElementsSelfEnabledToggle(){return!this.#e.snappingControlsElements.selfEnabledToggle}set hideSnappingControlsElementsSelfEnabledToggle(e){this.#e.snappingControlsElements.selfEnabledToggle=!e}get hideSnappingControlsElementsGridEnabledToggle(){return!this.#e.snappingControlsElements.gridEnabledToggle}set hideSnappingControlsElementsGridEnabledToggle(e){this.#e.snappingControlsElements.gridEnabledToggle=!e}get hideSnappingControlsElementsGridControls(){return!this.#e.snappingControlsElements.gridControls}set hideSnappingControlsElementsGridControls(e){this.#e.snappingControlsElements.gridControls=!e}get hideSnappingControlsElementsGridControlsElementsColorSelection(){return!this.#e.snappingControlsElements.gridControlsElements.colorSelection}set hideSnappingControlsElementsGridControlsElementsColorSelection(e){this.#e.snappingControlsElements.gridControlsElements.colorSelection=!e}get hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(){return!this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle}set hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(e){this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle=!e}get hideSnappingControlsElementsGridControlsElementsLineIntervalInput(){return!this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput}set hideSnappingControlsElementsGridControlsElementsLineIntervalInput(e){this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput=!e}get hideSnappingControlsElementsGridControlsElementsNumericInputs(){return!this.#e.snappingControlsElements.gridControlsElements.numericInputs}set hideSnappingControlsElementsGridControlsElementsNumericInputs(e){this.#e.snappingControlsElements.gridControlsElements.numericInputs=!e}get hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(){return!this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning}set hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(e){this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning=!e}get hideSnappingControlsElementsGridControlsElementsPlacementButtons(){return!this.#e.snappingControlsElements.gridControlsElements.placementButtons}set hideSnappingControlsElementsGridControlsElementsPlacementButtons(e){this.#e.snappingControlsElements.gridControlsElements.placementButtons=!e}get hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(){return!this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle}set hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(e){this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle=!e}get hideTooltipsToggle(){return!this.#e.tooltipsToggle}set hideTooltipsToggle(e){this.#e.tooltipsToggle=!e}get hideUndoRedoMenu(){return!this.#e.undoRedoMenu}set hideUndoRedoMenu(e){this.#e.undoRedoMenu=!e}get relativePosition(){let e=this.el.slot||this.el.closest("arcgis-expand")?.slot||"";return this.#i??(Ke.has(e)?e:ne.topRight)}set relativePosition(e){this.#i=e}get scale(){return this.visualScale}set scale(e){this.visualScale=e}get showSnappingControlsElementsHeader(){return this.#e.snappingControlsElements.header}set showSnappingControlsElementsHeader(e){this.#e.snappingControlsElements.header=e}get showCreateToolsFreehandPolygon(){return this.#e.createTools.freehandPolygon}set showCreateToolsFreehandPolygon(e){this.#e.createTools.freehandPolygon=e}get showCreateToolsFreehandPolyline(){return this.#e.createTools.freehandPolyline}set showCreateToolsFreehandPolyline(e){this.#e.createTools.freehandPolyline=e}get showCreateToolsText(){return this.#e.createTools.text}set showCreateToolsText(e){this.#e.createTools.text=e}get hideGeometrySimplificationActivityIndicator(){return!this.#e.geometrySimplificationActivityIndicator}set hideGeometrySimplificationActivityIndicator(e){this.#e.geometrySimplificationActivityIndicator=!e}get state(){return this.#t.state}get cancelUpdateOnClickAwayDisabled(){return!this.viewModel.cancelUpdateOnClickAway}set cancelUpdateOnClickAwayDisabled(e){this.viewModel.cancelUpdateOnClickAway=!e}async addGraphic(e){this.viewModel.addGraphic(e)}async addGraphics(e){this.viewModel.addGraphics(e)}async cancel(){this.#t.cancelAll()}async complete(){this.viewModel.complete()}async create(e,t){await this.#t.create(e,t)}async delete(){this.viewModel.delete()}async destroy(){await this.manager.destroy()}async dismissFloatingElements(){this.#t.settingsPopoverOpen=!1}async duplicate(){this.viewModel.duplicate()}async hasGraphic(e){return this.viewModel.hasGraphic(e)}async removeAllGraphics(){this.viewModel.removeAllGraphics()}async removeGraphic(e){this.viewModel.removeGraphic(e)}async removeGraphics(e){this.viewModel.removeGraphics(e)}async redo(){this.viewModel.redo()}async canRedo(){return this.viewModel.canRedo()}async setContextualToolLocation(e){this._contextualToolLocation=e}async setCustomTools(e,t){this.#t.setCustomTools(e,t)}async setGroupCollapsePriorities(e){this._groupLayoutPriorityOverrides=e||new Map}async triggerUpdate(e,t){await this.#t.update(e,t)}async place(e){this.viewModel.place(e)}async undo(){this.#t.sketchViewModel?.undo()}async canUndo(){return this.viewModel.canUndo()}connectedCallback(){super.connectedCallback(),this.defaultGraphicsLayerDisabled||(this._defaultGraphicsLayer?.destroyed&&(this._defaultGraphicsLayer=null),this._defaultGraphicsLayer??=new Ce({title:"Sketch Layer"}),this.layer=this._defaultGraphicsLayer,this.view?.map?.add(this.layer),this.viewModel.layer=this._defaultGraphicsLayer)}disconnectedCallback(){this._defaultGraphicsLayer&&this.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.view?.map?.remove(this._defaultGraphicsLayer),this.cancel(),super.disconnectedCallback()}render(){let e=this._refMap.get("settings")?.value?.actionElement,t=this.#t.groupedActions,{visualScale:o,layout:s,toolbarKind:r,relativePosition:c,_contextualToolLocation:a}=this,l=t.find(({name:n})=>n==="selectionSet"),g=t.filter(({name:n})=>n!=="selectionSet");return v`<div class="toolbar-container"><arcgis-toolbar-stack .layout=${s} .toolbarKind=${r} .relativePosition=${c} .scale=${o} tooltip-appearance=calcite ${E(this.#s.ref)}><arcgis-toolbar ${E(this.#l)}>${_({hidden:!l?.visible||a!=="inline",children:this._renderActionGroup(l)})}${g.map(n=>this._renderActionGroup(n))}${_({hidden:!l?.visible||a!=="inline-end",children:this._renderActionGroup(l)})}</arcgis-toolbar>${_({hidden:!l?.visible||a!=="separate",children:v`<arcgis-toolbar>${this._renderActionGroup(l)}</arcgis-toolbar>`})}</arcgis-toolbar-stack></div>${_({hidden:this.hideSettingsMenu,children:v`<arcgis-view-popover .open=${this.#t.settingsPopoverOpen} .heading=${this._messages.settings?.heading} .anchorElement=${e} .visualScale=${o} .actionBarElement=${this.#l.value?.barElement} @arcgisPropertyChange=${n=>this.#t.settingsPopoverOpen=n.target.open??!1}>${this._renderSettings()}</arcgis-view-popover>`})}`}_renderSettings(){let{autoDestroyDisabled:e,hideLabelsToggle:t,hideSnappingControls:o,hideTooltipsToggle:s,showSnappingControlsElementsHeader:r,useViewOptions:c,view:a,viewModel:l}=this;return v`<div class="editing-controls-panel"><arcgis-sketch-tooltip-controls .hideLabelsToggle=${t} .hideTooltipsToggle=${c||s} .directionMode=${l.valueOptions.directionMode} .labelsEnabled=${l.labelOptions.enabled} .tooltipsEnabled=${l.tooltipOptions.enabled} @arcgisPropertyChange=${g=>{g.stopPropagation();let{labelsEnabled:n,tooltipsEnabled:u,directionMode:m}=g.currentTarget,b=this.viewModel;switch(g.detail.name){case"labelsEnabled":b.labelOptions.enabled=n;break;case"directionMode":b.valueOptions.directionMode=m;break;case"tooltipsEnabled":b.tooltipOptions.enabled=u;break}}}></arcgis-sketch-tooltip-controls>${!c&&!o?v`<arcgis-snapping-controls .autoDestroyDisabled=${e} .view=${a} .visibleElements=${this.#e.snappingControlsElements} .snappingOptions=${l.snappingOptions} .showHeader=${r} @arcgisPropertyChange=${g=>g.stopPropagation()}></arcgis-snapping-controls>`:void 0}</div>`}_renderActionGroup({visible:e,commands:t,name:o}){if(!e||!t.length)return;let{defaultPriority:s,groupKind:r,overflowLabel:c,preferEndSlot:a}=Ge[o],l=(o==="geometrySimplification"?void 0:this._groupLayoutPriorityOverrides.get(o))??s,g=t.map(u=>this._renderCommand(u)),n=le(`more.${c}`,this._messages);switch(r){case"more-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-more-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;case"split-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-split-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-split-button></arcgis-toolbar-group>`;case"actions":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}>${g}</arcgis-toolbar-group>`}}_renderCommand({active:e,afterCreate:t,afterRemoved:o,afterUpdate:s,appearance:r,icon:c,disabled:a,id:l,kind:g,labelKey:n,labelParameters:u,loading:m,tooltipKey:b,iconFlipRTL:S,onClick:C,refKey:k,textEnabled:B,renderAsAction:de}){let{_messages:I,_refMap:pe,layout:D}=this,L=le(n,I),A=L===void 0?n:u?fe(L,u):L,z=I?.[b]??A,F=k?ce(pe,k,P):this.#n,K={afterCreate:t,afterRemoved:o,afterUpdate:s};return de?v`<arcgis-toolbar-action .active=${e} .appearance=${r} .disabled=${a} .icon=${c} .iconFlipRtl=${S} id=${l??G} .kind=${g} .loading=${m} .labelText=${D==="horizontal"?A:""} .textEnabled=${B} .tooltipText=${D==="horizontal"&&B?"":z} @arcgisToolbarItemSelected=${C} ${ae(K)} ${E(F)}></arcgis-toolbar-action>`:v`<arcgis-toolbar-item .active=${e} .disabled=${a} .icon=${c} id=${l??G} .iconFlipRtl=${S} .labelText=${A} .tooltipText=${z} @arcgisItemSelected=${C} ${ae(K)} ${E(F)}></arcgis-toolbar-item>`}};X("arcgis-sketch",V);return V},"intl","layers/GraphicsLayer","symbols/TextSymbol","core/reactiveUtils","widgets/Sketch/SketchViewModel","applications/Components/featureUtils","core/Accessor","core/accessorSupport/decorators","core/promiseUtils","widgets/Sketch/VisibleElements","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,b,c,d,e,f,g)
2
+ import{b as ne}from"./TN5C3MSL.js";import g from"./HP32VJJ5.js";import"./IZ46HAUJ.js";import{a as _}from"./POKO37D3.js";import f from"./5GBH7Q3I.js";import"./VJVKFKSG.js";import e from"./6FA3Z5YP.js";import{a as ie}from"./ZUNVTMPM.js";import d from"./RMPTTU44.js";import c from"./5IQ47S32.js";import b from"./5X7CUWTJ.js";import{d as Z,h as ee}from"./FMHP6L74.js";import"./PFPLJDX4.js";import a from"./JKDO7CJ5.js";import"./QUZTFUWM.js";import{f as Y}from"./K76CC5SU.js";import{D as H,E as q,M as j,N as P,O as E,P as J,Q,U as G,X,a as W,b as v,e as O,x as U,z as N}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{substitute:fe},Ce,we,{watch:y,on:Te,whenOnce:Se},Ee,{getOrCreateMapValue:ce,createReactiveMap:_e},Me,{property:p,subclass:ke},{ignoreAbortErrors:T},Pe,Le,,,,w,oe,{f:te},se])=>{var M=Q({defaultAssetPath:"https://js.arcgis.com/5.2.6/common-components/",hydratedAttribute:"hydrated"}),{customElement:He,getAssetPath:ye,setAssetPath:be}=M;M.t=void 0;M.o=void 0;M.c=void 0;M.r=void 0;var f={ForceCollapse:0,Default:1,Medium:100,High:200,Max:300,NeverCollapse:1e3};function le(i,e){let t=e;for(let o of i.split(".")){if(typeof t!="object"||t===null)return;t=Reflect.get(t,o)}return typeof t=="string"?t:void 0}var Ae=W`.editing-controls-panel{min-inline-size:100px;max-inline-size:400px;-webkit-user-select:none;user-select:none;pointer-events:initial;padding:var(--calcite-space-sm);arcgis-sketch-tooltip-controls+arcgis-snapping-controls{border-block-start:1px solid var(--calcite-color-border-3)}}:host{pointer-events:none}.toolbar-container{block-size:100%;min-block-size:0;min-inline-size:0}arcgis-toolbar-stack[layout=vertical]{block-size:100cqh;min-block-size:100%;max-block-size:100%}:host([data-intrinsic-toolbar-sizing]){min-inline-size:0;min-block-size:0;max-inline-size:100%;max-block-size:100%;arcgis-toolbar-stack[layout=vertical]{block-size:100%}}:host([data-intrinsic-toolbar-sizing][layout="vertical"]){display:grid;grid-template-columns:minmax(min-content,1fr);grid-template-rows:minmax(0,1fr);inline-size:fit-content;block-size:100%;.toolbar-container{block-size:auto}.toolbar-container,arcgis-view-popover{grid-area:1 / 1}}:host([data-intrinsic-toolbar-sizing][layout="vertical"][toolbar-kind="floating"]){block-size:auto}`,Oe={point:"pin",polyline:"line",polygon:"polygon",rectangle:"rectangle",circle:"circle",multipoint:"pins",mesh:"i3d-building",freehandPolygon:"freehand-area",freehandPolyline:"freehand",text:"text"},Ge={selectionTools:{defaultPriority:f.Default,groupKind:"split-button",overflowLabel:"selection"},selectionSet:{defaultPriority:f.High,groupKind:"actions"},createTools:{defaultPriority:f.High,groupKind:"more-button",overflowLabel:"drawing"},undoRedo:{defaultPriority:f.Medium,groupKind:"split-button",overflowLabel:"action",preferEndSlot:!0},settings:{defaultPriority:f.Max,groupKind:"more-button",overflowLabel:"action",preferEndSlot:!0},geometrySimplification:{defaultPriority:f.Default,groupKind:"actions",preferEndSlot:!0}},xe=Object.defineProperty,Re=Object.getOwnPropertyDescriptor,d=(i,e,t,o)=>{for(var s=o>1?void 0:o?Re(e,t):e,r=i.length-1,c;r>=0;r--)(c=i[r])&&(s=(o?c(e,t,s):c(s))||s);return o&&s&&xe(e,t,s),s},h=class extends Me{constructor(i){super(i),this._effectiveRenderStateCache=new Map,this._effectiveGeometrySimplificationInProgress=!1,this.visibleElements=new Pe,this.settingsPopoverOpen=!1,this.availableCreateTools=["point","polyline","freehandPolyline","polygon","freehandPolygon","rectangle","circle"]}initialize(){this.selectionViewModel??=new Le({persistSelection:!1}),this.addHandles([y(()=>this.sketchViewModel,(i,e)=>{i!==e&&this._effectiveRenderStateCache.clear()},{sync:!0}),se({getLoading:()=>this.sketchViewModel?.geometrySimplificationInProgress??!1,setEffectiveLoading:i=>{this._effectiveGeometrySimplificationInProgress=i}}),y(()=>this.view,i=>{this.selectionViewModel.view=i},{initial:!0,sync:!0}),y(()=>this.sketchViewModel?.layer,i=>this.selectionViewModel.sources=i?[i]:[],{initial:!0,sync:!0}),this.selectionViewModel.on("complete",({selection:i})=>{let{sketchViewModel:e}=this;if(i.length&&e){let{defaultUpdateOptions:t}=e,{tool:o}=t;this.update(i,{...t,tool:i.length>1&&o==="reshape"?"transform":o})}}),y(()=>this.selectionViewModel.activeOperation,i=>{i&&(this.sketchViewModel?.cancel(),this._activeCustomToolOptions=void 0)},{sync:!0}),Te(()=>this.sketchViewModel,"create",i=>{i.state==="complete"&&this.sketchViewModel?.creationMode!=="continuous"&&(this._activeCustomToolOptions=void 0)}),y(()=>this.visibleElements.settingsMenu,i=>{i||(this.settingsPopoverOpen=!1)},{sync:!0})])}destroy(){this._pendingCommandAbortController?.abort(),this.selectionViewModel.destroy(),this.sketchViewModel=void 0}get _isEffectiveRenderStateFrozen(){let{sketchViewModel:i}=this;return!!(i?.toolTransitionInProgress||i?.geometrySimplificationInProgress)}_getEffectiveValue(i,e){if(!this._isEffectiveRenderStateFrozen||!this._effectiveRenderStateCache.has(i)){let t=e();return this._effectiveRenderStateCache.set(i,t),t}return this._effectiveRenderStateCache.get(i)}get _state(){return this.sketchViewModel?.state??"disabled"}get test(){return{activeCustomToolOptions:this._activeCustomToolOptions,activeSelectionTool:this._activeSelectionTool,selectionViewModel:this.selectionViewModel}}get _activeSelectionTool(){switch(this.selectionViewModel.activeOperation?.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";default:return}}get _activePluginUniqueIds(){let i=this.sketchViewModel?.activePluginConfigurations.filter(e=>!e.hidden).map(e=>e.uniqueId);return new Set(i??[])}get _createToolActions(){let{sketchViewModel:i}=this;if(!i)return[];let e=i.effectiveAvailablePlugins,t=this.state==="disabled",o=this.visibleElements.createTools,s=this.activeTool,r=this._activeCustomToolOptions,c=r||!i.firstPluginWithSwappableLeaf?this._customToolOptions:[],a=i.rootPlugins,l=c?.map(n=>({active:n===r,disabled:t,icon:n.icon,labelKey:n.label,onClick:n===r?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n.toolName,n.createOptions,n)}))??[];if(r&&a)return[...this._pluginsToActions(a),...l];if(e?.length&&this.view?.type!=="3d")return[...this._pluginsToActions(e),...l];let g=this.view?.type==="3d";return[...this.availableCreateTools?.filter(n=>g&&n==="multipoint"?!1:n==="mesh"?!0:o[n])?.map(n=>({active:n===s,disabled:t,icon:Oe[n],labelKey:`draw.${n}`,onClick:n===s?()=>this._cancelActiveOperation():()=>this._activateLegacyDrawTool(n)}))??[],...l]}get _shouldShowBackButton(){let i=this.sketchViewModel?.firstPluginWithSwappableLeaf,e=this.sketchViewModel?.rootPlugins,t=this._activeCustomToolOptions;return!!(this.sketchViewModel?.multiplePluginsActive&&i&&e&&!(e.length<2&&e.includes(i)&&!this.visibleElements.singlePluginBackButton)&&!t)}get _selectionToolActions(){return this._shouldShowBackButton?[{active:!1,disabled:this.state==="disabled",icon:"chevron-left",iconFlipRTL:!0,labelKey:"back",onClick:()=>this._cancelActiveOperation()}]:this._selectionCommands}get _settingsActions(){let i=this._customActions?.get("settings-before"),e=this._customActions?.get("settings-after"),t=this.visibleElements.settingsMenu,o=[];return!i?.length&&!e?.length&&!t||(i&&o.push(...this._customActionsToSketchActions(i)),t&&o.push({icon:"gear",active:this.settingsPopoverOpen,disabled:this.state==="disabled",labelKey:"settings.heading",tooltipKey:"settings.heading",refKey:"settings",onClick:()=>this.toggleSettingsPopover()}),e&&o.push(...this._customActionsToSketchActions(e))),o}get _activeTool(){let i=this.selectionViewModel.activeOperation;if(i)switch(i.toolName){case"lasso":return"lasso-selection";case"rectangle":return"rectangle-selection";case"default":return"custom-selection"}if(!this.sketchViewModel)return;let{availableCreateTools:e}=this,{activeTool:t,activeCreateToolDrawMode:o}=this.sketchViewModel;return t==="polygon"&&o==="freehand"&&e?.includes("freehandPolygon")?"freehandPolygon":t==="polyline"&&o==="freehand"&&e?.includes("freehandPolyline")?"freehandPolyline":t??void 0}get _selectionCommands(){let{state:i,visibleElements:e,_activeSelectionTool:t,_customActions:o}=this,s=this.state==="disabled",r=[];this.sketchViewModel?.updateOnGraphicClick!==!1&&r.push({active:i==="ready"&&this._activeSelectionTool==null,disabled:s,icon:"cursor",labelKey:"selectFeature",onClick:()=>this._activateDefaultSelectionTool()});let c=e.selectionTools;c["rectangle-selection"]&&r.push({active:t==="rectangle-selection",disabled:s,icon:"cursor-marquee",labelKey:"rectangleSelection",onClick:()=>this._activateSelectionTool("rectangle-selection")}),c["lasso-selection"]&&r.push({active:t==="lasso-selection",disabled:s,icon:"lasso-select",labelKey:"lassoSelection",onClick:()=>this._activateSelectionTool("lasso-selection")});let a=o?.get("selection-toolbar");return a&&r.push(...this._customActionsToSketchActions(a)),r}get _selectionSetActions(){let i=this.sketchViewModel?.updateGraphics.length??0;if(!i)return[];let e=this.state==="disabled",t=[],o=this._customActions?.get("before-selection-set"),s=this._customActions?.get("after-selection-set");return this.visibleElements.selectionCountLabel&&t.push({active:!1,appearance:"outline",disabled:e,icon:"selection-x",kind:"brand",labelKey:"deselectCount",labelParameters:{count:i},textEnabled:!0,renderAsAction:!0,onClick:()=>this._cancelSketchOperation()}),o&&t.push(...this._customActionsToSketchActions(o)),this.visibleElements.duplicateButton&&t.push({active:!1,disabled:e,icon:"copy",renderAsAction:!0,labelKey:i>1?"duplicateFeatures":"duplicateFeature",onClick:()=>this._duplicate()}),this.visibleElements.deleteButton&&t.push({active:!1,disabled:e,icon:"trash",kind:"danger",renderAsAction:!0,labelKey:i>1?"deleteFeatures":"deleteFeature",onClick:()=>this._delete()}),s&&t.push(...this._customActionsToSketchActions(s)),t}get _undoRedoActions(){return this.visibleElements.undoRedoMenu?[{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canUndo(),icon:"undo",labelKey:"undo",iconFlipRTL:!0,onClick:()=>this._undo()},{active:!1,disabled:this.state==="disabled"||!this.sketchViewModel?.canRedo(),icon:"redo",labelKey:"redo",iconFlipRTL:!0,onClick:()=>this._redo()}]:[]}get state(){return this._getEffectiveValue("state",()=>this._state)}get activeTool(){return this._getEffectiveValue("activeTool",()=>this._activeTool)}get activePluginIds(){return this._getEffectiveValue("activePluginId",()=>this._activePluginUniqueIds)}get groupedActions(){let i=this._getEffectiveValue("availableCommandGroups",()=>[["selectionTools",this._selectionToolActions],["createTools",this._createToolActions],["undoRedo",this._undoRedoActions],["settings",this._settingsActions],["selectionSet",this._selectionSetActions]].map(([t,o])=>({name:t,commands:o,visible:o.length>0}))),e=this._effectiveGeometrySimplificationInProgress?i.map(t=>({...t,commands:t.commands.map(o=>({...o,disabled:!0}))})):i;return!this.visibleElements.geometrySimplificationActivityIndicator||!this._effectiveGeometrySimplificationInProgress?e:[...e,{name:"geometrySimplification",commands:[{active:!1,appearance:"transparent",disabled:!0,kind:"warning",labelKey:"processing",loading:!0,onClick:()=>{},renderAsAction:!0}],visible:!0}]}async create(i,e){await this._executeWhenReady(async()=>{this.cancelAll();let t=this.sketchViewModel;t&&await T(t.create(i,e))})}async _executeWhenReady(i){this._pendingCommandAbortController?.abort();let e=new AbortController;this._pendingCommandAbortController=e;try{await T((async()=>{this.sketchViewModel?.geometrySimplificationInProgress&&await Se(()=>!this.sketchViewModel?.geometrySimplificationInProgress,e.signal),e.signal.aborted||await i()})())}finally{this._pendingCommandAbortController===e&&(this._pendingCommandAbortController=void 0)}}toggleSettingsPopover(){this.settingsPopoverOpen=!this.settingsPopoverOpen}setCustomTools(i,e){this._customToolOptions=i??void 0;let t=this._activeCustomToolOptions;if(t){let o=this._customToolOptions?.find(s=>s.toolKey===t.toolKey);o?this._activeCustomToolOptions=o:this.cancelAll()}if(e?.length){let o=new Map;for(let s of e)ce(o,s.position,()=>[]).push(s);this._customActions=o}else this._customActions=void 0}cancelAll(){this._pendingCommandAbortController?.abort(),this._cancelSupportingOperations(),this.sketchViewModel?.cancel()}async update(i,e){await this._executeWhenReady(async()=>{let t=this.sketchViewModel;t&&await T(t.update(i,e))})}_activateDefaultSelectionTool(){this._executeWhenReady(()=>{this.cancelAll(),this.view?.focus()})}_cancelActiveOperation(){this._executeWhenReady(()=>this.cancelAll())}_cancelSketchOperation(){this._executeWhenReady(()=>this.sketchViewModel?.cancel())}_cancelSupportingOperations(){this.selectionViewModel.cancel(),this._activeCustomToolOptions=void 0}_activatePlugin(i){this._executeWhenReady(()=>{let e=this._activeCustomToolOptions!=null;this._cancelSupportingOperations();let t=this.sketchViewModel;if(t){if(e){t.cancel(),T(t.create(i));return}t.firstPluginWithSwappableLeaf?(t.replaceLeaf(i),this.view?.focus()):T(t.create(i))}})}_activateLegacyDrawTool(i,e,t){this._executeWhenReady(()=>{this._cancelSupportingOperations();let o=this.sketchViewModel;o&&(this._activeCustomToolOptions=t,T(o.create(i,e)))})}_activateSelectionTool(i){this._executeWhenReady(()=>{if(this._activeSelectionTool===i){this.selectionViewModel.cancel();return}this.cancelAll();let e={createTool:i==="lasso-selection"?"polygon":"rectangle",...i==="lasso-selection"?{mode:"hybrid",toolName:"lasso"}:{toolName:"rectangle"},type:"replace",selectOnComplete:!0};this.selectionViewModel.activate(e)&&this.view?.focus()})}_delete(){this._executeWhenReady(()=>this.sketchViewModel?.delete())}_duplicate(){this._executeWhenReady(()=>{this.sketchViewModel?.duplicate()})}_executeCustomAction(i){this._executeWhenReady(()=>i.onclick?.())}_redo(){this._executeWhenReady(()=>{this.sketchViewModel?.redo()})}_undo(){this._executeWhenReady(()=>{this.sketchViewModel?.undo()})}_customActionsToSketchActions(i){let e=this.state==="disabled";return i.map(t=>({active:t.active??!1,afterCreate:t.afterCreate,afterRemoved:t.afterRemoved,afterUpdate:t.afterUpdate,disabled:e||(t.disabled??!1),icon:t.icon,iconFlipRTL:t.flipRTL,id:t.id,labelKey:t.text,onClick:()=>this._executeCustomAction(t)}))}_pluginsToActions(i){let e=this.activePluginIds,t=this._activeCustomToolOptions,o=this.state==="disabled";return i.map(s=>({active:(e?.has(s.uniqueId)??!1)&&!t,icon:s.icon,disabled:o,labelKey:`digitizers.${s.localizationKey}`,onClick:()=>this._activatePlugin([s])}))}};d([p()],h.prototype,"_isEffectiveRenderStateFrozen",1);d([p()],h.prototype,"_effectiveGeometrySimplificationInProgress",2);d([p()],h.prototype,"_state",1);d([p()],h.prototype,"_customToolOptions",2);d([p()],h.prototype,"_activeCustomToolOptions",2);d([p()],h.prototype,"_customActions",2);d([p()],h.prototype,"selectionViewModel",2);d([p()],h.prototype,"_activeSelectionTool",1);d([p()],h.prototype,"_activePluginUniqueIds",1);d([p()],h.prototype,"_createToolActions",1);d([p()],h.prototype,"_shouldShowBackButton",1);d([p()],h.prototype,"_selectionToolActions",1);d([p()],h.prototype,"_settingsActions",1);d([p()],h.prototype,"_activeTool",1);d([p()],h.prototype,"_selectionCommands",1);d([p()],h.prototype,"_selectionSetActions",1);d([p()],h.prototype,"_undoRedoActions",1);d([p()],h.prototype,"sketchViewModel",2);d([p()],h.prototype,"visibleElements",2);d([p()],h.prototype,"view",2);d([p()],h.prototype,"settingsPopoverOpen",2);d([p()],h.prototype,"availableCreateTools",2);d([p()],h.prototype,"state",1);d([p()],h.prototype,"activeTool",1);d([p()],h.prototype,"activePluginIds",1);d([p()],h.prototype,"groupedActions",1);h=d([ke("components.sketch.SketchComponentViewModel")],h);var R=class extends j{#t;#e=!1;#i;constructor(e){if(super(e),e.type!==H.ELEMENT)throw new Error("nodeHooks() can only be used on elements")}render(e){return O}update(e,[t]){let o=e.element;if(!(o instanceof HTMLElement))throw new TypeError("nodeHooks() can only be used on HTMLElements");let s=this.#e?t.afterUpdate:t.afterCreate;return this.#t=o,this.#e=!0,this.#i=t,queueMicrotask(()=>{o.isConnected&&s?.(o)}),O}disconnected(){let e=this.#t,t=this.#i?.afterRemoved;!e||!t||queueMicrotask(()=>{e.isConnected||te(()=>t(e),{timeout:16})})}},ae=q(R),$e=new Set(["arcgis-map","arcgis-scene"]),Ve=8,$=class extends N{constructor(e){super(e),this.#t=new MutationObserver(()=>this.#c()),this.#e=new ResizeObserver(()=>this.#v()),this.#i=new ResizeObserver(([t])=>{if(!t)return;let o=this.component.layout==="horizontal"?t.contentRect.height:t.contentRect.width;o!==this.#s&&(this.#s=o,this.#v())}),this.#h=[],this.ref=t=>{this.#o!==t&&(this.#o=t,this.#a=void 0,this.#r=void 0,this.#c())},this.#u=()=>this.#c(),this.exports=void 0,e.listenOn(window,"resize",()=>this.#g()),this.onConnected(()=>this.#g()),this.onUpdated(()=>{(this.#d!==this.component.layout||this.#y!==this.component.toolbarKind)&&this.#c()}),this.onDisconnected(()=>this.#C()),this.onLifecycle(()=>y(()=>this.component.view?.attributionHeight,()=>{this.#g()},{initial:!0}))}#t;#e;#i;#l;#s;#n;#h;#m;#o;#a;#r;#d;#y;#p;#g(){queueMicrotask(()=>{this.component.el.isConnected&&this.#c()})}#c(){this.#y=this.component.toolbarKind;let e=this.#b();if(this.component.el.toggleAttribute("data-intrinsic-toolbar-sizing",!e),!e){this.#f(),this.#C();return}this.#w(e.toolbar),this.#T(e),this.#S(e),this.#v(e)}#b(){let e=this.component.el,t=e.parentElement,o=this.#o,s=e.assignedSlot;if(!t||!$e.has(t.localName)||!o||!s?.parentElement)return;let r=getComputedStyle(t).direction==="rtl"?"rtl":"ltr",c=he(e.slot,r);if(!c)return;let a=Array.from(t.children).filter(l=>l instanceof HTMLElement&&l.localName!=="arcgis-sketch");return{assignedSlot:s,content:a,direction:r,parent:t,position:c,toolbar:o}}#u;#w(e){this.#d!==this.component.layout&&(this.#s=void 0,this.#d=this.component.layout),this.#l!==e&&(this.#i.disconnect(),this.#l=e,this.#s=void 0,this.#i.observe(e))}#T(e){let t=e.assignedSlot;this.#n!==t&&(this.#n?.removeEventListener("slotchange",this.#u),this.#n=t,t.addEventListener("slotchange",this.#u)),this.#m!==e.parent&&(this.#t.disconnect(),this.#p?.(),this.#m=e.parent,this.#p=Y(e.parent,["dir"],()=>{this.#g()}),this.#t.observe(e.parent,{childList:!0,subtree:!1}))}#S(e){let t=[e.parent,...e.content];De(this.#h,t)||(this.#e.disconnect(),t.forEach(o=>this.#e.observe(o)),this.#h=t)}#v(e=this.#b()){if(!e){this.#f();return}let t=this.component.layout,o=e.parent.getBoundingClientRect(),s=Be({content:Ie(e),gap:Ve,layout:t,position:e.position,sameSlotReserve:ze(e.assignedSlot,this.component.el,t,e.assignedSlot.parentElement),toolbarBounds:e.toolbar.getBoundingClientRect(),viewBounds:o}),r=s;if(e.toolbar.toolbarKind==="floating"){let c=getComputedStyle(e.assignedSlot.parentElement.parentElement),a=Math.max(Number.parseFloat(c.marginLeft),Number.parseFloat(c.marginRight)),l=t==="horizontal"?window.innerWidth:window.innerHeight,g=t==="horizontal"?o.width:o.height,n=t==="vertical"?this.component.view?.attributionHeight??0:0;r=Math.max(0,Math.min(s,g-2*a-n,l-2*a))}this.#E(e.toolbar,t,s,r)}#E(e,t,o,s){o===this.#a&&s===e.allocatedLength&&t===this.#r||(this.#a=o,this.#r=t,e.allocatedLength=s,t==="horizontal"?(e.style.height="",e.style.maxHeight="",e.style.maxWidth=`${o}px`,e.style.width="fit-content"):(e.style.height="fit-content",e.style.maxHeight=`${o}px`,e.style.maxWidth="",e.style.width=""))}#f(){this.#o&&(this.#o.style.maxHeight="",this.#o.style.maxWidth="",this.#o.style.height="",this.#o.style.width="",this.#o.allocatedLength=void 0,this.#a=void 0,this.#r=void 0)}#C(){this.#t.disconnect(),this.#p?.(),this.#p=void 0,this.#e.disconnect(),this.#i.disconnect(),this.#l=void 0,this.#s=void 0,this.#h=[],this.#n?.removeEventListener("slotchange",this.#u),this.#n=void 0,this.#a=void 0,this.#r=void 0,this.#d=void 0,this.#m=void 0}};function Be({content:i,gap:e,layout:t,position:o,sameSlotReserve:s,toolbarBounds:r,viewBounds:c}){let a=x(c,t),l=x(r,t),g=re(o,t),n=g?l.start-a.start:a.end-l.end,u=0,m=!1;for(let S of i){if(re(S.position,t)===g)continue;let C=x(S.bounds,t);if(!(C.crossStart<l.crossEnd&&C.crossEnd>l.crossStart))continue;let k=g?a.end-C.start:C.end-a.start;u=Math.max(u,k),m=!0}let b=m?e:0;return Math.max(0,a.length-Math.max(0,n)-s-u-b)}function x(i,e){return e==="horizontal"?{start:i.left,end:i.right,length:i.width,crossStart:i.top,crossEnd:i.bottom}:{start:i.top,end:i.bottom,length:i.height,crossStart:i.left,crossEnd:i.right}}function re(i,e){return e==="horizontal"?i.endsWith("left"):i.startsWith("top")}function Ie(i){return i.content.flatMap(e=>{if(e.assignedSlot===i.assignedSlot)return[];let t=he(e.slot,i.direction);return t?[{bounds:e.getBoundingClientRect(),position:t}]:[]})}function De(i,e){return i.length===e.length&&i.every((t,o)=>t===e[o])}function ze(i,e,t,o){let s=getComputedStyle(o).flexDirection;if(!(t==="horizontal"?s.startsWith("row"):s.startsWith("column")))return 0;let r=i.assignedElements().filter(g=>g instanceof HTMLElement),c=r.indexOf(e);if(c<0)return 0;let a=getComputedStyle(e),l=s==="row"?Number.parseFloat(a.marginRight):s==="row-reverse"?Number.parseFloat(a.marginLeft):s==="column"?Number.parseFloat(a.marginBottom):Number.parseFloat(a.marginTop);return r.slice(c+1).reduce((g,n)=>{let u=n.getBoundingClientRect(),m=getComputedStyle(n),b=t==="horizontal"?u.width+Number.parseFloat(m.marginLeft)+Number.parseFloat(m.marginRight):u.height+Number.parseFloat(m.marginTop)+Number.parseFloat(m.marginBottom);return g+b},l)}function he(i,e){let[t,o]=i.split("-");if(t!=="bottom"&&t!=="top")return;let s=o==="start"?e==="ltr"?"left":"right":o==="end"?e==="ltr"?"right":"left":o;return s==="left"||s==="right"?`${t}-${s}`:void 0}var Fe=["bottom-end","bottom-start","bottom-left","bottom-right","top-end","top-start","top-left","top-right"],Ke=new Set(Fe),We=oe(i=>new Ee({...i,cancelUpdateOnClickAway:!0,creationMode:"continuous",textSymbol:new we({text:"text"}),useLegacyCreateTools:!1})),V=class extends J{constructor(){super(),this.#t=new h,this.#l=P(),this.#s=new $(this),this.#n=P(),this._defaultGraphicsLayer=null,this._messages=ie(),this.test={componentViewModel:this.#t},this._groupLayoutPriorityOverrides=new Map,this._contextualToolLocation="separate",this._refMap=_e(),this.viewModel=We(this),this.view=this.viewModel.view,this.autoDestroyDisabled=!1,this.createGraphic=this.viewModel.createGraphic,this.creationMode=this.viewModel.creationMode,this.defaultCreateOptions=this.viewModel.defaultCreateOptions,this.defaultGraphicsLayerDisabled=!1,this.defaultUpdateOptions=this.viewModel.defaultUpdateOptions,this.geometrySimplificationInProgress=this.viewModel.geometrySimplificationInProgress,this.icon="pencil",this.label=this._messages?.componentLabel,this.labelOptions=this.viewModel.labelOptions,this.layer=this.viewModel.layer,this.layout="horizontal",this.pointSymbol=this.viewModel.pointSymbol,this.polygonSymbol=this.viewModel.polygonSymbol,this.polylineSymbol=this.viewModel.polylineSymbol,this.activeFillSymbol=this.viewModel.activeFillSymbol,this.activeLineSymbol=this.viewModel.activeLineSymbol,this.activeVertexSymbol=this.viewModel.activeVertexSymbol,this.activeCreateToolDrawMode=this.viewModel.activeCreateToolDrawMode,this.visualScale="m",this.snappingOptions=this.viewModel.snappingOptions,this.textSymbol=this.viewModel.textSymbol,this.toolbarKind="floating",this.tooltipOptions=this.viewModel.tooltipOptions,this.useViewOptions=this.viewModel.useViewOptions,this.valueOptions=this.viewModel.valueOptions,this.useLegacyCreateTools=this.viewModel.useLegacyCreateTools,this.updateOnGraphicClickDisabled=this.viewModel.updateOnGraphicClick,this.updateGraphics=this.viewModel.updateGraphics,this.activeTooltip=this.viewModel.activeTooltip,this.arcgisCreate=w(()=>this.viewModel,"create"),this.arcgisDelete=w(()=>this.viewModel,"delete"),this.arcgisDuplicate=w(()=>this.viewModel,"duplicate"),this.arcgisPropertyChange=ee()("activeTool","geometrySimplificationInProgress","state"),this.arcgisReady=U(),this.arcgisRedo=w(()=>this.viewModel,"redo"),this.arcgisUndo=w(()=>this.viewModel,"undo"),this.arcgisUpdate=w(()=>this.viewModel,"update"),Z(["slot"],()=>{this.requestUpdate()}),this.manager.onLifecycle(()=>[y(()=>this.el.view?.map,(e,t)=>{let o=this._defaultGraphicsLayer;o&&(t?.allLayers.includes(o)&&t.remove(o),o&&!e?.allLayers.includes(o)&&e?.add(o))}),y(()=>this.el.view,e=>{this.viewModel.view=e,this.#t.view=e??void 0},{initial:!0}),y(()=>this.viewModel,e=>{this.#t.sketchViewModel=e,this.viewModel.pluginManager.sketch=this},{initial:!0}),y(()=>this.#t.state,(e,t)=>{this.requestUpdate("state",t)},{initial:!0}),y(()=>this.#t.activeTool,()=>this.arcgisPropertyChange.emit({name:"activeTool"}),{sync:!0})]),this.manager.onDestroy(()=>{this._defaultGraphicsLayer&&this.el.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.el.view?.map?.remove(this._defaultGraphicsLayer),this._defaultGraphicsLayer?.destroy(),this._defaultGraphicsLayer=null,this.#t.destroy()})}static{this.properties={_groupLayoutPriorityOverrides:16,_contextualToolLocation:16,_refMap:16,viewModel:0,view:0,activeTool:32,autoDestroyDisabled:5,visibleElements:0,availableCreateTools:0,createGraphic:32,creationMode:1,defaultCreateOptions:0,defaultGraphicsLayerDisabled:5,defaultUpdateOptions:0,geometrySimplificationInProgress:36,hideCreateToolsCircle:5,hideCreateToolsMultipoint:5,hideCreateToolsPoint:5,hideCreateToolsPolygon:5,hideCreateToolsPolyline:5,hideCreateToolsRectangle:5,hideDuplicateButton:5,hideDeleteButton:5,hideSelectionCountLabel:5,hideLabelsToggle:5,hideSelectionToolsLassoSelection:5,hideSelectionToolsRectangleSelection:5,hideSettingsMenu:5,hideSinglePluginBackButton:5,hideSnappingControls:5,hideSnappingControlsElementsEnabledToggle:5,hideSnappingControlsElementsFeatureEnabledToggle:5,hideSnappingControlsElementsLayerList:5,hideSnappingControlsElementsSelfEnabledToggle:5,hideSnappingControlsElementsGridEnabledToggle:5,hideSnappingControlsElementsGridControls:5,hideSnappingControlsElementsGridControlsElementsColorSelection:5,hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle:5,hideSnappingControlsElementsGridControlsElementsLineIntervalInput:5,hideSnappingControlsElementsGridControlsElementsNumericInputs:5,hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning:5,hideSnappingControlsElementsGridControlsElementsPlacementButtons:5,hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle:5,hideTooltipsToggle:5,hideUndoRedoMenu:5,icon:1,label:1,labelOptions:0,layer:0,layout:3,pointSymbol:0,polygonSymbol:0,polylineSymbol:0,activeFillSymbol:0,activeLineSymbol:0,activeVertexSymbol:0,activeCreateToolDrawMode:1,referenceElement:1,relativePosition:1,scale:1,visualScale:1,showSnappingControlsElementsHeader:5,showCreateToolsFreehandPolygon:5,showCreateToolsFreehandPolyline:5,showCreateToolsText:5,hideGeometrySimplificationActivityIndicator:5,snappingOptions:0,state:32,textSymbol:0,toolbarKind:3,tooltipOptions:0,useViewOptions:5,valueOptions:0,useLegacyCreateTools:5,updateOnGraphicClickDisabled:5,cancelUpdateOnClickAwayDisabled:5,updateGraphics:32,activeTooltip:0}}static{this.styles=Ae}#t;get#e(){return this.#t.visibleElements}#i;#l;#s;#n;get activeTool(){return this.#t.activeTool}get visibleElements(){return this.#t.visibleElements}set visibleElements(e){this.#t.visibleElements=e}get availableCreateTools(){return this.#t.availableCreateTools}set availableCreateTools(e){this.#t.availableCreateTools=e}get hideCreateToolsCircle(){return!this.#e.createTools.circle}set hideCreateToolsCircle(e){this.#e.createTools.circle=!e}get hideCreateToolsMultipoint(){return!this.#e.createTools.multipoint}set hideCreateToolsMultipoint(e){this.#e.createTools.multipoint=!e}get hideCreateToolsPoint(){return!this.#e.createTools.point}set hideCreateToolsPoint(e){this.#e.createTools.point=!e}get hideCreateToolsPolygon(){return!this.#e.createTools.polygon}set hideCreateToolsPolygon(e){this.#e.createTools.polygon=!e}get hideCreateToolsPolyline(){return!this.#e.createTools.polyline}set hideCreateToolsPolyline(e){this.#e.createTools.polyline=!e}get hideCreateToolsRectangle(){return!this.#e.createTools.rectangle}set hideCreateToolsRectangle(e){this.#e.createTools.rectangle=!e}get hideDuplicateButton(){return!this.#e.duplicateButton}set hideDuplicateButton(e){this.#e.duplicateButton=!e}get hideDeleteButton(){return!this.#e.deleteButton}set hideDeleteButton(e){this.#e.deleteButton=!e}get hideSelectionCountLabel(){return!this.#e.selectionCountLabel}set hideSelectionCountLabel(e){this.#e.selectionCountLabel=!e}get hideLabelsToggle(){return!this.#e.labelsToggle}set hideLabelsToggle(e){this.#e.labelsToggle=!e}get hideSelectionToolsLassoSelection(){return!this.#e.selectionTools["lasso-selection"]}set hideSelectionToolsLassoSelection(e){this.#e.selectionTools["lasso-selection"]=!e}get hideSelectionToolsRectangleSelection(){return!this.#e.selectionTools["rectangle-selection"]}set hideSelectionToolsRectangleSelection(e){this.#e.selectionTools["rectangle-selection"]=!e}get hideSettingsMenu(){return!this.#e.settingsMenu}set hideSettingsMenu(e){this.#e.settingsMenu=!e}get hideSinglePluginBackButton(){return!this.#e.singlePluginBackButton}set hideSinglePluginBackButton(e){this.#e.singlePluginBackButton=!e}get hideSnappingControls(){return!this.#e.snappingControls}set hideSnappingControls(e){this.#e.snappingControls=!e}get hideSnappingControlsElementsEnabledToggle(){return!this.#e.snappingControlsElements.enabledToggle}set hideSnappingControlsElementsEnabledToggle(e){this.#e.snappingControlsElements.enabledToggle=!e}get hideSnappingControlsElementsFeatureEnabledToggle(){return!this.#e.snappingControlsElements.featureEnabledToggle}set hideSnappingControlsElementsFeatureEnabledToggle(e){this.#e.snappingControlsElements.featureEnabledToggle=!e}get hideSnappingControlsElementsLayerList(){return!this.#e.snappingControlsElements.layerList}set hideSnappingControlsElementsLayerList(e){this.#e.snappingControlsElements.layerList=!e}get hideSnappingControlsElementsSelfEnabledToggle(){return!this.#e.snappingControlsElements.selfEnabledToggle}set hideSnappingControlsElementsSelfEnabledToggle(e){this.#e.snappingControlsElements.selfEnabledToggle=!e}get hideSnappingControlsElementsGridEnabledToggle(){return!this.#e.snappingControlsElements.gridEnabledToggle}set hideSnappingControlsElementsGridEnabledToggle(e){this.#e.snappingControlsElements.gridEnabledToggle=!e}get hideSnappingControlsElementsGridControls(){return!this.#e.snappingControlsElements.gridControls}set hideSnappingControlsElementsGridControls(e){this.#e.snappingControlsElements.gridControls=!e}get hideSnappingControlsElementsGridControlsElementsColorSelection(){return!this.#e.snappingControlsElements.gridControlsElements.colorSelection}set hideSnappingControlsElementsGridControlsElementsColorSelection(e){this.#e.snappingControlsElements.gridControlsElements.colorSelection=!e}get hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(){return!this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle}set hideSnappingControlsElementsGridControlsElementsDynamicScaleToggle(e){this.#e.snappingControlsElements.gridControlsElements.dynamicScaleToggle=!e}get hideSnappingControlsElementsGridControlsElementsLineIntervalInput(){return!this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput}set hideSnappingControlsElementsGridControlsElementsLineIntervalInput(e){this.#e.snappingControlsElements.gridControlsElements.lineIntervalInput=!e}get hideSnappingControlsElementsGridControlsElementsNumericInputs(){return!this.#e.snappingControlsElements.gridControlsElements.numericInputs}set hideSnappingControlsElementsGridControlsElementsNumericInputs(e){this.#e.snappingControlsElements.gridControlsElements.numericInputs=!e}get hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(){return!this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning}set hideSnappingControlsElementsGridControlsElementsOutOfScaleWarning(e){this.#e.snappingControlsElements.gridControlsElements.outOfScaleWarning=!e}get hideSnappingControlsElementsGridControlsElementsPlacementButtons(){return!this.#e.snappingControlsElements.gridControlsElements.placementButtons}set hideSnappingControlsElementsGridControlsElementsPlacementButtons(e){this.#e.snappingControlsElements.gridControlsElements.placementButtons=!e}get hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(){return!this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle}set hideSnappingControlsElementsGridControlsElementsRotateWithMapToggle(e){this.#e.snappingControlsElements.gridControlsElements.rotateWithMapToggle=!e}get hideTooltipsToggle(){return!this.#e.tooltipsToggle}set hideTooltipsToggle(e){this.#e.tooltipsToggle=!e}get hideUndoRedoMenu(){return!this.#e.undoRedoMenu}set hideUndoRedoMenu(e){this.#e.undoRedoMenu=!e}get relativePosition(){let e=this.el.slot||this.el.closest("arcgis-expand")?.slot||"";return this.#i??(Ke.has(e)?e:ne.topRight)}set relativePosition(e){this.#i=e}get scale(){return this.visualScale}set scale(e){this.visualScale=e}get showSnappingControlsElementsHeader(){return this.#e.snappingControlsElements.header}set showSnappingControlsElementsHeader(e){this.#e.snappingControlsElements.header=e}get showCreateToolsFreehandPolygon(){return this.#e.createTools.freehandPolygon}set showCreateToolsFreehandPolygon(e){this.#e.createTools.freehandPolygon=e}get showCreateToolsFreehandPolyline(){return this.#e.createTools.freehandPolyline}set showCreateToolsFreehandPolyline(e){this.#e.createTools.freehandPolyline=e}get showCreateToolsText(){return this.#e.createTools.text}set showCreateToolsText(e){this.#e.createTools.text=e}get hideGeometrySimplificationActivityIndicator(){return!this.#e.geometrySimplificationActivityIndicator}set hideGeometrySimplificationActivityIndicator(e){this.#e.geometrySimplificationActivityIndicator=!e}get state(){return this.#t.state}get cancelUpdateOnClickAwayDisabled(){return!this.viewModel.cancelUpdateOnClickAway}set cancelUpdateOnClickAwayDisabled(e){this.viewModel.cancelUpdateOnClickAway=!e}async addGraphic(e){this.viewModel.addGraphic(e)}async addGraphics(e){this.viewModel.addGraphics(e)}async cancel(){this.#t.cancelAll()}async complete(){this.viewModel.complete()}async create(e,t){await this.#t.create(e,t)}async delete(){this.viewModel.delete()}async destroy(){await this.manager.destroy()}async dismissFloatingElements(){this.#t.settingsPopoverOpen=!1}async duplicate(){this.viewModel.duplicate()}async hasGraphic(e){return this.viewModel.hasGraphic(e)}async removeAllGraphics(){this.viewModel.removeAllGraphics()}async removeGraphic(e){this.viewModel.removeGraphic(e)}async removeGraphics(e){this.viewModel.removeGraphics(e)}async redo(){this.viewModel.redo()}async canRedo(){return this.viewModel.canRedo()}async setContextualToolLocation(e){this._contextualToolLocation=e}async setCustomTools(e,t){this.#t.setCustomTools(e,t)}async setGroupCollapsePriorities(e){this._groupLayoutPriorityOverrides=e||new Map}async triggerUpdate(e,t){await this.#t.update(e,t)}async place(e){this.viewModel.place(e)}async undo(){this.#t.sketchViewModel?.undo()}async canUndo(){return this.viewModel.canUndo()}connectedCallback(){super.connectedCallback(),this.defaultGraphicsLayerDisabled||(this._defaultGraphicsLayer?.destroyed&&(this._defaultGraphicsLayer=null),this._defaultGraphicsLayer??=new Ce({title:"Sketch Layer"}),this.layer=this._defaultGraphicsLayer,this.view?.map?.add(this.layer),this.viewModel.layer=this._defaultGraphicsLayer)}disconnectedCallback(){this._defaultGraphicsLayer&&this.view?.map?.allLayers.includes(this._defaultGraphicsLayer)&&this.view?.map?.remove(this._defaultGraphicsLayer),this.cancel(),super.disconnectedCallback()}render(){let e=this._refMap.get("settings")?.value?.actionElement,t=this.#t.groupedActions,{visualScale:o,layout:s,toolbarKind:r,relativePosition:c,_contextualToolLocation:a}=this,l=t.find(({name:n})=>n==="selectionSet"),g=t.filter(({name:n})=>n!=="selectionSet");return v`<div class="toolbar-container"><arcgis-toolbar-stack .layout=${s} .toolbarKind=${r} .relativePosition=${c} .scale=${o} tooltip-appearance=calcite ${E(this.#s.ref)}><arcgis-toolbar ${E(this.#l)}>${_({hidden:!l?.visible||a!=="inline",children:this._renderActionGroup(l)})}${g.map(n=>this._renderActionGroup(n))}${_({hidden:!l?.visible||a!=="inline-end",children:this._renderActionGroup(l)})}</arcgis-toolbar>${_({hidden:!l?.visible||a!=="separate",children:v`<arcgis-toolbar>${this._renderActionGroup(l)}</arcgis-toolbar>`})}</arcgis-toolbar-stack></div>${_({hidden:this.hideSettingsMenu,children:v`<arcgis-view-popover .open=${this.#t.settingsPopoverOpen} .heading=${this._messages.settings?.heading} .anchorElement=${e} .visualScale=${o} .actionBarElement=${this.#l.value?.barElement} @arcgisPropertyChange=${n=>this.#t.settingsPopoverOpen=n.target.open??!1}>${this._renderSettings()}</arcgis-view-popover>`})}`}_renderSettings(){let{autoDestroyDisabled:e,hideLabelsToggle:t,hideSnappingControls:o,hideTooltipsToggle:s,showSnappingControlsElementsHeader:r,useViewOptions:c,view:a,viewModel:l}=this;return v`<div class="editing-controls-panel"><arcgis-sketch-tooltip-controls .hideLabelsToggle=${t} .hideTooltipsToggle=${c||s} .directionMode=${l.valueOptions.directionMode} .labelsEnabled=${l.labelOptions.enabled} .tooltipsEnabled=${l.tooltipOptions.enabled} @arcgisPropertyChange=${g=>{g.stopPropagation();let{labelsEnabled:n,tooltipsEnabled:u,directionMode:m}=g.currentTarget,b=this.viewModel;switch(g.detail.name){case"labelsEnabled":b.labelOptions.enabled=n;break;case"directionMode":b.valueOptions.directionMode=m;break;case"tooltipsEnabled":b.tooltipOptions.enabled=u;break}}}></arcgis-sketch-tooltip-controls>${!c&&!o?v`<arcgis-snapping-controls .autoDestroyDisabled=${e} .view=${a} .visibleElements=${this.#e.snappingControlsElements} .snappingOptions=${l.snappingOptions} .showHeader=${r} @arcgisPropertyChange=${g=>g.stopPropagation()}></arcgis-snapping-controls>`:void 0}</div>`}_renderActionGroup({visible:e,commands:t,name:o}){if(!e||!t.length)return;let{defaultPriority:s,groupKind:r,overflowLabel:c,preferEndSlot:a}=Ge[o],l=(o==="geometrySimplification"?void 0:this._groupLayoutPriorityOverrides.get(o))??s,g=t.map(u=>this._renderCommand(u)),n=le(`more.${c}`,this._messages);switch(r){case"more-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-more-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-more-button></arcgis-toolbar-group>`;case"split-button":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}><arcgis-toolbar-split-button .overflowActionLabel=${n} .priority=${l}>${g}</arcgis-toolbar-split-button></arcgis-toolbar-group>`;case"actions":return v`<arcgis-toolbar-group .priority=${l} .preferEndSlot=${a}>${g}</arcgis-toolbar-group>`}}_renderCommand({active:e,afterCreate:t,afterRemoved:o,afterUpdate:s,appearance:r,icon:c,disabled:a,id:l,kind:g,labelKey:n,labelParameters:u,loading:m,tooltipKey:b,iconFlipRTL:S,onClick:C,refKey:k,textEnabled:B,renderAsAction:de}){let{_messages:I,_refMap:pe,layout:D}=this,L=le(n,I),A=L===void 0?n:u?fe(L,u):L,z=I?.[b]??A,F=k?ce(pe,k,P):this.#n,K={afterCreate:t,afterRemoved:o,afterUpdate:s};return de?v`<arcgis-toolbar-action .active=${e} .appearance=${r} .disabled=${a} .icon=${c} .iconFlipRtl=${S} id=${l??G} .kind=${g} .loading=${m} .labelText=${D==="horizontal"?A:""} .textEnabled=${B} .tooltipText=${D==="horizontal"&&B?"":z} @arcgisToolbarItemSelected=${C} ${ae(K)} ${E(F)}></arcgis-toolbar-action>`:v`<arcgis-toolbar-item .active=${e} .disabled=${a} .icon=${c} id=${l??G} .iconFlipRtl=${S} .labelText=${A} .tooltipText=${z} @arcgisItemSelected=${C} ${ae(K)} ${E(F)}></arcgis-toolbar-item>`}};X("arcgis-sketch",V);return V},"intl","layers/GraphicsLayer","symbols/TextSymbol","core/reactiveUtils","widgets/Sketch/SketchViewModel","applications/Components/featureUtils","core/Accessor","core/accessorSupport/decorators","core/promiseUtils","widgets/Sketch/VisibleElements","widgets/support/SelectionToolbar/SelectionToolbarViewModel",a,b,c,d,e,f,g)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{P as l,X as a,b as i}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:u}])=>{var s=class extends l{static{this.properties={viewModel:0}}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel.templateOptions.customTextElements,()=>this.requestUpdate(),{initial:!0})])}render(){let e=this.viewModel.templateOptions.customTextElements;return e?i`<div>${e.map(r=>{let[t,c]=Object.entries(r)[0];return t==="date"?null:i`<calcite-label>${t}<calcite-input .value=${c??""} @calciteInputInput=${o=>{let n=e.find(m=>{let[p]=Object.entries(m)[0];return p===t});n&&(n[t]=o.target.value)}}></calcite-input></calcite-label>`})}</div>`:null}};a("arcgis-print-custom-text-elements",s);return s},"core/reactiveUtils")
2
+ import{P as l,X as a,b as i}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:u}])=>{var s=class extends l{static{this.properties={viewModel:0}}loaded(){this.manager.onLifecycle(()=>[u(()=>this.viewModel.templateOptions.customTextElements,()=>this.requestUpdate(),{initial:!0})])}render(){let e=this.viewModel.templateOptions.customTextElements;return e?i`<div>${e.map(r=>{let[t,c]=Object.entries(r)[0];return t==="date"?null:i`<calcite-label>${t}<calcite-input .value=${c??""} @calciteInputInput=${o=>{let n=e.find(m=>{let[p]=Object.entries(m)[0];return p===t});n&&(n[t]=o.target.value)}}></calcite-input></calcite-label>`})}</div>`:null}};a("arcgis-print-custom-text-elements",s);return s},"core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{P as m,X as u,a as l,b as o}from"./33CM77ZT.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{P as m,X as u,a as l,b as o}from"./GZQ5S6OJ.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{g as R}from"./Y4WOZJQX.js";import"./D47546HM.js";import b from"./TMJX7DFH.js";import a from"./6CRONNHI.js";import"./VJVKFKSG.js";import{a as S}from"./7EMK74ZF.js";import{h as k}from"./6N7PM73F.js";import"./7IHIG427.js";import"./QUZTFUWM.js";import"./P2GMODLP.js";import{O as F,P as E,X as C,a as v,b as m,n as h,p as u,r as g,x as y}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([{getOrCreateMapValue:L},{a:f,b:c,c:p,d:$},{c:A,d:P,e:I,g:w}])=>{var N=v`arcgis-features-next{height:100%}.elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm)}.features-hidden{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size);overflow-wrap:anywhere}`,b=class extends E{constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#h=!0,this.#t=[],this.#i=new Map,this.#r=new Map,this.#n=!1,this.#o=!1,this.#a=new Map,this.#l=new Map,this.#e=[],this._isFeaturesSelected=!1,this.autoDestroyDisabled=!1,this.disableHighlight=!1,this.emitsArcgisResultReady=!0,this.features=[],this.hideActionBar=!1,this.hideFeatureResults=!1,this.hidePlaceholder=!1,this.includeDefaultActionsDisabled=!1,this.layers=[],this.state="ready",this.arcgisPropertyChange=k()("features","hasContent","isFeaturesListShown","selectedResultFeature","state"),this.arcgisResultReady=y(),this.arcgisTriggerAction=y()}static{this.properties={_featuresComponentElement:16,_isFeaturesSelected:16,actions:0,autoDestroyDisabled:5,disableHighlight:5,emitsArcgisResultReady:32,features:32,hasContent:32,heading:1,hideActionBar:5,hideFeatureResults:5,hidePlaceholder:5,includeDefaultActionsDisabled:5,isFeaturesListShown:32,layers:0,messageOverrides:0,numResults:32,referenceElement:1,selectedResultFeature:32,state:32,traceResult:32,utilityNetwork:32,view:32}}static{this.styles=N}#h;get#g(){if(!this.traceResult)return!1;let{elements:e,globalFunctionResults:t,aggregatedGeometry:s}=this.traceResult;return e.length>0&&!t?.length&&!s}#t;#i;#r;#s;#n;#o;#a;#l;get#c(){let{parentElement:e}=this.el;if(e&&R(e))return e;let t=this.el.getRootNode();if(t instanceof ShadowRoot&&R(t.host))return t.host}#e;get hasContent(){return this.numResults>0&&!this.manager.destroyed&&!(this.hideFeatureResults&&this.hidePlaceholder)}get isFeaturesListShown(){return this._isFeaturesSelected&&!this.hideFeatureResults&&this.numResults>0}get numResults(){return this.features.length}get selectedResultFeature(){return this._featuresComponentElement?.selectedDrillInFeature??this._featuresComponentElement?.selectedFeature??void 0}clearResult(){h(()=>this.traceResult=void 0),this.#d()}async destroy(){this.clearResult(),await this.manager.destroy(),await this._featuresComponentElement?.destroy()}load(){this.manager.onLifecycle(()=>{let e=this.#c;if(!e){u("warn",this,"This component must be used as a child of `arcgis-utility-network-trace-results`.");return}let t=s=>this.#y(s);return e.addEventListener("arcgisPropertyChange",t),h(()=>{this.traceResult=e.traceResult,this.utilityNetwork=e.utilityNetwork,this.view=e.view}),()=>{e.removeEventListener("arcgisPropertyChange",t)}}),this.traceResult&&this.#m()}willUpdate(e){e.has("traceResult")&&this.#m(),e.has("disableHighlight")&&this.#u();let t=this.hasContent;t!==this.#n&&this.el.isConnected&&this.arcgisPropertyChange.emit({name:"hasContent"}),this.#n=t;let s=this.isFeaturesListShown;s!==this.#o&&this.arcgisPropertyChange.emit({name:"isFeaturesListShown"}),this.#o=s}loaded(){this.traceResult&&(this.traceResult.elements||u("error",this,g("traceResult.elements")),this.utilityNetwork||u("error",this,g("utilityNetwork")))}#y(e){if(e.target!==this.#c)return;let{target:t}=e;switch(e.detail.name){case"traceResult":h(()=>this.traceResult=t.traceResult);break;case"utilityNetwork":h(()=>this.utilityNetwork=t.utilityNetwork);break;case"view":h(()=>this.view=t.view);break}}#f(){this.#t.forEach(({handle:e})=>e?.remove()),this.#t=[]}#u(){this.#t.forEach(e=>{this.disableHighlight?(e.handle?.remove(),e.handle=void 0):e.handle=e.layerView.highlight(e.objectIds)})}#p(e){e&&(this._featuresComponentElement=e)}#w(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#R(e){if(e==null||!this.#e.length)return;let t=this.#r.get(e);if(t)return t;let s=this.#e.find(a=>"layerId"in a&&a.layerId===e);return s&&this.#r.set(e,s),s}#b(){let{traceResult:e,utilityNetwork:t,view:s}=this;if(!t||!e?.elements?.length||!s)return;let a=i=>(I(i.layer)||w(i.layer))&&t.isUtilityLayer(i.layer),n=t.getObjectIdsFromElements(e.elements),r=s.allLayerViews.filter(a);n.forEach(({layerUrl:i,objectIds:o})=>{let l=Number(i.split("/").pop()),d=r.find(({layer:D})=>D.layerId===l);d&&this.#t.push({layerView:d,objectIds:o})}),this.#u()}async#v(e){let{layers:t,utilityNetwork:s,view:a}=this;if(!a||!s)return;try{s.loaded||await s.load({signal:e})}catch(r){if(p(r))throw r;f(r,this,"Error while loading the selected utility network")}c(e),this.#e=t.length?t.filter(r=>s.isUtilityLayer(r)):A(a,s);let n=this.#e.filter(r=>!r.loaded).map(r=>r.load({signal:e}));if(n.length>0){let r=await Promise.allSettled(n);c(e),r.forEach(i=>{i.status==="rejected"&&u("error",this,`Failed to load layer. Reason: ${i.reason}`)})}}#d(){this._isFeaturesSelected=this.#g,this.#s?.abort(),this.#f(),h(()=>this.features=[]),this.#e=[],this.#i.clear(),this.#r.clear(),this.#l.clear(),this.#a.clear(),h(()=>this.state="ready")}async#m(){if(this.#d(),!this.traceResult)return;let e=()=>{h(()=>this.state="ready"),this.arcgisResultReady.emit()},t=$(async s=>{let a=this.traceResult?.elements;if(!a?.length){e();return}h(()=>this.state="loading"),this.#C(a),await this.#v(s),await this.#E(s),c(s),this.#b(),e()});this.#s=t;try{await t.promise}catch(s){p(s)||(f(s,this,"Error while loading trace result"),this.#s===t&&e())}finally{this.#s===t&&(this.#s=void 0,h(()=>this.state="ready"))}}async#F([e,t],s){c(s);let a=this.utilityNetwork?.getLayerIdBySourceId(e),n=this.#R(a);if(a==null||!n)return;let r=this.#w(t),i=n.createQuery();i.gdbVersion=this.utilityNetwork?.gdbVersion,i.objectIds=r.map(l=>l.objectId),i.outFields=["*"];let{features:o}=await P(n,i,{signal:s});c(s),o.forEach(l=>{let d=l.layer;l.getEffectivePopupTemplate(this.#h)||(l.popupTemplate=d.createPopupTemplate())}),w(n)?o.forEach(l=>{L(this.#l,l.layer.subtypeCode,()=>[]).push(l)}):this.#i.set(a,o)}async#E(e){let t=Array.from(this.#a.entries());if(!t.length)return;let s=t.map(i=>this.#F(i,e)),a=await Promise.allSettled(s);c(e),a.forEach((i,o)=>{if(i.status==="rejected"){let[l]=t[o];u("error",this,`Failed to query features for source ${l}. Reason: ${i.reason}`)}});let n=Array.from(this.#i.values()),r=Array.from(this.#l.values());h(()=>this.features=n.concat(r).flat())}#C(e){this.#a=Map.groupBy(e,({networkSourceId:t})=>t)}#k(e){let{detail:t}=e;(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(e.stopPropagation(),this.arcgisPropertyChange.emit({name:"selectedResultFeature"}))}#$(e){e.stopPropagation(),this.arcgisTriggerAction.emit(e.detail)}#A(){return m`<div class="features-hidden">${this._messages.resultFeaturesAreHidden}</div>`}#P(){let{heading:e,_messages:t}=this;return m`<calcite-list .label=${t.headings.features}><calcite-list-item class="elements-list-item" .label=${e||t.headings.features} @calciteListItemSelect=${()=>this._isFeaturesSelected=!0}><calcite-chip .label=${t.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon flip-rtl icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}render(){return this.hasContent?this.hideFeatureResults?this.#A():this.isFeaturesListShown?m`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#h} .features=${this.features} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} initial-display-mode=list .messageOverrides=${this.messageOverrides} open .referenceElement=${this.referenceElement} .view=${this.view} @arcgisClose=${()=>this._isFeaturesSelected=!1} @arcgisPropertyChange=${this.#k} @arcgisTriggerAction=${this.#$} ${F(this.#p)}></arcgis-features-next>`:this.#P():null}};C("arcgis-utility-network-trace-elements-result-item",b);return b},"applications/Components/featureUtils",a,b)
2
+ import{g as R}from"./Y4WOZJQX.js";import"./D47546HM.js";import b from"./TMJX7DFH.js";import a from"./5GBH7Q3I.js";import"./VJVKFKSG.js";import{a as S}from"./ZUNVTMPM.js";import{h as k}from"./FMHP6L74.js";import"./PFPLJDX4.js";import"./QUZTFUWM.js";import"./K76CC5SU.js";import{O as F,P as E,X as C,a as v,b as m,n as h,p as u,r as g,x as y}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{getOrCreateMapValue:L},{a:f,b:c,c:p,d:$},{c:A,d:P,e:I,g:w}])=>{var N=v`arcgis-features-next{height:100%}.elements-list-item{border:solid 1px var(--calcite-color-border-3);border-radius:var(--calcite-corner-radius-sm)}.features-hidden{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size);overflow-wrap:anywhere}`,b=class extends E{constructor(){super(...arguments),this._messages=S({blocking:!0}),this.#h=!0,this.#t=[],this.#i=new Map,this.#r=new Map,this.#n=!1,this.#o=!1,this.#a=new Map,this.#l=new Map,this.#e=[],this._isFeaturesSelected=!1,this.autoDestroyDisabled=!1,this.disableHighlight=!1,this.emitsArcgisResultReady=!0,this.features=[],this.hideActionBar=!1,this.hideFeatureResults=!1,this.hidePlaceholder=!1,this.includeDefaultActionsDisabled=!1,this.layers=[],this.state="ready",this.arcgisPropertyChange=k()("features","hasContent","isFeaturesListShown","selectedResultFeature","state"),this.arcgisResultReady=y(),this.arcgisTriggerAction=y()}static{this.properties={_featuresComponentElement:16,_isFeaturesSelected:16,actions:0,autoDestroyDisabled:5,disableHighlight:5,emitsArcgisResultReady:32,features:32,hasContent:32,heading:1,hideActionBar:5,hideFeatureResults:5,hidePlaceholder:5,includeDefaultActionsDisabled:5,isFeaturesListShown:32,layers:0,messageOverrides:0,numResults:32,referenceElement:1,selectedResultFeature:32,state:32,traceResult:32,utilityNetwork:32,view:32}}static{this.styles=N}#h;get#g(){if(!this.traceResult)return!1;let{elements:e,globalFunctionResults:t,aggregatedGeometry:s}=this.traceResult;return e.length>0&&!t?.length&&!s}#t;#i;#r;#s;#n;#o;#a;#l;get#c(){let{parentElement:e}=this.el;if(e&&R(e))return e;let t=this.el.getRootNode();if(t instanceof ShadowRoot&&R(t.host))return t.host}#e;get hasContent(){return this.numResults>0&&!this.manager.destroyed&&!(this.hideFeatureResults&&this.hidePlaceholder)}get isFeaturesListShown(){return this._isFeaturesSelected&&!this.hideFeatureResults&&this.numResults>0}get numResults(){return this.features.length}get selectedResultFeature(){return this._featuresComponentElement?.selectedDrillInFeature??this._featuresComponentElement?.selectedFeature??void 0}clearResult(){h(()=>this.traceResult=void 0),this.#d()}async destroy(){this.clearResult(),await this.manager.destroy(),await this._featuresComponentElement?.destroy()}load(){this.manager.onLifecycle(()=>{let e=this.#c;if(!e){u("warn",this,"This component must be used as a child of `arcgis-utility-network-trace-results`.");return}let t=s=>this.#y(s);return e.addEventListener("arcgisPropertyChange",t),h(()=>{this.traceResult=e.traceResult,this.utilityNetwork=e.utilityNetwork,this.view=e.view}),()=>{e.removeEventListener("arcgisPropertyChange",t)}}),this.traceResult&&this.#m()}willUpdate(e){e.has("traceResult")&&this.#m(),e.has("disableHighlight")&&this.#u();let t=this.hasContent;t!==this.#n&&this.el.isConnected&&this.arcgisPropertyChange.emit({name:"hasContent"}),this.#n=t;let s=this.isFeaturesListShown;s!==this.#o&&this.arcgisPropertyChange.emit({name:"isFeaturesListShown"}),this.#o=s}loaded(){this.traceResult&&(this.traceResult.elements||u("error",this,g("traceResult.elements")),this.utilityNetwork||u("error",this,g("utilityNetwork")))}#y(e){if(e.target!==this.#c)return;let{target:t}=e;switch(e.detail.name){case"traceResult":h(()=>this.traceResult=t.traceResult);break;case"utilityNetwork":h(()=>this.utilityNetwork=t.utilityNetwork);break;case"view":h(()=>this.view=t.view);break}}#f(){this.#t.forEach(({handle:e})=>e?.remove()),this.#t=[]}#u(){this.#t.forEach(e=>{this.disableHighlight?(e.handle?.remove(),e.handle=void 0):e.handle=e.layerView.highlight(e.objectIds)})}#p(e){e&&(this._featuresComponentElement=e)}#w(e){return Array.from(new Map(e.map(t=>[t.globalId,t])).values())}#R(e){if(e==null||!this.#e.length)return;let t=this.#r.get(e);if(t)return t;let s=this.#e.find(a=>"layerId"in a&&a.layerId===e);return s&&this.#r.set(e,s),s}#b(){let{traceResult:e,utilityNetwork:t,view:s}=this;if(!t||!e?.elements?.length||!s)return;let a=i=>(I(i.layer)||w(i.layer))&&t.isUtilityLayer(i.layer),n=t.getObjectIdsFromElements(e.elements),r=s.allLayerViews.filter(a);n.forEach(({layerUrl:i,objectIds:o})=>{let l=Number(i.split("/").pop()),d=r.find(({layer:D})=>D.layerId===l);d&&this.#t.push({layerView:d,objectIds:o})}),this.#u()}async#v(e){let{layers:t,utilityNetwork:s,view:a}=this;if(!a||!s)return;try{s.loaded||await s.load({signal:e})}catch(r){if(p(r))throw r;f(r,this,"Error while loading the selected utility network")}c(e),this.#e=t.length?t.filter(r=>s.isUtilityLayer(r)):A(a,s);let n=this.#e.filter(r=>!r.loaded).map(r=>r.load({signal:e}));if(n.length>0){let r=await Promise.allSettled(n);c(e),r.forEach(i=>{i.status==="rejected"&&u("error",this,`Failed to load layer. Reason: ${i.reason}`)})}}#d(){this._isFeaturesSelected=this.#g,this.#s?.abort(),this.#f(),h(()=>this.features=[]),this.#e=[],this.#i.clear(),this.#r.clear(),this.#l.clear(),this.#a.clear(),h(()=>this.state="ready")}async#m(){if(this.#d(),!this.traceResult)return;let e=()=>{h(()=>this.state="ready"),this.arcgisResultReady.emit()},t=$(async s=>{let a=this.traceResult?.elements;if(!a?.length){e();return}h(()=>this.state="loading"),this.#C(a),await this.#v(s),await this.#E(s),c(s),this.#b(),e()});this.#s=t;try{await t.promise}catch(s){p(s)||(f(s,this,"Error while loading trace result"),this.#s===t&&e())}finally{this.#s===t&&(this.#s=void 0,h(()=>this.state="ready"))}}async#F([e,t],s){c(s);let a=this.utilityNetwork?.getLayerIdBySourceId(e),n=this.#R(a);if(a==null||!n)return;let r=this.#w(t),i=n.createQuery();i.gdbVersion=this.utilityNetwork?.gdbVersion,i.objectIds=r.map(l=>l.objectId),i.outFields=["*"];let{features:o}=await P(n,i,{signal:s});c(s),o.forEach(l=>{let d=l.layer;l.getEffectivePopupTemplate(this.#h)||(l.popupTemplate=d.createPopupTemplate())}),w(n)?o.forEach(l=>{L(this.#l,l.layer.subtypeCode,()=>[]).push(l)}):this.#i.set(a,o)}async#E(e){let t=Array.from(this.#a.entries());if(!t.length)return;let s=t.map(i=>this.#F(i,e)),a=await Promise.allSettled(s);c(e),a.forEach((i,o)=>{if(i.status==="rejected"){let[l]=t[o];u("error",this,`Failed to query features for source ${l}. Reason: ${i.reason}`)}});let n=Array.from(this.#i.values()),r=Array.from(this.#l.values());h(()=>this.features=n.concat(r).flat())}#C(e){this.#a=Map.groupBy(e,({networkSourceId:t})=>t)}#k(e){let{detail:t}=e;(t.name==="selectedDrillInFeature"||t.name==="selectedFeature")&&(e.stopPropagation(),this.arcgisPropertyChange.emit({name:"selectedResultFeature"}))}#$(e){e.stopPropagation(),this.arcgisTriggerAction.emit(e.detail)}#A(){return m`<div class="features-hidden">${this._messages.resultFeaturesAreHidden}</div>`}#P(){let{heading:e,_messages:t}=this;return m`<calcite-list .label=${t.headings.features}><calcite-list-item class="elements-list-item" .label=${e||t.headings.features} @calciteListItemSelect=${()=>this._isFeaturesSelected=!0}><calcite-chip .label=${t.labels.numFeatures} scale=s slot=content-end>${this.numResults}</calcite-chip><calcite-icon flip-rtl icon=chevron-right slot=content-end></calcite-icon></calcite-list-item></calcite-list>`}render(){return this.hasContent?this.hideFeatureResults?this.#A():this.isFeaturesListShown?m`<arcgis-features-next .actions=${this.actions} .autoDestroyDisabled=${this.autoDestroyDisabled} .defaultPopupTemplateEnabled=${this.#h} .features=${this.features} .hideActionBar=${this.hideActionBar} hide-select-feature .includeDefaultActionsDisabled=${this.includeDefaultActionsDisabled} initial-display-mode=list .messageOverrides=${this.messageOverrides} open .referenceElement=${this.referenceElement} .view=${this.view} @arcgisClose=${()=>this._isFeaturesSelected=!1} @arcgisPropertyChange=${this.#k} @arcgisTriggerAction=${this.#$} ${F(this.#p)}></arcgis-features-next>`:this.#P():null}};C("arcgis-utility-network-trace-elements-result-item",b);return b},"applications/Components/featureUtils",a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import c from"./RAWM42BS.js";import b from"./TMJX7DFH.js";import a from"./6CRONNHI.js";import{a as A}from"./VJVKFKSG.js";import{h as y}from"./6N7PM73F.js";import"./7IHIG427.js";import"./QUZTFUWM.js";import"./P2GMODLP.js";import{P as F,V as p,X as _,a as m,b as n,n as d}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,I,v,{getDisplayedSymbol:b},{stripHTML:x},{watch:h},{c:C},,{e: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.hideEmptyRelationshipContent=!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,hideEmptyRelationshipContent: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 i=r.createQuery(),s=e.getObjectId();return i.aggregateIds=s!=null?[s]:[],[r,i]}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,i=new AbortController;this._abortController=i,this._setLoading(!0);try{let[s,o]=await Promise.all([a.queryFeatures(r,{signal:i.signal}),a.queryExtent(r,{signal:i.signal})]);if(this._abortController!==i||i.signal.aborted)return;this._abortController=null,this._setLoading(!1);let g=s.features??[];this._setAggregatedFeaturesState(g),o.extent?this._updateAggregateBoundaryFeature(o.extent):this._removeAggregateBoundaryFeature()}catch(s){if(this._abortController!==i||(this._abortController=null,this._setLoading(!1),C(s)))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(p(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} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .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 i=t.length,s=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<i?this.selectedAggregatedFeatureIndex:-1;if(s===-1){let c=r.getItemAt(r.length-1)?.graphic;s=c?t.indexOf(c):-1}let o=s===-1?e>0?0:i-1:(s+e+i)%i,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>`}};_("arcgis-aggregated-features",l);return l},"popup/FeatureModel","Graphic","symbols/SimpleFillSymbol","symbols/support/symbolUtils","applications/Components/stringUtils","core/reactiveUtils",a,b,c)
2
+ import c from"./2FR4CLUD.js";import b from"./TMJX7DFH.js";import a from"./5GBH7Q3I.js";import{a as A}from"./VJVKFKSG.js";import{h as y}from"./FMHP6L74.js";import"./PFPLJDX4.js";import"./QUZTFUWM.js";import"./K76CC5SU.js";import{P as F,V as p,X as _,a as m,b as n,n as d}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([w,I,v,{getDisplayedSymbol:b},{stripHTML:x},{watch:h},{c:C},,{e: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.hideEmptyRelationshipContent=!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,hideEmptyRelationshipContent: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 i=r.createQuery(),s=e.getObjectId();return i.aggregateIds=s!=null?[s]:[],[r,i]}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,i=new AbortController;this._abortController=i,this._setLoading(!0);try{let[s,o]=await Promise.all([a.queryFeatures(r,{signal:i.signal}),a.queryExtent(r,{signal:i.signal})]);if(this._abortController!==i||i.signal.aborted)return;this._abortController=null,this._setLoading(!1);let g=s.features??[];this._setAggregatedFeaturesState(g),o.extent?this._updateAggregateBoundaryFeature(o.extent):this._removeAggregateBoundaryFeature()}catch(s){if(this._abortController!==i||(this._abortController=null,this._setLoading(!1),C(s)))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(p(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} .hideEmptyRelationshipContent=${this.hideEmptyRelationshipContent} .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 i=t.length,s=this.selectedAggregatedFeatureIndex>=0&&this.selectedAggregatedFeatureIndex<i?this.selectedAggregatedFeatureIndex:-1;if(s===-1){let c=r.getItemAt(r.length-1)?.graphic;s=c?t.indexOf(c):-1}let o=s===-1?e>0?0:i-1:(s+e+i)%i,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>`}};_("arcgis-aggregated-features",l);return l},"popup/FeatureModel","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{a as $}from"./XEK22IDA.js";import i from"./TMJX7DFH.js";import f from"./6CRONNHI.js";import"./VJVKFKSG.js";import e from"./X4FA56YR.js";import{a as F}from"./7EMK74ZF.js";import d from"./76ZJGD75.js";import c from"./PPURK2BH.js";import{h as w}from"./6N7PM73F.js";import"./7IHIG427.js";import a from"./2IYRSXZS.js";import"./QUZTFUWM.js";import"./P2GMODLP.js";import{P as g,X as b,a as T,b as r,x as h}from"./33CM77ZT.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,,{g:m,h: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 P=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=P(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,i)
2
+ import{a as $}from"./XEK22IDA.js";import i from"./TMJX7DFH.js";import f from"./5GBH7Q3I.js";import"./VJVKFKSG.js";import e from"./6FA3Z5YP.js";import{a as F}from"./ZUNVTMPM.js";import d from"./5IQ47S32.js";import c from"./5X7CUWTJ.js";import{h as w}from"./FMHP6L74.js";import"./PFPLJDX4.js";import a from"./JKDO7CJ5.js";import"./QUZTFUWM.js";import"./K76CC5SU.js";import{P as g,X as b,a as T,b as r,x as h}from"./GZQ5S6OJ.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,,{g:m,h: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 P=S(s),u=class extends g{constructor(){super(...arguments),this._messages=F(),this.viewModel=P(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,i)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as M}from"./IDKRMHDS.js";import{a as v}from"./GU3M4JMW.js";import{a as k}from"./J6SWGP36.js";import{a as w}from"./HP2P5OYN.js";import{N as L,O as P,P as $,R as h,S as u,U as a,X as y,a as x,b as o,x as b}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:B}])=>{var c=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,i),i);var H;function C(t){return(e,i)=>c(e,i,{get(){return(this.renderRoot??(H??=document.createDocumentFragment())).querySelectorAll(t)}})}var W=x`:host{transition:max-height .25s ease-in-out;--esri-widget-padding: 12px 15px;--level-picker-padding: var(--calcite-spacing-md);--level-border-width: 2px;--focus-outline-width: 2px;--focus-outline-offset: 2px}.container{height:max-content;display:flex;flex-direction:row;align-items:center;&.no-level{display:none}>*{height:max-content}}.clear-button{--calcite-fab-background-color: var(--arcgis-internal-building-explorer-button-background-color);--calcite-fab-text-color: var(--arcgis-internal-building-explorer-button-text-color);appearance:none;margin-inline-start:7px;display:none;position:absolute;inset-block-start:-4px}.label-container{--width: 90px;--height: 40px;flex-direction:column;justify-content:space-between;align-items:center;width:50%;margin-inline-end:var(--calcite-spacing-md);display:flex;&.active{color:var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-brand))}&.empty{cursor:default;color:var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-text-3));font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-light)}&:focus{outline:none}&:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus)}}.level-label{position:relative;text-align:center;>span{pointer-events:none}&.active{font-size:var(--height);line-height:calc(var(--height) + 6px);>.clear-button{display:inline-block}}}.tiles-container{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;transform:rotate(180deg);cursor:pointer;padding:20px 0;width:50%}.tiles-inner-container{transition:margin .3s}`,j=Object.defineProperty,F=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,l;r>=0;r--)(l=t[r])&&(n=l(e,i,n)||n);return n&&j(e,i,n),n},d=class extends ${constructor(){super(...arguments),this.hovering=!1,this.onPointerMove=e=>{if(!this.hovering)return!1;if(window.getSelection()?.removeAllRanges(),this.containerPosTop!=null){let i=this.containerPosTop,s=40,n=this.expandedLevelsMargin,r=this.levelsHeight,l=i+s+n,p=this.levelHeight/2;l+=p,r-=p;let f=(e.clientY-l)/r;f+=.035,this.normalizedPointerPosition=f}return!1},this.onPointerEnter=()=>{let e=this.levelsContainer.value;this.hovering||e==null||(this.hovering=!0,this.containerPosTop=e.getBoundingClientRect().top??0)},this.levelsContainer=L(),this.onPointerLeave=()=>{if(this.hovering){window.getSelection()?.removeAllRanges();for(let e of this.levelItems)e.width=void 0;this.normalizedPointerPosition=0,this.hoveredLevel=null,this.hovering=!1}},this.onPointerUp=()=>{window.getSelection()?.removeAllRanges();let e=this.level;this.hoveredLevel==null||e==null||this.#r()},this.expandedLevelsHeight=void 0,this.normalizedPointerPosition=0,this.hoveredLevel=null,this.arcgisBuildingLevelChange=b({bubbles:!0,composed:!0})}static{this.properties={expandedLevelsHeight:16,normalizedPointerPosition:16,hoveredLevel:16,messages:0,level:0,numberOfLevels:32,levelHeight:32,levelsHeight:32}}static{this.styles=W}get levels(){return this.level?.allowedValues??[]}get levelWidth(){let{levelWidthNominator:e,levelWidthConstant:i}=M,s=e/Math.sqrt(this.numberOfLevels)+i;return Math.round(v(s,30,80))}get _gaussianFactor(){let e=this.numberOfLevels;return e/Math.log(30*e)*10}get expandedLevelsMargin(){return Math.round(((this.expandedLevelsHeight??0)-this.levelsHeight)/2)}get levelClosestToPointer(){if(!this.hovering)return null;let e=this.numberOfLevels-1,i=this.clampedNormalizedPointerPosition;return e>=0&&i!=null?this.levels[Math.round((1-i)*e)]:null}get clampedNormalizedPointerPosition(){return v(this.normalizedPointerPosition,0,1)}get numberOfLevels(){return this.levels.length}get levelHeight(){let e=14,i=e*2/Math.sqrt(this.numberOfLevels);return Math.round(v(i,2,e))}get levelsHeight(){return Math.round(this.levelHeight*this.numberOfLevels)}async loaded(){this.listen("keydown",this.#s.bind(this)),this.manager.onLifecycle(()=>[B(()=>[this.normalizedPointerPosition,this.hovering],()=>this.onPointerPositionChange(),{initial:!0})])}onPointerPositionChange(){let e=0;this.levelItems.forEach((s,n)=>{let{width:r,height:l}=this.getLevelWidgetSize(n);s.height=l,s.width=r,e+=l}),this.hoveredLevel=this.levelClosestToPointer;let i=this.expandedLevelsHeight;(i==null||Math.abs(i-e)>30)&&(this.expandedLevelsHeight=e)}getLevelWidgetSize(e){let i={width:this.levelWidth,height:this.levelHeight};if(this.hovering){let s=this.getGaussianFactor(e,this.clampedNormalizedPointerPosition);i.width+=20*s,i.height+=30*s}return i}getGaussianFactor(e,i){let s=this.numberOfLevels-1,n=(s-e)/s,r=this._gaussianFactor*(n-i);return Math.exp(-(r**2))}#s(e){switch(e.key){case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.#i(),this.#e();break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.#t(),this.#e();break}}#e(){Array.from(this.levelItems).find(e=>e.level===this.level?.value)?.focus()}#t(){this.level&&(this.level.next(),this.arcgisBuildingLevelChange.emit())}#i(){this.level&&(this.level.previous(),this.arcgisBuildingLevelChange.emit())}#r(){this.level==null||this.hoveredLevel==null||(this.level.value===this.hoveredLevel&&!this.level.disabled?this.#n():(this.level.select(this.hoveredLevel),this.arcgisBuildingLevelChange.emit()))}#n(){this.level&&!this.level.disabled&&(this.level.clear(),this.arcgisBuildingLevelChange.emit())}render(){if(!this.messages)return null;let e=this.level;e?.value;let i=e&&!e.disabled,s=this.numberOfLevels>1?k(this.levels,n=>n,n=>o`<arcgis-building-level-item .level=${n} .baseWidth=${this.levelWidth} .hovered=${this.hoveredLevel===n} .active=${e&&!e.disabled&&e.value===n} class=${h({"animate-level":!this.hovering})} .messages=${this.messages}></arcgis-building-level-item>`):null;return o`<div class=${h({container:!0,"no-level":this.numberOfLevels<2,"animate-level":this.hovering})}>${T({messages:this.messages,active:i,hasNext:e?.hasNext,hasPrevious:e?.hasPrevious,onNext:()=>this.#t(),onPrevious:()=>this.#i(),children:U({messages:this.messages,level:this.hoveredLevel??e?.value,active:i,onClear:()=>this.#n()})})}${D({ref:this.levelsContainer,expandedLevelsMargin:this.expandedLevelsMargin,levelsHeight:this.levelsHeight,onPointerEnter:this.onPointerEnter,onPointerMove:this.onPointerMove,onPointerLeave:this.onPointerLeave,onPointerUp:this.onPointerUp,children:s})}</div>`}};F([C("arcgis-building-level-item")],d.prototype,"levelItems");function T(t){return o`<div class=${h({"label-container":!0,empty:!t.active,active:!0,hover:!0})} title=${t.messages.selectLevel??a} tabindex=0><calcite-action icon=chevron-up .text=${t.messages.nextLevel} title=${t.messages.nextLevel??a} @click=${t.onNext} .disabled=${!t.hasNext}></calcite-action>${t.children}<calcite-action icon=chevron-down .text=${t.messages.previousLevel} title=${t.messages.previousLevel??a} @click=${t.onPrevious} .disabled=${!t.hasPrevious}></calcite-action></div>`}function U(t){let e=t.messages,i=t.active?e.clearLevel:e.selectLevel;return o`<div aria-label=${i??a} class=${h({"level-label":!0,active:t.active&&t.level!=null})} @click=${t.onClear} title=${i??a}>${t.active?o`<span>${t.level}</span>${w("clear-button",o`<calcite-fab appearance=outline-fill class="clear-button" icon=x kind=neutral .label=${e.clearLevel} @click=${t.onClear} scale=s></calcite-fab>`)}`:o`<span>${e.selectLevel}</span>`}</div>`}function D(t){let e=40,i=-e/2,s=t.levelsHeight,n=s+e*2;return o`<div class="tiles-container" @pointerenter=${t.onPointerEnter} @pointermove=${t.onPointerMove} @pointerleave=${t.onPointerLeave} @pointerup=${t.onPointerUp} @click=${t.onClick} style=${u({height:`${n}px`,marginBlockStart:`${i}px`,marginBlockEnd:`${i}px`})} ${P(t.ref)}><div class="tiles-inner-container" style=${u({height:`${s}px`,margin:"0",marginBlockStart:`${20-t.expandedLevelsMargin}px`})}>${t.children}</div></div>`}y("arcgis-building-level-picker",d);return d},"core/reactiveUtils")
2
+ import{a as M}from"./IDKRMHDS.js";import{a as v}from"./GU3M4JMW.js";import{a as k}from"./KGDQMML5.js";import{a as w}from"./5RABZG2H.js";import{N as L,O as P,P as $,R as h,S as u,U as a,X as y,a as x,b as o,x as b}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:B}])=>{var c=(t,e,i)=>(i.configurable=!0,i.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,i),i);var H;function C(t){return(e,i)=>c(e,i,{get(){return(this.renderRoot??(H??=document.createDocumentFragment())).querySelectorAll(t)}})}var W=x`:host{transition:max-height .25s ease-in-out;--esri-widget-padding: 12px 15px;--level-picker-padding: var(--calcite-spacing-md);--level-border-width: 2px;--focus-outline-width: 2px;--focus-outline-offset: 2px}.container{height:max-content;display:flex;flex-direction:row;align-items:center;&.no-level{display:none}>*{height:max-content}}.clear-button{--calcite-fab-background-color: var(--arcgis-internal-building-explorer-button-background-color);--calcite-fab-text-color: var(--arcgis-internal-building-explorer-button-text-color);appearance:none;margin-inline-start:7px;display:none;position:absolute;inset-block-start:-4px}.label-container{--width: 90px;--height: 40px;flex-direction:column;justify-content:space-between;align-items:center;width:50%;margin-inline-end:var(--calcite-spacing-md);display:flex;&.active{color:var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-brand))}&.empty{cursor:default;color:var(--arcgis-internal-building-explorer-content-text-color, var(--calcite-color-text-3));font-size:var(--calcite-font-size);font-weight:var(--calcite-font-weight-light)}&:focus{outline:none}&:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus)}}.level-label{position:relative;text-align:center;>span{pointer-events:none}&.active{font-size:var(--height);line-height:calc(var(--height) + 6px);>.clear-button{display:inline-block}}}.tiles-container{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;transform:rotate(180deg);cursor:pointer;padding:20px 0;width:50%}.tiles-inner-container{transition:margin .3s}`,j=Object.defineProperty,F=(t,e,i,s)=>{for(var n=void 0,r=t.length-1,l;r>=0;r--)(l=t[r])&&(n=l(e,i,n)||n);return n&&j(e,i,n),n},d=class extends ${constructor(){super(...arguments),this.hovering=!1,this.onPointerMove=e=>{if(!this.hovering)return!1;if(window.getSelection()?.removeAllRanges(),this.containerPosTop!=null){let i=this.containerPosTop,s=40,n=this.expandedLevelsMargin,r=this.levelsHeight,l=i+s+n,p=this.levelHeight/2;l+=p,r-=p;let f=(e.clientY-l)/r;f+=.035,this.normalizedPointerPosition=f}return!1},this.onPointerEnter=()=>{let e=this.levelsContainer.value;this.hovering||e==null||(this.hovering=!0,this.containerPosTop=e.getBoundingClientRect().top??0)},this.levelsContainer=L(),this.onPointerLeave=()=>{if(this.hovering){window.getSelection()?.removeAllRanges();for(let e of this.levelItems)e.width=void 0;this.normalizedPointerPosition=0,this.hoveredLevel=null,this.hovering=!1}},this.onPointerUp=()=>{window.getSelection()?.removeAllRanges();let e=this.level;this.hoveredLevel==null||e==null||this.#r()},this.expandedLevelsHeight=void 0,this.normalizedPointerPosition=0,this.hoveredLevel=null,this.arcgisBuildingLevelChange=b({bubbles:!0,composed:!0})}static{this.properties={expandedLevelsHeight:16,normalizedPointerPosition:16,hoveredLevel:16,messages:0,level:0,numberOfLevels:32,levelHeight:32,levelsHeight:32}}static{this.styles=W}get levels(){return this.level?.allowedValues??[]}get levelWidth(){let{levelWidthNominator:e,levelWidthConstant:i}=M,s=e/Math.sqrt(this.numberOfLevels)+i;return Math.round(v(s,30,80))}get _gaussianFactor(){let e=this.numberOfLevels;return e/Math.log(30*e)*10}get expandedLevelsMargin(){return Math.round(((this.expandedLevelsHeight??0)-this.levelsHeight)/2)}get levelClosestToPointer(){if(!this.hovering)return null;let e=this.numberOfLevels-1,i=this.clampedNormalizedPointerPosition;return e>=0&&i!=null?this.levels[Math.round((1-i)*e)]:null}get clampedNormalizedPointerPosition(){return v(this.normalizedPointerPosition,0,1)}get numberOfLevels(){return this.levels.length}get levelHeight(){let e=14,i=e*2/Math.sqrt(this.numberOfLevels);return Math.round(v(i,2,e))}get levelsHeight(){return Math.round(this.levelHeight*this.numberOfLevels)}async loaded(){this.listen("keydown",this.#s.bind(this)),this.manager.onLifecycle(()=>[B(()=>[this.normalizedPointerPosition,this.hovering],()=>this.onPointerPositionChange(),{initial:!0})])}onPointerPositionChange(){let e=0;this.levelItems.forEach((s,n)=>{let{width:r,height:l}=this.getLevelWidgetSize(n);s.height=l,s.width=r,e+=l}),this.hoveredLevel=this.levelClosestToPointer;let i=this.expandedLevelsHeight;(i==null||Math.abs(i-e)>30)&&(this.expandedLevelsHeight=e)}getLevelWidgetSize(e){let i={width:this.levelWidth,height:this.levelHeight};if(this.hovering){let s=this.getGaussianFactor(e,this.clampedNormalizedPointerPosition);i.width+=20*s,i.height+=30*s}return i}getGaussianFactor(e,i){let s=this.numberOfLevels-1,n=(s-e)/s,r=this._gaussianFactor*(n-i);return Math.exp(-(r**2))}#s(e){switch(e.key){case"ArrowDown":case"ArrowLeft":e.preventDefault(),e.stopPropagation(),this.#i(),this.#e();break;case"ArrowUp":case"ArrowRight":e.preventDefault(),e.stopPropagation(),this.#t(),this.#e();break}}#e(){Array.from(this.levelItems).find(e=>e.level===this.level?.value)?.focus()}#t(){this.level&&(this.level.next(),this.arcgisBuildingLevelChange.emit())}#i(){this.level&&(this.level.previous(),this.arcgisBuildingLevelChange.emit())}#r(){this.level==null||this.hoveredLevel==null||(this.level.value===this.hoveredLevel&&!this.level.disabled?this.#n():(this.level.select(this.hoveredLevel),this.arcgisBuildingLevelChange.emit()))}#n(){this.level&&!this.level.disabled&&(this.level.clear(),this.arcgisBuildingLevelChange.emit())}render(){if(!this.messages)return null;let e=this.level;e?.value;let i=e&&!e.disabled,s=this.numberOfLevels>1?k(this.levels,n=>n,n=>o`<arcgis-building-level-item .level=${n} .baseWidth=${this.levelWidth} .hovered=${this.hoveredLevel===n} .active=${e&&!e.disabled&&e.value===n} class=${h({"animate-level":!this.hovering})} .messages=${this.messages}></arcgis-building-level-item>`):null;return o`<div class=${h({container:!0,"no-level":this.numberOfLevels<2,"animate-level":this.hovering})}>${T({messages:this.messages,active:i,hasNext:e?.hasNext,hasPrevious:e?.hasPrevious,onNext:()=>this.#t(),onPrevious:()=>this.#i(),children:U({messages:this.messages,level:this.hoveredLevel??e?.value,active:i,onClear:()=>this.#n()})})}${D({ref:this.levelsContainer,expandedLevelsMargin:this.expandedLevelsMargin,levelsHeight:this.levelsHeight,onPointerEnter:this.onPointerEnter,onPointerMove:this.onPointerMove,onPointerLeave:this.onPointerLeave,onPointerUp:this.onPointerUp,children:s})}</div>`}};F([C("arcgis-building-level-item")],d.prototype,"levelItems");function T(t){return o`<div class=${h({"label-container":!0,empty:!t.active,active:!0,hover:!0})} title=${t.messages.selectLevel??a} tabindex=0><calcite-action icon=chevron-up .text=${t.messages.nextLevel} title=${t.messages.nextLevel??a} @click=${t.onNext} .disabled=${!t.hasNext}></calcite-action>${t.children}<calcite-action icon=chevron-down .text=${t.messages.previousLevel} title=${t.messages.previousLevel??a} @click=${t.onPrevious} .disabled=${!t.hasPrevious}></calcite-action></div>`}function U(t){let e=t.messages,i=t.active?e.clearLevel:e.selectLevel;return o`<div aria-label=${i??a} class=${h({"level-label":!0,active:t.active&&t.level!=null})} @click=${t.onClear} title=${i??a}>${t.active?o`<span>${t.level}</span>${w("clear-button",o`<calcite-fab appearance=outline-fill class="clear-button" icon=x kind=neutral .label=${e.clearLevel} @click=${t.onClear} scale=s></calcite-fab>`)}`:o`<span>${e.selectLevel}</span>`}</div>`}function D(t){let e=40,i=-e/2,s=t.levelsHeight,n=s+e*2;return o`<div class="tiles-container" @pointerenter=${t.onPointerEnter} @pointermove=${t.onPointerMove} @pointerleave=${t.onPointerLeave} @pointerup=${t.onPointerUp} @click=${t.onClick} style=${u({height:`${n}px`,marginBlockStart:`${i}px`,marginBlockEnd:`${i}px`})} ${P(t.ref)}><div class="tiles-inner-container" style=${u({height:`${s}px`,margin:"0",marginBlockStart:`${20-t.expandedLevelsMargin}px`})}>${t.children}</div></div>`}y("arcgis-building-level-picker",d);return d},"core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as s}from"./DZH4KU2P.js";import"./JD74LG7K.js";import"./QUZTFUWM.js";import"./P2GMODLP.js";import{P as n,X as a,a as r,b as i}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([{renderingSanitizer:o}])=>{var c=r`.heading{margin-top:0;margin-bottom:var(--calcite-spacing-xxs);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xl);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-tight)}.description{margin-bottom:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}`,t=class extends n{constructor(){super(...arguments),this.headingLevel=2}static{this.properties={description:1,headingLevel:9,heading:1}}static{this.styles=c}render(){return i`<div class="root">${this._renderHeading()}${this._renderDescription()}</div>`}_renderHeading(){let{heading:e}=this;return e?s({class:"heading",level:this.headingLevel,excludeGlobalCss:!0,children:i`<div .innerHTML=${o.sanitize(e)??""}></div>`}):null}_renderDescription(){let{description:e}=this;return e?i`<div class="description" .innerHTML=${o.sanitize(e)??""}></div>`:null}};a("arcgis-feature-element-info",t);return t},"applications/Components/sanitizerUtils")
2
+ import{a as s}from"./OOUJLZ5Y.js";import"./JD74LG7K.js";import"./QUZTFUWM.js";import"./K76CC5SU.js";import{P as n,X as a,a as r,b as i}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{renderingSanitizer:o}])=>{var c=r`.heading{margin-top:0;margin-bottom:var(--calcite-spacing-xxs);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size-xl);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-tight)}.description{margin-bottom:var(--calcite-spacing-sm);font-size:var(--calcite-font-size-sm);font-weight:var(--calcite-font-weight-regular);line-height:var(--calcite-font-line-height-relative-normal)}`,t=class extends n{constructor(){super(...arguments),this.headingLevel=2}static{this.properties={description:1,headingLevel:9,heading:1}}static{this.styles=c}render(){return i`<div class="root">${this._renderHeading()}${this._renderDescription()}</div>`}_renderHeading(){let{heading:e}=this;return e?s({class:"heading",level:this.headingLevel,excludeGlobalCss:!0,children:i`<div .innerHTML=${o.sanitize(e)??""}></div>`}):null}_renderDescription(){let{description:e}=this;return e?i`<div class="description" .innerHTML=${o.sanitize(e)??""}></div>`:null}};a("arcgis-feature-element-info",t);return t},"applications/Components/sanitizerUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{h as g}from"./BAOWXZTE.js";import{B as l,O as o,P as c,R as r,X as p,a as s,b as e}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([u])=>{var m=s`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-view-corner-radius: 0px;--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host,.hint,.error,.section,.actions,.item{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap);animation:esri-fade-in .25s ease-in-out}.error{color:var(--calcite-color-status-danger)}.error,.hint{overflow:hidden;p{margin:0;padding:0}}.results-grid{display:grid;column-gap:var(--calcite-spacing-xxs);row-gap:var(--calcite-spacing-md);grid-template-columns:auto minmax(0,1fr) max-content;&.vertical{display:flex;flex-direction:column;align-items:flex-start;.item{display:block}.title{margin-bottom:var(--calcite-spacing-xxs)}.value{align-self:flex-start}}}.item{display:contents;&.disabled>*{color:var(--calcite-color-text-1);opacity:var(--calcite-opacity-light)}}.title{grid-column:1;--calcite-label-margin-bottom: 0}.value{grid-column:2;font-weight:var(--calcite-font-weight-semibold);white-space:normal;min-width:0;max-width:100%;align-self:center;justify-self:flex-end;text-align:end;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;word-break:normal;text-wrap:pretty;&:has(~:empty){grid-column:span 2}~:empty{display:none}}.unit{font-weight:var(--calcite-font-weight-semibold);text-align:left;grid-column:3;align-self:center}.actions{justify-content:center;gap:var(--arcgis-internal-panel-actions-gap);&[hidden]{display:none}}`,n=class extends c{constructor(){super(...arguments),this._formatter=new u,this._baseId=l(),this._hasActionsContent=!1,this.layout="horizontal",this.items=[],this.state="disabled",this.unsupportedLabel=""}static{this.properties={_hasActionsContent:16,hintLabel:1,layout:1,items:0,state:1,unsupportedLabel:1}}static{this.styles=m}async load(){await this._formatter.when()}_actionsRef(a){this._updateHasActionsContent(a)}_updateHasActionsContent(a){this._hasActionsContent=a!=null&&a.assignedNodes({flatten:!0}).length>0}render(){switch(this.state){case"unsupported":return e`<section class="error"><p>${this.unsupportedLabel}</p></section>`;case"measuring":return e`<section class="hint"><p>${this.hintLabel}</p></section>`;case"ready":return this._renderActions();default:return e`<slot name=settings></slot>${d({idBase:this._baseId,formatter:this._formatter,items:this.items,layout:this.layout})}${this._renderActions()}`}}_renderActions(){return e`<div class="actions" .hidden=${!this._hasActionsContent}><slot name=actions @slotchange=${({currentTarget:a})=>{this._updateHasActionsContent(a)}} ${o(this._actionsRef)}></slot></div>`}};function d(t){return e`<section class=${r({"results-grid":!0,vertical:t.layout==="vertical"})}>${t.items.map((a,i)=>v({formatter:t.formatter,measurement:a.measurement,title:a.title,valueId:`${t.idBase}-item-${i}`}))}</section>`}function h(t){let[a="-",i=""]=t.value?.split(" ")??[];return e`<output aria-live=polite class="value">${a}</output><span class="unit">${i}</span>`}function v(t){let a=t.measurement.state==="available"?g(t.formatter,t.measurement.value):null;return e`<div class=${r({item:!0,disabled:t.measurement.state!=="available"})}><calcite-label layout=inline class="title" .for=${t.valueId}>${t.title??""}</calcite-label>${h({value:a})}</div>`}p("arcgis-measurement-content",n);return n},"applications/Components/QuantityFormatter")
2
+ import{h as g}from"./BAOWXZTE.js";import{B as l,O as o,P as c,R as r,X as p,a as s,b as e}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([u])=>{var m=s`:host{--arcgis-internal-color-black-30: color-mix(in srgb, #000000 30.2%, transparent);--arcgis-internal-box-shadow: var(--calcite-spacing-none) var(--calcite-spacing-px) var(--calcite-spacing-base) var(--arcgis-internal-color-black-30);--arcgis-internal-top-max-width: calc(min(100cqw, 100vw) - var(--calcite-spacing-xxxl));--arcgis-internal-panel-width: 300px;--arcgis-internal-panel-height: 100%;--arcgis-internal-panel-height-sm: 240px;--arcgis-internal-panel-height-md: 420px;--arcgis-internal-panel-height-lg: 540px;--arcgis-internal-panel-height-xl: 680px;--arcgis-internal-panel-gap: var(--calcite-spacing-lg);--arcgis-internal-panel-actions-gap: var(--calcite-spacing-sm);--arcgis-internal-basemap-gallery-width-lg: 450px;--arcgis-internal-collapse-icon-flip: scaleX(1);--arcgis-internal-row-direction: row;--arcgis-internal-legend-width: 300px;--arcgis-internal-layout-overlay-space-top: var(--arcgis-layout-overlay-space-top, 0px);--arcgis-internal-layout-overlay-space-bottom: var(--arcgis-layout-overlay-space-bottom, 0px);--arcgis-internal-layout-overlay-space-left: var(--arcgis-layout-overlay-space-left, 0px);--arcgis-internal-layout-overlay-space-right: var(--arcgis-layout-overlay-space-right, 0px);--arcgis-internal-view-color-focus: var(--arcgis-view-color-focus, var(--calcite-color-brand));--arcgis-internal-view-corner-radius: 0px;--arcgis-internal-attribution-space-bottom: var(--arcgis-internal-layout-overlay-space-bottom);--arcgis-internal-attribution-space-left: var(--arcgis-internal-layout-overlay-space-left);--arcgis-internal-attribution-space-right: var(--arcgis-internal-layout-overlay-space-right);--arcgis-internal-attribution-font-size: var(--calcite-font-size-sm);--arcgis-internal-attribution-font-size-sm: var(--calcite-font-size-xs);--arcgis-internal-sketch-justify-content: flex-start}:host,.hint,.error,.section,.actions,.item{display:flex;flex-direction:column;gap:var(--arcgis-internal-panel-gap);animation:esri-fade-in .25s ease-in-out}.error{color:var(--calcite-color-status-danger)}.error,.hint{overflow:hidden;p{margin:0;padding:0}}.results-grid{display:grid;column-gap:var(--calcite-spacing-xxs);row-gap:var(--calcite-spacing-md);grid-template-columns:auto minmax(0,1fr) max-content;&.vertical{display:flex;flex-direction:column;align-items:flex-start;.item{display:block}.title{margin-bottom:var(--calcite-spacing-xxs)}.value{align-self:flex-start}}}.item{display:contents;&.disabled>*{color:var(--calcite-color-text-1);opacity:var(--calcite-opacity-light)}}.title{grid-column:1;--calcite-label-margin-bottom: 0}.value{grid-column:2;font-weight:var(--calcite-font-weight-semibold);white-space:normal;min-width:0;max-width:100%;align-self:center;justify-self:flex-end;text-align:end;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;word-break:normal;text-wrap:pretty;&:has(~:empty){grid-column:span 2}~:empty{display:none}}.unit{font-weight:var(--calcite-font-weight-semibold);text-align:left;grid-column:3;align-self:center}.actions{justify-content:center;gap:var(--arcgis-internal-panel-actions-gap);&[hidden]{display:none}}`,n=class extends c{constructor(){super(...arguments),this._formatter=new u,this._baseId=l(),this._hasActionsContent=!1,this.layout="horizontal",this.items=[],this.state="disabled",this.unsupportedLabel=""}static{this.properties={_hasActionsContent:16,hintLabel:1,layout:1,items:0,state:1,unsupportedLabel:1}}static{this.styles=m}async load(){await this._formatter.when()}_actionsRef(a){this._updateHasActionsContent(a)}_updateHasActionsContent(a){this._hasActionsContent=a!=null&&a.assignedNodes({flatten:!0}).length>0}render(){switch(this.state){case"unsupported":return e`<section class="error"><p>${this.unsupportedLabel}</p></section>`;case"measuring":return e`<section class="hint"><p>${this.hintLabel}</p></section>`;case"ready":return this._renderActions();default:return e`<slot name=settings></slot>${d({idBase:this._baseId,formatter:this._formatter,items:this.items,layout:this.layout})}${this._renderActions()}`}}_renderActions(){return e`<div class="actions" .hidden=${!this._hasActionsContent}><slot name=actions @slotchange=${({currentTarget:a})=>{this._updateHasActionsContent(a)}} ${o(this._actionsRef)}></slot></div>`}};function d(t){return e`<section class=${r({"results-grid":!0,vertical:t.layout==="vertical"})}>${t.items.map((a,i)=>v({formatter:t.formatter,measurement:a.measurement,title:a.title,valueId:`${t.idBase}-item-${i}`}))}</section>`}function h(t){let[a="-",i=""]=t.value?.split(" ")??[];return e`<output aria-live=polite class="value">${a}</output><span class="unit">${i}</span>`}function v(t){let a=t.measurement.state==="available"?g(t.formatter,t.measurement.value):null;return e`<div class=${r({item:!0,disabled:t.measurement.state!=="available"})}><calcite-label layout=inline class="title" .for=${t.valueId}>${t.title??""}</calcite-label>${h({value:a})}</div>`}p("arcgis-measurement-content",n);return n},"applications/Components/QuantityFormatter")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as u}from"./VJVKFKSG.js";import{a as b}from"./7EMK74ZF.js";import{h as f}from"./6N7PM73F.js";import"./7IHIG427.js";import"./QUZTFUWM.js";import{c as A}from"./P2GMODLP.js";import{P as v,U as m,X as p,a as y,b as r,x as d}from"./33CM77ZT.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:w}])=>{var _=y`:host{--arcgis-internal-exploratory-analysis-width: fit-content;display:flex;justify-content:flex-end;width:var(--arcgis-internal-exploratory-analysis-width)}:host(:is([data-content-open],[show-heading])){--arcgis-internal-exploratory-analysis-width: var(--arcgis-internal-panel-width, 300px);calcite-panel{min-width:var(--arcgis-internal-panel-width, 300px)}calcite-action-bar{width:100%}}calcite-panel{flex:none}calcite-action-bar{width:fit-content}.selection-notice-container{padding:var(--calcite-spacing-md)}.selection-notice-list{margin-block:0;padding-inline-start:var(--calcite-spacing-lg)}.measurement-content{--arcgis-internal-padding: var(--calcite-space-md) var(--calcite-space-none);margin-block-end:var(--calcite-space-none)}.measurement-content,slot::slotted(*){width:100%}.footer{display:grid;grid-template-columns:1fr 2fr;gap:var(--calcite-spacing-md);width:100%}`,C=["arcgis-area-measurement-2d","arcgis-area-measurement-3d","arcgis-direct-line-measurement-3d","arcgis-distance-measurement-2d","arcgis-elevation-profile","arcgis-volume-measurement"];function $(a){return a?.state==="measuring"||a?.state==="creating"||a?.state==="selecting"}function h(a){return"messages"in a?a.messages?.componentLabel:a._messages?.componentLabel}var B=C.join(","),g=class extends v{constructor(){super(),this._messages=b({blocking:!0}),this.#i=!1,this.#t=new WeakMap,this._activeAnalysisHasInput=!1,this._measurements=[],this.autoDestroyDisabled=!1,this.autoStartDisabled=!1,this.closed=!1,this.icon="measure",this.preserveAnalysisOnChange=!1,this.requireActiveAnalysis=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showHeading=!1,this.arcgisClose=d(),this.arcgisPropertyChange=f()("activeAnalysis"),this.arcgisReady=d(),this.listen("arcgisPropertyChange",this.#r.bind(this)),this.listen("arcgisReady",this.#r.bind(this))}static{this.properties={_activeAnalysisHasInput:16,_activeAnalysisState:16,_measurements:16,activeAnalysis:1,autoDestroyDisabled:5,autoStartDisabled:5,closed:5,icon:1,messageOverrides:0,preserveAnalysisOnChange:5,requireActiveAnalysis:5,showCloseButton:5,showCollapseButton:5,showHeading:7}}static{this.styles=_}#a;#i;#t;#s;#n;#e;get activeAnalysis(){return this.#a}set activeAnalysis(s){this.#s=typeof s=="string"?s:void 0,this.#c(typeof s=="string"?this._measurements.find(e=>e.localName===s):s??void 0)}async destroy(){await this.manager.destroy()}load(){this.manager.onLifecycle(()=>(this.#o(),()=>{this.#e=u(this.#e),this.#n=void 0}))}async#l(){await this.activeAnalysis?.clear()}#m(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}async#u({target:s}){let e=Number(s.selectedActions.at(0)?.dataset.measurementIndex),i=this._measurements[e],n=this.activeAnalysis;if(i){if(i!==n&&(!this.preserveAnalysisOnChange||$(n))&&await this.#l(),this.#h(i),this.autoStartDisabled||i.interactionDisabled||this.preserveAnalysisOnChange&&i.analysis?.valid)return;await i.start()}else await this.#l(),this.#h(void 0)}#r(){this._activeAnalysisState=this.activeAnalysis?this.activeAnalysis.state??"disabled":void 0,this.#o(),this.#d(),this.requestUpdate()}#g({currentTarget:s}){let e=A(s,B),i=this._measurements.filter(t=>!e.includes(t));for(let t of i){let c=this.#t.get(t);t.hidden=c?.hidden??!1,t.hideStartButton=c?.hideStartButton??!1,"hideClearButton"in t&&(t.hideClearButton=c?.hideClearButton??!1),"hideHeader"in t&&(t.hideHeader=c?.hideHeader??!1),this.#t.delete(t)}for(let t of e)this.#t.has(t)||(this.#t.set(t,{hidden:t.hidden,hideClearButton:"hideClearButton"in t?t.hideClearButton:void 0,hideStartButton:t.hideStartButton,hideHeader:"hideHeader"in t?t.hideHeader:void 0}),t.componentOnReady().then(()=>{this.isConnected&&t.isConnected&&this._measurements.includes(t)&&this.requestUpdate()})),t.hideStartButton=!0,"hideClearButton"in t&&(t.hideClearButton=!0),"hideHeader"in t&&(t.hideHeader=!0);this._measurements=e;let n;this.#s&&(n=e.find(t=>t.localName===this.#s));let o;!this.#s&&e.length===1&&(o=e[0]);let l;this.#s?l=n:this.#i&&e.length>1?l=void 0:this.activeAnalysis&&e.includes(this.activeAnalysis)?l=this.activeAnalysis:l=o,this.#c(l),this.#i=!!o}#h(s){this.#s=void 0,this.#i=!1,this.#c(s)}#c(s){let e=this.#a;this.#a=s,this.el.toggleAttribute("data-content-open",!!s),this.requestUpdate("activeAnalysis",e),this.#y()}#y(){this._activeAnalysisState=this.activeAnalysis?this.activeAnalysis.state??"disabled":void 0,this.#o(),this.#d()}#d(){for(let s of this._measurements)s.hidden=s!==this.activeAnalysis||(this.#t.get(s)?.hidden??!1)||s===this.activeAnalysis&&this._activeAnalysisState==="ready"}async#v(){await this.activeAnalysis?.start()}#o(){let s=this.activeAnalysis?.analysis;if(!(s===this.#n&&(s==null||this.#e))){if(this.#e=u(this.#e),this.#n=s,!s){this._activeAnalysisHasInput=!1;return}this.#e=w(()=>s.valid,e=>this._activeAnalysisHasInput=e,{initial:!0,sync:!0})}}render(){let{showCloseButton:s,showCollapseButton:e,showHeading:i}=this,n=this._activeAnalysisState==="disabled",o=this._measurements.length>1,l=this.activeAnalysis?h(this.activeAnalysis):this._messages.componentLabel;return r`<calcite-panel .closed=${this.closed} .heading=${i?this._messages.componentLabel:void 0} .collapsible=${e} .closable=${s} @calcitePanelClose=${this.#m}><div .hidden=${!o}><calcite-action-bar expand-toggle-disabled layout=horizontal .overflowMode=${!i&&!this.activeAnalysis?"none":"collapse"}><calcite-action-group .label=${this._messages.toolbarLabel} @calciteActionGroupChange=${this.#u} .selectionMode=${this.requireActiveAnalysis?"single-persist":"single"}>${this._measurements.map((t,c)=>r`<calcite-action .active=${t===this.activeAnalysis} data-measurement-index=${c??m} .icon=${t.icon} .label=${h(t)} .text=${h(t)??""} title=${h(t)??m}></calcite-action>`)}</calcite-action-group></calcite-action-bar></div><div class="measurement-container" .hidden=${!this.activeAnalysis||n}><calcite-block class="measurement-content" .expanded=${this.isConnected&&!!this.activeAnalysis&&!n} .heading=${l}><slot @slotchange=${this.#g.bind(this)}></slot></calcite-block></div>${this.activeAnalysis?r`<div class="footer" slot=footer><calcite-button appearance=transparent .disabled=${!this._activeAnalysisHasInput} kind=danger @click=${this.#l} width=full>${this._messages.clear}</calcite-button><calcite-button .disabled=${this.activeAnalysis.interactionDisabled||this._activeAnalysisState!=="ready"&&!this._activeAnalysisHasInput} @click=${this.#v} width=full>${this.activeAnalysis?.matches("arcgis-elevation-profile")?this._messages.newProfile:this._messages.newMeasurement}</calcite-button></div>`:null}</calcite-panel>`}};p("arcgis-exploratory-analysis",g);return g},"core/reactiveUtils")
2
+ import{b as u}from"./VJVKFKSG.js";import{a as b}from"./ZUNVTMPM.js";import{h as f}from"./FMHP6L74.js";import"./PFPLJDX4.js";import"./QUZTFUWM.js";import{c as A}from"./K76CC5SU.js";import{P as v,U as m,X as p,a as y,b as r,x as d}from"./GZQ5S6OJ.js";import"./H6RQVSYM.js";export default $arcgis.t(([{watch:w}])=>{var _=y`:host{--arcgis-internal-exploratory-analysis-width: fit-content;display:flex;justify-content:flex-end;width:var(--arcgis-internal-exploratory-analysis-width)}:host(:is([data-content-open],[show-heading])){--arcgis-internal-exploratory-analysis-width: var(--arcgis-internal-panel-width, 300px);calcite-panel{min-width:var(--arcgis-internal-panel-width, 300px)}calcite-action-bar{width:100%}}calcite-panel{flex:none}calcite-action-bar{width:fit-content}.selection-notice-container{padding:var(--calcite-spacing-md)}.selection-notice-list{margin-block:0;padding-inline-start:var(--calcite-spacing-lg)}.measurement-content{--arcgis-internal-padding: var(--calcite-space-md) var(--calcite-space-none);margin-block-end:var(--calcite-space-none)}.measurement-content,slot::slotted(*){width:100%}.footer{display:grid;grid-template-columns:1fr 2fr;gap:var(--calcite-spacing-md);width:100%}`,C=["arcgis-area-measurement-2d","arcgis-area-measurement-3d","arcgis-direct-line-measurement-3d","arcgis-distance-measurement-2d","arcgis-elevation-profile","arcgis-volume-measurement"];function $(a){return a?.state==="measuring"||a?.state==="creating"||a?.state==="selecting"}function h(a){return"messages"in a?a.messages?.componentLabel:a._messages?.componentLabel}var B=C.join(","),g=class extends v{constructor(){super(),this._messages=b({blocking:!0}),this.#i=!1,this.#t=new WeakMap,this._activeAnalysisHasInput=!1,this._measurements=[],this.autoDestroyDisabled=!1,this.autoStartDisabled=!1,this.closed=!1,this.icon="measure",this.preserveAnalysisOnChange=!1,this.requireActiveAnalysis=!1,this.showCloseButton=!1,this.showCollapseButton=!1,this.showHeading=!1,this.arcgisClose=d(),this.arcgisPropertyChange=f()("activeAnalysis"),this.arcgisReady=d(),this.listen("arcgisPropertyChange",this.#r.bind(this)),this.listen("arcgisReady",this.#r.bind(this))}static{this.properties={_activeAnalysisHasInput:16,_activeAnalysisState:16,_measurements:16,activeAnalysis:1,autoDestroyDisabled:5,autoStartDisabled:5,closed:5,icon:1,messageOverrides:0,preserveAnalysisOnChange:5,requireActiveAnalysis:5,showCloseButton:5,showCollapseButton:5,showHeading:7}}static{this.styles=_}#a;#i;#t;#s;#n;#e;get activeAnalysis(){return this.#a}set activeAnalysis(s){this.#s=typeof s=="string"?s:void 0,this.#c(typeof s=="string"?this._measurements.find(e=>e.localName===s):s??void 0)}async destroy(){await this.manager.destroy()}load(){this.manager.onLifecycle(()=>(this.#o(),()=>{this.#e=u(this.#e),this.#n=void 0}))}async#l(){await this.activeAnalysis?.clear()}#m(){this.closed=!0,this.arcgisClose.emit(),this.autoDestroyDisabled||this.destroy()}async#u({target:s}){let e=Number(s.selectedActions.at(0)?.dataset.measurementIndex),i=this._measurements[e],n=this.activeAnalysis;if(i){if(i!==n&&(!this.preserveAnalysisOnChange||$(n))&&await this.#l(),this.#h(i),this.autoStartDisabled||i.interactionDisabled||this.preserveAnalysisOnChange&&i.analysis?.valid)return;await i.start()}else await this.#l(),this.#h(void 0)}#r(){this._activeAnalysisState=this.activeAnalysis?this.activeAnalysis.state??"disabled":void 0,this.#o(),this.#d(),this.requestUpdate()}#g({currentTarget:s}){let e=A(s,B),i=this._measurements.filter(t=>!e.includes(t));for(let t of i){let c=this.#t.get(t);t.hidden=c?.hidden??!1,t.hideStartButton=c?.hideStartButton??!1,"hideClearButton"in t&&(t.hideClearButton=c?.hideClearButton??!1),"hideHeader"in t&&(t.hideHeader=c?.hideHeader??!1),this.#t.delete(t)}for(let t of e)this.#t.has(t)||(this.#t.set(t,{hidden:t.hidden,hideClearButton:"hideClearButton"in t?t.hideClearButton:void 0,hideStartButton:t.hideStartButton,hideHeader:"hideHeader"in t?t.hideHeader:void 0}),t.componentOnReady().then(()=>{this.isConnected&&t.isConnected&&this._measurements.includes(t)&&this.requestUpdate()})),t.hideStartButton=!0,"hideClearButton"in t&&(t.hideClearButton=!0),"hideHeader"in t&&(t.hideHeader=!0);this._measurements=e;let n;this.#s&&(n=e.find(t=>t.localName===this.#s));let o;!this.#s&&e.length===1&&(o=e[0]);let l;this.#s?l=n:this.#i&&e.length>1?l=void 0:this.activeAnalysis&&e.includes(this.activeAnalysis)?l=this.activeAnalysis:l=o,this.#c(l),this.#i=!!o}#h(s){this.#s=void 0,this.#i=!1,this.#c(s)}#c(s){let e=this.#a;this.#a=s,this.el.toggleAttribute("data-content-open",!!s),this.requestUpdate("activeAnalysis",e),this.#y()}#y(){this._activeAnalysisState=this.activeAnalysis?this.activeAnalysis.state??"disabled":void 0,this.#o(),this.#d()}#d(){for(let s of this._measurements)s.hidden=s!==this.activeAnalysis||(this.#t.get(s)?.hidden??!1)||s===this.activeAnalysis&&this._activeAnalysisState==="ready"}async#v(){await this.activeAnalysis?.start()}#o(){let s=this.activeAnalysis?.analysis;if(!(s===this.#n&&(s==null||this.#e))){if(this.#e=u(this.#e),this.#n=s,!s){this._activeAnalysisHasInput=!1;return}this.#e=w(()=>s.valid,e=>this._activeAnalysisHasInput=e,{initial:!0,sync:!0})}}render(){let{showCloseButton:s,showCollapseButton:e,showHeading:i}=this,n=this._activeAnalysisState==="disabled",o=this._measurements.length>1,l=this.activeAnalysis?h(this.activeAnalysis):this._messages.componentLabel;return r`<calcite-panel .closed=${this.closed} .heading=${i?this._messages.componentLabel:void 0} .collapsible=${e} .closable=${s} @calcitePanelClose=${this.#m}><div .hidden=${!o}><calcite-action-bar expand-toggle-disabled layout=horizontal .overflowMode=${!i&&!this.activeAnalysis?"none":"collapse"}><calcite-action-group .label=${this._messages.toolbarLabel} @calciteActionGroupChange=${this.#u} .selectionMode=${this.requireActiveAnalysis?"single-persist":"single"}>${this._measurements.map((t,c)=>r`<calcite-action .active=${t===this.activeAnalysis} data-measurement-index=${c??m} .icon=${t.icon} .label=${h(t)} .text=${h(t)??""} title=${h(t)??m}></calcite-action>`)}</calcite-action-group></calcite-action-bar></div><div class="measurement-container" .hidden=${!this.activeAnalysis||n}><calcite-block class="measurement-content" .expanded=${this.isConnected&&!!this.activeAnalysis&&!n} .heading=${l}><slot @slotchange=${this.#g.bind(this)}></slot></calcite-block></div>${this.activeAnalysis?r`<div class="footer" slot=footer><calcite-button appearance=transparent .disabled=${!this._activeAnalysisHasInput} kind=danger @click=${this.#l} width=full>${this._messages.clear}</calcite-button><calcite-button .disabled=${this.activeAnalysis.interactionDisabled||this._activeAnalysisState!=="ready"&&!this._activeAnalysisHasInput} @click=${this.#v} width=full>${this.activeAnalysis?.matches("arcgis-elevation-profile")?this._messages.newProfile:this._messages.newMeasurement}</calcite-button></div>`:null}</calcite-panel>`}};p("arcgis-exploratory-analysis",g);return g},"core/reactiveUtils")