@arcgis/ai-components 5.2.0-next.17 → 5.2.0-next.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/index.d.ts +78 -0
- package/dist/agent-utils/index.js +116 -97
- package/dist/agent-utils/middlewares/trace.d.ts +2 -0
- package/dist/agent-utils/types.d.ts +12 -12
- package/dist/cdn/27NEUQN3.js +2 -0
- package/dist/cdn/{VKR2CBLM.js → 2NMR43NW.js} +1 -1
- package/dist/cdn/3YMSOD5D.js +2 -0
- package/dist/cdn/4I4MCV7V.js +71 -0
- package/dist/cdn/5SBLS4NW.js +2 -0
- package/dist/cdn/ASSH4WSC.js +36 -0
- package/dist/cdn/BFPMQT3A.js +2 -0
- package/dist/cdn/{LBSOW7OW.js → C7E7MJSR.js} +1 -1
- package/dist/cdn/{DECSD3LN.js → CIW3QMKV.js} +1 -1
- package/dist/cdn/CVHJMR5X.js +2 -0
- package/dist/cdn/E7TMP4YV.js +3 -0
- package/dist/cdn/{NRMBMWI5.js → EBRNMPPO.js} +19 -18
- package/dist/cdn/GJUD7EA3.js +3 -0
- package/dist/cdn/HCR23HJB.js +2 -0
- package/dist/cdn/I64KIZG3.js +2 -0
- package/dist/cdn/IB4WTK74.js +2 -0
- package/dist/cdn/{LQSZTK26.js → IC5P5NYY.js} +1 -1
- package/dist/cdn/{QZVAGRWA.js → ICA7JOSU.js} +2 -2
- package/dist/cdn/{C4KITTT5.js → IXAKT6L3.js} +1 -1
- package/dist/cdn/{NE7E52YR.js → KTK4HNL2.js} +8 -2
- package/dist/cdn/{6EVF6NFG.js → KTOL6IN7.js} +5 -5
- package/dist/cdn/{VV57ZUOI.js → L77BTGXY.js} +1 -1
- package/dist/cdn/NOJYPREL.js +3 -0
- package/dist/cdn/{FZIT3DLD.js → O3F47IO5.js} +1 -1
- package/dist/cdn/{OLJC5BM3.js → O7TGCM5P.js} +1 -1
- package/dist/cdn/PBTINZTK.js +65 -0
- package/dist/cdn/PDEBKVBO.js +22 -0
- package/dist/cdn/PDT6I6TZ.js +2 -0
- package/dist/cdn/PSWI3MFB.js +2 -0
- package/dist/cdn/ROLXMEVE.js +18 -0
- package/dist/cdn/RX45PCYB.js +9 -0
- package/dist/cdn/{W5DLXSAP.js → SMADRJ67.js} +1 -1
- package/dist/cdn/U53OEX6L.js +2 -0
- package/dist/cdn/VDXSALQI.js +2 -0
- package/dist/cdn/{RUURNLTP.js → W2JAKE2M.js} +1 -1
- package/dist/cdn/{RHF452M7.js → WAVKMZA6.js} +1 -1
- package/dist/cdn/{6ZW7Z36F.js → X7GE26KU.js} +2 -2
- package/dist/cdn/XGS5EIA5.js +14 -0
- package/dist/cdn/YJ3QQXF6.js +2 -0
- package/dist/cdn/{X4UZCTIG.js → YYY7HKYX.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/converterUtils.js +39 -32
- package/dist/chunks/dataExplorationGraph.js +12 -10
- package/dist/chunks/helpGraph.js +8 -8
- package/dist/chunks/help_prompt.js +34 -17
- package/dist/chunks/intent_prompt.js +2 -2
- package/dist/chunks/navigationGraph.js +4 -4
- package/dist/chunks/navigation_intent_prompt.js +8 -2
- package/dist/chunks/state.js +1 -1
- package/dist/chunks/utils2.js +8 -8
- package/dist/components/arcgis-assistant/customElement.d.ts +7 -0
- package/dist/components/arcgis-assistant/customElement.js +301 -181
- package/dist/components/arcgis-assistant-agent/customElement.js +5 -1
- package/dist/components/arcgis-assistant-chat/customElement.js +22 -17
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +9 -5
- package/dist/components/arcgis-assistant-help-agent/customElement.js +6 -2
- package/dist/components/arcgis-assistant-interrupt/customElement.js +4 -4
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +16 -12
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +8 -4
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
- package/dist/components/arcgis-assistant-message-text/customElement.js +12 -12
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +9 -5
- package/dist/components/arcgis-assistant-user-message/customElement.js +10 -8
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/loader.js +2 -2
- package/dist/types/lumina.d.ts +2 -2
- package/dist/types/preact.d.ts +2 -2
- package/dist/types/react.d.ts +2 -2
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/index.d.ts +1 -2
- package/package.json +4 -4
- package/dist/cdn/3S7PBYVD.js +0 -2
- package/dist/cdn/5VXRVWAX.js +0 -16
- package/dist/cdn/CE6VDP2D.js +0 -72
- package/dist/cdn/CI3QSFPS.js +0 -2
- package/dist/cdn/F2AHA4GB.js +0 -54
- package/dist/cdn/GPYYAQVI.js +0 -2
- package/dist/cdn/K475UT3E.js +0 -2
- package/dist/cdn/KIQUEMI4.js +0 -14
- package/dist/cdn/NTGC53UD.js +0 -36
- package/dist/cdn/PB2ODJC7.js +0 -2
- package/dist/cdn/SBHLUL3Q.js +0 -2
- package/dist/cdn/TR3OKQPQ.js +0 -22
- package/dist/cdn/WIJRNMBG.js +0 -3
- package/dist/cdn/XBW4MWQR.js +0 -2
- package/dist/cdn/Z7UWJ4AI.js +0 -3
- package/dist/orchestrator/registry/agentRegistry.d.ts +0 -33
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as W}from"./PBTINZTK.js";import{i as M,j as z,q as j,r as B,s as Q}from"./MAV3DW27.js";var L=class extends Q{constructor(r){if(super(r),this.it=z,r.type!==j.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(r){if(r===z||r==null)return this._t=void 0,this.it=r;if(r===M)return r;if(typeof r!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(r===this.it)return this._t;this.it=r;let t=[r];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};L.directiveName="unsafeHTML",L.resultType=1;var mt=B(L);var V=function(){return V=Object.assign||function(r){for(var t,a=1,i=arguments.length;a<i;a++){t=arguments[a];for(var s in t)Object.prototype.hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},V.apply(this,arguments)},D={exports:{}},p={},q={exports:{}},w={};function ee(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function be(e,r,t){}function ve(e,r,t){}var ye=/javascript\s*\:/img;function we(e,r){return ye.test(r)?"":r}w.whiteList=ee();w.getDefaultWhiteList=ee;w.onAttr=be;w.onIgnoreAttr=ve;w.safeAttrValue=we;var Ae={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,i;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,i=e.length;a<i;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},E=Ae;function xe(e,r){e=E.trimRight(e),e[e.length-1]!==";"&&(e+=";");var t=e.length,a=!1,i=0,s=0,l="";function n(){if(!a){var c=E.trim(e.slice(i,s)),f=c.indexOf(":");if(f!==-1){var g=E.trim(c.slice(0,f)),d=E.trim(c.slice(f+1));if(g){var h=r(i,l.length,g,d,c);h&&(l+=h+"; ")}}}i=s+1}for(;s<t;s++){var o=e[s];if(o==="/"&&e[s+1]==="*"){var u=e.indexOf("*/",s+2);if(u===-1)break;s=u+1,i=s+1,a=!1}else o==="("?a=!0:o===")"?a=!1:o===";"?a||n():o===`
|
|
3
|
+
`&&n()}return E.trim(l)}var Te=xe,_=w,Se=Te;function J(e){return e==null}function ke(e){var r={};for(var t in e)r[t]=e[t];return r}function te(e){e=ke(e||{}),e.whiteList=e.whiteList||_.whiteList,e.onAttr=e.onAttr||_.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||_.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||_.safeAttrValue,this.options=e}te.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,i=t.onAttr,s=t.onIgnoreAttr,l=t.safeAttrValue,n=Se(e,function(o,u,c,f,g){var d=a[c],h=!1;if(d===!0?h=d:typeof d=="function"?h=d(f):d instanceof RegExp&&(h=d.test(f)),h!==!0&&(h=!1),f=l(c,f),!!f){var b={position:u,sourcePosition:o,source:g,isWhite:h};if(h){var m=i(c,f,b);return J(m)?c+":"+f:m}else{var m=s(c,f,b);if(!J(m))return m}}});return n};var Le=te;(function(e,r){var t=w,a=Le;function i(l,n){var o=new a(n);return o.process(l)}r=e.exports=i,r.FilterCSS=a;for(var s in t)r[s]=t[s]})(q,q.exports);var U=q.exports,H={indexOf:function(e,r){var t,a;if(Array.prototype.indexOf)return e.indexOf(r);for(t=0,a=e.length;t<a;t++)if(e[t]===r)return t;return-1},forEach:function(e,r,t){var a,i;if(Array.prototype.forEach)return e.forEach(r,t);for(a=0,i=e.length;a<i;a++)r.call(t,e[a],a,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var r=/\s|\n|\t/,t=r.exec(e);return t?t.index:-1}},Ee=U.FilterCSS,Oe=U.getDefaultWhiteList,R=H;function re(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var ae=new Ee;function Ce(e,r,t){}function _e(e,r,t){}function Ie(e,r,t){}function Pe(e,r,t){}function ie(e){return e.replace(Ve,"<").replace(Re,">")}function Fe(e,r,t,a){if(t=ue(t),r==="href"||r==="src"){if(t=R.trim(t),t==="#")return"#";if(!(t.substr(0,7)==="http://"||t.substr(0,8)==="https://"||t.substr(0,7)==="mailto:"||t.substr(0,4)==="tel:"||t.substr(0,11)==="data:image/"||t.substr(0,6)==="ftp://"||t.substr(0,2)==="./"||t.substr(0,3)==="../"||t[0]==="#"||t[0]==="/"))return""}else if(r==="background"){if(I.lastIndex=0,I.test(t))return""}else if(r==="style"){if(Z.lastIndex=0,Z.test(t)||(K.lastIndex=0,K.test(t)&&(I.lastIndex=0,I.test(t))))return"";a!==!1&&(a=a||ae,t=a.process(t))}return t=ce(t),t}var Ve=/</g,Re=/>/g,Ne=/"/g,$e=/"/g,ze=/&#([a-zA-Z0-9]*);?/gim,We=/:?/gim,De=/&newline;?/gim,I=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Z=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,K=/u\s*r\s*l\s*\(.*/gi;function se(e){return e.replace(Ne,""")}function ne(e){return e.replace($e,'"')}function oe(e){return e.replace(ze,function(t,a){return a[0]==="x"||a[0]==="X"?String.fromCharCode(parseInt(a.substr(1),16)):String.fromCharCode(parseInt(a,10))})}function le(e){return e.replace(We,":").replace(De," ")}function fe(e){for(var r="",t=0,a=e.length;t<a;t++)r+=e.charCodeAt(t)<32?" ":e.charAt(t);return R.trim(r)}function ue(e){return e=ne(e),e=oe(e),e=le(e),e=fe(e),e}function ce(e){return e=se(e),e=ie(e),e}function qe(){return""}function Ue(e,r){typeof r!="function"&&(r=function(){});var t=!Array.isArray(e);function a(l){return t?!0:R.indexOf(e,l)!==-1}var i=[],s=!1;return{onIgnoreTag:function(l,n,o){if(a(l))if(o.isClosing){var u="[/removed]",c=o.position+u.length;return i.push([s!==!1?s:o.position,c]),s=!1,u}else return s||(s=o.position),"[removed]";else return r(l,n,o)},remove:function(l){var n="",o=0;return R.forEach(i,function(u){n+=l.slice(o,u[0]),o=u[1]}),n+=l.slice(o),n}}}function He(e){for(var r="",t=0;t<e.length;){var a=e.indexOf("<!--",t);if(a===-1){r+=e.slice(t);break}r+=e.slice(t,a);var i=e.indexOf("-->",a);if(i===-1)break;t=i+3}return r}function Xe(e){var r=e.split("");return r=r.filter(function(t){var a=t.charCodeAt(0);return a===127?!1:a<=31?a===10||a===13:!0}),r.join("")}p.whiteList=re();p.getDefaultWhiteList=re;p.onTag=Ce;p.onIgnoreTag=_e;p.onTagAttr=Ie;p.onIgnoreTagAttr=Pe;p.safeAttrValue=Fe;p.escapeHtml=ie;p.escapeQuote=se;p.unescapeQuote=ne;p.escapeHtmlEntities=oe;p.escapeDangerHtml5Entities=le;p.clearNonPrintableCharacter=fe;p.friendlyAttrValue=ue;p.escapeAttrValue=ce;p.onIgnoreTagStripAll=qe;p.StripTagBody=Ue;p.stripCommentTag=He;p.stripBlankChar=Xe;p.cssFilter=ae;p.getDefaultCSSWhiteList=Oe;var N={},y=H;function Ge(e){var r=y.spaceIndex(e),t;return r===-1?t=e.slice(1,-1):t=e.slice(1,r+1),t=y.trim(t).toLowerCase(),t.slice(0,1)==="/"&&(t=t.slice(1)),t.slice(-1)==="/"&&(t=t.slice(0,-1)),t}function Me(e){return e.slice(0,2)==="</"}function je(e,r,t){var a="",i=0,s=!1,l=!1,n=0,o=e.length,u="",c="";e:for(n=0;n<o;n++){var f=e.charAt(n);if(s===!1){if(f==="<"){s=n;continue}}else if(l===!1){if(f==="<"){a+=t(e.slice(i,n)),s=n,i=n;continue}if(f===">"){a+=t(e.slice(i,s)),c=e.slice(s,n+1),u=Ge(c),a+=r(s,a.length,u,c,Me(c)),i=n+1,s=!1;continue}if(f==='"'||f==="'")for(var g=1,d=e.charAt(n-g);d.trim()===""||d==="=";){if(d==="="){l=f;continue e}d=e.charAt(n-++g)}}else if(f===l){l=!1;continue}}return i<e.length&&(a+=t(e.substr(i))),a}var Be=/[^a-zA-Z0-9\\_:.-]/gim;function Qe(e,r){var t=0,a=0,i=[],s=!1,l=e.length;function n(g,d){if(g=y.trim(g),g=g.replace(Be,"").toLowerCase(),!(g.length<1)){var h=r(g,d||"");h&&i.push(h)}}for(var o=0;o<l;o++){var u=e.charAt(o),c,f;if(s===!1&&u==="="){s=e.slice(t,o),t=o+1,a=e.charAt(t)==='"'||e.charAt(t)==="'"?t:Ze(e,o+1);continue}if(s!==!1&&o===a){if(f=e.indexOf(u,o+1),f===-1)break;c=y.trim(e.slice(a+1,f)),n(s,c),s=!1,o=f,t=o+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),s===!1)if(f=Je(e,o),f===-1){c=y.trim(e.slice(t,o)),n(c),s=!1,t=o+1;continue}else{o=f-1;continue}else if(f=Ke(e,o-1),f===-1){c=y.trim(e.slice(t,o)),c=Y(c),n(s,c),s=!1,t=o+1;continue}else continue}return t<e.length&&(s===!1?n(e.slice(t)):n(s,Y(y.trim(e.slice(t))))),y.trim(i.join(" "))}function Je(e,r){for(;r<e.length;r++){var t=e[r];if(t!==" ")return t==="="?r:-1}}function Ze(e,r){for(;r<e.length;r++){var t=e[r];if(t!==" ")return t==="'"||t==='"'?r:-1}}function Ke(e,r){for(;r>0;r--){var t=e[r];if(t!==" ")return t==="="?r:-1}}function Ye(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Y(e){return Ye(e)?e.substr(1,e.length-2):e}N.parseTag=je;N.parseAttr=Qe;var et=U.FilterCSS,v=p,ge=N,tt=ge.parseTag,rt=ge.parseAttr,F=H;function P(e){return e==null}function at(e){var r=F.spaceIndex(e);if(r===-1)return{html:"",closing:e[e.length-2]==="/"};e=F.trim(e.slice(r+1,-1));var t=e[e.length-1]==="/";return t&&(e=F.trim(e.slice(0,-1))),{html:e,closing:t}}function it(e){var r={};for(var t in e)r[t]=e[t];return r}function st(e){var r={};for(var t in e)Array.isArray(e[t])?r[t.toLowerCase()]=e[t].map(function(a){return a.toLowerCase()}):r[t.toLowerCase()]=e[t];return r}function de(e){e=it(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=v.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=st(e.whiteList||e.allowList):e.whiteList=v.whiteList,e.onTag=e.onTag||v.onTag,e.onTagAttr=e.onTagAttr||v.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||v.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||v.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||v.safeAttrValue,e.escapeHtml=e.escapeHtml||v.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new et(e.css))}de.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,t=r.options,a=t.whiteList,i=t.onTag,s=t.onIgnoreTag,l=t.onTagAttr,n=t.onIgnoreTagAttr,o=t.safeAttrValue,u=t.escapeHtml,c=r.cssFilter;t.stripBlankChar&&(e=v.stripBlankChar(e)),t.allowCommentTag||(e=v.stripCommentTag(e));var f=!1;t.stripIgnoreTagBody&&(f=v.StripTagBody(t.stripIgnoreTagBody,s),s=f.onIgnoreTag);var g=tt(e,function(d,h,b,m,O){var C={sourcePosition:d,position:h,isClosing:O,isWhite:Object.prototype.hasOwnProperty.call(a,b)},S=i(b,m,C);if(!P(S))return S;if(C.isWhite){if(C.isClosing)return"</"+b+">";var X=at(m),me=a[b],G=rt(X.html,function(A,x){var $=F.indexOf(me,A)!==-1,k=l(b,A,x,$);return P(k)?$?(x=o(b,A,x,c),x?A+'="'+x+'"':A):(k=n(b,A,x,$),P(k)?void 0:k):k});return m="<"+b,G&&(m+=" "+G),X.closing&&(m+=" /"),m+=">",m}else return S=s(b,m,C),P(S)?u(m):S},u);return f&&(g=f.remove(g)),g};var nt=de;(function(e,r){var t=p,a=N,i=nt;function s(n,o){var u=new i(o);return u.process(n)}r=e.exports=s,r.filterXSS=s,r.FilterXSS=i,(function(){for(var n in t)r[n]=t[n];for(var o in a)r[o]=a[o]})();function l(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}l()&&(self.filterXSS=e.exports)})(D,D.exports);var T=D.exports,ot=function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var r=Object.getPrototypeOf(e);if(r===null)return!0;for(;Object.getPrototypeOf(r)!==null;)r=Object.getPrototypeOf(r);return Object.getPrototypeOf(e)===r},pe=(function(){function e(r,t){var a=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],del:["style"],details:["open","style"],div:["align","aria-hidden","aria-label","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["aria-hidden","aria-label","style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=V(V({},T.getDefaultCSSWhiteList()),{"align-items":!0,"align-self":!0,flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,float:!0,gap:!0,grid:!0,"grid-area":!0,"grid-auto-columns":!0,"grid-auto-flow":!0,"grid-auto-rows":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-start":!0,"grid-template":!0,"grid-template-areas":!0,"grid-template-columns":!0,"grid-template-rows":!0,"justify-content":!0,"justify-items":!0,"justify-self":!0,"line-height":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(s,l,n,o){return s==="a"&&l==="href"||(s==="img"||s==="source")&&l==="src"?a.sanitizeUrl(n):T.safeAttrValue(s,l,n,o)}},this._entityMap={"&":"8","<":"<",">":">",'"':""","'":"'","/":"/"};var i;r&&!t?i=r:r&&t?(i=Object.create(this.arcgisFilterOptions),i.css={whiteList:this.arcgisCSSWhiteList},Object.keys(r).forEach(function(s){if(s==="whiteList")i.whiteList=a._extendObjectOfArrays([a.arcgisWhiteList,r.whiteList||{}]);else if(s==="css"){var l=r.css.whiteList;l!=null&&r.css instanceof Object&&Object.keys(l).forEach(function(n){return i.css.whiteList[n]=l[n]})}else i[s]=r[s]})):(i=Object.create(this.arcgisFilterOptions),i.whiteList=this.arcgisWhiteList,i.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=i,this._xssFilter=new T.FilterXSS(i)}return e.prototype.sanitize=function(r,t){switch(t===void 0&&(t={}),typeof r){case"number":return isNaN(r)||!isFinite(r)?null:r;case"boolean":return r;case"string":return this._xssFilter.process(r);case"object":return this._iterateOverObject(r,t);default:return t.allowUndefined&&typeof r>"u"?void 0:null}},e.prototype.sanitizeUrl=function(r,t){var a=(t??{}).isProtocolRequired,i=a===void 0?!0:a,s=this._trim(r.substring(0,r.indexOf(":"))),l=r==="/",n=/^#/.test(r),o=s&&this.allowedProtocols.indexOf(s.toLowerCase())>-1;return l||n||o?T.escapeAttrValue(r):!s&&!i?T.escapeAttrValue("https://".concat(r)):""},e.prototype.sanitizeHTMLAttribute=function(r,t,a,i){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(r,t,a,i):T.safeAttrValue(r,t,a,i)},e.prototype.validate=function(r,t){t===void 0&&(t={});var a=this.sanitize(r,t);return{isValid:r===a,sanitized:a}},e.prototype.encodeHTML=function(r){var t=this;return String(r).replace(/[&<>"'\/]/g,function(a){return t._entityMap[a]})},e.prototype.encodeAttrValue=function(r){var t=/^[a-zA-Z0-9]$/;return String(r).replace(/[\x00-\xFF]/g,function(a,i){return t.test(a)?a:"&#x".concat(Number(r.charCodeAt(i)).toString(16),";")})},e.prototype._extendObjectOfArrays=function(r){var t={};return r.forEach(function(a){Object.keys(a).forEach(function(i){Array.isArray(a[i])&&Array.isArray(t[i])?t[i]=t[i].concat(a[i]):t[i]=a[i]})}),t},e.prototype._iterateOverObject=function(r,t){var a=this;t===void 0&&(t={});try{var i=!1,s=void 0;if(Array.isArray(r))s=r.reduce(function(n,o){var u=a.validate(o,t);return u.isValid?n.concat([o]):(i=!0,n.concat([u.sanitized]))},[]);else if(ot(r)){var l=Object.keys(r);s=l.reduce(function(n,o){var u=r[o],c=a.validate(u,t);return c.isValid?n[o]=u:(i=!0,n[o]=c.sanitized),n},{})}else return t.allowUndefined&&typeof r>"u"?void 0:null;return i?s:r}catch{return null}},e.prototype._trim=function(r){return String.prototype.trim?r.trim():r.replace(/(^\s*)|(\s*$)/g,"")},e})();W.use({gfm:!0,breaks:!0,async:!1});var lt=new pe({whiteList:{ol:["start"],li:["value"],"calcite-table":["caption","bordered","striped","layout","scale","class"],"calcite-table-row":["slot","class"],"calcite-table-header":["heading","alignment","description","class"],"calcite-table-cell":["alignment","colspan","rowspan","class"],pre:["class"],code:["class"]}},!0);function ft(e){return lt.sanitize(e)}function he(e,r){let t=e.indexOf("{",r),a=e.indexOf("[",r);return t===-1?a:a===-1?t:Math.min(t,a)}function ut(e){if(e.trimStart().startsWith("```"))return null;for(let r=he(e,0);r!==-1;r=he(e,r+1)){let t=0,a=0;for(let i=r;i<e.length;i++){let s=e[i];if(s==="{"?t++:s==="}"?t--:s==="["?a++:s==="]"&&a--,t<0||a<0)break;if(t===0&&a===0&&i>r)return e.slice(r,i+1)}}return null}function Tt(e){if(!e)return"";let r=e,t=ut(e);if(t)try{let i=JSON.parse(t),s=`
|
|
4
|
+
|
|
5
|
+
\`\`\`json
|
|
6
|
+
${JSON.stringify(i,null,2)}
|
|
7
|
+
\`\`\`
|
|
8
|
+
|
|
9
|
+
`;r=e.replace(t,s)}catch{}let a=gt(r);return ct(a)}function ct(e){if(!e)return"";let r=dt(e);return ft(r)}function gt(e){return e?W.parse(e,{async:!1}):""}function dt(e){if(!e||typeof DOMParser>"u")return e;try{let r=new DOMParser().parseFromString(e,"text/html");return Array.from(r.querySelectorAll("table")).forEach((t,a)=>{let i=r.createElement("calcite-table");i.setAttribute("caption",`Table ${a+1}`),i.setAttribute("striped","true");let s=t.querySelector("thead");if(s){let n=Array.from(s.querySelectorAll("tr"));for(let o of n){let u=r.createElement("calcite-table-row");u.setAttribute("slot","table-header");let c=Array.from(o.querySelectorAll("th, td"));for(let f of c){let g=(f.textContent??"").trim(),d=r.createElement("calcite-table-header");d.setAttribute("heading",g),u.appendChild(d)}i.appendChild(u)}}let l=t.querySelector("tbody");(l?Array.from(l.querySelectorAll("tr")):Array.from(t.querySelectorAll("tr")).filter(n=>!s?.contains(n))).forEach((n,o)=>{let u=r.createElement("calcite-table-row"),c=!s&&o===0&&n.querySelectorAll("th").length>0;c&&u.setAttribute("slot","table-header");let f=Array.from(n.querySelectorAll("th, td"));for(let g of f){if(c&&g.localName==="th"){let m=(g.textContent??"").trim(),O=r.createElement("calcite-table-header");O.setAttribute("heading",m),u.appendChild(O);return}let d=r.createElement("calcite-table-cell"),h=g.getAttribute("colspan"),b=g.getAttribute("rowspan");h&&d.setAttribute("colspan",h),b&&d.setAttribute("rowspan",b),d.innerHTML=g.innerHTML,u.appendChild(d)}i.appendChild(u)}),t.replaceWith(i)}),r.body.innerHTML}catch{return e}}export{mt as a,Tt as b,ct as c};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./WAVKMZA6.js";import{c as l}from"./CVHJMR5X.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([{property:g,subclass:u},{d:w}])=>{var f=Object.defineProperty,m=Object.getOwnPropertyDescriptor,c=(o,r,n,s)=>{for(var e=s>1?void 0:s?m(r,n):r,a=o.length-1,t;a>=0;a--)(t=o[a])&&(e=(s?t(r,n,e):t(e))||e);return s&&e&&f(r,n,e),e},p=class extends w{constructor(o){super(o)}getAgents(){return this.workflow.getAgents()}generate(){let o=this.workflow.generate(),r=o.workspace,n=o.createGraph().compile(),{decideContinue:s}=this,e={[i]:async(t,d)=>await n.invoke(t,d)},a=[{from:i,decide:async(t,d)=>await Promise.resolve(s(t,d))?i:void 0}];return{workspace:r,createGraph:()=>l(e,a,r,{entryNode:i})}}buildEdges(){throw new Error("LoopWorkflow overrides generate(); buildEdges should not be called.")}getEntryNode(){return i}isTerminalAgent(){return!0}};c([g()],p.prototype,"workflow",2);c([g()],p.prototype,"decideContinue",2);p=c([u("LoopWorkflow")],p);var i="__loop_body";return p},"core/accessorSupport/decorators",a)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./PDEBKVBO.js";import b from"./ICA7JOSU.js";import a from"./EBRNMPPO.js";import{a as s,c as e}from"./W2JAKE2M.js";import"./5W7S2RS4.js";import"./NXKKG5TK.js";import{v as i,z as r}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./4RZPOYZ7.js";import"./6LZ6GOHF.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,,,,,,,,,,,,o])=>{var t=class extends i{constructor(){super(...arguments),this.agent=o}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-help-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=s(this,"arcgis-assistant-help-agent"),this.#i=e(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-help-agent",t);return t},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","views/LinkChartView","rest/knowledgeGraphService",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import e from"./ROLXMEVE.js";import d from"./HOCTVCHH.js";import c from"./ICA7JOSU.js";import b from"./EBRNMPPO.js";import{a,c as s}from"./W2JAKE2M.js";import"./5W7S2RS4.js";import"./NXKKG5TK.js";import{v as i,z as r}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./4RZPOYZ7.js";import"./6LZ6GOHF.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,,,,,,,,,,o])=>{var t=class extends i{constructor(){super(...arguments),this.agent=o}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=a(this,"arcgis-assistant-data-exploration-agent"),this.#i=s(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-data-exploration-agent",t);return t},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","views/LinkChartView","rest/knowledgeGraphService",b,c,d,e)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as s,b as i}from"./5W7S2RS4.js";import{c as r}from"./NXKKG5TK.js";function c(e,n){let t=s(e.el,e.referenceElement);if(t)return t;let o=r(e.el,"arcgis-assistant"),a=s(e.el,o?.referenceElement);if(a)return a;throw new Error(`${n}: Reference element not found`)}function g(e,n){let t=c(e,n).view;if(!t)throw new Error(`${n}: Reference element does not have a view`);return t}function m(e){return typeof e=="function"}function w(e){let n=r(e.el,"arcgis-assistant");if(n===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");n.register({agent:e.agent,getContext:async()=>await e.getContext?.()??e.context??{}})}function f(e){let n=i(e.el,e.referenceElement);if(n)return n;let t=r(e.el,"arcgis-assistant");return s(e.el,t?.referenceElement)||null}function E(e){let n=f(e);return n?n.view:null}export{g as a,m as b,w as c,E as d};
|
|
2
|
+
import{a as s,b as i}from"./5W7S2RS4.js";import{c as r}from"./NXKKG5TK.js";function c(e,n){let t=s(e.el,e.referenceElement);if(t)return t;let o=r(e.el,"arcgis-assistant"),a=s(e.el,o?.referenceElement);if(a)return a;throw new Error(`${n}: Reference element not found`)}function g(e,n){let t=c(e,n).view;if(!t)throw new Error(`${n}: Reference element does not have a view`);return t}function m(e){return typeof e=="function"}function w(e){let n=r(e.el,"arcgis-assistant");if(n===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");return n.register({agent:e.agent,getContext:async()=>await e.getContext?.()??e.context??{}}),n}function f(e){let n=i(e.el,e.referenceElement);if(n)return n;let t=r(e.el,"arcgis-assistant");return s(e.el,t?.referenceElement)||null}function E(e){let n=f(e);return n?n.view:null}export{g as a,m as b,w as c,E as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as i,c}from"./
|
|
2
|
+
import{a as i,c}from"./CVHJMR5X.js";export default $arcgis.t(([m,{subclass:p}])=>{function a(t){return t?Object.keys(t.shape??{}):[]}function d(t){let e={};for(let n of t)for(let s of a(n))e[s]=void 0;return e}function g(t,e){return Object.fromEntries(e.filter(n=>Object.hasOwn(t,n)).map(n=>[n,t[n]]))}function l(t,e){return`${t.id}_${e}`}function h(t,e){let n=e.inputSchema;return n?{...g(t,a(n)),agentExecutionContext:t.agentExecutionContext,outputMessage:t.outputMessage,status:void 0,summary:""}:{...t,status:void 0,summary:""}}function x(t,e){return t.outputSchema?g(e,a(t.outputSchema)):{}}function y(t){let e={outputMessage:t.outputMessage,status:t.status,summary:t.summary};return t.agentExecutionContext&&(e.agentExecutionContext=t.agentExecutionContext),e}function v(t,e){return async(n,s)=>{let o=await t.run(h(n,t),s),r=x(t,o);return e||o.status==="failed"?{...r,...y(o)}:{...r,outputMessage:o.outputMessage}}}var w=Object.getOwnPropertyDescriptor,E=(t,e,n,s)=>{for(var o=s>1?void 0:s?w(e,n):e,r=t.length-1,u;r>=0;r--)(u=t[r])&&(o=u(o)||o);return o},f=class extends m{generate(){let t=this.getAgents();this.validateAgents(t);for(let r of t)r.generate();let e=d(t.flatMap(r=>r.getSchemas())),n=i(e),s=this.buildNodes(t),o=this.buildEdges(t);return{workspace:n,createGraph:()=>c(s,o,n,{entryNode:this.getEntryNode(t)})}}buildNodes(t){let e={};for(let[n,s]of t.entries())e[l(s,n)]=v(s,this.isTerminalAgent(t,n));return e}validateAgents(t){if(!t.length)throw new Error("Workflow requires at least one agent.")}};f=E([p("BaseWorkflow")],f);return{a:a,b:d,c:l,d:f}},"core/Accessor","core/accessorSupport/decorators")
|
|
@@ -99,7 +99,7 @@ Do not reinterpret the request into a different form.
|
|
|
99
99
|
|
|
100
100
|
## Follow-up Reference Resolution
|
|
101
101
|
|
|
102
|
-
If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set",
|
|
102
|
+
If the latest user request refers to prior results or prior context using a referential phrase such as "these", "those", "them", "that set", "the previous results", "this", "it", "that one", "this parcel", "this location", or "that feature", then the request depends on earlier context.
|
|
103
103
|
|
|
104
104
|
This also applies to equivalent referential wording in other languages.
|
|
105
105
|
|
|
@@ -107,7 +107,7 @@ Resolve the reference using the most recent relevant chat history or successful
|
|
|
107
107
|
|
|
108
108
|
In this case, the \`assignedTask\` should be standalone and should preserve the referenced prior constraints while adding only the new constraint or question from the latest user request.
|
|
109
109
|
|
|
110
|
-
Do not leave ambiguous references like "these", "those", or "
|
|
110
|
+
Do not leave ambiguous references like "these", "those", "them", "this", or "it" in \`assignedTask\` when they can be resolved from context.
|
|
111
111
|
|
|
112
112
|
---
|
|
113
113
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import c from"./HOCTVCHH.js";import b from"./ICA7JOSU.js";import a from"./EBRNMPPO.js";import{a as i}from"./4RZPOYZ7.js";import{a as u,b as p,q as f,ta as S}from"./CJIV4KJZ.js";export default $arcgis.t(([,,,,,,{r:x},{A:_,B:h,a:w,m:E,o:y,p:I,q:L,r:v,s:F,t:$,u:C,v:N,w:R,x:T,y:b,z:A},q])=>{var V=.7,z=10,D=async(a,t)=>{try{await i({text:"Similarity search to find fields"},t);let e=y(t,"fieldSearch"),n=y(t,"layersAndFieldsRegistry"),o=y(t,"embeddingCache"),r=await e.searchFields({text:a.agentExecutionContext.assignedTask,layerIds:a.vectorSearchLayerIds,minScore:V,topResults:z,embeddingCache:o}),m=r.map(({layerId:d,results:c})=>{let g=c.map(s=>` - ${s.name} (${s.score.toFixed(2)})`).join(`
|
|
3
|
+
`);return`${n.get(d)?.layerItem.name??d}:
|
|
4
|
+
${g}`}).join(`
|
|
5
|
+
`),l;return r.length>0?l=`Vector search completed. Matching layers and fields with scores:
|
|
6
|
+
${m}`:l=`No vector search results found for score over ${V}.`,await i({text:l},t),{...a,vectorSearchFieldResults:r}}catch(e){throw await i({text:`Error during vector search: ${e instanceof Error?e.message:String(e)}`},t),new Error(`Vector search failed: ${e instanceof Error?e.message:String(e)}`)}},B=.7,G=async(a,t)=>{try{await i({text:`Similarity search to find layers: ${a.agentExecutionContext.assignedTask}`},t);let e=y(t,"layerSearch"),n=y(t,"layersAndFieldsRegistry"),o=await e.searchLayers({text:a.agentExecutionContext.assignedTask,minScore:B}),r=o.map(d=>d.id),m=o.map(({id:d,score:c})=>`${n.get(d)?.layerItem.name??d} (${c.toFixed(2)})`).join(`
|
|
7
|
+
`),l;return r.length>0?l=`Vector search completed. Matching layers with scores:
|
|
8
|
+
${m}`:l="Vector search completed. No matching layers found.",await i({text:l},t),{...a,vectorSearchLayerIds:r}}catch(e){throw await i({text:`Error during vector search: ${e instanceof Error?e.message:String(e)}`},t),new Error(`Vector search failed: ${e instanceof Error?e.message:String(e)}`)}},k=[L,v,F,$,C,N,R,T,b,A,_],M=(a,t=3)=>{let e=a.map((o,r)=>o.type==="human"?r:-1).filter(o=>o!==-1);if(e.length===0)return[];let n=e.length>t?e[e.length-t]:e[0];return a.slice(n)},H=async(a,t)=>{await i({text:"Requesting LLM for layer query results"},t);let e=await E("navigation_intent_prompt");if(!t?.configurable)throw new Error("config.configurable is required for layer query tools");let n={layerFieldInfo:a.layerFieldInfo},o=await x({promptText:e,modelTier:"advanced",config:t,messages:M(a.agentExecutionContext.messages),inputVariables:n,tools:k});return await q(o,t),{...a,agentExecutionContext:{...a.agentExecutionContext,messages:[...a.agentExecutionContext.messages,o]}}};async function P(a,t){let e=await new w(k,{handleToolErrors:!1}).invoke({messages:M(a.agentExecutionContext.messages)},t),n=e.messages.map(r=>r.text).join(`
|
|
9
|
+
`);await i({text:`Finished executing layer filter tool: ${n}`},t);let o=e.messages.map(r=>r.text).join(`
|
|
10
|
+
`);return{...a,outputMessage:o}}var J=async(a,t)=>(await i({text:"Exiting Layer Styling agent"},t),a),K=async(a,t)=>{try{await i({text:"Populating layer and field info"},t);let e=[];for(let n of a.vectorSearchFieldResults){let o=function(g){let s=l.get(g)?.layerItem;return s?[s.name&&`Name: ${s.name}`,s.title&&`Title: ${s.title}`,s.description&&`Description: ${s.description}`].filter(Boolean).join(" | "):g},{layerId:r,results:m}=n,l=y(t,"layersAndFieldsRegistry"),d=l.get(r)?.fieldRegistry;if(!d)continue;let c=e.find(g=>g.layerId===r);c||(c={layerId:r,layerSummary:o(r),fieldInfos:[]},e.push(c));for(let g of m){let s=d.get(g.name);s&&c.fieldInfos.push(s)}}return await i({text:"Populated layerFieldInfo"},t),{...a,layerFieldInfo:e}}catch(e){throw await i({text:"Error populating layerFieldInfo"},t),new Error(`Error populating layerFieldInfo: ${e instanceof Error?e.message:String(e)}`)}},U=(a,t)=>{let e=a.vectorSearchLayerIds??[];if(e.length<=1)return{...a,selectedLayerId:a.vectorSearchLayerIds[0]};let{hitlResponse:n}=t.configurable;if(n?.agentId!==j.id||n.id!=="reviewLayerSelection"){let r={agentId:j.id,id:"reviewLayerSelection",kind:"singleSelection",message:"Choose a layer to apply the styles.",metadata:[...e]};throw new f(r)}let o=null;return Array.isArray(n.payload)&&n.payload.length>0&&(o=n.payload[0]),{...a,selectedLayerId:o??a.vectorSearchLayerIds[0]}},O=(a,t)=>I(["layerSearch","fieldSearch","layersAndFieldsRegistry"],"Layer Styling Agent")(a,t),Q=()=>new S(h).addNode("requireLayerStylingServices",O).addNode("vectorSearchLayers",G).addNode("layerSelectionHITL",U).addNode("vectorSearchFields",D).addNode("populateLayerFieldInfo",K).addNode("agent",H).addNode("tools",P).addNode("earlyExit",J).addEdge(u,"requireLayerStylingServices").addEdge("requireLayerStylingServices","vectorSearchLayers").addConditionalEdges("layerSelectionHITL",a=>a.vectorSearchLayerIds.length?"vectorSearchFields":"earlyExit").addConditionalEdges("vectorSearchFields",a=>a.vectorSearchFieldResults.length?"populateLayerFieldInfo":"earlyExit").addEdge("populateLayerFieldInfo","agent").addEdge("agent","tools").addEdge("tools",p).addEdge("earlyExit",p),W=String.raw`- **layerStyling** — User wants to change how features are drawn or styled on the map based on their data, such as applying color, size, transparency, symbols, or charts according to field values.
|
|
11
|
+
_Example: “Color points by sales amount”_
|
|
12
|
+
_Example: “Show population density with a color gradient”_
|
|
13
|
+
_Example: “Create a relationship map between height and depth”_
|
|
14
|
+
_Example: “Vary circle sizes according to population”_`,j={id:"layerStyling",name:"Layer Styling Agent",description:W,createGraph:Q,workspace:h};return j},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request",a,b,c)
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as s,b as c}from"./RX45PCYB.js";import"./PBTINZTK.js";import{g as a,h as e,v as r,z as i}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./YIMNOUTF.js";var o=a`:host{overflow:auto}.container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 15%,var(--calcite-color-foreground-1));color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;margin-left:auto;justify-content:flex-end}.avatar{display:flex;align-items:center;justify-content:center}.content{>*{margin:0}>*+*{margin-block-start:var(--calcite-spacing-sm)}:is(ol,ul){padding-inline-start:var(--calcite-spacing-lg)}>calcite-table{display:block;max-width:100%}pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}}@container (min-width: 480px){.container{max-width:80%}}`,t=class extends r{static{this.properties={content:1,user:1,message:0}}static{this.styles=o}_getContent(){return this.message?.role==="user"?this.message.content:this.content}render(){return e`<div class="container"><div><slot name=content><div class="content">${s(c(this._getContent()))}</div></slot></div><slot name=icon><div class="avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></slot></div>`}};i("arcgis-assistant-user-message",t);export{t as ArcgisAssistantUserMessage};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import a from"./
|
|
2
|
+
import a from"./WAVKMZA6.js";import"./CVHJMR5X.js";import"./CJIV4KJZ.js";import"./IKEF7ZHH.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../YIMNOUTF.js";var a,
|
|
2
|
+
import"../YIMNOUTF.js";var e,a,i,c,u,s,w,l,f,m,p,y;async function r(n,t){if(t in n)return n[t];if("default"in n){let o=await n.default;return typeof o=="object"&&o!==null&&t in o?o[t]:o}throw new Error(`Unable to resolve ${String(t)} from module.`)}function W(n,t){let o={};for(let[b,k]of Object.entries(t))o[b]=h(n,k);return o}function d(n,t){return n.object(W(n,t))}function h(n,t){let o=g(n,t);return t.required===!0?o:o.optional()}function g(n,t){let o=T(n,t);return t.description!==void 0&&(o=o.describe(t.description)),o}function S(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n){return n==="string"||n==="number"||n==="boolean"}function T(n,t){switch(t.type){case"string":{if(t.enum!=null){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType==null)throw new Error("Array schema field requires an itemType definition.");return n.array(A(t.itemType)?S(n,t.itemType):g(n,t.itemType))}case"object":{if(t.fields==null)throw new Error("Object schema field requires a fields definition.");return d(n,t.fields)}}}async function L(n){p??=import("../Q7TL5Q5N.js");let t=await p;return d(t.z,n)}async function j(n,t){y??=import("../PDT6I6TZ.js");let o=await y;return await(await r(o,"sendUXSuggestion"))(n,t)}async function q(n){e??=import("../2NMR43NW.js");let t=await e,o=await r(t,"FunctionAgent");return new o(n)}async function E(n){a??=import("../JEIMRNYM.js");let t=await a,o=await r(t,"FunctionTool");return new o(n)}async function F(n){i??=import("../IXAKT6L3.js");let t=await i,o=await r(t,"LLMAgent");return new o(n)}async function v(n){c??=import("../O3F47IO5.js");let t=await c,o=await r(t,"WorkflowAgent");return new o(n)}async function U(n){u??=import("../C7E7MJSR.js");let t=await u,o=await r(t,"ConditionalWorkflow");return new o(n)}async function M(n){s??=import("../SMADRJ67.js");let t=await s,o=await r(t,"LoopWorkflow");return new o(n)}async function P(n){w??=import("../O7TGCM5P.js");let t=await w,o=await r(t,"ParallelWorkflow");return new o(n)}async function R(n){l??=import("../CIW3QMKV.js");let t=await l,o=await r(t,"RouterWorkflow");return new o(n)}async function X(n){f??=import("../YYY7HKYX.js");let t=await f,o=await r(t,"SequentialWorkflow");return new o(n)}async function x(n){m??=import("../IC5P5NYY.js");let t=await m,o=await r(t,"SwitchWorkflow");return new o(n)}export{U as createConditionalWorkflow,q as createFunctionAgent,E as createFunctionTool,F as createLLMAgent,M as createLoopWorkflow,P as createParallelWorkflow,R as createRouterWorkflow,L as createSchema,X as createSequentialWorkflow,x as createSwitchWorkflow,v as createWorkflowAgent,j as sendUXSuggestion};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{p as s,y as e}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./YIMNOUTF.js";var a=s(e,{"arcgis-assistant":[()=>import("./
|
|
2
|
+
import{p as s,y as e}from"./MAV3DW27.js";import"./ADYIXCSG.js";import"./YIMNOUTF.js";var a=s(e,{"arcgis-assistant":[()=>import("./GJUD7EA3.js"),"_messages:,assistantAvatarEnabled,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,streamingDisabled,suggestedPrompts:,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt,unregister"],"arcgis-assistant-agent":[()=>import("./27NEUQN3.js"),"agent:,context:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./VDXSALQI.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./U53OEX6L.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./BFPMQT3A.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./HCR23HJB.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./3YMSOD5D.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./5SBLS4NW.js"),"interrupt:,loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./M3SWPT3M.js"),"_messages:,awaitingResponse,disabled,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./PSWI3MFB.js"),"_messages:,message,options:,type"],"arcgis-assistant-interrupt-preview":[()=>import("./JN744CAW.js"),"interrupts:"],"arcgis-assistant-message":[()=>import("./CAECQD75.js"),"assistantAvatarEnabled,copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./I64KIZG3.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./FWU6DFIB.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./DEAYZ3MK.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./ZPLFFLPF.js"),"assistantAvatarEnabled,interrupts:,loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./NOJYPREL.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./RMLXVQZ5.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./IB4WTK74.js"),"content,parts:"],"arcgis-assistant-speech-input":[()=>import("./ZOSUDIJH.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./WH6QQK6N.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./YJ3QQXF6.js"),"content,message:,user"]});a({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-knowledge-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-message,arcgis-assistant-message-block,arcgis-assistant-message-feedback,arcgis-assistant-message-footer,arcgis-assistant-message-loading,arcgis-assistant-message-log,arcgis-assistant-message-read-aloud,arcgis-assistant-message-text,arcgis-assistant-speech-input,arcgis-assistant-suggested-prompts,arcgis-assistant-user-message){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"agent-utils/index,agent-utils/middlewares/middleware,agent-utils/middlewares/humanInTheLoop,agent-utils/middlewares/trace".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,e,"@arcgis/ai-components/",".js")
|
|
@@ -36,68 +36,74 @@ function x(e) {
|
|
|
36
36
|
return null;
|
|
37
37
|
for (let r = A(e, 0); r !== -1; r = A(e, r + 1)) {
|
|
38
38
|
let a = 0, c = 0;
|
|
39
|
-
for (let
|
|
40
|
-
const
|
|
41
|
-
if (
|
|
39
|
+
for (let n = r; n < e.length; n++) {
|
|
40
|
+
const l = e[n];
|
|
41
|
+
if (l === "{" ? a++ : l === "}" ? a-- : l === "[" ? c++ : l === "]" && c--, a < 0 || c < 0)
|
|
42
42
|
break;
|
|
43
|
-
if (a === 0 && c === 0 &&
|
|
44
|
-
return e.slice(r,
|
|
43
|
+
if (a === 0 && c === 0 && n > r)
|
|
44
|
+
return e.slice(r, n + 1);
|
|
45
45
|
}
|
|
46
46
|
}
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function O(e) {
|
|
50
50
|
if (!e)
|
|
51
51
|
return "";
|
|
52
52
|
let t = e;
|
|
53
53
|
const r = x(e);
|
|
54
54
|
if (r)
|
|
55
55
|
try {
|
|
56
|
-
const
|
|
56
|
+
const c = JSON.parse(r), l = `
|
|
57
57
|
|
|
58
58
|
\`\`\`json
|
|
59
|
-
${JSON.stringify(
|
|
59
|
+
${JSON.stringify(c, null, 2)}
|
|
60
60
|
\`\`\`
|
|
61
61
|
|
|
62
62
|
`;
|
|
63
|
-
t = e.replace(r,
|
|
63
|
+
t = e.replace(r, l);
|
|
64
64
|
} catch {
|
|
65
65
|
}
|
|
66
|
-
const a =
|
|
67
|
-
return
|
|
66
|
+
const a = E(t);
|
|
67
|
+
return q(a);
|
|
68
68
|
}
|
|
69
69
|
function q(e) {
|
|
70
|
-
|
|
70
|
+
if (!e)
|
|
71
|
+
return "";
|
|
72
|
+
const t = M(e);
|
|
73
|
+
return T(t);
|
|
71
74
|
}
|
|
72
75
|
function E(e) {
|
|
76
|
+
return e ? S.parse(e, { async: !1 }) : "";
|
|
77
|
+
}
|
|
78
|
+
function M(e) {
|
|
73
79
|
if (!e || typeof DOMParser > "u")
|
|
74
80
|
return e;
|
|
75
81
|
try {
|
|
76
82
|
const t = new DOMParser().parseFromString(e, "text/html");
|
|
77
83
|
return Array.from(t.querySelectorAll("table")).forEach((a, c) => {
|
|
78
|
-
const
|
|
79
|
-
|
|
80
|
-
const
|
|
81
|
-
if (
|
|
82
|
-
const d = Array.from(
|
|
83
|
-
for (const
|
|
84
|
+
const n = t.createElement("calcite-table");
|
|
85
|
+
n.setAttribute("caption", `Table ${c + 1}`), n.setAttribute("striped", "true");
|
|
86
|
+
const l = a.querySelector("thead");
|
|
87
|
+
if (l) {
|
|
88
|
+
const d = Array.from(l.querySelectorAll("tr"));
|
|
89
|
+
for (const u of d) {
|
|
84
90
|
const o = t.createElement("calcite-table-row");
|
|
85
91
|
o.setAttribute("slot", "table-header");
|
|
86
|
-
const
|
|
87
|
-
for (const
|
|
88
|
-
const s = (
|
|
92
|
+
const f = Array.from(u.querySelectorAll("th, td"));
|
|
93
|
+
for (const h of f) {
|
|
94
|
+
const s = (h.textContent ?? "").trim(), i = t.createElement("calcite-table-header");
|
|
89
95
|
i.setAttribute("heading", s), o.appendChild(i);
|
|
90
96
|
}
|
|
91
|
-
|
|
97
|
+
n.appendChild(o);
|
|
92
98
|
}
|
|
93
99
|
}
|
|
94
|
-
const
|
|
95
|
-
(
|
|
96
|
-
const o = t.createElement("calcite-table-row"),
|
|
97
|
-
|
|
98
|
-
const
|
|
99
|
-
for (const s of
|
|
100
|
-
if (
|
|
100
|
+
const b = a.querySelector("tbody");
|
|
101
|
+
(b ? Array.from(b.querySelectorAll("tr")) : Array.from(a.querySelectorAll("tr")).filter((d) => !l?.contains(d))).forEach((d, u) => {
|
|
102
|
+
const o = t.createElement("calcite-table-row"), f = !l && u === 0 && d.querySelectorAll("th").length > 0;
|
|
103
|
+
f && o.setAttribute("slot", "table-header");
|
|
104
|
+
const h = Array.from(d.querySelectorAll("th, td"));
|
|
105
|
+
for (const s of h) {
|
|
106
|
+
if (f && s.localName === "th") {
|
|
101
107
|
const w = (s.textContent ?? "").trim(), y = t.createElement("calcite-table-header");
|
|
102
108
|
y.setAttribute("heading", w), o.appendChild(y);
|
|
103
109
|
return;
|
|
@@ -105,13 +111,14 @@ function E(e) {
|
|
|
105
111
|
const i = t.createElement("calcite-table-cell"), p = s.getAttribute("colspan"), m = s.getAttribute("rowspan");
|
|
106
112
|
p && i.setAttribute("colspan", p), m && i.setAttribute("rowspan", m), i.innerHTML = s.innerHTML, o.appendChild(i);
|
|
107
113
|
}
|
|
108
|
-
|
|
109
|
-
}), a.replaceWith(
|
|
114
|
+
n.appendChild(o);
|
|
115
|
+
}), a.replaceWith(n);
|
|
110
116
|
}), t.body.innerHTML;
|
|
111
117
|
} catch {
|
|
112
118
|
return e;
|
|
113
119
|
}
|
|
114
120
|
}
|
|
115
121
|
export {
|
|
116
|
-
|
|
122
|
+
q as a,
|
|
123
|
+
O as p
|
|
117
124
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { StateGraph as I, START as k, END as v } from "@langchain/langgraph/web";
|
|
3
|
-
import { g as T, O as R, P as C, t as N, Q as V, f, R as D, r as z, S as
|
|
3
|
+
import { g as T, O as R, P as C, t as N, Q as V, f, R as D, r as z, S as b, T as P } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
6
6
|
import "@arcgis/toolkit/string";
|
|
7
|
-
import { h as
|
|
7
|
+
import { h as _, e as Q } from "./generateLayerDescriptions.js";
|
|
8
8
|
import { AIMessage as O } from "@langchain/core/messages";
|
|
9
9
|
import { s as n } from "./index.js";
|
|
10
10
|
import "@langchain/openai";
|
|
@@ -13,7 +13,7 @@ import "@arcgis/core/core/reactiveUtils.js";
|
|
|
13
13
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
14
|
import "@arcgis/core/request.js";
|
|
15
15
|
import "@langchain/core/prompts";
|
|
16
|
-
import { h as
|
|
16
|
+
import { h as $ } from "./toolCallResponse.js";
|
|
17
17
|
import { ToolNode as j } from "@langchain/langgraph/prebuilt";
|
|
18
18
|
import G from "@arcgis/core/smartMapping/statistics/summaryStatistics.js";
|
|
19
19
|
import U from "@arcgis/core/smartMapping/statistics/uniqueValues.js";
|
|
@@ -30,7 +30,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
30
30
|
assignedTask: t.agentExecutionContext.assignedTask,
|
|
31
31
|
userRequest: t.agentExecutionContext.userRequest,
|
|
32
32
|
priorSteps: t.agentExecutionContext.priorSteps
|
|
33
|
-
}, o = await
|
|
33
|
+
}, o = await _({
|
|
34
34
|
promptText: d,
|
|
35
35
|
modelTier: "advanced",
|
|
36
36
|
config: e,
|
|
@@ -45,7 +45,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
45
45
|
// Don't overwrite outputMessage if query already set it
|
|
46
46
|
};
|
|
47
47
|
const m = i, g = o.content.toString();
|
|
48
|
-
return await
|
|
48
|
+
return await $(o, e), { ...t, dataExplorationMessages: m, outputMessage: g };
|
|
49
49
|
}, H = async (t, e) => {
|
|
50
50
|
await n({ text: "Requesting LLM for layer query results" }, e);
|
|
51
51
|
const d = await T("data_explore_query_prompt");
|
|
@@ -78,7 +78,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
78
78
|
priorSteps: t.agentExecutionContext.priorSteps,
|
|
79
79
|
lastNavigatedFeatures: c,
|
|
80
80
|
lastResolvedLocation: m
|
|
81
|
-
}, y = await
|
|
81
|
+
}, y = await _({
|
|
82
82
|
promptText: d,
|
|
83
83
|
modelTier: "advanced",
|
|
84
84
|
config: e,
|
|
@@ -86,7 +86,7 @@ const W = async (t, e) => (await n({ text: "Exiting Data Exploration agent" }, e
|
|
|
86
86
|
inputVariables: g,
|
|
87
87
|
tools: V
|
|
88
88
|
}), h = (y.tool_calls?.length ?? 0) > 0, p = y.content.toString();
|
|
89
|
-
return await
|
|
89
|
+
return await $(y, e), {
|
|
90
90
|
...t,
|
|
91
91
|
dataExplorationMessages: [...t.dataExplorationMessages, y],
|
|
92
92
|
// Only emit output here when no tools are being called.
|
|
@@ -293,7 +293,7 @@ ${o}` : i = "Vector search completed. No matching layers found.", await n({ text
|
|
|
293
293
|
}, le = (t, e) => z(["layerSearch", "fieldSearch", "layersAndFieldsRegistry"], "Data Exploration Agent")(
|
|
294
294
|
t,
|
|
295
295
|
e
|
|
296
|
-
), ce = () => new I(
|
|
296
|
+
), ce = () => new I(b).addNode("requireDataExplorationServices", le).addNode("vectorSearchLayers", ne).addNode("vectorSearchFields", oe).addNode("fieldStatistics", se).addNode("queryAgent", H).addNode("queryTools", P).addNode("summarizeQueryResponseLLM", J).addNode("filterAgent", B).addNode("filterTools", K).addNode("earlyExit", W).addEdge(k, "requireDataExplorationServices").addEdge("requireDataExplorationServices", "vectorSearchLayers").addConditionalEdges(
|
|
297
297
|
"vectorSearchLayers",
|
|
298
298
|
(e) => e.vectorSearchLayerIds.length ? "vectorSearchFields" : "earlyExit"
|
|
299
299
|
).addConditionalEdges(
|
|
@@ -310,12 +310,14 @@ ${o}` : i = "Vector search completed. No matching layers found.", await n({ text
|
|
|
310
310
|
This also includes questions that ask which feature meets a given condition or where a particular feature in the data is located (e.g., “Where is the spring with the highest elevation?”). However, this agent does not handle addresses.
|
|
311
311
|
_Example: “How many features are there?”_
|
|
312
312
|
_Example: “What’s the average population?”_
|
|
313
|
-
_Example: “Which values are in the status field?”_
|
|
313
|
+
_Example: “Which values are in the status field?”_
|
|
314
|
+
|
|
315
|
+
This agent does NOT handle help/metadata requests such as listing available layers, listing field names/columns/attributes for a layer, or capability guidance.`, Ce = {
|
|
314
316
|
id: "dataExploration",
|
|
315
317
|
name: "Data Exploration Agent",
|
|
316
318
|
description: de,
|
|
317
319
|
createGraph: ce,
|
|
318
|
-
workspace:
|
|
320
|
+
workspace: b
|
|
319
321
|
};
|
|
320
322
|
export {
|
|
321
323
|
Ce as D
|
package/dist/chunks/helpGraph.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { StateGraph as d, START as g, END as i } from "@langchain/langgraph/web";
|
|
3
|
-
import { l as h, g as f, f as p, r as x, t as y, H as
|
|
3
|
+
import { l as h, g as f, f as p, r as x, t as y, H as u } from "./adapter.js";
|
|
4
4
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
5
5
|
import "@arcgis/core/portal/Portal.js";
|
|
6
6
|
import "@arcgis/toolkit/string";
|
|
@@ -15,7 +15,7 @@ import "@arcgis/core/request.js";
|
|
|
15
15
|
import { ToolNode as E } from "@langchain/langgraph/prebuilt";
|
|
16
16
|
import { s as m } from "./index.js";
|
|
17
17
|
import "@langchain/core/prompts";
|
|
18
|
-
const
|
|
18
|
+
const c = [h], v = (e) => {
|
|
19
19
|
if (!e || e.size === 0)
|
|
20
20
|
return "No layers available in this map.";
|
|
21
21
|
const t = Array.from(e.values()).map(({ layerItem: r, fieldRegistry: s }, l) => {
|
|
@@ -40,7 +40,7 @@ async function _(e, t) {
|
|
|
40
40
|
promptText: r,
|
|
41
41
|
modelTier: "fast",
|
|
42
42
|
config: t,
|
|
43
|
-
tools:
|
|
43
|
+
tools: c,
|
|
44
44
|
inputVariables: {
|
|
45
45
|
layerSummary: v(s),
|
|
46
46
|
agents: T(l),
|
|
@@ -71,7 +71,7 @@ async function _(e, t) {
|
|
|
71
71
|
}
|
|
72
72
|
const C = (e, t) => x(["agentRegistry"], "Help Agent")(e, t);
|
|
73
73
|
async function H(e, t) {
|
|
74
|
-
const r = new E(
|
|
74
|
+
const r = new E(c, { handleToolErrors: !1 });
|
|
75
75
|
try {
|
|
76
76
|
const s = e.helpInternalState.toolCallMessage;
|
|
77
77
|
if (!s)
|
|
@@ -102,7 +102,7 @@ async function H(e, t) {
|
|
|
102
102
|
};
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
|
-
const b = () => new d(
|
|
105
|
+
const b = () => new d(u).addNode("requireHelpServices", C).addNode("agent", _).addNode("tools", H).addEdge(g, "requireHelpServices").addEdge("requireHelpServices", "agent").addConditionalEdges("agent", (t) => t.helpInternalState.toolCallMessage ? "tools" : i).addEdge("tools", i), M = String.raw`- **help** — Enables users to ask questions about the map, layers, fields, and it's capabilities.
|
|
106
106
|
|
|
107
107
|
_Example: “Tell me about this map”_
|
|
108
108
|
_Example: “List all layers in this map”_
|
|
@@ -111,16 +111,16 @@ const b = () => new d(c).addNode("requireHelpServices", C).addNode("agent", _).a
|
|
|
111
111
|
_Example: “What can you do?”_
|
|
112
112
|
_Example: “What can I ask”_
|
|
113
113
|
|
|
114
|
-
|
|
114
|
+
If the user asks unrelated queries like "What are the vowels in English alphabet" or "How to cook", call this agent so it can politely refuse and redirect to map-related questions.
|
|
115
115
|
|
|
116
|
-
IF the user asks map related queries, but those that are not performed by any of the agents, call this agent so we can respond
|
|
116
|
+
IF the user asks map related queries, but those that are not performed by any of the agents, call this agent so we can respond that the requested action is not supported.
|
|
117
117
|
_Example: "Create a chart"_
|
|
118
118
|
_Example: "Create a table"_`, V = {
|
|
119
119
|
id: "help",
|
|
120
120
|
name: "Help Agent",
|
|
121
121
|
description: M,
|
|
122
122
|
createGraph: b,
|
|
123
|
-
workspace:
|
|
123
|
+
workspace: u
|
|
124
124
|
};
|
|
125
125
|
export {
|
|
126
126
|
V as H
|
|
@@ -1,7 +1,28 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
const
|
|
2
|
+
const n = `## Who you are
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
|
|
5
|
+
|
|
6
|
+
If asked anything outside of that context, you simply don't have that information — respond naturally and redirect to something you _can_ help with, using specific layer and field names from the map context.
|
|
7
|
+
|
|
8
|
+
Example of how to handle unknown topics:
|
|
9
|
+
"I don't have information on that — I only know about this map. You could ask me to list all layers in the map, or capabilities of this assistant."
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Your capabilities
|
|
14
|
+
|
|
15
|
+
You can help users with:
|
|
16
|
+
|
|
17
|
+
- Listing the layers in this map
|
|
18
|
+
- Listing the fields in a specific layer (use the tool)
|
|
19
|
+
- Suggesting specific queries using actual layer and field names
|
|
20
|
+
- Summarizing what this map contains and what users can do with it
|
|
21
|
+
- Letting users know when a map-related action isn't supported (e.g. charts, tables), and that it may be added in the future
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Input
|
|
5
26
|
|
|
6
27
|
Assigned task:
|
|
7
28
|
{assignedTask}
|
|
@@ -12,11 +33,13 @@ Latest user request:
|
|
|
12
33
|
Prior steps:
|
|
13
34
|
{priorSteps}
|
|
14
35
|
|
|
15
|
-
Use the assigned task as the primary instruction
|
|
16
|
-
Use the latest user request as supporting context
|
|
17
|
-
Use prior steps only
|
|
36
|
+
Use the assigned task as the primary instruction. The question will **not** be restated again here.
|
|
37
|
+
Use the latest user request as supporting context.
|
|
38
|
+
Use prior steps only to explain a previous result, failure, or likely next action.
|
|
39
|
+
|
|
40
|
+
---
|
|
18
41
|
|
|
19
|
-
|
|
42
|
+
## Map Context
|
|
20
43
|
|
|
21
44
|
{layerSummary}
|
|
22
45
|
|
|
@@ -24,15 +47,6 @@ Use prior steps only when needed to explain a previous result, failure, or likel
|
|
|
24
47
|
|
|
25
48
|
{agents}
|
|
26
49
|
|
|
27
|
-
### Rules
|
|
28
|
-
|
|
29
|
-
- "What layers are in this map?" → List the layer names
|
|
30
|
-
- "What fields are in this layer?" → Call the tool to list the field names for that layer
|
|
31
|
-
- "What can you do?" / "What can I ask?" → Suggest specific queries using EXACT layer and field names from the context above
|
|
32
|
-
- "Tell me about this map" → Summarize layers and capabilities
|
|
33
|
-
- "Create a chart of all wells ans their depth" → If a question is map related but not supported by available capabilities, say so. Add that support for this might be added in the future.
|
|
34
|
-
- Questions completely unrelated to maps/GIS → Politely explain you only help with the map |
|
|
35
|
-
|
|
36
50
|
### Response Guidelines
|
|
37
51
|
|
|
38
52
|
When suggesting what users can ask, be SPECIFIC using actual layer names:
|
|
@@ -46,12 +60,15 @@ For "what can I ask" responses, provide 3-5 specific example queries using field
|
|
|
46
60
|
For off-topic questions:
|
|
47
61
|
"I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
|
|
48
62
|
|
|
49
|
-
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Format
|
|
50
66
|
|
|
51
67
|
- Keep responses concise
|
|
52
68
|
- Use bullet points for lists
|
|
53
69
|
- Use new lines (\\n) and appropriate formatting in your response
|
|
70
|
+
- Use actual layer and field names from the map context in any suggestions
|
|
54
71
|
`;
|
|
55
72
|
export {
|
|
56
|
-
|
|
73
|
+
n as default
|
|
57
74
|
};
|