@arcgis/portal-components 6.0.0-next.2 → 6.0.0-next.21

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 (308) hide show
  1. package/dist/cdn/{MKSFNVXL.js → 22TDAUX4.js} +1 -1
  2. package/dist/cdn/234TH32X.js +106 -0
  3. package/dist/cdn/2D3FQXJ4.js +2 -0
  4. package/dist/cdn/{BKD7JSV2.js → 2DXO6FVX.js} +1 -1
  5. package/dist/cdn/{TWCJJCPC.js → 2XJX2JUO.js} +1 -1
  6. package/dist/cdn/{SGDDFWCJ.js → 3EQGUCO4.js} +1 -1
  7. package/dist/cdn/{OR6T5SB3.js → 3J3ISO3E.js} +1 -1
  8. package/dist/cdn/3RTST3I6.js +2 -0
  9. package/dist/cdn/3XH3JHOI.js +2 -0
  10. package/dist/cdn/4ONCJSSP.js +2 -0
  11. package/dist/cdn/4QYVBXZT.js +2 -0
  12. package/dist/cdn/{K75JTQPW.js → 4VLEUN7I.js} +1 -1
  13. package/dist/cdn/4WQA7UAJ.js +2 -0
  14. package/dist/cdn/5OWIWCEQ.js +2 -0
  15. package/dist/cdn/{7ZWYUHGK.js → 5R4JJWGB.js} +1 -1
  16. package/dist/cdn/63HYFDRU.js +2 -0
  17. package/dist/cdn/6MATPHXT.js +79 -0
  18. package/dist/cdn/7IP3RVPH.js +2 -0
  19. package/dist/cdn/7ISSDO2T.js +2 -0
  20. package/dist/cdn/AKTIIRJQ.js +2 -0
  21. package/dist/cdn/ASID6YW7.js +135 -0
  22. package/dist/cdn/B3HV5JVN.js +2 -0
  23. package/dist/cdn/B6666VUQ.js +2 -0
  24. package/dist/cdn/BOO7GG5L.js +2 -0
  25. package/dist/cdn/CZ4FC4GM.js +2 -0
  26. package/dist/cdn/D3LZFIHV.js +2 -0
  27. package/dist/cdn/{NWVLGU2C.js → D3Q72PPN.js} +1 -1
  28. package/dist/cdn/DABNV2OO.js +2 -0
  29. package/dist/cdn/DELNTRCT.js +2 -0
  30. package/dist/cdn/DOCNBKQZ.js +2 -0
  31. package/dist/cdn/EP7NWEC5.js +2 -0
  32. package/dist/cdn/EQRBP6H6.js +66 -0
  33. package/dist/cdn/{ABORO35R.js → ESKKH4DE.js} +1 -1
  34. package/dist/cdn/EUQQZIRW.js +2 -0
  35. package/dist/cdn/F2HT5PVQ.js +2 -0
  36. package/dist/cdn/FE3O23SE.js +2 -0
  37. package/dist/cdn/FGRMURKX.js +2 -0
  38. package/dist/cdn/FN2QMDEW.js +2 -0
  39. package/dist/cdn/{I6IRHXWR.js → FYVATGMR.js} +1 -1
  40. package/dist/cdn/{RHCRPJWS.js → G3WDR53S.js} +1 -1
  41. package/dist/cdn/GAU6DNV5.js +2 -0
  42. package/dist/cdn/GPAIXN52.js +2 -0
  43. package/dist/cdn/GRSBU4PD.js +2 -0
  44. package/dist/cdn/{JWBUJT43.js → H7FA5HFE.js} +1 -1
  45. package/dist/cdn/HHGKNVCH.js +4 -0
  46. package/dist/cdn/HJLWIQDI.js +2 -0
  47. package/dist/cdn/I3EWDYTU.js +2 -0
  48. package/dist/cdn/{24QSQLRY.js → IKPVMXXW.js} +1 -1
  49. package/dist/cdn/{5HZNBMW6.js → IOFXDIWC.js} +1 -1
  50. package/dist/cdn/IPHBVKMY.js +2 -0
  51. package/dist/cdn/{GAF4YT5N.js → IUIFCQQU.js} +1 -1
  52. package/dist/cdn/{ZKZDKJ6D.js → IVDZGUNZ.js} +1 -1
  53. package/dist/cdn/J6SI4Z4F.js +2 -0
  54. package/dist/cdn/K3GAZFRI.js +63 -0
  55. package/dist/cdn/K7LYYLUF.js +2 -0
  56. package/dist/cdn/{74T6IXSN.js → KDORI7H4.js} +1 -1
  57. package/dist/cdn/KRORL7QC.js +2 -0
  58. package/dist/cdn/LGJWULAW.js +2 -0
  59. package/dist/cdn/LTMPXQTC.js +2 -0
  60. package/dist/cdn/M5STJJRX.js +2 -0
  61. package/dist/cdn/M7J7RAM4.js +2 -0
  62. package/dist/cdn/{AXOBMX3S.js → MLTZSPZQ.js} +1 -1
  63. package/dist/cdn/MSSJRDR7.js +2 -0
  64. package/dist/cdn/{L64UURQB.js → N4ZRMYZL.js} +1 -1
  65. package/dist/cdn/NBCYYUHP.js +2 -0
  66. package/dist/cdn/NHVPNSNH.js +2 -0
  67. package/dist/cdn/NQ2IAQKL.js +41 -0
  68. package/dist/cdn/NXGTEDK4.js +2 -0
  69. package/dist/cdn/{7LMZHJZG.js → NYOXMT6S.js} +1 -1
  70. package/dist/cdn/O3JP4FQ3.js +2 -0
  71. package/dist/cdn/O4YFPGD5.js +2 -0
  72. package/dist/cdn/{JIJO4CAS.js → ODSA6NNS.js} +1 -1
  73. package/dist/cdn/OHAQPQAP.js +2 -0
  74. package/dist/cdn/OOXTSCQT.js +2 -0
  75. package/dist/cdn/OQ2JULON.js +2 -0
  76. package/dist/cdn/OVH4YLTS.js +2 -0
  77. package/dist/cdn/QB5BGHLA.js +2 -0
  78. package/dist/cdn/QKCRNS75.js +2 -0
  79. package/dist/cdn/{2YZWRFCI.js → RKMW4FUN.js} +1 -1
  80. package/dist/cdn/RT26JZP5.js +2 -0
  81. package/dist/cdn/SKHFISBA.js +2 -0
  82. package/dist/cdn/SKIDJ4QI.js +2 -0
  83. package/dist/cdn/SRWFOV5W.js +2 -0
  84. package/dist/cdn/{IN4JPZTY.js → SSCKCDXD.js} +1 -1
  85. package/dist/cdn/T66G7GIR.js +2 -0
  86. package/dist/cdn/{RQYNPDN3.js → TIMYD2HM.js} +1 -1
  87. package/dist/cdn/{ROX3GKKA.js → TIPQ2ZWK.js} +1 -1
  88. package/dist/cdn/TJWJ3LTU.js +2 -0
  89. package/dist/cdn/{DHMNNIXZ.js → TMR4BRFI.js} +1 -1
  90. package/dist/cdn/{JN23JH3T.js → TTQGRN2V.js} +1 -1
  91. package/dist/cdn/{MLYQGIJU.js → U2HTYOBB.js} +13 -13
  92. package/dist/cdn/{YZTBAUIO.js → UHOW7Q65.js} +1 -1
  93. package/dist/cdn/ULGME5RT.js +2 -0
  94. package/dist/cdn/{Z6R3C4AK.js → US3N5L73.js} +1 -1
  95. package/dist/cdn/W5POIPYP.js +2 -0
  96. package/dist/cdn/{TLM457Z5.js → WJWWYBZ7.js} +1 -1
  97. package/dist/cdn/WNEPEEPZ.js +2 -0
  98. package/dist/cdn/WPAZDJHU.js +2 -0
  99. package/dist/cdn/WT72SOAU.js +2 -0
  100. package/dist/cdn/XJGKRAN5.js +2 -0
  101. package/dist/cdn/{JPUUMGX5.js → XS5EOWBK.js} +1 -1
  102. package/dist/cdn/Y5VUMGKH.js +3 -0
  103. package/dist/cdn/{EQDYQOOT.js → YCIFVZ4J.js} +1 -1
  104. package/dist/cdn/{3NSHGKZA.js → YDXJHNDI.js} +1 -1
  105. package/dist/cdn/{32BWFMTC.js → YIOJIA4Y.js} +1 -1
  106. package/dist/cdn/{K2XSYDAP.js → YK6FCXWU.js} +1 -1
  107. package/dist/cdn/YPDHSE2J.js +2 -0
  108. package/dist/cdn/{M5PPX4ZX.js → YQLFXHFG.js} +1 -1
  109. package/dist/cdn/YSVPB3BO.js +2 -0
  110. package/dist/cdn/YUOVGTP5.js +2 -0
  111. package/dist/cdn/Z5CA4C6H.js +2 -0
  112. package/dist/cdn/{TXC7YBGL.js → ZD6XJVGV.js} +1 -1
  113. package/dist/cdn/ZHQXYCPA.js +2 -0
  114. package/dist/cdn/{DLI4XKJ3.js → ZOX4RLS4.js} +1 -1
  115. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
  116. package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -1
  117. package/dist/cdn/assets/portal-item-card-sublayer-select/t9n/messages.en.json +1 -0
  118. package/dist/cdn/assets/portal-item-share-summary/t9n/messages.en.json +1 -0
  119. package/dist/cdn/index.js +1 -1
  120. package/dist/cdn/main.css +1 -1
  121. package/dist/chunks/fieldAddDelete.js +7 -7
  122. package/dist/chunks/functionalities.js +14 -9
  123. package/dist/chunks/groups.js +8 -61
  124. package/dist/chunks/groups2.js +23 -8
  125. package/dist/chunks/info.js +2 -2
  126. package/dist/chunks/item.js +58 -26
  127. package/dist/chunks/item2.js +34 -30
  128. package/dist/chunks/itemThumbnail.js +21 -21
  129. package/dist/chunks/loadClassificationData.js +26 -27
  130. package/dist/chunks/portal-delete-items-review.js +1 -1
  131. package/dist/chunks/portal-item-badge.js +1 -1
  132. package/dist/chunks/portal-related-items-list-item.js +1 -1
  133. package/dist/chunks/portal.js +6 -6
  134. package/dist/chunks/portal2.js +11 -11
  135. package/dist/chunks/portalEntitySelection.js +54 -0
  136. package/dist/chunks/query.js +13 -13
  137. package/dist/chunks/request.js +49 -41
  138. package/dist/chunks/requests.js +7 -7
  139. package/dist/chunks/selectedMentions.js +25 -0
  140. package/dist/chunks/services.js +1 -1
  141. package/dist/chunks/string.js +14 -10
  142. package/dist/chunks/ui.js +1 -0
  143. package/dist/chunks/url.js +2 -2
  144. package/dist/chunks/user.js +10 -10
  145. package/dist/chunks/utils.js +35 -22
  146. package/dist/chunks/utils2.js +4 -4
  147. package/dist/chunks/utils3.js +88 -657
  148. package/dist/chunks/utils4.js +664 -0
  149. package/dist/components/arcgis-portal-account-switcher/customElement.js +28 -26
  150. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +4 -4
  151. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +8 -8
  152. package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +4 -4
  153. package/dist/components/arcgis-portal-account-switcher-list/customElement.js +6 -6
  154. package/dist/components/arcgis-portal-account-switcher-signout/customElement.d.ts +5 -5
  155. package/dist/components/arcgis-portal-account-switcher-signout/customElement.js +3 -3
  156. package/dist/components/arcgis-portal-add-gps-metadata/customElement.d.ts +6 -0
  157. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +153 -130
  158. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +25 -15
  159. package/dist/components/arcgis-portal-ai-assistant/customElement.js +574 -2409
  160. package/dist/components/arcgis-portal-ai-assistant/index.js +4 -0
  161. package/dist/components/arcgis-portal-ai-assistant/tools/getItemTool.d.ts +11 -0
  162. package/dist/components/arcgis-portal-ai-assistant/types/assistantTools.d.ts +51 -0
  163. package/dist/components/arcgis-portal-ai-assistant/types/portalEntityTools.d.ts +14 -0
  164. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.d.ts +39 -0
  165. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +63 -27
  166. package/dist/components/arcgis-portal-ai-assistant-interrupt/index.js +3 -1
  167. package/dist/components/arcgis-portal-classification-banner/customElement.js +2 -2
  168. package/dist/components/arcgis-portal-classification-config/customElement.js +2 -2
  169. package/dist/components/arcgis-portal-classification-favorite/customElement.js +2 -2
  170. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  171. package/dist/components/arcgis-portal-delete-items/customElement.d.ts +69 -3
  172. package/dist/components/arcgis-portal-delete-items/customElement.js +446 -330
  173. package/dist/components/arcgis-portal-delete-items/index.js +1 -2
  174. package/dist/components/arcgis-portal-delete-items/types.d.ts +1 -0
  175. package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +36 -0
  176. package/dist/components/arcgis-portal-entity-picker/customElement.js +202 -120
  177. package/dist/components/arcgis-portal-entity-picker/index.js +2 -0
  178. package/dist/components/arcgis-portal-field-delete/customElement.js +33 -31
  179. package/dist/components/arcgis-portal-field-delete/index.js +1 -1
  180. package/dist/components/arcgis-portal-group-badges/customElement.js +5 -5
  181. package/dist/components/arcgis-portal-group-browser/customElement.js +93 -99
  182. package/dist/components/arcgis-portal-group-browser/types.d.ts +3 -7
  183. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +2 -2
  184. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -1
  185. package/dist/components/arcgis-portal-group-card/customElement.js +18 -18
  186. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
  187. package/dist/components/arcgis-portal-item-card/customElement.d.ts +26 -10
  188. package/dist/components/arcgis-portal-item-card/customElement.js +101 -91
  189. package/dist/components/arcgis-portal-item-card/index.js +2 -1
  190. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.d.ts +102 -0
  191. package/dist/components/arcgis-portal-item-card-sublayer-select/customElement.js +352 -0
  192. package/dist/components/arcgis-portal-item-card-sublayer-select/index.d.ts +1 -0
  193. package/dist/components/arcgis-portal-item-card-sublayer-select/index.js +8 -0
  194. package/dist/components/arcgis-portal-item-card-sublayer-select/types.d.ts +22 -0
  195. package/dist/components/arcgis-portal-item-share-summary/customElement.d.ts +113 -0
  196. package/dist/components/arcgis-portal-item-share-summary/customElement.js +172 -0
  197. package/dist/components/arcgis-portal-item-share-summary/index.d.ts +1 -0
  198. package/dist/components/arcgis-portal-item-share-summary/index.js +5 -0
  199. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.d.ts +33 -0
  200. package/dist/components/arcgis-portal-item-share-summary-editable/customElement.js +19 -0
  201. package/dist/components/arcgis-portal-item-share-summary-editable/index.d.ts +1 -0
  202. package/dist/components/arcgis-portal-item-share-summary-editable/index.js +2 -0
  203. package/dist/components/arcgis-portal-item-thumbnail/customElement.d.ts +1 -0
  204. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +14 -14
  205. package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
  206. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +61 -57
  207. package/dist/components/arcgis-portal-navigation/customElement.js +7 -8
  208. package/dist/components/arcgis-portal-navigation/index.js +1 -1
  209. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +8 -8
  210. package/dist/components/arcgis-portal-review-related-items/customElement.d.ts +333 -0
  211. package/dist/components/arcgis-portal-review-related-items/customElement.js +45 -18
  212. package/dist/components/arcgis-portal-review-related-items/index.js +2 -0
  213. package/dist/components/arcgis-portal-sublayer-type/customElement.js +13 -103
  214. package/dist/components/arcgis-portal-user-popup/customElement.js +28 -28
  215. package/dist/components/portal-group-browser-filters/customElement.js +15 -15
  216. package/dist/components/portal-related-items-list-item/customElement.js +16 -14
  217. package/dist/components/portal-related-items-list-item/index.js +1 -1
  218. package/dist/docs/api.json +1 -1
  219. package/dist/docs/docs.json +1 -1
  220. package/dist/docs/vscode.html-custom-data.json +1 -1
  221. package/dist/docs/web-types.json +1 -1
  222. package/dist/index.d.ts +30 -0
  223. package/dist/index.js +155 -6
  224. package/dist/loader.js +15 -12
  225. package/dist/services/groups.d.ts +9 -0
  226. package/dist/services/item.d.ts +9 -0
  227. package/dist/types/item.d.ts +9 -9
  228. package/dist/types/lumina.d.ts +36 -17
  229. package/dist/types/preact.d.ts +39 -17
  230. package/dist/types/react.d.ts +42 -17
  231. package/dist/types/services.d.ts +27 -1
  232. package/dist/types/stencil.d.ts +36 -17
  233. package/dist/utils/generateEmbeddings.d.ts +7 -0
  234. package/dist/utils/semanticSearch.d.ts +60 -0
  235. package/dist/utils/types.d.ts +10 -0
  236. package/package.json +10 -10
  237. package/dist/cdn/23FS4XTG.js +0 -2
  238. package/dist/cdn/2MPQ5IWJ.js +0 -2
  239. package/dist/cdn/3CQKCUM5.js +0 -2
  240. package/dist/cdn/3EYB5GQX.js +0 -2
  241. package/dist/cdn/3LEQ37YT.js +0 -68
  242. package/dist/cdn/46BUEBWS.js +0 -2
  243. package/dist/cdn/4AI52H7C.js +0 -2
  244. package/dist/cdn/4MUB6TL6.js +0 -2
  245. package/dist/cdn/4PRXQFCV.js +0 -2
  246. package/dist/cdn/4QFTKB6T.js +0 -2
  247. package/dist/cdn/4TSXFX3M.js +0 -2
  248. package/dist/cdn/5C5GHX4D.js +0 -2
  249. package/dist/cdn/5PPZNVWG.js +0 -2
  250. package/dist/cdn/66XWNGQ2.js +0 -2
  251. package/dist/cdn/6F4SJDRR.js +0 -2
  252. package/dist/cdn/6RZEXOK3.js +0 -2
  253. package/dist/cdn/A2SQ4EMZ.js +0 -2
  254. package/dist/cdn/AICPYLWE.js +0 -4
  255. package/dist/cdn/AJQT7UXB.js +0 -2
  256. package/dist/cdn/APSYZEPP.js +0 -209
  257. package/dist/cdn/AZOJHVAO.js +0 -2
  258. package/dist/cdn/BSTA5KI5.js +0 -2
  259. package/dist/cdn/CD5UWSCP.js +0 -2
  260. package/dist/cdn/CXXV6WJT.js +0 -2
  261. package/dist/cdn/DDBXEXOV.js +0 -2
  262. package/dist/cdn/DYO5P3F2.js +0 -2
  263. package/dist/cdn/E66BDC6N.js +0 -2
  264. package/dist/cdn/EEAVX4PP.js +0 -2
  265. package/dist/cdn/EITRZQSC.js +0 -2
  266. package/dist/cdn/EMJQI4MA.js +0 -2
  267. package/dist/cdn/FIBQAMJ3.js +0 -2
  268. package/dist/cdn/FIQZPIIK.js +0 -2
  269. package/dist/cdn/FNLBJ4ZQ.js +0 -2
  270. package/dist/cdn/FRE56NBG.js +0 -2
  271. package/dist/cdn/GSOBDGLK.js +0 -2
  272. package/dist/cdn/GUO7HKSP.js +0 -463
  273. package/dist/cdn/GX7U3727.js +0 -2
  274. package/dist/cdn/GXM3XY3J.js +0 -2
  275. package/dist/cdn/I273CANO.js +0 -2
  276. package/dist/cdn/I6NVKNZJ.js +0 -2
  277. package/dist/cdn/J5FKIZAM.js +0 -2
  278. package/dist/cdn/JL52W3Z4.js +0 -2
  279. package/dist/cdn/JOUR2FB2.js +0 -3
  280. package/dist/cdn/LISDTBEX.js +0 -2
  281. package/dist/cdn/LWFACY3F.js +0 -2
  282. package/dist/cdn/LYLQCBVX.js +0 -2
  283. package/dist/cdn/N4VOTJ25.js +0 -2
  284. package/dist/cdn/N5QLV56W.js +0 -2
  285. package/dist/cdn/NRMQDCM3.js +0 -2
  286. package/dist/cdn/OD5WXP7J.js +0 -2
  287. package/dist/cdn/OXPXXIWL.js +0 -2
  288. package/dist/cdn/PMRFXB4F.js +0 -2
  289. package/dist/cdn/PNIFJ5DQ.js +0 -2
  290. package/dist/cdn/PZDI5ZDC.js +0 -2
  291. package/dist/cdn/RVYSVTPQ.js +0 -2
  292. package/dist/cdn/SVROAT3Z.js +0 -2
  293. package/dist/cdn/TBZXKKGP.js +0 -2
  294. package/dist/cdn/TNUCSWBN.js +0 -2
  295. package/dist/cdn/TOICLGFK.js +0 -2
  296. package/dist/cdn/TOTWYGB3.js +0 -2
  297. package/dist/cdn/TUUUK3VX.js +0 -2
  298. package/dist/cdn/U3KMGSVH.js +0 -2
  299. package/dist/cdn/WC3FPLYQ.js +0 -2
  300. package/dist/cdn/XYMBRPC7.js +0 -2
  301. package/dist/cdn/YTODQCOG.js +0 -2
  302. package/dist/cdn/YYTEJVBL.js +0 -2
  303. package/dist/cdn/ZDDN7UKS.js +0 -2
  304. package/dist/chunks/functional.js +0 -9
  305. package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +0 -45
  306. /package/dist/cdn/{OUMTV5H5.js → KHKREBVZ.js} +0 -0
  307. /package/dist/components/arcgis-portal-ai-assistant/{agents/types.d.ts → types/navigation.d.ts} +0 -0
  308. /package/dist/components/arcgis-portal-ai-assistant/{agents → types}/portalRouteKeys.d.ts +0 -0
@@ -0,0 +1,66 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as W}from"./SSCKCDXD.js";import{e as ye}from"./DELNTRCT.js";import{a as $e}from"./DAAON2UO.js";import{a as be}from"./2XJX2JUO.js";import{a as we}from"./FN2QMDEW.js";import{a as U}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{I as de,J as ke,K as fe,N as me,Q as xe,h as ge,j as $,v as X}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./K3GAZFRI.js";import"./5PV2GUZW.js";function ee(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var I=ee();function Ce(r){I=r}var v={exec:()=>null};function E(r){let e=[];return t=>{let i=Math.max(0,Math.min(3,t-1)),n=e[i];return n||(n=r(i),e[i]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,i={replace:(n,s)=>{let a=typeof s=="string"?s:s.source;return a=a.replace(b.caret,"$1"),t=t.replace(n,a),i},getRegex:()=>new RegExp(t,e)};return i}var Fe=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),b={codeRemoveIndent:/^(?: {0,3}\t| {1,4})/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,leadingSpaceTab:/^[ \t]+/,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,numericCharacterReference:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));/,numericCharacterReferenceOrAmpersand:/&#(?:(\d{1,7})|[Xx]([A-Fa-f0-9]{1,6}));|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:E(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:E(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:E(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:E(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:E(r=>new RegExp(`^ {0,${r}}(?:</?(?:${O})(?: +|$|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)`,"i")),blockquoteBeginRegex:E(r=>new RegExp(`^ {0,${r}}>`))},Ge=/^(?:[ \t]*(?:\n|$))+/,Xe=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Ue=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,D=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,We=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,te=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,qe=u(Le).replace(/bull/g,te).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Ke=u(Le).replace(/bull/g,te).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/hr/g,/ {0,3}(?:(?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),re=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Je=/^[^\n]+/,ne=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ve=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ne).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Ye=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,te).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ie=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,et=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!(?:script|pre|style|textarea)(?![a-z0-9-]))([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ie).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Be=r=>u(re).replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",O).getRegex(),tt=Be(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),rt=Be(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),nt=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",rt).getRegex(),se={blockquote:nt,code:Xe,def:Ve,fences:Ue,heading:We,hr:D,html:et,lheading:qe,list:Ye,newline:Ge,paragraph:tt,table:v,text:Je},Se=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",O).getRegex(),it={...se,lheading:Ke,table:Se,paragraph:u(re).replace("hr",D).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Se).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html"," {0,3}(?:</?(?:tag)(?: +|\\n|/?>)|<(?:(?:script|pre|style|textarea)(?:[\\s>]|$)|!--)|<\\?|<![A-Za-z]|<!\\[CDATA\\[)").replace("tag",O).getRegex()},st={...se,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ie).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:v,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(re).replace("hr",D).replace("heading",` *#{1,6} *[^
3
+ ]`).replace("lheading",qe).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},lt=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,at=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Ze=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,ot=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,T=/[\p{P}\p{S}]/u,C=/[\s\p{P}\p{S}]/u,M=/[^\s\p{P}\p{S}]/u,ct=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,C).getRegex(),pt=/[\p{Pi}\p{Ps}"']/u,De=/(?!~)[\p{P}\p{S}]/u,ht=/(?!~)[\s\p{P}\p{S}]/u,ut=/(?:[^\s\p{P}\p{S}]|~)/u,gt=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Fe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),Oe=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,dt=u(Oe,"u").replace(/punct/g,T).getRegex(),kt=u(Oe,"u").replace(/punct/g,De).getRegex(),ft=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,mt=u(ft,"u").replace(/openQuote/g,pt).replace(/punct/g,T).getRegex(),Me="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",xt=u(Me,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),bt=u(Me,"gu").replace(/notPunctSpace/g,ut).replace(/punctSpace/g,ht).replace(/punct/g,De).getRegex(),wt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",yt=u(wt,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),$t=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),St="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Rt=u(St,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),Tt=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,T).getRegex(),At="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zt=u(At,"gu").replace(/notPunctSpace/g,M).replace(/punctSpace/g,C).replace(/punct/g,T).getRegex(),_t=u(/\\(punct)/,"gu").replace(/punct/g,T).getRegex(),vt=u(/(`+)(?:[^`]|[^`][\s\S]*?[^`])\1(?!`)|`+|\\(punct)/,"gu").replace(/punct/g,T).getRegex(),Pt=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),It=u(ie).replace("(?:-->|$)","-->").getRegex(),Et=u("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",It).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Qe=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,j=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",Qe).getRegex(),Ct=u(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",j).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Lt=u(/^!?\[(label)\]\[(ref)\]/).replace("label",j).replace("ref",ne).getRegex(),qt=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",ne).getRegex(),Re=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,Bt=u(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",Qe).getRegex(),Zt=u("reflink|nolink(?!\\()","g").replace("reflink",u(/^!?\[(label)\]\[(ref)\]/).replace("label",Bt).replace("ref",Re).getRegex()).replace("nolink",u(/^!?\[(ref)\](?:\[\])?/).replace("ref",Re).getRegex()).getRegex(),Te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Dt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,Ot=u(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,Dt).getRegex(),le={_backpedal:v,anyPunctuation:_t,anyPunctuationOutsideCode:vt,autolink:Pt,blockSkip:gt,br:Ze,code:at,del:v,delLDelim:v,delRDelim:v,emStrongLDelim:dt,emStrongRDelimAst:xt,emStrongRDelimUnd:$t,escape:lt,link:Ct,nolink:qt,punctuation:ct,reflink:Lt,reflinkSearch:Zt,tag:Et,text:ot,url:v},Mt={...le,emStrongLDelim:mt,emStrongRDelimAst:yt,emStrongRDelimUnd:Rt,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",j).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",j).getRegex()},J={...le,emStrongRDelimAst:bt,emStrongLDelim:kt,delLDelim:Tt,delRDelim:zt,url:u(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",Ot).replace("protocol",Te).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^(?:[^a-zA-Z0-9](?=emailProtocol)|(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9](?=emailProtocol)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@))))/).replace("protocol",Te).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},Qt={...J,br:u(Ze).replace("{2,}","*").getRegex(),text:u(J.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:se,gfm:it,pedantic:st},B={normal:le,gfm:J,breaks:Qt,pedantic:Mt},jt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ae=r=>jt[r];function w(r,e){if(e){if(b.escapeTest.test(r))return r.replace(b.escapeReplace,Ae)}else if(b.escapeTestNoEncode.test(r))return r.replace(b.escapeReplaceNoEncode,Ae);return r}function Ht(r){return b.numericCharacterReference.test(r)?r.replace(b.numericCharacterReferenceOrAmpersand,(e,t,i)=>{if(t===void 0&&i===void 0)return"&amp;";let n=t===void 0?Number.parseInt(i,16):Number.parseInt(t,10);return n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":n===38?"&amp;":String.fromCodePoint(n)}):r}function ze(r){try{r=encodeURI(r).replace(b.percentDecode,"%")}catch{return null}return r}function _e(r,e){let t=r.replace(b.findPipe,(s,a,l)=>{let p=!1,o=a;for(;--o>=0&&l[o]==="\\";)p=!p;return p?"|":" |"}),i=t.split(b.splitPipe),n=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),e)if(i.length>e)i.splice(e);else for(;i.length<e;)i.push("");for(;n<i.length;n++)i[n]=i[n].trim().replace(b.slashPipe,"|");return i}function A(r,e,t){let i=r.length;if(i===0)return"";let n=0;for(;n<i;){let s=r.charAt(i-n-1);if(s===e&&!t)n++;else if(s!==e&&t)n++;else break}return r.slice(0,i-n)}function ve(r){let e=r.split(`
4
+ `),t=e.length-1;for(;t>=0&&b.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
5
+ `)}function H(r){return r.trim().toLowerCase().toUpperCase().toLowerCase()}function Pe(r,e){if(r.indexOf(e[0])===-1&&r.indexOf(e[1])===-1)return-1;let t=0;for(let i=0;i<r.length;i++)if(r[i]==="\\")i++;else if(r[i]===e[0])t++;else if(r[i]===e[1]&&(t--,t<0))return i;return t>0?-2:-1}function K(r,e=0){let t=e,i="";for(let n of r)if(n===" "){let s=4-t%4;i+=" ".repeat(s),t+=s}else i+=n,t++;return i}function Ie(r,e,t,i,n){let s=e.href,a=e.title||null,l=r[1].replace(n.other.outputLinkReplace,"$1"),p=r[0].charAt(0)==="!",o=i.state.inLink,c=i.state.linkEmitted,h=i.state.inRawBlock;i.state.inLink=!0,i.state.linkEmitted=!1;let k=i.inlineTokens(l),g=i.state.linkEmitted;if(i.state.linkEmitted=c,i.state.inLink=o,!p){if(g){i.state.inRawBlock=h;return}i.state.linkEmitted=!0}return{type:p?"image":"link",raw:t,href:s,title:a,text:l,tokens:k}}function Nt(r,e,t){let i=r.match(t.other.indentCodeCompensation);if(i===null)return e;let n=i[1];return e.split(`
6
+ `).map(s=>{let a=s.match(t.other.beginningSpace);if(a===null)return s;let[l]=a;return s.slice(Math.min(l.length,n.length))}).join(`
7
+ `)}function Ee(r,e,t,i){if(!e.includes("<"))return!1;for(let n=0;n<e.length;n++){if(e[n]==="\\"){n++;continue}if(e[n]==="`"){let l=i.inline.code.exec(e.slice(n));if(l){n+=l[0].length-1;continue}}if(e[n]!=="<")continue;let s=r.slice(t+n),a=i.inline.tag.exec(s)||i.inline.autolink.exec(s);if(a){if(a[0].length>e.length-n)return!0;n+=a[0].length-1}}return!1}var N=class{options;rules;lexer;constructor(r){this.options=r||I}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:ve(e[0]),i=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:i}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],i=Nt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:i}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let i=A(t,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceTabChar.test(i))&&(t=i.trim())}return{type:"heading",raw:A(e[0],`
8
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:A(e[0],`
9
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=A(e[0],`
10
+ `).split(`
11
+ `),i="",n="",s=[];for(;t.length>0;){let a=!1,l=[],p;for(p=0;p<t.length;p++)if(this.rules.other.blockquoteStart.test(t[p]))l.push(t[p]),a=!0;else if(!a)l.push(t[p]);else break;t=t.slice(p);let o=l.join(`
12
+ `),c=o.replace(this.rules.other.blockquoteSetextReplace,`
13
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");i=i?`${i}
14
+ ${o}`:o,n=n?`${n}
15
+ ${c}`:c;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,s,!0),this.lexer.state.top=h,t.length===0)break;let k=s.at(-1);if(k?.type==="code"||k?.type==="heading"||k?.type==="hr"||k?.type==="html")break;if(k?.type==="blockquote"){let g=k,y=t.join(`
16
+ `),x=g.raw+`
17
+ `+y.replace(this.rules.other.blockquoteSetextReplace2,""),f=this.blockquote(x);s[s.length-1]=f;let z=x.substring(f.raw.length).replace(/^\n/,""),m=z?z.split(`
18
+ `).length:0,L=m?t.slice(0,-m):t;L.length>0&&(i=`${i}
19
+ ${L.join(`
20
+ `)}`),n=n.substring(0,n.length-g.text.length)+f.text;break}else if(k?.type==="list"){let g=k,y=g.raw+`
21
+ `+t.join(`
22
+ `),x=this.list(y);s[s.length-1]=x,i=i.substring(0,i.length-k.raw.length)+x.raw,n=n.substring(0,n.length-g.raw.length)+x.raw,t=y.substring(s.at(-1).raw.length).split(`
23
+ `);continue}}return{type:"blockquote",raw:i,tokens:s,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=r,i=()=>t.length-r.length,n=e[1].trim(),s=n.length>1,a={type:"list",raw:"",ordered:s,start:s?+n.slice(0,-1):"",loose:!1,items:[]};n=s?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=s?n:"[*+-]");let l=this.rules.other.listItemRegex(n),p=!1;for(;r;){let c=!1,h="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;let k=i();r=r.substring(e[0].length);let g=e[2].split(`
24
+ `,1)[0],y=e[1].length,x=this.options.pedantic?K(g,y):g.replace(this.rules.other.leadingSpaceTab,G=>K(G,y)),f=r.split(`
25
+ `,1)[0],z=!x.trim(),m=0;if(this.options.pedantic?(m=2,h=x.trimStart()):z?m=y+1:(m=x.search(this.rules.other.nonSpaceChar),m=m>4?1:m,h=x.slice(m),m+=y),z&&this.rules.other.blankLine.test(f)&&(r=r.substring(f.length+1),c=!0),!c){let G=this.rules.other.nextBulletRegex(m),ce=this.rules.other.hrRegex(m),pe=this.rules.other.fencesBeginRegex(m),he=this.rules.other.headingBeginRegex(m),je=this.rules.other.htmlBeginRegex(m),He=this.rules.other.blockquoteBeginRegex(m);for(;r;){let ue=r.split(`
26
+ `,1)[0],q;if(f=ue,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),q=f):q=f.replace(this.rules.other.leadingSpaceTab,Ne=>K(Ne)),pe.test(f)||he.test(f)||je.test(f)||He.test(f)||G.test(f)||ce.test(f))break;if(q.search(this.rules.other.nonSpaceChar)>=m||!f.trim())h+=`
27
+ `+q.slice(m);else{if(z||x.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||pe.test(x)||he.test(x)||ce.test(x))break;h+=`
28
+ `+f}z=!f.trim(),r=r.substring(ue.length+1),x=q.slice(m)}}let L=t.slice(k,i());a.loose||(p?a.loose=!0:this.rules.other.doubleBlankLine.test(L)&&(p=!0)),a.items.push({type:"list_item",raw:L,task:!!this.options.gfm&&this.rules.other.listIsTask.test(h),loose:!1,text:h,tokens:[]})}let o=a.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;a.raw=t.slice(0,i()).trimEnd();for(let c of a.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!a.loose){let h=c.tokens.filter(g=>g.type==="space"),k=h.length>0&&h.some(g=>this.rules.other.anyLine.test(g.raw));a.loose=k}for(let c of a.items){let h=c.tokens[0];if(c.task&&(h?.type==="text"||h?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),h.raw=h.raw.replace(this.rules.other.listReplaceTask,""),h.text=h.text.replace(this.rules.other.listReplaceTask,"");for(let g=this.lexer.inlineQueue.length-1;g>=0;g--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[g].src)){this.lexer.inlineQueue[g].src=this.lexer.inlineQueue[g].src.replace(this.rules.other.listReplaceTask,"");break}let k=this.rules.other.listTaskCheckbox.exec(c.raw);if(k){let g={type:"checkbox",raw:k[0]+" ",checked:k[0]!=="[ ]"};c.checked=g.checked,a.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=g.raw+c.tokens[0].raw,c.tokens[0].text=g.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(g)):c.tokens.unshift({type:"paragraph",raw:g.raw,text:g.raw,tokens:[g]}):c.tokens.unshift(g)}}else c.task&&(c.task=!1)}if(a.loose)for(let c of a.items){c.loose=!0;for(let h of c.tokens)h.type==="text"&&(h.type="paragraph")}return a}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=ve(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){if(!this.rules.other.startAngleBracket.test(e[2])&&Pe(e[2],"()")!==-1)return;let t=H(e[1]).replace(this.rules.other.multipleSpaceGlobal," "),i=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:A(e[0],`
29
+ `),href:i,title:n}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=_e(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],s={type:"table",raw:A(e[0],`
31
+ `),header:[],align:[],rows:[]};if(t.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?s.align.push("right"):this.rules.other.tableAlignCenter.test(a)?s.align.push("center"):this.rules.other.tableAlignLeft.test(a)?s.align.push("left"):s.align.push(null);for(let a=0;a<t.length;a++)s.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:s.align[a]});for(let a of n)s.rows.push(_e(a,s.header.length).map((l,p)=>({text:l,tokens:this.lexer.inline(l),header:!1,align:s.align[p]})));return s}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:A(e[0],`
32
+ `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
33
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){if(this.lexer.state.linkParenPossible===!1)return;let e=this.rules.inline.link.exec(r);if(e){let t=e[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Ee(r,e[1],t,this.rules))return;let i=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=A(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=Pe(e[2],"()");if(a===-2)return;if(a>-1){let l=(e[0].indexOf("!")===0?5:4)+e[1].length+a;e[2]=e[2].substring(0,a),e[0]=e[0].substring(0,l).trim(),e[3]=""}}let n=e[2],s="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(n);a&&(n=a[1],s=a[3])}else s=e[3]?e[3].slice(1,-1):"";return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?n=n.slice(1):n=n.slice(1,-1)),Ie(e,{href:n&&n.replace(this.rules.inline.anyPunctuation,"$1"),title:s&&s.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let i=t[0].charAt(0)==="!"?2:1;if(!this.options.pedantic&&Ee(r,t[1],i,this.rules))return;let n=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),s=e[H(n)];if(!s){let a=t[0].charAt(0);return{type:"text",raw:a,text:a}}return Ie(t,s,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let i=this.rules.inline.emStrongLDelim.exec(r);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,s,a,l=n,p=0,o=i[0][0],c=t===o,h=o==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+n);(i=h.exec(e))!==null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s)continue;if(a=[...s].length,i[3]||i[4]){l+=a;continue}else if(i[5]||i[6]){if(n%3&&!((n+a)%3)){p+=a;continue}if(c)break}if(l-=a,l>0)continue;a=Math.min(a,a+l+p);let k=[...i[0]][0].length,g=r.slice(0,n+i.index+k+a);if(Math.min(n,a)%2){let x=g.slice(1,-1);return{type:"em",raw:g,text:x,tokens:this.lexer.inlineTokens(x)}}let y=g.slice(2,-2);return{type:"strong",raw:g,text:y,tokens:this.lexer.inlineTokens(y)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return i&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let i=this.rules.inline.delLDelim.exec(r);if(i&&(!i[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...i[0]].length-1,s,a,l=n,p=this.rules.inline.delRDelim;for(p.lastIndex=0,e=e.slice(-1*r.length+n);(i=p.exec(e))!==null;){if(s=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!s||(a=[...s].length,a!==n))continue;if(i[3]||i[4]){l+=a;continue}if(l-=a,l>0)continue;a=Math.min(a,a+l);let o=[...i[0]][0].length,c=r.slice(0,n+i.index+o+a),h=c.slice(n,-n);return{type:"del",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,i;return e[2]==="@"?(t=e[1],i="mailto:"+t):(t=e[1],i=t),{type:"link",raw:e[0],text:t,href:i,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,i;if(e[2]==="@")t=e[0],i="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?i="http://"+e[0]:i=e[0]}return{type:"link",raw:e[0],text:t,href:i,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:t?e[0]:Ht(e[0]),escaped:t}}}},S=class V{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||I,this.options.tokenizer=this.options.tokenizer||new N,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,linkParenPossible:!0,top:!0};let t={other:b,block:Q.normal,inline:B.normal};this.options.pedantic?(t.block=Q.pedantic,t.inline=B.pedantic):this.options.gfm&&(t.block=Q.gfm,this.options.breaks?t.inline=B.breaks:t.inline=B.gfm),this.tokenizer.rules=t}static get rules(){return{block:Q,inline:B}}static lex(e,t){return new V(t).lex(e)}static lexInline(e,t){return new V(t).inlineTokens(e)}lex(e){e=e.replace(b.carriageReturn,`
34
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let i=this.inlineQueue[t];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],i=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(b.tabCharGlobal," ").replace(b.spaceLine,""));let n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let s;if(this.options.extensions?.block?.some(l=>(s=l.call({lexer:this},e,t))?(e=e.substring(s.raw.length),t.push(s),!0):!1))continue;if(s=this.tokenizer.space(e)){e=e.substring(s.raw.length);let l=t.at(-1);s.raw.length===1&&l!==void 0?l.raw+=`
35
+ `:t.push(s);continue}if(s=this.tokenizer.code(e)){e=e.substring(s.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
36
+ `)?"":`
37
+ `)+s.raw,l.text+=`
38
+ `+s.text,this.inlineQueue.at(-1).src=l.text):t.push(s);continue}if(s=this.tokenizer.fences(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.heading(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.hr(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.blockquote(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.list(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.html(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.def(e)){e=e.substring(s.raw.length);let l=t.at(-1);l?.type==="paragraph"||l?.type==="text"?(l.raw+=(l.raw.endsWith(`
39
+ `)?"":`
40
+ `)+s.raw,l.text+=`
41
+ `+s.raw,this.inlineQueue.at(-1).src=l.text):this.tokens.links[s.tag]||(this.tokens.links[s.tag]={href:s.href,title:s.title},t.push(s));continue}if(s=this.tokenizer.table(e)){e=e.substring(s.raw.length),t.push(s);continue}if(s=this.tokenizer.lheading(e)){e=e.substring(s.raw.length),t.push(s);continue}let a=e;if(this.options.extensions?.startBlock){let l=1/0,p=e.slice(1),o;this.options.extensions.startBlock.forEach(c=>{o=c.call({lexer:this},p),typeof o=="number"&&o>=0&&(l=Math.min(l,o))}),l<1/0&&l>=0&&(a=e.substring(0,l+1))}if(this.state.top&&(s=this.tokenizer.paragraph(a))){let l=t.at(-1);i&&l?.type==="paragraph"?(l.raw+=(l.raw.endsWith(`
42
+ `)?"":`
43
+ `)+s.raw,l.text+=`
44
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(s),i=a.length!==e.length,e=e.substring(s.raw.length);continue}if(s=this.tokenizer.text(e)){e=e.substring(s.raw.length);let l=t.at(-1);l?.type==="text"?(l.raw+=(l.raw.endsWith(`
45
+ `)?"":`
46
+ `)+s.raw,l.text+=`
47
+ `+s.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=l.text):t.push(s);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let i of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(i[0])&&e.charAt(i.index-1)!=="!")return!0;for(let i of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=i[0],s=n.lastIndexOf("[");if(!(n.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,H(n.slice(s+1,-1))))&&!(s>1&&this.linkInText(n.slice(1,s-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let i=this.state.linkParenPossible;this.state.linkParenPossible=i&&e.includes(")");try{return this.#e(e,t)}finally{this.state.linkParenPossible=i}}#e(e,t){let i=e;if(this.tokens.links&&e.includes("[")){let l=this.tokenizer.rules.inline.reflinkSearch,p=o=>{let c=o.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,H(o.slice(c+1,-1))))return o;if(c>1&&o.charAt(0)!=="!"){let h=o.slice(1,c-1);if(this.linkInText(h))return"["+h.replace(l,p)+"]["+"a".repeat(o.length-c-2)+"]"}return"["+"a".repeat(o.length-2)+"]"};i=i.replace(l,p)}i=i.replace(this.tokenizer.rules.inline.anyPunctuationOutsideCode,(l,p,o)=>o?"+".repeat(l.length):p?p+l.slice(p.length,-p.length).replace(/`/g,"+")+p:l),i=i.replace(this.tokenizer.rules.inline.blockSkip,(l,p,o)=>{let c=o?o.length:0;return l.slice(0,c)+"["+"a".repeat(l.length-c-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let n=!1,s="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(s=""),n=!1;let l;if(this.options.extensions?.inline?.some(o=>(l=o.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.escape(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.tag(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.link(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(l.raw.length);let o=t.at(-1);l.type==="text"&&o?.type==="text"?(o.raw+=l.raw,o.text+=l.text):t.push(l);continue}if(l=this.tokenizer.emStrong(e,i,s)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.codespan(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.br(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.del(e,i,s)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.autolink(e)){e=e.substring(l.raw.length),t.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(e))){e=e.substring(l.raw.length),t.push(l);continue}let p=e;if(this.options.extensions?.startInline){let o=1/0,c=e.slice(1),h;this.options.extensions.startInline.forEach(k=>{h=k.call({lexer:this},c),typeof h=="number"&&h>=0&&(o=Math.min(o,h))}),o<1/0&&o>=0&&(p=e.substring(0,o+1))}if(l=this.tokenizer.inlineText(p)){e=e.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(s=l.raw.slice(-1)),n=!0;let o=t.at(-1);o?.type==="text"?(o.raw+=l.raw,o.text+=l.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},F=class{options;parser;constructor(r){this.options=r||I}space(r){return""}code({text:r,lang:e,escaped:t}){let i=(e||"").match(b.notSpaceStart)?.[0],n=r?r.replace(b.endingNewline,"")+`
48
+ `:"";return i?'<pre><code class="language-'+w(i)+'">'+(t?n:w(n,!0))+`</code></pre>
49
+ `:"<pre><code>"+(t?n:w(n,!0))+`</code></pre>
50
+ `}blockquote({tokens:r}){return`<blockquote>
51
+ ${this.parser.parse(r)}</blockquote>
52
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
53
+ `}hr(r){return`<hr>
54
+ `}list(r){let e=r.ordered,t=r.start,i="";for(let a=0;a<r.items.length;a++){let l=r.items[a];i+=this.listitem(l)}let n=e?"ol":"ul",s=e&&t!==1?' start="'+t+'"':"";return"<"+n+s+`>
55
+ `+i+"</"+n+`>
56
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
57
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
58
+ `}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let i="";for(let n=0;n<r.rows.length;n++){let s=r.rows[n];t="";for(let a=0;a<s.length;a++)t+=this.tablecell(s[a]);i+=this.tablerow({text:t})}return i&&(i=`<tbody>${i}</tbody>`),`<table>
59
+ <thead>
60
+ `+e+`</thead>
61
+ `+i+`</table>
62
+ `}tablerow({text:r}){return`<tr>
63
+ ${r}</tr>
64
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
65
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${w(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,text:t,tokens:i,autolink:n}){let s=n?w(t,!0):this.parser.parseInline(i),a=ze(r);if(a===null)return s;r=w(a,n);let l='<a href="'+r+'"';return e&&(l+=' title="'+w(e)+'"'),l+=">"+s+"</a>",l}image({href:r,title:e,text:t,tokens:i}){i&&(t=this.parser.parseInline(i,this.parser.textRenderer));let n=ze(r);if(n===null)return w(t);r=n;let s=`<img src="${w(r)}" alt="${w(t)}"`;return e&&(s+=` title="${w(e)}"`),s+=">",s}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:w(r.text)}},ae=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},R=class Y{options;renderer;textRenderer;constructor(e){this.options=e||I,this.options.renderer=this.options.renderer||new F,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ae}static parse(e,t){return new Y(t).parse(e)}static parseInline(e,t){return new Y(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let i=0;i<e.length;i++){let n=e[i];if(this.options.extensions?.renderers?.[n.type]){let a=n,l=this.options.extensions.renderers[a.type].call({parser:this},a);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=l||"";continue}}let s=n;switch(s.type){case"space":{t+=this.renderer.space(s);break}case"hr":{t+=this.renderer.hr(s);break}case"heading":{t+=this.renderer.heading(s);break}case"code":{t+=this.renderer.code(s);break}case"table":{t+=this.renderer.table(s);break}case"blockquote":{t+=this.renderer.blockquote(s);break}case"list":{t+=this.renderer.list(s);break}case"checkbox":{t+=this.renderer.checkbox(s);break}case"html":{t+=this.renderer.html(s);break}case"def":{t+=this.renderer.def(s);break}case"paragraph":{t+=this.renderer.paragraph(s);break}case"text":{t+=this.renderer.text(s);break}default:{let a='Token with "'+s.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let i="";for(let n=0;n<e.length;n++){let s=e[n];if(this.options.extensions?.renderers?.[s.type]){let l=this.options.extensions.renderers[s.type].call({parser:this},s);if(l!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(s.type)){i+=l||"";continue}}let a=s;switch(a.type){case"escape":{i+=t.text(a);break}case"html":{i+=t.html(a);break}case"link":{i+=t.link(a);break}case"image":{i+=t.image(a);break}case"checkbox":{i+=t.checkbox(a);break}case"strong":{i+=t.strong(a);break}case"em":{i+=t.em(a);break}case"codespan":{i+=t.codespan(a);break}case"br":{i+=t.br(a);break}case"del":{i+=t.del(a);break}case"text":{i+=t.text(a);break}default:{let l='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(l),"";throw new Error(l)}}}return i}},Z=class{options;block;constructor(r){this.options=r||I}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?S.lex:S.lexInline}provideParser(r=this.block){return r?R.parse:R.parseInline}};function _(r,e){if(Array.isArray(e))for(let t=0;t<e.length;t++)r.push(e[t]);else r.push(e)}var Ft=class{defaults=ee();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=R;Renderer=F;TextRenderer=ae;Lexer=S;Tokenizer=N;Hooks=Z;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let i of r)switch(_(t,e.call(this,i)),i.type){case"table":{let n=i;for(let s of n.header)_(t,this.walkTokens(s.tokens,e));for(let s of n.rows)for(let a of s)_(t,this.walkTokens(a.tokens,e));break}case"list":{let n=i;_(t,this.walkTokens(n.items,e));break}default:{let n=i;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(s=>{let a=n[s].flat(1/0);_(t,this.walkTokens(a,e))}):n.tokens&&_(t,this.walkTokens(n.tokens,e))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let i={...t};if(i.async=this.defaults.async||i.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let s=e.renderers[n.name];s?e.renderers[n.name]=function(...a){let l=n.renderer.apply(this,a);return l===!1&&(l=s.apply(this,a)),l}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let s=e[n.level];s?s.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),i.extensions=e),t.renderer){let n=this.defaults.renderer||new F(this.defaults);for(let s in t.renderer){if(!(s in n))throw new Error(`renderer '${s}' does not exist`);if(["options","parser"].includes(s))continue;let a=s,l=t.renderer[a],p=n[a];n[a]=(...o)=>{let c=l.apply(n,o);return c===!1&&(c=p.apply(n,o)),c||""}}i.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new N(this.defaults);for(let s in t.tokenizer){if(!(s in n))throw new Error(`tokenizer '${s}' does not exist`);if(["options","rules","lexer"].includes(s))continue;let a=s,l=t.tokenizer[a],p=n[a];n[a]=(...o)=>{let c=l.apply(n,o);return c===!1&&(c=p.apply(n,o)),c}}i.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new Z;for(let s in t.hooks){if(!(s in n))throw new Error(`hook '${s}' does not exist`);if(["options","block"].includes(s))continue;let a=s,l=t.hooks[a],p=n[a];Z.passThroughHooks.has(s)?n[a]=o=>{if(this.defaults.async&&Z.passThroughHooksRespectAsync.has(s))return(async()=>{let h=await l.call(n,o);return p.call(n,h)})();let c=l.call(n,o);return p.call(n,c)}:n[a]=(...o)=>{if(this.defaults.async)return(async()=>{let h=await l.apply(n,o);return h===!1&&(h=await p.apply(n,o)),h})();let c=l.apply(n,o);return c===!1&&(c=p.apply(n,o)),c}}i.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,s=t.walkTokens;i.walkTokens=function(a){let l=[];return l.push(s.call(this,a)),n&&_(l,n.call(this,a)),l}}this.defaults={...this.defaults,...i}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return S.lex(r,e??this.defaults)}parser(r,e){return R.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let i={...t},n={...this.defaults,...i},s=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&i.async===!1)return s(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,l=await(n.hooks?await n.hooks.provideLexer(r):r?S.lex:S.lexInline)(a,n),p=n.hooks?await n.hooks.processAllTokens(l):l;n.walkTokens&&await Promise.all(this.walkTokens(p,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser(r):r?R.parse:R.parseInline)(p,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(s);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer(r):r?S.lex:S.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let l=(n.hooks?n.hooks.provideParser(r):r?R.parse:R.parseInline)(a,n);return n.hooks&&(l=n.hooks.postprocess(l)),l}catch(a){return s(a)}}}onError(r,e){return t=>{if(t.message+=`
66
+ Please report this to https://github.com/markedjs/marked.`,r){let i="<p>An error occurred:</p><pre>"+w(t.message+"",!0)+"</pre>";return e?Promise.resolve(i):i}if(e)return Promise.reject(t);throw t}}},P=new Ft;function d(r,e){return P.parse(r,e)}d.options=d.setOptions=function(r){return P.setOptions(r),d.defaults=P.defaults,Ce(d.defaults),d};d.getDefaults=ee;d.defaults=I;function Gt(...r){return P.use(...r),d.defaults=P.defaults,Ce(d.defaults),d}d.use=Gt;d.walkTokens=function(r,e){return P.walkTokens(r,e)};d.parseInline=P.parseInline;d.Parser=R;d.parser=R.parse;d.Renderer=F;d.TextRenderer=ae;d.Lexer=S;d.lexer=S.lex;d.Tokenizer=N;d.Hooks=Z;d.parse=d;var Wt=d.options,Kt=d.setOptions,Jt=d.walkTokens,Vt=d.parseInline;var Yt=R.parse,er=S.lex;var Xt=ge`:host{container-type:inline-size;display:block;min-inline-size:0}.interrupt-container{display:flex;flex-direction:column;gap:.75rem}.interrupt-actions,.interrupt-buttons{display:flex;justify-content:flex-end;gap:.5rem}.interrupt-message{white-space:normal}.interrupt-message :where(p){margin:0}.interrupt-message :where(ul,ol){margin:0;padding-inline-start:1.25rem}.entity-interrupt{background:var(--calcite-color-foreground-1);border-block-start:2px solid var(--calcite-color-brand);gap:0}.entity-heading{align-items:center;display:flex;gap:.75rem;padding:1rem 1rem .75rem}.entity-heading-icon{color:var(--calcite-color-brand);flex:none}.entity-heading-content{display:grid;gap:.25rem;min-inline-size:0}.entity-eyebrow{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);line-height:1.25}.entity-question{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-relative-md);font-weight:500;line-height:1.4;overflow-wrap:anywhere}.interrupt-picker{--arcgis-portal-entity-picker-results-max-block-size: min(22rem, 40vh);--arcgis-portal-entity-picker-selection-display: none;box-sizing:border-box;padding:0 1rem .75rem}.entity-interrupt .interrupt-actions{align-items:center;border-block-start:1px solid var(--calcite-color-border-3);display:grid;gap:.75rem;grid-template-columns:minmax(0,1fr) auto;min-block-size:2.25rem;padding:.625rem 1rem}.entity-selection{align-items:center;color:var(--calcite-color-text-2);display:flex;font-size:var(--calcite-font-size-relative-base);gap:.5rem;min-inline-size:0}.entity-selection calcite-icon{color:var(--calcite-color-status-success);flex:none}.entity-selection-label{flex:1;min-inline-size:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}@container (max-width: 24rem){.entity-heading{padding:.875rem .75rem .625rem}.interrupt-picker{padding:0 .75rem .625rem}.entity-interrupt .interrupt-actions{gap:.5rem;grid-template-columns:minmax(0,1fr);padding:.625rem .75rem}.entity-selection:empty{display:none}}`;d.use({gfm:!0,breaks:!0,async:!1});var Ut=new $e,oe=class extends fe{constructor(){super(...arguments),this.#e=[],this._messages=U({blocking:!0}),this.pickerMessages=U({blocking:!0,name:"portal-entity-picker"}),this.pickerRef=de(),this.pickerKey=0,this.selectedEntity=null,this.selectionSubmitted=!1,this.arcgisCancel=X(),this.arcgisSubmit=X()}static{this.properties={selectedEntity:16,selectionSubmitted:16,type:1,message:1,options:0,portal:0,entityRequest:0,requestId:1}}static{this.styles=Xt}#e;get selectedReference(){return this.selectedEntity&&this.selectedEntity.entityType===this.entityRequest?.entityType?ye(this.selectedEntity):void 0}willUpdate(e){(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&(this.pickerKey+=1,this.selectedEntity=null,this.selectionSubmitted=!1,this.#e=[])}updated(e){this.isConnected&&this.entityRequest&&(e.has("entityRequest")||e.has("requestId")||e.has("portal"))&&this.pickerRef.value?.setFocus()}submit(){if(this.entityRequest){let e=this.selectedReference;if(!e||this.selectionSubmitted)return;this.selectionSubmitted=!0,this.arcgisSubmit.emit(JSON.stringify(e));return}this.arcgisSubmit.emit(this.type==="boolean-choice"?!0:this.#e)}_renderMessageContent(){let e=this.message??"",t=d.parse(e,{async:!1});return Ut.sanitize(t)}_renderInterruptInput(){let{_messages:e,type:t,options:i}=this;switch(t){case"single-select":return $`<calcite-list class="interrupt-list" .label=${e.singleSelectLabel} selection-mode=single-persist @calciteListChange=${n=>this.#e=n.target.selectedItems[0]?.value}>${i?.map(n=>$`<calcite-list-item .label=${n} .value=${n}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return $`<calcite-list class="interrupt-list" .label=${e.multiSelectLabel} selection-mode=multiple @calciteListChange=${n=>this.#e=n.target.selectedItems.map(s=>s.value)}>${i?.map(n=>$`<calcite-list-item .label=${n} .value=${n}></calcite-list-item>`)}</calcite-list>`;case"text-input":return $`<calcite-input class="interrupt-input" .label=${e.textInputLabel} @calciteInputInput=${n=>this.#e=n.target.value}></calcite-input>`;case"boolean-choice":return null;default:return we(t)}}_renderInterruptButtons(e=!1){let{_messages:t,type:i,selectedReference:n}=this,s=i==="boolean-choice";return $`<div class="interrupt-buttons"><calcite-button .appearance=${e?"transparent":"outline"} .kind=${e?"neutral":void 0} @click=${()=>this.arcgisCancel.emit()}>${s?t.cancelButton:t.skipButton}</calcite-button><calcite-button appearance=solid .iconEnd=${e?"arrow-right":void 0} .disabled=${e&&(!n||this.selectionSubmitted)} @click=${this.submit}>${s?t.confirmButton:t.submitButton}</calcite-button></div>`}_renderEntityInterrupt(e){let{_messages:t,selectedReference:i}=this;return $`<div class="interrupt-container entity-interrupt"><div class="entity-heading"><calcite-icon class="entity-heading-icon" .icon=${e==="user"?"user":e==="group"?"group":"file"} scale=m></calcite-icon><div class="entity-heading-content"><span class="entity-eyebrow">${t.titleInput}</span><div class="interrupt-message entity-question">${W(this._renderMessageContent())}</div></div></div>${this.portal?be(this.pickerKey,$`<arcgis-portal-entity-picker class="interrupt-picker" .portal=${this.portal} .entityType=${e} .initialSearchTerm=${this.entityRequest?.searchTerm??""} mode=inline icon=search .selected=${this.selectedEntity} @arcgisSelectionChange=${({detail:n})=>{!this.selectionSubmitted&&(!n||n.entityType===this.entityRequest?.entityType)&&(this.selectedEntity=n)}} ${ke(this.pickerRef)}></arcgis-portal-entity-picker>`):this._renderInterruptInput()}<div class="interrupt-actions"><div class="entity-selection" role=status>${i&&$`<calcite-icon icon=check-circle scale=s></calcite-icon><span class="entity-selection-label" title=${i.label??me}>${i.label}</span><calcite-button appearance=transparent .disabled=${this.selectionSubmitted} icon-start=x kind=neutral .label=${this.pickerMessages.clearSelection} scale=s @click=${()=>{this.selectedEntity=null,this.pickerRef.value?.setFocus()}}></calcite-button>`||""}</div>${this._renderInterruptButtons(!0)}</div></div>`}render(){if(this.entityRequest)return this._renderEntityInterrupt(this.entityRequest.entityType);let{_messages:e,type:t}=this;return $`<div class="interrupt-container"><calcite-notice open kind=neutral width=full><div slot=title>${t==="boolean-choice"?e.titleConfirm:e.titleInput}</div><div slot=message class="interrupt-message">${W(this._renderMessageContent())}</div></calcite-notice>${this._renderInterruptInput()}<div class="interrupt-actions">${this._renderInterruptButtons()}</div></div>`}};xe("arcgis-portal-ai-assistant-interrupt",oe);export{oe as ArcgisPortalAiAssistantInterrupt};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{_a as a}from"./MLYQGIJU.js";import"./5PV2GUZW.js";async function c(e,i,o){if(o===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
2
+ import{_a as a}from"./U2HTYOBB.js";import"./5PV2GUZW.js";async function c(e,i,o){if(o===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
3
3
 
4
4
  If you continue to see this error, please import from "@langchain/core/callbacks/dispatch/web"`,"and explicitly pass in a config parameter.",`
5
5
 
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{b as $,c as y,d as x,e as v,f as z,g as O}from"./4QYVBXZT.js";import{d as f}from"./FN2QMDEW.js";import{a as w}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{K as h,L as m,N as u,Q as b,h as g,j as n}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";var T=({appearance:a,badgeType:e,class:t,messages:r,scale:o,showTooltip:i,width:c})=>{let s=r[e]??{title:e,tooltip:""},P=C[e],l=c==="narrow",d=`portal-group-badge-${e}`;return n`<calcite-chip id=${d??u} class=${m({badge:!0,"badge--colored":f(["OpenData","Partnered"],e),narrow:l,[`narrow--${o}`]:l,[t]:!0})} .value=${e} tabindex=0 .scale=${o} .appearance=${a} .label=${s.title} .icon=${P}>${l?null:s.title}</calcite-chip>${i?n`<calcite-tooltip .referenceElement=${d} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0>${l?n`<h3 class="tooltip-title">${s.title}</h3>`:null}<p class="tooltip-text">${s.tooltip}</p></calcite-tooltip>`:null}`},C={Collaboration:"collaboration",FeaturedContent:"home",Gallery:"images",OpenData:"open-data",SharedUpdate:"configure-editing",Partnered:"partnered-collaboration",AnyOrg:"zoom-to-object"},G=g`:host{display:flex;flex-wrap:wrap}.portal-group-badges__badge{margin-inline-end:.25rem}.badge{border:0}.badge--colored{--calcite-chip-icon-color: var(--calcite-color-brand)}.narrow{box-sizing:border-box;width:2rem;--calcite-chip-spacing-unit-l: 0}.image{border-radius:0;display:inline-flex;align-items:center;justify-content:center;margin-inline-end:.5rem}.narrow--s{width:1.5rem}.narrow--l{width:2.75rem}.tooltip-title{font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);margin:0 0 .25rem;padding:0}.tooltip-text{font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-1);margin:0;padding:0}`;function U(a,e){let t=[],r=y(a),o=x(a),i=v(a);return e.id&&(r.includes("updateitemcontrol")&&t.push("SharedUpdate"),z(a)&&o===e.id&&t.push("OpenData"),e.featuredItemsGroupQuery===`id:${a.id}`&&t.push("Gallery")),($(a).collaborationInfo?.collaborationId||O(a))&&t.push("Collaboration"),!i&&!e.isPortal&&o!=="none"&&t.push("AnyOrg"),i==="collaboration"&&t.push("Partnered"),t.includes("SharedUpdate")&&!t.includes("Partnered")&&o!==e.id&&t.splice(t.indexOf("SharedUpdate"),1),t}var p=class extends h{constructor(){super(...arguments),this._messages=w({blocking:!0}),this.badges=[],this.width="full",this.scale="m",this.showTooltips=!1,this.empty=!1}static{this.properties={badges:16,group:0,portal:0,width:1,appearance:1,scale:1,showTooltips:5,empty:7}}static{this.styles=G}willUpdate(e){(e.has("group")||e.has("portal"))&&(this.badges=this.group&&this.portal?U(this.group,this.portal):[],this.empty=this.badges.length===0)}render(){let{appearance:e,badges:t,scale:r,showTooltips:o,width:i}=this;return t.map(c=>T({appearance:e,badgeType:c,class:"portal-group-badges__badge",messages:this._messages,scale:r,showTooltip:o,width:i}))}};b("arcgis-portal-group-badges",p);export{p as ArcgisPortalGroupBadges};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as g}from"./4KTRAA2J.js";import{a as v,d}from"./4VLEUN7I.js";import{R as f}from"./HHGKNVCH.js";function m(e){let a=b(e);return f(`assets/portal-item-thumbnail/${a}`)}function b(e){let a=e.type?.toLowerCase(),r=e.typeKeywords||[];switch(a){case"web mapping application":return"webapp.avif";case"mobile application":return"mobileapp.avif";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets.avif";case"notebook":return"notebook.avif";case"style":return r.includes("Dictionary")?"dictionarystyle.avif":"style.avif";case"feature service":return r.includes("Location Tracking View")?"locationtrackingservice.avif":r.includes("IndoorPositioningDataService")?"indoor-positioning-data-service.avif":"default.avif";case"pro presentation":return"pro-presentation.avif";case"reality mapping project":return"realitymappingproject.avif";case"raster function template":return"rasterfunctiontemplate.avif";case"workforce project":return"workforceproject.avif";case"hub initiative":return"hubinitiative.avif";case"hub page":return"hubpage.avif";case"hub site application":case"site application":return"hubsite.avif";case"hub event":return"hubevent.avif";case"hub project":return"hubproject.avif";case"dashboard":return r.includes("ArcGIS Dashboards")?"dashboards.avif":"opsdashboard.avif";case"geoprocessing service":return r.includes("Notebook Web Tool")?"notebookwebtool.avif":"webtool.avif";case"web scene":case"scene service":return"scene.avif";case"ortho mapping project":return"orthomappingproject.avif";case"ortho mapping template":return"orthomappingtemplate.avif";case"insights theme":return"insightstheme.avif";case"insights workbook package":return"insightsworkbookpackage.avif";case"solution":return"solution.avif";case"mobile scene package":return"mobilescenepackage.avif";case"deep learning package":return"deeplearningpackage.avif";case"big data analytic":return"bigdataanalytic.avif";case"real time analytic":return"realtimeanalytic.avif";case"feed":return"feed.avif";case"excalibur imagery project":return"excaliburimageryproject.avif";case"storymap":return r.includes("storymapcollection")?"storymapcollection.avif":"storymap.avif";case"survey123 add in":return"survey123addin.avif";case"mission":return"mission.avif";case"mission template":return"missiontemplate.avif";case"quickcapture project":return"quickcaptureproject.avif";case"pro report":return"proreport.avif";case"pro package":return"propackage.avif";case"pro report template":return"proreporttemplate.avif";case"urban model":return"urbanmodel.avif";case"urban project":return"urbanproject.avif";case"web experience":return"webexperience.avif";case"web experience template":return"webexperiencetemplate.avif";case"experience builder widget":return"experiencebuilderwidget.avif";case"experience builder widget package":return"experiencebuilderwidgetpackage.avif";case"workflow":return"workflow.avif";case"insights script":return"insightsscript.avif";case"kernel gateway connection":return"kernelgatewayconnection.avif";case"hub initiative template":return"hubinitiativetemplate.avif";case"image service":return r.includes("Tile Imagery")?"tiledimagerylayer.avif":"imagerylayer.avif";case"mission report":return"missionreport.avif";case"administrative report":return"administrativereport.avif";case"storymap theme":return"storymaptheme.avif";case"application theme":return"applicationtheme.avif";case"knowledge graph":return"knowledgegraph.avif";case"knowledge graph configuration":return"knowledgegraphconfiguration.avif";case"knowledge graph layer":return"knowledgegraphlayer.avif";case"knowledge studio project":return"knowledgestudio.avif";case"earth configuration":return"earthconfiguration.avif";case"link chart":return"linkchart.avif";case"investigation":return"investigation.avif";case"apache parquet":return"apacheparquet.avif";case"map showcase":return"mapshowcase.avif";case"curated collection":return"curatedcollection.avif";case"video service":return"mediaservice.avif";case"geodata service":return"geodataservice.avif";case"suitability model":return"suitabilitymodel.avif";case"esri classifier definition":return"classifierdefinition.avif";case"esri spectral library":return"spectrallibrary.avif";case"deep learning studio project":return"deeplearningstudioproject.avif";case"esri classification schema":return"classificationschema.avif";case"insights data engineering workbook":return"dataengineeringworkbook.avif";case"insights data engineering model":return"dataengineeringmodel.avif";case"discussion":return"discussion.avif";case"api key":return"apikey.avif";case"data pipeline":return"datapipeline.avif";case"analysis model":return"analysismodel.avif";case"service connection":return"serviceconnection.avif";case"xr experience":return"xrexperience.avif";case"3dtiles service":return r.includes("GaussianSplat")?"gaussiansplatlayer.avif":"default.avif";default:return"default.avif"}}function h(e){return e.thumbnail??g(e).thumbnail??null}function j(e,a,r=!1,t=!1,i){let c=t?"https://www.arcgis.com/sharing/rest/":e?v(e):void 0,o=r||t;if(!t&&a.thumbnailUrl){let s=new URL(a.thumbnailUrl);return s.searchParams.append("w","400"),i&&s.searchParams.append("t",i),s.href}if(!c)return m(a);let p=e&&!o?d(e):"",n=p?`token=${p}`:"",u=`${c}content/items/${a.id}`,l=h(a);return l?`${u}/info/${l}?w=400${n?`&${n}`:""}${i?`&t=${i}`:""}`:a.type==="Image"&&!o?`${u}/data?${n}`:m(a)}export{m as a,h as b,j as c};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import d from"./ZHQXYCPA.js";import"./3J3ISO3E.js";import b from"./IOFXDIWC.js";import a from"./TIPQ2ZWK.js";import{a as f}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{K as c,M as l,Q as n,h as r,j as s,p as o}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=r`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-space-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-space-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,e=class extends c{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-space-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${l(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};n("arcgis-portal-classification-banner",e);return e},a,b,d)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{$,A as z,Aa,B as A,C as B,D as C,Da as Ba,E as D,Ea as Ca,F as E,Fa as Da,G as F,Ga as Ea,H as G,Ha as Fa,I as H,Ia as Ga,J,Ja as Ha,K,Ka as Ia,L,La as Ja,M,Ma as Ka,N,Na as La,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,aa,b as a,ba,c as b,ca,d as c,da,e as d,ea,f as e,fa,g as f,ga,h as g,ha,i as h,ia,j as i,ja,k as j,ka,l as k,la,m as l,ma,n as m,na,o as n,oa,p as o,pa,q as p,qa,r as q,ra,s as r,sa,t as s,ta,u as t,ua,v as u,va,w as v,wa,x as w,xa,y as x,ya,z as y,za}from"./ASID6YW7.js";import{qa as I}from"./234TH32X.js";import"./U2HTYOBB.js";import"./K3GAZFRI.js";import"./5PV2GUZW.js";export{S as Annotation,O as AsyncBatchedStore,Q as BaseChannel,L as BaseCheckpointSaver,k as BaseLangGraphError,N as BaseStore,R as BinaryOperatorAggregate,d as COMMAND_SYMBOL,I as ChatModelStreamImpl,i as Command,e as CommandInstance,Ca as CompiledStateGraph,qa as DeltaChannel,ua as DeltaValue,b as END,B as EmptyChannelError,A as EmptyInputError,$ as EventLog,la as Graph,l as GraphBubbleUp,o as GraphDrained,q as GraphInterrupt,m as GraphRecursionError,ha as GraphRunStream,n as GraphValueError,c as INTERRUPT,P as InMemoryStore,C as InvalidUpdateError,M as MemorySaver,Da as MessageGraph,Ia as MessagesAnnotation,Aa as MessagesDeltaValue,za as MessagesValue,Ja as MessagesZodMeta,Ka as MessagesZodState,D as MultipleSubgraphsError,s as NodeError,r as NodeInterrupt,y as NodeTimeoutError,g as Overwrite,u as ParentCommand,wa as REMOVE_ALL_MESSAGES,sa as ReducedValue,F as RemoteException,X as RunControl,a as START,Y as STREAM_EVENTS_V3_MODES,f as Send,Ba as StateGraph,G as StateGraphInputError,va as StateSchema,$ as StreamChannel,ia as SubgraphRunStream,E as UnreachableNodeError,ta as UntrackedValue,ra as UntrackedValueChannel,xa as addMessages,_ as convertToProtocolEvent,K as copyCheckpoint,ja as createGraphRunStream,ba as createLifecycleTransformer,ca as createMessagesTransformer,ea as createSubgraphDiscoveryTransformer,fa as createValuesTransformer,J as emptyCheckpoint,Ga as entrypoint,aa as filterLifecycleEntries,da as filterSubgraphHandles,V as getConfig,W as getCurrentTaskInput,oa as getJsonSchemaFromSchema,Ha as getPreviousState,pa as getSchemaDefaultGetter,T as getStore,H as getSubgraphsSeenSet,U as getWriter,ka as interrupt,Z as isCheckpointEnvelope,j as isCommand,w as isGraphBubbleUp,p as isGraphDrained,x as isGraphInterrupt,h as isInterrupted,ga as isNativeTransformer,t as isNodeError,z as isNodeTimeoutError,v as isParentCommand,na as isSerializableSchema,ma as isStandardSchema,ya as messagesDeltaReducer,xa as messagesStateReducer,Ea as pushMessage,Fa as task,La as writer};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ var s=a=>{throw new Error(`Unexpected value: ${a}`)},r=async a=>{await new Promise(e=>setTimeout(e,a))},n=async(a,e=10)=>{for(let t=0;t<e;t++)if(t>0&&await r(500*2**Math.floor((t-1)/2)),await a())return!0;return!1},o=(a,e)=>a.includes(e);export{s as a,r as b,n as c,o as d};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import b from"./RHCRPJWS.js";import a from"./5HZNBMW6.js";import"./K2XSYDAP.js";import{L as o,R as s,j as e,w as r}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
2
+ import b from"./G3WDR53S.js";import a from"./IOFXDIWC.js";import"./YK6FCXWU.js";import{K as o,Q as s,j as e,v as r}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import a from"./5HZNBMW6.js";export default $arcgis.t(([{watch:s},{b:r}])=>{var t=r;var f=["folder","group","contentType"],l=e=>e.type==="item-browser",o={filters:{},hiddenFilters:[],preview:null},w=(e=o)=>t({...o,...e});function y(e,a){let c=s(()=>e.preview,a);return()=>c.remove()}return{a:f,b:l,c:w,d:y}},"core/reactiveUtils",a)
2
+ import a from"./IOFXDIWC.js";export default $arcgis.t(([{watch:s},{b:r}])=>{var t=r;var f=["folder","group","contentType"],l=e=>e.type==="item-browser",o={filters:{},hiddenFilters:[],preview:null},w=(e=o)=>t({...o,...e});function y(e,a){let c=s(()=>e.preview,a);return()=>c.remove()}return{a:f,b:l,c:w,d:y}},"core/reactiveUtils",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import h from"./LGJWULAW.js";import"./SRWFOV5W.js";import g from"./OHAQPQAP.js";import"./Y5VUMGKH.js";import f from"./YIOJIA4Y.js";import"./4QYVBXZT.js";import e from"./K7LYYLUF.js";import"./4KTRAA2J.js";import d from"./ODSA6NNS.js";import"./PKA745KL.js";import"./VDXESPJK.js";import"./ULGME5RT.js";import"./DAAON2UO.js";import c from"./TIMYD2HM.js";import b from"./TIPQ2ZWK.js";import"./2XJX2JUO.js";import"./MLTZSPZQ.js";import a from"./OQ2JULON.js";import"./4VLEUN7I.js";import"./KV4ZZSNW.js";import"./FN2QMDEW.js";import"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,,a])=>{return a},a,b,c,d,e,f,g,h)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import f from"./ZHQXYCPA.js";import{a as w,b as P}from"./3J3ISO3E.js";import e from"./TGCJUIEL.js";import c from"./IOFXDIWC.js";import a from"./TIPQ2ZWK.js";import{a as S}from"./5R4JJWGB.js";import{a as E,f as I}from"./B3HV5JVN.js";import"./YK6FCXWU.js";import{I as d,J as m,K as b,N as C,Q as y,h as g,j as n}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([{createArcadeExecutor:F},{watch:q},{c:v},,{a:f,b:c,c:p,d:R,e:V,f:_},{a:x,b:$}])=>{async function k({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await T(e,r,t);return{[e]:{enabled:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function T(r,t,i){let a=t?.attributes?.[r];if(!a)return!1;let{isAttributeEnabled:e}=a;return e?await h(e,JSON.stringify(t),i):!0}async function j({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await M(e,r,t);return{[e]:{valueExpressionResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function M(r,t,i){let a=t.attributes[r];if(!a)throw Error(`Attribute ${r} not found in schema`);let e=a.valueExpression,s=a.validValues,o=a.validValuesMap;return s?.length?s:o&&Object.keys(o)?.length?o:e?await h(e,t,i,r):null}async function N({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await H(e,r,t);return{[e]:{attributeValidationResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function H(r,t,i){let a=t?.attributes?.[r];if(!a)return null;let e=a?.attributeValidation;return e?await h(e,JSON.stringify(t),i,r):null}var O=async(r,t)=>{let i=r?.bannerExpression;return i?.length?await h(i,r,t):W(r,t)},W=(r,t)=>{let i=Object.entries(r.attributes).sort(([,s],[,o])=>(s?.bannerOrder??0)-(o?.bannerOrder??0)),a=[],e=[];return i.forEach(([s,o])=>{let l=t?.[s];l&&o.bannerOrder&&(a.push(U({elementType:o.uiElement??"",selectionDisplayLabel:o.bannerLabel??"",labelDelimiter:o.labelDelimiter??"",classificationProp:l,valueDelimiter:o.valueDelimiter??""})),e.push(o.attributeDelimiter??""))}),a.length>0?a.reduce((s,o,l)=>l===0?o:`${s}${e[l-1]}${o}`,""):""},U=({elementType:r,selectionDisplayLabel:t,labelDelimiter:i,classificationProp:a,valueDelimiter:e})=>{let s=r.includes("multi")&&a?a.split("").join(e):a;return`${t}${i}${s}`};async function h(r,t,i,a=""){let e={schemaJsonString:typeof t=="string"?t:JSON.stringify(t),valueJsonString:JSON.stringify(i),attributeId:a};return(await J(r)).execute(e)}async function J(r){return await F(r,{variables:[{name:"schemaJsonString",type:"text"},{name:"valueJsonString",type:"text"},{name:"attributeId",type:"text"}]})}var L=g`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-space-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-space-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-space-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-space-sm)}.form-section__main-content{flex:3;padding:var(--calcite-space-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-space-md) 0}`,u=class extends b{constructor(){super(),this.classificationModel=x(this),this.messages=S(),this.formMainContentRef=d(),this.bannerRef=d(),this._classificationDataTask=$(this),this._formCreationTask=new P(this,{task:async()=>{if(await this._classificationDataTask.taskComplete,!this.portalClassificationSchema||!this.portalItem)throw new Error("Portal item and classification schema are required to render the form");let t=this.portalItem.clone();if(await t.load(),!this.primaryAttribute)throw new Error("primaryAttribute is required but was undefined.");this.existingClassification=!!t.classification,t.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),t.classification&&(t.classification.banner=await O(this.portalClassificationSchema,t.classification)),this.pendingPortalItem=t,this.cleanupItemClassificationWatchHandle(),this._itemClassificationWatchHandle=q(()=>this.portalItem.classification,i=>{if(this.pendingPortalItem){let a=this.pendingPortalItem.clone();a.load().then(()=>{a.classification=i,this.pendingPortalItem=a}).catch(e=>{console.error(e)})}}),this._itemClassificationWatchPortalItem=this.portalItem,this._itemClassificationWatchPortalItem.addHandles(this._itemClassificationWatchHandle,"arcgis-classification-config"),await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.pendingPortalItem=this.pendingPortalItem.clone(),this.existingClassification&&this.validateForm()},args:()=>[this.portalItem,this.portalClassificationSchema]}),this.getFormDisplayOrder=t=>this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder??0,this.addEditInfoAttributes=()=>{if(!this.pendingPortalItem?.classification)return{};let t=structuredClone(this.pendingPortalItem.classification),i=_(this.pendingPortalItem,t);return{...t,...i}},this.updateFavoriteClassification=t=>{this.favoriteClassifications=t},this.updateClassificationData=async t=>{let i=t.classification;if(this.selectedFavoriteClassificationName=t.name,this.pendingPortalItem){let a=this.pendingPortalItem.clone();if(await a.load(),a.classification=p(this.portalClassificationSchema,i),!this.portalClassificationSchema)return;await this.evaluateAttributeExpressions(this.portalClassificationSchema,a),a.classification=c(a.classification,this.attributeExpressionResults),this.pendingPortalItem=a}},this.existingClassification=!1,this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.primaryAttribute=this.classificationModel.primaryAttribute,this.attributeExpressionResults=new Map,this.formValidationErrors=[],this.formValidationErrorsSource="other",this.remoteValidationErrors="",this.canUserConfigureClassification=!0,this.favoriteClassifications=[],this.isRequiredErrors=new Set,this.status=this.classificationModel.status,this.values={},this.valid=!1,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=I()("status","values","valid")}static{this.properties={existingClassification:16,portalClassificationSchema:16,primaryAttribute:16,attributeExpressionResults:16,formValidationErrors:16,formValidationErrorsSource:16,itemClassification:16,pendingPortalItem:16,selectedCategory:16,remoteValidationErrors:16,canUserConfigureClassification:16,favoriteClassifications:16,selectedFavoriteClassificationName:16,isRequiredErrors:16,portalItem:0,status:35,values:[1,{type:Object}],valid:7,autoDestroyDisabled:5}}static{this.styles=L}async destroy(){this.cleanupItemClassificationWatchHandle(),await this.destroyManagedChildren(),await this.manager.destroy()}async resetForm(){if(this.existingClassification)this.pendingPortalItem=this.portalItem?.clone(),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.validateForm());else if(this.portalItem&&this.primaryAttribute&&this.portalClassificationSchema){let t=this.portalItem.clone();await t.load(),this.pendingPortalItem=this.portalItem?.clone(),this.pendingPortalItem.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults))}}async validateForm(){this.updateFormValidationErrors(),await this.updateRemoteValidationErrors()}async load(){try{await V(this.portalItem)||(this.canUserConfigureClassification=!1);let t=await v(this.portalItem);if(t){let{result:i,error:a}=t;if(a&&a.details.raw.messageCode!=="COM_1177"){console.error(a);return}i&&(this.favoriteClassifications=i.favorites)}}catch(t){console.error("Error occured while loading arcgis-classification-config:",t)}}willUpdate(t){if(t.has("pendingPortalItem")){let i=this.addEditInfoAttributes();this.values=i}(t.has("formValidationErrors")||t.has("remoteValidationErrors"))&&(this.valid=!this.formValidationErrors.length&&!this.remoteValidationErrors)}loaded(){let t=E(this.el,"form");t&&(this.listenOn(t,"formdata",this.updateFormData),this.listenOn(t,"submit",this.handleFormSubmit)),this.listen("submit",this.handleFormSubmit)}async updateClassificationProperty(t){if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let i=this.pendingPortalItem.clone();await i.load(),Object.entries(t??{}).forEach(([a,e])=>{if(a===this.primaryAttribute){let s=R(e,i.classification,this.primaryAttribute);s=p(this.portalClassificationSchema,s),i.classification=s}else{let s=new Map(Object.entries(i.classification??{}));if(e===void 0||e===""||Array.isArray(e)&&e.length===0)s.delete(a);else if(s.set(a,e),a==="fgi"&&!s.has("fgiOptions")){let o=this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue??[];s.set("fgiOptions",Array.isArray(o)?o:[o])}i.classification=Object.fromEntries(s)}}),i.classification&&!i.classification.fgi&&delete i.classification.fgiOptions,await this.evaluateAttributeExpressions(this.portalClassificationSchema,i),i.classification=c(i.classification,this.attributeExpressionResults),i.classification&&(i.classification.banner=await O(this.portalClassificationSchema,i.classification)),this.pendingPortalItem=i,this.existingClassification&&this.validateForm(),t&&"classification"in t&&this.updateIsRequiredErrors()}handleCategorySelectChange(t){this.selectedCategory=t.target.selectedItems[0].value}async evaluateAttributeExpressions(t,i){let a=await k({portalClassificationSchema:t,itemClassification:i.classification}),e=await j({portalClassificationSchema:t,itemClassification:i.classification}),s=await N({portalClassificationSchema:t,itemClassification:i.classification});Object.keys(t.attributes).forEach(o=>{let l=a[o]?.enabled??!0,D=e[o]?.valueExpressionResult,A=s[o]?.attributeValidationResult;this.attributeExpressionResults.set(o,{enabled:l,valueExpressionResult:D,attributeValidationResult:A})})}updateIsRequiredErrors(){let t=new Set;Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([i,a])=>{a.isRequired&&!this.pendingPortalItem?.classification?.[i]&&this.pendingPortalItem?.classification?.[i]!==0&&t.add(i)}),this.isRequiredErrors=t}updateFormValidationErrors(t=!1,i="other"){let a=[];Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([e,s])=>{s.isRequired&&!this.pendingPortalItem?.classification?.[e]&&this.pendingPortalItem?.classification?.[e]!==0&&(!t||this.isRequiredErrors.has(e))&&a.push({attribute:s.label,reason:this.messages.isrequired??"is required",category:s.attributeCategory}),this.attributeExpressionResults.get(e)?.attributeValidationResult&&a.push({attribute:s.label,reason:this.attributeExpressionResults.get(e)?.attributeValidationResult??"",category:s.attributeCategory})}),this.formValidationErrors=a,this.formValidationErrorsSource=i}async updateRemoteValidationErrors(){if(!this.pendingPortalItem?.classification)return;let t=await this.classificationModel.validateClassification(void 0,this.pendingPortalItem?.classification,this.pendingPortalItem.portal.restUrl);this.remoteValidationErrors=t}cleanupItemClassificationWatchHandle(){this._itemClassificationWatchHandle?.remove(),this._itemClassificationWatchHandle=void 0,this._itemClassificationWatchPortalItem?.removeHandles("arcgis-classification-config"),this._itemClassificationWatchPortalItem=void 0}async destroyManagedChildren(){let t=this.bannerRef.value;!t?.autoDestroyDisabled||t.manager?.destroyed||await t.destroy()}async handleFormSubmit(t){this.validateForm(),this.updateIsRequiredErrors(),this.formMainContentRef.value?.scrollIntoView()}updateFormData(t){let i=t.formData,a=this.addEditInfoAttributes();a=c(a,this.attributeExpressionResults),Object.entries(a??{}).forEach(([e,s])=>{i.set(e,s)})}renderCategoryTabs(){return this._classificationDataTask.render({complete:()=>{if(this.portalClassificationSchema?.attributeCategories?.length)return this.selectedCategory||(this.selectedCategory=this.portalClassificationSchema?.attributeCategories[0]),n`<calcite-list .label=${this.messages.selectcategory??"select category"} selection-appearance=border selection-mode=single-persist @calciteListChange=${this.handleCategorySelectChange}>${this.portalClassificationSchema.attributeCategories.map(t=>{let i=this.formValidationErrors.filter(a=>a.category===t).length;return n`<calcite-list-item .label=${t} .value=${t} .selected=${this.selectedCategory===t} .description=${i?`${i} ${i>1?this.messages.errors:this.messages.error}`:void 0}>${i&&n`<div slot=content-end class="danger"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon></div>`||""}</calcite-list-item>`})}</calcite-list>`}})}renderValidationErrors(){return this.formValidationErrors.length&&(!this.selectedCategory||this.formValidationErrors.some(t=>this.selectedCategory===t.category)||this.formValidationErrorsSource==="favorite")?n`<calcite-notice open icon=exclamation-mark-triangle class="spacing-y" kind=danger><div slot=message>${this.messages.bannererror??"Some fields are incomplete or contain errors. Check the highlighted fields for details."}</div></calcite-notice>`:null}renderFavoriteClassification(){let t=this.portalClassificationSchema?.attributeCategories?.[0]??"Default";return this.selectedCategory=this.portalClassificationSchema?.attributeCategories?.length?this.selectedCategory:"Default",this.selectedCategory===t?n`<arcgis-portal-classification-favorite .portalItem=${this.pendingPortalItem??this.portalItem} .classificationValue=${this.pendingPortalItem?.classification} .favoriteClassifications=${this.favoriteClassifications} .selectedFavoriteClassificationName=${this.selectedFavoriteClassificationName} .attributeExpressionResults=${this.attributeExpressionResults} .resetFavoriteClassification=${i=>this.updateFavoriteClassification(i)} .updateClassificationData=${async i=>{await this.updateClassificationData(i),this.updateFormValidationErrors(!1,"favorite"),this.updateIsRequiredErrors()}}></arcgis-portal-classification-favorite>`:null}renderForm(){return this._formCreationTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,complete:()=>{if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let t=Object.entries(this.portalClassificationSchema.attributes).sort(([i],[a])=>this.getFormDisplayOrder(i)-this.getFormDisplayOrder(a));return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([,{attributeCategory:i}])=>this.selectedCategory===i||!i).map(([i,a])=>{if(this.attributeExpressionResults.get(i)?.enabled===!1)return null;let e=this.pendingPortalItem?.classification?.[i];return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${a} .value=${e} @arcgisAttributeValueChange=${async s=>{await this.updateClassificationProperty(s.detail),a.isRequired&&!s.detail[i]?this.isRequiredErrors.add(i):this.isRequiredErrors=new Set(Array.from(this.isRequiredErrors).filter(o=>o!==i)),this.updateFormValidationErrors(!0)}} .renderingInfo=${this.attributeExpressionResults.get(i)} .isRequiredErrors=${this.isRequiredErrors}></arcgis-portal-classification-form-element>`})}`}})}renderNotice(t,i="warning"){return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`}renderHelpTooltip(){return this.portalClassificationSchema?.helpTooltip?n`<calcite-action id=portal-classification-config-tooltip-button .text=${this.portalClassificationSchema?.helpTooltip} icon=information></calcite-action><calcite-popover .label=${this.portalClassificationSchema?.helpTooltip} reference-element=portal-classification-config-tooltip-button placement=bottom-end overlay-positioning=fixed auto-close><div class="header-section__title-popover"><calcite-link .href=${this.portalClassificationSchema?.helpUrl} target=_blank id=portal-classification-config-tooltip-button>${this.portalClassificationSchema?.helpTooltip}</calcite-link></div></calcite-popover>`:null}render(){return this.portalItem?this._classificationDataTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,error:()=>this.renderNotice(this.messages.anerroroccurred??"An error has occurred.","danger"),complete:()=>this.portalItem?this.canUserConfigureClassification?this.portalItem.portal.hasClassificationSchema?n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview??"documentbannerpreview"??C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview??"documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status===w.COMPLETE&&n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem??this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled} ${m(this.bannerRef)}></arcgis-portal-classification-banner>`||""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length&&n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>`||""}<div class="form-section__main-content" ${m(this.formMainContentRef)}>${this.renderForm()}</div></div>`:this.renderNotice(this.messages.missingclassificationschema??"Portal is missing classification schema."):this.renderNotice(this.messages.userconfigurepermissionrequired??"User configuration permission is required."):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}};y("arcgis-portal-classification-config",u);return u},"arcade","core/reactiveUtils",a,c,e,f)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import a from"./3EQGUCO4.js";import"./F2HT5PVQ.js";import"./4KTRAA2J.js";import"./4VLEUN7I.js";import"./KV4ZZSNW.js";import"./FN2QMDEW.js";import"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([a])=>{return a},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import a from"./FRE56NBG.js";import"./GUL7EIJ4.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as u}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as l,K as c,L as d,R as v,j as s,w as n}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{a:p,b:m,c:f}])=>{var a=class extends d{constructor(){super(),this.messages=u({blocking:!0}),this.buttonRef=l(),this.favoriteRequestId=0,this.handleFavoriteUpdate=t=>{let i=f(t,this.item?.id??void 0);i&&(this.isFavorite=i.favorite)},this.handleToggleFavorite=async t=>{t.preventDefault(),t.stopPropagation();let{item:i,portal:o,user:r}=this;if(!i.id||!o||!r)return;let F={id:i.id,access:i.access},h=this.isFavorite,e=!h;this.isFavorite=e;let{updated:g}=await m({currentFavorite:h,item:F,portal:o,user:r});if(!g){this.isFavorite=!e;return}this.arcgisItemFavoriteUpdate.emit({id:i.id,favorite:e})},this.isFavorite=!1,this.isFavoriteLoaded=!1,this.width="full",this.iconOnly=!1,this.scale="m",this.showTooltip=!1,this.arcgisItemFavoriteUpdate=n(),this.listenOn(window,"arcgisItemFavoriteUpdate",this.handleFavoriteUpdate)}static{this.properties={isFavorite:16,isFavoriteLoaded:16,item:0,portal:0,user:0,width:1,iconOnly:5,scale:1,showTooltip:5}}async setFocus(){await this.buttonRef.value?.setFocus()}willUpdate(t){(t.has("item")||t.has("portal")||t.has("user"))&&(this.isFavoriteLoaded=!1,this.refreshFavorite())}async refreshFavorite(){if(!this.item.id||!this.portal||!this.user){this.isFavorite=!1;return}let t=++this.favoriteRequestId,i=await p(this.item.id,this.portal,this.user);t===this.favoriteRequestId&&(this.isFavorite=i,this.isFavoriteLoaded=!0)}render(){if(!this.isFavoriteLoaded)return null;let t=this.isFavorite?this.messages.remove:this.messages.add;return s`<calcite-button .width=${this.iconOnly?"auto":this.width} .scale=${this.scale} .appearance=${this.iconOnly?"transparent":"outline-fill"} kind=neutral .iconStart=${this.isFavorite?"star-f":"star"} .ariaLabel=${this.iconOnly?t:void 0} @click=${this.handleToggleFavorite} ${c(this.buttonRef)}>${this.iconOnly?null:t}</calcite-button>${this.showTooltip?s`<calcite-tooltip .referenceElement=${this.buttonRef.value}>${t}</calcite-tooltip>`:null}`}};v("arcgis-portal-item-favorite",a);return a},a)
2
+ import a from"./O4YFPGD5.js";import"./GUL7EIJ4.js";import"./4VLEUN7I.js";import"./KV4ZZSNW.js";import"./FN2QMDEW.js";import{a as u}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{I as l,J as c,K as d,Q as v,j as s,v as n}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([{a:p,b:m,c:f}])=>{var a=class extends d{constructor(){super(),this.messages=u({blocking:!0}),this.buttonRef=l(),this.favoriteRequestId=0,this.handleFavoriteUpdate=t=>{let i=f(t,this.item?.id??void 0);i&&(this.isFavorite=i.favorite)},this.handleToggleFavorite=async t=>{t.preventDefault(),t.stopPropagation();let{item:i,portal:o,user:r}=this;if(!i.id||!o||!r)return;let F={id:i.id,access:i.access},h=this.isFavorite,e=!h;this.isFavorite=e;let{updated:g}=await m({currentFavorite:h,item:F,portal:o,user:r});if(!g){this.isFavorite=!e;return}this.arcgisItemFavoriteUpdate.emit({id:i.id,favorite:e})},this.isFavorite=!1,this.isFavoriteLoaded=!1,this.width="full",this.iconOnly=!1,this.scale="m",this.showTooltip=!1,this.arcgisItemFavoriteUpdate=n(),this.listenOn(window,"arcgisItemFavoriteUpdate",this.handleFavoriteUpdate)}static{this.properties={isFavorite:16,isFavoriteLoaded:16,item:0,portal:0,user:0,width:1,iconOnly:5,scale:1,showTooltip:5}}async setFocus(){await this.buttonRef.value?.setFocus()}willUpdate(t){(t.has("item")||t.has("portal")||t.has("user"))&&(this.isFavoriteLoaded=!1,this.refreshFavorite())}async refreshFavorite(){if(!this.item.id||!this.portal||!this.user){this.isFavorite=!1;return}let t=++this.favoriteRequestId,i=await p(this.item.id,this.portal,this.user);t===this.favoriteRequestId&&(this.isFavorite=i,this.isFavoriteLoaded=!0)}render(){if(!this.isFavoriteLoaded)return null;let t=this.isFavorite?this.messages.remove:this.messages.add;return s`<calcite-button .width=${this.iconOnly?"auto":this.width} .scale=${this.scale} .appearance=${this.iconOnly?"transparent":"outline-fill"} kind=neutral .iconStart=${this.isFavorite?"star-f":"star"} .ariaLabel=${this.iconOnly?t:void 0} @click=${this.handleToggleFavorite} ${c(this.buttonRef)}>${this.iconOnly?null:t}</calcite-button>${this.showTooltip?s`<calcite-tooltip .referenceElement=${this.buttonRef.value}>${t}</calcite-tooltip>`:null}`}};v("arcgis-portal-item-favorite",a);return a},a)
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as Q}from"./KHKREBVZ.js";var Y=globalThis,X=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),It=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(X&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=It.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&It.set(e,t))}return t}toString(){return this.cssText}},kt=s=>new M(typeof s=="string"?s:s+"",void 0,vt),Ae=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,r,i)=>o+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+s[i+1],s[0]);return new M(e,s,vt)},jt=(s,t)=>{if(X)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),r=Y.litNonce;r!==void 0&&o.setAttribute("nonce",r),o.textContent=e.cssText,s.appendChild(o)}},Et=X?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return kt(e)})(s):s;var{is:Ce,defineProperty:we,getOwnPropertyDescriptor:Oe,getOwnPropertyNames:Te,getOwnPropertySymbols:Se,getPrototypeOf:Pe}=Object,tt=globalThis,Ht=tt.trustedTypes,Ne=Ht?Ht.emptyScript:"",De=tt.reactiveElementPolyfillSupport,I=(s,t)=>s,Z={toAttribute(s,t){switch(t){case Boolean:s=s?Ne:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},k=(s,t)=>!Ce(s,t),Vt={attribute:!0,type:String,converter:Z,reflect:!1,useDefault:!1,hasChanged:k};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var b=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),r=this.getPropertyDescriptor(t,o,e);r!==void 0&&we(this.prototype,t,r)}}static getPropertyDescriptor(t,e,o){let{get:r,set:i}=Oe(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);i?.call(this,n),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(I("elementProperties")))return;let t=Pe(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(I("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(I("properties"))){let e=this.properties,o=[...Te(e),...Se(e)];for(let r of o)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,r]of e)this.elementProperties.set(o,r)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let r=this._$Eu(e,o);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let r of o)e.unshift(Et(r))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,o);if(r!==void 0&&o.reflect===!0){let i=(o.converter?.toAttribute!==void 0?o.converter:Z).toAttribute(e,o.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let o=this.constructor,r=o._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=o.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Z;this._$Em=r;let a=n.fromAttribute(e,i.type);this[r]=a??this._$Ej?.get(r)??a,this._$Em=null}}requestUpdate(t,e,o,r=!1,i){if(t!==void 0){let n=this.constructor;if(r===!1&&(i=this[t]),o??=n.getPropertyOptions(t),!((o.hasChanged??k)(i,e)||o.useDefault&&o.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(n._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:r,wrapped:i},n){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[r,i]of o){let{wrapped:n}=i,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};b.elementStyles=[],b.shadowRootOptions={mode:"open"},b[I("elementProperties")]=new Map,b[I("finalized")]=new Map,De?.({ReactiveElement:b}),(tt.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,zt=s=>s,et=bt.trustedTypes,Bt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,_t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,At="?"+_,xe=`<${At}>`,O=document,H=()=>O.createComment(""),V=s=>s===null||typeof s!="object"&&typeof s!="function",Ct=Array.isArray,Jt=s=>Ct(s)||typeof s?.[Symbol.iterator]=="function",$t=`[
3
+ \f\r]`,j=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Ft=/>/g,C=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Qt=/^(?:script|style|textarea|title)$/i,wt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),us=wt(1),fs=wt(2),ms=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,w=O.createTreeWalker(O,129);function Yt(s,t){if(!Ct(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,o=[],r,i=t===2?"<svg>":t===3?"<math>":"",n=j;for(let a=0;a<e;a++){let l=s[a],c,u,h=-1,m=0;for(;m<l.length&&(n.lastIndex=m,u=n.exec(l),u!==null);)m=n.lastIndex,n===j?u[1]==="!--"?n=Wt:u[1]!==void 0?n=Ft:u[2]!==void 0?(Qt.test(u[2])&&(r=RegExp("</"+u[2],"g")),n=C):u[3]!==void 0&&(n=C):n===C?u[0]===">"?(n=r??j,h=-1):u[1]===void 0?h=-2:(h=n.lastIndex-u[2].length,c=u[1],n=u[3]===void 0?C:u[3]==='"'?Gt:qt):n===Gt||n===qt?n=C:n===Wt||n===Ft?n=j:(n=C,r=void 0);let v=n===C&&s[a+1].startsWith("/>")?" ":"";i+=n===j?l+xe:h>=0?(o.push(c),l.slice(0,h)+_t+l.slice(h)+_+v):l+_+(h===-2?a:v)}return[Yt(s,i+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},z=class s{constructor({strings:t,_$litType$:e},o){let r;this.parts=[];let i=0,n=0,a=t.length-1,l=this.parts,[c,u]=Xt(t,e);if(this.el=s.createElement(c,o),w.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(r=w.nextNode())!==null&&l.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let h of r.getAttributeNames())if(h.endsWith(_t)){let m=u[n++],v=r.getAttribute(h).split(_),A=/([.?@])?(.*)/.exec(m);l.push({type:1,index:i,name:A[2],strings:v,ctor:A[1]==="."?ot:A[1]==="?"?rt:A[1]==="@"?it:S}),r.removeAttribute(h)}else h.startsWith(_)&&(l.push({type:6,index:i}),r.removeAttribute(h));if(Qt.test(r.tagName)){let h=r.textContent.split(_),m=h.length-1;if(m>0){r.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)r.append(h[v],H()),w.nextNode(),l.push({type:2,index:++i});r.append(h[m],H())}}}else if(r.nodeType===8)if(r.data===At)l.push({type:2,index:i});else{let h=-1;for(;(h=r.data.indexOf(_,h+1))!==-1;)l.push({type:7,index:i}),h+=_.length-1}i++}}static createElement(t,e){let o=O.createElement("template");return o.innerHTML=t,o}};function T(s,t,e=s,o){if(t===f)return t;let r=o!==void 0?e._$Co?.[o]:e._$Cl,i=V(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(s),r._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=r:e._$Cl=r),r!==void 0&&(t=T(s,r._$AS(s,t.values),r,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,r=(t?.creationScope??O).importNode(e,!0);w.currentNode=r;let i=w.nextNode(),n=0,a=0,l=o[0];for(;l!==void 0;){if(n===l.index){let c;l.type===2?c=new x(i,i.nextSibling,this,t):l.type===1?c=new l.ctor(i,l.name,l.strings,this,t):l.type===6&&(c=new nt(i,this,t)),this._$AV.push(c),l=o[++a]}n!==l?.index&&(i=w.nextNode(),n++)}return w.currentNode=O,r}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},x=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(O.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,r=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=z.createElement(Yt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new st(r,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new z(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,r=0;for(let i of t)r===e.length?e.push(o=new s(this.O(H()),this.O(H()),this,this.options)):o=e[r],o._$AI(i),r++;r<e.length&&(this._$AR(o&&o._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=zt(t).nextSibling;zt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},S=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,r){let i=this.strings,n=!1;if(i===void 0)t=T(this,t,e,0),n=!V(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,l,c;for(t=i[0],l=0;l<i.length-1;l++)c=T(this,a[o+l],e,l),c===f&&(c=this._$AH[l]),n||=!V(c)||c!==this._$AH[l],c===d?t=d:t!==d&&(t+=(c??"")+i[l+1]),this._$AH[l]=c}n&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends S{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends S{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends S{constructor(t,e,o,r,i){super(t,e,o,r,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let o=this._$AH,r=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==d&&(o===d||r);r&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},Zt={M:_t,P:_,A:At,C:1,L:Xt,R:st,D:Jt,V:T,I:x,H:S,N:rt,U:it,B:ot,F:nt},Le=bt.litHtmlPolyfillSupport;Le?.(z,x),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,r=o._$litPart$;if(r===void 0){let i=e?.renderBefore??null;o._$litPart$=r=new x(t.insertBefore(H(),i),i,void 0,e??{})}return r._$AI(s),r};var Ot=globalThis,E=class extends b{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var Re=Ot.litElementPolyfillSupport;Re?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ss=(s,t,e,o)=>{let r=se(t);if(o?.once){let n=`${s}${r}${e}`;if(te.has(n))return;te.add(n)}let i;if(o?.detail){i={};for(let[n,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let l=new WeakRef(a);Object.defineProperty(i,n,{enumerable:!0,get(){return l.deref()}})}else i[n]=a;ee?.log.interceptors?.forEach(n=>n(s,r,e,i)),console[s](`[${r}]: ${e}`,i)}else ee?.log.interceptors?.forEach(n=>n(s,r,e)),console[s](`[${r}]: ${e}`)},oe=s=>{let t=`[${se(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},Ps=s=>`The property \`${s.toString()}\` is required but missing.`,Ns=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},B=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var F=Symbol.for("controller"),Ue=s=>typeof s=="object"&&s!==null&&(F in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Ls=s=>typeof s?.then=="function";var W,N=s=>{W!==s&&(W=s,queueMicrotask(()=>W===s?W=void 0:0))},q=s=>W,P=[],ct=s=>{if(s===void 0){P=[];return}let t=P.indexOf(s);P=t===-1?[...P,s]:P.slice(0,t+1),queueMicrotask(()=>P=[])},re=()=>P,L,Rs=s=>{L!==s&&(L=s,queueMicrotask(()=>L===s?L=void 0:0))},Me=()=>{let s=L;return L=void 0,s},ie=async(s,t)=>{let e=ht(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(r=>t(r,o))}return e.exports},ne=async s=>{let t=ht(s);return await t.ready,t},ht=s=>{let e=q().manager.X(s);if(e!==void 0)return e;if(Ue(s))return s;let o=Me();if(o!==void 0)return o},lt=!1,Us=s=>{lt=!0;try{return s()}finally{lt=!1}};var Ie=(s,t,e)=>{let o=Object.keys(s),r=o.length;R===void 0&&queueMicrotask(U),R??=new Map;let i=R.get(s);return i===void 0&&(i={callbacks:[],keyCount:r},R.set(s,i)),i.keyCount!==r&&(i.callbacks.forEach(n=>n(o)),i.callbacks=[],i.keyCount=r),i.callbacks.push(n=>{let a=c=>p(t,null,c),l=n[r];l===void 0?a(void 0):s[l]===e?a(l):a(void 0)}),e},R,U=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},ke=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((r,i)=>p(t,void 0,e===i?r:void 0)),e},je=(s=[q(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],r=o.length+1,i=n=>{r-=1,n!==void 0&&(r=Math.min(r,0)),r===0&&t(n)};o.forEach(n=>Ie(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!1}),e));for(let n of o)if("manager"in n&&n.manager.component===n){ke(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},He=(s="",t={},e=q())=>{let o={emit:r=>{s===""&&U();let i=new CustomEvent(s,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return s===""&&je(void 0,r=>s=r.key,o),o},Ve=He.bind(null,""),ce;ce=F;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#i=[],this.#l=[],this.#c=[],this.#d=[],this.#n=[],this.#p=!1,this.P=Promise.withResolvers(),this.connectedCalled=!1,this.loadedCalled=!1,this[ce]=!0,this.#h=[];let e=this,o=t??q(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=le(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ct(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#i;#l;#c;#d;#n;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?le(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return N(this.#o),ie}get useRef(){return N(this.#o),ne}get useRefSync(){return N(this.#o),ht}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#r.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#l.push(t)}onDestroy(t){this.#c.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#n.forEach(p),t.#n=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await B(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(B)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(ae,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#l.forEach(ae,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#c.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){N(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#n.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#n.push(r.remove)})}};function ae(s){p(s,void 0,this)}var le=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,r,i){if(!((r==="exports"||r==="_exports")&&r in o&&o[r]===e)&&(r in o||r in Promise.prototype||typeof r=="symbol"))return typeof o=="function"?o[r]:Reflect.get(o,r,i)}},e=new Proxy(s,t);return e};var he=Tt;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:ze}=Zt,de=s=>s;var dt=s=>s.strings===void 0,pe=()=>document.createComment(""),Fs=(s,t,e)=>{let o=s._$AA.parentNode,r=t===void 0?s._$AB:t._$AA;if(e===void 0){let i=o.insertBefore(pe(),r),n=o.insertBefore(pe(),r);e=new ze(i,n,s,s.options)}else{let i=e._$AB.nextSibling,n=e._$AM,a=n!==s;if(a){let l;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(l=s._$AU)!==n._$AU&&e._$AP(l)}if(i!==r||a){let l=e._$AA;for(;l!==i;){let c=de(l).nextSibling;de(o).insertBefore(l,r),l=c}}}return e},qs=(s,t,e=s)=>(s._$AI(t,e),s),Be={},ue=(s,t=Be)=>s._$AH=t,Gs=s=>s._$AH,Ks=s=>{s._$AR(),s._$AA.remove()};var We=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dt(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return ue(s),t}});var G=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),G(o,t);return!0},pt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},fe=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ge(t)}};function Fe(s){this._$AN!==void 0?(pt(this),this._$AM=s,fe(this)):this._$AM=s}function qe(s,t=!1,e=0){let o=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(o))for(let i=e;i<o.length;i++)G(o[i],!1),pt(o[i]);else o!=null&&(G(o,!1),pt(o));else G(this,s)}var Ge=s=>{s.type==y.CHILD&&(s._$AP??=qe,s._$AQ??=Fe)},ut=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),fe(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(G(this,t),pt(this))}setValue(t){if(dt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var ho=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends ut{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=St.get(t);e===void 0&&(e=new WeakMap,St.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var xt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Rt(){}function Ut(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var Je=(s,t)=>function(o,r){if(!globalThis.customElements)return;let n=(r??o??{}).resourcesUrl;n&&s.setAssetPath(n);for(let[a,[l,c="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=c.split(";"),A=h?h?.split(",").map(Qe):void 0,gt=A?.map(([D])=>D),J=class extends Dt{static{this.formAssociated=u===1}static{this.observedAttributes=A?.map(([,D])=>D).filter(D=>D!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=l(),J.F()),super()}};customElements.define(a,J)}},ft=Object.defineProperty,Qe=s=>{let t=s.split(":");return t.length===1?[t[0],Q(t[0])]:t},Ye=globalThis.HTMLElement??Rt,Dt=class extends Ye{constructor(){super(),this.#e={},this.#s=[],this.I=Promise.withResolvers(),this.H=Promise.withResolvers(),this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#r({a:e.A}):e.B.then(async o=>{await e.K.p,t.#r(await(o.default?.then(r=>typeof r=="function"?{a:r}:r)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Ut(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=xt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#r(t){let e=this.constructor,o=e.L,r=this.#e,i=Object.values(t).find(h=>h.L===o),n=`${o}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Ze(a),!e.A&&(e.A=i,customElements.define(n,i)),i.N=this;let c=document.createElement(n);i.N=void 0,this.#t=c,this.#e=c,this.#s.forEach(h=>c.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(r).forEach(Xe,c);let u=this.isConnected;(u||this.G)&&(c.connectedCallback?.(),u||c.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Xe([s,t]){this[s]=t}var Ze=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,i){e.setAttribute.call(this.el,r,i)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},t.hasAttribute=function(r){return e.hasAttribute.call(this.el,r)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var ye=(s,t)=>{let e=t>ts?es:t/ss,o=0,r=setInterval(()=>{o+=e,o>=t&&(clearInterval(r),s())},e);return r},ts=4e3,es=2e3,ss=4;var mt=class extends he{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),U();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),ct(void 0),N(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ye(t,os)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},os=1e3,yt="autoDestroyDisabled";var ge=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let r=!!t[o];r===this.st.has(o)||this.nt?.has(o)||(r?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var ve="important",rs=" !"+ve,Ee=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let r=t[o];if(r!=null){this.ft.add(o);let i=typeof r=="string"&&r.endsWith(rs);o.includes("-")||i?e.setProperty(o,i?r.slice(0,-11):r,i?ve:""):e[o]=r}}return f}});var $e=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,r=e.K.o,i=s.prototype.shouldUpdate;t.#r=o?.H??Promise.withResolvers(),t.I=o?.I??Promise.withResolvers(),t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Rt,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),r&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,i=r?.hasChanged??k,n={attribute:o&1&&typeof t=="string"?Q(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...r,hasChanged(a,l){let c=i(a,l);return n.c=c,c}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,o){let r=this.K,i=super.getPropertyDescriptor(t,e,o);return o.d=i,{...i,get(){return r.t?.(this.#t.get(t)),i.get?.call(this)},set(n){let a=this.manager;if(o.readOnly&&!lt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);i.set.call(this,n??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(U(),a?.S(t,n))}}}static{this.lumina=!0}static{Ut(this)}#t;#e;#s;#r;#i;#l;get elementInternals(){return this.#l??=this.el.attachInternals(),this.#l}connectedCallback(){this.hasAttribute("defer-hydration")||this.#c(!0)}#c(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#n().catch(r=>{this.#r.reject(r),setTimeout(()=>{throw r})})):e&&this.requestUpdate()}#d(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,i=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#c(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let n=i.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#n(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(B(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(r=>!r.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#d(t):super.update(t)}listen(t,e,o){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,o),()=>this.el.removeEventListener(t,r,o)))}listenOn(t,e,o,r){let i=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,i,r),()=>t.removeEventListener(e,i,r)))}async componentOnReady(){return await this.#r.promise,this}addController(t){this.M.push(t),!(F in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},o={...s,getAssetPath(r){let i=new URL(r,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(r,i){i.K=o,i.L=r,customElements.get(r)||customElements.define(r,i)}};return e(s.defaultAssetPath),o};var Cr=s=>typeof s=="object"&&s!=null?ge(s):s,wr=s=>typeof s=="object"&&s!=null?Ee(s):s;var Mt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Or=$(Mt);var Tr=d;var Sr=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var K=_e({defaultAssetPath:"https://jsdev.arcgis.com/6.0.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Lr,getAssetPath:Rr,setAssetPath:Ur}=K;K.t=void 0;K.o=void 0;K.c=void 0;K.r=void 0;export{Ls as a,N as b,q as c,ct as d,re as e,Rs as f,Us as g,Ae as h,k as i,us as j,fs as k,f as l,d as m,at as n,Ss as o,oe as p,Ps as q,Ns as r,ke as s,je as t,He as u,Ve as v,Tt as w,he as x,Je as y,y as z,$ as A,g as B,Fs as C,qs as D,ue as E,Gs as F,Ks as G,We as H,ho as I,Nt as J,$e as K,Cr as L,wr as M,Tr as N,Sr as O,K as P,Lr as Q,Rr as R};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import c from"./WPAZDJHU.js";import b from"./7ISSDO2T.js";import a from"./TIMYD2HM.js";import{c as I}from"./KV4ZZSNW.js";import{a as n}from"./5R4JJWGB.js";import{K as u,Q as g,h,j as o}from"./HHGKNVCH.js";export default $arcgis.t(([{a:c},{a:f,b:b},{c:w}])=>{var v=h`:host{display:block}.items-directly-using{display:flex;justify-content:space-between;align-items:center;padding-block-end:.75rem}.impacted-items-labels{display:flex;flex-direction:column}.impacted-items-title{font-weight:500}.impacted-items-access-count{font-size:var(--calcite-font-size--2)}.view-full-list{margin:.5rem 0}.items-list{max-block-size:250px;overflow-y:auto}calcite-block{--calcite-block-icon-start-color: var(--calcite-color-status-warning)}`,m=20,d=class extends u{constructor(){super(...arguments),this.messages=n({blocking:!0}),this.browserMessages=n({name:"portal-browser",blocking:!0}),this.deleteMessages=n({name:"portal-delete-items",blocking:!0}),this.userRequestId=0,this.itemGroups={},this.itemOwners={},this.sourceItem=null,this.relatedItems=[],this.showDependentItems=!1}static{this.properties={itemGroups:16,itemOwners:16,sourceItem:0,relatedItems:0,relatedItemsCount:9,showDependentItems:5,portal:0,user:0}}static{this.styles=[v,f]}willUpdate(e){(e.has("relatedItems")||e.has("portal")||e.has("user"))&&(this.itemGroups={},this.itemOwners={},this.loadGroupSharing(++this.userRequestId),this.loadItemOwners())}async loadItemOwners(){let{portal:e,relatedItems:s}=this;if(!e)return;let a=[...new Set(s.slice(0,m).map(t=>t.owner).filter(t=>!!t))],i=await Promise.all(a.map(async t=>[t,await c(t,e)]));this.itemOwners=Object.fromEntries(i)}async loadGroupSharing(e){let{portal:s,relatedItems:a}=this,i=this.user??s?.user;if(!s||!i?.username||!a.length)return;let t=await c(i.username,s);if(e!==this.userRequestId)return;let{result:r}=await w(s,t,a);e===this.userRequestId&&(this.itemGroups=r??{})}render(){let e=this.relatedItemsCount??this.relatedItems.length;if(!e&&!this.relatedItems.length)return null;let s=new Intl.NumberFormat(this.deleteMessages._t9nLocale),a=s.format(e),i=this.showDependentItems?this.deleteMessages.dependentItems:this.deleteMessages.impactedItems.title,t=this.showDependentItems?this.deleteMessages.itemsDependingOnThisItem:this.deleteMessages.deletingWillImpactOtherItems,r=this.portal&&this.sourceItem?`${I({portal:this.portal})}/item.html?id=${this.sourceItem.id}#usage`:void 0,p=()=>{r&&window.open(r,"_blank")};return o`<calcite-block .heading=${t.replace("{count}",a)} collapsible .label=${i} icon-start=exclamation-mark-triangle><div class="items-directly-using"><div class="impacted-items-labels"><span class="impacted-items-title">${i}</span>${!this.showDependentItems&&o`<span class="impacted-items-access-count">${this.deleteMessages.impactedItems.itemsYouHaveAccessTo.replace("{accessCount}",s.format(this.relatedItems.length)).replace("{totalCount}",a)}</span>`||""}</div><calcite-button appearance=transparent icon-end=launch @click=${p}>${this.deleteMessages.impactedItems["View usage"]}</calcite-button></div><div class="items-list"><calcite-list .label=${i}>${this.relatedItems.slice(0,m).map(l=>b({item:l,owner:this.itemOwners[l.owner],portal:this.portal,user:this.user,lang:this.messages._lang,modifiedLabel:this.browserMessages.filterDate.modified,access:{level:l.access,groupIds:l.id?this.itemGroups[l.id]:void 0}}))}</calcite-list>${this.relatedItems.length>m&&o`<calcite-button class="view-full-list" appearance=transparent icon-end=launch @click=${p}>${this.deleteMessages.impactedItems["View full list"]}</calcite-button>`||""}</div></calcite-block>`}};g("arcgis-portal-review-related-items",d);return d},a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import c from"./YCIFVZ4J.js";import b from"./G3WDR53S.js";import a from"./IOFXDIWC.js";import"./3RTST3I6.js";import"./VDXESPJK.js";import"./ULGME5RT.js";import"./DAAON2UO.js";import"./2XJX2JUO.js";import"./FN2QMDEW.js";import"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,{c:r}])=>{return r},"core/reactiveUtils","intl",a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import c from"./DHMNNIXZ.js";import b from"./XYMBRPC7.js";import"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as f}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{L as d,M as h,O as p,R as g,S as y,h as m,j as a}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
2
+ import c from"./TMR4BRFI.js";import b from"./TJWJ3LTU.js";import"./4VLEUN7I.js";import"./KV4ZZSNW.js";import"./FN2QMDEW.js";import{a as f}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{K as d,L as h,N as p,Q as g,R as y,h as m,j as a}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as v}from"./K2XSYDAP.js";import{t as y,u as m,y as h}from"./AICPYLWE.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
2
+ import{a as v}from"./YK6FCXWU.js";import{s as y,t as m,x as h}from"./HHGKNVCH.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import c from"./ZD6XJVGV.js";import b from"./G3WDR53S.js";import a from"./IOFXDIWC.js";import"./FN2QMDEW.js";import"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as y}from"./VDXESPJK.js";import a from"./PMRFXB4F.js";export default $arcgis.t(([{a:$,b:i}])=>{async function k(a,s,o,t,r){let l=a.portal?.portalHostname||t?.portalHostname||t?.restUrl?.replace("/sharing/rest",""),p=r?`https://www.arcgis.com/sharing/rest/portals/${s}`:`https://${l}/sharing/rest/portals/${s}`;if(!l&&!r)return null;let c=r?{disableIdentityLookup:!0,addTokenManually:!1}:{},e=await i({url:p,portal:t,options:c}),{urlKey:g,thumbnail:u,customBaseUrl:w}=e,m=`https://${g}.${w}/`,b=u?`${m}sharing/rest/portals/self/resources/${u}`:null,d="",f="";try{let n=await i({url:`${p}/resources/localizedOrgProperties`,portal:t,params:{start:1,num:100},options:c});if(n){let h=n[o]||n.default;d=h.name,f=h.description}}catch{}return{name:d||e.name,description:y(f||e.description),url:`${m}home/`,thumbnail:b}}async function H(a,s,o,t){let r=a.sourceJSON?.orgId??a.portal?.id??o?.id;return await $({requester:async()=>await k(a,r,s,o,t),key:"verified",id:r})}return H},a)
2
+ import{b as y}from"./VDXESPJK.js";import a from"./OQ2JULON.js";export default $arcgis.t(([{a:$,d:i}])=>{async function k(a,s,o,t,r){let l=a.portal?.portalHostname||t?.portalHostname||t?.restUrl?.replace("/sharing/rest",""),p=r?`https://www.arcgis.com/sharing/rest/portals/${s}`:`https://${l}/sharing/rest/portals/${s}`;if(!l&&!r)return null;let c=r?{disableIdentityLookup:!0,addTokenManually:!1}:{},e=await i({url:p,portal:t,options:c}),{urlKey:g,thumbnail:u,customBaseUrl:w}=e,m=`https://${g}.${w}/`,b=u?`${m}sharing/rest/portals/self/resources/${u}`:null,d="",f="";try{let n=await i({url:`${p}/resources/localizedOrgProperties`,portal:t,params:{start:1,num:100},options:c});if(n){let h=n[o]||n.default;d=h.name,f=h.description}}catch{}return{name:d||e.name,description:y(f||e.description),url:`${m}home/`,thumbnail:b}}async function H(a,s,o,t){let r=a.sourceJSON?.orgId??a.portal?.id??o?.id;return await $({requester:async()=>await k(a,r,s,o,t),key:"verified",id:r})}return H},a)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as k,b as D,c as _}from"./V6A6MKLU.js";import l from"./7LMZHJZG.js";import{a as C,c as U}from"./U3KMGSVH.js";import j from"./XYMBRPC7.js";import"./4KTRAA2J.js";import{a as T}from"./PKA745KL.js";import{a as w}from"./IN4JPZTY.js";import i from"./RQYNPDN3.js";import e from"./ROX3GKKA.js";import a from"./PMRFXB4F.js";import{f as b}from"./K75JTQPW.js";import{b as f}from"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as v}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as d,K as I,L as u,O as R,R as g,h as p,j as c,w as h}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([P,,,{a:$},{q:A},{f:y}])=>{var H=p`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,B=5e3,m=class extends u{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=v({blocking:!0}),this.primaryActionRef=d(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:i})=>{let s=f({portal:e,usePortalHostname:!this.user});return s?`${`${s}/home`}/item.html?id=${t}${i?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=B/1e3,this.arcgisPortalReplacementItemFetch=h()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=H}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=B/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return k(e)||D(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:i}=this,s=new P({id:e,portal:t});this.item=await s?.load();let n=await A(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),r=n.data?.relatedItems?.[0];this.replacementItemInRecycleBin=r?.inRecycleBin;let l=r?.id,a=!this.replacementItemInRecycleBin&&l?new P({id:l,portal:t}):null;await a?.load(),this.replacementItem=a,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!a&&n.data?.aggregations?.total?.count>0&&n.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:a||null}),this.replacementItem=a;let o=this.replacementItem?.owner??(s?.owner||null);this.itemOwnerName=o?T(await $(o,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=_(a),this.thumbnailUrl=U(t,a??this.item),this.supportsReplacement=!!a&&this.isItemRetired(s);let O=b(this.replacementItem,await y(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!O,this.replacementId=a?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>i()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:i}=this;return t?e.replacementUnavailable:i?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:i}=this;return t?e.retiredReplacementUnavailable:i?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:i,redirectCancelled:s}=this;return s?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${i}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:i}=this;return c`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??R} @error=${async()=>this.thumbnailUrl=C(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${i.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&c`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${i.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:i,replacementItem:s,supportsReplacement:n,canRedirect:r,redirectCancelled:l}=this;if(!(!i||!this.isItemRetired(i)))return c`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${w(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(n?s:i)}</div>${r&&!l&&c`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),r?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${r?void 0:"launch"} ${I(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};g("arcgis-portal-replacement-item-redirect",m);return m},"portal/PortalItem",a,e,i,j,l)
2
+ import{a as k,b as D,c as _}from"./V6A6MKLU.js";import l from"./NYOXMT6S.js";import{a as C,c as U}from"./F2HT5PVQ.js";import j from"./TJWJ3LTU.js";import"./4KTRAA2J.js";import{a as A}from"./PKA745KL.js";import{a as w}from"./SSCKCDXD.js";import i from"./TIMYD2HM.js";import e from"./TIPQ2ZWK.js";import a from"./OQ2JULON.js";import{f as b}from"./4VLEUN7I.js";import{b as f}from"./KV4ZZSNW.js";import"./FN2QMDEW.js";import{a as v}from"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import{I as d,J as I,K as u,N as R,Q as g,h as p,j as c,v as h}from"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export default $arcgis.t(([P,,,{a:$},{r:T},{f:y}])=>{var H=p`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,B=5e3,m=class extends u{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=v({blocking:!0}),this.primaryActionRef=d(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:i})=>{let s=f({portal:e,usePortalHostname:!this.user});return s?`${`${s}/home`}/item.html?id=${t}${i?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=B/1e3,this.arcgisPortalReplacementItemFetch=h()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=H}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=B/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return k(e)||D(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:i}=this,s=new P({id:e,portal:t});this.item=await s?.load();let n=await T(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),r=n.data?.relatedItems?.[0];this.replacementItemInRecycleBin=r?.inRecycleBin;let l=r?.id,a=!this.replacementItemInRecycleBin&&l?new P({id:l,portal:t}):null;await a?.load(),this.replacementItem=a,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!a&&n.data?.aggregations?.total?.count>0&&n.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:a||null}),this.replacementItem=a;let o=this.replacementItem?.owner??(s?.owner||null);this.itemOwnerName=o?A(await $(o,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=_(a),this.thumbnailUrl=U(t,a??this.item),this.supportsReplacement=!!a&&this.isItemRetired(s);let O=b(this.replacementItem,await y(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!O,this.replacementId=a?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>i()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:i}=this;return t?e.replacementUnavailable:i?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:i}=this;return t?e.retiredReplacementUnavailable:i?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:i,redirectCancelled:s}=this;return s?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${i}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:i}=this;return c`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??R} @error=${async()=>this.thumbnailUrl=C(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${i.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&c`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${i.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:i,replacementItem:s,supportsReplacement:n,canRedirect:r,redirectCancelled:l}=this;if(!(!i||!this.isItemRetired(i)))return c`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${w(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(n?s:i)}</div>${r&&!l&&c`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),r?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${r?void 0:"launch"} ${I(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};g("arcgis-portal-replacement-item-redirect",m);return m},"portal/PortalItem",a,e,i,j,l)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a}from"./22TDAUX4.js";import"./5R4JJWGB.js";import"./B3HV5JVN.js";import"./YK6FCXWU.js";import"./HHGKNVCH.js";import"./KHKREBVZ.js";import"./5PV2GUZW.js";export{a as ArcgisPortalBrowserSort};