@arcgis/ai-components 5.2.0-next.10 → 5.2.0-next.100
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/LICENSE.md +4 -2
- package/README.md +2 -2
- package/dist/agent-utils/FunctionAgent.d.ts +2 -2
- package/dist/agent-utils/LLMAgent.d.ts +7 -4
- package/dist/agent-utils/LLMAgent.js +4 -2
- package/dist/agent-utils/WorkflowAgent.d.ts +2 -2
- package/dist/agent-utils/WorkflowAgent.js +14 -15
- package/dist/agent-utils/index.d.ts +177 -0
- package/dist/agent-utils/index.js +167 -0
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/middlewares/trace.js +25 -33
- package/dist/agent-utils/tools/FunctionTool.d.ts +2 -2
- package/dist/agent-utils/types.d.ts +37 -8
- package/dist/agent-utils/workflows/ConditionalWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/LoopWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/ParallelWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/RouterWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SequentialWorkflow.d.ts +2 -2
- package/dist/agent-utils/workflows/SwitchWorkflow.d.ts +2 -2
- package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
- package/dist/agentic-workflow/Edge.d.ts +16 -0
- package/dist/agentic-workflow/WebAgent.d.ts +39 -0
- package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
- package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
- package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
- package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
- package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
- package/dist/agentic-workflow/types.d.ts +29 -0
- package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
- package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +121 -0
- package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
- package/dist/agents/tools/help/listFields/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
- package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
- package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
- package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
- package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
- package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getStatistics/adapter.js +157 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/getTopFeatures/adapter.js +144 -0
- package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
- package/dist/agents/tools/query/queryFeatures/adapter.js +130 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
- package/dist/cdn/22KHSDJI.js +2 -0
- package/dist/cdn/2EY3BQQX.js +2 -0
- package/dist/cdn/{SWOXSJ62.js → 2O4DON37.js} +1 -1
- package/dist/cdn/34O57OGV.js +2 -0
- package/dist/cdn/{5W7S2RS4.js → 3UEKINYC.js} +1 -1
- package/dist/cdn/4OGR5QKS.js +2 -0
- package/dist/cdn/5FL5BTTX.js +66 -0
- package/dist/cdn/5HBAJ57P.js +2 -0
- package/dist/cdn/5K5ZY267.js +2 -0
- package/dist/cdn/5MK44FNO.js +2 -0
- package/dist/cdn/5WYRJMBW.js +2 -0
- package/dist/cdn/5X7EG7D2.js +2 -0
- package/dist/cdn/5XZLS7UO.js +2 -0
- package/dist/cdn/5ZFUGNRN.js +2 -0
- package/dist/cdn/655YIKL3.js +11 -0
- package/dist/cdn/6ECRQVHY.js +2 -0
- package/dist/cdn/6OOZSZRJ.js +2 -0
- package/dist/cdn/{D3TNNRP4.js → 6P44KOKX.js} +1 -1
- package/dist/cdn/6YYPVU7H.js +3 -0
- package/dist/cdn/7BCQMK6D.js +2 -0
- package/dist/cdn/7SRLZQVC.js +5 -0
- package/dist/cdn/7V6OSTFC.js +2 -0
- package/dist/cdn/7VAQUCBU.js +9 -0
- package/dist/cdn/7VUSIGEM.js +2 -0
- package/dist/cdn/ACJTJLZN.js +2 -0
- package/dist/cdn/AI6DYOKR.js +181 -0
- package/dist/cdn/AKD5UOVX.js +2 -0
- package/dist/cdn/ANRQWYU2.js +2 -0
- package/dist/cdn/{ZS2TZ6BF.js → AOVJ34QE.js} +1 -1
- package/dist/cdn/APFZY4PI.js +2 -0
- package/dist/cdn/B2JDVLA6.js +2 -0
- package/dist/cdn/BE7BRJZD.js +2 -0
- package/dist/cdn/{FL4W4VYN.js → BL273EGZ.js} +17 -1
- package/dist/cdn/C4FEETBZ.js +2 -0
- package/dist/cdn/C4JT4S5E.js +2 -0
- package/dist/cdn/CCC6LBMY.js +2 -0
- package/dist/cdn/{5ZZGKP7N.js → CEKOEHB3.js} +1 -1
- package/dist/cdn/CJMUJXPL.js +2 -0
- package/dist/cdn/COH3QXWG.js +4 -0
- package/dist/cdn/CP5BVGJU.js +2 -0
- package/dist/cdn/D5UFYQHN.js +44 -0
- package/dist/cdn/EWLXNGKH.js +208 -0
- package/dist/cdn/EYOWRGDP.js +2 -0
- package/dist/cdn/F5NIRETW.js +2 -0
- package/dist/cdn/FDOMMK2M.js +2 -0
- package/dist/cdn/FG647IP6.js +2 -0
- package/dist/cdn/FJO4KNOZ.js +2 -0
- package/dist/cdn/FUF3NAU7.js +2 -0
- package/dist/cdn/FXP5UIQU.js +156 -0
- package/dist/cdn/{T537PKP4.js → FYZATVB3.js} +1 -1
- package/dist/cdn/G2EGT3CF.js +6 -0
- package/dist/cdn/G3SF6U2U.js +2 -0
- package/dist/cdn/G7OMHU2B.js +2 -0
- package/dist/cdn/HAEFC2SJ.js +2 -0
- package/dist/cdn/HDACNIZF.js +2 -0
- package/dist/cdn/HHFNQR6Z.js +2 -0
- package/dist/cdn/HHUQXL3R.js +2 -0
- package/dist/cdn/IBZ2NEAO.js +2 -0
- package/dist/cdn/{FX7UOGHP.js → ICBIUFK7.js} +1 -1
- package/dist/cdn/ICQCK5D3.js +2 -0
- package/dist/cdn/IHP25JWI.js +99 -0
- package/dist/cdn/IJVMUS2L.js +14 -0
- package/dist/cdn/J6A4AS7E.js +22 -0
- package/dist/cdn/J6SZIQJA.js +2 -0
- package/dist/cdn/JCOA24UH.js +3 -0
- package/dist/cdn/{NE7E52YR.js → JEBRN3EU.js} +9 -3
- package/dist/cdn/JO5ETMPS.js +2 -0
- package/dist/cdn/K2R6XVK3.js +2 -0
- package/dist/cdn/KITIP6J2.js +2 -0
- package/dist/cdn/KWD2ECTM.js +2 -0
- package/dist/cdn/{MODWHY3R.js → LAYVGCPL.js} +6 -4
- package/dist/cdn/{7RCQFLPP.js → LK7ZIQW6.js} +1 -1
- package/dist/cdn/LLUGJKAQ.js +2 -0
- package/dist/cdn/MWYBF3F3.js +66 -0
- package/dist/cdn/{VMXLYWUK.js → MXTXJKFE.js} +1 -1
- package/dist/cdn/MY47B3CE.js +3 -0
- package/dist/cdn/NEV6OZN3.js +71 -0
- package/dist/cdn/NNXISHCA.js +14 -0
- package/dist/cdn/NZSOJ726.js +2 -0
- package/dist/cdn/O4NVW75A.js +2 -0
- package/dist/cdn/OE3GW5LE.js +2 -0
- package/dist/cdn/{23EQTPO3.js → OKVLGJAG.js} +1 -1
- package/dist/cdn/ONQ6JSBJ.js +2 -0
- package/dist/cdn/OX64WOEL.js +22 -0
- package/dist/cdn/{LQ6R5YRN.js → PQ2DPOFM.js} +1 -1
- package/dist/cdn/PUHRBGKB.js +2 -0
- package/dist/cdn/Q57QWN5W.js +2 -0
- package/dist/cdn/QUKNPVAF.js +2 -0
- package/dist/cdn/R2PQVY4O.js +2 -0
- package/dist/cdn/R74ZHFA6.js +2 -0
- package/dist/cdn/RBE55SWR.js +2 -0
- package/dist/cdn/RHYNE5OE.js +2 -0
- package/dist/cdn/RLEHNAIA.js +2 -0
- package/dist/cdn/RVSTAUQS.js +2 -0
- package/dist/cdn/{X2ZDYHCG.js → SDWWUWAF.js} +10 -5
- package/dist/cdn/{GTLS44GI.js → SXM4NUT5.js} +1 -1
- package/dist/cdn/SZ2QSSB3.js +2 -0
- package/dist/cdn/T4RIGOXB.js +2 -0
- package/dist/cdn/TCH5I5LS.js +2 -0
- package/dist/cdn/TEPP7YPR.js +2 -0
- package/dist/cdn/TMVF2W5N.js +36 -0
- package/dist/cdn/TPULIO6I.js +34 -0
- package/dist/cdn/UDRKUVZP.js +2 -0
- package/dist/cdn/{6YMR4QSD.js → UHEYPSOR.js} +1 -1
- package/dist/cdn/UHNVDALX.js +18 -0
- package/dist/cdn/UZLQALHY.js +2 -0
- package/dist/cdn/V6HOUZPZ.js +2 -0
- package/dist/cdn/VAXH6RUQ.js +134 -0
- package/dist/cdn/VLLZ2FFU.js +2 -0
- package/dist/cdn/VOKXKU7M.js +56 -0
- package/dist/cdn/VXFQANGJ.js +2 -0
- package/dist/cdn/WGO5SER7.js +6 -0
- package/dist/cdn/WJXXOKGA.js +9 -0
- package/dist/cdn/WKTQVBFJ.js +2 -0
- package/dist/cdn/{2SJAOYZT.js → WSWB3B7B.js} +1 -1
- package/dist/cdn/XX6GHMNR.js +2 -0
- package/dist/cdn/Y7XD7ZRD.js +2 -0
- package/dist/cdn/YEZ3AMNX.js +2 -0
- package/dist/cdn/YLVJA4ZE.js +2 -0
- package/dist/cdn/Z5HWPSZN.js +2 -0
- package/dist/cdn/Z5W4V7RC.js +2 -0
- package/dist/cdn/ZDV4K4WG.js +2 -0
- package/dist/cdn/ZOEMBHRF.js +2 -0
- package/dist/cdn/ZRVZMPFN.js +2 -0
- package/dist/cdn/{ZTBA5PM7.js → ZU2FHVNK.js} +1 -1
- package/dist/cdn/agent-utils/index.js +2 -0
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +3 -0
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -0
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -0
- package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
- package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
- package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +1295 -2104
- package/dist/chunks/arcgisKnowledgeGraph.js +128 -72
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +19 -2
- package/dist/chunks/arcgis_knowledge_current_map_context.js +31 -2
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +116 -27
- package/dist/chunks/baseAgentState.js +58 -0
- package/dist/chunks/converterUtils.js +66 -41
- package/dist/chunks/dataExplorationGraph.js +131 -182
- package/dist/chunks/data_explore_query_prompt.js +9 -4
- package/dist/chunks/fetchAgentContext.js +13 -0
- package/dist/chunks/fetchService.js +10 -0
- package/dist/chunks/fieldStatistics.js +79 -0
- package/dist/chunks/formatFeatureAttributes.js +132 -0
- package/dist/chunks/generateLayerDescriptions.js +259 -282
- package/dist/chunks/helpGraph.js +35 -25
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/index.js +11 -0
- package/dist/chunks/intent_prompt.js +16 -0
- package/dist/chunks/layerStylingGraph.js +39 -33
- package/dist/chunks/mergeWhereClauses.js +15 -0
- package/dist/chunks/navigationGraph.js +140 -116
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/orchestrator.js +444 -233
- package/dist/chunks/resolvePointGeometryFilter.js +92 -0
- package/dist/chunks/state.js +21 -27
- package/dist/chunks/toolCallResponse.js +14 -10
- package/dist/chunks/utils2.js +11 -11
- package/dist/components/arcgis-assistant/customElement.d.ts +82 -1
- package/dist/components/arcgis-assistant/customElement.js +332 -183
- package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +614 -10
- package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +20 -4
- package/dist/components/arcgis-assistant-help-agent/customElement.js +29 -7
- package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
- package/dist/components/arcgis-assistant-interrupt/customElement.js +11 -12
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +12 -8
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +7 -7
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +40 -16
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +30 -7
- package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message/customElement.js +9 -8
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
- package/dist/components/arcgis-assistant-message-loading/customElement.js +11 -10
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +18 -4
- package/dist/components/arcgis-assistant-speech-input/customElement.js +34 -52
- package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
- package/dist/components/arcgis-assistant-user-message/customElement.js +15 -10
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +6 -6
- package/dist/oauth-callback.html +1 -1
- package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
- package/dist/types/lumina.d.ts +5 -4
- package/dist/types/preact.d.ts +5 -4
- package/dist/types/react.d.ts +5 -4
- package/dist/types/stencil.d.ts +7 -6
- package/dist/utils/index.d.ts +65 -38
- package/dist/utils/index.js +56 -55
- package/package.json +32 -12
- package/dist/cdn/462JBSEV.js +0 -422
- package/dist/cdn/5QAHYX7Y.js +0 -5
- package/dist/cdn/64PJB5NU.js +0 -2
- package/dist/cdn/6AWNQHCO.js +0 -4
- package/dist/cdn/AXDZBBNL.js +0 -45
- package/dist/cdn/BIV2IPHH.js +0 -2
- package/dist/cdn/CCY4TSBO.js +0 -2
- package/dist/cdn/CTSALWEP.js +0 -2
- package/dist/cdn/D2N2NSRQ.js +0 -72
- package/dist/cdn/DOV5ZJ7M.js +0 -2
- package/dist/cdn/EEUCKMU7.js +0 -2
- package/dist/cdn/EGHBXLNG.js +0 -2
- package/dist/cdn/ETRWZ3MS.js +0 -108
- package/dist/cdn/EWI4V3GQ.js +0 -36
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/I6HNBTWY.js +0 -2
- package/dist/cdn/JBHNHHWO.js +0 -3
- package/dist/cdn/JOFUPKIB.js +0 -2
- package/dist/cdn/KMQ3SP4I.js +0 -5
- package/dist/cdn/KUEOKIQR.js +0 -2
- package/dist/cdn/LKRAPK4A.js +0 -165
- package/dist/cdn/NXKKG5TK.js +0 -2
- package/dist/cdn/OBUZ7HBN.js +0 -2
- package/dist/cdn/OIVRK7HT.js +0 -2
- package/dist/cdn/RUURNLTP.js +0 -2
- package/dist/cdn/RVOAPUBN.js +0 -2
- package/dist/cdn/TSZPHE7L.js +0 -22
- package/dist/cdn/VAZNJSKA.js +0 -16
- package/dist/cdn/VNQN5ZQO.js +0 -14
- package/dist/cdn/WIDTPVSU.js +0 -2
- package/dist/cdn/XER22VYQ.js +0 -3
- package/dist/cdn/YIMNOUTF.js +0 -2
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as e, html as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { c as a } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as e, html as s } from "lit";
|
|
4
|
+
import { LitElement as t } from "@arcgis/lumina";
|
|
5
|
+
import { u as i } from "../../chunks/useT9n.js";
|
|
6
|
+
const n = e`:host{display:contents}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);padding:0 var(--calcite-spacing-sm)}.loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.text{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 1.2s ease-in-out infinite;width:85%}.skeleton-text:last-child{width:70%}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.skeleton-text{animation:none}}`;
|
|
7
|
+
class o extends t {
|
|
7
8
|
constructor() {
|
|
8
|
-
super(...arguments), this.loading = !1, this.loadingMessage = "", this.assistantAvatarEnabled = !1;
|
|
9
|
+
super(...arguments), this._messages = i({ blocking: !0 }), this.loading = !1, this.loadingMessage = "", this.assistantAvatarEnabled = !1;
|
|
9
10
|
}
|
|
10
11
|
static {
|
|
11
12
|
this.properties = { loading: 5, loadingMessage: 1, assistantAvatarEnabled: 5, interrupts: 0 };
|
|
12
13
|
}
|
|
13
14
|
static {
|
|
14
|
-
this.styles =
|
|
15
|
+
this.styles = n;
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
17
|
-
return this.loading ?
|
|
18
|
+
return this.loading ? s`<arcgis-assistant-message .assistantAvatarEnabled=${this.assistantAvatarEnabled} footer-disabled>${this.assistantAvatarEnabled ? s`<slot name=icon slot=icon><calcite-icon class="icon" icon=effects scale=s></calcite-icon></slot>` : null}<slot name=content slot=content><arcgis-assistant-interrupt-preview .interrupts=${this.interrupts}></arcgis-assistant-interrupt-preview><div class="loading-container"><div class="loading"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader><div class="text">${this.loadingMessage}</div></div><div class="skeleton-block"><span class="skeleton-text"></span><span class="skeleton-text"></span></div></div></slot></arcgis-assistant-message>` : null;
|
|
18
19
|
}
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
a("arcgis-assistant-message-loading", o);
|
|
21
22
|
export {
|
|
22
|
-
|
|
23
|
+
o as ArcgisAssistantMessageLoading
|
|
23
24
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
import { unsafeHTML as
|
|
6
|
-
import { p as
|
|
7
|
-
const
|
|
8
|
-
class
|
|
2
|
+
import { c as r } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as i, html as t } from "lit";
|
|
4
|
+
import { LitElement as c } from "@arcgis/lumina";
|
|
5
|
+
import { unsafeHTML as a } from "lit/directives/unsafe-html.js";
|
|
6
|
+
import { a as n, p as o } from "../../chunks/converterUtils.js";
|
|
7
|
+
const s = i`.container{color:var(--calcite-color-text-1);min-width:0}.content{min-width:0;overflow-wrap:anywhere}.content>*{margin:0}.content>*+*{margin-block-start:var(--calcite-spacing-sm)}.content :is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}.content>calcite-table{display:block;max-width:100%}.content pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}.content pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}.part{animation:part-reveal calc(3 * var(--calcite-animation-timing)) ease-out}@keyframes part-reveal{0%{opacity:0;transform:translateY(var(--calcite-size-fixed-xxs))}to{opacity:1;transform:translateY(0)}}@media(prefers-reduced-motion:reduce){.part{animation:none}}`;
|
|
8
|
+
class l extends c {
|
|
9
9
|
static {
|
|
10
|
-
this.properties = { content: 1 };
|
|
10
|
+
this.properties = { content: 1, parts: 0 };
|
|
11
11
|
}
|
|
12
12
|
static {
|
|
13
|
-
this.styles =
|
|
13
|
+
this.styles = s;
|
|
14
14
|
}
|
|
15
15
|
render() {
|
|
16
|
-
return
|
|
16
|
+
return t`<div class="container"><div class="content">${this.parts?.map((e) => t`<span class="part">${a(n(e))}</span>`) ?? a(o(this.content))}</div></div>`;
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
|
|
19
|
+
r("arcgis-assistant-message-text", l);
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
l as ArcgisAssistantMessageText
|
|
22
22
|
};
|
|
@@ -6,21 +6,31 @@ import "@langchain/langgraph/web";
|
|
|
6
6
|
import "../../chunks/adapter.js";
|
|
7
7
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
8
8
|
import "@arcgis/core/portal/Portal.js";
|
|
9
|
+
import "@arcgis/core/request.js";
|
|
10
|
+
import "@arcgis/toolkit/string";
|
|
9
11
|
import "../../chunks/generateLayerDescriptions.js";
|
|
10
12
|
import "@langchain/core/messages";
|
|
11
13
|
import "@langchain/core/callbacks/dispatch/web";
|
|
14
|
+
import "@langchain/core/callbacks/base";
|
|
12
15
|
import "@langchain/openai";
|
|
16
|
+
import "@arcgis/core/config.js";
|
|
13
17
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
14
18
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
15
|
-
import "@arcgis/core/request.js";
|
|
16
19
|
import "@langchain/core/prompts";
|
|
20
|
+
import "../../agents/tools/filter/clearFilters/adapter.js";
|
|
21
|
+
import "../../agents/tools/filter/resetMap/adapter.js";
|
|
22
|
+
import "../../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
23
|
+
import "../../agents/tools/query/getAttribute/adapter.js";
|
|
24
|
+
import "../../agents/tools/query/getStatistics/adapter.js";
|
|
25
|
+
import "../../agents/tools/query/getTopFeatures/adapter.js";
|
|
26
|
+
import "../../agents/tools/query/queryFeatures/adapter.js";
|
|
17
27
|
import "@arcgis/core/intl.js";
|
|
18
28
|
import "@langchain/langgraph/prebuilt";
|
|
19
29
|
import "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
20
30
|
import "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
21
|
-
import "
|
|
31
|
+
import "../../agents/tools/help/listFields/adapter.js";
|
|
22
32
|
import "@arcgis/core/rest/knowledgeGraphService.js";
|
|
23
|
-
import { r as o,
|
|
33
|
+
import { r as o, i as s } from "../../chunks/utils2.js";
|
|
24
34
|
class a extends i {
|
|
25
35
|
constructor() {
|
|
26
36
|
super(...arguments), this.agent = r;
|
|
@@ -29,13 +39,17 @@ class a extends i {
|
|
|
29
39
|
this.properties = { referenceElement: 1 };
|
|
30
40
|
}
|
|
31
41
|
#t;
|
|
42
|
+
#i;
|
|
32
43
|
getContext() {
|
|
33
44
|
if (!this.#t)
|
|
34
45
|
throw new Error("arcgis-assistant-navigation-agent requires a mapView");
|
|
35
46
|
return { mapView: this.#t };
|
|
36
47
|
}
|
|
37
48
|
load() {
|
|
38
|
-
this.#t = o(this, "arcgis-assistant-navigation-agent"), s(this);
|
|
49
|
+
this.#t = o(this, "arcgis-assistant-navigation-agent"), this.#i = s(this);
|
|
50
|
+
}
|
|
51
|
+
disconnectedCallback() {
|
|
52
|
+
this.#i?.unregister(this.agent.id), super.disconnectedCallback();
|
|
39
53
|
}
|
|
40
54
|
}
|
|
41
55
|
t("arcgis-assistant-navigation-agent", a);
|
|
@@ -1,17 +1,26 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as
|
|
4
|
-
import {
|
|
5
|
-
import { LitElement as
|
|
6
|
-
import I from "@arcgis/core/core/Accessor.js";
|
|
2
|
+
import { c as C } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as S, html as R } from "lit";
|
|
4
|
+
import { watch as p } from "@arcgis/core/core/reactiveUtils.js";
|
|
5
|
+
import { LitElement as y, createEvent as d, nothing as v } from "@arcgis/lumina";
|
|
7
6
|
import { property as l, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
8
|
-
|
|
7
|
+
import w from "@arcgis/core/core/Accessor.js";
|
|
8
|
+
const I = S`.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 = [
|
|
9
|
+
"audio/webm;codecs=opus",
|
|
10
|
+
"audio/webm",
|
|
11
|
+
"audio/mp4",
|
|
12
|
+
"audio/ogg;codecs=opus",
|
|
13
|
+
"audio/ogg"
|
|
14
|
+
];
|
|
15
|
+
function h(t) {
|
|
16
|
+
return t.replace(/\s+/gu, " ").trim();
|
|
17
|
+
}
|
|
9
18
|
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, u = (t, e, s, i) => {
|
|
10
19
|
for (var r = i > 1 ? void 0 : i ? x(e, s) : e, n = t.length - 1, o; n >= 0; n--)
|
|
11
20
|
(o = t[n]) && (r = (i ? o(e, s, r) : o(r)) || r);
|
|
12
21
|
return i && r && k(e, s, r), r;
|
|
13
22
|
};
|
|
14
|
-
let a = class extends
|
|
23
|
+
let a = class extends w {
|
|
15
24
|
constructor(t) {
|
|
16
25
|
super(t), this.state = "idle", this.liveTranscript = "", this.transcript = "", this.errorCode = void 0;
|
|
17
26
|
}
|
|
@@ -37,37 +46,17 @@ u([
|
|
|
37
46
|
a = u([
|
|
38
47
|
f("SpeechController")
|
|
39
48
|
], a);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
"audio/webm",
|
|
43
|
-
"audio/mp4",
|
|
44
|
-
"audio/ogg;codecs=opus",
|
|
45
|
-
"audio/ogg"
|
|
46
|
-
];
|
|
47
|
-
function h(t) {
|
|
48
|
-
return t.replace(/\s+/gu, " ").trim();
|
|
49
|
-
}
|
|
50
|
-
var O = Object.defineProperty, M = Object.getOwnPropertyDescriptor, g = (t, e, s, i) => {
|
|
51
|
-
for (var r = i > 1 ? void 0 : i ? M(e, s) : e, n = t.length - 1, o; n >= 0; n--)
|
|
49
|
+
var V = Object.defineProperty, O = Object.getOwnPropertyDescriptor, g = (t, e, s, i) => {
|
|
50
|
+
for (var r = i > 1 ? void 0 : i ? O(e, s) : e, n = t.length - 1, o; n >= 0; n--)
|
|
52
51
|
(o = t[n]) && (r = (i ? o(e, s, r) : o(r)) || r);
|
|
53
|
-
return i && r &&
|
|
52
|
+
return i && r && V(e, s, r), r;
|
|
54
53
|
};
|
|
55
54
|
let c = class extends a {
|
|
56
55
|
constructor(t) {
|
|
57
56
|
super(t), this._activeSessionId = null, this._mediaRecorder = null, this._mediaRecorderChunkIndex = 0, this._mediaRecorderStopReason = null, this._mediaStream = null, this._pendingChunkOperations = /* @__PURE__ */ new Set(), this._recordedChunks = [], this.handleRecording = null, this.chunkTimeSlice = 3e3;
|
|
58
57
|
}
|
|
59
58
|
get _mimeType() {
|
|
60
|
-
return typeof window > "u" || typeof window.MediaRecorder?.isTypeSupported != "function" ? "" :
|
|
61
|
-
}
|
|
62
|
-
initialize() {
|
|
63
|
-
c.isSupported() && this.addHandles(
|
|
64
|
-
C(
|
|
65
|
-
() => !!this.errorCode,
|
|
66
|
-
() => {
|
|
67
|
-
this._set("state", "error");
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
);
|
|
59
|
+
return typeof window > "u" || typeof window.MediaRecorder?.isTypeSupported != "function" ? "" : T.find((t) => window.MediaRecorder.isTypeSupported(t)) ?? "";
|
|
71
60
|
}
|
|
72
61
|
destroy() {
|
|
73
62
|
this._mediaRecorder && (this._mediaRecorder.onstart = null, this._mediaRecorder.ondataavailable = null, this._mediaRecorder.onerror = null, this._mediaRecorder.onstop = null), this.cancel(), this._mediaRecorder = null;
|
|
@@ -119,7 +108,7 @@ let c = class extends a {
|
|
|
119
108
|
} catch {
|
|
120
109
|
}
|
|
121
110
|
}
|
|
122
|
-
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("errorCode", t);
|
|
111
|
+
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", t);
|
|
123
112
|
}
|
|
124
113
|
_onError() {
|
|
125
114
|
this._failSession("recording-failed");
|
|
@@ -146,7 +135,7 @@ let c = class extends a {
|
|
|
146
135
|
if (await this._awaitPendingChunkOperations(), e !== this._activeSessionId)
|
|
147
136
|
return;
|
|
148
137
|
if (!(i ? new Blob(r, { type: i }) : new Blob(r)).size) {
|
|
149
|
-
this._activeSessionId === e && (this._activeSessionId = null), this._mediaRecorderStopReason = null, this._recordedChunks = [], this._set("errorCode", "recording-failed");
|
|
138
|
+
this._activeSessionId === e && (this._activeSessionId = null), this._mediaRecorderStopReason = null, this._recordedChunks = [], this._set("state", "error"), this._set("errorCode", "recording-failed");
|
|
150
139
|
return;
|
|
151
140
|
}
|
|
152
141
|
this._set("state", "processing"), this._set("transcript", h(`${this.transcript} ${this.liveTranscript}`)), this._set("liveTranscript", ""), this._activeSessionId === e && (this._activeSessionId = null), this._set("state", "idle"), this._set("errorCode", void 0), this._mediaRecorderStopReason = null, this._recordedChunks = [];
|
|
@@ -165,7 +154,7 @@ let c = class extends a {
|
|
|
165
154
|
const s = this._mimeType, i = s ? new window.MediaRecorder(e, { mimeType: s }) : new window.MediaRecorder(e);
|
|
166
155
|
this._mediaStream = e, 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);
|
|
167
156
|
}).catch((e) => {
|
|
168
|
-
t === this._activeSessionId && (this._activeSessionId = null, this._mediaRecorder = null, this._mediaRecorderChunkIndex = 0, this._mediaRecorderStopReason = null, this._pendingChunkOperations.clear(), this._recordedChunks = [], this._releaseMediaStream(), e instanceof DOMException && e.name === "NotAllowedError" ? this._set("errorCode", "not-allowed") : this._set("errorCode", "recording-failed"));
|
|
157
|
+
t === this._activeSessionId && (this._activeSessionId = null, this._mediaRecorder = null, this._mediaRecorderChunkIndex = 0, this._mediaRecorderStopReason = null, this._pendingChunkOperations.clear(), this._recordedChunks = [], this._releaseMediaStream(), e instanceof DOMException && e.name === "NotAllowedError" ? (this._set("state", "error"), this._set("errorCode", "not-allowed")) : (this._set("state", "error"), this._set("errorCode", "recording-failed")));
|
|
169
158
|
});
|
|
170
159
|
}
|
|
171
160
|
stop() {
|
|
@@ -208,8 +197,8 @@ g([
|
|
|
208
197
|
c = g([
|
|
209
198
|
f("MediaRecorderController")
|
|
210
199
|
], c);
|
|
211
|
-
var
|
|
212
|
-
for (var r = i > 1 ? void 0 : i ?
|
|
200
|
+
var M = Object.getOwnPropertyDescriptor, D = (t, e, s, i) => {
|
|
201
|
+
for (var r = i > 1 ? void 0 : i ? M(e, s) : e, n = t.length - 1, o; n >= 0; n--)
|
|
213
202
|
(o = t[n]) && (r = o(r) || r);
|
|
214
203
|
return r;
|
|
215
204
|
};
|
|
@@ -228,14 +217,7 @@ let _ = class extends a {
|
|
|
228
217
|
if (!t)
|
|
229
218
|
return;
|
|
230
219
|
const e = new t();
|
|
231
|
-
e.continuous = !0, e.interimResults = !0, this.language && (e.lang = this.language), e.onstart = this._onStart.bind(this), e.onresult = this._onResult.bind(this), e.onerror = this._onError.bind(this), e.onend = this._onEnd.bind(this), e.onspeechend = this._onSpeechEnd.bind(this), this._recognition = e
|
|
232
|
-
C(
|
|
233
|
-
() => !!this.errorCode,
|
|
234
|
-
() => {
|
|
235
|
-
this._set("state", "error");
|
|
236
|
-
}
|
|
237
|
-
)
|
|
238
|
-
);
|
|
220
|
+
e.continuous = !0, e.interimResults = !0, this.language && (e.lang = this.language), e.onstart = this._onStart.bind(this), e.onresult = this._onResult.bind(this), e.onerror = this._onError.bind(this), e.onend = this._onEnd.bind(this), e.onspeechend = this._onSpeechEnd.bind(this), this._recognition = e;
|
|
239
221
|
}
|
|
240
222
|
destroy() {
|
|
241
223
|
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);
|
|
@@ -268,7 +250,7 @@ let _ = class extends a {
|
|
|
268
250
|
default:
|
|
269
251
|
e = "unhandled";
|
|
270
252
|
}
|
|
271
|
-
this._set("errorCode", e);
|
|
253
|
+
this._set("state", "error"), this._set("errorCode", e);
|
|
272
254
|
}
|
|
273
255
|
// Natural end can arrive before the last interim segment becomes final, so preserve that trailing text.
|
|
274
256
|
_onEnd() {
|
|
@@ -294,7 +276,7 @@ let _ = class extends a {
|
|
|
294
276
|
try {
|
|
295
277
|
this._recognition.start();
|
|
296
278
|
} catch {
|
|
297
|
-
this._set("errorCode", "unhandled");
|
|
279
|
+
this._set("state", "error"), this._set("errorCode", "unhandled");
|
|
298
280
|
}
|
|
299
281
|
}
|
|
300
282
|
stop() {
|
|
@@ -319,7 +301,7 @@ let _ = class extends a {
|
|
|
319
301
|
return !!b();
|
|
320
302
|
}
|
|
321
303
|
};
|
|
322
|
-
_ =
|
|
304
|
+
_ = D([
|
|
323
305
|
f("WebSpeechController")
|
|
324
306
|
], _);
|
|
325
307
|
function m(t) {
|
|
@@ -329,7 +311,7 @@ function m(t) {
|
|
|
329
311
|
const i = e.trim();
|
|
330
312
|
return i ? `${i} ${s}` : s;
|
|
331
313
|
}
|
|
332
|
-
class
|
|
314
|
+
class $ extends y {
|
|
333
315
|
constructor() {
|
|
334
316
|
super(...arguments), this.#e = null, this._resolvedMode = "disabled", this.awaitingResponse = !1, this.inputValue = "", this.mode = "web-speech", this.arcgisVoiceInputDraftChange = d(), this.arcgisVoiceInputError = d(), this.arcgisVoiceInputInterimTranscription = d(), this.arcgisVoiceInputStart = d(), this.arcgisVoiceInputStop = d(), this.arcgisVoiceInputTranscription = d(), this.arcgisVoiceInputTranscriptionStreamChunk = d();
|
|
335
317
|
}
|
|
@@ -337,7 +319,7 @@ class E extends w {
|
|
|
337
319
|
this.properties = { _resolvedMode: 16, _state: 16, _errorCode: 16, _liveTranscript: 16, _transcript: 16, _isButtonDisabled: 16, _buttonLabel: 16, awaitingResponse: 5, inputValue: 1, language: 1, mode: 1 };
|
|
338
320
|
}
|
|
339
321
|
static {
|
|
340
|
-
this.styles =
|
|
322
|
+
this.styles = I;
|
|
341
323
|
}
|
|
342
324
|
#e;
|
|
343
325
|
get _state() {
|
|
@@ -477,12 +459,12 @@ class E extends w {
|
|
|
477
459
|
this._speechController && this._resolvedMode !== "disabled" && this._speechController.cancel(), this.clearDraftSession();
|
|
478
460
|
}
|
|
479
461
|
render() {
|
|
480
|
-
return
|
|
462
|
+
return R`<calcite-button appearance=transparent class="button" data-mode=${this._resolvedMode ?? v} data-state=${(this._resolvedMode === "disabled" ? "disabled" : this._state) ?? v} .disabled=${this._isButtonDisabled} icon-start=microphone kind=neutral .label=${this._buttonLabel} .loading=${this._state === "processing"} round scale=m @click=${() => {
|
|
481
463
|
this._handleToggle();
|
|
482
464
|
}}></calcite-button>`;
|
|
483
465
|
}
|
|
484
466
|
}
|
|
485
|
-
|
|
467
|
+
C("arcgis-assistant-speech-input", $);
|
|
486
468
|
export {
|
|
487
|
-
|
|
469
|
+
$ as ArcgisAssistantSpeechInput
|
|
488
470
|
};
|
|
@@ -1,23 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { c as
|
|
3
|
-
import { css as e, html as
|
|
4
|
-
import { LitElement as
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
import { c as a } from "../../chunks/runtime.js";
|
|
3
|
+
import { css as e, html as t } from "lit";
|
|
4
|
+
import { LitElement as i } from "@arcgis/lumina";
|
|
5
|
+
import { p as r } from "../../chunks/converterUtils.js";
|
|
6
|
+
import { unsafeHTML as s } from "lit/directives/unsafe-html.js";
|
|
7
|
+
const c = e`:host{display:block;min-width:0}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;max-width:100%;min-width:0;margin-left:auto;justify-content:flex-end}.container>div:first-child{min-width:0}.avatar{display:flex;align-items:center;justify-content:center}.content{min-width:0;overflow-wrap:anywhere;>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`;
|
|
8
|
+
class n extends i {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments), this.userAvatarEnabled = !1;
|
|
11
|
+
}
|
|
7
12
|
static {
|
|
8
|
-
this.properties = { content: 1, user: 1, message: 0 };
|
|
13
|
+
this.properties = { content: 1, user: 1, message: 0, userAvatarEnabled: 5 };
|
|
9
14
|
}
|
|
10
15
|
static {
|
|
11
|
-
this.styles =
|
|
16
|
+
this.styles = c;
|
|
12
17
|
}
|
|
13
18
|
_getContent() {
|
|
14
19
|
return this.message?.role === "user" ? this.message.content : this.content;
|
|
15
20
|
}
|
|
16
21
|
render() {
|
|
17
|
-
return
|
|
22
|
+
return t`<div class="container"><div><slot name=content><div class="content">${s(r(this._getContent()))}</div></slot></div>${this.userAvatarEnabled ? t`<slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot>` : null}</div>`;
|
|
18
23
|
}
|
|
19
24
|
}
|
|
20
|
-
|
|
25
|
+
a("arcgis-assistant-user-message", n);
|
|
21
26
|
export {
|
|
22
|
-
|
|
27
|
+
n as ArcgisAssistantUserMessage
|
|
23
28
|
};
|