@esri/solutions-components 1.0.0-next.20250603.1 → 1.0.0-next.20250604

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 (400) hide show
  1. package/dist/cdn/{FV7CWXXA.js → 2AFE7E7M.js} +2 -2
  2. package/dist/cdn/{KC4DY2HC.js → 2B5FSZQH.js} +2 -2
  3. package/dist/cdn/{KVQYP6QO.js → 2EM743GZ.js} +2 -2
  4. package/dist/cdn/{DUX7RIHF.js → 2K5LERLJ.js} +2 -2
  5. package/dist/cdn/{AKWYDDKA.js → 2KM6GVBX.js} +2 -2
  6. package/dist/cdn/{KOY2DGQB.js → 2MYQP6Y5.js} +2 -2
  7. package/dist/cdn/{LYOVCHLV.js → 2WSY3VK5.js} +2 -2
  8. package/dist/cdn/{SEJNBKC3.js → 2WTLR7AF.js} +2 -2
  9. package/dist/cdn/{7QH32TZC.js → 2ZYEO4QU.js} +2 -2
  10. package/dist/cdn/345MWWXW.js +4 -0
  11. package/dist/cdn/3ELXMEAJ.js +4 -0
  12. package/dist/cdn/{BUGW2FJW.js → 3ML7QFWK.js} +1 -1
  13. package/dist/cdn/{WOGXYHTW.js → 3OXV4AIJ.js} +1 -1
  14. package/dist/cdn/{7MLUC4ZF.js → 3R6FI5UM.js} +2 -2
  15. package/dist/cdn/{NTM7VXP2.js → 3UOZA57X.js} +2 -2
  16. package/dist/cdn/{3OHXXSQC.js → 42G7HHTM.js} +2 -2
  17. package/dist/cdn/{5IJJO4LY.js → 47H5FO7V.js} +2 -2
  18. package/dist/cdn/{F6ZVXJY4.js → 47T4MQZM.js} +2 -2
  19. package/dist/cdn/{GGLOL5YA.js → 4ALXTQ7N.js} +2 -2
  20. package/dist/cdn/{QGGEZQ5P.js → 4E3IKHTV.js} +1 -1
  21. package/dist/cdn/{3I5XCDRF.js → 4FSK32YK.js} +2 -2
  22. package/dist/cdn/{JDLIQP26.js → 4Q5U26MM.js} +1 -1
  23. package/dist/cdn/{XOWZ4LD3.js → 4X3BLJYO.js} +2 -2
  24. package/dist/cdn/{TXPPQ5K7.js → 54BQVAZQ.js} +1 -1
  25. package/dist/cdn/{QXLE5FAV.js → 55ER3JZZ.js} +1 -1
  26. package/dist/cdn/{ZZ5CPOFT.js → 5EGJZQNO.js} +2 -2
  27. package/dist/cdn/{HQRD3W3T.js → 5IXEWYS7.js} +2 -2
  28. package/dist/cdn/{BMKFZOGZ.js → 5JZHSF5Q.js} +1 -1
  29. package/dist/cdn/{SXDVITDW.js → 5NTBUHXP.js} +2 -2
  30. package/dist/cdn/{GSFDUUIV.js → 5TTXDO2X.js} +2 -2
  31. package/dist/cdn/5UYYGX3U.js +4 -0
  32. package/dist/cdn/{CPPGBHGB.js → 5WSSG5DQ.js} +2 -2
  33. package/dist/cdn/{RRTZSCHT.js → 5ZN3LDSR.js} +2 -2
  34. package/dist/cdn/{E2JMZPHI.js → 63FJFV7Z.js} +2 -2
  35. package/dist/cdn/{7OBFFSGV.js → 6426ECPL.js} +2 -2
  36. package/dist/cdn/{JMFIHU24.js → 6FMYJDB3.js} +2 -2
  37. package/dist/cdn/{F4ZGDGM4.js → 6GI4INVZ.js} +2 -2
  38. package/dist/cdn/{YSQPEWEY.js → 6KZH4YCI.js} +1 -1
  39. package/dist/cdn/{G4AY2BY2.js → 6LFV2GIT.js} +1 -1
  40. package/dist/cdn/{XASSYP2N.js → 6QFHZ3JL.js} +2 -2
  41. package/dist/cdn/6UX6KQVQ.js +4 -0
  42. package/dist/cdn/{F6ZZOQ45.js → 6XIFWTU3.js} +2 -2
  43. package/dist/cdn/{47FBP4UH.js → 6XXYDAON.js} +2 -2
  44. package/dist/cdn/{OHFEEKIB.js → 6YLZDF5Z.js} +2 -2
  45. package/dist/cdn/{57F2XN77.js → 73M3K3MB.js} +1 -1
  46. package/dist/cdn/{TYS4GUXP.js → 76BAM4JD.js} +2 -2
  47. package/dist/cdn/{7B72B7FY.js → 7AYXAEZ4.js} +4 -4
  48. package/dist/cdn/{V5XXUD57.js → 7D3QOJHZ.js} +2 -2
  49. package/dist/cdn/{O7J65UZA.js → 7MJFKTU3.js} +1 -1
  50. package/dist/cdn/{LJN277XH.js → 7MXFY5SO.js} +1 -1
  51. package/dist/cdn/{2YSLDCYN.js → 7TR632PO.js} +2 -2
  52. package/dist/cdn/{DVCGX7AQ.js → 7UF7ASVK.js} +2 -2
  53. package/dist/cdn/{5V42POES.js → 7VUGOBSM.js} +2 -2
  54. package/dist/cdn/{HUY2NQF2.js → AC6N4APV.js} +1 -1
  55. package/dist/cdn/{QPNW6P3H.js → ADCN5EQ6.js} +2 -2
  56. package/dist/cdn/AEPIDWNF.js +4 -0
  57. package/dist/cdn/{HE6RDTLW.js → AF677W6B.js} +2 -2
  58. package/dist/cdn/{MPV7FCIF.js → ALD6NWTO.js} +2 -2
  59. package/dist/cdn/{VONL6KBY.js → ALLFENVH.js} +2 -2
  60. package/dist/cdn/{3JEMJ2EV.js → AMWVUVI2.js} +2 -2
  61. package/dist/cdn/{BB5THTK5.js → ANWOHFXY.js} +2 -2
  62. package/dist/cdn/ARCAXJNI.js +4 -0
  63. package/dist/cdn/{YLMFQSC4.js → AWTEJER6.js} +2 -2
  64. package/dist/cdn/{BTMSD3FY.js → B24P555R.js} +2 -2
  65. package/dist/cdn/{M7NNYPVJ.js → B5IEC4IT.js} +2 -2
  66. package/dist/cdn/{T3AWV5HU.js → BE5PQLO3.js} +2 -2
  67. package/dist/cdn/{CGPIDLBY.js → BGMGLS3V.js} +2 -2
  68. package/dist/cdn/{3M72CEYO.js → BIUFSOZZ.js} +2 -2
  69. package/dist/cdn/{YZMGJ7SM.js → BPGVSHQW.js} +2 -2
  70. package/dist/cdn/{EJKR2ZHP.js → BS33EVAP.js} +2 -2
  71. package/dist/cdn/{TT5NLCZ7.js → CB6KYK3A.js} +2 -2
  72. package/dist/cdn/{23TE6EVK.js → CEJDTHNZ.js} +1 -1
  73. package/dist/cdn/{IFGU7UKD.js → CJNGBIUI.js} +2 -2
  74. package/dist/cdn/{4FJC45LY.js → CNEWKYEJ.js} +2 -2
  75. package/dist/cdn/{2I5J5JBB.js → CRZVA7XS.js} +2 -2
  76. package/dist/cdn/CTJUD4LO.js +4 -0
  77. package/dist/cdn/{DS2RXS3N.js → CTUCKF3P.js} +2 -2
  78. package/dist/cdn/{WUYXX4RA.js → CWNIFA6D.js} +1 -1
  79. package/dist/cdn/{CUB7E2CZ.js → CYNBZWVT.js} +1 -1
  80. package/dist/cdn/{HIFJRRQY.js → D2PEMAQB.js} +2 -2
  81. package/dist/cdn/{LJ67HDLQ.js → D4RSDPZE.js} +2 -2
  82. package/dist/cdn/{7FBWIG3K.js → D7NBVCTF.js} +2 -2
  83. package/dist/cdn/{JTT7WLPJ.js → DEOYLAEF.js} +2 -2
  84. package/dist/cdn/{7RAFMZMY.js → DQF7T3WP.js} +2 -2
  85. package/dist/cdn/{MEWYK3DQ.js → DR4VMI7G.js} +2 -2
  86. package/dist/cdn/{FAXNU5CL.js → E6UHW6W4.js} +1 -1
  87. package/dist/cdn/{23KRBWNX.js → E7CZ4ZJ7.js} +1 -1
  88. package/dist/cdn/{LZ67DRAD.js → EMDO67DU.js} +3 -3
  89. package/dist/cdn/{GD22AZGD.js → EMZ6RPP3.js} +2 -2
  90. package/dist/cdn/{VNMQ4LFX.js → EOMS3F3L.js} +2 -2
  91. package/dist/cdn/{D6S3BMVV.js → ERW3YZU6.js} +1 -1
  92. package/dist/cdn/{YN72HJN7.js → ETSHTE72.js} +2 -2
  93. package/dist/cdn/{WEJIR3KC.js → F4VOMVZI.js} +2 -2
  94. package/dist/cdn/{O3MMCKSZ.js → FCYQRR3U.js} +2 -2
  95. package/dist/cdn/{BKEUB7D6.js → FHUPZXRA.js} +2 -2
  96. package/dist/cdn/{OBH5D5B3.js → FJ6RGFDH.js} +2 -2
  97. package/dist/cdn/{M2LFTGSG.js → FLHA6SUG.js} +2 -2
  98. package/dist/cdn/{DTQTQMKB.js → FQLSHIBF.js} +1 -1
  99. package/dist/cdn/GEVOY2L5.js +18 -0
  100. package/dist/cdn/{JHZMQC26.js → GJ2KTUEU.js} +2 -2
  101. package/dist/cdn/GMCLBVIJ.js +25 -0
  102. package/dist/cdn/GMPQXS6C.js +4 -0
  103. package/dist/cdn/{YT5JSWCJ.js → GNROCWA2.js} +2 -2
  104. package/dist/cdn/{BXWG6ASU.js → GV4VMWZC.js} +2 -2
  105. package/dist/cdn/{TM4VLUD7.js → GX6G4BFZ.js} +1 -1
  106. package/dist/cdn/{HM3EFLFF.js → GXKZH3J4.js} +2 -2
  107. package/dist/cdn/{AJIFFKGX.js → GZEPT2M3.js} +2 -2
  108. package/dist/cdn/H6KJVVW5.js +18 -0
  109. package/dist/cdn/{5ANAYW5P.js → HFUW7B3U.js} +2 -2
  110. package/dist/cdn/{N55W5Z4W.js → HLWVXTFA.js} +2 -2
  111. package/dist/cdn/{R475XUMQ.js → HPWA6TTI.js} +2 -2
  112. package/dist/cdn/{PZYR43RF.js → HQKIH26Q.js} +1 -1
  113. package/dist/cdn/{6YSPEIYA.js → HQOSEDMS.js} +2 -2
  114. package/dist/cdn/{YOUICQQX.js → HUNK6CQY.js} +2 -2
  115. package/dist/cdn/{ZTYNAGFP.js → HWXLPBZH.js} +2 -2
  116. package/dist/cdn/{FBUSWZJT.js → I2DY4IS2.js} +2 -2
  117. package/dist/cdn/{E236QMQ7.js → I2YEFWJ6.js} +2 -2
  118. package/dist/cdn/{Y5NSXWTE.js → I5NHFG7C.js} +2 -2
  119. package/dist/cdn/{XX372MHT.js → IACEMZB4.js} +2 -2
  120. package/dist/cdn/IAV6RAUX.js +18 -0
  121. package/dist/cdn/{JK3NLT2O.js → ICYWQWLJ.js} +2 -2
  122. package/dist/cdn/{HVBM4D6S.js → IE2Z57EL.js} +1 -1
  123. package/dist/cdn/{OVZLS4VM.js → IJRPDGUW.js} +1 -1
  124. package/dist/cdn/{T2KSGTVF.js → IPTJRUEL.js} +2 -2
  125. package/dist/cdn/{FI7VCDS7.js → IWLSOPNU.js} +2 -2
  126. package/dist/cdn/{DGMABTNK.js → IY5MA5TQ.js} +2 -2
  127. package/dist/cdn/{GNMYTB4B.js → J2IBVR4K.js} +2 -2
  128. package/dist/cdn/{UBMKB36W.js → JMLCAWVB.js} +2 -2
  129. package/dist/cdn/{NXZVUBHX.js → JMXRRM2J.js} +2 -2
  130. package/dist/cdn/{LZWGO4KG.js → JUUBSWSN.js} +2 -2
  131. package/dist/cdn/{7IJWIQKS.js → JVV2LRKV.js} +2 -2
  132. package/dist/cdn/{H2QIWGB3.js → JYGS22BT.js} +2 -2
  133. package/dist/cdn/{IJOJIH2Q.js → JYHFFQPV.js} +2 -2
  134. package/dist/cdn/{K22YDYDF.js → K4J7ONE5.js} +1 -1
  135. package/dist/cdn/K4LNUMMZ.js +18 -0
  136. package/dist/cdn/{3FD4XRIR.js → K54F34MD.js} +2 -2
  137. package/dist/cdn/{K5GUPAGQ.js → K7MDBVZ5.js} +2 -2
  138. package/dist/cdn/{62PWRVOA.js → KAN7CBK7.js} +1 -1
  139. package/dist/cdn/{4NKQ4OHH.js → KBJOJOJ4.js} +1 -1
  140. package/dist/cdn/{PHRFHM2D.js → KCGRRB43.js} +2 -2
  141. package/dist/cdn/{IUKY4AJJ.js → KCQU26AE.js} +2 -2
  142. package/dist/cdn/{6RLLS3XZ.js → KEJK7WEU.js} +2 -2
  143. package/dist/cdn/KGNJ2Y2O.js +4 -0
  144. package/dist/cdn/{XPLFSIZL.js → KKS7II75.js} +2 -2
  145. package/dist/cdn/{DHEXYRM4.js → KNAH23B5.js} +2 -2
  146. package/dist/cdn/{AAE7EK4I.js → KSWXMOC6.js} +2 -2
  147. package/dist/cdn/{5BB6ZTVD.js → KYOJO322.js} +2 -2
  148. package/dist/cdn/L3EOUKGK.js +4 -0
  149. package/dist/cdn/{GDVWCARK.js → L6CZXSW3.js} +2 -2
  150. package/dist/cdn/{OUXGXK3J.js → LACXORO5.js} +1 -1
  151. package/dist/cdn/{KHYYZCSF.js → LFDYLJKA.js} +1 -1
  152. package/dist/cdn/{K2N3GFEJ.js → LKWWHXOA.js} +2 -2
  153. package/dist/cdn/{SYKOTABZ.js → LNP7R5ZI.js} +2 -2
  154. package/dist/cdn/{ZMEBOR2G.js → LPK5NKSR.js} +2 -2
  155. package/dist/cdn/{ADABT6KF.js → LSZWLE7J.js} +2 -2
  156. package/dist/cdn/{A5OGKGEV.js → LTRG7P5T.js} +2 -2
  157. package/dist/cdn/{7SBXAJO4.js → LYGETQIB.js} +2 -2
  158. package/dist/cdn/{XH7TNO6J.js → M2XRDDQA.js} +2 -2
  159. package/dist/cdn/{K6H6OHMX.js → M3IMWYAR.js} +2 -2
  160. package/dist/cdn/{EPT2WH3D.js → M5375MUO.js} +2 -2
  161. package/dist/cdn/{2VPGZ7E2.js → MABGXJJX.js} +2 -2
  162. package/dist/cdn/{KGUBXPVQ.js → MHW7GG43.js} +2 -2
  163. package/dist/cdn/{ZVLVAUCM.js → MMGAOSLP.js} +1 -1
  164. package/dist/cdn/{UYNSQSTA.js → MT4W2VSR.js} +2 -2
  165. package/dist/cdn/{XAABPBEY.js → MTDTWNGL.js} +2 -2
  166. package/dist/cdn/{6A4RAOPS.js → MWHO4QDE.js} +2 -2
  167. package/dist/cdn/{LQSN4MQB.js → MXJ7JORF.js} +2 -2
  168. package/dist/cdn/{TW3LKPAL.js → NBTA2YSB.js} +2 -2
  169. package/dist/cdn/{JRBPHSAK.js → NDYM7KNN.js} +2 -2
  170. package/dist/cdn/{E43HBSTM.js → NG7FCMTK.js} +2 -2
  171. package/dist/cdn/{HFPFPCEQ.js → NKQJ45UL.js} +2 -2
  172. package/dist/cdn/{ALV5KMDH.js → NKVMRM3O.js} +2 -2
  173. package/dist/cdn/NMCGBOOO.js +4 -0
  174. package/dist/cdn/{6B26NMRD.js → NOWWSO43.js} +2 -2
  175. package/dist/cdn/{MTIUYXWA.js → NQMT3ZM2.js} +2 -2
  176. package/dist/cdn/{P4NNQGNZ.js → NVZPOTDK.js} +2 -2
  177. package/dist/cdn/{G4WB3PBR.js → NYPIOWTH.js} +2 -2
  178. package/dist/cdn/{QLHC6CPF.js → O5TASUMK.js} +2 -2
  179. package/dist/cdn/{S7I5NQIT.js → O6YU35I2.js} +2 -2
  180. package/dist/cdn/{4MPZW2AH.js → OGMFH36G.js} +2 -2
  181. package/dist/cdn/{B7V2TCV2.js → OHULOUJ7.js} +1 -1
  182. package/dist/cdn/{RCPW7BND.js → OI44SOUH.js} +2 -2
  183. package/dist/cdn/{H7LE3225.js → OJALXFPS.js} +2 -2
  184. package/dist/cdn/OQ4ARNXB.js +4 -0
  185. package/dist/cdn/{UY4MNUVT.js → OT3LBEYQ.js} +2 -2
  186. package/dist/cdn/{EZJUU4SD.js → OVYTYWMG.js} +2 -2
  187. package/dist/cdn/{SO2MJYUC.js → OWQIRWGB.js} +2 -2
  188. package/dist/cdn/{5X7D5OFH.js → OXHYCHE7.js} +3 -3
  189. package/dist/cdn/{LXCV6LJ6.js → OZDEHP24.js} +1 -1
  190. package/dist/cdn/{W22GLIX6.js → P3JN7YAP.js} +2 -2
  191. package/dist/cdn/{7H4LF6S3.js → PBE7PDSN.js} +2 -2
  192. package/dist/cdn/{KI6QHNPI.js → PCE2GNPD.js} +1 -1
  193. package/dist/cdn/{3DYJ4FTG.js → PDQQ3CKY.js} +1 -1
  194. package/dist/cdn/{5DNXV7XL.js → PODWXGKR.js} +2 -2
  195. package/dist/cdn/{XG3GBQPB.js → PPLIT4QW.js} +2 -2
  196. package/dist/cdn/{KY25YQM3.js → Q2UDHSAN.js} +2 -2
  197. package/dist/cdn/{NOPVFUIA.js → Q65D6PKP.js} +2 -2
  198. package/dist/cdn/{AE2GFHQI.js → QBEPAEZG.js} +2 -2
  199. package/dist/cdn/{MLZAIX3K.js → QH4CLBMI.js} +2 -2
  200. package/dist/cdn/{DDHWUUM5.js → QHAATBTL.js} +2 -2
  201. package/dist/cdn/{KDBUQPCS.js → QLBAKOYA.js} +2 -2
  202. package/dist/cdn/{BWIARGK3.js → QOKOI3NT.js} +2 -2
  203. package/dist/cdn/{BXQLGQ6O.js → QU5VIRGY.js} +2 -2
  204. package/dist/cdn/{MCDQUORV.js → QU6MV2R4.js} +2 -2
  205. package/dist/cdn/{ZQ2HPN3W.js → R3KXDLBC.js} +2 -2
  206. package/dist/cdn/R3QDSUMS.js +4 -0
  207. package/dist/cdn/{H77AUDKG.js → RAOR6DNG.js} +2 -2
  208. package/dist/cdn/{WX6NTYZO.js → RIR7ISEG.js} +2 -2
  209. package/dist/cdn/{4HECS3TA.js → RJVPADY4.js} +2 -2
  210. package/dist/cdn/{PGSEOWFX.js → RN47VRJO.js} +2 -2
  211. package/dist/cdn/{ALIHQ2MF.js → ROJ6UXWC.js} +2 -2
  212. package/dist/cdn/RTQCBY45.js +4 -0
  213. package/dist/cdn/{WGO54NYU.js → RTSUY2Q2.js} +2 -2
  214. package/dist/cdn/{WPA4NXXH.js → RZLD7GPX.js} +2 -2
  215. package/dist/cdn/{UTKAQVP4.js → SCCCHUE7.js} +2 -2
  216. package/dist/cdn/{MPQ4CIM7.js → SCFIKT66.js} +2 -2
  217. package/dist/cdn/{K6752QH3.js → SQ72UPK3.js} +2 -2
  218. package/dist/cdn/{FEK5UIIE.js → SU7JDERD.js} +2 -2
  219. package/dist/cdn/{2K7BLOL6.js → T7EW26WY.js} +2 -2
  220. package/dist/cdn/{EJJPCG36.js → TA4R7WKW.js} +2 -2
  221. package/dist/cdn/{IUO3RQBY.js → TAE7C5OI.js} +2 -2
  222. package/dist/cdn/{YDN7DHK5.js → THV4VHVL.js} +2 -2
  223. package/dist/cdn/{HUHVTN5N.js → TLBLKOSP.js} +2 -2
  224. package/dist/cdn/{QVAA7UWM.js → TOGUBI36.js} +2 -2
  225. package/dist/cdn/{23JUUYFN.js → TPT5GHCA.js} +2 -2
  226. package/dist/cdn/{ZJZRCIO6.js → TR24DOO4.js} +2 -2
  227. package/dist/cdn/{DP4HUTJB.js → TTKYUHNY.js} +2 -2
  228. package/dist/cdn/{USVRA2PF.js → TXLHJXSD.js} +2 -2
  229. package/dist/cdn/{LAARQ3SC.js → UCHW2VOH.js} +2 -2
  230. package/dist/cdn/{ZIZWR2E2.js → UGHIR2H5.js} +2 -2
  231. package/dist/cdn/{XDB2IAAB.js → UJNLCDAP.js} +2 -2
  232. package/dist/cdn/{JEXYLSPT.js → UQKWMKYX.js} +2 -2
  233. package/dist/cdn/{G25UYWU2.js → USOHU6ZJ.js} +2 -2
  234. package/dist/cdn/{CKP5NRSZ.js → USVH5XRC.js} +2 -2
  235. package/dist/cdn/{WTVJEJOH.js → UUYHFCW4.js} +2 -2
  236. package/dist/cdn/{VGUIEWXD.js → UXMQRK5S.js} +1 -1
  237. package/dist/cdn/{VQKLQBOO.js → UZS6KXNI.js} +2 -2
  238. package/dist/cdn/{DVOJAUT5.js → V7G2AU5A.js} +2 -2
  239. package/dist/cdn/{WINQVMKE.js → VGFMPJPG.js} +3 -3
  240. package/dist/cdn/{TWSVZ4MU.js → VNATQD74.js} +2 -2
  241. package/dist/cdn/VQ7R4YV2.js +4 -0
  242. package/dist/cdn/{Z642X5R6.js → VSXWXDUG.js} +2 -2
  243. package/dist/cdn/{FRU4NUKP.js → VT5P4INT.js} +1 -1
  244. package/dist/cdn/{NJDPBF7U.js → WICNCAEP.js} +2 -2
  245. package/dist/cdn/{ZBRMQKPX.js → WNZMO54V.js} +2 -2
  246. package/dist/cdn/{LO5XB3CJ.js → X3ULYFMR.js} +2 -2
  247. package/dist/cdn/{7OOX6EYU.js → X3XUCW5D.js} +2 -2
  248. package/dist/cdn/{OMQTD6W4.js → XC55JAZC.js} +2 -2
  249. package/dist/cdn/{XIH6ZMGJ.js → XC5VKQJJ.js} +1 -1
  250. package/dist/cdn/{2NRHRJMW.js → XD7HIK35.js} +2 -2
  251. package/dist/cdn/{CZPQYOMC.js → XIROVWXB.js} +1 -1
  252. package/dist/cdn/{6YVXLIWR.js → XISD2FJX.js} +2 -2
  253. package/dist/cdn/{IAM2GWWY.js → XPSM5W4L.js} +2 -2
  254. package/dist/cdn/{QHY3HOJZ.js → XWJ5XRDA.js} +1 -1
  255. package/dist/cdn/{YEYDGCMG.js → XWT4JOO6.js} +2 -2
  256. package/dist/cdn/{B7C2SG7U.js → Y2TYQRMX.js} +2 -2
  257. package/dist/cdn/{45GEUPJR.js → Y2XCXPZJ.js} +1 -1
  258. package/dist/cdn/{55EOCAZO.js → Y4ZIUU3O.js} +2 -2
  259. package/dist/cdn/{IEKYGBCE.js → Y53CA6HP.js} +2 -2
  260. package/dist/cdn/{U6HIPEIC.js → YA4UNEDL.js} +2 -2
  261. package/dist/cdn/{NCWTGVLS.js → YKLMVODS.js} +2 -2
  262. package/dist/cdn/{AAOA4QBP.js → YL7XZAGN.js} +2 -2
  263. package/dist/cdn/{ABYYFXA3.js → YN6OX32H.js} +2 -2
  264. package/dist/cdn/{26OF6DOI.js → YNIZ4XXM.js} +2 -2
  265. package/dist/cdn/YRGOM6Q5.js +4 -0
  266. package/dist/cdn/{QX2LVJEP.js → YWL5BSMR.js} +2 -2
  267. package/dist/cdn/{LW67Q7U3.js → Z2XU5LLK.js} +2 -2
  268. package/dist/cdn/Z4R46WXZ.js +4 -0
  269. package/dist/cdn/{SVF5ULXK.js → Z56WHDSU.js} +2 -2
  270. package/dist/cdn/{YBGWD4DE.js → Z7JJZ3FM.js} +2 -2
  271. package/dist/cdn/{Y3ESQQEV.js → ZCRJUKEL.js} +2 -2
  272. package/dist/cdn/{6H5BLERA.js → ZFQHFXDO.js} +2 -2
  273. package/dist/cdn/{Y2WO5VQQ.js → ZHGAX6R3.js} +2 -2
  274. package/dist/cdn/{KT3PTRZ6.js → ZPVOBCSG.js} +2 -2
  275. package/dist/cdn/{6P4GVMOZ.js → ZTMR6MQW.js} +2 -2
  276. package/dist/cdn/{XN5ERJUX.js → ZUBYVBHB.js} +2 -2
  277. package/dist/cdn/{ZSIMORYA.js → ZVSE3IZ4.js} +2 -2
  278. package/dist/cdn/index.js +2 -2
  279. package/dist/chunks/Auth.js +1 -1
  280. package/dist/chunks/cardFetchingUtils.js +1 -1
  281. package/dist/chunks/common.js +1 -1
  282. package/dist/chunks/deployAppContexts.js +1 -1
  283. package/dist/chunks/downloadUtils.js +1 -1
  284. package/dist/chunks/index.js +1 -1
  285. package/dist/chunks/interfaces.js +1 -1
  286. package/dist/chunks/loadModules.js +1 -1
  287. package/dist/chunks/mapViewUtils.js +1 -1
  288. package/dist/chunks/pciUtils.js +1 -1
  289. package/dist/chunks/popupUtils.js +1 -1
  290. package/dist/chunks/publicNotificationStore.js +1 -1
  291. package/dist/chunks/queryUtils.js +1 -1
  292. package/dist/chunks/runtime.js +1 -1
  293. package/dist/chunks/solution-store.js +1 -1
  294. package/dist/chunks/templates.js +1 -1
  295. package/dist/chunks/useT9n.js +1 -1
  296. package/dist/components/arcgis-solutions-assistant/customElement.js +1 -1
  297. package/dist/components/basemap-gallery/customElement.js +1 -1
  298. package/dist/components/buffer-tools/customElement.js +1 -1
  299. package/dist/components/card-manager/customElement.js +1 -1
  300. package/dist/components/consent-manager/customElement.js +2035 -2009
  301. package/dist/components/create-feature/customElement.js +1 -1
  302. package/dist/components/create-related-feature/customElement.js +1 -1
  303. package/dist/components/crowdsource-manager/customElement.js +7 -9
  304. package/dist/components/crowdsource-reporter/customElement.js +2 -2
  305. package/dist/components/deduct-calculator/customElement.js +1 -1
  306. package/dist/components/delete-button/customElement.js +1 -1
  307. package/dist/components/delete-dialog/customElement.js +1 -1
  308. package/dist/components/edit-card/customElement.js +1 -1
  309. package/dist/components/feature-details/customElement.js +1 -1
  310. package/dist/components/feature-list/customElement.js +1 -1
  311. package/dist/components/field-selection/customElement.js +1 -1
  312. package/dist/components/floor-filter/customElement.js +1 -1
  313. package/dist/components/info-card/customElement.js +1 -1
  314. package/dist/components/json-editor/customElement.js +1 -1
  315. package/dist/components/layer-list/customElement.js +1 -1
  316. package/dist/components/layer-table/customElement.js +35 -37
  317. package/dist/components/layer-table/index.d.ts +0 -1
  318. package/dist/components/layer-table/index.js +0 -1
  319. package/dist/components/map-card/customElement.d.ts +8 -0
  320. package/dist/components/map-card/customElement.js +41 -36
  321. package/dist/components/map-draw-tools/customElement.js +1 -1
  322. package/dist/components/map-fullscreen/customElement.js +1 -1
  323. package/dist/components/map-layer-picker/customElement.js +6 -2
  324. package/dist/components/map-legend/customElement.js +1 -1
  325. package/dist/components/map-picker/customElement.js +1 -1
  326. package/dist/components/map-search/customElement.js +1 -1
  327. package/dist/components/map-select-tools/customElement.js +1 -1
  328. package/dist/components/map-tools/customElement.js +2 -2
  329. package/dist/components/pci-calculator/customElement.js +1 -1
  330. package/dist/components/pdf-download/customElement.js +1 -1
  331. package/dist/components/public-notification/customElement.js +1 -1
  332. package/dist/components/refine-selection/customElement.js +1 -1
  333. package/dist/components/selection-tool/customElement.js +1 -1
  334. package/dist/components/solution-article-card/customElement.js +1 -1
  335. package/dist/components/solution-configuration/customElement.js +1 -1
  336. package/dist/components/solution-configure-panel/customElement.js +1 -1
  337. package/dist/components/solution-configure-titles/customElement.js +1 -1
  338. package/dist/components/solution-contents/customElement.js +1 -1
  339. package/dist/components/solution-delete-dialog/customElement.js +1 -1
  340. package/dist/components/solution-deploy-dialog/customElement.js +1 -1
  341. package/dist/components/solution-deploy-panel/customElement.js +1 -1
  342. package/dist/components/solution-deployed-card/customElement.js +1 -1
  343. package/dist/components/solution-deploying-panel/customElement.js +1 -1
  344. package/dist/components/solution-details-card/customElement.js +1 -1
  345. package/dist/components/solution-details-panel/customElement.js +1 -1
  346. package/dist/components/solution-item/customElement.js +1 -1
  347. package/dist/components/solution-item-accordion/customElement.js +1 -1
  348. package/dist/components/solution-item-details/customElement.js +1 -1
  349. package/dist/components/solution-item-icon/customElement.js +1 -1
  350. package/dist/components/solution-item-sharing/customElement.js +1 -1
  351. package/dist/components/solution-items-diagram/customElement.js +1 -1
  352. package/dist/components/solution-organization-variables/customElement.js +1 -1
  353. package/dist/components/solution-resource-item/customElement.js +1 -1
  354. package/dist/components/solution-snapshot-gallery/customElement.js +1 -1
  355. package/dist/components/solution-spatial-ref/customElement.js +1 -1
  356. package/dist/components/solution-template-data/customElement.js +1 -1
  357. package/dist/components/solution-variables/customElement.js +1 -1
  358. package/dist/components/solutions-all-panel/customElement.js +1 -1
  359. package/dist/components/solutions-all-shell/customElement.js +1 -1
  360. package/dist/components/solutions-article-panel/customElement.js +1 -1
  361. package/dist/components/solutions-articles/customElement.js +1 -1
  362. package/dist/components/solutions-articles-shell/customElement.js +1 -1
  363. package/dist/components/solutions-deployed-panel/customElement.js +1 -1
  364. package/dist/components/solutions-deployed-shell/customElement.js +1 -1
  365. package/dist/components/solutions-filter-panel/customElement.js +1 -1
  366. package/dist/components/spatial-ref/customElement.js +1 -1
  367. package/dist/components/store-manager/customElement.js +1 -1
  368. package/dist/docs/api.json +47 -2
  369. package/dist/docs/docs.json +44 -2
  370. package/dist/docs/vscode.html-custom-data.json +6 -1
  371. package/dist/docs/web-types.json +25 -2
  372. package/dist/index.d.ts +1 -0
  373. package/dist/index.js +1 -1
  374. package/dist/loader.js +2 -2
  375. package/dist/types/lumina.d.ts +2 -1
  376. package/dist/types/preact.d.ts +2 -1
  377. package/dist/types/react.d.ts +2 -1
  378. package/dist/types/stencil.d.ts +2 -1
  379. package/package.json +1 -1
  380. package/dist/cdn/2HOKIBIJ.js +0 -4
  381. package/dist/cdn/2W64V4FL.js +0 -4
  382. package/dist/cdn/4EP3SSVQ.js +0 -4
  383. package/dist/cdn/CGFFKEWQ.js +0 -4
  384. package/dist/cdn/CUTLCVEY.js +0 -4
  385. package/dist/cdn/DV4IGJMT.js +0 -18
  386. package/dist/cdn/ERUVVBEL.js +0 -4
  387. package/dist/cdn/H4LF7LYL.js +0 -18
  388. package/dist/cdn/HACX7AGZ.js +0 -4
  389. package/dist/cdn/HCQBWHV3.js +0 -18
  390. package/dist/cdn/LBFKPX2C.js +0 -18
  391. package/dist/cdn/MVS6QH7E.js +0 -4
  392. package/dist/cdn/MWGRZML6.js +0 -4
  393. package/dist/cdn/RCFGDSWA.js +0 -4
  394. package/dist/cdn/RJRURTM3.js +0 -4
  395. package/dist/cdn/SOKSUQE7.js +0 -4
  396. package/dist/cdn/SRCXOI3Y.js +0 -4
  397. package/dist/cdn/WCNH7COY.js +0 -4
  398. package/dist/cdn/WZWGNIEX.js +0 -25
  399. package/dist/cdn/YN3ZXEKJ.js +0 -4
  400. package/dist/cdn/YOMJ4KM5.js +0 -4
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import{a as E}from"./HACX7AGZ.js";import"./AAE7EK4I.js";import{a as C,c as m,d,e as _,f as x,g as S}from"./XASSYP2N.js";import"./OUXGXK3J.js";import{b as v}from"./K22YDYDF.js";import{a as h,b as o}from"./G25UYWU2.js";import{b as I}from"./QHY3HOJZ.js";import{a as $}from"./WEJIR3KC.js";import{D as L,E as u,I as F,c as w,d as a,g as p,o as y,q as b}from"./23KRBWNX.js";import"./DTQTQMKB.js";var k=w`@layer{/** @license
3
+ v1.0.0-next.20250604 */
4
+ import{a as E}from"./YRGOM6Q5.js";import"./KSWXMOC6.js";import{a as C,c as m,d,e as _,f as x,g as S}from"./6QFHZ3JL.js";import"./LACXORO5.js";import{b as v}from"./K4J7ONE5.js";import{a as h,b as o}from"./USOHU6ZJ.js";import{b as I}from"./XWJ5XRDA.js";import{a as $}from"./F4VOMVZI.js";import{D as L,E as u,I as F,c as w,d as a,g as p,o as y,q as b}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";var k=w`@layer{/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -15,4 +15,4 @@ import{a as E}from"./HACX7AGZ.js";import"./AAE7EK4I.js";import{a as C,c as m,d,e
15
15
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
16
  * See the License for the specific language governing permissions and
17
17
  * limitations under the License.
18
- */:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.width-0{width:0}.height-full{height:100%!important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}}`,f=class extends L{constructor(){super(),this.center="",this.commentButtonText="",this.commentSubmittedMessage="",this.defaultWebmap="",this.description="",this.enableAnonymousAccess=!1,this.enableAnonymousComments=!1,this.enableComments=!1,this.enableHome=!0,this.enableLogin=!1,this.enableNewReports=!1,this.enableSearch=!0,this.enableSnapping=!1,this.enableZoom=!0,this.isMobile=!1,this.layerExpressions=[],this.layerId="",this.level="",this.loginTitle="",this.mapInfos=[],this.objectId="",this.reportButtonText="",this.reportsHeader="",this.reportSubmittedMessage="",this.showComments=!1,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.submitNewReportsMessage="",this.theme="light",this.floorLevel="",this.showFullCommentTitle=!0,this.filterByMapExtent=!1,this.sortOption="newest",this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this._featureCreationFailedErrorMsg="",this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._reportSubmitted=!1,this._selectedLayerName="",this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=$({name:"crowdsource-reporter",blocking:!0}),this._updatedProgressBarStatus=25,this._updatedSortOption="newest",this._commentSubmitted=!1,this._addingCommentFailed=!1,this._filterOpen=!1,this._showNextButton=!1,this._submitNextButtonDisabled=!1,this._createFeature=h(),this._currentFeatureId="",this._editableLayerIds=[],this._featureDetails=h(),this._featureList=h(),this._selectedRelatedFeature=[],this._filterList=h(),this._layerList=h(),this._createRelatedFeature=h(),this._layers=[],this._mapImageryLayersId=[],this._selectedFeature=[],this._selectedFeatureIndex=0,this._selectedLayerId="",this._shareNode=h(),this._urlParamsLoaded=!1,this._validLayers=[],this._nonVisibleValidLayers=[],this._showFullPanel=!1,this._floorExpression="",this._formElements=[],this._prevSelectedLayerId="",this._t9nLayerExpressions=[],this._reportSubmittedAlert=h(),this.togglePanel=y(),E(window)}static{this.properties={center:1,commentButtonText:1,commentSubmittedMessage:1,defaultWebmap:1,description:1,enableAnonymousAccess:5,enableAnonymousComments:5,enableComments:5,enableHome:5,enableLogin:5,enableNewReports:5,enableSearch:5,enableSnapping:5,enableZoom:5,isMobile:5,layerExpressions:0,layerId:1,level:1,loginTitle:1,mapInfos:0,mapView:0,objectId:1,reportButtonText:1,reportingOptions:0,reportsHeader:1,reportSubmittedMessage:1,searchConfiguration:0,showComments:5,showUserImageInCommentsList:5,showFeatureSymbol:5,showMyReportsOnly:5,submitNewReportsMessage:1,theme:1,zoomToScale:9,floorLevel:1,showFullCommentTitle:5,filterByMapExtent:5,sortOption:1,reportingArea:5,reportingAreaLayer:1,reportingAreaMessage:1,_featureCreationFailedErrorMsg:16,_filterActive:16,_flowItems:16,_hasValidLayers:16,_mapInfo:16,_reportSubmitted:16,_selectedLayerName:16,_showSubmitCancelButton:16,_showLoadingIndicator:16,_sidePanelCollapsed:16,_translations:16,_updatedProgressBarStatus:16,_updatedSorting:16,_updatedSortOption:16,_commentSubmitted:16,_addingCommentFailed:16,_filterOpen:16,_showNextButton:16,_submitNextButtonDisabled:16}}static{this.styles=k}static{this.shadowRootOptions=b}willUpdate(e){e.has("isMobile")&&this.isMobileWatchHandler(this.isMobile),e.has("mapView")&&this.mapViewWatchHandler(),e.has("floorLevel")&&this.floorLevelWatchHandler(),(e.has("reportingAreaLayer")||e.has("reportingArea")&&this.hasUpdated)&&setTimeout(()=>{this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)},50),e.has("showMyReportsOnly")&&(this.hasUpdated||this.showMyReportsOnly!==!1)&&this.showMyReportsOnlyWatchHandler(),e.has("sortOption")&&(this.hasUpdated||this.sortOption!=="newest")&&this.sortOptionWatchHandler(),e.has("filterByMapExtent")&&(this.hasUpdated||this.filterByMapExtent!==!1)&&this.filterByMapExtentChangeWatchHandler(),e.has("layerExpressions")&&(this.hasUpdated||this.layerExpressions?.length>0)&&this.layerExpressionsWatchHandler(),e.has("showFeatureSymbol")&&(this.hasUpdated||this.showFeatureSymbol!==!1)&&this.showFeatureSymbolWatchHandler(),(this._flowItems.includes("filter-panel")||this._filterOpen)&&this._filterList.value?.updateInitDefExpressions({initDefExpressions:this._initDefExpressions})}async isMobileWatchHandler(e){this.updatePanelState(!1,this._showFullPanel),e&&this._flowItems[this._flowItems.length-1]==="filter-panel"?(await this.backFromFilterPanel(),this._filterOpen=!0):!e&&this._filterOpen&&(await this._closeFilter(),this._flowItems=[...this._flowItems,"filter-panel"])}async mapViewWatchHandler(){await this.mapView?.when(async()=>{this.setInitExpressions(),await this.setMapView()})}async floorLevelWatchHandler(){if(this._editableLayerIds)for(let e of this._editableLayerIds){let t=this.mapView&&await d(this.mapView,e);t&&t.floorInfo?.floorField&&this._updateFloorDefinitionExpression(t)}this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value&&await this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh(),this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),this.refreshLists())}async sortOptionWatchHandler(){this.updateSortingOptions()}filterByMapExtentChangeWatchHandler(){this.refreshLists()}async layerExpressionsWatchHandler(){this.resetFilterList(),await this.handleSelectedLayersFilter(),await this._featureList.value?.refresh()}async showFeatureSymbolWatchHandler(){await this._featureList.value?.refresh()}async updateLayerExpressionsT9n(e){if(this._t9nLayerExpressions=e||this.layerExpressions,this._filterList.value!=null)await this._filterList.value.handleUpdatingT9nData(this._t9nLayerExpressions);else if(this._currentLayerExpressions!=null){let t=structuredClone(this._currentLayerExpressions);this.handleLayerExpressionsT9n(t,this._t9nLayerExpressions),this._currentLayerExpressions=t}return Promise.resolve()}async load(){this._urlParamsLoaded=!1,await this._initModules(),await this.mapView?.when(async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter(e=>{let t=e&&this.reportingOptions&&this.reportingOptions[e];return t&&t.visible}):[],this.setInitExpressions(),await this.setMapView()})}render(){let e=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return a`${this._reportSubmitted&&a`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._reportSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage||this._translations.submitMsg)??""} ${o(this._reportSubmittedAlert)}></div></calcite-alert>`||""}${this._featureCreationFailedErrorMsg&&a`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._featureCreationFailedErrorMsg=""}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>`||""}${this._commentSubmitted&&a`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._commentSubmitted=!1}} open placement=top><div slot=message>${this.commentSubmittedMessage||this._translations.commentSubmittedMsg}</div></calcite-alert>`||""}${this._addingCommentFailed&&a`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._addingCommentFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>`||""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile&&this.filterModal()||""}`}updated(){this.reportSubmittedMessage&&this._reportSubmittedAlert.value?.children[0]&&(this._reportSubmittedAlert.value.children[0].style.margin="0px")}async _initModules(){let[e,t,i,s]=await I(["esri/core/reactiveUtils","esri/layers/support/FeatureFilter","esri/rest/identify","esri/rest/support/IdentifyParameters"]);this.reactiveUtils=e,this.FeatureFilter=t,this.identify=i,this.IdentifyParameters=s}async setSelectedLayer(e,t){this._selectedLayerId=e,this._selectedLayer=this.mapView&&await d(this.mapView,e),this._selectedLayerName=t,this._validLayers.forEach(i=>{this._nonVisibleValidLayers.find(s=>s.id===i.id)||i.set("visible",!e||i.id===e)})}_getLayersConfig(e){return this.reportingOptions&&this.reportingOptions[e]?this.reportingOptions[e]:null}_getReporter(){let e=[];this._flowItems.forEach(i=>{switch(i){case"layer-list":e.push(this.getLayerListFlowItem());break;case"feature-list":e.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":e.push(this.getFilterPanel());break;case"feature-details":e.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":e.push(this.getChooseCategoryFlowItem());break;case"feature-create":e.push(this.getFeatureCreateFlowItem());break;case"comment-details":e.push(this.getCommentDetailsFlowItem());break;case"add-comment":e.push(this.getAddCommentFlowItem());break}});let t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return a`<calcite-panel class=${`width-full ${t}`}>${this.mapView?a`<calcite-flow>${e?.length>0&&e||""}</calcite-flow>`:a`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`}filterModal(){return(this.layerExpressions?this.layerExpressions.filter(e=>e.id===this._selectedLayerId):[]).length>0&&a`<calcite-modal aria-labelledby=modal-title class="modal" kind=brand @calciteModalClose=${()=>void this._closeFilter()} .open=${this._filterOpen} width-scale=s><div class="display-flex align-center" id=modal-title slot=header>${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)}</div><div slot=content>${this.mapView&&a`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>void this._closeFilter()} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._filterActive=!1,this._featureList.value&&this._featureList.value.refresh()}} @filterUpdate=${()=>{this._filterList.value?.filterCount!==void 0&&this._handleFilterUpdate(this._filterList.value?.filterCount>0)}} reset-btn .view=${this.mapView} ${o(this._filterList)}></instant-apps-filter-list>`||""}</div></calcite-modal>`||""}_toggleFilter(){this._filterOpen=!this._filterOpen}async _closeFilter(){this._filterOpen=!1,this._filterList.value!=null&&(this._currentLayerExpressions=await this._filterList.value.getCurrentLayerExpressions())}async sortOptionClick(e,t,i){this._updatedSorting={field:e,order:t},this._updatedSortOption=i}_toggleSort(){let e=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return a`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile?"leading-start":"bottom-start"} pointer-disabled reference-element=sort-popover><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"desc","newest")}} .selected=${this._updatedSortOption==="newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"asc","oldest")}} .selected=${this._updatedSortOption==="oldest"} value=oldest></calcite-list-item>${e&&a`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t!==void 0&&this.sortOptionClick(t,"desc","highestVoted")}} .selected=${this._updatedSortOption==="highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t&&this.sortOptionClick(t,"asc","lowestVoted")}} .selected=${this._updatedSortOption==="lowestVoted"} value=lowestVoted></calcite-list-item>`||""}</calcite-list></calcite-popover>`}async _handleFilterListReset(){this._filterActive=!1}async _handleFilterUpdate(e){this._showLoadingIndicator=!0,this._filterActive=e,this._featureList.value&&await this._featureList.value.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportsHeader} .selected=${this._flowItems[this._flowItems.length-1]==="layer-list"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this._hasValidLayers&&this.enableNewReports&&a`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length>0?this._editableLayerIds:this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${o(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`}getChooseCategoryFlowItem(){let e=this.reportingOptions?Object.keys(this.reportingOptions).filter(t=>this.reportingOptions&&this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd):[];return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`}getFeatureCreateFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-create"}>${this._showSubmitCancelButton&&a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton?this.onNextButtonClick.bind(this):this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton?this._translations.next:this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature customize-submit enable-search .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find(e=>e.id===this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${o(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`}updatedProgressStatus(e){this._updatedProgressBarStatus=e.detail}onFormReady(e){this._submitNextButtonDisabled=e.detail,this._showSubmitCancelButton=!0}editingLocation(){this._showNextButton=!0}showSubmitCancelButton(e){this._showSubmitCancelButton=!e.detail}onCreateFeatureSubmitButtonClick(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this._createFeature.value.submit())}backFromCreateFeaturePanel(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updateNonVisibleLayersOnMap(!1)),this.backFromSelectedPanel()}onNextButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._showSubmitCancelButton=!0,this._createFeature.value.showForm())}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature.value&&this._createRelatedFeature.value.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature.value&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(e){console.error(e.detail),this._featureCreationFailedErrorMsg=e.detail.message}async onReportSubmitted(){this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(e){console.error(e.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromSelectedPanel(),this._showLoadingIndicator=!0,this._featureDetails.value&&await this._featureDetails.value.refresh(this._currentFeature),setTimeout(()=>{this._showLoadingIndicator=!1},300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList.value&&await this._layerList.value.refresh(),this._editableLayerIds.length===1?(this._featureList.value&&await this._featureList.value.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(e){e.detail.layerId&&e.detail.layerName&&await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(e){this._nonVisibleValidLayers.find(t=>t.id===this._selectedLayerId)&&this._selectedLayer&&this._selectedLayer.set("visible",e)}async layerListLoaded(e){if(this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"||this._flowItems[0]==="feature-list"){let t=e.detail,i=this.mapView&&await _(this.mapView),s=[];this._validLayers=[],this._nonVisibleValidLayers=[],i?.forEach(l=>{t.includes(l.id)&&(this._validLayers.push(l),l.visible||this._nonVisibleValidLayers.push(l),this._getLayersConfig(l.id)?.reporting&&this._layerItemsHash&&this._layerItemsHash[l.id]&&this._layerItemsHash[l.id].supportsAdd&&s.push(l.id))}),this.handleMapClick(),this._hasValidLayers=s.length>0,this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}}async displayFeaturesList(e){await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateSortingOptions(),this.handleSelectedLayersFilter(),this._flowItems=[...this._flowItems,"feature-list"],this._prevSelectedLayerId=this._selectedLayerId}updateSortingOptions(){let e=this.sortOption===""?"newest":this.sortOption,t=e==="oldest"||e==="lowestVoted"?"asc":"desc",i=this.reportingOptions?.[this._selectedLayerId]?.like?this.reportingOptions?.[this._selectedLayerId]?.likeField:"",s=this._selectedLayer&&(e==="newest"||e==="oldest")?this._selectedLayer?.objectIdField:i;this._updatedSorting={field:s||"",order:t},this._updatedSortOption=!i&&(e==="highestVoted"||e==="lowestVoted")?"newest":e}async backFromFilterPanel(){this._filterList.value!=null&&(this._currentLayerExpressions=await this._filterList.value.getCurrentLayerExpressions()),this._featureList.value&&await this._featureList.value.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=25;let e=[...this._flowItems];if(e[e.length-1]==="comment-details"||e[e.length-1]==="add-comment"||this.clearHighlights(),(e[e.length-1]==="reporting-layer-list"||e[e.length-1]==="feature-create"&&(e[0]==="feature-list"||e[e.length-2]==="feature-list"))&&this.updatePanelState(this._sidePanelCollapsed,!1),e.pop(),e.length===1&&e[0]==="layer-list"){this.navigateToHomePage();return}this._flowItems=[...e]}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(e,t){this._sidePanelCollapsed=e,this._showFullPanel=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(e){await this.setSelectedFeatures([e.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){let e=this._currentFeature?.layer,t=this.mapView&&await x(this.mapView);e.relationships?.some(i=>{let s=t?.filter(l=>e.url===l.url&&l.layerId===i.relatedTableId);return s&&s.length>0?(this._relatedTable=s[0],!0):!1})}async updatingFeatureDetails(e){this._showLoadingIndicator=e}async selectionChanged(e){this.updatingFeatureDetails(!0),await this.setCurrentFeature(e.detail.selectedFeature[0]),this.highlightOnMap(e.detail.selectedFeature[0]),this._selectedFeatureIndex=e.detail.selectedFeatureIndex,this._featureDetails.value&&await this._featureDetails.value.refresh(e.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(e){this._selectedRelatedFeature=[e.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(e,t){let i=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash&&this._layerItemsHash[this._selectedLayerId].supportsAdd,s=this._currentLayerExpressions?.length;return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile&&this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-list"}>${this._toggleSort()}<calcite-action icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort??p}></calcite-action>${s&&a`<calcite-action icon=filter .indicator=${this._filterActive} @click=${()=>{this.isMobile?this._toggleFilter():this._flowItems=[...this._flowItems,"filter-panel"]}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter??p}></calcite-action>`||""}${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.enableNewReports&&i&&a`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel>${a`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${()=>{this._showLoadingIndicator=!0}} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${o(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`}getFilterPanel(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length-1]==="filter-panel"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView&&a`<instant-apps-filter-list .closeBtnOnClick=${()=>{}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>void this._handleFilterListReset()} @filterUpdate=${()=>{let e=this._filterList.value?.filterCount;e!==void 0&&this._handleFilterUpdate(e>0)}} .view=${this.mapView} ${o(this._filterList)}></instant-apps-filter-list>`||""}</calcite-panel></calcite-flow-item>`}getFeatureDetailsFlowItem(){let e=this._selectedLayer?.relationships,t=this._getLayersConfig(this._selectedLayerId)?.comment&&e&&e.length>0&&this._relatedTable;return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.mapView&&a`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${o(this._shareNode)}></instant-apps-social-share>`||""}${this._selectedFeature.length>1&&this.getFeaturesPagination()||""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${()=>{this._showLoadingIndicator=!0}} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${()=>{this._featureList.value&&this._featureList.value.refresh(!0)}} @loadingStatus=${i=>void this.updatingFeatureDetails(i.detail)} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${o(this._featureDetails)}></feature-details>${t&&a`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText||this._translations.comment}</calcite-button>`||""}</calcite-panel></calcite-flow-item>`}getFeaturesPagination(){return a`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left id=solutions-back @click=${()=>this._featureDetails.value&&void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${()=>this._featureDetails.value&&void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-start=chevron-right id=solutions-next @click=${()=>this._featureDetails.value&&void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`}getCommentDetailsFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="comment-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView} @selectionChanged=${()=>{this._showLoadingIndicator=!1}}></info-card></calcite-panel></calcite-flow-item>`}getAddCommentFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="add-comment"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer>${this._showSubmitCancelButton&&a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${o(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`}async setSelectedFeatures(e){this._selectedFeature=e,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:void 0)}async setCurrentFeature(e){if(this._currentFeature=e,e&&e.layer){let t=e.layer;t.title&&this.setSelectedLayer(t.id,t.title),this._currentFeatureId=e.attributes[t.objectIdField],this._getLayersConfig(t.id)?.comment&&t.relationships&&t.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&(this.setSelectedLayer("",""),this.handlePrevLayersFilter()),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(e){if(this.clearHighlights(),e&&e.geometry&&e.layer&&e.layer.id!==void 0){let t=this.mapView&&await m(this.mapView,e.layer.id.toString());if(t){t.highlightOptions=null;let i=Number(e.getObjectId());this._highlightHandle=this.mapView&&await S([i],t,this.mapView,!0,this.zoomToScale)}}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return a`<calcite-action .icon=${this._sidePanelCollapsed?"chevrons-up":"chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed?this._translations.expand:this._translations.collapse)||""}></calcite-action>`}async setMapView(){await this.getLayersToShowInList(),await this._updateFeatures(),this._editableLayerIds?.length===1?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView&&(this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0))}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=this.reactiveUtils?.on(()=>this.mapView,"click",this.onMapClick.bind(this))}async onMapClick(e){if(this.mapView){this.mapView.popupEnabled=!1;let t=await this.mapView.hitTest(e),i=[],s=[],l=[],n=!1;t.results.length>0&&t.results.forEach(c=>{c.type==="graphic"&&i.push(c.graphic)}),i.length>0&&(await this._setReportingGraphics(i),s=this._getNonReportingLayerGraphics(i)),this._mapImageryLayersId.length>0&&(l=await this._getIdentifiedGraphics(e.mapPoint),n=l.length>0);let r=s.concat(l);if(r.length>0){this.mapView.popupEnabled=!0;let c={features:r,location:e.mapPoint,updateLocationEnabled:!n};await this.mapView.openPopup(c)}}}async _setReportingGraphics(e){let t=e.filter(i=>{if(i.layer?.type==="feature"){let s=i.layer;return this._validLayers.includes(s)}else return!1});t.length>0&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(e[0])):this._flowItems=[...this._flowItems,"feature-details"])}_getNonReportingLayerGraphics(e){return e.filter(t=>{if(t.layer?.type==="feature"){let i=t.layer;return!this._validLayers.includes(i)&&i?.popupEnabled&&i?.id}else return!1})}async _getIdentifiedGraphics(e){let t=this.IdentifyParameters&&new this.IdentifyParameters({geometry:e,tolerance:3,mapExtent:this.mapView?.extent}),i=this._mapImageryLayersId.map(async n=>{let r=this.mapView&&await d(this.mapView,n);if(r?.url&&t)return await this.identify?.identify(r.url,t)}),s=await Promise.all(i),l=[];return s.forEach(n=>{n.results.forEach(r=>{let c=Object.keys(r.feature.attributes).map(g=>({fieldName:g,label:g}));r.feature.popupTemplate={title:r.layerName,content:[{type:"fields",fieldInfos:c}]},l.push(r.feature)})}),l}_getCount(){let e=(this._selectedFeatureIndex+1).toString(),t=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)}_updateFloorDefinitionExpression(e){let t=`${e?.floorInfo?.floorField} = '${this.floorLevel}'`,i=e.definitionExpression;e.definitionExpression=i&&i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):t,this._floorExpression=t}_getFormElements(){let e=this._selectedLayer;if(e?.floorInfo?.floorField&&this.floorLevel&&e?.formTemplate){let t=this._formElements.find(i=>i.id===e.id);(this._formElements.length===0||!t)&&this._formElements.push({id:e.id,orgElements:e.formTemplate.elements,orgExpressionInfos:e.formTemplate.expressionInfos})}}reduceToConfiguredLayers(e,t){return Object.keys(e).reduce((i,s)=>{let l=this.reportingOptions?this._getLayersConfig(s)?.visible:e[s].supportsAdd;return!t.includes(s)&&l&&i.push(s),i},[])}refreshLists(){setTimeout(()=>{this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh()},50)}async _updateFeatures(){for(let e of this._editableLayerIds){let t=this.mapView&&await m(this.mapView,e);t&&(await this._showMyFeaturesOnly(t),t.layer?.floorInfo?.floorField&&this.floorLevel&&this._updateFloorDefinitionExpression(t.layer))}}async _showMyFeaturesOnly(e){let t=(this.mapView?.map).portalItem.portal?.credential?.userId;if(t&&e){let i=e.layer.editFieldsInfo?.creatorField.toLowerCase();e.filter=this.showMyReportsOnly&&i&&this.FeatureFilter?new this.FeatureFilter({where:i+"='"+t+"'"}):null}}async getLayersToShowInList(){let e=this.mapView&&await C(this.mapView,!0),t=this.mapView&&await _(this.mapView),i=[];t?.forEach(s=>{s?.type==="feature"&&s?.editingEnabled&&s?.capabilities?.operations?.supportsAdd&&(e[s.id].supportsAdd=!0),s?.editingEnabled||i.push(s.id)}),this._editableLayerIds=this.reduceToConfiguredLayers(e,i),this._layerItemsHash=e}async renderFeaturesList(){this._flowItems=["feature-list"];let e={detail:this._editableLayerIds};await this.layerListLoaded(e),await this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0]?.title||""),this.updateSortingOptions(),this.handleSelectedLayersFilter()}_updateShareURL(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this._selectedLayerId?t.searchParams.set("layerid",this._selectedLayerId):t.searchParams.delete("layerid"),this._selectedFeature?.length?t.searchParams.set("oid",this._currentFeatureId):t.searchParams.delete("oid"),this._shareNode.value&&(this._shareNode.value.shareUrl=t.href)}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView?.goTo({center:this.center.split(";").map(Number),zoom:this.level}),this.layerId&&this.objectId){let e=this.mapView&&await d(this.mapView,this.layerId);if(e){let t=this.mapView&&await v([Number(this.objectId)],e,[],!0,this.mapView.spatialReference);t?.length&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems[this._flowItems.length-1]!=="feature-details"?this._flowItems=[...this._flowItems,"feature-details"]:this._flowItems=[...this._flowItems])}}}async handleSelectedLayersFilter(){if(this._selectedLayer){let e=this.layerExpressions?structuredClone(this.layerExpressions.filter(t=>t.id===this._selectedLayerId)):[];this._t9nLayerExpressions!=null&&this.handleLayerExpressionsT9n(e,this._t9nLayerExpressions),this._currentLayerExpressions=e,this.setActiveDefinitionExpressions()}}async handlePrevLayersFilter(){if(this._prevSelectedLayerId){let e=this.mapView&&await d(this.mapView,this._prevSelectedLayerId);e&&this._initDefExpressions&&(e.definitionExpression=this._initDefExpressions[this._prevSelectedLayerId])}}resetFilterList(){this._filterList.value?.forceReset(),this._selectedLayer!==void 0&&this._initDefExpressions&&(this._selectedLayer.definitionExpression=this._initDefExpressions[this._selectedLayerId],this._filterActive=!1)}setActiveDefinitionExpressions(){if(this._selectedLayer===void 0)return;let e=[];if(this._currentLayerExpressions&&this._currentLayerExpressions?.length>0){let t=this._currentLayerExpressions[0];for(let i of t.expressions){let{active:s,definitionExpression:l}=i;s&&l&&e.push(`(${l})`)}this._filterActive=e.length>0,this.updateFilterLayerDefExpression(e,t.operator)}}updateFilterLayerDefExpression(e,t){let i=this._initDefExpressions&&this._initDefExpressions[this._selectedLayerId],s=e?.length>0&&i?`(${e.join(t)}) AND (${i})`:e.length>0?e.join(t):i;this._selectedLayer&&(this._selectedLayer.definitionExpression=s)}setInitExpressions(){if(this._initDefExpressions={},this.mapView==null)return;let e=this.mapView.map;e.allLayers.concat(e.allTables).forEach(t=>{if(t.type==="map-image"&&!this._mapImageryLayersId.includes(t.id)){this._mapImageryLayersId.push(t.id);return}if(t.type!=="feature")return;let i=t;this._initDefExpressions&&(this._initDefExpressions[i.id]=i.definitionExpression||"")})}handleLayerExpressionsT9n(e,t){e?.forEach(i=>{let s=t?.find(l=>l.id===i.id);s!=null&&(i.title=s.title,i.expressions?.forEach(l=>{let n=s.expressions?.find(r=>r.id===l.id);n!=null&&(l.name=n.name)}))})}};F("crowdsource-reporter",f);export{f as CrowdsourceReporter};
18
+ */:host{display:block;--calcite-label-margin-bottom: 0px;--solutions-theme-foreground-color: var(--calcite-color-foreground-1)}.width-full{width:100%!important}.width-0{width:0}.height-full{height:100%!important}.height-0{height:0}.overflow-hidden{overflow:hidden}.border{border:1px solid var(--calcite-color-border-3)}.notice-msg{padding:10px;width:calc(100% - 20px)}.progress-bar{padding:12px}.footer-top-button{padding-bottom:7px}.footer-button{height:35px}.feature-pagination{background-color:var(--calcite-color-foreground-1)!important;border-block-end:1px solid var(--calcite-color-border-3);display:flex;justify-content:center;padding:5px 0}.pagination-count{color:var(--calcite-color-brand);border-bottom:1px solid var(--calcite-color-brand);font-weight:700}.report-submitted-msg{position:absolute;z-index:1000}.share-node{display:flex}}`,f=class extends L{constructor(){super(),this.center="",this.commentButtonText="",this.commentSubmittedMessage="",this.defaultWebmap="",this.description="",this.enableAnonymousAccess=!1,this.enableAnonymousComments=!1,this.enableComments=!1,this.enableHome=!0,this.enableLogin=!1,this.enableNewReports=!1,this.enableSearch=!0,this.enableSnapping=!1,this.enableZoom=!0,this.isMobile=!1,this.layerExpressions=[],this.layerId="",this.level="",this.loginTitle="",this.mapInfos=[],this.objectId="",this.reportButtonText="",this.reportsHeader="",this.reportSubmittedMessage="",this.showComments=!1,this.showUserImageInCommentsList=!1,this.showFeatureSymbol=!1,this.showMyReportsOnly=!1,this.submitNewReportsMessage="",this.theme="light",this.floorLevel="",this.showFullCommentTitle=!0,this.filterByMapExtent=!1,this.sortOption="newest",this.reportingArea=!1,this.reportingAreaLayer="",this.reportingAreaMessage="",this._featureCreationFailedErrorMsg="",this._filterActive=!1,this._flowItems=[],this._hasValidLayers=!1,this._reportSubmitted=!1,this._selectedLayerName="",this._showSubmitCancelButton=!1,this._showLoadingIndicator=!1,this._sidePanelCollapsed=!1,this._translations=$({name:"crowdsource-reporter",blocking:!0}),this._updatedProgressBarStatus=25,this._updatedSortOption="newest",this._commentSubmitted=!1,this._addingCommentFailed=!1,this._filterOpen=!1,this._showNextButton=!1,this._submitNextButtonDisabled=!1,this._createFeature=h(),this._currentFeatureId="",this._editableLayerIds=[],this._featureDetails=h(),this._featureList=h(),this._selectedRelatedFeature=[],this._filterList=h(),this._layerList=h(),this._createRelatedFeature=h(),this._layers=[],this._mapImageryLayersId=[],this._selectedFeature=[],this._selectedFeatureIndex=0,this._selectedLayerId="",this._shareNode=h(),this._urlParamsLoaded=!1,this._validLayers=[],this._nonVisibleValidLayers=[],this._showFullPanel=!1,this._floorExpression="",this._formElements=[],this._prevSelectedLayerId="",this._t9nLayerExpressions=[],this._reportSubmittedAlert=h(),this.togglePanel=y(),E(window)}static{this.properties={center:1,commentButtonText:1,commentSubmittedMessage:1,defaultWebmap:1,description:1,enableAnonymousAccess:5,enableAnonymousComments:5,enableComments:5,enableHome:5,enableLogin:5,enableNewReports:5,enableSearch:5,enableSnapping:5,enableZoom:5,isMobile:5,layerExpressions:0,layerId:1,level:1,loginTitle:1,mapInfos:0,mapView:0,objectId:1,reportButtonText:1,reportingOptions:0,reportsHeader:1,reportSubmittedMessage:1,searchConfiguration:0,showComments:5,showUserImageInCommentsList:5,showFeatureSymbol:5,showMyReportsOnly:5,submitNewReportsMessage:1,theme:1,zoomToScale:9,floorLevel:1,showFullCommentTitle:5,filterByMapExtent:5,sortOption:1,reportingArea:5,reportingAreaLayer:1,reportingAreaMessage:1,_featureCreationFailedErrorMsg:16,_filterActive:16,_flowItems:16,_hasValidLayers:16,_mapInfo:16,_reportSubmitted:16,_selectedLayerName:16,_showSubmitCancelButton:16,_showLoadingIndicator:16,_sidePanelCollapsed:16,_translations:16,_updatedProgressBarStatus:16,_updatedSorting:16,_updatedSortOption:16,_commentSubmitted:16,_addingCommentFailed:16,_filterOpen:16,_showNextButton:16,_submitNextButtonDisabled:16}}static{this.styles=k}static{this.shadowRootOptions=b}willUpdate(e){e.has("isMobile")&&this.isMobileWatchHandler(this.isMobile),e.has("mapView")&&this.mapViewWatchHandler(),e.has("floorLevel")&&this.floorLevelWatchHandler(),(e.has("reportingAreaLayer")||e.has("reportingArea")&&this.hasUpdated)&&setTimeout(()=>{this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)},50),e.has("showMyReportsOnly")&&(this.hasUpdated||this.showMyReportsOnly!==!1)&&this.showMyReportsOnlyWatchHandler(),e.has("sortOption")&&(this.hasUpdated||this.sortOption!=="newest")&&this.sortOptionWatchHandler(),e.has("filterByMapExtent")&&(this.hasUpdated||this.filterByMapExtent!==!1)&&this.filterByMapExtentChangeWatchHandler(),e.has("layerExpressions")&&(this.hasUpdated||this.layerExpressions?.length>0)&&this.layerExpressionsWatchHandler(),e.has("showFeatureSymbol")&&(this.hasUpdated||this.showFeatureSymbol!==!1)&&this.showFeatureSymbolWatchHandler(),(this._flowItems.includes("filter-panel")||this._filterOpen)&&this._filterList.value?.updateInitDefExpressions({initDefExpressions:this._initDefExpressions})}async isMobileWatchHandler(e){this.updatePanelState(!1,this._showFullPanel),e&&this._flowItems[this._flowItems.length-1]==="filter-panel"?(await this.backFromFilterPanel(),this._filterOpen=!0):!e&&this._filterOpen&&(await this._closeFilter(),this._flowItems=[...this._flowItems,"filter-panel"])}async mapViewWatchHandler(){await this.mapView?.when(async()=>{this.setInitExpressions(),await this.setMapView()})}async floorLevelWatchHandler(){if(this._editableLayerIds)for(let e of this._editableLayerIds){let t=this.mapView&&await d(this.mapView,e);t&&t.floorInfo?.floorField&&this._updateFloorDefinitionExpression(t)}this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value&&await this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh(),this._createFeature.value&&this._createFeature.value.refresh(this.floorLevel)}async showMyReportsOnlyWatchHandler(){this._editableLayerIds&&(await this._updateFeatures(),this.refreshLists())}async sortOptionWatchHandler(){this.updateSortingOptions()}filterByMapExtentChangeWatchHandler(){this.refreshLists()}async layerExpressionsWatchHandler(){this.resetFilterList(),await this.handleSelectedLayersFilter(),await this._featureList.value?.refresh()}async showFeatureSymbolWatchHandler(){await this._featureList.value?.refresh()}async updateLayerExpressionsT9n(e){if(this._t9nLayerExpressions=e||this.layerExpressions,this._filterList.value!=null)await this._filterList.value.handleUpdatingT9nData(this._t9nLayerExpressions);else if(this._currentLayerExpressions!=null){let t=structuredClone(this._currentLayerExpressions);this.handleLayerExpressionsT9n(t,this._t9nLayerExpressions),this._currentLayerExpressions=t}return Promise.resolve()}async load(){this._urlParamsLoaded=!1,await this._initModules(),await this.mapView?.when(async()=>{this._layers=this.reportingOptions?Object.keys(this.reportingOptions).filter(e=>{let t=e&&this.reportingOptions&&this.reportingOptions[e];return t&&t.visible}):[],this.setInitExpressions(),await this.setMapView()})}render(){let e=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return a`${this._reportSubmitted&&a`<calcite-alert auto-close class=${`${e} report-submitted-msg`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._reportSubmitted=!1}} open placement=top><div slot=message .innerHTML=${(this.reportSubmittedMessage||this._translations.submitMsg)??""} ${o(this._reportSubmittedAlert)}></div></calcite-alert>`||""}${this._featureCreationFailedErrorMsg&&a`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._featureCreationFailedErrorMsg=""}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._featureCreationFailedErrorMsg}</div></calcite-alert>`||""}${this._commentSubmitted&&a`<calcite-alert auto-close class=${`report-submitted ${e}`} icon=check-circle kind=success label @calciteAlertClose=${()=>{this._commentSubmitted=!1}} open placement=top><div slot=message>${this.commentSubmittedMessage||this._translations.commentSubmittedMsg}</div></calcite-alert>`||""}${this._addingCommentFailed&&a`<calcite-alert auto-close class=${u(e)} icon=x-octagon kind=danger label @calciteAlertClose=${()=>{this._addingCommentFailed=!1}} open placement=top><div slot=title>${this._translations.error}</div><div slot=message>${this._translations.addingCommentFailedMsg}</div></calcite-alert>`||""}<div><calcite-shell content-behind>${this._getReporter()}</calcite-shell></div>${this.isMobile&&this.filterModal()||""}`}updated(){this.reportSubmittedMessage&&this._reportSubmittedAlert.value?.children[0]&&(this._reportSubmittedAlert.value.children[0].style.margin="0px")}async _initModules(){let[e,t,i,s]=await I(["esri/core/reactiveUtils","esri/layers/support/FeatureFilter","esri/rest/identify","esri/rest/support/IdentifyParameters"]);this.reactiveUtils=e,this.FeatureFilter=t,this.identify=i,this.IdentifyParameters=s}async setSelectedLayer(e,t){this._selectedLayerId=e,this._selectedLayer=this.mapView&&await d(this.mapView,e),this._selectedLayerName=t,this._validLayers.forEach(i=>{this._nonVisibleValidLayers.find(s=>s.id===i.id)||i.set("visible",!e||i.id===e)})}_getLayersConfig(e){return this.reportingOptions&&this.reportingOptions[e]?this.reportingOptions[e]:null}_getReporter(){let e=[];this._flowItems.forEach(i=>{switch(i){case"layer-list":e.push(this.getLayerListFlowItem());break;case"feature-list":e.push(this.getFeatureListFlowItem(this._selectedLayerId,this._selectedLayerName));break;case"filter-panel":e.push(this.getFilterPanel());break;case"feature-details":e.push(this.getFeatureDetailsFlowItem());break;case"reporting-layer-list":e.push(this.getChooseCategoryFlowItem());break;case"feature-create":e.push(this.getFeatureCreateFlowItem());break;case"comment-details":e.push(this.getCommentDetailsFlowItem());break;case"add-comment":e.push(this.getAddCommentFlowItem());break}});let t=this.theme==="dark"?"calcite-mode-dark":"calcite-mode-light";return a`<calcite-panel class=${`width-full ${t}`}>${this.mapView?a`<calcite-flow>${e?.length>0&&e||""}</calcite-flow>`:a`<calcite-loader label scale=m></calcite-loader>`}</calcite-panel>`}filterModal(){return(this.layerExpressions?this.layerExpressions.filter(e=>e.id===this._selectedLayerId):[]).length>0&&a`<calcite-modal aria-labelledby=modal-title class="modal" kind=brand @calciteModalClose=${()=>void this._closeFilter()} .open=${this._filterOpen} width-scale=s><div class="display-flex align-center" id=modal-title slot=header>${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)}</div><div slot=content>${this.mapView&&a`<instant-apps-filter-list close-btn .closeBtnOnClick=${()=>void this._closeFilter()} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>{this._filterActive=!1,this._featureList.value&&this._featureList.value.refresh()}} @filterUpdate=${()=>{this._filterList.value?.filterCount!==void 0&&this._handleFilterUpdate(this._filterList.value?.filterCount>0)}} reset-btn .view=${this.mapView} ${o(this._filterList)}></instant-apps-filter-list>`||""}</div></calcite-modal>`||""}_toggleFilter(){this._filterOpen=!this._filterOpen}async _closeFilter(){this._filterOpen=!1,this._filterList.value!=null&&(this._currentLayerExpressions=await this._filterList.value.getCurrentLayerExpressions())}async sortOptionClick(e,t,i){this._updatedSorting={field:e,order:t},this._updatedSortOption=i}_toggleSort(){let e=this.reportingOptions&&this.reportingOptions[this._selectedLayerId]&&this.reportingOptions[this._selectedLayerId].like&&this.reportingOptions[this._selectedLayerId].likeField;return a`<calcite-popover auto-close label offset-distance=0 .placement=${this.isMobile?"leading-start":"bottom-start"} pointer-disabled reference-element=sort-popover><calcite-list label selection-mode=single-persist><calcite-list-item .label=${this._translations.sortNewest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"desc","newest")}} .selected=${this._updatedSortOption==="newest"} value=newest></calcite-list-item><calcite-list-item .label=${this._translations.sortOldest} @calciteListItemSelect=${()=>{this._selectedLayer&&this.sortOptionClick(this._selectedLayer.objectIdField,"asc","oldest")}} .selected=${this._updatedSortOption==="oldest"} value=oldest></calcite-list-item>${e&&a`<calcite-list-item .label=${this._translations.sortHighestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t!==void 0&&this.sortOptionClick(t,"desc","highestVoted")}} .selected=${this._updatedSortOption==="highestVoted"} value=highestVoted></calcite-list-item><calcite-list-item .label=${this._translations.sortLowestVoted} @calciteListItemSelect=${()=>{let t=this.reportingOptions&&this.reportingOptions[this._selectedLayerId].likeField;t&&this.sortOptionClick(t,"asc","lowestVoted")}} .selected=${this._updatedSortOption==="lowestVoted"} value=lowestVoted></calcite-list-item>`||""}</calcite-list></calcite-popover>`}async _handleFilterListReset(){this._filterActive=!1}async _handleFilterUpdate(e){this._showLoadingIndicator=!0,this._filterActive=e,this._featureList.value&&await this._featureList.value.refresh(),this._showLoadingIndicator=!1}getLayerListFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportsHeader} .selected=${this._flowItems[this._flowItems.length-1]==="layer-list"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this._hasValidLayers&&this.enableNewReports&&a`<calcite-button appearance=solid @click=${this.navigateToChooseCategory} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel><layer-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} .layers=${this._editableLayerIds?.length>0?this._editableLayerIds:this._layers} .mapView=${this.mapView} @layerSelect=${this.displayFeaturesList} @layersListLoaded=${this.layerListLoaded} show-feature-count show-next-icon ${o(this._layerList)}></layer-list></calcite-panel></calcite-flow-item>`}getChooseCategoryFlowItem(){let e=this.reportingOptions?Object.keys(this.reportingOptions).filter(t=>this.reportingOptions&&this.reportingOptions[t].visible&&this.reportingOptions[t].reporting&&this._layerItemsHash&&this._layerItemsHash[t]&&this._layerItemsHash[t].supportsAdd):[];return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="reporting-layer-list"}><calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><calcite-notice class="notice-msg" icon=lightbulb kind=success open><div slot=message>${this._translations.chooseCategoryMsg}</div></calcite-notice><layer-list class="height-full" .layers=${e} .mapView=${this.mapView} @layerSelect=${this.navigateToCreateFeature}></layer-list></calcite-panel></calcite-flow-item>`}getFeatureCreateFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} @calciteFlowItemBack=${this.backFromCreateFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-create"}>${this._showSubmitCancelButton&&a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${this._submitNextButtonDisabled} @click=${this._showNextButton?this.onNextButtonClick.bind(this):this.onCreateFeatureSubmitButtonClick.bind(this)} width=full>${this._showNextButton?this._translations.next:this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}<calcite-panel><div class="progress-bar"><calcite-progress type=determinate .value=${this._updatedProgressBarStatus}></calcite-progress></div><create-feature customize-submit enable-search .enableSnapping=${this.enableSnapping} .floorLevel=${this.floorLevel} .formElements=${this._formElements.find(e=>e.id===this._selectedLayerId)} .reportingAreaLayer=${this.reportingAreaLayer} .isMobile=${this.isMobile} .mapView=${this.mapView} @drawComplete=${this.onFormReady} @editingLocation=${this.editingLocation} @editingAttachment=${this.showSubmitCancelButton} @fail=${this.createFeatureFailed} @modeChanged=${this.backFromCreateFeaturePanel} @progressStatus=${this.updatedProgressStatus} @success=${this.onReportSubmitted} .searchConfiguration=${this.searchConfiguration} .selectedLayerId=${this._selectedLayerId} .reportingArea=${this.reportingArea} .reportingAreaMessage=${this.reportingAreaMessage} .submitNewReportsMessage=${this.submitNewReportsMessage} update-map-position ${o(this._createFeature)}></create-feature></calcite-panel></calcite-flow-item>`}updatedProgressStatus(e){this._updatedProgressBarStatus=e.detail}onFormReady(e){this._submitNextButtonDisabled=e.detail,this._showSubmitCancelButton=!0}editingLocation(){this._showNextButton=!0}showSubmitCancelButton(e){this._showSubmitCancelButton=!e.detail}onCreateFeatureSubmitButtonClick(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this._createFeature.value.submit())}backFromCreateFeaturePanel(){this._createFeature.value&&(this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updateNonVisibleLayersOnMap(!1)),this.backFromSelectedPanel()}onNextButtonClick(){this._createFeature.value&&(this._showNextButton=!1,this._showSubmitCancelButton=!0,this._createFeature.value.showForm())}onCreateRelatedFeatureSubmitButtonClick(){this._createRelatedFeature.value&&this._createRelatedFeature.value.submit()}backFromCreateRelatedFeaturePanel(){this._createRelatedFeature.value&&(this._showSubmitCancelButton=!1),this.backFromSelectedPanel()}createFeatureFailed(e){console.error(e.detail),this._featureCreationFailedErrorMsg=e.detail.message}async onReportSubmitted(){this.updateNonVisibleLayersOnMap(!1),await this.navigateToHomePage(),this._reportSubmitted=!0,this._updatedProgressBarStatus=25,this._showFullPanel&&this.updatePanelState(this._sidePanelCollapsed,!1)}addCommentFailed(e){console.error(e.detail),this._addingCommentFailed=!0}async onCommentSubmitted(){this._commentSubmitted=!0,this.backFromSelectedPanel(),this._showLoadingIndicator=!0,this._featureDetails.value&&await this._featureDetails.value.refresh(this._currentFeature),setTimeout(()=>{this._showLoadingIndicator=!1},300)}async navigateToHomePage(){await this.setSelectedFeatures([]),this._layerList.value&&await this._layerList.value.refresh(),this._editableLayerIds.length===1?(this._featureList.value&&await this._featureList.value.refresh(),this._flowItems=["feature-list"]):this._flowItems=["layer-list"]}async navigateToCreateFeature(e){e.detail.layerId&&e.detail.layerName&&await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateNonVisibleLayersOnMap(!0),this._getFormElements(),this._showSubmitCancelButton=!1,this._showNextButton=!1,this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"feature-create"]}navigateToChooseCategory(){this.updatePanelState(!1,!0),this._flowItems=[...this._flowItems,"reporting-layer-list"]}updateNonVisibleLayersOnMap(e){this._nonVisibleValidLayers.find(t=>t.id===this._selectedLayerId)&&this._selectedLayer&&this._selectedLayer.set("visible",e)}async layerListLoaded(e){if(this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"||this._flowItems[0]==="feature-list"){let t=e.detail,i=this.mapView&&await _(this.mapView),s=[];this._validLayers=[],this._nonVisibleValidLayers=[],i?.forEach(l=>{t.includes(l.id)&&(this._validLayers.push(l),l.visible||this._nonVisibleValidLayers.push(l),this._getLayersConfig(l.id)?.reporting&&this._layerItemsHash&&this._layerItemsHash[l.id]&&this._layerItemsHash[l.id].supportsAdd&&s.push(l.id))}),this.handleMapClick(),this._hasValidLayers=s.length>0,this._urlParamsLoaded||(this._urlParamsLoaded=!0,await this.loadFeatureFromURLParams())}}async displayFeaturesList(e){await this.setSelectedLayer(e.detail.layerId,e.detail.layerName),this.updateSortingOptions(),this.handleSelectedLayersFilter(),this._flowItems=[...this._flowItems,"feature-list"],this._prevSelectedLayerId=this._selectedLayerId}updateSortingOptions(){let e=this.sortOption===""?"newest":this.sortOption,t=e==="oldest"||e==="lowestVoted"?"asc":"desc",i=this.reportingOptions?.[this._selectedLayerId]?.like?this.reportingOptions?.[this._selectedLayerId]?.likeField:"",s=this._selectedLayer&&(e==="newest"||e==="oldest")?this._selectedLayer?.objectIdField:i;this._updatedSorting={field:s||"",order:t},this._updatedSortOption=!i&&(e==="highestVoted"||e==="lowestVoted")?"newest":e}async backFromFilterPanel(){this._filterList.value!=null&&(this._currentLayerExpressions=await this._filterList.value.getCurrentLayerExpressions()),this._featureList.value&&await this._featureList.value.refresh(),this.backFromSelectedPanel()}backFromSelectedPanel(){this._updatedProgressBarStatus=25;let e=[...this._flowItems];if(e[e.length-1]==="comment-details"||e[e.length-1]==="add-comment"||this.clearHighlights(),(e[e.length-1]==="reporting-layer-list"||e[e.length-1]==="feature-create"&&(e[0]==="feature-list"||e[e.length-2]==="feature-list"))&&this.updatePanelState(this._sidePanelCollapsed,!1),e.pop(),e.length===1&&e[0]==="layer-list"){this.navigateToHomePage();return}this._flowItems=[...e]}toggleSidePanel(){this._sidePanelCollapsed=!this._sidePanelCollapsed,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}updatePanelState(e,t){this._sidePanelCollapsed=e,this._showFullPanel=t,this.togglePanel.emit({panelState:this._sidePanelCollapsed,isFormOpen:this._showFullPanel})}async onFeatureSelectFromList(e){await this.setSelectedFeatures([e.detail]),this._flowItems=[...this._flowItems,"feature-details"]}async getRelatedTable(){let e=this._currentFeature?.layer,t=this.mapView&&await x(this.mapView);e.relationships?.some(i=>{let s=t?.filter(l=>e.url===l.url&&l.layerId===i.relatedTableId);return s&&s.length>0?(this._relatedTable=s[0],!0):!1})}async updatingFeatureDetails(e){this._showLoadingIndicator=e}async selectionChanged(e){this.updatingFeatureDetails(!0),await this.setCurrentFeature(e.detail.selectedFeature[0]),this.highlightOnMap(e.detail.selectedFeature[0]),this._selectedFeatureIndex=e.detail.selectedFeatureIndex,this._featureDetails.value&&await this._featureDetails.value.refresh(e.detail.selectedFeature[0])}showAddCommentsPanel(){this._flowItems=[...this._flowItems,"add-comment"]}async onCommentSelectFromList(e){this._selectedRelatedFeature=[e.detail],this._flowItems=[...this._flowItems,"comment-details"]}getFeatureListFlowItem(e,t){let i=this._getLayersConfig(this._selectedLayerId)?.reporting&&this._layerItemsHash&&this._layerItemsHash[this._selectedLayerId].supportsAdd,s=this._currentLayerExpressions?.length;return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${t} .loading=${!this.isMobile&&this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-list"}>${this._toggleSort()}<calcite-action icon=sort-ascending-arrow id=sort-popover slot=header-actions-end .text=${this._translations.sort} title=${this._translations.sort??p}></calcite-action>${s&&a`<calcite-action icon=filter .indicator=${this._filterActive} @click=${()=>{this.isMobile?this._toggleFilter():this._flowItems=[...this._flowItems,"filter-panel"]}} slot=header-actions-end .text=${this._translations.filter} title=${this._translations.filter??p}></calcite-action>`||""}${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.enableNewReports&&i&&a`<calcite-button appearance=solid @click=${this.navigateToCreateFeature} slot=footer width=full>${this.reportButtonText?this.reportButtonText:this._translations.createReportButtonText}</calcite-button>`||""}<calcite-panel>${a`<feature-list .applyLayerViewFilter=${this.showMyReportsOnly} class="height-full" .filterByMapExtent=${this.filterByMapExtent} highlight-on-hover .mapView=${this.mapView} .noFeaturesFoundMsg=${this._translations.featureErrorMsg} @featureClick=${()=>{this._showLoadingIndicator=!0}} @featureSelect=${this.onFeatureSelectFromList} page-size=30 .reportingOptions=${this.reportingOptions} .selectedLayerId=${e} .showFeatureSymbol=${this.showFeatureSymbol} .sortingInfo=${this._updatedSorting} ${o(this._featureList)}></feature-list>`}</calcite-panel></calcite-flow-item>`}getFilterPanel(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._translations.filterLayerTitle.replace("{{title}}",this._selectedLayerName)} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromFilterPanel} .selected=${this._flowItems[this._flowItems.length-1]==="filter-panel"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer><div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" .disabled=${!this._filterActive} @click=${this.resetFilterList} width=full>${this._translations.resetFilter}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromFilterPanel} width=full>${this._translations.close}</calcite-button></div></div><calcite-panel>${this.mapView&&a`<instant-apps-filter-list .closeBtnOnClick=${()=>{}} combobox-overlay-positioning=fixed .layerExpressions=${this._currentLayerExpressions} @filterListReset=${()=>void this._handleFilterListReset()} @filterUpdate=${()=>{let e=this._filterList.value?.filterCount;e!==void 0&&this._handleFilterUpdate(e>0)}} .view=${this.mapView} ${o(this._filterList)}></instant-apps-filter-list>`||""}</calcite-panel></calcite-flow-item>`}getFeatureDetailsFlowItem(){let e=this._selectedLayer?.relationships,t=this._getLayersConfig(this._selectedLayerId)?.comment&&e&&e.length>0&&this._relatedTable;return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._selectedLayerName} .loading=${this._showLoadingIndicator} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="feature-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}${this.mapView&&a`<instant-apps-social-share class=share-node flip-rtl popover-button-icon-scale=s remove-popover-offset scale=m share-button-color=neutral share-button-type=action slot=header-actions-end social-media .view=${this.mapView} ${o(this._shareNode)}></instant-apps-social-share>`||""}${this._selectedFeature.length>1&&this.getFeaturesPagination()||""}<calcite-panel><feature-details class=full-height .enableSnapping=${this.enableSnapping} .graphics=${this._selectedFeature} .layerItemsHash=${this._layerItemsHash} .mapView=${this.mapView} @addComment=${this.showAddCommentsPanel} @commentClick=${()=>{this._showLoadingIndicator=!0}} @commentSelect=${this.onCommentSelectFromList} @featureSelectionChange=${this.selectionChanged} @likeOrDislikeClicked=${()=>{this._featureList.value&&this._featureList.value.refresh(!0)}} @loadingStatus=${i=>void this.updatingFeatureDetails(i.detail)} .reportingOptions=${this.reportingOptions} .showFullCommentTitle=${this.showFullCommentTitle} .showUserImageInCommentsList=${this.showUserImageInCommentsList} ${o(this._featureDetails)}></feature-details>${t&&a`<calcite-button appearance=solid @click=${this.showAddCommentsPanel} slot=footer width=full>${this.commentButtonText||this._translations.comment}</calcite-button>`||""}</calcite-panel></calcite-flow-item>`}getFeaturesPagination(){return a`<div class="feature-pagination"><div><calcite-button appearance=transparent icon-start=chevron-left id=solutions-back @click=${()=>this._featureDetails.value&&void this._featureDetails.value.back()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-back><span>${this._translations.back}</span></calcite-tooltip></div><calcite-button appearance=transparent @click=${()=>this._featureDetails.value&&void this._featureDetails.value.toggleListView()} scale=s><span class="pagination-count">${this._getCount()}</span></calcite-button><div><calcite-button appearance=transparent icon-start=chevron-right id=solutions-next @click=${()=>this._featureDetails.value&&void this._featureDetails.value.next()} scale=s width=full></calcite-button><calcite-tooltip placement=top reference-element=solutions-next><span>${this._translations.next}</span></calcite-tooltip></div></div>`}getCommentDetailsFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromSelectedPanel} .selected=${this._flowItems[this._flowItems.length-1]==="comment-details"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<calcite-panel><info-card .enableSnapping=${this.enableSnapping} .graphics=${this._selectedRelatedFeature} .mapView=${this.mapView} @selectionChanged=${()=>{this._showLoadingIndicator=!1}}></info-card></calcite-panel></calcite-flow-item>`}getAddCommentFlowItem(){return a`<calcite-flow-item .collapsed=${this.isMobile&&this._sidePanelCollapsed} .heading=${this._relatedTable?.title||""} @calciteFlowItemBack=${this.backFromCreateRelatedFeaturePanel} .selected=${this._flowItems[this._flowItems.length-1]==="add-comment"}>${this.isMobile&&this.getActionToExpandCollapsePanel()||""}<div class=width-full slot=footer>${this._showSubmitCancelButton&&a`<div class=width-full slot=footer><calcite-button appearance=solid class="footer-top-button footer-button" @click=${this.onCreateRelatedFeatureSubmitButtonClick} width=full>${this._translations.submit}</calcite-button><calcite-button appearance=outline class=footer-button @click=${this.backFromCreateRelatedFeaturePanel} width=full>${this._translations.cancel}</calcite-button></div>`||""}</div><calcite-panel><create-related-feature customize-submit .enableSnapping=${this.enableSnapping} .mapView=${this.mapView} @fail=${this.addCommentFailed} @formReady=${this.onFormReady} @isActionPending=${this.showSubmitCancelButton} @success=${this.onCommentSubmitted} .selectedFeature=${this._currentFeature} .table=${this._relatedTable} ${o(this._createRelatedFeature)}></create-related-feature></calcite-panel></calcite-flow-item>`}async setSelectedFeatures(e){this._selectedFeature=e,await this.setCurrentFeature(this._selectedFeature.length?this._selectedFeature[0]:void 0)}async setCurrentFeature(e){if(this._currentFeature=e,e&&e.layer){let t=e.layer;t.title&&this.setSelectedLayer(t.id,t.title),this._currentFeatureId=e.attributes[t.objectIdField],this._getLayersConfig(t.id)?.comment&&t.relationships&&t.relationships.length>0&&await this.getRelatedTable()}else this._editableLayerIds.length>1&&(this.setSelectedLayer("",""),this.handlePrevLayersFilter()),this._currentFeatureId="";this._updateShareURL()}async highlightOnMap(e){if(this.clearHighlights(),e&&e.geometry&&e.layer&&e.layer.id!==void 0){let t=this.mapView&&await m(this.mapView,e.layer.id.toString());if(t){t.highlightOptions=null;let i=Number(e.getObjectId());this._highlightHandle=this.mapView&&await S([i],t,this.mapView,!0,this.zoomToScale)}}this.updatingFeatureDetails(!1)}clearHighlights(){this._highlightHandle&&this._highlightHandle.remove()}getActionToExpandCollapsePanel(){return a`<calcite-action .icon=${this._sidePanelCollapsed?"chevrons-up":"chevrons-down"} @click=${this.toggleSidePanel} slot=header-actions-end .text=${(this._sidePanelCollapsed?this._translations.expand:this._translations.collapse)||""}></calcite-action>`}async setMapView(){await this.getLayersToShowInList(),await this._updateFeatures(),this._editableLayerIds?.length===1?await this.renderFeaturesList():this._flowItems=["layer-list"],this.mapView&&(this.mapView.popupEnabled=!1,this._defaultCenter&&this._defaultLevel&&(await this.mapView.goTo({center:this._defaultCenter,zoom:this._defaultLevel}),this._defaultCenter=void 0,this._defaultLevel=void 0))}handleMapClick(){this._mapClickHandle&&this._mapClickHandle.remove(),this._mapClickHandle=this.reactiveUtils?.on(()=>this.mapView,"click",this.onMapClick.bind(this))}async onMapClick(e){if(this.mapView){this.mapView.popupEnabled=!1;let t=await this.mapView.hitTest(e),i=[],s=[],l=[],n=!1;t.results.length>0&&t.results.forEach(c=>{c.type==="graphic"&&i.push(c.graphic)}),i.length>0&&(await this._setReportingGraphics(i),s=this._getNonReportingLayerGraphics(i)),this._mapImageryLayersId.length>0&&(l=await this._getIdentifiedGraphics(e.mapPoint),n=l.length>0);let r=s.concat(l);if(r.length>0){this.mapView.popupEnabled=!0;let c={features:r,location:e.mapPoint,updateLocationEnabled:!n};await this.mapView.openPopup(c)}}}async _setReportingGraphics(e){let t=e.filter(i=>{if(i.layer?.type==="feature"){let s=i.layer;return this._validLayers.includes(s)}else return!1});t.length>0&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems.includes("feature-details")?(this._flowItems=[...this._flowItems.slice(0,this._flowItems.indexOf("feature-details")+1)],await this.highlightOnMap(e[0])):this._flowItems=[...this._flowItems,"feature-details"])}_getNonReportingLayerGraphics(e){return e.filter(t=>{if(t.layer?.type==="feature"){let i=t.layer;return!this._validLayers.includes(i)&&i?.popupEnabled&&i?.id}else return!1})}async _getIdentifiedGraphics(e){let t=this.IdentifyParameters&&new this.IdentifyParameters({geometry:e,tolerance:3,mapExtent:this.mapView?.extent}),i=this._mapImageryLayersId.map(async n=>{let r=this.mapView&&await d(this.mapView,n);if(r?.url&&t)return await this.identify?.identify(r.url,t)}),s=await Promise.all(i),l=[];return s.forEach(n=>{n.results.forEach(r=>{let c=Object.keys(r.feature.attributes).map(g=>({fieldName:g,label:g}));r.feature.popupTemplate={title:r.layerName,content:[{type:"fields",fieldInfos:c}]},l.push(r.feature)})}),l}_getCount(){let e=(this._selectedFeatureIndex+1).toString(),t=this._selectedFeature.length.toString();return this._translations.indexOfTotal.replace("{{index}}",e).replace("{{total}}",t)}_updateFloorDefinitionExpression(e){let t=`${e?.floorInfo?.floorField} = '${this.floorLevel}'`,i=e.definitionExpression;e.definitionExpression=i&&i?.indexOf(this._floorExpression)>-1?i.replace(this._floorExpression,t):t,this._floorExpression=t}_getFormElements(){let e=this._selectedLayer;if(e?.floorInfo?.floorField&&this.floorLevel&&e?.formTemplate){let t=this._formElements.find(i=>i.id===e.id);(this._formElements.length===0||!t)&&this._formElements.push({id:e.id,orgElements:e.formTemplate.elements,orgExpressionInfos:e.formTemplate.expressionInfos})}}reduceToConfiguredLayers(e,t){return Object.keys(e).reduce((i,s)=>{let l=this.reportingOptions?this._getLayersConfig(s)?.visible:e[s].supportsAdd;return!t.includes(s)&&l&&i.push(s),i},[])}refreshLists(){setTimeout(()=>{this._layerList.value&&this._flowItems[this._flowItems.length-1]==="layer-list"&&this._layerList.value.refresh(),this._featureList.value&&this._featureList.value.refresh()},50)}async _updateFeatures(){for(let e of this._editableLayerIds){let t=this.mapView&&await m(this.mapView,e);t&&(await this._showMyFeaturesOnly(t),t.layer?.floorInfo?.floorField&&this.floorLevel&&this._updateFloorDefinitionExpression(t.layer))}}async _showMyFeaturesOnly(e){let t=(this.mapView?.map).portalItem.portal?.credential?.userId;if(t&&e){let i=e.layer.editFieldsInfo?.creatorField.toLowerCase();e.filter=this.showMyReportsOnly&&i&&this.FeatureFilter?new this.FeatureFilter({where:i+"='"+t+"'"}):null}}async getLayersToShowInList(){let e=this.mapView&&await C(this.mapView,!0),t=this.mapView&&await _(this.mapView),i=[];t?.forEach(s=>{s?.type==="feature"&&s?.editingEnabled&&s?.capabilities?.operations?.supportsAdd&&(e[s.id].supportsAdd=!0),s?.editingEnabled||i.push(s.id)}),this._editableLayerIds=this.reduceToConfiguredLayers(e,i),this._layerItemsHash=e}async renderFeaturesList(){this._flowItems=["feature-list"];let e={detail:this._editableLayerIds};await this.layerListLoaded(e),await this.setSelectedLayer(this._validLayers[0].id,this._validLayers[0]?.title||""),this.updateSortingOptions(),this.handleSelectedLayersFilter()}_updateShareURL(){let e=this._shareNode.value?.shareUrl;if(!e)return;let t=new URL(e);this._selectedLayerId?t.searchParams.set("layerid",this._selectedLayerId):t.searchParams.delete("layerid"),this._selectedFeature?.length?t.searchParams.set("oid",this._currentFeatureId):t.searchParams.delete("oid"),this._shareNode.value&&(this._shareNode.value.autoUpdateShareUrl=!1,this._shareNode.value.shareUrl=t.href)}async loadFeatureFromURLParams(){if(this.center&&this.level&&await this.mapView?.goTo({center:this.center.split(";").map(Number),zoom:this.level}),this.layerId&&this.objectId){let e=this.mapView&&await d(this.mapView,this.layerId);if(e){let t=this.mapView&&await v([Number(this.objectId)],e,[],!0,this.mapView.spatialReference);t?.length&&(await this.setSelectedFeatures(t),this._flowItems.length&&this._flowItems[this._flowItems.length-1]!=="feature-details"?this._flowItems=[...this._flowItems,"feature-details"]:this._flowItems=[...this._flowItems])}}}async handleSelectedLayersFilter(){if(this._selectedLayer){let e=this.layerExpressions?structuredClone(this.layerExpressions.filter(t=>t.id===this._selectedLayerId)):[];this._t9nLayerExpressions!=null&&this.handleLayerExpressionsT9n(e,this._t9nLayerExpressions),this._currentLayerExpressions=e,this.setActiveDefinitionExpressions()}}async handlePrevLayersFilter(){if(this._prevSelectedLayerId){let e=this.mapView&&await d(this.mapView,this._prevSelectedLayerId);e&&this._initDefExpressions&&(e.definitionExpression=this._initDefExpressions[this._prevSelectedLayerId])}}resetFilterList(){this._filterList.value?.forceReset(),this._selectedLayer!==void 0&&this._initDefExpressions&&(this._selectedLayer.definitionExpression=this._initDefExpressions[this._selectedLayerId],this._filterActive=!1)}setActiveDefinitionExpressions(){if(this._selectedLayer===void 0)return;let e=[];if(this._currentLayerExpressions&&this._currentLayerExpressions?.length>0){let t=this._currentLayerExpressions[0];for(let i of t.expressions){let{active:s,definitionExpression:l}=i;s&&l&&e.push(`(${l})`)}this._filterActive=e.length>0,this.updateFilterLayerDefExpression(e,t.operator)}}updateFilterLayerDefExpression(e,t){let i=this._initDefExpressions&&this._initDefExpressions[this._selectedLayerId],s=e?.length>0&&i?`(${e.join(t)}) AND (${i})`:e.length>0?e.join(t):i;this._selectedLayer&&(this._selectedLayer.definitionExpression=s)}setInitExpressions(){if(this._initDefExpressions={},this.mapView==null)return;let e=this.mapView.map;e.allLayers.concat(e.allTables).forEach(t=>{if(t.type==="map-image"&&!this._mapImageryLayersId.includes(t.id)){this._mapImageryLayersId.push(t.id);return}if(t.type!=="feature")return;let i=t;this._initDefExpressions&&(this._initDefExpressions[i.id]=i.definitionExpression||"")})}handleLayerExpressionsT9n(e,t){e?.forEach(i=>{let s=t?.find(l=>l.id===i.id);s!=null&&(i.title=s.title,i.expressions?.forEach(l=>{let n=s.expressions?.find(r=>r.id===l.id);n!=null&&(l.name=n.name)}))})}};F("crowdsource-reporter",f);export{f as CrowdsourceReporter};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import{a as n}from"./WEJIR3KC.js";import{D as o,I as r,c as s,d as t,q as i}from"./23KRBWNX.js";import"./DTQTQMKB.js";var a=s`@layer{/** @license
3
+ v1.0.0-next.20250604 */
4
+ import{a as n}from"./F4VOMVZI.js";import{D as o,I as r,c as s,d as t,q as i}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";var a=s`@layer{/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
+ v1.0.0-next.20250604 */
4
+ import{a,b}from"./3UOZA57X.js";import"./IJRPDGUW.js";import"./2ZYEO4QU.js";import"./HQKIH26Q.js";import"./73M3K3MB.js";import"./FQLSHIBF.js";export{a as EventEditorTypes,b as buildSchema};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import{a as o,b as l}from"./G25UYWU2.js";import{b as c}from"./QHY3HOJZ.js";import{a as u}from"./WEJIR3KC.js";import{D as r,I as h,c as n,d as i,o as s}from"./23KRBWNX.js";import"./DTQTQMKB.js";var m=n`/** @license
3
+ v1.0.0-next.20250604 */
4
+ import{a as o,b as l}from"./USOHU6ZJ.js";import{b as c}from"./XWJ5XRDA.js";import{a as u}from"./F4VOMVZI.js";import{D as r,I as h,c as n,d as i,o as s}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";var m=n`/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
3
+ v1.0.0-next.20250604 */
4
4
  var u=(i,r)=>r.split(".").reduce(function(e,n){let l=n.match(/\[(.*?)\]$/);if(l){let t=l[1],s=n.replace(l[0],"");if(parseInt(t,10)>-1){let a=parseInt(t,10);return Array.isArray(e[s])&&e[s][a]?e[s][a]:void 0}else return o(e[s],t)}else return e&&e[n]!==void 0?e[n]!==null&&e[n].$use?u(i,e[n].$use):e[n]:void 0},i);function o(i,r){let e=r.split("(");if(!e||e.length!==2)return;let n,l=e[0],t=e[1].replace(")","").split(",").map(s=>s.trim());switch(l){case"findBy":let s=t[0],a;d(t[1])?a=parseFloat(t[1]):a=t[1].replace(/'/g,""),n=i.find(f=>f[s]===a);break;default:n=void 0}return n}function d(i){return!isNaN(parseFloat(i))}export{u as a};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import{D as d,G as s,I as g,J as i,c as l,d as p,q as u}from"./23KRBWNX.js";import"./DTQTQMKB.js";var m=l`@layer{/** @license
3
+ v1.0.0-next.20250604 */
4
+ import{D as d,G as s,I as g,J as i,c as l,d as p,q as u}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";var m=l`@layer{/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import"./DTQTQMKB.js";var t=async(e,s,l)=>({type:"Layout",elements:[{type:"Section",labelKey:`${e}.sections.discussions.label`,elements:[{labelKey:`${e}.fields.discussable.label`,scope:"/properties/isDiscussable",type:"Control",options:{control:"hub-field-input-tile-select",layout:"horizontal",labels:[`{{${e}.fields.discussable.enabled.label:translate}}`,`{{${e}.fields.discussable.disabled.label:translate}}`],descriptions:[`{{${e}.fields.discussable.enabled.description:translate}}`,`{{${e}.fields.discussable.disabled.description:translate}}`],icons:["speech-bubbles","circle-disallowed"],type:"radio",styles:{"max-width":"45rem"}}}]}]});export{t as buildUiSchema};
3
+ v1.0.0-next.20250604 */
4
+ import"./FQLSHIBF.js";var t=async(e,s,l)=>({type:"Layout",elements:[{type:"Section",labelKey:`${e}.sections.discussions.label`,elements:[{labelKey:`${e}.fields.discussable.label`,scope:"/properties/isDiscussable",type:"Control",options:{control:"hub-field-input-tile-select",layout:"horizontal",labels:[`{{${e}.fields.discussable.enabled.label:translate}}`,`{{${e}.fields.discussable.disabled.label:translate}}`],descriptions:[`{{${e}.fields.discussable.enabled.description:translate}}`,`{{${e}.fields.discussable.disabled.description:translate}}`],icons:["speech-bubbles","circle-disallowed"],type:"radio",styles:{"max-width":"45rem"}}}]}]});export{t as buildUiSchema};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import{a as f,c as g,e as I}from"./XASSYP2N.js";import"./OUXGXK3J.js";import"./K22YDYDF.js";import{a as w,b as c}from"./QHY3HOJZ.js";import{a as u}from"./WEJIR3KC.js";import{D as m,I as L,c as p,d as r,o as h,q as d}from"./23KRBWNX.js";import"./DTQTQMKB.js";async function _(o,e){let{api:s=4,type:t="decimal",places:i=2}=e||{};if(s===4){let[a]=await c(["esri/intl"]),l=a.convertNumberFormatToIntlOptions({places:i,type:t,digitSeparator:!0});return a.formatNumber(o,l)}let[n]=await c(["dojo/number"]);return n.format(o,{type:t,places:i})}var x=p`@layer{/** @license
3
+ v1.0.0-next.20250604 */
4
+ import{a as f,c as g,e as I}from"./6QFHZ3JL.js";import"./LACXORO5.js";import"./K4J7ONE5.js";import{a as w,b as c}from"./XWJ5XRDA.js";import{a as u}from"./F4VOMVZI.js";import{D as m,I as L,c as p,d as r,o as h,q as d}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";async function _(o,e){let{api:s=4,type:t="decimal",places:i=2}=e||{};if(s===4){let[a]=await c(["esri/intl"]),l=a.convertNumberFormatToIntlOptions({places:i,type:t,digitSeparator:!0});return a.formatNumber(o,l)}let[n]=await c(["dojo/number"]);return n.format(o,{type:t,places:i})}var x=p`@layer{/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import a from"./FV7CWXXA.js";import{a as y,c as f}from"./VGUIEWXD.js";import"./M7NNYPVJ.js";import"./GSFDUUIV.js";import"./WUYXX4RA.js";import"./4FJC45LY.js";import"./XIH6ZMGJ.js";import"./FRU4NUKP.js";import{j as g,k as m,n as r}from"./OUXGXK3J.js";import{a as p}from"./WEJIR3KC.js";import{C as i,D as c,G as d,I as u,c as n,d as s,e as l,o as h}from"./23KRBWNX.js";import"./DTQTQMKB.js";export default $arcgis.t(([{b:a,c:_}])=>{var x=n`/** @license
3
+ v1.0.0-next.20250604 */
4
+ import a from"./2AFE7E7M.js";import{a as y,c as f}from"./UXMQRK5S.js";import"./B5IEC4IT.js";import"./5TTXDO2X.js";import"./CWNIFA6D.js";import"./CNEWKYEJ.js";import"./XC5VKQJJ.js";import"./VT5P4INT.js";import{j as g,k as m,n as r}from"./LACXORO5.js";import{a as p}from"./F4VOMVZI.js";import{C as i,D as c,G as d,I as u,c as n,d as s,e as l,o as h}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";export default $arcgis.t(([{b:a,c:_}])=>{var x=n`/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
4
- import{a as k}from"./MEWYK3DQ.js";import"./62PWRVOA.js";import{g as s}from"./OUXGXK3J.js";import{a as g,b as m}from"./G25UYWU2.js";import{b as y}from"./QHY3HOJZ.js";import{a as w}from"./WEJIR3KC.js";import{D as n,E as o,I as p,c,d as l,o as a,q as d}from"./23KRBWNX.js";import"./DTQTQMKB.js";var _=c`@layer{/** @license
3
+ v1.0.0-next.20250604 */
4
+ import{a as k}from"./DR4VMI7G.js";import"./KAN7CBK7.js";import{g as s}from"./LACXORO5.js";import{a as g,b as m}from"./USOHU6ZJ.js";import{b as y}from"./XWJ5XRDA.js";import{a as w}from"./F4VOMVZI.js";import{D as n,E as o,I as p,c,d as l,o as a,q as d}from"./E7CZ4ZJ7.js";import"./FQLSHIBF.js";var _=c`@layer{/** @license
5
5
  * Copyright 2025 Esri
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/1.0/esri/copyright.txt for details.
3
- v1.0.0-next.20250603.1 */
3
+ v1.0.0-next.20250604 */
4
4
  function L(r,e){var t={};for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,n=Object.getOwnPropertySymbols(r);o<n.length;o++)e.indexOf(n[o])<0&&Object.prototype.propertyIsEnumerable.call(r,n[o])&&(t[n[o]]=r[n[o]]);return t}function C(r){return Object.keys(r).some(e=>{let t=r[e];if(!t)return!1;switch(t&&t.toParam&&(t=t.toParam()),t.constructor.name){case"Array":return!1;case"Object":return!1;case"Date":return!1;case"Function":return!1;case"Boolean":return!1;case"String":return!1;case"Number":return!1;default:return!0}})}function N(r){let e={};return Object.keys(r).forEach(t=>{var n,o;let s=r[t];if(s&&s.toParam&&(s=s.toParam()),!s&&s!==0&&typeof s!="boolean"&&typeof s!="string")return;let i=s.constructor.name,a;switch(i){case"Array":let u=(o=(n=s[0])===null||n===void 0?void 0:n.constructor)===null||o===void 0?void 0:o.name;a=u==="Array"?s:u==="Object"?JSON.stringify(s):s.join(",");break;case"Object":a=JSON.stringify(s);break;case"Date":a=s.valueOf();break;case"Function":a=null;break;case"Boolean":a=s+"";break;default:a=s;break}(a||a===0||typeof a=="string"||Array.isArray(a))&&(e[t]=a)}),e}function J(r,e){return Array.isArray(e)&&e[0]&&Array.isArray(e[0])?e.map(t=>J(r,t)).join("&"):encodeURIComponent(r)+"="+encodeURIComponent(e)}function O(r){let e=N(r);return Object.keys(e).map(t=>J(t,e[t])).join("&")}var K=globalThis.FormData,me=globalThis.File,ge=globalThis.Blob;function W(r,e){let t=C(r)||e,n=N(r);if(t){let o=new K;return Object.keys(n).forEach(s=>{if(typeof Blob<"u"&&n[s]instanceof Blob){let i=n.fileName||n[s].name||s;o.append(s,n[s],i)}else o.append(s,n[s])}),o}else return O(r)}var b=class extends Error{constructor(e,t,n,o,s){super(e);let i=new.target.prototype;Object.setPrototypeOf(this,i),e=e||"UNKNOWN_ERROR",t=t||"UNKNOWN_ERROR_CODE",this.name="ArcGISRequestError",this.message=t==="UNKNOWN_ERROR_CODE"?e:`${t}: ${e}`,this.originalMessage=e,this.code=t,this.response=n,this.url=o,this.options=s}};function V(r){console&&console.warn&&console.warn.apply(console,[r])}function Q(){return Promise.resolve({fetch:globalThis.fetch,Headers:globalThis.Headers,Response:globalThis.Response,Request:globalThis.Request})}var q="@esri/arcgis-rest-js";function ie(){return globalThis.DEFAULT_ARCGIS_REQUEST_OPTIONS||{httpMethod:"POST",params:{f:"json"}}}var R=class extends b{constructor(e="AUTHENTICATION_ERROR",t="AUTHENTICATION_ERROR_CODE",n,o,s){super(e,t,n,o,s),this.name="ArcGISAuthError",this.message=t==="AUTHENTICATION_ERROR_CODE"?e:`${t}: ${e}`;let i=new.target.prototype;Object.setPrototypeOf(this,i)}retry(e,t=1){let n=0,o=(s,i)=>{n=n+1,e(this.url,this.options).then(a=>{let u=Object.assign(Object.assign({},this.options),{authentication:a});return X(this.url,u)}).then(a=>{s(a)}).catch(a=>{a.name==="ArcGISAuthError"&&n<t?o(s,i):a.name===this.name&&a.message===this.message&&n>=t?i(this):i(a)})};return new Promise((s,i)=>{o(s,i)})}};function ae(r,e,t,n,o){if(r.code>=400){let{message:s,code:i}=r;throw new b(s,i,r,e,n)}if(r.error){let{message:s,code:i,messageCode:a}=r.error,u=a||i||"UNKNOWN_ERROR_CODE";throw i===498||i===499?o||new R(s,u,r,e,n):new b(s,u,r,e,n)}if(r.status==="failed"||r.status==="failure"){let s,i="UNKNOWN_ERROR_CODE";try{s=JSON.parse(r.statusMessage).message,i=JSON.parse(r.statusMessage).code}catch{s=r.statusMessage||r.message}throw new b(s,i,r,e,n)}return r}function X(r,e){let t=ie(),n=Object.assign(Object.assign(Object.assign({httpMethod:"POST"},t),e),{params:Object.assign(Object.assign({},t.params),e.params),headers:Object.assign(Object.assign({},t.headers),e.headers)}),{httpMethod:o,rawResponse:s}=n,i=Object.assign({f:"json"},n.params),a=null,u={method:o,signal:n.signal,credentials:n.credentials||"same-origin"};n.headers&&n.headers["X-Esri-Auth-Client-Id"]&&r.indexOf("/oauth2/platformSelf")>-1&&(u.credentials="include");let g;if(typeof n.authentication=="string"){let c=n.authentication;g={portal:"https://www.arcgis.com/sharing/rest",getToken:()=>Promise.resolve(c)},!n.authentication.startsWith("AAPK")&&!n.authentication.startsWith("AATK")&&!n.suppressWarnings&&!globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING&&(V("Using an oAuth 2.0 access token directly in the token option is discouraged. Consider using ArcGISIdentityManager or Application session. See https://esriurl.com/arcgis-rest-js-direct-token-warning for more information."),globalThis.ARCGIS_REST_JS_SUPPRESS_TOKEN_WARNING=!0)}else g=n.authentication;let d=r;return(g?g.getToken(r).catch(c=>(c.url=r,c.options=n,a=c,Promise.resolve(""))):Promise.resolve("")).then(c=>{c.length&&(i.token=c),g&&g.getDomainCredentials&&(u.credentials=g.getDomainCredentials(r));let h={};if(u.method==="GET"){i.token&&n.hideToken&&typeof window>"u"&&(h["X-Esri-Authorization"]=`Bearer ${i.token}`,delete i.token);let f=O(i)===""?r:r+"?"+O(i);n.maxUrlLength&&f.length>n.maxUrlLength||!n.maxUrlLength&&f.length>2e3||i.token&&n.hideToken?(u.method="POST",c.length&&n.hideToken&&(i.token=c,delete h["X-Esri-Authorization"])):r=f}let E=new RegExp("/items/.+/updateResources").test(r);return u.method==="POST"&&(u.body=W(i,E)),u.headers=Object.assign(Object.assign({},h),n.headers),(typeof window>"u"||window&&typeof window.document>"u")&&!u.headers.referer&&(u.headers.referer=q),!C(i)&&!E&&(u.headers["Content-Type"]="application/x-www-form-urlencoded"),globalThis.fetch?globalThis.fetch(r,u):Q().then(({fetch:l})=>l(r,u))}).then(c=>{if(!c.ok)return c.json().then(h=>{let{status:E,statusText:l}=c,{message:f,details:T}=h.error,w=`${f}. ${T?T.join(" "):""}`.trim();throw new b(w,`HTTP ${E} ${l}`,h,r,n)}).catch(h=>{if(h.name==="ArcGISRequestError")throw h;let{status:E,statusText:l}=c;throw new b(l,`HTTP ${E}`,c,r,n)});if(s)return c;switch(i.f){case"json":return c.json();case"geojson":return c.json();case"html":return c.text();case"text":return c.text();default:return c.blob()}}).then(c=>{if((i.f==="json"||i.f==="geojson")&&!s){let h=ae(c,d,i,n,a);if(a){let E=r.toLowerCase().split(/\/rest(\/admin)?\/services\//)[0];n.authentication.federatedServers[E]={token:[],expires:new Date(Date.now()+86400*1e3)},a=null}return h}else return c})}function p(r,e={params:{f:"json"}}){let{request:t}=e,n=L(e,["request"]);return t?t(r,n):X(r,n).catch(o=>o instanceof R&&e.authentication&&typeof e.authentication!="string"&&e.authentication.canRefresh&&e.authentication.refreshCredentials?o.retry(()=>e.authentication.refreshCredentials(),1):Promise.reject(o))}function ce(r){let[e,t]=r.split("=");return{key:decodeURIComponent(e),value:decodeURIComponent(t)}}function Y(r){return!r||r.length<=0?{}:r.replace(/^#/,"").replace(/^\?/,"").split("&").reduce((e,t)=>{let{key:n,value:o}=ce(t);return e[n]=o,e},{})}var B=5*60*1e3;function v(r,e){let t=e;return t.rawResponse=!1,p(r,t).then(n=>{if("token"in n&&"expires"in n)return{token:n.token,username:e.params.username,expires:new Date(n.expires)};let o={token:n.access_token,username:n.username,expires:new Date(Date.now()+n.expires_in*1e3-B),ssl:n.ssl===!0};return n.refresh_token&&(o.refreshToken=n.refresh_token),n.refresh_token_expires_in&&(o.refreshTokenExpires=new Date(Date.now()+n.refresh_token_expires_in*1e3-B)),o})}function m(r){return typeof r!="string"||(r=r.trim(),r[r.length-1]==="/"&&(r=r.slice(0,-1))),r}var F=/^https?:\/\/(\S+)\.arcgis\.com.+/;function Z(r){return F.test(r)}function ue(r){if(!F.test(r))return r;switch(G(r)){case"dev":return"https://devext.arcgis.com/sharing/rest";case"qa":return"https://qaext.arcgis.com/sharing/rest";default:return"https://www.arcgis.com/sharing/rest"}}function G(r){if(!F.test(r))return null;let t=r.match(F)[1].split(".").pop();return t.includes("dev")?"dev":t.includes("qa")?"qa":"production"}function ee(r,e){let t=m(ue(e)).replace(/https?:\/\//,""),n=m(r).replace(/https?:\/\//,"");return new RegExp(n,"i").test(t)}function te(r,e){let t=Z(r),n=Z(e),o=G(r),s=G(e);return!!(t&&n&&o===s)}function re(r,e,t="https://www.arcgis.com/sharing/rest"){let n=`${t}/oauth2/validateAppAccess`;return p(n,{method:"POST",params:{f:"json",client_id:e,token:r}})}function Ge(r,e,t){let n=["params","httpMethod","rawResponse","authentication","hideToken","portal","credentials","maxUrlLength","headers","signal","suppressWarnings","request"],o=Object.assign(Object.assign({params:{}},t),r);return o.params=e.reduce((s,i)=>((r[i]||typeof r[i]=="boolean"||typeof r[i]=="number"&&r[i]===0)&&(s[i]=r[i]),s),o.params),n.reduce((s,i)=>(o[i]&&(s[i]=o[i]),s),{})}var x;(function(r){r.TOKEN_REFRESH_FAILED="TOKEN_REFRESH_FAILED",r.GENERATE_TOKEN_FOR_SERVER_FAILED="GENERATE_TOKEN_FOR_SERVER_FAILED",r.REFRESH_TOKEN_EXCHANGE_FAILED="REFRESH_TOKEN_EXCHANGE_FAILED",r.NOT_FEDERATED="NOT_FEDERATED",r.UNKNOWN_ERROR_CODE="UNKNOWN_ERROR_CODE"})(x||(x={}));var y=class extends Error{constructor(e="UNKNOWN_ERROR",t=x.UNKNOWN_ERROR_CODE,n,o,s){super(e);let i=new.target.prototype;Object.setPrototypeOf(this,i),this.name="ArcGISTokenRequestError",this.message=`${t}: ${e}`,this.originalMessage=e,this.code=t,this.response=n,this.url=o,this.options=s}};var D=class extends Error{constructor(){super("The user has denied your authorization request.");let t=new.target.prototype;Object.setPrototypeOf(this,t),this.name="ArcGISAccessDeniedError"}};var ne;(function(r){r.ArcGISRequestError="ArcGISRequestError",r.ArcGISAuthError="ArcGISAuthError",r.ArcGISAccessDeniedError="ArcGISAccessDeniedError",r.ArcGISTokenRequestError="ArcGISTokenRequestError"})(ne||(ne={}));var A=class{constructor(e){this.portal=e.portal?m(e.portal):"https://www.arcgis.com/sharing/rest",this._username=e.username}get username(){if(this._username)return this._username;if(this._user&&this._user.username)return this._user.username}getUsername(){return this.username?Promise.resolve(this.username):this.getUser().then(e=>e.username)}getUser(e){if(this._pendingUserRequest)return this._pendingUserRequest;if(this._user)return Promise.resolve(this._user);{let t=`${this.portal}/community/self`,n=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingUserRequest=p(t,n).then(o=>(this._user=o,this._pendingUserRequest=null,o)),this._pendingUserRequest}}clearCachedUserInfo(){this._user=null}};var H;(function(r){r.Success="Succeeded",r.Failed="Failed",r.Waiting="Waiting",r.Cancelled="Cancelled",r.Cancelling="Cancelling",r.New="New",r.Executing="Executing",r.Submitted="Submitted",r.Failure="Failure",r.TimedOut="TimedOut",r.Error="Error",r.Status="Etatus",r.Unknown="Unknown"})(H||(H={}));function oe(r){let e=`${m(r.portal||"https://www.arcgis.com/sharing/rest")}/oauth2/revokeToken/`,t=r.token,n=r.clientId;delete r.portal,delete r.clientId,delete r.token;let o=Object.assign(Object.assign({},r),{httpMethod:"POST",params:{client_id:n,auth_token:t}});return p(e,o).then(s=>{if(!s.success)throw new b("Unable to revoke token",500,s,e,o);return s})}function M(r,e=window){return!e&&window&&(e=window),e.btoa(String.fromCharCode.apply(null,r)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function se(r,e=window){if(!e&&window&&(e=window),r&&e.isSecureContext&&e.crypto&&e.crypto.subtle){let n=new e.TextEncoder().encode(r);return e.crypto.subtle.digest("SHA-256",n).then(o=>M(new Uint8Array(o),e))}return Promise.resolve(null)}function z(r){!r&&window&&(r=window);let e=r.crypto.getRandomValues(new Uint8Array(32));return M(e)}function le(r){return typeof r.userId=="string"||typeof r.expires=="number"}var k=class r extends A{constructor(e){if(super(e),this.clientId=e.clientId,this._refreshToken=e.refreshToken,this._refreshTokenExpires=e.refreshTokenExpires,this.password=e.password,this._token=e.token,this._tokenExpires=e.tokenExpires,this.portal=e.portal?m(e.portal):"https://www.arcgis.com/sharing/rest",this.ssl=e.ssl,this.provider=e.provider||"arcgis",this.tokenDuration=e.tokenDuration||20160,this.redirectUri=e.redirectUri,this.server=e.server,this.referer=e.referer,this.federatedServers={},this.trustedDomains=[],e.server){let t=this.getServerRootUrl(e.server);this.federatedServers[t]={token:e.token,expires:e.tokenExpires}}this._pendingTokenRequests={}}get token(){return this._token}get tokenExpires(){return this._tokenExpires}get refreshToken(){return this._refreshToken}get refreshTokenExpires(){return this._refreshTokenExpires}get canRefresh(){return!!(this.username&&this.password||this.clientId&&this.refreshToken&&this.redirectUri)}static beginOAuth2(e,t){!t&&window&&(t=window);let{portal:n,provider:o,clientId:s,expiration:i,redirectUri:a,popup:u,popupWindowFeatures:g,locale:d,params:c,style:h,pkce:E,state:l}=Object.assign({portal:"https://www.arcgis.com/sharing/rest",provider:"arcgis",expiration:20160,popup:!0,popupWindowFeatures:"height=400,width=600,menubar=no,location=yes,resizable=yes,scrollbars=yes,status=yes",locale:"",style:"",pkce:!0},e),f=l||z(t),T=`ARCGIS_REST_JS_AUTH_STATE_${s}`;t.localStorage.setItem(T,f);let w=`${m(n)}/oauth2/authorize`,I={client_id:s,response_type:E?"code":"token",expiration:i,redirect_uri:a,state:JSON.stringify({id:f,originalUrl:t.location.href}),locale:d,style:h};o!=="arcgis"&&(w=`${m(n)}/oauth2/social/authorize`,I.socialLoginProviderName=o,I.autoAccountCreateForSocial=!0);let $;if(E){let P=z(t),U=`ARCGIS_REST_JS_CODE_VERIFIER_${s}`;t.localStorage.setItem(U,P),$=se(P,t).then(function(_){I.code_challenge_method=_?"S256":"plain",I.code_challenge=_||P})}else $=Promise.resolve();return $.then(()=>{if(w=`${w}?${O(I)}`,c&&(w=`${w}&${O(c)}`),u)return new Promise((P,U)=>{t.addEventListener(`arcgis-rest-js-popup-auth-${s}`,_=>{if(_.detail.error==="access_denied"){let j=new D;return U(j),j}if(_.detail.errorMessage){let j=new R(_.detail.errorMessage,_.detail.error);return U(j),j}P(new r({clientId:s,portal:n,ssl:_.detail.ssl,token:_.detail.token,tokenExpires:_.detail.expires,username:_.detail.username,refreshToken:_.detail.refreshToken,refreshTokenExpires:_.detail.refreshTokenExpires,redirectUri:a}))},{once:!0}),t.open(w,"oauth-window",g),t.dispatchEvent(new CustomEvent("arcgis-rest-js-popup-auth-start"))});t.location.href=w})}static completeOAuth2(e,t){!t&&window&&(t=window);let{portal:n,clientId:o,popup:s,pkce:i,redirectUri:a}=Object.assign({portal:"https://www.arcgis.com/sharing/rest",popup:!0,pkce:!0},e),u=`ARCGIS_REST_JS_AUTH_STATE_${o}`,g=t.localStorage.getItem(u),d=Y(i?t.location.search.replace(/^\?/,""):t.location.hash.replace(/^#/,"")),c=d&&d.state?JSON.parse(d.state):void 0;function h(l,f,T){if(t.localStorage.removeItem(u),s&&t.opener){t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${o}`,{detail:{error:f,errorMessage:l}})),t.close();return}return T&&t.history.replaceState(t.history.state,"",T),f==="access_denied"?Promise.reject(new D):Promise.reject(new R(l,f))}function E(l,f){if(t.localStorage.removeItem(u),s&&t.opener){t.opener.dispatchEvent(new CustomEvent(`arcgis-rest-js-popup-auth-${o}`,{detail:Object.assign({},l)})),t.close();return}return t.history.replaceState(t.history.state,"",f),new r({clientId:o,portal:n,ssl:l.ssl,token:l.token,tokenExpires:l.expires,username:l.username,refreshToken:l.refreshToken,refreshTokenExpires:l.refreshTokenExpires,redirectUri:a||location.href.replace(location.search,"")})}if(!g||!c)return h("No authentication state was found, call `ArcGISIdentityManager.beginOAuth2(...)` to start the authentication process.","no-auth-state");if(c.id!==g)return h("Saved client state did not match server sent state.","mismatched-auth-state");if(d.error){let l=d.error,f=d.error_description||"Unknown error";return h(f,l,c.originalUrl)}if(i&&d.code){let l=m(`${n}/oauth2/token/`),f=`ARCGIS_REST_JS_CODE_VERIFIER_${o}`,T=t.localStorage.getItem(f);return t.localStorage.removeItem(f),v(l,{httpMethod:"POST",params:{client_id:o,code_verifier:T,grant_type:"authorization_code",redirect_uri:a||location.href.replace(location.search,""),code:d.code}}).then(w=>E(Object.assign(Object.assign({},w),c),c.originalUrl)).catch(w=>h(w.originalMessage,w.code,c.originalUrl))}return!i&&d.access_token?Promise.resolve(E(Object.assign({token:d.access_token,expires:new Date(Date.now()+parseInt(d.expires_in,10)*1e3),ssl:d.ssl==="true",username:d.username},c),c.originalUrl)):h("Unknown error","oauth-error",c.originalUrl)}static fromParent(e,t){!t&&window&&(t=window);let n;return new Promise((o,s)=>{n=i=>{if(i.source===t.parent&&i.data)try{return o(r.parentMessageHandler(i))}catch(a){return s(a)}},t.addEventListener("message",n,!1),t.parent.postMessage({type:"arcgis:auth:requestCredential"},e)}).then(o=>(t.removeEventListener("message",n,!1),o))}static authorize(e,t){let{portal:n,clientId:o,expiration:s,redirectUri:i,state:a}=Object.assign({portal:"https://arcgis.com/sharing/rest",expiration:20160},e),u={client_id:o,expiration:s,response_type:"code",redirect_uri:i};a&&(u.state=a);let g=`${n}/oauth2/authorize?${O(u)}`;t.writeHead(301,{Location:g}),t.end()}static exchangeAuthorizationCode(e,t){let{portal:n,clientId:o,redirectUri:s}=Object.assign({portal:"https://www.arcgis.com/sharing/rest"},e);return v(`${n}/oauth2/token`,{params:{grant_type:"authorization_code",client_id:o,redirect_uri:s,code:t}}).then(i=>new r({clientId:o,portal:n,ssl:i.ssl,redirectUri:s,refreshToken:i.refreshToken,refreshTokenExpires:i.refreshTokenExpires,token:i.token,tokenExpires:i.expires,username:i.username})).catch(i=>{throw new y(i.message,x.REFRESH_TOKEN_EXCHANGE_FAILED,i.response,i.url,i.options)})}static deserialize(e){let t=JSON.parse(e);return new r({clientId:t.clientId,refreshToken:t.refreshToken,refreshTokenExpires:t.refreshTokenExpires?new Date(t.refreshTokenExpires):void 0,username:t.username,password:t.password,token:t.token,tokenExpires:t.tokenExpires?new Date(t.tokenExpires):void 0,portal:t.portal,ssl:t.ssl,tokenDuration:t.tokenDuration,redirectUri:t.redirectUri,server:t.server})}static fromCredential(e,t){let n=typeof e.ssl<"u"?e.ssl:!0,o=e.expires||Date.now()+72e5;return t.hasServer?new r({server:e.server,ssl:n,token:e.token,username:e.userId,tokenExpires:new Date(o)}):new r({portal:m(e.server.includes("sharing/rest")?e.server:e.server+"/sharing/rest"),ssl:n,token:e.token,username:e.userId,tokenExpires:new Date(o)})}static parentMessageHandler(e){if(e.data.type==="arcgis:auth:credential"){let t=e.data.credential;return le(t)?r.fromCredential(t,{hasPortal:!0,hasServer:!1,server:t.server}):new r(t)}if(e.data.type==="arcgis:auth:error"){let t=new Error(e.data.error.message);throw t.name=e.data.error.name,t}else throw new Error("Unknown message type.")}static destroy(e){return oe({clientId:e.clientId,portal:e.portal,token:e.refreshToken||e.token})}static fromToken(e){let t=new r(e);return t.getUser().then(()=>t)}static signIn(e){let t=new r(e);return t.getUser().then(()=>t)}toCredential(){return{expires:this.tokenExpires.getTime(),server:this.server||this.portal,ssl:this.ssl,token:this.token,userId:this.username}}getPortal(e){if(this._pendingPortalRequest)return this._pendingPortalRequest;if(this._portalInfo)return Promise.resolve(this._portalInfo);{let t=`${this.portal}/portals/self`,n=Object.assign(Object.assign({httpMethod:"GET",authentication:this},e),{rawResponse:!1});return this._pendingPortalRequest=p(t,n).then(o=>(this._portalInfo=o,this._pendingPortalRequest=null,o)),this._pendingPortalRequest}}getToken(e,t){return te(this.portal,e)?this.getFreshToken(t):new RegExp(this.portal,"i").test(e)?this.getFreshToken(t):this.getTokenForServer(e,t)}validateAppAccess(e){return this.getToken(this.portal).then(t=>re(t,e))}toJSON(){return{clientId:this.clientId,refreshToken:this.refreshToken,refreshTokenExpires:this.refreshTokenExpires||void 0,username:this.username,password:this.password,token:this.token,tokenExpires:this.tokenExpires||void 0,portal:this.portal,ssl:this.ssl,tokenDuration:this.tokenDuration,redirectUri:this.redirectUri,server:this.server}}serialize(){return JSON.stringify(this)}enablePostMessageAuth(e,t){!t&&window&&(t=window),this._hostHandler=this.createPostMessageHandler(e),t.addEventListener("message",this._hostHandler,!1)}disablePostMessageAuth(e){!e&&window&&(e=window),e.removeEventListener("message",this._hostHandler,!1)}refreshCredentials(e){return this.clearCachedUserInfo(),this.username&&this.password?this.refreshWithUsernameAndPassword(e):this.clientId&&this.refreshToken?this.refreshWithRefreshToken():Promise.reject(new y("Unable to refresh token. No refresh token or password present.",x.TOKEN_REFRESH_FAILED))}getServerRootUrl(e){let[t]=m(e).split(/\/rest(\/admin)?\/services(?:\/|#|\?|$)/),[n,o,s]=t.match(/(https?:\/\/)(.+)/),[i,...a]=s.split("/");return`${o}${i.toLowerCase()}/${a.join("/")}`}getDomainCredentials(e){return!this.trustedDomains||!this.trustedDomains.length?"same-origin":(e=e.toLowerCase(),this.trustedDomains.some(t=>e.startsWith(t.toLowerCase()))?"include":"same-origin")}signOut(){return r.destroy(this)}createPostMessageHandler(e){return t=>{let n=e.indexOf(t.origin)>-1,o=t.data.type==="arcgis:auth:requestCredential",s=this.tokenExpires.getTime()>Date.now();if(n&&o){let i={};if(s){let a=this.toCredential();a.server=a.server.replace("/sharing/rest",""),i={type:"arcgis:auth:credential",credential:a}}else i={type:"arcgis:auth:error",error:{name:"tokenExpiredError",message:"Token was expired, and not returned to the child application"}};t.source.postMessage(i,t.origin)}}}getTokenForServer(e,t){let n=this.getServerRootUrl(e),o=this.federatedServers[n];return o&&o.expires&&o.expires.getTime()>Date.now()?Promise.resolve(o.token):this._pendingTokenRequests[n]?this._pendingTokenRequests[n]:(this._pendingTokenRequests[n]=this.fetchAuthorizedDomains().then(()=>p(`${n}/rest/info`,{credentials:this.getDomainCredentials(e)}).then(s=>{if(s.owningSystemUrl){if(ee(s.owningSystemUrl,this.portal))return p(`${s.owningSystemUrl}/sharing/rest/info`,t);throw new y(`${e} is not federated with ${this.portal}.`,x.NOT_FEDERATED)}else{if(s.authInfo&&this.federatedServers[n]!==void 0)return Promise.resolve({authInfo:s.authInfo});throw new y(`${e} is not federated with any portal and is not explicitly trusted.`,x.NOT_FEDERATED)}}).then(s=>this.token&&this.tokenExpires.getTime()<Date.now()?this.server?this.refreshCredentials().then(()=>({token:this.token,expires:this.tokenExpires})):this.refreshCredentials().then(()=>this.generateTokenForServer(s.authInfo.tokenServicesUrl,n)):this.generateTokenForServer(s.authInfo.tokenServicesUrl,n)).then(s=>(this.federatedServers[n]=s,delete this._pendingTokenRequests[n],s.token))),this._pendingTokenRequests[n])}generateTokenForServer(e,t){return p(e,{params:{token:this.token,serverUrl:t,expiration:this.tokenDuration}}).then(n=>({token:n.token,expires:new Date(n.expires-1e3*60*5)})).catch(n=>{throw new y(n.message,x.GENERATE_TOKEN_FOR_SERVER_FAILED,n.response,n.url,n.options)})}getFreshToken(e){return this.token&&!this.tokenExpires?Promise.resolve(this.token):this.token&&this.tokenExpires&&this.tokenExpires.getTime()>Date.now()?Promise.resolve(this.token):(this._pendingTokenRequests[this.portal]||(this._pendingTokenRequests[this.portal]=this.refreshCredentials(e).then(()=>(this._pendingTokenRequests[this.portal]=null,this.token))),this._pendingTokenRequests[this.portal])}refreshWithUsernameAndPassword(e){let t={username:this.username,password:this.password,expiration:this.tokenDuration,client:"referer",referer:this.referer?this.referer:typeof window<"u"&&typeof window.document<"u"&&window.location&&window.location.origin?window.location.origin:q};return(this.server?p(`${this.getServerRootUrl(this.server)}/rest/info`).then(n=>p(n.authInfo.tokenServicesUrl,Object.assign({params:t},e))):p(`${this.portal}/generateToken`,Object.assign({params:t},e))).then(n=>(this.updateToken(n.token,new Date(n.expires)),this)).catch(n=>{throw new y(n.message,x.TOKEN_REFRESH_FAILED,n.response,n.url,n.options)})}refreshWithRefreshToken(e){if(this.refreshToken&&this.refreshTokenExpires&&this.refreshTokenExpires.getTime()-864e5<Date.now())return this.exchangeRefreshToken(e);let n=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,grant_type:"refresh_token"}},e);return v(`${this.portal}/oauth2/token`,n).then(o=>this.updateToken(o.token,o.expires)).catch(o=>{throw new y(o.message,x.TOKEN_REFRESH_FAILED,o.response,o.url,o.options)})}updateToken(e,t){return this._token=e,this._tokenExpires=t,this}exchangeRefreshToken(e){let t=Object.assign({params:{client_id:this.clientId,refresh_token:this.refreshToken,redirect_uri:this.redirectUri,grant_type:"exchange_refresh_token"}},e);return v(`${this.portal}/oauth2/token`,t).then(n=>(this._token=n.token,this._tokenExpires=n.expires,this._refreshToken=n.refreshToken,this._refreshTokenExpires=n.refreshTokenExpires,this)).catch(n=>{throw new y(n.message,x.REFRESH_TOKEN_EXCHANGE_FAILED,n.response,n.url,n.options)})}fetchAuthorizedDomains(){return this.server||!this.portal?Promise.resolve(this):this.getPortal().then(e=>(e.authorizedCrossOriginDomains&&e.authorizedCrossOriginDomains.length&&(this.trustedDomains=e.authorizedCrossOriginDomains.filter(t=>!t.startsWith("http://")).map(t=>t.startsWith("https://")?t:`https://${t}`)),this))}};function S(r){return console.log("DEPRECATED:, 'UserSession' is deprecated. Use 'ArcGISIdentityManager' instead."),new k(r)}S.beginOAuth2=function(...r){return console.warn("DEPRECATED:, 'UserSession.beginOAuth2' is deprecated. Use 'ArcGISIdentityManager.beginOAuth2' instead."),k.beginOAuth2(...r)};S.completeOAuth2=function(...r){return console.warn("DEPRECATED:, 'UserSession.completeOAuth2()' is deprecated. Use 'ArcGISIdentityManager.completeOAuth2()' instead."),r.length<=1&&console.warn("WARNING:, 'UserSession.completeOAuth2()' is now async and returns a promise the resolves to an instance of `ArcGISIdentityManager`."),k.completeOAuth2(...r)};S.fromParent=function(...r){return console.warn("DEPRECATED:, 'UserSession.fromParent' is deprecated. Use 'ArcGISIdentityManager.fromParent' instead."),k.fromParent(...r)};S.authorize=function(...r){return console.warn("DEPRECATED:, 'UserSession.authorize' is deprecated. Use 'ArcGISIdentityManager.authorize' instead."),k.authorize(...r)};S.exchangeAuthorizationCode=function(...r){return console.warn("DEPRECATED:, 'UserSession.exchangeAuthorizationCode' is deprecated. Use 'ArcGISIdentityManager.exchangeAuthorizationCode' instead."),k.exchangeAuthorizationCode(...r)};S.fromCredential=function(...r){return console.log("DEPRECATED:, 'UserSession.fromCredential' is deprecated. Use 'ArcGISIdentityManager.fromCredential' instead."),console.warn("WARNING:, 'UserSession.fromCredential' now requires a `ServerInfo` object from the JS API as a second parameter."),k.fromCredential(...r)};S.deserialize=function(...r){return console.log("DEPRECATED:, 'UserSession.deserialize' is deprecated. Use 'ArcGISIdentityManager.deserialize' instead."),k.deserialize(...r)};export{V as a,p as b,Ge as c,m as d,k as e};