@arcgis/ai-components 5.2.0-next.79 → 5.2.0-next.84
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/{LM2IGECE.js → 3POGAH2X.js} +1 -1
- package/dist/cdn/{XHGVCL22.js → 3SEKXQVK.js} +1 -1
- package/dist/cdn/{NZJ6LLYY.js → 4QGVOLW6.js} +1 -1
- package/dist/cdn/{7QOC7FQE.js → 6NHYXISD.js} +1 -1
- package/dist/cdn/{XCNN7BQ3.js → 7FY7WAA5.js} +1 -1
- package/dist/cdn/{KP2FWABJ.js → 7GMCLVSZ.js} +1 -1
- package/dist/cdn/{MYH43WYG.js → 7Q5EESAR.js} +1 -1
- package/dist/cdn/{6ADMWEVE.js → 7TXR75RG.js} +1 -1
- package/dist/cdn/{HPU6K67Y.js → AZ5G7YZH.js} +1 -1
- package/dist/cdn/{ZWBFTKHF.js → BM3WFHJG.js} +1 -1
- package/dist/cdn/{4F7Y4RNW.js → BPCBE7J6.js} +1 -1
- package/dist/cdn/{MAPKEX67.js → DPALM2OW.js} +1 -1
- package/dist/cdn/{W7OT3KRG.js → E7JZ7GUW.js} +1 -1
- package/dist/cdn/{NPBXE4EQ.js → F2J6BMMX.js} +1 -1
- package/dist/cdn/{QUMNJVKX.js → HDM2D2GD.js} +1 -1
- package/dist/cdn/{ATFNWFKG.js → I3ONG4AX.js} +1 -1
- package/dist/cdn/{3LILAJUD.js → IFJM5XEQ.js} +1 -1
- package/dist/cdn/{XLHTQ7CF.js → JWIE3YK3.js} +1 -1
- package/dist/cdn/{G5XE5D36.js → LMPNXXTQ.js} +1 -1
- package/dist/cdn/{OKTBWKNG.js → LYKCYBGB.js} +1 -1
- package/dist/cdn/{NLEBWLVV.js → M2L5R4LA.js} +1 -1
- package/dist/cdn/{EBNVLMUU.js → M4URMXDS.js} +1 -1
- package/dist/cdn/{ORRMONGJ.js → MDAKBX7N.js} +1 -1
- package/dist/cdn/{WQGJATNJ.js → NQDOAPE3.js} +1 -1
- package/dist/cdn/{LXQFE5PJ.js → RV55GABG.js} +1 -1
- package/dist/cdn/{ZCEMEUP7.js → RWWOOC7S.js} +1 -1
- package/dist/cdn/{CZLLPKMS.js → TACBKKBI.js} +1 -1
- package/dist/cdn/{J4R7KYJ3.js → UEEH5ZQK.js} +14 -14
- package/dist/cdn/{YLGKKWZK.js → V6HOUZPZ.js} +1 -1
- package/dist/cdn/{EAOKCWED.js → WLH47YFC.js} +1 -1
- package/dist/cdn/{4AGGYAWS.js → ZRESBCJL.js} +1 -1
- package/dist/cdn/{ADJ63EDN.js → ZUNLFO6M.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +209 -210
- package/dist/chunks/utils2.js +41 -10
- package/dist/chunks/utils3.js +10 -41
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +5 -5
- /package/dist/cdn/{MMHDT4KV.js → 3UEKINYC.js} +0 -0
- /package/dist/cdn/{6TA5KFAQ.js → TMJMDCSA.js} +0 -0
package/dist/chunks/adapter.js
CHANGED
|
@@ -13,34 +13,34 @@ import * as ce from "@arcgis/core/core/reactiveUtils.js";
|
|
|
13
13
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
14
|
import "@langchain/core/prompts";
|
|
15
15
|
import { b as pe, a as G } from "./baseAgentState.js";
|
|
16
|
+
import { ToolNode as de } from "@langchain/langgraph/prebuilt";
|
|
17
|
+
import { s as T, a as S } from "./index.js";
|
|
18
|
+
import { clearFiltersTool as ue } from "../agents/tools/filter/clearFilters/adapter.js";
|
|
19
|
+
import { resetMapTool as he } from "../agents/tools/filter/resetMap/adapter.js";
|
|
20
|
+
import { setFeatureEffectTool as ye } from "../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
21
|
+
import { getAttributeTool as me } from "../agents/tools/query/getAttribute/adapter.js";
|
|
22
|
+
import { getStatisticsTool as ge } from "../agents/tools/query/getStatistics/adapter.js";
|
|
23
|
+
import { getTopFeaturesTool as fe } from "../agents/tools/query/getTopFeatures/adapter.js";
|
|
24
|
+
import { queryFeaturesTool as we } from "../agents/tools/query/queryFeatures/adapter.js";
|
|
16
25
|
import c from "zod";
|
|
17
26
|
import { tool as g } from "@langchain/core/tools";
|
|
18
|
-
import { createRenderer as
|
|
19
|
-
import { getSchemesByTag as
|
|
27
|
+
import { createRenderer as be } from "@arcgis/core/smartMapping/renderers/pieChart.js";
|
|
28
|
+
import { getSchemesByTag as Te, getSchemes as Se } from "@arcgis/core/smartMapping/symbology/pieChart.js";
|
|
20
29
|
import { getBackgroundColorTheme as Y } from "@arcgis/core/views/support/colorUtils.js";
|
|
21
|
-
import {
|
|
22
|
-
import { createAgeRenderer as ye, createContinuousRenderer as me } from "@arcgis/core/smartMapping/renderers/color.js";
|
|
30
|
+
import { createAgeRenderer as ve, createContinuousRenderer as Re } from "@arcgis/core/smartMapping/renderers/color.js";
|
|
23
31
|
import { getSchemesByTag as V } from "@arcgis/core/smartMapping/symbology/color.js";
|
|
24
|
-
import { createContinuousRenderer as
|
|
25
|
-
import { createRenderer as
|
|
26
|
-
import { getSchemesByTag as
|
|
27
|
-
import { createRenderer as
|
|
28
|
-
import { getSchemesByTag as
|
|
29
|
-
import { createRenderer as
|
|
30
|
-
import { getSchemesByTag as
|
|
31
|
-
import { createRenderer as
|
|
32
|
-
import { getSchemesByTag as
|
|
33
|
-
import { createAgeRenderer as
|
|
34
|
-
import { createRenderer as
|
|
35
|
-
import { getSchemesByTag as
|
|
36
|
-
import { ToolNode as ze } from "@langchain/langgraph/prebuilt";
|
|
37
|
-
import { clearFiltersTool as ke } from "../agents/tools/filter/clearFilters/adapter.js";
|
|
38
|
-
import { resetMapTool as Ae } from "../agents/tools/filter/resetMap/adapter.js";
|
|
39
|
-
import { setFeatureEffectTool as qe } from "../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
40
|
-
import { getAttributeTool as Ne } from "../agents/tools/query/getAttribute/adapter.js";
|
|
41
|
-
import { getStatisticsTool as Me } from "../agents/tools/query/getStatistics/adapter.js";
|
|
42
|
-
import { getTopFeaturesTool as De } from "../agents/tools/query/getTopFeatures/adapter.js";
|
|
43
|
-
import { queryFeaturesTool as Le } from "../agents/tools/query/queryFeatures/adapter.js";
|
|
32
|
+
import { createContinuousRenderer as xe } from "@arcgis/core/smartMapping/renderers/univariateColorSize.js";
|
|
33
|
+
import { createRenderer as Ce } from "@arcgis/core/smartMapping/renderers/dotDensity.js";
|
|
34
|
+
import { getSchemesByTag as $e } from "@arcgis/core/smartMapping/symbology/dotDensity.js";
|
|
35
|
+
import { createRenderer as Pe } from "@arcgis/core/smartMapping/renderers/heatmap.js";
|
|
36
|
+
import { getSchemesByTag as Ee } from "@arcgis/core/smartMapping/symbology/heatmap.js";
|
|
37
|
+
import { createRenderer as ze } from "@arcgis/core/smartMapping/renderers/predominance.js";
|
|
38
|
+
import { getSchemesByTag as ke } from "@arcgis/core/smartMapping/symbology/predominance.js";
|
|
39
|
+
import { createRenderer as Ae } from "@arcgis/core/smartMapping/renderers/relationship.js";
|
|
40
|
+
import { getSchemesByTag as qe } from "@arcgis/core/smartMapping/symbology/relationship.js";
|
|
41
|
+
import { createAgeRenderer as Ne, createContinuousRenderer as Me } from "@arcgis/core/smartMapping/renderers/size.js";
|
|
42
|
+
import { createRenderer as De } from "@arcgis/core/smartMapping/renderers/type.js";
|
|
43
|
+
import { getSchemesByTag as Le } from "@arcgis/core/smartMapping/symbology/type.js";
|
|
44
44
|
import Ge from "@arcgis/core/WebLinkChart.js";
|
|
45
45
|
import re from "@arcgis/core/rest/knowledgeGraph/GraphQueryStreaming.js";
|
|
46
46
|
import "@arcgis/core/views/LinkChartView.js";
|
|
@@ -99,16 +99,63 @@ const Ie = (e, t = 300) => {
|
|
|
99
99
|
if (!o?.[i])
|
|
100
100
|
throw new Error(`${t} requires services.${i} to be available.`);
|
|
101
101
|
return r;
|
|
102
|
-
}
|
|
103
|
-
|
|
102
|
+
}, xa = m.Root({
|
|
103
|
+
...G(),
|
|
104
|
+
vectorSearchLayerIds: m(),
|
|
105
|
+
vectorSearchFieldResults: m(),
|
|
106
|
+
layerFieldInfo: m(),
|
|
107
|
+
queryResponse: m(),
|
|
108
|
+
dataExplorationMessages: m({
|
|
109
|
+
reducer: ee,
|
|
110
|
+
default: () => []
|
|
111
|
+
})
|
|
112
|
+
}), Oe = [me, ge, fe, we], Ca = [ye, he, ue], Ke = new de(Oe, { handleToolErrors: !1 });
|
|
113
|
+
async function $a(e, t) {
|
|
114
|
+
const { messages: r } = await Ke.invoke({ messages: e.dataExplorationMessages }, t), a = [], o = [];
|
|
115
|
+
for (const i of r) {
|
|
116
|
+
const s = i.content;
|
|
117
|
+
let n;
|
|
118
|
+
typeof s != "string" && (n = {
|
|
119
|
+
tool: i.name ?? "unknown",
|
|
120
|
+
layerName: "unknown",
|
|
121
|
+
summary: "Query failed",
|
|
122
|
+
details: { error: "Skipping non-string tool output:", raw: s }
|
|
123
|
+
});
|
|
124
|
+
try {
|
|
125
|
+
typeof s == "string" ? n = JSON.parse(s) : n = {
|
|
126
|
+
tool: i.name ?? "unknown",
|
|
127
|
+
layerName: "unknown",
|
|
128
|
+
summary: "Query failed",
|
|
129
|
+
details: { error: "Invalid tool output type", raw: s }
|
|
130
|
+
};
|
|
131
|
+
} catch {
|
|
132
|
+
n = {
|
|
133
|
+
tool: i.name ?? "unknown",
|
|
134
|
+
layerName: "unknown",
|
|
135
|
+
summary: "Query failed",
|
|
136
|
+
details: { error: s }
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
a.push(n), n.details && typeof n.details == "object" && "error" in n.details ? o.push(`- ${n.tool}: Error - ${String(n.details.error)}`) : o.push(`- ${n.layerName}: ${n.summary}`);
|
|
140
|
+
}
|
|
141
|
+
return await T({ text: `Finished executing layer query tool: ${o.join(", ")}` }, t), {
|
|
142
|
+
...e,
|
|
143
|
+
dataExplorationMessages: [...e.dataExplorationMessages, ...r],
|
|
144
|
+
queryResponse: a,
|
|
145
|
+
status: "success",
|
|
146
|
+
summary: o.length > 0 ? Ie(o.join(`
|
|
147
|
+
`)) : "Query executed."
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
async function Ve(e) {
|
|
104
151
|
const { fields: t, layer: r, view: a, styleName: o, colorSchemeTags: i } = e;
|
|
105
152
|
let s;
|
|
106
|
-
return i ? s =
|
|
153
|
+
return i ? s = Te({
|
|
107
154
|
basemapTheme: await Y(a),
|
|
108
155
|
geometryType: r.geometryType,
|
|
109
156
|
includedTags: i,
|
|
110
157
|
numColors: Math.min(t.length, 8)
|
|
111
|
-
})[0] : s =
|
|
158
|
+
})[0] : s = Se({
|
|
112
159
|
basemapTheme: await Y(a),
|
|
113
160
|
geometryType: r.geometryType,
|
|
114
161
|
numColors: Math.min(t.length, 8)
|
|
@@ -125,10 +172,10 @@ async function Oe(e) {
|
|
|
125
172
|
pieChartScheme: s
|
|
126
173
|
};
|
|
127
174
|
}
|
|
128
|
-
async function
|
|
129
|
-
return await
|
|
175
|
+
async function We(e) {
|
|
176
|
+
return await be(e);
|
|
130
177
|
}
|
|
131
|
-
async function
|
|
178
|
+
async function Be({
|
|
132
179
|
arcgisMap: e,
|
|
133
180
|
arcgisMapView: t,
|
|
134
181
|
layerId: r,
|
|
@@ -147,30 +194,30 @@ async function Ve({
|
|
|
147
194
|
colorSchemeTags: o
|
|
148
195
|
};
|
|
149
196
|
try {
|
|
150
|
-
const d = await
|
|
197
|
+
const d = await Ve(p), u = await We(d);
|
|
151
198
|
return n.renderer = u.renderer, n.visible = !0, `Chart renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
152
199
|
} catch (d) {
|
|
153
200
|
return `Error applying chart renderer: ${d instanceof Error ? d.message : String(d)}`;
|
|
154
201
|
}
|
|
155
202
|
}
|
|
156
|
-
const
|
|
203
|
+
const Ue = ["mapView"];
|
|
157
204
|
function v(e) {
|
|
158
205
|
const r = e?.configurable?.context;
|
|
159
206
|
if (!r || typeof r != "object")
|
|
160
207
|
throw new Error("LayerStylingAgent context missing");
|
|
161
|
-
const a =
|
|
208
|
+
const a = Ue.filter((o) => !(o in r));
|
|
162
209
|
if (a.length)
|
|
163
210
|
throw new Error(`LayerStylingAgent context missing: ${a.join(", ")}`);
|
|
164
211
|
return r;
|
|
165
212
|
}
|
|
166
|
-
async function
|
|
213
|
+
async function He({
|
|
167
214
|
layerId: e,
|
|
168
215
|
fields: t,
|
|
169
216
|
colorSchemes: r,
|
|
170
217
|
includeSize: a
|
|
171
218
|
}, o) {
|
|
172
219
|
const { mapView: i } = v(o);
|
|
173
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
220
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await Be({
|
|
174
221
|
arcgisMap: i.map,
|
|
175
222
|
arcgisMapView: i,
|
|
176
223
|
layerId: e,
|
|
@@ -179,12 +226,12 @@ async function Be({
|
|
|
179
226
|
includeSize: a
|
|
180
227
|
});
|
|
181
228
|
}
|
|
182
|
-
const
|
|
229
|
+
const Je = c.object({
|
|
183
230
|
layerId: c.string().describe("The id of the layer to apply the chart renderer to"),
|
|
184
231
|
fields: c.array(c.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),
|
|
185
232
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
186
233
|
includeSize: c.boolean().optional().describe("Whether to vary the chart size (chart-size)")
|
|
187
|
-
}),
|
|
234
|
+
}), Pa = g(He, {
|
|
188
235
|
name: "chart",
|
|
189
236
|
description: `Label: Charts
|
|
190
237
|
Description: Show the values of two or more categories as a proportion of the total using a pie chart.
|
|
@@ -197,9 +244,9 @@ const Ue = c.object({
|
|
|
197
244
|
Keywords: pie, chart, all categories, breakdown, proportion, total, amount, how much, sum, graduated size, proportional size
|
|
198
245
|
Example: Show the total number of homes built in each decade using a pie chart for each feature and vary the size of each chart based on the total of all categories.
|
|
199
246
|
Fields: This style requires 2-8 number fields.`,
|
|
200
|
-
schema:
|
|
247
|
+
schema: Je
|
|
201
248
|
});
|
|
202
|
-
function
|
|
249
|
+
function Ye(e) {
|
|
203
250
|
const { fields: t, layer: r, view: a, theme: o, colorSchemeTags: i } = e, s = t[0];
|
|
204
251
|
let n;
|
|
205
252
|
return i && (n = V({
|
|
@@ -217,10 +264,10 @@ function He(e) {
|
|
|
217
264
|
colorScheme: n
|
|
218
265
|
};
|
|
219
266
|
}
|
|
220
|
-
async function
|
|
221
|
-
return await
|
|
267
|
+
async function Ze(e) {
|
|
268
|
+
return await ve(e);
|
|
222
269
|
}
|
|
223
|
-
async function
|
|
270
|
+
async function Xe({
|
|
224
271
|
arcgisMap: e,
|
|
225
272
|
arcgisMapView: t,
|
|
226
273
|
layerId: r,
|
|
@@ -240,20 +287,20 @@ async function Ye({
|
|
|
240
287
|
theme: i
|
|
241
288
|
};
|
|
242
289
|
try {
|
|
243
|
-
const p =
|
|
290
|
+
const p = Ye(l), d = await Ze(p);
|
|
244
291
|
return n.renderer = d.renderer, n.visible = !0, `Color-age renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
245
292
|
} catch (p) {
|
|
246
293
|
return `Error applying color-age renderer: ${p instanceof Error ? p.message : String(p)}`;
|
|
247
294
|
}
|
|
248
295
|
}
|
|
249
|
-
async function
|
|
296
|
+
async function er({
|
|
250
297
|
layerId: e,
|
|
251
298
|
fields: t,
|
|
252
299
|
colorSchemes: r,
|
|
253
300
|
theme: a
|
|
254
301
|
}, o) {
|
|
255
302
|
const { mapView: i } = v(o);
|
|
256
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
303
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await Xe({
|
|
257
304
|
arcgisMap: i.map,
|
|
258
305
|
arcgisMapView: i,
|
|
259
306
|
layerId: e,
|
|
@@ -262,21 +309,21 @@ async function Ze({
|
|
|
262
309
|
theme: a
|
|
263
310
|
});
|
|
264
311
|
}
|
|
265
|
-
const
|
|
312
|
+
const rr = c.object({
|
|
266
313
|
layerId: c.string().describe("The id of the layer to apply the color-age renderer to"),
|
|
267
314
|
fields: c.array(c.string()).describe("The field(s) to use for the color-age renderer (temporal/date data)"),
|
|
268
315
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
269
316
|
theme: c.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
|
|
270
|
-
}),
|
|
317
|
+
}), Ea = g(er, {
|
|
271
318
|
name: "color-age",
|
|
272
319
|
description: `Label: Age (color)
|
|
273
320
|
Description: Use colors along a continuous color ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
|
|
274
321
|
Keywords: since, age, how old, how long
|
|
275
322
|
Example: Show the age of each feature based on its reported date.
|
|
276
323
|
Fields: This style requires at least one field with a date type.`,
|
|
277
|
-
schema:
|
|
324
|
+
schema: rr
|
|
278
325
|
});
|
|
279
|
-
function
|
|
326
|
+
function tr(e) {
|
|
280
327
|
const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
|
|
281
328
|
let { theme: i } = e, s = t[1];
|
|
282
329
|
const n = t[0];
|
|
@@ -296,10 +343,10 @@ function er(e) {
|
|
|
296
343
|
colorScheme: l
|
|
297
344
|
};
|
|
298
345
|
}
|
|
299
|
-
async function
|
|
300
|
-
return await
|
|
346
|
+
async function ar(e) {
|
|
347
|
+
return await Re(e);
|
|
301
348
|
}
|
|
302
|
-
async function
|
|
349
|
+
async function or({
|
|
303
350
|
arcgisMap: e,
|
|
304
351
|
arcgisMapView: t,
|
|
305
352
|
layerId: r,
|
|
@@ -319,20 +366,20 @@ async function tr({
|
|
|
319
366
|
theme: i
|
|
320
367
|
};
|
|
321
368
|
try {
|
|
322
|
-
const p =
|
|
369
|
+
const p = tr(l), d = await ar(p);
|
|
323
370
|
return n.renderer = d.renderer, n.visible = !0, `Color renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
324
371
|
} catch (p) {
|
|
325
372
|
return `Error applying color renderer: ${p instanceof Error ? p.message : String(p)}`;
|
|
326
373
|
}
|
|
327
374
|
}
|
|
328
|
-
async function
|
|
375
|
+
async function nr({
|
|
329
376
|
layerId: e,
|
|
330
377
|
fields: t,
|
|
331
378
|
colorSchemes: r,
|
|
332
379
|
theme: a
|
|
333
380
|
}, o) {
|
|
334
381
|
const { mapView: i } = v(o);
|
|
335
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
382
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await or({
|
|
336
383
|
arcgisMap: i.map,
|
|
337
384
|
arcgisMapView: i,
|
|
338
385
|
layerId: e,
|
|
@@ -341,21 +388,21 @@ async function ar({
|
|
|
341
388
|
theme: a
|
|
342
389
|
});
|
|
343
390
|
}
|
|
344
|
-
const
|
|
391
|
+
const ir = c.object({
|
|
345
392
|
layerId: c.string().describe("The id of the layer to apply the color renderer to"),
|
|
346
393
|
fields: c.array(c.string()).describe("The field(s) to use for the color renderer"),
|
|
347
394
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
348
395
|
theme: c.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color ramp")
|
|
349
|
-
}),
|
|
396
|
+
}), za = g(nr, {
|
|
350
397
|
name: "color",
|
|
351
398
|
description: `Label: Counts and Amounts (color)
|
|
352
399
|
Description: Vary color along a continuous color ramp to represent numeric or ranked data.
|
|
353
400
|
Keywords: graduated color, choropleth, continuous color, hue, color, gradation, saturation, lightness, percent, rate, ratio, index, how much, increase, decrease
|
|
354
401
|
Example: Color each feature based on the population density.
|
|
355
402
|
Fields: This style requires a single field with a number type. A second number field may be specified for normalizing the value of the first field.`,
|
|
356
|
-
schema:
|
|
403
|
+
schema: ir
|
|
357
404
|
});
|
|
358
|
-
function
|
|
405
|
+
function sr(e) {
|
|
359
406
|
const { fields: t, layer: r, view: a, colorSchemeTags: o, theme: i } = e;
|
|
360
407
|
let s, n;
|
|
361
408
|
const l = t[0];
|
|
@@ -374,10 +421,10 @@ function nr(e) {
|
|
|
374
421
|
}
|
|
375
422
|
};
|
|
376
423
|
}
|
|
377
|
-
async function
|
|
378
|
-
return await
|
|
424
|
+
async function lr(e) {
|
|
425
|
+
return await xe(e);
|
|
379
426
|
}
|
|
380
|
-
async function
|
|
427
|
+
async function cr({
|
|
381
428
|
arcgisMap: e,
|
|
382
429
|
arcgisMapView: t,
|
|
383
430
|
layerId: r,
|
|
@@ -397,20 +444,20 @@ async function sr({
|
|
|
397
444
|
theme: i
|
|
398
445
|
};
|
|
399
446
|
try {
|
|
400
|
-
const p =
|
|
447
|
+
const p = sr(l), d = await lr(p);
|
|
401
448
|
return n.renderer = d.renderer, n.visible = !0, `Color-size-univariate renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
402
449
|
} catch (p) {
|
|
403
450
|
return `Error applying color-size-univariate renderer: ${p instanceof Error ? p.message : String(p)}`;
|
|
404
451
|
}
|
|
405
452
|
}
|
|
406
|
-
async function
|
|
453
|
+
async function pr({
|
|
407
454
|
layerId: e,
|
|
408
455
|
fields: t,
|
|
409
456
|
colorSchemes: r,
|
|
410
457
|
theme: a
|
|
411
458
|
}, o) {
|
|
412
459
|
const { mapView: i } = v(o);
|
|
413
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
460
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await cr({
|
|
414
461
|
arcgisMap: i.map,
|
|
415
462
|
arcgisMapView: i,
|
|
416
463
|
layerId: e,
|
|
@@ -419,24 +466,24 @@ async function lr({
|
|
|
419
466
|
theme: a
|
|
420
467
|
});
|
|
421
468
|
}
|
|
422
|
-
const
|
|
469
|
+
const dr = c.object({
|
|
423
470
|
layerId: c.string().describe("The id of the layer to apply the color-size univariate renderer to"),
|
|
424
471
|
fields: c.array(c.string()).describe("The fields to use for the color-size univariate renderer"),
|
|
425
472
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
426
473
|
theme: c.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color and size ramps")
|
|
427
|
-
}),
|
|
474
|
+
}), ka = g(pr, {
|
|
428
475
|
name: "color-size-univariate",
|
|
429
476
|
description: `Label: Color and Size (univariate)
|
|
430
477
|
Description: Vary symbol size and color based on the values of two numeric attributes.
|
|
431
478
|
Keywords: continuous color, hue, color, size, gradation, saturation, lightness, percent, rate, ratio, index, how much, increase, decrease, amount
|
|
432
479
|
Example: Color each feature based on the percentage of the population that owns a home and vary the size of each point based on total population.
|
|
433
480
|
Fields: This style requires at least two fields: one determining the color of each feature, the other determining the size of each feature. Each field may be normalized by an additional normalization field.`,
|
|
434
|
-
schema:
|
|
481
|
+
schema: dr
|
|
435
482
|
});
|
|
436
|
-
function
|
|
483
|
+
function ur(e) {
|
|
437
484
|
const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
|
|
438
485
|
let i;
|
|
439
|
-
return o && (i =
|
|
486
|
+
return o && (i = $e({
|
|
440
487
|
includedTags: o,
|
|
441
488
|
numColors: Math.min(t.length, 8)
|
|
442
489
|
})[0]), {
|
|
@@ -453,10 +500,10 @@ function pr(e) {
|
|
|
453
500
|
dotDensityScheme: i
|
|
454
501
|
};
|
|
455
502
|
}
|
|
456
|
-
async function
|
|
457
|
-
return await
|
|
503
|
+
async function hr(e) {
|
|
504
|
+
return await Ce(e);
|
|
458
505
|
}
|
|
459
|
-
async function
|
|
506
|
+
async function yr({
|
|
460
507
|
arcgisMap: e,
|
|
461
508
|
arcgisMapView: t,
|
|
462
509
|
layerId: r,
|
|
@@ -474,19 +521,19 @@ async function ur({
|
|
|
474
521
|
colorSchemeTags: o
|
|
475
522
|
};
|
|
476
523
|
try {
|
|
477
|
-
const l =
|
|
524
|
+
const l = ur(n), p = await hr(l);
|
|
478
525
|
return s.renderer = p.renderer, s.visible = !0, `Dot Density renderer applied to layer: ${s.title ?? s.id} using fields ${a.join(", ")}`;
|
|
479
526
|
} catch (l) {
|
|
480
527
|
return `Error applying dot density renderer: ${l instanceof Error ? l.message : String(l)}`;
|
|
481
528
|
}
|
|
482
529
|
}
|
|
483
|
-
async function
|
|
530
|
+
async function mr({
|
|
484
531
|
layerId: e,
|
|
485
532
|
fields: t,
|
|
486
533
|
colorSchemes: r
|
|
487
534
|
}, a) {
|
|
488
535
|
const { mapView: o } = v(a);
|
|
489
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
536
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, a), await yr({
|
|
490
537
|
arcgisMap: o.map,
|
|
491
538
|
arcgisMapView: o,
|
|
492
539
|
layerId: e,
|
|
@@ -494,11 +541,11 @@ async function hr({
|
|
|
494
541
|
colorSchemes: r
|
|
495
542
|
});
|
|
496
543
|
}
|
|
497
|
-
const
|
|
544
|
+
const gr = c.object({
|
|
498
545
|
layerId: c.string().describe("The id of the layer to apply the dot density renderer to"),
|
|
499
546
|
fields: c.array(c.string()).describe("The field(s) to use for the dot density renderer (population or count data)"),
|
|
500
547
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use")
|
|
501
|
-
}),
|
|
548
|
+
}), Aa = g(mr, {
|
|
502
549
|
name: "dot-density",
|
|
503
550
|
description: `Dot Density
|
|
504
551
|
Use dot density to visualize the distribution of one attribute or compare the density of multiple attributes. This is only valid for polygon layers.
|
|
@@ -512,13 +559,13 @@ const yr = c.object({
|
|
|
512
559
|
- Display demographic patterns within census tracts
|
|
513
560
|
**Fields:** Requires 2-8 number fields.
|
|
514
561
|
**Keywords:** density, how much, how many, total, number, amount`,
|
|
515
|
-
schema:
|
|
562
|
+
schema: gr
|
|
516
563
|
});
|
|
517
|
-
function
|
|
564
|
+
function fr(e) {
|
|
518
565
|
const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
|
|
519
566
|
let i;
|
|
520
567
|
const s = t[0];
|
|
521
|
-
return o && (i =
|
|
568
|
+
return o && (i = Ee({
|
|
522
569
|
includedTags: o,
|
|
523
570
|
basemap: a.map?.basemap || "topo"
|
|
524
571
|
})[0]), {
|
|
@@ -528,10 +575,10 @@ function mr(e) {
|
|
|
528
575
|
heatmapScheme: i
|
|
529
576
|
};
|
|
530
577
|
}
|
|
531
|
-
async function
|
|
532
|
-
return await
|
|
578
|
+
async function wr(e) {
|
|
579
|
+
return await Pe(e);
|
|
533
580
|
}
|
|
534
|
-
async function
|
|
581
|
+
async function br({
|
|
535
582
|
arcgisMap: e,
|
|
536
583
|
arcgisMapView: t,
|
|
537
584
|
layerId: r,
|
|
@@ -549,19 +596,19 @@ async function fr({
|
|
|
549
596
|
colorSchemeTags: o
|
|
550
597
|
};
|
|
551
598
|
try {
|
|
552
|
-
const l =
|
|
599
|
+
const l = fr(n), p = await wr(l);
|
|
553
600
|
return s.renderer = p.renderer, s.visible = !0, `Heatmap renderer applied to layer: ${s.title ?? s.id} using fields ${a.join(", ")}`;
|
|
554
601
|
} catch (l) {
|
|
555
602
|
return `Error applying heatmap renderer: ${l instanceof Error ? l.message : String(l)}`;
|
|
556
603
|
}
|
|
557
604
|
}
|
|
558
|
-
async function
|
|
605
|
+
async function Tr({
|
|
559
606
|
layerId: e,
|
|
560
607
|
fields: t,
|
|
561
608
|
colorSchemes: r
|
|
562
609
|
}, a) {
|
|
563
610
|
const { mapView: o } = v(a);
|
|
564
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
611
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, a), await br({
|
|
565
612
|
arcgisMap: o.map,
|
|
566
613
|
arcgisMapView: o,
|
|
567
614
|
layerId: e,
|
|
@@ -569,23 +616,23 @@ async function wr({
|
|
|
569
616
|
colorSchemes: r
|
|
570
617
|
});
|
|
571
618
|
}
|
|
572
|
-
const
|
|
619
|
+
const Sr = c.object({
|
|
573
620
|
layerId: c.string().describe("The id of the layer to apply the heatmap renderer to"),
|
|
574
621
|
fields: c.array(c.string()).describe("The field(s) to use for the heatmap renderer (typically point density)"),
|
|
575
622
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use")
|
|
576
|
-
}),
|
|
623
|
+
}), qa = g(Tr, {
|
|
577
624
|
name: "heatmap",
|
|
578
625
|
description: `Label: Heat Map
|
|
579
626
|
Description: Show areas of high density with colors that appear to glow hotter. This is only valid for point layers.
|
|
580
627
|
Keywords: density, heatmap, hot spots, pattern, cluster
|
|
581
628
|
Example: Create a heatmap
|
|
582
629
|
Fields: This typically requires zero or one field of type number.`,
|
|
583
|
-
schema:
|
|
630
|
+
schema: Sr
|
|
584
631
|
});
|
|
585
|
-
function
|
|
632
|
+
function vr(e) {
|
|
586
633
|
const { fields: t, layer: r, view: a, styleName: o, colorSchemeTags: i } = e;
|
|
587
634
|
let s;
|
|
588
|
-
return i && (s =
|
|
635
|
+
return i && (s = ke({
|
|
589
636
|
geometryType: r.geometryType,
|
|
590
637
|
includedTags: i,
|
|
591
638
|
numColors: Math.min(t.length, 10)
|
|
@@ -599,10 +646,10 @@ function Tr(e) {
|
|
|
599
646
|
predominanceScheme: s
|
|
600
647
|
};
|
|
601
648
|
}
|
|
602
|
-
async function
|
|
603
|
-
return await
|
|
649
|
+
async function Rr(e) {
|
|
650
|
+
return await ze(e);
|
|
604
651
|
}
|
|
605
|
-
async function
|
|
652
|
+
async function xr({
|
|
606
653
|
arcgisMap: e,
|
|
607
654
|
arcgisMapView: t,
|
|
608
655
|
layerId: r,
|
|
@@ -621,20 +668,20 @@ async function vr({
|
|
|
621
668
|
colorSchemeTags: o
|
|
622
669
|
};
|
|
623
670
|
try {
|
|
624
|
-
const d =
|
|
671
|
+
const d = vr(p), u = await Rr(d);
|
|
625
672
|
return n.renderer = u.renderer, n.visible = !0, `Predominance renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
626
673
|
} catch (d) {
|
|
627
674
|
return `Error applying predominance renderer: ${d instanceof Error ? d.message : String(d)}`;
|
|
628
675
|
}
|
|
629
676
|
}
|
|
630
|
-
async function
|
|
677
|
+
async function Cr({
|
|
631
678
|
layerId: e,
|
|
632
679
|
fields: t,
|
|
633
680
|
colorSchemes: r,
|
|
634
681
|
includeSize: a
|
|
635
682
|
}, o) {
|
|
636
683
|
const { mapView: i } = v(o);
|
|
637
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
684
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await xr({
|
|
638
685
|
arcgisMap: i.map,
|
|
639
686
|
arcgisMapView: i,
|
|
640
687
|
layerId: e,
|
|
@@ -643,12 +690,12 @@ async function Rr({
|
|
|
643
690
|
includeSize: a
|
|
644
691
|
});
|
|
645
692
|
}
|
|
646
|
-
const
|
|
693
|
+
const $r = c.object({
|
|
647
694
|
layerId: c.string().describe("The id of the layer to apply the predominance renderer to"),
|
|
648
695
|
fields: c.array(c.string()).describe("The fields to use for the predominance renderer (competing categories)"),
|
|
649
696
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
650
697
|
includeSize: c.boolean().optional().describe("Whether to include size visualization (predominance-size)")
|
|
651
|
-
}),
|
|
698
|
+
}), Na = g(Cr, {
|
|
652
699
|
name: "predominance",
|
|
653
700
|
description: `Label: Predominant category
|
|
654
701
|
Description: Compare attributes that share a common subject and unit of measurement to see which has the highest value.
|
|
@@ -661,9 +708,9 @@ const xr = c.object({
|
|
|
661
708
|
Keywords: predominant, winner, won, competing, most, most common, most frequent, dominant, prevalent, top, amount, total, how much, proportional size, graduated size, sum
|
|
662
709
|
Example: Show the predominant crop in each area and vary the size of each symbol based on the total of all categories.
|
|
663
710
|
Fields: This style relies on 2-10 number fields.`,
|
|
664
|
-
schema:
|
|
711
|
+
schema: $r
|
|
665
712
|
});
|
|
666
|
-
function
|
|
713
|
+
function Pr(e) {
|
|
667
714
|
const { fields: t, layer: r, view: a, colorSchemeTags: o } = e;
|
|
668
715
|
let i;
|
|
669
716
|
const s = {
|
|
@@ -671,7 +718,7 @@ function Cr(e) {
|
|
|
671
718
|
}, n = {
|
|
672
719
|
field: t[1]
|
|
673
720
|
};
|
|
674
|
-
return o && (i =
|
|
721
|
+
return o && (i = qe({
|
|
675
722
|
geometryType: r.geometryType,
|
|
676
723
|
includedTags: o
|
|
677
724
|
})[0]), {
|
|
@@ -684,10 +731,10 @@ function Cr(e) {
|
|
|
684
731
|
relationshipScheme: i
|
|
685
732
|
};
|
|
686
733
|
}
|
|
687
|
-
async function
|
|
688
|
-
return await
|
|
734
|
+
async function Er(e) {
|
|
735
|
+
return await Ae(e);
|
|
689
736
|
}
|
|
690
|
-
async function
|
|
737
|
+
async function zr({
|
|
691
738
|
arcgisMap: e,
|
|
692
739
|
arcgisMapView: t,
|
|
693
740
|
layerId: r,
|
|
@@ -705,19 +752,19 @@ async function Pr({
|
|
|
705
752
|
colorSchemeTags: o
|
|
706
753
|
};
|
|
707
754
|
try {
|
|
708
|
-
const l =
|
|
755
|
+
const l = Pr(n), p = await Er(l);
|
|
709
756
|
return s.renderer = p.renderer, s.visible = !0, `Relationship renderer applied to layer: ${s.title ?? s.id} using fields ${a.join(", ")}`;
|
|
710
757
|
} catch (l) {
|
|
711
758
|
return `Error applying relationship renderer: ${l instanceof Error ? l.message : String(l)}`;
|
|
712
759
|
}
|
|
713
760
|
}
|
|
714
|
-
async function
|
|
761
|
+
async function kr({
|
|
715
762
|
layerId: e,
|
|
716
763
|
fields: t,
|
|
717
764
|
colorSchemes: r
|
|
718
765
|
}, a) {
|
|
719
766
|
const { mapView: o } = v(a);
|
|
720
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, a), await
|
|
767
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, a), await zr({
|
|
721
768
|
arcgisMap: o.map,
|
|
722
769
|
arcgisMapView: o,
|
|
723
770
|
layerId: e,
|
|
@@ -725,20 +772,20 @@ async function Er({
|
|
|
725
772
|
colorSchemes: r
|
|
726
773
|
});
|
|
727
774
|
}
|
|
728
|
-
const
|
|
775
|
+
const Ar = c.object({
|
|
729
776
|
layerId: c.string().describe("The id of the layer to apply the relationship renderer to"),
|
|
730
777
|
fields: c.array(c.string()).describe("The two fields to use for the relationship renderer (bivariate visualization)"),
|
|
731
778
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use")
|
|
732
|
-
}),
|
|
779
|
+
}), Ma = g(kr, {
|
|
733
780
|
name: "relationship",
|
|
734
781
|
description: `Label: Relationship
|
|
735
782
|
Description: Overlays two color ramps to represent the relationship between two numeric attributes.
|
|
736
783
|
Keywords: relationship, correlation, compare, related, bivariate choropleth, bivariate color
|
|
737
784
|
Example: Show the relationship between tree height and carbon storage
|
|
738
785
|
Fields: This style requires two number fields.`,
|
|
739
|
-
schema:
|
|
786
|
+
schema: Ar
|
|
740
787
|
});
|
|
741
|
-
function
|
|
788
|
+
function qr(e) {
|
|
742
789
|
const { fields: t, layer: r, view: a, theme: o } = e, i = t[0];
|
|
743
790
|
return {
|
|
744
791
|
layer: r,
|
|
@@ -750,10 +797,10 @@ function kr(e) {
|
|
|
750
797
|
outlineOptimizationEnabled: !0
|
|
751
798
|
};
|
|
752
799
|
}
|
|
753
|
-
async function
|
|
754
|
-
return await
|
|
800
|
+
async function Nr(e) {
|
|
801
|
+
return await Ne(e);
|
|
755
802
|
}
|
|
756
|
-
async function
|
|
803
|
+
async function Mr({
|
|
757
804
|
arcgisMap: e,
|
|
758
805
|
arcgisMapView: t,
|
|
759
806
|
layerId: r,
|
|
@@ -773,20 +820,20 @@ async function qr({
|
|
|
773
820
|
theme: i
|
|
774
821
|
};
|
|
775
822
|
try {
|
|
776
|
-
const p =
|
|
823
|
+
const p = qr(l), d = await Nr(p);
|
|
777
824
|
return n.renderer = d.renderer, n.visible = !0, `Size-age renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
778
825
|
} catch (p) {
|
|
779
826
|
return `Error applying size-age renderer: ${p instanceof Error ? p.message : String(p)}`;
|
|
780
827
|
}
|
|
781
828
|
}
|
|
782
|
-
async function
|
|
829
|
+
async function Dr({
|
|
783
830
|
layerId: e,
|
|
784
831
|
fields: t,
|
|
785
832
|
colorSchemes: r,
|
|
786
833
|
theme: a
|
|
787
834
|
}, o) {
|
|
788
835
|
const { mapView: i } = v(o);
|
|
789
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
836
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await Mr({
|
|
790
837
|
arcgisMap: i.map,
|
|
791
838
|
arcgisMapView: i,
|
|
792
839
|
layerId: e,
|
|
@@ -795,21 +842,21 @@ async function Nr({
|
|
|
795
842
|
theme: a
|
|
796
843
|
});
|
|
797
844
|
}
|
|
798
|
-
const
|
|
845
|
+
const Lr = c.object({
|
|
799
846
|
layerId: c.string().describe("The id of the layer to apply the size-age renderer to"),
|
|
800
847
|
fields: c.array(c.string()).describe("The field(s) to use for the size-age renderer (temporal data with size)"),
|
|
801
848
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
802
849
|
theme: c.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
|
|
803
|
-
}),
|
|
850
|
+
}), Da = g(Dr, {
|
|
804
851
|
name: "size-age",
|
|
805
852
|
description: `Label: Age (size)
|
|
806
853
|
Description: Vary symbol sizes along a continuous ramp to represent the age of features. Age reflects the length of time from a start date to an end date.
|
|
807
854
|
Keywords: since, age, how old, how long
|
|
808
855
|
Example: Change the size of features so older features are larger than new features.
|
|
809
856
|
Fields: This style requires at least one field with a date type.`,
|
|
810
|
-
schema:
|
|
857
|
+
schema: Lr
|
|
811
858
|
});
|
|
812
|
-
function
|
|
859
|
+
function Gr(e) {
|
|
813
860
|
const { fields: t, layer: r, view: a } = e;
|
|
814
861
|
let { theme: o } = e, i = t[1];
|
|
815
862
|
const s = t[0];
|
|
@@ -823,10 +870,10 @@ function Dr(e) {
|
|
|
823
870
|
outlineOptimizationEnabled: !0
|
|
824
871
|
};
|
|
825
872
|
}
|
|
826
|
-
async function
|
|
827
|
-
return await
|
|
873
|
+
async function jr(e) {
|
|
874
|
+
return await Me(e);
|
|
828
875
|
}
|
|
829
|
-
async function
|
|
876
|
+
async function Fr({
|
|
830
877
|
arcgisMap: e,
|
|
831
878
|
arcgisMapView: t,
|
|
832
879
|
layerId: r,
|
|
@@ -846,20 +893,20 @@ async function Gr({
|
|
|
846
893
|
theme: i
|
|
847
894
|
};
|
|
848
895
|
try {
|
|
849
|
-
const p =
|
|
896
|
+
const p = Gr(l), d = await jr(p);
|
|
850
897
|
return n.renderer = d.renderer, n.visible = !0, `Size renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
851
898
|
} catch (p) {
|
|
852
899
|
return `Error applying size renderer: ${p instanceof Error ? p.message : String(p)}`;
|
|
853
900
|
}
|
|
854
901
|
}
|
|
855
|
-
async function
|
|
902
|
+
async function _r({
|
|
856
903
|
layerId: e,
|
|
857
904
|
fields: t,
|
|
858
905
|
colorSchemes: r,
|
|
859
906
|
theme: a
|
|
860
907
|
}, o) {
|
|
861
908
|
const { mapView: i } = v(o);
|
|
862
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
909
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await Fr({
|
|
863
910
|
arcgisMap: i.map,
|
|
864
911
|
arcgisMapView: i,
|
|
865
912
|
layerId: e,
|
|
@@ -868,12 +915,12 @@ async function jr({
|
|
|
868
915
|
theme: a
|
|
869
916
|
});
|
|
870
917
|
}
|
|
871
|
-
const
|
|
918
|
+
const Qr = c.object({
|
|
872
919
|
layerId: c.string().describe("The id of the layer to apply the size renderer to"),
|
|
873
920
|
fields: c.array(c.string()).describe("The field(s) to use for the size renderer (numeric data)"),
|
|
874
921
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
875
922
|
theme: c.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the size ramp")
|
|
876
|
-
}),
|
|
923
|
+
}), La = g(_r, {
|
|
877
924
|
name: "size",
|
|
878
925
|
description: `Label: Counts and Amounts (size)
|
|
879
926
|
Description: Vary symbol sizes along a continuous ramp to represent numeric or ranked data.
|
|
@@ -886,12 +933,12 @@ const Fr = c.object({
|
|
|
886
933
|
Keywords: graduated size, proportional size, classed size, how much, total, number, when
|
|
887
934
|
Example: Vary the size of each feature based on the date a ticket was completed.
|
|
888
935
|
Fields: This style requires a single field with a date type.`,
|
|
889
|
-
schema:
|
|
936
|
+
schema: Qr
|
|
890
937
|
});
|
|
891
|
-
function
|
|
938
|
+
function Ir(e) {
|
|
892
939
|
const { fields: t, layer: r, view: a, colorSchemeTags: o } = e, i = t[0], s = t[1], n = t[2];
|
|
893
940
|
let l;
|
|
894
|
-
return o && (l =
|
|
941
|
+
return o && (l = Le({
|
|
895
942
|
geometryType: r.geometryType,
|
|
896
943
|
includedTags: o
|
|
897
944
|
})[0]), {
|
|
@@ -905,10 +952,10 @@ function _r(e) {
|
|
|
905
952
|
typeScheme: l
|
|
906
953
|
};
|
|
907
954
|
}
|
|
908
|
-
async function
|
|
909
|
-
return await
|
|
955
|
+
async function Or(e) {
|
|
956
|
+
return await De(e);
|
|
910
957
|
}
|
|
911
|
-
async function
|
|
958
|
+
async function Kr({
|
|
912
959
|
arcgisMap: e,
|
|
913
960
|
arcgisMapView: t,
|
|
914
961
|
layerId: r,
|
|
@@ -928,20 +975,20 @@ async function Ir({
|
|
|
928
975
|
theme: i
|
|
929
976
|
};
|
|
930
977
|
try {
|
|
931
|
-
const p =
|
|
978
|
+
const p = Ir(l), d = await Or(p);
|
|
932
979
|
return n.renderer = d.renderer, n.visible = !0, `Type renderer applied to layer: ${n.title ?? n.id} using fields ${a.join(", ")}`;
|
|
933
980
|
} catch (p) {
|
|
934
981
|
return `Error applying type renderer: ${p instanceof Error ? p.message : String(p)}`;
|
|
935
982
|
}
|
|
936
983
|
}
|
|
937
|
-
async function
|
|
984
|
+
async function Vr({
|
|
938
985
|
layerId: e,
|
|
939
986
|
fields: t,
|
|
940
987
|
colorSchemes: r,
|
|
941
988
|
theme: a
|
|
942
989
|
}, o) {
|
|
943
990
|
const { mapView: i } = v(o);
|
|
944
|
-
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await
|
|
991
|
+
return await S({ type: "show-legend", data: { layerIds: [e] } }, o), await Kr({
|
|
945
992
|
arcgisMap: i.map,
|
|
946
993
|
arcgisMapView: i,
|
|
947
994
|
layerId: e,
|
|
@@ -950,74 +997,26 @@ async function Or({
|
|
|
950
997
|
theme: a
|
|
951
998
|
});
|
|
952
999
|
}
|
|
953
|
-
const
|
|
1000
|
+
const Wr = c.object({
|
|
954
1001
|
layerId: c.string().describe("The id of the layer to apply the type renderer to"),
|
|
955
1002
|
fields: c.array(c.string()).describe("The field(s) to use for the type renderer (categorical data)"),
|
|
956
1003
|
colorSchemes: c.array(c.string()).optional().describe("Optional color scheme tags to use"),
|
|
957
1004
|
theme: c.enum(["above-and-below", "above", "below", "centered-on", "extremes", "high-to-low"]).optional().describe("Optional theme for the color scheme")
|
|
958
|
-
}),
|
|
1005
|
+
}), Ga = g(Vr, {
|
|
959
1006
|
name: "type",
|
|
960
1007
|
description: `Label: Types (unique symbols)
|
|
961
1008
|
Description: Represent features as categories with different symbol colors or shapes. Examples include type of tree, road class, or province name.
|
|
962
1009
|
Keywords: categorical, category, type, unique, discrete, point of interest, region, group
|
|
963
1010
|
Example: Color each feature based on the region it belongs to
|
|
964
1011
|
Fields: This style requires a single field which may be a string, number, or date type. It is usually a string.`,
|
|
965
|
-
schema:
|
|
966
|
-
}),
|
|
1012
|
+
schema: Wr
|
|
1013
|
+
}), ja = m.Root({
|
|
967
1014
|
...G(),
|
|
968
1015
|
vectorSearchLayerIds: m(),
|
|
969
1016
|
vectorSearchFieldResults: m(),
|
|
970
1017
|
layerFieldInfo: m(),
|
|
971
1018
|
selectedLayerId: m()
|
|
972
|
-
}),
|
|
973
|
-
...G(),
|
|
974
|
-
vectorSearchLayerIds: m(),
|
|
975
|
-
vectorSearchFieldResults: m(),
|
|
976
|
-
layerFieldInfo: m(),
|
|
977
|
-
queryResponse: m(),
|
|
978
|
-
dataExplorationMessages: m({
|
|
979
|
-
reducer: ee,
|
|
980
|
-
default: () => []
|
|
981
|
-
})
|
|
982
|
-
}), Vr = [Ne, Me, De, Le], Ga = [qe, Ae, ke], Wr = new ze(Vr, { handleToolErrors: !1 });
|
|
983
|
-
async function ja(e, t) {
|
|
984
|
-
const { messages: r } = await Wr.invoke({ messages: e.dataExplorationMessages }, t), a = [], o = [];
|
|
985
|
-
for (const i of r) {
|
|
986
|
-
const s = i.content;
|
|
987
|
-
let n;
|
|
988
|
-
typeof s != "string" && (n = {
|
|
989
|
-
tool: i.name ?? "unknown",
|
|
990
|
-
layerName: "unknown",
|
|
991
|
-
summary: "Query failed",
|
|
992
|
-
details: { error: "Skipping non-string tool output:", raw: s }
|
|
993
|
-
});
|
|
994
|
-
try {
|
|
995
|
-
typeof s == "string" ? n = JSON.parse(s) : n = {
|
|
996
|
-
tool: i.name ?? "unknown",
|
|
997
|
-
layerName: "unknown",
|
|
998
|
-
summary: "Query failed",
|
|
999
|
-
details: { error: "Invalid tool output type", raw: s }
|
|
1000
|
-
};
|
|
1001
|
-
} catch {
|
|
1002
|
-
n = {
|
|
1003
|
-
tool: i.name ?? "unknown",
|
|
1004
|
-
layerName: "unknown",
|
|
1005
|
-
summary: "Query failed",
|
|
1006
|
-
details: { error: s }
|
|
1007
|
-
};
|
|
1008
|
-
}
|
|
1009
|
-
a.push(n), n.details && typeof n.details == "object" && "error" in n.details ? o.push(`- ${n.tool}: Error - ${String(n.details.error)}`) : o.push(`- ${n.layerName}: ${n.summary}`);
|
|
1010
|
-
}
|
|
1011
|
-
return await T({ text: `Finished executing layer query tool: ${o.join(", ")}` }, t), {
|
|
1012
|
-
...e,
|
|
1013
|
-
dataExplorationMessages: [...e.dataExplorationMessages, ...r],
|
|
1014
|
-
queryResponse: a,
|
|
1015
|
-
status: "success",
|
|
1016
|
-
summary: o.length > 0 ? Ie(o.join(`
|
|
1017
|
-
`)) : "Query executed."
|
|
1018
|
-
};
|
|
1019
|
-
}
|
|
1020
|
-
const Fa = m.Root({
|
|
1019
|
+
}), Fa = m.Root({
|
|
1021
1020
|
...G(),
|
|
1022
1021
|
// internal to the help agent
|
|
1023
1022
|
helpInternalState: m({
|
|
@@ -2122,11 +2121,11 @@ const K = "searchGraphData", Pt = c.object({
|
|
|
2122
2121
|
schema: Pt
|
|
2123
2122
|
});
|
|
2124
2123
|
export {
|
|
2125
|
-
|
|
2126
|
-
|
|
2124
|
+
Ga as A,
|
|
2125
|
+
xa as D,
|
|
2127
2126
|
B as G,
|
|
2128
2127
|
Fa as H,
|
|
2129
|
-
|
|
2128
|
+
ja as L,
|
|
2130
2129
|
va as N,
|
|
2131
2130
|
Oa as a,
|
|
2132
2131
|
Ba as b,
|
|
@@ -2137,21 +2136,21 @@ export {
|
|
|
2137
2136
|
L as g,
|
|
2138
2137
|
N as h,
|
|
2139
2138
|
_a as i,
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2139
|
+
Ca as j,
|
|
2140
|
+
Oe as k,
|
|
2141
|
+
$a as l,
|
|
2142
|
+
Pa as m,
|
|
2143
|
+
Ea as n,
|
|
2144
|
+
za as o,
|
|
2145
|
+
ka as p,
|
|
2147
2146
|
Wa as q,
|
|
2148
2147
|
Ra as r,
|
|
2149
2148
|
Ua as s,
|
|
2150
2149
|
Ie as t,
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
|
|
2156
|
-
|
|
2150
|
+
Aa as u,
|
|
2151
|
+
qa as v,
|
|
2152
|
+
Na as w,
|
|
2153
|
+
Ma as x,
|
|
2154
|
+
Da as y,
|
|
2155
|
+
La as z
|
|
2157
2156
|
};
|