@arcgis/ai-components 5.0.0-next.137 → 5.0.0-next.139
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/cdn/{AWERJEZY.js → 3FXMITU4.js} +2 -2
- package/dist/cdn/{U3XLNPGW.js → 3QTHBF2F.js} +2 -2
- package/dist/cdn/{EIEL6M2I.js → 42IBUNOA.js} +2 -2
- package/dist/cdn/{4QKLAOX2.js → 5BR5YVZ6.js} +2 -2
- package/dist/cdn/{3MC7WUUS.js → 6JDNCSC3.js} +2 -2
- package/dist/cdn/{PMGGAZSF.js → 6UMV2K64.js} +2 -2
- package/dist/cdn/{PI3TDXYV.js → 72JQRHOG.js} +2 -2
- package/dist/cdn/{77UW5IWK.js → B4GME3XE.js} +2 -2
- package/dist/cdn/BN3XKJOK.js +6 -0
- package/dist/cdn/{ZJXE6HWP.js → CFFB4JKG.js} +2 -2
- package/dist/cdn/{ESFRLW3E.js → CLP7HMEW.js} +2 -2
- package/dist/cdn/{AAKD5SX2.js → D532Z7XU.js} +2 -2
- package/dist/cdn/{3GN2ULHI.js → DBKCPK5I.js} +3 -3
- package/dist/cdn/{KL6UK22M.js → E3XZJC24.js} +2 -2
- package/dist/cdn/{G2D5AXYL.js → GNIBW6BM.js} +2 -2
- package/dist/cdn/{M4G5BT2E.js → GVW52DIA.js} +2 -2
- package/dist/cdn/{KTVRK3Y4.js → HA4E5AC2.js} +2 -2
- package/dist/cdn/{UFFBFDYM.js → HBQRKPCT.js} +2 -2
- package/dist/cdn/{A4WRDZTQ.js → IB7MSLQX.js} +2 -2
- package/dist/cdn/ILSPDWE2.js +4 -0
- package/dist/cdn/{2YU5J7GR.js → IXKVVRW7.js} +1 -1
- package/dist/cdn/{D7BNWOJC.js → JLY2B5AJ.js} +2 -2
- package/dist/cdn/{5R3XBBPI.js → LWPYJABR.js} +2 -2
- package/dist/cdn/{VL7UTIRF.js → LZRFQZSB.js} +1 -1
- package/dist/cdn/{JEJTPF54.js → NSMIL2SL.js} +1 -1
- package/dist/cdn/{FXYXZK6L.js → QS6457MX.js} +2 -2
- package/dist/cdn/{XV373V66.js → RHI6IEK3.js} +2 -2
- package/dist/cdn/{Q5GRZVLA.js → RKR7CXWK.js} +2 -2
- package/dist/cdn/{P5L22JWW.js → RQY4555K.js} +2 -2
- package/dist/cdn/{WD4CZF2P.js → RYLC4RYQ.js} +2 -2
- package/dist/cdn/{XNR7IV6X.js → TFW2C2V3.js} +2 -2
- package/dist/cdn/{ZYYIAOK3.js → TJJX6UKQ.js} +2 -2
- package/dist/cdn/{C2KQ57RK.js → UJTPKXBP.js} +33 -33
- package/dist/cdn/{2X4MXAGP.js → UPQ7HXXV.js} +2 -2
- package/dist/cdn/{BU42TIIY.js → WCFPWMZ6.js} +2 -2
- package/dist/cdn/X5OTOFCC.js +134 -0
- package/dist/cdn/{LV5GG4KG.js → YKVAJ4AV.js} +2 -2
- package/dist/cdn/YQJWHNVD.js +4 -0
- package/dist/cdn/{YFSPJOU4.js → Z5SVRVZN.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/runtime.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/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-card/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-card-content/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-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-filter-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-query-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-shell/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/package.json +7 -7
- package/dist/cdn/7CZJHD5E.js +0 -4
- package/dist/cdn/HRHXMBOF.js +0 -4
- package/dist/cdn/J4W33PXP.js +0 -134
- package/dist/cdn/O5MI43R3.js +0 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e=`## Navigation Agent - Tool Intent Classifier
|
|
5
5
|
|
|
6
6
|
You are an assistant that classifies user intent for navigation agent.
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e=`## LinkChart Agent - Tool Intent Classifier
|
|
5
5
|
|
|
6
6
|
You are an assistant that classifies user intent for linkChart agent.
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.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.
|
|
5
5
|
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.
|
|
6
6
|
The geometry type for this layer is {layerGeometryType}.
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{g as e,h as t,n as i,o,p as r,t as n}from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import{g as e,h as t,n as i,o,p as r,t as n}from"./BN3XKJOK.js";import"./NSMIL2SL.js";export default $arcgis.t(([c,{watch:l}])=>{var g=e`.assistant-chat__messages-container{display:flex;flex:1;flex-direction:column}.assistant-chat__messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-md);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}`,a=class extends r{constructor(){super(...arguments),this.#s=i(),this.loading=!1,this.loadingMessage="",this.messages=new c([])}static{this.properties={loading:5,loadingMessage:1,user:1,messages:0}}static{this.styles=g}#s;firstUpdated(){this._scrollToEnd()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.requestUpdate(),this._scrollToEnd()}),l(()=>this.loading,()=>{this._scrollToEnd()})])}_scrollToEnd(){requestAnimationFrame(()=>{this.#s.value?.scrollIntoView({behavior:"smooth"})})}render(){return t`<div class="assistant-chat__messages-container"><div class="assistant-chat__messages-list"><slot></slot>${this.messages.map(s=>t`<arcgis-assistant-chat-card .type=${s.type} .content=${s.content} .log=${s.log} .error=${s.error} .user=${this.user}></arcgis-assistant-chat-card>`)}${this.loading?t`<arcgis-assistant-chat-card .loading=${this.loading} .loadingMessage=${this.loadingMessage} type=response></arcgis-assistant-chat-card>`:null}</div><div ${o(this.#s)}></div></div>`}};n("arcgis-assistant-chat",a);return a},"core/Collection","core/reactiveUtils")
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as n}from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import{a as n}from"./D532Z7XU.js";import"./IXKVVRW7.js";import{g as a,h as e,k as s,p as l,t as c}from"./BN3XKJOK.js";import"./NSMIL2SL.js";var o=a``,i=class extends l{constructor(){super(...arguments),this.#t=[],this._messages=n({blocking:!0}),this.arcgisCancel=s(),this.arcgisSubmit=s()}static{this.properties={type:1,message:1,options:0}}static{this.styles=o}#t;_renderInterruptOptions(){switch(this.type){case"single-select":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems.map(r=>r.value)}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"boolean-choice":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"text-input":return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${t=>this.#t=t.target.value}></calcite-input>`}}render(){return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${()=>this.arcgisSubmit.emit(this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`}};c("arcgis-assistant-interrupt",i);export{i as ArcgisAssistantInterrupt};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
|
|
5
5
|
|
|
6
6
|
You are an assistant that helps generate layer filter expressions for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{$ as
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import{$ as qe,A as Ie,B as $e,C as Ne,D as ze,E as Re,Eb as B,F as q,G as K,I as P,J as T,K as le,L as ue,M as w,Mb as pe,N as Ue,Nb as me,O as Be,P as E,Pb as j,Q as y,Qb as Q,R as A,Rb as X,S as De,T as He,U as I,V as $,W as We,Wb as d,X as Ge,Xb as Y,Y as x,Yb as C,Z as N,Zb as h,_ as Je,_b as D,aa as z,ba as g,ca as v,da as Ke,ea as Qe,fa as V,ga as Xe,h as oe,ha as Ye,ia as Ze,ja as Le,ka as R,n as Me,o as Pe,p as Te,q as Ve,r as je,s as Ce,t as Oe,u as Fe,v as Se,w as ke,x as Ee,y as M,yb as U,z as Ae}from"./UJTPKXBP.js";import{b as _e}from"./NSMIL2SL.js";export default $arcgis.t(_=>{var it={};_e(it,{AIMessage:()=>w,AIMessageChunk:()=>E,BaseMessage:()=>M,BaseMessageChunk:()=>ze,ChatMessage:()=>y,ChatMessageChunk:()=>A,FunctionMessage:()=>I,FunctionMessageChunk:()=>$,HumanMessage:()=>x,HumanMessageChunk:()=>N,RemoveMessage:()=>z,SystemMessage:()=>g,SystemMessageChunk:()=>v,ToolMessage:()=>P,ToolMessageChunk:()=>T,_isMessageFieldWithRole:()=>Re,_mergeDicts:()=>Ie,_mergeLists:()=>$e,_mergeObj:()=>Ne,_mergeStatus:()=>Ee,coerceMessageLikeToMessage:()=>V,convertToChunk:()=>R,convertToOpenAIImageBlock:()=>Ce,convertToProviderContentBlock:()=>Se,defaultTextSplitter:()=>de,filterMessages:()=>et,getBufferString:()=>Xe,isAIMessage:()=>Ue,isAIMessageChunk:()=>Be,isBase64ContentBlock:()=>Te,isBaseMessage:()=>q,isBaseMessageChunk:()=>K,isChatMessage:()=>De,isChatMessageChunk:()=>He,isDataContentBlock:()=>Me,isFunctionMessage:()=>We,isFunctionMessageChunk:()=>Ge,isHumanMessage:()=>Je,isHumanMessageChunk:()=>qe,isIDContentBlock:()=>je,isOpenAIToolCallArray:()=>Ae,isPlainTextContentBlock:()=>Ve,isSystemMessage:()=>Ke,isSystemMessageChunk:()=>Qe,isToolMessage:()=>le,isToolMessageChunk:()=>ue,isURLContentBlock:()=>Pe,mapChatMessagesToStoredMessages:()=>Le,mapStoredMessageToChatMessage:()=>Ye,mapStoredMessagesToChatMessages:()=>Ze,mergeContent:()=>ke,mergeMessageRuns:()=>tt,parseBase64DataUrl:()=>Fe,parseMimeType:()=>Oe,trimMessages:()=>rt});var H=(i,e)=>{let t=[...new Set(e?.map(r=>{if(typeof r=="string")return r;let s=new r({});if(!("getType"in s)||typeof s.getType!="function")throw new Error("Invalid type provided.");return s.getType()}))],a=i.getType();return t.some(r=>r===a)};function et(i,e){return Array.isArray(i)?ce(i,e):B.from(t=>ce(t,i))}function ce(i,e={}){let{includeNames:t,excludeNames:a,includeTypes:r,excludeTypes:s,includeIds:o,excludeIds:n}=e,u=[];for(let l of i)if(!(a&&l.name&&a.includes(l.name))){{if(s&&H(l,s))continue;if(n&&l.id&&n.includes(l.id))continue}r||o||t?(t&&l.name&&t.some(p=>p===l.name)||r&&H(l,r)||o&&l.id&&o.some(p=>p===l.id))&&u.push(l):u.push(l)}return u}function tt(i){return Array.isArray(i)?fe(i):B.from(fe)}function fe(i){if(!i.length)return[];let e=[];for(let t of i){let a=t,r=e.pop();if(!r)e.push(a);else if(a.getType()==="tool"||a.getType()!==r.getType())e.push(r,a);else{let s=R(r),o=R(a),n=s.concat(o);typeof s.content=="string"&&typeof o.content=="string"&&(n.content=`${s.content}
|
|
5
5
|
${o.content}`),e.push(st(n))}}return e}function rt(i,e){if(Array.isArray(i)){let t=i;if(!e)throw new Error("Options parameter is required when providing messages.");return he(t,e)}else{let t=i;return B.from(a=>he(a,t)).withConfig({runName:"trim_messages"})}}async function he(i,e){let{maxTokens:t,tokenCounter:a,strategy:r="last",allowPartial:s=!1,endOn:o,startOn:n,includeSystem:u=!1,textSplitter:l}=e;if(n&&r==="first")throw new Error("`startOn` should only be specified if `strategy` is 'last'.");if(u&&r==="first")throw new Error("`includeSystem` should only be specified if `strategy` is 'last'.");let p;"getNumTokens"in a?p=async m=>(await Promise.all(m.map(b=>a.getNumTokens(b.content)))).reduce((b,J)=>b+J,0):p=async m=>a(m);let c=de;if(l&&("splitText"in l?c=l.splitText:c=async m=>l(m)),r==="first")return ge(i,{maxTokens:t,tokenCounter:p,textSplitter:c,partialStrategy:s?"first":void 0,endOn:o});if(r==="last")return at(i,{maxTokens:t,tokenCounter:p,textSplitter:c,allowPartial:s,includeSystem:u,startOn:n,endOn:o});throw new Error(`Unrecognized strategy: '${r}'. Must be one of 'first' or 'last'.`)}async function ge(i,e){let{maxTokens:t,tokenCounter:a,textSplitter:r,partialStrategy:s,endOn:o}=e,n=[...i],u=0;for(let l=0;l<n.length;l+=1){let p=l>0?n.slice(0,-l):n;if(await a(p)<=t){u=n.length-l;break}}if(u<n.length&&s){let l=!1;if(Array.isArray(n[u].content)){let p=n[u];if(typeof p.content=="string")throw new Error("Expected content to be an array.");let c=p.content.length,m=s==="last"?[...p.content].reverse():p.content;for(let f=1;f<=c;f+=1){let b=s==="first"?m.slice(0,f):m.slice(-f),J=Object.fromEntries(Object.entries(p).filter(([ne])=>ne!=="type"&&!ne.startsWith("lc_"))),ve=Z(p.getType(),{...J,content:b}),ie=[...n.slice(0,u),ve];if(await a(ie)<=t)n=ie,u+=1,l=!0;else break}l&&s==="last"&&(p.content=[...m].reverse())}if(!l){let p=n[u],c;if(Array.isArray(p.content)&&p.content.some(m=>typeof m=="string"||m.type==="text")?c=p.content.find(f=>f.type==="text"&&f.text)?.text:typeof p.content=="string"&&(c=p.content),c){let m=await r(c),f=m.length;s==="last"&&m.reverse();for(let b=0;b<f-1;b+=1)if(m.pop(),p.content=m.join(""),await a([...n.slice(0,u),p])<=t){s==="last"&&(p.content=[...m].reverse().join("")),n=[...n.slice(0,u),p],u+=1;break}}}}if(o){let l=Array.isArray(o)?o:[o];for(;u>0&&!H(n[u-1],l);)u-=1}return n.slice(0,u)}async function at(i,e){let{allowPartial:t=!1,includeSystem:a=!1,endOn:r,startOn:s,...o}=e,n=i.map(p=>{let c=Object.fromEntries(Object.entries(p).filter(([m])=>m!=="type"&&!m.startsWith("lc_")));return Z(p.getType(),c,K(p))});if(r){let p=Array.isArray(r)?r:[r];for(;n.length>0&&!H(n[n.length-1],p);)n=n.slice(0,-1)}let u=a&&n[0]?.getType()==="system",l=u?n.slice(0,1).concat(n.slice(1).reverse()):n.reverse();return l=await ge(l,{...o,partialStrategy:t?"last":void 0,endOn:s}),u?[l[0],...l.slice(1).reverse()]:l.reverse()}var be={human:{message:x,messageChunk:N},ai:{message:w,messageChunk:E},system:{message:g,messageChunk:v},developer:{message:g,messageChunk:v},tool:{message:P,messageChunk:T},function:{message:I,messageChunk:$},generic:{message:y,messageChunk:A},remove:{message:z,messageChunk:z}};function Z(i,e,t){let a,r;switch(i){case"human":t?a=new N(e):r=new x(e);break;case"ai":if(t){let s={...e};"tool_calls"in s&&(s={...s,tool_call_chunks:s.tool_calls?.map(o=>({...o,type:"tool_call_chunk",index:void 0,args:JSON.stringify(o.args)}))}),a=new E(s)}else r=new w(e);break;case"system":t?a=new v(e):r=new g(e);break;case"developer":t?a=new v({...e,additional_kwargs:{...e.additional_kwargs,__openai_role__:"developer"}}):r=new g({...e,additional_kwargs:{...e.additional_kwargs,__openai_role__:"developer"}});break;case"tool":if("tool_call_id"in e)t?a=new T(e):r=new P(e);else throw new Error("Can not convert ToolMessage to ToolMessageChunk if 'tool_call_id' field is not defined.");break;case"function":if(t)a=new $(e);else{if(!e.name)throw new Error("FunctionMessage must have a 'name' field");r=new I(e)}break;case"generic":if("role"in e)t?a=new A(e):r=new y(e);else throw new Error("Can not convert ChatMessage to ChatMessageChunk if 'role' field is not defined.");break;default:throw new Error(`Unrecognized message type ${i}`)}if(t&&a)return a;if(r)return r;throw new Error(`Unrecognized message type ${i}`)}function st(i){let e=i.getType(),t,a=Object.fromEntries(Object.entries(i).filter(([r])=>!["type","tool_call_chunks"].includes(r)&&!r.startsWith("lc_")));if(e in be&&(t=Z(e,a)),!t)throw new Error(`Unrecognized message chunk class ${e}. Supported classes are ${Object.keys(be)}`);return t}function de(i){let e=i.split(`
|
|
6
6
|
`);return Promise.resolve([...e.slice(0,-1).map(t=>`${t}
|
|
7
7
|
`),e[e.length-1]])}var _=class i extends D{static lc_name(){return"ImagePromptTemplate"}constructor(e){if(super(e),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","image"]}),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:"f-string"}),Object.defineProperty(this,"validateTemplate",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"additionalContentFields",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.template=e.template,this.templateFormat=e.templateFormat??this.templateFormat,this.validateTemplate=e.validateTemplate??this.validateTemplate,this.additionalContentFields=e.additionalContentFields,this.validateTemplate){let t=this.inputVariables;this.partialVariables&&(t=t.concat(Object.keys(this.partialVariables))),C([{type:"image_url",image_url:this.template}],this.templateFormat,t)}}_getPromptType(){return"prompt"}async partial(e){let t=this.inputVariables.filter(s=>!(s in e)),a={...this.partialVariables??{},...e},r={...this,inputVariables:t,partialVariables:a};return new i(r)}async format(e){let t={};for(let[o,n]of Object.entries(this.template))typeof n=="string"?t[o]=d(n,this.templateFormat,e):t[o]=n;let a=e.url||t.url,r=e.detail||t.detail;if(!a)throw new Error("Must provide either an image URL.");if(typeof a!="string")throw new Error("url must be a string.");let s={url:a};return r&&(s.detail=r),s}async formatPromptValue(e){let t=await this.format(e);return new me(t)}};var O=class extends U{static lc_name(){return"DictPromptTemplate"}constructor(e){let t=e.templateFormat??"f-string",a=L(e.template,t);super({inputVariables:a,...e}),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","dict"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"template",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"templateFormat",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"inputVariables",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.template=e.template,this.templateFormat=t,this.inputVariables=a}async format(e){return ee(this.template,e,this.templateFormat)}async invoke(e){return await this._callWithConfig(this.format.bind(this),e,{runType:"prompt"})}};function L(i,e){let t=[];for(let a of Object.values(i))if(typeof a=="string")Y(a,e).forEach(r=>{r.type==="variable"&&t.push(r.name)});else if(Array.isArray(a))for(let r of a)typeof r=="string"?Y(r,e).forEach(s=>{s.type==="variable"&&t.push(s.name)}):typeof r=="object"&&t.push(...L(r,e));else typeof a=="object"&&a!==null&&t.push(...L(a,e));return Array.from(new Set(t))}function ee(i,e,t){let a={};for(let[r,s]of Object.entries(i))if(typeof s=="string")a[r]=d(s,t,e);else if(Array.isArray(s)){let o=[];for(let n of s)typeof n=="string"?o.push(d(n,t,e)):typeof n=="object"&&o.push(ee(n,e,t));a[r]=o}else typeof s=="object"&&s!==null?a[r]=ee(s,e,t):a[r]=s;return a}var F=class extends U{constructor(){super(...arguments),Object.defineProperty(this,"lc_namespace",{enumerable:!0,configurable:!0,writable:!0,value:["langchain_core","prompts","chat"]}),Object.defineProperty(this,"lc_serializable",{enumerable:!0,configurable:!0,writable:!0,value:!0})}async invoke(e,t){return this._callWithConfig(a=>this.formatMessages(a),e,{...t,runType:"prompt"})}},W=class extends F{static lc_name(){return"MessagesPlaceholder"}constructor(e){typeof e=="string"&&(e={variableName:e}),super(e),Object.defineProperty(this,"variableName",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"optional",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),this.variableName=e.variableName,this.optional=e.optional??!1}get inputVariables(){return[this.variableName]}async formatMessages(e){let t=e[this.variableName];if(this.optional&&!t)return[];if(!t){let r=new Error(`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages as an input value. Received: undefined`);throw r.name="InputFormatError",r}let a;try{Array.isArray(t)?a=t.map(V):a=[V(t)]}catch(r){let s=typeof t=="string"?t:JSON.stringify(t,null,2),o=new Error([`Field "${this.variableName}" in prompt uses a MessagesPlaceholder, which expects an array of BaseMessages or coerceable values as input.`,`Received value: ${s}`,`Additional message: ${r.message}`].join(`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e=`# Navigation Tool Instructions
|
|
5
5
|
|
|
6
6
|
CRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.
|
|
7
7
|
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,yt=Symbol(),Rt=new WeakMap,k=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==yt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=Rt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&Rt.set(e,t))}return t}toString(){return this.cssText}},Mt=o=>new k(typeof o=="string"?o:o+"",void 0,yt),ge=(o,...t)=>{let e=o.length===1?o[0]:t.reduce(((s,r,i)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+o[i+1]),o[0]);return new k(e,o,yt)},It=(o,t)=>{if(Z)o.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),r=Y.litNonce;r!==void 0&&s.setAttribute("nonce",r),s.textContent=e.cssText,o.appendChild(s)}},gt=Z?o=>o:o=>o instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return Mt(e)})(o):o;var{is:ve,defineProperty:Ee,getOwnPropertyDescriptor:$e,getOwnPropertyNames:be,getOwnPropertySymbols:_e,getPrototypeOf:Ae}=Object,tt=globalThis,kt=tt.trustedTypes,Ce=kt?kt.emptyScript:"",we=tt.reactiveElementPolyfillSupport,j=(o,t)=>o,X={toAttribute(o,t){switch(t){case Boolean:o=o?Ce:null;break;case Object:case Array:o=o==null?o:JSON.stringify(o)}return o},fromAttribute(o,t){let e=o;switch(t){case Boolean:e=o!==null;break;case Number:e=o===null?null:Number(o);break;case Object:case Array:try{e=JSON.parse(o)}catch{e=null}}return e}},H=(o,t)=>!ve(o,t),jt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:H};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=jt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),r=this.getPropertyDescriptor(t,s,e);r!==void 0&&Ee(this.prototype,t,r)}}static getPropertyDescriptor(t,e,s){let{get:r,set:i}=$e(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:r,set(n){let a=r?.call(this);i?.call(this,n),this.requestUpdate(t,a,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??jt}static _$Ei(){if(this.hasOwnProperty(j("elementProperties")))return;let t=Ae(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(j("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(j("properties"))){let e=this.properties,s=[...be(e),..._e(e)];for(let r of s)this.createProperty(r,e[r])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,r]of e)this.elementProperties.set(s,r)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let r=this._$Eu(e,s);r!==void 0&&this._$Eh.set(r,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let r of s)e.unshift(gt(r))}else t!==void 0&&e.push(gt(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return It(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),r=this.constructor._$Eu(t,s);if(r!==void 0&&s.reflect===!0){let i=(s.converter?.toAttribute!==void 0?s.converter:X).toAttribute(e,s.type);this._$Em=t,i==null?this.removeAttribute(r):this.setAttribute(r,i),this._$Em=null}}_$AK(t,e){let s=this.constructor,r=s._$Eh.get(t);if(r!==void 0&&this._$Em!==r){let i=s.getPropertyOptions(r),n=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:X;this._$Em=r,this[r]=n.fromAttribute(e,i.type)??this._$Ej?.get(r)??null,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let r=this.constructor,i=this[t];if(s??=r.getPropertyOptions(t),!((s.hasChanged??H)(i,e)||s.useDefault&&s.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:r,wrapped:i},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),i!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),r===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[r,i]of this._$Ep)this[r]=i;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[r,i]of s){let{wrapped:n}=i,a=this[r];n!==!0||this._$AL.has(r)||a===void 0||this.C(r,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[j("elementProperties")]=new Map,_[j("finalized")]=new Map,we?.({ReactiveElement:_}),(tt.reactiveElementVersions??=[]).push("2.1.0");var Et=globalThis,et=Et.trustedTypes,Ht=et?et.createPolicy("lit-html",{createHTML:o=>o}):void 0,$t="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,bt="?"+A,Oe=`<${bt}>`,T=document,z=()=>T.createComment(""),B=o=>o===null||typeof o!="object"&&typeof o!="function",_t=Array.isArray,qt=o=>_t(o)||typeof o?.[Symbol.iterator]=="function",vt=`[
|
|
5
|
+
\f\r]`,V=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Vt=/-->/g,zt=/>/g,w=RegExp(`>|${vt}(?:([^\\s"'>=/]+)(${vt}*=${vt}*(?:[^
|
|
6
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Bt=/'/g,Wt=/"/g,Gt=/^(?:script|style|textarea|title)$/i,At=o=>(t,...e)=>({_$litType$:o,strings:t,values:e}),ls=At(1),hs=At(2),ds=At(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Ft=new WeakMap,O=T.createTreeWalker(T,129);function Kt(o,t){if(!_t(o)||!o.hasOwnProperty("raw"))throw Error("invalid template strings array");return Ht!==void 0?Ht.createHTML(t):t}var Qt=(o,t)=>{let e=o.length-1,s=[],r,i=t===2?"<svg>":t===3?"<math>":"",n=V;for(let a=0;a<e;a++){let c=o[a],h,u,l=-1,y=0;for(;y<c.length&&(n.lastIndex=y,u=n.exec(c),u!==null);)y=n.lastIndex,n===V?u[1]==="!--"?n=Vt:u[1]!==void 0?n=zt:u[2]!==void 0?(Gt.test(u[2])&&(r=RegExp("</"+u[2],"g")),n=w):u[3]!==void 0&&(n=w):n===w?u[0]===">"?(n=r??V,l=-1):u[1]===void 0?l=-2:(l=n.lastIndex-u[2].length,h=u[1],n=u[3]===void 0?w:u[3]==='"'?Wt:Bt):n===Wt||n===Bt?n=w:n===Vt||n===zt?n=V:(n=w,r=void 0);let g=n===w&&o[a+1].startsWith("/>")?" ":"";i+=n===V?c+Oe:l>=0?(s.push(h),c.slice(0,l)+$t+c.slice(l)+A+g):c+A+(l===-2?a:g)}return[Kt(o,i+(o[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},W=class o{constructor({strings:t,_$litType$:e},s){let r;this.parts=[];let i=0,n=0,a=t.length-1,c=this.parts,[h,u]=Qt(t,e);if(this.el=o.createElement(h,s),O.currentNode=this.el.content,e===2||e===3){let l=this.el.content.firstChild;l.replaceWith(...l.childNodes)}for(;(r=O.nextNode())!==null&&c.length<a;){if(r.nodeType===1){if(r.hasAttributes())for(let l of r.getAttributeNames())if(l.endsWith($t)){let y=u[n++],g=r.getAttribute(l).split(A),C=/([.?@])?(.*)/.exec(y);c.push({type:1,index:i,name:C[2],strings:g,ctor:C[1]==="."?ot:C[1]==="?"?rt:C[1]==="@"?it:P}),r.removeAttribute(l)}else l.startsWith(A)&&(c.push({type:6,index:i}),r.removeAttribute(l));if(Gt.test(r.tagName)){let l=r.textContent.split(A),y=l.length-1;if(y>0){r.textContent=et?et.emptyScript:"";for(let g=0;g<y;g++)r.append(l[g],z()),O.nextNode(),c.push({type:2,index:++i});r.append(l[y],z())}}}else if(r.nodeType===8)if(r.data===bt)c.push({type:2,index:i});else{let l=-1;for(;(l=r.data.indexOf(A,l+1))!==-1;)c.push({type:7,index:i}),l+=A.length-1}i++}}static createElement(t,e){let s=T.createElement("template");return s.innerHTML=t,s}};function S(o,t,e=o,s){if(t===f)return t;let r=s!==void 0?e._$Co?.[s]:e._$Cl,i=B(t)?void 0:t._$litDirective$;return r?.constructor!==i&&(r?._$AO?.(!1),i===void 0?r=void 0:(r=new i(o),r._$AT(o,e,s)),s!==void 0?(e._$Co??=[])[s]=r:e._$Cl=r),r!==void 0&&(t=S(o,r._$AS(o,t.values),r,s)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,r=(t?.creationScope??T).importNode(e,!0);O.currentNode=r;let i=O.nextNode(),n=0,a=0,c=s[0];for(;c!==void 0;){if(n===c.index){let h;c.type===2?h=new U(i,i.nextSibling,this,t):c.type===1?h=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(h=new nt(i,this,t)),this._$AV.push(h),c=s[++a]}n!==c?.index&&(i=O.nextNode(),n++)}return O.currentNode=T,r}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},U=class o{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,r){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),B(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&B(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,r=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=W.createElement(Kt(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===r)this._$AH.p(e);else{let i=new st(r,this),n=i.u(this.options);i.p(e),this.T(n),this._$AH=i}}_$AC(t){let e=Ft.get(t.strings);return e===void 0&&Ft.set(t.strings,e=new W(t)),e}k(t){_t(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,r=0;for(let i of t)r===e.length?e.push(s=new o(this.O(z()),this.O(z()),this,this.options)):s=e[r],s._$AI(i),r++;r<e.length&&(this._$AR(s&&s._$AB.nextSibling,r),e.length=r)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t&&t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,r,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=r,this.options=i,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,r){let i=this.strings,n=!1;if(i===void 0)t=S(this,t,e,0),n=!B(t)||t!==this._$AH&&t!==f,n&&(this._$AH=t);else{let a=t,c,h;for(t=i[0],c=0;c<i.length-1;c++)h=S(this,a[s+c],e,c),h===f&&(h=this._$AH[c]),n||=!B(h)||h!==this._$AH[c],h===d?t=d:t!==d&&(t+=(h??"")+i[c+1]),this._$AH[c]=h}n&&!r&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},rt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},it=class extends P{constructor(t,e,s,r,i){super(t,e,s,r,i),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let s=this._$AH,r=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,i=t!==d&&(s===d||r);r&&this.element.removeEventListener(this.name,this,s),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},nt=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Jt={M:$t,P:A,A:bt,C:1,L:Qt,R:st,D:qt,V:S,I:U,H:P,N:rt,U:it,B:ot,F:nt},Te=Et.litHtmlPolyfillSupport;Te?.(W,U),(Et.litHtmlVersions??=[]).push("3.3.0");var Ct=(o,t,e)=>{let s=e?.renderBefore??t,r=s._$litPart$;if(r===void 0){let i=e?.renderBefore??null;s._$litPart$=r=new U(t.insertBefore(z(),i),i,void 0,e??{})}return r._$AI(o),r};var wt=globalThis,$=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=Ct(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};$._$litElement$=!0,$.finalized=!0,wt.litElementHydrateSupport?.({LitElement:$});var Se=wt.litElementPolyfillSupport;Se?.({LitElement:$});(wt.litElementVersions??=[]).push("4.2.0");var p=(o,t,...e)=>{try{return o?.call(t,...e)}catch(s){console.error(s,o)}},F=async(o,t,...e)=>{try{return await o?.call(t,...e)}catch(s){console.error(s,o)}};var G=Symbol.for("controller"),Pe=o=>typeof o=="object"&&o!==null&&(G in o||"hostConnected"in o||"hostDisconnected"in o||"hostUpdate"in o||"hostUpdated"in o),ws=o=>typeof o?.then=="function";var q,x=o=>{q!==o&&(q=o,queueMicrotask(()=>q===o?q=void 0:0))},K=o=>q,N=[],Yt=o=>{if(o===void 0){N=[];return}let t=N.indexOf(o);N=t===-1?[...N,o]:N.slice(0,t+1),queueMicrotask(()=>N=[])},Zt=()=>N,R,Os=o=>{R!==o&&(R=o,queueMicrotask(()=>R===o?R=void 0:0))},Ne=()=>{let o=R;return R=void 0,o},Xt=async(o,t)=>{let e=ct(o);if(e===void 0)return o;if(await e.ready,typeof t=="function"){let s=e.watchExports(r=>t(r,s))}return e.exports},te=async o=>{let t=ct(o);return await t.ready,t},ct=o=>{let e=K().manager.X(o);if(e!==void 0)return e;if(Pe(o))return o;let s=Ne();if(s!==void 0)return s},at=!1,Ts=o=>{at=!0;try{return o()}finally{at=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}},ee=(o,t)=>{let e=t>xe?De:t/Le,s=0,r=setInterval(()=>{s+=e,s>=t&&(clearInterval(r),o())},e);return r},xe=4e3,De=2e3,Le=4;var se=new Set,oe;var re=o=>typeof o=="string"?o:"el"in o?o.el.localName:"localName"in o?o.localName:o.declaredClass,Ns=(o,t,e,s)=>{let r=re(t);if(s?.once){let n=`${o}${r}${e}`;if(se.has(n))return;se.add(n)}let i;if(s?.detail){i={};for(let[n,a]of Object.entries(s.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(i,n,{get(){return c.deref()}})}else i[n]=a;oe?.log.interceptors?.forEach(n=>n(o,r,e,i)),console[o](`[${r}]: ${e}`,i)}else oe?.log.interceptors?.forEach(n=>n(o,r,e)),console[o](`[${r}]: ${e}`)},ie=o=>{let t=`[${re(o)}] `;return e=>{let s=e instanceof Error&&e.message?e:new Error(String(e));s.message=`${t}${s.message}`,setTimeout(()=>{throw e})}};var Ue=(o,t,e)=>{let s=Object.keys(o),r=s.length;M===void 0&&queueMicrotask(I),M??=new Map;let i=M.get(o);return i===void 0&&(i={callbacks:[],keyCount:r},M.set(o,i)),i.keyCount!==r&&(i.callbacks.forEach(n=>n(s)),i.callbacks=[],i.keyCount=r),i.callbacks.push(n=>{let a=h=>p(t,null,h),c=n[r];c===void 0?a(void 0):o[c]===e?a(c):a(void 0)}),e},M,I=()=>{M?.forEach(({callbacks:o},t)=>{let e=Object.keys(t);o.forEach(s=>s(e))}),M=void 0},Re=(o,t,e)=>{let s=o.manager;return s.V!==d&&s.V!==e&&s.S(void 0,void 0),s.T.length===0&&queueMicrotask(()=>s.S(void 0,void 0)),s.V=e,s.T.push((r,i)=>p(t,void 0,e===i?r:void 0)),e},Me=(o=[K(),...Zt()],t,e)=>{let s=Array.isArray(o)?o:[o],r=s.length+1,i=n=>{r-=1,n!==void 0&&(r=Math.min(r,0)),r===0&&t(n)};s.forEach(n=>Ue(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!1}),e));for(let n of s)if("manager"in n&&n.manager.component===n){Re(n,a=>i(a===void 0?void 0:{key:a,host:n,isReactive:!0}),e);break}return e},Ie=(o="",t={},e=K())=>{let s={emit:r=>{o===""&&I();let i=new CustomEvent(o,{detail:r,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return o===""&&Me(void 0,r=>o=r.key,s),s},ke=Ie.bind(null,""),ce;ce=G;var Ot=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#r=[],this.#i=[],this.#c=[],this.#l=[],this.#p=[],this.#h=[],this.#d=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[ce]=!0,this.#a=[];let e=this,s=t??K(new.target.name);e.#o=s,e.ready=e.P.promise,e.#n=ae(e),e.component=s,e.#o.addController(e),e.#o.manager===void 0||(Yt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#r;#i;#c;#l;#p;#h;#d;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#d&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(ie(this.#o))}#n;get exports(){return this.#n}set exports(t){let e=this.#n;e!==t&&(this.#n=t,this.#a.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#n=e?ae(t):t,this.#a.forEach(p)}#a;watchExports(t){let e=()=>t(this.#n);return this.#a.push(e),()=>void this.#a.splice(this.#a.indexOf(e),1)}get use(){return x(this.#o),Xt}get useRef(){return x(this.#o),te}get useRefSync(){return x(this.#o),ct}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#r.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#p.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#h.forEach(p),t.#h=[]}async triggerLoad(){if(this.#d)return;this.#d=!0;let t=this;t.hostLoad&&await F(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(F)),this.P.resolve(this.#n)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#r.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(ne,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(ne,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#p.forEach(this.#u,this)}#u(t){x(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(r=>{typeof r=="function"?this.#h.push(r):typeof r=="object"&&typeof r.remove=="function"&&this.#h.push(r.remove)})}};function ne(o){p(o,void 0,this)}var le=Ot,ae=o=>{if(typeof o!="object"&&typeof o!="function"||o===null)return o;let t={get(s,r,i){if(!((r==="exports"||r==="_exports")&&r in s&&s[r]===e)&&(r in s||r in Promise.prototype||typeof r=="symbol"))return typeof s=="function"?s[r]:Reflect.get(s,r,i)}},e=new Proxy(o,t);return e};var{I:Hs}=Jt;var lt=o=>o.strings===void 0;var je={},he=(o,t=je)=>o._$AH=t;var m={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},E=o=>(...t)=>({_$litDirective$:o,values:t}),v=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Q=(o,t)=>{let e=o._$AN;if(e===void 0)return!1;for(let s of e)s._$AO?.(t,!1),Q(s,t);return!0},ht=o=>{let t,e;do{if((t=o._$AM)===void 0)break;e=t._$AN,e.delete(o),o=t}while(e?.size===0)},de=o=>{for(let t;t=o._$AM;o=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(o))break;e.add(o),ze(t)}};function He(o){this._$AN!==void 0?(ht(this),this._$AM=o,de(this)):this._$AM=o}function Ve(o,t=!1,e=0){let s=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(t)if(Array.isArray(s))for(let i=e;i<s.length;i++)Q(s[i],!1),ht(s[i]);else s!=null&&(Q(s,!1),ht(s));else Q(this,o)}var ze=o=>{o.type==m.CHILD&&(o._$AP??=Ve,o._$AQ??=He)},dt=class extends v{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,s){super._$AT(t,e,s),de(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(Q(this,t),ht(this))}setValue(t){if(lt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var Js=()=>new St,St=class{},Tt=new WeakMap,Pt=E(class extends dt{render(o){return d}update(o,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=o.options?.host,this.rt(this.ct=o.element)),d}rt(o){if(this.isConnected||(o=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Tt.get(t);e===void 0&&(e=new WeakMap,Tt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,o),o!==void 0&&this.G.call(this.ht,o)}else this.G.value=o}get lt(){return typeof this.G=="function"?Tt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var pt=o=>o.replace(We,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),We=/[A-Z]+(?![a-z])|[A-Z]/gu;var lo="randomUUID"in crypto;var xt=o=>{let t=o;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(o),(e.I??e._postLoad).promise}return!1},Dt={};function Lt(){}var Fe=(o,t)=>function(s,r){if(!globalThis.customElements)return;let n=(r??s??{}).resourcesUrl;n&&o.setAssetPath(n);for(let[a,[c,h=""]]of Object.entries(t)){if(customElements.get(a))continue;let[u,l,y]=h.split(";"),g=u?u?.split(",").map(qe):void 0,C=g?.map(([L])=>L),D=class extends Nt{static{this.observedAttributes=g?.map(([,L])=>L).filter(L=>L!=="")}static{this.C=C}static{this.E=l?l?.split(","):void 0}static{this.D=y?.split(",")}static{this.L=a}static{this.K=o}constructor(){!D.B&&(D.B=c(),D.F()),super()}};customElements.define(a,D)}},ut=Object.defineProperty,qe=o=>{let t=o.split(":");return t.length===1?[t[0],pt(t[0])]:t},Ge=globalThis.HTMLElement??Lt,Nt=class extends Ge{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(s=>{Object.hasOwn(t,s)&&(t.#e[s]=t[s],delete t[s])}),e.A?t.#r({a:e.A}):e.B.then(async s=>{await e.K.p,t.#r(await(s.default?.then(r=>typeof r=="function"?{a:r}:r)??s))}).catch(s=>{t.H.reject(s),setTimeout(()=>{throw s})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ut(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ut(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ut(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,s){this.#t?.attributeChangedCallback(t,e,s),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=xt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#r(t){let e=this.constructor,s=e.L,r=this.#e,i=Object.values(t).find(l=>l.L===s),n=`${s}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);Qe(a),!e.A&&(e.A=i,customElements.define(n,i)),i.N=this;let h=document.createElement(n);i.N=void 0,this.#t=h,this.#e=h,this.#s.forEach(l=>h.attributeChangedCallback(l,null,this.getAttribute(l))),Object.entries(r).forEach(Ke,h);let u=this.isConnected;(u||this.G)&&(h.connectedCallback?.(),u||h.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function Ke([o,t]){this[o]=t}var Qe=o=>{let t=o.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(r,i){e.setAttribute.call(this.el,r,i)},t.removeAttribute=function(r){e.removeAttribute.call(this.el,r)},ut(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var ft=class extends le{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=mt in t&&typeof t.destroy=="function",$.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${mt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>void this.#e.destroy();this.#t=ee(t,Je)}}S(t,e){let s=this.T;this.V=d,this.T=[],s.forEach(r=>r(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},Je=1e3,mt="autoDestroyDisabled";var ue=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="class"||o.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(o){return" "+Object.keys(o).filter((t=>o[t])).join(" ")+" "}update(o,[t]){if(this.st===void 0){this.st=new Set,o.strings!==void 0&&(this.nt=new Set(o.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=o.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let r=!!t[s];r===this.st.has(s)||this.nt?.has(s)||(r?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return f}});var fe="important",Ye=" !"+fe,Ze=E(class extends v{constructor(o){if(super(o),o.type!==m.ATTRIBUTE||o.name!=="style"||o.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(o){return Object.keys(o).reduce(((t,e)=>{let s=o[e];return s==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${s};`}),"")}update(o,[t]){let{style:e}=o.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let s of this.ft)t[s]==null&&(this.ft.delete(s),s.includes("-")?e.removeProperty(s):e[s]=null);for(let s in t){let r=t[s];if(r!=null){this.ft.add(s);let i=typeof r=="string"&&r.endsWith(Ye);s.includes("-")||i?e.setProperty(s,i?r.slice(0,-11):r,i?fe:""):e[s]=r}}return f}});var Xe=E(class extends v{constructor(o){if(super(o),o.type!==m.PROPERTY&&o.type!==m.ATTRIBUTE&&o.type!==m.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!lt(o))throw Error("`live` bindings can only contain a single expression")}render(o){return o}update(o,[t]){if(t===f||t===d)return t;let e=o.element,s=o.name;if(o.type===m.PROPERTY){if(t===e[s])return f}else if(o.type===m.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(s))return f}else if(o.type===m.ATTRIBUTE&&e.getAttribute(s)===t+"")return f;return he(o),t}});var me=class o extends ${constructor(){super(),this.M=[],this.manager=new ft(this);let t=this,e=t.constructor,s=e.N,r=e.K.o,i=o.prototype.shouldUpdate;t.#r=s?.H??new b,t.I=s?.I??new b,t.J=s?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=s??t,t.#s=t.enableUpdating,t.enableUpdating=Lt,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),r&&(t.#t=new Map,e.elementProperties.forEach((n,a)=>t.#t.set(a,r()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),s=this.shadowRootOptions===Dt;return this.K?.commonStyles===void 0||s?e:[this.K.commonStyles,...e]}static createProperty(t,e){let s=typeof e=="number"?e:Array.isArray(e)?e[0]:0,r=Array.isArray(e)?e[1]:void 0,i=r?.hasChanged??H,n={attribute:s&1&&typeof t=="string"?pt(t):!1,reflect:!!(s&2),type:s&4?Boolean:s&8?Number:void 0,state:!!(s&16),readOnly:!!(s&32),noAccessor:!!(s&64),c:!1,...r,hasChanged(a,c){let h=i(a,c);return n.c=h,h}};super.createProperty(t,n)}static getPropertyDescriptor(t,e,s){let r=this.K,i=super.getPropertyDescriptor(t,e,s);return s.d=i,{...i,get(){return r.t?.(this.#t.get(t)),i.get?.call(this)},set(n){let a=this.manager;if(s.readOnly&&!at&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${n}"`);i.set.call(this,n??void 0),s.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,n))}}}static{this.lumina=!0}#t;#e;#s;#r;#i;connectedCallback(){if(this.el.hasAttribute("defer-hydration"))return;let t=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=t;let e=!this.manager.connectedCalled;super.connectedCallback(),e?queueMicrotask(()=>this.#l().catch(s=>{this.#r.reject(s),setTimeout(()=>{throw s})})):t&&this.requestUpdate()}#c(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,s=e.shadowRootOptions,i=t??(s===Dt?this.el:this.el.attachShadow(s));if(this.isConnected){let n=i.getRootNode();n.adoptedStyleSheets=[...n.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#l(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let r of this.M)"triggerLoad"in r?e.push(r.triggerLoad()):e.push(F(r.hostLoad,r));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(r=>r.has(mt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await Promise.resolve();let s=this.J.filter(r=>!r.manager?.loadedCalled);s.length&&await Promise.allSettled(s.map(async r=>await r.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let r of this.M)"triggerLoaded"in r?r.triggerLoaded():p(r.hostLoaded,r);this.loaded?.(),this.#r.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#c(t):super.update(t)}listen(t,e,s){let r=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,r,s),()=>this.el.removeEventListener(t,r,s)))}listenOn(t,e,s,r){let i=s?.bind(this)??s;this.manager.onLifecycle(()=>(t.addEventListener(e,i,r),()=>t.removeEventListener(e,i,r)))}async componentOnReady(){return await this.#r.promise,this}addController(t){this.M.push(t),!(G in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var ye=o=>{let t,e=r=>{t=new URL(r,globalThis.location?.href||void 0).href},s={...o,getAssetPath(r){let i=new URL(r,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(r,i){i.K=s,i.L=r,customElements.get(r)||customElements.define(r,i)}};return e(o.defaultAssetPath),s};var Er=o=>typeof o=="object"&&o!=null?ue(o):o;var Ut=class extends v{#t;#e;constructor(t){super(t);let e=this;this.#e=function(r){return e.#t.call(this,r)}}render(t){return typeof t=="function"?(this.#t=t,Pt(this.#e)):Pt(t)}},$r=E(Ut);var br=d;var J=ye({defaultAssetPath:"https://jsdev.arcgis.com/5.0.0-next/ai-components/",hydratedAttribute:"hydrated"}),{customElement:Or,getAssetPath:Tr,setAssetPath:Sr}=J;J.t=void 0;J.o=void 0;J.c=void 0;J.r=void 0;export{ws as a,x as b,Yt as c,Zt as d,Os as e,Ts as f,ge as g,ls as h,Ns as i,Me as j,ke as k,Ot as l,Fe as m,Js as n,Pt as o,me as p,Er as q,br as r,J as s,Or as t,Tr as u};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import d from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import d from"./DBKCPK5I.js";import{a as s,b as a}from"./RQY4555K.js";import c from"./X5OTOFCC.js";import"./LZRFQZSB.js";import"./IXKVVRW7.js";import{p as r,t as e}from"./BN3XKJOK.js";import b from"./72JQRHOG.js";import"./UJTPKXBP.js";import"./NSMIL2SL.js";export default $arcgis.t(([,,{d:i}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-query-agent requires a mapView");return{mapView:this.#t}}async load(){this.#t=await s(this,"arcgis-assistant-layer-query-agent"),a(this)}};e("arcgis-assistant-layer-query-agent",t);return t},b,c,d)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e=`# ArcGIS JavaScript SDK FeatureLayerView Query Assistant
|
|
5
5
|
|
|
6
6
|
You are a GIS assistant that generates query parameters for the ArcGIS JavaScript SDK FeatureLayerView \`queryFeatures()\` method.
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as $,c as k}from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import{a as $,c as k}from"./IXKVVRW7.js";import{a as C,b as L,c as m,d as f,e as P,f as O,i as g,j as v,l as w,u as N}from"./BN3XKJOK.js";var _=t=>(...s)=>{let o=f(),e=new t(...s),r=e.exports;m(o.at(-1));let n=e.component.manager;n.W(e,r),e.watchExports(n.W.bind(n,e)),P(e);let a=[e.component,...o].reverse();return v(a,i=>i===void 0?void 0:j(e,i,r),r)},j=(t,{host:s,key:o,isReactive:e},r)=>{let n=s,a=n[o]!==t.exports,i=n[o]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[o]=t.exports),s===t.component){if(e){let l=t.component.manager;i&&l.W(t,n[o]),t.onUpdate(u=>{if(u.has(o)){let x=n[o];x!==t.exports&&l.W(t,x)}})}t.O=e?void 0:o}let d=t.component.constructor.elementProperties.get(o)?.readOnly;t.watchExports(()=>{n[o]!==t.exports&&(d?O(()=>{n[o]=t.exports}):n[o]=t.exports)})};var z="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),M=new Set(z),h="en",U={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},F=async(t,s,o="")=>{let e=`${s}/${o}`,r=`${e}${t}.json`;return b[r]??(b[r]=A(t,e)),await b[r]},b={},A=async(t,s)=>{let o=`${s}${t}.json`;try{let e=await fetch(o);if(e.ok)return await e.json()}catch(e){return g("error","intl",`An unknown error occurred while fetching localization strings at ${o}`,{detail:{error:e}}),{}}return t===h?{}:await A(h,s)},y=t=>{let s=k(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:T(s)}},T=t=>{let[s,o]=t.split("-"),e=s.toLowerCase(),r=e;return o&&(r=`${e}-${o.toUpperCase()}`),r=U[r]??r,M.has(r)?r:o?T(e):h},D=(t,s,o,e)=>{let r,n=()=>K(t,s(),e).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&o(a),r=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),$(t,["lang"],n)},K=async(t,s,o=t.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:r}=y(t),n=`${s}/${o}/t9n`,i=o===null?{}:await F(r,n,"messages.");return{lang:e,t9nLocale:r,t9nStrings:i}};var W=t=>I(void 0,t);var E=class extends w{constructor(s,o){super(s);let e=this.exports;try{L(this.component);let r=o(this.component,this),n=this.exports!==e;if(C(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},I=_(E);var S=t=>(s={})=>W((o,e)=>{let r=y(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=o;e.onLifecycle(()=>D(o.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};e.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in o&&o.label==null&&(o.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=e.exports,d=p._original??p,l=V(d,c);c&&(l._original=d),e.exports=l};return"messageOverrides"in a&&e.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(e.setProvisionalExports(n,!1),e.ready):n}),V=(t,s)=>{if(!s)return t;let o={...t};return Object.entries(s).forEach(([e,r])=>{t[e]!==void 0&&(typeof r=="object"?o[e]=V(t[e],r):o[e]=r??t[e])}),o};var ct=S(N);export{ct as a};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import a from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import a from"./X5OTOFCC.js";import{Ba as _,F as O,I as H,M as j,Wa as n,Y as K}from"./UJTPKXBP.js";export default $arcgis.t(([tt,oe,Ne,rt,{addressToLocations:at},Re,V,U,ie,ne,Ae,qe,se,ke,{createRenderer:ot},{getSchemesByTag:it,getSchemes:nt},{getBackgroundColorTheme:Te},{createAgeRenderer:st,createContinuousRenderer:lt},{getSchemesByTag:le},{createContinuousRenderer:ct},{createRenderer:dt},{getSchemesByTag:ut},{createRenderer:mt},{getSchemesByTag:ht},{createRenderer:ft},{getSchemesByTag:gt},{createRenderer:yt},{getSchemesByTag:pt},{createAgeRenderer:wt,createContinuousRenderer:bt},{createRenderer:St},{getSchemesByTag:vt},{a:ge,b:ye,c:p,d:g,e:N,f:x,g:pe,h:G,i:W,j:we,k:R,l:A,m:m,n:E,o:Y,p:be,q:C}])=>{var ve=e=>Array.isArray(e)&&e.every(O),He=e=>typeof e=="object"&&e!=null&&"messages"in e&&ve(e.messages),Ke=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,L=class extends we{constructor(r,t){let{name:a,tags:o,handleToolErrors:i}=t??{};super({name:a,tags:o,func:(s,l)=>this.run(s,l)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"handleToolErrors",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"trace",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.tools=r,this.handleToolErrors=i??this.handleToolErrors}async runTool(r,t){let a=this.tools.find(o=>o.name===r.name);try{if(a===void 0)throw new Error(`Tool "${r.name}" not found.`);let o=await a.invoke({...r,type:"tool_call"},t);return O(o)&&o.getType()==="tool"||W(o)?o:new H({status:"success",name:a.name,content:typeof o=="string"?o:JSON.stringify(o),tool_call_id:r.id})}catch(o){if(!this.handleToolErrors||ye(o))throw o;return new H({status:"error",content:`Error: ${o.message}
|
|
5
5
|
Please fix your mistakes.`,name:r.name,tool_call_id:r.id??""})}}async run(r,t){let a;if(Ke(r))a=[await this.runTool(r.lg_tool_call,t)];else{let s;if(ve(r))s=r;else if(He(r))s=r.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let l=new Set(s.filter(c=>c.getType()==="tool").map(c=>c.tool_call_id)),d;for(let c=s.length-1;c>=0;c-=1){let u=s[c];if(u.getType()==="ai"){d=u;break}}if(d?.getType()!=="ai")throw new Error("ToolNode only accepts AIMessages as input.");a=await Promise.all(d.tool_calls?.filter(c=>c.id==null||!l.has(c.id)).map(c=>this.runTool(c,t))??[])}if(!a.some(W))return Array.isArray(r)?a:{messages:a};let o=[],i=null;for(let s of a)W(s)?s.graph===G.PARENT&&Array.isArray(s.goto)&&s.goto.every(l=>pe(l))?i?i.goto.push(...s.goto):i=new G({graph:G.PARENT,goto:s.goto}):o.push(s):o.push(Array.isArray(r)?[s]:{messages:[s]});return i&&o.push(i),o}};var Rn=g.Root({llmInputMessages:g({reducer:(e,r)=>A([],r),default:()=>[]})});var ze=g.Root({messages:g({reducer:A,default:()=>[]}),outputMessage:g({reducer:(e="",r)=>{let t=typeof r=="string"?r.trim():"";if(!t)return e;let a=e.trim();if(!a)return t;if(a===t)return e;let o=a.split(`
|
|
6
6
|
|
|
7
7
|
`);return o[o.length-1]?.trim()===t?e:`${e}
|
|
8
8
|
|
|
9
|
-
${t}`},default:()=>""}),intent:g({reducer:(e,r)=>r}),vectorSearchLayerResults:g({reducer:(e,r)=>r,default:()=>[]}),vectorSearchFieldResults:g({reducer:(e,r)=>r})});async function Tt(e,r){let t="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer";console.log(`[goToAddress] Geocoding: ${e}`);let a=(await at(t,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!a?.extent)throw new Error(`Could not find location for: ${e}`);let{xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}=a.extent,c=new Ne({xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}),u=(o+s)/2,h=(i+l)/2,y=new oe({x:u,y:h,spatialReference:d}),f=new rt({style:"circle",color:"red",size:12}),w=new tt({geometry:y,symbol:f});return r.graphics.removeAll(),r.graphics.add(w),await r.goTo(c),`Successfully zoomed to: ${a.address}. Location coordinates: x=${u}, y=${h}, wkid=${d.wkid}`}var xt=["mapView"];function $(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("NavigationAgent context missing");let t=xt.filter(a=>!(a in r));if(t.length)throw new Error(`NavigationAgent context missing: ${t.join(", ")}`);return r}async function Et({address:e},r){let{mapView:t}=$(r);return await Tt(e,t)}var Lt=n.object({address:n.string().describe("The full address or place name to locate.")}),It=p(Et,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Lt});async function $t(e,r){let t=r.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let a=t.find(i=>i.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await r.goTo(o),`Navigated to bookmark: ${e}`}async function Ft({bookmarkName:e},r){let{mapView:t}=$(r);return await Promise.resolve($t(e,t))}var _t=_.object({bookmarkName:_.string().describe("The name of the bookmark to navigate to.")}),Nt=p(Ft,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:_t});async function Rt(e,r,t){let a=t.map?.allLayers.find(i=>i.id===e);if(!a)return`Error: Layer with id ${e} not found`;let o=a.createQuery();o.where=r??"1=1";try{let{extent:i,count:s}=await a.queryExtent(o);if(s===0)return`No features found in ${a.title} matching: ${r}`;if(i)await t.goTo(i);else return`Error: Unable to determine extent for ${a.title}`;return`Successfully zoomed to ${s} feature(s) in ${a.title}`}catch(i){return console.error("Error in goToFeatures:",i),`Error: ${i instanceof Error?i.message:"Unknown error"}`}}async function At({layerId:e,where:r},t){let{mapView:a}=$(t);return await Rt(e,r,a)}var qt=_.object({layerId:_.string().describe("The layerId of the layer to zoom to."),where:_.string().describe("The sql-92 where clause used to query features to zoom to")}),kt=p(At,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:qt});async function zt(e){let r=new Ne({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(r),"Successfully zoomed to world extent"}async function Mt(e,r){let{mapView:t}=$(r);return await zt(t)}var Ct=_.object({}),jt=p(Mt,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Ct});async function Vt(e){let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(r)await e.goTo(r);else throw new Error("Initial extent is undefined");return"Successfully zoomed to home extent"}async function Ot(e,r){let{mapView:t}=$(r);return await Vt(t)}var Dt=n.object({}),Bt=p(Ot,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:Dt});async function Qt(e,r){await r.when();let t=r.map?.allLayers.find(o=>o.id===e);if(!t)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),`Could not find layer for: ${e}`;console.log(`[goToLayer] Zooming to layer: ${t.title}`);let a=t.fullExtent;return a?(await r.goTo(a),t.visible=!0,`Successfully zoomed to: ${t.title??""}`):"Layer has no defined extent. Cannot zoom to layer."}async function Pt({layerId:e},r){let{mapView:t}=$(r);return await Qt(e,t)}var Gt=_.object({layerId:_.string().describe("The id of the layer to navigate to")}),Wt=p(Pt,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:Gt});async function Ut(e,r){return await r.goTo({scale:e}),`Successfully zoomed to: ${e}`}async function Jt({scale:e},r){let{mapView:t}=$(r);return await Ut(e,t)}var Zt=n.object({scale:n.number().describe("The map scale of the view to go to.")}),Ht=p(Jt,{name:"goToScale",description:"Go to the specified view scale.",schema:Zt});async function Kt(e,r,t){let a={target:new oe({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return t?.zoom!==void 0&&(a.zoom=t.zoom),t?.scale!==void 0&&(a.scale=t.scale),await r.goTo(a),`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,t?.zoom!==void 0?`zoom ${t.zoom}`:"",t?.scale!==void 0?`scale 1:${t.scale}`:""].filter(Boolean).join(", ")}`}async function Yt({center:e,zoom:r,scale:t},a){let{mapView:o}=$(a);return await Kt(e,o,{zoom:r,scale:t})}var Xt=n.object({center:n.object({longitude:n.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:n.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:n.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:n.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),er=p(Yt,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Xt});async function tr(e,r){return await r.goTo({zoom:e}),`Successfully zoomed to: ${e}`}async function rr({zoom:e},r){let{mapView:t}=$(r);return await tr(e,t)}var ar=n.object({zoom:n.number().min(1).max(20).describe("The zoom level of the view to go to.")}),or=p(rr,{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:ar}),ce=[It,Nt,kt,jt,Bt,Wt,Ht,er,or],xe=Object.assign({"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./
|
|
9
|
+
${t}`},default:()=>""}),intent:g({reducer:(e,r)=>r}),vectorSearchLayerResults:g({reducer:(e,r)=>r,default:()=>[]}),vectorSearchFieldResults:g({reducer:(e,r)=>r})});async function Tt(e,r){let t="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer";console.log(`[goToAddress] Geocoding: ${e}`);let a=(await at(t,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!a?.extent)throw new Error(`Could not find location for: ${e}`);let{xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}=a.extent,c=new Ne({xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}),u=(o+s)/2,h=(i+l)/2,y=new oe({x:u,y:h,spatialReference:d}),f=new rt({style:"circle",color:"red",size:12}),w=new tt({geometry:y,symbol:f});return r.graphics.removeAll(),r.graphics.add(w),await r.goTo(c),`Successfully zoomed to: ${a.address}. Location coordinates: x=${u}, y=${h}, wkid=${d.wkid}`}var xt=["mapView"];function $(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("NavigationAgent context missing");let t=xt.filter(a=>!(a in r));if(t.length)throw new Error(`NavigationAgent context missing: ${t.join(", ")}`);return r}async function Et({address:e},r){let{mapView:t}=$(r);return await Tt(e,t)}var Lt=n.object({address:n.string().describe("The full address or place name to locate.")}),It=p(Et,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Lt});async function $t(e,r){let t=r.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let a=t.find(i=>i.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await r.goTo(o),`Navigated to bookmark: ${e}`}async function Ft({bookmarkName:e},r){let{mapView:t}=$(r);return await Promise.resolve($t(e,t))}var _t=_.object({bookmarkName:_.string().describe("The name of the bookmark to navigate to.")}),Nt=p(Ft,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:_t});async function Rt(e,r,t){let a=t.map?.allLayers.find(i=>i.id===e);if(!a)return`Error: Layer with id ${e} not found`;let o=a.createQuery();o.where=r??"1=1";try{let{extent:i,count:s}=await a.queryExtent(o);if(s===0)return`No features found in ${a.title} matching: ${r}`;if(i)await t.goTo(i);else return`Error: Unable to determine extent for ${a.title}`;return`Successfully zoomed to ${s} feature(s) in ${a.title}`}catch(i){return console.error("Error in goToFeatures:",i),`Error: ${i instanceof Error?i.message:"Unknown error"}`}}async function At({layerId:e,where:r},t){let{mapView:a}=$(t);return await Rt(e,r,a)}var qt=_.object({layerId:_.string().describe("The layerId of the layer to zoom to."),where:_.string().describe("The sql-92 where clause used to query features to zoom to")}),kt=p(At,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:qt});async function zt(e){let r=new Ne({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(r),"Successfully zoomed to world extent"}async function Mt(e,r){let{mapView:t}=$(r);return await zt(t)}var Ct=_.object({}),jt=p(Mt,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Ct});async function Vt(e){let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(r)await e.goTo(r);else throw new Error("Initial extent is undefined");return"Successfully zoomed to home extent"}async function Ot(e,r){let{mapView:t}=$(r);return await Vt(t)}var Dt=n.object({}),Bt=p(Ot,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:Dt});async function Qt(e,r){await r.when();let t=r.map?.allLayers.find(o=>o.id===e);if(!t)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),`Could not find layer for: ${e}`;console.log(`[goToLayer] Zooming to layer: ${t.title}`);let a=t.fullExtent;return a?(await r.goTo(a),t.visible=!0,`Successfully zoomed to: ${t.title??""}`):"Layer has no defined extent. Cannot zoom to layer."}async function Pt({layerId:e},r){let{mapView:t}=$(r);return await Qt(e,t)}var Gt=_.object({layerId:_.string().describe("The id of the layer to navigate to")}),Wt=p(Pt,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:Gt});async function Ut(e,r){return await r.goTo({scale:e}),`Successfully zoomed to: ${e}`}async function Jt({scale:e},r){let{mapView:t}=$(r);return await Ut(e,t)}var Zt=n.object({scale:n.number().describe("The map scale of the view to go to.")}),Ht=p(Jt,{name:"goToScale",description:"Go to the specified view scale.",schema:Zt});async function Kt(e,r,t){let a={target:new oe({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return t?.zoom!==void 0&&(a.zoom=t.zoom),t?.scale!==void 0&&(a.scale=t.scale),await r.goTo(a),`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,t?.zoom!==void 0?`zoom ${t.zoom}`:"",t?.scale!==void 0?`scale 1:${t.scale}`:""].filter(Boolean).join(", ")}`}async function Yt({center:e,zoom:r,scale:t},a){let{mapView:o}=$(a);return await Kt(e,o,{zoom:r,scale:t})}var Xt=n.object({center:n.object({longitude:n.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:n.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:n.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:n.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),er=p(Yt,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Xt});async function tr(e,r){return await r.goTo({zoom:e}),`Successfully zoomed to: ${e}`}async function rr({zoom:e},r){let{mapView:t}=$(r);return await tr(e,t)}var ar=n.object({zoom:n.number().min(1).max(20).describe("The zoom level of the view to go to.")}),or=p(rr,{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:ar}),ce=[It,Nt,kt,jt,Bt,Wt,Ht,er,or],xe=Object.assign({"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./6UMV2K64.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./TJJX6UKQ.js").then(e=>e.default),"../agents/layerFilter/prompts/layer_filter_prompt.md":()=>import("./GNIBW6BM.js").then(e=>e.default),"../agents/layerQuery/prompts/data_query_prompt.md":()=>import("./CLP7HMEW.js").then(e=>e.default),"../agents/layerQuery/prompts/summarize_query_response_prompt.md":()=>import("./RKR7CXWK.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./E3XZJC24.js").then(e=>e.default),"../agents/linkChart/prompts/link_chart_intent_prompt.md":()=>import("./3QTHBF2F.js").then(e=>e.default),"../agents/linkChart/prompts/link_chart_tool_prompt.md":()=>import("./RYLC4RYQ.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./3FXMITU4.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./B4GME3XE.js").then(e=>e.default)});async function q(e){let r=Object.entries(xe).find(([t])=>t.endsWith(`/${e}.md`));if(console.log(`entry for prompt "${e}":`,r),!r)throw new Error(`Prompt not found: ${e}
|
|
10
10
|
Available prompts:
|
|
11
11
|
${Object.keys(xe).join(`
|
|
12
12
|
`)}`);return await r[1]()}var ir=(e,r=3)=>e.filter(t=>t instanceof K).slice(-r),S=(e,r=3)=>{let t=e.map((o,i)=>o instanceof K?i:-1).filter(o=>o!==-1);if(t.length===0)return[];let a=t.length>r?t[t.length-r]:t[0];return e.slice(a)},F=(e,r=" ")=>ir(e).map(t=>t.content).join(r).trim();async function nr(e,r){let t=await q("navigation_tool_prompt"),{mapView:a}=$(r),o=a.map,i=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((w,v)=>`${v+1}. layerId=${w.id} | title=${w.title??""} | name=${w.name??""} | score=${w.score.toFixed(2)}`).join(`
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e=`# ArcGIS Online Map Viewer \u2014 Smart Mapping Assistant
|
|
5
5
|
|
|
6
6
|
You are a Smart Mapping Assistant for ArcGIS Online Map Viewer.
|
|
7
7
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import"./NSMIL2SL.js";var e="# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant\n\nYou are an assistant that helps generate layer filter expressions for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.\n\nCRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.\n\n## You are given:\n\nA list of layers, with layerId, layerSummary and each with associated field information\n{layerFieldInfo}\n\nFieldInfo:\n\n- `name`: the actual field name used in layer filter expressions\n- `type`: one of `string`, `number`, `date`, etc.\n- `alias`: a human-readable label\n- `description`: optional field metadata\n- `statistics`: such as min, max, unique values, etc.\n\n## Your task\n\n1. Analyze the user's request and the provided layer and field information.\n2. Generate a **single ArcGIS SQL WHERE clause** to match features based on the user's request and intent.\n3. Select the most appropriate tool to call based on the user's request.\n\nThe tool will apply the provided WHERE clause to the layer in the map viewer.\n\n## SQL-92 Date/Time Syntax\n\nUser timezone: {userTimezone} ({userTimezoneOffset})\n\nDatabase stores dates in UTC. Convert user's local time to UTC.\n\nTo convert: if offset is `-08:00`, add 8 hours. If `-05:00`, add 5 hours.\n\nFormat: `TIMESTAMP 'YYYY-MM-DD HH:MM:SS'`\n\n### Rules for generating Layer Filter expressions:\n\n- Use only the field\u2019s **`name`** in the output expression.\n- Use metadata (`alias`, `description`, `statistics`) only to help understand the user's meaning \u2014 not in the syntax.\n- Use field `type` to choose appropriate operators:\n - **String** \u2192 `LIKE '%value%'`, `=`, `IN (...)`\n - **Number/Date** \u2192 `=`, `<`, `>`, `BETWEEN`, etc.\n- Use fields with the **highest `relevanceScore`**.\n- Fields are case sensitive.\n- DO NOT use subqueries or `SELECT` keyword.\n- Combine conditions with `AND`, `OR`, or `NOT` as appropriate.\n- If no meaningful layer filter can be generated, do not call a tool.\n";export{e as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as c}from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import{a as c}from"./D532Z7XU.js";import"./IXKVVRW7.js";import{g as e,h as t,p as s,t as i}from"./BN3XKJOK.js";import"./NSMIL2SL.js";var r=e`.assistant-chat-card__prompt-container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 25%,transparent);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;margin-left:auto;justify-content:flex-end}.assistant-chat-card__prompt-avatar{display:flex;align-items:center;justify-content:center}.assistant-chat-card__content-container{display:flex;flex:1;flex-direction:column;width:100%}.assistant-chat-card__response-container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.assistant-chat-card__response-icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.assistant-chat-card__footer{display:flex;width:100%;justify-content:space-between;padding:0 var(--calcite-spacing-xxs)}.assistant-chat-card__feedback-actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xxs)}.assistant-chat-card__log-container{padding:0 var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-sm)}.assistant-chat-card__log{margin:0;font-size:var(--calcite-font-size-sm);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);width:100%;overflow:auto}.assistant-chat-card__footer-start{display:flex;gap:var(--calcite-spacing-xxs)}@media(min-width:1280px){.assistant-chat-card__prompt-container,.assistant-chat-card__response-container{max-width:80%}}`,a=class extends s{constructor(){super(...arguments),this._messages=c({blocking:!0}),this._showLog=!1,this.loading=!1,this.type="prompt",this.feedbackDisabled=!1,this.timestampDisabled=!1}static{this.properties={_showLog:16,loading:5,type:1,feedbackDisabled:5,timestampDisabled:5,content:1,loadingMessage:1,log:1,error:1,user:1}}static{this.styles=r}_renderLog(){return this.log&&this._showLog?t`<div class="assistant-chat-card__log-container"><pre class="assistant-chat-card__log">${this.log}</pre></div>`:null}_renderThumbsUpButton(){return t`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s appearance=transparent @click=${()=>{}} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return t`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s appearance=transparent @click=${()=>{}} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}_renderFeedback(){return!this.feedbackDisabled&&!this.error?t`<div class="assistant-chat-card__feedback-actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}_renderCopyButton(){return this.error?null:t`<calcite-action id=action-copy icon=copy-to-clipboard scale=s appearance=transparent @click=${async()=>{try{this.content&&await navigator.clipboard.writeText(this.content)}catch(n){console.error("Failed to copy text to clipboard:",n)}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`}_renderLogButton(){return this.log?t`<calcite-action id=action-log icon=access-string-results scale=s appearance=transparent @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderFooter(){return this.loading?null:t`<div class="assistant-chat-card__footer"><slot name=footer-start class="assistant-chat-card__footer-start">${this._renderCopyButton()}${this._renderLogButton()}</slot>${this._renderFeedback()}</div>`}render(){return this.type==="prompt"?t`<div class="assistant-chat-card__prompt-container"><div>${this.content}</div><div class="assistant-chat-card__prompt-avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></div>`:t`<div class="assistant-chat-card__response-container"><calcite-icon icon=effects class="assistant-chat-card__response-icon"></calcite-icon><div class="assistant-chat-card__content-container"><arcgis-assistant-chat-card-content .loading=${this.loading} .loadingMessage=${this.loadingMessage} .type=${this.error?"error":"text"} .content=${this.error??this.content}></arcgis-assistant-chat-card-content>${this._renderLog()}${this._renderFooter()}</div></div>`}};i("arcgis-assistant-chat-card",a);export{a as ArcgisAssistantChatCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import d from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import d from"./DBKCPK5I.js";import{a as s,b as a}from"./RQY4555K.js";import c from"./X5OTOFCC.js";import"./LZRFQZSB.js";import"./IXKVVRW7.js";import{p as r,t as e}from"./BN3XKJOK.js";import b from"./72JQRHOG.js";import"./UJTPKXBP.js";import"./NSMIL2SL.js";export default $arcgis.t(([,,{c:i}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-filter-agent requires a mapView");return{mapView:this.#t}}async load(){this.#t=await s(this,"arcgis-assistant-layer-filter-agent"),a(this)}};e("arcgis-assistant-layer-filter-agent",t);return t},b,c,d)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{g as i,h as t,p as r,q as e,t as o}from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import{g as i,h as t,p as r,q as e,t as o}from"./BN3XKJOK.js";import"./NSMIL2SL.js";var c=i`.assistant-chat-card-content__skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.assistant-chat-card-content__skeleton-text{display:block;height:.95em;border-radius:6px;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-chat-card-content-shimmer 1.2s ease-in-out infinite;width:85%}.assistant-chat-card-content__skeleton-text:last-child{width:70%}@keyframes assistant-chat-card-content-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.assistant-chat-card-content__skeleton-text{animation:none}}.assistant-chat-card-content__text-container{padding:var(--calcite-spacing-sm);display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);color:var(--calcite-color-text-1)}.assistant-chat-card-content__text-loading{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.assistant-chat-card-content__error-notice{padding:var(--calcite-spacing-sm)}`,n="assistant-chat-card-content",a={textLoading:`${n}__text-loading`,skeletonBlock:`${n}__skeleton-block`,skeletonText:`${n}__skeleton-text`},s=class extends r{constructor(){super(...arguments),this.loading=!1,this.type="text"}static{this.properties={loading:5,type:1,content:1,loadingMessage:1}}static{this.styles=c}_renderText(){return t`<div class="assistant-chat-card-content__text-container"><div><span class=${e(this.loading?a.textLoading:void 0)}>${this.loading?this.loadingMessage:this.content}</span></div>${this.loading?t`<div class=${e(a.skeletonBlock)}><span class=${e(a.skeletonText)}></span><span class=${e(a.skeletonText)}></span></div>`:null}</div>`}_renderError(){return t`<calcite-notice class="assistant-chat-card-content__error-notice" open icon kind=warning width=auto><div slot=message>${this.content}</div></calcite-notice>`}render(){switch(this.type){case"text":return this._renderText();case"error":return this._renderError();default:return t`<p>Unsupported content type</p>`}}};o("arcgis-assistant-chat-card-content",s);export{s as ArcgisAssistantChatCardContent};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://js.arcgis.com/5.0/esri/copyright.txt for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import d from"./
|
|
3
|
+
v5.0.0-next.139 */
|
|
4
|
+
import d from"./DBKCPK5I.js";import{a as e,b as i}from"./RQY4555K.js";import c from"./X5OTOFCC.js";import"./LZRFQZSB.js";import"./IXKVVRW7.js";import{p as s,t as a}from"./BN3XKJOK.js";import b from"./72JQRHOG.js";import"./UJTPKXBP.js";import"./NSMIL2SL.js";export default $arcgis.t(([,,{e:r}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=r}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}async load(){this.#t=await e(this,"arcgis-assistant-layer-styling-agent"),i(this)}};a("arcgis-assistant-layer-styling-agent",t);return t},b,c,d)
|