@arcgis/ai-components 5.2.0-next.110 → 5.2.0-next.111

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 (290) 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.d.ts +4 -5
  4. package/dist/agent-utils/LLMAgent.js +59 -59
  5. package/dist/agent-utils/WorkflowAgent.js +1 -1
  6. package/dist/agent-utils/index.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 +6 -6
  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/workflows/ConditionalWorkflow.js +1 -1
  13. package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
  14. package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
  15. package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
  16. package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
  17. package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
  18. package/dist/agentic-workflow/jsonTypes.d.ts +48 -8
  19. package/dist/agentic-workflow/nodes/HumanInTheLoopNode.d.ts +37 -0
  20. package/dist/agentic-workflow/types.d.ts +1 -1
  21. package/dist/agents/runtime/skill/createSkillAgent.d.ts +0 -1
  22. package/dist/agents/runtime/skill/createSkillAgent.js +50 -50
  23. package/dist/agents/runtime/skill/types.d.ts +2 -10
  24. package/dist/agents/runtime/skill/types.js +1 -1
  25. package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
  26. package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
  27. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +1 -1
  28. package/dist/agents/tools/help/listFields/adapter.js +1 -1
  29. package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
  30. package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
  31. package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
  32. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
  33. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
  34. package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
  35. package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
  36. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
  37. package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
  38. package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
  39. package/dist/agents/tools/query/getStatistics/adapter.js +1 -1
  40. package/dist/agents/tools/query/getTopFeatures/adapter.js +1 -1
  41. package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
  42. package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
  43. package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
  44. package/dist/agents/tools/shared/resolveToolArtifact.js +1 -1
  45. package/dist/agents/tools/shared/types.js +1 -1
  46. package/dist/cdn/2BNQ6A6J.js +2 -0
  47. package/dist/cdn/{FV6FHLYW.js → 2MWUBKWI.js} +2 -2
  48. package/dist/cdn/{GW3IVAAZ.js → 2O4DON37.js} +2 -2
  49. package/dist/cdn/{LL324IL6.js → 2W7LK4HA.js} +2 -2
  50. package/dist/cdn/33PB7ALY.js +2 -0
  51. package/dist/cdn/{FK2CVSXW.js → 33SFAZQG.js} +4 -4
  52. package/dist/cdn/{LLY5A2E2.js → 34O57OGV.js} +1 -1
  53. package/dist/cdn/{OALQBAZR.js → 3UEKINYC.js} +2 -2
  54. package/dist/cdn/434TAA3J.js +2 -0
  55. package/dist/cdn/{ZWIKFBOU.js → 4IU63OWQ.js} +2 -2
  56. package/dist/cdn/{XRVGYRXL.js → 5A355PGH.js} +2 -2
  57. package/dist/cdn/{TB2GJALS.js → 5HBAJ57P.js} +2 -2
  58. package/dist/cdn/{7Y43R7QJ.js → 5MK44FNO.js} +2 -2
  59. package/dist/cdn/{LXIKAXUT.js → 5Q2XRQS6.js} +2 -2
  60. package/dist/cdn/{UAZPINUQ.js → 6ECRQVHY.js} +2 -2
  61. package/dist/cdn/{BBEGLIZC.js → 6OOZSZRJ.js} +2 -2
  62. package/dist/cdn/6OUIUXAJ.js +2 -0
  63. package/dist/cdn/{Y4TYL2AL.js → 6P44KOKX.js} +2 -2
  64. package/dist/cdn/{LBTGOMCT.js → 73TMZQI5.js} +2 -2
  65. package/dist/cdn/{BJMGT6GV.js → 74CVYM72.js} +2 -2
  66. package/dist/cdn/{PJPP6LOS.js → 7EHOFQ2P.js} +2 -2
  67. package/dist/cdn/{24EIZVUM.js → 7KSFIRXB.js} +2 -2
  68. package/dist/cdn/{STOGCXJH.js → AHCXG7XF.js} +2 -2
  69. package/dist/cdn/{VLPELJUS.js → AOVJ34QE.js} +2 -2
  70. package/dist/cdn/{3KNLFIM3.js → APFZY4PI.js} +2 -2
  71. package/dist/cdn/{KBSXHSBX.js → AVRS6UCQ.js} +2 -2
  72. package/dist/cdn/{YOW3YKWR.js → AVZ5Y6BK.js} +2 -2
  73. package/dist/cdn/{477I66FH.js → AXTQU5YL.js} +11 -11
  74. package/dist/cdn/BBPD2AS7.js +2 -0
  75. package/dist/cdn/{HV7MVIQV.js → BFZ5S7NF.js} +2 -2
  76. package/dist/cdn/{HMMYCSOK.js → BL273EGZ.js} +2 -2
  77. package/dist/cdn/C7JPWFZE.js +2 -0
  78. package/dist/cdn/{KKCLHXHG.js → CCC6LBMY.js} +1 -1
  79. package/dist/cdn/{NNPA3NLK.js → CEKOEHB3.js} +2 -2
  80. package/dist/cdn/{W54XYT2A.js → CFAC4FN3.js} +2 -2
  81. package/dist/cdn/{53KIFJFA.js → COH3QXWG.js} +2 -2
  82. package/dist/cdn/{CX2HJ67C.js → DB2TFPIO.js} +2 -2
  83. package/dist/cdn/{EYGZJKVD.js → DE26DAW5.js} +2 -2
  84. package/dist/cdn/DG27JEYG.js +50 -0
  85. package/dist/cdn/DKA6PSYN.js +2 -0
  86. package/dist/cdn/{65LCK3GG.js → DQ2Z65UO.js} +2 -2
  87. package/dist/cdn/DWH23NJN.js +2 -0
  88. package/dist/cdn/EDXTPEEU.js +2 -0
  89. package/dist/cdn/{6KWGSXIN.js → ENM3L4AC.js} +2 -2
  90. package/dist/cdn/{XV7RMYLR.js → EVMIYZWD.js} +2 -2
  91. package/dist/cdn/{FHBRXZLV.js → EYOWRGDP.js} +2 -2
  92. package/dist/cdn/{45BDE3MG.js → EYY367WR.js} +2 -2
  93. package/dist/cdn/{27CK3JHY.js → F5NIRETW.js} +2 -2
  94. package/dist/cdn/{TFAJNKBC.js → FCI6M62J.js} +2 -2
  95. package/dist/cdn/{V4PJMCJZ.js → FDOMMK2M.js} +1 -1
  96. package/dist/cdn/{4OI4QEV7.js → FS7GXTTQ.js} +2 -2
  97. package/dist/cdn/{IHUWQOMK.js → FYZATVB3.js} +2 -2
  98. package/dist/cdn/{3PPXAIRE.js → H6P3WP5D.js} +2 -2
  99. package/dist/cdn/HHP5YLUI.js +2 -0
  100. package/dist/cdn/HIAQARIQ.js +2 -0
  101. package/dist/cdn/HMIDFTEI.js +2 -0
  102. package/dist/cdn/{4CFCV47G.js → HMNBUGH2.js} +2 -2
  103. package/dist/cdn/HR6GWPKX.js +2 -0
  104. package/dist/cdn/{V266DJ5V.js → ICBIUFK7.js} +2 -2
  105. package/dist/cdn/{BTOBEN7Q.js → IH26MIYY.js} +2 -2
  106. package/dist/cdn/{QAX6UF4L.js → IHP25JWI.js} +2 -2
  107. package/dist/cdn/{M2U456J5.js → IYLFJCJ2.js} +4 -4
  108. package/dist/cdn/{JMXXRRKQ.js → J6A4AS7E.js} +2 -2
  109. package/dist/cdn/{QTEPFTAU.js → JEBRN3EU.js} +2 -2
  110. package/dist/cdn/{G24MNC7D.js → JICNSK6Y.js} +2 -2
  111. package/dist/cdn/JQYLMTDP.js +2 -0
  112. package/dist/cdn/{275FFTBE.js → K5JVB6FU.js} +2 -2
  113. package/dist/cdn/K7XWGSLN.js +2 -0
  114. package/dist/cdn/{M3KKORBG.js → K7YQIJFT.js} +2 -2
  115. package/dist/cdn/KH4V4I3W.js +2 -0
  116. package/dist/cdn/KMLJS2VW.js +2 -0
  117. package/dist/cdn/{HNTSDY3J.js → LAVFUDUG.js} +2 -2
  118. package/dist/cdn/{L3BTURBA.js → LK7ZIQW6.js} +2 -2
  119. package/dist/cdn/{ZJWR4W2S.js → LOQ2PKV5.js} +58 -58
  120. package/dist/cdn/{X42ACC66.js → LXPGQNXQ.js} +2 -2
  121. package/dist/cdn/{TXZQZR3I.js → MJSIYEWN.js} +2 -2
  122. package/dist/cdn/{CSE6BHOJ.js → MWYBF3F3.js} +2 -2
  123. package/dist/cdn/{FDRAKF5D.js → MXTXJKFE.js} +2 -2
  124. package/dist/cdn/{7DOYUO7L.js → NEV6OZN3.js} +2 -2
  125. package/dist/cdn/{NBDOPGSN.js → O4NVW75A.js} +2 -2
  126. package/dist/cdn/{ZA7ZU2F7.js → OKVLGJAG.js} +2 -2
  127. package/dist/cdn/{SUC2MIGE.js → OMF6ITSG.js} +2 -2
  128. package/dist/cdn/{A6LBMS7A.js → ONQ6JSBJ.js} +1 -1
  129. package/dist/cdn/{CKUUYQLO.js → OZAZ277H.js} +2 -2
  130. package/dist/cdn/{2UJPYWWZ.js → P4GFYBBO.js} +2 -2
  131. package/dist/cdn/{XNUWVZN7.js → P4XZMBU5.js} +2 -2
  132. package/dist/cdn/{L2HLFWCV.js → POL6HKCG.js} +3 -3
  133. package/dist/cdn/{AP3KPOHN.js → POZYDAU2.js} +2 -2
  134. package/dist/cdn/{FTTLFIBV.js → PQ2DPOFM.js} +2 -2
  135. package/dist/cdn/{JUNMTIB3.js → PYGX4HN7.js} +2 -2
  136. package/dist/cdn/{ZY3JQCZQ.js → QNXI3WOF.js} +36 -36
  137. package/dist/cdn/{4VBOTWC3.js → QRMRID2M.js} +2 -2
  138. package/dist/cdn/{TLPZELG3.js → R74ZHFA6.js} +1 -1
  139. package/dist/cdn/{CAOMMQSY.js → RFVZ7KCG.js} +1 -1
  140. package/dist/cdn/{OF3TAARW.js → RHYNE5OE.js} +1 -1
  141. package/dist/cdn/{4YOG5F3W.js → RLEHNAIA.js} +1 -1
  142. package/dist/cdn/{RSM7MEVT.js → ROQGPAR5.js} +2 -2
  143. package/dist/cdn/RXF2NUOL.js +2 -0
  144. package/dist/cdn/{MZUDIQQH.js → SDWWUWAF.js} +2 -2
  145. package/dist/cdn/SHI76XUV.js +2 -0
  146. package/dist/cdn/SITY6L4S.js +2 -0
  147. package/dist/cdn/STHBRTTD.js +2 -0
  148. package/dist/cdn/{7UBTNDV6.js → SXM4NUT5.js} +2 -2
  149. package/dist/cdn/{XVJFPZTW.js → SZRJTQ54.js} +2 -2
  150. package/dist/cdn/TO2NY7EA.js +2 -0
  151. package/dist/cdn/{4IWDBEMN.js → TPULIO6I.js} +2 -2
  152. package/dist/cdn/TVEEQSMF.js +2 -0
  153. package/dist/cdn/TWU3QXAS.js +2 -0
  154. package/dist/cdn/{EGRRZTF6.js → TYATJUNF.js} +2 -2
  155. package/dist/cdn/UCTC4JN4.js +3 -0
  156. package/dist/cdn/{HI3XKFHD.js → UDRKUVZP.js} +2 -2
  157. package/dist/cdn/{JYNHWJUZ.js → UHEYPSOR.js} +2 -2
  158. package/dist/cdn/{VGLBH473.js → UHICISBZ.js} +2 -2
  159. package/dist/cdn/UO5PBOQR.js +2 -0
  160. package/dist/cdn/{BVUCNXC5.js → UZLQALHY.js} +1 -1
  161. package/dist/cdn/{SNG3WODY.js → V6HOUZPZ.js} +2 -2
  162. package/dist/cdn/{V52GSTOC.js → V7Y22FRP.js} +2 -2
  163. package/dist/cdn/{I72ST4JR.js → VAXH6RUQ.js} +2 -2
  164. package/dist/cdn/{NV7CL4S3.js → VNLSYVPE.js} +2 -2
  165. package/dist/cdn/VR3CF3ZY.js +2 -0
  166. package/dist/cdn/{VK6CCPTG.js → VWP2B4LB.js} +2 -2
  167. package/dist/cdn/VXFQANGJ.js +2 -0
  168. package/dist/cdn/WKZHFSH3.js +2 -0
  169. package/dist/cdn/{OXC2WP7W.js → WSWB3B7B.js} +2 -2
  170. package/dist/cdn/{EK3PM4L5.js → WVP73XWD.js} +2 -2
  171. package/dist/cdn/{SJMAKF4P.js → WXQ26G5Q.js} +2 -2
  172. package/dist/cdn/{2F4TPWZQ.js → XQ3NBBQ3.js} +1 -1
  173. package/dist/cdn/{VXLKTQ36.js → YHWYTHID.js} +2 -2
  174. package/dist/cdn/{XOTPSCNF.js → YIZ7PR2G.js} +2 -2
  175. package/dist/cdn/{T6W6F4TF.js → Z5XQLSYH.js} +2 -2
  176. package/dist/cdn/{Y6CV2NZR.js → ZFOG3KXV.js} +2 -2
  177. package/dist/cdn/{FPH52WOH.js → ZU2FHVNK.js} +2 -2
  178. package/dist/cdn/agent-utils/index.js +2 -2
  179. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -3
  180. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
  181. package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
  182. package/dist/cdn/index.js +2 -2
  183. package/dist/chunks/BaseWorkflow.js +1 -1
  184. package/dist/chunks/SKILL.js +1 -1
  185. package/dist/chunks/SKILL2.js +1 -1
  186. package/dist/chunks/SKILL3.js +1 -1
  187. package/dist/chunks/SKILL4.js +1 -1
  188. package/dist/chunks/adapter.js +1 -1
  189. package/dist/chunks/aiFactory.js +56 -50
  190. package/dist/chunks/arcgisKnowledgeGraph.js +2 -2
  191. package/dist/chunks/arcgisToolRegistry.js +1 -1
  192. package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
  193. package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
  194. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
  195. package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
  196. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
  197. package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
  198. package/dist/chunks/baseAgentState.js +1 -1
  199. package/dist/chunks/converterUtils.js +1 -1
  200. package/dist/chunks/dataExplorationAgent.js +1 -1
  201. package/dist/chunks/data_explore_filter_prompt.js +1 -1
  202. package/dist/chunks/data_explore_query_prompt.js +1 -1
  203. package/dist/chunks/embeddings.worker.js +1 -1
  204. package/dist/chunks/fetchAgentContext.js +1 -1
  205. package/dist/chunks/fetchService.js +1 -1
  206. package/dist/chunks/fieldStatistics.js +1 -1
  207. package/dist/chunks/field_descriptions_prompt.js +1 -1
  208. package/dist/chunks/formatFeatureAttributes.js +1 -1
  209. package/dist/chunks/generateLayerDescriptions.js +60 -63
  210. package/dist/chunks/graph.js +1 -1
  211. package/dist/chunks/helpAgent.js +1 -1
  212. package/dist/chunks/help_prompt.js +1 -1
  213. package/dist/chunks/index.js +1 -1
  214. package/dist/chunks/intent_prompt.js +1 -1
  215. package/dist/chunks/layerStylingGraph.js +1 -1
  216. package/dist/chunks/layer_descriptions_prompt.js +1 -1
  217. package/dist/chunks/layer_styling_prompt.js +1 -1
  218. package/dist/chunks/mergeWhereClauses.js +1 -1
  219. package/dist/chunks/navigationAgent.js +1 -1
  220. package/dist/chunks/navigation_intent_prompt.js +1 -1
  221. package/dist/chunks/navigation_tool_prompt.js +1 -1
  222. package/dist/chunks/orchestrator.js +1 -1
  223. package/dist/chunks/requireAgentServices.js +1 -1
  224. package/dist/chunks/resolvePointGeometryFilter.js +1 -1
  225. package/dist/chunks/runtime.js +1 -1
  226. package/dist/chunks/slottableRequestUtils.js +1 -1
  227. package/dist/chunks/state.js +26 -26
  228. package/dist/chunks/summarize_query_response_prompt.js +1 -1
  229. package/dist/chunks/useT9n.js +1 -1
  230. package/dist/chunks/utils.js +1 -1
  231. package/dist/chunks/utils2.js +1 -1
  232. package/dist/chunks/utils3.js +1 -1
  233. package/dist/components/arcgis-assistant/customElement.js +1 -1
  234. package/dist/components/arcgis-assistant-agent/customElement.js +362 -220
  235. package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
  236. package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
  237. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
  238. package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
  239. package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
  240. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
  241. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
  242. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
  243. package/dist/components/arcgis-assistant-message/customElement.js +1 -1
  244. package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
  245. package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
  246. package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
  247. package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
  248. package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
  249. package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
  250. package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
  251. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
  252. package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
  253. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
  254. package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
  255. package/dist/docs/api.json +1 -1
  256. package/dist/docs/docs.json +1 -1
  257. package/dist/docs/web-types.json +1 -1
  258. package/dist/index.js +1 -1
  259. package/dist/loader.js +1 -1
  260. package/dist/utils/index.js +3 -3
  261. package/package.json +9 -9
  262. package/dist/cdn/25MBI4PD.js +0 -2
  263. package/dist/cdn/2LVYAXHG.js +0 -44
  264. package/dist/cdn/2WXXSZP5.js +0 -2
  265. package/dist/cdn/5X23DDDZ.js +0 -2
  266. package/dist/cdn/AUCKEB52.js +0 -2
  267. package/dist/cdn/B3HXSEBN.js +0 -2
  268. package/dist/cdn/BTTCBEPW.js +0 -2
  269. package/dist/cdn/EXMEB4X2.js +0 -2
  270. package/dist/cdn/FLUI6GCU.js +0 -2
  271. package/dist/cdn/FRYS2PZJ.js +0 -2
  272. package/dist/cdn/FSLQCZRN.js +0 -2
  273. package/dist/cdn/HKIA5PWU.js +0 -2
  274. package/dist/cdn/I3SUE2TR.js +0 -2
  275. package/dist/cdn/KAX4A7SF.js +0 -2
  276. package/dist/cdn/LIRT72WY.js +0 -2
  277. package/dist/cdn/M5B6X46F.js +0 -2
  278. package/dist/cdn/NGR5NVZE.js +0 -2
  279. package/dist/cdn/PUZ6RAFQ.js +0 -2
  280. package/dist/cdn/ROS22KOA.js +0 -2
  281. package/dist/cdn/SBNNJ5WA.js +0 -2
  282. package/dist/cdn/SDX46GZY.js +0 -2
  283. package/dist/cdn/SI22EJLC.js +0 -2
  284. package/dist/cdn/SXYKNDOF.js +0 -2
  285. package/dist/cdn/SZ2L5556.js +0 -2
  286. package/dist/cdn/UGIHS7OA.js +0 -2
  287. package/dist/cdn/VT5EWFH7.js +0 -2
  288. package/dist/cdn/XZF7Y6B2.js +0 -2
  289. package/dist/cdn/Y4ZOB6UH.js +0 -2
  290. package/dist/cdn/YIXASZUW.js +0 -2
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{a as o}from"./V4PJMCJZ.js";import{Dc as a}from"./M2U456J5.js";import{a as r}from"./5X23DDDZ.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/5.2/LICENSE.txt */
2
+ import{a as o}from"./FDOMMK2M.js";import{Dc as a}from"./IYLFJCJ2.js";import{a as r}from"./VXFQANGJ.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/1.0/LICENSE.txt */
2
- import{a as s}from"./A6LBMS7A.js";import{Dc as o}from"./M2U456J5.js";import{a as i}from"./5X23DDDZ.js";var n=async t=>{t.map?.allLayers.filter(e=>e.type==="feature")?.forEach(e=>{let r=e;r.featureEffect&&(r.featureEffect=null)});let a=t.map.initialViewProperties?.viewpoint?.targetGeometry;return a?(await t.goTo(a),"Cleared all filters and returned to home extent."):"Cleared all filters. Could not determine home extent."},l=async(t,a)=>{let{mapView:e}=s(a,["mapView"]);return await n(e)},c=o(l,{name:"resetMap",description:"Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",schema:i.object({})});export{c as a};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as s}from"./ONQ6JSBJ.js";import{Dc as o}from"./IYLFJCJ2.js";import{a as i}from"./VXFQANGJ.js";var n=async t=>{t.map?.allLayers.filter(e=>e.type==="feature")?.forEach(e=>{let r=e;r.featureEffect&&(r.featureEffect=null)});let a=t.map.initialViewProperties?.viewpoint?.targetGeometry;return a?(await t.goTo(a),"Cleared all filters and returned to home extent."):"Cleared all filters. Could not determine home extent."},l=async(t,a)=>{let{mapView:e}=s(a,["mapView"]);return await n(e)},c=o(l,{name:"resetMap",description:"Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",schema:i.object({})});export{c as a};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as Q}from"./BVUCNXC5.js";var xu,$n=Object.freeze({status:"aborted"});function s(t,r,i){function o(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(t))return;c._zod.traits.add(t),r(c,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let _=d[p];_ in c||(c[_]=u[_].bind(c))}}let e=i?.Parent??Object;class n extends e{}Object.defineProperty(n,"name",{value:t});function a(c){var l;let u=i?.Parent?new n:this;o(u,c),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>i?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var hn=Symbol("zod_brand"),G=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(xu=globalThis).__zod_globalConfig??(xu.__zod_globalConfig={});var pe=globalThis.__zod_globalConfig;function U(t){return t&&Object.assign(pe,t),pe}var v={};Q(v,{BIGINT_FORMAT_RANGES:()=>jn,Class:()=>yn,NUMBER_FORMAT_RANGES:()=>wn,aborted:()=>ce,allowsEval:()=>kn,assert:()=>Sd,assertEqual:()=>xd,assertIs:()=>zd,assertNever:()=>Id,assertNotEqual:()=>kd,assignProp:()=>oe,base64ToUint8Array:()=>zu,base64urlToUint8Array:()=>Vd,cached:()=>ke,captureStackTrace:()=>Dt,cleanEnum:()=>Jd,cleanRegex:()=>tt,clone:()=>T,cloneDef:()=>jd,createTransparentProxy:()=>Nd,defineLazy:()=>z,esc:()=>Zt,escapeRegex:()=>K,explicitlyAborted:()=>Pn,extend:()=>Ad,finalizeIssue:()=>E,floatSafeRemainder:()=>bn,getElementAtPath:()=>Pd,getEnumValues:()=>et,getLengthableOrigin:()=>it,getParsedType:()=>Dd,getSizableOrigin:()=>nt,hexToUint8Array:()=>Kd,isObject:()=>fe,isPlainObject:()=>ae,issue:()=>ze,joinValues:()=>m,jsonStringifyReplacer:()=>xe,merge:()=>Rd,mergeDefs:()=>ee,normalizeParams:()=>h,nullish:()=>ie,numKeys:()=>Zd,objectClone:()=>wd,omit:()=>Ed,optionalKeys:()=>Sn,parsedType:()=>g,partial:()=>Cd,pick:()=>Td,prefixIssues:()=>C,primitiveTypes:()=>In,promiseAllObject:()=>Ud,propertyKeyTypes:()=>rt,randomString:()=>Od,required:()=>Fd,safeExtend:()=>Ld,shallowClone:()=>zn,slugify:()=>xn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>Iu,uint8ArrayToBase64url:()=>Md,uint8ArrayToHex:()=>Gd,unwrapMessage:()=>Qe});function xd(t){return t}function kd(t){return t}function zd(t){}function Id(t){throw new Error("Unexpected value in exhaustive check")}function Sd(t){}function et(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function m(t,r="|"){return t.map(i=>f(i)).join(r)}function xe(t,r){return typeof r=="bigint"?r.toString():r}function ke(t){return{get value(){{let i=t();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function ie(t){return t==null}function tt(t){let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(r,i)}function bn(t,r){let i=t/r,o=Math.round(i),e=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<e?0:i-o}var ku=Symbol("evaluating");function z(t,r,i){let o;Object.defineProperty(t,r,{get(){if(o!==ku)return o===void 0&&(o=ku,o=i()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function wd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function oe(t,r,i){Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ee(...t){let r={};for(let i of t){let o=Object.getOwnPropertyDescriptors(i);Object.assign(r,o)}return Object.defineProperties({},r)}function jd(t){return ee(t._zod.def)}function Pd(t,r){return r?r.reduce((i,o)=>i?.[o],t):t}function Ud(t){let r=Object.keys(t),i=r.map(o=>t[o]);return Promise.all(i).then(o=>{let e={};for(let n=0;n<r.length;n++)e[r[n]]=o[n];return e})}function Od(t=10){let r="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<t;o++)i+=r[Math.floor(Math.random()*r.length)];return i}function Zt(t){return JSON.stringify(t)}function xn(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var kn=ke(()=>{if(pe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ae(t){if(fe(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(fe(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function zn(t){return ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Zd(t){let r=0;for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&r++;return r}var Dd=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rt=new Set(["string","number","symbol"]),In=new Set(["string","number","bigint","boolean","symbol","undefined"]);function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(t,r,i){let o=new t._zod.constr(r??t._zod.def);return(!r||i?.parent)&&(o._zod.parent=t),o}function h(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Nd(t){let r;return new Proxy({},{get(i,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(i,o,e,n){return r??(r=t()),Reflect.set(r,o,e,n)},has(i,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function f(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Sn(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Td(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ed(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ad(t,r){if(!ae(r))throw new Error("Invalid input to extend: expected a plain object");let i=t._zod.def.checks;if(i&&i.length>0){let n=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=ee(t._zod.def,{get shape(){let n={...t._zod.def.shape,...r};return oe(this,"shape",n),n}});return T(t,e)}function Ld(t,r){if(!ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return oe(this,"shape",o),o}});return T(t,i)}function Rd(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return oe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return T(t,i)}function Cd(t,r,i){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ee(r._zod.def,{get shape(){let c=r._zod.def.shape,l={...c};if(i)for(let u in i){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);i[u]&&(l[u]=t?new t({type:"optional",innerType:c[u]}):c[u])}else for(let u in c)l[u]=t?new t({type:"optional",innerType:c[u]}):c[u];return oe(this,"shape",l),l},checks:[]});return T(r,a)}function Fd(t,r,i){let o=ee(r._zod.def,{get shape(){let e=r._zod.def.shape,n={...e};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)n[a]=new t({type:"nonoptional",innerType:e[a]});return oe(this,"shape",n),n}});return T(r,o)}function ce(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function Pn(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function C(t,r){return r.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(t),i})}function Qe(t){return typeof t=="string"?t:t?.message}function E(t,r,i){let o=t.message?t.message:Qe(t.inst?._zod.def?.error?.(t))??Qe(r?.error?.(t))??Qe(i.customError?.(t))??Qe(i.localeError?.(t))??"Invalid input",{inst:e,continue:n,input:a,...c}=t;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function nt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function it(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function g(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function ze(...t){let[r,i,o]=t;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function Jd(t){return Object.entries(t).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function zu(t){let r=atob(t),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function Iu(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function Vd(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-r.length%4)%4);return zu(r+i)}function Md(t){return Iu(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kd(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)i[o/2]=Number.parseInt(r.slice(o,o+2),16);return i}function Gd(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var yn=class{constructor(...r){}};var Su=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,xe,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ot=s("$ZodError",Su),F=s("$ZodError",Su,{Parent:Error});function at(t,r=i=>i.message){let i={},o=[];for(let e of t.issues)e.path.length>0?(i[e.path[0]]=i[e.path[0]]||[],i[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:i}}function ct(t,r=i=>i.message){let i={_errors:[]},o=(e,n=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let l=i,u=0;for(;u<c.length;){let d=c[u];u===c.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return o(t),i}function Un(t,r=i=>i.message){let i={errors:[]},o=(e,n=[])=>{var a,c;for(let l of e.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u},[...n,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...n,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...n,...l.path]);else{let u=[...n,...l.path];if(u.length===0){i.errors.push(r(l));continue}let d=i,p=0;for(;p<u.length;){let _=u[p],$=p===u.length-1;typeof _=="string"?(d.properties??(d.properties={}),(a=d.properties)[_]??(a[_]={errors:[]}),d=d.properties[_]):(d.items??(d.items=[]),(c=d.items)[_]??(c[_]={errors:[]}),d=d.items[_]),$&&d.errors.push(r(l)),p++}}};return o(t),i}function wu(t){let r=[],i=t.map(o=>typeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function On(t){let r=[],i=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${wu(o.path)}`);return r.join(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as Q}from"./UZLQALHY.js";var xu,$n=Object.freeze({status:"aborted"});function s(t,r,i){function o(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(t))return;c._zod.traits.add(t),r(c,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let _=d[p];_ in c||(c[_]=u[_].bind(c))}}let e=i?.Parent??Object;class n extends e{}Object.defineProperty(n,"name",{value:t});function a(c){var l;let u=i?.Parent?new n:this;o(u,c),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>i?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var hn=Symbol("zod_brand"),G=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(xu=globalThis).__zod_globalConfig??(xu.__zod_globalConfig={});var pe=globalThis.__zod_globalConfig;function U(t){return t&&Object.assign(pe,t),pe}var v={};Q(v,{BIGINT_FORMAT_RANGES:()=>jn,Class:()=>yn,NUMBER_FORMAT_RANGES:()=>wn,aborted:()=>ce,allowsEval:()=>kn,assert:()=>Sd,assertEqual:()=>xd,assertIs:()=>zd,assertNever:()=>Id,assertNotEqual:()=>kd,assignProp:()=>oe,base64ToUint8Array:()=>zu,base64urlToUint8Array:()=>Vd,cached:()=>ke,captureStackTrace:()=>Dt,cleanEnum:()=>Jd,cleanRegex:()=>tt,clone:()=>T,cloneDef:()=>jd,createTransparentProxy:()=>Nd,defineLazy:()=>z,esc:()=>Zt,escapeRegex:()=>K,explicitlyAborted:()=>Pn,extend:()=>Ad,finalizeIssue:()=>E,floatSafeRemainder:()=>bn,getElementAtPath:()=>Pd,getEnumValues:()=>et,getLengthableOrigin:()=>it,getParsedType:()=>Dd,getSizableOrigin:()=>nt,hexToUint8Array:()=>Kd,isObject:()=>fe,isPlainObject:()=>ae,issue:()=>ze,joinValues:()=>m,jsonStringifyReplacer:()=>xe,merge:()=>Rd,mergeDefs:()=>ee,normalizeParams:()=>h,nullish:()=>ie,numKeys:()=>Zd,objectClone:()=>wd,omit:()=>Ed,optionalKeys:()=>Sn,parsedType:()=>g,partial:()=>Cd,pick:()=>Td,prefixIssues:()=>C,primitiveTypes:()=>In,promiseAllObject:()=>Ud,propertyKeyTypes:()=>rt,randomString:()=>Od,required:()=>Fd,safeExtend:()=>Ld,shallowClone:()=>zn,slugify:()=>xn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>Iu,uint8ArrayToBase64url:()=>Md,uint8ArrayToHex:()=>Gd,unwrapMessage:()=>Qe});function xd(t){return t}function kd(t){return t}function zd(t){}function Id(t){throw new Error("Unexpected value in exhaustive check")}function Sd(t){}function et(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function m(t,r="|"){return t.map(i=>f(i)).join(r)}function xe(t,r){return typeof r=="bigint"?r.toString():r}function ke(t){return{get value(){{let i=t();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function ie(t){return t==null}function tt(t){let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(r,i)}function bn(t,r){let i=t/r,o=Math.round(i),e=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<e?0:i-o}var ku=Symbol("evaluating");function z(t,r,i){let o;Object.defineProperty(t,r,{get(){if(o!==ku)return o===void 0&&(o=ku,o=i()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function wd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function oe(t,r,i){Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ee(...t){let r={};for(let i of t){let o=Object.getOwnPropertyDescriptors(i);Object.assign(r,o)}return Object.defineProperties({},r)}function jd(t){return ee(t._zod.def)}function Pd(t,r){return r?r.reduce((i,o)=>i?.[o],t):t}function Ud(t){let r=Object.keys(t),i=r.map(o=>t[o]);return Promise.all(i).then(o=>{let e={};for(let n=0;n<r.length;n++)e[r[n]]=o[n];return e})}function Od(t=10){let r="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<t;o++)i+=r[Math.floor(Math.random()*r.length)];return i}function Zt(t){return JSON.stringify(t)}function xn(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var kn=ke(()=>{if(pe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ae(t){if(fe(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(fe(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function zn(t){return ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Zd(t){let r=0;for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&r++;return r}var Dd=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rt=new Set(["string","number","symbol"]),In=new Set(["string","number","bigint","boolean","symbol","undefined"]);function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(t,r,i){let o=new t._zod.constr(r??t._zod.def);return(!r||i?.parent)&&(o._zod.parent=t),o}function h(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Nd(t){let r;return new Proxy({},{get(i,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(i,o,e,n){return r??(r=t()),Reflect.set(r,o,e,n)},has(i,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function f(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Sn(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Td(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ed(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ad(t,r){if(!ae(r))throw new Error("Invalid input to extend: expected a plain object");let i=t._zod.def.checks;if(i&&i.length>0){let n=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=ee(t._zod.def,{get shape(){let n={...t._zod.def.shape,...r};return oe(this,"shape",n),n}});return T(t,e)}function Ld(t,r){if(!ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return oe(this,"shape",o),o}});return T(t,i)}function Rd(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return oe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return T(t,i)}function Cd(t,r,i){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ee(r._zod.def,{get shape(){let c=r._zod.def.shape,l={...c};if(i)for(let u in i){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);i[u]&&(l[u]=t?new t({type:"optional",innerType:c[u]}):c[u])}else for(let u in c)l[u]=t?new t({type:"optional",innerType:c[u]}):c[u];return oe(this,"shape",l),l},checks:[]});return T(r,a)}function Fd(t,r,i){let o=ee(r._zod.def,{get shape(){let e=r._zod.def.shape,n={...e};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)n[a]=new t({type:"nonoptional",innerType:e[a]});return oe(this,"shape",n),n}});return T(r,o)}function ce(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function Pn(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function C(t,r){return r.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(t),i})}function Qe(t){return typeof t=="string"?t:t?.message}function E(t,r,i){let o=t.message?t.message:Qe(t.inst?._zod.def?.error?.(t))??Qe(r?.error?.(t))??Qe(i.customError?.(t))??Qe(i.localeError?.(t))??"Invalid input",{inst:e,continue:n,input:a,...c}=t;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function nt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function it(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function g(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function ze(...t){let[r,i,o]=t;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function Jd(t){return Object.entries(t).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function zu(t){let r=atob(t),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function Iu(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function Vd(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-r.length%4)%4);return zu(r+i)}function Md(t){return Iu(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kd(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)i[o/2]=Number.parseInt(r.slice(o,o+2),16);return i}function Gd(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var yn=class{constructor(...r){}};var Su=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,xe,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ot=s("$ZodError",Su),F=s("$ZodError",Su,{Parent:Error});function at(t,r=i=>i.message){let i={},o=[];for(let e of t.issues)e.path.length>0?(i[e.path[0]]=i[e.path[0]]||[],i[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:i}}function ct(t,r=i=>i.message){let i={_errors:[]},o=(e,n=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let l=i,u=0;for(;u<c.length;){let d=c[u];u===c.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return o(t),i}function Un(t,r=i=>i.message){let i={errors:[]},o=(e,n=[])=>{var a,c;for(let l of e.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u},[...n,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...n,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...n,...l.path]);else{let u=[...n,...l.path];if(u.length===0){i.errors.push(r(l));continue}let d=i,p=0;for(;p<u.length;){let _=u[p],$=p===u.length-1;typeof _=="string"?(d.properties??(d.properties={}),(a=d.properties)[_]??(a[_]={errors:[]}),d=d.properties[_]):(d.items??(d.items=[]),(c=d.items)[_]??(c[_]={errors:[]}),d=d.items[_]),$&&d.errors.push(r(l)),p++}}};return o(t),i}function wu(t){let r=[],i=t.map(o=>typeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function On(t){let r=[],i=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${wu(o.path)}`);return r.join(`
3
3
  `)}var V={};Q(V,{base64:()=>Wn,base64url:()=>Nt,bigint:()=>ei,boolean:()=>ri,browserEmail:()=>tm,cidrv4:()=>Kn,cidrv6:()=>Gn,cuid:()=>Zn,cuid2:()=>Dn,date:()=>qn,datetime:()=>Hn,domain:()=>im,duration:()=>Ln,e164:()=>Xn,email:()=>Cn,emoji:()=>Fn,extendedDuration:()=>Bd,guid:()=>Rn,hex:()=>om,hostname:()=>nm,html5Email:()=>Hd,httpProtocol:()=>Bn,idnEmail:()=>em,integer:()=>ti,ipv4:()=>Jn,ipv6:()=>Vn,ksuid:()=>En,lowercase:()=>oi,mac:()=>Mn,md5_base64:()=>cm,md5_base64url:()=>um,md5_hex:()=>am,nanoid:()=>An,null:()=>ni,number:()=>Tt,rfc5322Email:()=>Qd,sha1_base64:()=>sm,sha1_base64url:()=>dm,sha1_hex:()=>lm,sha256_base64:()=>pm,sha256_base64url:()=>fm,sha256_hex:()=>mm,sha384_base64:()=>vm,sha384_base64url:()=>$m,sha384_hex:()=>gm,sha512_base64:()=>_m,sha512_base64url:()=>ym,sha512_hex:()=>hm,string:()=>Qn,time:()=>Yn,ulid:()=>Nn,undefined:()=>ii,unicodeEmail:()=>ju,uppercase:()=>ai,uuid:()=>ge,uuid4:()=>Xd,uuid6:()=>qd,uuid7:()=>Yd,xid:()=>Tn});var Zn=/^[cC][0-9a-z]{6,}$/,Dn=/^[0-9a-z]+$/,Nn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tn=/^[0-9a-vA-V]{20}$/,En=/^[A-Za-z0-9]{27}$/,An=/^[a-zA-Z0-9_-]{21}$/,Ln=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bd=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ge=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Xd=ge(4),qd=ge(6),Yd=ge(7),Cn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hd=/^[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])?)*$/,Qd=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ju=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,em=ju,tm=/^[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])?)*$/,rm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fn(){return new RegExp(rm,"u")}var Jn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mn=t=>{let r=K(t??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},Kn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Gn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nt=/^[A-Za-z0-9_-]*$/,nm=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,im=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bn=/^https?$/,Xn=/^\+[1-9]\d{6,14}$/,Pu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qn=new RegExp(`^${Pu}$`);function Uu(t){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${r}`:t.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${t.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yn(t){return new RegExp(`^${Uu(t)}$`)}function Hn(t){let r=Uu({precision:t.precision}),i=["Z"];t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${i.join("|")})`;return new RegExp(`^${Pu}T(?:${o})$`)}var Qn=t=>{let r=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},ei=/^-?\d+n?$/,ti=/^-?\d+$/,Tt=/^-?\d+(?:\.\d+)?$/,ri=/^(?:true|false)$/i,ni=/^null$/i;var ii=/^undefined$/i;var oi=/^[^A-Z]*$/,ai=/^[^a-z]*$/,om=/^[0-9a-fA-F]*$/;function ut(t,r){return new RegExp(`^[A-Za-z0-9+/]{${t}}${r}$`)}function lt(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var am=/^[0-9a-fA-F]{32}$/,cm=ut(22,"=="),um=lt(22),lm=/^[0-9a-fA-F]{40}$/,sm=ut(27,"="),dm=lt(27),mm=/^[0-9a-fA-F]{64}$/,pm=ut(43,"="),fm=lt(43),gm=/^[0-9a-fA-F]{96}$/,vm=ut(64,""),$m=lt(64),hm=/^[0-9a-fA-F]{128}$/,_m=ut(86,"=="),ym=lt(86);var j=s("$ZodCheck",(t,r)=>{var i;t._zod??(t._zod={}),t._zod.def=r,(i=t._zod).onattach??(i.onattach=[])}),Zu={number:"number",bigint:"bigint",object:"date"},Et=s("$ZodCheckLessThan",(t,r)=>{j.init(t,r);let i=Zu[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,n=(r.inclusive?e.maximum:e.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<n&&(r.inclusive?e.maximum=r.value:e.exclusiveMaximum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:i,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),At=s("$ZodCheckGreaterThan",(t,r)=>{j.init(t,r);let i=Zu[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,n=(r.inclusive?e.minimum:e.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>n&&(r.inclusive?e.minimum=r.value:e.exclusiveMinimum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),ci=s("$ZodCheckMultipleOf",(t,r)=>{j.init(t,r),t._zod.onattach.push(i=>{var o;(o=i._zod.bag).multipleOf??(o.multipleOf=r.value)}),t._zod.check=i=>{if(typeof i.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%r.value===BigInt(0):bn(i.value,r.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:r.value,input:i.value,inst:t,continue:!r.abort})}}),ui=s("$ZodCheckNumberFormat",(t,r)=>{j.init(t,r),r.format=r.format||"float64";let i=r.format?.includes("int"),o=i?"int":"number",[e,n]=wn[r.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=r.format,c.minimum=e,c.maximum=n,i&&(c.pattern=ti)}),t._zod.check=a=>{let c=a.value;if(i){if(!Number.isInteger(c)){a.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort});return}}c<e&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:e,inclusive:!0,inst:t,continue:!r.abort}),c>n&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!r.abort})}}),li=s("$ZodCheckBigIntFormat",(t,r)=>{j.init(t,r);let[i,o]=jn[r.format];t._zod.onattach.push(e=>{let n=e._zod.bag;n.format=r.format,n.minimum=i,n.maximum=o}),t._zod.check=e=>{let n=e.value;n<i&&e.issues.push({origin:"bigint",input:n,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!r.abort}),n>o&&e.issues.push({origin:"bigint",input:n,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!r.abort})}}),si=s("$ZodCheckMaxSize",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;e.size<=r.maximum||o.issues.push({origin:nt(e),code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),di=s("$ZodCheckMinSize",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;e.size>=r.minimum||o.issues.push({origin:nt(e),code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),mi=s("$ZodCheckSizeEquals",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.size,e.maximum=r.size,e.size=r.size}),t._zod.check=o=>{let e=o.value,n=e.size;if(n===r.size)return;let a=n>r.size;o.issues.push({origin:nt(e),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),pi=s("$ZodCheckMaxLength",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;if(e.length<=r.maximum)return;let a=it(e);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),fi=s("$ZodCheckMinLength",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;if(e.length>=r.minimum)return;let a=it(e);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),gi=s("$ZodCheckLengthEquals",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.length,e.maximum=r.length,e.length=r.length}),t._zod.check=o=>{let e=o.value,n=e.length;if(n===r.length)return;let a=it(e),c=n>r.length;o.issues.push({origin:a,...c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),Ie=s("$ZodCheckStringFormat",(t,r)=>{var i,o;j.init(t,r),t._zod.onattach.push(e=>{let n=e._zod.bag;n.format=r.format,r.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(r.pattern))}),r.pattern?(i=t._zod).check??(i.check=e=>{r.pattern.lastIndex=0,!r.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:r.format,input:e.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:t,continue:!r.abort})}):(o=t._zod).check??(o.check=()=>{})}),vi=s("$ZodCheckRegex",(t,r)=>{Ie.init(t,r),t._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:t,continue:!r.abort})}}),$i=s("$ZodCheckLowerCase",(t,r)=>{r.pattern??(r.pattern=oi),Ie.init(t,r)}),hi=s("$ZodCheckUpperCase",(t,r)=>{r.pattern??(r.pattern=ai),Ie.init(t,r)}),_i=s("$ZodCheckIncludes",(t,r)=>{j.init(t,r);let i=K(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${i}`:i);r.pattern=o,t._zod.onattach.push(e=>{let n=e._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),t._zod.check=e=>{e.value.includes(r.includes,r.position)||e.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:e.value,inst:t,continue:!r.abort})}}),yi=s("$ZodCheckStartsWith",(t,r)=>{j.init(t,r);let i=new RegExp(`^${K(r.prefix)}.*`);r.pattern??(r.pattern=i),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(i)}),t._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:t,continue:!r.abort})}}),bi=s("$ZodCheckEndsWith",(t,r)=>{j.init(t,r);let i=new RegExp(`.*${K(r.suffix)}$`);r.pattern??(r.pattern=i),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(i)}),t._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:t,continue:!r.abort})}});function Ou(t,r,i){t.issues.length&&r.issues.push(...C(i,t.issues))}var xi=s("$ZodCheckProperty",(t,r)=>{j.init(t,r),t._zod.check=i=>{let o=r.schema._zod.run({value:i.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then(e=>Ou(e,i,r.property));Ou(o,i,r.property)}}),ki=s("$ZodCheckMimeType",(t,r)=>{j.init(t,r);let i=new Set(r.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=r.mime}),t._zod.check=o=>{i.has(o.value.type)||o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:t,continue:!r.abort})}}),zi=s("$ZodCheckOverwrite",(t,r)=>{j.init(t,r),t._zod.check=i=>{i.value=r.tx(i.value)}});var st=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
4
4
  `).filter(a=>a),e=Math.min(...o.map(a=>a.length-a.trimStart().length)),n=o.map(a=>a.slice(e)).map(a=>" ".repeat(this.indent*2)+a);for(let a of n)this.content.push(a)}compile(){let r=Function,i=this?.args,e=[...(this?.content??[""]).map(n=>` ${n}`)];return new r(...i,e.join(`
5
5
  `))}};var Se=t=>(r,i,o,e)=>{let n=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise)throw new G;if(a.issues.length){let c=new(e?.Err??t)(a.issues.map(l=>E(l,n,U())));throw Dt(c,e?.callee),c}return a.value},Lt=Se(F),we=t=>async(r,i,o,e)=>{let n=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(e?.Err??t)(a.issues.map(l=>E(l,n,U())));throw Dt(c,e?.callee),c}return a.value},Rt=we(F),je=t=>(r,i,o)=>{let e=o?{...o,async:!1}:{async:!1},n=r._zod.run({value:i,issues:[]},e);if(n instanceof Promise)throw new G;return n.issues.length?{success:!1,error:new(t??ot)(n.issues.map(a=>E(a,e,U())))}:{success:!0,data:n.value}},Ii=je(F),Pe=t=>async(r,i,o)=>{let e=o?{...o,async:!0}:{async:!0},n=r._zod.run({value:i,issues:[]},e);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new t(n.issues.map(a=>E(a,e,U())))}:{success:!0,data:n.value}},Si=Pe(F),Ct=t=>(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return Se(t)(r,i,e)},bm=Ct(F),Ft=t=>(r,i,o)=>Se(t)(r,i,o),xm=Ft(F),Jt=t=>async(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return we(t)(r,i,e)},km=Jt(F),Vt=t=>async(r,i,o)=>we(t)(r,i,o),zm=Vt(F),Mt=t=>(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return je(t)(r,i,e)},Im=Mt(F),Kt=t=>(r,i,o)=>je(t)(r,i,o),Sm=Kt(F),Gt=t=>async(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return Pe(t)(r,i,e)},wm=Gt(F),Wt=t=>async(r,i,o)=>Pe(t)(r,i,o),jm=Wt(F);var wi={major:4,minor:4,patch:3};var x=s("$ZodType",(t,r)=>{var i;t??(t={}),t._zod.def=r,t._zod.bag=t._zod.bag||{},t._zod.version=wi;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let e of o)for(let n of e._zod.onattach)n(t);if(o.length===0)(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let e=(a,c,l)=>{let u=ce(a),d;for(let p of c){if(p._zod.def.when){if(Pn(a)||!p._zod.def.when(a))continue}else if(u)continue;let _=a.issues.length,$=p._zod.check(a);if($ instanceof Promise&&l?.async===!1)throw new G;if(d||$ instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await $,a.issues.length!==_&&(u||(u=ce(a,_)))});else{if(a.issues.length===_)continue;u||(u=ce(a,_))}}return d?d.then(()=>a):a},n=(a,c,l)=>{if(ce(a))return a.aborted=!0,a;let u=e(c,o,l);if(u instanceof Promise){if(l.async===!1)throw new G;return u.then(d=>t._zod.parse(d,l))}return t._zod.parse(u,l)};t._zod.run=(a,c)=>{if(c.skipChecks)return t._zod.parse(a,c);if(c.direction==="backward"){let u=t._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(d=>n(d,a,c)):n(u,a,c)}let l=t._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new G;return l.then(u=>e(u,o,c))}return e(l,o,c)}}z(t,"~standard",()=>({validate:e=>{try{let n=Ii(t,e);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Si(t,e).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),ve=s("$ZodString",(t,r)=>{x.init(t,r),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qn(t._zod.bag),t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),S=s("$ZodStringFormat",(t,r)=>{Ie.init(t,r),ve.init(t,r)}),Pi=s("$ZodGUID",(t,r)=>{r.pattern??(r.pattern=Rn),S.init(t,r)}),Ui=s("$ZodUUID",(t,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=ge(o))}else r.pattern??(r.pattern=ge());S.init(t,r)}),Oi=s("$ZodEmail",(t,r)=>{r.pattern??(r.pattern=Cn),S.init(t,r)}),Zi=s("$ZodURL",(t,r)=>{S.init(t,r),t._zod.check=i=>{try{let o=i.value.trim();if(!r.normalize&&r.protocol?.source===Bn.source&&!/^https?:\/\//i.test(o)){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:t,continue:!r.abort});return}let e=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(e.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:t,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:t,continue:!r.abort})),r.normalize?i.value=e.href:i.value=o;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!r.abort})}}}),Di=s("$ZodEmoji",(t,r)=>{r.pattern??(r.pattern=Fn()),S.init(t,r)}),Ni=s("$ZodNanoID",(t,r)=>{r.pattern??(r.pattern=An),S.init(t,r)}),Ti=s("$ZodCUID",(t,r)=>{r.pattern??(r.pattern=Zn),S.init(t,r)}),Ei=s("$ZodCUID2",(t,r)=>{r.pattern??(r.pattern=Dn),S.init(t,r)}),Ai=s("$ZodULID",(t,r)=>{r.pattern??(r.pattern=Nn),S.init(t,r)}),Li=s("$ZodXID",(t,r)=>{r.pattern??(r.pattern=Tn),S.init(t,r)}),Ri=s("$ZodKSUID",(t,r)=>{r.pattern??(r.pattern=En),S.init(t,r)}),Ci=s("$ZodISODateTime",(t,r)=>{r.pattern??(r.pattern=Hn(r)),S.init(t,r)}),Fi=s("$ZodISODate",(t,r)=>{r.pattern??(r.pattern=qn),S.init(t,r)}),Ji=s("$ZodISOTime",(t,r)=>{r.pattern??(r.pattern=Yn(r)),S.init(t,r)}),Vi=s("$ZodISODuration",(t,r)=>{r.pattern??(r.pattern=Ln),S.init(t,r)}),Mi=s("$ZodIPv4",(t,r)=>{r.pattern??(r.pattern=Jn),S.init(t,r),t._zod.bag.format="ipv4"}),Ki=s("$ZodIPv6",(t,r)=>{r.pattern??(r.pattern=Vn),S.init(t,r),t._zod.bag.format="ipv6",t._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:t,continue:!r.abort})}}}),Gi=s("$ZodMAC",(t,r)=>{r.pattern??(r.pattern=Mn(r.delimiter)),S.init(t,r),t._zod.bag.format="mac"}),Wi=s("$ZodCIDRv4",(t,r)=>{r.pattern??(r.pattern=Kn),S.init(t,r)}),Bi=s("$ZodCIDRv6",(t,r)=>{r.pattern??(r.pattern=Gn),S.init(t,r),t._zod.check=i=>{let o=i.value.split("/");try{if(o.length!==2)throw new Error;let[e,n]=o;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${e}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:t,continue:!r.abort})}}});function Xi(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var qi=s("$ZodBase64",(t,r)=>{r.pattern??(r.pattern=Wn),S.init(t,r),t._zod.bag.contentEncoding="base64",t._zod.check=i=>{Xi(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:t,continue:!r.abort})}});function Bu(t){if(!Nt.test(t))return!1;let r=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),i=r.padEnd(Math.ceil(r.length/4)*4,"=");return Xi(i)}var Yi=s("$ZodBase64URL",(t,r)=>{r.pattern??(r.pattern=Nt),S.init(t,r),t._zod.bag.contentEncoding="base64url",t._zod.check=i=>{Bu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:t,continue:!r.abort})}}),Hi=s("$ZodE164",(t,r)=>{r.pattern??(r.pattern=Xn),S.init(t,r)});function Xu(t,r=null){try{let i=t.split(".");if(i.length!==3)return!1;let[o]=i;if(!o)return!1;let e=JSON.parse(atob(o));return!("typ"in e&&e?.typ!=="JWT"||!e.alg||r&&(!("alg"in e)||e.alg!==r))}catch{return!1}}var Qi=s("$ZodJWT",(t,r)=>{S.init(t,r),t._zod.check=i=>{Xu(i.value,r.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:t,continue:!r.abort})}}),eo=s("$ZodCustomStringFormat",(t,r)=>{S.init(t,r),t._zod.check=i=>{r.fn(i.value)||i.issues.push({code:"invalid_format",format:r.format,input:i.value,inst:t,continue:!r.abort})}}),Ht=s("$ZodNumber",(t,r)=>{x.init(t,r),t._zod.pattern=t._zod.bag.pattern??Tt,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}let e=i.value;if(typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e))return i;let n=typeof e=="number"?Number.isNaN(e)?"NaN":Number.isFinite(e)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:e,inst:t,...n?{received:n}:{}}),i}}),to=s("$ZodNumberFormat",(t,r)=>{ui.init(t,r),Ht.init(t,r)}),dt=s("$ZodBoolean",(t,r)=>{x.init(t,r),t._zod.pattern=ri,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=!!i.value}catch{}let e=i.value;return typeof e=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:e,inst:t}),i}}),Qt=s("$ZodBigInt",(t,r)=>{x.init(t,r),t._zod.pattern=ei,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:t}),i}}),ro=s("$ZodBigIntFormat",(t,r)=>{li.init(t,r),Qt.init(t,r)}),no=s("$ZodSymbol",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;return typeof e=="symbol"||i.issues.push({expected:"symbol",code:"invalid_type",input:e,inst:t}),i}}),io=s("$ZodUndefined",(t,r)=>{x.init(t,r),t._zod.pattern=ii,t._zod.values=new Set([void 0]),t._zod.parse=(i,o)=>{let e=i.value;return typeof e>"u"||i.issues.push({expected:"undefined",code:"invalid_type",input:e,inst:t}),i}}),oo=s("$ZodNull",(t,r)=>{x.init(t,r),t._zod.pattern=ni,t._zod.values=new Set([null]),t._zod.parse=(i,o)=>{let e=i.value;return e===null||i.issues.push({expected:"null",code:"invalid_type",input:e,inst:t}),i}}),ao=s("$ZodAny",(t,r)=>{x.init(t,r),t._zod.parse=i=>i}),co=s("$ZodUnknown",(t,r)=>{x.init(t,r),t._zod.parse=i=>i}),uo=s("$ZodNever",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:t}),i)}),lo=s("$ZodVoid",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;return typeof e>"u"||i.issues.push({expected:"void",code:"invalid_type",input:e,inst:t}),i}}),so=s("$ZodDate",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=new Date(i.value)}catch{}let e=i.value,n=e instanceof Date;return n&&!Number.isNaN(e.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:e,...n?{received:"Invalid Date"}:{},inst:t}),i}});function Nu(t,r,i){t.issues.length&&r.issues.push(...C(i,t.issues)),r.value[i]=t.value}var mo=s("$ZodArray",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;if(!Array.isArray(e))return i.issues.push({expected:"array",code:"invalid_type",input:e,inst:t}),i;i.value=Array(e.length);let n=[];for(let a=0;a<e.length;a++){let c=e[a],l=r.element._zod.run({value:c,issues:[]},o);l instanceof Promise?n.push(l.then(u=>Nu(u,i,a))):Nu(l,i,a)}return n.length?Promise.all(n).then(()=>i):i}});function Yt(t,r,i,o,e,n){let a=i in o;if(t.issues.length){if(e&&n&&!a)return;r.issues.push(...C(i,t.issues))}if(!a&&!e){t.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}t.value===void 0?a&&(r.value[i]=void 0):r.value[i]=t.value}function qu(t){let r=Object.keys(t.shape);for(let o of r)if(!t.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let i=Sn(t.shape);return{...t,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function Yu(t,r,i,o,e,n){let a=[],c=e.keySet,l=e.catchall._zod,u=l.def.type,d=l.optin==="optional",p=l.optout==="optional";for(let _ in r){if(_==="__proto__"||c.has(_))continue;if(u==="never"){a.push(_);continue}let $=l.run({value:r[_],issues:[]},o);$ instanceof Promise?t.push($.then(b=>Yt(b,i,_,r,d,p))):Yt($,i,_,r,d,p)}return a.length&&i.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:n}),t.length?Promise.all(t).then(()=>i):i}var Hu=s("$ZodObject",(t,r)=>{if(x.init(t,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let c=r.shape;Object.defineProperty(r,"shape",{get:()=>{let l={...c};return Object.defineProperty(r,"shape",{value:l}),l}})}let o=ke(()=>qu(r));z(t._zod,"propValues",()=>{let c=r.shape,l={};for(let u in c){let d=c[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(let p of d.values)l[u].add(p)}}return l});let e=fe,n=r.catchall,a;t._zod.parse=(c,l)=>{a??(a=o.value);let u=c.value;if(!e(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),c;c.value={};let d=[],p=a.shape;for(let _ of a.keys){let $=p[_],b=$._zod.optin==="optional",R=$._zod.optout==="optional",O=$._zod.run({value:u[_],issues:[]},l);O instanceof Promise?d.push(O.then(vn=>Yt(vn,c,_,u,b,R))):Yt(O,c,_,u,b,R)}return n?Yu(d,u,c,l,o.value,t):d.length?Promise.all(d).then(()=>c):c}}),po=s("$ZodObjectJIT",(t,r)=>{Hu.init(t,r);let i=t._zod.parse,o=ke(()=>qu(r)),e=_=>{let $=new st(["shape","payload","ctx"]),b=o.value,R=B=>{let P=Zt(B);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};$.write("const input = payload.value;");let O=Object.create(null),vn=0;for(let B of b.keys)O[B]=`key_${vn++}`;$.write("const newResult = {};");for(let B of b.keys){let P=O[B],Z=Zt(B),yu=_[B],bu=yu?._zod?.optin==="optional",bd=yu?._zod?.optout==="optional";$.write(`const ${P} = ${R(B)};`),bu&&bd?$.write(`
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as o}from"./BBEGLIZC.js";import"./4YOG5F3W.js";import{g as a,h as e,n as i,v as c,z as n}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var r=a`.actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xs)}`,t=class extends c{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.feedbackEnabled=!1,this.arcgisFeedback=i()}static{this.properties={feedbackEnabled:5,message:0}}static{this.styles=r}_handleFeedback(s){this.message&&(this.message.feedback=this.message.feedback?.positive===s?void 0:{positive:s},this.arcgisFeedback.emit(this.message),this.requestUpdate())}_getFeedback(){return this.message?.feedback?.positive}_renderThumbsUpButton(){return e`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s .active=${this._getFeedback()===!0} @click=${()=>this._handleFeedback(!0)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return e`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s .active=${this._getFeedback()===!1} @click=${()=>this._handleFeedback(!1)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}render(){return this.feedbackEnabled&&!this.message?.error?e`<div class="actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}};n("arcgis-assistant-message-feedback",t);export{t as ArcgisAssistantMessageFeedback};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as o}from"./6OOZSZRJ.js";import"./RLEHNAIA.js";import{g as a,h as e,n as i,v as c,z as n}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var r=a`.actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xs)}`,t=class extends c{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.feedbackEnabled=!1,this.arcgisFeedback=i()}static{this.properties={feedbackEnabled:5,message:0}}static{this.styles=r}_handleFeedback(s){this.message&&(this.message.feedback=this.message.feedback?.positive===s?void 0:{positive:s},this.arcgisFeedback.emit(this.message),this.requestUpdate())}_getFeedback(){return this.message?.feedback?.positive}_renderThumbsUpButton(){return e`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s .active=${this._getFeedback()===!0} @click=${()=>this._handleFeedback(!0)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return e`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s .active=${this._getFeedback()===!1} @click=${()=>this._handleFeedback(!1)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}render(){return this.feedbackEnabled&&!this.message?.error?e`<div class="actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}};n("arcgis-assistant-message-feedback",t);export{t as ArcgisAssistantMessageFeedback};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import"./BVUCNXC5.js";var e=`## Who you are
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./UZLQALHY.js";var e=`## Who you are
3
3
 
4
4
  You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
5
5
 
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{b as n}from"./BBEGLIZC.js";import"./4YOG5F3W.js";import{g as i,h as a,v as t,z as e}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var r=i`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,s=class extends t{constructor(){super(...arguments),this._messages=n({blocking:!0}),this.loading=!1,this.loadingMessage="",this.assistantAvatarEnabled=!1}static{this.properties={loading:5,loadingMessage:1,assistantAvatarEnabled:5,interrupts:0}}static{this.styles=r}render(){return this.loading?a`<arcgis-assistant-message .assistantAvatarEnabled=${this.assistantAvatarEnabled} footer-disabled>${this.assistantAvatarEnabled?a`<slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot>`:null}<slot name=content slot=content><arcgis-assistant-interrupt-preview .interrupts=${this.interrupts}></arcgis-assistant-interrupt-preview><div class="loading-container"><div class="loading"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};e("arcgis-assistant-message-loading",s);export{s as ArcgisAssistantMessageLoading};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as n}from"./6OOZSZRJ.js";import"./RLEHNAIA.js";import{g as i,h as a,v as t,z as e}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var r=i`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`,s=class extends t{constructor(){super(...arguments),this._messages=n({blocking:!0}),this.loading=!1,this.loadingMessage="",this.assistantAvatarEnabled=!1}static{this.properties={loading:5,loadingMessage:1,assistantAvatarEnabled:5,interrupts:0}}static{this.styles=r}render(){return this.loading?a`<arcgis-assistant-message .assistantAvatarEnabled=${this.assistantAvatarEnabled} footer-disabled>${this.assistantAvatarEnabled?a`<slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot>`:null}<slot name=content slot=content><arcgis-assistant-interrupt-preview .interrupts=${this.interrupts}></arcgis-assistant-interrupt-preview><div class="loading-container"><div class="loading"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>`:null}};e("arcgis-assistant-message-loading",s);export{s as ArcgisAssistantMessageLoading};
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import"./BVUCNXC5.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/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)}})()})})();
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,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import"./BVUCNXC5.js";var e='---\nname: query\ndescription: Answers questions about feature-layer data, including counts, matching records, field values, aggregates, rankings, and spatially constrained results. Use when the user asks to inspect or summarize map data.\nallowed-tools: findRelevantLayers findRelevantFields getAttribute getStatistics getTopFeatures queryFeatures\n---\n\n# Query\n\n- When the task refers to an address, place, or location resolved by an earlier agent, call `listSharedResources` with `point` as the requested kind. If a resource description clearly matches the location, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches a referential location such as "this location," state that the spatial anchor is unavailable and do not guess coordinates.\n- Start with `findRelevantLayers` unless a previous tool result from this run explicitly identifies the relevant layer ID. Use the assigned task as the semantic query.\n- If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- Before querying, call `findRelevantFields` with only relevant layer IDs. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Set `includeSummaryStatistics` to true when the requested answer directly depends on whole-layer numeric summary statistics such as average, minimum, maximum, sum, variance, standard deviation, null count, or range. Otherwise leave it false and use `getStatistics` later if analysis requires statistics under an attribute or spatial constraint.\n- Use statistics returned by `findRelevantFields` when they directly answer an unfiltered whole-layer question. Use `getStatistics` when a where clause or spatial constraint must be applied.\n- Use `queryFeatures` to count, find, or list matching features. It is the default query tool.\n- Use `getTopFeatures` for highest, lowest, first, last, or top-N records ranked by an existing field.\n- Use `getAttribute` only when retrieving a particular attribute from a specifically identified feature.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- If the request asks to visually show, display, highlight, map, filter, reveal, emphasize, hide, include, or exclude matching features, preserve the information needed for a visual operation in the working context: layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs when available, and count. Preserve the exact values returned or used by tools so another skill can reuse them without repeating discovery.\n- Base the final answer only on returned tool data. State failures or empty results directly and do not fabricate values.\n';export{e as default};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./UZLQALHY.js";var e='---\nname: query\ndescription: Answers questions about feature-layer data, including counts, matching records, field values, aggregates, rankings, and spatially constrained results. Use when the user asks to inspect or summarize map data.\nallowed-tools: findRelevantLayers findRelevantFields getAttribute getStatistics getTopFeatures queryFeatures\n---\n\n# Query\n\n- When the task refers to an address, place, or location resolved by an earlier agent, call `listSharedResources` with `point` as the requested kind. If a resource description clearly matches the location, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches a referential location such as "this location," state that the spatial anchor is unavailable and do not guess coordinates.\n- Start with `findRelevantLayers` unless a previous tool result from this run explicitly identifies the relevant layer ID. Use the assigned task as the semantic query.\n- If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- Before querying, call `findRelevantFields` with only relevant layer IDs. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Set `includeSummaryStatistics` to true when the requested answer directly depends on whole-layer numeric summary statistics such as average, minimum, maximum, sum, variance, standard deviation, null count, or range. Otherwise leave it false and use `getStatistics` later if analysis requires statistics under an attribute or spatial constraint.\n- Use statistics returned by `findRelevantFields` when they directly answer an unfiltered whole-layer question. Use `getStatistics` when a where clause or spatial constraint must be applied.\n- Use `queryFeatures` to count, find, or list matching features. It is the default query tool.\n- Use `getTopFeatures` for highest, lowest, first, last, or top-N records ranked by an existing field.\n- Use `getAttribute` only when retrieving a particular attribute from a specifically identified feature.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- If the request asks to visually show, display, highlight, map, filter, reveal, emphasize, hide, include, or exclude matching features, preserve the information needed for a visual operation in the working context: layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs when available, and count. Preserve the exact values returned or used by tools so another skill can reuse them without repeating discovery.\n- Base the final answer only on returned tool data. State failures or empty results directly and do not fabricate values.\n';export{e as default};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  function i(o,e){let t=o?.configurable?.context;if(!t||typeof t!="object")throw new Error("Agent context missing");let n=e.filter(r=>!(r in t));if(n.length)throw new Error(`Agent context missing: ${n.join(", ")}`);return t}export{i as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{a as u}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{Dd as s}from"./CSE6BHOJ.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as u}from"./ONQ6JSBJ.js";import{Dc as d}from"./IYLFJCJ2.js";import{Dd as s}from"./MWYBF3F3.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{a as e,b as n}from"./RSM7MEVT.js";import"./CAOMMQSY.js";import{g as r,h as i,v as s,z as c}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var l=r`.container{border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-md)}.block{margin:0;background-color:var(--calcite-color-foreground-1);width:100%;max-height:300px;overflow:auto}.entry{margin-left:var(--calcite-spacing-sm);padding:var(--calcite-spacing-xxs) var(--calcite-spacing-lg);border-left:1px solid var(--calcite-color-border-1)}`,o=class extends s{constructor(){super(...arguments),this.logEnabled=!1,this.showLog=!1}static{this.properties={logEnabled:5,showLog:5,log:0}}static{this.styles=l}render(){return this.log?.length&&this.showLog&&this.logEnabled?i`<div class="container"><div class="block"><calcite-accordion appearance=transparent icon-position=start icon-type=chevron scale=s>${this.log.map(a=>{let t=a.includes(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as e,b as n}from"./ROQGPAR5.js";import"./RFVZ7KCG.js";import{g as r,h as i,v as s,z as c}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var l=r`.container{border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-md)}.block{margin:0;background-color:var(--calcite-color-foreground-1);width:100%;max-height:300px;overflow:auto}.entry{margin-left:var(--calcite-spacing-sm);padding:var(--calcite-spacing-xxs) var(--calcite-spacing-lg);border-left:1px solid var(--calcite-color-border-1)}`,o=class extends s{constructor(){super(...arguments),this.logEnabled=!1,this.showLog=!1}static{this.properties={logEnabled:5,showLog:5,log:0}}static{this.styles=l}render(){return this.log?.length&&this.showLog&&this.logEnabled?i`<div class="container"><div class="block"><calcite-accordion appearance=transparent icon-position=start icon-type=chevron scale=s>${this.log.map(a=>{let t=a.includes(`
3
3
  `)||a.length>70;return i`<calcite-accordion-item .heading=${t?`${a.substring(0,70)}...`:a} .expanded=${t}><div class="entry">${t?e(n(a)):null}</div></calcite-accordion-item>`})}</calcite-accordion></div></div>`:null}};c("arcgis-assistant-message-log",o);export{o as ArcgisAssistantMessageLog};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{ta as c}from"./M2U456J5.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??"LLMAgent 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(`LLMAgent 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/5.2/LICENSE.txt */
2
+ import{ta as c}from"./IYLFJCJ2.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??"LLMAgent 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(`LLMAgent 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/1.0/LICENSE.txt */
2
- import x from"./ZWIKFBOU.js";import w from"./NV7CL4S3.js";import t from"./FK2CVSXW.js";import s from"./XRVGYRXL.js";import{a as $}from"./2F4TPWZQ.js";import r from"./4CFCV47G.js";import q from"./ZY3JQCZQ.js";import"./M5B6X46F.js";import p from"./VK6CCPTG.js";import{a as ne}from"./LXIKAXUT.js";import o from"./OF3TAARW.js";import n from"./M3KKORBG.js";import m from"./3PPXAIRE.js";import l from"./XVJFPZTW.js";import k from"./YOW3YKWR.js";import i from"./KKCLHXHG.js";import"./LLY5A2E2.js";import{a as K}from"./X42ACC66.js";import{a as u}from"./V4PJMCJZ.js";import h from"./EK3PM4L5.js";import{a as Y}from"./T6W6F4TF.js";import{a as ee}from"./CKUUYQLO.js";import g from"./KBSXHSBX.js";import{a as ae}from"./275FFTBE.js";import{a as se}from"./TFAJNKBC.js";import{a as oe}from"./HV7MVIQV.js";import f from"./PJPP6LOS.js";import e from"./2LVYAXHG.js";import{e as G,f as D}from"./4OI4QEV7.js";import"./SJMAKF4P.js";import"./TXZQZR3I.js";import c from"./STOGCXJH.js";import a from"./VGLBH473.js";import{a as b}from"./A6LBMS7A.js";import"./TLPZELG3.js";import{a as d,b as H}from"./V52GSTOC.js";import"./477I66FH.js";import{Ya as T,r as v,s as y}from"./ZJWR4W2S.js";import{ta as j}from"./M2U456J5.js";import{a as M}from"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([be,Se,,,,,,,{b:O,g:P,h:Z,i:W,j:B,k:R,l:C,m:J,n:_,o:q,p:S,q:Q,r:U},{a:F,b:Te},te,X,{a:N},,,,,ie,re,{b:k,c:L,d:x,e:w,f:A,g:le,h:I,i:ce,v:z},pe,{a:E,b:ue},me,ge,de])=>{var ke=async e=>{let t=e.allLayers.toArray(),a=[],r=new Map;for(let s of t)if(s instanceof be){let o=(async()=>{let i=await Q(s),n=await U(s,i);r.set(s.id,{layerItem:n,fieldRegistry:i})})();a.push(o)}return await Promise.all(a),r},$e=async e=>{await Se.whenOnce(()=>e.ready);let t=await ke(e.map),{layers:a}=await Me(t),r={schemaVersion:P,modified:Date.now(),embeddings:{modelProvider:W,model:B,dimensions:Z,templates:{layer:R,field:C}},layers:a},s=J.safeParse(r);if(!s.success)throw console.error("Schema Mismatch:",s.error.format()),new Error("Webmap embedding generation failed validation.");return s.data},Me=async e=>{let t=[],a=[];for(let[o,{fieldRegistry:i,layerItem:n}]of e.entries()){let l=he(R,{name:n.name,title:n.title,description:n.description});t.push(l);let c={id:o,name:n.name??"",title:n.title,description:n.description,vector:[],fields:[]};for(let[,m]of i.entries()){let g=he(C,{name:m.name,alias:m.alias,description:m.description});t.push(g),c.fields.push({name:m.name,alias:m.alias,description:m.description,vector:[]})}a.push(c)}let r=await F(t),s=0;return{layers:a.map(o=>(o.vector=r[s++],o.fields.forEach(i=>{i.vector=r[s++]}),o))}},he=(e,t)=>e.replace(/\{(\w+)\}/gu,(a,r)=>t[r]??""),Re=(e,t)=>{if(e.length!==t.length)throw new Error("Vectors must be the same length");let a=0,r=0,s=0;for(let n=0;n<e.length;++n){let l=e[n],c=t[n];a+=l*c,r+=l*l,s+=c*c}let o=Math.sqrt(r*s);if(o===0)return 0;let i=a/o;return Math.max(-1,Math.min(1,i))},V=[X,Y,ee,te,ae,se,oe,re,ne];async function Ce(e,t){let a=await x("navigation_tool_prompt"),{mapView:r}=b(t,["mapView"]),s=r.map.bookmarks?.map(f=>f.name).filter(Boolean)??[],o=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((f,ve)=>`${ve+1}. layerId=${f.id} | title=${f.title??""} | name=${f.name??""} | score=${f.score.toFixed(2)}`).join(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import x from"./4IU63OWQ.js";import w from"./VNLSYVPE.js";import t from"./33SFAZQG.js";import s from"./5A355PGH.js";import{a as $}from"./XQ3NBBQ3.js";import r from"./HMNBUGH2.js";import q from"./QNXI3WOF.js";import"./TWU3QXAS.js";import p from"./VWP2B4LB.js";import{a as ne}from"./5Q2XRQS6.js";import o from"./RHYNE5OE.js";import n from"./K7YQIJFT.js";import m from"./H6P3WP5D.js";import l from"./SZRJTQ54.js";import k from"./AVZ5Y6BK.js";import i from"./CCC6LBMY.js";import"./34O57OGV.js";import{a as K}from"./LXPGQNXQ.js";import{a as u}from"./FDOMMK2M.js";import h from"./WVP73XWD.js";import{a as Y}from"./Z5XQLSYH.js";import{a as ee}from"./OZAZ277H.js";import g from"./AVRS6UCQ.js";import{a as ae}from"./K5JVB6FU.js";import{a as se}from"./FCI6M62J.js";import{a as oe}from"./BFZ5S7NF.js";import f from"./7EHOFQ2P.js";import e from"./DG27JEYG.js";import{e as G,f as D}from"./FS7GXTTQ.js";import"./WXQ26G5Q.js";import"./MJSIYEWN.js";import c from"./AHCXG7XF.js";import a from"./UHICISBZ.js";import{a as b}from"./ONQ6JSBJ.js";import"./R74ZHFA6.js";import{a as d,b as H}from"./V7Y22FRP.js";import"./AXTQU5YL.js";import{Ya as T,r as v,s as y}from"./LOQ2PKV5.js";import{ta as j}from"./IYLFJCJ2.js";import{a as M}from"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([be,Se,,,,,,,{b:O,g:P,h:Z,i:W,j:B,k:R,l:C,m:J,n:_,o:q,p:S,q:Q,r:U},{a:F,b:Te},te,X,{a:N},,,,,ie,re,{b:k,c:L,d:x,e:w,f:A,g:le,h:I,i:ce,v:z},pe,{a:E,b:ue},me,ge,de])=>{var ke=async e=>{let t=e.allLayers.toArray(),a=[],r=new Map;for(let s of t)if(s instanceof be){let o=(async()=>{let i=await Q(s),n=await U(s,i);r.set(s.id,{layerItem:n,fieldRegistry:i})})();a.push(o)}return await Promise.all(a),r},$e=async e=>{await Se.whenOnce(()=>e.ready);let t=await ke(e.map),{layers:a}=await Me(t),r={schemaVersion:P,modified:Date.now(),embeddings:{modelProvider:W,model:B,dimensions:Z,templates:{layer:R,field:C}},layers:a},s=J.safeParse(r);if(!s.success)throw console.error("Schema Mismatch:",s.error.format()),new Error("Webmap embedding generation failed validation.");return s.data},Me=async e=>{let t=[],a=[];for(let[o,{fieldRegistry:i,layerItem:n}]of e.entries()){let l=he(R,{name:n.name,title:n.title,description:n.description});t.push(l);let c={id:o,name:n.name??"",title:n.title,description:n.description,vector:[],fields:[]};for(let[,m]of i.entries()){let g=he(C,{name:m.name,alias:m.alias,description:m.description});t.push(g),c.fields.push({name:m.name,alias:m.alias,description:m.description,vector:[]})}a.push(c)}let r=await F(t),s=0;return{layers:a.map(o=>(o.vector=r[s++],o.fields.forEach(i=>{i.vector=r[s++]}),o))}},he=(e,t)=>e.replace(/\{(\w+)\}/gu,(a,r)=>t[r]??""),Re=(e,t)=>{if(e.length!==t.length)throw new Error("Vectors must be the same length");let a=0,r=0,s=0;for(let n=0;n<e.length;++n){let l=e[n],c=t[n];a+=l*c,r+=l*l,s+=c*c}let o=Math.sqrt(r*s);if(o===0)return 0;let i=a/o;return Math.max(-1,Math.min(1,i))},V=[X,Y,ee,te,ae,se,oe,re,ne];async function Ce(e,t){let a=await x("navigation_tool_prompt"),{mapView:r}=b(t,["mapView"]),s=r.map.bookmarks?.map(f=>f.name).filter(Boolean)??[],o=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((f,ve)=>`${ve+1}. layerId=${f.id} | title=${f.title??""} | name=${f.name??""} | score=${f.score.toFixed(2)}`).join(`
3
3
  `):"",i=e.vectorSearchFieldResults?.length>0?JSON.stringify(e.vectorSearchFieldResults,null,2):"",n=e.intent==="goToBookmark"&&s.length?`Available bookmarks:
4
4
  ${s.map(f=>`- ${f}`).join(`
5
5
  `)}`:"",l=(e.intent==="goToLayer"||e.intent==="goToFeatures")&&e.vectorSearchLayerResults?.length?`Candidate layers:
@@ -33,7 +33,7 @@ ${l.results.map(c=>` - ${c.name} (${c.score.toFixed(2)})`).join(`
33
33
  _Example: “Center the map on San Francisco at scale 50000”_
34
34
  _Example: “Zoom to the features in the schools layer where city = 'Austin'”_
35
35
  _Example: “Go to the Downtown bookmark”_
36
- _Example: “Where is Mount Rainier?”_`,Oe={id:"navigationGraph",name:"Navigation Graph Agent",description:je,createGraph:Ve,workspace:L},Ge=async(e,t)=>(await d({text:"Exiting Data Exploration agent"},t),e),De=async(e,t)=>{await d({text:"Requesting LLM for layer filter results"},t);let a=await x("data_explore_filter_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer filter tools");let{userTimezone:r,userTimezoneOffset:s}=N(),o={layerFieldInfo:e.layerFieldInfo,userTimezone:r,userTimezoneOffset:s,queryResponse:e.queryResponse,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},i=await S({promptText:a,modelTier:"default",config:t,messages:e.dataExplorationMessages,inputVariables:o,tools:I}),n=[...e.dataExplorationMessages,i];if(!((i.tool_calls?.length??0)>0))return await d({text:"LLM determined no filter changes needed"},t),{...e,dataExplorationMessages:n};let l=n,c=i.content.toString();return await E(i,t),{...e,dataExplorationMessages:l,outputMessage:c}},He=async(e,t)=>{await d({text:"Requesting LLM for layer query results"},t);let a=await x("data_explore_query_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer query tools");let{userTimezone:r,userTimezoneOffset:s}=N(),o=e.agentExecutionContext.sharedState,i=o.lastNavigatedFeatures?.value,n=o.lastResolvedLocation?.value,l="none";if(i!=null)try{l=JSON.stringify(i)}catch{l="none"}let c="none";if(n!=null)try{c=JSON.stringify({address:n.address,location:n.location})}catch{c="none"}let m={layerFieldInfo:e.layerFieldInfo,userTimezone:r,userTimezoneOffset:s,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,lastNavigatedFeatures:l,lastResolvedLocation:c},g=await S({promptText:a,modelTier:"default",config:t,messages:e.dataExplorationMessages,inputVariables:m,tools:le}),p=(g.tool_calls?.length??0)>0,h=g.content.toString();return await E(g,t),{...e,dataExplorationMessages:[...e.dataExplorationMessages,g],...p?{}:{outputMessage:h},status:"success",summary:h&&!p?w(h):"Query planning completed."}},Pe=async(e,t)=>{try{await d({text:"Requesting LLM for summary on query results"},t);let a=await x("summarize_query_response_prompt"),r={queryResponse:e.queryResponse,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},s=await _({promptText:a,modelTier:"fast",config:t,messages:e.dataExplorationMessages,inputVariables:r}),o=typeof s=="string"?s:s.content,i=new j(o);await d({text:`Received response from LLM: ${o}`},t);let n=o;return{...e,outputMessage:n,status:"success",summary:n?w(n):"Summary generated.",dataExplorationMessages:[...e.dataExplorationMessages,i]}}catch(a){throw await d({text:"Error during filter LLM request"},t),new Error(`Error during filter LLM request: ${a instanceof Error?a.message:String(a)}`)}};async function Ze(e,t){if((e.queryResponse??[]).some(r=>{let s=r.details;return typeof s=="object"&&s!==null&&"error"in s}))return await d({text:"Skipping layer filter tool because query response contains an error."},t),{...e};let a=await new k(I,{handleToolErrors:!1}).invoke({messages:e.dataExplorationMessages},t);return await d({text:`Finished executing layer filter tool: ${a.messages.map(r=>r.content).join(", ")}`},t),{...e}}var ye=/\b(average|avg|mean|median|max(?:imum)?|min(?:imum)?|sum|total|count|std(?:dev|\s*deviation)|variance|null\s*count|missing\s*values?|range)\b/iu;function We(e,t){return ye.test(e)||ye.test(t)}var Be=async(e,t)=>{try{await d({text:"Preparing field information for vector search results"},t);let a=u(t,"layersAndFieldsRegistry"),{mapView:r}=b(t,["mapView"]),{assignedTask:s,userRequest:o}=e.agentExecutionContext,i=We(s,o),{layerFieldInfo:n,didFetchStatistics:l,fieldStatisticsFetchStatus:c}=await ie(e.vectorSearchFieldResults,a,r,i);l?await d({text:"Statistics fetched"},t):await d({text:"Statistics skipped"},t);for(let m of c)await d({text:` - ${m.fieldName} - stats ${m.didFetchStatistics?"fetched":"skipped"}`},t);return await d({text:"Field information prepared"},t),{...e,layerFieldInfo:n}}catch(a){throw await d({text:"Error during fetching statistics"},t),new Error(`Error during fetching statistics: ${a instanceof Error?a.message:String(a)}`)}},xe=.7,Je=10,Qe=async(e,t)=>{try{await d({text:"Similarity search to find fields"},t);let a=u(t,"fieldSearch"),r=u(t,"layersAndFieldsRegistry"),s=u(t,"embeddingCache"),o=await a.searchFields({text:e.agentExecutionContext.assignedTask,layerIds:e.vectorSearchLayerIds,minScore:xe,topResults:Je,embeddingCache:s}),i=o.map(({layerId:l,results:c})=>{let m=c.map(g=>` - ${g.name} (${g.score.toFixed(2)})`).join(`
36
+ _Example: “Where is Mount Rainier?”_`,Oe={id:"navigationGraph",name:"Navigation Graph Agent",description:je,createGraph:Ve,workspace:L},Ge=async(e,t)=>(await d({text:"Exiting Data Exploration agent"},t),e),De=async(e,t)=>{await d({text:"Requesting LLM for layer filter results"},t);let a=await x("data_explore_filter_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer filter tools");let{userTimezone:r,userTimezoneOffset:s}=N(),o={layerFieldInfo:e.layerFieldInfo,userTimezone:r,userTimezoneOffset:s,queryResponse:e.queryResponse,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},i=await S({promptText:a,modelTier:"default",config:t,messages:e.dataExplorationMessages,inputVariables:o,tools:I}),n=[...e.dataExplorationMessages,i];if(!((i.tool_calls?.length??0)>0))return await d({text:"LLM determined no filter changes needed"},t),{...e,dataExplorationMessages:n};let l=n,c=i.text;return await E(i,t),{...e,dataExplorationMessages:l,outputMessage:c}},He=async(e,t)=>{await d({text:"Requesting LLM for layer query results"},t);let a=await x("data_explore_query_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer query tools");let{userTimezone:r,userTimezoneOffset:s}=N(),o=e.agentExecutionContext.sharedState,i=o.lastNavigatedFeatures?.value,n=o.lastResolvedLocation?.value,l="none";if(i!=null)try{l=JSON.stringify(i)}catch{l="none"}let c="none";if(n!=null)try{c=JSON.stringify({address:n.address,location:n.location})}catch{c="none"}let m={layerFieldInfo:e.layerFieldInfo,userTimezone:r,userTimezoneOffset:s,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,lastNavigatedFeatures:l,lastResolvedLocation:c},g=await S({promptText:a,modelTier:"default",config:t,messages:e.dataExplorationMessages,inputVariables:m,tools:le}),p=(g.tool_calls?.length??0)>0,h=g.text;return await E(g,t),{...e,dataExplorationMessages:[...e.dataExplorationMessages,g],...p?{}:{outputMessage:h},status:"success",summary:h&&!p?w(h):"Query planning completed."}},Pe=async(e,t)=>{try{await d({text:"Requesting LLM for summary on query results"},t);let a=await x("summarize_query_response_prompt"),r={queryResponse:e.queryResponse,assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps},s=await _({promptText:a,modelTier:"fast",config:t,messages:e.dataExplorationMessages,inputVariables:r}),o=typeof s=="string"?s:s.content,i=new j(o);await d({text:`Received response from LLM: ${o}`},t);let n=o;return{...e,outputMessage:n,status:"success",summary:n?w(n):"Summary generated.",dataExplorationMessages:[...e.dataExplorationMessages,i]}}catch(a){throw await d({text:"Error during filter LLM request"},t),new Error(`Error during filter LLM request: ${a instanceof Error?a.message:String(a)}`)}};async function Ze(e,t){if((e.queryResponse??[]).some(r=>{let s=r.details;return typeof s=="object"&&s!==null&&"error"in s}))return await d({text:"Skipping layer filter tool because query response contains an error."},t),{...e};let a=await new k(I,{handleToolErrors:!1}).invoke({messages:e.dataExplorationMessages},t);return await d({text:`Finished executing layer filter tool: ${a.messages.map(r=>r.content).join(", ")}`},t),{...e}}var ye=/\b(average|avg|mean|median|max(?:imum)?|min(?:imum)?|sum|total|count|std(?:dev|\s*deviation)|variance|null\s*count|missing\s*values?|range)\b/iu;function We(e,t){return ye.test(e)||ye.test(t)}var Be=async(e,t)=>{try{await d({text:"Preparing field information for vector search results"},t);let a=u(t,"layersAndFieldsRegistry"),{mapView:r}=b(t,["mapView"]),{assignedTask:s,userRequest:o}=e.agentExecutionContext,i=We(s,o),{layerFieldInfo:n,didFetchStatistics:l,fieldStatisticsFetchStatus:c}=await ie(e.vectorSearchFieldResults,a,r,i);l?await d({text:"Statistics fetched"},t):await d({text:"Statistics skipped"},t);for(let m of c)await d({text:` - ${m.fieldName} - stats ${m.didFetchStatistics?"fetched":"skipped"}`},t);return await d({text:"Field information prepared"},t),{...e,layerFieldInfo:n}}catch(a){throw await d({text:"Error during fetching statistics"},t),new Error(`Error during fetching statistics: ${a instanceof Error?a.message:String(a)}`)}},xe=.7,Je=10,Qe=async(e,t)=>{try{await d({text:"Similarity search to find fields"},t);let a=u(t,"fieldSearch"),r=u(t,"layersAndFieldsRegistry"),s=u(t,"embeddingCache"),o=await a.searchFields({text:e.agentExecutionContext.assignedTask,layerIds:e.vectorSearchLayerIds,minScore:xe,topResults:Je,embeddingCache:s}),i=o.map(({layerId:l,results:c})=>{let m=c.map(g=>` - ${g.name} (${g.score.toFixed(2)})`).join(`
37
37
  `);return`${r.get(l)?.layerItem.name??l}:
38
38
  ${m}`}).join(`
39
39
  `),n;return o.length>0?n=`Vector search completed. Matching layers and fields with scores:
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import a from"./XV7RMYLR.js";import"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./EVMIYZWD.js";import"./JQYLMTDP.js";import"./FS7GXTTQ.js";import"./LOQ2PKV5.js";import"./IYLFJCJ2.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import"./BVUCNXC5.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import"./UZLQALHY.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
3
3
 
4
4
  You are an assistant that helps manage layer filters and visual effects for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
5
5
 
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
- import{a as s,b as c}from"./RSM7MEVT.js";import"./CAOMMQSY.js";import{g as e,h as t,v as i,z as r}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var n=e`:host{display:block;min-width:0}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;max-width:100%;min-width:0;margin-left:auto;justify-content:flex-end}.container>div:first-child{min-width:0}.avatar{display:flex;align-items:center;justify-content:center}.content{min-width:0;overflow-wrap:anywhere;>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,a=class extends i{constructor(){super(...arguments),this.userAvatarEnabled=!1}static{this.properties={content:1,user:1,message:0,userAvatarEnabled:5}}static{this.styles=n}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return t`<div class="container"><div><slot name=content><div class="content">${s(c(this._getContent()))}</div></slot></div>${this.userAvatarEnabled?t`<slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot>`:null}</div>`}};r("arcgis-assistant-user-message",a);export{a as ArcgisAssistantUserMessage};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as s,b as c}from"./ROQGPAR5.js";import"./RFVZ7KCG.js";import{g as e,h as t,v as i,z as r}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var n=e`:host{display:block;min-width:0}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;max-width:100%;min-width:0;margin-left:auto;justify-content:flex-end}.container>div:first-child{min-width:0}.avatar{display:flex;align-items:center;justify-content:center}.content{min-width:0;overflow-wrap:anywhere;>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,a=class extends i{constructor(){super(...arguments),this.userAvatarEnabled=!1}static{this.properties={content:1,user:1,message:0,userAvatarEnabled:5}}static{this.styles=n}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return t`<div class="container"><div><slot name=content><div class="content">${s(c(this._getContent()))}</div></slot></div>${this.userAvatarEnabled?t`<slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot>`:null}</div>`}};r("arcgis-assistant-user-message",a);export{a as ArcgisAssistantUserMessage};