@arcgis/portal-components 5.2.0-next.16 → 5.2.0-next.18
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/25UUUQAQ.js +71 -0
- package/dist/cdn/{HJEFXVHY.js → MH7KZ5G3.js} +7 -5
- package/dist/cdn/TSLW4FSA.js +2 -0
- package/dist/cdn/{72N3KAXN.js → TW4LFQA5.js} +1 -1
- package/dist/cdn/{7WZHZP6U.js → UR7W4CEV.js} +8 -2
- package/dist/cdn/index.js +1 -1
- package/dist/components/arcgis-portal-replacement-item-redirect/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/package.json +4 -4
- package/dist/cdn/CMPGO4XS.js +0 -2
- package/dist/cdn/EVDOPN3G.js +0 -54
- /package/dist/cdn/{B7633S2A.js → 5NIJVBS7.js} +0 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import"./YIMNOUTF.js";var e=`## Who you are
|
|
3
|
+
|
|
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 \u2014 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 \u2014 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
|
|
26
|
+
|
|
27
|
+
Assigned task:
|
|
28
|
+
{assignedTask}
|
|
29
|
+
|
|
30
|
+
Latest user request:
|
|
31
|
+
{userRequest}
|
|
32
|
+
|
|
33
|
+
Prior steps:
|
|
34
|
+
{priorSteps}
|
|
35
|
+
|
|
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
|
+
---
|
|
41
|
+
|
|
42
|
+
## Map Context
|
|
43
|
+
|
|
44
|
+
{layerSummary}
|
|
45
|
+
|
|
46
|
+
## Available agents (capabilities)
|
|
47
|
+
|
|
48
|
+
{agents}
|
|
49
|
+
|
|
50
|
+
### Response Guidelines
|
|
51
|
+
|
|
52
|
+
When suggesting what users can ask, be SPECIFIC using actual layer names:
|
|
53
|
+
|
|
54
|
+
- "Show me water sources with elevation above 500"
|
|
55
|
+
- "Filter Protected Areas in Panama by protection level"
|
|
56
|
+
- "Zoom to Watershed Boundaries"
|
|
57
|
+
|
|
58
|
+
For "what can I ask" responses, provide 3-5 specific example queries using fields from the context.
|
|
59
|
+
|
|
60
|
+
For off-topic questions:
|
|
61
|
+
"I can only help with this map. Try asking me to filter [LayerName] by [FieldName], or zoom to a location."
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
## Format
|
|
66
|
+
|
|
67
|
+
- Keep responses concise
|
|
68
|
+
- Use bullet points for lists
|
|
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
|
|
71
|
+
`;export{e as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as Vl,b as Hl,d as Jl,e as Zl,f as Ql}from"./6AGZRMJC.js";import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as uo,b as gl}from"./V2EOXGK2.js";import{a as hl}from"./5VHBNEN3.js";import"./EKO6SVAF.js";import{I as io,J as lo,K as ml,Q as fl,h as ul,j as Rr,m as cl,v as dl,y as pl}from"./WJ2NMHDE.js";import{$ as De,$a as O,Aa as bt,Ba as qe,Ca as us,D as _l,Da as $l,E as Xe,Ea as zl,F as bl,Fa as cs,G as ts,Ga as Ll,H as Ta,Ha as zr,I as Sa,Ia as Pa,J as rs,Ja as jl,K as ka,Ka as Dl,L as po,La as ho,M as B,Ma as Fl,N as Ca,Na as Lr,O as xl,Oa as go,P as N,Pa as I,Q as yt,Qa as D,R as et,Ra,S as ns,T as Al,U as Il,V as Ea,W as Ie,X as os,Y as vl,Z as ss,_ as Tl,a as ue,aa as mo,b as q,ba as Sl,ca as Ma,da as kl,ea as fo,f as we,fa as wt,fb as ql,g as yl,ga as Cl,ha as El,ia as Ml,j as re,ja as Nr,k as ce,ka as Ol,la as tt,ma as Pl,mb as xt,na as _t,nb as Na,oa as as,ob as ve,pa as rt,q as es,qa as is,qb as yo,ra as Rl,rb as ds,sa as ls,sb as wo,t as wl,ta as Nl,tb as ps,u as co,ua as U,ub as de,va as x,wa as Oa,xa as Fe,ya as $r,za as Ee}from"./
|
|
2
|
+
import{a as Vl,b as Hl,d as Jl,e as Zl,f as Ql}from"./6AGZRMJC.js";import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as uo,b as gl}from"./V2EOXGK2.js";import{a as hl}from"./5VHBNEN3.js";import"./EKO6SVAF.js";import{I as io,J as lo,K as ml,Q as fl,h as ul,j as Rr,m as cl,v as dl,y as pl}from"./WJ2NMHDE.js";import{$ as De,$a as O,Aa as bt,Ba as qe,Ca as us,D as _l,Da as $l,E as Xe,Ea as zl,F as bl,Fa as cs,G as ts,Ga as Ll,H as Ta,Ha as zr,I as Sa,Ia as Pa,J as rs,Ja as jl,K as ka,Ka as Dl,L as po,La as ho,M as B,Ma as Fl,N as Ca,Na as Lr,O as xl,Oa as go,P as N,Pa as I,Q as yt,Qa as D,R as et,Ra,S as ns,T as Al,U as Il,V as Ea,W as Ie,X as os,Y as vl,Z as ss,_ as Tl,a as ue,aa as mo,b as q,ba as Sl,ca as Ma,da as kl,ea as fo,f as we,fa as wt,fb as ql,g as yl,ga as Cl,ha as El,ia as Ml,j as re,ja as Nr,k as ce,ka as Ol,la as tt,ma as Pl,mb as xt,na as _t,nb as Na,oa as as,ob as ve,pa as rt,q as es,qa as is,qb as yo,ra as Rl,rb as ds,sa as ls,sb as wo,t as wl,ta as Nl,tb as ps,u as co,ua as U,ub as de,va as x,wa as Oa,xa as Fe,ya as $r,za as Ee}from"./5NIJVBS7.js";import"./YIMNOUTF.js";export default $arcgis.t(([sB,iB,Hd,ug,cg,vg,mB,hB,vW,Bb,ip,Er,Bi,fp,,lp,Cg,{addressToLocations:Eg},Mg,Og,hp,{createRenderer:Pg},{getSchemesByTag:Rg,getSchemes:Ng},{getBackgroundColorTheme:up},{createAgeRenderer:$g,createContinuousRenderer:zg},{getSchemesByTag:Xi},{createContinuousRenderer:Lg},{createRenderer:jg},{getSchemesByTag:Dg},{createRenderer:Fg},{getSchemesByTag:qg},{createRenderer:Ug},{getSchemesByTag:Bg},{createRenderer:Kg},{getSchemesByTag:Gg},{createAgeRenderer:Wg,createContinuousRenderer:Vg},{createRenderer:Hg},{getSchemesByTag:Jg},Zg,gp,yp,{formatDateOnly:Qg,convertDateFormatToIntlOptions:ca,formatTimeOnly:Yg,formatDate:cp},Xg,ey,ty,ry,ny,wp,,{fetchKnowledgeGraph:dp,executeQueryStreaming:oy,executeSearchStreaming:sy},ay,,,,,,,,,,,,,,,,,,,,,,,,,v2,S2,,,,,,,,,,,,,Kb,Cp,{a:Ul,b:Bl,c:Kl,d:Gl,e:Wl}])=>{var d=I;async function $a(t,e,r){if(r===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
|
|
3
3
|
|
|
4
4
|
If you continue to see this error, please import from "@langchain/core/callbacks/dispatch/web"`,"and explicitly pass in a config parameter.",`
|
|
5
5
|
|
|
@@ -100,7 +100,7 @@ Title: {title}
|
|
|
100
100
|
Description: {description}`,np=`Name: {name}
|
|
101
101
|
Alias: {alias}
|
|
102
102
|
Description: {description}`,op=I.object({schemaVersion:I.literal(Xd),modified:I.number().int().nonnegative(),embeddings:I.object({modelProvider:I.literal(ep),model:I.literal(tp),dimensions:I.literal(eo),templates:I.object({layer:I.string().default(rp),field:I.string().default(np)})}),layers:I.array(I.object({id:I.string().min(1),name:I.string().min(1),title:I.string().catch(""),description:I.string().catch(""),vector:I.array(I.number()).length(eo,{message:`Layer vector must be exactly ${eo} dimensions`}),fields:I.array(I.object({name:I.string().min(1),alias:I.string().catch(""),description:I.string().catch(""),vector:I.array(I.number()).length(eo,{message:`Field vector must be exactly ${eo} dimensions`})}))})).default([])});var Ag=(t,e)=>{let r=Fl.fromTemplate(t);return Lr.fromMessages([r,...e])};var Vo=async t=>{let{promptText:e,modelTier:r="default",temperature:n=0,messages:o,inputVariables:s,schema:a,config:i}=t,u=Ag(e,o??[]),l=(await Ui({modelTier:r,temperature:n,config:i})).withStructuredOutput(a);return await u.pipe(l).invoke(s??{},i)};var Ig=d.object({name:d.string(),description:d.string(),valueType:d.string(),alias:d.string()}),Z1=d.object({fields:d.array(Ig)});var Q1=d.object({title:d.string(),description:d.string(),name:d.string().nullable()});var ap=t=>Array.isArray(t)&&t.every(po),Tg=t=>typeof t=="object"&&t!=null&&"messages"in t&&ap(t.messages),Sg=t=>typeof t=="object"&&t!=null&&"lg_tool_call"in t,ht=class extends ql{tools;handleToolErrors=!0;trace=!1;constructor(t,e){let{name:r,tags:n,handleToolErrors:o}=e??{};super({name:r,tags:n,func:(s,a)=>this.run(s,a)}),this.tools=t,this.handleToolErrors=o??this.handleToolErrors}async runTool(t,e){let r=this.tools.find(n=>n.name===t.name);try{if(r===void 0)throw new Error(`Tool "${t.name}" not found.`);let n=await r.invoke({...t,type:"tool_call"},e);return po(n)&&n.getType()==="tool"||ce(n)?n:new B({status:"success",name:r.name,content:typeof n=="string"?n:JSON.stringify(n),tool_call_id:t.id})}catch(n){if(!this.handleToolErrors||co(n))throw n;return new B({status:"error",content:`Error: ${n.message}
|
|
103
|
-
Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(Sg(t))r=[await this.runTool(t.lg_tool_call,e)];else{let s;if(ap(t))s=t;else if(Tg(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let a=new Set(s.filter(u=>u.getType()==="tool").map(u=>u.tool_call_id)),i;for(let u=s.length-1;u>=0;u-=1){let l=s[u];if(yt(l)){i=l;break}}if(i==null||!yt(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(u=>u.id==null||!a.has(u.id)).map(u=>this.runTool(u,e))??[])}if(!r.some(ce))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)ce(s)?s.graph===re.PARENT&&Array.isArray(s.goto)&&s.goto.every(a=>yl(a))?o?o.goto.push(...s.goto):o=new re({graph:re.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var YB=O.Root({llmInputMessages:O({reducer:(t,e)=>yo([],e),default:()=>[]})});var Ho=(t,e)=>e??t,iy=O.Root({...ua(),intent:O({reducer:Ho}),vectorSearchLayerResults:O({reducer:Ho,default:()=>[]}),vectorSearchFieldResults:O({reducer:Ho}),navigationInternalState:O({reducer:Ho,default:()=>({toolCallMessage:void 0})})});async function ly(t,e){let r=Er.getDefault().helperServices,n=r.geocode.find(c=>c.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${Bi.assetsPath?.endsWith("/")?Bi.assetsPath:`${Bi.assetsPath}/`}esri/images/search/search-symbol-32.png`,a=(await Eg(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!a?.extent||!a.location)throw new Error(`Could not find location for: ${t}`);let i=new Mg({url:s,width:24,height:24}),u=new Cg({geometry:a.location,symbol:i});e.graphics.removeAll(),e.graphics.add(u),await e.goTo(a.extent);let l={address:a.address??"",location:a.location?a.location.toJSON():null,extent:a.extent?a.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var uy=["mapView"];function Ye(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=uy.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function cy({address:t},e){let{mapView:r}=Ye(e);return await ly(t,r)}var dy=d.object({address:d.string().describe("The full address or place name to locate.")}),py=D(cy,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:dy});async function my(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function fy({bookmarkName:t},e){let{mapView:r}=Ye(e);return await Promise.resolve(my(t,r))}var hy=I.object({bookmarkName:I.string().describe("The name of the bookmark to navigate to.")}),gy=D(fy,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:hy});async function yy(t,e,r){let n=r.map?.allLayers.find(a=>a.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:a,count:i}=await n.queryExtent(s);if(i===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(a)await r.goTo(a);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let u={layerId:t,layerTitle:n.title??t,where:o,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:u}}}}catch(a){return console.error("Error in goToFeatures:",a),{text:`Error: ${a instanceof Error?a.message:"Unknown error"}`,where:o}}}async function wy({layerId:t,where:e},r){let{mapView:n}=Ye(r);return await yy(t,e,n)}var _y=I.object({layerId:I.string().describe("The layerId of the layer to zoom to."),where:I.string().describe("The sql-92 where clause used to query features to zoom to")}),by=D(wy,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:_y});async function xy(t){let e=new Og({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function Ay(t,e){let{mapView:r}=Ye(e);return await xy(r)}var Iy=I.object({}),vy=D(Ay,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Iy});async function Ty(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function Sy(t,e){let{mapView:r}=Ye(e);return await Ty(r)}var ky=d.object({}),Cy=D(Sy,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:ky});async function Ey(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function My({layerId:t},e){let{mapView:r}=Ye(e);return await Ey(t,r)}var Oy=I.object({layerId:I.string().describe("The id of the layer to navigate to")}),Py=D(My,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:Oy});async function Ry(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function Ny({scale:t},e){let{mapView:r}=Ye(e);return await Ry(t,r)}var $y=d.object({scale:d.number().describe("The map scale of the view to go to.")}),zy=D(Ny,{name:"goToScale",description:"Go to the specified view scale.",schema:$y});async function Ly(t,e,r){let n={target:new hp({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function jy({center:t,zoom:e,scale:r},n){let{mapView:o}=Ye(n);return await Ly(t,o,{zoom:e,scale:r})}var Dy=d.object({center:d.object({longitude:d.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:d.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:d.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:d.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),Fy=D(jy,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Dy});async function qy(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function Uy({zoom:t},e){let{mapView:r}=Ye(e);return await qy(t,r)}var By=d.object({zoom:d.number().min(1).max(20).describe("The zoom level of the view to go to.")}),Ky=D(Uy,{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:By}),pp=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./YL7PGYWC.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./ANPXRYLV.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./3PAHY5KA.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./GAHILDQF.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./SYJSVUUR.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./DKBTJJMW.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./VRXKORTR.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./3MQIRMUM.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./
|
|
103
|
+
Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(Sg(t))r=[await this.runTool(t.lg_tool_call,e)];else{let s;if(ap(t))s=t;else if(Tg(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let a=new Set(s.filter(u=>u.getType()==="tool").map(u=>u.tool_call_id)),i;for(let u=s.length-1;u>=0;u-=1){let l=s[u];if(yt(l)){i=l;break}}if(i==null||!yt(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(u=>u.id==null||!a.has(u.id)).map(u=>this.runTool(u,e))??[])}if(!r.some(ce))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)ce(s)?s.graph===re.PARENT&&Array.isArray(s.goto)&&s.goto.every(a=>yl(a))?o?o.goto.push(...s.goto):o=new re({graph:re.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var YB=O.Root({llmInputMessages:O({reducer:(t,e)=>yo([],e),default:()=>[]})});var Ho=(t,e)=>e??t,iy=O.Root({...ua(),intent:O({reducer:Ho}),vectorSearchLayerResults:O({reducer:Ho,default:()=>[]}),vectorSearchFieldResults:O({reducer:Ho}),navigationInternalState:O({reducer:Ho,default:()=>({toolCallMessage:void 0})})});async function ly(t,e){let r=Er.getDefault().helperServices,n=r.geocode.find(c=>c.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${Bi.assetsPath?.endsWith("/")?Bi.assetsPath:`${Bi.assetsPath}/`}esri/images/search/search-symbol-32.png`,a=(await Eg(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!a?.extent||!a.location)throw new Error(`Could not find location for: ${t}`);let i=new Mg({url:s,width:24,height:24}),u=new Cg({geometry:a.location,symbol:i});e.graphics.removeAll(),e.graphics.add(u),await e.goTo(a.extent);let l={address:a.address??"",location:a.location?a.location.toJSON():null,extent:a.extent?a.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var uy=["mapView"];function Ye(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=uy.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function cy({address:t},e){let{mapView:r}=Ye(e);return await ly(t,r)}var dy=d.object({address:d.string().describe("The full address or place name to locate.")}),py=D(cy,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:dy});async function my(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function fy({bookmarkName:t},e){let{mapView:r}=Ye(e);return await Promise.resolve(my(t,r))}var hy=I.object({bookmarkName:I.string().describe("The name of the bookmark to navigate to.")}),gy=D(fy,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:hy});async function yy(t,e,r){let n=r.map?.allLayers.find(a=>a.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:a,count:i}=await n.queryExtent(s);if(i===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(a)await r.goTo(a);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let u={layerId:t,layerTitle:n.title??t,where:o,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:u}}}}catch(a){return console.error("Error in goToFeatures:",a),{text:`Error: ${a instanceof Error?a.message:"Unknown error"}`,where:o}}}async function wy({layerId:t,where:e},r){let{mapView:n}=Ye(r);return await yy(t,e,n)}var _y=I.object({layerId:I.string().describe("The layerId of the layer to zoom to."),where:I.string().describe("The sql-92 where clause used to query features to zoom to")}),by=D(wy,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:_y});async function xy(t){let e=new Og({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function Ay(t,e){let{mapView:r}=Ye(e);return await xy(r)}var Iy=I.object({}),vy=D(Ay,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Iy});async function Ty(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function Sy(t,e){let{mapView:r}=Ye(e);return await Ty(r)}var ky=d.object({}),Cy=D(Sy,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:ky});async function Ey(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function My({layerId:t},e){let{mapView:r}=Ye(e);return await Ey(t,r)}var Oy=I.object({layerId:I.string().describe("The id of the layer to navigate to")}),Py=D(My,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:Oy});async function Ry(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function Ny({scale:t},e){let{mapView:r}=Ye(e);return await Ry(t,r)}var $y=d.object({scale:d.number().describe("The map scale of the view to go to.")}),zy=D(Ny,{name:"goToScale",description:"Go to the specified view scale.",schema:$y});async function Ly(t,e,r){let n={target:new hp({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function jy({center:t,zoom:e,scale:r},n){let{mapView:o}=Ye(n);return await Ly(t,o,{zoom:e,scale:r})}var Dy=d.object({center:d.object({longitude:d.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:d.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:d.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:d.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),Fy=D(jy,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Dy});async function qy(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function Uy({zoom:t},e){let{mapView:r}=Ye(e);return await qy(t,r)}var By=d.object({zoom:d.number().min(1).max(20).describe("The zoom level of the view to go to.")}),Ky=D(Uy,{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:By}),pp=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./YL7PGYWC.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./ANPXRYLV.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./3PAHY5KA.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./GAHILDQF.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./SYJSVUUR.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./DKBTJJMW.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./VRXKORTR.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./3MQIRMUM.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./25UUUQAQ.js").then(t=>t.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./GQFWFZXP.js").then(t=>t.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./UR7W4CEV.js").then(t=>t.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./F6V7MLPY.js").then(t=>t.default)});async function Wt(t){let e=Object.entries(pp).find(([r])=>r.endsWith(`/${t}.md`));if(!e)throw new Error(`Prompt not found: ${t}
|
|
104
104
|
Available prompts:
|
|
105
105
|
${Object.keys(pp).join(`
|
|
106
106
|
`)}`);return await e[1]()}var oo=(t,e)=>{let r=t?.configurable?.services?.[e];if(r==null)throw new Error(`${e} missing in config.configurable.services`);return r};async function Gy(t){let{fields:e,layer:r,view:n,styleName:o,colorSchemeTags:s}=t,a;return s?a=Rg({basemapTheme:await up(n),geometryType:r.geometryType,includedTags:s,numColors:Math.min(e.length,8)})[0]:a=Ng({basemapTheme:await up(n),geometryType:r.geometryType,numColors:Math.min(e.length,8)}).primaryScheme,{layer:r,view:n,attributes:e.map(i=>({field:i,label:r.fields.find(u=>u.name===i)?.alias??""})).slice(0,8),outlineOptimizationEnabled:!0,sizeOptimizationEnabled:!0,includeSizeVariable:o.includes("Size"),pieChartScheme:a}}async function Wy(t){return await Pg(t)}async function Vy({arcgisMap:t,arcgisMapView:e,layerId:r,fields:n,colorSchemes:o,includeSize:s}){let a=e,i=t?.allLayers.find(l=>l.id===r);if(!i)return`Could not find layer for id: ${r}`;let u={styleName:s?"chart-size":"chart",fields:n,layer:i,view:a,colorSchemeTags:o};try{let l=await Gy(u),c=await Wy(l);return i.renderer=c.renderer,i.visible=!0,`Chart renderer applied to layer: ${i.title??i.id} using fields ${n.join(", ")}`}catch(l){return`Error applying chart renderer: ${l instanceof Error?l.message:String(l)}`}}var Hy=["mapView"];function je(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("LayerStylingAgent context missing");let r=Hy.filter(n=>!(n in e));if(r.length)throw new Error(`LayerStylingAgent context missing: ${r.join(", ")}`);return e}async function Jy({layerId:t,fields:e,colorSchemes:r,includeSize:n},o){let{mapView:s}=je(o);return await _e({type:"show-legend",data:{layerIds:[t]}},o),await Vy({arcgisMap:s.map,arcgisMapView:s,layerId:t,fields:e,colorSchemes:r,includeSize:n})}var Zy=d.object({layerId:d.string().describe("The id of the layer to apply the chart renderer to"),fields:d.array(d.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),colorSchemes:d.array(d.string()).optional().describe("Optional color scheme tags to use"),includeSize:d.boolean().optional().describe("Whether to vary the chart size (chart-size)")}),Qy=D(Jy,{name:"chart",description:`Label: Charts
|
|
@@ -288,7 +288,9 @@ ${a}`};async function jb(t,e){let r=await Wt("arcgis_knowledge_lucene_generation
|
|
|
288
288
|
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.
|
|
289
289
|
_Example: “How many features are there?”_
|
|
290
290
|
_Example: “What’s the average population?”_
|
|
291
|
-
_Example: “Which values are in the status field?”_
|
|
291
|
+
_Example: “Which values are in the status field?”_
|
|
292
|
+
|
|
293
|
+
This agent does NOT handle help/metadata requests such as listing available layers, listing field names/columns/attributes for a layer, or capability guidance.`;var K2=String.raw`- **help** — Enables users to ask questions about the map, layers, fields, and it's capabilities.
|
|
292
294
|
|
|
293
295
|
_Example: “Tell me about this map”_
|
|
294
296
|
_Example: “List all layers in this map”_
|
|
@@ -297,9 +299,9 @@ ${a}`};async function jb(t,e){let r=await Wt("arcgis_knowledge_lucene_generation
|
|
|
297
299
|
_Example: “What can you do?”_
|
|
298
300
|
_Example: “What can I ask”_
|
|
299
301
|
|
|
300
|
-
|
|
302
|
+
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.
|
|
301
303
|
|
|
302
|
-
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
|
|
304
|
+
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.
|
|
303
305
|
_Example: "Create a chart"_
|
|
304
306
|
_Example: "Create a table"_`;var lW=String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
|
|
305
307
|
This agent has two categories of skills: those that work with an active link chart visualization of a subset of the data in the knowledge graph, and those that work with the knowledge graph data more generally against the entire dataset in the service and database.
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import{a as $}from"./35SKVD6F.js";import c from"./SXZRHHXC.js";import a from"./WSNLUGEP.js";import{a as w,d as R}from"./6W2IHKCA.js";import{a as k}from"./DBKSQGEI.js";import{a as I}from"./5VHBNEN3.js";import"./EKO6SVAF.js";import{I as h,J as f,K as g,N as v,Q as b,R as y,h as u,j as l,v as d}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";export default $arcgis.t(([C,j,{c:M},{p:S}])=>{var x=u`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`,D=["360 VR Experience","Big Data Analytic","Dashboard","Data Pipeline","Deep Learning Studio Project","Discussion","Document Link","Excalibur Imagery Project","Feature Collection","Feature Service","Feed","Form","GeoBIM Application","GeoBIM Project","Hub Event","Hub Initiative","Hub Initiative Template","Hub Page","Hub Project","Image Service","Knowledge Graph","Knowledge Studio Project","Map Service","Map Showcase","Mission Report","Mission Template","Notebook","OGCFeatureServer","Ortho Mapping Project","Parquet Feature Layer","Real Time Analytic","Route Layer","Scene Service","Solution","StoryMap","StoryMap Theme","Tile Layer","Urban Model","Urban Project","Vector Tile Service","Video Service","Web Experience","Web Experience Template","Web Map","Web Mapping Application","Web Scene","WFS","Workflow"],L=["3DInsetMap","3DScene","3DViz","AttachmentViewer","CapacityAnalysis","Cascade","Compare","Compare/Configure","Compare/Multiviewer","Compare/Search","Compare/SideBySideViewer_Configure","Compare/storytelling_compare","Compare/storytelling_sidepanel","Compare/storytelling_tabbed","Compare3d","CompareAnalysis","CompareMaps","CrowdsourceManager","CrowdsourcePolling","CrowdsourceReporter","Directions","Edit","Editor","Elevations","ElevationsProfile","Embed","Filter","FilterGallery","GeoForm","GeoList","GeoTour","HeaderFooter","Identify","ImageInterpretation","ImageMask","ImageVisit","ImageryViewer","ImpactSummary","InformationLookup","InteractiveFilter","InteractiveLegend","LayerShowcase","Legend","LiveMaps","LocalPerspective","MapAndAppGallery","MapCarousel","MapJournal","MapSeries","Shortlist","MapTools","MapTour","Media","MinimalGallery","Minimalist","MobileViewer","Nearby","OnePane","Panels","PanelsLegend","Profile","PublicGallery","PublicInformation","ServiceLookup","SimpleMapViewer","SimpleViewer","SocialMedia","Solutions/s2.html?app=apps2/FindEditFilter","Solutions/s2.html?app=apps2/Finder","Solutions/s2.html","StoryMapBasic","StorytellingSwipe","StorytellingTextLegend","Styler","SummaryViewer","Time","TimeAware","TwoPane","View","Viewer","ZoneLookup"],U=i=>{if(!i)return!1;let e=L.some(t=>{let a=t.includes(".html"),r=`/apps/${t}${a?"":"/"}`;return decodeURIComponent(i.url)?.includes(r)});return i.type==="Web Mapping Application"&&!!i.url&&e};function F(i){let e=["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","SwipeSpyglass","Story Map"];return i.type==="Web Mapping Application"&&(E(e,i)||V(i))}function V(i){return["Cascade","MapTour","MapJournal","MapSeries","Shortlist","StoryMapCrowdsource","StorytellingSwipe"].some(e=>{let t=`/apps/${e}/index.html`;return decodeURIComponent(i.url)?.includes(t)})}function E(i,e){return i?.some(t=>e?.typeKeywords?.includes(t))}function H(i){return!!i&&D.some(e=>i.type===e)}function A(i){let e=G(i);return y(`assets/portal-item-thumbnail/${e}`)}function G(i){let e=i.type?.toLowerCase(),t=i.typeKeywords||[];switch(e){case"web mapping application":return"webapp.avif";case"mobile application":return"mobileapp.avif";case"notebook code snippets":case"notebook code snippet library":return"notebookcodesnippets.avif";case"notebook":return"notebook.avif";case"style":return t.includes("Dictionary")?"dictionarystyle.avif":"style.avif";case"feature service":return t.includes("Location Tracking View")?"locationtrackingservice.avif":t.includes("IndoorPositioningDataService")?"indoor-positioning-data-service.avif":"default.avif";case"pro presentation":return"pro-presentation.avif";case"reality mapping project":return"realitymappingproject.avif";case"raster function template":return"rasterfunctiontemplate.avif";case"workforce project":return"workforceproject.avif";case"hub initiative":return"hubinitiative.avif";case"hub page":return"hubpage.avif";case"hub site application":case"site application":return"hubsite.avif";case"hub event":return"hubevent.avif";case"hub project":return"hubproject.avif";case"dashboard":return t.includes("ArcGIS Dashboards")?"dashboards.avif":"opsdashboard.avif";case"geoprocessing service":return t.includes("Notebook Web Tool")?"notebookwebtool.avif":"webtool.avif";case"web scene":case"scene service":return"scene.avif";case"ortho mapping project":return"orthomappingproject.avif";case"ortho mapping template":return"orthomappingtemplate.avif";case"insights theme":return"insightstheme.avif";case"insights workbook package":return"insightsworkbookpackage.avif";case"solution":return"solution.avif";case"mobile scene package":return"mobilescenepackage.avif";case"deep learning package":return"deeplearningpackage.avif";case"big data analytic":return"bigdataanalytic.avif";case"real time analytic":return"realtimeanalytic.avif";case"feed":return"feed.avif";case"excalibur imagery project":return"excaliburimageryproject.avif";case"storymap":return t?.includes("storymapcollection")?"storymapcollection.avif":"storymap.avif";case"survey123 add in":return"survey123addin.avif";case"mission":return"mission.avif";case"mission template":return"missiontemplate.avif";case"quickcapture project":return"quickcaptureproject.avif";case"pro report":return"proreport.avif";case"pro package":return"propackage.avif";case"pro report template":return"proreporttemplate.avif";case"urban model":return"urbanmodel.avif";case"urban project":return"urbanproject.avif";case"web experience":return"webexperience.avif";case"web experience template":return"webexperiencetemplate.avif";case"experience builder widget":return"experiencebuilderwidget.avif";case"experience builder widget package":return"experiencebuilderwidgetpackage.avif";case"workflow":return"workflow.avif";case"insights script":return"insightsscript.avif";case"kernel gateway connection":return"kernelgatewayconnection.avif";case"hub initiative template":return"hubinitiativetemplate.avif";case"image service":return t?.includes("Tile Imagery")?"tiledimagerylayer.avif":"imagerylayer.avif";case"mission report":return"missionreport.avif";case"administrative report":return"administrativereport.avif";case"storymap theme":return"storymaptheme.avif";case"knowledge graph":return"knowledgegraph.avif";case"knowledge graph layer":return"knowledgegraphlayer.avif";case"knowledge studio project":return"knowledgestudio.avif";case"earth configuration":return"earthconfiguration.avif";case"link chart":return"linkchart.avif";case"investigation":return"investigation.avif";case"apache parquet":return"apacheparquet.avif";case"curated collection":return"curatedcollection.avif";case"video service":return"mediaservice.avif";case"geodata service":return"geodataservice.avif";case"suitability model":return"suitabilitymodel.avif";case"esri classifier definition":return"classifierdefinition.avif";case"esri spectral library":return"spectrallibrary.avif";case"deep learning studio project":return"deeplearningstudioproject.avif";case"esri classification schema":return"classificationschema.avif";case"insights data engineering workbook":return"dataengineeringworkbook.avif";case"insights data engineering model":return"dataengineeringmodel.avif";case"discussion":return"discussion.avif";case"api key":return"apikey.avif";case"data pipeline":return"datapipeline.avif";case"analysis model":return"analysismodel.avif";case"service connection":return"serviceconnection.avif";case"xr experience":return"xrexperience.avif";case"3dtiles service":return t?.includes("GaussianSplat")?"gaussiansplatlayer.avif":"default.avif";default:return"default.avif"}}function _(i,e,t){let{restUrl:a}=i,r=B(i),o=r?`token=${r}`:"",s=`${a}/content/items/${e.id}`;if(e.thumbnail){let c=e.thumbnailUrl;if(c){let n=new URL(c);return n.searchParams.append("w","400"),n.href}return`${s}/info/${e.thumbnail}?w=400${r?"&":""}${o}`}else if(e.type==="Image")return`${s}/data?${o}`;return A(e)}function B(i){return i?.credential?.token||i?.token||i?.user?.credential?.token||i?.portalUser?.token||""}function O({portal:i,usePortalHostname:e}){let{customBaseUrl:t,portalHostname:a,urlKey:r}=i,{protocol:o}=window.location,s=!e&&r?`${r}.${t}`:a;return`${o}//${s}`}async function W(i){if(!i?.user)return[];let e=`${w(i)}portals/self/signinSettings`;return(await j(e,{query:{f:"json"}}))?.data.blockedApps||[]}var T=5e3,p=class extends g{constructor(){super(...arguments),this.replacementId=null,this.itemOwnerName="",this.replacementItemInRecycleBin=!1,this.hasInaccessibleReplacementItem=!1,this.replacementItemSupportsOpenActions=!1,this.thumbnailUrl=null,this.timer=void 0,this.messages=I({blocking:!0}),this.primaryActionRef=h(),this.getItemDetailsUrl=({portal:e,itemId:t,redirect:a})=>{let r=O({portal:e,usePortalHostname:!this.user});return r?`${`${r}/home`}/item.html?id=${t}${a?"&performRedirectAction=true":""}`:""},this.performRedirectAction=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId,redirect:!0}),"_self")},this.viewItemDetailsPage=()=>{window.open(this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId??this.itemId}),this.supportsReplacement?"_self":"_blank")},this.canRedirect=!1,this.item=null,this.replacementItem=null,this.redirectAction=null,this.supportsReplacement=!1,this.redirectCancelled=!1,this.open=!1,this.redirectTimeRemaining=T/1e3,this.arcgisPortalReplacementItemFetch=d()}static{this.properties={item:16,replacementItem:16,redirectAction:16,supportsReplacement:16,redirectCancelled:16,open:16,redirectTimeRemaining:16,itemId:1,portal:0,user:0}}static{this.styles=x}async setFocus(){this.primaryActionRef.value?.setFocus()}willUpdate(e){(e.has("itemId")||e.has("portal")||e.has("user"))&&(this.user??=this.portal?.user??null,this.initItem())}setupTimer({onComplete:e}){typeof this.timer=="number"&&clearInterval(this.timer),this.redirectTimeRemaining=T/1e3,this.timer=setInterval(()=>{if(this.redirectTimeRemaining<=0){clearInterval(this.timer),this.timer=void 0,e();return}this.redirectTimeRemaining-=1},1e3)}cancelTimer({onCancel:e}={}){e?.(),clearInterval(this.timer)}handleClose(){this.cancelTimer(),this.itemId="",this.item=null,this.open=!1}cancelRedirect(){this.cancelTimer(),this.redirectCancelled=!0}isItemRetired(e){return U(e)||F(e)}async initItem(){if(!this.itemId)return;let{itemId:e,portal:t,performRedirectAction:a}=this,r=new C({id:e,portal:t});this.item=await r?.load();let o=await S(e,t,{relationshipType:"ReplacementItem2Item",direction:"reverse"},!0),s=o.data?.relatedItems?.[0];this.replacementItemInRecycleBin=s?.inRecycleBin;let c=s?.id,n=!this.replacementItemInRecycleBin&&c?new C({id:c,portal:t}):null;await n?.load(),this.replacementItem=n,this.hasInaccessibleReplacementItem=this.replacementItemInRecycleBin||!n&&o.data?.aggregations?.total?.count>0&&o.data?.relatedItems?.length===0,this.arcgisPortalReplacementItemFetch.emit({replacementItem:this.hasInaccessibleReplacementItem?{}:n||null}),this.replacementItem=n;let m=this.replacementItem?.owner??(r?.owner||null);this.itemOwnerName=m?$(await M(m,t),this.messages?._t9nLocale||"en"):"",this.replacementItemSupportsOpenActions=H(n),this.thumbnailUrl=_(t,n??this.item),this.supportsReplacement=!!n&&this.isItemRetired(r);let P=R(this.replacementItem,await W(this.portal),this.portal?.isPortal??!1);this.canRedirect=this.supportsReplacement&&this.replacementItemSupportsOpenActions&&!P,this.replacementId=n?.id||null,this.canRedirect&&this.setupTimer({onComplete:()=>a()}),this.open=!0}getReplacementHeading(){let{messages:e,hasInaccessibleReplacementItem:t,canRedirect:a}=this;return t?e.replacementUnavailable:a?e.redirectToReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.replacementUnavailable:e.replacementAvailable}getReplacementMessage(){let{messages:e,hasInaccessibleReplacementItem:t,supportsReplacement:a}=this;return t?e.retiredReplacementUnavailable:a?e.deprecatedHasReplacement:this.isItemRetired(this.item)&&!this.replacementItem?e.retired:e.deprecatedHasReplacement}getRedirectActionMessage(){let{messages:e,canRedirect:t,redirectTimeRemaining:a,redirectCancelled:r}=this;return r?e.redirectToReplacement:t?e.redirect.replace("${seconds}",`${a}`):e.moreDetails}renderCard(e){let{canRedirect:t,messages:a}=this;return l`<calcite-card thumbnail-position=inline-start><img slot=thumbnail class="thumbnail" src=${(this.thumbnailUrl||void 0)??v} @error=${async()=>this.thumbnailUrl=A(e)}><span slot=heading class="replacement-card__title">${e.title}</span><span slot=description>${a.ownedBy?.replace("${owner}",this.itemOwnerName)}</span>${t&&l`<calcite-link slot=footer-start icon-end=launch .href=${this.getItemDetailsUrl({portal:this.portal,itemId:this.replacementId})} target=_blank>${a.moreDetails}</calcite-link>`||""}</calcite-card>`}render(){let{open:e,messages:t,item:a,replacementItem:r,supportsReplacement:o,canRedirect:s,redirectCancelled:c}=this;if(!(!a||!this.isItemRetired(a)))return l`<calcite-dialog modal .open=${e} width=s kind=info outside-close-disabled escape-disabled close-disabled .heading=${this.getReplacementHeading()} @calciteDialogClose=${()=>this.handleClose()}><div class="replacement-container"><div class="replacement-message">${k(this.getReplacementMessage()?.replace("${itemTitle}",this.item?.title||""))}</div>${this.renderCard(o?r:a)}</div>${s&&!c&&l`<calcite-button slot=footer-end appearance=outline-fill kind=neutral @click=${()=>{this.cancelRedirect()}}>${t.cancelRedirection}</calcite-button>`||""}<calcite-button slot=footer-end @click=${()=>{this.cancelTimer(),s?this.performRedirectAction():this.viewItemDetailsPage()}} .iconEnd=${s?void 0:"launch"} ${f(this.primaryActionRef)}>${this.getRedirectActionMessage()}</calcite-button></calcite-dialog>`}};b("arcgis-portal-replacement-item-redirect",p);return p},"portal/PortalItem","request",a,c)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{$a as L,A as z,Ab as ha,B as A,Bb as ia,C as B,Cb as ja,Db as ka,Eb as la,Sa as C,Ta as D,Ua as E,Va as F,Wa as G,Xa as H,Ya as I,Za as J,_a as K,a,ab as M,b,bb as N,c,cb as O,d,db as P,e,eb as Q,f,gb as R,h as g,hb as S,i as h,ib as T,j as i,jb as U,k as j,kb as V,l as k,lb as W,m as l,mb as X,n as m,nb as Y,o as n,ob as Z,p as o,pb as _,q as p,qb as $,r as q,rb as aa,s as r,t as s,u as t,ub as ba,v as u,vb as ca,w as v,wb as da,x as w,xb as ea,y as x,yb as fa,z as y,zb as ga}from"./
|
|
2
|
+
import{$a as L,A as z,Ab as ha,B as A,Bb as ia,C as B,Cb as ja,Db as ka,Eb as la,Sa as C,Ta as D,Ua as E,Va as F,Wa as G,Xa as H,Ya as I,Za as J,_a as K,a,ab as M,b,bb as N,c,cb as O,d,db as P,e,eb as Q,f,gb as R,h as g,hb as S,i as h,ib as T,j as i,jb as U,k as j,kb as V,l as k,lb as W,m as l,mb as X,n as m,nb as Y,o as n,ob as Z,p as o,pb as _,q as p,qb as $,r as q,rb as aa,s as r,t as s,u as t,ub as ba,v as u,vb as ca,w as v,wb as da,x as w,xb as ea,y as x,yb as fa,z as y,zb as ga}from"./5NIJVBS7.js";import"./YIMNOUTF.js";export{L as Annotation,H as AsyncBatchedStore,J as BaseChannel,E as BaseCheckpointSaver,k as BaseLangGraphError,G as BaseStore,K as BinaryOperatorAggregate,d as COMMAND_SYMBOL,i as Command,e as CommandInstance,ca as CompiledStateGraph,b as END,v as EmptyChannelError,u as EmptyInputError,R as Graph,l as GraphBubbleUp,o as GraphInterrupt,m as GraphRecursionError,n as GraphValueError,c as INTERRUPT,I as InMemoryStore,w as InvalidUpdateError,F as MemorySaver,da as MessageGraph,ia as MessagesAnnotation,aa as MessagesValue,ja as MessagesZodMeta,ka as MessagesZodState,x as MultipleSubgraphsError,p as NodeInterrupt,g as Overwrite,q as ParentCommand,_ as REMOVE_ALL_MESSAGES,X as ReducedValue,z as RemoteException,a as START,f as Send,ba as StateGraph,A as StateGraphInputError,Z as StateSchema,y as UnreachableNodeError,Y as UntrackedValue,W as UntrackedValueChannel,$ as addMessages,D as copyCheckpoint,C as emptyCheckpoint,ga as entrypoint,O as getConfig,P as getCurrentTaskInput,U as getJsonSchemaFromSchema,ha as getPreviousState,V as getSchemaDefaultGetter,M as getStore,B as getSubgraphsSeenSet,N as getWriter,Q as interrupt,j as isCommand,s as isGraphBubbleUp,t as isGraphInterrupt,h as isInterrupted,r as isParentCommand,T as isSerializableSchema,S as isStandardSchema,$ as messagesStateReducer,ea as pushMessage,fa as task,la as writer};
|
|
@@ -36,8 +36,14 @@ This is the order of preference in case of overlap:
|
|
|
36
36
|
|
|
37
37
|
For example, "Where is Yosemite National Park". This is an address, but:
|
|
38
38
|
A map that contains a bookmark with Yosemite National Park should prefer the bookmark.
|
|
39
|
-
|
|
40
|
-
If these do not exist, geocode and go to that address.
|
|
39
|
+
If bookmark does not exist, a map that has the National Parks layer, for example, should prefer the feature.
|
|
40
|
+
If both of these do not exist, geocode and go to that address.
|
|
41
|
+
|
|
42
|
+
Additional mapping guidance:
|
|
43
|
+
|
|
44
|
+
- "zoom/go to [layer]" with no filter \u2192 prefer \`goToLayer\`.
|
|
45
|
+
- "zoom/go to [features] where/with ..." (has a condition/filter) \u2192 prefer \`goToFeatures\`.
|
|
46
|
+
- Explicit numeric zoom/scale/viewpoint requests \u2192 prefer the matching zoom/scale/viewpoint tool.
|
|
41
47
|
|
|
42
48
|
Return the name of the tool as a string.
|
|
43
49
|
`;export{e as default};
|
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 a,z as e}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";var t=e(a,{"arcgis-portal-ai-assistant":[()=>import("./
|
|
2
|
+
import{P as a,z as e}from"./WJ2NMHDE.js";import"./YIMNOUTF.js";var t=e(a,{"arcgis-portal-ai-assistant":[()=>import("./MH7KZ5G3.js"),"autoDestroyDisabled,config:,defaultClosed,navigationTargetMap:,portal:,t9n:,user:"],"arcgis-portal-ai-assistant-interrupt":[()=>import("./EHRAFAEA.js"),"_messages:,message,options:,type"],"arcgis-portal-classification-banner":[()=>import("./EETBNQU2.js"),"autoDestroyDisabled,messages:,missingExistingClassification,portalItem:,validationErrors,variant;destroy"],"arcgis-portal-classification-config":[()=>import("./KY7Q7DH3.js"),"autoDestroyDisabled,messages:,portalItem:,status,valid,values;destroy,resetForm,validateForm"],"arcgis-portal-classification-favorite":[()=>import("./47NPIL2S.js"),"attributeExpressionResults:,classificationValue:,favoriteClassifications:,messages:,portalItem:,resetFavoriteClassification:,selectedFavoriteClassificationName,updateClassificationData:"],"arcgis-portal-classification-form-element":[()=>import("./OKRYML2G.js"),"attribute:,attributeKey,isRequiredErrors:,messages:,renderingInfo:,value:"],"arcgis-portal-extent-picker":[()=>import("./FI45QCN2.js"),"active,contentOnly,extentService,extentValue:,isArea,itemId,messages:,portal:;;getExtent"],"arcgis-portal-extent-picker-coord-field":[()=>import("./YECI7XG3.js"),"errorMessage,inputId,label,max,min,relatedErrorMessage,validateRelated:,value;;checkRelatedField,isValid,setFocus"],"arcgis-portal-field-delete":[()=>import("./PDL3DPMG.js"),"config:,fieldNames:,layer:,mapView:,messages:,options:"],"arcgis-portal-group-badges":[()=>import("./MLTQECPL.js"),"_messages:,appearance,empty,group:,portal:,scale,showTooltips,width"],"arcgis-portal-group-card":[()=>import("./3KS5IDT2.js"),"disabled,group:,indeterminate,link,linkHandler:,messages:,name,newTab,portal:,preview,previewed,selected,selection,showBadges,showDateCreated,showDateUpdated,showOwner,showSummary,showViewableBy,user:,view;restoreFocus"],"arcgis-portal-group-thumbnail":[()=>import("./ZDLFZJBT.js"),"group:,portal:,scale,tooltip"],"arcgis-portal-item-type":[()=>import("./GEIZTD7F.js"),"ellipsis,hideIcon,hideText,item:,messages:,portal:,scale,serviceInfo:,showHosted,user:"],"arcgis-portal-mentionable-text-area":[()=>import("./KT7PE6UE.js"),"disabled,maxLength,placeholder,popoverListLabel,popoverPlacement,portal:,readOnly,rows,scale,starters:,user:,value;closePopover,focusTextArea,selectItem"],"arcgis-portal-replacement-item-redirect":[()=>import("./TSLW4FSA.js"),"itemId,messages:,portal:,user:;setFocus"],"arcgis-portal-user-avatar":[()=>import("./KZWW4BWJ.js"),"checkOnline,description,heading,hideAvatar,messages:,portal:,scale,showName,underline,user:,username,wrap"],"arcgis-portal-user-popup":[()=>import("./VXCB2YBR.js"),"appearance,avatarAriaHidden,baseUrl,checkOnline,fullName,item:,messages:,portal:,scale,showAvatar,showName,showUsername,underline,user:,username,wrap,zIndex;openPopup,setFocus"],"arcgis-portal-voice-input":[()=>import("./HGSK6OFA.js"),"language;clearText,startListening,stopListening"]});t({resourcesUrl:import.meta.url});var r=new CSSStyleSheet;r.replaceSync("@layer{:not([hydrated]):is(arcgis-portal-ai-assistant,arcgis-portal-ai-assistant-interrupt,arcgis-portal-classification-banner,arcgis-portal-classification-config,arcgis-portal-classification-favorite,arcgis-portal-classification-form-element,arcgis-portal-extent-picker,arcgis-portal-field-delete,arcgis-portal-group-badges,arcgis-portal-group-card,arcgis-portal-group-thumbnail,arcgis-portal-item-type,arcgis-portal-mentionable-text-area,arcgis-portal-replacement-item-redirect,arcgis-portal-user-avatar,arcgis-portal-user-popup,arcgis-portal-voice-input){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,r];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r)=>{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,a)
|
|
@@ -11,7 +11,7 @@ import { g as T, b as $ } from "../../chunks/portal.js";
|
|
|
11
11
|
import C from "@arcgis/core/request.js";
|
|
12
12
|
import { f as P } from "../../chunks/user2.js";
|
|
13
13
|
import { g as A } from "../../chunks/user.js";
|
|
14
|
-
const U = M`.thumbnail-
|
|
14
|
+
const U = M`.thumbnail{object-fit:cover;max-height:8rem}.replacement-container{margin:.5rem}.replacement-message{margin-bottom:.5rem}.replacement-card__title{margin-bottom:.25rem}`, j = [
|
|
15
15
|
"360 VR Experience",
|
|
16
16
|
"Big Data Analytic",
|
|
17
17
|
"Dashboard",
|