@arcgis/ai-components 6.0.0-next.1 → 6.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.js +1 -1
- package/dist/agent-utils/SkillAgent.js +1 -1
- package/dist/agent-utils/WorkflowAgent.js +1 -1
- package/dist/agent-utils/createSchema.js +1 -1
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.js +1 -1
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- package/dist/agent-utils/tools/MCPToolProvider.js +1 -1
- package/dist/agent-utils/tools/WebMCPToolProvider.js +1 -1
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
- package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
- package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
- package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
- package/dist/agents/agents/arcgisKnowledge/graph/arcgisKnowledgeGraph.js +1 -1
- package/dist/agents/agents/dataExploration/dataExplorationAgent.js +1 -1
- package/dist/agents/agents/dataExplorationGraph/graph/dataExplorationGraph.js +1 -1
- package/dist/agents/agents/help/helpAgent.js +1 -1
- package/dist/agents/agents/helpGraph/graph/helpGraph.js +1 -1
- package/dist/agents/agents/layerStyling/context/layerStylingContext.js +1 -1
- package/dist/agents/agents/layerStyling/graph/layerStylingGraph.js +1 -1
- package/dist/agents/agents/navigation/navigationAgent.js +1 -1
- package/dist/agents/agents/navigationGraph/graph/navigationGraph.js +1 -1
- package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
- package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +1 -1
- package/dist/agents/tools/help/listFields/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
- package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
- package/dist/agents/tools/query/getStatistics/adapter.js +1 -1
- package/dist/agents/tools/query/getTopFeatures/adapter.js +1 -1
- package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
- package/dist/agents/tools/shared/resolveToolArtifact.js +1 -1
- package/dist/agents/tools/shared/types.js +1 -1
- package/dist/cdn/24KEZCPF.js +2 -0
- package/dist/cdn/{2UKFCF2J.js → 272R36XK.js} +2 -2
- package/dist/cdn/{FX4LV2S3.js → 2H32MDP2.js} +1 -1
- package/dist/cdn/{VAXH6RUQ.js → 2HNGMLFD.js} +2 -2
- package/dist/cdn/{24TK55FP.js → 2JD3G7IW.js} +2 -2
- package/dist/cdn/{P4CHI7W3.js → 2NOLMOEP.js} +2 -2
- package/dist/cdn/{ZU2FHVNK.js → 2OW3DCUT.js} +2 -2
- package/dist/cdn/2PGZDONH.js +2 -0
- package/dist/cdn/2WY5MPMY.js +2 -0
- package/dist/cdn/{2DWN3SKH.js → 3COVQI26.js} +2 -2
- package/dist/cdn/{VIJVRJHL.js → 3UVQLYUK.js} +2 -2
- package/dist/cdn/{BIEX4MVV.js → 5HNKH5OK.js} +2 -2
- package/dist/cdn/{46DT6BIG.js → 5INBG23U.js} +1 -1
- package/dist/cdn/{YJXRCO4T.js → 5LBUP33F.js} +2 -2
- package/dist/cdn/{UZLQALHY.js → 5PV2GUZW.js} +1 -1
- package/dist/cdn/{YBWRFVA6.js → 5SRRG7WG.js} +2 -2
- package/dist/cdn/{EEHDAYOG.js → 5XZ5VL42.js} +2 -2
- package/dist/cdn/{DI3VGUJY.js → 63OF33IL.js} +2 -2
- package/dist/cdn/{NHWT7CXX.js → 6ELWX4W5.js} +2 -2
- package/dist/cdn/{OKVLGJAG.js → 6J3J7VLW.js} +2 -2
- package/dist/cdn/{AOVJ34QE.js → 6QOSUG64.js} +2 -2
- package/dist/cdn/{GVFJHADC.js → 6UGT2UG5.js} +2 -2
- package/dist/cdn/{JEWJ4M25.js → 7APXFHDF.js} +3 -3
- package/dist/cdn/{QEGO4B2W.js → 7GDMXAF5.js} +2 -2
- package/dist/cdn/7JIXXYZR.js +2 -0
- package/dist/cdn/{X5ET73QZ.js → 7OQK2F7O.js} +2 -2
- package/dist/cdn/{KX6CZEVZ.js → 7XVIZ7HK.js} +2 -2
- package/dist/cdn/{FSLPYC4Y.js → A4ZVCRVF.js} +2 -2
- package/dist/cdn/{OVIQ5NSE.js → AGDGDULE.js} +2 -2
- package/dist/cdn/{TPULIO6I.js → AMA67DVI.js} +2 -2
- package/dist/cdn/AO42IPOX.js +2 -0
- package/dist/cdn/{UOKYHQNO.js → AOT3PM2Q.js} +2 -2
- package/dist/cdn/{EG5BMYZO.js → AQ7KG25Q.js} +2 -2
- package/dist/cdn/{6PK2UPG3.js → AWH4VDPD.js} +2 -2
- package/dist/cdn/AY2ZONWQ.js +2 -0
- package/dist/cdn/{JZPPP4QY.js → BMVPOFHU.js} +2 -2
- package/dist/cdn/BWUQRZPK.js +2 -0
- package/dist/cdn/{XWNZMKQF.js → C3VLDYS2.js} +2 -2
- package/dist/cdn/{PQ2DPOFM.js → C5Q6E7UC.js} +2 -2
- package/dist/cdn/{FDOMMK2M.js → CETIZ4IQ.js} +1 -1
- package/dist/cdn/{TENUVOFJ.js → COANVCKH.js} +2 -2
- package/dist/cdn/{2O52MJ3D.js → D7CRICBG.js} +2 -2
- package/dist/cdn/D7FEOAW3.js +2 -0
- package/dist/cdn/{PGUEODFA.js → DY6MO2CA.js} +2 -2
- package/dist/cdn/EKMCGN6R.js +2 -0
- package/dist/cdn/EUIURCPS.js +2 -0
- package/dist/cdn/{DGCWQYN3.js → FGQH46Z2.js} +2 -2
- package/dist/cdn/FIZMK7GS.js +1 -0
- package/dist/cdn/FONIQ7VF.js +2 -0
- package/dist/cdn/G3KILEGJ.js +2 -0
- package/dist/cdn/{FYZATVB3.js → G7MCIFV2.js} +2 -2
- package/dist/cdn/{SDWWUWAF.js → GGAXXX5X.js} +2 -2
- package/dist/cdn/GS5JDPZH.js +2 -0
- package/dist/cdn/{T3SCINN5.js → H4QWVTEZ.js} +2 -2
- package/dist/cdn/{ZSLHB6MF.js → H6J65TWL.js} +2 -2
- package/dist/cdn/{UHEYPSOR.js → HCPI2RJE.js} +2 -2
- package/dist/cdn/{PCAMBPOA.js → HJOWCZPL.js} +2 -2
- package/dist/cdn/{7HVIVV3O.js → HOMSK66Q.js} +2 -2
- package/dist/cdn/{5REENYPV.js → HTNKDDEV.js} +2 -2
- package/dist/cdn/{6WYVG3JI.js → HU527DML.js} +2 -2
- package/dist/cdn/I37ZJHTM.js +2 -0
- package/dist/cdn/{GHFOAS7T.js → I724KIFI.js} +2 -2
- package/dist/cdn/IH5P2PWJ.js +2 -0
- package/dist/cdn/{C67KQCPS.js → J3T5HB77.js} +2 -2
- package/dist/cdn/{EXLDRGUC.js → JCWFLYB4.js} +2 -2
- package/dist/cdn/{IHP25JWI.js → JSRNLNOE.js} +2 -2
- package/dist/cdn/{MPWEXYYB.js → KDA5VPLO.js} +2 -2
- package/dist/cdn/KRPPMEOF.js +2 -0
- package/dist/cdn/{GBFRJF4F.js → KURNYULZ.js} +2 -2
- package/dist/cdn/{ZKWXHSEQ.js → L46O52F7.js} +2 -2
- package/dist/cdn/{BBB5EJUB.js → L5OYOLWV.js} +3 -3
- package/dist/cdn/{FJV7CI7O.js → LDDP7NSY.js} +2 -2
- package/dist/cdn/{ZQTCPJUV.js → LGIXZLOP.js} +2 -2
- package/dist/cdn/{OGZFST2A.js → LMAIOLS2.js} +2 -2
- package/dist/cdn/{CFAC4FN3.js → LWEKPFV6.js} +2 -2
- package/dist/cdn/{L5IPMRHC.js → M52LKZN7.js} +2 -2
- package/dist/cdn/{AQF6BBWC.js → M5UMOOL2.js} +2 -2
- package/dist/cdn/{HWIM4KWF.js → MHXM37QI.js} +2 -2
- package/dist/cdn/{7X22QXJP.js → MR3R5YHQ.js} +2 -2
- package/dist/cdn/{M6JQGHCE.js → MUSLUFKI.js} +2 -2
- package/dist/cdn/MYLY2ABI.js +2 -0
- package/dist/cdn/{AMP43OT2.js → N2GN5WOI.js} +2 -2
- package/dist/cdn/{RE7MJTEF.js → NAVK5JJ2.js} +3 -3
- package/dist/cdn/NDSYDURO.js +2 -0
- package/dist/cdn/{7ZTYHZIN.js → NK2QRPS6.js} +2 -2
- package/dist/cdn/{GMZUN5SF.js → NYFL2F5L.js} +2 -2
- package/dist/cdn/{PGH7POKS.js → OKDXM5D4.js} +2 -2
- package/dist/cdn/{JFL5IWPK.js → OMUWBY75.js} +2 -2
- package/dist/cdn/{34O57OGV.js → OPQCY33W.js} +1 -1
- package/dist/cdn/{R74ZHFA6.js → OUMTV5H5.js} +1 -1
- package/dist/cdn/{5FDBJI24.js → OZDRETY2.js} +2 -2
- package/dist/cdn/{DYSPEU7W.js → PR4VMSKD.js} +1 -1
- package/dist/cdn/{HSMAXOOA.js → PXBS2FXE.js} +2 -2
- package/dist/cdn/{DJG6DBCU.js → Q7BJGEFH.js} +3 -3
- package/dist/cdn/{XEJFVUNQ.js → QAVDW7A7.js} +1 -1
- package/dist/cdn/{ONQ6JSBJ.js → QBZP6XOE.js} +1 -1
- package/dist/cdn/{OT5ECP4V.js → RFIN7KO6.js} +2 -2
- package/dist/cdn/RNJ7T5GF.js +2 -0
- package/dist/cdn/{BMPBJXD7.js → S6OUM5X2.js} +2 -2
- package/dist/cdn/SG6PAUVR.js +2 -0
- package/dist/cdn/{7MCFHVEH.js → SRXUC4QB.js} +2 -2
- package/dist/cdn/{A22375P3.js → SUMXIUIS.js} +2 -2
- package/dist/cdn/SW3D6QD4.js +2 -0
- package/dist/cdn/{GEFFWUB2.js → T2OYUOSO.js} +1 -1
- package/dist/cdn/T7LYQ56H.js +2 -0
- package/dist/cdn/{DZOQFEOB.js → TFXK2POV.js} +2 -2
- package/dist/cdn/{XQ3NBBQ3.js → TIQUULA4.js} +1 -1
- package/dist/cdn/{LCI5MEDN.js → TOUYGIGK.js} +2 -2
- package/dist/cdn/{RFDMNYTA.js → UJMM5QA4.js} +2 -2
- package/dist/cdn/{5LA77ZBW.js → UMTRLI63.js} +2 -2
- package/dist/cdn/{NPV4MEAZ.js → UP7RW5K2.js} +2 -2
- package/dist/cdn/{XCLICBG7.js → UR2S7L6Z.js} +2 -2
- package/dist/cdn/{CEKOEHB3.js → UWHRBGWN.js} +2 -2
- package/dist/cdn/{UQRBY7ID.js → UXDRYDOD.js} +2 -2
- package/dist/cdn/{JUPTVXLY.js → UZ7XFHYI.js} +2 -2
- package/dist/cdn/V66TS2BB.js +2 -0
- package/dist/cdn/{AAUVOBPS.js → VINKTQFR.js} +1 -1
- package/dist/cdn/{SWXUQFB6.js → VU7IOGNS.js} +2 -2
- package/dist/cdn/{HC5DJL2U.js → W2SIOY2B.js} +2 -2
- package/dist/cdn/{FBARYPZ7.js → W36IUEUB.js} +2 -2
- package/dist/cdn/{5TW2NFES.js → WEBAQIUT.js} +2 -2
- package/dist/cdn/{WSIZ2OTL.js → WHIWOYHN.js} +1 -1
- package/dist/cdn/WOL5YMJ2.js +2 -0
- package/dist/cdn/{66VWTARH.js → X3YFCWQZ.js} +2 -2
- package/dist/cdn/{ICBIUFK7.js → X4EQEKM7.js} +2 -2
- package/dist/cdn/{TJBU5BQK.js → XBWGOD6I.js} +2 -2
- package/dist/cdn/{6E6T6U7W.js → XGDXTTYW.js} +2 -2
- package/dist/cdn/{CDS2HGQY.js → XLHYQNAM.js} +2 -2
- package/dist/cdn/{NEV6OZN3.js → XMQJWPXI.js} +2 -2
- package/dist/cdn/{QT3B5K4R.js → XQUKC4YK.js} +2 -2
- package/dist/cdn/{JEBRN3EU.js → XSH4B7FP.js} +2 -2
- package/dist/cdn/{LK7ZIQW6.js → XVWSIDZV.js} +2 -2
- package/dist/cdn/{J6A4AS7E.js → XYMIFFBW.js} +2 -2
- package/dist/cdn/{MPQ2OZXN.js → Y3ZKMD47.js} +2 -2
- package/dist/cdn/{YPLPDUMB.js → YAANCUW2.js} +2 -2
- package/dist/cdn/{KY7M4WHO.js → YD5LVM7V.js} +2 -2
- package/dist/cdn/{AMURN3LO.js → YGI277SH.js} +2 -2
- package/dist/cdn/{YI6NIHNI.js → YGSDJ4V3.js} +2 -2
- package/dist/cdn/YJEARDAZ.js +2 -0
- package/dist/cdn/{XC3T3Z5R.js → YSEHJQ4L.js} +2 -2
- package/dist/cdn/Z44NI2YQ.js +2 -0
- package/dist/cdn/{74CVYM72.js → ZEDDYT24.js} +2 -2
- package/dist/cdn/{MD2FTKQT.js → ZROI63CW.js} +2 -2
- package/dist/cdn/{UYP5PH5E.js → ZUKM4DGB.js} +2 -2
- package/dist/cdn/ZVVNATCX.js +2 -0
- package/dist/cdn/agent-utils/BaseAgent.js +2 -2
- package/dist/cdn/agent-utils/FunctionAgent.js +2 -2
- package/dist/cdn/agent-utils/LLMAgent.js +2 -2
- package/dist/cdn/agent-utils/SkillAgent.js +2 -2
- package/dist/cdn/agent-utils/WorkflowAgent.js +2 -2
- package/dist/cdn/agent-utils/createSchema.js +2 -2
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
- package/dist/cdn/agent-utils/tools/FunctionTool.js +2 -2
- package/dist/cdn/agent-utils/tools/MCPToolProvider.js +2 -2
- package/dist/cdn/agent-utils/tools/WebMCPToolProvider.js +2 -2
- package/dist/cdn/agent-utils/workflows/ConditionalWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/LoopWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/ParallelWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/RouterWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SequentialWorkflow.js +2 -2
- package/dist/cdn/agent-utils/workflows/SwitchWorkflow.js +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/cdn/orchestrator/embeddings/getEmbeddings.js +2 -2
- package/dist/cdn/orchestrator/models/chatModel.js +2 -2
- package/dist/cdn/orchestrator/models/prompts.js +2 -2
- package/dist/cdn/orchestrator/signals.js +2 -2
- package/dist/cdn/orchestrator/state/runtime.js +2 -2
- package/dist/chunks/BaseWorkflow.js +1 -1
- package/dist/chunks/SKILL.js +1 -1
- package/dist/chunks/SKILL2.js +1 -1
- package/dist/chunks/SKILL3.js +1 -1
- package/dist/chunks/SKILL4.js +1 -1
- package/dist/chunks/adapter.js +1 -1
- package/dist/chunks/adapter2.js +1 -1
- package/dist/chunks/aiFactory.js +1 -1
- package/dist/chunks/aiUtilityService.js +1 -1
- package/dist/chunks/arcgisToolRegistry.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/converterUtils.js +1 -1
- package/dist/chunks/createSkillAgent.js +1 -1
- package/dist/chunks/data_explore_filter_prompt.js +1 -1
- package/dist/chunks/data_explore_query_prompt.js +1 -1
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +1 -1
- package/dist/chunks/fetchService.js +1 -1
- package/dist/chunks/fetchUtils.js +1 -1
- package/dist/chunks/fieldStatistics.js +1 -1
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +1 -1
- package/dist/chunks/getPrompt.js +1 -1
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpState.js +1 -1
- package/dist/chunks/help_prompt.js +1 -1
- package/dist/chunks/intent_prompt.js +1 -1
- package/dist/chunks/layerQueryToolCalling.js +1 -1
- package/dist/chunks/layerStylingState.js +1 -1
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/localization.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +1 -1
- package/dist/chunks/modelConfig.js +1 -1
- package/dist/chunks/modelPricing.js +1 -1
- package/dist/chunks/navigationState.js +1 -1
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/observationSnapshot.js +1 -1
- package/dist/chunks/reducers.js +1 -1
- package/dist/chunks/requireAgentServices.js +1 -1
- package/dist/chunks/resolveFieldNames.js +1 -1
- package/dist/chunks/resolveGeometryFilter.js +1 -1
- package/dist/chunks/runtime.js +2 -2
- package/dist/chunks/runtime2.js +1 -1
- package/dist/chunks/runtimeSpans.js +1 -1
- package/dist/chunks/schema.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/summarize_query_response_prompt.js +1 -1
- package/dist/chunks/textFormatters.js +1 -1
- package/dist/chunks/toolCallResponse.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/webmapSchema.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-inspector/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-latency/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-panel/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-run/customElement.js +1 -1
- package/dist/components/arcgis-assistant-observation-usage/customElement.js +1 -1
- package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/orchestrator/embeddings/cosineSimilarity.js +1 -1
- package/dist/orchestrator/embeddings/getEmbeddings.js +1 -1
- package/dist/orchestrator/embeddings/webmapEmbeddings.js +1 -1
- package/dist/orchestrator/models/chatModel.js +1 -1
- package/dist/orchestrator/models/prompts.js +1 -1
- package/dist/orchestrator/orchestrator/orchestrator.js +1 -1
- package/dist/orchestrator/orchestrator/orchestratorEvents.js +1 -1
- package/dist/orchestrator/signals.js +1 -1
- package/dist/orchestrator/state/runtime.js +1 -1
- package/dist/orchestrator/state/types.js +1 -1
- package/dist/orchestrator/types.js +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +5 -5
- package/dist/cdn/2UDDCWNW.js +0 -2
- package/dist/cdn/434TAA3J.js +0 -2
- package/dist/cdn/4KFTUBFL.js +0 -2
- package/dist/cdn/AO2G4EXA.js +0 -2
- package/dist/cdn/AWPLRVPS.js +0 -2
- package/dist/cdn/C76HLPKU.js +0 -2
- package/dist/cdn/CADNOKIK.js +0 -2
- package/dist/cdn/CHHC6YNW.js +0 -2
- package/dist/cdn/DBRBT54R.js +0 -2
- package/dist/cdn/DJKEGIQZ.js +0 -2
- package/dist/cdn/EGSD465U.js +0 -2
- package/dist/cdn/HLWG7OIR.js +0 -2
- package/dist/cdn/KKWCHNYQ.js +0 -2
- package/dist/cdn/M2G44RTS.js +0 -2
- package/dist/cdn/MB7SEHPZ.js +0 -2
- package/dist/cdn/MC2V5WT3.js +0 -2
- package/dist/cdn/MZFWD5CQ.js +0 -2
- package/dist/cdn/NMFEXE4D.js +0 -2
- package/dist/cdn/OYHYHALE.js +0 -2
- package/dist/cdn/QUZTFUWM.js +0 -1
- package/dist/cdn/RF6HWZMB.js +0 -2
- package/dist/cdn/RFPTOFM4.js +0 -2
- package/dist/cdn/RKURZ5T2.js +0 -2
- package/dist/cdn/SJ4UMNIS.js +0 -2
- package/dist/cdn/USPB2QBX.js +0 -2
- package/dist/cdn/V6EX4YCY.js +0 -2
- package/dist/cdn/VA4M72JC.js +0 -2
- package/dist/cdn/VQ67NANV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as $}from"./UYP5PH5E.js";import"./QUZTFUWM.js";import"./A22375P3.js";import"./DYSPEU7W.js";import{C as S,g as b,h as u,o as v,v as m,w as f,x as w,y as _}from"./RE7MJTEF.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([q])=>{var R=b`:host{--calcite-text-area-border-color: var(--calcite-color-border-1);--calcite-text-area-divider-color: var(--calcite-color-border-1);--calcite-text-area-corner-radius: var(--calcite-border-radius)}.input-container{display:flex;flex-direction:column}.footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.focused{--calcite-text-area-shadow: var(--calcite-shadow-sm)}.suggestions-loading{padding:var(--calcite-spacing-sm)}`,P={suggestions:[],loading:!1,selectedIndex:0};function I(c){return c.filter(({trigger:t})=>t!==""&&t!=="/").sort((t,e)=>e.trigger.length-t.trigger.length)}var y=class{constructor(t){this._onStateChange=t}#t=null;#o;#e=P;get state(){return this.#e}get activeSuggestion(){return this.#o}get selectedSuggestion(){return this.#e.suggestions[this.#e.selectedIndex]}moveSelection(t){this.#a({selectedIndex:Math.max(0,Math.min(this.#e.selectedIndex+t,this.#e.suggestions.length-1))})}async update(t,e,i){this.#t?.abort();let s=this.#i(t,e,i);if(!s){this.close();return}let n=new AbortController;this.#t=n,this.#o=s,this.#a({suggestions:[],loading:!0,selectedIndex:0});try{let r=await s.provider.getSuggestions(s.query,n.signal);if(n.signal.aborted||this.#t!==n)return;this.#a({suggestions:r,loading:!1,selectedIndex:0})}catch{n.signal.aborted||this.close()}}async resolveTypedInputs(t,e,i,s){let n=await this.#s(t,e.commandProvider,i,s);return s.aborted?[]:(n.push(...await this.#r(t,e.entityProviders,i,s)),n)}close(){this.#t?.abort(),this.#t=null,this.#o=void 0,this.#a({suggestions:[],loading:!1,selectedIndex:0})}#i(t,e,i){if(e==null)return;let s=t.slice(0,e),n=s.slice(1);if(i.commandProvider&&s.startsWith("/")&&!/\s/u.test(n))return{kind:"command",provider:i.commandProvider,start:0,end:e,query:n};let r=I(i.entityProviders);for(let a of r){let l=s.lastIndexOf(a.trigger),o=s.slice(l+a.trigger.length);if(l!==-1&&a.trigger&&!/\s/u.test(o)&&(l===0||/\s/u.test(s[l-1]??"")))return{kind:"entity",provider:a,start:l,end:e,query:o}}}async#s(t,e,i,s){let n=/^\/([^\s]+)/u.exec(t);if(!n||!e)return[];let[r,a]=n;if(i.some(h=>h.start===0&&h.end===r.length))return[];let l=await e.getSuggestions(a,s);if(s.aborted)return[];let o=l.find(h=>h.id===a);return o?[{start:0,end:r.length,part:{kind:"command",id:o.id,label:o.label,agentId:o.agentId,requiresText:o.requiresText||void 0,data:o.data}}]:[]}async#r(t,e,i,s){let n=I(e),r=[];for(let a of t.matchAll(/(?:^|\s)(\S+)/gu)){let l=a[1],o=n.find(g=>l.startsWith(g.trigger));if(!o)continue;let h=a.index+a[0].length-l.length;if(i.some(g=>g.start===h&&g.end===h+l.length))continue;let d=l.slice(o.trigger.length);if(!d)continue;let k=await o.getSuggestions(d,s);if(s.aborted)return[];let p=k.find(g=>g.id===d);p&&r.push({start:h,end:h+l.length,part:{kind:"entity",providerId:o.id,trigger:o.trigger,id:p.id,label:p.label,data:p.data}})}return r}#a(t){this.#e={...this.#e,...t},this._onStateChange(this.#e)}};function V(c,t,e,i){if(c===t&&!i)return[...e];let s=0,n=Math.min(c.length,t.length,i?.start??c.length);for(;s<n&&c[s]===t[s];)s+=1;let r=c.length,a=t.length,l=Math.max(s,i?.end??s);for(;r>l&&a>s&&c[r-1]===t[a-1];)r-=1,a-=1;let o=a-r;return e.flatMap(h=>{let d=h.end<=s?h:h.start>=r?{...h,start:h.start+o,end:h.end+o}:void 0;return d&&(d.part.kind!=="command"||d.start===0)&&(d.start===0||/\s/u.test(t[d.start-1]))&&(d.end===t.length||/\s/u.test(t[d.end]))?[d]:[]})}function D(c,t){for(let e of[...t].reverse())e.part.kind==="command"&&(c=c.slice(0,e.start)+c.slice(e.end).replace(/^[\t ]+/u,""));return c.trim()}function E(c,t){let e=0;return t.flatMap(i=>{let s=i.kind==="command"?`/${i.id}`:`${i.trigger}${i.id}`,n=c.indexOf(s,e);return n===-1?[]:(e=n+s.length,[{start:n,end:e,part:i}])})}var x=class extends w{constructor(){super(...arguments),this.#t=m(),this.#o=m(),this.#i=new y(t=>this._suggestionState=t),this.#s=[],this.#r="",this.#a="",this.#d=()=>{let t=this.#t.value?.shadowRoot?.querySelector("textarea");this.#l=t?{start:t.selectionStart,end:t.selectionEnd}:void 0},this.#c=t=>{t.stopPropagation();let e=t.detail;this._setDraftValue(e.value),e.focusInput&&this.#t.value&&this.#t.value.setFocus()},this.#u=t=>{let e=t.target.value??"",i=this.#l;this.#l=void 0,this.#h(e,i),this.inputValue=e;let s=this.#t.value?.shadowRoot?.querySelector("textarea")?.selectionStart;this.#i.update(e,s,{commandProvider:this.commandProvider,entityProviders:this.entityProviders??[]})},this.#g=async t=>{if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||this.keyboardShortcutsDisabled)){if(this._suggestionState.suggestions.length>0){if(t.key==="ArrowDown"){t.preventDefault(),this.#i.moveSelection(1);return}if(t.key==="ArrowUp"){t.preventDefault(),this.#i.moveSelection(-1);return}if(t.key==="Enter"){t.preventDefault(),await this.#f(this.#i.selectedSuggestion);return}if(t.key==="Escape"){t.preventDefault(),this.#i.close();return}}switch(t.key){case"Enter":t.preventDefault(),await this.submitMessage();break;case"ArrowUp":await this._navigateHistory("up",t);break;case"ArrowDown":await this._navigateHistory("down",t);break}}},this._messages=$({blocking:!0}),this._inFocus=!1,this._suggestionState=this.#i.state,this._textRequired=!1,this.keyboardShortcutsDisabled=!1,this.awaitingResponse=!1,this.voiceInputEnabled=!1,this.messages=new q([]),this.disabled=!1,this.entityProviders=[],this.arcgisCancel=v(),this.arcgisSubmit=v({cancelable:!0})}static{this.properties={_inFocus:16,_suggestionState:16,_textRequired:16,keyboardShortcutsDisabled:5,entryPlaceholder:1,awaitingResponse:5,inputValue:1,status:1,voiceInputEnabled:5,messages:0,disabled:5,commandProvider:0,entityProviders:0}}static{this.styles=R}#t;#o;#e;#i;#s;#r;#a;#n;#l;#d;#c;#u;#g;get inputValue(){return this.#a}set inputValue(t){t!==this.#a&&(this.#a=t,this.#n?.abort(),this.#n=void 0)}async submitMessage(){if(this.awaitingResponse){this.#n?.abort(),this.#n=void 0,this.arcgisCancel.emit();return}let t=this.inputValue;this.#h(t),this.#n?.abort();let e=new AbortController;this.#n=e;let i;try{if(i=await this.#i.resolveTypedInputs(t,{commandProvider:this.commandProvider,entityProviders:this.entityProviders??[]},this.#s,e.signal),e.signal.aborted||this.#n!==e)return}catch(a){if(e.signal.aborted)return;throw a}finally{this.#n===e&&(this.#n=void 0)}this.#s.push(...i.filter(a=>!this.#s.some(l=>l.start===a.start&&l.end===a.end)));let s=D(t,this.#s);if(this._textRequired=!s&&this.#s.some(a=>a.part.kind==="command"&&(a.part.requiresText??!1)),this._textRequired){await this.#t.value?.setFocus();return}let n=this.#p();if(!s&&n.length===0)return;let r={prompt:s,displayText:t.trim(),parts:n};this.arcgisSubmit.emit(r.parts.length?r:s).defaultPrevented||(this.inputValue="",this.#s=[],this.#r="",this.#e=void 0,this.#i.close(),this.#o.value?.clearDraftSession(),this.#t.value&&await this.#t.value.setFocus())}loaded(){this.manager.onLifecycle(()=>(this.el.addEventListener("arcgisVoiceInputDraftChange",this.#c),{remove:()=>{this.el.removeEventListener("arcgisVoiceInputDraftChange",this.#c)}}))}async _navigateHistory(t,e){let i=this.#t.value;if(!i)return;let s=this.messages.toArray().filter(h=>h.role==="user");if(s.length===0)return;let n=i.value??"",r=i.shadowRoot?.querySelector("textarea"),a=r?.selectionStart,l=r?.selectionEnd;if(a==null||l==null||a!==l||t==="up"&&a!==0||t==="down"&&a!==n.length)return;if(t==="up"){this.#e?this.#e.index=Math.max(0,this.#e.index-1):this.#e={index:s.length-1,draft:this.#y()},this.#v(s[this.#e.index]),e.preventDefault();return}let o=this.#e;o&&(o.index<s.length-1?(o.index+=1,this.#v(s[o.index])):(this.#e=void 0,this.#m(o.draft)),e.preventDefault())}#y(){return this.#h(this.inputValue),{value:this.inputValue,parts:this.#p()}}#p(){return this.#s.map(t=>t.part)}#v(t){let e=t.parts??[];this.#m({value:t.content,parts:e})}#m(t){this.inputValue=t.value,this.#r=t.value,this.#s=E(t.value,t.parts),this.#l=void 0,this._textRequired=!1,this.#i.close()}_setDraftValue(t){this.#i.close(),this.#s=[],this.#r=t,this.#l=void 0,this._textRequired=!1,this.inputValue=t,this.#e=void 0}#h(t,e){this._textRequired=!1,this.#s=V(this.#r,t,this.#s,e),this.#r=t}async#f(t){let e=this.#i.activeSuggestion;if(!t||!e)return;let i=`${e.kind==="command"?"/":e.provider.trigger}${t.id}`,s=`${this.inputValue.slice(0,e.start)}${i} ${this.inputValue.slice(e.end)}`;this.#h(s),this.#s.push({start:e.start,end:e.start+i.length,part:e.kind==="command"?{kind:"command",id:t.id,label:t.label,agentId:"agentId"in t?t.agentId:void 0,requiresText:"requiresText"in t&&t.requiresText||void 0,data:t.data}:{kind:"entity",providerId:e.provider.id,trigger:e.provider.trigger,id:t.id,label:t.label,data:t.data}}),this.#s.sort((a,l)=>a.start-l.start),this.inputValue=s,this.#e=void 0;let n=e.start+i.length+1;this.#i.close(),await this.updateComplete,await this.#t.value?.setFocus();let r=this.#t.value?.shadowRoot?.querySelector("textarea");r&&(r.selectionStart=n,r.selectionEnd=n)}_onFocusIn(){this._inFocus=!0}_onFocusOut(){this._inFocus=!1}#x(t){return t?u`<calcite-popover .open=${this._suggestionState.suggestions.length>0||this._suggestionState.loading} placement=top-start .label=${this._messages.suggestions} .referenceElement=${t} trigger-disabled pointer-disabled focus-trap-disabled><calcite-list .label=${this._messages.suggestions} selection-appearance=highlight selection-mode=single-persist .loading=${this._suggestionState.loading}>${this._suggestionState.loading?null:this._suggestionState.suggestions.map((e,i)=>u`<calcite-list-item .label=${e.label} .description=${e.description} .selected=${i===this._suggestionState.selectedIndex} @click=${()=>{this.#f(e)}}></calcite-list-item>`)}</calcite-list>${this._suggestionState.loading?u`<div class="suggestions-loading" role=status>${this._messages.loadingSuggestions}</div>`:null}</calcite-popover>`:null}render(){let t=this.#t.value;return u`<div class="input-container">${this._textRequired?u`<div role=alert>${this._messages.textRequired}</div>`:null}<calcite-text-area class=${_({focused:this._inFocus})} .value=${this.inputValue} .placeholder=${this.entryPlaceholder??this._messages.entryPlaceholder} resize=vertical @calciteTextAreaInput=${this.#u} @beforeinput=${this.#d} .status=${this._textRequired?"invalid":"idle"} .disabled=${this.disabled} @keydown=${this.#g} @focusin=${this._onFocusIn} @focusout=${this._onFocusOut} ${f(this.#t)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled?u`<arcgis-assistant-speech-input .awaitingResponse=${this.awaitingResponse} .inputValue=${this.inputValue} ${f(this.#o)}></arcgis-assistant-speech-input>`:null}<slot name=entry-actions-end></slot></div></calcite-text-area>${this.#x(t)}</div>`}};S("arcgis-assistant-chat-entry",x);return x},"core/Collection")
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as $}from"./ZUKM4DGB.js";import"./FIZMK7GS.js";import"./SUMXIUIS.js";import"./PR4VMSKD.js";import{C as S,g as b,h as u,o as v,v as m,w as f,x as w,y as _}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([q])=>{var R=b`:host{--calcite-text-area-border-color: var(--calcite-color-border-1);--calcite-text-area-divider-color: var(--calcite-color-border-1);--calcite-text-area-corner-radius: var(--calcite-border-radius)}.input-container{display:flex;flex-direction:column}.footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.focused{--calcite-text-area-shadow: var(--calcite-shadow-sm)}.suggestions-loading{padding:var(--calcite-spacing-sm)}`,P={suggestions:[],loading:!1,selectedIndex:0};function I(c){return c.filter(({trigger:t})=>t!==""&&t!=="/").sort((t,e)=>e.trigger.length-t.trigger.length)}var y=class{constructor(t){this._onStateChange=t}#t=null;#o;#e=P;get state(){return this.#e}get activeSuggestion(){return this.#o}get selectedSuggestion(){return this.#e.suggestions[this.#e.selectedIndex]}moveSelection(t){this.#a({selectedIndex:Math.max(0,Math.min(this.#e.selectedIndex+t,this.#e.suggestions.length-1))})}async update(t,e,i){this.#t?.abort();let s=this.#i(t,e,i);if(!s){this.close();return}let n=new AbortController;this.#t=n,this.#o=s,this.#a({suggestions:[],loading:!0,selectedIndex:0});try{let r=await s.provider.getSuggestions(s.query,n.signal);if(n.signal.aborted||this.#t!==n)return;this.#a({suggestions:r,loading:!1,selectedIndex:0})}catch{n.signal.aborted||this.close()}}async resolveTypedInputs(t,e,i,s){let n=await this.#s(t,e.commandProvider,i,s);return s.aborted?[]:(n.push(...await this.#r(t,e.entityProviders,i,s)),n)}close(){this.#t?.abort(),this.#t=null,this.#o=void 0,this.#a({suggestions:[],loading:!1,selectedIndex:0})}#i(t,e,i){if(e==null)return;let s=t.slice(0,e),n=s.slice(1);if(i.commandProvider&&s.startsWith("/")&&!/\s/u.test(n))return{kind:"command",provider:i.commandProvider,start:0,end:e,query:n};let r=I(i.entityProviders);for(let a of r){let l=s.lastIndexOf(a.trigger),o=s.slice(l+a.trigger.length);if(l!==-1&&a.trigger&&!/\s/u.test(o)&&(l===0||/\s/u.test(s[l-1]??"")))return{kind:"entity",provider:a,start:l,end:e,query:o}}}async#s(t,e,i,s){let n=/^\/([^\s]+)/u.exec(t);if(!n||!e)return[];let[r,a]=n;if(i.some(h=>h.start===0&&h.end===r.length))return[];let l=await e.getSuggestions(a,s);if(s.aborted)return[];let o=l.find(h=>h.id===a);return o?[{start:0,end:r.length,part:{kind:"command",id:o.id,label:o.label,agentId:o.agentId,requiresText:o.requiresText||void 0,data:o.data}}]:[]}async#r(t,e,i,s){let n=I(e),r=[];for(let a of t.matchAll(/(?:^|\s)(\S+)/gu)){let l=a[1],o=n.find(g=>l.startsWith(g.trigger));if(!o)continue;let h=a.index+a[0].length-l.length;if(i.some(g=>g.start===h&&g.end===h+l.length))continue;let d=l.slice(o.trigger.length);if(!d)continue;let k=await o.getSuggestions(d,s);if(s.aborted)return[];let p=k.find(g=>g.id===d);p&&r.push({start:h,end:h+l.length,part:{kind:"entity",providerId:o.id,trigger:o.trigger,id:p.id,label:p.label,data:p.data}})}return r}#a(t){this.#e={...this.#e,...t},this._onStateChange(this.#e)}};function V(c,t,e,i){if(c===t&&!i)return[...e];let s=0,n=Math.min(c.length,t.length,i?.start??c.length);for(;s<n&&c[s]===t[s];)s+=1;let r=c.length,a=t.length,l=Math.max(s,i?.end??s);for(;r>l&&a>s&&c[r-1]===t[a-1];)r-=1,a-=1;let o=a-r;return e.flatMap(h=>{let d=h.end<=s?h:h.start>=r?{...h,start:h.start+o,end:h.end+o}:void 0;return d&&(d.part.kind!=="command"||d.start===0)&&(d.start===0||/\s/u.test(t[d.start-1]))&&(d.end===t.length||/\s/u.test(t[d.end]))?[d]:[]})}function D(c,t){for(let e of[...t].reverse())e.part.kind==="command"&&(c=c.slice(0,e.start)+c.slice(e.end).replace(/^[\t ]+/u,""));return c.trim()}function E(c,t){let e=0;return t.flatMap(i=>{let s=i.kind==="command"?`/${i.id}`:`${i.trigger}${i.id}`,n=c.indexOf(s,e);return n===-1?[]:(e=n+s.length,[{start:n,end:e,part:i}])})}var x=class extends w{constructor(){super(...arguments),this.#t=m(),this.#o=m(),this.#i=new y(t=>this._suggestionState=t),this.#s=[],this.#r="",this.#a="",this.#d=()=>{let t=this.#t.value?.shadowRoot?.querySelector("textarea");this.#l=t?{start:t.selectionStart,end:t.selectionEnd}:void 0},this.#c=t=>{t.stopPropagation();let e=t.detail;this._setDraftValue(e.value),e.focusInput&&this.#t.value&&this.#t.value.setFocus()},this.#u=t=>{let e=t.target.value??"",i=this.#l;this.#l=void 0,this.#h(e,i),this.inputValue=e;let s=this.#t.value?.shadowRoot?.querySelector("textarea")?.selectionStart;this.#i.update(e,s,{commandProvider:this.commandProvider,entityProviders:this.entityProviders??[]})},this.#g=async t=>{if(!(t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||this.keyboardShortcutsDisabled)){if(this._suggestionState.suggestions.length>0){if(t.key==="ArrowDown"){t.preventDefault(),this.#i.moveSelection(1);return}if(t.key==="ArrowUp"){t.preventDefault(),this.#i.moveSelection(-1);return}if(t.key==="Enter"){t.preventDefault(),await this.#f(this.#i.selectedSuggestion);return}if(t.key==="Escape"){t.preventDefault(),this.#i.close();return}}switch(t.key){case"Enter":t.preventDefault(),await this.submitMessage();break;case"ArrowUp":await this._navigateHistory("up",t);break;case"ArrowDown":await this._navigateHistory("down",t);break}}},this._messages=$({blocking:!0}),this._inFocus=!1,this._suggestionState=this.#i.state,this._textRequired=!1,this.keyboardShortcutsDisabled=!1,this.awaitingResponse=!1,this.voiceInputEnabled=!1,this.messages=new q([]),this.disabled=!1,this.entityProviders=[],this.arcgisCancel=v(),this.arcgisSubmit=v({cancelable:!0})}static{this.properties={_inFocus:16,_suggestionState:16,_textRequired:16,keyboardShortcutsDisabled:5,entryPlaceholder:1,awaitingResponse:5,inputValue:1,status:1,voiceInputEnabled:5,messages:0,disabled:5,commandProvider:0,entityProviders:0}}static{this.styles=R}#t;#o;#e;#i;#s;#r;#a;#n;#l;#d;#c;#u;#g;get inputValue(){return this.#a}set inputValue(t){t!==this.#a&&(this.#a=t,this.#n?.abort(),this.#n=void 0)}async submitMessage(){if(this.awaitingResponse){this.#n?.abort(),this.#n=void 0,this.arcgisCancel.emit();return}let t=this.inputValue;this.#h(t),this.#n?.abort();let e=new AbortController;this.#n=e;let i;try{if(i=await this.#i.resolveTypedInputs(t,{commandProvider:this.commandProvider,entityProviders:this.entityProviders??[]},this.#s,e.signal),e.signal.aborted||this.#n!==e)return}catch(a){if(e.signal.aborted)return;throw a}finally{this.#n===e&&(this.#n=void 0)}this.#s.push(...i.filter(a=>!this.#s.some(l=>l.start===a.start&&l.end===a.end)));let s=D(t,this.#s);if(this._textRequired=!s&&this.#s.some(a=>a.part.kind==="command"&&(a.part.requiresText??!1)),this._textRequired){await this.#t.value?.setFocus();return}let n=this.#p();if(!s&&n.length===0)return;let r={prompt:s,displayText:t.trim(),parts:n};this.arcgisSubmit.emit(r.parts.length?r:s).defaultPrevented||(this.inputValue="",this.#s=[],this.#r="",this.#e=void 0,this.#i.close(),this.#o.value?.clearDraftSession(),this.#t.value&&await this.#t.value.setFocus())}loaded(){this.manager.onLifecycle(()=>(this.el.addEventListener("arcgisVoiceInputDraftChange",this.#c),{remove:()=>{this.el.removeEventListener("arcgisVoiceInputDraftChange",this.#c)}}))}async _navigateHistory(t,e){let i=this.#t.value;if(!i)return;let s=this.messages.toArray().filter(h=>h.role==="user");if(s.length===0)return;let n=i.value??"",r=i.shadowRoot?.querySelector("textarea"),a=r?.selectionStart,l=r?.selectionEnd;if(a==null||l==null||a!==l||t==="up"&&a!==0||t==="down"&&a!==n.length)return;if(t==="up"){this.#e?this.#e.index=Math.max(0,this.#e.index-1):this.#e={index:s.length-1,draft:this.#y()},this.#v(s[this.#e.index]),e.preventDefault();return}let o=this.#e;o&&(o.index<s.length-1?(o.index+=1,this.#v(s[o.index])):(this.#e=void 0,this.#m(o.draft)),e.preventDefault())}#y(){return this.#h(this.inputValue),{value:this.inputValue,parts:this.#p()}}#p(){return this.#s.map(t=>t.part)}#v(t){let e=t.parts??[];this.#m({value:t.content,parts:e})}#m(t){this.inputValue=t.value,this.#r=t.value,this.#s=E(t.value,t.parts),this.#l=void 0,this._textRequired=!1,this.#i.close()}_setDraftValue(t){this.#i.close(),this.#s=[],this.#r=t,this.#l=void 0,this._textRequired=!1,this.inputValue=t,this.#e=void 0}#h(t,e){this._textRequired=!1,this.#s=V(this.#r,t,this.#s,e),this.#r=t}async#f(t){let e=this.#i.activeSuggestion;if(!t||!e)return;let i=`${e.kind==="command"?"/":e.provider.trigger}${t.id}`,s=`${this.inputValue.slice(0,e.start)}${i} ${this.inputValue.slice(e.end)}`;this.#h(s),this.#s.push({start:e.start,end:e.start+i.length,part:e.kind==="command"?{kind:"command",id:t.id,label:t.label,agentId:"agentId"in t?t.agentId:void 0,requiresText:"requiresText"in t&&t.requiresText||void 0,data:t.data}:{kind:"entity",providerId:e.provider.id,trigger:e.provider.trigger,id:t.id,label:t.label,data:t.data}}),this.#s.sort((a,l)=>a.start-l.start),this.inputValue=s,this.#e=void 0;let n=e.start+i.length+1;this.#i.close(),await this.updateComplete,await this.#t.value?.setFocus();let r=this.#t.value?.shadowRoot?.querySelector("textarea");r&&(r.selectionStart=n,r.selectionEnd=n)}_onFocusIn(){this._inFocus=!0}_onFocusOut(){this._inFocus=!1}#x(t){return t?u`<calcite-popover .open=${this._suggestionState.suggestions.length>0||this._suggestionState.loading} placement=top-start .label=${this._messages.suggestions} .referenceElement=${t} trigger-disabled pointer-disabled focus-trap-disabled><calcite-list .label=${this._messages.suggestions} selection-appearance=highlight selection-mode=single-persist .loading=${this._suggestionState.loading}>${this._suggestionState.loading?null:this._suggestionState.suggestions.map((e,i)=>u`<calcite-list-item .label=${e.label} .description=${e.description} .selected=${i===this._suggestionState.selectedIndex} @click=${()=>{this.#f(e)}}></calcite-list-item>`)}</calcite-list>${this._suggestionState.loading?u`<div class="suggestions-loading" role=status>${this._messages.loadingSuggestions}</div>`:null}</calcite-popover>`:null}render(){let t=this.#t.value;return u`<div class="input-container">${this._textRequired?u`<div role=alert>${this._messages.textRequired}</div>`:null}<calcite-text-area class=${_({focused:this._inFocus})} .value=${this.inputValue} .placeholder=${this.entryPlaceholder??this._messages.entryPlaceholder} resize=vertical @calciteTextAreaInput=${this.#u} @beforeinput=${this.#d} .status=${this._textRequired?"invalid":"idle"} .disabled=${this.disabled} @keydown=${this.#g} @focusin=${this._onFocusIn} @focusout=${this._onFocusOut} ${f(this.#t)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled?u`<arcgis-assistant-speech-input .awaitingResponse=${this.awaitingResponse} .inputValue=${this.inputValue} ${f(this.#o)}></arcgis-assistant-speech-input>`:null}<slot name=entry-actions-end></slot></div></calcite-text-area>${this.#x(t)}</div>`}};S("arcgis-assistant-chat-entry",x);return x},"core/Collection")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{S as r}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{S as r}from"./7GDMXAF5.js";var a=(e,t)=>t,d=(e,t)=>({...e,...t}),o=(e="",t)=>{let s=typeof t=="string"?t.trim():"";if(!s)return e;let u=e.trim();if(!u)return s;if(u===s)return e;let n=u.split(`
|
|
3
3
|
|
|
4
4
|
`);return n[n.length-1]?.trim()===s?e:`${e}
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.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/
|
|
2
|
-
import{C as o,g as i,h as s,x as n}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{C as o,g as i,h as s,x as n}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var c=i`:host{display:block}`,e=class extends n{static{this.properties={block:0}}static{this.styles=c}_renderSuggestedPrompts(t){if(t.type!=="suggested-prompts")return null;let r=t.data?.prompts,a=Array.isArray(r)?r.filter(p=>typeof p=="string"):[];return a.length?s`<arcgis-assistant-suggested-prompts .prompts=${a}></arcgis-assistant-suggested-prompts>`:null}_renderBlock(t){switch(t.type){case"suggested-prompts":return this._renderSuggestedPrompts(t);case"text":return s`<arcgis-assistant-message-text .content=${t.data?.content} .parts=${t.data?.parts}></arcgis-assistant-message-text>`;default:return null}}render(){return this.block?this._renderBlock(this.block):null}};o("arcgis-assistant-message-block",e);export{e as ArcgisAssistantMessageBlock};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`## Navigation Agent - Tool Intent Classifier
|
|
3
3
|
|
|
4
4
|
You are an assistant that classifies the assigned task intent for navigation agent.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
|
|
3
3
|
The Feature Layer is a collection of geographic features that represent real-world entities. Each feature in the layer has attributes that provide additional information about the feature. The layer may include point, line, or polygon geometries, depending on the type of data it represents.
|
|
4
4
|
The geometry type for this layer is {layerGeometryType}.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`## Membership Bind Parameters
|
|
3
3
|
|
|
4
4
|
The current link chart contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import a from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import a from"./BMVPOFHU.js";import{a as h}from"./QBZP6XOE.js";import{a as e}from"./GS5JDPZH.js";import{Ga as p}from"./A4ZVCRVF.js";export default $arcgis.t(([w,I,{a:u,d:m,e:b,f:y}])=>{var x=async(t,o,f,n,r,c)=>{let a=t.map?.allLayers.find(s=>s.id===o);if(!a)return{success:!1,error:`Layer '${o}' not found.`};let i=a.createQuery();i.where=f??"1=1",n&&(i.geometry=n,i.spatialRelationship="intersects",r&&(i.distance=r),c&&(i.units=c));try{let{extent:s,count:l}=await a.queryExtent(i);return!s||l===0?{success:!1,error:`No features found for filter (where: ${i.where}${n?", spatial filter used":""})`}:(await t.goTo(s),{success:!0})}catch(s){return{success:!1,error:s instanceof Error?s.message:String(s)}}},v=async(t,o,f,n,r,c)=>{let a=o.map?.allLayers.find(d=>d.id===t.layerId);if(!a)return`Could not find target layer with ID: ${t.layerId}`;let i;if(r){let d=await m(r,o);if("error"in d)return d.error;i=d.geometry}if(a.featureEffect=null,a.featureEffect=new w({filter:new I({...t.objectIds?.length?{objectIds:t.objectIds}:{where:t.where},geometry:i,spatialRelationship:"intersects",distance:r?.distance,units:r?.units}),includedEffect:f,excludedEffect:n}),a.visible=!0,c)return`Applied feature effects to "${a.title??t.layerId}" within current map extent.`;let s=t.objectIds?.length?`${a.objectIdField} IN (${t.objectIds.join(",")})`:t.where,l=await x(o,t.layerId,s,i,r?.distance,r?.units),g=a.title??t.layerId;return l.success?`Applied feature effects to target layer "${a.title??t.layerId}"${r&&"layerId"in r?` using geometry from layer "${r.layerId}"`:""}.`:`Applied filter to "${g}" but no features matched. ${l.error}`},j=async({targetLayer:t,geometryFilter:o,useCurrentExtent:f,includedEffect:n="drop-shadow(2px, 2px, 2px, gray)",excludedEffect:r="grayscale(100%) opacity(60%) blur(2px)"},c)=>{let{mapView:a}=h(c,["mapView"]),i=y(o,c.state?.agentExecutionContext?.sharedResources);return await v(t,a,n,r,i,f)},E=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:u.optional().describe("The units for the distance buffer.")}),T=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:u.optional().describe("The units for the distance buffer.")}),$=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer on which to set a feature effect."),where:e.string().describe("The SQL-92 where clause representing the features to emphasize."),objectIds:e.array(e.number()).optional().describe("Array of objectIds from a previous query result. Use this instead of a where clause when the query returned objectIds (e.g. top N results). If provided, takes precedence over where clause.")}),geometryFilter:e.union([E,T,b]).optional().describe("Optional spatial filter. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location."),useCurrentExtent:e.boolean().optional().describe("Set to true when the previous query used the current map extent as a spatial filter. This ensures the feature effect applies only to features visible in the current view. Default is false."),includedEffect:e.string().default("drop-shadow(2px, 2px, 2px, gray)").describe("The effect applied to features that meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."),excludedEffect:e.string().default("grayscale(100%) opacity(60%) blur(2px)").describe("The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified.")}),A=p(j,{name:"setFeatureEffect",description:"Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",schema:$});return A},"layers/support/FeatureEffect","layers/support/FeatureFilter",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{A as m,C as y,g as C,h as S,o as c,x as R}from"./RE7MJTEF.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([{watch:u},{property:d,subclass:f},w])=>{var I=C`.button{--calcite-button-background-color: var(--calcite-color-transparent);--calcite-button-border-color: transparent;--calcite-button-icon-color: var(--calcite-color-text-3);--calcite-button-text-color: var(--calcite-color-text-3);flex:0 0 auto;position:relative}.button[data-state=disabled]{--calcite-button-icon-color: var(--calcite-color-text-3);opacity:var(--calcite-opacity-disabled)}.button[data-state=listening]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 14%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-brand) 24%, transparent);--calcite-button-icon-color: var(--calcite-color-brand);--calcite-button-text-color: var(--calcite-color-brand);box-shadow:var(--calcite-shadow-sm)}.button[data-state=listening]:hover{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand-hover, var(--calcite-color-brand)) 18%, var(--calcite-color-foreground-1) )}.button[data-state=listening]:active{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 24%, var(--calcite-color-foreground-1) )}.button[data-state=processing]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 10%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-brand) 20%, transparent);--calcite-button-icon-color: var(--calcite-color-brand);--calcite-button-text-color: var(--calcite-color-brand)}.button[data-state=error]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-status-danger) 12%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-status-danger) 24%, transparent);--calcite-button-icon-color: var(--calcite-color-status-danger);--calcite-button-text-color: var(--calcite-color-status-danger)}.button[data-state=listening]:after{content:"";position:absolute;inset:-4px;border:1px solid color-mix(in srgb,var(--calcite-color-brand) 40%,transparent);border-radius:inherit;opacity:0;pointer-events:none;transform:scale(.92);animation:assistant-speech-input-recording-pulse 1.8s ease-out infinite}@keyframes assistant-speech-input-recording-pulse{0%{opacity:.65;transform:scale(.92)}70%{opacity:0;transform:scale(1.16)}to{opacity:0;transform:scale(1.16)}}@media(prefers-reduced-motion){.button[data-state=listening]:after{animation:none}}`,T=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg"];function h(e){return e.replace(/\s+/gu," ").trim()}var x=Object.defineProperty,V=Object.getOwnPropertyDescriptor,p=(e,t,s,i)=>{for(var r=i>1?void 0:i?V(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&x(t,s,r),r},a=class extends w{constructor(e){super(e),this.state="idle",this.liveTranscript="",this.transcript="",this.errorCode=void 0}static isSupported(){return!1}};p([d()],a.prototype,"language",2);p([d({readOnly:!0})],a.prototype,"state",2);p([d({readOnly:!0})],a.prototype,"liveTranscript",2);p([d({readOnly:!0})],a.prototype,"transcript",2);p([d({readOnly:!0})],a.prototype,"errorCode",2);a=p([f("SpeechController")],a);var O=Object.defineProperty,M=Object.getOwnPropertyDescriptor,g=(e,t,s,i)=>{for(var r=i>1?void 0:i?M(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&O(t,s,r),r},l=class extends a{constructor(e){super(e),this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._mediaStream=null,this._pendingChunkOperations=new Set,this._recordedChunks=[],this.handleRecording=null,this.chunkTimeSlice=3e3}get _mimeType(){return typeof window>"u"||typeof window.MediaRecorder?.isTypeSupported!="function"?"":T.find(e=>window.MediaRecorder.isTypeSupported(e))??""}destroy(){this._mediaRecorder&&(this._mediaRecorder.onstart=null,this._mediaRecorder.ondataavailable=null,this._mediaRecorder.onerror=null,this._mediaRecorder.onstop=null),this.cancel(),this._mediaRecorder=null}_queuePendingChunkOperation(e){this._pendingChunkOperations.add(e),e.finally(()=>{this._pendingChunkOperations.delete(e)})}async _awaitPendingChunkOperations(){this._pendingChunkOperations.size&&await Promise.allSettled(Array.from(this._pendingChunkOperations))}_onDataAvailable(e){let t=this._activeSessionId;t!=null&&this._queuePendingChunkOperation(this._processDataAvailable(e,t))}async _processDataAvailable(e,t){let s=e.data;if(!s.size||t!==this._activeSessionId)return;this._recordedChunks.push(s);let i=s.type||this._mediaRecorder?.mimeType||this._mimeType,r=this._mediaRecorderStopReason==="toggle"&&this._mediaRecorder?.state==="inactive";try{if(!this.handleRecording)return;let n=h(await this.handleRecording(s,i,this._mediaRecorderChunkIndex,r)??"");if(t!==this._activeSessionId)return;n&&this._set("liveTranscript",h(`${this.liveTranscript} ${n}`))}catch(n){if(t!==this._activeSessionId)return;this._failSession(n instanceof Error&&n.message==="transcription-unavailable"?"transcription-unavailable":"transcription-failed");return}!r&&t===this._activeSessionId&&(this._mediaRecorderChunkIndex+=1)}_failSession(e){let t=this._mediaRecorder;if(t){t.onstart=null,t.ondataavailable=null,t.onerror=null,t.onstop=null;try{t.state!=="inactive"&&t.stop()}catch{}}this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._releaseMediaStream(),this._set("liveTranscript",""),this._set("transcript",""),this._set("state","error"),this._set("errorCode",e)}_onError(){this._failSession("recording-failed")}_onStart(){this._set("state","listening")}_onStop(){this._handleStop()}_releaseMediaStream(){this._mediaStream?.getTracks().forEach(e=>e.stop()),this._mediaStream=null}async _handleStop(){let e=this._mediaRecorder,t=this._activeSessionId,s=this._mediaRecorderStopReason,i=e?.mimeType||this._recordedChunks.find(n=>!!n.type)?.type||"",r=[...this._recordedChunks];if(this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._releaseMediaStream(),s==="cancel"){this._activeSessionId===t&&(this._activeSessionId=null),this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0);return}if(t==null){this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("state","idle"),this._set("errorCode",void 0);return}if(await this._awaitPendingChunkOperations(),t===this._activeSessionId){if(!(i?new Blob(r,{type:i}):new Blob(r)).size){this._activeSessionId===t&&(this._activeSessionId=null),this._mediaRecorderStopReason=null,this._recordedChunks=[],this._set("state","error"),this._set("errorCode","recording-failed");return}this._set("state","processing"),this._set("transcript",h(`${this.transcript} ${this.liveTranscript}`)),this._set("liveTranscript",""),this._activeSessionId===t&&(this._activeSessionId=null),this._set("state","idle"),this._set("errorCode",void 0),this._mediaRecorderStopReason=null,this._recordedChunks=[]}}start(){if(!l.isSupported()){this._set("errorCode","not-supported");return}let e=Date.now();this._activeSessionId=e,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("errorCode",void 0),navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{if(e!==this._activeSessionId){t.getTracks().forEach(r=>r.stop());return}let s=this._mimeType,i=s?new window.MediaRecorder(t,{mimeType:s}):new window.MediaRecorder(t);this._mediaStream=t,this._mediaRecorder=i,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._recordedChunks=[],i.ondataavailable=this._onDataAvailable.bind(this),i.onerror=this._onError.bind(this),i.onstart=this._onStart.bind(this),i.onstop=this._onStop.bind(this),this._mediaRecorder.start(this.chunkTimeSlice)}).catch(t=>{e===this._activeSessionId&&(this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._releaseMediaStream(),t instanceof DOMException&&t.name==="NotAllowedError"?(this._set("state","error"),this._set("errorCode","not-allowed")):(this._set("state","error"),this._set("errorCode","recording-failed")))})}stop(){if(this._mediaRecorder){this._mediaRecorderStopReason="toggle";try{this._mediaRecorder.state!=="inactive"?this._mediaRecorder.stop():this._handleStop()}catch{}}}cancel(){let e=this._mediaRecorder;if(this._activeSessionId=null,this._mediaRecorderStopReason="cancel",this._mediaRecorderChunkIndex=0,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0),!e){this._releaseMediaStream();return}try{if(e.state!=="inactive"){e.stop();return}}catch{}this._mediaRecorder=null,this._releaseMediaStream()}static isSupported(){return typeof window<"u"&&!!(window.MediaRecorder&&navigator.mediaDevices?.getUserMedia)}};g([d()],l.prototype,"_mimeType",1);g([d()],l.prototype,"handleRecording",2);g([d()],l.prototype,"chunkTimeSlice",2);l=g([f("MediaRecorderController")],l);var D=Object.getOwnPropertyDescriptor,E=(e,t,s,i)=>{for(var r=i>1?void 0:i?D(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=o(r)||r);return r};function k(){if(typeof window>"u")return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}var _=class extends a{constructor(e){super(e),this._isCancelled=!1,this._recognition=null}initialize(){let e=k();if(!e)return;let t=new e;t.continuous=!0,t.interimResults=!0,this.language&&(t.lang=this.language),t.onstart=this._onStart.bind(this),t.onresult=this._onResult.bind(this),t.onerror=this._onError.bind(this),t.onend=this._onEnd.bind(this),t.onspeechend=this._onSpeechEnd.bind(this),this._recognition=t}destroy(){this._recognition&&(this._recognition.onstart=null,this._recognition.onresult=null,this._recognition.onerror=null,this._recognition.onend=null,this._recognition.onspeechend=null,this.cancel(),this._recognition=null)}_onStart(){this._isCancelled=!1,this._set("state","listening")}_onResult(e){let{finalTranscript:t,liveTranscript:s}=Array.from(e.results).reduce((i,r)=>(r.isFinal?i.finalTranscript+=r[0].transcript:i.liveTranscript+=r[0].transcript,i),{finalTranscript:"",liveTranscript:""});this._set("transcript",h(t)),this._set("liveTranscript",h(s))}_onError(e){if(e.error==="aborted"&&this._isCancelled){this._set("state","idle");return}let t="unhandled";switch(e.error){case"no-speech":t="no-speech";break;case"service-not-allowed":case"not-allowed":t="not-allowed";break;default:t="unhandled"}this._set("state","error"),this._set("errorCode",t)}_onEnd(){let e=h(`${this.transcript} ${this.liveTranscript}`);if(this._set("liveTranscript",""),this._isCancelled){this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0);return}this.errorCode?this._set("transcript",""):(this._set("transcript",e),this._set("state","idle")),this._set("errorCode",void 0)}_onSpeechEnd(){this._set("state","processing")}_reset(e=!1){this._isCancelled=e,this._set("liveTranscript",""),this._set("transcript",""),this._set("errorCode",void 0),this._set("state","idle")}start(){if(!this._recognition){this._set("errorCode","not-supported");return}this._reset(!1);try{this._recognition.start()}catch{this._set("state","error"),this._set("errorCode","unhandled")}}stop(){if(this._recognition){this._set("state","processing");try{this._recognition.stop()}catch{}}}cancel(){if(this._recognition){this._reset(!0);try{this._recognition.abort()}catch{}}}static isSupported(){return!!k()}};_=E([f("WebSpeechController")],_);function b(e){let{baseValue:t,transcript:s}=e;if(!s)return t;let i=t.trim();return i?`${i} ${s}`:s}var v=class extends R{constructor(){super(...arguments),this.#t=null,this._resolvedMode="disabled",this.awaitingResponse=!1,this.inputValue="",this.mode="web-speech",this.arcgisVoiceInputDraftChange=c(),this.arcgisVoiceInputError=c(),this.arcgisVoiceInputInterimTranscription=c(),this.arcgisVoiceInputStart=c(),this.arcgisVoiceInputStop=c(),this.arcgisVoiceInputTranscription=c(),this.arcgisVoiceInputTranscriptionStreamChunk=c()}static{this.properties={_resolvedMode:16,_state:16,_errorCode:16,_liveTranscript:16,_transcript:16,_isButtonDisabled:16,_buttonLabel:16,awaitingResponse:5,inputValue:1,language:1,mode:1}}static{this.styles=I}#t;get _state(){return this._speechController?.state??"idle"}get _errorCode(){return this._speechController?.errorCode??null}get _liveTranscript(){return this._speechController?.liveTranscript??""}get _transcript(){return this._speechController?.transcript??""}get _isButtonDisabled(){return this._resolvedMode==="disabled"||this.awaitingResponse||this._state==="processing"}get _buttonLabel(){if(this.awaitingResponse)return"Voice input unavailable while assistant is responding";if(this._resolvedMode==="disabled")return"Voice input unavailable";switch(this._state){case"error":return this._errorCode==="not-allowed"?"Microphone permission denied. Retry voice input":"Retry voice input";case"listening":return"Stop voice input";case"processing":return"Processing voice input";default:return"Start voice input"}}clearDraftSession(){this.#t=null}loaded(){this.manager.onLifecycle(()=>[u(()=>[this.mode,this.language],()=>{this._configureController()},{initial:!0}),u(()=>this.awaitingResponse,t=>{t&&this._cancelActiveSession()},{initial:!0}),u(()=>this._liveTranscript,t=>{if(t){let s=h(`${this._transcript} ${t}`);this.arcgisVoiceInputInterimTranscription.emit({transcript:s}),this._applyVoiceInputTranscript(s)}}),u(()=>this._transcript,t=>{t&&(this.arcgisVoiceInputTranscription.emit({transcript:t}),this._applyVoiceInputTranscript(t,{final:!0}))}),u(()=>this._state,t=>{t==="error"&&this._errorCode&&this.arcgisVoiceInputError.emit({errorCode:this._errorCode})})])}disconnectedCallback(){super.disconnectedCallback(),this._destroySpeechController()}_configureController(){let t=this._resolveMode();this._destroySpeechController(),this._resolvedMode=t,t!=="disabled"&&(this._speechController=t==="web-speech"?new _({language:this.language}):new l({language:this.language,handleRecording:this._handleRecording.bind(this)}))}_destroySpeechController(){this._speechController?.cancel(),this._speechController?.destroy(),this._speechController=void 0}_emitDraftChange(t,s){this.arcgisVoiceInputDraftChange.emit({focusInput:s?.focusInput,value:t})}_startVoiceInputSession(){this.#t={baseValue:this.inputValue.trim(),phase:"listening",transcript:""}}_finishVoiceInputSession(){let t=this.#t;if(!t){this._emitDraftChange(this.inputValue.trim());return}let s={...t,phase:"stopped"},i=b(s);this.#t=s,this._emitDraftChange(i)}async _applyVoiceInputTranscript(t,s){let i=this.#t;if(!t||!i)return;if(i.phase==="stopped"){let o=b(i);if(this.inputValue.trim()!==o){this.clearDraftSession();return}}let r={...i,transcript:t},n=b(r);this.#t=r,this._emitDraftChange(n,{focusInput:s?.final&&r.phase==="stopped"})}async _handleToggle(){if(!(this._isButtonDisabled||!this._speechController)){if(this._state==="listening"){this._speechController.stop(),this._finishVoiceInputSession(),this.arcgisVoiceInputStop.emit();return}this._speechController.start(),this._startVoiceInputSession(),this.arcgisVoiceInputStart.emit()}}async _handleRecording(t,s,i,r){let n;return this.arcgisVoiceInputTranscriptionStreamChunk.emit({blob:t,chunkIndex:i,isFinal:r,mimeType:s,respondWithTranscript:o=>{n=o}}),n}_resolveMode(){return this.mode==="disabled"?"disabled":this.mode==="web-speech"&&_.isSupported()?"web-speech":l.isSupported()?"media-recorder":"disabled"}async _cancelActiveSession(){this._speechController&&this._resolvedMode!=="disabled"&&this._speechController.cancel(),this.clearDraftSession()}render(){return S`<calcite-button appearance=transparent class="button" data-mode=${this._resolvedMode??m} data-state=${(this._resolvedMode==="disabled"?"disabled":this._state)??m} .disabled=${this._isButtonDisabled} icon-start=microphone kind=neutral .label=${this._buttonLabel} .loading=${this._state==="processing"} round scale=m @click=${()=>{this._handleToggle()}}></calcite-button>`}};y("arcgis-assistant-speech-input",v);return v},"core/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{A as m,C as y,g as C,h as S,o as c,x as R}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{watch:u},{property:d,subclass:f},w])=>{var I=C`.button{--calcite-button-background-color: var(--calcite-color-transparent);--calcite-button-border-color: transparent;--calcite-button-icon-color: var(--calcite-color-text-3);--calcite-button-text-color: var(--calcite-color-text-3);flex:0 0 auto;position:relative}.button[data-state=disabled]{--calcite-button-icon-color: var(--calcite-color-text-3);opacity:var(--calcite-opacity-disabled)}.button[data-state=listening]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 14%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-brand) 24%, transparent);--calcite-button-icon-color: var(--calcite-color-brand);--calcite-button-text-color: var(--calcite-color-brand);box-shadow:var(--calcite-shadow-sm)}.button[data-state=listening]:hover{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand-hover, var(--calcite-color-brand)) 18%, var(--calcite-color-foreground-1) )}.button[data-state=listening]:active{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 24%, var(--calcite-color-foreground-1) )}.button[data-state=processing]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 10%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-brand) 20%, transparent);--calcite-button-icon-color: var(--calcite-color-brand);--calcite-button-text-color: var(--calcite-color-brand)}.button[data-state=error]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-status-danger) 12%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-status-danger) 24%, transparent);--calcite-button-icon-color: var(--calcite-color-status-danger);--calcite-button-text-color: var(--calcite-color-status-danger)}.button[data-state=listening]:after{content:"";position:absolute;inset:-4px;border:1px solid color-mix(in srgb,var(--calcite-color-brand) 40%,transparent);border-radius:inherit;opacity:0;pointer-events:none;transform:scale(.92);animation:assistant-speech-input-recording-pulse 1.8s ease-out infinite}@keyframes assistant-speech-input-recording-pulse{0%{opacity:.65;transform:scale(.92)}70%{opacity:0;transform:scale(1.16)}to{opacity:0;transform:scale(1.16)}}@media(prefers-reduced-motion){.button[data-state=listening]:after{animation:none}}`,T=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg"];function h(e){return e.replace(/\s+/gu," ").trim()}var x=Object.defineProperty,V=Object.getOwnPropertyDescriptor,p=(e,t,s,i)=>{for(var r=i>1?void 0:i?V(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&x(t,s,r),r},a=class extends w{constructor(e){super(e),this.state="idle",this.liveTranscript="",this.transcript="",this.errorCode=void 0}static isSupported(){return!1}};p([d()],a.prototype,"language",2);p([d({readOnly:!0})],a.prototype,"state",2);p([d({readOnly:!0})],a.prototype,"liveTranscript",2);p([d({readOnly:!0})],a.prototype,"transcript",2);p([d({readOnly:!0})],a.prototype,"errorCode",2);a=p([f("SpeechController")],a);var O=Object.defineProperty,M=Object.getOwnPropertyDescriptor,g=(e,t,s,i)=>{for(var r=i>1?void 0:i?M(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&O(t,s,r),r},l=class extends a{constructor(e){super(e),this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._mediaStream=null,this._pendingChunkOperations=new Set,this._recordedChunks=[],this.handleRecording=null,this.chunkTimeSlice=3e3}get _mimeType(){return typeof window>"u"||typeof window.MediaRecorder?.isTypeSupported!="function"?"":T.find(e=>window.MediaRecorder.isTypeSupported(e))??""}destroy(){this._mediaRecorder&&(this._mediaRecorder.onstart=null,this._mediaRecorder.ondataavailable=null,this._mediaRecorder.onerror=null,this._mediaRecorder.onstop=null),this.cancel(),this._mediaRecorder=null}_queuePendingChunkOperation(e){this._pendingChunkOperations.add(e),e.finally(()=>{this._pendingChunkOperations.delete(e)})}async _awaitPendingChunkOperations(){this._pendingChunkOperations.size&&await Promise.allSettled(Array.from(this._pendingChunkOperations))}_onDataAvailable(e){let t=this._activeSessionId;t!=null&&this._queuePendingChunkOperation(this._processDataAvailable(e,t))}async _processDataAvailable(e,t){let s=e.data;if(!s.size||t!==this._activeSessionId)return;this._recordedChunks.push(s);let i=s.type||this._mediaRecorder?.mimeType||this._mimeType,r=this._mediaRecorderStopReason==="toggle"&&this._mediaRecorder?.state==="inactive";try{if(!this.handleRecording)return;let n=h(await this.handleRecording(s,i,this._mediaRecorderChunkIndex,r)??"");if(t!==this._activeSessionId)return;n&&this._set("liveTranscript",h(`${this.liveTranscript} ${n}`))}catch(n){if(t!==this._activeSessionId)return;this._failSession(n instanceof Error&&n.message==="transcription-unavailable"?"transcription-unavailable":"transcription-failed");return}!r&&t===this._activeSessionId&&(this._mediaRecorderChunkIndex+=1)}_failSession(e){let t=this._mediaRecorder;if(t){t.onstart=null,t.ondataavailable=null,t.onerror=null,t.onstop=null;try{t.state!=="inactive"&&t.stop()}catch{}}this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._releaseMediaStream(),this._set("liveTranscript",""),this._set("transcript",""),this._set("state","error"),this._set("errorCode",e)}_onError(){this._failSession("recording-failed")}_onStart(){this._set("state","listening")}_onStop(){this._handleStop()}_releaseMediaStream(){this._mediaStream?.getTracks().forEach(e=>e.stop()),this._mediaStream=null}async _handleStop(){let e=this._mediaRecorder,t=this._activeSessionId,s=this._mediaRecorderStopReason,i=e?.mimeType||this._recordedChunks.find(n=>!!n.type)?.type||"",r=[...this._recordedChunks];if(this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._releaseMediaStream(),s==="cancel"){this._activeSessionId===t&&(this._activeSessionId=null),this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0);return}if(t==null){this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("state","idle"),this._set("errorCode",void 0);return}if(await this._awaitPendingChunkOperations(),t===this._activeSessionId){if(!(i?new Blob(r,{type:i}):new Blob(r)).size){this._activeSessionId===t&&(this._activeSessionId=null),this._mediaRecorderStopReason=null,this._recordedChunks=[],this._set("state","error"),this._set("errorCode","recording-failed");return}this._set("state","processing"),this._set("transcript",h(`${this.transcript} ${this.liveTranscript}`)),this._set("liveTranscript",""),this._activeSessionId===t&&(this._activeSessionId=null),this._set("state","idle"),this._set("errorCode",void 0),this._mediaRecorderStopReason=null,this._recordedChunks=[]}}start(){if(!l.isSupported()){this._set("errorCode","not-supported");return}let e=Date.now();this._activeSessionId=e,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("errorCode",void 0),navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{if(e!==this._activeSessionId){t.getTracks().forEach(r=>r.stop());return}let s=this._mimeType,i=s?new window.MediaRecorder(t,{mimeType:s}):new window.MediaRecorder(t);this._mediaStream=t,this._mediaRecorder=i,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._recordedChunks=[],i.ondataavailable=this._onDataAvailable.bind(this),i.onerror=this._onError.bind(this),i.onstart=this._onStart.bind(this),i.onstop=this._onStop.bind(this),this._mediaRecorder.start(this.chunkTimeSlice)}).catch(t=>{e===this._activeSessionId&&(this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._releaseMediaStream(),t instanceof DOMException&&t.name==="NotAllowedError"?(this._set("state","error"),this._set("errorCode","not-allowed")):(this._set("state","error"),this._set("errorCode","recording-failed")))})}stop(){if(this._mediaRecorder){this._mediaRecorderStopReason="toggle";try{this._mediaRecorder.state!=="inactive"?this._mediaRecorder.stop():this._handleStop()}catch{}}}cancel(){let e=this._mediaRecorder;if(this._activeSessionId=null,this._mediaRecorderStopReason="cancel",this._mediaRecorderChunkIndex=0,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0),!e){this._releaseMediaStream();return}try{if(e.state!=="inactive"){e.stop();return}}catch{}this._mediaRecorder=null,this._releaseMediaStream()}static isSupported(){return typeof window<"u"&&!!(window.MediaRecorder&&navigator.mediaDevices?.getUserMedia)}};g([d()],l.prototype,"_mimeType",1);g([d()],l.prototype,"handleRecording",2);g([d()],l.prototype,"chunkTimeSlice",2);l=g([f("MediaRecorderController")],l);var D=Object.getOwnPropertyDescriptor,E=(e,t,s,i)=>{for(var r=i>1?void 0:i?D(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=o(r)||r);return r};function k(){if(typeof window>"u")return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}var _=class extends a{constructor(e){super(e),this._isCancelled=!1,this._recognition=null}initialize(){let e=k();if(!e)return;let t=new e;t.continuous=!0,t.interimResults=!0,this.language&&(t.lang=this.language),t.onstart=this._onStart.bind(this),t.onresult=this._onResult.bind(this),t.onerror=this._onError.bind(this),t.onend=this._onEnd.bind(this),t.onspeechend=this._onSpeechEnd.bind(this),this._recognition=t}destroy(){this._recognition&&(this._recognition.onstart=null,this._recognition.onresult=null,this._recognition.onerror=null,this._recognition.onend=null,this._recognition.onspeechend=null,this.cancel(),this._recognition=null)}_onStart(){this._isCancelled=!1,this._set("state","listening")}_onResult(e){let{finalTranscript:t,liveTranscript:s}=Array.from(e.results).reduce((i,r)=>(r.isFinal?i.finalTranscript+=r[0].transcript:i.liveTranscript+=r[0].transcript,i),{finalTranscript:"",liveTranscript:""});this._set("transcript",h(t)),this._set("liveTranscript",h(s))}_onError(e){if(e.error==="aborted"&&this._isCancelled){this._set("state","idle");return}let t="unhandled";switch(e.error){case"no-speech":t="no-speech";break;case"service-not-allowed":case"not-allowed":t="not-allowed";break;default:t="unhandled"}this._set("state","error"),this._set("errorCode",t)}_onEnd(){let e=h(`${this.transcript} ${this.liveTranscript}`);if(this._set("liveTranscript",""),this._isCancelled){this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0);return}this.errorCode?this._set("transcript",""):(this._set("transcript",e),this._set("state","idle")),this._set("errorCode",void 0)}_onSpeechEnd(){this._set("state","processing")}_reset(e=!1){this._isCancelled=e,this._set("liveTranscript",""),this._set("transcript",""),this._set("errorCode",void 0),this._set("state","idle")}start(){if(!this._recognition){this._set("errorCode","not-supported");return}this._reset(!1);try{this._recognition.start()}catch{this._set("state","error"),this._set("errorCode","unhandled")}}stop(){if(this._recognition){this._set("state","processing");try{this._recognition.stop()}catch{}}}cancel(){if(this._recognition){this._reset(!0);try{this._recognition.abort()}catch{}}}static isSupported(){return!!k()}};_=E([f("WebSpeechController")],_);function b(e){let{baseValue:t,transcript:s}=e;if(!s)return t;let i=t.trim();return i?`${i} ${s}`:s}var v=class extends R{constructor(){super(...arguments),this.#t=null,this._resolvedMode="disabled",this.awaitingResponse=!1,this.inputValue="",this.mode="web-speech",this.arcgisVoiceInputDraftChange=c(),this.arcgisVoiceInputError=c(),this.arcgisVoiceInputInterimTranscription=c(),this.arcgisVoiceInputStart=c(),this.arcgisVoiceInputStop=c(),this.arcgisVoiceInputTranscription=c(),this.arcgisVoiceInputTranscriptionStreamChunk=c()}static{this.properties={_resolvedMode:16,_state:16,_errorCode:16,_liveTranscript:16,_transcript:16,_isButtonDisabled:16,_buttonLabel:16,awaitingResponse:5,inputValue:1,language:1,mode:1}}static{this.styles=I}#t;get _state(){return this._speechController?.state??"idle"}get _errorCode(){return this._speechController?.errorCode??null}get _liveTranscript(){return this._speechController?.liveTranscript??""}get _transcript(){return this._speechController?.transcript??""}get _isButtonDisabled(){return this._resolvedMode==="disabled"||this.awaitingResponse||this._state==="processing"}get _buttonLabel(){if(this.awaitingResponse)return"Voice input unavailable while assistant is responding";if(this._resolvedMode==="disabled")return"Voice input unavailable";switch(this._state){case"error":return this._errorCode==="not-allowed"?"Microphone permission denied. Retry voice input":"Retry voice input";case"listening":return"Stop voice input";case"processing":return"Processing voice input";default:return"Start voice input"}}clearDraftSession(){this.#t=null}loaded(){this.manager.onLifecycle(()=>[u(()=>[this.mode,this.language],()=>{this._configureController()},{initial:!0}),u(()=>this.awaitingResponse,t=>{t&&this._cancelActiveSession()},{initial:!0}),u(()=>this._liveTranscript,t=>{if(t){let s=h(`${this._transcript} ${t}`);this.arcgisVoiceInputInterimTranscription.emit({transcript:s}),this._applyVoiceInputTranscript(s)}}),u(()=>this._transcript,t=>{t&&(this.arcgisVoiceInputTranscription.emit({transcript:t}),this._applyVoiceInputTranscript(t,{final:!0}))}),u(()=>this._state,t=>{t==="error"&&this._errorCode&&this.arcgisVoiceInputError.emit({errorCode:this._errorCode})})])}disconnectedCallback(){super.disconnectedCallback(),this._destroySpeechController()}_configureController(){let t=this._resolveMode();this._destroySpeechController(),this._resolvedMode=t,t!=="disabled"&&(this._speechController=t==="web-speech"?new _({language:this.language}):new l({language:this.language,handleRecording:this._handleRecording.bind(this)}))}_destroySpeechController(){this._speechController?.cancel(),this._speechController?.destroy(),this._speechController=void 0}_emitDraftChange(t,s){this.arcgisVoiceInputDraftChange.emit({focusInput:s?.focusInput,value:t})}_startVoiceInputSession(){this.#t={baseValue:this.inputValue.trim(),phase:"listening",transcript:""}}_finishVoiceInputSession(){let t=this.#t;if(!t){this._emitDraftChange(this.inputValue.trim());return}let s={...t,phase:"stopped"},i=b(s);this.#t=s,this._emitDraftChange(i)}async _applyVoiceInputTranscript(t,s){let i=this.#t;if(!t||!i)return;if(i.phase==="stopped"){let o=b(i);if(this.inputValue.trim()!==o){this.clearDraftSession();return}}let r={...i,transcript:t},n=b(r);this.#t=r,this._emitDraftChange(n,{focusInput:s?.final&&r.phase==="stopped"})}async _handleToggle(){if(!(this._isButtonDisabled||!this._speechController)){if(this._state==="listening"){this._speechController.stop(),this._finishVoiceInputSession(),this.arcgisVoiceInputStop.emit();return}this._speechController.start(),this._startVoiceInputSession(),this.arcgisVoiceInputStart.emit()}}async _handleRecording(t,s,i,r){let n;return this.arcgisVoiceInputTranscriptionStreamChunk.emit({blob:t,chunkIndex:i,isFinal:r,mimeType:s,respondWithTranscript:o=>{n=o}}),n}_resolveMode(){return this.mode==="disabled"?"disabled":this.mode==="web-speech"&&_.isSupported()?"web-speech":l.isSupported()?"media-recorder":"disabled"}async _cancelActiveSession(){this._speechController&&this._resolvedMode!=="disabled"&&this._speechController.cancel(),this.clearDraftSession()}render(){return S`<calcite-button appearance=transparent class="button" data-mode=${this._resolvedMode??m} data-state=${(this._resolvedMode==="disabled"?"disabled":this._state)??m} .disabled=${this._isButtonDisabled} icon-start=microphone kind=neutral .label=${this._buttonLabel} .loading=${this._state==="processing"} round scale=m @click=${()=>{this._handleToggle()}}></calcite-button>`}};y("arcgis-assistant-speech-input",v);return v},"core/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as m}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as m}from"./QBZP6XOE.js";import{a as t}from"./GS5JDPZH.js";import{Ga as i}from"./A4ZVCRVF.js";async function r(o,e){return await e.goTo({zoom:o}),{text:`Successfully zoomed to: ${o}`}}async function a({zoom:o},e){let{mapView:n}=m(e,["mapView"]);return await r(o,n)}var c=t.object({zoom:t.number().min(1).max(20).describe("The zoom level of the view to go to.")}),p=i(a,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:c});export{p as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{b as v,c as R,d as C,e as W,g as k}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{b as v,c as R,d as C,e as W,g as k}from"./T2OYUOSO.js";import{a as M,b as A}from"./VINKTQFR.js";var x=["input","output","total","cacheRead","cacheWrite","reasoning"];function h(d,i=!1){let n={},c={input:0,output:0,total:0,cacheRead:0,cacheWrite:0,reasoning:0},u={input:!0,output:!0,total:!0,cacheRead:!0,cacheWrite:!0,reasoning:!0},e={input:0,cachedInput:0,cacheWrite:0,output:0,total:0},a=d.length>0;for(let r of d){for(let m of x){let p=r.metadata?.tokenUsage?.[m];p===void 0?u[m]=!1:c[m]+=p}let o=r.usage?.cost;o?(e.input+=o.input,e.cachedInput+=o.cachedInput,e.cacheWrite+=o.cacheWrite,e.output+=o.output,e.total+=o.total):a=!1}for(let r of x)u[r]&&(n[r]=c[r]);return{tokens:n,knownTokens:c,completeTokens:u,cost:a?{...e}:void 0,knownCost:e,completeCost:a,modelCalls:d.length,...i&&d[0]?.usage?.rates&&{rates:d[0].usage.rates},...n.input!==void 0&&(i||n.cacheRead!==void 0&&n.cacheWrite!==void 0)&&{uncached:n.input-(n.cacheRead??0)-(n.cacheWrite??0)}}}function b(d,i=M){let n=new Map;for(let e of d){let a=n.get(e.runId)??[];a.push(e),n.set(e.runId,a)}let c=[],u=[];for(let[e,a]of n){let r=v(a),o=R(a,r),m=new Set(a.filter(t=>t.phase==="started").map(t=>t.span.id)),p=[...r.values()].map(t=>{let s=A(t,i),l={...t,timingRecorded:m.has(t.id),...s&&{pricingTier:s.rates===(t.metadata?.model?i.models[t.metadata.model]?.longContext:void 0)?"long-context":"standard"}};return t.metadata?.tokenUsage&&(l.usage={...h([{...l,usage:s?{cost:s,rates:s.rates}:void 0}],!0),modelCalls:t.type==="model"?1:0}),l}),g=p.filter(t=>t.type==="model");u.push(...g);let f=new Map;for(let t of g){let s=t.metadata?.model,l=f.get(s)??[];l.push(t),f.set(s,l)}let I=Math.max(0,a.reduce((t,s)=>Math.max(t,s.timestamp),o.startedAt)-o.startedAt);c.push({id:e,number:c.length+1,prompt:W(r),status:o.status,startedAt:o.startedAt,endedAt:o.endedAt,durationMs:o.durationMs,spans:p,usage:h(g),models:[...f].map(([t,s])=>({model:t,usage:h(s)})),latency:{...C(o,a),timelineMs:I,steps:p.filter(k).sort((t,s)=>t.startedAt-s.startedAt).map(t=>({spanId:t.id,offsetMs:Math.max(0,t.startedAt-o.startedAt),durationMs:t.timingRecorded?t.durationMs:void 0,timingRecorded:t.timingRecorded}))}})}return{schemaVersion:1,pricing:i,runs:c,totals:{runCount:c.length,spanCount:c.reduce((e,a)=>e+a.spans.length,0),failedSpanCount:c.reduce((e,a)=>e+a.spans.filter(r=>r.status==="failed").length,0),usage:h(u)}}}export{b as a};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as V,b as I}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as V,b as I}from"./OPQCY33W.js";import{a as x}from"./QAVDW7A7.js";import a from"./BMVPOFHU.js";import{a as q}from"./QBZP6XOE.js";import{a as E}from"./CETIZ4IQ.js";import{a as e}from"./GS5JDPZH.js";import{Ga as F}from"./A4ZVCRVF.js";export default $arcgis.t(([U,W,C,{a:v,b:L,c:T,d:N,e:O,f:R}])=>{var $=async p=>{let{targetLayer:s,fieldName:l,statisticType:n,mapView:r,layersAndFieldsRegistry:h,geometryFilter:t}=p,a=r.map?.allLayers.find(i=>i.id===s.layerId);if(!a)throw new Error(`Layer '${s.layerId}' not found.`);let w=await r.whenLayerView(a),S=x(l,a.fields.map(i=>i.name)),o=h.get(s.layerId)?.fieldRegistry.get(S),j=o?.alias;if(!o)throw new Error(`Field '${S}' not found.`);let b,c;if(t){let i=await N(t,r);if("error"in i)throw new Error(i.error);if(!i.geometry)throw T(t)?new Error(`No features found matching: ${t.where}`):new Error("Failed to create geometry");if(T(t)){let g=r.map?.allLayers.find(f=>f.id===t.layerId);b={geometryLayerName:g?.title??g?.id,geometryLayerId:t.layerId,geometryWhere:t.where,distance:t.distance,units:t.units,applied:!0}}else L(t)&&(b={point:t.point,distance:t.distance,units:t.units,applied:!0});c=new C({geometry:i.geometry,distance:t.distance,units:t.units,spatialRelationship:"intersects"})}let y=V(w,[l],!1),u=null,m=null,A=10;if(o.type!=="geometry"&&o.type!=="oid"&&o.type!=="global-id")try{let i={layer:a,useFeaturesInView:y,view:y?r:void 0,field:l,sqlWhere:I(a.definitionExpression,s.where),...c&&{filter:c},outStatisticTypes:{include:[n]}};u=await U(i);let g=["string","small-integer","integer"],f=o.domain?.type==="coded-value"?o.domain:null;(g.includes(o.type)||f)&&(m=(await W({layer:a,useFeaturesInView:y,view:y?r:void 0,field:l,sqlWhere:I(a.definitionExpression,s.where),...c&&{filter:c}})).uniqueValueInfos.sort((d,D)=>D.count-d.count).slice(0,A)),m&&o.domain?.type==="coded-value"&&(m=m.map(d=>({...d,value:f?f.getName(d.value)??d.value:d.value})))}catch(i){console.error("Statistics error:",i)}return{tool:"getStatistics",layerName:a.title??s.layerId,summary:`${n} = ${typeof u?.[n]=="number"?u[n]:"N/A"}`,details:{fieldName:l,fieldAlias:j,statisticType:n,statistic:u?.[n]??null,summaryStatistics:u,uniqueValues:m,where:s.where,spatialFilterInfo:b}}};async function Q({targetLayer:p,fieldName:s,statisticType:l,geometryFilter:n},r){let h=E(r,"layersAndFieldsRegistry"),{mapView:t}=q(r,["mapView"]),a=R(n,r.state?.agentExecutionContext?.sharedResources),w=await $({targetLayer:p,fieldName:s,statisticType:l,mapView:t,layersAndFieldsRegistry:h,geometryFilter:a});return JSON.stringify(w,null,2)}var G=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:v.optional().describe("The units for the distance buffer.")}),H=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:v.optional().describe("The units for the distance buffer.")}),J=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")}),geometryFilter:e.union([G,H,O]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),fieldName:e.string().describe("The name of the field for which to get statistics. STRICTLY DO NOT use OBJECTID. Use any other field"),statisticType:e.enum(["avg","max","median","min","stddev","sum","variance","nullcount","count"]).describe("The statistic type to calculate.")}),te=F(Q,{name:"getStatistics",description:`Computes a single aggregate statistic (max, min, avg, sum, median, stddev, variance) for a numeric field across matching features. Also returns frequency analysis for categorical fields.
|
|
3
3
|
|
|
4
4
|
USE THIS TOOL FOR:
|
|
5
5
|
- "What is the average/maximum/minimum/total [field]?" \u2014 aggregate computations
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import b from"./TOUYGIGK.js";import a from"./6UGT2UG5.js";import{b as i}from"./LDDP7NSY.js";import{b as t}from"./WHIWOYHN.js";import"./OUMTV5H5.js";import"./C3VLDYS2.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([r,{b:a}])=>{var p=async(o={})=>{let{tier:e="default",config:m}=o,n=t[e],c=await a(e);return new i({modelName:n,apiKey:"dummy-key",configuration:{baseURL:c,fetch:await r({config:m})},batchSize:2048,maxConcurrency:10})};return p},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as c}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as c}from"./QBZP6XOE.js";import{a}from"./GS5JDPZH.js";import{Ga as d}from"./A4ZVCRVF.js";export default $arcgis.t(([i,u,w,{addressToLocations:S},v])=>{async function y(e,s){let r=w.getDefault().helperServices,n=r.geocode.find(g=>g.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let l=n.url,m=`${i.assetsPath?.endsWith("/")?i.assetsPath:`${i.assetsPath}/`}esri/images/search/search-symbol-32.png`,o=(await S(l,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!o?.extent||!o.location)throw new Error(`Could not find location for: ${e}`);let h=new v({url:m,width:24,height:24}),p=new u({geometry:o.location,symbol:h});s.graphics.removeAll(),s.graphics.add(p),await s.goTo(o.extent);let t={address:o.address??e,location:o.location.toJSON(),extent:o.extent.toJSON()},f={value:t,sharedStatePatch:{lastResolvedLocation:{value:t}},sharedResourceAdditions:[{kind:"point",description:t.address,payload:t.location}]};return[`Successfully zoomed to ${t.address}.`,f]}async function T({address:e},s){let{mapView:r}=c(s,["mapView"]);return await y(e,r)}var A=a.object({address:a.string().describe("The full address or place name to locate.")}),W=d(T,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:A,responseFormat:"content_and_artifact"});return W},"config","Graphic","portal/Portal","rest/locator","symbols/PictureMarkerSymbol")
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"./5PV2GUZW.js";var e=`---
|
|
3
3
|
name: help
|
|
4
4
|
description: Answers questions about the current map, its layers and fields, available assistant capabilities, unsupported map actions, and unrelated requests that need a map-focused redirect.
|
|
5
5
|
allowed-tools: listLayerFields
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as P}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as P}from"./TIQUULA4.js";import l from"./L5OYOLWV.js";import{a as I,c as v}from"./NYFL2F5L.js";import"./YD5LVM7V.js";import k from"./AOT3PM2Q.js";import j from"./YGSDJ4V3.js";import i from"./M52LKZN7.js";import g from"./UXDRYDOD.js";import f from"./2H32MDP2.js";import"./OPQCY33W.js";import"./QAVDW7A7.js";import e from"./YSEHJQ4L.js";import"./7XVIZ7HK.js";import"./OKDXM5D4.js";import d from"./UP7RW5K2.js";import"./M5UMOOL2.js";import"./H6J65TWL.js";import"./XBWGOD6I.js";import c from"./J3T5HB77.js";import"./AGDGDULE.js";import"./FIZMK7GS.js";import"./LMAIOLS2.js";import"./7OQK2F7O.js";import b from"./Y3ZKMD47.js";import a from"./BMVPOFHU.js";import"./QBZP6XOE.js";import"./3COVQI26.js";import{a as m}from"./CETIZ4IQ.js";import"./PR4VMSKD.js";import{c as M}from"./X3YFCWQZ.js";import"./2JD3G7IW.js";import"./LDDP7NSY.js";import"./WHIWOYHN.js";import{C as x,x as S}from"./NAVK5JJ2.js";import"./OUMTV5H5.js";import"./Q7BJGEFH.js";import"./V66TS2BB.js";import"./GS5JDPZH.js";import{a as s}from"./2WY5MPMY.js";import"./S6OUM5X2.js";import"./XLHYQNAM.js";import{Ea as L,a as w,b as h,s as E}from"./7GDMXAF5.js";import"./5XZ5VL42.js";import"./C3VLDYS2.js";import"./A4ZVCRVF.js";import"./N2GN5WOI.js";import"./272R36XK.js";import"./5PV2GUZW.js";export default $arcgis.t(([,,,,,,,,,,,,,,{a:F,c:$,d:C,e:N,f:T,g:A,h:b,i:R,j:_,k:k,l:q,m:V,n:u,o:j}])=>{var z=async(t,r)=>{let e=t.tool_calls??[];if(e.length===0){await s({text:`LLM did not request any tool calls: ${String(t?.content)}`},r);return}await Promise.all(e.map(async a=>await s({text:`LLM invoked ${a.name} tool with arguments: ${JSON.stringify(a.args,null,2)}`},r)))};var D=.7,B=10,J=async(t,r)=>{try{await s({text:"Similarity search to find fields"},r);let e=m(r,"fieldSearch"),a=m(r,"layersAndFieldsRegistry"),i=m(r,"embeddingCache"),o=await e.searchFields({text:t.agentExecutionContext.assignedTask,layerIds:t.vectorSearchLayerIds,minScore:D,topResults:B,embeddingCache:i}),p=o.map(({layerId:c,results:d})=>{let g=d.map(n=>` - ${n.name} (${n.score.toFixed(2)})`).join(`
|
|
3
3
|
`);return`${a.get(c)?.layerItem.name??c}:
|
|
4
4
|
${g}`}).join(`
|
|
5
5
|
`),l;return o.length>0?l=`Vector search completed. Matching layers and fields with scores:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as w,b as L}from"./
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as w,b as L}from"./SUMXIUIS.js";import{D as O,a as b,b as E,c as u,d as h,e as y,f as x,n as f,o as C,p as P}from"./NAVK5JJ2.js";var _=e=>(...n)=>{let t=h(),o=new e(...n),s=o.exports;u(t.at(-1));let r=o.component.manager;r.W(o,s),o.watchExports(r.W.bind(r,o)),y(o);let i=[o.component,...t].reverse();return f(i,a=>a===void 0?void 0:M(o,a,s),s)},M=(e,{host:n,key:t,isReactive:o},s)=>{let r=n,i=r[t]!==e.exports,a=r[t]!==s,p=s!==e.exports;if(i&&!a&&p&&(r[t]=e.exports),n===e.component){if(o){let l=e.component.manager;a&&l.W(e,r[t]),e.onUpdate(m=>{if(m.has(t)){let g=r[t];g!==e.exports&&l.W(e,g)}})}e.O=o?void 0:t}let c=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{r[t]!==e.exports&&(c?x(()=>{r[t]=e.exports}):r[t]=e.exports)})};var D=e=>R(void 0,e);var v=class extends P{constructor(n,t){super(n);let o=this.exports;try{E(this.component);let s=t(this.component,this),r=this.exports!==o;if(b(s)){r||this.setProvisionalExports(s);let i=s.then(a=>{this.exports=a,super.catchUpLifecycle()}).catch(a=>{this.P.reject(a)});this.onLoad(async()=>await i)}else(!r||s!==void 0)&&(this.exports=s),queueMicrotask(()=>super.catchUpLifecycle())}catch(s){this.P.reject(s)}}catchUpLifecycle(){}},R=_(v);var S=(e,n,t)=>D((o,s)=>{let r=n,i=C({bubbles:!1,composed:!1});return s.onUpdated(a=>{if(!r.some(c=>a.has(c)))return;let p=t(A(e,r,a)),d=t(A(e,r));p.forEach((c,l)=>{d.has(l)||i.emit({...c,data:void 0})}),d.forEach((c,l)=>{let m=p.get(l);(!m||!N(m,c))&&i.emit(c)})}),i});function A(e,n,t){let o={};return n.forEach(s=>{o[s]=t?.has(s)?t.get(s):e[s]}),o}function N(e,n){if(e===n)return!0;if(!e||!n||typeof e!="object"||typeof n!="object"||Array.isArray(e)||Array.isArray(n))return!1;let t=Object.entries(e),o=Object.entries(n);return t.length!==o.length?!1:t.every(([s,r])=>N(r,n[s]))}var V=e=>(n={})=>D((t,o)=>{let s=w(t.el),r={_lang:s.lang,_t9nLocale:s.t9nLocale,_loading:!0},i=t;o.onLifecycle(()=>L(t.el,()=>e("./assets"),({t9nLocale:p,t9nStrings:d,lang:c})=>{let l={...d,_lang:c,_t9nLocale:p,_loading:!1};o.exports=l;let m=d.componentLabel;typeof m=="string"&&"label"in t&&t.label==null&&(t.label??=m),a(i.messageOverrides)},n.name));let a=p=>{let d=o.exports,c=d._original??d,l=j(c,p);p&&(l._original=c),o.exports=l};return"messageOverrides"in i&&o.onUpdate(p=>{p.has("messageOverrides")&&a(i.messageOverrides)}),n.blocking?(o.setProvisionalExports(r,!1),o.ready):r}),j=(e,n)=>{if(!n)return e;let t={...e};return Object.entries(n).forEach(([o,s])=>{e[o]!==void 0&&(typeof s=="object"?t[o]=j(e[o],s):t[o]=s??e[o])}),t};var X=V(O);export{S as a,X as b};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a}from"../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a}from"../HU527DML.js";import"../WEBAQIUT.js";import"../XLHYQNAM.js";import"../7GDMXAF5.js";import"../5XZ5VL42.js";import"../C3VLDYS2.js";import"../A4ZVCRVF.js";import"../N2GN5WOI.js";import"../272R36XK.js";import"../5PV2GUZW.js";export{a as BaseAgent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as i,b as h,c as m}from"../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as i,b as h,c as m}from"../3UVQLYUK.js";import{a as u}from"../I724KIFI.js";import{a as c}from"../HU527DML.js";import{d as o}from"../WEBAQIUT.js";import"../XLHYQNAM.js";import{y as n}from"../7GDMXAF5.js";import"../5XZ5VL42.js";import"../C3VLDYS2.js";import"../A4ZVCRVF.js";import"../N2GN5WOI.js";import"../272R36XK.js";import"../5PV2GUZW.js";var d=class extends c{constructor(t){super(),this.middlewares=[],Object.assign(this,t),this.generate()}generate(){let t=o([this.inputSchema,this.outputSchema].filter(Boolean)),e=`${this.id}-execute`,r={[e]:this._invokeExecuteNode.bind(this)},s=[{from:e,decide:()=>{}}];this.workspace=t,this.createGraph=()=>u(r,s,t,{agent:this,entryNode:e,middlewares:this.middlewares})}async _invokeExecuteNode(t,e){try{return this.outputSchema?await this._invokeStructured(t,e):await this._invokeUnstructured(t,e)}catch(r){if(n(r)||e?.signal?.aborted||r instanceof Error&&r.name==="AbortError")throw r;let s=r instanceof Error?r.message:String(r);return i({outputMessage:s},"failed",s)}}async _invokeStructured(t,e){if(!this.outputSchema)throw new Error("Output schema is required for structured invocation.");let r=this._validateInputState(t),s=await this.execute(r,e);if(typeof s=="string")throw new Error("Expected execute function to return an object matching the output schema, but received a string.");return h(s,this.outputSchema,t.agentExecutionContext.messages)}async _invokeUnstructured(t,e){let r=this._validateInputState(t),s=await this.execute(r,e),a=typeof s=="string"?s:JSON.stringify(s),p=a.trim()||"FunctionAgent completed.";return i({outputMessage:a},"success",p)}_validateInputState(t){if(!this.inputSchema)return t;let e=this.inputSchema.safeParse(m(t,this.inputSchema));if(!e.success)throw new Error(`FunctionAgent input schema validation failed: ${e.error.message}`);return{...t,...e.data}}};export{d as FunctionAgent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a}from"../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a}from"../D7CRICBG.js";import"../63OF33IL.js";import"../3UVQLYUK.js";import"../S6OUM5X2.js";import"../I724KIFI.js";import"../HU527DML.js";import"../WEBAQIUT.js";import"../XLHYQNAM.js";import"../7GDMXAF5.js";import"../5XZ5VL42.js";import"../C3VLDYS2.js";import"../A4ZVCRVF.js";import"../N2GN5WOI.js";import"../272R36XK.js";import"../5PV2GUZW.js";export{a as LLMAgent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as o}from"../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as o}from"../Q7BJGEFH.js";import"../V66TS2BB.js";import"../GS5JDPZH.js";import"../2WY5MPMY.js";import"../S6OUM5X2.js";import{a as i}from"../HU527DML.js";import"../WEBAQIUT.js";import"../XLHYQNAM.js";import"../7GDMXAF5.js";import"../5XZ5VL42.js";import"../C3VLDYS2.js";import"../A4ZVCRVF.js";import"../N2GN5WOI.js";import"../272R36XK.js";import"../5PV2GUZW.js";var r=class extends i{constructor(t){super(),this.modelTier="default",Object.assign(this,t),this.generate()}generate(){let t=this.toolLoaders?Object.fromEntries(Object.entries(this.toolLoaders).map(([a,n])=>[a,async()=>{let e=await n();return"getTool"in e?e.getTool():e}])):void 0,s=o({id:this.id,name:this.name,description:this.description,systemPrompt:this.systemPrompt,skillLoaders:this.skillLoaders,toolLoaders:t,modelTier:this.modelTier,runtimeContextLoader:this.runtimeContextLoader,instructions:this.instructions});this.createGraph=s.createGraph,this.workspace=s.workspace}};export{r as SkillAgent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as i}from"../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as i}from"../I724KIFI.js";import{a}from"../HU527DML.js";import"../WEBAQIUT.js";import"../XLHYQNAM.js";import"../7GDMXAF5.js";import"../5XZ5VL42.js";import"../C3VLDYS2.js";import"../A4ZVCRVF.js";import"../N2GN5WOI.js";import"../272R36XK.js";import"../5PV2GUZW.js";var r=class extends a{constructor(e){super(),this.middlewares=[],Object.assign(this,e),this.generate()}generate(){let{workspace:e,createGraph:s}=this.workflow.generate({additionalSchemas:[this.inputSchema,this.outputSchema]});if(this.workspace=e,!this.middlewares.length)this.createGraph=s;else{let t=this.id,h=s().compile(),o={[t]:async(n,d)=>await h.invoke(n,d)},c=[{from:t,decide:()=>{}}];this.createGraph=()=>i(o,c,e,{agent:this,entryNode:t,middlewares:this.middlewares})}}};export{r as WorkflowAgent};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import"../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import"../5PV2GUZW.js";async function e(t){let{createZodObjectSchema:c}=await import("../FONIQ7VF.js");return c(t)}export{e as createSchema};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a,b,c}from"../../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a,b,c}from"../../SRXUC4QB.js";import"../../63OF33IL.js";import"../../S6OUM5X2.js";import"../../7GDMXAF5.js";import"../../5XZ5VL42.js";import"../../C3VLDYS2.js";import"../../A4ZVCRVF.js";import"../../N2GN5WOI.js";import"../../272R36XK.js";import"../../5PV2GUZW.js";export{a as createHumanInTheLoopMiddleware,b as createHumanInTheLoopToolMiddleware,c as getHumanInTheLoopPayload};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a,b,c}from"../../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a,b,c}from"../../63OF33IL.js";import"../../S6OUM5X2.js";import"../../7GDMXAF5.js";import"../../5XZ5VL42.js";import"../../C3VLDYS2.js";import"../../A4ZVCRVF.js";import"../../N2GN5WOI.js";import"../../272R36XK.js";import"../../5PV2GUZW.js";export{c as convertToLangChainMiddlewares,a as createAgentMiddleware,b as createToolMiddleware};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{a as l,b as c}from"../../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{a as l,b as c}from"../../63OF33IL.js";import{a as o}from"../../2WY5MPMY.js";import"../../S6OUM5X2.js";import"../../7GDMXAF5.js";import"../../5XZ5VL42.js";import"../../C3VLDYS2.js";import"../../A4ZVCRVF.js";import"../../N2GN5WOI.js";import{V as s,fa as i}from"../../272R36XK.js";import"../../5PV2GUZW.js";var m="agent-trace",d="tool-trace";function M(){return l(m,{wrapModelCall:async(t,e)=>{let a=await e(t),r=t.runtime,g=u(a);return await Promise.all(g.map(async n=>await o({text:`LLM requested tool call "${n.name}" with arguments: ${JSON.stringify(n.args,null,2)}`},r))),a}})}function y(){return c(d,{wrapToolCall:async(t,e)=>{let a=await e(t),r=t.config;return await o({text:`Finished executing tool: ${s.isInstance(a)?a.text:typeof a=="string"?a:t.tool.name}`},r),a}})}function u(t){return!i.isInstance(t)||!Array.isArray(t.tool_calls)?[]:t.tool_calls.filter(e=>typeof e?.name=="string")}export{M as createAgentTraceMiddleware,y as createToolTraceMiddleware};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import{Ga as a}from"../../
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
|
|
2
|
+
import{Ga as a}from"../../A4ZVCRVF.js";import"../../N2GN5WOI.js";import"../../272R36XK.js";import"../../5PV2GUZW.js";var r=class{constructor(t){this.resultMode="continue",this.responseFormat="content",this.middlewares=[],Object.assign(this,t)}getTool(){return a(this._executeWithMiddlewares.bind(this),{name:this.name,description:this.description,returnDirect:this.resultMode==="terminal",schema:this.inputSchema,responseFormat:this.responseFormat==="content-and-artifact"?"content_and_artifact":"content"})}async _executeWithMiddlewares(t,e){let c=async i=>{let n=await this.execute(i.input,i.config);return this._validateOutput(n)},s=await this.middlewares.reduceRight((i,n)=>async u=>await n.handler(u,i),c)({config:e,input:t,tool:this,toolCallId:d(e)});return this.responseFormat==="content-and-artifact"&&typeof s=="string"?[s,void 0]:s}_validateOutput(t){if(!this.outputSchema)return t;let e=this.outputSchema.safeParse(t);if(!e.success)throw new Error(`FunctionTool output schema validation failed: ${e.error.message}`);return e.data}};function d(o){let t=o?.toolCall;return typeof t?.id=="string"?t.id:void 0}export{r as FunctionTool};
|