@arcgis/ai-components 6.0.0-next.1 → 6.0.0-next.2

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 (353) hide show
  1. package/dist/agent-utils/BaseAgent.js +1 -1
  2. package/dist/agent-utils/FunctionAgent.js +1 -1
  3. package/dist/agent-utils/LLMAgent.js +1 -1
  4. package/dist/agent-utils/SkillAgent.js +1 -1
  5. package/dist/agent-utils/WorkflowAgent.js +1 -1
  6. package/dist/agent-utils/createSchema.js +1 -1
  7. package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
  8. package/dist/agent-utils/middlewares/middleware.js +1 -1
  9. package/dist/agent-utils/middlewares/trace.js +1 -1
  10. package/dist/agent-utils/middlewares/types.js +1 -1
  11. package/dist/agent-utils/tools/FunctionTool.js +1 -1
  12. package/dist/agent-utils/tools/MCPToolProvider.js +1 -1
  13. package/dist/agent-utils/tools/WebMCPToolProvider.js +1 -1
  14. package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
  15. package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
  16. package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
  17. package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
  18. package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
  19. package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
  20. package/dist/agents/agents/arcgisKnowledge/graph/arcgisKnowledgeGraph.js +1 -1
  21. package/dist/agents/agents/dataExploration/dataExplorationAgent.js +1 -1
  22. package/dist/agents/agents/dataExplorationGraph/graph/dataExplorationGraph.js +1 -1
  23. package/dist/agents/agents/help/helpAgent.js +1 -1
  24. package/dist/agents/agents/helpGraph/graph/helpGraph.js +1 -1
  25. package/dist/agents/agents/layerStyling/context/layerStylingContext.js +1 -1
  26. package/dist/agents/agents/layerStyling/graph/layerStylingGraph.js +1 -1
  27. package/dist/agents/agents/navigation/navigationAgent.js +1 -1
  28. package/dist/agents/agents/navigationGraph/graph/navigationGraph.js +1 -1
  29. package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
  30. package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
  31. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +1 -1
  32. package/dist/agents/tools/help/listFields/adapter.js +1 -1
  33. package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
  34. package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
  35. package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
  36. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
  37. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
  38. package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
  39. package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
  40. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
  41. package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
  42. package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
  43. package/dist/agents/tools/query/getStatistics/adapter.js +1 -1
  44. package/dist/agents/tools/query/getTopFeatures/adapter.js +1 -1
  45. package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
  46. package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
  47. package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
  48. package/dist/agents/tools/shared/resolveToolArtifact.js +1 -1
  49. package/dist/agents/tools/shared/types.js +1 -1
  50. package/dist/cdn/24KEZCPF.js +2 -0
  51. package/dist/cdn/{2UKFCF2J.js → 272R36XK.js} +2 -2
  52. package/dist/cdn/{FX4LV2S3.js → 2H32MDP2.js} +1 -1
  53. package/dist/cdn/{VAXH6RUQ.js → 2HNGMLFD.js} +2 -2
  54. package/dist/cdn/{24TK55FP.js → 2JD3G7IW.js} +2 -2
  55. package/dist/cdn/{P4CHI7W3.js → 2NOLMOEP.js} +2 -2
  56. package/dist/cdn/{ZU2FHVNK.js → 2OW3DCUT.js} +2 -2
  57. package/dist/cdn/2PGZDONH.js +2 -0
  58. package/dist/cdn/2WY5MPMY.js +2 -0
  59. package/dist/cdn/{2DWN3SKH.js → 3COVQI26.js} +2 -2
  60. package/dist/cdn/{VIJVRJHL.js → 3UVQLYUK.js} +2 -2
  61. package/dist/cdn/{BIEX4MVV.js → 5HNKH5OK.js} +2 -2
  62. package/dist/cdn/{46DT6BIG.js → 5INBG23U.js} +1 -1
  63. package/dist/cdn/{YJXRCO4T.js → 5LBUP33F.js} +2 -2
  64. package/dist/cdn/{UZLQALHY.js → 5PV2GUZW.js} +1 -1
  65. package/dist/cdn/{YBWRFVA6.js → 5SRRG7WG.js} +2 -2
  66. package/dist/cdn/{EEHDAYOG.js → 5XZ5VL42.js} +2 -2
  67. package/dist/cdn/{DI3VGUJY.js → 63OF33IL.js} +2 -2
  68. package/dist/cdn/{NHWT7CXX.js → 6ELWX4W5.js} +2 -2
  69. package/dist/cdn/{OKVLGJAG.js → 6J3J7VLW.js} +2 -2
  70. package/dist/cdn/{AOVJ34QE.js → 6QOSUG64.js} +2 -2
  71. package/dist/cdn/{GVFJHADC.js → 6UGT2UG5.js} +2 -2
  72. package/dist/cdn/{JEWJ4M25.js → 7APXFHDF.js} +3 -3
  73. package/dist/cdn/{QEGO4B2W.js → 7GDMXAF5.js} +2 -2
  74. package/dist/cdn/7JIXXYZR.js +2 -0
  75. package/dist/cdn/{X5ET73QZ.js → 7OQK2F7O.js} +2 -2
  76. package/dist/cdn/{KX6CZEVZ.js → 7XVIZ7HK.js} +2 -2
  77. package/dist/cdn/{FSLPYC4Y.js → A4ZVCRVF.js} +2 -2
  78. package/dist/cdn/{OVIQ5NSE.js → AGDGDULE.js} +2 -2
  79. package/dist/cdn/{TPULIO6I.js → AMA67DVI.js} +2 -2
  80. package/dist/cdn/AO42IPOX.js +2 -0
  81. package/dist/cdn/{UOKYHQNO.js → AOT3PM2Q.js} +2 -2
  82. package/dist/cdn/{EG5BMYZO.js → AQ7KG25Q.js} +2 -2
  83. package/dist/cdn/{6PK2UPG3.js → AWH4VDPD.js} +2 -2
  84. package/dist/cdn/AY2ZONWQ.js +2 -0
  85. package/dist/cdn/{JZPPP4QY.js → BMVPOFHU.js} +2 -2
  86. package/dist/cdn/BWUQRZPK.js +2 -0
  87. package/dist/cdn/{XWNZMKQF.js → C3VLDYS2.js} +2 -2
  88. package/dist/cdn/{PQ2DPOFM.js → C5Q6E7UC.js} +2 -2
  89. package/dist/cdn/{FDOMMK2M.js → CETIZ4IQ.js} +1 -1
  90. package/dist/cdn/{TENUVOFJ.js → COANVCKH.js} +2 -2
  91. package/dist/cdn/{2O52MJ3D.js → D7CRICBG.js} +2 -2
  92. package/dist/cdn/D7FEOAW3.js +2 -0
  93. package/dist/cdn/{PGUEODFA.js → DY6MO2CA.js} +2 -2
  94. package/dist/cdn/EKMCGN6R.js +2 -0
  95. package/dist/cdn/EUIURCPS.js +2 -0
  96. package/dist/cdn/{DGCWQYN3.js → FGQH46Z2.js} +2 -2
  97. package/dist/cdn/FIZMK7GS.js +1 -0
  98. package/dist/cdn/FONIQ7VF.js +2 -0
  99. package/dist/cdn/G3KILEGJ.js +2 -0
  100. package/dist/cdn/{FYZATVB3.js → G7MCIFV2.js} +2 -2
  101. package/dist/cdn/{SDWWUWAF.js → GGAXXX5X.js} +2 -2
  102. package/dist/cdn/GS5JDPZH.js +2 -0
  103. package/dist/cdn/{T3SCINN5.js → H4QWVTEZ.js} +2 -2
  104. package/dist/cdn/{ZSLHB6MF.js → H6J65TWL.js} +2 -2
  105. package/dist/cdn/{UHEYPSOR.js → HCPI2RJE.js} +2 -2
  106. package/dist/cdn/{PCAMBPOA.js → HJOWCZPL.js} +2 -2
  107. package/dist/cdn/{7HVIVV3O.js → HOMSK66Q.js} +2 -2
  108. package/dist/cdn/{5REENYPV.js → HTNKDDEV.js} +2 -2
  109. package/dist/cdn/{6WYVG3JI.js → HU527DML.js} +2 -2
  110. package/dist/cdn/I37ZJHTM.js +2 -0
  111. package/dist/cdn/{GHFOAS7T.js → I724KIFI.js} +2 -2
  112. package/dist/cdn/IH5P2PWJ.js +2 -0
  113. package/dist/cdn/{C67KQCPS.js → J3T5HB77.js} +2 -2
  114. package/dist/cdn/{EXLDRGUC.js → JCWFLYB4.js} +2 -2
  115. package/dist/cdn/{IHP25JWI.js → JSRNLNOE.js} +2 -2
  116. package/dist/cdn/{MPWEXYYB.js → KDA5VPLO.js} +2 -2
  117. package/dist/cdn/KRPPMEOF.js +2 -0
  118. package/dist/cdn/{GBFRJF4F.js → KURNYULZ.js} +2 -2
  119. package/dist/cdn/{ZKWXHSEQ.js → L46O52F7.js} +2 -2
  120. package/dist/cdn/{BBB5EJUB.js → L5OYOLWV.js} +3 -3
  121. package/dist/cdn/{FJV7CI7O.js → LDDP7NSY.js} +2 -2
  122. package/dist/cdn/{ZQTCPJUV.js → LGIXZLOP.js} +2 -2
  123. package/dist/cdn/{OGZFST2A.js → LMAIOLS2.js} +2 -2
  124. package/dist/cdn/{CFAC4FN3.js → LWEKPFV6.js} +2 -2
  125. package/dist/cdn/{L5IPMRHC.js → M52LKZN7.js} +2 -2
  126. package/dist/cdn/{AQF6BBWC.js → M5UMOOL2.js} +2 -2
  127. package/dist/cdn/{HWIM4KWF.js → MHXM37QI.js} +2 -2
  128. package/dist/cdn/{7X22QXJP.js → MR3R5YHQ.js} +2 -2
  129. package/dist/cdn/{M6JQGHCE.js → MUSLUFKI.js} +2 -2
  130. package/dist/cdn/MYLY2ABI.js +2 -0
  131. package/dist/cdn/{AMP43OT2.js → N2GN5WOI.js} +2 -2
  132. package/dist/cdn/{RE7MJTEF.js → NAVK5JJ2.js} +3 -3
  133. package/dist/cdn/NDSYDURO.js +2 -0
  134. package/dist/cdn/{7ZTYHZIN.js → NK2QRPS6.js} +2 -2
  135. package/dist/cdn/{GMZUN5SF.js → NYFL2F5L.js} +2 -2
  136. package/dist/cdn/{PGH7POKS.js → OKDXM5D4.js} +2 -2
  137. package/dist/cdn/{JFL5IWPK.js → OMUWBY75.js} +2 -2
  138. package/dist/cdn/{34O57OGV.js → OPQCY33W.js} +1 -1
  139. package/dist/cdn/{R74ZHFA6.js → OUMTV5H5.js} +1 -1
  140. package/dist/cdn/{5FDBJI24.js → OZDRETY2.js} +2 -2
  141. package/dist/cdn/{DYSPEU7W.js → PR4VMSKD.js} +1 -1
  142. package/dist/cdn/{HSMAXOOA.js → PXBS2FXE.js} +2 -2
  143. package/dist/cdn/{DJG6DBCU.js → Q7BJGEFH.js} +3 -3
  144. package/dist/cdn/{XEJFVUNQ.js → QAVDW7A7.js} +1 -1
  145. package/dist/cdn/{ONQ6JSBJ.js → QBZP6XOE.js} +1 -1
  146. package/dist/cdn/{OT5ECP4V.js → RFIN7KO6.js} +2 -2
  147. package/dist/cdn/RNJ7T5GF.js +2 -0
  148. package/dist/cdn/{BMPBJXD7.js → S6OUM5X2.js} +2 -2
  149. package/dist/cdn/SG6PAUVR.js +2 -0
  150. package/dist/cdn/{7MCFHVEH.js → SRXUC4QB.js} +2 -2
  151. package/dist/cdn/{A22375P3.js → SUMXIUIS.js} +2 -2
  152. package/dist/cdn/SW3D6QD4.js +2 -0
  153. package/dist/cdn/{GEFFWUB2.js → T2OYUOSO.js} +1 -1
  154. package/dist/cdn/T7LYQ56H.js +2 -0
  155. package/dist/cdn/{DZOQFEOB.js → TFXK2POV.js} +2 -2
  156. package/dist/cdn/{XQ3NBBQ3.js → TIQUULA4.js} +1 -1
  157. package/dist/cdn/{LCI5MEDN.js → TOUYGIGK.js} +2 -2
  158. package/dist/cdn/{RFDMNYTA.js → UJMM5QA4.js} +2 -2
  159. package/dist/cdn/{5LA77ZBW.js → UMTRLI63.js} +2 -2
  160. package/dist/cdn/{NPV4MEAZ.js → UP7RW5K2.js} +2 -2
  161. package/dist/cdn/{XCLICBG7.js → UR2S7L6Z.js} +2 -2
  162. package/dist/cdn/{CEKOEHB3.js → UWHRBGWN.js} +2 -2
  163. package/dist/cdn/{UQRBY7ID.js → UXDRYDOD.js} +2 -2
  164. package/dist/cdn/{JUPTVXLY.js → UZ7XFHYI.js} +2 -2
  165. package/dist/cdn/V66TS2BB.js +2 -0
  166. package/dist/cdn/{AAUVOBPS.js → VINKTQFR.js} +1 -1
  167. package/dist/cdn/{SWXUQFB6.js → VU7IOGNS.js} +2 -2
  168. package/dist/cdn/{HC5DJL2U.js → W2SIOY2B.js} +2 -2
  169. package/dist/cdn/{FBARYPZ7.js → W36IUEUB.js} +2 -2
  170. package/dist/cdn/{5TW2NFES.js → WEBAQIUT.js} +2 -2
  171. package/dist/cdn/{WSIZ2OTL.js → WHIWOYHN.js} +1 -1
  172. package/dist/cdn/WOL5YMJ2.js +2 -0
  173. package/dist/cdn/{66VWTARH.js → X3YFCWQZ.js} +2 -2
  174. package/dist/cdn/{ICBIUFK7.js → X4EQEKM7.js} +2 -2
  175. package/dist/cdn/{TJBU5BQK.js → XBWGOD6I.js} +2 -2
  176. package/dist/cdn/{6E6T6U7W.js → XGDXTTYW.js} +2 -2
  177. package/dist/cdn/{CDS2HGQY.js → XLHYQNAM.js} +2 -2
  178. package/dist/cdn/{NEV6OZN3.js → XMQJWPXI.js} +2 -2
  179. package/dist/cdn/{QT3B5K4R.js → XQUKC4YK.js} +2 -2
  180. package/dist/cdn/{JEBRN3EU.js → XSH4B7FP.js} +2 -2
  181. package/dist/cdn/{LK7ZIQW6.js → XVWSIDZV.js} +2 -2
  182. package/dist/cdn/{J6A4AS7E.js → XYMIFFBW.js} +2 -2
  183. package/dist/cdn/{MPQ2OZXN.js → Y3ZKMD47.js} +2 -2
  184. package/dist/cdn/{YPLPDUMB.js → YAANCUW2.js} +2 -2
  185. package/dist/cdn/{KY7M4WHO.js → YD5LVM7V.js} +2 -2
  186. package/dist/cdn/{AMURN3LO.js → YGI277SH.js} +2 -2
  187. package/dist/cdn/{YI6NIHNI.js → YGSDJ4V3.js} +2 -2
  188. package/dist/cdn/YJEARDAZ.js +2 -0
  189. package/dist/cdn/{XC3T3Z5R.js → YSEHJQ4L.js} +2 -2
  190. package/dist/cdn/Z44NI2YQ.js +2 -0
  191. package/dist/cdn/{74CVYM72.js → ZEDDYT24.js} +2 -2
  192. package/dist/cdn/{MD2FTKQT.js → ZROI63CW.js} +2 -2
  193. package/dist/cdn/{UYP5PH5E.js → ZUKM4DGB.js} +2 -2
  194. package/dist/cdn/ZVVNATCX.js +2 -0
  195. package/dist/cdn/agent-utils/BaseAgent.js +2 -2
  196. package/dist/cdn/agent-utils/FunctionAgent.js +2 -2
  197. package/dist/cdn/agent-utils/LLMAgent.js +2 -2
  198. package/dist/cdn/agent-utils/SkillAgent.js +2 -2
  199. package/dist/cdn/agent-utils/WorkflowAgent.js +2 -2
  200. package/dist/cdn/agent-utils/createSchema.js +2 -2
  201. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
  202. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
  203. package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
  204. package/dist/cdn/agent-utils/tools/FunctionTool.js +2 -2
  205. package/dist/cdn/agent-utils/tools/MCPToolProvider.js +2 -2
  206. package/dist/cdn/agent-utils/tools/WebMCPToolProvider.js +2 -2
  207. package/dist/cdn/agent-utils/workflows/ConditionalWorkflow.js +2 -2
  208. package/dist/cdn/agent-utils/workflows/LoopWorkflow.js +2 -2
  209. package/dist/cdn/agent-utils/workflows/ParallelWorkflow.js +2 -2
  210. package/dist/cdn/agent-utils/workflows/RouterWorkflow.js +2 -2
  211. package/dist/cdn/agent-utils/workflows/SequentialWorkflow.js +2 -2
  212. package/dist/cdn/agent-utils/workflows/SwitchWorkflow.js +2 -2
  213. package/dist/cdn/index.js +2 -2
  214. package/dist/cdn/orchestrator/embeddings/getEmbeddings.js +2 -2
  215. package/dist/cdn/orchestrator/models/chatModel.js +2 -2
  216. package/dist/cdn/orchestrator/models/prompts.js +2 -2
  217. package/dist/cdn/orchestrator/signals.js +2 -2
  218. package/dist/cdn/orchestrator/state/runtime.js +2 -2
  219. package/dist/chunks/BaseWorkflow.js +1 -1
  220. package/dist/chunks/SKILL.js +1 -1
  221. package/dist/chunks/SKILL2.js +1 -1
  222. package/dist/chunks/SKILL3.js +1 -1
  223. package/dist/chunks/SKILL4.js +1 -1
  224. package/dist/chunks/adapter.js +1 -1
  225. package/dist/chunks/adapter2.js +1 -1
  226. package/dist/chunks/aiFactory.js +1 -1
  227. package/dist/chunks/aiUtilityService.js +1 -1
  228. package/dist/chunks/arcgisToolRegistry.js +1 -1
  229. package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
  230. package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
  231. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
  232. package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
  233. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
  234. package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
  235. package/dist/chunks/converterUtils.js +1 -1
  236. package/dist/chunks/createSkillAgent.js +1 -1
  237. package/dist/chunks/data_explore_filter_prompt.js +1 -1
  238. package/dist/chunks/data_explore_query_prompt.js +1 -1
  239. package/dist/chunks/embeddings.worker.js +1 -1
  240. package/dist/chunks/fetchAgentContext.js +1 -1
  241. package/dist/chunks/fetchService.js +1 -1
  242. package/dist/chunks/fetchUtils.js +1 -1
  243. package/dist/chunks/fieldStatistics.js +1 -1
  244. package/dist/chunks/field_descriptions_prompt.js +1 -1
  245. package/dist/chunks/formatFeatureAttributes.js +1 -1
  246. package/dist/chunks/getPrompt.js +1 -1
  247. package/dist/chunks/graph.js +1 -1
  248. package/dist/chunks/helpState.js +1 -1
  249. package/dist/chunks/help_prompt.js +1 -1
  250. package/dist/chunks/intent_prompt.js +1 -1
  251. package/dist/chunks/layerQueryToolCalling.js +1 -1
  252. package/dist/chunks/layerStylingState.js +1 -1
  253. package/dist/chunks/layer_descriptions_prompt.js +1 -1
  254. package/dist/chunks/layer_styling_prompt.js +1 -1
  255. package/dist/chunks/localization.js +1 -1
  256. package/dist/chunks/mergeWhereClauses.js +1 -1
  257. package/dist/chunks/modelConfig.js +1 -1
  258. package/dist/chunks/modelPricing.js +1 -1
  259. package/dist/chunks/navigationState.js +1 -1
  260. package/dist/chunks/navigation_intent_prompt.js +1 -1
  261. package/dist/chunks/navigation_tool_prompt.js +1 -1
  262. package/dist/chunks/observationSnapshot.js +1 -1
  263. package/dist/chunks/reducers.js +1 -1
  264. package/dist/chunks/requireAgentServices.js +1 -1
  265. package/dist/chunks/resolveFieldNames.js +1 -1
  266. package/dist/chunks/resolveGeometryFilter.js +1 -1
  267. package/dist/chunks/runtime.js +2 -2
  268. package/dist/chunks/runtime2.js +1 -1
  269. package/dist/chunks/runtimeSpans.js +1 -1
  270. package/dist/chunks/schema.js +1 -1
  271. package/dist/chunks/slottableRequestUtils.js +1 -1
  272. package/dist/chunks/state.js +1 -1
  273. package/dist/chunks/summarize_query_response_prompt.js +1 -1
  274. package/dist/chunks/textFormatters.js +1 -1
  275. package/dist/chunks/toolCallResponse.js +1 -1
  276. package/dist/chunks/useT9n.js +1 -1
  277. package/dist/chunks/utils.js +1 -1
  278. package/dist/chunks/utils2.js +1 -1
  279. package/dist/chunks/utils3.js +1 -1
  280. package/dist/chunks/webmapSchema.js +1 -1
  281. package/dist/components/arcgis-assistant/customElement.js +1 -1
  282. package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
  283. package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
  284. package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
  285. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
  286. package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
  287. package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
  288. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
  289. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
  290. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
  291. package/dist/components/arcgis-assistant-message/customElement.js +1 -1
  292. package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
  293. package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
  294. package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
  295. package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
  296. package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
  297. package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
  298. package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
  299. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
  300. package/dist/components/arcgis-assistant-observation-inspector/customElement.js +1 -1
  301. package/dist/components/arcgis-assistant-observation-latency/customElement.js +1 -1
  302. package/dist/components/arcgis-assistant-observation-panel/customElement.js +1 -1
  303. package/dist/components/arcgis-assistant-observation-run/customElement.js +1 -1
  304. package/dist/components/arcgis-assistant-observation-usage/customElement.js +1 -1
  305. package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
  306. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
  307. package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
  308. package/dist/docs/api.json +1 -1
  309. package/dist/docs/docs.json +1 -1
  310. package/dist/docs/web-types.json +1 -1
  311. package/dist/index.js +1 -1
  312. package/dist/loader.js +1 -1
  313. package/dist/orchestrator/embeddings/cosineSimilarity.js +1 -1
  314. package/dist/orchestrator/embeddings/getEmbeddings.js +1 -1
  315. package/dist/orchestrator/embeddings/webmapEmbeddings.js +1 -1
  316. package/dist/orchestrator/models/chatModel.js +1 -1
  317. package/dist/orchestrator/models/prompts.js +1 -1
  318. package/dist/orchestrator/orchestrator/orchestrator.js +1 -1
  319. package/dist/orchestrator/orchestrator/orchestratorEvents.js +1 -1
  320. package/dist/orchestrator/signals.js +1 -1
  321. package/dist/orchestrator/state/runtime.js +1 -1
  322. package/dist/orchestrator/state/types.js +1 -1
  323. package/dist/orchestrator/types.js +1 -1
  324. package/dist/utils/index.js +1 -1
  325. package/package.json +5 -5
  326. package/dist/cdn/2UDDCWNW.js +0 -2
  327. package/dist/cdn/434TAA3J.js +0 -2
  328. package/dist/cdn/4KFTUBFL.js +0 -2
  329. package/dist/cdn/AO2G4EXA.js +0 -2
  330. package/dist/cdn/AWPLRVPS.js +0 -2
  331. package/dist/cdn/C76HLPKU.js +0 -2
  332. package/dist/cdn/CADNOKIK.js +0 -2
  333. package/dist/cdn/CHHC6YNW.js +0 -2
  334. package/dist/cdn/DBRBT54R.js +0 -2
  335. package/dist/cdn/DJKEGIQZ.js +0 -2
  336. package/dist/cdn/EGSD465U.js +0 -2
  337. package/dist/cdn/HLWG7OIR.js +0 -2
  338. package/dist/cdn/KKWCHNYQ.js +0 -2
  339. package/dist/cdn/M2G44RTS.js +0 -2
  340. package/dist/cdn/MB7SEHPZ.js +0 -2
  341. package/dist/cdn/MC2V5WT3.js +0 -2
  342. package/dist/cdn/MZFWD5CQ.js +0 -2
  343. package/dist/cdn/NMFEXE4D.js +0 -2
  344. package/dist/cdn/OYHYHALE.js +0 -2
  345. package/dist/cdn/QUZTFUWM.js +0 -1
  346. package/dist/cdn/RF6HWZMB.js +0 -2
  347. package/dist/cdn/RFPTOFM4.js +0 -2
  348. package/dist/cdn/RKURZ5T2.js +0 -2
  349. package/dist/cdn/SJ4UMNIS.js +0 -2
  350. package/dist/cdn/USPB2QBX.js +0 -2
  351. package/dist/cdn/V6EX4YCY.js +0 -2
  352. package/dist/cdn/VA4M72JC.js +0 -2
  353. package/dist/cdn/VQ67NANV.js +0 -2
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as U}from"./46DT6BIG.js";import{A as D,h as A,i as Q,j as G,k as J,r as Z,s as K,t as Y}from"./RE7MJTEF.js";var F=function(){return F=Object.assign||function(r){for(var t,a=1,s=arguments.length;a<s;a++){t=arguments[a];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},F.apply(this,arguments)},q={exports:{}},g={},X={exports:{}},S={};function ne(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function ke(e,r,t){}function Le(e,r,t){}var Ee=/javascript\s*\:/img;function Oe(e,r){return Ee.test(r)?"":r}S.whiteList=ne();S.getDefaultWhiteList=ne;S.onAttr=ke;S.onIgnoreAttr=Le;S.safeAttrValue=Oe;var _e={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,s;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,s=e.length;a<s;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},O=_e;function Ce(e,r){e=O.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,a=!1,s=0,i=0,l="";function n(){if(!a){var c=O.trim(e.slice(s,i)),u=c.indexOf(":");if(u!==-1){var d=O.trim(c.slice(0,u)),p=O.trim(c.slice(u+1));if(d){var h=r(s,l.length,d,p,c);h&&(l+=h+"; ")}}}s=i+1}for(;i<t;i++){var o=e[i];if(o==="/"&&e[i+1]==="*"){var f=e.indexOf("*/",i+2);if(f===-1)break;i=f+1,s=i+1,a=!1}else o==="("?a=!0:o===")"?a=!1:o===";"?a||n():o===`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as U}from"./5INBG23U.js";import{A as D,h as A,i as Q,j as G,k as J,r as Z,s as K,t as Y}from"./NAVK5JJ2.js";var F=function(){return F=Object.assign||function(r){for(var t,a=1,s=arguments.length;a<s;a++){t=arguments[a];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(r[i]=t[i])}return r},F.apply(this,arguments)},q={exports:{}},g={},X={exports:{}},S={};function ne(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function ke(e,r,t){}function Le(e,r,t){}var Ee=/javascript\s*\:/img;function Oe(e,r){return Ee.test(r)?"":r}S.whiteList=ne();S.getDefaultWhiteList=ne;S.onAttr=ke;S.onIgnoreAttr=Le;S.safeAttrValue=Oe;var _e={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,s;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,s=e.length;a<s;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},O=_e;function Ce(e,r){e=O.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,a=!1,s=0,i=0,l="";function n(){if(!a){var c=O.trim(e.slice(s,i)),u=c.indexOf(":");if(u!==-1){var d=O.trim(c.slice(0,u)),p=O.trim(c.slice(u+1));if(d){var h=r(s,l.length,d,p,c);h&&(l+=h+"; ")}}}s=i+1}for(;i<t;i++){var o=e[i];if(o==="/"&&e[i+1]==="*"){var f=e.indexOf("*/",i+2);if(f===-1)break;i=f+1,s=i+1,a=!1}else o==="("?a=!0:o===")"?a=!1:o===";"?a||n():o===`
3
3
  `&&n()}return O.trim(l)}var Ie=Ce,I=S,$e=Ie;function ee(e){return e==null}function Ve(e){var r={};for(var t in e)r[t]=e[t];return r}function oe(e){e=Ve(e||{}),e.whiteList=e.whiteList||I.whiteList,e.onAttr=e.onAttr||I.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||I.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||I.safeAttrValue,this.options=e}oe.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,s=t.onAttr,i=t.onIgnoreAttr,l=t.safeAttrValue,n=$e(e,function(o,f,c,u,d){var p=a[c],h=!1;if(p===!0?h=p:typeof p=="function"?h=p(u):p instanceof RegExp&&(h=p.test(u)),h!==!0&&(h=!1),u=l(c,u),!!u){var v={position:f,sourcePosition:o,source:d,isWhite:h};if(h){var m=s(c,u,v);return ee(m)?c+":"+u:m}else{var m=i(c,u,v);if(!ee(m))return m}}});return n};var Pe=oe;(function(e,r){var t=S,a=Pe;function s(l,n){var o=new a(n);return o.process(l)}r=e.exports=s,r.FilterCSS=a;for(var i in t)r[i]=t[i]})(X,X.exports);var H=X.exports,j={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,s;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,s=e.length;a<s;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var r=/\s|\n|\t/,t=r.exec(e);return t?t.index:-1}},Fe=H.FilterCSS,Ne=H.getDefaultWhiteList,N=j;function le(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var fe=new Fe;function Re(e,r,t){}function ze(e,r,t){}function We(e,r,t){}function Ge(e,r,t){}function ue(e){return e.replace(Ue,"&lt;").replace(qe,"&gt;")}function De(e,r,t,a){if(t=me(t),r==="href"||r==="src"){if(t=N.trim(t),t==="#")return"#";if(!(t.substr(0,7)==="http://"||t.substr(0,8)==="https://"||t.substr(0,7)==="mailto:"||t.substr(0,4)==="tel:"||t.substr(0,11)==="data:image/"||t.substr(0,6)==="ftp://"||t.substr(0,2)==="./"||t.substr(0,3)==="../"||t[0]==="#"||t[0]==="/"))return""}else if(r==="background"){if($.lastIndex=0,$.test(t))return""}else if(r==="style"){if(te.lastIndex=0,te.test(t)||(re.lastIndex=0,re.test(t)&&($.lastIndex=0,$.test(t))))return"";a!==!1&&(a=a||fe,t=a.process(t))}return t=ve(t),t}var Ue=/</g,qe=/>/g,Xe=/"/g,He=/&quot;/g,je=/&#([a-zA-Z0-9]*);?/gim,Me=/&colon;?/gim,Be=/&newline;?/gim,$=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,te=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,re=/u\s*r\s*l\s*\(.*/gi;function ce(e){return e.replace(Xe,"&quot;")}function ge(e){return e.replace(He,'"')}function de(e){return e.replace(je,function(t,a){return a[0]==="x"||a[0]==="X"?String.fromCharCode(parseInt(a.substr(1),16)):String.fromCharCode(parseInt(a,10))})}function pe(e){return e.replace(Me,":").replace(Be," ")}function he(e){for(var r="",t=0,a=e.length;t<a;t++)r+=e.charCodeAt(t)<32?" ":e.charAt(t);return N.trim(r)}function me(e){return e=ge(e),e=de(e),e=pe(e),e=he(e),e}function ve(e){return e=ce(e),e=ue(e),e}function Qe(){return""}function Je(e,r){typeof r!="function"&&(r=function(){});var t=!Array.isArray(e);function a(l){return t?!0:N.indexOf(e,l)!==-1}var s=[],i=!1;return{onIgnoreTag:function(l,n,o){if(a(l))if(o.isClosing){var f="[/removed]",c=o.position+f.length;return s.push([i!==!1?i:o.position,c]),i=!1,f}else return i||(i=o.position),"[removed]";else return r(l,n,o)},remove:function(l){var n="",o=0;return N.forEach(s,function(f){n+=l.slice(o,f[0]),o=f[1]}),n+=l.slice(o),n}}}function Ze(e){for(var r="",t=0;t<e.length;){var a=e.indexOf("<!--",t);if(a===-1){r+=e.slice(t);break}r+=e.slice(t,a);var s=e.indexOf("-->",a);if(s===-1)break;t=s+3}return r}function Ke(e){var r=e.split("");return r=r.filter(function(t){var a=t.charCodeAt(0);return a===127?!1:a<=31?a===10||a===13:!0}),r.join("")}g.whiteList=le();g.getDefaultWhiteList=le;g.onTag=Re;g.onIgnoreTag=ze;g.onTagAttr=We;g.onIgnoreTagAttr=Ge;g.safeAttrValue=De;g.escapeHtml=ue;g.escapeQuote=ce;g.unescapeQuote=ge;g.escapeHtmlEntities=de;g.escapeDangerHtml5Entities=pe;g.clearNonPrintableCharacter=he;g.friendlyAttrValue=me;g.escapeAttrValue=ve;g.onIgnoreTagStripAll=Qe;g.StripTagBody=Je;g.stripCommentTag=Ze;g.stripBlankChar=Ke;g.cssFilter=fe;g.getDefaultCSSWhiteList=Ne;var R={},x=j;function Ye(e){var r=x.spaceIndex(e),t;return r===-1?t=e.slice(1,-1):t=e.slice(1,r+1),t=x.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function et(e){return e.slice(0,2)==="</"}function tt(e,r,t){var a="",s=0,i=!1,l=!1,n=0,o=e.length,f="",c="";e:for(n=0;n<o;n++){var u=e.charAt(n);if(i===!1){if(u==="<"){i=n;continue}}else if(l===!1){if(u==="<"){a+=t(e.slice(s,n)),i=n,s=n;continue}if(u===">"){a+=t(e.slice(s,i)),c=e.slice(i,n+1),f=Ye(c),a+=r(i,a.length,f,c,et(c)),s=n+1,i=!1;continue}if(u==='"'||u==="'")for(var d=1,p=e.charAt(n-d);p.trim()===""||p==="=";){if(p==="="){l=u;continue e}p=e.charAt(n-++d)}}else if(u===l){l=!1;continue}}return s<e.length&&(a+=t(e.substr(s))),a}var rt=/[^a-zA-Z0-9\\_:.-]/gim;function at(e,r){var t=0,a=0,s=[],i=!1,l=e.length;function n(d,p){if(d=x.trim(d),d=d.replace(rt,"").toLowerCase(),!(d.length<1)){var h=r(d,p||"");h&&s.push(h)}}for(var o=0;o<l;o++){var f=e.charAt(o),c,u;if(i===!1&&f==="="){i=e.slice(t,o),t=o+1,a=e.charAt(t)==='"'||e.charAt(t)==="'"?t:st(e,o+1);continue}if(i!==!1&&o===a){if(u=e.indexOf(f,o+1),u===-1)break;c=x.trim(e.slice(a+1,u)),n(i,c),i=!1,o=u,t=o+1;continue}if(/\s|\n|\t/.test(f))if(e=e.replace(/\s|\n|\t/g," "),i===!1)if(u=it(e,o),u===-1){c=x.trim(e.slice(t,o)),n(c),i=!1,t=o+1;continue}else{o=u-1;continue}else if(u=nt(e,o-1),u===-1){c=x.trim(e.slice(t,o)),c=ae(c),n(i,c),i=!1,t=o+1;continue}else continue}return t<e.length&&(i===!1?n(e.slice(t)):n(i,ae(x.trim(e.slice(t))))),x.trim(s.join(" "))}function it(e,r){for(;r<e.length;r++){var t=e[r];if(t!==" ")return t==="="?r:-1}}function st(e,r){for(;r<e.length;r++){var t=e[r];if(t!==" ")return t==="'"||t==='"'?r:-1}}function nt(e,r){for(;r>0;r--){var t=e[r];if(t!==" ")return t==="="?r:-1}}function ot(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function ae(e){return ot(e)?e.substr(1,e.length-2):e}R.parseTag=tt;R.parseAttr=at;var lt=H.FilterCSS,b=g,ye=R,ft=ye.parseTag,ut=ye.parseAttr,P=j;function V(e){return e==null}function ct(e){var r=P.spaceIndex(e);if(r===-1)return{html:"",closing:e[e.length-2]==="/"};e=P.trim(e.slice(r+1,-1));var t=e[e.length-1]==="/";return t&&(e=P.trim(e.slice(0,-1))),{html:e,closing:t}}function gt(e){var r={};for(var t in e)r[t]=e[t];return r}function dt(e){var r={};for(var t in e)Array.isArray(e[t])?r[t.toLowerCase()]=e[t].map(function(a){return a.toLowerCase()}):r[t.toLowerCase()]=e[t];return r}function be(e){e=gt(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=b.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=dt(e.whiteList||e.allowList):e.whiteList=b.whiteList,e.onTag=e.onTag||b.onTag,e.onTagAttr=e.onTagAttr||b.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||b.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||b.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||b.safeAttrValue,e.escapeHtml=e.escapeHtml||b.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new lt(e.css))}be.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,s=t.onTag,i=t.onIgnoreTag,l=t.onTagAttr,n=t.onIgnoreTagAttr,o=t.safeAttrValue,f=t.escapeHtml,c=r.cssFilter;t.stripBlankChar&&(e=b.stripBlankChar(e)),t.allowCommentTag||(e=b.stripCommentTag(e));var u=!1;t.stripIgnoreTagBody&&(u=b.StripTagBody(t.stripIgnoreTagBody,i),i=u.onIgnoreTag);var d=ft(e,function(p,h,v,m,Se){var C={sourcePosition:p,position:h,isClosing:Se,isWhite:Object.prototype.hasOwnProperty.call(a,v)},L=s(v,m,C);if(!V(L))return L;if(C.isWhite){if(C.isClosing)return"</"+v+">";var M=ct(m),Te=a[v],B=ut(M.html,function(T,k){var W=P.indexOf(Te,T)!==-1,E=l(v,T,k,W);return V(E)?W?(k=o(v,T,k,c),k?T+'="'+k+'"':T):(E=n(v,T,k,W),V(E)?void 0:E):E});return m="<"+v,B&&(m+=" "+B),M.closing&&(m+=" /"),m+=">",m}else return L=i(v,m,C),V(L)?f(m):L},f);return u&&(d=u.remove(d)),d};var pt=be;(function(e,r){var t=g,a=R,s=pt;function i(n,o){var f=new s(o);return f.process(n)}r=e.exports=i,r.filterXSS=i,r.FilterXSS=s,(function(){for(var n in t)r[n]=t[n];for(var o in a)r[o]=a[o]})();function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(q,q.exports);var w=q.exports,ht=function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},mt=["align","alink","alt","bgcolor","border","cellpadding","cellspacing","color","cols","colspan","coords","d","dir","face","height","hspace","ismap","lang","marginheight","marginwidth","multiple","nohref","noresize","noshade","nowrap","ref","rel","rev","rows","rowspan","scrolling","shape","span","summary","tabindex","title","usemap","valign","value","vlink","vspace","width"],y=["color","display","fill-opacity","font-family","font-size","font-style","font-weight","opacity","shape-rendering","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-rendering","transform","visibility"],vt=["cx","cy","r"],yt=["cx","cy","rx","ry"],bt=["x1","x2","y1","y2"],ie=["points"],wt=["rx","ry","x","y"],se=["dx","dy","x","y"],we=(function(){function e(r,t){var a=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],animate:[],animatetransform:[],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],circle:vt.concat(y),clippath:[],code:["style"],dd:["style"],defs:[],del:["style"],details:["open","style"],div:["align","aria-hidden","aria-label","style"],dl:["style"],dt:["style"],ellipse:yt.concat(y),em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],g:y.slice(),h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],image:[],img:["alt","border","height","src","style","width"],li:[],line:bt.concat(y),lineargradient:[],main:["style"],mark:["style"],marker:[],mask:[],nav:["style"],ol:[],p:["style"],path:["d"].concat(y),pattern:[],polygon:ie.concat(y),polyline:ie.concat(y),pre:["style"],radialgradient:[],rect:wt.concat(y),section:["style"],source:["media","src","type"],span:["aria-hidden","aria-label","style"],stop:["offset","stop-color","stop-opacity"],strong:[],sub:["style"],summary:["style"],sup:["style"],svg:["height","preserveaspectratio","viewbox","width","xmlns"].concat(y),switch:[],symbol:[],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],text:se.concat(y),textpath:[],time:["style"],tspan:se.concat(y),u:[],ul:[],use:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=F(F({},w.getDefaultCSSWhiteList()),{"align-items":!0,"align-self":!0,flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,float:!0,gap:!0,grid:!0,"grid-area":!0,"grid-auto-columns":!0,"grid-auto-flow":!0,"grid-auto-rows":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-start":!0,"grid-template":!0,"grid-template-areas":!0,"grid-template-columns":!0,"grid-template-rows":!0,"justify-content":!0,"justify-items":!0,"justify-self":!0,"line-height":!0,overflow:!0,"row-gap":!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope","clickmobile","com.salesforce.fieldservice"],this.arcgisFilterOptions={allowCommentTag:!0,onTagAttr:function(i,l,n){if(i==="svg"){if(l==="viewbox")return'viewBox="'.concat(w.escapeAttrValue(n),'"');if(l==="preserveaspectratio")return'preserveAspectRatio="'.concat(w.escapeAttrValue(n),'"')}if(mt.indexOf(l)>-1)return"".concat(l,'="').concat(w.escapeAttrValue(n),'"')},safeAttrValue:function(i,l,n,o){return i==="a"&&l==="href"||(i==="img"||i==="source")&&l==="src"?a.sanitizeUrl(n):w.safeAttrValue(i,l,n,o)}},this._entityMap={"&":"&#x38;","<":"&#x3C;",">":"&#x3E;",'"':"&#x22;","'":"&#x27;","/":"&#x2F;"};var s;r&&!t?s=r:r&&t?(s=Object.create(this.arcgisFilterOptions),s.css={whiteList:this.arcgisCSSWhiteList},Object.keys(r).forEach(function(i){if(i==="whiteList")s.whiteList=a._extendObjectOfArrays([a.arcgisWhiteList,r.whiteList||{}]);else if(i==="css"){var l=r.css.whiteList;l!=null&&r.css instanceof Object&&Object.keys(l).forEach(function(n){return s.css.whiteList[n]=l[n]})}else s[i]=r[i]})):(s=Object.create(this.arcgisFilterOptions),s.whiteList=this.arcgisWhiteList,s.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=s,this._xssFilter=new w.FilterXSS(s)}return e.prototype.sanitize=function(r,t){switch(t===void 0&&(t={}),typeof r){case"number":return isNaN(r)||!isFinite(r)?null:r;case"boolean":return r;case"string":return this._xssFilter.process(r);case"object":return this._iterateOverObject(r,t);default:return t.allowUndefined&&typeof r>"u"?void 0:null}},e.prototype.sanitizeUrl=function(r,t){var a=(t??{}).isProtocolRequired,s=a===void 0?!0:a,i=this._trim(r.substring(0,r.indexOf(":"))),l=r==="/",n=/^#/.test(r),o=i&&this.allowedProtocols.indexOf(i.toLowerCase())>-1;return l||n||o?w.escapeAttrValue(r):!i&&!s?w.escapeAttrValue("https://".concat(r)):""},e.prototype.sanitizeHTMLAttribute=function(r,t,a,s){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(r,t,a,s):w.safeAttrValue(r,t,a,s)},e.prototype.validate=function(r,t){t===void 0&&(t={});var a=this.sanitize(r,t);return{isValid:r===a,sanitized:a}},e.prototype.encodeHTML=function(r){var t=this;return String(r).replace(/[&<>"'\/]/g,function(a){return t._entityMap[a]})},e.prototype.encodeAttrValue=function(r){var t=/^[a-zA-Z0-9]$/;return String(r).replace(/[\x00-\xFF]/g,function(a,s){return t.test(a)?a:"&#x".concat(Number(r.charCodeAt(s)).toString(16),";")})},e.prototype._extendObjectOfArrays=function(r){var t={};return r.forEach(function(a){Object.keys(a).forEach(function(s){Array.isArray(a[s])&&Array.isArray(t[s])?t[s]=t[s].concat(a[s]):t[s]=a[s]})}),t},e.prototype._iterateOverObject=function(r,t){var a=this;t===void 0&&(t={});try{var s=!1,i=void 0;if(Array.isArray(r))i=r.reduce(function(n,o){var f=a.validate(o,t);return f.isValid?n.concat([o]):(s=!0,n.concat([f.sanitized]))},[]);else if(ht(r)){var l=Object.keys(r);i=l.reduce(function(n,o){var f=r[o],c=a.validate(f,t);return c.isValid?n[o]=f:(s=!0,n[o]=c.sanitized),n},{})}else return t.allowUndefined&&typeof r>"u"?void 0:null;return s?i:r}catch{return null}},e.prototype._trim=function(r){return String.prototype.trim?r.trim():r.replace(/(^\s*)|(\s*$)/g,"")},e})();var _=class extends Y{constructor(r){if(super(r),this.it=G,r.type!==Z.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===G||r==null)return this._t=void 0,this.it=r;if(r===Q)return r;if(typeof r!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;let t=[r];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};_.directiveName="unsafeHTML",_.resultType=1;var Ae=K(_);U.use({gfm:!0,breaks:!0,async:!1});var At=new we({whiteList:{ol:["start"],thead:[],code:["class"]}},!0);function xe(e,r){let t=e.indexOf("{",r),a=e.indexOf("[",r);return t===-1?a:a===-1?t:Math.min(t,a)}function xt(e){if(e.trimStart().startsWith("```"))return null;for(let r=xe(e,0);r!==-1;r=xe(e,r+1)){let t=0,a=0;for(let s=r;s<e.length;s++){let i=e[s];if(i==="{"?t++:i==="}"?t--:i==="["?a++:i==="]"&&a--,t<0||a<0)break;if(t===0&&a===0&&s>r)return e.slice(r,s+1)}}return null}function Rt(e){if(!e)return"";let r=e,t=xt(e);if(t)try{let s=JSON.parse(t),i=`
4
4
 
5
5
  \`\`\`json
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./UZLQALHY.js";var e=`You are a knowledgeable GIS expert.
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import"./5PV2GUZW.js";var e=`You are a knowledgeable GIS expert.
3
3
 
4
4
  You are given a Feature Service description and title.
5
5
 
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a}from"./H6J65TWL.js";import"./QBZP6XOE.js";import"./GS5JDPZH.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export{a as goToLayerTool};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ var e=async(a,s)=>{let{dispatchCustomEvent:t}=await import("./5HNKH5OK.js");await t("trace_message",a,s)},n=async(a,s)=>{let{dispatchCustomEvent:t}=await import("./5HNKH5OK.js");await t("graph_ux_suggestion",a,s)};export{e as a,n as b};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as o}from"./FDOMMK2M.js";import{a as r}from"./RFPTOFM4.js";import{Ga as a}from"./FSLPYC4Y.js";var f=(l,i)=>{let t=Array.from(l.values()).find(({layerItem:e})=>e.title?.toLowerCase().includes(i.toLowerCase()));if(!t){let e=Array.from(l.values()).map(y=>y.layerItem.title).join(", ");return`Could not find a layer matching "${i}". Available layers: ${e}`}let s=Array.from(t.fieldRegistry.values()),n=s.map(e=>`- **${e.alias||e.name}** (\`${e.name}\`, ${e.type})${e.description?`: ${e.description}`:""}`).join(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as o}from"./CETIZ4IQ.js";import{a as r}from"./GS5JDPZH.js";import{Ga as a}from"./A4ZVCRVF.js";var f=(l,i)=>{let t=Array.from(l.values()).find(({layerItem:e})=>e.title?.toLowerCase().includes(i.toLowerCase()));if(!t){let e=Array.from(l.values()).map(y=>y.layerItem.title).join(", ");return`Could not find a layer matching "${i}". Available layers: ${e}`}let s=Array.from(t.fieldRegistry.values()),n=s.map(e=>`- **${e.alias||e.name}** (\`${e.name}\`, ${e.type})${e.description?`: ${e.description}`:""}`).join(`
3
3
  `);return`**${t.layerItem.title}** has ${s.length} field(s):
4
4
 
5
5
  ${n}`},m=({layerTitle:l},i)=>{let t=o(i,"layersAndFieldsRegistry");return f(t,l)},u=a(m,{name:"listLayerFields",description:"Lists all fields for a given layer by title. Use ONLY when the user explicitly asks to see fields, columns, or attributes of a specific named layer. Do NOT call this tool for general help questions, capability overviews, or layer listing.",schema:r.object({layerTitle:r.string().describe("The title or partial title of the layer to list fields for.")})});export{u as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{fa as c}from"./2UKFCF2J.js";function f(e,s,t){return{...e,status:s,summary:t}}function g(e){let s=Object.entries(e).filter(([t,n])=>t!=="agentExecutionContext"&&t!=="outputMessage"&&t!=="summary"&&t!=="status"&&n!==void 0);if(s.length!==0)try{return JSON.stringify(Object.fromEntries(s),null,2)}catch{return}}function m(e,s,t=[]){let n=s.safeParse(e);if(n.success){let u={...n.data},r=g(u),a=r??"Agent produced structured output.",o=r??u.outputMessage,i={...u,...o?{outputMessage:o}:{},agentExecutionContext:{messages:[...t,new c(typeof o=="string"&&o.trim()?o:a)]}};return f(i,"success",a)}else throw new Error(`Agent output schema validation failed: ${n.error.message}`)}function l(e,s){let t={outputMessage:e.outputMessage};if(s){let n=s.shape,u=e;for(let r of Object.keys(n??{}))r in e&&(t[r]=u[r])}return t}export{f as a,m as b,l as c};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{fa as c}from"./272R36XK.js";function f(e,s,t){return{...e,status:s,summary:t}}function g(e){let s=Object.entries(e).filter(([t,n])=>t!=="agentExecutionContext"&&t!=="outputMessage"&&t!=="summary"&&t!=="status"&&n!==void 0);if(s.length!==0)try{return JSON.stringify(Object.fromEntries(s),null,2)}catch{return}}function m(e,s,t=[]){let n=s.safeParse(e);if(n.success){let u={...n.data},r=g(u),a=r??"Agent produced structured output.",o=r??u.outputMessage,i={...u,...o?{outputMessage:o}:{},agentExecutionContext:{messages:[...t,new c(typeof o=="string"&&o.trim()?o:a)]}};return f(i,"success",a)}else throw new Error(`Agent output schema validation failed: ${n.error.message}`)}function l(e,s){let t={outputMessage:e.outputMessage};if(s){let n=s.shape,u=e;for(let r of Object.keys(n??{}))r in e&&(t[r]=u[r])}return t}export{f as a,m as b,l as c};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{_a as a}from"./2UKFCF2J.js";import"./UZLQALHY.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).",`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{_a as a}from"./272R36XK.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
 
@@ -1,4 +1,4 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  function U(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var A=U();function ke(r){A=r}var T={exec:()=>null};function P(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),n=e[s];return n||(n=r(s),e[s]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(b.caret,"$1"),t=t.replace(n,a),s},getRegex:()=>new RegExp(t,e)};return s}var ze=((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}));/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:P(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:P(r=>new RegExp(`^ {0,${r}}((?:-[ ]*){3,}|(?:_[ ]*){3,}|(?:\\*[ ]*){3,})(?:\\n+|$)`)),fencesBeginRegex:P(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:P(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:P(r=>new RegExp(`^ {0,${r}}(?:</?(?:${Z})(?: +|$|/?>)|<(?:script|pre|style|textarea|!--))`,"i")),blockquoteBeginRegex:P(r=>new RegExp(`^ {0,${r}}>`))},Ae=/^(?:[ \t]*(?:\n|$))+/,_e=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Pe=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,q=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Le=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,W=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,fe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |fences|blockquote|heading|hr|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,de=u(fe).replace(/bull/g,W).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(),Ie=u(fe).replace(/bull/g,W).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(),J=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Ee=/^[^\n]+/,K=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Ce=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",K).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Be=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,W).getRegex(),Z="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",V=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,ve=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-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",V).replace("tag",Z).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),xe=r=>u(J).replace("hr",q).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Z).getRegex(),qe=xe(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Ze=xe(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),De=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Ze).getRegex(),Y={blockquote:De,code:_e,def:Ce,fences:Pe,heading:Le,hr:q,html:ve,lheading:de,list:Be,newline:Ae,paragraph:qe,table:T,text:Ee},ne=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",q).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","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Z).getRegex(),Qe={...Y,lheading:Ie,table:ne,paragraph:u(J).replace("hr",q).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ne).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",Z).getRegex()},Oe={...Y,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",V).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:T,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(J).replace("hr",q).replace("heading",` *#{1,6} *[^
3
3
  ]`).replace("lheading",de).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Me=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,je=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,be=/^( {2,}|\\)\n(?!\s*$)[ \t]*/,Ne=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,y=/[\p{P}\p{S}]/u,L=/[\s\p{P}\p{S}]/u,D=/[^\s\p{P}\p{S}]/u,He=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,L).getRegex(),Ge=/[\p{Pi}\p{Ps}"']/u,me=/(?!~)[\p{P}\p{S}]/u,Fe=/(?!~)[\s\p{P}\p{S}]/u,Xe=/(?:[^\s\p{P}\p{S}]|~)/u,Ue=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",ze?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),we=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,We=u(we,"u").replace(/punct/g,y).getRegex(),Je=u(we,"u").replace(/punct/g,me).getRegex(),Ke=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ve=u(Ke,"u").replace(/openQuote/g,Ge).replace(/punct/g,y).getRegex(),Se="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Ye=u(Se,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,L).replace(/punct/g,y).getRegex(),et=u(Se,"gu").replace(/notPunctSpace/g,Xe).replace(/punctSpace/g,Fe).replace(/punct/g,me).getRegex(),tt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",rt=u(tt,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,L).replace(/punct/g,y).getRegex(),nt=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,L).replace(/punct/g,y).getRegex(),st="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",it=u(st,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,L).replace(/punct/g,y).getRegex(),lt=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,y).getRegex(),at="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",ot=u(at,"gu").replace(/notPunctSpace/g,D).replace(/punctSpace/g,L).replace(/punct/g,y).getRegex(),ct=u(/\\(punct)/,"gu").replace(/punct/g,y).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(),ht=u(V).replace("(?:-->|$)","-->").getRegex(),ut=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",ht).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),$e=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,O=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",$e).getRegex(),gt=u(/^!?\[(label)\]\([ \t\n]*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?[ \t\n]*\)/).replace("label",O).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),kt=u(/^!?\[(label)\]\[(ref)\]/).replace("label",O).replace("ref",K).getRegex(),ft=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",K).getRegex(),se=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\]){1,999}/,dt=u(/(?:[^\[\]\\`]*(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\]))){0,999}?[^\[\]\\`]*?/).replace("brackets",$e).getRegex(),xt=u("reflink|nolink(?!\\()","g").replace("reflink",u(/^!?\[(label)\]\[(ref)\]/).replace("label",dt).replace("ref",se).getRegex()).replace("nolink",u(/^!?\[(ref)\](?:\[\])?/).replace("ref",se).getRegex()).getRegex(),ie=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,bt=/[A-Za-z0-9._+-]+@[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/,mt=u(/(?:mailto:email|xmpp:email(?:\/[A-Za-z0-9@.]+)?)/).replace(/email/g,bt).getRegex(),ee={_backpedal:T,anyPunctuation:ct,autolink:pt,blockSkip:Ue,br:be,code:je,del:T,delLDelim:T,delRDelim:T,emStrongLDelim:We,emStrongRDelimAst:Ye,emStrongRDelimUnd:nt,escape:Me,link:gt,nolink:ft,punctuation:He,reflink:kt,reflinkSearch:xt,tag:ut,text:Ne,url:T},wt={...ee,emStrongLDelim:Ve,emStrongRDelimAst:rt,emStrongRDelimUnd:it,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",O).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",O).getRegex()},G={...ee,emStrongRDelimAst:et,emStrongLDelim:Je,delLDelim:lt,delRDelim:ot,url:u(/^emailProtocol|^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("emailProtocol",mt).replace("protocol",ie).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",ie).replace(/emailProtocol/g,/(?:mailto|xmpp):/).getRegex()},St={...G,br:u(be).replace("{2,}","*").getRegex(),text:u(G.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Q={normal:Y,gfm:Qe,pedantic:Oe},B={normal:ee,gfm:G,breaks:St,pedantic:wt},$t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},le=r=>$t[r];function w(r,e){if(e){if(b.escapeTest.test(r))return r.replace(b.escapeReplace,le)}else if(b.escapeTestNoEncode.test(r))return r.replace(b.escapeReplaceNoEncode,le);return r}function yt(r){return r.replace(b.numericCharacterReference,(e,t,s)=>{let n=t===void 0?Number.parseInt(s,16):Number.parseInt(t,10);return n===0||n>1114111||n>=55296&&n<=57343?"\uFFFD":String.fromCodePoint(n)})}function ae(r){try{r=encodeURI(r).replace(b.percentDecode,"%")}catch{return null}return r}function oe(r,e){let t=r.replace(b.findPipe,(i,a,l)=>{let c=!1,o=a;for(;--o>=0&&l[o]==="\\";)c=!c;return c?"|":" |"}),s=t.split(b.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(b.slashPipe,"|");return s}function R(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s;){let i=r.charAt(s-n-1);if(i===e&&!t)n++;else if(i!==e&&t)n++;else break}return r.slice(0,s-n)}function ce(r){let e=r.split(`
4
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(`
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as p,c}from"./AAUVOBPS.js";import{C as b,g,h as l,x as u}from"./RE7MJTEF.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var m=g`:host{display:block;min-width:0}h3{margin:0 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-relative-base);font-weight:var(--calcite-font-weight-semibold)}.token-table{overflow-x:auto}calcite-table{font-variant-numeric:tabular-nums}.pricing{margin:var(--calcite-spacing-sm) 0 0;color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);overflow-wrap:anywhere}`,v=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:6});function n(r){return r===void 0?"Unavailable":v.format(r)}var s=class extends u{constructor(){super(...arguments),this.aggregate=!1,this.pricing=p}static{this.properties={usage:0,aggregate:5,pricing:0}}static{this.styles=m}render(){let d=this.usage;if(!d)return null;let{tokens:t,cost:e,rates:i,uncached:o}=d,h=[{group:"Input",groupRows:4,label:"Non-cached input",tokens:o===void 0?"Not reported":Number.isFinite(o)&&o>=0?o.toLocaleString():"Invalid usage",rate:n(i?.input),cost:c(e?.input)},{label:"Cache reads",tokens:t.cacheRead?.toLocaleString()??"Not reported",rate:n(i?.cachedInput),cost:t.cacheRead===void 0?"Not reported":c(e?.cachedInput)},{label:"Cache writes",tokens:t.cacheWrite?.toLocaleString()??"Not reported",rate:n(i?.cacheWrite),cost:t.cacheWrite===void 0?"Not reported":c(e?.cacheWrite)},{label:"Input (total)",tokens:t.input?.toLocaleString()??"Unavailable",rate:"-",cost:c(e?e.input+e.cachedInput+e.cacheWrite:void 0)},{group:"Output",groupRows:2,label:"Reasoning (within output)",tokens:t.reasoning?.toLocaleString()??"Not reported",rate:"-",cost:"Included in output"},{label:"Output (total)",tokens:t.output?.toLocaleString()??"Unavailable",rate:n(i?.output),cost:c(e?.output)}];return l`<section aria-label=Usage><h3>Usage</h3><div class="token-table"><calcite-table aria-label="Token usage and estimated cost (USD)" caption="Token usage and estimated cost (USD)" scale=s interaction-mode=static bordered><calcite-table-row slot=table-header><calcite-table-header heading=Category col-span=2></calcite-table-header><calcite-table-header heading=Tokens alignment=end></calcite-table-header>${this.aggregate?null:l`<calcite-table-header heading="Rate / 1M" alignment=end></calcite-table-header>`}<calcite-table-header heading="Est. cost" alignment=end></calcite-table-header></calcite-table-row>${h.map(a=>l`<calcite-table-row>${a.group?l`<calcite-table-header .heading=${a.group} .rowSpan=${a.groupRows}></calcite-table-header>`:null}<calcite-table-header .heading=${a.label}></calcite-table-header><calcite-table-cell alignment=end>${a.tokens}</calcite-table-cell>${this.aggregate?null:l`<calcite-table-cell alignment=end>${a.rate}</calcite-table-cell>`}<calcite-table-cell alignment=end>${a.cost}</calcite-table-cell></calcite-table-row>`)}<calcite-table-row slot=table-footer><calcite-table-header heading=Total col-span=2></calcite-table-header><calcite-table-cell alignment=end>${t.total?.toLocaleString()??"Unavailable"}</calcite-table-cell>${this.aggregate?null:l`<calcite-table-cell alignment=end>-</calcite-table-cell>`}<calcite-table-cell alignment=end>${c(e?.total)}</calcite-table-cell></calcite-table-row></calcite-table></div><p class="pricing">Rates last updated: ${this.pricing.updatedAt}</p></section>`}};b("arcgis-assistant-observation-usage",s);export{s as ArcgisAssistantObservationUsage};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as p,c}from"./VINKTQFR.js";import{C as b,g,h as l,x as u}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var m=g`:host{display:block;min-width:0}h3{margin:0 0 var(--calcite-spacing-sm);font-size:var(--calcite-font-size-relative-base);font-weight:var(--calcite-font-weight-semibold)}.token-table{overflow-x:auto}calcite-table{font-variant-numeric:tabular-nums}.pricing{margin:var(--calcite-spacing-sm) 0 0;color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-relative-sm);overflow-wrap:anywhere}`,v=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:6});function n(r){return r===void 0?"Unavailable":v.format(r)}var s=class extends u{constructor(){super(...arguments),this.aggregate=!1,this.pricing=p}static{this.properties={usage:0,aggregate:5,pricing:0}}static{this.styles=m}render(){let d=this.usage;if(!d)return null;let{tokens:t,cost:e,rates:i,uncached:o}=d,h=[{group:"Input",groupRows:4,label:"Non-cached input",tokens:o===void 0?"Not reported":Number.isFinite(o)&&o>=0?o.toLocaleString():"Invalid usage",rate:n(i?.input),cost:c(e?.input)},{label:"Cache reads",tokens:t.cacheRead?.toLocaleString()??"Not reported",rate:n(i?.cachedInput),cost:t.cacheRead===void 0?"Not reported":c(e?.cachedInput)},{label:"Cache writes",tokens:t.cacheWrite?.toLocaleString()??"Not reported",rate:n(i?.cacheWrite),cost:t.cacheWrite===void 0?"Not reported":c(e?.cacheWrite)},{label:"Input (total)",tokens:t.input?.toLocaleString()??"Unavailable",rate:"-",cost:c(e?e.input+e.cachedInput+e.cacheWrite:void 0)},{group:"Output",groupRows:2,label:"Reasoning (within output)",tokens:t.reasoning?.toLocaleString()??"Not reported",rate:"-",cost:"Included in output"},{label:"Output (total)",tokens:t.output?.toLocaleString()??"Unavailable",rate:n(i?.output),cost:c(e?.output)}];return l`<section aria-label=Usage><h3>Usage</h3><div class="token-table"><calcite-table aria-label="Token usage and estimated cost (USD)" caption="Token usage and estimated cost (USD)" scale=s interaction-mode=static bordered><calcite-table-row slot=table-header><calcite-table-header heading=Category col-span=2></calcite-table-header><calcite-table-header heading=Tokens alignment=end></calcite-table-header>${this.aggregate?null:l`<calcite-table-header heading="Rate / 1M" alignment=end></calcite-table-header>`}<calcite-table-header heading="Est. cost" alignment=end></calcite-table-header></calcite-table-row>${h.map(a=>l`<calcite-table-row>${a.group?l`<calcite-table-header .heading=${a.group} .rowSpan=${a.groupRows}></calcite-table-header>`:null}<calcite-table-header .heading=${a.label}></calcite-table-header><calcite-table-cell alignment=end>${a.tokens}</calcite-table-cell>${this.aggregate?null:l`<calcite-table-cell alignment=end>${a.rate}</calcite-table-cell>`}<calcite-table-cell alignment=end>${a.cost}</calcite-table-cell></calcite-table-row>`)}<calcite-table-row slot=table-footer><calcite-table-header heading=Total col-span=2></calcite-table-header><calcite-table-cell alignment=end>${t.total?.toLocaleString()??"Unavailable"}</calcite-table-cell>${this.aggregate?null:l`<calcite-table-cell alignment=end>-</calcite-table-cell>`}<calcite-table-cell alignment=end>${c(e?.total)}</calcite-table-cell></calcite-table-row></calcite-table></div><p class="pricing">Rates last updated: ${this.pricing.updatedAt}</p></section>`}};b("arcgis-assistant-observation-usage",s);export{s as ArcgisAssistantObservationUsage};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
2
  var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}},n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as I}from"./XQ3NBBQ3.js";import o from"./BBB5EJUB.js";import{c as A,d as K}from"./GMZUN5SF.js";import"./KY7M4WHO.js";import n from"./UOKYHQNO.js";import m from"./YI6NIHNI.js";import l from"./L5IPMRHC.js";import j from"./UQRBY7ID.js";import i from"./FX4LV2S3.js";import"./34O57OGV.js";import"./XEJFVUNQ.js";import h from"./XC3T3Z5R.js";import"./KX6CZEVZ.js";import"./PGH7POKS.js";import g from"./NPV4MEAZ.js";import"./AQF6BBWC.js";import"./ZSLHB6MF.js";import"./TJBU5BQK.js";import f from"./C67KQCPS.js";import"./OVIQ5NSE.js";import"./QUZTFUWM.js";import"./OGZFST2A.js";import"./X5ET73QZ.js";import e from"./MPQ2OZXN.js";import a from"./JZPPP4QY.js";import"./ONQ6JSBJ.js";import"./2DWN3SKH.js";import"./FDOMMK2M.js";import"./DYSPEU7W.js";import{a as S,c as T}from"./66VWTARH.js";import"./24TK55FP.js";import"./FJV7CI7O.js";import"./WSIZ2OTL.js";import{C as x,x as y}from"./RE7MJTEF.js";import"./R74ZHFA6.js";import"./DJG6DBCU.js";import"./C76HLPKU.js";import"./RFPTOFM4.js";import{a as c,b}from"./CADNOKIK.js";import"./BMPBJXD7.js";import"./CDS2HGQY.js";import{Ea as _,a as k,b as d,j as v}from"./QEGO4B2W.js";import"./EEHDAYOG.js";import"./XWNZMKQF.js";import"./FSLPYC4Y.js";import"./AMP43OT2.js";import{fa as u}from"./2UKFCF2J.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,{fetchKnowledgeGraph:W},,,,,,,,,,,{a:q,b:h,o:m,p:w,q:E,r:M,s:C,t:G,u:N,v:R,w:z,x:L,y:$,z:F}])=>{var D=[N,R,$,z,G,F,L];async function O(e,t){let o=await m("arcgis_knowledge_tool_prompt"),s=E(t),r={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,contextType:s},n=await T({promptText:o,messages:e.arcgisKnowledgeMessages,inputVariables:r,tools:D,config:t}),i=(n.tool_calls?.length??0)>0,a=typeof n.text=="string"?n.text.trim():"",l=a.length>0,g=n.text;return!i&&(s==="map"||s==="knowledgeGraph")?{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,n],outputMessage:s==="map"?"No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries.":"No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",status:"success"}:{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,n],outputMessage:i?g:a,status:i?e.status:l?"success":"failed",summary:g?h(g):"ArcGIS Knowledge Agent tool executed."}}var U={generateCypher:"generated-cypher-query",queryGraphData:"graph-query-result",searchGraphData:"graph-search-result",addRecords:"added-records",applyLayout:"applied-layout",changeNonspatialVisibility:"changed-nonspatial-visibility",createLinkChart:"created-link-chart"};function j(e){return!!e&&e.status==="success"&&!!U[e.toolName]}function J(e){return{type:U[e.toolName],data:e.details}}async function P(e,t){let o=new q(D,{handleToolErrors:!1});try{let s=await o.invoke({messages:e.arcgisKnowledgeMessages},t),r=[];for(let a of s.messages){let l;if(typeof a.content!="string")throw new Error(`Unexpected tool message content type: ${typeof a.content}. Expected string.`);try{l=JSON.parse(a.content)}catch{throw new Error(`Failed to parse tool message content as JSON. Tool: ${a.name??"unknown"}.
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as I}from"./TIQUULA4.js";import o from"./L5OYOLWV.js";import{c as A,d as K}from"./NYFL2F5L.js";import"./YD5LVM7V.js";import n from"./AOT3PM2Q.js";import m from"./YGSDJ4V3.js";import l from"./M52LKZN7.js";import j from"./UXDRYDOD.js";import i from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import h from"./YSEHJQ4L.js";import"./7XVIZ7HK.js";import"./OKDXM5D4.js";import g from"./UP7RW5K2.js";import"./M5UMOOL2.js";import"./H6J65TWL.js";import"./XBWGOD6I.js";import f from"./J3T5HB77.js";import"./AGDGDULE.js";import"./FIZMK7GS.js";import"./LMAIOLS2.js";import"./7OQK2F7O.js";import e from"./Y3ZKMD47.js";import a from"./BMVPOFHU.js";import"./QBZP6XOE.js";import"./3COVQI26.js";import"./CETIZ4IQ.js";import"./PR4VMSKD.js";import{a as S,c as T}from"./X3YFCWQZ.js";import"./2JD3G7IW.js";import"./LDDP7NSY.js";import"./WHIWOYHN.js";import{C as x,x as y}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./Q7BJGEFH.js";import"./V66TS2BB.js";import"./GS5JDPZH.js";import{a as c,b}from"./2WY5MPMY.js";import"./S6OUM5X2.js";import"./XLHYQNAM.js";import{Ea as _,a as k,b as d,j as v}from"./7GDMXAF5.js";import"./5XZ5VL42.js";import"./C3VLDYS2.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import{fa as u}from"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,{fetchKnowledgeGraph:W},,,,,,,,,,,{a:q,b:h,o:m,p:w,q:E,r:M,s:C,t:G,u:N,v:R,w:z,x:L,y:$,z:F}])=>{var D=[N,R,$,z,G,F,L];async function O(e,t){let o=await m("arcgis_knowledge_tool_prompt"),s=E(t),r={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,contextType:s},n=await T({promptText:o,messages:e.arcgisKnowledgeMessages,inputVariables:r,tools:D,config:t}),i=(n.tool_calls?.length??0)>0,a=typeof n.text=="string"?n.text.trim():"",l=a.length>0,g=n.text;return!i&&(s==="map"||s==="knowledgeGraph")?{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,n],outputMessage:s==="map"?"No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries.":"No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",status:"success"}:{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,n],outputMessage:i?g:a,status:i?e.status:l?"success":"failed",summary:g?h(g):"ArcGIS Knowledge Agent tool executed."}}var U={generateCypher:"generated-cypher-query",queryGraphData:"graph-query-result",searchGraphData:"graph-search-result",addRecords:"added-records",applyLayout:"applied-layout",changeNonspatialVisibility:"changed-nonspatial-visibility",createLinkChart:"created-link-chart"};function j(e){return!!e&&e.status==="success"&&!!U[e.toolName]}function J(e){return{type:U[e.toolName],data:e.details}}async function P(e,t){let o=new q(D,{handleToolErrors:!1});try{let s=await o.invoke({messages:e.arcgisKnowledgeMessages},t),r=[];for(let a of s.messages){let l;if(typeof a.content!="string")throw new Error(`Unexpected tool message content type: ${typeof a.content}. Expected string.`);try{l=JSON.parse(a.content)}catch{throw new Error(`Failed to parse tool message content as JSON. Tool: ${a.name??"unknown"}.
3
3
 
4
4
  Original Content: ${a.content}`)}if(!l||typeof l!="object"||!("toolName"in l))throw new Error(`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(l)}`);r.push(l)}await c({text:`Finished executing ArcGIS Knowledge Agent tools: ${s.messages.filter(a=>a.name).map(a=>a.name).join(", ")}`},t);let n=r.filter(a=>typeof a!="string").map(a=>`- Called Tool: ${a.toolName}, Status: ${a.status}`),i=r[0];return i&&j(i)&&await b(J(i),t),{...e,outputMessage:n.join(`
5
5
  `),summary:n.length?h(n.join(`
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{da as F,ea as be,ra as Pe,sa as ve,ta as Te}from"./FSLPYC4Y.js";import{Ba as H,J as G,R as ge,a as he,fa as de,ja as X,ra as ye,s as W,wa as we}from"./2UKFCF2J.js";var w=class extends F{lc_serializable=!0;lc_namespace=["langchain_core","prompts",this._getPromptType()];get lc_attributes(){return{partialVariables:void 0}}inputVariables;outputParser;partialVariables;metadata;tags;constructor(s){super(s);let{inputVariables:e}=s;if(e.includes("stop"))throw new Error("Cannot have an input variable named 'stop', as it is used internally, please rename.");Object.assign(this,s)}async mergePartialAndUserVariables(s){let e=this.partialVariables??{},t={};for(let[r,a]of Object.entries(e))typeof a=="string"?t[r]=a:t[r]=await a();return{...t,...s}}async invoke(s,e){let t={...this.metadata,...e?.metadata},r=[...this.tags??[],...e?.tags??[]];return this._callWithConfig(a=>this.formatPromptValue(a),s,{...e,tags:r,metadata:t,runType:"prompt"})}};var v=class extends w{async formatPromptValue(s){return new Pe(await this.format(s))}};var Oe=Object.prototype.toString,C=Array.isArray||function(e){return Oe.call(e)==="[object Array]"};function Z(s){return typeof s=="function"}function ke(s){return C(s)?"array":typeof s}function Y(s){return s.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function xe(s,e){return s!=null&&typeof s=="object"&&e in s}function Be(s,e){return s!=null&&typeof s!="object"&&s.hasOwnProperty&&s.hasOwnProperty(e)}var Ue=RegExp.prototype.test;function Ne(s,e){return Ue.call(s,e)}var De=/\S/;function $e(s){return!Ne(De,s)}var ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function We(s){return String(s).replace(/[&<>"'`=\/]/g,function(t){return ze[t]})}var Ge=/\s*/,He=/\s+/,_e=/\s*=/,qe=/\s*\}/,Le=/#|\^|\/|>|\{|&|=|!/;function Je(s,e){if(!s)return[];var t=!1,r=[],a=[],i=[],n=!1,o=!1,l="",p=0;function f(){if(n&&!o)for(;i.length;)delete a[i.pop()];else i=[];n=!1,o=!1}var b,_,ue;function fe(P){if(typeof P=="string"&&(P=P.split(He,2)),!C(P)||P.length!==2)throw new Error("Invalid tags: "+P);b=new RegExp(Y(P[0])+"\\s*"),_=new RegExp("\\s*"+Y(P[1])),ue=new RegExp("\\s*"+Y("}"+P[1]))}fe(e||d.tags);for(var m=new k(s),x,h,g,R,z,V;!m.eos();){if(x=m.pos,g=m.scanUntil(b),g)for(var Q=0,Re=g.length;Q<Re;++Q)R=g.charAt(Q),$e(R)?(i.push(a.length),l+=R):(o=!0,t=!0,l+=" "),a.push(["text",R,x,x+1]),x+=1,R===`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{da as F,ea as be,ra as Pe,sa as ve,ta as Te}from"./A4ZVCRVF.js";import{Ba as H,J as G,R as ge,a as he,fa as de,ja as X,ra as ye,s as W,wa as we}from"./272R36XK.js";var w=class extends F{lc_serializable=!0;lc_namespace=["langchain_core","prompts",this._getPromptType()];get lc_attributes(){return{partialVariables:void 0}}inputVariables;outputParser;partialVariables;metadata;tags;constructor(s){super(s);let{inputVariables:e}=s;if(e.includes("stop"))throw new Error("Cannot have an input variable named 'stop', as it is used internally, please rename.");Object.assign(this,s)}async mergePartialAndUserVariables(s){let e=this.partialVariables??{},t={};for(let[r,a]of Object.entries(e))typeof a=="string"?t[r]=a:t[r]=await a();return{...t,...s}}async invoke(s,e){let t={...this.metadata,...e?.metadata},r=[...this.tags??[],...e?.tags??[]];return this._callWithConfig(a=>this.formatPromptValue(a),s,{...e,tags:r,metadata:t,runType:"prompt"})}};var v=class extends w{async formatPromptValue(s){return new Pe(await this.format(s))}};var Oe=Object.prototype.toString,C=Array.isArray||function(e){return Oe.call(e)==="[object Array]"};function Z(s){return typeof s=="function"}function ke(s){return C(s)?"array":typeof s}function Y(s){return s.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function xe(s,e){return s!=null&&typeof s=="object"&&e in s}function Be(s,e){return s!=null&&typeof s!="object"&&s.hasOwnProperty&&s.hasOwnProperty(e)}var Ue=RegExp.prototype.test;function Ne(s,e){return Ue.call(s,e)}var De=/\S/;function $e(s){return!Ne(De,s)}var ze={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};function We(s){return String(s).replace(/[&<>"'`=\/]/g,function(t){return ze[t]})}var Ge=/\s*/,He=/\s+/,_e=/\s*=/,qe=/\s*\}/,Le=/#|\^|\/|>|\{|&|=|!/;function Je(s,e){if(!s)return[];var t=!1,r=[],a=[],i=[],n=!1,o=!1,l="",p=0;function f(){if(n&&!o)for(;i.length;)delete a[i.pop()];else i=[];n=!1,o=!1}var b,_,ue;function fe(P){if(typeof P=="string"&&(P=P.split(He,2)),!C(P)||P.length!==2)throw new Error("Invalid tags: "+P);b=new RegExp(Y(P[0])+"\\s*"),_=new RegExp("\\s*"+Y(P[1])),ue=new RegExp("\\s*"+Y("}"+P[1]))}fe(e||d.tags);for(var m=new k(s),x,h,g,R,z,V;!m.eos();){if(x=m.pos,g=m.scanUntil(b),g)for(var Q=0,Re=g.length;Q<Re;++Q)R=g.charAt(Q),$e(R)?(i.push(a.length),l+=R):(o=!0,t=!0,l+=" "),a.push(["text",R,x,x+1]),x+=1,R===`
3
3
  `&&(f(),l="",p=0,t=!1);if(!m.scan(b))break;if(n=!0,h=m.scan(Le)||"name",m.scan(Ge),h==="="?(g=m.scanUntil(_e),m.scan(_e),m.scanUntil(_)):h==="{"?(g=m.scanUntil(ue),m.scan(qe),m.scanUntil(_),h="&"):g=m.scanUntil(_),!m.scan(_))throw new Error("Unclosed tag at "+m.pos);if(h==">"?z=[h,g,x,m.pos,l,p,t]:z=[h,g,x,m.pos],p++,a.push(z),h==="#"||h==="^")r.push(z);else if(h==="/"){if(V=r.pop(),!V)throw new Error('Unopened section "'+g+'" at '+x);if(V[1]!==g)throw new Error('Unclosed section "'+V[1]+'" at '+x)}else h==="name"||h==="{"||h==="&"?o=!0:h==="="&&fe(g)}if(f(),V=r.pop(),V)throw new Error('Unclosed section "'+V[1]+'" at '+m.pos);return Qe(Ke(a))}function Ke(s){for(var e=[],t,r,a=0,i=s.length;a<i;++a)t=s[a],t&&(t[0]==="text"&&r&&r[0]==="text"?(r[1]+=t[1],r[3]=t[3]):(e.push(t),r=t));return e}function Qe(s){for(var e=[],t=e,r=[],a,i,n=0,o=s.length;n<o;++n)switch(a=s[n],a[0]){case"#":case"^":t.push(a),r.push(a),t=a[4]=[];break;case"/":i=r.pop(),i[5]=a[2],t=r.length>0?r[r.length-1][4]:e;break;default:t.push(a)}return e}function k(s){this.string=s,this.tail=s,this.pos=0}k.prototype.eos=function(){return this.tail===""};k.prototype.scan=function(e){var t=this.tail.match(e);if(!t||t.index!==0)return"";var r=t[0];return this.tail=this.tail.substring(r.length),this.pos+=r.length,r};k.prototype.scanUntil=function(e){var t=this.tail.search(e),r;switch(t){case-1:r=this.tail,this.tail="";break;case 0:r="";break;default:r=this.tail.substring(0,t),this.tail=this.tail.substring(t)}return this.pos+=r.length,r};function E(s,e){this.view=s,this.cache={".":this.view},this.parent=e}E.prototype.push=function(e){return new E(e,this)};E.prototype.lookup=function(e){var t=this.cache,r;if(t.hasOwnProperty(e))r=t[e];else{for(var a=this,i,n,o,l=!1;a;){if(e.indexOf(".")>0)for(i=a.view,n=e.split("."),o=0;i!=null&&o<n.length;)o===n.length-1&&(l=xe(i,n[o])||Be(i,n[o])),i=i[n[o++]];else i=a.view[e],l=xe(a.view,e);if(l){r=i;break}a=a.parent}t[e]=r}return Z(r)&&(r=r.call(this.view)),r};function u(){this.templateCache={_cache:{},set:function(e,t){this._cache[e]=t},get:function(e){return this._cache[e]},clear:function(){this._cache={}}}}u.prototype.clearCache=function(){typeof this.templateCache<"u"&&this.templateCache.clear()};u.prototype.parse=function(e,t){var r=this.templateCache,a=e+":"+(t||d.tags).join(":"),i=typeof r<"u",n=i?r.get(a):void 0;return n==null&&(n=Je(e,t),i&&r.set(a,n)),n};u.prototype.render=function(e,t,r,a){var i=this.getConfigTags(a),n=this.parse(e,i),o=t instanceof E?t:new E(t,void 0);return this.renderTokens(n,o,r,e,a)};u.prototype.renderTokens=function(e,t,r,a,i){for(var n="",o,l,p,f=0,b=e.length;f<b;++f)p=void 0,o=e[f],l=o[0],l==="#"?p=this.renderSection(o,t,r,a,i):l==="^"?p=this.renderInverted(o,t,r,a,i):l===">"?p=this.renderPartial(o,t,r,i):l==="&"?p=this.unescapedValue(o,t):l==="name"?p=this.escapedValue(o,t,i):l==="text"&&(p=this.rawValue(o)),p!==void 0&&(n+=p);return n};u.prototype.renderSection=function(e,t,r,a,i){var n=this,o="",l=t.lookup(e[1]);function p(_){return n.render(_,t,r,i)}if(l){if(C(l))for(var f=0,b=l.length;f<b;++f)o+=this.renderTokens(e[4],t.push(l[f]),r,a,i);else if(typeof l=="object"||typeof l=="string"||typeof l=="number")o+=this.renderTokens(e[4],t.push(l),r,a,i);else if(Z(l)){if(typeof a!="string")throw new Error("Cannot use higher-order sections without the original template");l=l.call(t.view,a.slice(e[3],e[5]),p),l!=null&&(o+=l)}else o+=this.renderTokens(e[4],t,r,a,i);return o}};u.prototype.renderInverted=function(e,t,r,a,i){var n=t.lookup(e[1]);if(!n||C(n)&&n.length===0)return this.renderTokens(e[4],t,r,a,i)};u.prototype.indentPartial=function(e,t,r){for(var a=t.replace(/[^ \t]/g,""),i=e.split(`
4
4
  `),n=0;n<i.length;n++)i[n].length&&(n>0||!r)&&(i[n]=a+i[n]);return i.join(`
5
5
  `)};u.prototype.renderPartial=function(e,t,r,a){if(r){var i=this.getConfigTags(a),n=Z(r)?r(e[1]):r[e[1]];if(n!=null){var o=e[6],l=e[5],p=e[4],f=n;l==0&&p&&(f=this.indentPartial(n,p,o));var b=this.parse(f,i);return this.renderTokens(b,t,r,f,a)}}};u.prototype.unescapedValue=function(e,t){var r=t.lookup(e[1]);if(r!=null)return r};u.prototype.escapedValue=function(e,t,r){var a=this.getConfigEscape(r)||d.escape,i=t.lookup(e[1]);if(i!=null)return typeof i=="number"&&a===d.escape?String(i):a(i)};u.prototype.rawValue=function(e){return e[1]};u.prototype.getConfigTags=function(e){return C(e)?e:e&&typeof e=="object"?e.tags:void 0};u.prototype.getConfigEscape=function(e){if(e&&typeof e=="object"&&!C(e))return e.escape};var d={name:"mustache.js",version:"4.2.0",tags:["{{","}}"],clearCache:void 0,escape:void 0,parse:void 0,render:void 0,Scanner:void 0,Context:void 0,Writer:void 0,set templateCache(s){O.templateCache=s},get templateCache(){return O.templateCache}},O=new u;d.clearCache=function(){return O.clearCache()};d.parse=function(e,t){return O.parse(e,t)};d.render=function(e,t,r,a){if(typeof e!="string")throw new TypeError('Invalid template! Template should be a "string" but "'+ke(e)+'" was given as the first argument for mustache#render(template, view, partials)');return O.render(e,t,r,a)};d.escape=We;d.Scanner=k;d.Context=E;d.Writer=u;var ee=d;var Xe={escape:s=>s},M=s=>{let e=s.split(""),t=[],r=(i,n)=>{for(let o=n;o<e.length;o+=1)if(i.includes(e[o]))return o;return-1},a=0;for(;a<e.length;)if(e[a]==="{"&&a+1<e.length&&e[a+1]==="{")t.push({type:"literal",text:"{"}),a+=2;else if(e[a]==="}"&&a+1<e.length&&e[a+1]==="}")t.push({type:"literal",text:"}"}),a+=2;else if(e[a]==="{"){let i=r("}",a);if(i<0)throw new Error("Unclosed '{' in template.");t.push({type:"variable",name:e.slice(a+1,i).join("")}),a=i+1}else{if(e[a]==="}")throw new Error("Single '}' in template.");{let i=r("{}",a),n=(i<0?e.slice(a):e.slice(a,i)).join("");t.push({type:"literal",text:n}),a=i<0?e.length:i}}return t},Ve=(s,e=[])=>{let t=[];for(let r of s)if(r[0]==="name"){let a=r[1].includes(".")?r[1].split(".")[0]:r[1];t.push({type:"variable",name:a})}else if(["#","&","^",">"].includes(r[0])){if(t.push({type:"variable",name:r[1]}),r[0]==="#"&&r.length>4&&Array.isArray(r[4])){let a=[...e,r[1]],i=Ve(r[4],a);t.push(...i)}}else t.push({type:"literal",text:r[1]});return t},I=s=>{let e=ee.parse(s);return Ve(e)},te=(s,e)=>M(s).reduce((t,r)=>{if(r.type==="variable"){if(r.name in e)return t+(typeof e[r.name]=="string"?e[r.name]:JSON.stringify(e[r.name]));throw new Error(`(f-string) Missing value for input ${r.name}`)}return t+r.text},""),re=(s,e)=>ee.render(s,e,void 0,Xe),B={"f-string":te,mustache:re},ae={"f-string":M,mustache:I},c=(s,e,t)=>{try{return B[e](s,t)}catch(r){throw W(r,"INVALID_PROMPT_INPUT")}},S=(s,e)=>ae[e](s),T=(s,e,t)=>{if(!(e in B)){let r=Object.keys(B);throw new Error(`Invalid template format. Got \`${e}\`;
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as p}from"./BMPBJXD7.js";function f(r,e,o){return{name:r,handler:async(a,t)=>{let n=async l=>{let u=await e.beforeAgent?.(l),w=u?{...l,state:{...l.state,...u}}:l,i=await t(w),d=await e.afterAgent?.({...w,result:i});return d?{...i,...d}:i};return e.wrapAgent?await e.wrapAgent(a,n):await n(a)},hooks:e,outputKey:o?.outputKey}}function M(r,e,o){return{name:r,handler:async(a,t)=>e.wrapToolCall?await e.wrapToolCall(a,t):await t(a),outputKey:o?.outputKey}}function y(r){return r.map(e=>s(e.name,e.hooks??{})).filter(e=>!!e)}function s(r,e){let{afterModel:o,beforeModel:a,wrapModelCall:t,wrapToolCall:n}=e;if(!(!o&&!a&&!t&&!n))return p({afterModel:o,beforeModel:a,name:r,wrapModelCall:t,wrapToolCall:n})}export{f as a,M as b,y as c};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{b as p}from"./S6OUM5X2.js";function f(r,e,o){return{name:r,handler:async(a,t)=>{let n=async l=>{let u=await e.beforeAgent?.(l),w=u?{...l,state:{...l.state,...u}}:l,i=await t(w),d=await e.afterAgent?.({...w,result:i});return d?{...i,...d}:i};return e.wrapAgent?await e.wrapAgent(a,n):await n(a)},hooks:e,outputKey:o?.outputKey}}function M(r,e,o){return{name:r,handler:async(a,t)=>e.wrapToolCall?await e.wrapToolCall(a,t):await t(a),outputKey:o?.outputKey}}function y(r){return r.map(e=>s(e.name,e.hooks??{})).filter(e=>!!e)}function s(r,e){let{afterModel:o,beforeModel:a,wrapModelCall:t,wrapToolCall:n}=e;if(!(!o&&!a&&!t&&!n))return p({afterModel:o,beforeModel:a,name:r,wrapModelCall:t,wrapToolCall:n})}export{f as a,M as b,y as c};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{$,A as z,Aa as za,B as A,Ba as Aa,C as B,D as C,E as D,Ea as Ba,F as E,Fa as Ca,G as F,Ga as Da,H as G,Ha as Ea,I as H,Ia as Fa,J,Ja as Ga,K,Ka as Ha,L,La as Ia,M,Ma as Ja,N,Na as Ka,O,Oa as La,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,ga,h as g,ha,i as h,ia,j as i,ja,k as j,ka,l as k,m as l,ma as la,n as m,na as ma,o as n,oa as na,p as o,pa as oa,q as p,qa as pa,r as q,ra as qa,s as r,sa as ra,t as s,ta as sa,u as t,ua as ta,v as u,va as ua,w as v,wa as va,x as w,xa as wa,y as x,ya as xa,z as y,za as ya}from"./QEGO4B2W.js";import"./EEHDAYOG.js";import{v as I}from"./XWNZMKQF.js";import"./FSLPYC4Y.js";import"./AMP43OT2.js";import"./2UKFCF2J.js";import"./UZLQALHY.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};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{$,A as z,Aa as za,B as A,Ba as Aa,C as B,D as C,E as D,Ea as Ba,F as E,Fa as Ca,G as F,Ga as Da,H as G,Ha as Ea,I as H,Ia as Fa,J,Ja as Ga,K,Ka as Ha,L,La as Ia,M,Ma as Ja,N,Na as Ka,O,Oa as La,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,ca,d,da,e,ea,f,fa,ga,h as g,ha,i as h,ia,j as i,ja,k as j,ka,l as k,m as l,ma as la,n as m,na as ma,o as n,oa as na,p as o,pa as oa,q as p,qa as pa,r as q,ra as qa,s as r,sa as ra,t as s,ta as sa,u as t,ua as ta,v as u,va as ua,w as v,wa as va,x as w,xa as wa,y as x,ya as xa,z as y,za as ya}from"./7GDMXAF5.js";import"./5XZ5VL42.js";import{v as I}from"./C3VLDYS2.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.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};
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./UZLQALHY.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import"./5PV2GUZW.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
3
3
  `,r=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",o],{type:"text/javascript;charset=utf-8"});function a(t){let e;try{if(e=r&&(self.URL||self.webkitURL).createObjectURL(r),!e)throw"";let s=new Worker(e,{name:t?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(o),{name:t?.name})}}export{a as default};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./UZLQALHY.js";var e=`# ArcgisKnowledge Tool Instructions
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import"./5PV2GUZW.js";var e=`# ArcgisKnowledge Tool Instructions
3
3
 
4
4
  You are an assistant that helps users answer questions and perform operations on their knowledge graph, map or link chart. You have been assigned the task below, which must be achieved by calling a single tool.
5
5
 
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as p}from"./R74ZHFA6.js";export default $arcgis.t(([m,y,S,b])=>{var q=t=>typeof t=="string"&&t.length>0?t:void 0,w=()=>p(),E=t=>typeof t!="string"||t.trim().length===0?"MapsSDK":`MapsSDK - ${t.trim()}`,I=t=>{let n=t?.configurable;return{conversationId:q(n?.thread_id),abortSignal:t?.signal,requestId:w(),requestSource:E(S.applicationName)}},v=t=>{if(t==null||typeof t=="string"||t instanceof FormData||t instanceof HTMLFormElement)return t;if(t instanceof URLSearchParams)return t.toString();throw new TypeError(`Unsupported request body type: ${Object.prototype.toString.call(t)}`)},k=async({config:t,withCredentials:n})=>{let g=y.getDefault(),f=await m.getCredential(`${g.url}/sharing`);return async(o,r)=>{let{conversationId:a,abortSignal:s,requestId:u,requestSource:i}=I(t),e=new Headers(r?.headers);for(let d of[...e.keys()]){let c=d.toLowerCase();(c==="authorization"||c==="api-key"||c.startsWith("x-stainless-"))&&e.delete(d)}let l=f?.token;l&&l.length>0&&e.set("X-Esri-Authorization",`Bearer ${l}`),g.isPortal||(i&&i.length>0&&e.set("X-Esri-Request-Source",i),a&&a.length>0&&e.set("X-Esri-Conversation-Id",a),u.length>0&&e.set("X-Esri-Request-Id",u));let h=s&&r?.signal?AbortSignal.any([s,r.signal]):r?.signal??s;return(await b(o instanceof Request?o.url:o.toString(),{body:v(r?.body),headers:Object.fromEntries(e),responseType:"native",withCredentials:n,signal:h})).data}};return k},"identity/IdentityManager","portal/Portal","config","request")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{b as p}from"./OUMTV5H5.js";export default $arcgis.t(([m,y,S,b])=>{var q=t=>typeof t=="string"&&t.length>0?t:void 0,w=()=>p(),E=t=>typeof t!="string"||t.trim().length===0?"MapsSDK":`MapsSDK - ${t.trim()}`,I=t=>{let n=t?.configurable;return{conversationId:q(n?.thread_id),abortSignal:t?.signal,requestId:w(),requestSource:E(S.applicationName)}},v=t=>{if(t==null||typeof t=="string"||t instanceof FormData||t instanceof HTMLFormElement)return t;if(t instanceof URLSearchParams)return t.toString();throw new TypeError(`Unsupported request body type: ${Object.prototype.toString.call(t)}`)},k=async({config:t,withCredentials:n})=>{let g=y.getDefault(),f=await m.getCredential(`${g.url}/sharing`);return async(o,r)=>{let{conversationId:a,abortSignal:s,requestId:u,requestSource:i}=I(t),e=new Headers(r?.headers);for(let d of[...e.keys()]){let c=d.toLowerCase();(c==="authorization"||c==="api-key"||c.startsWith("x-stainless-"))&&e.delete(d)}let l=f?.token;l&&l.length>0&&e.set("X-Esri-Authorization",`Bearer ${l}`),g.isPortal||(i&&i.length>0&&e.set("X-Esri-Request-Source",i),a&&a.length>0&&e.set("X-Esri-Conversation-Id",a),u.length>0&&e.set("X-Esri-Request-Id",u));let h=s&&r?.signal?AbortSignal.any([s,r.signal]):r?.signal??s;return(await b(o instanceof Request?o.url:o.toString(),{body:v(r?.body),headers:Object.fromEntries(e),responseType:"native",withCredentials:n,signal:h})).data}};return k},"identity/IdentityManager","portal/Portal","config","request")
@@ -1,8 +1,8 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as O}from"./46DT6BIG.js";import{a as j}from"./434TAA3J.js";import{b as Z}from"./UYP5PH5E.js";import{b as pe}from"./OVIQ5NSE.js";import"./QUZTFUWM.js";import a from"./LCI5MEDN.js";import{a as I,b as R}from"./FBARYPZ7.js";import"./A22375P3.js";import"./DYSPEU7W.js";import{a as he}from"./DZOQFEOB.js";import{a as U}from"./24TK55FP.js";import"./FJV7CI7O.js";import{b as K}from"./WSIZ2OTL.js";import{A as C,C as J,g as B,h as y,l as V,m as G,o as w,v as P,w as M,x as Q}from"./RE7MJTEF.js";import{b as q}from"./R74ZHFA6.js";import"./RFPTOFM4.js";import{a as b}from"./CADNOKIK.js";import{c as de,d as ue,e as ge}from"./BMPBJXD7.js";import{a as A,b as oe,c as le,d as ce}from"./CDS2HGQY.js";import{Ea as ae,M as ie,S as x,a as Y,b as ee,y as te}from"./QEGO4B2W.js";import{c as ne}from"./EEHDAYOG.js";import"./XWNZMKQF.js";import"./FSLPYC4Y.js";import{N as p}from"./AMP43OT2.js";import{La as re,fa as F,ra as se}from"./2UKFCF2J.js";import"./UZLQALHY.js";export default $arcgis.t(([vt,{whenOnce:Et,watch:_t,when:kt},xt,Me,Te,Ee,De,Le,It,{property:k,subclass:Rt},ke,{b:X}])=>{var Re=(t,e,s)=>{let r=t[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==s?". Note that variables only represent file names one level deep.":""))))})},me=async t=>(await Re(Object.assign({"./field_descriptions_prompt.md":()=>import("./ZU2FHVNK.js"),"./intent_prompt.md":()=>import("./OT5ECP4V.js"),"./layer_descriptions_prompt.md":()=>import("./LK7ZIQW6.js")}),`./${t}.md`,2)).default,Se="0.1",$=1536,Ce="openai",Ae=K.default,$e=`Name: {name}
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
+ import{a as O}from"./5INBG23U.js";import{a as j}from"./7JIXXYZR.js";import{b as Z}from"./ZUKM4DGB.js";import{b as pe}from"./AGDGDULE.js";import"./FIZMK7GS.js";import a from"./TOUYGIGK.js";import{a as I,b as R}from"./W36IUEUB.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{a as he}from"./TFXK2POV.js";import{a as U}from"./2JD3G7IW.js";import"./LDDP7NSY.js";import{b as K}from"./WHIWOYHN.js";import{A as C,C as J,g as B,h as y,l as V,m as G,o as w,v as P,w as M,x as Q}from"./NAVK5JJ2.js";import{b as q}from"./OUMTV5H5.js";import"./GS5JDPZH.js";import{a as b}from"./2WY5MPMY.js";import{c as de,d as ue,e as ge}from"./S6OUM5X2.js";import{a as A,b as oe,c as le,d as ce}from"./XLHYQNAM.js";import{Ea as ae,M as ie,S as x,a as Y,b as ee,y as te}from"./7GDMXAF5.js";import{c as ne}from"./5XZ5VL42.js";import"./C3VLDYS2.js";import"./A4ZVCRVF.js";import{N as p}from"./N2GN5WOI.js";import{La as re,fa as F,ra as se}from"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([vt,{whenOnce:Et,watch:_t,when:kt},xt,Me,Te,Ee,De,Le,It,{property:k,subclass:Rt},ke,{b:X}])=>{var Re=(t,e,s)=>{let r=t[e];return r?typeof r=="function"?r():Promise.resolve(r):new Promise((n,i)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+e+(e.split("/").length!==s?". Note that variables only represent file names one level deep.":""))))})},me=async t=>(await Re(Object.assign({"./field_descriptions_prompt.md":()=>import("./2OW3DCUT.js"),"./intent_prompt.md":()=>import("./RFIN7KO6.js"),"./layer_descriptions_prompt.md":()=>import("./XVWSIDZV.js")}),`./${t}.md`,2)).default,Se="0.1",$=1536,Ce="openai",Ae=K.default,$e=`Name: {name}
3
3
  Title: {title}
4
4
  Description: {description}`,Pe=`Name: {name}
5
5
  Alias: {alias}
6
- Description: {description}`,ye=p.object({schemaVersion:p.literal(Se),modified:p.number().int().nonnegative(),embeddings:p.object({modelProvider:p.literal(Ce),model:p.literal(Ae),dimensions:p.literal($),templates:p.object({layer:p.string().default($e),field:p.string().default(Pe)})}),layers:p.array(p.object({id:p.string().min(1),name:p.string().min(1),title:p.string().catch(""),description:p.string().catch(""),vector:p.array(p.number()).length($,{message:`Layer vector must be exactly ${$} dimensions`}),fields:p.array(p.object({name:p.string().min(1),alias:p.string().catch(""),description:p.string().catch(""),vector:p.array(p.number()).length($,{message:`Field vector must be exactly ${$} dimensions`})}))})).default([])});var qe=async t=>{let e=await Fe(),s=await X("default"),r=Te.getDefault(),n=(await Me.getCredential(`${r.url}/sharing`)).token,i={type:"generateEmbeddings",webmapEmbeddings:t,auth:{apiUrl:s,token:n}};return e.postMessage(i),await new Promise((c,a)=>{let d=l=>{l.data==="completed"&&(e.removeEventListener("message",d),c())},o=l=>{e.removeEventListener("message",d),a(l instanceof Error?l:new Error("Embeddings worker error"))};e.addEventListener("message",d),e.addEventListener("error",o,{once:!0})}),e},Fe=async()=>{{let t=(await import("./OKVLGJAG.js")).default;return new t}},Ue=x.Root({agentExecutionContext:x({default:ce,reducer:oe}),currentIntent:x({default:()=>"none",reducer:A}),routing:x({default:()=>({mode:"auto"}),reducer:A}),lastExecutedAgent:x({default:()=>"",reducer:A}),requiresFollowUp:x({default:()=>!0,reducer:A}),stepCount:x({default:()=>0,reducer:(t,e)=>e??t+1}),finalOutputMessage:x({default:()=>"",reducer:le})}),Oe=t=>{if(!t||typeof t!="object"||!("services"in t))return!1;let e=t.services;return!!e&&typeof e=="object"&&"agentRegistry"in e},N=t=>{let e=t?.configurable;return Oe(e)?e:void 0},je=t=>{t.currentIntent="none"},We=async(t,e)=>{let s=N(e),r=await R({path:"./assets/orchestrator/t9n",locale:I(e)});if(t.agentExecutionContext.userRequest){let i=new se(t.agentExecutionContext.userRequest.trim());t.agentExecutionContext.messages=[...t.agentExecutionContext.messages,i],je(t)}let n=s?.services.agentRegistry.list().map(i=>i.agent.id)??[];return await b({text:r.availableAgents.replace("{agentIds}",[...n].join(", "))},e),await b({text:r.analyzingUserInput},e),t},Ne=async(t,e)=>{let s=await R({path:"./assets/orchestrator/t9n",locale:I(e)});return await b({text:s.exiting},e),t},fe=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),He=(t,e)=>{if(!fe(t)){t!==void 0&&console.warn(`Agent "${e}" returned invalid sharedStatePatch. Ignoring it.`);return}let s={};for(let[r,n]of Object.entries(t)){if(!fe(n)||!("value"in n)){console.warn(`Agent "${e}" returned invalid sharedStatePatch entry for key "${r}". Ignoring that entry.`);continue}s[r]={value:n.value}}return s},ze=t=>{let{previousSharedState:e,patch:s,agentId:r}=t;if(!s)return e;let n=Date.now(),i={...e};for(let[c,a]of Object.entries(s))a?.value!==void 0&&(i[c]={value:a.value,meta:{updatedByAgentId:r,updatedAt:n}});return i},Be=256,Ve=new Set(["point","polyline","polygon","extent","custom"]),Ge=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Qe=(t,e)=>{if(t===void 0)return;if(!Array.isArray(t)){console.warn(`Agent "${e}" returned invalid sharedResourceAdditions. Ignoring it.`);return}let s=[];for(let[r,n]of t.entries()){if(!Ge(n)||typeof n.kind!="string"||!Ve.has(n.kind)||typeof n.description!="string"||!n.description.trim()||!("payload"in n)||n.payload===void 0){console.warn(`Agent "${e}" returned invalid sharedResourceAdditions entry at index ${r}. Ignoring that entry.`);continue}let i;try{i=structuredClone(n.payload)}catch{console.warn(`Agent "${e}" returned invalid sharedResourceAdditions entry at index ${r}. Ignoring that entry.`);continue}s.push({kind:n.kind,description:n.description.trim().slice(0,Be),payload:i})}return s.length?s:void 0},Je=t=>{let{previousSharedResources:e,additions:s,agentId:r}=t;if(!s?.length)return e;let n=Date.now(),i=s.map(c=>({...c,id:q(),meta:{createdByAgentId:r,createdAt:n}}));return[...e,...i].slice(-50)},be=t=>typeof t!="string"?void 0:t.trim()||void 0,Ze=t=>{switch(t){case"failed":return"Agent failed without a summary.";case"unknown":return"Agent returned with unknown status.";case"success":return"Agent completed without a summary.";default:return"Agent completed without a summary."}},Ke=(t,e)=>{let s=be(e?.outputMessage),r=be(e?.summary),n=e?.status,i=n==="success"||n==="failed"?n:"unknown";i==="unknown"&&console.warn(`Agent "${t}" returned missing/invalid status. Defaulting to "unknown".`);let c=He(e?.sharedStatePatch,t),a=Qe(e?.sharedResourceAdditions,t);return{outputMessage:s,summary:r??s??Ze(i),status:i,sharedStatePatch:c,sharedResourceAdditions:a}},we=4e3,Xe=async(t,e)=>{let s=N(e),r=await R({path:"./assets/orchestrator/t9n",locale:I(e)});if(e?.signal?.aborted)return await b({text:r.runCancelledAgentExecution},e),{...t,currentIntent:"none",requiresFollowUp:!1};let{agentRegistry:n}=s?.services??{},i=n?.get(t.currentIntent);if(!i)return console.warn(r.noAgentFoundForIntent.replace("{intent}",t.currentIntent)),t;await b({text:r.executingRegisteredAgent.replace("{agentName}",i.agent.name)},e);let c={...e??{},metadata:{...e?.metadata,agentId:i.agent.id},configurable:{...s??{},agentId:i.agent.id,context:i.getContext?await i.getContext():void 0}},a;try{let l=await i.agent.createGraph().compile().invoke({agentExecutionContext:{...t.agentExecutionContext,messages:[...t.agentExecutionContext.messages],priorSteps:structuredClone(t.agentExecutionContext.priorSteps??[]),sharedState:structuredClone(t.agentExecutionContext.sharedState??{}),sharedResources:structuredClone(t.agentExecutionContext.sharedResources??[])}},c);a=Ke(i.agent.name,l),await b({text:r.finishedExecutingRegisteredAgent.replace("{agentName}",i.agent.name)},e)}catch(l){if(te(l)||e?.signal?.aborted||l instanceof Error&&l.name==="AbortError")throw l;let u=l instanceof Error?l.message:String(l);console.error(`Agent "${i.agent.name}" failed:`,l),await b({text:r.registeredAgentFailed.replace("{agentName}",i.agent.name).replace("{error}",u)},e),a={status:"failed",outputMessage:r.agentExecutionFailed.replace("{error}",u),summary:r.agentExecutionFailed.replace("{error}",u)}}let d=a.outputMessage,o=[...t.agentExecutionContext.messages];if(d){let l=d.length>we?`${d.slice(0,we-14)}
6
+ Description: {description}`,ye=p.object({schemaVersion:p.literal(Se),modified:p.number().int().nonnegative(),embeddings:p.object({modelProvider:p.literal(Ce),model:p.literal(Ae),dimensions:p.literal($),templates:p.object({layer:p.string().default($e),field:p.string().default(Pe)})}),layers:p.array(p.object({id:p.string().min(1),name:p.string().min(1),title:p.string().catch(""),description:p.string().catch(""),vector:p.array(p.number()).length($,{message:`Layer vector must be exactly ${$} dimensions`}),fields:p.array(p.object({name:p.string().min(1),alias:p.string().catch(""),description:p.string().catch(""),vector:p.array(p.number()).length($,{message:`Field vector must be exactly ${$} dimensions`})}))})).default([])});var qe=async t=>{let e=await Fe(),s=await X("default"),r=Te.getDefault(),n=(await Me.getCredential(`${r.url}/sharing`)).token,i={type:"generateEmbeddings",webmapEmbeddings:t,auth:{apiUrl:s,token:n}};return e.postMessage(i),await new Promise((c,a)=>{let d=l=>{l.data==="completed"&&(e.removeEventListener("message",d),c())},o=l=>{e.removeEventListener("message",d),a(l instanceof Error?l:new Error("Embeddings worker error"))};e.addEventListener("message",d),e.addEventListener("error",o,{once:!0})}),e},Fe=async()=>{{let t=(await import("./6J3J7VLW.js")).default;return new t}},Ue=x.Root({agentExecutionContext:x({default:ce,reducer:oe}),currentIntent:x({default:()=>"none",reducer:A}),routing:x({default:()=>({mode:"auto"}),reducer:A}),lastExecutedAgent:x({default:()=>"",reducer:A}),requiresFollowUp:x({default:()=>!0,reducer:A}),stepCount:x({default:()=>0,reducer:(t,e)=>e??t+1}),finalOutputMessage:x({default:()=>"",reducer:le})}),Oe=t=>{if(!t||typeof t!="object"||!("services"in t))return!1;let e=t.services;return!!e&&typeof e=="object"&&"agentRegistry"in e},N=t=>{let e=t?.configurable;return Oe(e)?e:void 0},je=t=>{t.currentIntent="none"},We=async(t,e)=>{let s=N(e),r=await R({path:"./assets/orchestrator/t9n",locale:I(e)});if(t.agentExecutionContext.userRequest){let i=new se(t.agentExecutionContext.userRequest.trim());t.agentExecutionContext.messages=[...t.agentExecutionContext.messages,i],je(t)}let n=s?.services.agentRegistry.list().map(i=>i.agent.id)??[];return await b({text:r.availableAgents.replace("{agentIds}",[...n].join(", "))},e),await b({text:r.analyzingUserInput},e),t},Ne=async(t,e)=>{let s=await R({path:"./assets/orchestrator/t9n",locale:I(e)});return await b({text:s.exiting},e),t},fe=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),He=(t,e)=>{if(!fe(t)){t!==void 0&&console.warn(`Agent "${e}" returned invalid sharedStatePatch. Ignoring it.`);return}let s={};for(let[r,n]of Object.entries(t)){if(!fe(n)||!("value"in n)){console.warn(`Agent "${e}" returned invalid sharedStatePatch entry for key "${r}". Ignoring that entry.`);continue}s[r]={value:n.value}}return s},ze=t=>{let{previousSharedState:e,patch:s,agentId:r}=t;if(!s)return e;let n=Date.now(),i={...e};for(let[c,a]of Object.entries(s))a?.value!==void 0&&(i[c]={value:a.value,meta:{updatedByAgentId:r,updatedAt:n}});return i},Be=256,Ve=new Set(["point","polyline","polygon","extent","custom"]),Ge=t=>typeof t=="object"&&t!==null&&!Array.isArray(t),Qe=(t,e)=>{if(t===void 0)return;if(!Array.isArray(t)){console.warn(`Agent "${e}" returned invalid sharedResourceAdditions. Ignoring it.`);return}let s=[];for(let[r,n]of t.entries()){if(!Ge(n)||typeof n.kind!="string"||!Ve.has(n.kind)||typeof n.description!="string"||!n.description.trim()||!("payload"in n)||n.payload===void 0){console.warn(`Agent "${e}" returned invalid sharedResourceAdditions entry at index ${r}. Ignoring that entry.`);continue}let i;try{i=structuredClone(n.payload)}catch{console.warn(`Agent "${e}" returned invalid sharedResourceAdditions entry at index ${r}. Ignoring that entry.`);continue}s.push({kind:n.kind,description:n.description.trim().slice(0,Be),payload:i})}return s.length?s:void 0},Je=t=>{let{previousSharedResources:e,additions:s,agentId:r}=t;if(!s?.length)return e;let n=Date.now(),i=s.map(c=>({...c,id:q(),meta:{createdByAgentId:r,createdAt:n}}));return[...e,...i].slice(-50)},be=t=>typeof t!="string"?void 0:t.trim()||void 0,Ze=t=>{switch(t){case"failed":return"Agent failed without a summary.";case"unknown":return"Agent returned with unknown status.";case"success":return"Agent completed without a summary.";default:return"Agent completed without a summary."}},Ke=(t,e)=>{let s=be(e?.outputMessage),r=be(e?.summary),n=e?.status,i=n==="success"||n==="failed"?n:"unknown";i==="unknown"&&console.warn(`Agent "${t}" returned missing/invalid status. Defaulting to "unknown".`);let c=He(e?.sharedStatePatch,t),a=Qe(e?.sharedResourceAdditions,t);return{outputMessage:s,summary:r??s??Ze(i),status:i,sharedStatePatch:c,sharedResourceAdditions:a}},we=4e3,Xe=async(t,e)=>{let s=N(e),r=await R({path:"./assets/orchestrator/t9n",locale:I(e)});if(e?.signal?.aborted)return await b({text:r.runCancelledAgentExecution},e),{...t,currentIntent:"none",requiresFollowUp:!1};let{agentRegistry:n}=s?.services??{},i=n?.get(t.currentIntent);if(!i)return console.warn(r.noAgentFoundForIntent.replace("{intent}",t.currentIntent)),t;await b({text:r.executingRegisteredAgent.replace("{agentName}",i.agent.name)},e);let c={...e??{},metadata:{...e?.metadata,agentId:i.agent.id},configurable:{...s??{},agentId:i.agent.id,context:i.getContext?await i.getContext():void 0}},a;try{let l=await i.agent.createGraph().compile().invoke({agentExecutionContext:{...t.agentExecutionContext,messages:[...t.agentExecutionContext.messages],priorSteps:structuredClone(t.agentExecutionContext.priorSteps??[]),sharedState:structuredClone(t.agentExecutionContext.sharedState??{}),sharedResources:structuredClone(t.agentExecutionContext.sharedResources??[])}},c);a=Ke(i.agent.name,l),await b({text:r.finishedExecutingRegisteredAgent.replace("{agentName}",i.agent.name)},e)}catch(l){if(te(l)||e?.signal?.aborted||l instanceof Error&&l.name==="AbortError")throw l;let u=l instanceof Error?l.message:String(l);console.error(`Agent "${i.agent.name}" failed:`,l),await b({text:r.registeredAgentFailed.replace("{agentName}",i.agent.name).replace("{error}",u)},e),a={status:"failed",outputMessage:r.agentExecutionFailed.replace("{error}",u),summary:r.agentExecutionFailed.replace("{error}",u)}}let d=a.outputMessage,o=[...t.agentExecutionContext.messages];if(d){let l=d.length>we?`${d.slice(0,we-14)}
7
7
  [truncated]`:d;o.push(new F(l))}return{...t,stepCount:t.stepCount+1,lastExecutedAgent:i.agent.id,requiresFollowUp:a.status==="failed"?!0:t.requiresFollowUp,finalOutputMessage:d??"",agentExecutionContext:{...t.agentExecutionContext,messages:o,priorSteps:[...t.agentExecutionContext.priorSteps??[],{agentId:i.agent.id,assignedTask:t.agentExecutionContext.assignedTask,summary:a?.summary||r.noSummaryProvided,status:a?.status||"unknown"}],sharedState:ze({previousSharedState:t.agentExecutionContext.sharedState,patch:a.sharedStatePatch,agentId:i.agent.id}),sharedResources:Je({previousSharedResources:t.agentExecutionContext.sharedResources,additions:a.sharedResourceAdditions,agentId:i.agent.id})}}},Ye=async t=>{let{agent:e,messages:s,config:r}=t;return{structuredResponse:(await e.invoke({messages:s},r)).structuredResponse}},et=p.object({id:p.string().min(1),name:p.string().min(1),description:p.string().min(1)});p.array(et);var ve=t=>JSON.stringify(t,null,2),tt=t=>{let e=t.map(r=>r.id),s=p.enum(e);return p.object({intent:s.nullable(),assignedTask:p.string().nullable(),requiresFollowUp:p.boolean()})},st=async(t,e)=>{let s=N(e),r=await R({path:"./assets/orchestrator/t9n",locale:I(e)});if(e?.signal?.aborted)return await b({text:r.runCancelled},e),{...t,currentIntent:"none",finalOutputMessage:r.runCancelled,requiresFollowUp:!1};try{await b({text:r.routingToAgent},e);let n=s.services.agentRegistry?.list()??[],i=n.map(({agent:E})=>({id:E.id,name:E.name,description:E.description}));if(!i.length)return await b({text:r.noAgentsRegisteredTrace},e),{...t,currentIntent:"none",finalOutputMessage:r.noAgentsRegisteredMessage};let c=await me("intent_prompt"),a=ve(i),d=tt(i),o={registeredAgents:a,priorSteps:ve(t.agentExecutionContext.priorSteps),userRequest:t.agentExecutionContext.userRequest},l=await ne.fromTemplate(c).format(o),u=de({model:await U({modelTier:"fast",config:e}),tools:[],systemPrompt:l,responseFormat:d,middleware:[ue({model:await U({modelTier:"fast",config:e}),trigger:{tokens:4e3},keep:{messages:6}}),ge({runLimit:2})]}),{structuredResponse:g}=await Ye({agent:u,messages:t.agentExecutionContext.messages,config:e}),h=d.parse(g??{intent:null,assignedTask:null,requiresFollowUp:!1}),m=h.intent??"none",f={...t,currentIntent:m,requiresFollowUp:h.requiresFollowUp,agentExecutionContext:{...t.agentExecutionContext,assignedTask:h.assignedTask??""}};if(m==="none"){let E=r.noMatchingAgentMessage.replace("{agentNames}",n.map(({agent:S})=>S.name).join(", "));return await b({text:r.noMatchingAgentTrace},e),{...t,currentIntent:m,requiresFollowUp:!1,finalOutputMessage:E,agentExecutionContext:{...t.agentExecutionContext,assignedTask:"",messages:[...t.agentExecutionContext.messages,new F(E)],priorSteps:[...t.agentExecutionContext.priorSteps??[],{agentId:"no-intent-router",assignedTask:t.agentExecutionContext.userRequest,summary:"No matching agent found; asked user to rephrase.",status:"failed"}]}}}return await b({text:r.agentPicked.replace("{intent}",m).replace("{assignedTask}",h.assignedTask??"").replace("{requiresFollowUp}",String(h.requiresFollowUp))},e),f}catch(n){throw await b({text:r.intentDetectionErrorTrace},e),new Error(r.intentDetectionError.replace("{error}",n instanceof Error?n.message:String(n)))}},rt=async(t,e)=>{let s=await R({path:"./assets/orchestrator/t9n",locale:I(e)});if(t.routing.mode!=="direct")throw new Error(s.directAgentAssignmentRequiresDirectRouting);return await b({text:s.directRouteToAgent.replace("{agentId}",t.routing.agentId)},e),{...t,currentIntent:t.routing.agentId,requiresFollowUp:!1,agentExecutionContext:{...t.agentExecutionContext,assignedTask:t.agentExecutionContext.userRequest}}},nt=3,it=t=>t.routing.mode==="direct"?"assignDirectAgent":"intentLLM",at=t=>t.routing.mode==="direct"||t.stepCount>=nt||!t.requiresFollowUp?"exit":"intentLLM",ot=()=>new ae(Ue).addNode("ingestInput",We).addNode("assignDirectAgent",rt).addNode("intentLLM",st).addNode("executeRegisteredAgent",Xe).addNode("exit",Ne).addEdge(Y,"ingestInput").addConditionalEdges("ingestInput",it).addEdge("assignDirectAgent","executeRegisteredAgent").addConditionalEdges("intentLLM",t=>t.currentIntent==="none"||t.currentIntent===t.lastExecutedAgent?"exit":"executeRegisteredAgent").addConditionalEdges("executeRegisteredAgent",at).addEdge("exit",ee),lt=(t,e)=>{let s=t.output?.usage_metadata??e.usage_metadata,r=t.output?.llmOutput?.tokenUsage,n=s?.input_tokens??r?.promptTokens,i=s?.output_tokens??r?.completionTokens,c=s?.total_tokens??r?.totalTokens;if(n===void 0||i===void 0||c===void 0)return;let a=s?.input_token_details?.cache_read,d=s?.input_token_details?.cache_creation,o=s?.output_token_details?.reasoning;return{input:n,output:i,total:c,...a!==void 0&&{cacheRead:a},...d!==void 0&&{cacheWrite:d},...o!==void 0&&{reasoning:o}}},ct=(t,e,s,r)=>{switch(t){case"chat_model":case"llm":return"model";case"tool":case"retriever":return t;case"chain":return!r||e==="LangGraph"?"workflow":s===e?"node":"chain";default:return}},dt=t=>{if(t instanceof Error)return{message:t.message,name:t.name};let e=t,s=typeof e?.message=="string"?e.message:String(t??"Unknown runtime error"),r=typeof e?.name=="string"?e.name:void 0;return{message:s,...r&&{name:r}}},ut=({event:t,runId:e,parentSpanId:s,timestamp:r})=>{let n=/^on_(.+)_(start|end|error)$/u.exec(t.event);if(!n)return;let[,i,c]=n,a=t.metadata??{},d=a.langgraph_node,o=ct(i,t.name,d,s);if(!o)return;let l=a.agentId,u=a.model??a.ls_model_name,g=t.data,h=c==="end"&&o==="model"?lt(g,a):void 0,m=t.tags?.includes("langsmith:hidden")||d==="__start__",f={...u&&{model:u},...h&&{tokenUsage:h},...m&&{internal:!0}},E={id:t.run_id,...s&&{parentId:s},label:t.name,type:o,...Object.keys(f).length&&{metadata:f}},S={runId:e,timestamp:r,type:"runtime",...l&&{agentId:l}};switch(c){case"start":return{...S,phase:"started",span:{...E,...g?.input!==void 0&&{input:g.input}}};case"end":return{...S,phase:"completed",span:{...E,...g?.output!==void 0&&{output:g.output}}};case"error":return{...S,phase:"failed",span:{...E,error:dt(g?.error)}};default:return}},T=class{constructor(){this.agentRegistry=new Map}register(e){let{agent:s}=e;if(this.agentRegistry.has(s.id))throw new Error(`Duplicate agent id: ${s.id}`);this.agentRegistry.set(s.id,e)}get(e){return this.agentRegistry.get(e)}list(){return[...this.agentRegistry.values()]}},W=class{constructor(e,s){this.graph=e,this.config={...s}}async waitForUser(){return await new Promise((e,s)=>{this.resolveWait=e,this.rejectWait=s})}handle(e,s){try{let r={agentId:e.agentId,id:e.id,payload:s},n=this.graph.streamEvents(null,{...this.config,configurable:{...this.config.configurable,hitlResponse:r},subgraphs:!0,version:"v2"});this.resolveWait?.(n)}catch(r){this.rejectWait?.(r)}finally{this.resolveWait=void 0,this.rejectWait=void 0}}cancel(){this.rejectWait&&(this.rejectWait(new Error("Request cancelled by user.")),this.resolveWait=void 0,this.rejectWait=void 0)}},_e=async(t,e)=>{let s=e.get(t);if(s)return s;let r=await he([t]);return e.set(t,r[0]),r[0]};async function gt(t,e,s,r){let n=`req-${Date.now()}`,i={type:"layerSearch",precomputedEmbedding:r?await _e(t,r):void 0,requestId:n,minScore:s};return await new Promise(c=>{let a=d=>{d.data.requestId===n&&c(d.data.results)};e.addEventListener("message",a,{once:!0}),e.postMessage(i)})}function ht(t){let{worker:e}=t;return{async searchLayers({text:s,minScore:r,embeddingCache:n}){return await gt(s,e,r,n)}}}var pt=async({combinedQuery:t,layerIds:e,embeddingsWorker:s,minScore:r,topResults:n,embeddingCache:i})=>{let c=`req-${Date.now()}`,a=i?await _e(t,i):void 0,d={type:"fieldSearch",layerIdForFieldsSearch:e,precomputedEmbedding:a,requestId:c,minScore:r,topResults:n};return await new Promise(o=>{let l=u=>{if(u.data.requestId!==c)return;let g=u.data.results.map(({layerId:h,results:m})=>({layerId:h,results:m}));o(g)};s.addEventListener("message",l,{once:!0}),s.postMessage(d)})};function mt(t){let{worker:e}=t;return{async searchFields({text:s,layerIds:r,minScore:n,topResults:i,embeddingCache:c}){return await pt({combinedQuery:s,layerIds:r,embeddingsWorker:e,minScore:n,topResults:i,embeddingCache:c})}}}var yt=t=>{let e=ye.safeParse(t);if(!e.success)throw new Error("Embeddings response validation failed. Regenerate embeddings.");return e.data},ft=(t,e)=>{let s=new Map,r=new Map;if(e.allLayers.forEach(n=>{n instanceof De&&r.set(n.id,n)}),t.length!==r.size)throw new Error("Layer count mismatch during registry restoration. Regenerate embeddings.");for(let n of t){let i=r.get(n.id);if(!i)throw new Error(`Layer with ID ${n.id} not found in the original map during registry restoration. Regenerate embeddings.`);if(n.fields.length!==i.fields.length)throw new Error(`Field count mismatch for layer ID ${n.id} during registry restoration. Regenerate embeddings.`);let c={name:n.name,title:n.title,description:n.description},a=new Map;for(let d of n.fields){let o=i.fieldsIndex.get(d.name);if(!o)throw new Error(`Field with name ${d.name} not found in the original layer ${n.id} during registry restoration. Regenerate embeddings.`);a.set(d.name,{name:d.name,alias:i.getFieldAlias(d.name)??d.alias,description:d.description,type:o.type||"unknown",valueType:o.valueType||"unknown",domain:i.getFieldDomain(d.name)??void 0})}s.set(n.id,{layerItem:c,fieldRegistry:a})}return s},bt=async t=>{try{return(await Le(t,{responseType:"json"})).data}catch(e){throw new Error(`Failed to fetch data from ${t}: ${String(e)}`)}},wt=async t=>{let e=t.map;if(!e?.portalItem)throw new Error("WebMap portal item is missing.");let{resources:s}=await e.portalItem.fetchResources(),r=s.find(i=>i.resource.path==="embeddings-v01.json");if(!r?.resource.url)throw new Error("Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.");let n=await bt(r.resource.url);return yt(n)},D=class t{constructor(){this.orchestratorReady=!1,this.chatHistory=[],this.priorSteps=[],this.sharedState={},this.sharedResources=[],this.agentRegistry=new T,this.activeRunId="",this.cancelledRunIds=new Set,this.parentRunIds=new Map,this.activeRuntimeSpans=new Map,this.runtimeEventsEnabled=!1,this.streamEpoch=0}static async init(e){let s=new t;s.runtimeEventsEnabled=e.runtimeEventsEnabled??!1;try{if(e.view?.map){await Ee.whenOnce(()=>e.view.ready);let r=await wt(e.view),n=ft(r.layers,e.view.map);s.layersAndFieldsRegistry=n,s.embeddingsWorker=await qe(r)}return e.agents?.forEach(r=>{s.agentRegistry.register(r)}),s.orchestratorReady=!0,s}catch(r){throw console.error("Orchestrator initialization failed:",r),r}}async*ask(e,s={}){if(!this.orchestratorReady)throw new Error("Orchestrator is not ready yet.");if(!this.agentRegistry.list().length)throw new Error("Orchestrator has no registered agents.");let r=this.createRequestAgentRegistry(s);if(!r.list().length)throw new Error("Orchestrator has no agents selected for this request.");if(++this.streamEpoch,!e.trim()&&!s.inputParts?.length)return;if(!e.trim()&&s.routing!=="direct")throw new Error("Requests containing only structured input require direct agent routing.");let n=q();this.parentRunIds.clear(),this.activeRuntimeSpans.clear(),this.activeRunId=n,this.activeAbortController=new AbortController,this.graph||(this.graph=ot().compile({checkpointer:new ie}));let i=this.embeddingsWorker?ht({worker:this.embeddingsWorker}):void 0,c=this.embeddingsWorker?mt({worker:this.embeddingsWorker}):void 0,a=new Map,d=s.routing==="direct"?{mode:"direct",agentId:s.agentId}:{mode:"auto"},o={thread_id:n,locale:s.locale??"en",hitlResponse:null,services:{layerSearch:i,fieldSearch:c,layersAndFieldsRegistry:this.layersAndFieldsRegistry,agentRegistry:r,embeddingCache:a}},l={version:"v2",streamMode:"custom",signal:this.activeAbortController.signal,...this.runtimeEventsEnabled&&{callbacks:[this.createHierarchyCallback()]},configurable:o,subgraphs:!0},u=this.graph?.streamEvents({routing:d,agentExecutionContext:{userRequest:e,inputParts:[...s.inputParts??[]],messages:this.chatHistory,priorSteps:this.priorSteps,sharedState:this.sharedState,sharedResources:this.sharedResources}},l),g=++this.streamEpoch;if(yield*this.pipeStream(u,g,n),this.isRunCancelled(n)){yield*this.createCancellationEvents(n);return}for(;;){if(this.isRunCancelled(n)){yield*this.createCancellationEvents(n);return}let m=(await this.graph.getState(l,{subgraphs:!0})).tasks.find(f=>f.interrupts.length>0)?.interrupts[0]?.value;if(!m)break;this.currentInterrupt=m,this.interruptHandler=new W(this.graph,l),yield*this.closeActiveRuntimeSpans(n,"interrupted"),yield{runId:n,timestamp:Date.now(),type:"interrupt",interrupt:m};try{let f=await this.interruptHandler.waitForUser(),E=++this.streamEpoch;yield*this.pipeStream(f,E,n)}catch(f){if(this.isRunCancelled(n)){yield*this.createCancellationEvents(n);return}if(f){yield{runId:n,timestamp:Date.now(),type:"error",error:{message:f?.message}};return}}}if(this.isRunCancelled(n)){yield*this.createCancellationEvents(n);return}let h=(await this.graph.getState(l,{subgraphs:!0})).values;if(this.isRunCancelled(n)){yield*this.createCancellationEvents(n);return}this.chatHistory=h.agentExecutionContext.messages.length?h.agentExecutionContext.messages:this.chatHistory,this.priorSteps=h.agentExecutionContext.priorSteps?.slice(-5)??[],this.sharedState=h.agentExecutionContext.sharedState??{},this.sharedResources=h.agentExecutionContext.sharedResources??[],yield{runId:n,timestamp:Date.now(),type:"completed",result:{content:h.finalOutputMessage}}}newConversation(){this.chatHistory=[],this.priorSteps=[],this.sharedState={},this.sharedResources=[]}resumeInterrupt(e){if(!this.currentInterrupt||!this.interruptHandler)throw new Error("No pending interrupt to resume.");this.interruptHandler.handle(this.currentInterrupt,e)}cancelInterrupt(){this.interruptHandler&&this.interruptHandler.cancel()}cancel(){this.activeRunId&&(this.cancelledRunIds.add(this.activeRunId),this.activeAbortController?.abort(),++this.streamEpoch,this.interruptHandler?.cancel())}async*pipeStream(e,s,r){try{for await(let n of e){if(this.isRunCancelled(r)||s!==this.streamEpoch)break;if(this.runtimeEventsEnabled){let i=ut({event:n,runId:r,parentSpanId:this.parentRunIds.get(n.run_id),timestamp:Date.now()});i&&(i.phase==="started"?this.activeRuntimeSpans.set(i.span.id,i):this.activeRuntimeSpans.delete(i.span.id),yield i)}n.event==="on_custom_event"&&n.name==="trace_message"?yield{runId:r,timestamp:Date.now(),type:"trace",data:n.data}:n.name==="graph_ux_suggestion"&&(yield{runId:r,timestamp:Date.now(),type:"ux-suggestion",suggestion:n.data})}}catch(n){if(!this.isRunCancelled(r))throw n}}*createCancellationEvents(e){yield*this.closeActiveRuntimeSpans(e,"cancelled"),yield{runId:e,timestamp:Date.now(),type:"cancelled",reason:"user"}}*closeActiveRuntimeSpans(e,s){let r=Date.now(),n=[...this.activeRuntimeSpans.values()].reverse();this.activeRuntimeSpans.clear();for(let i of n){let{input:c,...a}=i.span;yield{type:"runtime",phase:s,runId:e,timestamp:r,...i.agentId&&{agentId:i.agentId},span:a}}}createHierarchyCallback(){let e=(s,r)=>{r&&this.parentRunIds.set(s,r)};return re.fromMethods({handleLLMStart:(s,r,n,i)=>e(n,i),handleChatModelStart:(s,r,n,i)=>e(n,i),handleChainStart:(s,r,n,i)=>e(n,i),handleToolStart:(s,r,n,i)=>e(n,i),handleRetrieverStart:(s,r,n,i)=>e(n,i)})}isRunCancelled(e){return this.cancelledRunIds.has(e)}createRequestAgentRegistry(e){let s=e.routing==="direct"?[e.agentId]:e.agentIds,r=s?s.map(i=>{let c=this.agentRegistry.get(i);if(!c)throw new Error(`Agent is not registered: ${i}`);return c}):this.agentRegistry.list(),n=new T;return r.forEach(i=>n.register(i)),n}dispose(){this.sharedResources=[],this.embeddingsWorker&&(this.embeddingsWorker.terminate(),this.embeddingsWorker=void 0),this.orchestratorReady=!1}};var St=B`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;function H(t){return t.trim()?O.lexer(t).filter(e=>e.type!=="space").map(e=>O.parser([e])):[]}var L=class{constructor(){this._stableParts=[],this._stableText="",this._rawText=""}push(e){return this._rawText+=e,this._advanceStableBoundary(),this.getParts()}finalize(){let e=this._rawText.slice(this._stableText.length);return e.trim()&&(this._stableParts.push(...H(e)),this._stableText=this._rawText),this._stableParts}getParts(){let e=this._trimIncompleteTail(this._rawText.slice(this._stableText.length)),s=e.trim()?H(e):[];return[...this._stableParts,...s]}reset(){this._stableParts=[],this._stableText="",this._rawText=""}_advanceStableBoundary(){let e=this._rawText.slice(this._stableText.length),s=this._lastSafeBoundary(e);if(s<=0)return;let r=e.slice(0,s);this._stableParts.push(...H(r)),this._stableText+=r}_lastSafeBoundary(e){let s=e.split(`
8
8
  `),r=!1,n=0,i=0;for(let c of s)/^\s*(```|~~~)/u.test(c)&&(r=!r),i+=c.length+1,c.trim()===""&&!r&&(n=i);return n<e.length?n:0}_trimIncompleteTail(e){let s=e.lastIndexOf("<");if(s!==-1&&!e.includes(">",s))return e.slice(0,s);let r=this._earliestUnclosedTag(e);if(r!==-1)return e.slice(0,r);let n=e.lastIndexOf("[");if(n!==-1){let i=e.slice(n);if(!/\[[^\]]*\]\([^)]*\)/u.test(i))return e.slice(0,n)}return e}_earliestUnclosedTag(e){let s=new Set(["br","img","hr","input","meta","link","area","base","col","embed","source","track","wbr"]),r=/<(\/?)([a-zA-Z][\w-]*)\b[^>]*?(\/?)>/gu,n=[];for(let i=r.exec(e);i;i=r.exec(e)){let[,c,a,d]=i,o=a.toLowerCase();if(!(s.has(o)||d==="/"))if(c==="/"){for(let l=n.length-1;l>=0;l--)if(n[l].name===o){n.splice(l);break}}else n.push({name:o,index:i.index})}return n.length?n[0].index:-1}};function Ct(t){let e=new L;return e.push(t),e.finalize()}var At=async t=>await new Promise(e=>setTimeout(e,t));async function*$t(t,{chunkSize:e=15,delay:s=50}={}){let r=new L;for(let n=0;n<t.length;n+=e)yield r.push(t.slice(n,n+e)),await At(s);yield r.finalize()}var Pt=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,_=(t,e,s,r)=>{for(var n=r>1?void 0:r?Mt(e,s):e,i=t.length-1,c;i>=0;i--)(c=t[i])&&(n=(r?c(e,s,n):c(n))||n);return r&&n&&Pt(e,s,n),n},xe=t=>!t||typeof t!="object"?!1:t.name==="AbortError";async function*Ie(t,e,s,r,n=!1){if(n){if(r?.aborted){yield{type:"cancelled",log:s,runId:e};return}yield{type:"block-data",blockType:"text",data:{parts:Ct(t)},runId:e};return}for await(let i of $t(t)){if(r?.aborted){yield{type:"cancelled",log:s,runId:e};return}yield{type:"block-data",blockType:"text",data:{parts:i},runId:e}}}var v=class extends It{constructor(t){super(t),this.view=null,this.streamingDisabled=!1,this.runtimeEventsEnabled=!1,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await Et(()=>!this.view.updating),this._set("orchestrator",await D.init({agents:[...this.agents],runtimeEventsEnabled:this.runtimeEventsEnabled,view:this.view??void 0})),this.addHandles([_t(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(t,e,s){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let r=[],n,i="pending";try{let c=this.orchestrator.ask(t,e);for await(let a of c)switch(i=a.runId,a.type){case"runtime":{yield{type:"runtime",event:a,runId:i};break}case"trace":{this._set("processingStep",a.data.text),r.push(a.data.text);break}case"completed":{this._set("processing",!1),this._set("processingStep","");let d=a.result,o=!!d.content.length,l=!!n?.length;if(!o&&!l){yield{type:"completed",error:"No response received.",log:r,runId:i};return}let u=d.content;if(yield{type:"block-start",blockType:"text",runId:i},yield*Ie(u,i,r,s,this.streamingDisabled),yield{type:"block-end",blockType:"text",runId:i},l)for(let g of n){if(s?.aborted){yield{type:"cancelled",log:r,runId:i};return}let{type:h,data:m}=g;if(yield{type:"block-start",blockType:h,runId:i},h==="text"){let f=typeof m?.content=="string"?m.content:"";yield*Ie(f,i,r,s,this.streamingDisabled)}else yield{type:"block-data",blockType:h,data:m,runId:i};yield{type:"block-end",blockType:h,runId:i}}yield{type:"completed",response:u,blocks:n,log:r,runId:i};return}case"ux-suggestion":{let d=a.suggestion;n=n?[...n,d]:[d];break}case"interrupt":{let{kind:d,message:o,metadata:l}=a.interrupt,u=Array.isArray(l)?l.filter(h=>typeof h=="string"):[],g=(()=>{switch(d){case"booleanChoice":return{type:"boolean-choice",message:o,options:u};case"singleSelection":return{type:"single-select",message:o,options:u};case"multipleSelection":return{type:"multi-select",message:o,options:u};case"textInput":return{type:"text-input",message:o};default:return{type:d,message:o,options:u}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:g,runId:i};break}case"cancelled":{yield{type:"cancelled",log:r,runId:i};return}case"error":{if(s?.aborted||xe(a.error)){yield{type:"cancelled",log:r,runId:i};return}yield{type:"completed",error:a.error.message,log:r,runId:i};return}default:{console.warn("Unknown event type:",a);break}}}catch(c){if(s?.aborted||xe(c)){yield{type:"cancelled",log:r,runId:i};return}console.warn("Error during message processing:",c),yield{type:"completed",error:this.messages.messageProcessingErrorMessage,log:r,runId:"error"};return}finally{this._set("processing",!1)}}cancel(){this.orchestrator?.cancel()}};_([k({readOnly:!0})],v.prototype,"orchestrator",2);_([k()],v.prototype,"agents",2);_([k()],v.prototype,"portal",2);_([k()],v.prototype,"view",2);_([k()],v.prototype,"messages",2);_([k()],v.prototype,"streamingDisabled",2);_([k()],v.prototype,"runtimeEventsEnabled",2);_([k({readOnly:!0})],v.prototype,"loading",2);_([k({readOnly:!0})],v.prototype,"processing",2);_([k({readOnly:!0})],v.prototype,"processingStep",2);v=_([Rt("OrchestratorController")],v);var Tt="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",Dt="Embeddings not found for this web map.",Lt="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",z=class extends Q{constructor(){super(...arguments),this._messages=Z({blocking:!0}),this.#e=P(),this.#o=P(),this.#r=P(),this.#t=null,this.#n=new Map,this.#s=xt.getDefault(),this.#i=e=>{e.stopPropagation(),this.cancelInterrupt()},this.#a=e=>{e.stopPropagation();let s=e.detail;this.submitInterrupt(s)},this.#l=e=>{if(e.stopPropagation(),e.defaultPrevented)return;let s=e.detail,r=typeof s=="string"?s:s.prompt,n=typeof s=="string"?void 0:{displayText:s.displayText,parts:s.parts};if(!this.#y(r,n?.parts??[])){e.preventDefault();return}if(this.arcgisSubmit.emit(s).defaultPrevented){e.preventDefault();return}this.keepSuggestedPrompts||(this.suggestedPrompts=[]),this._inputValue="",this.submitMessage(r,n)},this.#c=e=>{if(this._canceling=!0,e.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this._orchestratorController?.cancel(),this.#t?.abort(),this.#t=null},this.#d=e=>{e.stopPropagation();let s=e.detail;this.arcgisFeedback.emit(s)},this.#u=e=>{e.stopPropagation();let s=e.detail;this._inputValue=s.prompt,this.arcgisPromptSelect.emit(s)},this.#p=e=>{this.arcgisSlottableRequest.emit(e.detail)},this._orchestratorController=null,this._interrupt=null,this._interruptDetails=[],this._error=null,this._submissionError=null,this._inputValue="",this._isAnswering=!1,this._canceling=!1,this.messages=new vt([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.streamingDisabled=!1,this.runtimeEventsEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.assistantAvatarEnabled=!1,this.userAvatarEnabled=!1,this.arcgisCancel=w(),this.arcgisError=w(),this.arcgisFeedback=w(),this.arcgisInterrupt=w(),this.arcgisInterruptCancel=w(),this.arcgisInterruptSubmit=w(),this.arcgisPromptSelect=w(),this.arcgisReady=w(),this.arcgisResponse=w(),this.arcgisRuntime=w({bubbles:!1,composed:!1}),this.arcgisSlottableRequest=w({bubbles:!1,composed:!1}),this.arcgisSubmit=w({cancelable:!0})}static{this.properties={_orchestratorController:16,_interrupt:16,_interruptDetails:16,_error:16,_submissionError:16,_inputValue:16,_isAnswering:16,_signedInUserId:16,_canceling:16,_isSignedIn:16,_user:16,awaitingResponse:32,awaitingResponseStep:32,interrupt:32,messages:0,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,alwaysUseAgentId:1,allowedAgentIds:[1,{type:Array}],commandProvider:0,entityProviders:0,suggestedPrompts:[1,{type:Array}],feedbackEnabled:5,keepSuggestedPrompts:5,streamingDisabled:5,runtimeEventsEnabled:5,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5,assistantAvatarEnabled:5,userAvatarEnabled:5}}static{this.styles=St}#e;#o;#r;#t;#n;#s;#i;#a;#l;#c;#d;#u;#p;get _isSignedIn(){return!!this.#s?.user||!!this._signedInUserId}get _user(){return this.#s?.user?.fullName||this.#s?.user?.username}get awaitingResponse(){return this._orchestratorController?.processing??!1}get awaitingResponseStep(){return this._orchestratorController?.processingStep??""}get interrupt(){return this._interrupt}get orchestrator(){return this._orchestratorController?.orchestrator}cancelInterrupt(){this.arcgisInterruptCancel.emit(),this.orchestrator?.cancelInterrupt(),this._interrupt=null}async clearChatHistory(){this._reset(),this._orchestratorController?.clearChatHistory()}register(e){this.#n.set(e.agent.id,e),this._orchestratorController&&this.#g()}submitInterrupt(e){this.arcgisInterruptSubmit.emit(e),this._interrupt&&(this._interruptDetails=[...this._interruptDetails,{interrupt:this._interrupt,response:e}]),this.orchestrator?.resumeInterrupt(e),this._interrupt=null}async submitMessage(e,s){let r=e.trim(),n=s?.parts??[];if(!r&&!n.length||!this.#y(r,n)||(this.messages.push({id:Date.now().toString(),role:"user",content:s?.displayText?.trim()||r||n.map(o=>this.#f(o)).join(" "),parts:n}),!this._orchestratorController))return;this.#t=new AbortController,this._orchestratorController.streamingDisabled=this.streamingDisabled;let i=this.#m(n),c=this._messages._t9nLocale||"en",a={...s?.parts?{inputParts:s.parts}:{},...i?{routing:"direct",agentId:i}:{routing:"auto",agentIds:this.allowedAgentIds},locale:c},d=this._orchestratorController.ask(r,a,this.#t?.signal);for await(let o of d){let l=o.runId,u=this.messages.at(-1);switch(o.type){case"runtime":this.arcgisRuntime.emit(o.event);break;case"block-start":{this._isAnswering=!0;let g={type:o.blockType,isPending:!0};if(u?.role==="assistant"&&u.id===l){let h=[...u.blocks??[],g];this.messages.splice(-1,1,{...u,blocks:h})}else this.messages.push({role:"assistant",blocks:[g],id:l,isStreaming:!0,interrupts:this._interruptDetails}),this._interruptDetails=[];break}case"block-data":{if(u?.role!=="assistant"||u?.id!==l)break;let g=[...u.blocks??[]],h=g[g.length-1],{blockType:m,data:f}=o;if(h?.type!==m||!h.isPending)break;m==="text"?g[g.length-1]={...h,data:{...h.data,parts:f?.parts}}:g[g.length-1]={...h,data:{...h.data,...f??{}}},this.messages.splice(-1,1,{...u,blocks:g});break}case"block-end":{if(u?.role!=="assistant"||u?.id!==l)break;let g=[...u.blocks??[]],h=g[g.length-1];if(h?.type!==o.blockType||!h.isPending)break;let m=h;g[g.length-1]={...m,data:{...m.data},isPending:!1},this.messages.splice(-1,1,{...u,blocks:g});break}case"completed":o.error?(this.messages.push({role:"assistant",log:o.log,error:o.error,id:l,interrupts:this._interruptDetails}),this._interruptDetails=[]):u?.role==="assistant"&&u.id===l&&this.messages.splice(-1,1,{...u,content:o.response,blocks:u.blocks?.map(g=>({...g,data:{...g.data},isPending:!1}))??[],isStreaming:!1,log:o.log}),this._isAnswering=!1,this.#t=null,this._canceling=!1;break;case"interrupt":this._interrupt={...o.payload,id:l},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":u?.role==="assistant"&&u.id===l?this.messages.splice(-1,1,{...u,blocks:u.blocks?.filter(g=>g.type==="text"||!g.isPending)??[],isStreaming:!1,log:o.log,error:`(${this._messages.stoppedByUserLabel})`}):(this.messages.push({role:"assistant",log:o.log,error:`(${this._messages.stoppedByUserLabel})`,id:l,interrupts:this._interruptDetails}),this._interruptDetails=[]),this._isAnswering=!1,this.#t=null,this._canceling=!1;break}}}unregister(e){this.#n.delete(e),this._orchestratorController&&this.#g()}load(){this.manager.onLifecycle(this._reset.bind(this))}loaded(){this.manager.onLifecycle(()=>{this.#e.value?.addEventListener("arcgisPromptSelect",this.#u),this.#e.value?.addEventListener("arcgisSubmit",this.#l),this.#e.value?.addEventListener("arcgisCancel",this.#c),this.#e.value?.addEventListener("arcgisFeedback",this.#d);let e=kt(()=>!!this._interrupt&&!!this.#r.value,()=>{let r=this.#r.value;r.removeEventListener("arcgisSubmit",this.#a),r.removeEventListener("arcgisCancel",this.#i),r.addEventListener("arcgisSubmit",this.#a,{once:!0}),r.addEventListener("arcgisCancel",this.#i,{once:!0})}),s=this.messages.on("after-add",r=>{let n=r.item;n.role==="assistant"&&(n.error||n.content)&&this.arcgisResponse.emit(n)});return queueMicrotask(()=>{this.#h()}),()=>{e.remove(),s.remove(),this.#e.value?.removeEventListener("arcgisPromptSelect",this.#u),this.#r.value?.removeEventListener("arcgisSubmit",this.#a),this.#r.value?.removeEventListener("arcgisCancel",this.#i),this.#e.value?.removeEventListener("arcgisSubmit",this.#l),this.#e.value?.removeEventListener("arcgisCancel",this.#c),this.#e.value?.removeEventListener("arcgisFeedback",this.#d),this._orchestratorController?.destroy(),this._orchestratorController=null}})}willUpdate(e){this.hasUpdated&&e.has("runtimeEventsEnabled")&&this._orchestratorController&&(this._orchestratorController.destroy(),this._orchestratorController=null,this.#h())}#f(e){return e.kind==="command"?`/${e.id}`:`${e.trigger}${e.id}`}#m(e){for(let s of e)if(s.kind==="command"&&s.agentId)return s.agentId;return this.alwaysUseAgentId}#y(e,s){let r=s.filter(n=>n.kind==="command").length>1;return this._submissionError=r?this._messages.multipleCommands:!e.trim()&&s.length>0&&!this.#m(s)?this._messages.partsOnlyRequiresAgent:null,this._submissionError?(this.arcgisError.emit(new Error(this._submissionError)),!1):!0}async#b(){await ke.checkSignInStatus(this.#s.url);let e=await this.#s.load();if(!e.helperServices?.aiAssistantServices?.url)throw new Error(this._messages.serviceUrlNotAvailableMessage);let s=!1,r=await e.fetchSettings();if(r.aiConfig?s=r.aiConfig.aiForOrg?.enabled===!0&&r.aiConfig.aiForOrg?.aiCapabilities?.aiAgents?.enabled===!0:s=r.aiAssistantsEnabled===!0,!s)throw new Error(this._messages.aiAssistantsNotEnabledMessage);if(!e.isPortal&&e?.user?.privileges?.includes("portal:user:useAIAssistants")!==!0)throw new Error(this._messages.userPrivilegesNotSufficientMessage)}async#g(){try{this._error=null;let e=pe(this.el,this.referenceElement);await e?.componentOnReady();let s=[...this.#n.values()];return s.length?(await this.#b(),this._orchestratorController?.destroy(),this._orchestratorController=new v({agents:s,portal:this.#s,runtimeEventsEnabled:this.runtimeEventsEnabled,streamingDisabled:this.streamingDisabled,view:e?.view,messages:this._messages}),await this._orchestratorController.load(),this.requestUpdate(),!0):(this._error=this._messages.noAgentsFoundMessage,!1)}catch(e){return this._error=e?.message??this._messages.orchestratorInitializationErrorMessage,G(this)(e),!1}}async#h(){await this.#g()?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))}_reset(){this._orchestratorController?.cancel(),this.#t?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._submissionError=null,this._inputValue="",this._signedInUserId=void 0}_renderEntryMessage(){return this._isSignedIn?this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:y`<calcite-notice open kind=brand closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:y`<slot name=entry-message></slot>`:this._renderSignInNotice()}_renderSignInNotice(){let e=this.#s;return y`<calcite-notice slot=entry-message open kind=brand icon width=full><div slot=message>${this._messages.signInRequiredMessage}</div>${e?y`<calcite-link slot=link @click=${async()=>{try{let s=await ke.getCredential(`${e.url}/sharing`);this._signedInUserId=s.userId,this._error=null,this.requestUpdate(),await this.#h()}catch(s){this._error=s?.message??this._messages.signInErrorMessage,this.arcgisError.emit(new Error(this._error)),V("error",this,"Error signing in:",{detail:{error:s}})}}} target=_blank title=${this._messages.signInToArcGISOnlineLabel??C}>${this._messages.signInLabel}</calcite-link>`:y`<div slot=link>${this._messages.noPortalInformationMessage}</div>`}</calcite-notice>`}_renderErrorNotice(){return this._error?y`<calcite-notice slot=entry-message open kind=brand icon width=full>${this._error===Tt?y`<div slot=message>${Dt}</div><calcite-link slot=link .href=${Lt} target=_blank title=${this._messages.learnAboutWebMapEmbeddingsLabel??C}>${this._messages.readMoreLabel}</calcite-link>`:y`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}render(){return y`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${M(this.#e)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(e=>e.role==="assistant"?y`<arcgis-assistant-message .message=${e} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#p} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${e.blocks?.map((s,r)=>y`<slot name=${j(e.id,r)??C} slot=${j(e.id,r)??C}><arcgis-assistant-message-block .block=${s}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:y`<arcgis-assistant-user-message .message=${e} .user=${this._user} .userAvatarEnabled=${this.userAvatarEnabled}></arcgis-assistant-user-message>`)}</slot>${this._interrupt?y`<div slot=message-loading><div class="interrupt-waiting-message">${this._messages.waitingForUserInputMessage}</div></div>`:y`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt?y`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${M(this.#r)}></arcgis-assistant-interrupt></slot>`:this.suggestedPrompts?.length?y`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}${this._submissionError?y`<div role=alert>${this._submissionError}</div>`:null}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse||this._isAnswering} .commandProvider=${this.commandProvider} .entityProviders=${this.entityProviders} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling||!this._isSignedIn||!!this._interrupt||!!this._error} ${M(this.#o)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse||this._isAnswering?"circle-stop":"send"} @click=${()=>{this.#o.value?.submitMessage()}} round>${this.awaitingResponse||this._isAnswering?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};J("arcgis-assistant",z);return z},"core/Collection","core/reactiveUtils","portal/Portal","identity/IdentityManager","portal/Portal","core/reactiveUtils","layers/FeatureLayer","request","core/Accessor","core/accessorSupport/decorators","identity/IdentityManager",a)